[Click] Problem with ICMP type field
Yogesh Mundada
yhm at cc.gatech.edu
Sat Jul 11 06:53:11 EDT 2009
Hi,
I am reading ICMP type in my element, but I read a wrong value - 69
instead of 8 (ping request). To debug further, I added following
snippet at the beginning of etherswitch.cc:push():
const click_ip *nh = p->ip_header();
if (nh->ip_p == IPPROTO_ICMP) {
const click_icmp *icmp = p->icmp_header();
click_chatter("XXX: ICMP type is %u",icmp->icmp_type);
}
else {
click_chatter("XXX: NW type is %u",nh->ip_p);
}
When I ping nodes through this etherswitch, I get following:
[ 2665.938861] chatter: XXX: ICMP type is 69
[ 2665.939131] chatter: XXX: ICMP type is 69
[ 2666.937275] chatter: XXX: ICMP type is 69
tcpdump on appropriate interfaces show that the ICMP type is 8.
Am I doing something wrong here or has anyone else observed similar error?
-Yogesh
More information about the click
mailing list