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