diff --git a/man3/getnameinfo.3 b/man3/getnameinfo.3 index b4f269b31..8a6d0f4c8 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,