On 2000-Feb-09 12:39:01 +1100, Yoshinobu Inoue <[EMAIL PROTECTED]> wrote:
>> IMHO, having a 172.16 mean a network address of 172.16.0.0 or a
>> host address of 172.0.0.16 is somewhat confusing...
...
>So I think I'll make small changes to getaddrinfo() for it to
>also support shortend form(such as 172.16 for 172.0.0.16 above),
>after some more wait, maybe today.
In which case, could you also make the following change (untested) to
netstat(1) to remove the ambiguity in address abbreviations:
--- /usr/src/usr.bin/netstat/route.c Mon Jan 10 08:31:25 2000
+++ route.c Wed Feb 9 13:22:45 2000
@@ -743,12 +743,6 @@
}
if (cp)
strncpy(line, cp, sizeof(line) - 1);
- else if ((i & 0xffffff) == 0)
- sprintf(line, "%lu", C(i >> 24));
- else if ((i & 0xffff) == 0)
- sprintf(line, "%lu.%lu", C(i >> 24) , C(i >> 16));
- else if ((i & 0xff) == 0)
- sprintf(line, "%lu.%lu.%lu", C(i >> 24), C(i >> 16), C(i >> 8));
else
sprintf(line, "%lu.%lu.%lu.%lu", C(i >> 24),
C(i >> 16), C(i >> 8), C(i));
(Actually, I suspect the above should use inet_ntoa(3)).
Peter
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message