"David O'Brien" wrote:
> On Sun, Mar 25, 2001 at 04:08:47PM +0300, Valentin Nechayev wrote:
> > 192.168.5 should be interpreted as in host address context,
> > but as 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
        int x;

        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
peter@daintree[10:40am]/tmp-164> ./foo
inet_network(127.1) = 7f01
inet_addr(127.1) = 7f000001

inet_addr() and family returns network order, while inet_network() returns
host order.

The old mountd code went to a lot of trouble to keep the two seperate.
In host context, it would have interpreted it as, but in network
/ netmask context it intentionally interpreted it as
See the old get_host() vs get_net() code.

Now that I have looked more closely, IMHO the new code is broken. :-(

"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

Reply via email to