ifconfig.c && netmask
Artis Caune
artis at fbsd.lv
Wed Sep 8 09:13:53 PDT 2004
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
More information about the freebsd-net
mailing list