4 ms·
Traditionally on Linux it's going to be AF_PACKET sockets: you can read and write raw ethernet frames via the usual syscalls. https://www.man7.org/linux/man-pa
by jcalvinowens 2y ago
Traditionally on Linux it's going to be AF_PACKET sockets: you can read and write raw ethernet frames via the usual syscalls.
https://www.man7.org/linux/man-pages/man7/packet.7.html https://www.man7.org/linux/man-pages/man7/packet.7.html
There are more modern interfaces which perform better.
- bartvk 2y agoWriting raw ethernet frames, can you do that as an unprivileged user? Or is the point more that we're doing userspace networking, which could nevertheless be run as root?
- jcalvinowens 2y agoYou need CAP_NET_RAW, but I'm pretty sure you can drop privileges after bind()