[Click] Re: Two questions: p->kill(), and ping reply
Andrushka
andrusha at gmail.com
Thu Aug 25 05:25:53 EDT 2005
Hello!
I got ping answer from click with next configuration:
in :: PollNic(0);
out :: ToNic(0);
c :: Classifier(12/0806 20/0001, // ARP request
12/0806 20/0002, // ARP reply
12/0800, // IP packet
-); // All other
arpq :: ARPQuerier(192.168.0.1, 52:54:00:12:34:56);
in -> c;
arpq[0] -> out;
c[2]
-> Strip(14)
-> CheckIPHeader
-> CheckICMPHeader
-> IPPrint(ICMP)
-> ICMPPingResponder
-> [0]arpq;
c[0]
-> Print(ARP_request)
-> ARPResponder(192.168.0.1 52:54:00:12:34:56, 10.0.0.1
52:54:00:12:34:57)
-> out;
c[1]
-> [1]arpq;
c[3]
-> Discard;
But click prints next:
ARP: 60 | 52540012 345600ff c7d77bbf 08060001 08000604 000100ff
ICMP: 0.000000: 192.168.0.5 > 192.168.0.1: icmp: echo request (6108, 1280)
ICMP: 88.402516: 192.168.0.1 > 192.168.0.5: icmp: echo reply (6108, 1280)
ICMP: 0.000000: 192.168.0.5 > 192.168.0.1: icmp: echo request (6108, 1536)
ICMP: 91.484948: 192.168.0.1 > 192.168.0.5: icmp: echo reply (6108, 1536)
ICMP: 0.000000: 192.168.0.5 > 192.168.0.1: icmp: echo request (6108, 1792)
ICMP: 94.496430: 192.168.0.1 > 192.168.0.5: icmp: echo reply (6108, 1792)
I can't understand why there strings with "echo reply"????
There are must be only "echo request".
And the question 1 is still actual.
On 8/25/05, Andrushka <andrusha at gmail.com> wrote:
> Hello!
> Now i'm using next config:
> =========================================
> in :: PollNic(0);
> out :: ToNic(0);
> ip :: CheckIPHeader(14);
>
> in -> ip;
> ip[0]
> -> CheckICMPHeader
> -> IPPrint(ICMP)
> -> ICMPPingResponder
> -> out;
>
> ip[1]
> -> Print(ARP)
> -> ARPResponder(192.168.0.1 52:54:00:12:34:56)
> -> out;
> ==========================================
>
> Question 1:
>
> My ToNic is PUSH processing:
>
> void ToNic::push(int, Packet *p)
> {
> n_write(_nic, p->data(), p->length());
> //p->kill();
> }
>
> But when i uncomment p->kill() Click is seg_fault. Why ?
>
> Question 2:
> When i ping 192.168.0.1 my ping program got ARP answer.
> Click prints next:
> ARP: 60 | 52540012 345600ff c7d77bbf 08060001 08000604 000100ff
> ICMP: 0.000000: 192.168.0.5 > 192.168.0.1: icmp: echo request (6108, 1280)
> ICMP: 88.402516: 192.168.0.1 > 192.168.0.5: icmp: echo reply (6108, 1280)
> ICMP: 0.000000: 192.168.0.5 > 192.168.0.1: icmp: echo request (6108, 1536)
> ICMP: 91.484948: 192.168.0.1 > 192.168.0.5: icmp: echo reply (6108, 1536)
> ICMP: 0.000000: 192.168.0.5 > 192.168.0.1: icmp: echo request (6108, 1792)
> ICMP: 94.496430: 192.168.0.1 > 192.168.0.5: icmp: echo reply (6108, 1792)
>
> I can't understand why there strings with "echo reply"????
> There are must be only "echo request".
>
> And my ping doesn't recive any echo answer:
> bash-2.05b$ ping 192.168.0.1
> PING 192.168.0.1 (192.168.0.1) 1450(1478) bytes of data.
>
> --- 192.168.0.1 ping statistics ---
> 3 packets transmitted, 0 received, 100% packet loss, time 1801ms
>
> And when i do tcpdump:
> 09:43:56.887896 arp who-has 192.168.0.1 tell 192.168.0.5
> 09:43:56.922986 arp reply 192.168.0.1 is-at 52:54:00:12:34:56
> 09:43:57.628382 IP 192.168.0.5 > 192.168.0.1: icmp 1458: echo request seq 1
> 09:43:57.671099 IP 192.168.0.1 > 192.168.0.5: icmp 1458: echo reply seq 1
> 09:43:58.627928 IP 192.168.0.5 > 192.168.0.1: icmp 1458: echo request seq 2
> 09:43:58.655502 IP 192.168.0.1 > 192.168.0.5: icmp 1458: echo reply seq 2
> 09:43:59.627930 IP 192.168.0.5 > 192.168.0.1: icmp 1458: echo request seq 3
> 09:43:59.675073 IP 192.168.0.1 > 192.168.0.5: icmp 1458: echo reply seq 3
>
> Why ping doesn't recive answer?
>
> Thanks!
>
More information about the click
mailing list