"David O'Brien" wrote:
> On Sun, Mar 25, 2001 at 04:08:47PM +0300, Valentin Nechayev wrote:
> > 192.168.5 should be interpreted as 192.168.0.5 in host address context,
> > but as 192.168.5.0 in network address context. (Such network address
> > context is well seen in sentences such as "10/8", "192.168/16".)
> Where is this documented?
peter@daintree[10:39am]/tmp-162> cat foo.c
x = inet_network("127.1");
printf("inet_network(127.1) = %x\n", x);
x = inet_addr("127.1");
printf("inet_addr(127.1) = %x\n", htonl(x));
peter@daintree[10:39am]/tmp-163> cc -o foo foo.c
inet_network(127.1) = 7f01
inet_addr(127.1) = 7f000001
inet_addr() and family returns network order, while inet_network() returns
The old mountd code went to a lot of trouble to keep the two seperate.
In host context, it would have interpreted it as 192.168.0.5, but in network
/ netmask context it intentionally interpreted it as 192.168.5.0/mask.
See the old get_host() vs get_net() code.
Now that I have looked more closely, IMHO the new code is broken. :-(
Peter Wemm - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message