[Click] Between Click and the Sniffer
Eddie Kohler
kohler at cs.ucla.edu
Tue Oct 26 12:39:22 EDT 2004
Hugo Gascon wrote:
> I want to write a program which acts like a sniffer, so how should i
> do it if i want it to receive packets with ToHostSniffer config? Where
> should it be listening?
Well, if your kernel configuration uses ToHostSniffer, your user-level sniffer
program can read from a packet socket (man 7 packet) on linux, or use -lpcap in
the normal way (man pcap).
If you want to write a *Click* user-level sniffer, you can use FromDevice.
If you want to write a Click *kernel-level* sniffer, you don't need to pass the
packets to userlevel with ToHostSniffer; just do whatever counting is required
right in the kernel config.
Eddie
>
> On Mon, 25 Oct 2004 22:41:18 -0700, Eddie Kohler <kohler at cs.ucla.edu> wrote:
>
>>Hi Hugo,
>>
>>hugo gascon wrote:
>>
>>>Hi. I'd like to make a simple question. If packets go to the tcp/ip
>>>linux stack when the config is something like:
>>>
>>>FromDevice(eth0)->ToHost(eth0);
>>>
>>>How do the packets reach a sniffer, for example, ethereal, when the
>>>config is something like:
>>>
>>>FromDevice(eth0)->ToHostSniffers(eth0);
>>>
>>>How should i write a program so it could get the packets with this
>>>configuration?
>>>Thanks.
>>
>>I'm not sure what your question is. But the sniffer should just work in the
>>normal way when that config is active.
>>
>>Eddie
>>
>>>____________________________________
>>>Hugo Gascon Polanco
>>>Ingenieria de Telecomunicacion
>>>Universidad Carlos III de Madrid
>>>xxxxxxxxxxx at alumnos.uc3m.es
>>>xxxxxxx at gmail.com
>>>http://enjambre.it.uc3m.es/~hgascon
>>>____________________________________
>>>____________________________________
>>>____________________________________
>>>_______________________________________________
>>>click mailing list
>>>click at amsterdam.lcs.mit.edu
>>>https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>>
>>
>
>
More information about the click
mailing list