Re: Suggested dual human/binary interface for proc/devfs

From: Ed Carp (erc@pobox.com)
Date: Tue Apr 11 2000 - 03:58:50 EST


Marcus Meissner (Marcus.Meissner@caldera.de) writes:

> In article <200004110747.CAA07448@khijol.org> you wrote:
> > Uh, I would've thought that would've been intuitively obvious ;)
> > device=eth0;ip_address=192.168.201.116,netmask=255.255.255.0
> > device=eth1;ip_address=192.168.201.117,netmask=255.255.255.0
>
> > As for "there's already lots of code to parse this", where? For what language? If I can't parse your pseudo-SNMP format with a shell script, it's useless -- and it completely defeats the purpose of /proc.
>
> > If you want to impose SNMP on the kernel, do it in your own user space FS. But don't make the rest of us suffer through it, huh?
>
>
> The longer I follow that syntax thread the more I like the VFS approach with
>
> /proc/.../net/devices/eth0
> transmit/
> bytes
> packets
> errors
> ...
> receive/
> ...
>
> Advantages:
> - Easy to parse and use for scripts.
> - Easy to read for humans.
> - Unproblematic
> - Easily extendable, will not break scripts when extending.
>
> Disadvantage:
> - When reading bytes/packets you might get slightly different
> views for new packets may have arrived.

The other disadvantage, if I understand your implementation, is that multiple files need to be opened and closed. Why not just have /proc/net/devices/eth0 and have all taht stuff in one file? Then you just have to open and close one file, instead of a dozen.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:15 EST