Go to the documentation of this file. 1 #ifndef __LINUX_IF_PACKET_H
2 #define __LINUX_IF_PACKET_H
4 #include <linux/types.h>
25 #define PACKET_BROADCAST 1
26 #define PACKET_MULTICAST 2
27 #define PACKET_OTHERHOST 3
28 #define PACKET_OUTGOING 4
30 #define PACKET_LOOPBACK 5
31 #define PACKET_FASTROUTE 6
35 #define PACKET_ADD_MEMBERSHIP 1
36 #define PACKET_DROP_MEMBERSHIP 2
37 #define PACKET_RECV_OUTPUT 3
39 #define PACKET_RX_RING 5
40 #define PACKET_STATISTICS 6
41 #define PACKET_COPY_THRESH 7
42 #define PACKET_AUXDATA 8
43 #define PACKET_ORIGDEV 9
44 #define PACKET_VERSION 10
45 #define PACKET_HDRLEN 11
46 #define PACKET_RESERVE 12
47 #define PACKET_TX_RING 13
48 #define PACKET_LOSS 14
49 #define PACKET_VNET_HDR 15
50 #define PACKET_TX_TIMESTAMP 16
51 #define PACKET_TIMESTAMP 17
52 #define PACKET_FANOUT 18
54 #define PACKET_FANOUT_HASH 0
55 #define PACKET_FANOUT_LB 1
56 #define PACKET_FANOUT_CPU 2
57 #define PACKET_FANOUT_FLAG_DEFRAG 0x8000
86 #define TP_STATUS_KERNEL 0x0
87 #define TP_STATUS_USER 0x1
88 #define TP_STATUS_COPY 0x2
89 #define TP_STATUS_LOSING 0x4
90 #define TP_STATUS_CSUMNOTREADY 0x8
91 #define TP_STATUS_VLAN_VALID 0x10
92 #define TP_STATUS_BLK_TMO 0x20
95 #define TP_STATUS_AVAILABLE 0x0
96 #define TP_STATUS_SEND_REQUEST 0x1
97 #define TP_STATUS_SENDING 0x2
98 #define TP_STATUS_WRONG_FORMAT 0x4
101 #define TP_FT_REQ_FILL_RXHASH 0x1
113 #define TPACKET_ALIGNMENT 16
114 #define TPACKET_ALIGN(x) (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1))
115 #define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll))
216 #define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll))
217 #define TPACKET3_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket3_hdr)) + sizeof(struct sockaddr_ll))
267 #define PACKET_MR_MULTICAST 0
268 #define PACKET_MR_PROMISC 1
269 #define PACKET_MR_ALLMULTI 2
270 #define PACKET_MR_UNICAST 3