Hi, I’m c-bata. This is my first story of Medium. In this story, I describe how to write cross-platform packet capture from scratch. The source code of my packet capture is available on Github. Currently it supports ARP, ICMP, IP, IPv6, TCP and UDP protocols. c-bata/xpcap
Cross-platform Packet Capture which supports Linux and macOS(BSD) in 1000 LOC without depending on libpcap. …github.com How supports the both of Linux and macOS