1#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
2#![cfg_attr(not(feature = "std"), no_std)]
3
4#[cfg(feature = "std")]
5pub use std::os::raw as ctypes;
6
7#[cfg(all(not(feature = "std"), feature = "no_std"))]
8pub mod ctypes {
9 // The signedness of `char` is platform-specific, however a consequence
10 // of it being platform-specific is that any code which depends on the
11 // signedness of `char` is already non-portable. So we can just use `u8`
12 // here and no portable code will notice.
13 pub type c_char = u8;
14
15 // The following assumes that Linux is always either ILP32 or LP64,
16 // and char is always 8-bit.
17 //
18 // In theory, `c_long` and `c_ulong` could be `isize` and `usize`
19 // respectively, however in practice Linux doesn't use them in that way
20 // consistently. So stick with the convention followed by `libc` and
21 // others and use the fixed-width types.
22 pub type c_schar = i8;
23 pub type c_uchar = u8;
24 pub type c_short = i16;
25 pub type c_ushort = u16;
26 pub type c_int = i32;
27 pub type c_uint = u32;
28 #[cfg(target_pointer_width = "32")]
29 pub type c_long = i32;
30 #[cfg(target_pointer_width = "32")]
31 pub type c_ulong = u32;
32 #[cfg(target_pointer_width = "64")]
33 pub type c_long = i64;
34 #[cfg(target_pointer_width = "64")]
35 pub type c_ulong = u64;
36 pub type c_longlong = i64;
37 pub type c_ulonglong = u64;
38 pub type c_float = f32;
39 pub type c_double = f64;
40
41 pub use core::ffi::c_void;
42}
43
44// Confirm that our type definitions above match the actual type definitions.
45#[cfg(test)]
46mod assertions {
47 use super::ctypes;
48 static_assertions::assert_eq_size!(ctypes::c_char, libc::c_char);
49 static_assertions::assert_type_eq_all!(ctypes::c_schar, libc::c_schar);
50 static_assertions::assert_type_eq_all!(ctypes::c_uchar, libc::c_uchar);
51 static_assertions::assert_type_eq_all!(ctypes::c_short, libc::c_short);
52 static_assertions::assert_type_eq_all!(ctypes::c_ushort, libc::c_ushort);
53 static_assertions::assert_type_eq_all!(ctypes::c_int, libc::c_int);
54 static_assertions::assert_type_eq_all!(ctypes::c_uint, libc::c_uint);
55 static_assertions::assert_type_eq_all!(ctypes::c_long, libc::c_long);
56 static_assertions::assert_type_eq_all!(ctypes::c_ulong, libc::c_ulong);
57 static_assertions::assert_type_eq_all!(ctypes::c_longlong, libc::c_longlong);
58 static_assertions::assert_type_eq_all!(ctypes::c_ulonglong, libc::c_ulonglong);
59 static_assertions::assert_type_eq_all!(ctypes::c_float, libc::c_float);
60 static_assertions::assert_type_eq_all!(ctypes::c_double, libc::c_double);
61}
62
63// We don't enable `derive_eq` in bindgen because adding `PartialEq`/`Eq` to
64// *all* structs noticeably increases compile times. But we can add a few
65// manual impls where they're especially useful.
66#[cfg(feature = "general")]
67impl PartialEq for general::__kernel_timespec {
68 fn eq(&self, other: &Self) -> bool {
69 ({
70 let Self { tv_sec, tv_nsec } = self;
71 (tv_sec, tv_nsec)
72 }) == ({
73 let Self { tv_sec, tv_nsec } = other;
74 (tv_sec, tv_nsec)
75 })
76 }
77}
78#[cfg(feature = "general")]
79impl Eq for general::__kernel_timespec {}
80
81#[cfg(feature = "net")]
82pub mod cmsg_macros {
83 use crate::ctypes::{c_long, c_uchar, c_uint};
84 use crate::net::{cmsghdr, msghdr};
85 use core::mem::size_of;
86 use core::ptr;
87
88 pub const unsafe fn CMSG_ALIGN(len: c_uint) -> c_uint {
89 let c_long_size = size_of::<c_long>() as c_uint;
90 (len + c_long_size - 1) & !(c_long_size - 1)
91 }
92
93 pub const unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar {
94 (cmsg as *mut c_uchar).add(size_of::<cmsghdr>())
95 }
96
97 pub const unsafe fn CMSG_SPACE(len: c_uint) -> c_uint {
98 size_of::<cmsghdr>() as c_uint + CMSG_ALIGN(len)
99 }
100
101 pub const unsafe fn CMSG_LEN(len: c_uint) -> c_uint {
102 size_of::<cmsghdr>() as c_uint + len
103 }
104
105 pub const unsafe fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr {
106 if (*mhdr).msg_controllen < size_of::<cmsghdr>() as _ {
107 return ptr::null_mut();
108 }
109
110 (*mhdr).msg_control as *mut cmsghdr
111 }
112
113 pub unsafe fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
114 // We convert from raw pointers to usize here, which may not be sound in a
115 // future version of Rust. Once the provenance rules are set in stone,
116 // it will be a good idea to give this function a once-over.
117
118 let cmsg_len = (*cmsg).cmsg_len;
119 let next_cmsg = (cmsg as *mut u8).add(CMSG_ALIGN(cmsg_len as _) as usize) as *mut cmsghdr;
120 let max = ((*mhdr).msg_control as usize) + ((*mhdr).msg_controllen as usize);
121
122 if cmsg_len < size_of::<cmsghdr>() as _ {
123 return ptr::null_mut();
124 }
125
126 if next_cmsg.add(1) as usize > max
127 || next_cmsg as usize + CMSG_ALIGN((*next_cmsg).cmsg_len as _) as usize > max
128 {
129 return ptr::null_mut();
130 }
131
132 next_cmsg
133 }
134}
135
136#[cfg(feature = "general")]
137pub mod select_macros {
138 use crate::ctypes::c_int;
139 use crate::general::__kernel_fd_set;
140 use core::mem::size_of;
141
142 pub unsafe fn FD_CLR(fd: c_int, set: *mut __kernel_fd_set) {
143 let bytes = set as *mut u8;
144 if fd >= 0 {
145 *bytes.add((fd / 8) as usize) &= !(1 << (fd % 8));
146 }
147 }
148
149 pub unsafe fn FD_SET(fd: c_int, set: *mut __kernel_fd_set) {
150 let bytes = set as *mut u8;
151 if fd >= 0 {
152 *bytes.add((fd / 8) as usize) |= 1 << (fd % 8);
153 }
154 }
155
156 pub unsafe fn FD_ISSET(fd: c_int, set: *const __kernel_fd_set) -> bool {
157 let bytes = set as *const u8;
158 if fd >= 0 {
159 *bytes.add((fd / 8) as usize) & (1 << (fd % 8)) != 0
160 } else {
161 false
162 }
163 }
164
165 pub unsafe fn FD_ZERO(set: *mut __kernel_fd_set) {
166 let bytes = set as *mut u8;
167 core::ptr::write_bytes(bytes, 0, size_of::<__kernel_fd_set>());
168 }
169}
170
171#[cfg(feature = "general")]
172pub mod signal_macros {
173 pub const SIG_DFL: super::general::__kernel_sighandler_t = None;
174
175 /// Rust doesn't currently permit us to use `transmute` to convert the
176 /// `SIG_IGN` value into a function pointer in a `const` initializer, so
177 /// we make it a function instead.
178 ///
179 #[inline]
180 pub const fn sig_ign() -> super::general::__kernel_sighandler_t {
181 // Safety: This creates an invalid pointer, but the pointer type
182 // includes `unsafe`, which covers the safety of calling it.
183 Some(unsafe {
184 core::mem::transmute::<usize, unsafe extern "C" fn(crate::ctypes::c_int)>(1)
185 })
186 }
187}
188
189#[cfg(feature = "elf")]
190pub mod elf;
191
192// The rest of this file is auto-generated!
193#[cfg(feature = "errno")]
194#[cfg(target_arch = "arm")]
195#[path = "arm/errno.rs"]
196pub mod errno;
197#[cfg(feature = "general")]
198#[cfg(target_arch = "arm")]
199#[path = "arm/general.rs"]
200pub mod general;
201#[cfg(feature = "if_ether")]
202#[cfg(target_arch = "arm")]
203#[path = "arm/if_ether.rs"]
204pub mod if_ether;
205#[cfg(feature = "io_uring")]
206#[cfg(target_arch = "arm")]
207#[path = "arm/io_uring.rs"]
208pub mod io_uring;
209#[cfg(feature = "ioctl")]
210#[cfg(target_arch = "arm")]
211#[path = "arm/ioctl.rs"]
212pub mod ioctl;
213#[cfg(feature = "mempolicy")]
214#[cfg(target_arch = "arm")]
215#[path = "arm/mempolicy.rs"]
216pub mod mempolicy;
217#[cfg(feature = "net")]
218#[cfg(target_arch = "arm")]
219#[path = "arm/net.rs"]
220pub mod net;
221#[cfg(feature = "netlink")]
222#[cfg(target_arch = "arm")]
223#[path = "arm/netlink.rs"]
224pub mod netlink;
225#[cfg(feature = "prctl")]
226#[cfg(target_arch = "arm")]
227#[path = "arm/prctl.rs"]
228pub mod prctl;
229#[cfg(feature = "system")]
230#[cfg(target_arch = "arm")]
231#[path = "arm/system.rs"]
232pub mod system;
233#[cfg(feature = "xdp")]
234#[cfg(target_arch = "arm")]
235#[path = "arm/xdp.rs"]
236pub mod xdp;
237#[cfg(feature = "errno")]
238#[cfg(target_arch = "aarch64")]
239#[path = "aarch64/errno.rs"]
240pub mod errno;
241#[cfg(feature = "general")]
242#[cfg(target_arch = "aarch64")]
243#[path = "aarch64/general.rs"]
244pub mod general;
245#[cfg(feature = "if_ether")]
246#[cfg(target_arch = "aarch64")]
247#[path = "aarch64/if_ether.rs"]
248pub mod if_ether;
249#[cfg(feature = "io_uring")]
250#[cfg(target_arch = "aarch64")]
251#[path = "aarch64/io_uring.rs"]
252pub mod io_uring;
253#[cfg(feature = "ioctl")]
254#[cfg(target_arch = "aarch64")]
255#[path = "aarch64/ioctl.rs"]
256pub mod ioctl;
257#[cfg(feature = "mempolicy")]
258#[cfg(target_arch = "aarch64")]
259#[path = "aarch64/mempolicy.rs"]
260pub mod mempolicy;
261#[cfg(feature = "net")]
262#[cfg(target_arch = "aarch64")]
263#[path = "aarch64/net.rs"]
264pub mod net;
265#[cfg(feature = "netlink")]
266#[cfg(target_arch = "aarch64")]
267#[path = "aarch64/netlink.rs"]
268pub mod netlink;
269#[cfg(feature = "prctl")]
270#[cfg(target_arch = "aarch64")]
271#[path = "aarch64/prctl.rs"]
272pub mod prctl;
273#[cfg(feature = "system")]
274#[cfg(target_arch = "aarch64")]
275#[path = "aarch64/system.rs"]
276pub mod system;
277#[cfg(feature = "xdp")]
278#[cfg(target_arch = "aarch64")]
279#[path = "aarch64/xdp.rs"]
280pub mod xdp;
281#[cfg(feature = "errno")]
282#[cfg(target_arch = "csky")]
283#[path = "csky/errno.rs"]
284pub mod errno;
285#[cfg(feature = "general")]
286#[cfg(target_arch = "csky")]
287#[path = "csky/general.rs"]
288pub mod general;
289#[cfg(feature = "if_ether")]
290#[cfg(target_arch = "csky")]
291#[path = "csky/if_ether.rs"]
292pub mod if_ether;
293#[cfg(feature = "io_uring")]
294#[cfg(target_arch = "csky")]
295#[path = "csky/io_uring.rs"]
296pub mod io_uring;
297#[cfg(feature = "ioctl")]
298#[cfg(target_arch = "csky")]
299#[path = "csky/ioctl.rs"]
300pub mod ioctl;
301#[cfg(feature = "mempolicy")]
302#[cfg(target_arch = "csky")]
303#[path = "csky/mempolicy.rs"]
304pub mod mempolicy;
305#[cfg(feature = "net")]
306#[cfg(target_arch = "csky")]
307#[path = "csky/net.rs"]
308pub mod net;
309#[cfg(feature = "netlink")]
310#[cfg(target_arch = "csky")]
311#[path = "csky/netlink.rs"]
312pub mod netlink;
313#[cfg(feature = "prctl")]
314#[cfg(target_arch = "csky")]
315#[path = "csky/prctl.rs"]
316pub mod prctl;
317#[cfg(feature = "system")]
318#[cfg(target_arch = "csky")]
319#[path = "csky/system.rs"]
320pub mod system;
321#[cfg(feature = "xdp")]
322#[cfg(target_arch = "csky")]
323#[path = "csky/xdp.rs"]
324pub mod xdp;
325#[cfg(feature = "errno")]
326#[cfg(target_arch = "loongarch64")]
327#[path = "loongarch64/errno.rs"]
328pub mod errno;
329#[cfg(feature = "general")]
330#[cfg(target_arch = "loongarch64")]
331#[path = "loongarch64/general.rs"]
332pub mod general;
333#[cfg(feature = "if_ether")]
334#[cfg(target_arch = "loongarch64")]
335#[path = "loongarch64/if_ether.rs"]
336pub mod if_ether;
337#[cfg(feature = "io_uring")]
338#[cfg(target_arch = "loongarch64")]
339#[path = "loongarch64/io_uring.rs"]
340pub mod io_uring;
341#[cfg(feature = "ioctl")]
342#[cfg(target_arch = "loongarch64")]
343#[path = "loongarch64/ioctl.rs"]
344pub mod ioctl;
345#[cfg(feature = "mempolicy")]
346#[cfg(target_arch = "loongarch64")]
347#[path = "loongarch64/mempolicy.rs"]
348pub mod mempolicy;
349#[cfg(feature = "net")]
350#[cfg(target_arch = "loongarch64")]
351#[path = "loongarch64/net.rs"]
352pub mod net;
353#[cfg(feature = "netlink")]
354#[cfg(target_arch = "loongarch64")]
355#[path = "loongarch64/netlink.rs"]
356pub mod netlink;
357#[cfg(feature = "prctl")]
358#[cfg(target_arch = "loongarch64")]
359#[path = "loongarch64/prctl.rs"]
360pub mod prctl;
361#[cfg(feature = "system")]
362#[cfg(target_arch = "loongarch64")]
363#[path = "loongarch64/system.rs"]
364pub mod system;
365#[cfg(feature = "xdp")]
366#[cfg(target_arch = "loongarch64")]
367#[path = "loongarch64/xdp.rs"]
368pub mod xdp;
369#[cfg(feature = "errno")]
370#[cfg(target_arch = "mips")]
371#[path = "mips/errno.rs"]
372pub mod errno;
373#[cfg(feature = "general")]
374#[cfg(target_arch = "mips")]
375#[path = "mips/general.rs"]
376pub mod general;
377#[cfg(feature = "if_ether")]
378#[cfg(target_arch = "mips")]
379#[path = "mips/if_ether.rs"]
380pub mod if_ether;
381#[cfg(feature = "io_uring")]
382#[cfg(target_arch = "mips")]
383#[path = "mips/io_uring.rs"]
384pub mod io_uring;
385#[cfg(feature = "ioctl")]
386#[cfg(target_arch = "mips")]
387#[path = "mips/ioctl.rs"]
388pub mod ioctl;
389#[cfg(feature = "mempolicy")]
390#[cfg(target_arch = "mips")]
391#[path = "mips/mempolicy.rs"]
392pub mod mempolicy;
393#[cfg(feature = "net")]
394#[cfg(target_arch = "mips")]
395#[path = "mips/net.rs"]
396pub mod net;
397#[cfg(feature = "netlink")]
398#[cfg(target_arch = "mips")]
399#[path = "mips/netlink.rs"]
400pub mod netlink;
401#[cfg(feature = "prctl")]
402#[cfg(target_arch = "mips")]
403#[path = "mips/prctl.rs"]
404pub mod prctl;
405#[cfg(feature = "system")]
406#[cfg(target_arch = "mips")]
407#[path = "mips/system.rs"]
408pub mod system;
409#[cfg(feature = "xdp")]
410#[cfg(target_arch = "mips")]
411#[path = "mips/xdp.rs"]
412pub mod xdp;
413#[cfg(feature = "errno")]
414#[cfg(target_arch = "mips64")]
415#[path = "mips64/errno.rs"]
416pub mod errno;
417#[cfg(feature = "general")]
418#[cfg(target_arch = "mips64")]
419#[path = "mips64/general.rs"]
420pub mod general;
421#[cfg(feature = "if_ether")]
422#[cfg(target_arch = "mips64")]
423#[path = "mips64/if_ether.rs"]
424pub mod if_ether;
425#[cfg(feature = "io_uring")]
426#[cfg(target_arch = "mips64")]
427#[path = "mips64/io_uring.rs"]
428pub mod io_uring;
429#[cfg(feature = "ioctl")]
430#[cfg(target_arch = "mips64")]
431#[path = "mips64/ioctl.rs"]
432pub mod ioctl;
433#[cfg(feature = "mempolicy")]
434#[cfg(target_arch = "mips64")]
435#[path = "mips64/mempolicy.rs"]
436pub mod mempolicy;
437#[cfg(feature = "net")]
438#[cfg(target_arch = "mips64")]
439#[path = "mips64/net.rs"]
440pub mod net;
441#[cfg(feature = "netlink")]
442#[cfg(target_arch = "mips64")]
443#[path = "mips64/netlink.rs"]
444pub mod netlink;
445#[cfg(feature = "prctl")]
446#[cfg(target_arch = "mips64")]
447#[path = "mips64/prctl.rs"]
448pub mod prctl;
449#[cfg(feature = "system")]
450#[cfg(target_arch = "mips64")]
451#[path = "mips64/system.rs"]
452pub mod system;
453#[cfg(feature = "xdp")]
454#[cfg(target_arch = "mips64")]
455#[path = "mips64/xdp.rs"]
456pub mod xdp;
457#[cfg(feature = "errno")]
458#[cfg(target_arch = "mips32r6")]
459#[path = "mips32r6/errno.rs"]
460pub mod errno;
461#[cfg(feature = "general")]
462#[cfg(target_arch = "mips32r6")]
463#[path = "mips32r6/general.rs"]
464pub mod general;
465#[cfg(feature = "if_ether")]
466#[cfg(target_arch = "mips32r6")]
467#[path = "mips32r6/if_ether.rs"]
468pub mod if_ether;
469#[cfg(feature = "io_uring")]
470#[cfg(target_arch = "mips32r6")]
471#[path = "mips32r6/io_uring.rs"]
472pub mod io_uring;
473#[cfg(feature = "ioctl")]
474#[cfg(target_arch = "mips32r6")]
475#[path = "mips32r6/ioctl.rs"]
476pub mod ioctl;
477#[cfg(feature = "mempolicy")]
478#[cfg(target_arch = "mips32r6")]
479#[path = "mips32r6/mempolicy.rs"]
480pub mod mempolicy;
481#[cfg(feature = "net")]
482#[cfg(target_arch = "mips32r6")]
483#[path = "mips32r6/net.rs"]
484pub mod net;
485#[cfg(feature = "netlink")]
486#[cfg(target_arch = "mips32r6")]
487#[path = "mips32r6/netlink.rs"]
488pub mod netlink;
489#[cfg(feature = "prctl")]
490#[cfg(target_arch = "mips32r6")]
491#[path = "mips32r6/prctl.rs"]
492pub mod prctl;
493#[cfg(feature = "system")]
494#[cfg(target_arch = "mips32r6")]
495#[path = "mips32r6/system.rs"]
496pub mod system;
497#[cfg(feature = "xdp")]
498#[cfg(target_arch = "mips32r6")]
499#[path = "mips32r6/xdp.rs"]
500pub mod xdp;
501#[cfg(feature = "errno")]
502#[cfg(target_arch = "mips64r6")]
503#[path = "mips64r6/errno.rs"]
504pub mod errno;
505#[cfg(feature = "general")]
506#[cfg(target_arch = "mips64r6")]
507#[path = "mips64r6/general.rs"]
508pub mod general;
509#[cfg(feature = "if_ether")]
510#[cfg(target_arch = "mips64r6")]
511#[path = "mips64r6/if_ether.rs"]
512pub mod if_ether;
513#[cfg(feature = "io_uring")]
514#[cfg(target_arch = "mips64r6")]
515#[path = "mips64r6/io_uring.rs"]
516pub mod io_uring;
517#[cfg(feature = "ioctl")]
518#[cfg(target_arch = "mips64r6")]
519#[path = "mips64r6/ioctl.rs"]
520pub mod ioctl;
521#[cfg(feature = "mempolicy")]
522#[cfg(target_arch = "mips64r6")]
523#[path = "mips64r6/mempolicy.rs"]
524pub mod mempolicy;
525#[cfg(feature = "net")]
526#[cfg(target_arch = "mips64r6")]
527#[path = "mips64r6/net.rs"]
528pub mod net;
529#[cfg(feature = "netlink")]
530#[cfg(target_arch = "mips64r6")]
531#[path = "mips64r6/netlink.rs"]
532pub mod netlink;
533#[cfg(feature = "prctl")]
534#[cfg(target_arch = "mips64r6")]
535#[path = "mips64r6/prctl.rs"]
536pub mod prctl;
537#[cfg(feature = "system")]
538#[cfg(target_arch = "mips64r6")]
539#[path = "mips64r6/system.rs"]
540pub mod system;
541#[cfg(feature = "xdp")]
542#[cfg(target_arch = "mips64r6")]
543#[path = "mips64r6/xdp.rs"]
544pub mod xdp;
545#[cfg(feature = "errno")]
546#[cfg(target_arch = "powerpc")]
547#[path = "powerpc/errno.rs"]
548pub mod errno;
549#[cfg(feature = "general")]
550#[cfg(target_arch = "powerpc")]
551#[path = "powerpc/general.rs"]
552pub mod general;
553#[cfg(feature = "if_ether")]
554#[cfg(target_arch = "powerpc")]
555#[path = "powerpc/if_ether.rs"]
556pub mod if_ether;
557#[cfg(feature = "io_uring")]
558#[cfg(target_arch = "powerpc")]
559#[path = "powerpc/io_uring.rs"]
560pub mod io_uring;
561#[cfg(feature = "ioctl")]
562#[cfg(target_arch = "powerpc")]
563#[path = "powerpc/ioctl.rs"]
564pub mod ioctl;
565#[cfg(feature = "mempolicy")]
566#[cfg(target_arch = "powerpc")]
567#[path = "powerpc/mempolicy.rs"]
568pub mod mempolicy;
569#[cfg(feature = "net")]
570#[cfg(target_arch = "powerpc")]
571#[path = "powerpc/net.rs"]
572pub mod net;
573#[cfg(feature = "netlink")]
574#[cfg(target_arch = "powerpc")]
575#[path = "powerpc/netlink.rs"]
576pub mod netlink;
577#[cfg(feature = "prctl")]
578#[cfg(target_arch = "powerpc")]
579#[path = "powerpc/prctl.rs"]
580pub mod prctl;
581#[cfg(feature = "system")]
582#[cfg(target_arch = "powerpc")]
583#[path = "powerpc/system.rs"]
584pub mod system;
585#[cfg(feature = "xdp")]
586#[cfg(target_arch = "powerpc")]
587#[path = "powerpc/xdp.rs"]
588pub mod xdp;
589#[cfg(feature = "errno")]
590#[cfg(target_arch = "powerpc64")]
591#[path = "powerpc64/errno.rs"]
592pub mod errno;
593#[cfg(feature = "general")]
594#[cfg(target_arch = "powerpc64")]
595#[path = "powerpc64/general.rs"]
596pub mod general;
597#[cfg(feature = "if_ether")]
598#[cfg(target_arch = "powerpc64")]
599#[path = "powerpc64/if_ether.rs"]
600pub mod if_ether;
601#[cfg(feature = "io_uring")]
602#[cfg(target_arch = "powerpc64")]
603#[path = "powerpc64/io_uring.rs"]
604pub mod io_uring;
605#[cfg(feature = "ioctl")]
606#[cfg(target_arch = "powerpc64")]
607#[path = "powerpc64/ioctl.rs"]
608pub mod ioctl;
609#[cfg(feature = "mempolicy")]
610#[cfg(target_arch = "powerpc64")]
611#[path = "powerpc64/mempolicy.rs"]
612pub mod mempolicy;
613#[cfg(feature = "net")]
614#[cfg(target_arch = "powerpc64")]
615#[path = "powerpc64/net.rs"]
616pub mod net;
617#[cfg(feature = "netlink")]
618#[cfg(target_arch = "powerpc64")]
619#[path = "powerpc64/netlink.rs"]
620pub mod netlink;
621#[cfg(feature = "prctl")]
622#[cfg(target_arch = "powerpc64")]
623#[path = "powerpc64/prctl.rs"]
624pub mod prctl;
625#[cfg(feature = "system")]
626#[cfg(target_arch = "powerpc64")]
627#[path = "powerpc64/system.rs"]
628pub mod system;
629#[cfg(feature = "xdp")]
630#[cfg(target_arch = "powerpc64")]
631#[path = "powerpc64/xdp.rs"]
632pub mod xdp;
633#[cfg(feature = "errno")]
634#[cfg(target_arch = "riscv32")]
635#[path = "riscv32/errno.rs"]
636pub mod errno;
637#[cfg(feature = "general")]
638#[cfg(target_arch = "riscv32")]
639#[path = "riscv32/general.rs"]
640pub mod general;
641#[cfg(feature = "if_ether")]
642#[cfg(target_arch = "riscv32")]
643#[path = "riscv32/if_ether.rs"]
644pub mod if_ether;
645#[cfg(feature = "io_uring")]
646#[cfg(target_arch = "riscv32")]
647#[path = "riscv32/io_uring.rs"]
648pub mod io_uring;
649#[cfg(feature = "ioctl")]
650#[cfg(target_arch = "riscv32")]
651#[path = "riscv32/ioctl.rs"]
652pub mod ioctl;
653#[cfg(feature = "mempolicy")]
654#[cfg(target_arch = "riscv32")]
655#[path = "riscv32/mempolicy.rs"]
656pub mod mempolicy;
657#[cfg(feature = "net")]
658#[cfg(target_arch = "riscv32")]
659#[path = "riscv32/net.rs"]
660pub mod net;
661#[cfg(feature = "netlink")]
662#[cfg(target_arch = "riscv32")]
663#[path = "riscv32/netlink.rs"]
664pub mod netlink;
665#[cfg(feature = "prctl")]
666#[cfg(target_arch = "riscv32")]
667#[path = "riscv32/prctl.rs"]
668pub mod prctl;
669#[cfg(feature = "system")]
670#[cfg(target_arch = "riscv32")]
671#[path = "riscv32/system.rs"]
672pub mod system;
673#[cfg(feature = "xdp")]
674#[cfg(target_arch = "riscv32")]
675#[path = "riscv32/xdp.rs"]
676pub mod xdp;
677#[cfg(feature = "errno")]
678#[cfg(target_arch = "riscv64")]
679#[path = "riscv64/errno.rs"]
680pub mod errno;
681#[cfg(feature = "general")]
682#[cfg(target_arch = "riscv64")]
683#[path = "riscv64/general.rs"]
684pub mod general;
685#[cfg(feature = "if_ether")]
686#[cfg(target_arch = "riscv64")]
687#[path = "riscv64/if_ether.rs"]
688pub mod if_ether;
689#[cfg(feature = "io_uring")]
690#[cfg(target_arch = "riscv64")]
691#[path = "riscv64/io_uring.rs"]
692pub mod io_uring;
693#[cfg(feature = "ioctl")]
694#[cfg(target_arch = "riscv64")]
695#[path = "riscv64/ioctl.rs"]
696pub mod ioctl;
697#[cfg(feature = "mempolicy")]
698#[cfg(target_arch = "riscv64")]
699#[path = "riscv64/mempolicy.rs"]
700pub mod mempolicy;
701#[cfg(feature = "net")]
702#[cfg(target_arch = "riscv64")]
703#[path = "riscv64/net.rs"]
704pub mod net;
705#[cfg(feature = "netlink")]
706#[cfg(target_arch = "riscv64")]
707#[path = "riscv64/netlink.rs"]
708pub mod netlink;
709#[cfg(feature = "prctl")]
710#[cfg(target_arch = "riscv64")]
711#[path = "riscv64/prctl.rs"]
712pub mod prctl;
713#[cfg(feature = "system")]
714#[cfg(target_arch = "riscv64")]
715#[path = "riscv64/system.rs"]
716pub mod system;
717#[cfg(feature = "xdp")]
718#[cfg(target_arch = "riscv64")]
719#[path = "riscv64/xdp.rs"]
720pub mod xdp;
721#[cfg(feature = "errno")]
722#[cfg(target_arch = "s390x")]
723#[path = "s390x/errno.rs"]
724pub mod errno;
725#[cfg(feature = "general")]
726#[cfg(target_arch = "s390x")]
727#[path = "s390x/general.rs"]
728pub mod general;
729#[cfg(feature = "if_ether")]
730#[cfg(target_arch = "s390x")]
731#[path = "s390x/if_ether.rs"]
732pub mod if_ether;
733#[cfg(feature = "io_uring")]
734#[cfg(target_arch = "s390x")]
735#[path = "s390x/io_uring.rs"]
736pub mod io_uring;
737#[cfg(feature = "ioctl")]
738#[cfg(target_arch = "s390x")]
739#[path = "s390x/ioctl.rs"]
740pub mod ioctl;
741#[cfg(feature = "mempolicy")]
742#[cfg(target_arch = "s390x")]
743#[path = "s390x/mempolicy.rs"]
744pub mod mempolicy;
745#[cfg(feature = "net")]
746#[cfg(target_arch = "s390x")]
747#[path = "s390x/net.rs"]
748pub mod net;
749#[cfg(feature = "netlink")]
750#[cfg(target_arch = "s390x")]
751#[path = "s390x/netlink.rs"]
752pub mod netlink;
753#[cfg(feature = "prctl")]
754#[cfg(target_arch = "s390x")]
755#[path = "s390x/prctl.rs"]
756pub mod prctl;
757#[cfg(feature = "system")]
758#[cfg(target_arch = "s390x")]
759#[path = "s390x/system.rs"]
760pub mod system;
761#[cfg(feature = "xdp")]
762#[cfg(target_arch = "s390x")]
763#[path = "s390x/xdp.rs"]
764pub mod xdp;
765#[cfg(feature = "errno")]
766#[cfg(target_arch = "sparc")]
767#[path = "sparc/errno.rs"]
768pub mod errno;
769#[cfg(feature = "general")]
770#[cfg(target_arch = "sparc")]
771#[path = "sparc/general.rs"]
772pub mod general;
773#[cfg(feature = "if_ether")]
774#[cfg(target_arch = "sparc")]
775#[path = "sparc/if_ether.rs"]
776pub mod if_ether;
777#[cfg(feature = "io_uring")]
778#[cfg(target_arch = "sparc")]
779#[path = "sparc/io_uring.rs"]
780pub mod io_uring;
781#[cfg(feature = "ioctl")]
782#[cfg(target_arch = "sparc")]
783#[path = "sparc/ioctl.rs"]
784pub mod ioctl;
785#[cfg(feature = "mempolicy")]
786#[cfg(target_arch = "sparc")]
787#[path = "sparc/mempolicy.rs"]
788pub mod mempolicy;
789#[cfg(feature = "net")]
790#[cfg(target_arch = "sparc")]
791#[path = "sparc/net.rs"]
792pub mod net;
793#[cfg(feature = "netlink")]
794#[cfg(target_arch = "sparc")]
795#[path = "sparc/netlink.rs"]
796pub mod netlink;
797#[cfg(feature = "prctl")]
798#[cfg(target_arch = "sparc")]
799#[path = "sparc/prctl.rs"]
800pub mod prctl;
801#[cfg(feature = "system")]
802#[cfg(target_arch = "sparc")]
803#[path = "sparc/system.rs"]
804pub mod system;
805#[cfg(feature = "xdp")]
806#[cfg(target_arch = "sparc")]
807#[path = "sparc/xdp.rs"]
808pub mod xdp;
809#[cfg(feature = "errno")]
810#[cfg(target_arch = "sparc64")]
811#[path = "sparc64/errno.rs"]
812pub mod errno;
813#[cfg(feature = "general")]
814#[cfg(target_arch = "sparc64")]
815#[path = "sparc64/general.rs"]
816pub mod general;
817#[cfg(feature = "if_ether")]
818#[cfg(target_arch = "sparc64")]
819#[path = "sparc64/if_ether.rs"]
820pub mod if_ether;
821#[cfg(feature = "io_uring")]
822#[cfg(target_arch = "sparc64")]
823#[path = "sparc64/io_uring.rs"]
824pub mod io_uring;
825#[cfg(feature = "ioctl")]
826#[cfg(target_arch = "sparc64")]
827#[path = "sparc64/ioctl.rs"]
828pub mod ioctl;
829#[cfg(feature = "mempolicy")]
830#[cfg(target_arch = "sparc64")]
831#[path = "sparc64/mempolicy.rs"]
832pub mod mempolicy;
833#[cfg(feature = "net")]
834#[cfg(target_arch = "sparc64")]
835#[path = "sparc64/net.rs"]
836pub mod net;
837#[cfg(feature = "netlink")]
838#[cfg(target_arch = "sparc64")]
839#[path = "sparc64/netlink.rs"]
840pub mod netlink;
841#[cfg(feature = "prctl")]
842#[cfg(target_arch = "sparc64")]
843#[path = "sparc64/prctl.rs"]
844pub mod prctl;
845#[cfg(feature = "system")]
846#[cfg(target_arch = "sparc64")]
847#[path = "sparc64/system.rs"]
848pub mod system;
849#[cfg(feature = "xdp")]
850#[cfg(target_arch = "sparc64")]
851#[path = "sparc64/xdp.rs"]
852pub mod xdp;
853#[cfg(feature = "errno")]
854#[cfg(target_arch = "x86")]
855#[path = "x86/errno.rs"]
856pub mod errno;
857#[cfg(feature = "general")]
858#[cfg(target_arch = "x86")]
859#[path = "x86/general.rs"]
860pub mod general;
861#[cfg(feature = "if_ether")]
862#[cfg(target_arch = "x86")]
863#[path = "x86/if_ether.rs"]
864pub mod if_ether;
865#[cfg(feature = "io_uring")]
866#[cfg(target_arch = "x86")]
867#[path = "x86/io_uring.rs"]
868pub mod io_uring;
869#[cfg(feature = "ioctl")]
870#[cfg(target_arch = "x86")]
871#[path = "x86/ioctl.rs"]
872pub mod ioctl;
873#[cfg(feature = "mempolicy")]
874#[cfg(target_arch = "x86")]
875#[path = "x86/mempolicy.rs"]
876pub mod mempolicy;
877#[cfg(feature = "net")]
878#[cfg(target_arch = "x86")]
879#[path = "x86/net.rs"]
880pub mod net;
881#[cfg(feature = "netlink")]
882#[cfg(target_arch = "x86")]
883#[path = "x86/netlink.rs"]
884pub mod netlink;
885#[cfg(feature = "prctl")]
886#[cfg(target_arch = "x86")]
887#[path = "x86/prctl.rs"]
888pub mod prctl;
889#[cfg(feature = "system")]
890#[cfg(target_arch = "x86")]
891#[path = "x86/system.rs"]
892pub mod system;
893#[cfg(feature = "xdp")]
894#[cfg(target_arch = "x86")]
895#[path = "x86/xdp.rs"]
896pub mod xdp;
897#[cfg(feature = "errno")]
898#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
899#[path = "x86_64/errno.rs"]
900pub mod errno;
901#[cfg(feature = "general")]
902#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
903#[path = "x86_64/general.rs"]
904pub mod general;
905#[cfg(feature = "if_ether")]
906#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
907#[path = "x86_64/if_ether.rs"]
908pub mod if_ether;
909#[cfg(feature = "io_uring")]
910#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
911#[path = "x86_64/io_uring.rs"]
912pub mod io_uring;
913#[cfg(feature = "ioctl")]
914#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
915#[path = "x86_64/ioctl.rs"]
916pub mod ioctl;
917#[cfg(feature = "mempolicy")]
918#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
919#[path = "x86_64/mempolicy.rs"]
920pub mod mempolicy;
921#[cfg(feature = "net")]
922#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
923#[path = "x86_64/net.rs"]
924pub mod net;
925#[cfg(feature = "netlink")]
926#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
927#[path = "x86_64/netlink.rs"]
928pub mod netlink;
929#[cfg(feature = "prctl")]
930#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
931#[path = "x86_64/prctl.rs"]
932pub mod prctl;
933#[cfg(feature = "system")]
934#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
935#[path = "x86_64/system.rs"]
936pub mod system;
937#[cfg(feature = "xdp")]
938#[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))]
939#[path = "x86_64/xdp.rs"]
940pub mod xdp;
941#[cfg(feature = "errno")]
942#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
943#[path = "x32/errno.rs"]
944pub mod errno;
945#[cfg(feature = "general")]
946#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
947#[path = "x32/general.rs"]
948pub mod general;
949#[cfg(feature = "if_ether")]
950#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
951#[path = "x32/if_ether.rs"]
952pub mod if_ether;
953#[cfg(feature = "io_uring")]
954#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
955#[path = "x32/io_uring.rs"]
956pub mod io_uring;
957#[cfg(feature = "ioctl")]
958#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
959#[path = "x32/ioctl.rs"]
960pub mod ioctl;
961#[cfg(feature = "mempolicy")]
962#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
963#[path = "x32/mempolicy.rs"]
964pub mod mempolicy;
965#[cfg(feature = "net")]
966#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
967#[path = "x32/net.rs"]
968pub mod net;
969#[cfg(feature = "netlink")]
970#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
971#[path = "x32/netlink.rs"]
972pub mod netlink;
973#[cfg(feature = "prctl")]
974#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
975#[path = "x32/prctl.rs"]
976pub mod prctl;
977#[cfg(feature = "system")]
978#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
979#[path = "x32/system.rs"]
980pub mod system;
981#[cfg(feature = "xdp")]
982#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
983#[path = "x32/xdp.rs"]
984pub mod xdp;
985