Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (r) recvmsg64_(2)
NOTES
This function requires that the feature-test macro _XOPEN_SOURCE_EXTENDED be specified
when you compile the module.
When data is available, a call to the select() function indicates that the file descriptor for the
socket is ready for reading.
When the file to which a sending datagram socket is bound is unlinked or renamed, and one of
the send set of functions is called, the receiving clients call to recvmsg64_() returns a null
address (all fields in the address are zero).
When the file to which a sending datagram socket is bound is unlinked or renamed, and one of
the send set of functions is called, the receiving clients call to recvmsg64_() returns the fully-
qualified form of the address to which the sending socket was originally bound.
If a memory resource allocation error occurs while attempting this operation, the operation
succeeds but the resulting file descriptor is not usable. All subsequent file operations that attempt
to use the file descriptor fail with the error [EBADF].
For detailed information about writing multi-threaded and 64-bit applications for the Open Sys-
tem Services environment, see the Open System Services Programmer’s Guide.
RETURN VALUES
Upon successful completion, the recvmsg64_() function returns the length of the received mes-
sage in bytes. If no data is available and the peer socket has performed an orderly shutdown, 0
(zero) is returned.
If the recvmsg64_() function call fails, the value -1 is returned, and errno is set to indicate the
error.
ERRORS
If any of these conditions occurs, the recvmsg64_() function sets errno to the corresponding
value:
[EBADF] The socket parameter is not a valid file descriptor.
[ECONNRESET]
One of these conditions occurred:
The transport-provider process for this socket is no longer available.
The TCP/IP subsystem for this socket is no longer available.
The connection was forcibly closed by the peer socket.
The socket can only be closed.
[EFAULT] A user-supplied memory buffer cannot be accessed or written.
[EINTR] A signal interrupted the function before any data was available.
[EINVAL] One of these conditions occurred:
The MSG_OOB value is specified in the flags parameter, and no out-of-
band data is available.
The sum of the values specified for the msg_iovlen field of the
msghdr64 structure is too large for a long long data item.
527186-023 Hewlett-Packard Company 641