diff options
Diffstat (limited to 'include/linux/if_packet.h')
-rw-r--r-- | include/linux/if_packet.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h index ad09609227ff..18db0668065a 100644 --- a/include/linux/if_packet.h +++ b/include/linux/if_packet.h | |||
@@ -43,6 +43,9 @@ struct sockaddr_ll | |||
43 | #define PACKET_COPY_THRESH 7 | 43 | #define PACKET_COPY_THRESH 7 |
44 | #define PACKET_AUXDATA 8 | 44 | #define PACKET_AUXDATA 8 |
45 | #define PACKET_ORIGDEV 9 | 45 | #define PACKET_ORIGDEV 9 |
46 | #define PACKET_VERSION 10 | ||
47 | #define PACKET_HDRLEN 11 | ||
48 | #define PACKET_RESERVE 12 | ||
46 | 49 | ||
47 | struct tpacket_stats | 50 | struct tpacket_stats |
48 | { | 51 | { |
@@ -57,6 +60,7 @@ struct tpacket_auxdata | |||
57 | __u32 tp_snaplen; | 60 | __u32 tp_snaplen; |
58 | __u16 tp_mac; | 61 | __u16 tp_mac; |
59 | __u16 tp_net; | 62 | __u16 tp_net; |
63 | __u16 tp_vlan_tci; | ||
60 | }; | 64 | }; |
61 | 65 | ||
62 | struct tpacket_hdr | 66 | struct tpacket_hdr |
@@ -79,6 +83,26 @@ struct tpacket_hdr | |||
79 | #define TPACKET_ALIGN(x) (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1)) | 83 | #define TPACKET_ALIGN(x) (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1)) |
80 | #define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll)) | 84 | #define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll)) |
81 | 85 | ||
86 | struct tpacket2_hdr | ||
87 | { | ||
88 | __u32 tp_status; | ||
89 | __u32 tp_len; | ||
90 | __u32 tp_snaplen; | ||
91 | __u16 tp_mac; | ||
92 | __u16 tp_net; | ||
93 | __u32 tp_sec; | ||
94 | __u32 tp_nsec; | ||
95 | __u16 tp_vlan_tci; | ||
96 | }; | ||
97 | |||
98 | #define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll)) | ||
99 | |||
100 | enum tpacket_versions | ||
101 | { | ||
102 | TPACKET_V1, | ||
103 | TPACKET_V2, | ||
104 | }; | ||
105 | |||
82 | /* | 106 | /* |
83 | Frame structure: | 107 | Frame structure: |
84 | 108 | ||