/* automatically generated by tools/bindgen-all-the-things */ #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(dead_code)] #[repr(C)] #[derive(Default)] pub struct __IncompleteArrayField(::std::marker::PhantomData, [T; 0]); impl __IncompleteArrayField { #[inline] pub const fn new() -> Self { __IncompleteArrayField(::std::marker::PhantomData, []) } #[inline] pub fn as_ptr(&self) -> *const T { self as *const _ as *const T } #[inline] pub fn as_mut_ptr(&mut self) -> *mut T { self as *mut _ as *mut T } #[inline] pub unsafe fn as_slice(&self, len: usize) -> &[T] { ::std::slice::from_raw_parts(self.as_ptr(), len) } #[inline] pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len) } } impl ::std::fmt::Debug for __IncompleteArrayField { fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { fmt.write_str("__IncompleteArrayField") } } pub const IORING_SETUP_IOPOLL: u32 = 1; pub const IORING_SETUP_SQPOLL: u32 = 2; pub const IORING_SETUP_SQ_AFF: u32 = 4; pub const IORING_SETUP_CQSIZE: u32 = 8; pub const IORING_SETUP_CLAMP: u32 = 16; pub const IORING_SETUP_ATTACH_WQ: u32 = 32; pub const IORING_SETUP_R_DISABLED: u32 = 64; pub const IORING_FSYNC_DATASYNC: u32 = 1; pub const IORING_TIMEOUT_ABS: u32 = 1; pub const IORING_CQE_F_BUFFER: u32 = 1; pub const IORING_OFF_SQ_RING: u32 = 0; pub const IORING_OFF_CQ_RING: u32 = 134217728; pub const IORING_OFF_SQES: u32 = 268435456; pub const IORING_SQ_NEED_WAKEUP: u32 = 1; pub const IORING_SQ_CQ_OVERFLOW: u32 = 2; pub const IORING_CQ_EVENTFD_DISABLED: u32 = 1; pub const IORING_ENTER_GETEVENTS: u32 = 1; pub const IORING_ENTER_SQ_WAKEUP: u32 = 2; pub const IORING_ENTER_SQ_WAIT: u32 = 4; pub const IORING_FEAT_SINGLE_MMAP: u32 = 1; pub const IORING_FEAT_NODROP: u32 = 2; pub const IORING_FEAT_SUBMIT_STABLE: u32 = 4; pub const IORING_FEAT_RW_CUR_POS: u32 = 8; pub const IORING_FEAT_CUR_PERSONALITY: u32 = 16; pub const IORING_FEAT_FAST_POLL: u32 = 32; pub const IORING_FEAT_POLL_32BITS: u32 = 64; pub const IO_URING_OP_SUPPORTED: u32 = 1; pub type __kernel_rwf_t = ::std::os::raw::c_int; #[repr(C)] #[derive(Copy, Clone)] pub struct io_uring_sqe { pub opcode: u8, pub flags: u8, pub ioprio: u16, pub fd: i32, pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_1, pub __bindgen_anon_2: io_uring_sqe__bindgen_ty_2, pub len: u32, pub __bindgen_anon_3: io_uring_sqe__bindgen_ty_3, pub user_data: u64, pub __bindgen_anon_4: io_uring_sqe__bindgen_ty_4, } #[repr(C)] #[derive(Copy, Clone)] pub union io_uring_sqe__bindgen_ty_1 { pub off: u64, pub addr2: u64, } impl Default for io_uring_sqe__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Copy, Clone)] pub union io_uring_sqe__bindgen_ty_2 { pub addr: u64, pub splice_off_in: u64, } impl Default for io_uring_sqe__bindgen_ty_2 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Copy, Clone)] pub union io_uring_sqe__bindgen_ty_3 { pub rw_flags: __kernel_rwf_t, pub fsync_flags: u32, pub poll_events: u16, pub poll32_events: u32, pub sync_range_flags: u32, pub msg_flags: u32, pub timeout_flags: u32, pub accept_flags: u32, pub cancel_flags: u32, pub open_flags: u32, pub statx_flags: u32, pub fadvise_advice: u32, pub splice_flags: u32, } impl Default for io_uring_sqe__bindgen_ty_3 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Copy, Clone)] pub union io_uring_sqe__bindgen_ty_4 { pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_4__bindgen_ty_1, pub __pad2: [u64; 3usize], } #[repr(C)] #[derive(Copy, Clone)] pub struct io_uring_sqe__bindgen_ty_4__bindgen_ty_1 { pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1, pub personality: u16, pub splice_fd_in: i32, } #[repr(C, packed)] #[derive(Copy, Clone)] pub union io_uring_sqe__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { pub buf_index: u16, pub buf_group: u16, } impl Default for io_uring_sqe__bindgen_ty_4__bindgen_ty_1__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } impl Default for io_uring_sqe__bindgen_ty_4__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } impl Default for io_uring_sqe__bindgen_ty_4 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } impl Default for io_uring_sqe { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub const IORING_OP_NOP: ::std::os::raw::c_uint = 0; pub const IORING_OP_READV: ::std::os::raw::c_uint = 1; pub const IORING_OP_WRITEV: ::std::os::raw::c_uint = 2; pub const IORING_OP_FSYNC: ::std::os::raw::c_uint = 3; pub const IORING_OP_READ_FIXED: ::std::os::raw::c_uint = 4; pub const IORING_OP_WRITE_FIXED: ::std::os::raw::c_uint = 5; pub const IORING_OP_POLL_ADD: ::std::os::raw::c_uint = 6; pub const IORING_OP_POLL_REMOVE: ::std::os::raw::c_uint = 7; pub const IORING_OP_SYNC_FILE_RANGE: ::std::os::raw::c_uint = 8; pub const IORING_OP_SENDMSG: ::std::os::raw::c_uint = 9; pub const IORING_OP_RECVMSG: ::std::os::raw::c_uint = 10; pub const IORING_OP_TIMEOUT: ::std::os::raw::c_uint = 11; pub const IORING_OP_TIMEOUT_REMOVE: ::std::os::raw::c_uint = 12; pub const IORING_OP_ACCEPT: ::std::os::raw::c_uint = 13; pub const IORING_OP_ASYNC_CANCEL: ::std::os::raw::c_uint = 14; pub const IORING_OP_LINK_TIMEOUT: ::std::os::raw::c_uint = 15; pub const IORING_OP_CONNECT: ::std::os::raw::c_uint = 16; pub const IORING_OP_FALLOCATE: ::std::os::raw::c_uint = 17; pub const IORING_OP_OPENAT: ::std::os::raw::c_uint = 18; pub const IORING_OP_CLOSE: ::std::os::raw::c_uint = 19; pub const IORING_OP_FILES_UPDATE: ::std::os::raw::c_uint = 20; pub const IORING_OP_STATX: ::std::os::raw::c_uint = 21; pub const IORING_OP_READ: ::std::os::raw::c_uint = 22; pub const IORING_OP_WRITE: ::std::os::raw::c_uint = 23; pub const IORING_OP_FADVISE: ::std::os::raw::c_uint = 24; pub const IORING_OP_MADVISE: ::std::os::raw::c_uint = 25; pub const IORING_OP_SEND: ::std::os::raw::c_uint = 26; pub const IORING_OP_RECV: ::std::os::raw::c_uint = 27; pub const IORING_OP_OPENAT2: ::std::os::raw::c_uint = 28; pub const IORING_OP_EPOLL_CTL: ::std::os::raw::c_uint = 29; pub const IORING_OP_SPLICE: ::std::os::raw::c_uint = 30; pub const IORING_OP_PROVIDE_BUFFERS: ::std::os::raw::c_uint = 31; pub const IORING_OP_REMOVE_BUFFERS: ::std::os::raw::c_uint = 32; pub const IORING_OP_TEE: ::std::os::raw::c_uint = 33; pub const IORING_OP_LAST: ::std::os::raw::c_uint = 34; pub type _bindgen_ty_2 = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct io_uring_cqe { pub user_data: u64, pub res: i32, pub flags: u32, } pub const IORING_CQE_BUFFER_SHIFT: ::std::os::raw::c_uint = 16; pub type _bindgen_ty_3 = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct io_sqring_offsets { pub head: u32, pub tail: u32, pub ring_mask: u32, pub ring_entries: u32, pub flags: u32, pub dropped: u32, pub array: u32, pub resv1: u32, pub resv2: u64, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct io_cqring_offsets { pub head: u32, pub tail: u32, pub ring_mask: u32, pub ring_entries: u32, pub overflow: u32, pub cqes: u32, pub flags: u32, pub resv1: u32, pub resv2: u64, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct io_uring_params { pub sq_entries: u32, pub cq_entries: u32, pub flags: u32, pub sq_thread_cpu: u32, pub sq_thread_idle: u32, pub features: u32, pub wq_fd: u32, pub resv: [u32; 3usize], pub sq_off: io_sqring_offsets, pub cq_off: io_cqring_offsets, } pub const IORING_REGISTER_BUFFERS: ::std::os::raw::c_uint = 0; pub const IORING_UNREGISTER_BUFFERS: ::std::os::raw::c_uint = 1; pub const IORING_REGISTER_FILES: ::std::os::raw::c_uint = 2; pub const IORING_UNREGISTER_FILES: ::std::os::raw::c_uint = 3; pub const IORING_REGISTER_EVENTFD: ::std::os::raw::c_uint = 4; pub const IORING_UNREGISTER_EVENTFD: ::std::os::raw::c_uint = 5; pub const IORING_REGISTER_FILES_UPDATE: ::std::os::raw::c_uint = 6; pub const IORING_REGISTER_EVENTFD_ASYNC: ::std::os::raw::c_uint = 7; pub const IORING_REGISTER_PROBE: ::std::os::raw::c_uint = 8; pub const IORING_REGISTER_PERSONALITY: ::std::os::raw::c_uint = 9; pub const IORING_UNREGISTER_PERSONALITY: ::std::os::raw::c_uint = 10; pub const IORING_REGISTER_RESTRICTIONS: ::std::os::raw::c_uint = 11; pub const IORING_REGISTER_ENABLE_RINGS: ::std::os::raw::c_uint = 12; pub const IORING_REGISTER_LAST: ::std::os::raw::c_uint = 13; pub type _bindgen_ty_4 = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct io_uring_files_update { pub offset: u32, pub resv: u32, pub fds: u64, } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct io_uring_probe_op { pub op: u8, pub resv: u8, pub flags: u16, pub resv2: u32, } #[repr(C)] #[derive(Debug, Default)] pub struct io_uring_probe { pub last_op: u8, pub ops_len: u8, pub resv: u16, pub resv2: [u32; 3usize], pub ops: __IncompleteArrayField, } #[repr(C)] #[derive(Copy, Clone)] pub struct io_uring_restriction { pub opcode: u16, pub __bindgen_anon_1: io_uring_restriction__bindgen_ty_1, pub resv: u8, pub resv2: [u32; 3usize], } #[repr(C)] #[derive(Copy, Clone)] pub union io_uring_restriction__bindgen_ty_1 { pub register_op: u8, pub sqe_op: u8, pub sqe_flags: u8, } impl Default for io_uring_restriction__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } impl Default for io_uring_restriction { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub const IORING_RESTRICTION_REGISTER_OP: ::std::os::raw::c_uint = 0; pub const IORING_RESTRICTION_SQE_OP: ::std::os::raw::c_uint = 1; pub const IORING_RESTRICTION_SQE_FLAGS_ALLOWED: ::std::os::raw::c_uint = 2; pub const IORING_RESTRICTION_SQE_FLAGS_REQUIRED: ::std::os::raw::c_uint = 3; pub const IORING_RESTRICTION_LAST: ::std::os::raw::c_uint = 4; pub type _bindgen_ty_5 = ::std::os::raw::c_uint;