Re: /proc/net/arp silliness

From: David Ford (david@kalifornia.com)
Date: Tue Apr 25 2000 - 12:36:38 EST


kuznet@ms2.inr.ac.ru wrote:

> Hello!
>
> > as promised, here is the patch.
>
> Why not to add plain space to format? This file is not for human reading
> in any case and it need not to be nicely looking.
>
> Side note. Now compare this new variant to pre-NIPQUAD version.
> Yes, guy, all the effect reduced to utter uglification of the text.
> inet_ntoa2 was made exactly to make such things _nicely_. Killing it
> is followed by denial of nicely looking formats immediately.
>
> Alexey

This was the only known /proc change that was made. Everything else is a
printk thing. But irrespective, the format of /proc/net/arp prior to this
patch was:

# cat /proc/net/arp
IP address HW type Flags HW address Mask
Device
192.168.0.106 0x1 0x2 00:10:4B:67:75:0C
* eth0
208.179.0.1 0x1 0x2 00:50:54:7D:21:29
* eth1

and after this patch is:
# cat /proc/net/arp
IP address HW type Flags HW address Mask
Device
208.179.0.195 0x1 0x2 00:00:8F:88:A1:B7 *
eth0
208.179.0.198 0x1 0x2 00:00:8F:88:A1:B7 *
eth0

The last column was misaligned. So it wasn't nicely formatted prior to
this and is nicely formatted now. The prior version did pretty much the
same thing I am doing. Considering the file was fairly human formatted
beforehand, I chose to maintain that formatting, after all, if it were for
program uses, we'd simply stuff it in binary format which would be much
faster and easier for the programmer.

So I don't think my effort has been for uglification of the text, I had a
typo. ;) In the end, the new /proc/net/arp looks slightly better.

-d

-
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 : Sun Apr 30 2000 - 21:00:10 EST