aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-07-05 04:45:05 -0400
committerDavid S. Miller <davem@davemloft.net>2011-07-06 01:34:52 -0400
commitdc99f600698dcac69b8f56dda9a8a00d645c5ffc (patch)
tree81599e4397761610d5020c03e2571eeceaa859b6 /include
parentce06b03e60fc19c680d1bf873e779bf11c2fc518 (diff)
packet: Add fanout support.
Fanouts allow packet capturing to be demuxed to a set of AF_PACKET sockets. Two fanout policies are implemented: 1) Hashing based upon skb->rxhash 2) Pure round-robin An AF_PACKET socket must be fully bound before it tries to add itself to a fanout. All AF_PACKET sockets trying to join the same fanout must all have the same bind settings. Fanouts are identified (within a network namespace) by a 16-bit ID. The first socket to try to add itself to a fanout with a particular ID, creates that fanout. When the last socket leaves the fanout (which happens only when the socket is closed), that fanout is destroyed. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/if_packet.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h
index 7b318630139f..1efa1cb827f5 100644
--- a/include/linux/if_packet.h
+++ b/include/linux/if_packet.h
@@ -49,6 +49,10 @@ struct sockaddr_ll {
49#define PACKET_VNET_HDR 15 49#define PACKET_VNET_HDR 15
50#define PACKET_TX_TIMESTAMP 16 50#define PACKET_TX_TIMESTAMP 16
51#define PACKET_TIMESTAMP 17 51#define PACKET_TIMESTAMP 17
52#define PACKET_FANOUT 18
53
54#define PACKET_FANOUT_HASH 0
55#define PACKET_FANOUT_LB 1
52 56
53struct tpacket_stats { 57struct tpacket_stats {
54 unsigned int tp_packets; 58 unsigned int tp_packets;