diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-03-12 05:49:59 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2013-03-12 05:51:22 +0100 |
commit | e1f5669be2c2b25c2147685e8c07d7282b0d23bb (patch) | |
tree | 7a5eb65a53f5da5310d1a1bce61dcea0a9f2d54c /econpacket.h | |
parent | f0e79c0c5946e113edc346220bb1906681ab82ac (diff) | |
download | econ-e1f5669be2c2b25c2147685e8c07d7282b0d23bb.tar.gz econ-e1f5669be2c2b25c2147685e8c07d7282b0d23bb.tar.bz2 econ-e1f5669be2c2b25c2147685e8c07d7282b0d23bb.zip |
Move econ packet handling into seperate c-file
Diffstat (limited to 'econpacket.h')
-rw-r--r-- | econpacket.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/econpacket.h b/econpacket.h new file mode 100644 index 0000000..51d421b --- /dev/null +++ b/econpacket.h @@ -0,0 +1,22 @@ +#ifndef _ECONPACKET_H_ +#define _ECONPACKET_H_ + +#include "econproto.h" + +struct econ_packet { + struct econ_header hdr; + struct econ_command cmd; + struct econ_record rec; + + /* Holding the previous elements */ + struct iovec iov[3]; +}; + +void +epkt_init(struct econ_packet *pkt, int cmd); +int +epkt_send(int fd, struct econ_packet *pkt); +int +epkt_read(int fd, struct econ_packet *pkt); + +#endif /* _ECONPACKET_H_ */ |