From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 8 15:40:43 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 DF2211065672 for ; Fri, 8 Apr 2011 15:40:43 +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 9A6B08FC13 for ; Fri, 8 Apr 2011 15:40:43 +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 81981912; Fri, 8 Apr 2011 19:40:42 +0400 (MSD) Message-ID: <4D9F2C88.4010205@lazybytes.org> Date: Fri, 08 Apr 2011 19:40:56 +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: Warner Losh References: <4D9EFAC6.4020906@lazybytes.org> <7EA5889E-77EF-4BAE-9655-C33692A75602@bsdimp.com> In-Reply-To: <7EA5889E-77EF-4BAE-9655-C33692A75602@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; 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:40:42 +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:40:44 -0000 On 08.04.2011 19:23, Warner Losh wrote: > > On Apr 8, 2011, at 6:08 AM, 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? > > This is a gratuitous change that would break scripts. Hex has been used for a very long time, and most people know how to cope. > > If we really wanted to make it human readable, we'd output 10.2.3.4/24 > > Warner So, maybe, while following the POLA, we should add an option, as Daniel mentioned above? To output the CIDR? -- wbr, Boo