1pub type __priority_which_t = ::c_uint;
2
3s! {
4 pub struct aiocb {
5 pub aio_fildes: ::c_int,
6 pub aio_lio_opcode: ::c_int,
7 pub aio_reqprio: ::c_int,
8 pub aio_buf: *mut ::c_void,
9 pub aio_nbytes: ::size_t,
10 pub aio_sigevent: ::sigevent,
11 __next_prio: *mut aiocb,
12 __abs_prio: ::c_int,
13 __policy: ::c_int,
14 __error_code: ::c_int,
15 __return_value: ::ssize_t,
16 pub aio_offset: off_t,
17 #[cfg(all(not(target_arch = "x86_64"), target_pointer_width = "32"))]
18 __unused1: [::c_char; 4],
19 __glibc_reserved: [::c_char; 32]
20 }
21
22 pub struct __exit_status {
23 pub e_termination: ::c_short,
24 pub e_exit: ::c_short,
25 }
26
27 pub struct __timeval {
28 pub tv_sec: ::int32_t,
29 pub tv_usec: ::int32_t,
30 }
31
32 pub struct utmpx {
33 pub ut_type: ::c_short,
34 pub ut_pid: ::pid_t,
35 pub ut_line: [::c_char; __UT_LINESIZE],
36 pub ut_id: [::c_char; 4],
37
38 pub ut_user: [::c_char; __UT_NAMESIZE],
39 pub ut_host: [::c_char; __UT_HOSTSIZE],
40 pub ut_exit: __exit_status,
41
42 #[cfg(any(target_arch = "aarch64",
43 target_arch = "sparc64",
44 all(target_pointer_width = "32",
45 not(target_arch = "x86_64"))))]
46 pub ut_session: ::c_long,
47 #[cfg(any(target_arch = "aarch64",
48 target_arch = "sparc64",
49 all(target_pointer_width = "32",
50 not(target_arch = "x86_64"))))]
51 pub ut_tv: ::timeval,
52
53 #[cfg(not(any(target_arch = "aarch64",
54 target_arch = "sparc64",
55 all(target_pointer_width = "32",
56 not(target_arch = "x86_64")))))]
57 pub ut_session: ::int32_t,
58 #[cfg(not(any(target_arch = "aarch64",
59 target_arch = "sparc64",
60 all(target_pointer_width = "32",
61 not(target_arch = "x86_64")))))]
62 pub ut_tv: __timeval,
63
64 pub ut_addr_v6: [::int32_t; 4],
65 __glibc_reserved: [::c_char; 20],
66 }
67
68 pub struct sigaction {
69 pub sa_sigaction: ::sighandler_t,
70 pub sa_mask: ::sigset_t,
71 #[cfg(target_arch = "sparc64")]
72 __reserved0: ::c_int,
73 pub sa_flags: ::c_int,
74 pub sa_restorer: ::dox::Option<extern fn()>,
75 }
76
77 pub struct stack_t {
78 pub ss_sp: *mut ::c_void,
79 pub ss_flags: ::c_int,
80 pub ss_size: ::size_t
81 }
82
83 pub struct siginfo_t {
84 pub si_signo: ::c_int,
85 pub si_errno: ::c_int,
86 pub si_code: ::c_int,
87 pub _pad: [::c_int; 29],
88 #[cfg(target_arch = "x86_64")]
89 _align: [u64; 0],
90 #[cfg(not(target_arch = "x86_64"))]
91 _align: [usize; 0],
92 }
93
94 pub struct glob64_t {
95 pub gl_pathc: ::size_t,
96 pub gl_pathv: *mut *mut ::c_char,
97 pub gl_offs: ::size_t,
98 pub gl_flags: ::c_int,
99
100 __unused1: *mut ::c_void,
101 __unused2: *mut ::c_void,
102 __unused3: *mut ::c_void,
103 __unused4: *mut ::c_void,
104 __unused5: *mut ::c_void,
105 }
106
107 pub struct statfs {
108 pub f_type: __fsword_t,
109 pub f_bsize: __fsword_t,
110 pub f_blocks: ::fsblkcnt_t,
111 pub f_bfree: ::fsblkcnt_t,
112 pub f_bavail: ::fsblkcnt_t,
113
114 pub f_files: ::fsfilcnt_t,
115 pub f_ffree: ::fsfilcnt_t,
116 pub f_fsid: ::fsid_t,
117
118 pub f_namelen: __fsword_t,
119 pub f_frsize: __fsword_t,
120 f_spare: [__fsword_t; 5],
121 }
122
123 pub struct msghdr {
124 pub msg_name: *mut ::c_void,
125 pub msg_namelen: ::socklen_t,
126 pub msg_iov: *mut ::iovec,
127 pub msg_iovlen: ::size_t,
128 pub msg_control: *mut ::c_void,
129 pub msg_controllen: ::size_t,
130 pub msg_flags: ::c_int,
131 }
132
133 pub struct cmsghdr {
134 pub cmsg_len: ::size_t,
135 pub cmsg_level: ::c_int,
136 pub cmsg_type: ::c_int,
137 }
138
139 pub struct termios {
140 pub c_iflag: ::tcflag_t,
141 pub c_oflag: ::tcflag_t,
142 pub c_cflag: ::tcflag_t,
143 pub c_lflag: ::tcflag_t,
144 pub c_line: ::cc_t,
145 pub c_cc: [::cc_t; ::NCCS],
146 #[cfg(not(target_arch = "sparc64"))]
147 pub c_ispeed: ::speed_t,
148 #[cfg(not(target_arch = "sparc64"))]
149 pub c_ospeed: ::speed_t,
150 }
151
152 pub struct flock {
153 pub l_type: ::c_short,
154 pub l_whence: ::c_short,
155 pub l_start: ::off_t,
156 pub l_len: ::off_t,
157 pub l_pid: ::pid_t,
158 }
159
160 #[cfg_attr(all(feature = "align", target_pointer_width = "32"),
162 repr(align(4)))]
163 #[cfg_attr(all(feature = "align", target_pointer_width = "64"),
164 repr(align(8)))]
165 pub struct sem_t {
166 #[cfg(target_pointer_width = "32")]
167 __size: [::c_char; 16],
168 #[cfg(target_pointer_width = "64")]
169 __size: [::c_char; 32],
170 #[cfg(not(feature = "align"))]
171 __align: [::c_long; 0],
172 }
173
174 pub struct mallinfo {
175 pub arena: ::c_int,
176 pub ordblks: ::c_int,
177 pub smblks: ::c_int,
178 pub hblks: ::c_int,
179 pub hblkhd: ::c_int,
180 pub usmblks: ::c_int,
181 pub fsmblks: ::c_int,
182 pub uordblks: ::c_int,
183 pub fordblks: ::c_int,
184 pub keepcost: ::c_int,
185 }
186
187 pub struct nlmsghdr {
188 pub nlmsg_len: u32,
189 pub nlmsg_type: u16,
190 pub nlmsg_flags: u16,
191 pub nlmsg_seq: u32,
192 pub nlmsg_pid: u32,
193 }
194
195 pub struct nlmsgerr {
196 pub error: ::c_int,
197 pub msg: nlmsghdr,
198 }
199
200 pub struct nl_pktinfo {
201 pub group: u32,
202 }
203
204 pub struct nl_mmap_req {
205 pub nm_block_size: ::c_uint,
206 pub nm_block_nr: ::c_uint,
207 pub nm_frame_size: ::c_uint,
208 pub nm_frame_nr: ::c_uint,
209 }
210
211 pub struct nl_mmap_hdr {
212 pub nm_status: ::c_uint,
213 pub nm_len: ::c_uint,
214 pub nm_group: u32,
215 pub nm_pid: u32,
216 pub nm_uid: u32,
217 pub nm_gid: u32,
218 }
219
220 pub struct nlattr {
221 pub nla_len: u16,
222 pub nla_type: u16,
223 }
224
225 pub struct rtentry {
226 pub rt_pad1: ::c_ulong,
227 pub rt_dst: ::sockaddr,
228 pub rt_gateway: ::sockaddr,
229 pub rt_genmask: ::sockaddr,
230 pub rt_flags: ::c_ushort,
231 pub rt_pad2: ::c_short,
232 pub rt_pad3: ::c_ulong,
233 pub rt_tos: ::c_uchar,
234 pub rt_class: ::c_uchar,
235 #[cfg(target_pointer_width = "64")]
236 pub rt_pad4: [::c_short; 3usize],
237 #[cfg(not(target_pointer_width = "64"))]
238 pub rt_pad4: ::c_short,
239 pub rt_metric: ::c_short,
240 pub rt_dev: *mut ::c_char,
241 pub rt_mtu: ::c_ulong,
242 pub rt_window: ::c_ulong,
243 pub rt_irtt: ::c_ushort,
244 }
245}
246
247pub const __UT_LINESIZE: usize = 32;
248pub const __UT_NAMESIZE: usize = 32;
249pub const __UT_HOSTSIZE: usize = 256;
250pub const EMPTY: ::c_short = 0;
251pub const RUN_LVL: ::c_short = 1;
252pub const BOOT_TIME: ::c_short = 2;
253pub const NEW_TIME: ::c_short = 3;
254pub const OLD_TIME: ::c_short = 4;
255pub const INIT_PROCESS: ::c_short = 5;
256pub const LOGIN_PROCESS: ::c_short = 6;
257pub const USER_PROCESS: ::c_short = 7;
258pub const DEAD_PROCESS: ::c_short = 8;
259pub const ACCOUNTING: ::c_short = 9;
260
261pub const RLIMIT_RSS: ::c_int = 5;
262pub const RLIMIT_AS: ::c_int = 9;
263pub const RLIMIT_MEMLOCK: ::c_int = 8;
264pub const RLIM_INFINITY: ::rlim_t = !0;
265pub const RLIMIT_RTTIME: ::c_int = 15;
266pub const RLIMIT_NLIMITS: ::c_int = 16;
267
268pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
269
270pub const SOL_RXRPC: ::c_int = 272;
271pub const SOL_PPPOL2TP: ::c_int = 273;
272pub const SOL_BLUETOOTH: ::c_int = 274;
273pub const SOL_PNPIPE: ::c_int = 275;
274pub const SOL_RDS: ::c_int = 276;
275pub const SOL_IUCV: ::c_int = 277;
276pub const SOL_CAIF: ::c_int = 278;
277pub const SOL_ALG: ::c_int = 279;
278pub const SOL_NFC: ::c_int = 280;
279
280pub const MSG_TRYHARD: ::c_int = 4;
281
282pub const LC_PAPER: ::c_int = 7;
283pub const LC_NAME: ::c_int = 8;
284pub const LC_ADDRESS: ::c_int = 9;
285pub const LC_TELEPHONE: ::c_int = 10;
286pub const LC_MEASUREMENT: ::c_int = 11;
287pub const LC_IDENTIFICATION: ::c_int = 12;
288pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
289pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
290pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
291pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
292pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
293pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
294pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
295 | ::LC_NUMERIC_MASK
296 | ::LC_TIME_MASK
297 | ::LC_COLLATE_MASK
298 | ::LC_MONETARY_MASK
299 | ::LC_MESSAGES_MASK
300 | LC_PAPER_MASK
301 | LC_NAME_MASK
302 | LC_ADDRESS_MASK
303 | LC_TELEPHONE_MASK
304 | LC_MEASUREMENT_MASK
305 | LC_IDENTIFICATION_MASK;
306
307pub const MAP_ANON: ::c_int = 0x0020;
308pub const MAP_ANONYMOUS: ::c_int = 0x0020;
309pub const MAP_DENYWRITE: ::c_int = 0x0800;
310pub const MAP_EXECUTABLE: ::c_int = 0x01000;
311pub const MAP_POPULATE: ::c_int = 0x08000;
312pub const MAP_NONBLOCK: ::c_int = 0x010000;
313pub const MAP_STACK: ::c_int = 0x020000;
314
315pub const ENOTSUP: ::c_int = EOPNOTSUPP;
316pub const EUCLEAN: ::c_int = 117;
317pub const ENOTNAM: ::c_int = 118;
318pub const ENAVAIL: ::c_int = 119;
319pub const EISNAM: ::c_int = 120;
320pub const EREMOTEIO: ::c_int = 121;
321
322pub const SOCK_STREAM: ::c_int = 1;
323pub const SOCK_DGRAM: ::c_int = 2;
324pub const SOCK_SEQPACKET: ::c_int = 5;
325pub const SOCK_DCCP: ::c_int = 6;
326pub const SOCK_PACKET: ::c_int = 10;
327
328pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15;
329pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16;
330pub const TCP_THIN_DUPACK: ::c_int = 17;
331pub const TCP_USER_TIMEOUT: ::c_int = 18;
332pub const TCP_REPAIR: ::c_int = 19;
333pub const TCP_REPAIR_QUEUE: ::c_int = 20;
334pub const TCP_QUEUE_SEQ: ::c_int = 21;
335pub const TCP_REPAIR_OPTIONS: ::c_int = 22;
336pub const TCP_FASTOPEN: ::c_int = 23;
337pub const TCP_TIMESTAMP: ::c_int = 24;
338
339pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1;
341pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2;
342pub const DCCP_SOCKOPT_CHANGE_L: ::c_int = 3;
343pub const DCCP_SOCKOPT_CHANGE_R: ::c_int = 4;
344pub const DCCP_SOCKOPT_GET_CUR_MPS: ::c_int = 5;
345pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: ::c_int = 6;
346pub const DCCP_SOCKOPT_SEND_CSCOV: ::c_int = 10;
347pub const DCCP_SOCKOPT_RECV_CSCOV: ::c_int = 11;
348pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: ::c_int = 12;
349pub const DCCP_SOCKOPT_CCID: ::c_int = 13;
350pub const DCCP_SOCKOPT_TX_CCID: ::c_int = 14;
351pub const DCCP_SOCKOPT_RX_CCID: ::c_int = 15;
352pub const DCCP_SOCKOPT_QPOLICY_ID: ::c_int = 16;
353pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: ::c_int = 17;
354pub const DCCP_SOCKOPT_CCID_RX_INFO: ::c_int = 128;
355pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192;
356
357pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32;
359
360pub const SIGTTIN: ::c_int = 21;
361pub const SIGTTOU: ::c_int = 22;
362pub const SIGXCPU: ::c_int = 24;
363pub const SIGXFSZ: ::c_int = 25;
364pub const SIGVTALRM: ::c_int = 26;
365pub const SIGPROF: ::c_int = 27;
366pub const SIGWINCH: ::c_int = 28;
367
368pub const SIGEV_THREAD_ID: ::c_int = 4;
369
370pub const BUFSIZ: ::c_uint = 8192;
371pub const TMP_MAX: ::c_uint = 238328;
372pub const FOPEN_MAX: ::c_uint = 16;
373pub const POSIX_FADV_DONTNEED: ::c_int = 4;
374pub const POSIX_FADV_NOREUSE: ::c_int = 5;
375pub const POSIX_MADV_DONTNEED: ::c_int = 4;
376pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
377pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
378pub const _SC_PII: ::c_int = 53;
379pub const _SC_PII_XTI: ::c_int = 54;
380pub const _SC_PII_SOCKET: ::c_int = 55;
381pub const _SC_PII_INTERNET: ::c_int = 56;
382pub const _SC_PII_OSI: ::c_int = 57;
383pub const _SC_POLL: ::c_int = 58;
384pub const _SC_SELECT: ::c_int = 59;
385pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
386pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
387pub const _SC_PII_OSI_COTS: ::c_int = 63;
388pub const _SC_PII_OSI_CLTS: ::c_int = 64;
389pub const _SC_PII_OSI_M: ::c_int = 65;
390pub const _SC_T_IOV_MAX: ::c_int = 66;
391pub const _SC_2_C_VERSION: ::c_int = 96;
392pub const _SC_CHAR_BIT: ::c_int = 101;
393pub const _SC_CHAR_MAX: ::c_int = 102;
394pub const _SC_CHAR_MIN: ::c_int = 103;
395pub const _SC_INT_MAX: ::c_int = 104;
396pub const _SC_INT_MIN: ::c_int = 105;
397pub const _SC_LONG_BIT: ::c_int = 106;
398pub const _SC_WORD_BIT: ::c_int = 107;
399pub const _SC_MB_LEN_MAX: ::c_int = 108;
400pub const _SC_SSIZE_MAX: ::c_int = 110;
401pub const _SC_SCHAR_MAX: ::c_int = 111;
402pub const _SC_SCHAR_MIN: ::c_int = 112;
403pub const _SC_SHRT_MAX: ::c_int = 113;
404pub const _SC_SHRT_MIN: ::c_int = 114;
405pub const _SC_UCHAR_MAX: ::c_int = 115;
406pub const _SC_UINT_MAX: ::c_int = 116;
407pub const _SC_ULONG_MAX: ::c_int = 117;
408pub const _SC_USHRT_MAX: ::c_int = 118;
409pub const _SC_NL_ARGMAX: ::c_int = 119;
410pub const _SC_NL_LANGMAX: ::c_int = 120;
411pub const _SC_NL_MSGMAX: ::c_int = 121;
412pub const _SC_NL_NMAX: ::c_int = 122;
413pub const _SC_NL_SETMAX: ::c_int = 123;
414pub const _SC_NL_TEXTMAX: ::c_int = 124;
415pub const _SC_BASE: ::c_int = 134;
416pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
417pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
418pub const _SC_DEVICE_IO: ::c_int = 140;
419pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
420pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
421pub const _SC_FD_MGMT: ::c_int = 143;
422pub const _SC_FIFO: ::c_int = 144;
423pub const _SC_PIPE: ::c_int = 145;
424pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
425pub const _SC_FILE_LOCKING: ::c_int = 147;
426pub const _SC_FILE_SYSTEM: ::c_int = 148;
427pub const _SC_MULTI_PROCESS: ::c_int = 150;
428pub const _SC_SINGLE_PROCESS: ::c_int = 151;
429pub const _SC_NETWORKING: ::c_int = 152;
430pub const _SC_REGEX_VERSION: ::c_int = 156;
431pub const _SC_SIGNALS: ::c_int = 158;
432pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
433pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
434pub const _SC_USER_GROUPS: ::c_int = 166;
435pub const _SC_USER_GROUPS_R: ::c_int = 167;
436pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
437pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
438pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
439pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
440pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
441pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
442pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
443pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
444pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
445pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
446pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
447pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
448pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
449pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
450pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
451pub const O_ACCMODE: ::c_int = 3;
452pub const ST_RELATIME: ::c_ulong = 4096;
453pub const NI_MAXHOST: ::socklen_t = 1025;
454
455pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
456pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
457pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
458pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
459pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
460pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
461pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
462pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
463pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
464pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
465pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
466pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
467pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
468pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
469pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
470pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
471pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
472pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
473pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
474pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
475pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
476pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
477pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
478pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
479pub const TMPFS_MAGIC: ::c_long = 0x01021994;
480pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
481
482pub const VEOF: usize = 4;
483
484pub const CPU_SETSIZE: ::c_int = 0x400;
485
486pub const PTRACE_TRACEME: ::c_uint = 0;
487pub const PTRACE_PEEKTEXT: ::c_uint = 1;
488pub const PTRACE_PEEKDATA: ::c_uint = 2;
489pub const PTRACE_PEEKUSER: ::c_uint = 3;
490pub const PTRACE_POKETEXT: ::c_uint = 4;
491pub const PTRACE_POKEDATA: ::c_uint = 5;
492pub const PTRACE_POKEUSER: ::c_uint = 6;
493pub const PTRACE_CONT: ::c_uint = 7;
494pub const PTRACE_KILL: ::c_uint = 8;
495pub const PTRACE_SINGLESTEP: ::c_uint = 9;
496pub const PTRACE_ATTACH: ::c_uint = 16;
497pub const PTRACE_SYSCALL: ::c_uint = 24;
498pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
499pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
500pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
501pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
502pub const PTRACE_GETREGSET: ::c_uint = 0x4204;
503pub const PTRACE_SETREGSET: ::c_uint = 0x4205;
504pub const PTRACE_SEIZE: ::c_uint = 0x4206;
505pub const PTRACE_INTERRUPT: ::c_uint = 0x4207;
506pub const PTRACE_LISTEN: ::c_uint = 0x4208;
507pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209;
508
509pub const EPOLLWAKEUP: ::c_int = 0x20000000;
510
511pub const MAP_HUGETLB: ::c_int = 0x040000;
512
513pub const SEEK_DATA: ::c_int = 3;
514pub const SEEK_HOLE: ::c_int = 4;
515
516pub const TCSANOW: ::c_int = 0;
517pub const TCSADRAIN: ::c_int = 1;
518pub const TCSAFLUSH: ::c_int = 2;
519
520pub const TIOCLINUX: ::c_ulong = 0x541C;
521pub const TIOCGSERIAL: ::c_ulong = 0x541E;
522
523pub const RTLD_DEEPBIND: ::c_int = 0x8;
524pub const RTLD_GLOBAL: ::c_int = 0x100;
525pub const RTLD_NOLOAD: ::c_int = 0x4;
526
527pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
528pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
529pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
530pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
531pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
532
533pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
534pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
535pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
536pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
537pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
538pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
539pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
540pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
541
542pub const NETLINK_ROUTE: ::c_int = 0;
543pub const NETLINK_UNUSED: ::c_int = 1;
544pub const NETLINK_USERSOCK: ::c_int = 2;
545pub const NETLINK_FIREWALL: ::c_int = 3;
546pub const NETLINK_SOCK_DIAG: ::c_int = 4;
547pub const NETLINK_NFLOG: ::c_int = 5;
548pub const NETLINK_XFRM: ::c_int = 6;
549pub const NETLINK_SELINUX: ::c_int = 7;
550pub const NETLINK_ISCSI: ::c_int = 8;
551pub const NETLINK_AUDIT: ::c_int = 9;
552pub const NETLINK_FIB_LOOKUP: ::c_int = 10;
553pub const NETLINK_CONNECTOR: ::c_int = 11;
554pub const NETLINK_NETFILTER: ::c_int = 12;
555pub const NETLINK_IP6_FW: ::c_int = 13;
556pub const NETLINK_DNRTMSG: ::c_int = 14;
557pub const NETLINK_KOBJECT_UEVENT: ::c_int = 15;
558pub const NETLINK_GENERIC: ::c_int = 16;
559pub const NETLINK_SCSITRANSPORT: ::c_int = 18;
560pub const NETLINK_ECRYPTFS: ::c_int = 19;
561pub const NETLINK_RDMA: ::c_int = 20;
562pub const NETLINK_CRYPTO: ::c_int = 21;
563pub const NETLINK_INET_DIAG: ::c_int = NETLINK_SOCK_DIAG;
564
565pub const MAX_LINKS: ::c_int = 32;
566
567pub const NLM_F_REQUEST: ::c_int = 1;
568pub const NLM_F_MULTI: ::c_int = 2;
569pub const NLM_F_ACK: ::c_int = 4;
570pub const NLM_F_ECHO: ::c_int = 8;
571pub const NLM_F_DUMP_INTR: ::c_int = 16;
572pub const NLM_F_DUMP_FILTERED: ::c_int = 32;
573
574pub const NLM_F_ROOT: ::c_int = 0x100;
575pub const NLM_F_MATCH: ::c_int = 0x200;
576pub const NLM_F_ATOMIC: ::c_int = 0x400;
577pub const NLM_F_DUMP: ::c_int = NLM_F_ROOT | NLM_F_MATCH;
578
579pub const NLM_F_REPLACE: ::c_int = 0x100;
580pub const NLM_F_EXCL: ::c_int = 0x200;
581pub const NLM_F_CREATE: ::c_int = 0x400;
582pub const NLM_F_APPEND: ::c_int = 0x800;
583
584pub const NETLINK_ADD_MEMBERSHIP: ::c_int = 1;
585pub const NETLINK_DROP_MEMBERSHIP: ::c_int = 2;
586pub const NETLINK_PKTINFO: ::c_int = 3;
587pub const NETLINK_BROADCAST_ERROR: ::c_int = 4;
588pub const NETLINK_NO_ENOBUFS: ::c_int = 5;
589pub const NETLINK_RX_RING: ::c_int = 6;
590pub const NETLINK_TX_RING: ::c_int = 7;
591pub const NETLINK_LISTEN_ALL_NSID: ::c_int = 8;
592pub const NETLINK_LIST_MEMBERSHIPS: ::c_int = 9;
593pub const NETLINK_CAP_ACK: ::c_int = 10;
594
595pub const NLA_F_NESTED: ::c_int = 1 << 15;
596pub const NLA_F_NET_BYTEORDER: ::c_int = 1 << 14;
597pub const NLA_TYPE_MASK: ::c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER);
598
599pub const NLA_ALIGNTO: ::c_int = 4;
600
601pub const GENL_UNS_ADMIN_PERM: ::c_int = 0x10;
602
603pub const GENL_ID_VFS_DQUOT: ::c_int = ::NLMSG_MIN_TYPE + 1;
604pub const GENL_ID_PMCRAID: ::c_int = ::NLMSG_MIN_TYPE + 2;
605
606pub const TIOCM_LE: ::c_int = 0x001;
607pub const TIOCM_DTR: ::c_int = 0x002;
608pub const TIOCM_RTS: ::c_int = 0x004;
609pub const TIOCM_ST: ::c_int = 0x008;
610pub const TIOCM_SR: ::c_int = 0x010;
611pub const TIOCM_CTS: ::c_int = 0x020;
612pub const TIOCM_CAR: ::c_int = 0x040;
613pub const TIOCM_RNG: ::c_int = 0x080;
614pub const TIOCM_DSR: ::c_int = 0x100;
615pub const TIOCM_CD: ::c_int = TIOCM_CAR;
616pub const TIOCM_RI: ::c_int = TIOCM_RNG;
617
618pub const NF_NETDEV_INGRESS: ::c_int = 0;
619pub const NF_NETDEV_NUMHOOKS: ::c_int = 1;
620
621pub const NFPROTO_INET: ::c_int = 1;
622pub const NFPROTO_NETDEV: ::c_int = 5;
623
624cfg_if!{
626 if #[cfg(any(target_arch = "arm", target_arch = "powerpc",
627 target_arch = "powerpc64", target_arch = "aarch64"))] {
628 pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
629 pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
630 pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
631 pub const NFT_OBJ_MAXNAMELEN: ::c_int = 32;
632 } else if #[cfg(target_arch = "sparc64")] {
633 pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
634 pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
635 pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
636 } else {
637 pub const NFT_TABLE_MAXNAMELEN: ::c_int = 256;
638 pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 256;
639 pub const NFT_SET_MAXNAMELEN: ::c_int = 256;
640 pub const NFT_OBJ_MAXNAMELEN: ::c_int = 256;
641 }
642}
643pub const NFT_USERDATA_MAXLEN: ::c_int = 256;
644
645pub const NFT_REG_VERDICT: ::c_int = 0;
646pub const NFT_REG_1: ::c_int = 1;
647pub const NFT_REG_2: ::c_int = 2;
648pub const NFT_REG_3: ::c_int = 3;
649pub const NFT_REG_4: ::c_int = 4;
650pub const __NFT_REG_MAX: ::c_int = 5;
651pub const NFT_REG32_00: ::c_int = 8;
652pub const NFT_REG32_01: ::c_int = 9;
653pub const NFT_REG32_02: ::c_int = 10;
654pub const NFT_REG32_03: ::c_int = 11;
655pub const NFT_REG32_04: ::c_int = 12;
656pub const NFT_REG32_05: ::c_int = 13;
657pub const NFT_REG32_06: ::c_int = 14;
658pub const NFT_REG32_07: ::c_int = 15;
659pub const NFT_REG32_08: ::c_int = 16;
660pub const NFT_REG32_09: ::c_int = 17;
661pub const NFT_REG32_10: ::c_int = 18;
662pub const NFT_REG32_11: ::c_int = 19;
663pub const NFT_REG32_12: ::c_int = 20;
664pub const NFT_REG32_13: ::c_int = 21;
665pub const NFT_REG32_14: ::c_int = 22;
666pub const NFT_REG32_15: ::c_int = 23;
667
668pub const NFT_REG_SIZE: ::c_int = 16;
669pub const NFT_REG32_SIZE: ::c_int = 4;
670
671pub const NFT_CONTINUE: ::c_int = -1;
672pub const NFT_BREAK: ::c_int = -2;
673pub const NFT_JUMP: ::c_int = -3;
674pub const NFT_GOTO: ::c_int = -4;
675pub const NFT_RETURN: ::c_int = -5;
676
677pub const NFT_MSG_NEWTABLE: ::c_int = 0;
678pub const NFT_MSG_GETTABLE: ::c_int = 1;
679pub const NFT_MSG_DELTABLE: ::c_int = 2;
680pub const NFT_MSG_NEWCHAIN: ::c_int = 3;
681pub const NFT_MSG_GETCHAIN: ::c_int = 4;
682pub const NFT_MSG_DELCHAIN: ::c_int = 5;
683pub const NFT_MSG_NEWRULE: ::c_int = 6;
684pub const NFT_MSG_GETRULE: ::c_int = 7;
685pub const NFT_MSG_DELRULE: ::c_int = 8;
686pub const NFT_MSG_NEWSET: ::c_int = 9;
687pub const NFT_MSG_GETSET: ::c_int = 10;
688pub const NFT_MSG_DELSET: ::c_int = 11;
689pub const NFT_MSG_NEWSETELEM: ::c_int = 12;
690pub const NFT_MSG_GETSETELEM: ::c_int = 13;
691pub const NFT_MSG_DELSETELEM: ::c_int = 14;
692pub const NFT_MSG_NEWGEN: ::c_int = 15;
693pub const NFT_MSG_GETGEN: ::c_int = 16;
694pub const NFT_MSG_TRACE: ::c_int = 17;
695cfg_if! {
696 if #[cfg(not(target_arch = "sparc64"))] {
697 pub const NFT_MSG_NEWOBJ: ::c_int = 18;
698 pub const NFT_MSG_GETOBJ: ::c_int = 19;
699 pub const NFT_MSG_DELOBJ: ::c_int = 20;
700 pub const NFT_MSG_GETOBJ_RESET: ::c_int = 21;
701 pub const NFT_MSG_MAX: ::c_int = 22;
702 } else {
703 pub const NFT_MSG_MAX: ::c_int = 18;
704 }
705}
706
707pub const NFT_SET_ANONYMOUS: ::c_int = 0x1;
708pub const NFT_SET_CONSTANT: ::c_int = 0x2;
709pub const NFT_SET_INTERVAL: ::c_int = 0x4;
710pub const NFT_SET_MAP: ::c_int = 0x8;
711pub const NFT_SET_TIMEOUT: ::c_int = 0x10;
712pub const NFT_SET_EVAL: ::c_int = 0x20;
713
714pub const NFT_SET_POL_PERFORMANCE: ::c_int = 0;
715pub const NFT_SET_POL_MEMORY: ::c_int = 1;
716
717pub const NFT_SET_ELEM_INTERVAL_END: ::c_int = 0x1;
718
719pub const NFT_DATA_VALUE: ::c_uint = 0;
720pub const NFT_DATA_VERDICT: ::c_uint = 0xffffff00;
721
722pub const NFT_DATA_RESERVED_MASK: ::c_uint = 0xffffff00;
723
724pub const NFT_DATA_VALUE_MAXLEN: ::c_int = 64;
725
726pub const NFT_BYTEORDER_NTOH: ::c_int = 0;
727pub const NFT_BYTEORDER_HTON: ::c_int = 1;
728
729pub const NFT_CMP_EQ: ::c_int = 0;
730pub const NFT_CMP_NEQ: ::c_int = 1;
731pub const NFT_CMP_LT: ::c_int = 2;
732pub const NFT_CMP_LTE: ::c_int = 3;
733pub const NFT_CMP_GT: ::c_int = 4;
734pub const NFT_CMP_GTE: ::c_int = 5;
735
736pub const NFT_RANGE_EQ: ::c_int = 0;
737pub const NFT_RANGE_NEQ: ::c_int = 1;
738
739pub const NFT_LOOKUP_F_INV: ::c_int = (1 << 0);
740
741pub const NFT_DYNSET_OP_ADD: ::c_int = 0;
742pub const NFT_DYNSET_OP_UPDATE: ::c_int = 1;
743
744pub const NFT_DYNSET_F_INV: ::c_int = (1 << 0);
745
746pub const NFT_PAYLOAD_LL_HEADER: ::c_int = 0;
747pub const NFT_PAYLOAD_NETWORK_HEADER: ::c_int = 1;
748pub const NFT_PAYLOAD_TRANSPORT_HEADER: ::c_int = 2;
749
750pub const NFT_PAYLOAD_CSUM_NONE: ::c_int = 0;
751pub const NFT_PAYLOAD_CSUM_INET: ::c_int = 1;
752
753pub const NFT_META_LEN: ::c_int = 0;
754pub const NFT_META_PROTOCOL: ::c_int = 1;
755pub const NFT_META_PRIORITY: ::c_int = 2;
756pub const NFT_META_MARK: ::c_int = 3;
757pub const NFT_META_IIF: ::c_int = 4;
758pub const NFT_META_OIF: ::c_int = 5;
759pub const NFT_META_IIFNAME: ::c_int = 6;
760pub const NFT_META_OIFNAME: ::c_int = 7;
761pub const NFT_META_IIFTYPE: ::c_int = 8;
762pub const NFT_META_OIFTYPE: ::c_int = 9;
763pub const NFT_META_SKUID: ::c_int = 10;
764pub const NFT_META_SKGID: ::c_int = 11;
765pub const NFT_META_NFTRACE: ::c_int = 12;
766pub const NFT_META_RTCLASSID: ::c_int = 13;
767pub const NFT_META_SECMARK: ::c_int = 14;
768pub const NFT_META_NFPROTO: ::c_int = 15;
769pub const NFT_META_L4PROTO: ::c_int = 16;
770pub const NFT_META_BRI_IIFNAME: ::c_int = 17;
771pub const NFT_META_BRI_OIFNAME: ::c_int = 18;
772pub const NFT_META_PKTTYPE: ::c_int = 19;
773pub const NFT_META_CPU: ::c_int = 20;
774pub const NFT_META_IIFGROUP: ::c_int = 21;
775pub const NFT_META_OIFGROUP: ::c_int = 22;
776pub const NFT_META_CGROUP: ::c_int = 23;
777pub const NFT_META_PRANDOM: ::c_int = 24;
778
779pub const NFT_CT_STATE: ::c_int = 0;
780pub const NFT_CT_DIRECTION: ::c_int = 1;
781pub const NFT_CT_STATUS: ::c_int = 2;
782pub const NFT_CT_MARK: ::c_int = 3;
783pub const NFT_CT_SECMARK: ::c_int = 4;
784pub const NFT_CT_EXPIRATION: ::c_int = 5;
785pub const NFT_CT_HELPER: ::c_int = 6;
786pub const NFT_CT_L3PROTOCOL: ::c_int = 7;
787pub const NFT_CT_SRC: ::c_int = 8;
788pub const NFT_CT_DST: ::c_int = 9;
789pub const NFT_CT_PROTOCOL: ::c_int = 10;
790pub const NFT_CT_PROTO_SRC: ::c_int = 11;
791pub const NFT_CT_PROTO_DST: ::c_int = 12;
792pub const NFT_CT_LABELS: ::c_int = 13;
793pub const NFT_CT_PKTS: ::c_int = 14;
794pub const NFT_CT_BYTES: ::c_int = 15;
795
796pub const NFT_LIMIT_PKTS: ::c_int = 0;
797pub const NFT_LIMIT_PKT_BYTES: ::c_int = 1;
798
799pub const NFT_LIMIT_F_INV: ::c_int = (1 << 0);
800
801pub const NFT_QUEUE_FLAG_BYPASS: ::c_int = 0x01;
802pub const NFT_QUEUE_FLAG_CPU_FANOUT: ::c_int = 0x02;
803pub const NFT_QUEUE_FLAG_MASK: ::c_int = 0x03;
804
805pub const NFT_QUOTA_F_INV: ::c_int = (1 << 0);
806
807pub const NFT_REJECT_ICMP_UNREACH: ::c_int = 0;
808pub const NFT_REJECT_TCP_RST: ::c_int = 1;
809pub const NFT_REJECT_ICMPX_UNREACH: ::c_int = 2;
810
811pub const NFT_REJECT_ICMPX_NO_ROUTE: ::c_int = 0;
812pub const NFT_REJECT_ICMPX_PORT_UNREACH: ::c_int = 1;
813pub const NFT_REJECT_ICMPX_HOST_UNREACH: ::c_int = 2;
814pub const NFT_REJECT_ICMPX_ADMIN_PROHIBITED: ::c_int = 3;
815
816pub const NFT_NAT_SNAT: ::c_int = 0;
817pub const NFT_NAT_DNAT: ::c_int = 1;
818
819pub const NFT_TRACETYPE_UNSPEC: ::c_int = 0;
820pub const NFT_TRACETYPE_POLICY: ::c_int = 1;
821pub const NFT_TRACETYPE_RETURN: ::c_int = 2;
822pub const NFT_TRACETYPE_RULE: ::c_int = 3;
823
824pub const NFT_NG_INCREMENTAL: ::c_int = 0;
825pub const NFT_NG_RANDOM: ::c_int = 1;
826
827#[doc(hidden)]
828pub const AF_MAX: ::c_int = 42;
829#[doc(hidden)]
830pub const PF_MAX: ::c_int = AF_MAX;
831
832cfg_if! {
833 if #[cfg(any(target_arch = "arm", target_arch = "x86",
834 target_arch = "x86_64"))] {
835 pub const PTHREAD_STACK_MIN: ::size_t = 16384;
836 } else if #[cfg(target_arch = "sparc64")] {
837 pub const PTHREAD_STACK_MIN: ::size_t = 0x6000;
838 } else {
839 pub const PTHREAD_STACK_MIN: ::size_t = 131072;
840 }
841}
842pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 3;
843
844f! {
845 pub fn NLA_ALIGN(len: ::c_int) -> ::c_int {
846 return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1)
847 }
848}
849
850cfg_if! {
851 if #[cfg(any(target_arch = "x86",
852 target_arch = "arm",
853 target_arch = "powerpc"))] {
854 mod b32;
855 pub use self::b32::*;
856 } else if #[cfg(any(target_arch = "x86_64",
857 target_arch = "aarch64",
858 target_arch = "powerpc64",
859 target_arch = "sparc64"))] {
860 mod b64;
861 pub use self::b64::*;
862 } else {
863 }
865}