[Click] How to ping response?

Jens Mueller jmueller at informatik.hu-berlin.de
Mon Mar 12 15:48:54 EST 2007


Hi Norbert,

> I guess there should be a solution for this otherwise there wouldn't
> be an ICMPPingResponder element.
>  
> Could anyone tell me how a decently working ping responder looks like?

FromDevice(eth0)
// classify packets here
...
-> CheckIPHeader(14)
// maybe further classifying
-> ICMPPingResponder() //uses IP header annotation set by CheckIPHeader
-> EtherMirror() // swap src and dst
-> Queue()
-> ToDevice(eth0)

Did you notice that you can pass an offset to CheckIPHeader? I think
that would do the trick. Haven't tested it. I'm not sure, whether you
haven't just seen this or I'm giving a stupid answer.

Kind regards,
Jens


More information about the click mailing list