-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
what's the bandwidth of the fake-iprouter program #482
Comments
By default the Script element will run at the beginning of your program. Do you want to print the bandwidth every second? Or at the end of the program? And what do you call bandwidth? https://github.com/kohler/click/wiki/Counter gives the various available handlers, but there's also AverageCounter you might want to look at. |
Thanks! |
|
Thanks! I added this but it shows nothing // Hand incoming IP packets to the routing table. Script(wait 5, print c.count, loop); |
Sorry I'm just newbie to Click. Did I make a mistake? Sincerely hope for your help. |
You use userlevel click right? Kernel configurations run with click-kernel. You have no FromDevice element in this example. Kernel logs are shown in dmesg while userlevel one go to stdout/stderr. |
It's just part of the original fake-iprouter.click. I think there are elements work as the FromeDevice fake-iprouter.click c0 :: Classifier(12/0806 20/0001, Idle -> [0]c0;
// An "ARP querier" for each interface. // Deliver ARP responses to ARP queriers as well as Linux. // Connect ARP outputs to the interface queues. // Proxy ARP on eth0 for 18.26.7, as well as cone's IP address. // Ordinary ARP on eth1. // IP routing table. Outputs: // Hand incoming IP packets to the routing table. when I use Script(print c.count) it can show 2059. |
Try with ACTIVE true maybe? |
Hello! I tried to test the bandwidth of the fake-iprouter(mainly the IP packets)
So I add a Counter element to the configuration
// Hand incoming IP packets to the routing table.
// CheckIPHeader checks all the lengths and length fields
// for sanity.
ip :: Strip(14)
-> CheckIPHeader(INTERFACES 18.26.4.1/24 18.26.7.1/24)
-> c:: Counter
-> [0]rt;
c0[2] -> Paint(1) -> ip;
c1[2] -> Paint(2) -> ip;
Script(print c.count);
the result is 2059 packets.
Is this result right? Or do I put Counter in a wrong place?
The text was updated successfully, but these errors were encountered: