[Click] simple_action

Andrushka andrusha at gmail.com
Wed Aug 24 07:46:47 EDT 2005


Hello!
Sorry for my English!

I have such config:
arp :: ARPResponder(192.168.0.1 52:54:00:12:34:56);
in :: PollNic(0);
out :: ToNic(0); 
icmp :: ICMPPingResponder;
head :: CheckICMPHeader;

in -> head;
head[0] -> Print(ICMP) -> icmp -> out;
head[1] -> Print(ARP) -> arp -> out; 


When i ping 192.168.0.1:
1. First go ARP request.
2. Click answer to ARP fine.
3. Next go ICMP request.
But click all ICMP's requests send to head[1].
Why ?

In element.cc:846:
void
Element::push(int, Packet *p)
{
  p = simple_action(p);
  if (p) output(0).push(p);
}

But after CheckICMPHeader all icmp request go to head[1] (not to
head[0] ). Why ?

If i change CheckICMPHeader to CheckIPHeader same things :(

(PollNic and ToNic my own elements).


Please help!



More information about the click mailing list