Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
recvmsg64_(2) OSS System Calls Reference Manual
flags parameter, the excess bytes are discarded, and MSG_TRUNC is set in the msg_flags field
of the msghdr64 structure.
For stream-based sockets (sockets of type SOCK_STREAM), message boundaries are ignored.
For such sockets, data is returned as soon as it becomes available; no data is discarded.
If no messages are available at the socket and the socket’s file descriptor is blocking
(O_NONBLOCK is not set), the recvmsg64_() function blocks until a message arrives. If no
messages are available at the socket and the socket’s file descriptor is marked nonblocking
(O_NONBLOCK is set), the recvmsg64_() function fails and sets errno to [EWOULD-
BLOCK].
In the msghdr64 structure, the msg_name and msg_namelen members specify the source
address if the socket is unconnected. If the socket is connected, the msg_name and
msg_namelen members are ignored. The msg_name member can be a null pointer if no names
are desired or required. The msg_iov and msg_iovlen members describe the scatter/gather loca-
tions.
Upon successful completion of the recvmsg64_() call, the value of the msg_flags member of the
msghdr64 structure is the bitwise OR of zero or more of the following values:
MSG_CTRUNC
Control data was truncated.
MSG_OOB Out-of-band data was received.
MSG_TRUNC
Normal data was truncated.
In the msghdr64 structure, the msg_control and msg_controllen members specify the ancillary
data buffer that can be used only by sockets in the AF_UNIX domain to receive file descriptors
passed from another process on the same node. The msg_control member can be a null pointer
if ancillary data is not desired or required. If the msg_control member is nonnull, on input the
msg_controllen member contains the size of the ancillary data buffer and on output it contains
the size of the received ancillary data. If, on output, the msg_controllen member is nonzero, the
ancillary data buffer contains a cmsghdr structure followed by one to sixteen file descriptors.
If recvmsg64_() is called with an ancillary data buffer and MSG_PEEK is set, the
msg_controllen member is valid, but the ancillary data is not meaningful (no file descriptors are
received). Ancillary data is not discarded but remains available for the next call to
recvmsg64_()
where MSG_PEEK is
set.
If recvmsg64_() is called with an ancillary data buffer that is too small to hold the available file
descriptors, MSG_CTRUNC is set, and the excess file descriptors are discarded.
If recvmsg64_() is called with an ancillary data buffer and one or more of the received file
descriptors are unusable (perhaps because of a device error), there is no error indication until the
file descriptor is used.
To pass a 32-bit pointer from a 32-bit Guardian or OSS client, recvmsg() must be called.
To pass a 64-bit pointer from a 32-bit Guardian or OSS client, recvmsg64_() must be called.
To pass a 32-bit pointer from a 64-bit OSS client, recvmsg() must be called.
To pass a 64-bit pointer from a 64-bit OSS client, recvmsg() must be called.
6−40 Hewlett-Packard Company 527186-023