aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_packet.h
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2011-06-01 02:49:10 -0400
committerDavid S. Miller <davem@davemloft.net>2011-06-02 00:18:03 -0400
commita3bcc23e890a6d49d6763d9eb073d711de2e0469 (patch)
treec4156e932f081dc14a514d5ab23cd43e590029cd /include/linux/if_packet.h
parent41be5a4a3668810bf3687a76c2b017bd437039e0 (diff)
af-packet: Add flag to distinguish VID 0 from no-vlan.
Currently, user-space cannot determine if a 0 tcp_vlan_tci means there is no VLAN tag or the VLAN ID was zero. Add flag to make this explicit. User-space can check for TP_STATUS_VLAN_VALID || tp_vlan_tci > 0, which will be backwards compatible. Older could would have just checked for tp_vlan_tci, so it will work no worse than before. Signed-off-by: Ben Greear <greearb@candelatech.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_packet.h')
-rw-r--r--include/linux/if_packet.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h
index 72bfa5a034dd..6d66ce1791a9 100644
--- a/include/linux/if_packet.h
+++ b/include/linux/if_packet.h
@@ -70,6 +70,7 @@ struct tpacket_auxdata {
70#define TP_STATUS_COPY 0x2 70#define TP_STATUS_COPY 0x2
71#define TP_STATUS_LOSING 0x4 71#define TP_STATUS_LOSING 0x4
72#define TP_STATUS_CSUMNOTREADY 0x8 72#define TP_STATUS_CSUMNOTREADY 0x8
73#define TP_STATUS_VLAN_VALID 0x10 /* auxdata has valid tp_vlan_tci */
73 74
74/* Tx ring - header status */ 75/* Tx ring - header status */
75#define TP_STATUS_AVAILABLE 0x0 76#define TP_STATUS_AVAILABLE 0x0