diff options
author | millert <> | 2004-12-20 21:35:10 +0000 |
---|---|---|
committer | millert <> | 2004-12-20 21:35:10 +0000 |
commit | e2ef8122f22d670cfea6416a7fc046714fa97705 (patch) | |
tree | 217a09dd148af21422b9fe7c63dd1ac587b947ca /src/lib | |
parent | 2573b4031e211c42eadf47a4e30eae1ee1a516ea (diff) | |
download | openbsd-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.3 | 25 |
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 |
34 | The | ||
34 | .Fn getaddrinfo | 35 | .Fn getaddrinfo |
35 | is used to get a list of | 36 | function is used to get a list of |
36 | .Dv IP | 37 | .Tn IP |
37 | addresses and port numbers for host | 38 | addresses and port numbers for host |
38 | .Fa hostname | 39 | .Fa hostname |
39 | and service | 40 | and service |
@@ -44,13 +45,14 @@ and | |||
44 | .Xr getservbyname 3 | 45 | .Xr getservbyname 3 |
45 | functions. | 46 | functions. |
46 | .Pp | 47 | .Pp |
48 | The | ||
47 | .Fa hostname | 49 | .Fa hostname |
48 | and | 50 | and |
49 | .Fa servname | 51 | .Fa servname |
50 | are either pointers to NUL-terminated strings or the null pointer. | 52 | arguments are either pointers to NUL-terminated strings or the null pointer. |
51 | An acceptable value for | 53 | An acceptable value for |
52 | .Fa hostname | 54 | .Fa hostname |
53 | is either a host name or a numeric host address string consisting | 55 | is either a valid host name or a numeric host address string consisting |
54 | of a dotted decimal IPv4 address or an IPv6 address. | 56 | of a dotted decimal IPv4 address or an IPv6 address. |
55 | The | 57 | The |
56 | .Fa servname | 58 | .Fa servname |
@@ -111,7 +113,10 @@ If | |||
111 | .Fa ai_protocol | 113 | .Fa ai_protocol |
112 | is zero the caller will accept any protocol. | 114 | is zero the caller will accept any protocol. |
113 | .It Fa ai_flags | 115 | .It Fa ai_flags |
114 | Flag bits. | 116 | .Fa ai_flags |
117 | is formed by | ||
118 | .Tn OR Ns 'ing | ||
119 | the following values: | ||
115 | .Bl -tag -width "AI_CANONNAMEXX" | 120 | .Bl -tag -width "AI_CANONNAMEXX" |
116 | .It Dv AI_CANONNAME | 121 | .It Dv AI_CANONNAME |
117 | If the | 122 | If the |
@@ -158,7 +163,7 @@ or | |||
158 | .Xr sendmsg 2 | 163 | .Xr sendmsg 2 |
159 | if a connectionless protocol was chosen. | 164 | if a connectionless protocol was chosen. |
160 | The | 165 | The |
161 | .Dv IP | 166 | .Tn IP |
162 | address portion of the socket address structure will be set to the | 167 | address portion of the socket address structure will be set to the |
163 | loopback address if | 168 | loopback address if |
164 | .Fa hostname | 169 | .Fa hostname |
@@ -180,10 +185,12 @@ is the null pointer, | |||
180 | .Fn getaddrinfo | 185 | .Fn getaddrinfo |
181 | behaves as if the caller provided a | 186 | behaves as if the caller provided a |
182 | .Li struct addrinfo | 187 | .Li struct addrinfo |
183 | initialized to zero and with | 188 | with |
184 | .Fa ai_family | 189 | .Fa ai_family |
185 | set to | 190 | set to |
186 | .Dv PF_UNSPEC . | 191 | .Dv PF_UNSPEC |
192 | and all other elements set to zero or | ||
193 | .Dv NULL . | ||
187 | .Pp | 194 | .Pp |
188 | After a successful call to | 195 | After a successful call to |
189 | .Fn getaddrinfo , | 196 | .Fn getaddrinfo , |