[Click] Questions on how-to debug elements && Click's kernel
level properties
betamaz
betamaz at gmail.com
Thu Mar 10 00:34:38 EST 2005
Hi,
Below is my configuration file. Also, is there anyway to output the
count to the screen using the Print element, or anyother element to
make testing easier?
Thank you,
Bita.
::::::::::::::
udpcount.click
::::::::::::::
// udpcount.click
AddressInfo(the_interface 128.111.40.200 00:0C:41:1F:9C:70);
classifier :: Classifier(12/0800 /* IP packets */,
12/0806 20/0001 /* ARP requests */,
- /* everything else */);
ip_classifier :: IPClassifier(dst udp port 1244 /* 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;
::::::::::::::
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);
}
// create a UDPGen
u :: UDPGen(eth0, 82000, 820000, 1500,
00:0C:41:1F:9C:8F, 128.111.40.189, 1234,
00:0C:41:1F:9C:70, 129.111.40.200, 1244);
More information about the click
mailing list