a0e7abfa8747bd3df5159cd821d4031752c9f683
[platform/upstream/libnetfilter_queue.git] / include / libnetfilter_queue / pktbuff.h
1 #ifndef _PKTBUFF_H_
2 #define _PKTBUFF_H_
3
4 struct pkt_buff;
5
6 struct pkt_buff *pktb_alloc(int family, void *data, size_t len, size_t extra);
7 void pktb_free(struct pkt_buff *pktb);
8
9 uint8_t *pktb_data(struct pkt_buff *pktb);
10 uint32_t pktb_len(struct pkt_buff *pktb);
11
12 void pktb_push(struct pkt_buff *pktb, unsigned int len);
13 void pktb_pull(struct pkt_buff *pktb, unsigned int len);
14 void pktb_put(struct pkt_buff *pktb, unsigned int len);
15 void pktb_trim(struct pkt_buff *pktb, unsigned int len);
16 unsigned int pktb_tailroom(struct pkt_buff *pktb);
17
18 uint8_t *pktb_mac_header(struct pkt_buff *pktb);
19 uint8_t *pktb_network_header(struct pkt_buff *pktb);
20 uint8_t *pktb_transport_header(struct pkt_buff *pktb);
21
22 #endif