From owner-freebsd-net@FreeBSD.ORG Wed Sep 8 16:13:53 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C1E716A4D0 for ; Wed, 8 Sep 2004 16:13:53 +0000 (GMT) Received: from artis.latnet.lv (artis.latnet.lv [159.148.107.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id C4D4E43D48 for ; Wed, 8 Sep 2004 16:13:52 +0000 (GMT) (envelope-from artis@fbsd.lv) Received: from [127.0.0.1] (localhost [127.0.0.1]) by artis.latnet.lv (Postfix) with ESMTP id 9DA43B83D for ; Wed, 8 Sep 2004 19:17:38 +0300 (EEST) From: Artis Caune To: freebsd-net@freebsd.org Content-Type: text/plain Message-Id: <1094660258.1597.405.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 08 Sep 2004 19:17:38 +0300 Content-Transfer-Encoding: 7bit Subject: ifconfig.c && netmask X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2004 16:13:53 -0000 How come that ifconfig prints netmask in hex? Isn't "inet 127.0.0.1 netmask 255.0.0.0" more readable than "inet 127.0.0.1 netmask 0xff000000" why 'route get x.x.x.x' gives mask in decimal? ;)) Is it some posix standart or something historical or will it brake some scripts? I'm ok with hex, just want to know.. *** ! printf("netmask 0x%lx ", (unsigned long)ntohl(sin->sin_addr.s_addr)); ! printf("netmask %s ", inet_ntoa(sin->sin_addr)); *** -- Artis