getsockname.2: Note that returned address is truncated if buffer is too small

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2008-12-03 14:06:50 -05:00
parent cb15903860
commit f7c494fb23
1 changed files with 7 additions and 3 deletions

View File

@ -54,10 +54,14 @@ is bound, in the buffer pointed to by
The
.I namelen
argument should be initialized to indicate
the amount of space pointed to by
the amount of space (in bytes) pointed to by
.IR name .
On return it contains the actual size of the name
returned (in bytes).
On return it contains the actual size of the socket address.
The returned address is truncated if the buffer provided is too small;
in this case,
.I namelen
will return a value greater than was supplied to the call.
.SH "RETURN VALUE"
On success, zero is returned.
On error, \-1 is returned, and