diff options
Diffstat (limited to 'src/lib/libc/net/getaddrinfo.3')
-rw-r--r-- | src/lib/libc/net/getaddrinfo.3 | 30 |
1 files changed, 15 insertions, 15 deletions
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 |
70 | is an optional pointer to a | 70 | is an optional pointer to a |
71 | .Li struct addrinfo , | 71 | .Vt struct addrinfo , |
72 | as defined by | 72 | as 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 | |||
139 | of the specified host name in the | 139 | of the specified host name in the |
140 | .Fa ai_canonname | 140 | .Fa ai_canonname |
141 | element of the first | 141 | element of the first |
142 | .Li addrinfo | 142 | .Vt addrinfo |
143 | structure returned. | 143 | structure returned. |
144 | .It Dv AI_FQDN | 144 | .It Dv AI_FQDN |
145 | If the | 145 | If the |
@@ -150,7 +150,7 @@ will return a NUL-terminated string containing the fully qualified domain name | |||
150 | of the specified host name in the | 150 | of the specified host name in the |
151 | .Fa ai_canonname | 151 | .Fa ai_canonname |
152 | element of the first | 152 | element of the first |
153 | .Li addrinfo | 153 | .Vt addrinfo |
154 | structure returned. | 154 | structure returned. |
155 | .Pp | 155 | .Pp |
156 | This is different from the | 156 | This is different from the |
@@ -215,7 +215,7 @@ is not set. | |||
215 | .El | 215 | .El |
216 | .Pp | 216 | .Pp |
217 | All other elements of the | 217 | All other elements of the |
218 | .Li addrinfo | 218 | .Vt addrinfo |
219 | structure passed via | 219 | structure passed via |
220 | .Fa hints | 220 | .Fa hints |
221 | must be zero or the null pointer. | 221 | must be zero or the null pointer. |
@@ -225,7 +225,7 @@ If | |||
225 | is the null pointer, | 225 | is the null pointer, |
226 | .Fn getaddrinfo | 226 | .Fn getaddrinfo |
227 | behaves as if the caller provided a | 227 | behaves as if the caller provided a |
228 | .Li struct addrinfo | 228 | .Vt struct addrinfo |
229 | with | 229 | with |
230 | .Fa ai_family | 230 | .Fa ai_family |
231 | set to | 231 | set to |
@@ -240,12 +240,12 @@ After a successful call to | |||
240 | .Fn getaddrinfo , | 240 | .Fn getaddrinfo , |
241 | .Fa *res | 241 | .Fa *res |
242 | is a pointer to a linked list of one or more | 242 | is a pointer to a linked list of one or more |
243 | .Li addrinfo | 243 | .Vt addrinfo |
244 | structures. | 244 | structures. |
245 | The list can be traversed by following the | 245 | The list can be traversed by following the |
246 | .Fa ai_next | 246 | .Fa ai_next |
247 | pointer in each | 247 | pointer in each |
248 | .Li addrinfo | 248 | .Vt addrinfo |
249 | structure until a null pointer is encountered. | 249 | structure until a null pointer is encountered. |
250 | The three members | 250 | The three members |
251 | .Fa ai_family , | 251 | .Fa ai_family , |
@@ -253,11 +253,11 @@ The three members | |||
253 | and | 253 | and |
254 | .Fa ai_protocol | 254 | .Fa ai_protocol |
255 | in each returned | 255 | in each returned |
256 | .Li addrinfo | 256 | .Vt addrinfo |
257 | structure are suitable for a call to | 257 | structure are suitable for a call to |
258 | .Xr socket 2 . | 258 | .Xr socket 2 . |
259 | For each | 259 | For each |
260 | .Li addrinfo | 260 | .Vt addrinfo |
261 | structure in the list, the | 261 | structure in the list, the |
262 | .Fa ai_addr | 262 | .Fa ai_addr |
263 | member points to a filled-in socket address structure of length | 263 | member 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. | |||
298 | All of the information returned by | 298 | All of the information returned by |
299 | .Fn getaddrinfo | 299 | .Fn getaddrinfo |
300 | is dynamically allocated: the | 300 | is dynamically allocated: the |
301 | .Li addrinfo | 301 | .Vt addrinfo |
302 | structures themselves as well as the socket address structures and | 302 | structures themselves as well as the socket address structures and |
303 | the canonical host name strings included in the | 303 | the canonical host name strings included in the |
304 | .Li addrinfo | 304 | .Vt addrinfo |
305 | structures. | 305 | structures. |
306 | .Pp | 306 | .Pp |
307 | Memory allocated for the dynamically allocated structures created by | 307 | Memory allocated for the dynamically allocated structures created by |
@@ -313,7 +313,7 @@ function. | |||
313 | The | 313 | The |
314 | .Fa ai | 314 | .Fa ai |
315 | pointer should be an | 315 | pointer should be an |
316 | .Li addrinfo | 316 | .Vt addrinfo |
317 | structure created by a call to | 317 | structure 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. | |||
324 | If an error occurs, no memory is allocated by | 324 | If an error occurs, no memory is allocated by |
325 | .Fn getaddrinfo , | 325 | .Fn getaddrinfo , |
326 | therefore it is not necessary to release the | 326 | therefore it is not necessary to release the |
327 | .Li addrinfo | 327 | .Vt addrinfo |
328 | structure(s). | 328 | structure(s). |
329 | .Sh EXAMPLES | 329 | .Sh EXAMPLES |
330 | The following code tries to connect to | 330 | The following code tries to connect to |