From e4f72d62c2695455be7c3b29622722dc4b345426 Mon Sep 17 00:00:00 2001 From: gilles <> Date: Sun, 24 Jun 2012 18:06:42 +0000 Subject: - document newly imported AF_INET6 support to net_inet_{pton,ntop} diff from Florian Obser, ok jmc@ --- src/lib/libc/net/inet_net.3 | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libc/net/inet_net.3 b/src/lib/libc/net/inet_net.3 index 648d82c780..11cc1d67c6 100644 --- a/src/lib/libc/net/inet_net.3 +++ b/src/lib/libc/net/inet_net.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: inet_net.3,v 1.14 2008/06/26 05:42:05 ray Exp $ +.\" $OpenBSD: inet_net.3,v 1.15 2012/06/24 18:06:42 gilles Exp $ .\" $NetBSD: inet_net.3,v 1.1 1997/06/18 02:25:27 lukem Exp $ .\" .\" Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 26 2008 $ +.Dd $Mdocdate: June 24 2012 $ .Dt INET_NET 3 .Os .Sh NAME @@ -84,10 +84,12 @@ field should be zeroed before calling 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 @@ may be decimal, octal, or hexadecimal, as specified 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 , -- cgit v1.2.3-55-g6feb