User: Password:
|
|
Subscribe / Log in / New account

Using sysfs for configuring wireless networking

Using sysfs for configuring wireless networking

Posted Jan 12, 2006 7:09 UTC (Thu) by neilbrown (subscriber, #359)
In reply to: Using sysfs for configuring wireless networking by akumria
Parent article: Linux and wireless networking

A fair point.

As the new settings have not yet come into effect, there is no particular value in finding out what they are. But it would be useful to be able to revert any partial setting of these values.

So that attribute where you write 'go' to effect the new values: Also allow 'reset' to be written which reverts all the stored-for-later-use values to the currently active values.

Ofcourse this could be achived by simply reading each attribute and writing the value back again, but that it somewhat ugly.

There is a thing called 'configfs' in -mm which is meant to be able to provide this multiple-values-at-once thing, but when I considerred using it for something, it turned out to be too special purpose. The same thing can be achieved in sysfs with a bit of creativity, and I think it fits better there.


(Log in to post comments)

Using sysfs for configuring wireless networking

Posted Jan 12, 2006 13:58 UTC (Thu) by bronson (subscriber, #4806) [Link]

That's starting to sound fairly brutal, don't you think? The cure might be worse than the disease.

I realize one of the key features of sysfs is that there's one value per file (try to avoid the mess that became /proc), but lack of atomic updates seems a rather fundamental limitation. What about writing multiple values to a write-only file?

echo "essid=bug;key=gazpacho" > /sys/class/net/eth1/config

Escaping would be required, of course, but that's easily solved.

I don't understand why a netlink socket would be an improvement... It requires parsing, like /proc, but is not user-configurable, like ioctls. It's the worst of both worlds!

Using sysfs for configuring wireless networking

Posted Jan 12, 2006 13:59 UTC (Thu) by nix (subscriber, #2304) [Link]

If the size of that multi-value lump is bigger than a page, write() is not necessarily atomic either.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds