---
name: "io_uring_recvmsg_validate"
section: "3"
platform: "linux"
package: "liburing"
version: "2.15-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/io_uring_recvmsg_validate"
---

# io\_uring\_recvmsg\_validate(3)

access data from multishot recvmsg

## NAME

io\_uring\_recvmsg\_out - access data from multishot recvmsg

## SYNOPSIS

```
#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***);**

## DESCRIPTION

These functions are used to access data in the payload delivered by [**io\_uring\_prep\_recvmsg\_multishot**(3)](/io_uring_prep_recvmsg_multishot/3.md).

*msgh* should point to the *struct msghdr* submitted with the request.

[**io\_uring\_recvmsg\_validate**(3)](/io_uring_recvmsg_validate/3.md) will validate a buffer delivered by [**io\_uring\_prep\_recvmsg\_multishot**(3)](/io_uring_prep_recvmsg_multishot/3.md) 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)](/io_uring_recvmsg_name/3.md) returns a pointer to the name in the buffer.

- \*

  [**io\_uring\_recvmsg\_cmsg\_firsthdr**(3)](/io_uring_recvmsg_cmsg_firsthdr/3.md) returns a pointer to the first cmsg in the buffer, or NULL.

- \*

  [**io\_uring\_recvmsg\_cmsg\_nexthdr**(3)](/io_uring_recvmsg_cmsg_nexthdr/3.md) returns a pointer to the next cmsg in the buffer, or NULL.

- \*

  [**io\_uring\_recvmsg\_payload**(3)](/io_uring_recvmsg_payload/3.md) returns a pointer to the payload in the buffer.

- \*

  [**io\_uring\_recvmsg\_payload\_length**(3)](/io_uring_recvmsg_payload_length/3.md) Calculates the usable payload length in bytes.

## SEE ALSO

[**io\_uring\_prep\_recvmsg\_multishot**(3)](/io_uring_prep_recvmsg_multishot/3.md)
