[Click] operation of FromDevice - can it catch outbound packets?

Beyers Cronje bcronje at gmail.com
Wed Feb 25 16:48:57 EST 2009


Hi Megan,

FromDevice only intercepts packets received by the NIC and does not
intercept packets transmitted from Linux. I believe you need to look at
FromHost and ToHost to intercept packets destined for and originating from
Linux.

Have a look at:
http://read.cs.ucla.edu/click/elements/fromhost
http://read.cs.ucla.edu/click/elements/tohost

Beyers


On Wed, Feb 25, 2009 at 10:32 PM, Elmore, Megan L <melmore at cc.gatech.edu>wrote:

> Hello,
>
> I'm wondering how the FromDevice element works/if I am using it
> incorrectly. I am trying to write a router (whose config is below) that
> modifies packets (changing a few bits in the IP header - the sbm element in
> my config does this, but this element's operation isn't the focus of my
> question) before they are sent from the machine the config is on to another
> machine across the network. I was under the impression from the element
> documentation that in kernel module Click, the FromDevice element captures
> packets going through this interface, but through packet dumps I've learned
> that only packets coming into the interface get captured and ones leaving
> via the interface do not. Am I incorrect about how FromDevice works, or is
> there a way I should be using it to get my desired results?
>
> Thank you,
> -Megan E.
>
> // llrpc_test.click
>
> FromDevice(eth1)
> -> Strip(14)
> -> ch:: CheckIPHeader2;
> ch[0]
> -> sbm :: SplicingBitManager()
> -> IPPrint("got one")
> -> Unstrip(14)
> -> Print("pkt")
> -> ToHost();
>
> ch[1]
> -> Unstrip(14)
> -> ToHost();
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>


More information about the click mailing list