DOKK / manpages / debian 12 / liburing-dev / io_uring_recvmsg_payload.3.en
io_uring_recvmsg_out(3) liburing Manual io_uring_recvmsg_out(3)

io_uring_recvmsg_out - access data from multishot recvmsg

#include <liburing.h>
struct io_uring_recvmsg_out *io_uring_recvmsg_validate(void *buf,
                                                       int buf_len,
                                                       struct msghdr *msgh);
void *io_uring_recvmsg_name(struct io_uring_recvmsg_out *o);
struct cmsghdr *io_uring_recvmsg_cmsg_firsthdr(struct io_uring_recvmsg_out * o,
                                                struct msghdr *msgh);
struct cmsghdr *io_uring_recvmsg_cmsg_nexthdr(struct io_uring_recvmsg_out * o,
                                              struct msghdr *msgh,
                                              struct cmsghdr *cmsg);
void *io_uring_recvmsg_payload(struct io_uring_recvmsg_out * o,
                               struct msghdr *msgh);
unsigned int io_uring_recvmsg_payload_length(struct io_uring_recvmsg_out *o,
                                             int buf_len,
                                             struct msghdr *msgh);

These functions are used to access data in the payload delivered by io_uring_prep_recv_multishot(3)

io_uring_recvmsg_validate(3) will validate a buffer delivered by io_uring_prep_recv_multishot(3) and extract the io_uring_recvmsg_out if it is valid, returning a pointer to it or else NULL.

The structure is defined as follows:


struct io_uring_recvmsg_out {

__u32 namelen; /* Name byte count as would have been populated
* by recvmsg(2) */
__u32 controllen; /* Control byte count */
__u32 payloadlen; /* Payload byte count as would have been returned
* by recvmsg(2) */
__u32 flags; /* Flags result as would have been populated
* by recvmsg(2) */ };

io_uring_prep_recv_multishot(3)

Julyu 26, 2022 liburing-2.2