File: io_uring_recvmsg_out.3

package info (click to toggle)
liburing 2.13-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,212 kB
  • sloc: ansic: 58,515; sh: 816; makefile: 598; cpp: 32
file content (82 lines) | stat: -rw-r--r-- 2,855 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.\" Copyright (C), 2022  Dylan Yudaken <dylany@fb.com>
.\"
.\" SPDX-License-Identifier: LGPL-2.0-or-later
.\"
.TH io_uring_recvmsg_out 3 "July 26, 2022" "liburing-2.2" "liburing Manual"
.SH NAME
io_uring_recvmsg_out - access data from multishot recvmsg
.SH SYNOPSIS
.nf
.B #include <liburing.h>
.PP
.BI "struct io_uring_recvmsg_out *io_uring_recvmsg_validate(void *" buf ","
.BI "                                                       int " buf_len ","
.BI "                                                       struct msghdr *" msgh ");"
.PP
.BI "void *io_uring_recvmsg_name(struct io_uring_recvmsg_out *" o ");"
.PP
.BI "struct cmsghdr *io_uring_recvmsg_cmsg_firsthdr(struct io_uring_recvmsg_out *" o ","
.BI "                                               struct msghdr *" msgh ");"
.BI "struct cmsghdr *io_uring_recvmsg_cmsg_nexthdr(struct io_uring_recvmsg_out *" o ","
.BI "                                              struct msghdr *" msgh ","
.BI "                                              struct cmsghdr *" cmsg ");"
.PP
.BI "void *io_uring_recvmsg_payload(struct io_uring_recvmsg_out *" o ","
.BI "                               struct msghdr *" msgh ");"
.BI "unsigned int io_uring_recvmsg_payload_length(struct io_uring_recvmsg_out *" o ","
.BI "                                             int " buf_len ","
.BI "                                             struct msghdr *" msgh ");"
.PP
.fi

.SH DESCRIPTION

These functions are used to access data in the payload delivered by
.BR io_uring_prep_recvmsg_multishot (3).
.PP
.I msgh
should point to the
.I struct msghdr
submitted with the request.
.PP
.BR io_uring_recvmsg_validate (3)
will validate a buffer delivered by
.BR io_uring_prep_recvmsg_multishot (3)
and extract the
.I io_uring_recvmsg_out
if it is valid, returning a pointer to it or else NULL.
.PP
The structure is defined as follows:
.PP
.in +4n
.EX

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) */
};

.IP * 3
.BR io_uring_recvmsg_name (3)
returns a pointer to the name in the buffer.
.IP *
.BR io_uring_recvmsg_cmsg_firsthdr (3)
returns a pointer to the first cmsg in the buffer, or NULL.
.IP *
.BR io_uring_recvmsg_cmsg_nexthdr (3)
returns a pointer to the next cmsg in the buffer, or NULL.
.IP *
.BR io_uring_recvmsg_payload (3)
returns a pointer to the payload in the buffer.
.IP *
.BR io_uring_recvmsg_payload_length (3)
Calculates the usable payload length in bytes.


.SH "SEE ALSO"
.BR io_uring_prep_recvmsg_multishot (3)