diff options
author | bms <bms@FreeBSD.org> | 2004-06-14 14:18:41 +0000 |
---|---|---|
committer | bms <bms@FreeBSD.org> | 2004-06-14 14:18:41 +0000 |
commit | 4561ab95f206bae868d6c3f59f5525582bf5ff1a (patch) | |
tree | 4c4d277befcea8bcd6fe462d3946fa5ac650551b /lib/libc/net | |
parent | dfa52c169f1c7873c7bbc7ef854a910119e7a031 (diff) | |
download | FreeBSD-src-4561ab95f206bae868d6c3f59f5525582bf5ff1a.zip FreeBSD-src-4561ab95f206bae868d6c3f59f5525582bf5ff1a.tar.gz |
Document some return values.
PR: bin/22198
Submitted by: Nick Johnson (with cleanups)
Diffstat (limited to 'lib/libc/net')
-rw-r--r-- | lib/libc/net/inet.3 | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/libc/net/inet.3 b/lib/libc/net/inet.3 index e480894..769e1a4 100644 --- a/lib/libc/net/inet.3 +++ b/lib/libc/net/inet.3 @@ -119,10 +119,17 @@ numbers, respectively. .Pp The function .Fn inet_ntop -converts an address from network format (usually a +converts an address +.Fa *src +from network format +(usually a .Ft struct in_addr or some other binary form, in network byte order) to presentation format (suitable for external display purposes). +The +.Fa size +argument specifies the size, in bytes, of the buffer +.Fa *dst . It returns NULL if a system error occurs (in which case, .Va errno will have been set), or it returns a pointer to the destination string. @@ -226,6 +233,18 @@ is returned by and .Fn inet_network for malformed requests. +.Sh ERRORS +The +.Fn inet_ntop +call fails if: +.Bl -tag -width Er +.It Bq Er ENOSPC +.Fa size +was not large enough to store the presentation form of the address. +.It Bq Er EAFNOSUPPORT +.Fa *src +was not an AF_INET or AF_INET6 family address. +.El .Sh SEE ALSO .Xr addr2ascii 3 , .Xr byteorder 3 , |