[Click] help with the Discard element

Beyers Cronje bcronje at gmail.com
Sat Feb 19 20:40:16 EST 2005


Hi David,

Userlevel Click runs ontop of linux as a packet sniffer, in other
words the kernel still processes each packet. Each packet received
gets processed twice, once for linux, once for click.

You have a couple of options

1) Disable routing on Linux and have Click do the routing/switching
2) Use Click kernel module

Beyers


On Sat, 19 Feb 2005 15:21:02 +0100, David Fusté
<f2308030 at est.fib.upc.edu> wrote:
> Hi,
> I'm novice in Click and I have simple questions. I'm working with click
> in user level mode.
> 
> This is my config file:
> 
> % cat prova.click
> FromDevice(wlan0)->Print(ok)->Discard;
> %
> 
> When I run it, obviously, click starts to capture packets. Then, when I
> open the browser, click starts to print the packets.
> My first question is: why does the browser correctly load the web pages?
> i.e. why doesn't click discard the packets?
> And in relation to this, since click doesn't discard packets and it pass
> them to linux, what's the meaning of the ToHost(DEVNAME) element?
> 
> And it isn't all, if I run this other config file:
> 
> % cat prova2.click
> FromDevice(wlan0)->Print(ok)->ToHost(wlan0);
> % click prova2.click
> prova2.click:1: While initializing 'ToHost at 3 :: ToHost':
>  ToHost(wlan0) requires an initialized FromHost with the same dev_name
> Router could not be initialized!
> %
> 
> why does ToHost element need a FromHost element? I only want to capture
> packets from device to linux, not from linux to device.
> Moreover, there isn't a FromHost element in user level mode! Why does
> ToHost user level element want a FromHost kernel element? It isn't possible.
> 
> I don't know where I am wrong. Help me please.
> Thank you!
> 
> David
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>



More information about the click mailing list