From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 8 15:36:32 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 368B71065670 for ; Fri, 8 Apr 2011 15:36:32 +0000 (UTC) (envelope-from boogie@lazybytes.org) Received: from mail.lazybytes.org (mail.lazybytes.org [195.54.209.3]) by mx1.freebsd.org (Postfix) with ESMTP id E6A388FC14 for ; Fri, 8 Apr 2011 15:36:31 +0000 (UTC) Received: from [95.108.170.237] (dhcp170-237-red.yandex.net [95.108.170.237]) by mail.lazybytes.org (Postfix) with ESMTPSA id DF1688FD; Fri, 8 Apr 2011 19:36:30 +0400 (MSD) Message-ID: <4D9F2B8D.3040104@lazybytes.org> Date: Fri, 08 Apr 2011 19:36:45 +0400 From: Sergey Vinogradov User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Lanikai/3.1.9 MIME-Version: 1.0 To: Mike Oliver References: <4D9EFAC6.4020906@lazybytes.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (mail.lazybytes.org); Fri, 08 Apr 2011 19:36:30 +0400 (MSD) Cc: FreeBSD Hackers Subject: Re: ifconfig output: ipv4 netmask format X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2011 15:36:32 -0000 On 08.04.2011 19:23, Mike Oliver wrote: > On Fri, Apr 8, 2011 at 08:08, Sergey Vinogradov 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" ;) -- wbr, Boo