logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

io_uring_recvmsg_out - access data from multishot recvmsg

Description

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

       msgh should point to the structmsghdr submitted with the request.

       io_uring_recvmsg_validate(3)  will  validate a buffer delivered by io_uring_prep_recvmsg_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_recvmsg_name(3)
          returns a pointer to the name in the buffer.

       *  io_uring_recvmsg_cmsg_firsthdr(3)
          returns a pointer to the first cmsg in the buffer, or NULL.

       *  io_uring_recvmsg_cmsg_nexthdr(3)
          returns a pointer to the next cmsg in the buffer, or NULL.

       *  io_uring_recvmsg_payload(3)
          returns a pointer to the payload in the buffer.

       *  io_uring_recvmsg_payload_length(3)
          Calculates the usable payload length in bytes.

Name

       io_uring_recvmsg_out - access data from multishot recvmsg

See Also

io_uring_prep_recvmsg_multishot(3)

liburing-2.2                                      July 26, 2022                          io_uring_recvmsg_out(3)

Synopsis

#include<liburing.h>structio_uring_recvmsg_out*io_uring_recvmsg_validate(void*buf,intbuf_len,structmsghdr*msgh);void*io_uring_recvmsg_name(structio_uring_recvmsg_out*o);structcmsghdr*io_uring_recvmsg_cmsg_firsthdr(structio_uring_recvmsg_out*o,structmsghdr*msgh);structcmsghdr*io_uring_recvmsg_cmsg_nexthdr(structio_uring_recvmsg_out*o,structmsghdr*msgh,structcmsghdr*cmsg);void*io_uring_recvmsg_payload(structio_uring_recvmsg_out*o,structmsghdr*msgh);unsignedintio_uring_recvmsg_payload_length(structio_uring_recvmsg_out*o,intbuf_len,structmsghdr*msgh);

See Also