[erlang-questions] packet sniffing

Jachym Holecek freza@REDACTED
Tue Jan 26 17:07:59 CET 2010


# Joe Armstrong 2010-01-26:
> 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))

You're certainly aware of this, but for the record: this is Linux specific
code. For a portable solution, one would have create a port driver on top
of libpcap[*]. I don't know if that has been done though.

Regards,
	-- Jachym

[*] http://www.tcpdump.org/


More information about the erlang-questions mailing list