Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
System Functions (r) recvmsg64_(2)
NAME
recvmsg64_ - Receives a message from a socket using a message structure
LIBRARY
G-series native OSS processes: system library
H-series and J-series OSS processes: implicit libraries
32-bit H-series and J-series OSS processes that use the POSIX User Thread Model library:
/G/system/zdllnnn/zputdll
64-bit H-series and J-series OSS processes that use the POSIX User Thread Model library:
/G/system/zdllnnn/yputdll
SYNOPSIS
#define _XOPEN_SOURCE_EXTENDED 1
#include <sys/socket.h>
long long recvmsg64_(
int socket,
struct msghdr64 _ptr64 *message,
int flags);
PARAMETERS
socket Specifies the file descriptor of the socket.
message Points to a msghdr64 structure containing both the buffer to store the source
address and the buffers for the incoming message. The length and format of the
address depend on the address family for the socket. The msg_flags member of
the structure is ignored on input but might contain meaningful values on output.
For:
AF_INET sockets
A pointer in msghdr64 to the address structure sockaddr_in
must be cast as a struct sockaddr.
AF_INET6 sockets
A pointer to the address structure sockaddr_in6 must be cast as
a struct sockaddr.
AF_UNIX sockets
A pointer to the address structure sockaddr_un must be cast as a
struct sockaddr.
flags Is a value that controls message reception. The value of the flags parameter is
formed by bitwise ORing zero or more of the following values:
MSG_OOB Requests out-of-band data.
MSG_PEEK Peeks at an incoming message. The data is treated as unread,
and the next call to the recvmsg64_() function (or a similar
function) will still return this data.
DESCRIPTION
The recvmsg64_() function receives messages from a connection-oriented or connectionless
socket using the msghdr64 structure. The recvmsg64_() function is normally used with connec-
tionless sockets because it includes parameters that permit a calling program to retrieve the
source address of the received data.
For message-based sockets (sockets of type SOCK_DGRAM), the entire message must be read
in one call. If a message is too long to fit in the supplied buffer and MSG_PEEK is not set in the
527186-023 Hewlett-Packard Company 6−39