aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_packet.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/if_packet.h')
-rw-r--r--include/linux/if_packet.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h
index ad09609227ff..d4d3c82448f5 100644
--- a/include/linux/if_packet.h
+++ b/include/linux/if_packet.h
@@ -43,6 +43,8 @@ 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
46 48
47struct tpacket_stats 49struct tpacket_stats
48{ 50{
@@ -79,6 +81,25 @@ struct tpacket_hdr
79#define TPACKET_ALIGN(x) (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1)) 81#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)) 82#define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll))
81 83
84struct tpacket2_hdr
85{
86 __u32 tp_status;
87 __u32 tp_len;
88 __u32 tp_snaplen;
89 __u16 tp_mac;
90 __u16 tp_net;
91 __u32 tp_sec;
92 __u32 tp_nsec;
93};
94
95#define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll))
96
97enum tpacket_versions
98{
99 TPACKET_V1,
100 TPACKET_V2,
101};
102
82/* 103/*
83 Frame structure: 104 Frame structure:
84 105