Hacker News new | ask | show | jobs
by ffk 3667 days ago
If you want to avoid libpnet or libpcap, you can use socket and recv directly.

Here's a quick example demonstrating socket & recv capturing all packets on all interfaces.

https://gist.github.com/fkautz/0104084fd79cee5608d8e3fc6e729...