summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authormillert <>2004-12-20 21:35:10 +0000
committermillert <>2004-12-20 21:35:10 +0000
commite2ef8122f22d670cfea6416a7fc046714fa97705 (patch)
tree217a09dd148af21422b9fe7c63dd1ac587b947ca /src/lib
parent2573b4031e211c42eadf47a4e30eae1ee1a516ea (diff)
downloadopenbsd-e2ef8122f22d670cfea6416a7fc046714fa97705.tar.gz
openbsd-e2ef8122f22d670cfea6416a7fc046714fa97705.tar.bz2
openbsd-e2ef8122f22d670cfea6416a7fc046714fa97705.zip
Minor cleanup.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libc/net/getaddrinfo.325
1 files changed, 16 insertions, 9 deletions
diff --git a/src/lib/libc/net/getaddrinfo.3 b/src/lib/libc/net/getaddrinfo.3
index 92f9f1f809..e7ddfba5fd 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.32 2004/12/20 21:20:56 millert Exp $ 1.\" $OpenBSD: getaddrinfo.3,v 1.33 2004/12/20 21:35:10 millert Exp $
2.\" 2.\"
3.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") 3.\" Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
4.\" Copyright (C) 2000, 2001 Internet Software Consortium. 4.\" Copyright (C) 2000, 2001 Internet Software Consortium.
@@ -31,9 +31,10 @@
31.Ft void 31.Ft void
32.Fn freeaddrinfo "struct addrinfo *ai" 32.Fn freeaddrinfo "struct addrinfo *ai"
33.Sh DESCRIPTION 33.Sh DESCRIPTION
34The
34.Fn getaddrinfo 35.Fn getaddrinfo
35is used to get a list of 36function is used to get a list of
36.Dv IP 37.Tn IP
37addresses and port numbers for host 38addresses and port numbers for host
38.Fa hostname 39.Fa hostname
39and service 40and service
@@ -44,13 +45,14 @@ and
44.Xr getservbyname 3 45.Xr getservbyname 3
45functions. 46functions.
46.Pp 47.Pp
48The
47.Fa hostname 49.Fa hostname
48and 50and
49.Fa servname 51.Fa servname
50are either pointers to NUL-terminated strings or the null pointer. 52arguments are either pointers to NUL-terminated strings or the null pointer.
51An acceptable value for 53An acceptable value for
52.Fa hostname 54.Fa hostname
53is either a host name or a numeric host address string consisting 55is either a valid host name or a numeric host address string consisting
54of a dotted decimal IPv4 address or an IPv6 address. 56of a dotted decimal IPv4 address or an IPv6 address.
55The 57The
56.Fa servname 58.Fa servname
@@ -111,7 +113,10 @@ If
111.Fa ai_protocol 113.Fa ai_protocol
112is zero the caller will accept any protocol. 114is zero the caller will accept any protocol.
113.It Fa ai_flags 115.It Fa ai_flags
114Flag bits. 116.Fa ai_flags
117is formed by
118.Tn OR Ns 'ing
119the following values:
115.Bl -tag -width "AI_CANONNAMEXX" 120.Bl -tag -width "AI_CANONNAMEXX"
116.It Dv AI_CANONNAME 121.It Dv AI_CANONNAME
117If the 122If the
@@ -158,7 +163,7 @@ or
158.Xr sendmsg 2 163.Xr sendmsg 2
159if a connectionless protocol was chosen. 164if a connectionless protocol was chosen.
160The 165The
161.Dv IP 166.Tn IP
162address portion of the socket address structure will be set to the 167address portion of the socket address structure will be set to the
163loopback address if 168loopback address if
164.Fa hostname 169.Fa hostname
@@ -180,10 +185,12 @@ is the null pointer,
180.Fn getaddrinfo 185.Fn getaddrinfo
181behaves as if the caller provided a 186behaves as if the caller provided a
182.Li struct addrinfo 187.Li struct addrinfo
183initialized to zero and with 188with
184.Fa ai_family 189.Fa ai_family
185set to 190set to
186.Dv PF_UNSPEC . 191.Dv PF_UNSPEC
192and all other elements set to zero or
193.Dv NULL .
187.Pp 194.Pp
188After a successful call to 195After a successful call to
189.Fn getaddrinfo , 196.Fn getaddrinfo ,