]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/if_packet.h
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
[linux-2.6-omap-h63xx.git] / include / linux / if_packet.h
index ad09609227ffa28dad825e27266fc41e0edded7d..18db0668065a61c6e5af363f3db50ddd1d5b629a 100644 (file)
@@ -43,6 +43,9 @@ struct sockaddr_ll
 #define PACKET_COPY_THRESH             7
 #define PACKET_AUXDATA                 8
 #define PACKET_ORIGDEV                 9
+#define PACKET_VERSION                 10
+#define PACKET_HDRLEN                  11
+#define PACKET_RESERVE                 12
 
 struct tpacket_stats
 {
@@ -57,6 +60,7 @@ struct tpacket_auxdata
        __u32           tp_snaplen;
        __u16           tp_mac;
        __u16           tp_net;
+       __u16           tp_vlan_tci;
 };
 
 struct tpacket_hdr
@@ -79,6 +83,26 @@ struct tpacket_hdr
 #define TPACKET_ALIGN(x)       (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1))
 #define TPACKET_HDRLEN         (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll))
 
+struct tpacket2_hdr
+{
+       __u32           tp_status;
+       __u32           tp_len;
+       __u32           tp_snaplen;
+       __u16           tp_mac;
+       __u16           tp_net;
+       __u32           tp_sec;
+       __u32           tp_nsec;
+       __u16           tp_vlan_tci;
+};
+
+#define TPACKET2_HDRLEN                (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll))
+
+enum tpacket_versions
+{
+       TPACKET_V1,
+       TPACKET_V2,
+};
+
 /*
    Frame structure: