summaryrefslogtreecommitdiff
path: root/lib/libc/net
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-06-22 20:29:01 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-06-22 20:29:01 +0000
commitdaf3be56066ead3b3e9d58c9f740d442b4aa37e8 (patch)
treebba11e62aaae71004ff72777d7cdcf84e8421037 /lib/libc/net
parent9a6792c8cddf4107227927c2f7ade93244d402ee (diff)
add paper by cmetz. correct example. (sync with kame)
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/getaddrinfo.319
-rw-r--r--lib/libc/net/getnameinfo.337
2 files changed, 43 insertions, 13 deletions
diff --git a/lib/libc/net/getaddrinfo.3 b/lib/libc/net/getaddrinfo.3
index 15d322c5dd8..518667a09eb 100644
--- a/lib/libc/net/getaddrinfo.3
+++ b/lib/libc/net/getaddrinfo.3
@@ -1,4 +1,5 @@
-.\" $OpenBSD: getaddrinfo.3,v 1.7 2000/02/14 13:23:54 itojun Exp $
+.\" $OpenBSD: getaddrinfo.3,v 1.8 2000/06/22 20:29:00 itojun Exp $
+.\" $KAME: getaddrinfo.3,v 1.14 2000/06/22 20:25:50 itojun Exp $
.\"
.\" Copyright (c) 1983, 1987, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -32,7 +33,6 @@
.\" SUCH DAMAGE.
.\"
.\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95
-.\" KAME Id: getaddrinfo.3,v 1.8 2000/01/17 08:13:03 itojun Exp
.\"
.Dd May 25, 1995
.Dt GETADDRINFO 3
@@ -303,7 +303,7 @@ such as
.Li ne0
.Pc .
Example would be like
-.Dq Li fe80::1@ne0 ,
+.Dq Li fe80::1%ne0 ,
which means
.Do
.Li fe80::1
@@ -498,9 +498,15 @@ indicate an unknown error.
.%A Atsushi Onoe
.%T "An Extension of Format for IPv6 Scoped Addresses"
.%R internet draft
-.%N draft-ietf-ipngwg-scopedaddr-format-00.txt
+.%N draft-ietf-ipngwg-scopedaddr-format-01.txt
.%O work in progress material
.Re
+.Rs
+.%A Craig Metz
+.%T Protocol Independence Using the Sockets API
+.%B "Proceedings of the freenix track: 2000 USENIX annual technical conference"
+.%D June 2000
+.Re
.\"
.Sh HISTORY
The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit.
@@ -515,8 +521,3 @@ and documented in
.\"
.Sh BUGS
The text was shamelessly copied from RFC2553.
-.Pp
-.Nm
-can mistakingly query databases in different order than
-.Xr resolv.conf 5
-suggests.
diff --git a/lib/libc/net/getnameinfo.3 b/lib/libc/net/getnameinfo.3
index 74690d0e416..d73a9a9e556 100644
--- a/lib/libc/net/getnameinfo.3
+++ b/lib/libc/net/getnameinfo.3
@@ -1,4 +1,5 @@
-.\" $OpenBSD: getnameinfo.3,v 1.6 2000/04/18 03:01:31 aaron Exp $
+.\" $OpenBSD: getnameinfo.3,v 1.7 2000/06/22 20:29:00 itojun Exp $
+.\" $KAME: getnameinfo.3,v 1.13 2000/06/22 20:25:50 itojun Exp $
.\"
.\" Copyright (c) 1983, 1987, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -32,7 +33,6 @@
.\" SUCH DAMAGE.
.\"
.\" From: @(#)gethostbyname.3 8.4 (Berkeley) 5/25/95
-.\" KAME Id: getnameinfo.3,v 1.7 2000/01/17 08:13:04 itojun Exp
.\"
.Dd May 25, 1995
.Dt GETNAMEINFO 3
@@ -180,7 +180,7 @@ flags are defined in
The implementation allows experimental numeric IPv6 address notation with
scope identifier.
IPv6 link-local address will appear as string like
-.Dq Li fe80::1@ne0 ,
+.Dq Li fe80::1%ne0 ,
if
.Dv NI_WITHSCOPEID
bit is enabled in
@@ -229,6 +229,29 @@ printf("host=%s\\n", hbuf);
.Sh DIAGNOSTICS
The function indicates successful completion by a zero return value;
a non-zero return value indicates failure.
+Error codes are as below:
+.Bl -tag -width Er
+.It Bq Er EAI_AGAIN
+The name could not be resolved at this time.
+Future attempts may succeed.
+.It Bq Er EAI_BADFLAGS
+The flags had an invalid value.
+.It Bq Er EAI_FAIL
+A non-recoverable error occurred.
+.It Bq Er EAI_FAMILY
+The address family was not recognized or the address length was invalid
+for the specified family.
+.It Bq Er EAI_MEMORY
+There was a memory allocation failure.
+.It Bq Er EAI_NONAME
+The name does not resolve for the supplied parameters.
+.Dv NI_NAMEREQD
+is set and the host's name cannot be located,
+or both nodename and servname were null.
+.It Bq Er EAI_SYSTEM
+A system error occurred.
+The error code can be found in errno.
+.El
.\"
.Sh SEE ALSO
.Xr getaddrinfo 3 ,
@@ -253,9 +276,15 @@ a non-zero return value indicates failure.
.%A Atsushi Onoe
.%T "An Extension of Format for IPv6 Scoped Addresses"
.%R internet draft
-.%N draft-ietf-ipngwg-scopedaddr-format-00.txt
+.%N draft-ietf-ipngwg-scopedaddr-format-01.txt
.%O work in progress material
.Re
+.Rs
+.%A Craig Metz
+.%T Protocol Independence Using the Sockets API
+.%B "Proceedings of the freenix track: 2000 USENIX annual technical conference"
+.%D June 2000
+.Re
.\"
.Sh HISTORY
The implementation first appeared in WIDE Hydrangea IPv6 protocol stack kit.