recvmsg
Prototype:
#include <sys/socket.h>
#include <resolv.h>
#include <sys/uio.h>
int recvmsg(int sockfd, struct msghdr *msg,
    unsigned int options);
General Description: Receive several messages at once from the same source. This call is customarily used with SOCK_DGRAM sockets (same reasoning as sendmsg()). The operation does not have the flexibility to accept from different sources.
Return Value: Total number of bytes received if no error occurred; -1, otherwise.
Parameters
sockfd The socket descriptor waiting for a message.
msg
options Channel controlling options (same as recv()).
Possible Errors
(same as recv())
Examples
char buffer[MSGS][1000];
struct sockaddr_in addr;
struct iovec io[MSGS];
struct msghdr msg;
...
bzero(&addr, sizeof(addr));
msg.msg_name = &addr;
msg.msg_namelen = sizeof(addr);
for ( i = 0; i < MSGS; i++ )
{
    io[i].iov_base = buffer[i];
    io[i].iov_len = sizeof(buffer[i]);
}
msg.msg_iov = io;
msg.msg_iovlen = MSGS;
if ( (bytes = recvmsg(sd, &msg, 0)) < 0 )
    perror("recvmsg");

(c)Terminating Connections