[Click] open file
Eddie Kohler
kohler at cs.ucla.edu
Tue Mar 25 14:44:27 EDT 2008
Pieter,
There is no easy way to read files from within the Linux kernel, but /sys
variables are generally accessible in other ways. You'll have to work through
the kernel to figure out how
Eddie
pieter wuytens wrote:
> Hi all,
>
> i want to open an file in click it is the file /sys/class/net/ath1/wireless/link and put the integer in that file in click variabele.
>
> i want to do this in my own element
>
> this is the code and psuedo code
>
> void
> MyWifi::push(int, Packet *p)
> {
>
>
> int _count=the value from /sys/class/net/ath1/wireless/link
> //how should i write this?
>
> if (_countfind("wissel");
> int success = HandlerCall::call_write(sw1, "switch", "1");
> success = HandlerCall::call_write(mw, "signal", String(_count));
> }
> output(0).push(p);
> }
>
> thx in advance
> Pieter Wuytens
>
> _________________________________________________________________
> Jouw nieuws en entertainment, vind je op MSN.nl!
> http://nl.msn.com/
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
More information about the click
mailing list