1io_uring_prep_cmd(3) liburing Manual io_uring_prep_cmd(3)
2
3
4
6 io_uring_prep_cmd_sock - prepare a command request for a socket
7
9 #include <liburing.h>
10
11 void io_uring_prep_cmd_sock(struct io_uring_sqe *sqe,
12 int cmd_op,
13 int fd,
14 int level,
15 int optname,
16 void *optval,
17 int optlen);
18
20 The io_uring_prep_cmd_sock(3) function prepares an cmd request for a
21 socket. The submission queue entry sqe is setup to use the socket file
22 descriptor pointed to by fd to start an command operation defined by
23 cmd_op.
24
25 This is a generic function, and each command has their own individual
26 level, optname, optval values. The optlen defines the size pointed by
27 optval.
28
29
31 SOCKET_URING_OP_SIOCINQ
32 Returns the amount of queued unread data in the receive buffer.
33 The socket must not be in LISTEN state, otherwise an error -EIN‐
34 VAL is returned in the CQE res field. The following arguments
35 are not used for this command level, optname, optval and optlen.
36
37 Negative return value means an error.
38
39 For more information about this command, please check unix(7).
40
41
42
43 SIOCOUTQ
44 Returns the amount of unsent data in the socket send queue. The
45 socket must not be in LISTEN state, otherwise an error -EINVAL
46 is returned in the CQE res. field. The following arguments are
47 not used for this command level, optname, optval and optlen.
48
49 Negative return value means an error.
50
51 For more information about this command, please check unix(7).
52
53
55 The memory block pointed by optval needs to be valid/live until the CQE
56 returns.
57
58
60 Dependent on the command.
61
62
64 The CQE res field will contain the result of the operation.
65
67 io_uring_get_sqe(3), io_uring_submit(3), io_uring_register(2), unix(7)
68
69
70
71liburing-2.5 July 27, 2023 io_uring_prep_cmd(3)