Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
google
GitHub Repository: google/crosvm
Path: blob/main/io_uring/src/bindings.rs
5392 views
1
/* automatically generated by tools/bindgen-all-the-things */
2
3
#![allow(clippy::missing_safety_doc)]
4
#![allow(clippy::ptr_offset_with_cast)] // https://github.com/rust-lang/rust-bindgen/issues/3053
5
#![allow(clippy::undocumented_unsafe_blocks)]
6
#![allow(clippy::upper_case_acronyms)]
7
#![allow(non_upper_case_globals)]
8
#![allow(non_camel_case_types)]
9
#![allow(non_snake_case)]
10
#![allow(dead_code)]
11
12
#[repr(C)]
13
#[derive(Default)]
14
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
15
impl<T> __IncompleteArrayField<T> {
16
#[inline]
17
pub const fn new() -> Self {
18
__IncompleteArrayField(::std::marker::PhantomData, [])
19
}
20
#[inline]
21
pub fn as_ptr(&self) -> *const T {
22
self as *const _ as *const T
23
}
24
#[inline]
25
pub fn as_mut_ptr(&mut self) -> *mut T {
26
self as *mut _ as *mut T
27
}
28
#[inline]
29
pub unsafe fn as_slice(&self, len: usize) -> &[T] {
30
::std::slice::from_raw_parts(self.as_ptr(), len)
31
}
32
#[inline]
33
pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
34
::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
35
}
36
}
37
impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
38
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
39
fmt.write_str("__IncompleteArrayField")
40
}
41
}
42
#[repr(C)]
43
pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
44
impl<T> __BindgenUnionField<T> {
45
#[inline]
46
pub const fn new() -> Self {
47
__BindgenUnionField(::std::marker::PhantomData)
48
}
49
#[inline]
50
pub unsafe fn as_ref(&self) -> &T {
51
::std::mem::transmute(self)
52
}
53
#[inline]
54
pub unsafe fn as_mut(&mut self) -> &mut T {
55
::std::mem::transmute(self)
56
}
57
}
58
impl<T> ::std::default::Default for __BindgenUnionField<T> {
59
#[inline]
60
fn default() -> Self {
61
Self::new()
62
}
63
}
64
impl<T> ::std::clone::Clone for __BindgenUnionField<T> {
65
#[inline]
66
fn clone(&self) -> Self {
67
*self
68
}
69
}
70
impl<T> ::std::marker::Copy for __BindgenUnionField<T> {}
71
impl<T> ::std::fmt::Debug for __BindgenUnionField<T> {
72
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
73
fmt.write_str("__BindgenUnionField")
74
}
75
}
76
impl<T> ::std::hash::Hash for __BindgenUnionField<T> {
77
fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) {}
78
}
79
impl<T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
80
fn eq(&self, _other: &__BindgenUnionField<T>) -> bool {
81
true
82
}
83
}
84
impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {}
85
pub const IORING_FILE_INDEX_ALLOC: i32 = -1;
86
pub const IORING_SETUP_IOPOLL: u32 = 1;
87
pub const IORING_SETUP_SQPOLL: u32 = 2;
88
pub const IORING_SETUP_SQ_AFF: u32 = 4;
89
pub const IORING_SETUP_CQSIZE: u32 = 8;
90
pub const IORING_SETUP_CLAMP: u32 = 16;
91
pub const IORING_SETUP_ATTACH_WQ: u32 = 32;
92
pub const IORING_SETUP_R_DISABLED: u32 = 64;
93
pub const IORING_SETUP_SUBMIT_ALL: u32 = 128;
94
pub const IORING_SETUP_COOP_TASKRUN: u32 = 256;
95
pub const IORING_SETUP_TASKRUN_FLAG: u32 = 512;
96
pub const IORING_SETUP_SQE128: u32 = 1024;
97
pub const IORING_SETUP_CQE32: u32 = 2048;
98
pub const IORING_SETUP_SINGLE_ISSUER: u32 = 4096;
99
pub const IORING_SETUP_DEFER_TASKRUN: u32 = 8192;
100
pub const IORING_SETUP_NO_MMAP: u32 = 16384;
101
pub const IORING_SETUP_REGISTERED_FD_ONLY: u32 = 32768;
102
pub const IORING_SETUP_NO_SQARRAY: u32 = 65536;
103
pub const IORING_URING_CMD_FIXED: u32 = 1;
104
pub const IORING_URING_CMD_MASK: u32 = 1;
105
pub const IORING_FSYNC_DATASYNC: u32 = 1;
106
pub const IORING_TIMEOUT_ABS: u32 = 1;
107
pub const IORING_TIMEOUT_UPDATE: u32 = 2;
108
pub const IORING_TIMEOUT_BOOTTIME: u32 = 4;
109
pub const IORING_TIMEOUT_REALTIME: u32 = 8;
110
pub const IORING_LINK_TIMEOUT_UPDATE: u32 = 16;
111
pub const IORING_TIMEOUT_ETIME_SUCCESS: u32 = 32;
112
pub const IORING_TIMEOUT_MULTISHOT: u32 = 64;
113
pub const IORING_TIMEOUT_CLOCK_MASK: u32 = 12;
114
pub const IORING_TIMEOUT_UPDATE_MASK: u32 = 18;
115
pub const IORING_POLL_ADD_MULTI: u32 = 1;
116
pub const IORING_POLL_UPDATE_EVENTS: u32 = 2;
117
pub const IORING_POLL_UPDATE_USER_DATA: u32 = 4;
118
pub const IORING_POLL_ADD_LEVEL: u32 = 8;
119
pub const IORING_ASYNC_CANCEL_ALL: u32 = 1;
120
pub const IORING_ASYNC_CANCEL_FD: u32 = 2;
121
pub const IORING_ASYNC_CANCEL_ANY: u32 = 4;
122
pub const IORING_ASYNC_CANCEL_FD_FIXED: u32 = 8;
123
pub const IORING_ASYNC_CANCEL_USERDATA: u32 = 16;
124
pub const IORING_ASYNC_CANCEL_OP: u32 = 32;
125
pub const IORING_RECVSEND_POLL_FIRST: u32 = 1;
126
pub const IORING_RECV_MULTISHOT: u32 = 2;
127
pub const IORING_RECVSEND_FIXED_BUF: u32 = 4;
128
pub const IORING_SEND_ZC_REPORT_USAGE: u32 = 8;
129
pub const IORING_RECVSEND_BUNDLE: u32 = 16;
130
pub const IORING_NOTIF_USAGE_ZC_COPIED: u32 = 2147483648;
131
pub const IORING_ACCEPT_MULTISHOT: u32 = 1;
132
pub const IORING_ACCEPT_DONTWAIT: u32 = 2;
133
pub const IORING_ACCEPT_POLL_FIRST: u32 = 4;
134
pub const IORING_MSG_RING_CQE_SKIP: u32 = 1;
135
pub const IORING_MSG_RING_FLAGS_PASS: u32 = 2;
136
pub const IORING_FIXED_FD_NO_CLOEXEC: u32 = 1;
137
pub const IORING_NOP_INJECT_RESULT: u32 = 1;
138
pub const IORING_CQE_F_BUFFER: u32 = 1;
139
pub const IORING_CQE_F_MORE: u32 = 2;
140
pub const IORING_CQE_F_SOCK_NONEMPTY: u32 = 4;
141
pub const IORING_CQE_F_NOTIF: u32 = 8;
142
pub const IORING_CQE_F_BUF_MORE: u32 = 16;
143
pub const IORING_CQE_BUFFER_SHIFT: u32 = 16;
144
pub const IORING_OFF_SQ_RING: u32 = 0;
145
pub const IORING_OFF_CQ_RING: u32 = 134217728;
146
pub const IORING_OFF_SQES: u32 = 268435456;
147
pub const IORING_OFF_PBUF_RING: u32 = 2147483648;
148
pub const IORING_OFF_PBUF_SHIFT: u32 = 16;
149
pub const IORING_OFF_MMAP_MASK: u32 = 4160749568;
150
pub const IORING_SQ_NEED_WAKEUP: u32 = 1;
151
pub const IORING_SQ_CQ_OVERFLOW: u32 = 2;
152
pub const IORING_SQ_TASKRUN: u32 = 4;
153
pub const IORING_CQ_EVENTFD_DISABLED: u32 = 1;
154
pub const IORING_ENTER_GETEVENTS: u32 = 1;
155
pub const IORING_ENTER_SQ_WAKEUP: u32 = 2;
156
pub const IORING_ENTER_SQ_WAIT: u32 = 4;
157
pub const IORING_ENTER_EXT_ARG: u32 = 8;
158
pub const IORING_ENTER_REGISTERED_RING: u32 = 16;
159
pub const IORING_ENTER_ABS_TIMER: u32 = 32;
160
pub const IORING_FEAT_SINGLE_MMAP: u32 = 1;
161
pub const IORING_FEAT_NODROP: u32 = 2;
162
pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4;
163
pub const IORING_FEAT_RW_CUR_POS: u32 = 8;
164
pub const IORING_FEAT_CUR_PERSONALITY: u32 = 16;
165
pub const IORING_FEAT_FAST_POLL: u32 = 32;
166
pub const IORING_FEAT_POLL_32BITS: u32 = 64;
167
pub const IORING_FEAT_SQPOLL_NONFIXED: u32 = 128;
168
pub const IORING_FEAT_EXT_ARG: u32 = 256;
169
pub const IORING_FEAT_NATIVE_WORKERS: u32 = 512;
170
pub const IORING_FEAT_RSRC_TAGS: u32 = 1024;
171
pub const IORING_FEAT_CQE_SKIP: u32 = 2048;
172
pub const IORING_FEAT_LINKED_FILE: u32 = 4096;
173
pub const IORING_FEAT_REG_REG_RING: u32 = 8192;
174
pub const IORING_FEAT_RECVSEND_BUNDLE: u32 = 16384;
175
pub const IORING_FEAT_MIN_TIMEOUT: u32 = 32768;
176
pub const IORING_RSRC_REGISTER_SPARSE: u32 = 1;
177
pub const IORING_REGISTER_FILES_SKIP: i32 = -2;
178
pub const IO_URING_OP_SUPPORTED: u32 = 1;
179
pub type __kernel_time64_t = ::std::os::raw::c_longlong;
180
pub type __kernel_rwf_t = ::std::os::raw::c_int;
181
#[repr(C)]
182
#[derive(Debug, Default, Copy, Clone)]
183
pub struct __kernel_timespec {
184
pub tv_sec: __kernel_time64_t,
185
pub tv_nsec: ::std::os::raw::c_longlong,
186
}
187
#[repr(C)]
188
pub struct io_uring_sqe {
189
pub opcode: u8,
190
pub flags: u8,
191
pub ioprio: u16,
192
pub fd: i32,
193
pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_1,
194
pub __bindgen_anon_2: io_uring_sqe__bindgen_ty_2,
195
pub len: u32,
196
pub __bindgen_anon_3: io_uring_sqe__bindgen_ty_3,
197
pub user_data: u64,
198
pub __bindgen_anon_4: io_uring_sqe__bindgen_ty_4,
199
pub personality: u16,
200
pub __bindgen_anon_5: io_uring_sqe__bindgen_ty_5,
201
pub __bindgen_anon_6: io_uring_sqe__bindgen_ty_6,
202
}
203
#[repr(C)]
204
#[derive(Copy, Clone)]
205
pub union io_uring_sqe__bindgen_ty_1 {
206
pub off: u64,
207
pub addr2: u64,
208
pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_1__bindgen_ty_1,
209
}
210
#[repr(C)]
211
#[derive(Debug, Default, Copy, Clone)]
212
pub struct io_uring_sqe__bindgen_ty_1__bindgen_ty_1 {
213
pub cmd_op: u32,
214
pub __pad1: u32,
215
}
216
impl Default for io_uring_sqe__bindgen_ty_1 {
217
fn default() -> Self {
218
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
219
unsafe {
220
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
221
s.assume_init()
222
}
223
}
224
}
225
#[repr(C)]
226
#[derive(Copy, Clone)]
227
pub union io_uring_sqe__bindgen_ty_2 {
228
pub addr: u64,
229
pub splice_off_in: u64,
230
pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_2__bindgen_ty_1,
231
}
232
#[repr(C)]
233
#[derive(Debug, Default, Copy, Clone)]
234
pub struct io_uring_sqe__bindgen_ty_2__bindgen_ty_1 {
235
pub level: u32,
236
pub optname: u32,
237
}
238
impl Default for io_uring_sqe__bindgen_ty_2 {
239
fn default() -> Self {
240
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
241
unsafe {
242
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
243
s.assume_init()
244
}
245
}
246
}
247
#[repr(C)]
248
#[derive(Copy, Clone)]
249
pub union io_uring_sqe__bindgen_ty_3 {
250
pub rw_flags: __kernel_rwf_t,
251
pub fsync_flags: u32,
252
pub poll_events: u16,
253
pub poll32_events: u32,
254
pub sync_range_flags: u32,
255
pub msg_flags: u32,
256
pub timeout_flags: u32,
257
pub accept_flags: u32,
258
pub cancel_flags: u32,
259
pub open_flags: u32,
260
pub statx_flags: u32,
261
pub fadvise_advice: u32,
262
pub splice_flags: u32,
263
pub rename_flags: u32,
264
pub unlink_flags: u32,
265
pub hardlink_flags: u32,
266
pub xattr_flags: u32,
267
pub msg_ring_flags: u32,
268
pub uring_cmd_flags: u32,
269
pub waitid_flags: u32,
270
pub futex_flags: u32,
271
pub install_fd_flags: u32,
272
pub nop_flags: u32,
273
}
274
impl Default for io_uring_sqe__bindgen_ty_3 {
275
fn default() -> Self {
276
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
277
unsafe {
278
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
279
s.assume_init()
280
}
281
}
282
}
283
#[repr(C, packed)]
284
#[derive(Copy, Clone)]
285
pub union io_uring_sqe__bindgen_ty_4 {
286
pub buf_index: u16,
287
pub buf_group: u16,
288
}
289
impl Default for io_uring_sqe__bindgen_ty_4 {
290
fn default() -> Self {
291
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
292
unsafe {
293
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
294
s.assume_init()
295
}
296
}
297
}
298
#[repr(C)]
299
#[derive(Copy, Clone)]
300
pub union io_uring_sqe__bindgen_ty_5 {
301
pub splice_fd_in: i32,
302
pub file_index: u32,
303
pub optlen: u32,
304
pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_5__bindgen_ty_1,
305
}
306
#[repr(C)]
307
#[derive(Debug, Default, Copy, Clone)]
308
pub struct io_uring_sqe__bindgen_ty_5__bindgen_ty_1 {
309
pub addr_len: u16,
310
pub __pad3: [u16; 1usize],
311
}
312
impl Default for io_uring_sqe__bindgen_ty_5 {
313
fn default() -> Self {
314
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
315
unsafe {
316
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
317
s.assume_init()
318
}
319
}
320
}
321
#[repr(C)]
322
pub struct io_uring_sqe__bindgen_ty_6 {
323
pub __bindgen_anon_1: __BindgenUnionField<io_uring_sqe__bindgen_ty_6__bindgen_ty_1>,
324
pub optval: __BindgenUnionField<u64>,
325
pub cmd: __BindgenUnionField<[u8; 0usize]>,
326
pub bindgen_union_field: [u64; 2usize],
327
}
328
#[repr(C)]
329
#[derive(Debug, Default, Copy, Clone)]
330
pub struct io_uring_sqe__bindgen_ty_6__bindgen_ty_1 {
331
pub addr3: u64,
332
pub __pad2: [u64; 1usize],
333
}
334
impl Default for io_uring_sqe__bindgen_ty_6 {
335
fn default() -> Self {
336
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
337
unsafe {
338
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
339
s.assume_init()
340
}
341
}
342
}
343
impl Default for io_uring_sqe {
344
fn default() -> Self {
345
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
346
unsafe {
347
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
348
s.assume_init()
349
}
350
}
351
}
352
pub const io_uring_sqe_flags_bit_IOSQE_FIXED_FILE_BIT: io_uring_sqe_flags_bit = 0;
353
pub const io_uring_sqe_flags_bit_IOSQE_IO_DRAIN_BIT: io_uring_sqe_flags_bit = 1;
354
pub const io_uring_sqe_flags_bit_IOSQE_IO_LINK_BIT: io_uring_sqe_flags_bit = 2;
355
pub const io_uring_sqe_flags_bit_IOSQE_IO_HARDLINK_BIT: io_uring_sqe_flags_bit = 3;
356
pub const io_uring_sqe_flags_bit_IOSQE_ASYNC_BIT: io_uring_sqe_flags_bit = 4;
357
pub const io_uring_sqe_flags_bit_IOSQE_BUFFER_SELECT_BIT: io_uring_sqe_flags_bit = 5;
358
pub const io_uring_sqe_flags_bit_IOSQE_CQE_SKIP_SUCCESS_BIT: io_uring_sqe_flags_bit = 6;
359
pub type io_uring_sqe_flags_bit = ::std::os::raw::c_uint;
360
pub const io_uring_op_IORING_OP_NOP: io_uring_op = 0;
361
pub const io_uring_op_IORING_OP_READV: io_uring_op = 1;
362
pub const io_uring_op_IORING_OP_WRITEV: io_uring_op = 2;
363
pub const io_uring_op_IORING_OP_FSYNC: io_uring_op = 3;
364
pub const io_uring_op_IORING_OP_READ_FIXED: io_uring_op = 4;
365
pub const io_uring_op_IORING_OP_WRITE_FIXED: io_uring_op = 5;
366
pub const io_uring_op_IORING_OP_POLL_ADD: io_uring_op = 6;
367
pub const io_uring_op_IORING_OP_POLL_REMOVE: io_uring_op = 7;
368
pub const io_uring_op_IORING_OP_SYNC_FILE_RANGE: io_uring_op = 8;
369
pub const io_uring_op_IORING_OP_SENDMSG: io_uring_op = 9;
370
pub const io_uring_op_IORING_OP_RECVMSG: io_uring_op = 10;
371
pub const io_uring_op_IORING_OP_TIMEOUT: io_uring_op = 11;
372
pub const io_uring_op_IORING_OP_TIMEOUT_REMOVE: io_uring_op = 12;
373
pub const io_uring_op_IORING_OP_ACCEPT: io_uring_op = 13;
374
pub const io_uring_op_IORING_OP_ASYNC_CANCEL: io_uring_op = 14;
375
pub const io_uring_op_IORING_OP_LINK_TIMEOUT: io_uring_op = 15;
376
pub const io_uring_op_IORING_OP_CONNECT: io_uring_op = 16;
377
pub const io_uring_op_IORING_OP_FALLOCATE: io_uring_op = 17;
378
pub const io_uring_op_IORING_OP_OPENAT: io_uring_op = 18;
379
pub const io_uring_op_IORING_OP_CLOSE: io_uring_op = 19;
380
pub const io_uring_op_IORING_OP_FILES_UPDATE: io_uring_op = 20;
381
pub const io_uring_op_IORING_OP_STATX: io_uring_op = 21;
382
pub const io_uring_op_IORING_OP_READ: io_uring_op = 22;
383
pub const io_uring_op_IORING_OP_WRITE: io_uring_op = 23;
384
pub const io_uring_op_IORING_OP_FADVISE: io_uring_op = 24;
385
pub const io_uring_op_IORING_OP_MADVISE: io_uring_op = 25;
386
pub const io_uring_op_IORING_OP_SEND: io_uring_op = 26;
387
pub const io_uring_op_IORING_OP_RECV: io_uring_op = 27;
388
pub const io_uring_op_IORING_OP_OPENAT2: io_uring_op = 28;
389
pub const io_uring_op_IORING_OP_EPOLL_CTL: io_uring_op = 29;
390
pub const io_uring_op_IORING_OP_SPLICE: io_uring_op = 30;
391
pub const io_uring_op_IORING_OP_PROVIDE_BUFFERS: io_uring_op = 31;
392
pub const io_uring_op_IORING_OP_REMOVE_BUFFERS: io_uring_op = 32;
393
pub const io_uring_op_IORING_OP_TEE: io_uring_op = 33;
394
pub const io_uring_op_IORING_OP_SHUTDOWN: io_uring_op = 34;
395
pub const io_uring_op_IORING_OP_RENAMEAT: io_uring_op = 35;
396
pub const io_uring_op_IORING_OP_UNLINKAT: io_uring_op = 36;
397
pub const io_uring_op_IORING_OP_MKDIRAT: io_uring_op = 37;
398
pub const io_uring_op_IORING_OP_SYMLINKAT: io_uring_op = 38;
399
pub const io_uring_op_IORING_OP_LINKAT: io_uring_op = 39;
400
pub const io_uring_op_IORING_OP_MSG_RING: io_uring_op = 40;
401
pub const io_uring_op_IORING_OP_FSETXATTR: io_uring_op = 41;
402
pub const io_uring_op_IORING_OP_SETXATTR: io_uring_op = 42;
403
pub const io_uring_op_IORING_OP_FGETXATTR: io_uring_op = 43;
404
pub const io_uring_op_IORING_OP_GETXATTR: io_uring_op = 44;
405
pub const io_uring_op_IORING_OP_SOCKET: io_uring_op = 45;
406
pub const io_uring_op_IORING_OP_URING_CMD: io_uring_op = 46;
407
pub const io_uring_op_IORING_OP_SEND_ZC: io_uring_op = 47;
408
pub const io_uring_op_IORING_OP_SENDMSG_ZC: io_uring_op = 48;
409
pub const io_uring_op_IORING_OP_READ_MULTISHOT: io_uring_op = 49;
410
pub const io_uring_op_IORING_OP_WAITID: io_uring_op = 50;
411
pub const io_uring_op_IORING_OP_FUTEX_WAIT: io_uring_op = 51;
412
pub const io_uring_op_IORING_OP_FUTEX_WAKE: io_uring_op = 52;
413
pub const io_uring_op_IORING_OP_FUTEX_WAITV: io_uring_op = 53;
414
pub const io_uring_op_IORING_OP_FIXED_FD_INSTALL: io_uring_op = 54;
415
pub const io_uring_op_IORING_OP_FTRUNCATE: io_uring_op = 55;
416
pub const io_uring_op_IORING_OP_BIND: io_uring_op = 56;
417
pub const io_uring_op_IORING_OP_LISTEN: io_uring_op = 57;
418
pub const io_uring_op_IORING_OP_LAST: io_uring_op = 58;
419
pub type io_uring_op = ::std::os::raw::c_uint;
420
pub const io_uring_msg_ring_flags_IORING_MSG_DATA: io_uring_msg_ring_flags = 0;
421
pub const io_uring_msg_ring_flags_IORING_MSG_SEND_FD: io_uring_msg_ring_flags = 1;
422
pub type io_uring_msg_ring_flags = ::std::os::raw::c_uint;
423
#[repr(C)]
424
#[derive(Debug, Default)]
425
pub struct io_uring_cqe {
426
pub user_data: u64,
427
pub res: i32,
428
pub flags: u32,
429
pub big_cqe: __IncompleteArrayField<u64>,
430
}
431
#[repr(C)]
432
#[derive(Debug, Default, Copy, Clone)]
433
pub struct io_sqring_offsets {
434
pub head: u32,
435
pub tail: u32,
436
pub ring_mask: u32,
437
pub ring_entries: u32,
438
pub flags: u32,
439
pub dropped: u32,
440
pub array: u32,
441
pub resv1: u32,
442
pub user_addr: u64,
443
}
444
#[repr(C)]
445
#[derive(Debug, Default, Copy, Clone)]
446
pub struct io_cqring_offsets {
447
pub head: u32,
448
pub tail: u32,
449
pub ring_mask: u32,
450
pub ring_entries: u32,
451
pub overflow: u32,
452
pub cqes: u32,
453
pub flags: u32,
454
pub resv1: u32,
455
pub user_addr: u64,
456
}
457
#[repr(C)]
458
#[derive(Debug, Default, Copy, Clone)]
459
pub struct io_uring_params {
460
pub sq_entries: u32,
461
pub cq_entries: u32,
462
pub flags: u32,
463
pub sq_thread_cpu: u32,
464
pub sq_thread_idle: u32,
465
pub features: u32,
466
pub wq_fd: u32,
467
pub resv: [u32; 3usize],
468
pub sq_off: io_sqring_offsets,
469
pub cq_off: io_cqring_offsets,
470
}
471
pub const io_uring_register_op_IORING_REGISTER_BUFFERS: io_uring_register_op = 0;
472
pub const io_uring_register_op_IORING_UNREGISTER_BUFFERS: io_uring_register_op = 1;
473
pub const io_uring_register_op_IORING_REGISTER_FILES: io_uring_register_op = 2;
474
pub const io_uring_register_op_IORING_UNREGISTER_FILES: io_uring_register_op = 3;
475
pub const io_uring_register_op_IORING_REGISTER_EVENTFD: io_uring_register_op = 4;
476
pub const io_uring_register_op_IORING_UNREGISTER_EVENTFD: io_uring_register_op = 5;
477
pub const io_uring_register_op_IORING_REGISTER_FILES_UPDATE: io_uring_register_op = 6;
478
pub const io_uring_register_op_IORING_REGISTER_EVENTFD_ASYNC: io_uring_register_op = 7;
479
pub const io_uring_register_op_IORING_REGISTER_PROBE: io_uring_register_op = 8;
480
pub const io_uring_register_op_IORING_REGISTER_PERSONALITY: io_uring_register_op = 9;
481
pub const io_uring_register_op_IORING_UNREGISTER_PERSONALITY: io_uring_register_op = 10;
482
pub const io_uring_register_op_IORING_REGISTER_RESTRICTIONS: io_uring_register_op = 11;
483
pub const io_uring_register_op_IORING_REGISTER_ENABLE_RINGS: io_uring_register_op = 12;
484
pub const io_uring_register_op_IORING_REGISTER_FILES2: io_uring_register_op = 13;
485
pub const io_uring_register_op_IORING_REGISTER_FILES_UPDATE2: io_uring_register_op = 14;
486
pub const io_uring_register_op_IORING_REGISTER_BUFFERS2: io_uring_register_op = 15;
487
pub const io_uring_register_op_IORING_REGISTER_BUFFERS_UPDATE: io_uring_register_op = 16;
488
pub const io_uring_register_op_IORING_REGISTER_IOWQ_AFF: io_uring_register_op = 17;
489
pub const io_uring_register_op_IORING_UNREGISTER_IOWQ_AFF: io_uring_register_op = 18;
490
pub const io_uring_register_op_IORING_REGISTER_IOWQ_MAX_WORKERS: io_uring_register_op = 19;
491
pub const io_uring_register_op_IORING_REGISTER_RING_FDS: io_uring_register_op = 20;
492
pub const io_uring_register_op_IORING_UNREGISTER_RING_FDS: io_uring_register_op = 21;
493
pub const io_uring_register_op_IORING_REGISTER_PBUF_RING: io_uring_register_op = 22;
494
pub const io_uring_register_op_IORING_UNREGISTER_PBUF_RING: io_uring_register_op = 23;
495
pub const io_uring_register_op_IORING_REGISTER_SYNC_CANCEL: io_uring_register_op = 24;
496
pub const io_uring_register_op_IORING_REGISTER_FILE_ALLOC_RANGE: io_uring_register_op = 25;
497
pub const io_uring_register_op_IORING_REGISTER_PBUF_STATUS: io_uring_register_op = 26;
498
pub const io_uring_register_op_IORING_REGISTER_NAPI: io_uring_register_op = 27;
499
pub const io_uring_register_op_IORING_UNREGISTER_NAPI: io_uring_register_op = 28;
500
pub const io_uring_register_op_IORING_REGISTER_CLOCK: io_uring_register_op = 29;
501
pub const io_uring_register_op_IORING_REGISTER_CLONE_BUFFERS: io_uring_register_op = 30;
502
pub const io_uring_register_op_IORING_REGISTER_LAST: io_uring_register_op = 31;
503
pub const io_uring_register_op_IORING_REGISTER_USE_REGISTERED_RING: io_uring_register_op =
504
2147483648;
505
pub type io_uring_register_op = ::std::os::raw::c_uint;
506
#[repr(C)]
507
#[derive(Debug, Default, Copy, Clone)]
508
pub struct io_uring_files_update {
509
pub offset: u32,
510
pub resv: u32,
511
pub fds: u64,
512
}
513
#[repr(C)]
514
#[derive(Debug, Default, Copy, Clone)]
515
pub struct io_uring_rsrc_register {
516
pub nr: u32,
517
pub flags: u32,
518
pub resv2: u64,
519
pub data: u64,
520
pub tags: u64,
521
}
522
#[repr(C)]
523
#[derive(Debug, Default, Copy, Clone)]
524
pub struct io_uring_rsrc_update {
525
pub offset: u32,
526
pub resv: u32,
527
pub data: u64,
528
}
529
#[repr(C)]
530
#[derive(Debug, Default, Copy, Clone)]
531
pub struct io_uring_rsrc_update2 {
532
pub offset: u32,
533
pub resv: u32,
534
pub data: u64,
535
pub tags: u64,
536
pub nr: u32,
537
pub resv2: u32,
538
}
539
#[repr(C)]
540
#[derive(Debug, Default, Copy, Clone)]
541
pub struct io_uring_probe_op {
542
pub op: u8,
543
pub resv: u8,
544
pub flags: u16,
545
pub resv2: u32,
546
}
547
#[repr(C)]
548
#[derive(Debug, Default)]
549
pub struct io_uring_probe {
550
pub last_op: u8,
551
pub ops_len: u8,
552
pub resv: u16,
553
pub resv2: [u32; 3usize],
554
pub ops: __IncompleteArrayField<io_uring_probe_op>,
555
}
556
#[repr(C)]
557
#[derive(Copy, Clone)]
558
pub struct io_uring_restriction {
559
pub opcode: u16,
560
pub __bindgen_anon_1: io_uring_restriction__bindgen_ty_1,
561
pub resv: u8,
562
pub resv2: [u32; 3usize],
563
}
564
#[repr(C)]
565
#[derive(Copy, Clone)]
566
pub union io_uring_restriction__bindgen_ty_1 {
567
pub register_op: u8,
568
pub sqe_op: u8,
569
pub sqe_flags: u8,
570
}
571
impl Default for io_uring_restriction__bindgen_ty_1 {
572
fn default() -> Self {
573
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
574
unsafe {
575
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
576
s.assume_init()
577
}
578
}
579
}
580
impl Default for io_uring_restriction {
581
fn default() -> Self {
582
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
583
unsafe {
584
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
585
s.assume_init()
586
}
587
}
588
}
589
#[repr(C)]
590
#[derive(Debug, Default, Copy, Clone)]
591
pub struct io_uring_clock_register {
592
pub clockid: u32,
593
pub __resv: [u32; 3usize],
594
}
595
pub const IORING_REGISTER_SRC_REGISTERED: _bindgen_ty_1 = 1;
596
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
597
#[repr(C)]
598
#[derive(Debug, Default, Copy, Clone)]
599
pub struct io_uring_clone_buffers {
600
pub src_fd: u32,
601
pub flags: u32,
602
pub pad: [u32; 6usize],
603
}
604
#[repr(C)]
605
#[derive(Debug, Default, Copy, Clone)]
606
pub struct io_uring_buf {
607
pub addr: u64,
608
pub len: u32,
609
pub bid: u16,
610
pub resv: u16,
611
}
612
#[repr(C)]
613
pub struct io_uring_buf_ring {
614
pub __bindgen_anon_1: io_uring_buf_ring__bindgen_ty_1,
615
}
616
#[repr(C)]
617
pub struct io_uring_buf_ring__bindgen_ty_1 {
618
pub __bindgen_anon_1: __BindgenUnionField<io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1>,
619
pub __bindgen_anon_2: __BindgenUnionField<io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2>,
620
pub bindgen_union_field: [u64; 2usize],
621
}
622
#[repr(C)]
623
#[derive(Debug, Default, Copy, Clone)]
624
pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_1 {
625
pub resv1: u64,
626
pub resv2: u32,
627
pub resv3: u16,
628
pub tail: u16,
629
}
630
#[repr(C)]
631
#[derive(Debug, Default)]
632
pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2 {
633
pub __empty_bufs: io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1,
634
pub bufs: __IncompleteArrayField<io_uring_buf>,
635
}
636
#[repr(C)]
637
#[derive(Debug, Default, Copy, Clone)]
638
pub struct io_uring_buf_ring__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 {}
639
impl Default for io_uring_buf_ring__bindgen_ty_1 {
640
fn default() -> Self {
641
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
642
unsafe {
643
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
644
s.assume_init()
645
}
646
}
647
}
648
impl Default for io_uring_buf_ring {
649
fn default() -> Self {
650
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
651
unsafe {
652
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
653
s.assume_init()
654
}
655
}
656
}
657
pub const io_uring_register_pbuf_ring_flags_IOU_PBUF_RING_MMAP: io_uring_register_pbuf_ring_flags =
658
1;
659
pub const io_uring_register_pbuf_ring_flags_IOU_PBUF_RING_INC: io_uring_register_pbuf_ring_flags =
660
2;
661
pub type io_uring_register_pbuf_ring_flags = ::std::os::raw::c_uint;
662
#[repr(C)]
663
#[derive(Debug, Default, Copy, Clone)]
664
pub struct io_uring_buf_reg {
665
pub ring_addr: u64,
666
pub ring_entries: u32,
667
pub bgid: u16,
668
pub flags: u16,
669
pub resv: [u64; 3usize],
670
}
671
#[repr(C)]
672
#[derive(Debug, Default, Copy, Clone)]
673
pub struct io_uring_buf_status {
674
pub buf_group: u32,
675
pub head: u32,
676
pub resv: [u32; 8usize],
677
}
678
#[repr(C)]
679
#[derive(Debug, Default, Copy, Clone)]
680
pub struct io_uring_napi {
681
pub busy_poll_to: u32,
682
pub prefer_busy_poll: u8,
683
pub pad: [u8; 3usize],
684
pub resv: u64,
685
}
686
pub const io_uring_register_restriction_op_IORING_RESTRICTION_REGISTER_OP:
687
io_uring_register_restriction_op = 0;
688
pub const io_uring_register_restriction_op_IORING_RESTRICTION_SQE_OP:
689
io_uring_register_restriction_op = 1;
690
pub const io_uring_register_restriction_op_IORING_RESTRICTION_SQE_FLAGS_ALLOWED:
691
io_uring_register_restriction_op = 2;
692
pub const io_uring_register_restriction_op_IORING_RESTRICTION_SQE_FLAGS_REQUIRED:
693
io_uring_register_restriction_op = 3;
694
pub const io_uring_register_restriction_op_IORING_RESTRICTION_LAST:
695
io_uring_register_restriction_op = 4;
696
pub type io_uring_register_restriction_op = ::std::os::raw::c_uint;
697
#[repr(C)]
698
#[derive(Debug, Default, Copy, Clone)]
699
pub struct io_uring_getevents_arg {
700
pub sigmask: u64,
701
pub sigmask_sz: u32,
702
pub min_wait_usec: u32,
703
pub ts: u64,
704
}
705
#[repr(C)]
706
#[derive(Debug, Default, Copy, Clone)]
707
pub struct io_uring_sync_cancel_reg {
708
pub addr: u64,
709
pub fd: i32,
710
pub flags: u32,
711
pub timeout: __kernel_timespec,
712
pub opcode: u8,
713
pub pad: [u8; 7usize],
714
pub pad2: [u64; 3usize],
715
}
716
#[repr(C)]
717
#[derive(Debug, Default, Copy, Clone)]
718
pub struct io_uring_file_index_range {
719
pub off: u32,
720
pub len: u32,
721
pub resv: u64,
722
}
723
#[repr(C)]
724
#[derive(Debug, Default, Copy, Clone)]
725
pub struct io_uring_recvmsg_out {
726
pub namelen: u32,
727
pub controllen: u32,
728
pub payloadlen: u32,
729
pub flags: u32,
730
}
731
pub const io_uring_socket_op_SOCKET_URING_OP_SIOCINQ: io_uring_socket_op = 0;
732
pub const io_uring_socket_op_SOCKET_URING_OP_SIOCOUTQ: io_uring_socket_op = 1;
733
pub const io_uring_socket_op_SOCKET_URING_OP_GETSOCKOPT: io_uring_socket_op = 2;
734
pub const io_uring_socket_op_SOCKET_URING_OP_SETSOCKOPT: io_uring_socket_op = 3;
735
pub type io_uring_socket_op = ::std::os::raw::c_uint;
736
737