On Sun, May 09, 2010 at 11:17:04AM +0800, Marek Lindner wrote:
Greg asked us to provide an ABI documentation for the files creates
in the sysfs tree. Since I am respsonsible for the sysfs stuff, I
felt it was my turn to draft something. Please check the attachments
and let me know whether you think we can send it or not.
Date: May 2010
Contact: Marek Lindner <lindner_marek(a)yahoo.de>
Displays the table of all batman nodes (in range) and
the link quality towards them. Each line contains the
1 - originator
2 - TQ (transmit quality) value of originator
3 - best next hop towards originator
4 - outgoing iface to reach best next hop
5 - list of alternative best next hops
This is something i already said in private, but i think it is going
to be a problem.
Attributes can be exported for kobjects in the form of regular files in
the filesystem. Sysfs forwards file I/O operations to methods defined
for the attributes, providing a means to read and write kernel
Attributes should be ASCII text files, preferably with only one value
per file. It is noted that it may not be efficient to contain only one
value per file, so it is socially acceptable to express an array of
values of the same type.
Mixing types, expressing multiple lines of data, and doing fancy
formatting of data is heavily frowned upon. Doing these things may get
you publically humiliated and your code rewritten without notice.
I expect that we have a problem here. My guess is some of these files
are going to have to move back into proc. Use sysfs for configuration,
where only single values are needed, and put all the tables of
originators, HNA etc back in proc where fancy formatting of data is
not frowned upon.