Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document socket options and minimum Kernel version required #26

Open
jwbensley opened this issue Feb 25, 2018 · 2 comments
Open

Document socket options and minimum Kernel version required #26

jwbensley opened this issue Feb 25, 2018 · 2 comments

Comments

@jwbensley
Copy link
Owner

jwbensley commented Feb 25, 2018

AF_PACKET socket require Linux 2.2.

PACKET_RX_RING requires Linux 2.6.5.
PACKET_VERSION with PACKET_RX_RING requires Linux 2.6.27.
TPACKET_V2 requires Kernel 2.6.27.
PACKET_STATISTICS requires TPACKET_V2.
PACKET_TX_RING requires Linux 2.6.31.
PACKET_LOSS requires Linux 2.6.31.
PACKET_TIMESTAMP with PACKET_RX_RING requires Linux 2.6.36.
PACKET_FANOUT requires Linux 3.1.
PACKET_QDISC_BYPASS requires Linux 3.14.

PACKET_VERSION requires Linux 3.0.
PACKET_MMAP TPACKET_V2 requires Linux 2.6.17.
PACKET_MMAP TPACKET_V3 requires Linux 3.2.
TPACKET_V3 and PACKET_TX_RING together requires Linux 4.11.

@jwbensley
Copy link
Owner Author

Split this into minimum required (e.g. all 2.x) and optional (e.g. >= 3.x).

@jwbensley
Copy link
Owner Author

Ubuntu test box fails to detect it's Kernel version is too low for AF_PACKET v3 on Tx (Rx works):


$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.6 LTS
Release:	14.04
Codename:	trusty

$ uname -a
Linux htpc-ubuntu 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

$ sudo ./etherate_mt -i eth2 -p4
Using inteface eth2 (4).
Setting interface promiscuous mode
Frame size set to 1514 bytes.
Using raw socket with PACKET_MMAP and TX/RX_RING v3.
Running in Tx mode.
18116:Trying to increase to 1048576 bytes...
18116:Write buffer size set to 425984 bytes
18116:Can't enable Tx/Rx ring for socket (Invalid argument)
Removing interface promiscuous mode

$ date
Mon Nov 18 08:09:08 GMT 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant