aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2004-12-15 16:10:55 +0000
committerMichael Kerrisk <mtk.manpages@gmail.com>2004-12-15 16:10:55 +0000
commit3d4d91162455c53ff7e66402f93020123f20c423 (patch)
treeb66ccadd3176e077c3b2e54a86c5446daaeaffde
parent631f43ca2d2a4aa9be7c654c3537a60063754242 (diff)
downloadman-pages-3d4d91162455c53ff7e66402f93020123f20c423.tar.gz
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=229618
getnameinfo() does not set errno, it returns a non-zero value indicating the error. added EAI_OVERFLOW error
-rw-r--r--man3/getnameinfo.319
1 files changed, 15 insertions, 4 deletions
diff --git a/man3/getnameinfo.3 b/man3/getnameinfo.3
index b4f269b31e..8a6d0f4c89 100644
--- a/man3/getnameinfo.3
+++ b/man3/getnameinfo.3
@@ -1,6 +1,9 @@
.\" This page is in the public domain.
.\" Almost all details are from RFC 2553.
.\"
+.\" 2004-12-14, mtk, Added EAI_OVERFLOW error
+.\" 2004-12-14 Fixed description of error return
+.\"
.TH getnameinfo 3 2000-12-11 "Linux Man Page" "UNIX Programmer's Manual"
.SH NAME
getnameinfo \- address-to-name translation in protocol-independent manner
@@ -88,10 +91,7 @@ that have different services for UDP and TCP.
On success 0 is returned, and node and service names, if requested,
are filled with NUL-terminated strings, possibly truncated to fit
the specified buffer lengths.
-On error a nonzero value is returned, and
-.I errno
-is set appropriately.
-.SH ERRORS
+On error one of the following non-zero error codes is returned:
.TP
.B EAI_AGAIN
The name could not be resolved at this time. Try again later.
@@ -116,6 +116,13 @@ The name does not resolve for the supplied parameters.
NI_NAMEREQD is set and the host's name cannot be located,
or neither hostname nor service name were requested.
.TP
+.B EAI_OVERFLOW
+The buffer pointed to by
+.I host
+or
+.I serv
+was too small.
+.TP
.B EAI_SYSTEM
A system error occurred. The error code can be found in
.IR errno .
@@ -125,6 +132,10 @@ A system error occurred. The error code can be found in
/etc/nsswitch.conf
.br
/etc/resolv.conf
+The
+.BR gai_strerror (3)
+function translates these error codes to a human readable string,
+suitable for error reporting.
.SH NOTE
In order to assist the programmer in choosing reasonable sizes
for the supplied buffers,