[Click] Reposting: Newbie: Doubt about Click-tutorial problem

Ashish Sharma ashishs.sharma at gmail.com
Fri Mar 23 16:40:55 EST 2007


Hi,
I am reposting my query and urge someone to help me figure this out. For
problem 3 at http://www.read.cs.ucla.edu/click/tutorial1
What am I missing here, since the output of "tcpdump -r" for both my
solution and the provide dump file match exactly, but a "diff" reveals
that files are different, also the verification script provided reveals that
the solution is not correct.
I would greatly appreciate any help.

My script:

//
// Problem 3
//
// Error detection

ip_hdr_check :: CheckIPHeader;
tcp_hdr_check :: CheckTCPHeader;
udp_hdr_check :: CheckUDPHeader;
icmp_hdr_check :: CheckICMPHeader;
dec_ttl :: DecIPTTL;

length_check :: CheckLength(1500);

tube :: Null;

ipclass1 :: IPClassifier(tcp, udp, icmp, -);

ipclass2 :: IPClassifier(131.179.0.0/16 ,
                        131.0.0.0/8 ,
                        18.0.0.0/8,
                        - );

ipclass2[0] -> ToDump(f3c.dump, SNAPLEN 0, ENCAP IP);
ipclass2[1] -> ToDump(f3b.dump, SNAPLEN 0, ENCAP IP);
ipclass2[2] -> ToDump(f3d.dump, SNAPLEN 0, ENCAP IP);
ipclass2[3] -> ToDump(f3e.dump, SNAPLEN 0, ENCAP IP);

dec_ttl[1] -> ICMPError(1.2.3.4, timeexceeded) -> ToDump(f3f.dump, SNAPLEN
0, ENCAP IP);

FromDump(f3a.dump, STOP true)
        -> Align(4,0)
        -> ip_hdr_check;
        ip_hdr_check[0] -> ipclass1;


        ipclass1[0] -> tcp_hdr_check -> tube;
        ipclass1[1] -> udp_hdr_check -> tube;
        ipclass1[2] -> icmp_hdr_check -> tube;
        ipclass1[3] -> tube;

        tube -> dec_ttl
             -> length_check
             -> ipclass2;


More information about the click mailing list