Date: Wed, 08 Sep 2004 19:17:38 +0300 From: Artis Caune <artis@fbsd.lv> To: freebsd-net@freebsd.org Subject: ifconfig.c && netmask Message-ID: <1094660258.1597.405.camel@localhost>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1094660258.1597.405.camel>