[Click] Newbie question: splitting flows and merging them later

Anirudh anirudhvr at gmail.com
Wed Feb 8 17:21:55 EST 2006


Hi,

  I'm new to click, and I couldnt find any documentation on how to
actually split a "flow" and merge it later. I have a small routing
table and a few error checks, which, in order, are :
 - check IP header/cksum
 - check TCP header/cksum
 - check UDP header/cksum
 - check ICMP header/cksum
 - check expired TTL etc.

>From the man pages, I see that CheckTCPHeader *expects* a TCP/IP
packet (similarly for CheckUDPHeader), so I have something like this:

*******
...

//For simplicity, LinearIPLookup
route :: LinearIPLookup (10/8 0, 0/0 1);

//Read from dump
FromDump(a.dump, STOP true) -> checkIPHeader
                            -> ipc :: IPClassifier(tcp, udp);

ipc[0] -> checkTCP
       -> CheckICMPHeader
       -> dt :: DecIPTTL
       -> GetIPAddress(16)
       -> route;

ipc[1] -> checkUDP
       -> CheckICMPHeader
       -> dt :: DecIPTTL
       -> GetIPAddress(16)
       -> route;

...

*******

Now, how do I 'merge' the stream of packets split by IPClassifier so I
dont have to replicate the elements coming after the TCP or UDP
checks?

Any help at all will be appreciated.

Thanks,
Anirudh



More information about the click mailing list