]> git.proxmox.com Git - rustc.git/blob - vendor/libc/src/unix/notbsd/linux/mips/mod.rs
New upstream version 1.37.0+dfsg1
[rustc.git] / vendor / libc / src / unix / notbsd / linux / mips / mod.rs
1 pub type shmatt_t = ::c_ulong;
2 pub type msgqnum_t = ::c_ulong;
3 pub type msglen_t = ::c_ulong;
4 pub type fsblkcnt_t = ::c_ulong;
5 pub type fsfilcnt_t = ::c_ulong;
6 pub type rlim_t = c_ulong;
7 pub type __priority_which_t = ::c_uint;
8
9 s! {
10 pub struct glob64_t {
11 pub gl_pathc: ::size_t,
12 pub gl_pathv: *mut *mut ::c_char,
13 pub gl_offs: ::size_t,
14 pub gl_flags: ::c_int,
15
16 __unused1: *mut ::c_void,
17 __unused2: *mut ::c_void,
18 __unused3: *mut ::c_void,
19 __unused4: *mut ::c_void,
20 __unused5: *mut ::c_void,
21 }
22
23 pub struct termios2 {
24 pub c_iflag: ::tcflag_t,
25 pub c_oflag: ::tcflag_t,
26 pub c_cflag: ::tcflag_t,
27 pub c_lflag: ::tcflag_t,
28 pub c_line: ::cc_t,
29 pub c_cc: [::cc_t; 23],
30 pub c_ispeed: ::speed_t,
31 pub c_ospeed: ::speed_t,
32 }
33
34 pub struct nlmsghdr {
35 pub nlmsg_len: u32,
36 pub nlmsg_type: u16,
37 pub nlmsg_flags: u16,
38 pub nlmsg_seq: u32,
39 pub nlmsg_pid: u32,
40 }
41
42 pub struct nlmsgerr {
43 pub error: ::c_int,
44 pub msg: nlmsghdr,
45 }
46
47 pub struct nl_pktinfo {
48 pub group: u32,
49 }
50
51 pub struct nl_mmap_req {
52 pub nm_block_size: ::c_uint,
53 pub nm_block_nr: ::c_uint,
54 pub nm_frame_size: ::c_uint,
55 pub nm_frame_nr: ::c_uint,
56 }
57
58 pub struct nl_mmap_hdr {
59 pub nm_status: ::c_uint,
60 pub nm_len: ::c_uint,
61 pub nm_group: u32,
62 pub nm_pid: u32,
63 pub nm_uid: u32,
64 pub nm_gid: u32,
65 }
66
67 pub struct nlattr {
68 pub nla_len: u16,
69 pub nla_type: u16,
70 }
71 }
72
73 pub const SFD_CLOEXEC: ::c_int = 0x080000;
74
75 pub const NCCS: usize = 32;
76
77 pub const O_TRUNC: ::c_int = 512;
78
79 pub const O_NOATIME: ::c_int = 0o1000000;
80 pub const O_CLOEXEC: ::c_int = 0x80000;
81 pub const O_PATH: ::c_int = 0o10000000;
82 pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY;
83
84 pub const EBFONT: ::c_int = 59;
85 pub const ENOSTR: ::c_int = 60;
86 pub const ENODATA: ::c_int = 61;
87 pub const ETIME: ::c_int = 62;
88 pub const ENOSR: ::c_int = 63;
89 pub const ENONET: ::c_int = 64;
90 pub const ENOPKG: ::c_int = 65;
91 pub const EREMOTE: ::c_int = 66;
92 pub const ENOLINK: ::c_int = 67;
93 pub const EADV: ::c_int = 68;
94 pub const ESRMNT: ::c_int = 69;
95 pub const ECOMM: ::c_int = 70;
96 pub const EPROTO: ::c_int = 71;
97 pub const EDOTDOT: ::c_int = 73;
98
99 pub const SA_NODEFER: ::c_int = 0x40000000;
100 pub const SA_RESETHAND: ::c_int = 0x80000000;
101 pub const SA_RESTART: ::c_int = 0x10000000;
102 pub const SA_NOCLDSTOP: ::c_int = 0x00000001;
103
104 pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
105
106 pub const EFD_CLOEXEC: ::c_int = 0x80000;
107
108 pub const BUFSIZ: ::c_uint = 8192;
109 pub const TMP_MAX: ::c_uint = 238328;
110 pub const FOPEN_MAX: ::c_uint = 16;
111 pub const POSIX_FADV_DONTNEED: ::c_int = 4;
112 pub const POSIX_FADV_NOREUSE: ::c_int = 5;
113 pub const POSIX_MADV_DONTNEED: ::c_int = 4;
114 pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41;
115 pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45;
116 pub const _SC_PII: ::c_int = 53;
117 pub const _SC_PII_XTI: ::c_int = 54;
118 pub const _SC_PII_SOCKET: ::c_int = 55;
119 pub const _SC_PII_INTERNET: ::c_int = 56;
120 pub const _SC_PII_OSI: ::c_int = 57;
121 pub const _SC_POLL: ::c_int = 58;
122 pub const _SC_SELECT: ::c_int = 59;
123 pub const _SC_PII_INTERNET_STREAM: ::c_int = 61;
124 pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62;
125 pub const _SC_PII_OSI_COTS: ::c_int = 63;
126 pub const _SC_PII_OSI_CLTS: ::c_int = 64;
127 pub const _SC_PII_OSI_M: ::c_int = 65;
128 pub const _SC_T_IOV_MAX: ::c_int = 66;
129 pub const _SC_2_C_VERSION: ::c_int = 96;
130 pub const _SC_CHAR_BIT: ::c_int = 101;
131 pub const _SC_CHAR_MAX: ::c_int = 102;
132 pub const _SC_CHAR_MIN: ::c_int = 103;
133 pub const _SC_INT_MAX: ::c_int = 104;
134 pub const _SC_INT_MIN: ::c_int = 105;
135 pub const _SC_LONG_BIT: ::c_int = 106;
136 pub const _SC_WORD_BIT: ::c_int = 107;
137 pub const _SC_MB_LEN_MAX: ::c_int = 108;
138 pub const _SC_SSIZE_MAX: ::c_int = 110;
139 pub const _SC_SCHAR_MAX: ::c_int = 111;
140 pub const _SC_SCHAR_MIN: ::c_int = 112;
141 pub const _SC_SHRT_MAX: ::c_int = 113;
142 pub const _SC_SHRT_MIN: ::c_int = 114;
143 pub const _SC_UCHAR_MAX: ::c_int = 115;
144 pub const _SC_UINT_MAX: ::c_int = 116;
145 pub const _SC_ULONG_MAX: ::c_int = 117;
146 pub const _SC_USHRT_MAX: ::c_int = 118;
147 pub const _SC_NL_ARGMAX: ::c_int = 119;
148 pub const _SC_NL_LANGMAX: ::c_int = 120;
149 pub const _SC_NL_MSGMAX: ::c_int = 121;
150 pub const _SC_NL_NMAX: ::c_int = 122;
151 pub const _SC_NL_SETMAX: ::c_int = 123;
152 pub const _SC_NL_TEXTMAX: ::c_int = 124;
153 pub const _SC_BASE: ::c_int = 134;
154 pub const _SC_C_LANG_SUPPORT: ::c_int = 135;
155 pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136;
156 pub const _SC_DEVICE_IO: ::c_int = 140;
157 pub const _SC_DEVICE_SPECIFIC: ::c_int = 141;
158 pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142;
159 pub const _SC_FD_MGMT: ::c_int = 143;
160 pub const _SC_FIFO: ::c_int = 144;
161 pub const _SC_PIPE: ::c_int = 145;
162 pub const _SC_FILE_ATTRIBUTES: ::c_int = 146;
163 pub const _SC_FILE_LOCKING: ::c_int = 147;
164 pub const _SC_FILE_SYSTEM: ::c_int = 148;
165 pub const _SC_MULTI_PROCESS: ::c_int = 150;
166 pub const _SC_SINGLE_PROCESS: ::c_int = 151;
167 pub const _SC_NETWORKING: ::c_int = 152;
168 pub const _SC_REGEX_VERSION: ::c_int = 156;
169 pub const _SC_SIGNALS: ::c_int = 158;
170 pub const _SC_SYSTEM_DATABASE: ::c_int = 162;
171 pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163;
172 pub const _SC_USER_GROUPS: ::c_int = 166;
173 pub const _SC_USER_GROUPS_R: ::c_int = 167;
174 pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185;
175 pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186;
176 pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187;
177 pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188;
178 pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189;
179 pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190;
180 pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191;
181 pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192;
182 pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193;
183 pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194;
184 pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195;
185 pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196;
186 pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197;
187 pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198;
188 pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199;
189 pub const O_ACCMODE: ::c_int = 3;
190 pub const O_DIRECT: ::c_int = 0x8000;
191 pub const O_DIRECTORY: ::c_int = 0x10000;
192 pub const O_NOFOLLOW: ::c_int = 0x20000;
193 pub const ST_RELATIME: ::c_ulong = 4096;
194 pub const NI_MAXHOST: ::socklen_t = 1025;
195
196 pub const RLIMIT_NOFILE: ::c_int = 5;
197 pub const RLIMIT_AS: ::c_int = 6;
198 pub const RLIMIT_RSS: ::c_int = 7;
199 pub const RLIMIT_NPROC: ::c_int = 8;
200 pub const RLIMIT_MEMLOCK: ::c_int = 9;
201 pub const RLIMIT_NLIMITS: ::c_int = 16;
202
203 pub const O_APPEND: ::c_int = 8;
204 pub const O_CREAT: ::c_int = 256;
205 pub const O_EXCL: ::c_int = 1024;
206 pub const O_NOCTTY: ::c_int = 2048;
207 pub const O_NONBLOCK: ::c_int = 128;
208 pub const O_SYNC: ::c_int = 0x4010;
209 pub const O_RSYNC: ::c_int = 0x4010;
210 pub const O_DSYNC: ::c_int = 0x10;
211 pub const O_FSYNC: ::c_int = 0x4010;
212 pub const O_ASYNC: ::c_int = 0x1000;
213 pub const O_NDELAY: ::c_int = 0x80;
214
215 pub const SOCK_NONBLOCK: ::c_int = 128;
216
217 pub const EDEADLK: ::c_int = 45;
218 pub const ENAMETOOLONG: ::c_int = 78;
219 pub const ENOLCK: ::c_int = 46;
220 pub const ENOSYS: ::c_int = 89;
221 pub const ENOTEMPTY: ::c_int = 93;
222 pub const ELOOP: ::c_int = 90;
223 pub const ENOMSG: ::c_int = 35;
224 pub const EIDRM: ::c_int = 36;
225 pub const ECHRNG: ::c_int = 37;
226 pub const EL2NSYNC: ::c_int = 38;
227 pub const EL3HLT: ::c_int = 39;
228 pub const EL3RST: ::c_int = 40;
229 pub const ELNRNG: ::c_int = 41;
230 pub const EUNATCH: ::c_int = 42;
231 pub const ENOCSI: ::c_int = 43;
232 pub const EL2HLT: ::c_int = 44;
233 pub const EBADE: ::c_int = 50;
234 pub const EBADR: ::c_int = 51;
235 pub const EXFULL: ::c_int = 52;
236 pub const ENOANO: ::c_int = 53;
237 pub const EBADRQC: ::c_int = 54;
238 pub const EBADSLT: ::c_int = 55;
239 pub const EDEADLOCK: ::c_int = 56;
240 pub const EMULTIHOP: ::c_int = 74;
241 pub const EOVERFLOW: ::c_int = 79;
242 pub const ENOTUNIQ: ::c_int = 80;
243 pub const EBADFD: ::c_int = 81;
244 pub const EBADMSG: ::c_int = 77;
245 pub const EREMCHG: ::c_int = 82;
246 pub const ELIBACC: ::c_int = 83;
247 pub const ELIBBAD: ::c_int = 84;
248 pub const ELIBSCN: ::c_int = 85;
249 pub const ELIBMAX: ::c_int = 86;
250 pub const ELIBEXEC: ::c_int = 87;
251 pub const EILSEQ: ::c_int = 88;
252 pub const ERESTART: ::c_int = 91;
253 pub const ESTRPIPE: ::c_int = 92;
254 pub const EUSERS: ::c_int = 94;
255 pub const ENOTSOCK: ::c_int = 95;
256 pub const EDESTADDRREQ: ::c_int = 96;
257 pub const EMSGSIZE: ::c_int = 97;
258 pub const EPROTOTYPE: ::c_int = 98;
259 pub const ENOPROTOOPT: ::c_int = 99;
260 pub const EPROTONOSUPPORT: ::c_int = 120;
261 pub const ESOCKTNOSUPPORT: ::c_int = 121;
262 pub const EOPNOTSUPP: ::c_int = 122;
263 pub const ENOTSUP: ::c_int = EOPNOTSUPP;
264 pub const EPFNOSUPPORT: ::c_int = 123;
265 pub const EAFNOSUPPORT: ::c_int = 124;
266 pub const EADDRINUSE: ::c_int = 125;
267 pub const EADDRNOTAVAIL: ::c_int = 126;
268 pub const ENETDOWN: ::c_int = 127;
269 pub const ENETUNREACH: ::c_int = 128;
270 pub const ENETRESET: ::c_int = 129;
271 pub const ECONNABORTED: ::c_int = 130;
272 pub const ECONNRESET: ::c_int = 131;
273 pub const ENOBUFS: ::c_int = 132;
274 pub const EISCONN: ::c_int = 133;
275 pub const ENOTCONN: ::c_int = 134;
276 pub const ESHUTDOWN: ::c_int = 143;
277 pub const ETOOMANYREFS: ::c_int = 144;
278 pub const ETIMEDOUT: ::c_int = 145;
279 pub const ECONNREFUSED: ::c_int = 146;
280 pub const EHOSTDOWN: ::c_int = 147;
281 pub const EHOSTUNREACH: ::c_int = 148;
282 pub const EALREADY: ::c_int = 149;
283 pub const EINPROGRESS: ::c_int = 150;
284 pub const ESTALE: ::c_int = 151;
285 pub const EUCLEAN: ::c_int = 135;
286 pub const ENOTNAM: ::c_int = 137;
287 pub const ENAVAIL: ::c_int = 138;
288 pub const EISNAM: ::c_int = 139;
289 pub const EREMOTEIO: ::c_int = 140;
290 pub const EDQUOT: ::c_int = 1133;
291 pub const ENOMEDIUM: ::c_int = 159;
292 pub const EMEDIUMTYPE: ::c_int = 160;
293 pub const ECANCELED: ::c_int = 158;
294 pub const ENOKEY: ::c_int = 161;
295 pub const EKEYEXPIRED: ::c_int = 162;
296 pub const EKEYREVOKED: ::c_int = 163;
297 pub const EKEYREJECTED: ::c_int = 164;
298 pub const EOWNERDEAD: ::c_int = 165;
299 pub const ENOTRECOVERABLE: ::c_int = 166;
300 pub const ERFKILL: ::c_int = 167;
301
302 pub const LC_PAPER: ::c_int = 7;
303 pub const LC_NAME: ::c_int = 8;
304 pub const LC_ADDRESS: ::c_int = 9;
305 pub const LC_TELEPHONE: ::c_int = 10;
306 pub const LC_MEASUREMENT: ::c_int = 11;
307 pub const LC_IDENTIFICATION: ::c_int = 12;
308 pub const LC_PAPER_MASK: ::c_int = (1 << LC_PAPER);
309 pub const LC_NAME_MASK: ::c_int = (1 << LC_NAME);
310 pub const LC_ADDRESS_MASK: ::c_int = (1 << LC_ADDRESS);
311 pub const LC_TELEPHONE_MASK: ::c_int = (1 << LC_TELEPHONE);
312 pub const LC_MEASUREMENT_MASK: ::c_int = (1 << LC_MEASUREMENT);
313 pub const LC_IDENTIFICATION_MASK: ::c_int = (1 << LC_IDENTIFICATION);
314 pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK
315 | ::LC_NUMERIC_MASK
316 | ::LC_TIME_MASK
317 | ::LC_COLLATE_MASK
318 | ::LC_MONETARY_MASK
319 | ::LC_MESSAGES_MASK
320 | LC_PAPER_MASK
321 | LC_NAME_MASK
322 | LC_ADDRESS_MASK
323 | LC_TELEPHONE_MASK
324 | LC_MEASUREMENT_MASK
325 | LC_IDENTIFICATION_MASK;
326
327 pub const MAP_NORESERVE: ::c_int = 0x400;
328 pub const MAP_ANON: ::c_int = 0x800;
329 pub const MAP_ANONYMOUS: ::c_int = 0x800;
330 pub const MAP_GROWSDOWN: ::c_int = 0x1000;
331 pub const MAP_DENYWRITE: ::c_int = 0x2000;
332 pub const MAP_EXECUTABLE: ::c_int = 0x4000;
333 pub const MAP_LOCKED: ::c_int = 0x8000;
334 pub const MAP_POPULATE: ::c_int = 0x10000;
335 pub const MAP_NONBLOCK: ::c_int = 0x20000;
336 pub const MAP_STACK: ::c_int = 0x40000;
337
338 pub const SOCK_STREAM: ::c_int = 2;
339 pub const SOCK_DGRAM: ::c_int = 1;
340 pub const SOCK_SEQPACKET: ::c_int = 5;
341 pub const SOCK_DCCP: ::c_int = 6;
342 pub const SOCK_PACKET: ::c_int = 10;
343
344 pub const SOL_SOCKET: ::c_int = 0xffff;
345
346 pub const SO_REUSEADDR: ::c_int = 0x0004;
347 pub const SO_KEEPALIVE: ::c_int = 0x0008;
348 pub const SO_DONTROUTE: ::c_int = 0x0010;
349 pub const SO_BROADCAST: ::c_int = 0x0020;
350 pub const SO_LINGER: ::c_int = 0x0080;
351 pub const SO_OOBINLINE: ::c_int = 0x0100;
352 pub const SO_REUSEPORT: ::c_int = 0x0200;
353 pub const SO_TYPE: ::c_int = 0x1008;
354 pub const SO_STYLE: ::c_int = SO_TYPE;
355 pub const SO_ERROR: ::c_int = 0x1007;
356 pub const SO_SNDBUF: ::c_int = 0x1001;
357 pub const SO_RCVBUF: ::c_int = 0x1002;
358 pub const SO_SNDLOWAT: ::c_int = 0x1003;
359 pub const SO_RCVLOWAT: ::c_int = 0x1004;
360 pub const SO_SNDTIMEO: ::c_int = 0x1005;
361 pub const SO_RCVTIMEO: ::c_int = 0x1006;
362 pub const SO_ACCEPTCONN: ::c_int = 0x1009;
363 pub const SO_PROTOCOL: ::c_int = 0x1028;
364 pub const SO_DOMAIN: ::c_int = 0x1029;
365 pub const SO_NO_CHECK: ::c_int = 11;
366 pub const SO_PRIORITY: ::c_int = 12;
367 pub const SO_BSDCOMPAT: ::c_int = 14;
368 pub const SO_PASSCRED: ::c_int = 17;
369 pub const SO_PEERCRED: ::c_int = 18;
370 pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22;
371 pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23;
372 pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24;
373 pub const SO_BINDTODEVICE: ::c_int = 25;
374 pub const SO_ATTACH_FILTER: ::c_int = 26;
375 pub const SO_DETACH_FILTER: ::c_int = 27;
376 pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER;
377 pub const SO_PEERNAME: ::c_int = 28;
378 pub const SO_TIMESTAMP: ::c_int = 29;
379 pub const SO_PEERSEC: ::c_int = 30;
380 pub const SO_SNDBUFFORCE: ::c_int = 31;
381 pub const SO_RCVBUFFORCE: ::c_int = 33;
382 pub const SO_PASSSEC: ::c_int = 34;
383 pub const SO_TIMESTAMPNS: ::c_int = 35;
384 pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS;
385 pub const SO_MARK: ::c_int = 36;
386 pub const SO_RXQ_OVFL: ::c_int = 40;
387 pub const SO_WIFI_STATUS: ::c_int = 41;
388 pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS;
389 pub const SO_PEEK_OFF: ::c_int = 42;
390 pub const SO_NOFCS: ::c_int = 43;
391 pub const SO_LOCK_FILTER: ::c_int = 44;
392 pub const SO_SELECT_ERR_QUEUE: ::c_int = 45;
393 pub const SO_BUSY_POLL: ::c_int = 46;
394 pub const SO_MAX_PACING_RATE: ::c_int = 47;
395 pub const SO_BPF_EXTENSIONS: ::c_int = 48;
396 pub const SO_INCOMING_CPU: ::c_int = 49;
397 pub const SO_ATTACH_BPF: ::c_int = 50;
398 pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER;
399
400 /* DCCP socket options */
401 pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1;
402 pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2;
403 pub const DCCP_SOCKOPT_CHANGE_L: ::c_int = 3;
404 pub const DCCP_SOCKOPT_CHANGE_R: ::c_int = 4;
405 pub const DCCP_SOCKOPT_GET_CUR_MPS: ::c_int = 5;
406 pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: ::c_int = 6;
407 pub const DCCP_SOCKOPT_SEND_CSCOV: ::c_int = 10;
408 pub const DCCP_SOCKOPT_RECV_CSCOV: ::c_int = 11;
409 pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: ::c_int = 12;
410 pub const DCCP_SOCKOPT_CCID: ::c_int = 13;
411 pub const DCCP_SOCKOPT_TX_CCID: ::c_int = 14;
412 pub const DCCP_SOCKOPT_RX_CCID: ::c_int = 15;
413 pub const DCCP_SOCKOPT_QPOLICY_ID: ::c_int = 16;
414 pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: ::c_int = 17;
415 pub const DCCP_SOCKOPT_CCID_RX_INFO: ::c_int = 128;
416 pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192;
417
418 /// maximum number of services provided on the same listening port
419 pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32;
420
421 pub const FIOCLEX: ::c_ulong = 0x6601;
422 pub const FIONBIO: ::c_ulong = 0x667e;
423
424 pub const SA_ONSTACK: ::c_int = 0x08000000;
425 pub const SA_SIGINFO: ::c_int = 0x00000008;
426 pub const SA_NOCLDWAIT: ::c_int = 0x00010000;
427
428 pub const SIGCHLD: ::c_int = 18;
429 pub const SIGBUS: ::c_int = 10;
430 pub const SIGTTIN: ::c_int = 26;
431 pub const SIGTTOU: ::c_int = 27;
432 pub const SIGXCPU: ::c_int = 30;
433 pub const SIGXFSZ: ::c_int = 31;
434 pub const SIGVTALRM: ::c_int = 28;
435 pub const SIGPROF: ::c_int = 29;
436 pub const SIGWINCH: ::c_int = 20;
437 pub const SIGUSR1: ::c_int = 16;
438 pub const SIGUSR2: ::c_int = 17;
439 pub const SIGCONT: ::c_int = 25;
440 pub const SIGSTOP: ::c_int = 23;
441 pub const SIGTSTP: ::c_int = 24;
442 pub const SIGURG: ::c_int = 21;
443 pub const SIGIO: ::c_int = 22;
444 pub const SIGSYS: ::c_int = 12;
445 pub const SIGPOLL: ::c_int = 22;
446 pub const SIGPWR: ::c_int = 19;
447 pub const SIG_SETMASK: ::c_int = 3;
448 pub const SIG_BLOCK: ::c_int = 0x1;
449 pub const SIG_UNBLOCK: ::c_int = 0x2;
450
451 pub const POLLWRNORM: ::c_short = 0x004;
452 pub const POLLWRBAND: ::c_short = 0x100;
453
454 pub const PTHREAD_STACK_MIN: ::size_t = 131072;
455 pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 3;
456
457 pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5;
458 pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff;
459 pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245;
460 pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45;
461 pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53;
462 pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53;
463 pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53;
464 pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53;
465 pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849;
466 pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6;
467 pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660;
468 pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6;
469 pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f;
470 pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f;
471 pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468;
472 pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478;
473 pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44;
474 pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c;
475 pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969;
476 pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1;
477 pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0;
478 pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f;
479 pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973;
480 pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b;
481 pub const TMPFS_MAGIC: ::c_long = 0x01021994;
482 pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2;
483
484 pub const VEOF: usize = 16;
485 pub const VEOL: usize = 17;
486 pub const VEOL2: usize = 6;
487 pub const VMIN: usize = 4;
488 pub const IEXTEN: ::tcflag_t = 0x00000100;
489 pub const TOSTOP: ::tcflag_t = 0x00008000;
490 pub const FLUSHO: ::tcflag_t = 0x00002000;
491 pub const EXTPROC: ::tcflag_t = 0o200000;
492 pub const TCSANOW: ::c_int = 0x540e;
493 pub const TCSADRAIN: ::c_int = 0x540f;
494 pub const TCSAFLUSH: ::c_int = 0x5410;
495
496 pub const CPU_SETSIZE: ::c_int = 0x400;
497
498 pub const PTRACE_TRACEME: ::c_uint = 0;
499 pub const PTRACE_PEEKTEXT: ::c_uint = 1;
500 pub const PTRACE_PEEKDATA: ::c_uint = 2;
501 pub const PTRACE_PEEKUSER: ::c_uint = 3;
502 pub const PTRACE_POKETEXT: ::c_uint = 4;
503 pub const PTRACE_POKEDATA: ::c_uint = 5;
504 pub const PTRACE_POKEUSER: ::c_uint = 6;
505 pub const PTRACE_CONT: ::c_uint = 7;
506 pub const PTRACE_KILL: ::c_uint = 8;
507 pub const PTRACE_SINGLESTEP: ::c_uint = 9;
508 pub const PTRACE_ATTACH: ::c_uint = 16;
509 pub const PTRACE_DETACH: ::c_uint = 17;
510 pub const PTRACE_SYSCALL: ::c_uint = 24;
511 pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200;
512 pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201;
513 pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202;
514 pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203;
515 pub const PTRACE_GETFPREGS: ::c_uint = 14;
516 pub const PTRACE_SETFPREGS: ::c_uint = 15;
517 pub const PTRACE_GETFPXREGS: ::c_uint = 18;
518 pub const PTRACE_SETFPXREGS: ::c_uint = 19;
519 pub const PTRACE_GETREGS: ::c_uint = 12;
520 pub const PTRACE_SETREGS: ::c_uint = 13;
521
522 pub const MAP_HUGETLB: ::c_int = 0x080000;
523
524 pub const EFD_NONBLOCK: ::c_int = 0x80;
525
526 pub const F_RDLCK: ::c_int = 0;
527 pub const F_WRLCK: ::c_int = 1;
528 pub const F_UNLCK: ::c_int = 2;
529 pub const F_GETLK: ::c_int = 14;
530 pub const F_GETOWN: ::c_int = 23;
531 pub const F_SETOWN: ::c_int = 24;
532 pub const F_SETLK: ::c_int = 6;
533 pub const F_SETLKW: ::c_int = 7;
534
535 pub const SFD_NONBLOCK: ::c_int = 0x80;
536
537 pub const TCGETS: ::c_ulong = 0x540d;
538 pub const TCSETS: ::c_ulong = 0x540e;
539 pub const TCSETSW: ::c_ulong = 0x540f;
540 pub const TCSETSF: ::c_ulong = 0x5410;
541 pub const TCGETA: ::c_ulong = 0x5401;
542 pub const TCSETA: ::c_ulong = 0x5402;
543 pub const TCSETAW: ::c_ulong = 0x5403;
544 pub const TCSETAF: ::c_ulong = 0x5404;
545 pub const TCSBRK: ::c_ulong = 0x5405;
546 pub const TCXONC: ::c_ulong = 0x5406;
547 pub const TCFLSH: ::c_ulong = 0x5407;
548 pub const TIOCGSOFTCAR: ::c_ulong = 0x5481;
549 pub const TIOCSSOFTCAR: ::c_ulong = 0x5482;
550 pub const TIOCINQ: ::c_ulong = 0x467f;
551 pub const TIOCLINUX: ::c_ulong = 0x5483;
552 pub const TIOCGSERIAL: ::c_ulong = 0x5484;
553 pub const TIOCEXCL: ::c_ulong = 0x740d;
554 pub const TIOCNXCL: ::c_ulong = 0x740e;
555 pub const TIOCSCTTY: ::c_ulong = 0x5480;
556 pub const TIOCGPGRP: ::c_ulong = 0x40047477;
557 pub const TIOCSPGRP: ::c_ulong = 0x80047476;
558 pub const TIOCOUTQ: ::c_ulong = 0x7472;
559 pub const TIOCSTI: ::c_ulong = 0x5472;
560 pub const TIOCGWINSZ: ::c_ulong = 0x40087468;
561 pub const TIOCSWINSZ: ::c_ulong = 0x80087467;
562 pub const TIOCMGET: ::c_ulong = 0x741d;
563 pub const TIOCMBIS: ::c_ulong = 0x741b;
564 pub const TIOCMBIC: ::c_ulong = 0x741c;
565 pub const TIOCMSET: ::c_ulong = 0x741a;
566 pub const FIONREAD: ::c_ulong = 0x467f;
567 pub const TIOCCONS: ::c_ulong = 0x80047478;
568
569 pub const RTLD_DEEPBIND: ::c_int = 0x10;
570 pub const RTLD_GLOBAL: ::c_int = 0x4;
571 pub const RTLD_NOLOAD: ::c_int = 0x8;
572
573 pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead;
574 pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793;
575 pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278;
576 pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448;
577 pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216;
578
579 pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567;
580 pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123;
581 pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF;
582 pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000;
583 pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC;
584 pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4;
585 pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2;
586 pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543;
587
588 pub const MCL_CURRENT: ::c_int = 0x0001;
589 pub const MCL_FUTURE: ::c_int = 0x0002;
590
591 pub const SIGSTKSZ: ::size_t = 8192;
592 pub const MINSIGSTKSZ: ::size_t = 2048;
593 pub const CBAUD: ::tcflag_t = 0o0010017;
594 pub const TAB1: ::c_int = 0x00000800;
595 pub const TAB2: ::c_int = 0x00001000;
596 pub const TAB3: ::c_int = 0x00001800;
597 pub const CR1: ::c_int = 0x00000200;
598 pub const CR2: ::c_int = 0x00000400;
599 pub const CR3: ::c_int = 0x00000600;
600 pub const FF1: ::c_int = 0x00008000;
601 pub const BS1: ::c_int = 0x00002000;
602 pub const VT1: ::c_int = 0x00004000;
603 pub const VWERASE: usize = 14;
604 pub const VREPRINT: usize = 12;
605 pub const VSUSP: usize = 10;
606 pub const VSTART: usize = 8;
607 pub const VSTOP: usize = 9;
608 pub const VDISCARD: usize = 13;
609 pub const VTIME: usize = 5;
610 pub const IXON: ::tcflag_t = 0x00000400;
611 pub const IXOFF: ::tcflag_t = 0x00001000;
612 pub const ONLCR: ::tcflag_t = 0x4;
613 pub const CSIZE: ::tcflag_t = 0x00000030;
614 pub const CS6: ::tcflag_t = 0x00000010;
615 pub const CS7: ::tcflag_t = 0x00000020;
616 pub const CS8: ::tcflag_t = 0x00000030;
617 pub const CSTOPB: ::tcflag_t = 0x00000040;
618 pub const CREAD: ::tcflag_t = 0x00000080;
619 pub const PARENB: ::tcflag_t = 0x00000100;
620 pub const PARODD: ::tcflag_t = 0x00000200;
621 pub const HUPCL: ::tcflag_t = 0x00000400;
622 pub const CLOCAL: ::tcflag_t = 0x00000800;
623 pub const ECHOKE: ::tcflag_t = 0x00000800;
624 pub const ECHOE: ::tcflag_t = 0x00000010;
625 pub const ECHOK: ::tcflag_t = 0x00000020;
626 pub const ECHONL: ::tcflag_t = 0x00000040;
627 pub const ECHOPRT: ::tcflag_t = 0x00000400;
628 pub const ECHOCTL: ::tcflag_t = 0x00000200;
629 pub const ISIG: ::tcflag_t = 0x00000001;
630 pub const ICANON: ::tcflag_t = 0x00000002;
631 pub const PENDIN: ::tcflag_t = 0x00004000;
632 pub const NOFLSH: ::tcflag_t = 0x00000080;
633 pub const CIBAUD: ::tcflag_t = 0o02003600000;
634 pub const CBAUDEX: ::tcflag_t = 0o010000;
635 pub const VSWTC: usize = 7;
636 pub const OLCUC: ::tcflag_t = 0o000002;
637 pub const NLDLY: ::tcflag_t = 0o000400;
638 pub const CRDLY: ::tcflag_t = 0o003000;
639 pub const TABDLY: ::tcflag_t = 0o014000;
640 pub const BSDLY: ::tcflag_t = 0o020000;
641 pub const FFDLY: ::tcflag_t = 0o100000;
642 pub const VTDLY: ::tcflag_t = 0o040000;
643 pub const XTABS: ::tcflag_t = 0o014000;
644
645 pub const B0: ::speed_t = 0o000000;
646 pub const B50: ::speed_t = 0o000001;
647 pub const B75: ::speed_t = 0o000002;
648 pub const B110: ::speed_t = 0o000003;
649 pub const B134: ::speed_t = 0o000004;
650 pub const B150: ::speed_t = 0o000005;
651 pub const B200: ::speed_t = 0o000006;
652 pub const B300: ::speed_t = 0o000007;
653 pub const B600: ::speed_t = 0o000010;
654 pub const B1200: ::speed_t = 0o000011;
655 pub const B1800: ::speed_t = 0o000012;
656 pub const B2400: ::speed_t = 0o000013;
657 pub const B4800: ::speed_t = 0o000014;
658 pub const B9600: ::speed_t = 0o000015;
659 pub const B19200: ::speed_t = 0o000016;
660 pub const B38400: ::speed_t = 0o000017;
661 pub const EXTA: ::speed_t = B19200;
662 pub const EXTB: ::speed_t = B38400;
663 pub const BOTHER: ::speed_t = 0o010000;
664 pub const B57600: ::speed_t = 0o010001;
665 pub const B115200: ::speed_t = 0o010002;
666 pub const B230400: ::speed_t = 0o010003;
667 pub const B460800: ::speed_t = 0o010004;
668 pub const B500000: ::speed_t = 0o010005;
669 pub const B576000: ::speed_t = 0o010006;
670 pub const B921600: ::speed_t = 0o010007;
671 pub const B1000000: ::speed_t = 0o010010;
672 pub const B1152000: ::speed_t = 0o010011;
673 pub const B1500000: ::speed_t = 0o010012;
674 pub const B2000000: ::speed_t = 0o010013;
675 pub const B2500000: ::speed_t = 0o010014;
676 pub const B3000000: ::speed_t = 0o010015;
677 pub const B3500000: ::speed_t = 0o010016;
678 pub const B4000000: ::speed_t = 0o010017;
679
680 pub const TIOCM_LE: ::c_int = 0x001;
681 pub const TIOCM_DTR: ::c_int = 0x002;
682 pub const TIOCM_RTS: ::c_int = 0x004;
683 pub const TIOCM_ST: ::c_int = 0x010;
684 pub const TIOCM_SR: ::c_int = 0x020;
685 pub const TIOCM_CTS: ::c_int = 0x040;
686 pub const TIOCM_CAR: ::c_int = 0x100;
687 pub const TIOCM_CD: ::c_int = TIOCM_CAR;
688 pub const TIOCM_RNG: ::c_int = 0x200;
689 pub const TIOCM_RI: ::c_int = TIOCM_RNG;
690 pub const TIOCM_DSR: ::c_int = 0x400;
691
692 pub const EHWPOISON: ::c_int = 168;
693 pub const SIGEV_THREAD_ID: ::c_int = 4;
694 pub const EPOLLWAKEUP: ::c_int = 0x20000000;
695
696 pub const NF_NETDEV_INGRESS: ::c_int = 0;
697 pub const NF_NETDEV_NUMHOOKS: ::c_int = 1;
698
699 pub const NFPROTO_INET: ::c_int = 1;
700 pub const NFPROTO_NETDEV: ::c_int = 5;
701
702 pub const NLA_ALIGNTO: ::c_int = 4;
703
704 pub const GENL_UNS_ADMIN_PERM: ::c_int = 0x10;
705
706 pub const GENL_ID_VFS_DQUOT: ::c_int = ::NLMSG_MIN_TYPE + 1;
707 pub const GENL_ID_PMCRAID: ::c_int = ::NLMSG_MIN_TYPE + 2;
708
709 pub const NFT_TABLE_MAXNAMELEN: ::c_int = 32;
710 pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 32;
711 pub const NFT_SET_MAXNAMELEN: ::c_int = 32;
712 pub const NFT_OBJ_MAXNAMELEN: ::c_int = 32;
713 pub const NFT_USERDATA_MAXLEN: ::c_int = 256;
714
715 pub const NFT_REG_VERDICT: ::c_int = 0;
716 pub const NFT_REG_1: ::c_int = 1;
717 pub const NFT_REG_2: ::c_int = 2;
718 pub const NFT_REG_3: ::c_int = 3;
719 pub const NFT_REG_4: ::c_int = 4;
720 pub const __NFT_REG_MAX: ::c_int = 5;
721 pub const NFT_REG32_00: ::c_int = 8;
722 pub const NFT_REG32_01: ::c_int = 9;
723 pub const NFT_REG32_02: ::c_int = 10;
724 pub const NFT_REG32_03: ::c_int = 11;
725 pub const NFT_REG32_04: ::c_int = 12;
726 pub const NFT_REG32_05: ::c_int = 13;
727 pub const NFT_REG32_06: ::c_int = 14;
728 pub const NFT_REG32_07: ::c_int = 15;
729 pub const NFT_REG32_08: ::c_int = 16;
730 pub const NFT_REG32_09: ::c_int = 17;
731 pub const NFT_REG32_10: ::c_int = 18;
732 pub const NFT_REG32_11: ::c_int = 19;
733 pub const NFT_REG32_12: ::c_int = 20;
734 pub const NFT_REG32_13: ::c_int = 21;
735 pub const NFT_REG32_14: ::c_int = 22;
736 pub const NFT_REG32_15: ::c_int = 23;
737
738 pub const NFT_REG_SIZE: ::c_int = 16;
739 pub const NFT_REG32_SIZE: ::c_int = 4;
740
741 pub const NFT_CONTINUE: ::c_int = -1;
742 pub const NFT_BREAK: ::c_int = -2;
743 pub const NFT_JUMP: ::c_int = -3;
744 pub const NFT_GOTO: ::c_int = -4;
745 pub const NFT_RETURN: ::c_int = -5;
746
747 pub const NFT_MSG_NEWTABLE: ::c_int = 0;
748 pub const NFT_MSG_GETTABLE: ::c_int = 1;
749 pub const NFT_MSG_DELTABLE: ::c_int = 2;
750 pub const NFT_MSG_NEWCHAIN: ::c_int = 3;
751 pub const NFT_MSG_GETCHAIN: ::c_int = 4;
752 pub const NFT_MSG_DELCHAIN: ::c_int = 5;
753 pub const NFT_MSG_NEWRULE: ::c_int = 6;
754 pub const NFT_MSG_GETRULE: ::c_int = 7;
755 pub const NFT_MSG_DELRULE: ::c_int = 8;
756 pub const NFT_MSG_NEWSET: ::c_int = 9;
757 pub const NFT_MSG_GETSET: ::c_int = 10;
758 pub const NFT_MSG_DELSET: ::c_int = 11;
759 pub const NFT_MSG_NEWSETELEM: ::c_int = 12;
760 pub const NFT_MSG_GETSETELEM: ::c_int = 13;
761 pub const NFT_MSG_DELSETELEM: ::c_int = 14;
762 pub const NFT_MSG_NEWGEN: ::c_int = 15;
763 pub const NFT_MSG_GETGEN: ::c_int = 16;
764 pub const NFT_MSG_TRACE: ::c_int = 17;
765 pub const NFT_MSG_NEWOBJ: ::c_int = 18;
766 pub const NFT_MSG_GETOBJ: ::c_int = 19;
767 pub const NFT_MSG_DELOBJ: ::c_int = 20;
768 pub const NFT_MSG_GETOBJ_RESET: ::c_int = 21;
769 pub const NFT_MSG_MAX: ::c_int = 22;
770
771 pub const NFT_SET_ANONYMOUS: ::c_int = 0x1;
772 pub const NFT_SET_CONSTANT: ::c_int = 0x2;
773 pub const NFT_SET_INTERVAL: ::c_int = 0x4;
774 pub const NFT_SET_MAP: ::c_int = 0x8;
775 pub const NFT_SET_TIMEOUT: ::c_int = 0x10;
776 pub const NFT_SET_EVAL: ::c_int = 0x20;
777
778 pub const NFT_SET_POL_PERFORMANCE: ::c_int = 0;
779 pub const NFT_SET_POL_MEMORY: ::c_int = 1;
780
781 pub const NFT_SET_ELEM_INTERVAL_END: ::c_int = 0x1;
782
783 pub const NFT_DATA_VALUE: ::c_uint = 0;
784 pub const NFT_DATA_VERDICT: ::c_uint = 0xffffff00;
785
786 pub const NFT_DATA_RESERVED_MASK: ::c_uint = 0xffffff00;
787
788 pub const NFT_DATA_VALUE_MAXLEN: ::c_int = 64;
789
790 pub const NFT_BYTEORDER_NTOH: ::c_int = 0;
791 pub const NFT_BYTEORDER_HTON: ::c_int = 1;
792
793 pub const NFT_CMP_EQ: ::c_int = 0;
794 pub const NFT_CMP_NEQ: ::c_int = 1;
795 pub const NFT_CMP_LT: ::c_int = 2;
796 pub const NFT_CMP_LTE: ::c_int = 3;
797 pub const NFT_CMP_GT: ::c_int = 4;
798 pub const NFT_CMP_GTE: ::c_int = 5;
799
800 pub const NFT_RANGE_EQ: ::c_int = 0;
801 pub const NFT_RANGE_NEQ: ::c_int = 1;
802
803 pub const NFT_LOOKUP_F_INV: ::c_int = (1 << 0);
804
805 pub const NFT_DYNSET_OP_ADD: ::c_int = 0;
806 pub const NFT_DYNSET_OP_UPDATE: ::c_int = 1;
807
808 pub const NFT_DYNSET_F_INV: ::c_int = (1 << 0);
809
810 pub const NFT_PAYLOAD_LL_HEADER: ::c_int = 0;
811 pub const NFT_PAYLOAD_NETWORK_HEADER: ::c_int = 1;
812 pub const NFT_PAYLOAD_TRANSPORT_HEADER: ::c_int = 2;
813
814 pub const NFT_PAYLOAD_CSUM_NONE: ::c_int = 0;
815 pub const NFT_PAYLOAD_CSUM_INET: ::c_int = 1;
816
817 pub const NFT_META_LEN: ::c_int = 0;
818 pub const NFT_META_PROTOCOL: ::c_int = 1;
819 pub const NFT_META_PRIORITY: ::c_int = 2;
820 pub const NFT_META_MARK: ::c_int = 3;
821 pub const NFT_META_IIF: ::c_int = 4;
822 pub const NFT_META_OIF: ::c_int = 5;
823 pub const NFT_META_IIFNAME: ::c_int = 6;
824 pub const NFT_META_OIFNAME: ::c_int = 7;
825 pub const NFT_META_IIFTYPE: ::c_int = 8;
826 pub const NFT_META_OIFTYPE: ::c_int = 9;
827 pub const NFT_META_SKUID: ::c_int = 10;
828 pub const NFT_META_SKGID: ::c_int = 11;
829 pub const NFT_META_NFTRACE: ::c_int = 12;
830 pub const NFT_META_RTCLASSID: ::c_int = 13;
831 pub const NFT_META_SECMARK: ::c_int = 14;
832 pub const NFT_META_NFPROTO: ::c_int = 15;
833 pub const NFT_META_L4PROTO: ::c_int = 16;
834 pub const NFT_META_BRI_IIFNAME: ::c_int = 17;
835 pub const NFT_META_BRI_OIFNAME: ::c_int = 18;
836 pub const NFT_META_PKTTYPE: ::c_int = 19;
837 pub const NFT_META_CPU: ::c_int = 20;
838 pub const NFT_META_IIFGROUP: ::c_int = 21;
839 pub const NFT_META_OIFGROUP: ::c_int = 22;
840 pub const NFT_META_CGROUP: ::c_int = 23;
841 pub const NFT_META_PRANDOM: ::c_int = 24;
842
843 pub const NFT_CT_STATE: ::c_int = 0;
844 pub const NFT_CT_DIRECTION: ::c_int = 1;
845 pub const NFT_CT_STATUS: ::c_int = 2;
846 pub const NFT_CT_MARK: ::c_int = 3;
847 pub const NFT_CT_SECMARK: ::c_int = 4;
848 pub const NFT_CT_EXPIRATION: ::c_int = 5;
849 pub const NFT_CT_HELPER: ::c_int = 6;
850 pub const NFT_CT_L3PROTOCOL: ::c_int = 7;
851 pub const NFT_CT_SRC: ::c_int = 8;
852 pub const NFT_CT_DST: ::c_int = 9;
853 pub const NFT_CT_PROTOCOL: ::c_int = 10;
854 pub const NFT_CT_PROTO_SRC: ::c_int = 11;
855 pub const NFT_CT_PROTO_DST: ::c_int = 12;
856 pub const NFT_CT_LABELS: ::c_int = 13;
857 pub const NFT_CT_PKTS: ::c_int = 14;
858 pub const NFT_CT_BYTES: ::c_int = 15;
859
860 pub const NFT_LIMIT_PKTS: ::c_int = 0;
861 pub const NFT_LIMIT_PKT_BYTES: ::c_int = 1;
862
863 pub const NFT_LIMIT_F_INV: ::c_int = (1 << 0);
864
865 pub const NFT_QUEUE_FLAG_BYPASS: ::c_int = 0x01;
866 pub const NFT_QUEUE_FLAG_CPU_FANOUT: ::c_int = 0x02;
867 pub const NFT_QUEUE_FLAG_MASK: ::c_int = 0x03;
868
869 pub const NFT_QUOTA_F_INV: ::c_int = (1 << 0);
870
871 pub const NFT_REJECT_ICMP_UNREACH: ::c_int = 0;
872 pub const NFT_REJECT_TCP_RST: ::c_int = 1;
873 pub const NFT_REJECT_ICMPX_UNREACH: ::c_int = 2;
874
875 pub const NFT_REJECT_ICMPX_NO_ROUTE: ::c_int = 0;
876 pub const NFT_REJECT_ICMPX_PORT_UNREACH: ::c_int = 1;
877 pub const NFT_REJECT_ICMPX_HOST_UNREACH: ::c_int = 2;
878 pub const NFT_REJECT_ICMPX_ADMIN_PROHIBITED: ::c_int = 3;
879
880 pub const NFT_NAT_SNAT: ::c_int = 0;
881 pub const NFT_NAT_DNAT: ::c_int = 1;
882
883 pub const NFT_TRACETYPE_UNSPEC: ::c_int = 0;
884 pub const NFT_TRACETYPE_POLICY: ::c_int = 1;
885 pub const NFT_TRACETYPE_RETURN: ::c_int = 2;
886 pub const NFT_TRACETYPE_RULE: ::c_int = 3;
887
888 pub const NFT_NG_INCREMENTAL: ::c_int = 0;
889 pub const NFT_NG_RANDOM: ::c_int = 1;
890
891 #[doc(hidden)]
892 pub const AF_MAX: ::c_int = 42;
893 #[doc(hidden)]
894 pub const PF_MAX: ::c_int = AF_MAX;
895
896 f! {
897 pub fn NLA_ALIGN(len: ::c_int) -> ::c_int {
898 return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1)
899 }
900 }
901
902 #[link(name = "util")]
903 extern {
904 pub fn sysctl(name: *mut ::c_int,
905 namelen: ::c_int,
906 oldp: *mut ::c_void,
907 oldlenp: *mut ::size_t,
908 newp: *mut ::c_void,
909 newlen: ::size_t)
910 -> ::c_int;
911 pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
912 pub fn backtrace(buf: *mut *mut ::c_void,
913 sz: ::c_int) -> ::c_int;
914 pub fn glob64(pattern: *const ::c_char,
915 flags: ::c_int,
916 errfunc: ::Option<extern fn(epath: *const ::c_char,
917 errno: ::c_int)
918 -> ::c_int>,
919 pglob: *mut glob64_t) -> ::c_int;
920 pub fn globfree64(pglob: *mut glob64_t);
921 pub fn ptrace(request: ::c_uint, ...) -> ::c_long;
922 pub fn pthread_attr_getaffinity_np(attr: *const ::pthread_attr_t,
923 cpusetsize: ::size_t,
924 cpuset: *mut ::cpu_set_t) -> ::c_int;
925 pub fn pthread_attr_setaffinity_np(attr: *mut ::pthread_attr_t,
926 cpusetsize: ::size_t,
927 cpuset: *const ::cpu_set_t) -> ::c_int;
928 pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int;
929 pub fn setpriority(which: ::__priority_which_t, who: ::id_t,
930 prio: ::c_int) -> ::c_int;
931 pub fn pthread_getaffinity_np(thread: ::pthread_t,
932 cpusetsize: ::size_t,
933 cpuset: *mut ::cpu_set_t) -> ::c_int;
934 pub fn pthread_setaffinity_np(thread: ::pthread_t,
935 cpusetsize: ::size_t,
936 cpuset: *const ::cpu_set_t) -> ::c_int;
937 pub fn sched_getcpu() -> ::c_int;
938 }
939
940 cfg_if! {
941 if #[cfg(target_arch = "mips")] {
942 mod mips32;
943 pub use self::mips32::*;
944 } else if #[cfg(target_arch = "mips64")] {
945 mod mips64;
946 pub use self::mips64::*;
947 } else {
948 // Unknown target_arch
949 }
950 }
951
952 cfg_if! {
953 if #[cfg(libc_align)] {
954 mod align;
955 pub use self::align::*;
956 } else {
957 mod no_align;
958 pub use self::no_align::*;
959 }
960 }