summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/inet_net.3
diff options
context:
space:
mode:
authoraaron <>1999-07-05 04:41:00 +0000
committeraaron <>1999-07-05 04:41:00 +0000
commitc47037b066169c61c5eefad3368f2da73ca4be54 (patch)
treefa80157fecd0fbb57811f82d8f3ce1366b44a203 /src/lib/libc/net/inet_net.3
parent5f78a44df1a8e524a82445f2fedb382128869a2a (diff)
downloadopenbsd-c47037b066169c61c5eefad3368f2da73ca4be54.tar.gz
openbsd-c47037b066169c61c5eefad3368f2da73ca4be54.tar.bz2
openbsd-c47037b066169c61c5eefad3368f2da73ca4be54.zip
repairs; better English, formatting, etc.
Diffstat (limited to 'src/lib/libc/net/inet_net.3')
-rw-r--r--src/lib/libc/net/inet_net.324
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/libc/net/inet_net.3 b/src/lib/libc/net/inet_net.3
index 1b55411a28..1eb157c429 100644
--- a/src/lib/libc/net/inet_net.3
+++ b/src/lib/libc/net/inet_net.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: inet_net.3,v 1.3 1999/07/02 20:58:00 aaron Exp $ 1.\" $OpenBSD: inet_net.3,v 1.4 1999/07/05 04:40:59 aaron Exp $
2.\" $NetBSD: inet_net.3,v 1.1 1997/06/18 02:25:27 lukem Exp $ 2.\" $NetBSD: inet_net.3,v 1.1 1997/06/18 02:25:27 lukem Exp $
3.\" 3.\"
4.\" Copyright (c) 1997 The NetBSD Foundation, Inc. 4.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -54,14 +54,16 @@
54The 54The
55.Fn inet_net_ntop 55.Fn inet_net_ntop
56function converts an Internet network number from network format (usually a 56function converts an Internet network number from network format (usually a
57.Ft struct in_addr 57.Li struct in_addr
58or some other binary form, in network byte order) to CIDR presentation format 58or some other binary form, in network byte order) to CIDR presentation format
59(suitable for external display purposes). 59(suitable for external display purposes).
60.Fa bits 60.Fa bits
61is the number of bits in 61is the number of bits in
62.Fa src 62.Fa src
63that are the network number. 63that are the network number.
64It returns NULL if a system error occurs (in which case, 64It returns
65.Dv NULL
66if a system error occurs (in which case,
65.Va errno 67.Va errno
66will have been set), or it returns a pointer to the destination string. 68will have been set), or it returns a pointer to the destination string.
67.Pp 69.Pp
@@ -69,10 +71,10 @@ The
69.Fn inet_net_pton 71.Fn inet_net_pton
70function converts a presentation format Internet network number (that is, 72function converts a presentation format Internet network number (that is,
71printable form as held in a character string) to network format (usually a 73printable form as held in a character string) to network format (usually a
72.Ft struct in_addr 74.Li struct in_addr
73or some other internal binary representation, in network byte order). 75or some other internal binary representation, in network byte order).
74It returns the number of bits (either computed based on the class, or 76It returns the number of bits (either computed based on the class, or
75specified with /CIDR), or -1 if a failure occurred 77specified with /CIDR), or \-1 if a failure occurred
76(in which case 78(in which case
77.Va errno 79.Va errno
78will have been set. 80will have been set.
@@ -80,9 +82,10 @@ It will be set to
80.Er ENOENT 82.Er ENOENT
81if the Internet network number was not valid). 83if the Internet network number was not valid).
82.Pp 84.Pp
83The currently supported value for 85The only value for
84.Fa af 86.Fa af
85is: AF_INET. 87currently supported is
88.Dv AF_INET .
86.Fa size 89.Fa size
87is the size of the result buffer 90is the size of the result buffer
88.Fa dst . 91.Fa dst .
@@ -101,11 +104,8 @@ as a byte of data and assigned, from left to right,
101to the four bytes of an Internet network number. Note 104to the four bytes of an Internet network number. Note
102that when an Internet network number is viewed as a 32-bit 105that when an Internet network number is viewed as a 32-bit
103integer quantity on a system that uses little-endian 106integer quantity on a system that uses little-endian
104byte order (such as the 107byte order (such as the Intel 386, 486, and Pentium processors)
105.Tn Intel 386, 486 108the bytes referred to above appear as
106and
107.Tn Pentium
108processors) the bytes referred to above appear as
109.Dq Li d.c.b.a . 109.Dq Li d.c.b.a .
110That is, little-endian bytes are ordered from right to left. 110That is, little-endian bytes are ordered from right to left.
111.Pp 111.Pp