diff options
Diffstat (limited to 'ecp/src/ecp/ext/frag.h')
-rw-r--r-- | ecp/src/ecp/ext/frag.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ecp/src/ecp/ext/frag.h b/ecp/src/ecp/ext/frag.h new file mode 100644 index 0000000..1400c1d --- /dev/null +++ b/ecp/src/ecp/ext/frag.h @@ -0,0 +1,13 @@ +typedef struct ECPFragIter { + ecp_seq_t seq; + unsigned char frag_cnt; + unsigned char *buffer; + size_t buf_size; + size_t pld_size; +} ECPFragIter; + +int ecp_frag_iter_init(ECPRBConn *conn, ECPFragIter *iter, unsigned char *buffer, size_t buf_size); +ECPFragIter *ecp_frag_iter_get(ECPRBConn *conn); +void ecp_frag_iter_reset(ECPFragIter *iter); +ssize_t ecp_msg_frag(ECPConnection *conn, unsigned char mtype, unsigned char *msg, size_t msg_size, ECPBuffer *packet, ECPBuffer *payload); +ssize_t ecp_pld_defrag(ECPConnection *conn, ecp_seq_t seq, unsigned char mtype, unsigned char *payload, size_t pld_size);
\ No newline at end of file |