[Click] How to write to /proc in a click element

Eddie Kohler kohler at cs.ucla.edu
Mon Aug 10 19:01:09 EDT 2009


Hey Harald,

I'm not sure what you mean by "proper callback handlers".  The 
END_CALL/COUNT_CALL pattern is one type of callback, and Click supports *that* 
pretty well.  Are you looking for something where elements could register or 
unregister callbacks dynamically?

Eddie


Harald Schiöberg wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ashish Sharma wrote:
>> Hi,
>>
>> Can someone please advise me how to write something in /proc/sys in a click
>> event? I need to change the channel in MadWifi upon reception of a control
>> packet. I am planning on writing a sysctl handler in madwifi to change the
>> channel upon request, and I need to trigger it using Click. If someone has a
>> better suggestion to do this - I'll be glad to know!
>>
>> Thanks for your help and time.
> 
> Since there are no proper callback handlers in click
> ( hidden feature request ;-) ,
> that is my way of doing these things for userlevel click:
> 
> * Your element:
> click_chatter("CHANGE_PROC: yourstuff")
> 
> 
> * Some script.pl (or whatever you like)
> 
> chattersock=IO::Socket.new(stuff)
> while ( line = chattersock.read_line ) {
> 	if line = ~ /^CHANGE_PROC: (.*)/ {
> 	    doing stuff with $1
> 	}
> }
> 	
> 
> kernel level click should have a similar output channel....
> 
> 
> - --
> Harald Schiöberg
> Technische Universität Berlin | T-Laboratories | FG INET
> www: http://www.net.t-labs.tu-berlin.de
> Phone: +49-(0)30-8353-58476 | Fax: +49-(0)391 534 783 47
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFKbY0py8wrZ9OvkU0RAnwgAKDpBO38HsChsVEcFjhh949XlZc+mQCgiDUH
> DB3q171IU+gU3yaEXVVDHgo=
> =qPS0
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click



More information about the click mailing list