1 //! Android-specific definitions for linux-like values
3 use dox
::{mem, Option}
;
5 pub type clock_t
= ::c_long
;
6 pub type time_t
= ::c_long
;
7 pub type suseconds_t
= ::c_long
;
8 pub type off_t
= ::c_long
;
9 pub type blkcnt_t
= ::c_ulong
;
10 pub type blksize_t
= ::c_ulong
;
11 pub type nlink_t
= u32;
12 pub type useconds_t
= u32;
13 pub type pthread_t
= ::c_long
;
14 pub type pthread_mutexattr_t
= ::c_long
;
15 pub type pthread_rwlockattr_t
= ::c_long
;
16 pub type pthread_condattr_t
= ::c_long
;
17 pub type fsfilcnt_t
= ::c_ulong
;
18 pub type fsblkcnt_t
= ::c_ulong
;
19 pub type nfds_t
= ::c_uint
;
20 pub type rlim_t
= ::c_ulong
;
21 pub type dev_t
= ::c_ulong
;
22 pub type ino_t
= ::c_ulong
;
23 pub type __CPU_BITTYPE
= ::c_ulong
;
24 pub type idtype_t
= ::c_int
;
25 pub type loff_t
= ::c_longlong
;
31 pub d_reclen
: ::c_ushort
,
32 pub d_type
: ::c_uchar
,
33 pub d_name
: [::c_char
; 256],
39 pub d_reclen
: ::c_ushort
,
40 pub d_type
: ::c_uchar
,
41 pub d_name
: [::c_char
; 256],
45 pub ss_sp
: *mut ::c_void
,
46 pub ss_flags
: ::c_int
,
50 pub struct siginfo_t
{
51 pub si_signo
: ::c_int
,
52 pub si_errno
: ::c_int
,
54 pub _pad
: [::c_int
; 29],
63 pub msg_name
: *mut ::c_void
,
64 pub msg_namelen
: ::socklen_t
,
65 pub msg_iov
: *mut ::iovec
,
66 pub msg_iovlen
: ::size_t
,
67 pub msg_control
: *mut ::c_void
,
68 pub msg_controllen
: ::size_t
,
69 pub msg_flags
: ::c_int
,
73 pub cmsg_len
: ::size_t
,
74 pub cmsg_level
: ::c_int
,
75 pub cmsg_type
: ::c_int
,
79 pub c_iflag
: ::tcflag_t
,
80 pub c_oflag
: ::tcflag_t
,
81 pub c_cflag
: ::tcflag_t
,
82 pub c_lflag
: ::tcflag_t
,
84 pub c_cc
: [::cc_t
; ::NCCS
],
88 pub c_iflag
: ::tcflag_t
,
89 pub c_oflag
: ::tcflag_t
,
90 pub c_cflag
: ::tcflag_t
,
91 pub c_lflag
: ::tcflag_t
,
93 pub c_cc
: [::cc_t
; 19],
94 pub c_ispeed
: ::speed_t
,
95 pub c_ospeed
: ::speed_t
,
99 pub l_type
: ::c_short
,
100 pub l_whence
: ::c_short
,
101 pub l_start
: ::off_t
,
106 pub struct cpu_set_t
{
107 #[cfg(target_pointer_width = "64")]
108 __bits
: [__CPU_BITTYPE
; 16],
109 #[cfg(target_pointer_width = "32")]
110 __bits
: [__CPU_BITTYPE
; 1],
115 #[cfg(target_pointer_width = "64")]
116 __reserved
: [::c_int
; 3],
121 ll_line
: [::c_char
; UT_LINESIZE
],
122 ll_host
: [::c_char
; UT_HOSTSIZE
],
125 pub struct exit_status
{
126 pub e_termination
: ::c_short
,
127 pub e_exit
: ::c_short
,
131 pub ut_type
: ::c_short
,
133 pub ut_line
: [::c_char
; UT_LINESIZE
],
134 pub ut_id
: [::c_char
; 4],
136 pub ut_user
: [::c_char
; UT_NAMESIZE
],
137 pub ut_host
: [::c_char
; UT_HOSTSIZE
],
138 pub ut_exit
: exit_status
,
139 pub ut_session
: ::c_long
,
140 pub ut_tv
: ::timeval
,
142 pub ut_addr_v6
: [::int32_t
; 4],
143 unused
: [::c_char
; 20],
147 pub f_bsize
: ::c_ulong
,
148 pub f_frsize
: ::c_ulong
,
149 pub f_blocks
: ::fsblkcnt_t
,
150 pub f_bfree
: ::fsblkcnt_t
,
151 pub f_bavail
: ::fsblkcnt_t
,
152 pub f_files
: ::fsfilcnt_t
,
153 pub f_ffree
: ::fsfilcnt_t
,
154 pub f_favail
: ::fsfilcnt_t
,
155 pub f_fsid
: ::c_ulong
,
156 pub f_flag
: ::c_ulong
,
157 pub f_namemax
: ::c_ulong
,
158 #[cfg(target_pointer_width = "64")]
159 __f_reserved
: [u32; 6],
162 pub struct signalfd_siginfo
{
163 pub ssi_signo
: ::uint32_t
,
164 pub ssi_errno
: ::int32_t
,
165 pub ssi_code
: ::int32_t
,
166 pub ssi_pid
: ::uint32_t
,
167 pub ssi_uid
: ::uint32_t
,
168 pub ssi_fd
: ::int32_t
,
169 pub ssi_tid
: ::uint32_t
,
170 pub ssi_band
: ::uint32_t
,
171 pub ssi_overrun
: ::uint32_t
,
172 pub ssi_trapno
: ::uint32_t
,
173 pub ssi_status
: ::int32_t
,
174 pub ssi_int
: ::int32_t
,
175 pub ssi_ptr
: ::c_ulonglong
,
176 pub ssi_utime
: ::c_ulonglong
,
177 pub ssi_stime
: ::c_ulonglong
,
178 pub ssi_addr
: ::c_ulonglong
,
179 pub ssi_addr_lsb
: ::uint16_t
,
181 pub ssi_syscall
: ::int32_t
,
182 pub ssi_call_addr
: ::uint64_t
,
183 pub ssi_arch
: ::uint32_t
,
184 _pad
: [::uint8_t
; 28],
193 pub struct genlmsghdr
{
199 pub struct nlmsghdr
{
202 pub nlmsg_flags
: u16,
207 pub struct nlmsgerr
{
212 pub struct nl_pktinfo
{
216 pub struct nl_mmap_req
{
217 pub nm_block_size
: ::c_uint
,
218 pub nm_block_nr
: ::c_uint
,
219 pub nm_frame_size
: ::c_uint
,
220 pub nm_frame_nr
: ::c_uint
,
223 pub struct nl_mmap_hdr
{
224 pub nm_status
: ::c_uint
,
225 pub nm_len
: ::c_uint
,
237 pub struct in6_pktinfo
{
238 pub ipi6_addr
: ::in6_addr
,
239 pub ipi6_ifindex
: ::c_int
,
243 pub const O_TRUNC
: ::c_int
= 512;
244 pub const O_CLOEXEC
: ::c_int
= 0x80000;
245 pub const O_PATH
: ::c_int
= 0o10000000;
246 pub const O_NOATIME
: ::c_int
= 0o1000000;
248 pub const EBFONT
: ::c_int
= 59;
249 pub const ENOSTR
: ::c_int
= 60;
250 pub const ENODATA
: ::c_int
= 61;
251 pub const ETIME
: ::c_int
= 62;
252 pub const ENOSR
: ::c_int
= 63;
253 pub const ENONET
: ::c_int
= 64;
254 pub const ENOPKG
: ::c_int
= 65;
255 pub const EREMOTE
: ::c_int
= 66;
256 pub const ENOLINK
: ::c_int
= 67;
257 pub const EADV
: ::c_int
= 68;
258 pub const ESRMNT
: ::c_int
= 69;
259 pub const ECOMM
: ::c_int
= 70;
260 pub const EPROTO
: ::c_int
= 71;
261 pub const EDOTDOT
: ::c_int
= 73;
263 pub const SA_NODEFER
: ::c_int
= 0x40000000;
264 pub const SA_RESETHAND
: ::c_int
= 0x80000000;
265 pub const SA_RESTART
: ::c_int
= 0x10000000;
266 pub const SA_NOCLDSTOP
: ::c_int
= 0x00000001;
268 pub const EPOLL_CLOEXEC
: ::c_int
= 0x80000;
269 pub const EPOLLONESHOT
: ::c_int
= 0x40000000;
270 pub const EPOLLRDHUP
: ::c_int
= 0x00002000;
271 pub const EPOLLWAKEUP
: ::c_int
= 0x20000000;
273 pub const EFD_CLOEXEC
: ::c_int
= 0x80000;
275 pub const USER_PROCESS
: ::c_short
= 7;
277 pub const BUFSIZ
: ::c_uint
= 1024;
278 pub const FILENAME_MAX
: ::c_uint
= 1024;
279 pub const FOPEN_MAX
: ::c_uint
= 20;
280 pub const POSIX_FADV_DONTNEED
: ::c_int
= 4;
281 pub const POSIX_FADV_NOREUSE
: ::c_int
= 5;
282 pub const L_tmpnam
: ::c_uint
= 1024;
283 pub const TMP_MAX
: ::c_uint
= 308915776;
284 pub const _PC_LINK_MAX
: ::c_int
= 1;
285 pub const _PC_MAX_CANON
: ::c_int
= 2;
286 pub const _PC_MAX_INPUT
: ::c_int
= 3;
287 pub const _PC_NAME_MAX
: ::c_int
= 4;
288 pub const _PC_PATH_MAX
: ::c_int
= 5;
289 pub const _PC_PIPE_BUF
: ::c_int
= 6;
290 pub const _PC_2_SYMLINKS
: ::c_int
= 7;
291 pub const _PC_ALLOC_SIZE_MIN
: ::c_int
= 8;
292 pub const _PC_REC_INCR_XFER_SIZE
: ::c_int
= 9;
293 pub const _PC_REC_MAX_XFER_SIZE
: ::c_int
= 10;
294 pub const _PC_REC_MIN_XFER_SIZE
: ::c_int
= 11;
295 pub const _PC_REC_XFER_ALIGN
: ::c_int
= 12;
296 pub const _PC_SYMLINK_MAX
: ::c_int
= 13;
297 pub const _PC_CHOWN_RESTRICTED
: ::c_int
= 14;
298 pub const _PC_NO_TRUNC
: ::c_int
= 15;
299 pub const _PC_VDISABLE
: ::c_int
= 16;
300 pub const _PC_ASYNC_IO
: ::c_int
= 17;
301 pub const _PC_PRIO_IO
: ::c_int
= 18;
302 pub const _PC_SYNC_IO
: ::c_int
= 19;
304 pub const FIONBIO
: ::c_int
= 0x5421;
306 pub const _SC_ARG_MAX
: ::c_int
= 0;
307 pub const _SC_BC_BASE_MAX
: ::c_int
= 1;
308 pub const _SC_BC_DIM_MAX
: ::c_int
= 2;
309 pub const _SC_BC_SCALE_MAX
: ::c_int
= 3;
310 pub const _SC_BC_STRING_MAX
: ::c_int
= 4;
311 pub const _SC_CHILD_MAX
: ::c_int
= 5;
312 pub const _SC_CLK_TCK
: ::c_int
= 6;
313 pub const _SC_COLL_WEIGHTS_MAX
: ::c_int
= 7;
314 pub const _SC_EXPR_NEST_MAX
: ::c_int
= 8;
315 pub const _SC_LINE_MAX
: ::c_int
= 9;
316 pub const _SC_NGROUPS_MAX
: ::c_int
= 10;
317 pub const _SC_OPEN_MAX
: ::c_int
= 11;
318 pub const _SC_PASS_MAX
: ::c_int
= 12;
319 pub const _SC_2_C_BIND
: ::c_int
= 13;
320 pub const _SC_2_C_DEV
: ::c_int
= 14;
321 pub const _SC_2_C_VERSION
: ::c_int
= 15;
322 pub const _SC_2_CHAR_TERM
: ::c_int
= 16;
323 pub const _SC_2_FORT_DEV
: ::c_int
= 17;
324 pub const _SC_2_FORT_RUN
: ::c_int
= 18;
325 pub const _SC_2_LOCALEDEF
: ::c_int
= 19;
326 pub const _SC_2_SW_DEV
: ::c_int
= 20;
327 pub const _SC_2_UPE
: ::c_int
= 21;
328 pub const _SC_2_VERSION
: ::c_int
= 22;
329 pub const _SC_JOB_CONTROL
: ::c_int
= 23;
330 pub const _SC_SAVED_IDS
: ::c_int
= 24;
331 pub const _SC_VERSION
: ::c_int
= 25;
332 pub const _SC_RE_DUP_MAX
: ::c_int
= 26;
333 pub const _SC_STREAM_MAX
: ::c_int
= 27;
334 pub const _SC_TZNAME_MAX
: ::c_int
= 28;
335 pub const _SC_XOPEN_CRYPT
: ::c_int
= 29;
336 pub const _SC_XOPEN_ENH_I18N
: ::c_int
= 30;
337 pub const _SC_XOPEN_SHM
: ::c_int
= 31;
338 pub const _SC_XOPEN_VERSION
: ::c_int
= 32;
339 pub const _SC_XOPEN_XCU_VERSION
: ::c_int
= 33;
340 pub const _SC_XOPEN_REALTIME
: ::c_int
= 34;
341 pub const _SC_XOPEN_REALTIME_THREADS
: ::c_int
= 35;
342 pub const _SC_XOPEN_LEGACY
: ::c_int
= 36;
343 pub const _SC_ATEXIT_MAX
: ::c_int
= 37;
344 pub const _SC_IOV_MAX
: ::c_int
= 38;
345 pub const _SC_PAGESIZE
: ::c_int
= 39;
346 pub const _SC_PAGE_SIZE
: ::c_int
= 40;
347 pub const _SC_XOPEN_UNIX
: ::c_int
= 41;
348 pub const _SC_XBS5_ILP32_OFF32
: ::c_int
= 42;
349 pub const _SC_XBS5_ILP32_OFFBIG
: ::c_int
= 43;
350 pub const _SC_XBS5_LP64_OFF64
: ::c_int
= 44;
351 pub const _SC_XBS5_LPBIG_OFFBIG
: ::c_int
= 45;
352 pub const _SC_AIO_LISTIO_MAX
: ::c_int
= 46;
353 pub const _SC_AIO_MAX
: ::c_int
= 47;
354 pub const _SC_AIO_PRIO_DELTA_MAX
: ::c_int
= 48;
355 pub const _SC_DELAYTIMER_MAX
: ::c_int
= 49;
356 pub const _SC_MQ_OPEN_MAX
: ::c_int
= 50;
357 pub const _SC_MQ_PRIO_MAX
: ::c_int
= 51;
358 pub const _SC_RTSIG_MAX
: ::c_int
= 52;
359 pub const _SC_SEM_NSEMS_MAX
: ::c_int
= 53;
360 pub const _SC_SEM_VALUE_MAX
: ::c_int
= 54;
361 pub const _SC_SIGQUEUE_MAX
: ::c_int
= 55;
362 pub const _SC_TIMER_MAX
: ::c_int
= 56;
363 pub const _SC_ASYNCHRONOUS_IO
: ::c_int
= 57;
364 pub const _SC_FSYNC
: ::c_int
= 58;
365 pub const _SC_MAPPED_FILES
: ::c_int
= 59;
366 pub const _SC_MEMLOCK
: ::c_int
= 60;
367 pub const _SC_MEMLOCK_RANGE
: ::c_int
= 61;
368 pub const _SC_MEMORY_PROTECTION
: ::c_int
= 62;
369 pub const _SC_MESSAGE_PASSING
: ::c_int
= 63;
370 pub const _SC_PRIORITIZED_IO
: ::c_int
= 64;
371 pub const _SC_PRIORITY_SCHEDULING
: ::c_int
= 65;
372 pub const _SC_REALTIME_SIGNALS
: ::c_int
= 66;
373 pub const _SC_SEMAPHORES
: ::c_int
= 67;
374 pub const _SC_SHARED_MEMORY_OBJECTS
: ::c_int
= 68;
375 pub const _SC_SYNCHRONIZED_IO
: ::c_int
= 69;
376 pub const _SC_TIMERS
: ::c_int
= 70;
377 pub const _SC_GETGR_R_SIZE_MAX
: ::c_int
= 71;
378 pub const _SC_GETPW_R_SIZE_MAX
: ::c_int
= 72;
379 pub const _SC_LOGIN_NAME_MAX
: ::c_int
= 73;
380 pub const _SC_THREAD_DESTRUCTOR_ITERATIONS
: ::c_int
= 74;
381 pub const _SC_THREAD_KEYS_MAX
: ::c_int
= 75;
382 pub const _SC_THREAD_STACK_MIN
: ::c_int
= 76;
383 pub const _SC_THREAD_THREADS_MAX
: ::c_int
= 77;
384 pub const _SC_TTY_NAME_MAX
: ::c_int
= 78;
385 pub const _SC_THREADS
: ::c_int
= 79;
386 pub const _SC_THREAD_ATTR_STACKADDR
: ::c_int
= 80;
387 pub const _SC_THREAD_ATTR_STACKSIZE
: ::c_int
= 81;
388 pub const _SC_THREAD_PRIORITY_SCHEDULING
: ::c_int
= 82;
389 pub const _SC_THREAD_PRIO_INHERIT
: ::c_int
= 83;
390 pub const _SC_THREAD_PRIO_PROTECT
: ::c_int
= 84;
391 pub const _SC_THREAD_SAFE_FUNCTIONS
: ::c_int
= 85;
392 pub const _SC_NPROCESSORS_CONF
: ::c_int
= 96;
393 pub const _SC_NPROCESSORS_ONLN
: ::c_int
= 97;
394 pub const _SC_PHYS_PAGES
: ::c_int
= 98;
395 pub const _SC_AVPHYS_PAGES
: ::c_int
= 99;
396 pub const _SC_MONOTONIC_CLOCK
: ::c_int
= 100;
398 pub const _SC_2_PBS
: ::c_int
= 101;
399 pub const _SC_2_PBS_ACCOUNTING
: ::c_int
= 102;
400 pub const _SC_2_PBS_CHECKPOINT
: ::c_int
= 103;
401 pub const _SC_2_PBS_LOCATE
: ::c_int
= 104;
402 pub const _SC_2_PBS_MESSAGE
: ::c_int
= 105;
403 pub const _SC_2_PBS_TRACK
: ::c_int
= 106;
404 pub const _SC_ADVISORY_INFO
: ::c_int
= 107;
405 pub const _SC_BARRIERS
: ::c_int
= 108;
406 pub const _SC_CLOCK_SELECTION
: ::c_int
= 109;
407 pub const _SC_CPUTIME
: ::c_int
= 110;
408 pub const _SC_HOST_NAME_MAX
: ::c_int
= 111;
409 pub const _SC_IPV6
: ::c_int
= 112;
410 pub const _SC_RAW_SOCKETS
: ::c_int
= 113;
411 pub const _SC_READER_WRITER_LOCKS
: ::c_int
= 114;
412 pub const _SC_REGEXP
: ::c_int
= 115;
413 pub const _SC_SHELL
: ::c_int
= 116;
414 pub const _SC_SPAWN
: ::c_int
= 117;
415 pub const _SC_SPIN_LOCKS
: ::c_int
= 118;
416 pub const _SC_SPORADIC_SERVER
: ::c_int
= 119;
417 pub const _SC_SS_REPL_MAX
: ::c_int
= 120;
418 pub const _SC_SYMLOOP_MAX
: ::c_int
= 121;
419 pub const _SC_THREAD_CPUTIME
: ::c_int
= 122;
420 pub const _SC_THREAD_PROCESS_SHARED
: ::c_int
= 123;
421 pub const _SC_THREAD_ROBUST_PRIO_INHERIT
: ::c_int
= 124;
422 pub const _SC_THREAD_ROBUST_PRIO_PROTECT
: ::c_int
= 125;
423 pub const _SC_THREAD_SPORADIC_SERVER
: ::c_int
= 126;
424 pub const _SC_TIMEOUTS
: ::c_int
= 127;
425 pub const _SC_TRACE
: ::c_int
= 128;
426 pub const _SC_TRACE_EVENT_FILTER
: ::c_int
= 129;
427 pub const _SC_TRACE_EVENT_NAME_MAX
: ::c_int
= 130;
428 pub const _SC_TRACE_INHERIT
: ::c_int
= 131;
429 pub const _SC_TRACE_LOG
: ::c_int
= 132;
430 pub const _SC_TRACE_NAME_MAX
: ::c_int
= 133;
431 pub const _SC_TRACE_SYS_MAX
: ::c_int
= 134;
432 pub const _SC_TRACE_USER_EVENT_MAX
: ::c_int
= 135;
433 pub const _SC_TYPED_MEMORY_OBJECTS
: ::c_int
= 136;
434 pub const _SC_V7_ILP32_OFF32
: ::c_int
= 137;
435 pub const _SC_V7_ILP32_OFFBIG
: ::c_int
= 138;
436 pub const _SC_V7_LP64_OFF64
: ::c_int
= 139;
437 pub const _SC_V7_LPBIG_OFFBIG
: ::c_int
= 140;
438 pub const _SC_XOPEN_STREAMS
: ::c_int
= 141;
439 pub const _SC_XOPEN_UUCP
: ::c_int
= 142;
441 pub const PTHREAD_MUTEX_NORMAL
: ::c_int
= 0;
442 pub const PTHREAD_MUTEX_RECURSIVE
: ::c_int
= 1;
443 pub const PTHREAD_MUTEX_ERRORCHECK
: ::c_int
= 2;
444 pub const PTHREAD_MUTEX_DEFAULT
: ::c_int
= PTHREAD_MUTEX_NORMAL
;
446 pub const FIOCLEX
: ::c_int
= 0x5451;
448 pub const SA_ONSTACK
: ::c_ulong
= 0x08000000;
449 pub const SA_SIGINFO
: ::c_ulong
= 0x00000004;
450 pub const SA_NOCLDWAIT
: ::c_ulong
= 0x00000002;
451 pub const SIGCHLD
: ::c_int
= 17;
452 pub const SIGBUS
: ::c_int
= 7;
453 pub const SIGUSR1
: ::c_int
= 10;
454 pub const SIGUSR2
: ::c_int
= 12;
455 pub const SIGCONT
: ::c_int
= 18;
456 pub const SIGSTOP
: ::c_int
= 19;
457 pub const SIGTSTP
: ::c_int
= 20;
458 pub const SIGURG
: ::c_int
= 23;
459 pub const SIGIO
: ::c_int
= 29;
460 pub const SIGSYS
: ::c_int
= 31;
461 pub const SIGSTKFLT
: ::c_int
= 16;
462 pub const SIGUNUSED
: ::c_int
= 31;
463 pub const SIGTTIN
: ::c_int
= 21;
464 pub const SIGTTOU
: ::c_int
= 22;
465 pub const SIGXCPU
: ::c_int
= 24;
466 pub const SIGXFSZ
: ::c_int
= 25;
467 pub const SIGVTALRM
: ::c_int
= 26;
468 pub const SIGPROF
: ::c_int
= 27;
469 pub const SIGWINCH
: ::c_int
= 28;
470 pub const SIGPOLL
: ::c_int
= 29;
471 pub const SIGPWR
: ::c_int
= 30;
472 pub const SIG_SETMASK
: ::c_int
= 2;
473 pub const SIG_BLOCK
: ::c_int
= 0x000000;
474 pub const SIG_UNBLOCK
: ::c_int
= 0x01;
476 pub const RUSAGE_CHILDREN
: ::c_int
= -1;
478 pub const LC_PAPER
: ::c_int
= 7;
479 pub const LC_NAME
: ::c_int
= 8;
480 pub const LC_ADDRESS
: ::c_int
= 9;
481 pub const LC_TELEPHONE
: ::c_int
= 10;
482 pub const LC_MEASUREMENT
: ::c_int
= 11;
483 pub const LC_IDENTIFICATION
: ::c_int
= 12;
484 pub const LC_PAPER_MASK
: ::c_int
= (1 << LC_PAPER
);
485 pub const LC_NAME_MASK
: ::c_int
= (1 << LC_NAME
);
486 pub const LC_ADDRESS_MASK
: ::c_int
= (1 << LC_ADDRESS
);
487 pub const LC_TELEPHONE_MASK
: ::c_int
= (1 << LC_TELEPHONE
);
488 pub const LC_MEASUREMENT_MASK
: ::c_int
= (1 << LC_MEASUREMENT
);
489 pub const LC_IDENTIFICATION_MASK
: ::c_int
= (1 << LC_IDENTIFICATION
);
490 pub const LC_ALL_MASK
: ::c_int
= ::LC_CTYPE_MASK
500 | LC_MEASUREMENT_MASK
501 | LC_IDENTIFICATION_MASK
;
503 pub const MAP_ANON
: ::c_int
= 0x0020;
504 pub const MAP_ANONYMOUS
: ::c_int
= 0x0020;
505 pub const MAP_GROWSDOWN
: ::c_int
= 0x0100;
506 pub const MAP_DENYWRITE
: ::c_int
= 0x0800;
507 pub const MAP_EXECUTABLE
: ::c_int
= 0x01000;
508 pub const MAP_LOCKED
: ::c_int
= 0x02000;
509 pub const MAP_NORESERVE
: ::c_int
= 0x04000;
510 pub const MAP_POPULATE
: ::c_int
= 0x08000;
511 pub const MAP_NONBLOCK
: ::c_int
= 0x010000;
512 pub const MAP_STACK
: ::c_int
= 0x020000;
514 pub const EDEADLK
: ::c_int
= 35;
515 pub const ENAMETOOLONG
: ::c_int
= 36;
516 pub const ENOLCK
: ::c_int
= 37;
517 pub const ENOSYS
: ::c_int
= 38;
518 pub const ENOTEMPTY
: ::c_int
= 39;
519 pub const ELOOP
: ::c_int
= 40;
520 pub const ENOMSG
: ::c_int
= 42;
521 pub const EIDRM
: ::c_int
= 43;
522 pub const ECHRNG
: ::c_int
= 44;
523 pub const EL2NSYNC
: ::c_int
= 45;
524 pub const EL3HLT
: ::c_int
= 46;
525 pub const EL3RST
: ::c_int
= 47;
526 pub const ELNRNG
: ::c_int
= 48;
527 pub const EUNATCH
: ::c_int
= 49;
528 pub const ENOCSI
: ::c_int
= 50;
529 pub const EL2HLT
: ::c_int
= 51;
530 pub const EBADE
: ::c_int
= 52;
531 pub const EBADR
: ::c_int
= 53;
532 pub const EXFULL
: ::c_int
= 54;
533 pub const ENOANO
: ::c_int
= 55;
534 pub const EBADRQC
: ::c_int
= 56;
535 pub const EBADSLT
: ::c_int
= 57;
537 pub const EMULTIHOP
: ::c_int
= 72;
538 pub const EBADMSG
: ::c_int
= 74;
539 pub const EOVERFLOW
: ::c_int
= 75;
540 pub const ENOTUNIQ
: ::c_int
= 76;
541 pub const EBADFD
: ::c_int
= 77;
542 pub const EREMCHG
: ::c_int
= 78;
543 pub const ELIBACC
: ::c_int
= 79;
544 pub const ELIBBAD
: ::c_int
= 80;
545 pub const ELIBSCN
: ::c_int
= 81;
546 pub const ELIBMAX
: ::c_int
= 82;
547 pub const ELIBEXEC
: ::c_int
= 83;
548 pub const EILSEQ
: ::c_int
= 84;
549 pub const ERESTART
: ::c_int
= 85;
550 pub const ESTRPIPE
: ::c_int
= 86;
551 pub const EUSERS
: ::c_int
= 87;
552 pub const ENOTSOCK
: ::c_int
= 88;
553 pub const EDESTADDRREQ
: ::c_int
= 89;
554 pub const EMSGSIZE
: ::c_int
= 90;
555 pub const EPROTOTYPE
: ::c_int
= 91;
556 pub const ENOPROTOOPT
: ::c_int
= 92;
557 pub const EPROTONOSUPPORT
: ::c_int
= 93;
558 pub const ESOCKTNOSUPPORT
: ::c_int
= 94;
559 pub const EOPNOTSUPP
: ::c_int
= 95;
560 pub const ENOTSUP
: ::c_int
= EOPNOTSUPP
;
561 pub const EPFNOSUPPORT
: ::c_int
= 96;
562 pub const EAFNOSUPPORT
: ::c_int
= 97;
563 pub const EADDRINUSE
: ::c_int
= 98;
564 pub const EADDRNOTAVAIL
: ::c_int
= 99;
565 pub const ENETDOWN
: ::c_int
= 100;
566 pub const ENETUNREACH
: ::c_int
= 101;
567 pub const ENETRESET
: ::c_int
= 102;
568 pub const ECONNABORTED
: ::c_int
= 103;
569 pub const ECONNRESET
: ::c_int
= 104;
570 pub const ENOBUFS
: ::c_int
= 105;
571 pub const EISCONN
: ::c_int
= 106;
572 pub const ENOTCONN
: ::c_int
= 107;
573 pub const ESHUTDOWN
: ::c_int
= 108;
574 pub const ETOOMANYREFS
: ::c_int
= 109;
575 pub const ETIMEDOUT
: ::c_int
= 110;
576 pub const ECONNREFUSED
: ::c_int
= 111;
577 pub const EHOSTDOWN
: ::c_int
= 112;
578 pub const EHOSTUNREACH
: ::c_int
= 113;
579 pub const EALREADY
: ::c_int
= 114;
580 pub const EINPROGRESS
: ::c_int
= 115;
581 pub const ESTALE
: ::c_int
= 116;
582 pub const EUCLEAN
: ::c_int
= 117;
583 pub const ENOTNAM
: ::c_int
= 118;
584 pub const ENAVAIL
: ::c_int
= 119;
585 pub const EISNAM
: ::c_int
= 120;
586 pub const EREMOTEIO
: ::c_int
= 121;
587 pub const EDQUOT
: ::c_int
= 122;
588 pub const ENOMEDIUM
: ::c_int
= 123;
589 pub const EMEDIUMTYPE
: ::c_int
= 124;
590 pub const ECANCELED
: ::c_int
= 125;
591 pub const ENOKEY
: ::c_int
= 126;
592 pub const EKEYEXPIRED
: ::c_int
= 127;
593 pub const EKEYREVOKED
: ::c_int
= 128;
594 pub const EKEYREJECTED
: ::c_int
= 129;
595 pub const EOWNERDEAD
: ::c_int
= 130;
596 pub const ENOTRECOVERABLE
: ::c_int
= 131;
598 pub const SOCK_STREAM
: ::c_int
= 1;
599 pub const SOCK_DGRAM
: ::c_int
= 2;
600 pub const SOCK_SEQPACKET
: ::c_int
= 5;
601 pub const SOCK_DCCP
: ::c_int
= 6;
602 pub const SOCK_PACKET
: ::c_int
= 10;
604 pub const SOL_SOCKET
: ::c_int
= 1;
605 pub const SOL_SCTP
: ::c_int
= 132;
606 pub const SOL_IPX
: ::c_int
= 256;
607 pub const SOL_AX25
: ::c_int
= 257;
608 pub const SOL_ATALK
: ::c_int
= 258;
609 pub const SOL_NETROM
: ::c_int
= 259;
610 pub const SOL_ROSE
: ::c_int
= 260;
613 pub const AF_MAX
: ::c_int
= 43;
615 pub const PF_MAX
: ::c_int
= AF_MAX
;
617 /* DCCP socket options */
618 pub const DCCP_SOCKOPT_PACKET_SIZE
: ::c_int
= 1;
619 pub const DCCP_SOCKOPT_SERVICE
: ::c_int
= 2;
620 pub const DCCP_SOCKOPT_CHANGE_L
: ::c_int
= 3;
621 pub const DCCP_SOCKOPT_CHANGE_R
: ::c_int
= 4;
622 pub const DCCP_SOCKOPT_GET_CUR_MPS
: ::c_int
= 5;
623 pub const DCCP_SOCKOPT_SERVER_TIMEWAIT
: ::c_int
= 6;
624 pub const DCCP_SOCKOPT_SEND_CSCOV
: ::c_int
= 10;
625 pub const DCCP_SOCKOPT_RECV_CSCOV
: ::c_int
= 11;
626 pub const DCCP_SOCKOPT_AVAILABLE_CCIDS
: ::c_int
= 12;
627 pub const DCCP_SOCKOPT_CCID
: ::c_int
= 13;
628 pub const DCCP_SOCKOPT_TX_CCID
: ::c_int
= 14;
629 pub const DCCP_SOCKOPT_RX_CCID
: ::c_int
= 15;
630 pub const DCCP_SOCKOPT_QPOLICY_ID
: ::c_int
= 16;
631 pub const DCCP_SOCKOPT_QPOLICY_TXQLEN
: ::c_int
= 17;
632 pub const DCCP_SOCKOPT_CCID_RX_INFO
: ::c_int
= 128;
633 pub const DCCP_SOCKOPT_CCID_TX_INFO
: ::c_int
= 192;
635 /// maximum number of services provided on the same listening port
636 pub const DCCP_SERVICE_LIST_MAX_LEN
: ::c_int
= 32;
638 pub const SO_REUSEADDR
: ::c_int
= 2;
639 pub const SO_TYPE
: ::c_int
= 3;
640 pub const SO_ERROR
: ::c_int
= 4;
641 pub const SO_DONTROUTE
: ::c_int
= 5;
642 pub const SO_BROADCAST
: ::c_int
= 6;
643 pub const SO_SNDBUF
: ::c_int
= 7;
644 pub const SO_RCVBUF
: ::c_int
= 8;
645 pub const SO_KEEPALIVE
: ::c_int
= 9;
646 pub const SO_OOBINLINE
: ::c_int
= 10;
647 pub const SO_PRIORITY
: ::c_int
= 12;
648 pub const SO_LINGER
: ::c_int
= 13;
649 pub const SO_BSDCOMPAT
: ::c_int
= 14;
650 pub const SO_REUSEPORT
: ::c_int
= 15;
651 pub const SO_PASSCRED
: ::c_int
= 16;
652 pub const SO_PEERCRED
: ::c_int
= 17;
653 pub const SO_RCVLOWAT
: ::c_int
= 18;
654 pub const SO_SNDLOWAT
: ::c_int
= 19;
655 pub const SO_RCVTIMEO
: ::c_int
= 20;
656 pub const SO_SNDTIMEO
: ::c_int
= 21;
657 pub const SO_BINDTODEVICE
: ::c_int
= 25;
658 pub const SO_TIMESTAMP
: ::c_int
= 29;
659 pub const SO_ACCEPTCONN
: ::c_int
= 30;
660 pub const SO_SNDBUFFORCE
: ::c_int
= 32;
661 pub const SO_RCVBUFFORCE
: ::c_int
= 33;
662 pub const SO_MARK
: ::c_int
= 36;
663 pub const SO_PROTOCOL
: ::c_int
= 38;
664 pub const SO_DOMAIN
: ::c_int
= 39;
665 pub const SO_RXQ_OVFL
: ::c_int
= 40;
666 pub const SO_PEEK_OFF
: ::c_int
= 42;
667 pub const SO_BUSY_POLL
: ::c_int
= 46;
669 pub const IPTOS_ECN_NOTECT
: u8 = 0x00;
671 pub const O_ACCMODE
: ::c_int
= 3;
672 pub const O_APPEND
: ::c_int
= 1024;
673 pub const O_CREAT
: ::c_int
= 64;
674 pub const O_EXCL
: ::c_int
= 128;
675 pub const O_NOCTTY
: ::c_int
= 256;
676 pub const O_NONBLOCK
: ::c_int
= 2048;
677 pub const O_SYNC
: ::c_int
= 0x101000;
678 pub const O_ASYNC
: ::c_int
= 0x2000;
679 pub const O_NDELAY
: ::c_int
= 0x800;
680 pub const O_DSYNC
: ::c_int
= 4096;
682 pub const NI_MAXHOST
: ::size_t
= 1025;
684 pub const NCCS
: usize = 19;
685 pub const TCSBRKP
: ::c_int
= 0x5425;
686 pub const TCSANOW
: ::c_int
= 0;
687 pub const TCSADRAIN
: ::c_int
= 0x1;
688 pub const TCSAFLUSH
: ::c_int
= 0x2;
689 pub const VEOF
: usize = 4;
690 pub const VEOL
: usize = 11;
691 pub const VEOL2
: usize = 16;
692 pub const VMIN
: usize = 6;
693 pub const IEXTEN
: ::tcflag_t
= 0x00008000;
694 pub const TOSTOP
: ::tcflag_t
= 0x00000100;
695 pub const FLUSHO
: ::tcflag_t
= 0x00001000;
696 pub const EXTPROC
: ::tcflag_t
= 0o200000;
698 pub const ADFS_SUPER_MAGIC
: ::c_long
= 0x0000adf5;
699 pub const AFFS_SUPER_MAGIC
: ::c_long
= 0x0000adff;
700 pub const CODA_SUPER_MAGIC
: ::c_long
= 0x73757245;
701 pub const CRAMFS_MAGIC
: ::c_long
= 0x28cd3d45;
702 pub const EFS_SUPER_MAGIC
: ::c_long
= 0x00414a53;
703 pub const EXT2_SUPER_MAGIC
: ::c_long
= 0x0000ef53;
704 pub const EXT3_SUPER_MAGIC
: ::c_long
= 0x0000ef53;
705 pub const EXT4_SUPER_MAGIC
: ::c_long
= 0x0000ef53;
706 pub const HPFS_SUPER_MAGIC
: ::c_long
= 0xf995e849;
707 pub const HUGETLBFS_MAGIC
: ::c_long
= 0x958458f6;
708 pub const ISOFS_SUPER_MAGIC
: ::c_long
= 0x00009660;
709 pub const JFFS2_SUPER_MAGIC
: ::c_long
= 0x000072b6;
710 pub const MINIX_SUPER_MAGIC
: ::c_long
= 0x0000137f;
711 pub const MINIX_SUPER_MAGIC2
: ::c_long
= 0x0000138f;
712 pub const MINIX2_SUPER_MAGIC
: ::c_long
= 0x00002468;
713 pub const MINIX2_SUPER_MAGIC2
: ::c_long
= 0x00002478;
714 pub const MSDOS_SUPER_MAGIC
: ::c_long
= 0x00004d44;
715 pub const NCP_SUPER_MAGIC
: ::c_long
= 0x0000564c;
716 pub const NFS_SUPER_MAGIC
: ::c_long
= 0x00006969;
717 pub const OPENPROM_SUPER_MAGIC
: ::c_long
= 0x00009fa1;
718 pub const PROC_SUPER_MAGIC
: ::c_long
= 0x00009fa0;
719 pub const QNX4_SUPER_MAGIC
: ::c_long
= 0x0000002f;
720 pub const REISERFS_SUPER_MAGIC
: ::c_long
= 0x52654973;
721 pub const SMB_SUPER_MAGIC
: ::c_long
= 0x0000517b;
722 pub const TMPFS_MAGIC
: ::c_long
= 0x01021994;
723 pub const USBDEVICE_SUPER_MAGIC
: ::c_long
= 0x00009fa2;
725 pub const MAP_HUGETLB
: ::c_int
= 0x040000;
727 pub const PTRACE_TRACEME
: ::c_int
= 0;
728 pub const PTRACE_PEEKTEXT
: ::c_int
= 1;
729 pub const PTRACE_PEEKDATA
: ::c_int
= 2;
730 pub const PTRACE_PEEKUSER
: ::c_int
= 3;
731 pub const PTRACE_POKETEXT
: ::c_int
= 4;
732 pub const PTRACE_POKEDATA
: ::c_int
= 5;
733 pub const PTRACE_POKEUSER
: ::c_int
= 6;
734 pub const PTRACE_CONT
: ::c_int
= 7;
735 pub const PTRACE_KILL
: ::c_int
= 8;
736 pub const PTRACE_SINGLESTEP
: ::c_int
= 9;
737 pub const PTRACE_ATTACH
: ::c_int
= 16;
738 pub const PTRACE_DETACH
: ::c_int
= 17;
739 pub const PTRACE_SYSCALL
: ::c_int
= 24;
740 pub const PTRACE_SETOPTIONS
: ::c_int
= 0x4200;
741 pub const PTRACE_GETEVENTMSG
: ::c_int
= 0x4201;
742 pub const PTRACE_GETSIGINFO
: ::c_int
= 0x4202;
743 pub const PTRACE_SETSIGINFO
: ::c_int
= 0x4203;
745 pub const EFD_NONBLOCK
: ::c_int
= 0x800;
747 pub const F_GETLK
: ::c_int
= 5;
748 pub const F_GETOWN
: ::c_int
= 9;
749 pub const F_SETOWN
: ::c_int
= 8;
750 pub const F_SETLK
: ::c_int
= 6;
751 pub const F_SETLKW
: ::c_int
= 7;
753 pub const F_RDLCK
: ::c_int
= 0;
754 pub const F_WRLCK
: ::c_int
= 1;
755 pub const F_UNLCK
: ::c_int
= 2;
757 pub const TCGETS
: ::c_int
= 0x5401;
758 pub const TCSETS
: ::c_int
= 0x5402;
759 pub const TCSETSW
: ::c_int
= 0x5403;
760 pub const TCSETSF
: ::c_int
= 0x5404;
761 pub const TCGETA
: ::c_int
= 0x5405;
762 pub const TCSETA
: ::c_int
= 0x5406;
763 pub const TCSETAW
: ::c_int
= 0x5407;
764 pub const TCSETAF
: ::c_int
= 0x5408;
765 pub const TCSBRK
: ::c_int
= 0x5409;
766 pub const TCXONC
: ::c_int
= 0x540A;
767 pub const TCFLSH
: ::c_int
= 0x540B;
768 pub const TIOCGSOFTCAR
: ::c_int
= 0x5419;
769 pub const TIOCSSOFTCAR
: ::c_int
= 0x541A;
770 pub const TIOCINQ
: ::c_int
= 0x541B;
771 pub const TIOCLINUX
: ::c_int
= 0x541C;
772 pub const TIOCGSERIAL
: ::c_int
= 0x541E;
773 pub const TIOCEXCL
: ::c_int
= 0x540C;
774 pub const TIOCNXCL
: ::c_int
= 0x540D;
775 pub const TIOCSCTTY
: ::c_int
= 0x540E;
776 pub const TIOCGPGRP
: ::c_int
= 0x540F;
777 pub const TIOCSPGRP
: ::c_int
= 0x5410;
778 pub const TIOCOUTQ
: ::c_int
= 0x5411;
779 pub const TIOCSTI
: ::c_int
= 0x5412;
780 pub const TIOCGWINSZ
: ::c_int
= 0x5413;
781 pub const TIOCSWINSZ
: ::c_int
= 0x5414;
782 pub const TIOCMGET
: ::c_int
= 0x5415;
783 pub const TIOCMBIS
: ::c_int
= 0x5416;
784 pub const TIOCMBIC
: ::c_int
= 0x5417;
785 pub const TIOCMSET
: ::c_int
= 0x5418;
786 pub const FIONREAD
: ::c_int
= 0x541B;
787 pub const TIOCCONS
: ::c_int
= 0x541D;
789 pub const ST_RDONLY
: ::c_ulong
= 1;
790 pub const ST_NOSUID
: ::c_ulong
= 2;
791 pub const ST_NODEV
: ::c_ulong
= 4;
792 pub const ST_NOEXEC
: ::c_ulong
= 8;
793 pub const ST_SYNCHRONOUS
: ::c_ulong
= 16;
794 pub const ST_MANDLOCK
: ::c_ulong
= 64;
795 pub const ST_NOATIME
: ::c_ulong
= 1024;
796 pub const ST_NODIRATIME
: ::c_ulong
= 2048;
797 pub const ST_RELATIME
: ::c_ulong
= 4096;
799 pub const RTLD_NOLOAD
: ::c_int
= 0x4;
801 pub const SEM_FAILED
: *mut sem_t
= 0 as *mut sem_t
;
803 pub const LINUX_REBOOT_MAGIC1
: ::c_int
= 0xfee1dead;
804 pub const LINUX_REBOOT_MAGIC2
: ::c_int
= 672274793;
805 pub const LINUX_REBOOT_MAGIC2A
: ::c_int
= 85072278;
806 pub const LINUX_REBOOT_MAGIC2B
: ::c_int
= 369367448;
807 pub const LINUX_REBOOT_MAGIC2C
: ::c_int
= 537993216;
809 pub const LINUX_REBOOT_CMD_RESTART
: ::c_int
= 0x01234567;
810 pub const LINUX_REBOOT_CMD_HALT
: ::c_int
= 0xCDEF0123;
811 pub const LINUX_REBOOT_CMD_CAD_ON
: ::c_int
= 0x89ABCDEF;
812 pub const LINUX_REBOOT_CMD_CAD_OFF
: ::c_int
= 0x00000000;
813 pub const LINUX_REBOOT_CMD_POWER_OFF
: ::c_int
= 0x4321FEDC;
814 pub const LINUX_REBOOT_CMD_RESTART2
: ::c_int
= 0xA1B2C3D4;
815 pub const LINUX_REBOOT_CMD_SW_SUSPEND
: ::c_int
= 0xD000FCE2;
816 pub const LINUX_REBOOT_CMD_KEXEC
: ::c_int
= 0x45584543;
818 pub const MCL_CURRENT
: ::c_int
= 0x0001;
819 pub const MCL_FUTURE
: ::c_int
= 0x0002;
821 pub const CBAUD
: ::tcflag_t
= 0o0010017;
822 pub const TAB1
: ::c_int
= 0x00000800;
823 pub const TAB2
: ::c_int
= 0x00001000;
824 pub const TAB3
: ::c_int
= 0x00001800;
825 pub const CR1
: ::c_int
= 0x00000200;
826 pub const CR2
: ::c_int
= 0x00000400;
827 pub const CR3
: ::c_int
= 0x00000600;
828 pub const FF1
: ::c_int
= 0x00008000;
829 pub const BS1
: ::c_int
= 0x00002000;
830 pub const VT1
: ::c_int
= 0x00004000;
831 pub const VWERASE
: usize = 14;
832 pub const VREPRINT
: usize = 12;
833 pub const VSUSP
: usize = 10;
834 pub const VSTART
: usize = 8;
835 pub const VSTOP
: usize = 9;
836 pub const VDISCARD
: usize = 13;
837 pub const VTIME
: usize = 5;
838 pub const IXON
: ::tcflag_t
= 0x00000400;
839 pub const IXOFF
: ::tcflag_t
= 0x00001000;
840 pub const ONLCR
: ::tcflag_t
= 0x4;
841 pub const CSIZE
: ::tcflag_t
= 0x00000030;
842 pub const CS6
: ::tcflag_t
= 0x00000010;
843 pub const CS7
: ::tcflag_t
= 0x00000020;
844 pub const CS8
: ::tcflag_t
= 0x00000030;
845 pub const CSTOPB
: ::tcflag_t
= 0x00000040;
846 pub const CREAD
: ::tcflag_t
= 0x00000080;
847 pub const PARENB
: ::tcflag_t
= 0x00000100;
848 pub const PARODD
: ::tcflag_t
= 0x00000200;
849 pub const HUPCL
: ::tcflag_t
= 0x00000400;
850 pub const CLOCAL
: ::tcflag_t
= 0x00000800;
851 pub const ECHOKE
: ::tcflag_t
= 0x00000800;
852 pub const ECHOE
: ::tcflag_t
= 0x00000010;
853 pub const ECHOK
: ::tcflag_t
= 0x00000020;
854 pub const ECHONL
: ::tcflag_t
= 0x00000040;
855 pub const ECHOPRT
: ::tcflag_t
= 0x00000400;
856 pub const ECHOCTL
: ::tcflag_t
= 0x00000200;
857 pub const ISIG
: ::tcflag_t
= 0x00000001;
858 pub const ICANON
: ::tcflag_t
= 0x00000002;
859 pub const PENDIN
: ::tcflag_t
= 0x00004000;
860 pub const NOFLSH
: ::tcflag_t
= 0x00000080;
861 pub const VSWTC
: usize = 7;
862 pub const OLCUC
: ::tcflag_t
= 0o000002;
863 pub const NLDLY
: ::tcflag_t
= 0o000400;
864 pub const CRDLY
: ::tcflag_t
= 0o003000;
865 pub const TABDLY
: ::tcflag_t
= 0o014000;
866 pub const BSDLY
: ::tcflag_t
= 0o020000;
867 pub const FFDLY
: ::tcflag_t
= 0o100000;
868 pub const VTDLY
: ::tcflag_t
= 0o040000;
869 pub const XTABS
: ::tcflag_t
= 0o014000;
871 pub const B0
: ::speed_t
= 0o000000;
872 pub const B50
: ::speed_t
= 0o000001;
873 pub const B75
: ::speed_t
= 0o000002;
874 pub const B110
: ::speed_t
= 0o000003;
875 pub const B134
: ::speed_t
= 0o000004;
876 pub const B150
: ::speed_t
= 0o000005;
877 pub const B200
: ::speed_t
= 0o000006;
878 pub const B300
: ::speed_t
= 0o000007;
879 pub const B600
: ::speed_t
= 0o000010;
880 pub const B1200
: ::speed_t
= 0o000011;
881 pub const B1800
: ::speed_t
= 0o000012;
882 pub const B2400
: ::speed_t
= 0o000013;
883 pub const B4800
: ::speed_t
= 0o000014;
884 pub const B9600
: ::speed_t
= 0o000015;
885 pub const B19200
: ::speed_t
= 0o000016;
886 pub const B38400
: ::speed_t
= 0o000017;
887 pub const EXTA
: ::speed_t
= B19200
;
888 pub const EXTB
: ::speed_t
= B38400
;
889 pub const BOTHER
: ::speed_t
= 0o010000;
890 pub const B57600
: ::speed_t
= 0o010001;
891 pub const B115200
: ::speed_t
= 0o010002;
892 pub const B230400
: ::speed_t
= 0o010003;
893 pub const B460800
: ::speed_t
= 0o010004;
894 pub const B500000
: ::speed_t
= 0o010005;
895 pub const B576000
: ::speed_t
= 0o010006;
896 pub const B921600
: ::speed_t
= 0o010007;
897 pub const B1000000
: ::speed_t
= 0o010010;
898 pub const B1152000
: ::speed_t
= 0o010011;
899 pub const B1500000
: ::speed_t
= 0o010012;
900 pub const B2000000
: ::speed_t
= 0o010013;
901 pub const B2500000
: ::speed_t
= 0o010014;
902 pub const B3000000
: ::speed_t
= 0o010015;
903 pub const B3500000
: ::speed_t
= 0o010016;
904 pub const B4000000
: ::speed_t
= 0o010017;
906 pub const EAI_AGAIN
: ::c_int
= 2;
907 pub const EAI_BADFLAGS
: ::c_int
= 3;
908 pub const EAI_FAIL
: ::c_int
= 4;
909 pub const EAI_FAMILY
: ::c_int
= 5;
910 pub const EAI_MEMORY
: ::c_int
= 6;
911 pub const EAI_NODATA
: ::c_int
= 7;
912 pub const EAI_NONAME
: ::c_int
= 8;
913 pub const EAI_SERVICE
: ::c_int
= 9;
914 pub const EAI_SOCKTYPE
: ::c_int
= 10;
915 pub const EAI_SYSTEM
: ::c_int
= 11;
916 pub const EAI_OVERFLOW
: ::c_int
= 14;
918 pub const NETLINK_ROUTE
: ::c_int
= 0;
919 pub const NETLINK_UNUSED
: ::c_int
= 1;
920 pub const NETLINK_USERSOCK
: ::c_int
= 2;
921 pub const NETLINK_FIREWALL
: ::c_int
= 3;
922 pub const NETLINK_SOCK_DIAG
: ::c_int
= 4;
923 pub const NETLINK_NFLOG
: ::c_int
= 5;
924 pub const NETLINK_XFRM
: ::c_int
= 6;
925 pub const NETLINK_SELINUX
: ::c_int
= 7;
926 pub const NETLINK_ISCSI
: ::c_int
= 8;
927 pub const NETLINK_AUDIT
: ::c_int
= 9;
928 pub const NETLINK_FIB_LOOKUP
: ::c_int
= 10;
929 pub const NETLINK_CONNECTOR
: ::c_int
= 11;
930 pub const NETLINK_NETFILTER
: ::c_int
= 12;
931 pub const NETLINK_IP6_FW
: ::c_int
= 13;
932 pub const NETLINK_DNRTMSG
: ::c_int
= 14;
933 pub const NETLINK_KOBJECT_UEVENT
: ::c_int
= 15;
934 pub const NETLINK_GENERIC
: ::c_int
= 16;
935 pub const NETLINK_SCSITRANSPORT
: ::c_int
= 18;
936 pub const NETLINK_ECRYPTFS
: ::c_int
= 19;
937 pub const NETLINK_RDMA
: ::c_int
= 20;
938 pub const NETLINK_CRYPTO
: ::c_int
= 21;
939 pub const NETLINK_INET_DIAG
: ::c_int
= NETLINK_SOCK_DIAG
;
941 pub const MAX_LINKS
: ::c_int
= 32;
943 pub const NLM_F_REQUEST
: ::c_int
= 1;
944 pub const NLM_F_MULTI
: ::c_int
= 2;
945 pub const NLM_F_ACK
: ::c_int
= 4;
946 pub const NLM_F_ECHO
: ::c_int
= 8;
947 pub const NLM_F_DUMP_INTR
: ::c_int
= 16;
949 pub const NLM_F_ROOT
: ::c_int
= 0x100;
950 pub const NLM_F_MATCH
: ::c_int
= 0x200;
951 pub const NLM_F_ATOMIC
: ::c_int
= 0x400;
952 pub const NLM_F_DUMP
: ::c_int
= NLM_F_ROOT
| NLM_F_MATCH
;
954 pub const NLM_F_REPLACE
: ::c_int
= 0x100;
955 pub const NLM_F_EXCL
: ::c_int
= 0x200;
956 pub const NLM_F_CREATE
: ::c_int
= 0x400;
957 pub const NLM_F_APPEND
: ::c_int
= 0x800;
959 pub const NLMSG_NOOP
: ::c_int
= 0x1;
960 pub const NLMSG_ERROR
: ::c_int
= 0x2;
961 pub const NLMSG_DONE
: ::c_int
= 0x3;
962 pub const NLMSG_OVERRUN
: ::c_int
= 0x4;
963 pub const NLMSG_MIN_TYPE
: ::c_int
= 0x10;
965 pub const GENL_NAMSIZ
: ::c_int
= 16;
967 pub const GENL_MIN_ID
: ::c_int
= NLMSG_MIN_TYPE
;
968 pub const GENL_MAX_ID
: ::c_int
= 1023;
970 pub const GENL_ADMIN_PERM
: ::c_int
= 0x01;
971 pub const GENL_CMD_CAP_DO
: ::c_int
= 0x02;
972 pub const GENL_CMD_CAP_DUMP
: ::c_int
= 0x04;
973 pub const GENL_CMD_CAP_HASPOL
: ::c_int
= 0x08;
974 pub const GENL_UNS_ADMIN_PERM
: ::c_int
= 0x10;
976 pub const GENL_ID_CTRL
: ::c_int
= NLMSG_MIN_TYPE
;
977 pub const GENL_ID_VFS_DQUOT
: ::c_int
= NLMSG_MIN_TYPE
+ 1;
978 pub const GENL_ID_PMCRAID
: ::c_int
= NLMSG_MIN_TYPE
+ 2;
980 pub const CTRL_CMD_UNSPEC
: ::c_int
= 0;
981 pub const CTRL_CMD_NEWFAMILY
: ::c_int
= 1;
982 pub const CTRL_CMD_DELFAMILY
: ::c_int
= 2;
983 pub const CTRL_CMD_GETFAMILY
: ::c_int
= 3;
984 pub const CTRL_CMD_NEWOPS
: ::c_int
= 4;
985 pub const CTRL_CMD_DELOPS
: ::c_int
= 5;
986 pub const CTRL_CMD_GETOPS
: ::c_int
= 6;
987 pub const CTRL_CMD_NEWMCAST_GRP
: ::c_int
= 7;
988 pub const CTRL_CMD_DELMCAST_GRP
: ::c_int
= 8;
989 pub const CTRL_CMD_GETMCAST_GRP
: ::c_int
= 9;
991 pub const CTRL_ATTR_UNSPEC
: ::c_int
= 0;
992 pub const CTRL_ATTR_FAMILY_ID
: ::c_int
= 1;
993 pub const CTRL_ATTR_FAMILY_NAME
: ::c_int
= 2;
994 pub const CTRL_ATTR_VERSION
: ::c_int
= 3;
995 pub const CTRL_ATTR_HDRSIZE
: ::c_int
= 4;
996 pub const CTRL_ATTR_MAXATTR
: ::c_int
= 5;
997 pub const CTRL_ATTR_OPS
: ::c_int
= 6;
998 pub const CTRL_ATTR_MCAST_GROUPS
: ::c_int
= 7;
1000 pub const CTRL_ATTR_OP_UNSPEC
: ::c_int
= 0;
1001 pub const CTRL_ATTR_OP_ID
: ::c_int
= 1;
1002 pub const CTRL_ATTR_OP_FLAGS
: ::c_int
= 2;
1004 pub const CTRL_ATTR_MCAST_GRP_UNSPEC
: ::c_int
= 0;
1005 pub const CTRL_ATTR_MCAST_GRP_NAME
: ::c_int
= 1;
1006 pub const CTRL_ATTR_MCAST_GRP_ID
: ::c_int
= 2;
1008 pub const NETLINK_ADD_MEMBERSHIP
: ::c_int
= 1;
1009 pub const NETLINK_DROP_MEMBERSHIP
: ::c_int
= 2;
1010 pub const NETLINK_PKTINFO
: ::c_int
= 3;
1011 pub const NETLINK_BROADCAST_ERROR
: ::c_int
= 4;
1012 pub const NETLINK_NO_ENOBUFS
: ::c_int
= 5;
1013 pub const NETLINK_RX_RING
: ::c_int
= 6;
1014 pub const NETLINK_TX_RING
: ::c_int
= 7;
1016 pub const GRND_NONBLOCK
: ::c_uint
= 0x0001;
1017 pub const GRND_RANDOM
: ::c_uint
= 0x0002;
1019 pub const SECCOMP_MODE_DISABLED
: ::c_uint
= 0;
1020 pub const SECCOMP_MODE_STRICT
: ::c_uint
= 1;
1021 pub const SECCOMP_MODE_FILTER
: ::c_uint
= 2;
1023 pub const NLA_F_NESTED
: ::c_int
= 1 << 15;
1024 pub const NLA_F_NET_BYTEORDER
: ::c_int
= 1 << 14;
1025 pub const NLA_TYPE_MASK
: ::c_int
= !(NLA_F_NESTED
| NLA_F_NET_BYTEORDER
);
1027 pub const NLA_ALIGNTO
: ::c_int
= 4;
1029 pub const SIGEV_THREAD_ID
: ::c_int
= 4;
1031 pub const CIBAUD
: ::tcflag_t
= 0o02003600000;
1032 pub const CBAUDEX
: ::tcflag_t
= 0o010000;
1034 pub const TIOCM_LE
: ::c_int
= 0x001;
1035 pub const TIOCM_DTR
: ::c_int
= 0x002;
1036 pub const TIOCM_RTS
: ::c_int
= 0x004;
1037 pub const TIOCM_ST
: ::c_int
= 0x008;
1038 pub const TIOCM_SR
: ::c_int
= 0x010;
1039 pub const TIOCM_CTS
: ::c_int
= 0x020;
1040 pub const TIOCM_CAR
: ::c_int
= 0x040;
1041 pub const TIOCM_RNG
: ::c_int
= 0x080;
1042 pub const TIOCM_DSR
: ::c_int
= 0x100;
1043 pub const TIOCM_CD
: ::c_int
= TIOCM_CAR
;
1044 pub const TIOCM_RI
: ::c_int
= TIOCM_RNG
;
1046 pub const POLLWRNORM
: ::c_short
= 0x100;
1047 pub const POLLWRBAND
: ::c_short
= 0x200;
1049 pub const SFD_CLOEXEC
: ::c_int
= O_CLOEXEC
;
1050 pub const SFD_NONBLOCK
: ::c_int
= O_NONBLOCK
;
1052 pub const SOCK_NONBLOCK
: ::c_int
= O_NONBLOCK
;
1054 pub const SO_ORIGINAL_DST
: ::c_int
= 80;
1055 pub const IUTF8
: ::tcflag_t
= 0x00004000;
1056 pub const CMSPAR
: ::tcflag_t
= 0o10000000000;
1057 pub const O_TMPFILE
: ::c_int
= 0o20000000 | O_DIRECTORY
;
1059 pub const MFD_CLOEXEC
: ::c_uint
= 0x0001;
1060 pub const MFD_ALLOW_SEALING
: ::c_uint
= 0x0002;
1061 pub const MFD_HUGETLB
: ::c_uint
= 0x0004;
1063 // linux/netfilter.h
1064 pub const NF_DROP
: ::c_int
= 0;
1065 pub const NF_ACCEPT
: ::c_int
= 1;
1066 pub const NF_STOLEN
: ::c_int
= 2;
1067 pub const NF_QUEUE
: ::c_int
= 3;
1068 pub const NF_REPEAT
: ::c_int
= 4;
1069 pub const NF_STOP
: ::c_int
= 5;
1070 pub const NF_MAX_VERDICT
: ::c_int
= NF_STOP
;
1072 pub const NF_VERDICT_MASK
: ::c_int
= 0x000000ff;
1073 pub const NF_VERDICT_FLAG_QUEUE_BYPASS
: ::c_int
= 0x00008000;
1075 pub const NF_VERDICT_QMASK
: ::c_int
= 0xffff0000;
1076 pub const NF_VERDICT_QBITS
: ::c_int
= 16;
1078 pub const NF_VERDICT_BITS
: ::c_int
= 16;
1080 pub const NF_INET_PRE_ROUTING
: ::c_int
= 0;
1081 pub const NF_INET_LOCAL_IN
: ::c_int
= 1;
1082 pub const NF_INET_FORWARD
: ::c_int
= 2;
1083 pub const NF_INET_LOCAL_OUT
: ::c_int
= 3;
1084 pub const NF_INET_POST_ROUTING
: ::c_int
= 4;
1085 pub const NF_INET_NUMHOOKS
: ::c_int
= 5;
1087 pub const NF_NETDEV_INGRESS
: ::c_int
= 0;
1088 pub const NF_NETDEV_NUMHOOKS
: ::c_int
= 1;
1090 pub const NFPROTO_UNSPEC
: ::c_int
= 0;
1091 pub const NFPROTO_INET
: ::c_int
= 1;
1092 pub const NFPROTO_IPV4
: ::c_int
= 2;
1093 pub const NFPROTO_ARP
: ::c_int
= 3;
1094 pub const NFPROTO_NETDEV
: ::c_int
= 5;
1095 pub const NFPROTO_BRIDGE
: ::c_int
= 7;
1096 pub const NFPROTO_IPV6
: ::c_int
= 10;
1097 pub const NFPROTO_DECNET
: ::c_int
= 12;
1098 pub const NFPROTO_NUMPROTO
: ::c_int
= 13;
1100 // linux/netfilter_ipv4.h
1101 pub const NF_IP_PRE_ROUTING
: ::c_int
= 0;
1102 pub const NF_IP_LOCAL_IN
: ::c_int
= 1;
1103 pub const NF_IP_FORWARD
: ::c_int
= 2;
1104 pub const NF_IP_LOCAL_OUT
: ::c_int
= 3;
1105 pub const NF_IP_POST_ROUTING
: ::c_int
= 4;
1106 pub const NF_IP_NUMHOOKS
: ::c_int
= 5;
1108 pub const NF_IP_PRI_FIRST
: ::c_int
= ::INT_MIN
;
1109 pub const NF_IP_PRI_CONNTRACK_DEFRAG
: ::c_int
= -400;
1110 pub const NF_IP_PRI_RAW
: ::c_int
= -300;
1111 pub const NF_IP_PRI_SELINUX_FIRST
: ::c_int
= -225;
1112 pub const NF_IP_PRI_CONNTRACK
: ::c_int
= -200;
1113 pub const NF_IP_PRI_MANGLE
: ::c_int
= -150;
1114 pub const NF_IP_PRI_NAT_DST
: ::c_int
= -100;
1115 pub const NF_IP_PRI_FILTER
: ::c_int
= 0;
1116 pub const NF_IP_PRI_SECURITY
: ::c_int
= 50;
1117 pub const NF_IP_PRI_NAT_SRC
: ::c_int
= 100;
1118 pub const NF_IP_PRI_SELINUX_LAST
: ::c_int
= 225;
1119 pub const NF_IP_PRI_CONNTRACK_HELPER
: ::c_int
= 300;
1120 pub const NF_IP_PRI_CONNTRACK_CONFIRM
: ::c_int
= ::INT_MAX
;
1121 pub const NF_IP_PRI_LAST
: ::c_int
= ::INT_MAX
;
1123 // linux/netfilter_ipv6.h
1124 pub const NF_IP6_PRE_ROUTING
: ::c_int
= 0;
1125 pub const NF_IP6_LOCAL_IN
: ::c_int
= 1;
1126 pub const NF_IP6_FORWARD
: ::c_int
= 2;
1127 pub const NF_IP6_LOCAL_OUT
: ::c_int
= 3;
1128 pub const NF_IP6_POST_ROUTING
: ::c_int
= 4;
1129 pub const NF_IP6_NUMHOOKS
: ::c_int
= 5;
1131 pub const NF_IP6_PRI_FIRST
: ::c_int
= ::INT_MIN
;
1132 pub const NF_IP6_PRI_CONNTRACK_DEFRAG
: ::c_int
= -400;
1133 pub const NF_IP6_PRI_RAW
: ::c_int
= -300;
1134 pub const NF_IP6_PRI_SELINUX_FIRST
: ::c_int
= -225;
1135 pub const NF_IP6_PRI_CONNTRACK
: ::c_int
= -200;
1136 pub const NF_IP6_PRI_MANGLE
: ::c_int
= -150;
1137 pub const NF_IP6_PRI_NAT_DST
: ::c_int
= -100;
1138 pub const NF_IP6_PRI_FILTER
: ::c_int
= 0;
1139 pub const NF_IP6_PRI_SECURITY
: ::c_int
= 50;
1140 pub const NF_IP6_PRI_NAT_SRC
: ::c_int
= 100;
1141 pub const NF_IP6_PRI_SELINUX_LAST
: ::c_int
= 225;
1142 pub const NF_IP6_PRI_CONNTRACK_HELPER
: ::c_int
= 300;
1143 pub const NF_IP6_PRI_LAST
: ::c_int
= ::INT_MAX
;
1145 // linux/netfilter/nf_tables.h
1146 pub const NFT_TABLE_MAXNAMELEN
: ::c_int
= 32;
1147 pub const NFT_CHAIN_MAXNAMELEN
: ::c_int
= 32;
1148 pub const NFT_SET_MAXNAMELEN
: ::c_int
= 32;
1149 pub const NFT_OBJ_MAXNAMELEN
: ::c_int
= 32;
1150 pub const NFT_USERDATA_MAXLEN
: ::c_int
= 256;
1152 pub const NFT_REG_VERDICT
: ::c_int
= 0;
1153 pub const NFT_REG_1
: ::c_int
= 1;
1154 pub const NFT_REG_2
: ::c_int
= 2;
1155 pub const NFT_REG_3
: ::c_int
= 3;
1156 pub const NFT_REG_4
: ::c_int
= 4;
1157 pub const __NFT_REG_MAX
: ::c_int
= 5;
1158 pub const NFT_REG32_00
: ::c_int
= 8;
1159 pub const NFT_REG32_01
: ::c_int
= 9;
1160 pub const NFT_REG32_02
: ::c_int
= 10;
1161 pub const NFT_REG32_03
: ::c_int
= 11;
1162 pub const NFT_REG32_04
: ::c_int
= 12;
1163 pub const NFT_REG32_05
: ::c_int
= 13;
1164 pub const NFT_REG32_06
: ::c_int
= 14;
1165 pub const NFT_REG32_07
: ::c_int
= 15;
1166 pub const NFT_REG32_08
: ::c_int
= 16;
1167 pub const NFT_REG32_09
: ::c_int
= 17;
1168 pub const NFT_REG32_10
: ::c_int
= 18;
1169 pub const NFT_REG32_11
: ::c_int
= 19;
1170 pub const NFT_REG32_12
: ::c_int
= 20;
1171 pub const NFT_REG32_13
: ::c_int
= 21;
1172 pub const NFT_REG32_14
: ::c_int
= 22;
1173 pub const NFT_REG32_15
: ::c_int
= 23;
1175 pub const NFT_REG_SIZE
: ::c_int
= 16;
1176 pub const NFT_REG32_SIZE
: ::c_int
= 4;
1178 pub const NFT_CONTINUE
: ::c_int
= -1;
1179 pub const NFT_BREAK
: ::c_int
= -2;
1180 pub const NFT_JUMP
: ::c_int
= -3;
1181 pub const NFT_GOTO
: ::c_int
= -4;
1182 pub const NFT_RETURN
: ::c_int
= -5;
1184 pub const NFT_MSG_NEWTABLE
: ::c_int
= 0;
1185 pub const NFT_MSG_GETTABLE
: ::c_int
= 1;
1186 pub const NFT_MSG_DELTABLE
: ::c_int
= 2;
1187 pub const NFT_MSG_NEWCHAIN
: ::c_int
= 3;
1188 pub const NFT_MSG_GETCHAIN
: ::c_int
= 4;
1189 pub const NFT_MSG_DELCHAIN
: ::c_int
= 5;
1190 pub const NFT_MSG_NEWRULE
: ::c_int
= 6;
1191 pub const NFT_MSG_GETRULE
: ::c_int
= 7;
1192 pub const NFT_MSG_DELRULE
: ::c_int
= 8;
1193 pub const NFT_MSG_NEWSET
: ::c_int
= 9;
1194 pub const NFT_MSG_GETSET
: ::c_int
= 10;
1195 pub const NFT_MSG_DELSET
: ::c_int
= 11;
1196 pub const NFT_MSG_NEWSETELEM
: ::c_int
= 12;
1197 pub const NFT_MSG_GETSETELEM
: ::c_int
= 13;
1198 pub const NFT_MSG_DELSETELEM
: ::c_int
= 14;
1199 pub const NFT_MSG_NEWGEN
: ::c_int
= 15;
1200 pub const NFT_MSG_GETGEN
: ::c_int
= 16;
1201 pub const NFT_MSG_TRACE
: ::c_int
= 17;
1202 pub const NFT_MSG_NEWOBJ
: ::c_int
= 18;
1203 pub const NFT_MSG_GETOBJ
: ::c_int
= 19;
1204 pub const NFT_MSG_DELOBJ
: ::c_int
= 20;
1205 pub const NFT_MSG_GETOBJ_RESET
: ::c_int
= 21;
1206 pub const NFT_MSG_MAX
: ::c_int
= 22;
1208 pub const NFT_SET_ANONYMOUS
: ::c_int
= 0x1;
1209 pub const NFT_SET_CONSTANT
: ::c_int
= 0x2;
1210 pub const NFT_SET_INTERVAL
: ::c_int
= 0x4;
1211 pub const NFT_SET_MAP
: ::c_int
= 0x8;
1212 pub const NFT_SET_TIMEOUT
: ::c_int
= 0x10;
1213 pub const NFT_SET_EVAL
: ::c_int
= 0x20;
1215 pub const NFT_SET_POL_PERFORMANCE
: ::c_int
= 0;
1216 pub const NFT_SET_POL_MEMORY
: ::c_int
= 1;
1218 pub const NFT_SET_ELEM_INTERVAL_END
: ::c_int
= 0x1;
1220 pub const NFT_DATA_VALUE
: ::c_uint
= 0;
1221 pub const NFT_DATA_VERDICT
: ::c_uint
= 0xffffff00;
1223 pub const NFT_DATA_RESERVED_MASK
: ::c_uint
= 0xffffff00;
1225 pub const NFT_DATA_VALUE_MAXLEN
: ::c_int
= 64;
1227 pub const NFT_BYTEORDER_NTOH
: ::c_int
= 0;
1228 pub const NFT_BYTEORDER_HTON
: ::c_int
= 1;
1230 pub const NFT_CMP_EQ
: ::c_int
= 0;
1231 pub const NFT_CMP_NEQ
: ::c_int
= 1;
1232 pub const NFT_CMP_LT
: ::c_int
= 2;
1233 pub const NFT_CMP_LTE
: ::c_int
= 3;
1234 pub const NFT_CMP_GT
: ::c_int
= 4;
1235 pub const NFT_CMP_GTE
: ::c_int
= 5;
1237 pub const NFT_RANGE_EQ
: ::c_int
= 0;
1238 pub const NFT_RANGE_NEQ
: ::c_int
= 1;
1240 pub const NFT_LOOKUP_F_INV
: ::c_int
= (1 << 0);
1242 pub const NFT_DYNSET_OP_ADD
: ::c_int
= 0;
1243 pub const NFT_DYNSET_OP_UPDATE
: ::c_int
= 1;
1245 pub const NFT_DYNSET_F_INV
: ::c_int
= (1 << 0);
1247 pub const NFT_PAYLOAD_LL_HEADER
: ::c_int
= 0;
1248 pub const NFT_PAYLOAD_NETWORK_HEADER
: ::c_int
= 1;
1249 pub const NFT_PAYLOAD_TRANSPORT_HEADER
: ::c_int
= 2;
1251 pub const NFT_PAYLOAD_CSUM_NONE
: ::c_int
= 0;
1252 pub const NFT_PAYLOAD_CSUM_INET
: ::c_int
= 1;
1254 pub const NFT_META_LEN
: ::c_int
= 0;
1255 pub const NFT_META_PROTOCOL
: ::c_int
= 1;
1256 pub const NFT_META_PRIORITY
: ::c_int
= 2;
1257 pub const NFT_META_MARK
: ::c_int
= 3;
1258 pub const NFT_META_IIF
: ::c_int
= 4;
1259 pub const NFT_META_OIF
: ::c_int
= 5;
1260 pub const NFT_META_IIFNAME
: ::c_int
= 6;
1261 pub const NFT_META_OIFNAME
: ::c_int
= 7;
1262 pub const NFT_META_IIFTYPE
: ::c_int
= 8;
1263 pub const NFT_META_OIFTYPE
: ::c_int
= 9;
1264 pub const NFT_META_SKUID
: ::c_int
= 10;
1265 pub const NFT_META_SKGID
: ::c_int
= 11;
1266 pub const NFT_META_NFTRACE
: ::c_int
= 12;
1267 pub const NFT_META_RTCLASSID
: ::c_int
= 13;
1268 pub const NFT_META_SECMARK
: ::c_int
= 14;
1269 pub const NFT_META_NFPROTO
: ::c_int
= 15;
1270 pub const NFT_META_L4PROTO
: ::c_int
= 16;
1271 pub const NFT_META_BRI_IIFNAME
: ::c_int
= 17;
1272 pub const NFT_META_BRI_OIFNAME
: ::c_int
= 18;
1273 pub const NFT_META_PKTTYPE
: ::c_int
= 19;
1274 pub const NFT_META_CPU
: ::c_int
= 20;
1275 pub const NFT_META_IIFGROUP
: ::c_int
= 21;
1276 pub const NFT_META_OIFGROUP
: ::c_int
= 22;
1277 pub const NFT_META_CGROUP
: ::c_int
= 23;
1278 pub const NFT_META_PRANDOM
: ::c_int
= 24;
1280 pub const NFT_CT_STATE
: ::c_int
= 0;
1281 pub const NFT_CT_DIRECTION
: ::c_int
= 1;
1282 pub const NFT_CT_STATUS
: ::c_int
= 2;
1283 pub const NFT_CT_MARK
: ::c_int
= 3;
1284 pub const NFT_CT_SECMARK
: ::c_int
= 4;
1285 pub const NFT_CT_EXPIRATION
: ::c_int
= 5;
1286 pub const NFT_CT_HELPER
: ::c_int
= 6;
1287 pub const NFT_CT_L3PROTOCOL
: ::c_int
= 7;
1288 pub const NFT_CT_SRC
: ::c_int
= 8;
1289 pub const NFT_CT_DST
: ::c_int
= 9;
1290 pub const NFT_CT_PROTOCOL
: ::c_int
= 10;
1291 pub const NFT_CT_PROTO_SRC
: ::c_int
= 11;
1292 pub const NFT_CT_PROTO_DST
: ::c_int
= 12;
1293 pub const NFT_CT_LABELS
: ::c_int
= 13;
1294 pub const NFT_CT_PKTS
: ::c_int
= 14;
1295 pub const NFT_CT_BYTES
: ::c_int
= 15;
1297 pub const NFT_LIMIT_PKTS
: ::c_int
= 0;
1298 pub const NFT_LIMIT_PKT_BYTES
: ::c_int
= 1;
1300 pub const NFT_LIMIT_F_INV
: ::c_int
= (1 << 0);
1302 pub const NFT_QUEUE_FLAG_BYPASS
: ::c_int
= 0x01;
1303 pub const NFT_QUEUE_FLAG_CPU_FANOUT
: ::c_int
= 0x02;
1304 pub const NFT_QUEUE_FLAG_MASK
: ::c_int
= 0x03;
1306 pub const NFT_QUOTA_F_INV
: ::c_int
= (1 << 0);
1308 pub const NFT_REJECT_ICMP_UNREACH
: ::c_int
= 0;
1309 pub const NFT_REJECT_TCP_RST
: ::c_int
= 1;
1310 pub const NFT_REJECT_ICMPX_UNREACH
: ::c_int
= 2;
1312 pub const NFT_REJECT_ICMPX_NO_ROUTE
: ::c_int
= 0;
1313 pub const NFT_REJECT_ICMPX_PORT_UNREACH
: ::c_int
= 1;
1314 pub const NFT_REJECT_ICMPX_HOST_UNREACH
: ::c_int
= 2;
1315 pub const NFT_REJECT_ICMPX_ADMIN_PROHIBITED
: ::c_int
= 3;
1317 pub const NFT_NAT_SNAT
: ::c_int
= 0;
1318 pub const NFT_NAT_DNAT
: ::c_int
= 1;
1320 pub const NFT_TRACETYPE_UNSPEC
: ::c_int
= 0;
1321 pub const NFT_TRACETYPE_POLICY
: ::c_int
= 1;
1322 pub const NFT_TRACETYPE_RETURN
: ::c_int
= 2;
1323 pub const NFT_TRACETYPE_RULE
: ::c_int
= 3;
1325 pub const NFT_NG_INCREMENTAL
: ::c_int
= 0;
1326 pub const NFT_NG_RANDOM
: ::c_int
= 1;
1328 pub const IFF_TUN
: ::c_int
= 0x0001;
1329 pub const IFF_TAP
: ::c_int
= 0x0002;
1330 pub const IFF_NO_PI
: ::c_int
= 0x1000;
1332 // start android/platform/bionic/libc/kernel/uapi/linux/if_ether.h
1333 // from https://android.googlesource.com/
1334 // platform/bionic/+/master/libc/kernel/uapi/linux/if_ether.h
1335 pub const ETH_ALEN
: ::c_int
= 6;
1336 pub const ETH_HLEN
: ::c_int
= 14;
1337 pub const ETH_ZLEN
: ::c_int
= 60;
1338 pub const ETH_DATA_LEN
: ::c_int
= 1500;
1339 pub const ETH_FRAME_LEN
: ::c_int
= 1514;
1340 pub const ETH_FCS_LEN
: ::c_int
= 4;
1341 pub const ETH_MIN_MTU
: ::c_int
= 68;
1342 pub const ETH_MAX_MTU
: ::c_int
= 0xFFFF;
1343 pub const ETH_P_LOOP
: ::c_int
= 0x0060;
1344 pub const ETH_P_PUP
: ::c_int
= 0x0200;
1345 pub const ETH_P_PUPAT
: ::c_int
= 0x0201;
1346 pub const ETH_P_TSN
: ::c_int
= 0x22F0;
1347 pub const ETH_P_IP
: ::c_int
= 0x0800;
1348 pub const ETH_P_X25
: ::c_int
= 0x0805;
1349 pub const ETH_P_ARP
: ::c_int
= 0x0806;
1350 pub const ETH_P_BPQ
: ::c_int
= 0x08FF;
1351 pub const ETH_P_IEEEPUP
: ::c_int
= 0x0a00;
1352 pub const ETH_P_IEEEPUPAT
: ::c_int
= 0x0a01;
1353 pub const ETH_P_BATMAN
: ::c_int
= 0x4305;
1354 pub const ETH_P_DEC
: ::c_int
= 0x6000;
1355 pub const ETH_P_DNA_DL
: ::c_int
= 0x6001;
1356 pub const ETH_P_DNA_RC
: ::c_int
= 0x6002;
1357 pub const ETH_P_DNA_RT
: ::c_int
= 0x6003;
1358 pub const ETH_P_LAT
: ::c_int
= 0x6004;
1359 pub const ETH_P_DIAG
: ::c_int
= 0x6005;
1360 pub const ETH_P_CUST
: ::c_int
= 0x6006;
1361 pub const ETH_P_SCA
: ::c_int
= 0x6007;
1362 pub const ETH_P_TEB
: ::c_int
= 0x6558;
1363 pub const ETH_P_RARP
: ::c_int
= 0x8035;
1364 pub const ETH_P_ATALK
: ::c_int
= 0x809B;
1365 pub const ETH_P_AARP
: ::c_int
= 0x80F3;
1366 pub const ETH_P_8021Q
: ::c_int
= 0x8100;
1367 /* see rust-lang/libc#924 pub const ETH_P_ERSPAN: ::c_int = 0x88BE;*/
1368 pub const ETH_P_IPX
: ::c_int
= 0x8137;
1369 pub const ETH_P_IPV6
: ::c_int
= 0x86DD;
1370 pub const ETH_P_PAUSE
: ::c_int
= 0x8808;
1371 pub const ETH_P_SLOW
: ::c_int
= 0x8809;
1372 pub const ETH_P_WCCP
: ::c_int
= 0x883E;
1373 pub const ETH_P_MPLS_UC
: ::c_int
= 0x8847;
1374 pub const ETH_P_MPLS_MC
: ::c_int
= 0x8848;
1375 pub const ETH_P_ATMMPOA
: ::c_int
= 0x884c;
1376 pub const ETH_P_PPP_DISC
: ::c_int
= 0x8863;
1377 pub const ETH_P_PPP_SES
: ::c_int
= 0x8864;
1378 pub const ETH_P_LINK_CTL
: ::c_int
= 0x886c;
1379 pub const ETH_P_ATMFATE
: ::c_int
= 0x8884;
1380 pub const ETH_P_PAE
: ::c_int
= 0x888E;
1381 pub const ETH_P_AOE
: ::c_int
= 0x88A2;
1382 pub const ETH_P_8021AD
: ::c_int
= 0x88A8;
1383 pub const ETH_P_802_EX1
: ::c_int
= 0x88B5;
1384 pub const ETH_P_TIPC
: ::c_int
= 0x88CA;
1385 pub const ETH_P_MACSEC
: ::c_int
= 0x88E5;
1386 pub const ETH_P_8021AH
: ::c_int
= 0x88E7;
1387 pub const ETH_P_MVRP
: ::c_int
= 0x88F5;
1388 pub const ETH_P_1588
: ::c_int
= 0x88F7;
1389 pub const ETH_P_NCSI
: ::c_int
= 0x88F8;
1390 pub const ETH_P_PRP
: ::c_int
= 0x88FB;
1391 pub const ETH_P_FCOE
: ::c_int
= 0x8906;
1392 /* see rust-lang/libc#924 pub const ETH_P_IBOE: ::c_int = 0x8915;*/
1393 pub const ETH_P_TDLS
: ::c_int
= 0x890D;
1394 pub const ETH_P_FIP
: ::c_int
= 0x8914;
1395 pub const ETH_P_80221
: ::c_int
= 0x8917;
1396 pub const ETH_P_HSR
: ::c_int
= 0x892F;
1397 /* see rust-lang/libc#924 pub const ETH_P_NSH: ::c_int = 0x894F;*/
1398 pub const ETH_P_LOOPBACK
: ::c_int
= 0x9000;
1399 pub const ETH_P_QINQ1
: ::c_int
= 0x9100;
1400 pub const ETH_P_QINQ2
: ::c_int
= 0x9200;
1401 pub const ETH_P_QINQ3
: ::c_int
= 0x9300;
1402 pub const ETH_P_EDSA
: ::c_int
= 0xDADA;
1403 /* see rust-lang/libc#924 pub const ETH_P_IFE: ::c_int = 0xED3E;*/
1404 pub const ETH_P_AF_IUCV
: ::c_int
= 0xFBFB;
1405 pub const ETH_P_802_3_MIN
: ::c_int
= 0x0600;
1406 pub const ETH_P_802_3
: ::c_int
= 0x0001;
1407 pub const ETH_P_AX25
: ::c_int
= 0x0002;
1408 pub const ETH_P_ALL
: ::c_int
= 0x0003;
1409 pub const ETH_P_802_2
: ::c_int
= 0x0004;
1410 pub const ETH_P_SNAP
: ::c_int
= 0x0005;
1411 pub const ETH_P_DDCMP
: ::c_int
= 0x0006;
1412 pub const ETH_P_WAN_PPP
: ::c_int
= 0x0007;
1413 pub const ETH_P_PPP_MP
: ::c_int
= 0x0008;
1414 pub const ETH_P_LOCALTALK
: ::c_int
= 0x0009;
1415 pub const ETH_P_CAN
: ::c_int
= 0x000C;
1416 pub const ETH_P_CANFD
: ::c_int
= 0x000D;
1417 pub const ETH_P_PPPTALK
: ::c_int
= 0x0010;
1418 pub const ETH_P_TR_802_2
: ::c_int
= 0x0011;
1419 pub const ETH_P_MOBITEX
: ::c_int
= 0x0015;
1420 pub const ETH_P_CONTROL
: ::c_int
= 0x0016;
1421 pub const ETH_P_IRDA
: ::c_int
= 0x0017;
1422 pub const ETH_P_ECONET
: ::c_int
= 0x0018;
1423 pub const ETH_P_HDLC
: ::c_int
= 0x0019;
1424 pub const ETH_P_ARCNET
: ::c_int
= 0x001A;
1425 pub const ETH_P_DSA
: ::c_int
= 0x001B;
1426 pub const ETH_P_TRAILER
: ::c_int
= 0x001C;
1427 pub const ETH_P_PHONET
: ::c_int
= 0x00F5;
1428 pub const ETH_P_IEEE802154
: ::c_int
= 0x00F6;
1429 pub const ETH_P_CAIF
: ::c_int
= 0x00F7;
1430 pub const ETH_P_XDSA
: ::c_int
= 0x00F8;
1431 /* see rust-lang/libc#924 pub const ETH_P_MAP: ::c_int = 0x00F9;*/
1432 // end android/platform/bionic/libc/kernel/uapi/linux/if_ether.h
1434 pub const SIOCADDRT
: ::c_ulong
= 0x0000890B;
1435 pub const SIOCDELRT
: ::c_ulong
= 0x0000890C;
1436 pub const SIOCGIFNAME
: ::c_ulong
= 0x00008910;
1437 pub const SIOCSIFLINK
: ::c_ulong
= 0x00008911;
1438 pub const SIOCGIFCONF
: ::c_ulong
= 0x00008912;
1439 pub const SIOCGIFFLAGS
: ::c_ulong
= 0x00008913;
1440 pub const SIOCSIFFLAGS
: ::c_ulong
= 0x00008914;
1441 pub const SIOCGIFADDR
: ::c_ulong
= 0x00008915;
1442 pub const SIOCSIFADDR
: ::c_ulong
= 0x00008916;
1443 pub const SIOCGIFDSTADDR
: ::c_ulong
= 0x00008917;
1444 pub const SIOCSIFDSTADDR
: ::c_ulong
= 0x00008918;
1445 pub const SIOCGIFBRDADDR
: ::c_ulong
= 0x00008919;
1446 pub const SIOCSIFBRDADDR
: ::c_ulong
= 0x0000891A;
1447 pub const SIOCGIFNETMASK
: ::c_ulong
= 0x0000891B;
1448 pub const SIOCSIFNETMASK
: ::c_ulong
= 0x0000891C;
1449 pub const SIOCGIFMETRIC
: ::c_ulong
= 0x0000891D;
1450 pub const SIOCSIFMETRIC
: ::c_ulong
= 0x0000891E;
1451 pub const SIOCGIFMEM
: ::c_ulong
= 0x0000891F;
1452 pub const SIOCSIFMEM
: ::c_ulong
= 0x00008920;
1453 pub const SIOCGIFMTU
: ::c_ulong
= 0x00008921;
1454 pub const SIOCSIFMTU
: ::c_ulong
= 0x00008922;
1455 pub const SIOCSIFHWADDR
: ::c_ulong
= 0x00008924;
1456 pub const SIOCGIFENCAP
: ::c_ulong
= 0x00008925;
1457 pub const SIOCSIFENCAP
: ::c_ulong
= 0x00008926;
1458 pub const SIOCGIFHWADDR
: ::c_ulong
= 0x00008927;
1459 pub const SIOCGIFSLAVE
: ::c_ulong
= 0x00008929;
1460 pub const SIOCSIFSLAVE
: ::c_ulong
= 0x00008930;
1461 pub const SIOCADDMULTI
: ::c_ulong
= 0x00008931;
1462 pub const SIOCDELMULTI
: ::c_ulong
= 0x00008932;
1463 pub const SIOCDARP
: ::c_ulong
= 0x00008953;
1464 pub const SIOCGARP
: ::c_ulong
= 0x00008954;
1465 pub const SIOCSARP
: ::c_ulong
= 0x00008955;
1466 pub const SIOCDRARP
: ::c_ulong
= 0x00008960;
1467 pub const SIOCGRARP
: ::c_ulong
= 0x00008961;
1468 pub const SIOCSRARP
: ::c_ulong
= 0x00008962;
1469 pub const SIOCGIFMAP
: ::c_ulong
= 0x00008970;
1470 pub const SIOCSIFMAP
: ::c_ulong
= 0x00008971;
1473 pub const MODULE_INIT_IGNORE_MODVERSIONS
: ::c_uint
= 0x0001;
1474 pub const MODULE_INIT_IGNORE_VERMAGIC
: ::c_uint
= 0x0002;
1476 // Similarity to Linux it's not used but defined for compatibility.
1477 pub const ENOATTR
: ::c_int
= ::ENODATA
;
1480 pub fn CPU_ZERO(cpuset
: &mut cpu_set_t
) -> () {
1481 for slot
in cpuset
.__bits
.iter_mut() {
1486 pub fn CPU_SET(cpu
: usize, cpuset
: &mut cpu_set_t
) -> () {
1487 let size_in___bits
= 8 * mem
::size_of_val(&cpuset
.__bits
[0]);
1488 let (idx
, offset
) = (cpu
/ size_in___bits
, cpu
% size_in___bits
);
1489 cpuset
.__bits
[idx
] |= 1 << offset
;
1493 pub fn CPU_CLR(cpu
: usize, cpuset
: &mut cpu_set_t
) -> () {
1494 let size_in___bits
= 8 * mem
::size_of_val(&cpuset
.__bits
[0]);
1495 let (idx
, offset
) = (cpu
/ size_in___bits
, cpu
% size_in___bits
);
1496 cpuset
.__bits
[idx
] &= !(1 << offset
);
1500 pub fn CPU_ISSET(cpu
: usize, cpuset
: &cpu_set_t
) -> bool
{
1501 let size_in___bits
= 8 * mem
::size_of_val(&cpuset
.__bits
[0]);
1502 let (idx
, offset
) = (cpu
/ size_in___bits
, cpu
% size_in___bits
);
1503 0 != (cpuset
.__bits
[idx
] & (1 << offset
))
1506 pub fn CPU_EQUAL(set1
: &cpu_set_t
, set2
: &cpu_set_t
) -> bool
{
1507 set1
.__bits
== set2
.__bits
1509 pub fn major(dev
: ::dev_t
) -> ::c_int
{
1510 ((dev
>> 8) & 0xfff) as ::c_int
1512 pub fn minor(dev
: ::dev_t
) -> ::c_int
{
1513 ((dev
& 0xff) | ((dev
>> 12) & 0xfff00)) as ::c_int
1515 pub fn makedev(ma
: ::c_int
, mi
: ::c_int
) -> ::dev_t
{
1516 let ma
= ma
as ::dev_t
;
1517 let mi
= mi
as ::dev_t
;
1518 ((ma
& 0xfff) << 8) | (mi
& 0xff) | ((mi
& 0xfff00) << 12)
1521 pub fn NLA_ALIGN(len
: ::c_int
) -> ::c_int
{
1522 return ((len
) + NLA_ALIGNTO
- 1) & !(NLA_ALIGNTO
- 1)
1527 static mut __progname
: *mut ::c_char
;
1531 pub fn madvise(addr
: *const ::c_void
, len
: ::size_t
, advice
: ::c_int
)
1533 pub fn ioctl(fd
: ::c_int
, request
: ::c_int
, ...) -> ::c_int
;
1534 pub fn msync(addr
: *const ::c_void
, len
: ::size_t
,
1535 flags
: ::c_int
) -> ::c_int
;
1536 pub fn mprotect(addr
: *const ::c_void
, len
: ::size_t
, prot
: ::c_int
)
1538 pub fn recvfrom(socket
: ::c_int
, buf
: *mut ::c_void
, len
: ::size_t
,
1539 flags
: ::c_int
, addr
: *const ::sockaddr
,
1540 addrlen
: *mut ::socklen_t
) -> ::ssize_t
;
1541 pub fn getnameinfo(sa
: *const ::sockaddr
,
1543 host
: *mut ::c_char
,
1545 serv
: *mut ::c_char
,
1547 flags
: ::c_int
) -> ::c_int
;
1548 pub fn ptrace(request
: ::c_int
, ...) -> ::c_long
;
1549 pub fn getpriority(which
: ::c_int
, who
: ::c_int
) -> ::c_int
;
1550 pub fn setpriority(which
: ::c_int
, who
: ::c_int
, prio
: ::c_int
) -> ::c_int
;
1551 pub fn __sched_cpualloc(count
: ::size_t
) -> *mut ::cpu_set_t
;
1552 pub fn __sched_cpufree(set
: *mut ::cpu_set_t
);
1553 pub fn __sched_cpucount(setsize
: ::size_t
, set
: *mut cpu_set_t
) -> ::c_int
;
1554 pub fn sched_getcpu() -> ::c_int
;
1556 pub fn utmpname(name
: *const ::c_char
) -> ::c_int
;
1558 pub fn getutent() -> *mut utmp
;
1560 pub fn posix_fallocate(fd
: ::c_int
, offset
: ::off_t
,
1561 len
: ::off_t
) -> ::c_int
;
1562 pub fn signalfd(fd
: ::c_int
, mask
: *const ::sigset_t
, flags
: ::c_int
)
1564 pub fn syscall(num
: ::c_long
, ...) -> ::c_long
;
1565 pub fn sched_getaffinity(pid
: ::pid_t
,
1566 cpusetsize
: ::size_t
,
1567 cpuset
: *mut cpu_set_t
) -> ::c_int
;
1568 pub fn sched_setaffinity(pid
: ::pid_t
,
1569 cpusetsize
: ::size_t
,
1570 cpuset
: *const cpu_set_t
) -> ::c_int
;
1571 pub fn epoll_create(size
: ::c_int
) -> ::c_int
;
1572 pub fn epoll_create1(flags
: ::c_int
) -> ::c_int
;
1573 pub fn epoll_wait(epfd
: ::c_int
,
1574 events
: *mut ::epoll_event
,
1576 timeout
: ::c_int
) -> ::c_int
;
1577 pub fn epoll_ctl(epfd
: ::c_int
,
1580 event
: *mut ::epoll_event
) -> ::c_int
;
1581 pub fn pthread_getschedparam(native
: ::pthread_t
,
1582 policy
: *mut ::c_int
,
1583 param
: *mut ::sched_param
) -> ::c_int
;
1584 pub fn unshare(flags
: ::c_int
) -> ::c_int
;
1585 pub fn umount(target
: *const ::c_char
) -> ::c_int
;
1586 pub fn sched_get_priority_max(policy
: ::c_int
) -> ::c_int
;
1587 pub fn tee(fd_in
: ::c_int
,
1590 flags
: ::c_uint
) -> ::ssize_t
;
1591 pub fn settimeofday(tv
: *const ::timeval
, tz
: *const ::timezone
) -> ::c_int
;
1592 pub fn splice(fd_in
: ::c_int
,
1593 off_in
: *mut ::loff_t
,
1595 off_out
: *mut ::loff_t
,
1597 flags
: ::c_uint
) -> ::ssize_t
;
1598 pub fn eventfd(init
: ::c_uint
, flags
: ::c_int
) -> ::c_int
;
1599 pub fn sched_rr_get_interval(pid
: ::pid_t
, tp
: *mut ::timespec
) -> ::c_int
;
1600 pub fn sem_timedwait(sem
: *mut sem_t
,
1601 abstime
: *const ::timespec
) -> ::c_int
;
1602 pub fn sem_getvalue(sem
: *mut sem_t
,
1603 sval
: *mut ::c_int
) -> ::c_int
;
1604 pub fn sched_setparam(pid
: ::pid_t
, param
: *const ::sched_param
) -> ::c_int
;
1605 pub fn setns(fd
: ::c_int
, nstype
: ::c_int
) -> ::c_int
;
1606 pub fn swapoff(puath
: *const ::c_char
) -> ::c_int
;
1607 pub fn vmsplice(fd
: ::c_int
,
1608 iov
: *const ::iovec
,
1610 flags
: ::c_uint
) -> ::ssize_t
;
1611 pub fn mount(src
: *const ::c_char
,
1612 target
: *const ::c_char
,
1613 fstype
: *const ::c_char
,
1615 data
: *const ::c_void
) -> ::c_int
;
1616 pub fn personality(persona
: ::c_ulong
) -> ::c_int
;
1617 pub fn prctl(option
: ::c_int
, ...) -> ::c_int
;
1618 pub fn sched_getparam(pid
: ::pid_t
, param
: *mut ::sched_param
) -> ::c_int
;
1619 pub fn ppoll(fds
: *mut ::pollfd
,
1621 timeout
: *const ::timespec
,
1622 sigmask
: *const sigset_t
) -> ::c_int
;
1623 pub fn pthread_mutex_timedlock(lock
: *mut pthread_mutex_t
,
1624 abstime
: *const ::timespec
) -> ::c_int
;
1625 pub fn clone(cb
: extern fn(*mut ::c_void
) -> ::c_int
,
1626 child_stack
: *mut ::c_void
,
1628 arg
: *mut ::c_void
, ...) -> ::c_int
;
1629 pub fn sched_getscheduler(pid
: ::pid_t
) -> ::c_int
;
1630 pub fn clock_nanosleep(clk_id
: ::clockid_t
,
1632 rqtp
: *const ::timespec
,
1633 rmtp
: *mut ::timespec
) -> ::c_int
;
1634 pub fn pthread_attr_getguardsize(attr
: *const ::pthread_attr_t
,
1635 guardsize
: *mut ::size_t
) -> ::c_int
;
1636 pub fn sethostname(name
: *const ::c_char
, len
: ::size_t
) -> ::c_int
;
1637 pub fn sched_get_priority_min(policy
: ::c_int
) -> ::c_int
;
1638 pub fn pthread_condattr_getpshared(attr
: *const pthread_condattr_t
,
1639 pshared
: *mut ::c_int
) -> ::c_int
;
1640 pub fn sysinfo(info
: *mut ::sysinfo
) -> ::c_int
;
1641 pub fn umount2(target
: *const ::c_char
, flags
: ::c_int
) -> ::c_int
;
1642 pub fn pthread_setschedparam(native
: ::pthread_t
,
1644 param
: *const ::sched_param
) -> ::c_int
;
1645 pub fn swapon(path
: *const ::c_char
, swapflags
: ::c_int
) -> ::c_int
;
1646 pub fn sched_setscheduler(pid
: ::pid_t
,
1648 param
: *const ::sched_param
) -> ::c_int
;
1649 pub fn sendfile(out_fd
: ::c_int
,
1652 count
: ::size_t
) -> ::ssize_t
;
1653 pub fn setfsgid(gid
: ::gid_t
) -> ::c_int
;
1654 pub fn setfsuid(uid
: ::uid_t
) -> ::c_int
;
1655 pub fn sigsuspend(mask
: *const ::sigset_t
) -> ::c_int
;
1656 #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrgid_r")]
1657 pub fn getgrgid_r(uid
: ::uid_t
,
1661 result
: *mut *mut ::group
) -> ::c_int
;
1662 #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
1663 link_name
= "sigaltstack$UNIX2003")]
1664 #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")]
1665 pub fn sigaltstack(ss
: *const stack_t
,
1666 oss
: *mut stack_t
) -> ::c_int
;
1667 pub fn sem_close(sem
: *mut sem_t
) -> ::c_int
;
1668 pub fn getdtablesize() -> ::c_int
;
1669 #[cfg_attr(target_os = "solaris", link_name = "__posix_getgrnam_r")]
1670 pub fn getgrnam_r(name
: *const ::c_char
,
1674 result
: *mut *mut ::group
) -> ::c_int
;
1675 #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
1676 link_name
= "pthread_sigmask$UNIX2003")]
1677 pub fn pthread_sigmask(how
: ::c_int
, set
: *const sigset_t
,
1678 oldset
: *mut sigset_t
) -> ::c_int
;
1679 pub fn sem_open(name
: *const ::c_char
, oflag
: ::c_int
, ...) -> *mut sem_t
;
1680 pub fn getgrnam(name
: *const ::c_char
) -> *mut ::group
;
1681 pub fn pthread_kill(thread
: ::pthread_t
, sig
: ::c_int
) -> ::c_int
;
1682 pub fn sem_unlink(name
: *const ::c_char
) -> ::c_int
;
1683 pub fn daemon(nochdir
: ::c_int
, noclose
: ::c_int
) -> ::c_int
;
1684 #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")]
1685 #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwnam_r")]
1686 pub fn getpwnam_r(name
: *const ::c_char
,
1690 result
: *mut *mut passwd
) -> ::c_int
;
1691 #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")]
1692 #[cfg_attr(target_os = "solaris", link_name = "__posix_getpwuid_r")]
1693 pub fn getpwuid_r(uid
: ::uid_t
,
1697 result
: *mut *mut passwd
) -> ::c_int
;
1698 #[cfg_attr(all(target_os = "macos", target_arch ="x86"),
1699 link_name
= "sigwait$UNIX2003")]
1700 #[cfg_attr(target_os = "solaris", link_name = "__posix_sigwait")]
1701 pub fn sigwait(set
: *const sigset_t
,
1702 sig
: *mut ::c_int
) -> ::c_int
;
1703 pub fn pthread_atfork(prepare
: Option
<unsafe extern fn()>,
1704 parent
: Option
<unsafe extern fn()>,
1705 child
: Option
<unsafe extern fn()>) -> ::c_int
;
1706 pub fn getgrgid(gid
: ::gid_t
) -> *mut ::group
;
1707 pub fn getgrouplist(user
: *const ::c_char
,
1709 groups
: *mut ::gid_t
,
1710 ngroups
: *mut ::c_int
) -> ::c_int
;
1711 pub fn initgroups(user
: *const ::c_char
, group
: ::gid_t
) -> ::c_int
;
1712 pub fn pthread_mutexattr_getpshared(attr
: *const pthread_mutexattr_t
,
1713 pshared
: *mut ::c_int
) -> ::c_int
;
1714 #[cfg_attr(all(target_os = "macos", target_arch = "x86"),
1715 link_name
= "popen$UNIX2003")]
1716 pub fn popen(command
: *const c_char
,
1717 mode
: *const c_char
) -> *mut ::FILE
;
1718 pub fn faccessat(dirfd
: ::c_int
, pathname
: *const ::c_char
,
1719 mode
: ::c_int
, flags
: ::c_int
) -> ::c_int
;
1720 pub fn pthread_create(native
: *mut ::pthread_t
,
1721 attr
: *const ::pthread_attr_t
,
1722 f
: extern fn(*mut ::c_void
) -> *mut ::c_void
,
1723 value
: *mut ::c_void
) -> ::c_int
;
1724 pub fn __errno() -> *mut ::c_int
;
1728 if #[cfg(target_pointer_width = "32")] {
1730 pub use self::b32
::*;
1731 } else if #[cfg(target_pointer_width = "64")] {
1733 pub use self::b64
::*;
1735 // Unknown target_pointer_width