[Click] Questions on how-to debug elements && Click's kernel level properties

betamaz betamaz at gmail.com
Tue Mar 8 19:06:48 EST 2005


Hi,

I have a few question on how click inserts and runs modules in the linux kernel.

----------------------------------------------------
1) First, when running some configuration files, (for example
print-pings.click) in linux kernel versus userlevel, I am unable to
use the tested ethernet card regularly.  Basically, I can not longer
ping the outside world, ssh... Is this due to the test program
grabbing all the packets from the specified packets, taking some
action, then discarding the packet?

Here is the print-pings file: 
FromDevice(eth0)                                
                                                
   -> Classifier(12/0800)                       
   -> Strip(14)                                 
   -> CheckIPHeader                             
   -> IPFilter(allow icmp && icmp type echo)  
   -> IPFilter(allow udp)
   -> IPPrint(ascii)                                    
   -> Discard;

----------------------------------------------------
2) Also, I am trying to use udpgen.click and udpcount.click.  I first
run udpgen then udpcount.  Udp gen uses two different eth cards on the
same machine. The sender address being that eth0, and the receiver
eth1.  Udpcount looks at the incoming packets of eth1.

I check the /proc/click/ folders to see the  result, but no udp
packets seem to have been generated.  The '/proc/click/ctr' logs shows
a count of zero with operation no allowed messages.

Am I running a valid test? If so, why do I not see a non-zero rate and count?

Here is the output of the ctr directory:
[root at zapp ctr]# more *
::::::::::::::
byte_count
::::::::::::::
0
byte_count_call: Operation not permitted
::::::::::::::
class
::::::::::::::
Counter
::::::::::::::
config
::::::::::::::
::::::::::::::
count
::::::::::::::
0
count_call: Operation not permitted
::::::::::::::
handlers
::::::::::::::
byte_count_call w
count_call      w
reset_counts    w
reset   w
rate    r
byte_count      r
count   r
handlers        r
ports   r
config  r
name    r
class   r
::::::::::::::
name
::::::::::::::
ctr
::::::::::::::
ports
::::::::::::::
1 input
push~   -       ip_classifier [0]
1 output
push~   -       [0] Print at 10
::::::::::::::
rate
::::::::::::::
0
reset: Operation not permitted
reset_counts: Operation not permitted


----------------------------------------------------
3)  Next, I want to insert debug messages throught click elements. 
For example, in counter.cc I tried doing a simple printf when the
reset function is called and added the stdlio library.  To add the new
changes, I ran: make elemlist and make install.  The later one
resulted in an error.  I am an experienced C programmer, but still
have a long way to go in understanding Click.

How can I debug properly in Click?


I would appreciate any help. Thank you,

Bita.


More information about the click mailing list