• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* automatically generated by rust-bindgen
2  *
3  * bindgen --with-derive-default include/uapi/linux/io_uring.h
4  */
5 
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>);
14 impl<T> __IncompleteArrayField<T> {
15     #[inline]
new() -> Self16     pub fn new() -> Self {
17         __IncompleteArrayField(::std::marker::PhantomData)
18     }
19     #[inline]
as_ptr(&self) -> *const T20     pub unsafe fn as_ptr(&self) -> *const T {
21         ::std::mem::transmute(self)
22     }
23     #[inline]
as_mut_ptr(&mut self) -> *mut T24     pub unsafe fn as_mut_ptr(&mut self) -> *mut T {
25         ::std::mem::transmute(self)
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 impl<T> ::std::clone::Clone for __IncompleteArrayField<T> {
42     #[inline]
clone(&self) -> Self43     fn clone(&self) -> Self {
44         Self::new()
45     }
46 }
47 impl<T> ::std::marker::Copy for __IncompleteArrayField<T> {}
48 pub const NR_OPEN: ::std::os::raw::c_uint = 1024;
49 pub const NGROUPS_MAX: ::std::os::raw::c_uint = 65536;
50 pub const ARG_MAX: ::std::os::raw::c_uint = 131072;
51 pub const LINK_MAX: ::std::os::raw::c_uint = 127;
52 pub const MAX_CANON: ::std::os::raw::c_uint = 255;
53 pub const MAX_INPUT: ::std::os::raw::c_uint = 255;
54 pub const NAME_MAX: ::std::os::raw::c_uint = 255;
55 pub const PATH_MAX: ::std::os::raw::c_uint = 4096;
56 pub const PIPE_BUF: ::std::os::raw::c_uint = 4096;
57 pub const XATTR_NAME_MAX: ::std::os::raw::c_uint = 255;
58 pub const XATTR_SIZE_MAX: ::std::os::raw::c_uint = 65536;
59 pub const XATTR_LIST_MAX: ::std::os::raw::c_uint = 65536;
60 pub const RTSIG_MAX: ::std::os::raw::c_uint = 32;
61 pub const _IOC_NRBITS: ::std::os::raw::c_uint = 8;
62 pub const _IOC_TYPEBITS: ::std::os::raw::c_uint = 8;
63 pub const _IOC_SIZEBITS: ::std::os::raw::c_uint = 14;
64 pub const _IOC_DIRBITS: ::std::os::raw::c_uint = 2;
65 pub const _IOC_NRMASK: ::std::os::raw::c_uint = 255;
66 pub const _IOC_TYPEMASK: ::std::os::raw::c_uint = 255;
67 pub const _IOC_SIZEMASK: ::std::os::raw::c_uint = 16383;
68 pub const _IOC_DIRMASK: ::std::os::raw::c_uint = 3;
69 pub const _IOC_NRSHIFT: ::std::os::raw::c_uint = 0;
70 pub const _IOC_TYPESHIFT: ::std::os::raw::c_uint = 8;
71 pub const _IOC_SIZESHIFT: ::std::os::raw::c_uint = 16;
72 pub const _IOC_DIRSHIFT: ::std::os::raw::c_uint = 30;
73 pub const _IOC_NONE: ::std::os::raw::c_uint = 0;
74 pub const _IOC_WRITE: ::std::os::raw::c_uint = 1;
75 pub const _IOC_READ: ::std::os::raw::c_uint = 2;
76 pub const IOC_IN: ::std::os::raw::c_uint = 1073741824;
77 pub const IOC_OUT: ::std::os::raw::c_uint = 2147483648;
78 pub const IOC_INOUT: ::std::os::raw::c_uint = 3221225472;
79 pub const IOCSIZE_MASK: ::std::os::raw::c_uint = 1073676288;
80 pub const IOCSIZE_SHIFT: ::std::os::raw::c_uint = 16;
81 pub const __BITS_PER_LONG: ::std::os::raw::c_uint = 64;
82 pub const __FD_SETSIZE: ::std::os::raw::c_uint = 1024;
83 pub const MS_RDONLY: ::std::os::raw::c_uint = 1;
84 pub const MS_NOSUID: ::std::os::raw::c_uint = 2;
85 pub const MS_NODEV: ::std::os::raw::c_uint = 4;
86 pub const MS_NOEXEC: ::std::os::raw::c_uint = 8;
87 pub const MS_SYNCHRONOUS: ::std::os::raw::c_uint = 16;
88 pub const MS_REMOUNT: ::std::os::raw::c_uint = 32;
89 pub const MS_MANDLOCK: ::std::os::raw::c_uint = 64;
90 pub const MS_DIRSYNC: ::std::os::raw::c_uint = 128;
91 pub const MS_NOATIME: ::std::os::raw::c_uint = 1024;
92 pub const MS_NODIRATIME: ::std::os::raw::c_uint = 2048;
93 pub const MS_BIND: ::std::os::raw::c_uint = 4096;
94 pub const MS_MOVE: ::std::os::raw::c_uint = 8192;
95 pub const MS_REC: ::std::os::raw::c_uint = 16384;
96 pub const MS_VERBOSE: ::std::os::raw::c_uint = 32768;
97 pub const MS_SILENT: ::std::os::raw::c_uint = 32768;
98 pub const MS_POSIXACL: ::std::os::raw::c_uint = 65536;
99 pub const MS_UNBINDABLE: ::std::os::raw::c_uint = 131072;
100 pub const MS_PRIVATE: ::std::os::raw::c_uint = 262144;
101 pub const MS_SLAVE: ::std::os::raw::c_uint = 524288;
102 pub const MS_SHARED: ::std::os::raw::c_uint = 1048576;
103 pub const MS_RELATIME: ::std::os::raw::c_uint = 2097152;
104 pub const MS_KERNMOUNT: ::std::os::raw::c_uint = 4194304;
105 pub const MS_I_VERSION: ::std::os::raw::c_uint = 8388608;
106 pub const MS_STRICTATIME: ::std::os::raw::c_uint = 16777216;
107 pub const MS_LAZYTIME: ::std::os::raw::c_uint = 33554432;
108 pub const MS_SUBMOUNT: ::std::os::raw::c_uint = 67108864;
109 pub const MS_NOREMOTELOCK: ::std::os::raw::c_uint = 134217728;
110 pub const MS_NOSEC: ::std::os::raw::c_uint = 268435456;
111 pub const MS_BORN: ::std::os::raw::c_uint = 536870912;
112 pub const MS_ACTIVE: ::std::os::raw::c_uint = 1073741824;
113 pub const MS_NOUSER: ::std::os::raw::c_uint = 2147483648;
114 pub const MS_RMT_MASK: ::std::os::raw::c_uint = 41943121;
115 pub const MS_MGC_VAL: ::std::os::raw::c_uint = 3236757504;
116 pub const MS_MGC_MSK: ::std::os::raw::c_uint = 4294901760;
117 pub const OPEN_TREE_CLONE: ::std::os::raw::c_uint = 1;
118 pub const MOVE_MOUNT_F_SYMLINKS: ::std::os::raw::c_uint = 1;
119 pub const MOVE_MOUNT_F_AUTOMOUNTS: ::std::os::raw::c_uint = 2;
120 pub const MOVE_MOUNT_F_EMPTY_PATH: ::std::os::raw::c_uint = 4;
121 pub const MOVE_MOUNT_T_SYMLINKS: ::std::os::raw::c_uint = 16;
122 pub const MOVE_MOUNT_T_AUTOMOUNTS: ::std::os::raw::c_uint = 32;
123 pub const MOVE_MOUNT_T_EMPTY_PATH: ::std::os::raw::c_uint = 64;
124 pub const MOVE_MOUNT__MASK: ::std::os::raw::c_uint = 119;
125 pub const FSOPEN_CLOEXEC: ::std::os::raw::c_uint = 1;
126 pub const FSPICK_CLOEXEC: ::std::os::raw::c_uint = 1;
127 pub const FSPICK_SYMLINK_NOFOLLOW: ::std::os::raw::c_uint = 2;
128 pub const FSPICK_NO_AUTOMOUNT: ::std::os::raw::c_uint = 4;
129 pub const FSPICK_EMPTY_PATH: ::std::os::raw::c_uint = 8;
130 pub const FSMOUNT_CLOEXEC: ::std::os::raw::c_uint = 1;
131 pub const MOUNT_ATTR_RDONLY: ::std::os::raw::c_uint = 1;
132 pub const MOUNT_ATTR_NOSUID: ::std::os::raw::c_uint = 2;
133 pub const MOUNT_ATTR_NODEV: ::std::os::raw::c_uint = 4;
134 pub const MOUNT_ATTR_NOEXEC: ::std::os::raw::c_uint = 8;
135 pub const MOUNT_ATTR__ATIME: ::std::os::raw::c_uint = 112;
136 pub const MOUNT_ATTR_RELATIME: ::std::os::raw::c_uint = 0;
137 pub const MOUNT_ATTR_NOATIME: ::std::os::raw::c_uint = 16;
138 pub const MOUNT_ATTR_STRICTATIME: ::std::os::raw::c_uint = 32;
139 pub const MOUNT_ATTR_NODIRATIME: ::std::os::raw::c_uint = 128;
140 pub const INR_OPEN_CUR: ::std::os::raw::c_uint = 1024;
141 pub const INR_OPEN_MAX: ::std::os::raw::c_uint = 4096;
142 pub const BLOCK_SIZE_BITS: ::std::os::raw::c_uint = 10;
143 pub const BLOCK_SIZE: ::std::os::raw::c_uint = 1024;
144 pub const SEEK_SET: ::std::os::raw::c_uint = 0;
145 pub const SEEK_CUR: ::std::os::raw::c_uint = 1;
146 pub const SEEK_END: ::std::os::raw::c_uint = 2;
147 pub const SEEK_DATA: ::std::os::raw::c_uint = 3;
148 pub const SEEK_HOLE: ::std::os::raw::c_uint = 4;
149 pub const SEEK_MAX: ::std::os::raw::c_uint = 4;
150 pub const RENAME_NOREPLACE: ::std::os::raw::c_uint = 1;
151 pub const RENAME_EXCHANGE: ::std::os::raw::c_uint = 2;
152 pub const RENAME_WHITEOUT: ::std::os::raw::c_uint = 4;
153 pub const FILE_DEDUPE_RANGE_SAME: ::std::os::raw::c_uint = 0;
154 pub const FILE_DEDUPE_RANGE_DIFFERS: ::std::os::raw::c_uint = 1;
155 pub const NR_FILE: ::std::os::raw::c_uint = 8192;
156 pub const FS_XFLAG_REALTIME: ::std::os::raw::c_uint = 1;
157 pub const FS_XFLAG_PREALLOC: ::std::os::raw::c_uint = 2;
158 pub const FS_XFLAG_IMMUTABLE: ::std::os::raw::c_uint = 8;
159 pub const FS_XFLAG_APPEND: ::std::os::raw::c_uint = 16;
160 pub const FS_XFLAG_SYNC: ::std::os::raw::c_uint = 32;
161 pub const FS_XFLAG_NOATIME: ::std::os::raw::c_uint = 64;
162 pub const FS_XFLAG_NODUMP: ::std::os::raw::c_uint = 128;
163 pub const FS_XFLAG_RTINHERIT: ::std::os::raw::c_uint = 256;
164 pub const FS_XFLAG_PROJINHERIT: ::std::os::raw::c_uint = 512;
165 pub const FS_XFLAG_NOSYMLINKS: ::std::os::raw::c_uint = 1024;
166 pub const FS_XFLAG_EXTSIZE: ::std::os::raw::c_uint = 2048;
167 pub const FS_XFLAG_EXTSZINHERIT: ::std::os::raw::c_uint = 4096;
168 pub const FS_XFLAG_NODEFRAG: ::std::os::raw::c_uint = 8192;
169 pub const FS_XFLAG_FILESTREAM: ::std::os::raw::c_uint = 16384;
170 pub const FS_XFLAG_DAX: ::std::os::raw::c_uint = 32768;
171 pub const FS_XFLAG_COWEXTSIZE: ::std::os::raw::c_uint = 65536;
172 pub const FS_XFLAG_HASATTR: ::std::os::raw::c_uint = 2147483648;
173 pub const BMAP_IOCTL: ::std::os::raw::c_uint = 1;
174 pub const FSLABEL_MAX: ::std::os::raw::c_uint = 256;
175 pub const FS_KEY_DESCRIPTOR_SIZE: ::std::os::raw::c_uint = 8;
176 pub const FS_POLICY_FLAGS_PAD_4: ::std::os::raw::c_uint = 0;
177 pub const FS_POLICY_FLAGS_PAD_8: ::std::os::raw::c_uint = 1;
178 pub const FS_POLICY_FLAGS_PAD_16: ::std::os::raw::c_uint = 2;
179 pub const FS_POLICY_FLAGS_PAD_32: ::std::os::raw::c_uint = 3;
180 pub const FS_POLICY_FLAGS_PAD_MASK: ::std::os::raw::c_uint = 3;
181 pub const FS_POLICY_FLAG_DIRECT_KEY: ::std::os::raw::c_uint = 4;
182 pub const FS_POLICY_FLAGS_VALID: ::std::os::raw::c_uint = 7;
183 pub const FS_ENCRYPTION_MODE_INVALID: ::std::os::raw::c_uint = 0;
184 pub const FS_ENCRYPTION_MODE_AES_256_XTS: ::std::os::raw::c_uint = 1;
185 pub const FS_ENCRYPTION_MODE_AES_256_GCM: ::std::os::raw::c_uint = 2;
186 pub const FS_ENCRYPTION_MODE_AES_256_CBC: ::std::os::raw::c_uint = 3;
187 pub const FS_ENCRYPTION_MODE_AES_256_CTS: ::std::os::raw::c_uint = 4;
188 pub const FS_ENCRYPTION_MODE_AES_128_CBC: ::std::os::raw::c_uint = 5;
189 pub const FS_ENCRYPTION_MODE_AES_128_CTS: ::std::os::raw::c_uint = 6;
190 pub const FS_ENCRYPTION_MODE_SPECK128_256_XTS: ::std::os::raw::c_uint = 7;
191 pub const FS_ENCRYPTION_MODE_SPECK128_256_CTS: ::std::os::raw::c_uint = 8;
192 pub const FS_ENCRYPTION_MODE_ADIANTUM: ::std::os::raw::c_uint = 9;
193 pub const FS_KEY_DESC_PREFIX: &[u8; 9usize] = b"fscrypt:\0";
194 pub const FS_KEY_DESC_PREFIX_SIZE: ::std::os::raw::c_uint = 8;
195 pub const FS_MAX_KEY_SIZE: ::std::os::raw::c_uint = 64;
196 pub const FS_SECRM_FL: ::std::os::raw::c_uint = 1;
197 pub const FS_UNRM_FL: ::std::os::raw::c_uint = 2;
198 pub const FS_COMPR_FL: ::std::os::raw::c_uint = 4;
199 pub const FS_SYNC_FL: ::std::os::raw::c_uint = 8;
200 pub const FS_IMMUTABLE_FL: ::std::os::raw::c_uint = 16;
201 pub const FS_APPEND_FL: ::std::os::raw::c_uint = 32;
202 pub const FS_NODUMP_FL: ::std::os::raw::c_uint = 64;
203 pub const FS_NOATIME_FL: ::std::os::raw::c_uint = 128;
204 pub const FS_DIRTY_FL: ::std::os::raw::c_uint = 256;
205 pub const FS_COMPRBLK_FL: ::std::os::raw::c_uint = 512;
206 pub const FS_NOCOMP_FL: ::std::os::raw::c_uint = 1024;
207 pub const FS_ENCRYPT_FL: ::std::os::raw::c_uint = 2048;
208 pub const FS_BTREE_FL: ::std::os::raw::c_uint = 4096;
209 pub const FS_INDEX_FL: ::std::os::raw::c_uint = 4096;
210 pub const FS_IMAGIC_FL: ::std::os::raw::c_uint = 8192;
211 pub const FS_JOURNAL_DATA_FL: ::std::os::raw::c_uint = 16384;
212 pub const FS_NOTAIL_FL: ::std::os::raw::c_uint = 32768;
213 pub const FS_DIRSYNC_FL: ::std::os::raw::c_uint = 65536;
214 pub const FS_TOPDIR_FL: ::std::os::raw::c_uint = 131072;
215 pub const FS_HUGE_FILE_FL: ::std::os::raw::c_uint = 262144;
216 pub const FS_EXTENT_FL: ::std::os::raw::c_uint = 524288;
217 pub const FS_EA_INODE_FL: ::std::os::raw::c_uint = 2097152;
218 pub const FS_EOFBLOCKS_FL: ::std::os::raw::c_uint = 4194304;
219 pub const FS_NOCOW_FL: ::std::os::raw::c_uint = 8388608;
220 pub const FS_INLINE_DATA_FL: ::std::os::raw::c_uint = 268435456;
221 pub const FS_PROJINHERIT_FL: ::std::os::raw::c_uint = 536870912;
222 pub const FS_RESERVED_FL: ::std::os::raw::c_uint = 2147483648;
223 pub const FS_FL_USER_VISIBLE: ::std::os::raw::c_uint = 253951;
224 pub const FS_FL_USER_MODIFIABLE: ::std::os::raw::c_uint = 229631;
225 pub const SYNC_FILE_RANGE_WAIT_BEFORE: ::std::os::raw::c_uint = 1;
226 pub const SYNC_FILE_RANGE_WRITE: ::std::os::raw::c_uint = 2;
227 pub const SYNC_FILE_RANGE_WAIT_AFTER: ::std::os::raw::c_uint = 4;
228 pub const SYNC_FILE_RANGE_WRITE_AND_WAIT: ::std::os::raw::c_uint = 7;
229 pub const IORING_SETUP_IOPOLL: ::std::os::raw::c_uint = 1;
230 pub const IORING_SETUP_SQPOLL: ::std::os::raw::c_uint = 2;
231 pub const IORING_SETUP_SQ_AFF: ::std::os::raw::c_uint = 4;
232 pub const IORING_SETUP_CQSIZE: ::std::os::raw::c_uint = 8;
233 pub const IORING_SETUP_CLAMP: ::std::os::raw::c_uint = 16;
234 pub const IORING_SETUP_ATTACH_WQ: ::std::os::raw::c_uint = 32;
235 pub const IORING_FSYNC_DATASYNC: ::std::os::raw::c_uint = 1;
236 pub const IORING_TIMEOUT_ABS: ::std::os::raw::c_uint = 1;
237 pub const IORING_OFF_SQ_RING: ::std::os::raw::c_uint = 0;
238 pub const IORING_OFF_CQ_RING: ::std::os::raw::c_uint = 134217728;
239 pub const IORING_OFF_SQES: ::std::os::raw::c_uint = 268435456;
240 pub const IORING_SQ_NEED_WAKEUP: ::std::os::raw::c_uint = 1;
241 pub const IORING_ENTER_GETEVENTS: ::std::os::raw::c_uint = 1;
242 pub const IORING_ENTER_SQ_WAKEUP: ::std::os::raw::c_uint = 2;
243 pub const IORING_FEAT_SINGLE_MMAP: ::std::os::raw::c_uint = 1;
244 pub const IORING_FEAT_NODROP: ::std::os::raw::c_uint = 2;
245 pub const IORING_FEAT_SUBMIT_STABLE: ::std::os::raw::c_uint = 4;
246 pub const IORING_FEAT_RW_CUR_POS: ::std::os::raw::c_uint = 8;
247 pub const IORING_FEAT_CUR_PERSONALITY: ::std::os::raw::c_uint = 16;
248 pub const IORING_REGISTER_BUFFERS: ::std::os::raw::c_uint = 0;
249 pub const IORING_UNREGISTER_BUFFERS: ::std::os::raw::c_uint = 1;
250 pub const IORING_REGISTER_FILES: ::std::os::raw::c_uint = 2;
251 pub const IORING_UNREGISTER_FILES: ::std::os::raw::c_uint = 3;
252 pub const IORING_REGISTER_EVENTFD: ::std::os::raw::c_uint = 4;
253 pub const IORING_UNREGISTER_EVENTFD: ::std::os::raw::c_uint = 5;
254 pub const IORING_REGISTER_FILES_UPDATE: ::std::os::raw::c_uint = 6;
255 pub const IORING_REGISTER_EVENTFD_ASYNC: ::std::os::raw::c_uint = 7;
256 pub const IORING_REGISTER_PROBE: ::std::os::raw::c_uint = 8;
257 pub const IORING_REGISTER_PERSONALITY: ::std::os::raw::c_uint = 9;
258 pub const IORING_UNREGISTER_PERSONALITY: ::std::os::raw::c_uint = 10;
259 pub const IO_URING_OP_SUPPORTED: ::std::os::raw::c_uint = 1;
260 #[repr(C)]
261 #[derive(Debug, Default, Copy, Clone)]
262 pub struct file_clone_range {
263     pub src_fd: i64,
264     pub src_offset: u64,
265     pub src_length: u64,
266     pub dest_offset: u64,
267 }
268 #[repr(C)]
269 #[derive(Debug, Default, Copy, Clone)]
270 pub struct fstrim_range {
271     pub start: u64,
272     pub len: u64,
273     pub minlen: u64,
274 }
275 #[repr(C)]
276 #[derive(Debug, Default, Copy, Clone)]
277 pub struct file_dedupe_range_info {
278     pub dest_fd: i64,
279     pub dest_offset: u64,
280     pub bytes_deduped: u64,
281     pub status: i32,
282     pub reserved: u32,
283 }
284 #[repr(C)]
285 #[derive(Debug, Default)]
286 pub struct file_dedupe_range {
287     pub src_offset: u64,
288     pub src_length: u64,
289     pub dest_count: u16,
290     pub reserved1: u16,
291     pub reserved2: u32,
292     pub info: __IncompleteArrayField<file_dedupe_range_info>,
293 }
294 #[repr(C)]
295 #[derive(Debug, Default, Copy, Clone)]
296 pub struct files_stat_struct {
297     pub nr_files: ::std::os::raw::c_ulong,
298     pub nr_free_files: ::std::os::raw::c_ulong,
299     pub max_files: ::std::os::raw::c_ulong,
300 }
301 #[repr(C)]
302 #[derive(Debug, Default, Copy, Clone)]
303 pub struct inodes_stat_t {
304     pub nr_inodes: ::std::os::raw::c_long,
305     pub nr_unused: ::std::os::raw::c_long,
306     pub dummy: [::std::os::raw::c_long; 5usize],
307 }
308 #[repr(C)]
309 #[derive(Debug, Default, Copy, Clone)]
310 pub struct fsxattr {
311     pub fsx_xflags: u32,
312     pub fsx_extsize: u32,
313     pub fsx_nextents: u32,
314     pub fsx_projid: u32,
315     pub fsx_cowextsize: u32,
316     pub fsx_pad: [::std::os::raw::c_uchar; 8usize],
317 }
318 #[repr(C)]
319 #[derive(Debug, Default, Copy, Clone)]
320 pub struct fscrypt_policy {
321     pub version: u8,
322     pub contents_encryption_mode: u8,
323     pub filenames_encryption_mode: u8,
324     pub flags: u8,
325     pub master_key_descriptor: [u8; 8usize],
326 }
327 #[repr(C)]
328 #[derive(Copy, Clone)]
329 pub struct fscrypt_key {
330     pub mode: u32,
331     pub raw: [u8; 64usize],
332     pub size: u32,
333 }
334 impl Default for fscrypt_key {
default() -> Self335     fn default() -> Self {
336         unsafe { ::std::mem::zeroed() }
337     }
338 }
339 pub type __kernel_rwf_t = ::std::os::raw::c_int;
340 #[repr(C)]
341 #[derive(Copy, Clone)]
342 pub struct io_uring_sqe {
343     pub opcode: u8,
344     pub flags: u8,
345     pub ioprio: u16,
346     pub fd: i32,
347     pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_1,
348     pub addr: u64,
349     pub len: u32,
350     pub __bindgen_anon_2: io_uring_sqe__bindgen_ty_2,
351     pub user_data: u64,
352     pub __bindgen_anon_3: io_uring_sqe__bindgen_ty_3,
353 }
354 #[repr(C)]
355 #[derive(Copy, Clone)]
356 pub union io_uring_sqe__bindgen_ty_1 {
357     pub off: u64,
358     pub addr2: u64,
359     _bindgen_union_align: u64,
360 }
361 impl Default for io_uring_sqe__bindgen_ty_1 {
default() -> Self362     fn default() -> Self {
363         unsafe { ::std::mem::zeroed() }
364     }
365 }
366 #[repr(C)]
367 #[derive(Copy, Clone)]
368 pub union io_uring_sqe__bindgen_ty_2 {
369     pub rw_flags: __kernel_rwf_t,
370     pub fsync_flags: u32,
371     pub poll_events: u16,
372     pub sync_range_flags: u32,
373     pub msg_flags: u32,
374     pub timeout_flags: u32,
375     pub accept_flags: u32,
376     pub cancel_flags: u32,
377     pub open_flags: u32,
378     pub statx_flags: u32,
379     pub fadvise_advice: u32,
380     _bindgen_union_align: u32,
381 }
382 impl Default for io_uring_sqe__bindgen_ty_2 {
default() -> Self383     fn default() -> Self {
384         unsafe { ::std::mem::zeroed() }
385     }
386 }
387 #[repr(C)]
388 #[derive(Copy, Clone)]
389 pub union io_uring_sqe__bindgen_ty_3 {
390     pub __bindgen_anon_1: io_uring_sqe__bindgen_ty_3__bindgen_ty_1,
391     pub __pad2: [u64; 3usize],
392     _bindgen_union_align: [u64; 3usize],
393 }
394 #[repr(C)]
395 #[derive(Debug, Default, Copy, Clone)]
396 pub struct io_uring_sqe__bindgen_ty_3__bindgen_ty_1 {
397     pub buf_index: u16,
398     pub personality: u16,
399 }
400 impl Default for io_uring_sqe__bindgen_ty_3 {
default() -> Self401     fn default() -> Self {
402         unsafe { ::std::mem::zeroed() }
403     }
404 }
405 impl Default for io_uring_sqe {
default() -> Self406     fn default() -> Self {
407         unsafe { ::std::mem::zeroed() }
408     }
409 }
410 pub const IOSQE_FIXED_FILE_BIT: _bindgen_ty_1 = 0;
411 pub const IOSQE_IO_DRAIN_BIT: _bindgen_ty_1 = 1;
412 pub const IOSQE_IO_LINK_BIT: _bindgen_ty_1 = 2;
413 pub const IOSQE_IO_HARDLINK_BIT: _bindgen_ty_1 = 3;
414 pub const IOSQE_ASYNC_BIT: _bindgen_ty_1 = 4;
415 pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
416 pub const IORING_OP_NOP: _bindgen_ty_2 = 0;
417 pub const IORING_OP_READV: _bindgen_ty_2 = 1;
418 pub const IORING_OP_WRITEV: _bindgen_ty_2 = 2;
419 pub const IORING_OP_FSYNC: _bindgen_ty_2 = 3;
420 pub const IORING_OP_READ_FIXED: _bindgen_ty_2 = 4;
421 pub const IORING_OP_WRITE_FIXED: _bindgen_ty_2 = 5;
422 pub const IORING_OP_POLL_ADD: _bindgen_ty_2 = 6;
423 pub const IORING_OP_POLL_REMOVE: _bindgen_ty_2 = 7;
424 pub const IORING_OP_SYNC_FILE_RANGE: _bindgen_ty_2 = 8;
425 pub const IORING_OP_SENDMSG: _bindgen_ty_2 = 9;
426 pub const IORING_OP_RECVMSG: _bindgen_ty_2 = 10;
427 pub const IORING_OP_TIMEOUT: _bindgen_ty_2 = 11;
428 pub const IORING_OP_TIMEOUT_REMOVE: _bindgen_ty_2 = 12;
429 pub const IORING_OP_ACCEPT: _bindgen_ty_2 = 13;
430 pub const IORING_OP_ASYNC_CANCEL: _bindgen_ty_2 = 14;
431 pub const IORING_OP_LINK_TIMEOUT: _bindgen_ty_2 = 15;
432 pub const IORING_OP_CONNECT: _bindgen_ty_2 = 16;
433 pub const IORING_OP_FALLOCATE: _bindgen_ty_2 = 17;
434 pub const IORING_OP_OPENAT: _bindgen_ty_2 = 18;
435 pub const IORING_OP_CLOSE: _bindgen_ty_2 = 19;
436 pub const IORING_OP_FILES_UPDATE: _bindgen_ty_2 = 20;
437 pub const IORING_OP_STATX: _bindgen_ty_2 = 21;
438 pub const IORING_OP_READ: _bindgen_ty_2 = 22;
439 pub const IORING_OP_WRITE: _bindgen_ty_2 = 23;
440 pub const IORING_OP_FADVISE: _bindgen_ty_2 = 24;
441 pub const IORING_OP_MADVISE: _bindgen_ty_2 = 25;
442 pub const IORING_OP_SEND: _bindgen_ty_2 = 26;
443 pub const IORING_OP_RECV: _bindgen_ty_2 = 27;
444 pub const IORING_OP_OPENAT2: _bindgen_ty_2 = 28;
445 pub const IORING_OP_EPOLL_CTL: _bindgen_ty_2 = 29;
446 pub const IORING_OP_LAST: _bindgen_ty_2 = 30;
447 pub type _bindgen_ty_2 = ::std::os::raw::c_uint;
448 #[repr(C)]
449 #[derive(Debug, Default, Copy, Clone)]
450 pub struct io_uring_cqe {
451     pub user_data: u64,
452     pub res: i32,
453     pub flags: u32,
454 }
455 #[repr(C)]
456 #[derive(Debug, Default, Copy, Clone)]
457 pub struct io_sqring_offsets {
458     pub head: u32,
459     pub tail: u32,
460     pub ring_mask: u32,
461     pub ring_entries: u32,
462     pub flags: u32,
463     pub dropped: u32,
464     pub array: u32,
465     pub resv1: u32,
466     pub resv2: u64,
467 }
468 #[repr(C)]
469 #[derive(Debug, Default, Copy, Clone)]
470 pub struct io_cqring_offsets {
471     pub head: u32,
472     pub tail: u32,
473     pub ring_mask: u32,
474     pub ring_entries: u32,
475     pub overflow: u32,
476     pub cqes: u32,
477     pub resv: [u64; 2usize],
478 }
479 #[repr(C)]
480 #[derive(Debug, Default, Copy, Clone)]
481 pub struct io_uring_params {
482     pub sq_entries: u32,
483     pub cq_entries: u32,
484     pub flags: u32,
485     pub sq_thread_cpu: u32,
486     pub sq_thread_idle: u32,
487     pub features: u32,
488     pub wq_fd: u32,
489     pub resv: [u32; 3usize],
490     pub sq_off: io_sqring_offsets,
491     pub cq_off: io_cqring_offsets,
492 }
493 #[repr(C)]
494 #[derive(Debug, Default, Copy, Clone)]
495 pub struct io_uring_files_update {
496     pub offset: u32,
497     pub resv: u32,
498     pub fds: u64,
499 }
500 #[repr(C)]
501 #[derive(Debug, Default, Copy, Clone)]
502 pub struct io_uring_probe_op {
503     pub op: u8,
504     pub resv: u8,
505     pub flags: u16,
506     pub resv2: u32,
507 }
508 #[repr(C)]
509 #[derive(Debug, Default)]
510 pub struct io_uring_probe {
511     pub last_op: u8,
512     pub ops_len: u8,
513     pub resv: u16,
514     pub resv2: [u32; 3usize],
515     pub ops: __IncompleteArrayField<io_uring_probe_op>,
516 }
517