Re: ifconfig output: ipv4 netmask format



On Fri, Apr 08, 2011 at 07:36:45PM +0400, Sergey Vinogradov wrote:
On 08.04.2011 19:23, Mike Oliver wrote:
On Fri, Apr 8, 2011 at 08:08, Sergey Vinogradov<boogie@xxxxxxxxxxxxx> wrote:
Hi, hackers.
I have a question: why ipv4 netmask is displayed by ifconfig in hex format?
Isn't dot-decimal notation more human-readable? Will the attached patch
break something in the very bad way?

Who's using IPv4 anymore? ;-)
Long live IPv4! :)

Seriously though, if you give a small amount of time to learning the
hex -> binary translations then you would see how convenient it is to
use hex rather than decimal when representing what are ultimately
binary numbers.

See this blog entry by Jeff Doyle...

http://www.networkworld.com/community/blog/how-are-your-hexadecimal-skills
The article is great, but dot-decimal notation is de-facto standard
for stand-alone network mask representation. Like CIDR is standard for
IP blocks represenation. That's the reason I've started this thread.
And despite the greatness of the article you've mentioned, I think
it's a bad itea to hardcode its URL into ifconfig's output. You know,
for every single user reading it, and choosing the "way of hex" ;)


This is the year 2011 right ? when are we going to support new users
rather than supporting old outdated washed up "scripts" ?

I for one am for this change, given that there are lots of users from
the PC-BSD community that do not read hexadecimal, octal and other such
forms like a programmer does.

And just because the change can be made does not mean that a
compatibility shim cannot be put into place that restores the old
functionality.


It is time to stop living in the past and start thinking about the
future. These types of things are what causes forks of projects to
happen ultimately yielding in less contributors and developers. I for
one hate to see things like that happen.

--

J. Hellenthal

Attachment: pgpd4c1hYhdU6.pgp
Description: PGP signature



Relevant Pages

  • Re: ifconfig output: ipv4 netmask format
    ... why ipv4 netmask is displayed by ifconfig in hex format? ... Will the attached patch ... hex -> binary translations then you would see how convenient it is to ...
    (freebsd-hackers)
  • Re: Binary literals
    ... there's no real point in native binary support. ... who doesn't use hex or octal to encode large "binary" ... line-stipple pattern in graphics.) ... Binary literals are trivial to implement and genuinely useful. ...
    (comp.compilers.lcc)
  • Re: why still use C?
    ... The compilers and libraries traditionally supplied with IBM OS's ... supported hex because that is all there used to be. ... The OS itself doesn't really support any base. ...
    (comp.lang.c)
  • Re: ifconfig output: ipv4 netmask format
    ... why ipv4 netmask is displayed by ifconfig in hex format? ... use hex rather than decimal when representing what are ultimately ... but dot-decimal notation is de-facto standard for stand-alone network mask representation. ...
    (freebsd-hackers)
  • Re: Binary literals
    ... Although much C portability is a myth, that does bring up a good point. ... is the compiler supporting this natively instead of with a include file with ... Just how many bits do you support Jacob? ... who doesn't use hex or octal to ...
    (comp.compilers.lcc)