packet sniffing

Joe Armstrong erlang@REDACTED
Tue Jan 26 14:52:00 CET 2010


Can I use the standard socket libraries to sniff all packets from an interface?

I have a C driver that does

          rawsock = socket(PF_PACKET, SOCK_RAW, htons(p ETH_P_IP))

and then binds rawsock to "eth0"

Can I do the equivalent directly in Erlang and throw away my C code?

Also can I bind a listening socket to an arbitrary interface?


/Joe


More information about the erlang-questions mailing list