Re: Tagged files in /proc (Was: Re: (Fwd) Re: /proc/apm and power status)

Matthias Urlichs (smurf@smurf.noris.de)
Fri, 23 Feb 1996 16:37:04 +0100


In linux.dev.kernel, article <199602212042.VAA13568@cortex.corpus.uni-muenster.de>,
Markus Gutschke <gutschk@uni-muenster.de> writes:
> -----BEGIN PGP SIGNED MESSAGE-----
>
> Alan Cox writes:
> > I'll throw another requirement in here. For many networking applications I
> > need to go to a fixed size record scheme for speed.
>
> Is this requirement neccessary for the kernel or for user-level
> programs?

User level.

> performance. If this is not an option, and you insist on having fixed
> width records, we will have to come up with some extensions to the file
> format --- even though, that will either limit versatility or require
> us to accept special cased file-formats.
>
Right now, the networking files (usually) have some sort of header.

An extension could look like this:
[bytes]Foo1 Foo2 Foo3:
first line with actual data, starts at offset 'bytes'
second line with actual data, starts at offset 'bytes'*2
...

It should be trivial for a program which expects fixed-length headers to
parse the first line for the correct number of bytes and the names of the
header fields.

I assume that the total length of the field names in the header can be kept
below the length of the following records.

NB, one thing I doon't understand is that the IP addresses in the various
net files are printed in network byte order... not exactly human-readable,
IMHO.

-- 
Matthias Urlichs