[Click] Questions on IP_classifier and UdpGen

Nikitas Liogkas nikitas at CS.UCLA.EDU
Sat Apr 9 12:49:40 EDT 2005


> First, why is the ip_classifier output set to '1' and not '0'? When
> trying with '0' I would get the error below.  In general, where should
> I look to know output parameters that should be set when using an
> element? I'm not having much of a success looking in the .cc files.
> 
> udpcount.click:18: can't reuse 'ip_classifier :: IPClassifier' push output 0
> udpcount.click:18: 'ip_classifier :: IPClassifier' output 1 unused
> Router could not be initialized!

Output 0 of the ip_classifier is already being used to push packets to 
the Counter ctr.

> Second, after running, in /proc/click where should I look for the
> count result of udpcount.click?
> file /proc/click/ctr seems like the best possible candidate, but the
> results I see are:
> [/click/ctr]# more bytecount
> 0
> [click/ctr]# count
> 0.  
> 
> Also, there are folders named 1 though 12.  In folder 'more
> /proc/click/4/count' = 115. On the otherhand,  'more
> /proc/click/6/count' = 0. These files are continuously being updated.
> 
> What do these numbered folders represent? And why do some increment
> while others don't?

The numbered folders represent the elements in the configuration, 
which can also be found under their names. 4 seems to be the 
PollDevice (in_device in the config), and 6 the ToDevice, both of 
which have a count handler. You can also see the Counter count under 
/proc/click/ctr. Depending on what exactly you mean by "the count 
result of udpcount.click", you can look at the appropriate handler.

nikitas

> ---------------------------------------------
> // udpgen.click
> 
> 
> elementclass UDPGen {
>   $device, $rate, $limit, $size,
>   $seth, $sip, $sport, $deth, $dip, $dport |
> 
>   source :: FastUDPSource($rate, $limit, $size, $seth, $sip, $sport,
>                                                 $deth, $dip, $dport);
>   pd :: PollDevice($device) -> ToHost;
>   source -> td :: ToDevice($device);
> }
> 
> u :: UDPGen(eth0, 82000, 820000, 1500,
> 	    00:0C:41:1F:9D:85, 128.111.40.189, 1234,
> 	    00:0C:41:1F:9D:73, 129.111.40.200, 1234);
> 
> 
> ---------------------------------------------
> 
> // udpcount.click
> 
> AddressInfo(the_interface 129.111.40.200 00:0C:41:1F:9D:73);
> 
> classifier	:: Classifier(12/0800 /* IP packets */,
> 			      12/0806 20/0001 /* ARP requests */,
> 			      - /* everything else */);
> ip_classifier	:: IPClassifier(dst udp port 1234 /* relevant UDP packets */,
> 				- /* everything else */);
> in_device	:: PollDevice(the_interface);
> out		:: Queue(200) -> ToDevice(the_interface);
> to_host		:: ToHost;
> ctr		:: Counter /* or AverageCounter */;
> 
> 
> in_device -> classifier
> 	-> CheckIPHeader(14, CHECKSUM false) // don't check checksum for speed
> 	-> ip_classifier
> 	-> ctr
> 	-> Print(ok:udp)
> 	-> Discard;
> classifier[1] -> ARPResponder(the_interface) -> out;
> classifier[2] -> to_host;
> ip_classifier[1] -> to_host;
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list