mirror of https://github.com/mkerrisk/man-pages
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:
parent
cb15903860
commit
f7c494fb23
|
@ -54,10 +54,14 @@ is bound, in the buffer pointed to by
|
||||||
The
|
The
|
||||||
.I namelen
|
.I namelen
|
||||||
argument should be initialized to indicate
|
argument should be initialized to indicate
|
||||||
the amount of space pointed to by
|
the amount of space (in bytes) pointed to by
|
||||||
.IR name .
|
.IR name .
|
||||||
On return it contains the actual size of the name
|
On return it contains the actual size of the socket address.
|
||||||
returned (in bytes).
|
|
||||||
|
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"
|
.SH "RETURN VALUE"
|
||||||
On success, zero is returned.
|
On success, zero is returned.
|
||||||
On error, \-1 is returned, and
|
On error, \-1 is returned, and
|
||||||
|
|
Loading…
Reference in New Issue