recv.2: Clarify details of msg_name and msg_namelen fields

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-05-03 10:18:31 +02:00
parent 6154a29a77
commit ddb4a7c01c
1 changed files with 11 additions and 4 deletions

View File

@ -322,13 +322,20 @@ struct msghdr {
.fi
.in
.PP
Here,
The
.I msg_name
and
field points to a caller-allocated buffer that is used to
return the source address if the socket is unconnected.
The caller should set
.I msg_namelen
specify the source address if the socket is unconnected;
to the size of this buffer before this call;
upon return from a successful call,
.I msg_name
may be given as a null pointer if no names are desired or required.
will contain the length of the returned address.
If the application does not need to know the source address,
.I msg_name
can be specified as NULL.
The fields
.I msg_iov
and