diff options
Diffstat (limited to 'include/msg_buff.h')
-rw-r--r-- | include/msg_buff.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/msg_buff.h b/include/msg_buff.h new file mode 100644 index 0000000..f4eea36 --- /dev/null +++ b/include/msg_buff.h @@ -0,0 +1,21 @@ +#ifndef _MSG_BUFF_H_ +#define _MSG_BUFF_H_ + +#include <stdint.h> + +struct msg_buff; + +struct msg_buff *msgb_alloc(uint32_t size); +void msgb_free(struct msg_buff *msgb); + +uint32_t msgb_len(struct msg_buff *msgb); +uint32_t msgb_size(struct msg_buff *msgb); + +unsigned char *msgb_data(struct msg_buff *msgb); +unsigned char *msgb_tail(struct msg_buff *msgb); + +void *msgb_put(struct msg_buff *msgb, uint32_t len); +void *msgb_pull(struct msg_buff *msgb, uint32_t len); +void msgb_burp(struct msg_buff *msgb); + +#endif |