aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@redhat.com>2025-06-04 16:27:20 +0100
committerMaciej W. Rozycki <macro@redhat.com>2025-06-04 16:27:20 +0100
commit140b20e9716b51659a5223b182dcf07ac62b3f77 (patch)
tree2cd747a594cc63782b61e6bf0ca235aab8e42940
parent5a9020eeb27eee88e7839ff5e9cea94892ec90ff (diff)
downloadglibc-140b20e9716b51659a5223b182dcf07ac62b3f77.zip
glibc-140b20e9716b51659a5223b182dcf07ac62b3f77.tar.gz
glibc-140b20e9716b51659a5223b182dcf07ac62b3f77.tar.bz2
manual: Document error codes missing for 'inet_pton'
Add documentation for EAFNOSUPPORT error code returned, and the possible return values on non-success. Reviewed-by: Florian Weimer <fweimer@redhat.com>
-rw-r--r--manual/socket.texi11
1 files changed, 11 insertions, 0 deletions
diff --git a/manual/socket.texi b/manual/socket.texi
index e8285b9..d804c7a 100644
--- a/manual/socket.texi
+++ b/manual/socket.texi
@@ -1216,6 +1216,17 @@ either @code{AF_INET} or @code{AF_INET6}, as appropriate for the type of
address being converted. @var{cp} is a pointer to the input string, and
@var{buf} is a pointer to a buffer for the result. It is the caller's
responsibility to make sure the buffer is large enough.
+
+The return value is @code{1} on success and @code{0} if @var{cp} does not
+point to a valid address string for the address family @var{af} requested.
+On failure, the function's return value is @code{-1} and @code{errno} is
+set accordingly. The following @code{errno} values are specific to this
+function:
+
+@table @code
+@item EAFNOSUPPORT
+The address family requested is neither @code{AF_INET} nor @code{AF_INET6}.
+@end table
@end deftypefun
@deftypefun {const char *} inet_ntop (int @var{af}, const void *@var{cp}, char *@var{buf}, socklen_t @var{len})