[Click] How to write to /proc in a click element
Harald Schiöberg
harald at net.t-labs.tu-berlin.de
Mon Jul 27 07:19:06 EDT 2009
-----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-----
More information about the click
mailing list