blob: 7e2e00669f81b7424d1816ffdfced10816e06ff7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#ifndef foopackethfoo
#define foopackethfoo
#include <sys/types.h>
#include <stdint.h>
struct packet {
enum { PACKET_APPENDED, PACKET_DYNAMIC } type;
unsigned ref;
size_t length;
uint8_t *data;
};
struct packet* packet_new(size_t length);
struct packet* packet_new_dynamic(uint8_t* data, size_t length);
struct packet* packet_ref(struct packet *p);
void packet_unref(struct packet *p);
#endif
|