io_uring_recvmsg_out(3)
π io_uring_recvmsg_out(3) π
okay bestie, welcome to the liburing manual β¨ this one's all about pulling your data back out of multishot recvmsg, and honestly? it's giving little-helpers-that-just-work. let's go π«Ά
πΈ 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 π
so these functions? they're your little crew for getting at the data in the payload that io_uring_prep_recvmsg_multishot(3) handed you. no cap, that's the whole vibe.
msgh should point to the struct msghdr you submitted with the request. like, the same one. don't be out here pointing it at some random other msghdr, okay? π
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's valid, returning a pointer to it or else NULL. so like, it's either a yes or a NULL, and if it's NULL, bestie, do not dereference it π
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) */
};
and now the squad, one by one π
io_uring_recvmsg_name(3)returns a pointer to the name in the buffer. iconic.io_uring_recvmsg_cmsg_firsthdr(3)returns a pointer to the first cmsg in the buffer, orNULL. so check it, fr fr.io_uring_recvmsg_cmsg_nexthdr(3)returns a pointer to the next cmsg in the buffer, orNULL. keep looping, bestie, the way that you just keep calling it until it'sNULLβ¦ obsessed.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. the actual amount you get to use, periodt β¨
π¦ SEE ALSO π¦
io_uring_prep_recvmsg_multishot(3) β go read that one too, it's the origin story π
and that's the whole page, bestie!! π this was liburing-2.2, dated July 26, 2022 β you're so welcome, now go slay those cmsgs π β¨π¦πΈπ«Ά
π¦ where this page comes from
- alpine 3.22: liburing-doc 2.9-r0 Β· LGPL-2.1-or-later OR MIT
- alpine 3.23: liburing-doc 2.12-r0 Β· LGPL-2.1-or-later OR MIT
- alpine 3.24: liburing-doc 2.14-r0 Β· LGPL-2.1-or-later OR MIT
- arch rolling: liburing 2.15-1 Β· GPL-2.0-only WITH Linux-syscall-note OR MIT AND LGPL-2.0-or-later AND MIT
- centos-stream 10: liburing-devel 2.12-1.el10 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- centos-stream 9: liburing-devel 2.12-1.el9 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- centos-stream 9: liburing-devel 2.12-1.el9 Β· (GPLv2 with exceptions and LGPLv2+) or MIT
- debian trixie: liburing-dev 2.9-1
- fedora 43: liburing-devel 2.9-2.fc43 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 43: liburing-devel 2.9-2.fc43 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 44: liburing-devel 2.13-2.fc44 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- fedora 44: liburing-devel 2.13-2.fc44 Β· (GPL-2.0-only WITH Linux-syscall-note OR MIT) AND (LGPL-2.0-or-later OR MIT)
- nixpkgs unstable: liburing 2.14
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- opensuse-leap 16.0: liburing-devel 2.8-160000.3.1 Β· (GPL-2.0-only AND LGPL-2.1-or-later) OR MIT
- ubuntu noble: liburing-dev 2.5-1build1
- ubuntu questing: liburing-dev 2.11-1
- ubuntu resolute: liburing-dev 2.14-1
- ubuntu stonking: liburing-dev 2.15-1
- π the page's license: LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms