diff options
author | Patrick McHardy <kaber@trash.net> | 2008-07-15 07:50:15 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-15 07:50:15 +0200 |
commit | bbd6ef87c544d88c30e4b762b1b61ef267a7d279 (patch) | |
tree | dd9fdfbde65332d3212290d1b8783666475bd861 /net/packet/Makefile | |
parent | vlan: deliver packets received with VLAN acceleration to network taps (diff) | |
download | linux-bbd6ef87c544d88c30e4b762b1b61ef267a7d279.tar.xz linux-bbd6ef87c544d88c30e4b762b1b61ef267a7d279.zip |
packet: support extensible, 64 bit clean mmaped ring structure
The tpacket_hdr is not 64 bit clean due to use of an unsigned long
and can't be extended because the following struct sockaddr_ll needs
to be at a fixed offset.
Add support for a version 2 tpacket protocol that removes these
limitations.
Userspace can query the header size through a new getsockopt option
and change the protocol version through a setsockopt option. The
changes needed to switch to the new protocol version are:
1. replace struct tpacket_hdr by struct tpacket2_hdr
2. query header len and save
3. set protocol version to 2
- set up ring as usual
4. for getting the sockaddr_ll, use (void *)hdr + TPACKET_ALIGN(hdrlen)
instead of (void *)hdr + TPACKET_ALIGN(sizeof(struct tpacket_hdr))
Steps 2 and 4 can be omitted if the struct sockaddr_ll isn't needed.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet/Makefile')
0 files changed, 0 insertions, 0 deletions