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

Elmore, Megan L melmore at cc.gatech.edu
Wed Feb 25 15:32:16 EST 2009


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();


More information about the click mailing list