summaryrefslogtreecommitdiff
path: root/src/lib/libc/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/net')
-rw-r--r--src/lib/libc/net/ether_aton.36
-rw-r--r--src/lib/libc/net/getaddrinfo.330
-rw-r--r--src/lib/libc/net/getnameinfo.312
-rw-r--r--src/lib/libc/net/getpeereid.38
-rw-r--r--src/lib/libc/net/getrrsetbyname.318
-rw-r--r--src/lib/libc/net/htonl.313
-rw-r--r--src/lib/libc/net/inet_addr.36
-rw-r--r--src/lib/libc/net/inet_net_ntop.38
-rw-r--r--src/lib/libc/net/inet_ntop.36
9 files changed, 52 insertions, 55 deletions
diff --git a/src/lib/libc/net/ether_aton.3 b/src/lib/libc/net/ether_aton.3
index 358d7eed03..98562dc44c 100644
--- a/src/lib/libc/net/ether_aton.3
+++ b/src/lib/libc/net/ether_aton.3
@@ -1,8 +1,8 @@
1.\" $OpenBSD: ether_aton.3,v 1.2 2022/03/29 18:15:52 naddy Exp $ 1.\" $OpenBSD: ether_aton.3,v 1.3 2022/09/11 06:38:10 jmc Exp $
2.\" 2.\"
3.\" Written by roland@frob.com. Public domain. 3.\" Written by roland@frob.com. Public domain.
4.\" 4.\"
5.Dd $Mdocdate: March 29 2022 $ 5.Dd $Mdocdate: September 11 2022 $
6.Dt ETHER_ATON 3 6.Dt ETHER_ATON 3
7.Os 7.Os
8.Sh NAME 8.Sh NAME
@@ -86,7 +86,7 @@ The
86function parses a line from the 86function parses a line from the
87.Pa /etc/ethers 87.Pa /etc/ethers
88file and fills in the passed 88file and fills in the passed
89.Li struct ether_addr 89.Vt struct ether_addr
90and character buffer with the Ethernet address and host name on the line. 90and character buffer with the Ethernet address and host name on the line.
91It returns zero if the line was successfully parsed and \-1 if not. 91It returns zero if the line was successfully parsed and \-1 if not.
92The character buffer should be 92The character buffer should be
diff --git a/src/lib/libc/net/getaddrinfo.3 b/src/lib/libc/net/getaddrinfo.3
index 035db2780b..780c7a409f 100644
--- a/src/lib/libc/net/getaddrinfo.3
+++ b/src/lib/libc/net/getaddrinfo.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: getaddrinfo.3,v 1.60 2022/03/31 17:27:16 naddy Exp $ 1.\" $OpenBSD: getaddrinfo.3,v 1.61 2022/09/11 06:38:10 jmc Exp $
2.\" $KAME: getaddrinfo.3,v 1.36 2005/01/05 03:23:05 itojun Exp $ 2.\" $KAME: getaddrinfo.3,v 1.36 2005/01/05 03:23:05 itojun Exp $
3.\" 3.\"
4.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") 4.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
@@ -16,7 +16,7 @@
16.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17.\" PERFORMANCE OF THIS SOFTWARE. 17.\" PERFORMANCE OF THIS SOFTWARE.
18.\" 18.\"
19.Dd $Mdocdate: March 31 2022 $ 19.Dd $Mdocdate: September 11 2022 $
20.Dt GETADDRINFO 3 20.Dt GETADDRINFO 3
21.Os 21.Os
22.Sh NAME 22.Sh NAME
@@ -68,7 +68,7 @@ must be non-null.
68.Pp 68.Pp
69.Fa hints 69.Fa hints
70is an optional pointer to a 70is an optional pointer to a
71.Li struct addrinfo , 71.Vt struct addrinfo ,
72as defined by 72as defined by
73.In netdb.h : 73.In netdb.h :
74.Bd -literal 74.Bd -literal
@@ -139,7 +139,7 @@ will return a NUL-terminated string containing the canonical name
139of the specified host name in the 139of the specified host name in the
140.Fa ai_canonname 140.Fa ai_canonname
141element of the first 141element of the first
142.Li addrinfo 142.Vt addrinfo
143structure returned. 143structure returned.
144.It Dv AI_FQDN 144.It Dv AI_FQDN
145If the 145If the
@@ -150,7 +150,7 @@ will return a NUL-terminated string containing the fully qualified domain name
150of the specified host name in the 150of the specified host name in the
151.Fa ai_canonname 151.Fa ai_canonname
152element of the first 152element of the first
153.Li addrinfo 153.Vt addrinfo
154structure returned. 154structure returned.
155.Pp 155.Pp
156This is different from the 156This is different from the
@@ -215,7 +215,7 @@ is not set.
215.El 215.El
216.Pp 216.Pp
217All other elements of the 217All other elements of the
218.Li addrinfo 218.Vt addrinfo
219structure passed via 219structure passed via
220.Fa hints 220.Fa hints
221must be zero or the null pointer. 221must be zero or the null pointer.
@@ -225,7 +225,7 @@ If
225is the null pointer, 225is the null pointer,
226.Fn getaddrinfo 226.Fn getaddrinfo
227behaves as if the caller provided a 227behaves as if the caller provided a
228.Li struct addrinfo 228.Vt struct addrinfo
229with 229with
230.Fa ai_family 230.Fa ai_family
231set to 231set to
@@ -240,12 +240,12 @@ After a successful call to
240.Fn getaddrinfo , 240.Fn getaddrinfo ,
241.Fa *res 241.Fa *res
242is a pointer to a linked list of one or more 242is a pointer to a linked list of one or more
243.Li addrinfo 243.Vt addrinfo
244structures. 244structures.
245The list can be traversed by following the 245The list can be traversed by following the
246.Fa ai_next 246.Fa ai_next
247pointer in each 247pointer in each
248.Li addrinfo 248.Vt addrinfo
249structure until a null pointer is encountered. 249structure until a null pointer is encountered.
250The three members 250The three members
251.Fa ai_family , 251.Fa ai_family ,
@@ -253,11 +253,11 @@ The three members
253and 253and
254.Fa ai_protocol 254.Fa ai_protocol
255in each returned 255in each returned
256.Li addrinfo 256.Vt addrinfo
257structure are suitable for a call to 257structure are suitable for a call to
258.Xr socket 2 . 258.Xr socket 2 .
259For each 259For each
260.Li addrinfo 260.Vt addrinfo
261structure in the list, the 261structure in the list, the
262.Fa ai_addr 262.Fa ai_addr
263member points to a filled-in socket address structure of length 263member points to a filled-in socket address structure of length
@@ -298,10 +298,10 @@ the interface and link, which is not necessarily true from the specification.
298All of the information returned by 298All of the information returned by
299.Fn getaddrinfo 299.Fn getaddrinfo
300is dynamically allocated: the 300is dynamically allocated: the
301.Li addrinfo 301.Vt addrinfo
302structures themselves as well as the socket address structures and 302structures themselves as well as the socket address structures and
303the canonical host name strings included in the 303the canonical host name strings included in the
304.Li addrinfo 304.Vt addrinfo
305structures. 305structures.
306.Pp 306.Pp
307Memory allocated for the dynamically allocated structures created by 307Memory allocated for the dynamically allocated structures created by
@@ -313,7 +313,7 @@ function.
313The 313The
314.Fa ai 314.Fa ai
315pointer should be an 315pointer should be an
316.Li addrinfo 316.Vt addrinfo
317structure created by a call to 317structure created by a call to
318.Fn getaddrinfo . 318.Fn getaddrinfo .
319.Sh RETURN VALUES 319.Sh RETURN VALUES
@@ -324,7 +324,7 @@ if an error occurs.
324If an error occurs, no memory is allocated by 324If an error occurs, no memory is allocated by
325.Fn getaddrinfo , 325.Fn getaddrinfo ,
326therefore it is not necessary to release the 326therefore it is not necessary to release the
327.Li addrinfo 327.Vt addrinfo
328structure(s). 328structure(s).
329.Sh EXAMPLES 329.Sh EXAMPLES
330The following code tries to connect to 330The following code tries to connect to
diff --git a/src/lib/libc/net/getnameinfo.3 b/src/lib/libc/net/getnameinfo.3
index 18c2cdc075..4e97b5d07b 100644
--- a/src/lib/libc/net/getnameinfo.3
+++ b/src/lib/libc/net/getnameinfo.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: getnameinfo.3,v 1.48 2019/08/30 20:20:51 jmc Exp $ 1.\" $OpenBSD: getnameinfo.3,v 1.49 2022/09/11 06:38:10 jmc Exp $
2.\" $KAME: getnameinfo.3,v 1.37 2005/01/05 03:23:05 itojun Exp $ 2.\" $KAME: getnameinfo.3,v 1.37 2005/01/05 03:23:05 itojun Exp $
3.\" 3.\"
4.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") 4.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
@@ -16,7 +16,7 @@
16.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16.\" OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17.\" PERFORMANCE OF THIS SOFTWARE. 17.\" PERFORMANCE OF THIS SOFTWARE.
18.\" 18.\"
19.Dd $Mdocdate: August 30 2019 $ 19.Dd $Mdocdate: September 11 2022 $
20.Dt GETNAMEINFO 3 20.Dt GETNAMEINFO 3
21.Os 21.Os
22.Sh NAME 22.Sh NAME
@@ -33,7 +33,7 @@
33The 33The
34.Fn getnameinfo 34.Fn getnameinfo
35function is used to convert a 35function is used to convert a
36.Li sockaddr 36.Vt sockaddr
37structure to a pair of host name and service strings. 37structure to a pair of host name and service strings.
38It is a replacement for and provides more flexibility than the 38It is a replacement for and provides more flexibility than the
39.Xr gethostbyaddr 3 39.Xr gethostbyaddr 3
@@ -44,13 +44,13 @@ functions and is the converse of the
44function. 44function.
45.Pp 45.Pp
46The 46The
47.Li sockaddr 47.Vt sockaddr
48structure 48structure
49.Fa sa 49.Fa sa
50should point to either a 50should point to either a
51.Li sockaddr_in 51.Vt sockaddr_in
52or 52or
53.Li sockaddr_in6 53.Vt sockaddr_in6
54structure (for IPv4 or IPv6 respectively) that is 54structure (for IPv4 or IPv6 respectively) that is
55.Fa salen 55.Fa salen
56bytes long. 56bytes long.
diff --git a/src/lib/libc/net/getpeereid.3 b/src/lib/libc/net/getpeereid.3
index 9c5742a245..4475bbd77d 100644
--- a/src/lib/libc/net/getpeereid.3
+++ b/src/lib/libc/net/getpeereid.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: getpeereid.3,v 1.3 2013/06/05 03:39:23 tedu Exp $ 1.\" $OpenBSD: getpeereid.3,v 1.4 2022/09/11 06:38:10 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 1983, 1991, 1993 3.\" Copyright (c) 1983, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
@@ -26,7 +26,7 @@
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE. 28.\" SUCH DAMAGE.
29.Dd $Mdocdate: June 5 2013 $ 29.Dd $Mdocdate: September 11 2022 $
30.Dt GETPEEREID 3 30.Dt GETPEEREID 3
31.Os 31.Os
32.Sh NAME 32.Sh NAME
@@ -65,13 +65,13 @@ should be looked up.
65.It 65.It
66.Fa euid 66.Fa euid
67points to a 67points to a
68.Li uid_t 68.Vt uid_t
69variable into which the effective user ID for the connected peer will 69variable into which the effective user ID for the connected peer will
70be stored. 70be stored.
71.It 71.It
72.Fa egid 72.Fa egid
73points to a 73points to a
74.Li gid_t 74.Vt gid_t
75variable into which the effective group ID for the connected peer will 75variable into which the effective group ID for the connected peer will
76be stored. 76be stored.
77.El 77.El
diff --git a/src/lib/libc/net/getrrsetbyname.3 b/src/lib/libc/net/getrrsetbyname.3
index d0acb60238..314f31665c 100644
--- a/src/lib/libc/net/getrrsetbyname.3
+++ b/src/lib/libc/net/getrrsetbyname.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: getrrsetbyname.3,v 1.21 2019/08/30 20:20:51 jmc Exp $ 1.\" $OpenBSD: getrrsetbyname.3,v 1.22 2022/09/11 06:38:10 jmc Exp $
2.\" 2.\"
3.\" Copyright (C) 2000, 2001 Internet Software Consortium. 3.\" Copyright (C) 2000, 2001 Internet Software Consortium.
4.\" 4.\"
@@ -15,7 +15,7 @@
15.\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 15.\" NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
16.\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16.\" WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17.\" 17.\"
18.Dd $Mdocdate: August 30 2019 $ 18.Dd $Mdocdate: September 11 2022 $
19.Dt GETRRSETBYNAME 3 19.Dt GETRRSETBYNAME 3
20.Os 20.Os
21.Sh NAME 21.Sh NAME
@@ -46,11 +46,11 @@ After a successful call to
46.Fn getrrsetbyname , 46.Fn getrrsetbyname ,
47.Fa *res 47.Fa *res
48is a pointer to an 48is a pointer to an
49.Li rrsetinfo 49.Vt rrsetinfo
50structure, containing a list of one or more 50structure, containing a list of one or more
51.Li rdatainfo 51.Vt rdatainfo
52structures containing resource records and potentially another list of 52structures containing resource records and potentially another list of
53.Li rdatainfo 53.Vt rdatainfo
54structures containing SIG resource records associated with those records. 54structures containing SIG resource records associated with those records.
55The members 55The members
56.Li rri_rdclass 56.Li rri_rdclass
@@ -97,12 +97,12 @@ struct rrsetinfo {
97All of the information returned by 97All of the information returned by
98.Fn getrrsetbyname 98.Fn getrrsetbyname
99is dynamically allocated: the 99is dynamically allocated: the
100.Li rrsetinfo 100.Vt rrsetinfo
101and 101and
102.Li rdatainfo 102.Vt rdatainfo
103structures, 103structures,
104and the canonical host name strings pointed to by the 104and the canonical host name strings pointed to by the
105.Li rrsetinfo 105.Vt rrsetinfo
106structure. 106structure.
107Memory allocated for the dynamically allocated structures created by 107Memory allocated for the dynamically allocated structures created by
108a successful call to 108a successful call to
@@ -111,7 +111,7 @@ is released by
111.Fn freerrset . 111.Fn freerrset .
112.Li rrset 112.Li rrset
113is a pointer to a 113is a pointer to a
114.Li struct rrsetinfo 114.Vt struct rrsetinfo
115created by a call to 115created by a call to
116.Fn getrrsetbyname . 116.Fn getrrsetbyname .
117.\" .Pp 117.\" .Pp
diff --git a/src/lib/libc/net/htonl.3 b/src/lib/libc/net/htonl.3
index a63959717a..65fa9a53b5 100644
--- a/src/lib/libc/net/htonl.3
+++ b/src/lib/libc/net/htonl.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: htonl.3,v 1.5 2019/02/13 07:02:09 jmc Exp $ 1.\" $OpenBSD: htonl.3,v 1.6 2022/09/11 06:38:10 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 1983, 1991, 1993 3.\" Copyright (c) 1983, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE. 28.\" SUCH DAMAGE.
29.\" 29.\"
30.Dd $Mdocdate: February 13 2019 $ 30.Dd $Mdocdate: September 11 2022 $
31.Dt HTONL 3 31.Dt HTONL 3
32.Os 32.Os
33.Sh NAME 33.Sh NAME
@@ -66,14 +66,11 @@ or
66.Sq l ) 66.Sq l )
67is a mnemonic 67is a mnemonic
68for the traditional names for such quantities, 68for the traditional names for such quantities,
69.Li short 69short and long, respectively.
70and
71.Li long ,
72respectively.
73Today, the C concept of 70Today, the C concept of
74.Li short 71.Vt short
75and 72and
76.Li long 73.Vt long
77integers need not coincide with this traditional misunderstanding. 74integers need not coincide with this traditional misunderstanding.
78On machines which have a byte order which is the same as the network 75On machines which have a byte order which is the same as the network
79order, routines are defined as null macros. 76order, routines are defined as null macros.
diff --git a/src/lib/libc/net/inet_addr.3 b/src/lib/libc/net/inet_addr.3
index 129b08d277..dec5a2ec16 100644
--- a/src/lib/libc/net/inet_addr.3
+++ b/src/lib/libc/net/inet_addr.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: inet_addr.3,v 1.5 2019/08/30 20:06:07 jmc Exp $ 1.\" $OpenBSD: inet_addr.3,v 1.6 2022/09/11 06:38:10 jmc Exp $
2.\" $NetBSD: inet.3,v 1.7 1997/06/18 02:25:24 lukem Exp $ 2.\" $NetBSD: inet.3,v 1.7 1997/06/18 02:25:24 lukem Exp $
3.\" 3.\"
4.\" Copyright (c) 1983, 1990, 1991, 1993 4.\" Copyright (c) 1983, 1990, 1991, 1993
@@ -30,7 +30,7 @@
30.\" 30.\"
31.\" @(#)inet.3 8.1 (Berkeley) 6/4/93 31.\" @(#)inet.3 8.1 (Berkeley) 6/4/93
32.\" 32.\"
33.Dd $Mdocdate: August 30 2019 $ 33.Dd $Mdocdate: September 11 2022 $
34.Dt INET_ADDR 3 34.Dt INET_ADDR 3
35.Os 35.Os
36.Sh NAME 36.Sh NAME
@@ -179,7 +179,7 @@ cannot return that value without indicating failure.
179Also, 179Also,
180.Fn inet_addr 180.Fn inet_addr
181should have been designed to return a 181should have been designed to return a
182.Li struct in_addr . 182.Vt struct in_addr .
183The newer 183The newer
184.Fn inet_aton 184.Fn inet_aton
185function does not share these problems, and almost all existing code 185function does not share these problems, and almost all existing code
diff --git a/src/lib/libc/net/inet_net_ntop.3 b/src/lib/libc/net/inet_net_ntop.3
index cac234be42..4212af3bb6 100644
--- a/src/lib/libc/net/inet_net_ntop.3
+++ b/src/lib/libc/net/inet_net_ntop.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: inet_net_ntop.3,v 1.3 2022/03/31 17:27:16 naddy Exp $ 1.\" $OpenBSD: inet_net_ntop.3,v 1.4 2022/09/11 06:38:10 jmc 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.
@@ -28,7 +28,7 @@
28.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29.\" POSSIBILITY OF SUCH DAMAGE. 29.\" POSSIBILITY OF SUCH DAMAGE.
30.\" 30.\"
31.Dd $Mdocdate: March 31 2022 $ 31.Dd $Mdocdate: September 11 2022 $
32.Dt INET_NET_NTOP 3 32.Dt INET_NET_NTOP 3
33.Os 33.Os
34.Sh NAME 34.Sh NAME
@@ -46,7 +46,7 @@
46The 46The
47.Fn inet_net_ntop 47.Fn inet_net_ntop
48function converts an Internet network number from network format (usually a 48function converts an Internet network number from network format (usually a
49.Li struct in_addr 49.Vt struct in_addr
50or some other binary form, in network byte order) to CIDR presentation format 50or some other binary form, in network byte order) to CIDR presentation format
51(suitable for external display purposes). 51(suitable for external display purposes).
52.Fa bits 52.Fa bits
@@ -63,7 +63,7 @@ The
63.Fn inet_net_pton 63.Fn inet_net_pton
64function converts a presentation format Internet network number (that is, 64function converts a presentation format Internet network number (that is,
65printable form as held in a character string) to network format (usually a 65printable form as held in a character string) to network format (usually a
66.Li struct in_addr 66.Vt struct in_addr
67or some other internal binary representation, in network byte order). 67or some other internal binary representation, in network byte order).
68It returns the number of bits (either computed based on the class, or 68It returns the number of bits (either computed based on the class, or
69specified with /CIDR), or \-1 if a failure occurred 69specified with /CIDR), or \-1 if a failure occurred
diff --git a/src/lib/libc/net/inet_ntop.3 b/src/lib/libc/net/inet_ntop.3
index c80b0c4776..e5c1c574f8 100644
--- a/src/lib/libc/net/inet_ntop.3
+++ b/src/lib/libc/net/inet_ntop.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: inet_ntop.3,v 1.5 2021/09/01 15:59:22 claudio Exp $ 1.\" $OpenBSD: inet_ntop.3,v 1.6 2022/09/11 06:38:10 jmc Exp $
2.\" $NetBSD: inet.3,v 1.7 1997/06/18 02:25:24 lukem Exp $ 2.\" $NetBSD: inet.3,v 1.7 1997/06/18 02:25:24 lukem Exp $
3.\" 3.\"
4.\" Copyright (c) 1983, 1990, 1991, 1993 4.\" Copyright (c) 1983, 1990, 1991, 1993
@@ -30,7 +30,7 @@
30.\" 30.\"
31.\" @(#)inet.3 8.1 (Berkeley) 6/4/93 31.\" @(#)inet.3 8.1 (Berkeley) 6/4/93
32.\" 32.\"
33.Dd $Mdocdate: September 1 2021 $ 33.Dd $Mdocdate: September 11 2022 $
34.Dt INET_NTOP 3 34.Dt INET_NTOP 3
35.Os 35.Os
36.Sh NAME 36.Sh NAME
@@ -49,7 +49,7 @@ The
49.Fn inet_pton 49.Fn inet_pton
50function converts a presentation format address (that is, printable form 50function converts a presentation format address (that is, printable form
51as held in a character string) to network format (usually a 51as held in a character string) to network format (usually a
52.Li struct in_addr 52.Vt struct in_addr
53or some other internal binary representation, in network byte order). 53or some other internal binary representation, in network byte order).
54It returns 1 if the address was valid for the specified address family; 54It returns 1 if the address was valid for the specified address family;
550 if the address wasn't parseable in the specified address family; or \-1 550 if the address wasn't parseable in the specified address family; or \-1