diff options
author | itojun <> | 2000-06-22 20:29:00 +0000 |
---|---|---|
committer | itojun <> | 2000-06-22 20:29:00 +0000 |
commit | d6812813393b33cf858234cf71a5b7546de95c3f (patch) | |
tree | d00c27f7489e8d98f9f144c4d588acb55c976441 | |
parent | dd1a6930a8ee9dd3edcff14d2150a70fc6d51e86 (diff) | |
download | openbsd-d6812813393b33cf858234cf71a5b7546de95c3f.tar.gz openbsd-d6812813393b33cf858234cf71a5b7546de95c3f.tar.bz2 openbsd-d6812813393b33cf858234cf71a5b7546de95c3f.zip |
add paper by cmetz. correct example. (sync with kame)
-rw-r--r-- | src/lib/libc/net/getaddrinfo.3 | 19 | ||||
-rw-r--r-- | src/lib/libc/net/getnameinfo.3 | 37 |
2 files changed, 43 insertions, 13 deletions
diff --git a/src/lib/libc/net/getaddrinfo.3 b/src/lib/libc/net/getaddrinfo.3 index 15d322c5dd..518667a09e 100644 --- a/src/lib/libc/net/getaddrinfo.3 +++ b/src/lib/libc/net/getaddrinfo.3 | |||
@@ -1,4 +1,5 @@ | |||
1 | .\" $OpenBSD: getaddrinfo.3,v 1.7 2000/02/14 13:23:54 itojun Exp $ | 1 | .\" $OpenBSD: getaddrinfo.3,v 1.8 2000/06/22 20:29:00 itojun Exp $ |
2 | .\" $KAME: getaddrinfo.3,v 1.14 2000/06/22 20:25:50 itojun Exp $ | ||
2 | .\" | 3 | .\" |
3 | .\" Copyright (c) 1983, 1987, 1991, 1993 | 4 | .\" Copyright (c) 1983, 1987, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | 5 | .\" The Regents of the University of California. All rights reserved. |
@@ -32,7 +33,6 @@ | |||
32 | .\" SUCH DAMAGE. | 33 | .\" SUCH DAMAGE. |
33 | .\" | 34 | .\" |
34 | .\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95 | 35 | .\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95 |
35 | .\" KAME Id: getaddrinfo.3,v 1.8 2000/01/17 08:13:03 itojun Exp | ||
36 | .\" | 36 | .\" |
37 | .Dd May 25, 1995 | 37 | .Dd May 25, 1995 |
38 | .Dt GETADDRINFO 3 | 38 | .Dt GETADDRINFO 3 |
@@ -303,7 +303,7 @@ such as | |||
303 | .Li ne0 | 303 | .Li ne0 |
304 | .Pc . | 304 | .Pc . |
305 | Example would be like | 305 | Example would be like |
306 | .Dq Li fe80::1@ne0 , | 306 | .Dq Li fe80::1%ne0 , |
307 | which means | 307 | which means |
308 | .Do | 308 | .Do |
309 | .Li fe80::1 | 309 | .Li fe80::1 |
@@ -498,9 +498,15 @@ indicate an unknown error. | |||
498 | .%A Atsushi Onoe | 498 | .%A Atsushi Onoe |
499 | .%T "An Extension of Format for IPv6 Scoped Addresses" | 499 | .%T "An Extension of Format for IPv6 Scoped Addresses" |
500 | .%R internet draft | 500 | .%R internet draft |
501 | .%N draft-ietf-ipngwg-scopedaddr-format-00.txt | 501 | .%N draft-ietf-ipngwg-scopedaddr-format-01.txt |
502 | .%O work in progress material | 502 | .%O work in progress material |
503 | .Re | 503 | .Re |
504 | .Rs | ||
505 | .%A Craig Metz | ||
506 | .%T Protocol Independence Using the Sockets API | ||
507 | .%B "Proceedings of the freenix track: 2000 USENIX annual technical conference" | ||
508 | .%D June 2000 | ||
509 | .Re | ||
504 | .\" | 510 | .\" |
505 | .Sh HISTORY | 511 | .Sh HISTORY |
506 | The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit. | 512 | The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit. |
@@ -515,8 +521,3 @@ and documented in | |||
515 | .\" | 521 | .\" |
516 | .Sh BUGS | 522 | .Sh BUGS |
517 | The text was shamelessly copied from RFC2553. | 523 | The text was shamelessly copied from RFC2553. |
518 | .Pp | ||
519 | .Nm | ||
520 | can mistakingly query databases in different order than | ||
521 | .Xr resolv.conf 5 | ||
522 | suggests. | ||
diff --git a/src/lib/libc/net/getnameinfo.3 b/src/lib/libc/net/getnameinfo.3 index 74690d0e41..d73a9a9e55 100644 --- a/src/lib/libc/net/getnameinfo.3 +++ b/src/lib/libc/net/getnameinfo.3 | |||
@@ -1,4 +1,5 @@ | |||
1 | .\" $OpenBSD: getnameinfo.3,v 1.6 2000/04/18 03:01:31 aaron Exp $ | 1 | .\" $OpenBSD: getnameinfo.3,v 1.7 2000/06/22 20:29:00 itojun Exp $ |
2 | .\" $KAME: getnameinfo.3,v 1.13 2000/06/22 20:25:50 itojun Exp $ | ||
2 | .\" | 3 | .\" |
3 | .\" Copyright (c) 1983, 1987, 1991, 1993 | 4 | .\" Copyright (c) 1983, 1987, 1991, 1993 |
4 | .\" The Regents of the University of California. All rights reserved. | 5 | .\" The Regents of the University of California. All rights reserved. |
@@ -32,7 +33,6 @@ | |||
32 | .\" SUCH DAMAGE. | 33 | .\" SUCH DAMAGE. |
33 | .\" | 34 | .\" |
34 | .\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95 | 35 | .\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95 |
35 | .\" KAME Id: getnameinfo.3,v 1.7 2000/01/17 08:13:04 itojun Exp | ||
36 | .\" | 36 | .\" |
37 | .Dd May 25, 1995 | 37 | .Dd May 25, 1995 |
38 | .Dt GETNAMEINFO 3 | 38 | .Dt GETNAMEINFO 3 |
@@ -180,7 +180,7 @@ flags are defined in | |||
180 | The implementation allows experimental numeric IPv6 address notation with | 180 | The implementation allows experimental numeric IPv6 address notation with |
181 | scope identifier. | 181 | scope identifier. |
182 | IPv6 link-local address will appear as string like | 182 | IPv6 link-local address will appear as string like |
183 | .Dq Li fe80::1@ne0 , | 183 | .Dq Li fe80::1%ne0 , |
184 | if | 184 | if |
185 | .Dv NI_WITHSCOPEID | 185 | .Dv NI_WITHSCOPEID |
186 | bit is enabled in | 186 | bit is enabled in |
@@ -229,6 +229,29 @@ printf("host=%s\\n", hbuf); | |||
229 | .Sh DIAGNOSTICS | 229 | .Sh DIAGNOSTICS |
230 | The function indicates successful completion by a zero return value; | 230 | The function indicates successful completion by a zero return value; |
231 | a non-zero return value indicates failure. | 231 | a non-zero return value indicates failure. |
232 | Error codes are as below: | ||
233 | .Bl -tag -width Er | ||
234 | .It Bq Er EAI_AGAIN | ||
235 | The name could not be resolved at this time. | ||
236 | Future attempts may succeed. | ||
237 | .It Bq Er EAI_BADFLAGS | ||
238 | The flags had an invalid value. | ||
239 | .It Bq Er EAI_FAIL | ||
240 | A non-recoverable error occurred. | ||
241 | .It Bq Er EAI_FAMILY | ||
242 | The address family was not recognized or the address length was invalid | ||
243 | for the specified family. | ||
244 | .It Bq Er EAI_MEMORY | ||
245 | There was a memory allocation failure. | ||
246 | .It Bq Er EAI_NONAME | ||
247 | The name does not resolve for the supplied parameters. | ||
248 | .Dv NI_NAMEREQD | ||
249 | is set and the host's name cannot be located, | ||
250 | or both nodename and servname were null. | ||
251 | .It Bq Er EAI_SYSTEM | ||
252 | A system error occurred. | ||
253 | The error code can be found in errno. | ||
254 | .El | ||
232 | .\" | 255 | .\" |
233 | .Sh SEE ALSO | 256 | .Sh SEE ALSO |
234 | .Xr getaddrinfo 3 , | 257 | .Xr getaddrinfo 3 , |
@@ -253,9 +276,15 @@ a non-zero return value indicates failure. | |||
253 | .%A Atsushi Onoe | 276 | .%A Atsushi Onoe |
254 | .%T "An Extension of Format for IPv6 Scoped Addresses" | 277 | .%T "An Extension of Format for IPv6 Scoped Addresses" |
255 | .%R internet draft | 278 | .%R internet draft |
256 | .%N draft-ietf-ipngwg-scopedaddr-format-00.txt | 279 | .%N draft-ietf-ipngwg-scopedaddr-format-01.txt |
257 | .%O work in progress material | 280 | .%O work in progress material |
258 | .Re | 281 | .Re |
282 | .Rs | ||
283 | .%A Craig Metz | ||
284 | .%T Protocol Independence Using the Sockets API | ||
285 | .%B "Proceedings of the freenix track: 2000 USENIX annual technical conference" | ||
286 | .%D June 2000 | ||
287 | .Re | ||
259 | .\" | 288 | .\" |
260 | .Sh HISTORY | 289 | .Sh HISTORY |
261 | The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit. | 290 | The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit. |