[Click] method interface problems.

Beyers Cronje bcronje at gmail.com
Wed Oct 24 08:10:40 EDT 2007


Hi Kurtis,

In the element documentation has confused me as far as more generic
> handlers. It says that the elements will be controlled from a file.
> However,
> the locations it suggests are not right on my box. I'm assuming that's
> because i'm in user mode.


Yes, the 'file' you're talking about is only available when running Click as
a kernel module. However you can still access the handlers when running
userlevel Click through the ControlSocket feature.
http://read.cs.ucla.edu/click/elements/controlsocket
You can either manually add a ControlSocket element or start Click with the
'-p' argument to automatically enable a ControlSocket.

In example the following Click config.

fd::FromDevice(eth0) -> q::Queue -> ToDevice(eth1);

So now you start Click with 'click <yourconfig_file> -p 777'

Then you can telnet to port 777 i.e. 'telnet 127.0.0.1 777' and issue any of
the ControlSocket command, like 'read q.highwater_length' or whatever.


I've switched to SimpleQueue from Queue, as I think that simple queue
> should be outputting to a file somewhere. Is that right?


Nope, see above.

Beyers


More information about the click mailing list