• David S. Miller's avatar
    packet: Add fanout support. · dc99f600
    David S. Miller authored
    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: default avatarDavid S. Miller <davem@davemloft.net>
    dc99f600
af_packet.c 68.2 KB