[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-tech
Subject:    Re: AF_INET6 for inet_net(3)
From:       Gilles Chehade <gilles () poolp ! org>
Date:       2012-06-24 18:07:00
Message-ID: 20120624180700.GA31679 () poolp ! org
[Download RAW message or body]

committed, thanks ;-)

On Sun, Jun 24, 2012 at 07:09:56PM +0200, Florian Obser wrote:
> inet_net(3) claims only AF_INET is supported for inet_net_ntop() and
> inet_net_pton(). 
> I take it this is no longer true since revision 1.7
> of inet_net_ntop.c and inet_net_pton.c. 
> 
> --- inet_net.3~	Sun Jun 24 18:55:10 2012
> +++ inet_net.3	Sun Jun 24 18:54:45 2012
> @@ -84,10 +84,12 @@
>  as the function will only fill the number of bytes necessary to
>  encode the network number in network byte order.
>  .Pp
> -The only value for
> +The only values for
>  .Fa af
> -currently supported is
> -.Dv AF_INET .
> +currently supported are
> +.Dv AF_INET
> +and
> +.Dv AF_INET6 .
>  .Fa size
>  is the size of the result buffer
>  .Fa dst .
> @@ -163,6 +165,25 @@
>  in the C language (i.e., a leading 0x or 0X implies
>  hexadecimal; otherwise, a leading 0 implies octal;
>  otherwise, the number is interpreted as decimal).
> +.Sh NETWORK NUMBERS (IP VERSION 6)
> +See
> +.Xr inet_pton 3
> +for valid external representations of IP version 6 addresses.
> +A valid external representation may have
> +.Dq Li /bits
> +appended where
> +.Dq Li bits
> +is in the range
> +.Li 0-128
> +and is used to explicitly specify the number of bits in the network address.
> +When
> +.Dq Li /bits
> +is not specified 128 is used.
> +Note that when the number of bits is specified using
> +.Dq Li /bits
> +notation, the value of the address still includes all bits supplied
> +in the external representation, even those bits which are the host
> +part of an Internet address.
>  .Sh SEE ALSO
>  .Xr byteorder 3 ,
>  .Xr inet 3 ,
> 

-- 
Gilles Chehade

https://www.poolp.org                                          @poolpOrg

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic