[erlang-questions] packet sniffing
Wed Jan 27 00:35:23 CET 2010
Is it possible to open raw socket and to send/recv packet in pure Erlang?
On Tue, Jan 26, 2010 at 11:07 AM, Jachym Holecek <freza@REDACTED> wrote:
> # 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.
> -- Jachym
> [*] http://www.tcpdump.org/
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
More information about the erlang-questions