Re: [RFC] /proc/fs/nfsd/exports

Linus Torvalds (torvalds@transmeta.com)
Thu, 29 Oct 1998 18:33:36 -0800 (PST)


On Fri, 30 Oct 1998, Matti Aarnio wrote:
>
> The problem there is that IPv4 addresses, and masks are 32 bits
> long network-byte-order values, and our tradition has been printing
> them out thru %08X as if they are mere integers. (And letting
> user-space applications to 1: scan in the hex value, 2: turn it
> from network-byte-order value to presentation value of dotted-
> decimal form.)
>
> Those values are NOT integers originally, they are octet arrays.

What?

The values are IPv4 addresses. There is _one_ standard way of printing
them, and that standard way is as four decimal numbers. EVERYBODY prints
them that way. It's the only sane way to show them.

There is no question in my mind - printing out IPv4 addresses as hex
"integers" is wrong. It has always been wrong, and it's wrong now. It
happens to be very simple, which is the excuse for doing it, but it's
still wrong.

Linus

-
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/