[Click] Questions on IP_classifier and UdpGen
betamaz
betamaz at gmail.com
Thu Apr 7 18:47:08 EDT 2005
Hi,
I have a few questions about testing udpgen.click and udpcount.click
(below is my configuration file). I'm using the smaple configs
provided in conf/ directory.
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!
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?
Thanks for your help,
Bita.
---------------------------------------------
// 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;
More information about the click
mailing list