Support advanced AF_PACKET features in netstack
Open
area: compatibility
area: networking
area: usability
type: enhancement
- Dominant language
- Go
- Stars
- 19.3k
- Forks
- 2k
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 264
Description
Currently netstack supports only _extremaly_ basic AF_PACKET sockets. Needed features:
- AF_PACKET seem to see _inbound_ only packets. No way to see outbound packets.
- `SIOCETHTOOL` (needed for tcpdump to run)
- `bind(AF_PACKET, ifnumber)` (binding to interface)
- `socket(AF_PACKET, SOCK_RAW, 0)` (for example netsniff-ng uses "zero" as protocol)
- `setsocktopt(SO_ATTACH_FILTER)`
- `setsocktopt(SO_RCVBUF)`
- `setsocktopt(PACKET_AUXDATA)`
- `setsocktopt(SO_DETACH_FILTER)`
- `getsocktopt(PACKET_STATISTICS)`
I wrote a simple C program that can be helpful in testing these features https://gist.github.com/majek/9668716d4bb88fbe562037a912d0ae35
Contributor guide
Assessment
This issue has not been assessed yet.