[erlang-questions] packet sniffing

Kaiduan Xie kaiduanx@REDACTED
Wed Jan 27 15:34:30 CET 2010


I also want to get rid of C code to operate on raw mode, that means
port/linked-in driver is not an option. But it looks like Erlang does
not provide the module now.

Thanks,

kaiduan

On Wed, Jan 27, 2010 at 3:54 AM, Angel Alvarez <clist@REDACTED> wrote:
> Hi
>
> This remembered me some quiestion whether the inet driver is multihreaded or not.
>
> Id dont really know if port solutions are taking benefit from the file driver (using the Async Pool)
> where the inet driver relies directly select/poll and OS Kernel to leverage SMP support.
>
> So the a driver with a libpcap interface would naturally have to make use of the async pool.
>
> On the other side the aproach of patching inet to allow raw ports would not
>
> I was thinking that on RAW mode a simple socket can produce a ton of bits (a lot of more than
> is usual usage on a TCP socket?)
>
> I think Joe wants to avoid C code at all so the SOCK_RAW question, either a C driver poses the
> same C dependences...
>
> so (im not sure the above statemente are all true) what's the best case?
>
>
>
> /Angel
>
> El Miércoles, 27 de Enero de 2010 00:35:23 Kaiduan Xie escribió:
>> Is it possible to open raw socket and to send/recv packet in pure Erlang?
>>
>> Thanks,
>>
>> kaiduan
>>
>> 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.
>> >
>> > Regards,
>> >        -- Jachym
>> >
>> > [*] http://www.tcpdump.org/
>> >
>> > ________________________________________________________________
>> > erlang-questions mailing list. See http://www.erlang.org/faq.html
>> > erlang-questions (at) erlang.org
>> >
>> >
>>
>> ________________________________________________________________
>> erlang-questions mailing list. See http://www.erlang.org/faq.html
>> erlang-questions (at) erlang.org
>>
>>
>
>
>
> --
> No imprima este correo si no es necesario. El medio ambiente está en nuestras manos.
> ->>----------------------------------------------------------
>
>  Angel J. Alvarez Miguel, Servicios Informáticos
>  Edificio Torre de Control, Campus Externo UAH
>  Alcalá de Henares 28806, Madrid    ** ESPAÑA **
>
>  RedIRIS Jabber: angel.uah.es@REDACTED
> --------------------------------------------[www.uah.es]-<<--
> HONEY BUNNY - Any of you *uckin' pricks move and I'll execute every mother*ucking last one of you.
> --
> No imprima este correo si no es necesario. El medio ambiente está en nuestras manos.
> __________________________________________
>
> Clist UAH a.k.a Angel
> __________________________________________
> Te has metido en un hipoteca de 70M y encima te roban una panda de Ninjas... Crisis Ninja para Dummies.
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>
>


More information about the erlang-questions mailing list