[Click] Question on counters
betamaz
betamaz at gmail.com
Wed Jul 13 18:54:28 EDT 2005
Hi,
Is it valid to combine conf/udpgen.click and conf/udpcount.click in one
configuration file
(so as to run on one machine: I send packets from source eth1 to dest eth2)?
I'm guessing so. But, when I click-install the combined version and look
into /proc/click/ctr/ the
count is always 14. The max number of packets to send is much higher than
that.
Why do I see an invalid number of packets reaching the destination?
Here is the configuration:
//
--------------------------------------------------------------------------
// udpgen.click portion
//
--------------------------------------------------------------------------
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 -> Print(fastudp) -> td :: ToDevice($device);
}
// create a UDPGen
u :: UDPGen(eth1, 82000, 820000, 1500,
00:0C:41:1F:9C:70, 129.111.40.200 <http://129.111.40.200>, 1234,
00:0C:41:1F:9C:78, 128.111.40.201 <http://128.111.40.201>, 1234);
//
--------------------------------------------------------------------------
// udpcount.click portion
//
--------------------------------------------------------------------------
AddressInfo(the_interface 128.111.40.201
<http://128.111.40.201>00:0C:41:1F:9C:78);
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] -> Print(before_arp) ->
// ARPResponder(the_interface) -> Print(after_arp) -> out;
classifier[1] -> Print(class1) -> out;
classifier[2] -> to_host;
ip_classifier[1] -> to_host;
More information about the click
mailing list