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?
--
wbr,
Boo
--- af_inet.c.orig 2011-04-07 18:48:28.850931143 +0400
+++ af_inet.c 2011-04-08 11:45:51.556706573 +0400
@@ -79,7 +79,7 @@
sin = (struct sockaddr_in *)ifa->ifa_netmask;
if (sin == NULL)
sin = &null_sin;
- printf("netmask 0x%lx ", (unsigned long)ntohl(sin->sin_addr.s_addr));
+ printf("netmask %s ", inet_ntoa(sin->sin_addr));
if (ifa->ifa_flags & IFF_BROADCAST) {
sin = (struct sockaddr_in *)ifa->ifa_broadaddr;
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"