diff options
author | itojun <> | 2001-01-26 13:31:35 +0000 |
---|---|---|
committer | itojun <> | 2001-01-26 13:31:35 +0000 |
commit | ca4d453ef6c4607ea4865cb4e6f305b6895451fd (patch) | |
tree | 5a6b44a9772057517a597023375ee3e4d85e5e00 | |
parent | c985671921b8b1a0cfb9de6fc8eda0bf97d6401d (diff) | |
download | openbsd-ca4d453ef6c4607ea4865cb4e6f305b6895451fd.tar.gz openbsd-ca4d453ef6c4607ea4865cb4e6f305b6895451fd.tar.bz2 openbsd-ca4d453ef6c4607ea4865cb4e6f305b6895451fd.zip |
wording updates. typo in example (s/err1/errx/).
sync with latest kame.
-rw-r--r-- | src/lib/libc/net/getaddrinfo.3 | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/lib/libc/net/getaddrinfo.3 b/src/lib/libc/net/getaddrinfo.3 index 01bfb3cef8..28632dcee3 100644 --- a/src/lib/libc/net/getaddrinfo.3 +++ b/src/lib/libc/net/getaddrinfo.3 | |||
@@ -1,5 +1,5 @@ | |||
1 | .\" $OpenBSD: getaddrinfo.3,v 1.13 2000/12/24 00:30:54 aaron Exp $ | 1 | .\" $OpenBSD: getaddrinfo.3,v 1.14 2001/01/26 13:31:35 itojun Exp $ |
2 | .\" $KAME: getaddrinfo.3,v 1.22 2000/08/09 21:16:17 itojun Exp $ | 2 | .\" $KAME: getaddrinfo.3,v 1.27 2001/01/26 13:27:56 itojun Exp $ |
3 | .\" | 3 | .\" |
4 | .\" Copyright (c) 1983, 1987, 1991, 1993 | 4 | .\" Copyright (c) 1983, 1987, 1991, 1993 |
5 | .\" The Regents of the University of California. All rights reserved. | 5 | .\" The Regents of the University of California. All rights reserved. |
@@ -258,12 +258,12 @@ Here are pitfall cases you may encounter: | |||
258 | .Bl -bullet | 258 | .Bl -bullet |
259 | .It | 259 | .It |
260 | .Fn getaddrinfo | 260 | .Fn getaddrinfo |
261 | will raise error if members in | 261 | will raise an error if members of the |
262 | .Fa hints | 262 | .Fa hints |
263 | structure is not consistent. | 263 | structure are not consistent. |
264 | For example, for internet address families, | 264 | For example, for internet address families, |
265 | .Fn getaddrinfo | 265 | .Fn getaddrinfo |
266 | will raise error if you specify | 266 | will raise an error if you specify |
267 | .Dv SOCK_STREAM | 267 | .Dv SOCK_STREAM |
268 | to | 268 | to |
269 | .Fa ai_socktype | 269 | .Fa ai_socktype |
@@ -277,10 +277,10 @@ If you specify a | |||
277 | which is defined only for certain | 277 | which is defined only for certain |
278 | .Fa ai_socktype , | 278 | .Fa ai_socktype , |
279 | .Fn getaddrinfo | 279 | .Fn getaddrinfo |
280 | will raise error because the arguments are not consistent. | 280 | will raise an error because the arguments are not consistent. |
281 | For example, | 281 | For example, |
282 | .Fn getaddrinfo | 282 | .Fn getaddrinfo |
283 | will raise error if you ask for | 283 | will raise an error if you ask for |
284 | .Dq Li tftp | 284 | .Dq Li tftp |
285 | service on | 285 | service on |
286 | .Dv SOCK_STREAM . | 286 | .Dv SOCK_STREAM . |
@@ -292,11 +292,11 @@ while you set | |||
292 | to | 292 | to |
293 | .Dv SOCK_RAW , | 293 | .Dv SOCK_RAW , |
294 | .Fn getaddrinfo | 294 | .Fn getaddrinfo |
295 | will raise error, because service names are not defined for the internet | 295 | will raise an error, because service names are not defined for the internet |
296 | .Dv SOCK_RAW | 296 | .Dv SOCK_RAW |
297 | space. | 297 | space. |
298 | .It | 298 | .It |
299 | If you specify numeric | 299 | If you specify a numeric |
300 | .Fa servname , | 300 | .Fa servname , |
301 | while leaving | 301 | while leaving |
302 | .Fa ai_socktype | 302 | .Fa ai_socktype |
@@ -304,7 +304,7 @@ and | |||
304 | .Fa ai_protocol | 304 | .Fa ai_protocol |
305 | unspecified, | 305 | unspecified, |
306 | .Fn getaddrinfo | 306 | .Fn getaddrinfo |
307 | will raise error. | 307 | will raise an error. |
308 | This is because the numeric | 308 | This is because the numeric |
309 | .Fa servname | 309 | .Fa servname |
310 | does not identify any socket type, and | 310 | does not identify any socket type, and |
@@ -347,10 +347,11 @@ If the argument is not one of the | |||
347 | values, the function still returns a pointer to a string whose contents | 347 | values, the function still returns a pointer to a string whose contents |
348 | indicate an unknown error. | 348 | indicate an unknown error. |
349 | .\" | 349 | .\" |
350 | .Sh EXTENSION | 350 | .Ss Extension for scoped IPv6 address |
351 | The implementation allows experimental numeric IPv6 address notation with | 351 | The implementation allows experimental numeric IPv6 address notation with |
352 | scope identifier. | 352 | scope identifier. |
353 | By appending atmark and scope identifier to addresses, you can fill | 353 | By appending the percent character and scope identifier to addresses, |
354 | you can fill | ||
354 | .Li sin6_scope_id | 355 | .Li sin6_scope_id |
355 | field for addresses. | 356 | field for addresses. |
356 | This would make management of scoped address easier, | 357 | This would make management of scoped address easier, |
@@ -405,7 +406,7 @@ hints.ai_family = PF_UNSPEC; | |||
405 | hints.ai_socktype = SOCK_STREAM; | 406 | hints.ai_socktype = SOCK_STREAM; |
406 | error = getaddrinfo("www.kame.net", "http", &hints, &res0); | 407 | error = getaddrinfo("www.kame.net", "http", &hints, &res0); |
407 | if (error) { | 408 | if (error) { |
408 | err1(1, "%s", gai_strerror(error)); | 409 | errx(1, "%s", gai_strerror(error)); |
409 | /*NOTREACHED*/ | 410 | /*NOTREACHED*/ |
410 | } | 411 | } |
411 | s = -1; | 412 | s = -1; |
@@ -449,7 +450,7 @@ hints.ai_socktype = SOCK_STREAM; | |||
449 | hints.ai_flags = AI_PASSIVE; | 450 | hints.ai_flags = AI_PASSIVE; |
450 | error = getaddrinfo(NULL, "http", &hints, &res0); | 451 | error = getaddrinfo(NULL, "http", &hints, &res0); |
451 | if (error) { | 452 | if (error) { |
452 | err1(1, "%s", gai_strerror(error)); | 453 | errx(1, "%s", gai_strerror(error)); |
453 | /*NOTREACHED*/ | 454 | /*NOTREACHED*/ |
454 | } | 455 | } |
455 | nsock = 0; | 456 | nsock = 0; |
@@ -575,7 +576,7 @@ The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit. | |||
575 | .Sh STANDARDS | 576 | .Sh STANDARDS |
576 | The | 577 | The |
577 | .Fn getaddrinfo | 578 | .Fn getaddrinfo |
578 | function is defined IEEE POSIX 1003.1g draft specification, | 579 | function is defined in IEEE POSIX 1003.1g draft specification, |
579 | and documented in | 580 | and documented in |
580 | .Dq Basic Socket Interface Extensions for IPv6 | 581 | .Dq Basic Socket Interface Extensions for IPv6 |
581 | .Pq RFC2553 . | 582 | .Pq RFC2553 . |