Open System Services System Calls Reference Manual (G06.28+, H06.05+)
System Functions (s and S) spt_recvmsgx(2)
NAME
spt_recvmsgx - Receives a message from a socket using a message structure (thread-aware ver-
sion)
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
[#include <sys/socket.h>]
#include <spthread.h>
ssize_t spt_recvmsgx (
int socket,
struct msghdr *message,
int flags
);
PARAMETERS
socket Specifies the file descriptor of the socket.
message Points to a msghdr 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 msghdr 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 param-
eter 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 spt_recvmsgx() func-
tion (or a similar function) will still return this data.
DESCRIPTION
The spt_recvmsgx() function is the thread-aware version of the recvmsg() function.
The spt_recvmsgx() function receives messages from a connection-oriented or connectionless
socket using the msghdr structure. The spt_recvmsgx() 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
527186-007 Hewlett-Packard Company 7−275