]> git.proxmox.com Git - rustc.git/blame - src/liblibc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
New upstream version 1.23.0+dfsg1
[rustc.git] / src / liblibc / src / unix / bsd / freebsdlike / dragonfly / mod.rs
CommitLineData
54a0048b
SL
1pub type clock_t = u64;
2pub type ino_t = u64;
3pub type nlink_t = u32;
4pub type blksize_t = i64;
5pub type clockid_t = ::c_ulong;
6
7pub type c_long = i64;
8pub type c_ulong = u64;
9pub type time_t = i64;
10pub type suseconds_t = i64;
11
12pub type uuid_t = ::uuid;
13
14pub type fsblkcnt_t = u64;
15pub type fsfilcnt_t = u64;
16
32a655c1
SL
17pub type sem_t = *mut sem;
18
19pub enum sem {}
20
54a0048b 21s! {
32a655c1
SL
22
23 pub struct exit_status {
24 pub e_termination: u16,
25 pub e_exit: u16
26 }
27
28 pub struct utmpx {
29 pub ut_name: [::c_char; 32],
30 pub ut_id: [::c_char; 4],
31
32 pub ut_line: [::c_char; 32],
33 pub ut_host: [::c_char; 256],
34
35 pub ut_unused: [u8; 16],
36 pub ut_session: u16,
37 pub ut_type: u16,
38 pub ut_pid: ::pid_t,
39 ut_exit: exit_status,
40 ut_ss: ::sockaddr_storage,
41 pub ut_tv: ::timeval,
42 pub ut_unused2: [u8; 16],
43 }
44
476ff2be
SL
45 pub struct aiocb {
46 pub aio_fildes: ::c_int,
47 pub aio_offset: ::off_t,
48 pub aio_buf: *mut ::c_void,
49 pub aio_nbytes: ::size_t,
50 pub aio_sigevent: sigevent,
51 pub aio_lio_opcode: ::c_int,
52 pub aio_reqprio: ::c_int,
53 _aio_val: ::c_int,
54 _aio_err: ::c_int
55 }
56
54a0048b
SL
57 pub struct dirent {
58 pub d_fileno: ::ino_t,
59 pub d_namlen: u16,
60 pub d_type: u8,
61 __unused1: u8,
62 __unused2: u32,
63 pub d_name: [::c_char; 256],
64 }
65
66 pub struct uuid {
67 pub time_low: u32,
68 pub time_mid: u16,
69 pub time_hi_and_version: u16,
70 pub clock_seq_hi_and_reserved: u8,
71 pub clock_seq_low: u8,
72 pub node: [u8; 6],
73 }
74
476ff2be
SL
75 pub struct sigevent {
76 pub sigev_notify: ::c_int,
32a655c1 77 // The union is 8-byte in size, so it is aligned at a 8-byte offset.
476ff2be
SL
78 #[cfg(target_pointer_width = "64")]
79 __unused1: ::c_int,
32a655c1
SL
80 pub sigev_signo: ::c_int, //actually a union
81 // pad the union
82 #[cfg(target_pointer_width = "64")]
83 __unused2: ::c_int,
476ff2be 84 pub sigev_value: ::sigval,
32a655c1 85 __unused3: *mut ::c_void //actually a function pointer
476ff2be
SL
86 }
87
54a0048b
SL
88 pub struct statvfs {
89 pub f_bsize: ::c_ulong,
90 pub f_frsize: ::c_ulong,
91 pub f_blocks: ::fsblkcnt_t,
92 pub f_bfree: ::fsblkcnt_t,
93 pub f_bavail: ::fsblkcnt_t,
94 pub f_files: ::fsfilcnt_t,
95 pub f_ffree: ::fsfilcnt_t,
96 pub f_favail: ::fsfilcnt_t,
97 pub f_fsid: ::c_ulong,
98 pub f_flag: ::c_ulong,
99 pub f_namemax: ::c_ulong,
100 pub f_owner: ::uid_t,
101 pub f_type: ::c_uint,
102 pub f_syncreads: u64,
103 pub f_syncwrites: u64,
104 pub f_asyncreads: u64,
105 pub f_asyncwrites: u64,
106 pub f_fsid_uuid: ::uuid_t,
107 pub f_uid_uuid: ::uuid_t,
108 }
109
110 pub struct stat {
111 pub st_ino: ::ino_t,
112 pub st_nlink: ::nlink_t,
113 pub st_dev: ::dev_t,
114 pub st_mode: ::mode_t,
115 pub st_padding1: ::uint16_t,
116 pub st_uid: ::uid_t,
117 pub st_gid: ::gid_t,
118 pub st_rdev: ::dev_t,
119 pub st_atime: ::time_t,
120 pub st_atime_nsec: ::c_long,
121 pub st_mtime: ::time_t,
122 pub st_mtime_nsec: ::c_long,
123 pub st_ctime: ::time_t,
124 pub st_ctime_nsec: ::c_long,
125 pub st_size: ::off_t,
126 pub st_blocks: ::int64_t,
127 pub st_blksize: ::uint32_t,
128 pub st_flags: ::uint32_t,
129 pub st_gen: ::uint32_t,
130 pub st_lspare: ::int32_t,
131 pub st_qspare1: ::int64_t,
132 pub st_qspare2: ::int64_t,
133 }
3b2f2976
XL
134
135 pub struct if_data {
136 pub ifi_type: ::c_uchar,
137 pub ifi_physical: ::c_uchar,
138 pub ifi_addrlen: ::c_uchar,
139 pub ifi_hdrlen: ::c_uchar,
140 pub ifi_recvquota: ::c_uchar,
141 pub ifi_xmitquota: ::c_uchar,
142 pub ifi_mtu: ::c_ulong,
143 pub ifi_metric: ::c_ulong,
144 pub ifi_link_state: ::c_ulong,
145 pub ifi_baudrate: u64,
146 pub ifi_ipackets: ::c_ulong,
147 pub ifi_ierrors: ::c_ulong,
148 pub ifi_opackets: ::c_ulong,
149 pub ifi_oerrors: ::c_ulong,
150 pub ifi_collisions: ::c_ulong,
151 pub ifi_ibytes: ::c_ulong,
152 pub ifi_obytes: ::c_ulong,
153 pub ifi_imcasts: ::c_ulong,
154 pub ifi_omcasts: ::c_ulong,
155 pub ifi_iqdrops: ::c_ulong,
156 pub ifi_noproto: ::c_ulong,
157 pub ifi_hwassist: ::c_ulong,
158 pub ifi_oqdrops: ::c_ulong,
159 pub ifi_lastchange: ::timeval,
160 }
161
162 pub struct if_msghdr {
163 pub ifm_msglen: ::c_ushort,
164 pub ifm_version: ::c_uchar,
165 pub ifm_type: ::c_uchar,
166 pub ifm_addrs: ::c_int,
167 pub ifm_flags: ::c_int,
168 pub ifm_index: ::c_ushort,
169 pub ifm_data: if_data,
170 }
54a0048b
SL
171}
172
173pub const RAND_MAX: ::c_int = 0x7fff_ffff;
3b2f2976 174pub const PTHREAD_STACK_MIN: ::size_t = 16384;
54a0048b
SL
175pub const SIGSTKSZ: ::size_t = 40960;
176pub const MADV_INVAL: ::c_int = 10;
177pub const O_CLOEXEC: ::c_int = 0x00020000;
3b2f2976 178pub const O_DIRECTORY: ::c_int = 0x08000000;
54a0048b
SL
179pub const F_GETLK: ::c_int = 7;
180pub const F_SETLK: ::c_int = 8;
181pub const F_SETLKW: ::c_int = 9;
182pub const ELAST: ::c_int = 99;
183pub const RLIMIT_POSIXLOCKS: ::c_int = 11;
184pub const RLIM_NLIMITS: ::rlim_t = 12;
185
186pub const Q_GETQUOTA: ::c_int = 0x300;
187pub const Q_SETQUOTA: ::c_int = 0x400;
188
3b2f2976
XL
189pub const CLOCK_REALTIME: ::clockid_t = 0;
190pub const CLOCK_VIRTUAL: ::clockid_t = 1;
191pub const CLOCK_PROF: ::clockid_t = 2;
192pub const CLOCK_MONOTONIC: ::clockid_t = 4;
193pub const CLOCK_UPTIME: ::clockid_t = 5;
194pub const CLOCK_UPTIME_PRECISE: ::clockid_t = 7;
195pub const CLOCK_UPTIME_FAST: ::clockid_t = 8;
196pub const CLOCK_REALTIME_PRECISE: ::clockid_t = 9;
197pub const CLOCK_REALTIME_FAST: ::clockid_t = 10;
198pub const CLOCK_MONOTONIC_PRECISE: ::clockid_t = 11;
199pub const CLOCK_MONOTONIC_FAST: ::clockid_t = 12;
200pub const CLOCK_SECOND: ::clockid_t = 13;
201pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 14;
202pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 15;
54a0048b 203
a7813a04
XL
204pub const CTL_UNSPEC: ::c_int = 0;
205pub const CTL_KERN: ::c_int = 1;
206pub const CTL_VM: ::c_int = 2;
207pub const CTL_VFS: ::c_int = 3;
208pub const CTL_NET: ::c_int = 4;
209pub const CTL_DEBUG: ::c_int = 5;
210pub const CTL_HW: ::c_int = 6;
211pub const CTL_MACHDEP: ::c_int = 7;
212pub const CTL_USER: ::c_int = 8;
213pub const CTL_P1003_1B: ::c_int = 9;
214pub const CTL_LWKT: ::c_int = 10;
215pub const CTL_MAXID: ::c_int = 11;
216pub const KERN_OSTYPE: ::c_int = 1;
217pub const KERN_OSRELEASE: ::c_int = 2;
218pub const KERN_OSREV: ::c_int = 3;
219pub const KERN_VERSION: ::c_int = 4;
220pub const KERN_MAXVNODES: ::c_int = 5;
221pub const KERN_MAXPROC: ::c_int = 6;
222pub const KERN_MAXFILES: ::c_int = 7;
223pub const KERN_ARGMAX: ::c_int = 8;
224pub const KERN_SECURELVL: ::c_int = 9;
225pub const KERN_HOSTNAME: ::c_int = 10;
226pub const KERN_HOSTID: ::c_int = 11;
227pub const KERN_CLOCKRATE: ::c_int = 12;
228pub const KERN_VNODE: ::c_int = 13;
229pub const KERN_PROC: ::c_int = 14;
230pub const KERN_FILE: ::c_int = 15;
231pub const KERN_PROF: ::c_int = 16;
232pub const KERN_POSIX1: ::c_int = 17;
233pub const KERN_NGROUPS: ::c_int = 18;
234pub const KERN_JOB_CONTROL: ::c_int = 19;
235pub const KERN_SAVED_IDS: ::c_int = 20;
236pub const KERN_BOOTTIME: ::c_int = 21;
237pub const KERN_NISDOMAINNAME: ::c_int = 22;
238pub const KERN_UPDATEINTERVAL: ::c_int = 23;
239pub const KERN_OSRELDATE: ::c_int = 24;
240pub const KERN_NTP_PLL: ::c_int = 25;
241pub const KERN_BOOTFILE: ::c_int = 26;
242pub const KERN_MAXFILESPERPROC: ::c_int = 27;
243pub const KERN_MAXPROCPERUID: ::c_int = 28;
244pub const KERN_DUMPDEV: ::c_int = 29;
245pub const KERN_IPC: ::c_int = 30;
246pub const KERN_DUMMY: ::c_int = 31;
247pub const KERN_PS_STRINGS: ::c_int = 32;
248pub const KERN_USRSTACK: ::c_int = 33;
249pub const KERN_LOGSIGEXIT: ::c_int = 34;
250pub const KERN_IOV_MAX: ::c_int = 35;
251pub const KERN_MAXPOSIXLOCKSPERUID: ::c_int = 36;
252pub const KERN_MAXID: ::c_int = 37;
253pub const KERN_PROC_ALL: ::c_int = 0;
254pub const KERN_PROC_PID: ::c_int = 1;
255pub const KERN_PROC_PGRP: ::c_int = 2;
256pub const KERN_PROC_SESSION: ::c_int = 3;
257pub const KERN_PROC_TTY: ::c_int = 4;
258pub const KERN_PROC_UID: ::c_int = 5;
259pub const KERN_PROC_RUID: ::c_int = 6;
260pub const KERN_PROC_ARGS: ::c_int = 7;
261pub const KERN_PROC_CWD: ::c_int = 8;
262pub const KERN_PROC_PATHNAME: ::c_int = 9;
263pub const KERN_PROC_FLAGMASK: ::c_int = 0x10;
264pub const KERN_PROC_FLAG_LWP: ::c_int = 0x10;
265pub const KIPC_MAXSOCKBUF: ::c_int = 1;
266pub const KIPC_SOCKBUF_WASTE: ::c_int = 2;
267pub const KIPC_SOMAXCONN: ::c_int = 3;
268pub const KIPC_MAX_LINKHDR: ::c_int = 4;
269pub const KIPC_MAX_PROTOHDR: ::c_int = 5;
270pub const KIPC_MAX_HDR: ::c_int = 6;
271pub const KIPC_MAX_DATALEN: ::c_int = 7;
272pub const KIPC_MBSTAT: ::c_int = 8;
273pub const KIPC_NMBCLUSTERS: ::c_int = 9;
274pub const HW_MACHINE: ::c_int = 1;
275pub const HW_MODEL: ::c_int = 2;
276pub const HW_NCPU: ::c_int = 3;
277pub const HW_BYTEORDER: ::c_int = 4;
278pub const HW_PHYSMEM: ::c_int = 5;
279pub const HW_USERMEM: ::c_int = 6;
280pub const HW_PAGESIZE: ::c_int = 7;
281pub const HW_DISKNAMES: ::c_int = 8;
282pub const HW_DISKSTATS: ::c_int = 9;
283pub const HW_FLOATINGPT: ::c_int = 10;
284pub const HW_MACHINE_ARCH: ::c_int = 11;
285pub const HW_MACHINE_PLATFORM: ::c_int = 12;
286pub const HW_SENSORS: ::c_int = 13;
287pub const HW_MAXID: ::c_int = 14;
288pub const USER_CS_PATH: ::c_int = 1;
289pub const USER_BC_BASE_MAX: ::c_int = 2;
290pub const USER_BC_DIM_MAX: ::c_int = 3;
291pub const USER_BC_SCALE_MAX: ::c_int = 4;
292pub const USER_BC_STRING_MAX: ::c_int = 5;
293pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6;
294pub const USER_EXPR_NEST_MAX: ::c_int = 7;
295pub const USER_LINE_MAX: ::c_int = 8;
296pub const USER_RE_DUP_MAX: ::c_int = 9;
297pub const USER_POSIX2_VERSION: ::c_int = 10;
298pub const USER_POSIX2_C_BIND: ::c_int = 11;
299pub const USER_POSIX2_C_DEV: ::c_int = 12;
300pub const USER_POSIX2_CHAR_TERM: ::c_int = 13;
301pub const USER_POSIX2_FORT_DEV: ::c_int = 14;
302pub const USER_POSIX2_FORT_RUN: ::c_int = 15;
303pub const USER_POSIX2_LOCALEDEF: ::c_int = 16;
304pub const USER_POSIX2_SW_DEV: ::c_int = 17;
305pub const USER_POSIX2_UPE: ::c_int = 18;
306pub const USER_STREAM_MAX: ::c_int = 19;
307pub const USER_TZNAME_MAX: ::c_int = 20;
308pub const USER_MAXID: ::c_int = 21;
309pub const CTL_P1003_1B_ASYNCHRONOUS_IO: ::c_int = 1;
310pub const CTL_P1003_1B_MAPPED_FILES: ::c_int = 2;
311pub const CTL_P1003_1B_MEMLOCK: ::c_int = 3;
312pub const CTL_P1003_1B_MEMLOCK_RANGE: ::c_int = 4;
313pub const CTL_P1003_1B_MEMORY_PROTECTION: ::c_int = 5;
314pub const CTL_P1003_1B_MESSAGE_PASSING: ::c_int = 6;
315pub const CTL_P1003_1B_PRIORITIZED_IO: ::c_int = 7;
316pub const CTL_P1003_1B_PRIORITY_SCHEDULING: ::c_int = 8;
317pub const CTL_P1003_1B_REALTIME_SIGNALS: ::c_int = 9;
318pub const CTL_P1003_1B_SEMAPHORES: ::c_int = 10;
319pub const CTL_P1003_1B_FSYNC: ::c_int = 11;
320pub const CTL_P1003_1B_SHARED_MEMORY_OBJECTS: ::c_int = 12;
321pub const CTL_P1003_1B_SYNCHRONIZED_IO: ::c_int = 13;
322pub const CTL_P1003_1B_TIMERS: ::c_int = 14;
323pub const CTL_P1003_1B_AIO_LISTIO_MAX: ::c_int = 15;
324pub const CTL_P1003_1B_AIO_MAX: ::c_int = 16;
325pub const CTL_P1003_1B_AIO_PRIO_DELTA_MAX: ::c_int = 17;
326pub const CTL_P1003_1B_DELAYTIMER_MAX: ::c_int = 18;
327pub const CTL_P1003_1B_UNUSED1: ::c_int = 19;
328pub const CTL_P1003_1B_PAGESIZE: ::c_int = 20;
329pub const CTL_P1003_1B_RTSIG_MAX: ::c_int = 21;
330pub const CTL_P1003_1B_SEM_NSEMS_MAX: ::c_int = 22;
331pub const CTL_P1003_1B_SEM_VALUE_MAX: ::c_int = 23;
332pub const CTL_P1003_1B_SIGQUEUE_MAX: ::c_int = 24;
333pub const CTL_P1003_1B_TIMER_MAX: ::c_int = 25;
334pub const CTL_P1003_1B_MAXID: ::c_int = 26;
335
9e0c209e
SL
336pub const EVFILT_READ: ::int16_t = -1;
337pub const EVFILT_WRITE: ::int16_t = -2;
338pub const EVFILT_AIO: ::int16_t = -3;
339pub const EVFILT_VNODE: ::int16_t = -4;
340pub const EVFILT_PROC: ::int16_t = -5;
341pub const EVFILT_SIGNAL: ::int16_t = -6;
342pub const EVFILT_TIMER: ::int16_t = -7;
3b2f2976 343pub const EVFILT_EXCEPT: ::int16_t = -8;
9e0c209e
SL
344pub const EVFILT_USER: ::int16_t = -9;
345pub const EVFILT_FS: ::int16_t = -10;
346
347pub const EV_ADD: ::uint16_t = 0x1;
348pub const EV_DELETE: ::uint16_t = 0x2;
349pub const EV_ENABLE: ::uint16_t = 0x4;
350pub const EV_DISABLE: ::uint16_t = 0x8;
351pub const EV_ONESHOT: ::uint16_t = 0x10;
352pub const EV_CLEAR: ::uint16_t = 0x20;
353pub const EV_RECEIPT: ::uint16_t = 0x40;
354pub const EV_DISPATCH: ::uint16_t = 0x80;
355pub const EV_NODATA: ::uint16_t = 0x1000;
356pub const EV_FLAG1: ::uint16_t = 0x2000;
357pub const EV_ERROR: ::uint16_t = 0x4000;
358pub const EV_EOF: ::uint16_t = 0x8000;
359pub const EV_SYSFLAGS: ::uint16_t = 0xf000;
360
361pub const NOTE_TRIGGER: ::uint32_t = 0x01000000;
362pub const NOTE_FFNOP: ::uint32_t = 0x00000000;
363pub const NOTE_FFAND: ::uint32_t = 0x40000000;
364pub const NOTE_FFOR: ::uint32_t = 0x80000000;
365pub const NOTE_FFCOPY: ::uint32_t = 0xc0000000;
366pub const NOTE_FFCTRLMASK: ::uint32_t = 0xc0000000;
367pub const NOTE_FFLAGSMASK: ::uint32_t = 0x00ffffff;
368pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
369pub const NOTE_OOB: ::uint32_t = 0x00000002;
370pub const NOTE_DELETE: ::uint32_t = 0x00000001;
371pub const NOTE_WRITE: ::uint32_t = 0x00000002;
372pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
373pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
374pub const NOTE_LINK: ::uint32_t = 0x00000010;
375pub const NOTE_RENAME: ::uint32_t = 0x00000020;
376pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
377pub const NOTE_EXIT: ::uint32_t = 0x80000000;
378pub const NOTE_FORK: ::uint32_t = 0x40000000;
379pub const NOTE_EXEC: ::uint32_t = 0x20000000;
380pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
381pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
382pub const NOTE_TRACK: ::uint32_t = 0x00000001;
383pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
384pub const NOTE_CHILD: ::uint32_t = 0x00000004;
385
cc61c64b
XL
386pub const SO_SNDSPACE: ::c_int = 0x100a;
387pub const SO_CPUHINT: ::c_int = 0x1030;
388
abe05a73
XL
389// https://github.com/DragonFlyBSD/DragonFlyBSD/blob/master/sys/net/if.h#L101
390pub const IFF_UP: ::c_int = 0x1; // interface is up
391pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid
392pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging
393pub const IFF_LOOPBACK: ::c_int = 0x8; // is a loopback net
394pub const IFF_POINTOPOINT: ::c_int = 0x10; // interface is point-to-point link
395pub const IFF_SMART: ::c_int = 0x20; // interface manages own routes
396pub const IFF_RUNNING: ::c_int = 0x40; // resources allocated
397pub const IFF_NOARP: ::c_int = 0x80; // no address resolution protocol
398pub const IFF_PROMISC: ::c_int = 0x100; // receive all packets
399pub const IFF_ALLMULTI: ::c_int = 0x200; // receive all multicast packets
400pub const IFF_OACTIVE_COMPAT: ::c_int = 0x400; // was transmission in progress
401pub const IFF_SIMPLEX: ::c_int = 0x800; // can't hear own transmissions
402pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit
403pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit
404pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit
405pub const IFF_ALTPHYS: ::c_int = IFF_LINK2; // use alternate physical connection
406pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast
407// was interface is in polling mode
408pub const IFF_POLLING_COMPAT: ::c_int = 0x10000;
409pub const IFF_PPROMISC: ::c_int = 0x20000; // user-requested promisc mode
410pub const IFF_MONITOR: ::c_int = 0x40000; // user-requested monitor mode
411pub const IFF_STATICARP: ::c_int = 0x80000; // static ARP
412pub const IFF_NPOLLING: ::c_int = 0x100000; // interface is in polling mode
413pub const IFF_IDIRECT: ::c_int = 0x200000; // direct input
414
3b2f2976
XL
415//
416// sys/netinet/in.h
417// Protocols (RFC 1700)
418// NOTE: These are in addition to the constants defined in src/unix/mod.rs
419
420// IPPROTO_IP defined in src/unix/mod.rs
421/// IP6 hop-by-hop options
422pub const IPPROTO_HOPOPTS: ::c_int = 0;
423// IPPROTO_ICMP defined in src/unix/mod.rs
424/// group mgmt protocol
425pub const IPPROTO_IGMP: ::c_int = 2;
426/// gateway^2 (deprecated)
427pub const IPPROTO_GGP: ::c_int = 3;
428/// for compatibility
429pub const IPPROTO_IPIP: ::c_int = 4;
430// IPPROTO_TCP defined in src/unix/mod.rs
431/// Stream protocol II.
432pub const IPPROTO_ST: ::c_int = 7;
433/// exterior gateway protocol
434pub const IPPROTO_EGP: ::c_int = 8;
435/// private interior gateway
436pub const IPPROTO_PIGP: ::c_int = 9;
437/// BBN RCC Monitoring
438pub const IPPROTO_RCCMON: ::c_int = 10;
439/// network voice protocol
440pub const IPPROTO_NVPII: ::c_int = 11;
441/// pup
442pub const IPPROTO_PUP: ::c_int = 12;
443/// Argus
444pub const IPPROTO_ARGUS: ::c_int = 13;
445/// EMCON
446pub const IPPROTO_EMCON: ::c_int = 14;
447/// Cross Net Debugger
448pub const IPPROTO_XNET: ::c_int = 15;
449/// Chaos
450pub const IPPROTO_CHAOS: ::c_int = 16;
451// IPPROTO_UDP defined in src/unix/mod.rs
452/// Multiplexing
453pub const IPPROTO_MUX: ::c_int = 18;
454/// DCN Measurement Subsystems
455pub const IPPROTO_MEAS: ::c_int = 19;
456/// Host Monitoring
457pub const IPPROTO_HMP: ::c_int = 20;
458/// Packet Radio Measurement
459pub const IPPROTO_PRM: ::c_int = 21;
460/// xns idp
461pub const IPPROTO_IDP: ::c_int = 22;
462/// Trunk-1
463pub const IPPROTO_TRUNK1: ::c_int = 23;
464/// Trunk-2
465pub const IPPROTO_TRUNK2: ::c_int = 24;
466/// Leaf-1
467pub const IPPROTO_LEAF1: ::c_int = 25;
468/// Leaf-2
469pub const IPPROTO_LEAF2: ::c_int = 26;
470/// Reliable Data
471pub const IPPROTO_RDP: ::c_int = 27;
472/// Reliable Transaction
473pub const IPPROTO_IRTP: ::c_int = 28;
474/// tp-4 w/ class negotiation
475pub const IPPROTO_TP: ::c_int = 29;
476/// Bulk Data Transfer
477pub const IPPROTO_BLT: ::c_int = 30;
478/// Network Services
479pub const IPPROTO_NSP: ::c_int = 31;
480/// Merit Internodal
481pub const IPPROTO_INP: ::c_int = 32;
482/// Sequential Exchange
483pub const IPPROTO_SEP: ::c_int = 33;
484/// Third Party Connect
485pub const IPPROTO_3PC: ::c_int = 34;
486/// InterDomain Policy Routing
487pub const IPPROTO_IDPR: ::c_int = 35;
488/// XTP
489pub const IPPROTO_XTP: ::c_int = 36;
490/// Datagram Delivery
491pub const IPPROTO_DDP: ::c_int = 37;
492/// Control Message Transport
493pub const IPPROTO_CMTP: ::c_int = 38;
494/// TP++ Transport
495pub const IPPROTO_TPXX: ::c_int = 39;
496/// IL transport protocol
497pub const IPPROTO_IL: ::c_int = 40;
498// IPPROTO_IPV6 defined in src/unix/mod.rs
499/// Source Demand Routing
500pub const IPPROTO_SDRP: ::c_int = 42;
501/// IP6 routing header
502pub const IPPROTO_ROUTING: ::c_int = 43;
503/// IP6 fragmentation header
504pub const IPPROTO_FRAGMENT: ::c_int = 44;
505/// InterDomain Routing
506pub const IPPROTO_IDRP: ::c_int = 45;
507/// resource reservation
508pub const IPPROTO_RSVP: ::c_int = 46;
509/// General Routing Encap.
510pub const IPPROTO_GRE: ::c_int = 47;
511/// Mobile Host Routing
512pub const IPPROTO_MHRP: ::c_int = 48;
513/// BHA
514pub const IPPROTO_BHA: ::c_int = 49;
515/// IP6 Encap Sec. Payload
516pub const IPPROTO_ESP: ::c_int = 50;
517/// IP6 Auth Header
518pub const IPPROTO_AH: ::c_int = 51;
519/// Integ. Net Layer Security
520pub const IPPROTO_INLSP: ::c_int = 52;
521/// IP with encryption
522pub const IPPROTO_SWIPE: ::c_int = 53;
523/// Next Hop Resolution
524pub const IPPROTO_NHRP: ::c_int = 54;
525/// IP Mobility
526pub const IPPROTO_MOBILE: ::c_int = 55;
527/// Transport Layer Security
528pub const IPPROTO_TLSP: ::c_int = 56;
529/// SKIP
530pub const IPPROTO_SKIP: ::c_int = 57;
531// IPPROTO_ICMPV6 defined in src/unix/mod.rs
532/// IP6 no next header
533pub const IPPROTO_NONE: ::c_int = 59;
534/// IP6 destination option
535pub const IPPROTO_DSTOPTS: ::c_int = 60;
536/// any host internal protocol
537pub const IPPROTO_AHIP: ::c_int = 61;
538/// CFTP
539pub const IPPROTO_CFTP: ::c_int = 62;
540/// "hello" routing protocol
541pub const IPPROTO_HELLO: ::c_int = 63;
542/// SATNET/Backroom EXPAK
543pub const IPPROTO_SATEXPAK: ::c_int = 64;
544/// Kryptolan
545pub const IPPROTO_KRYPTOLAN: ::c_int = 65;
546/// Remote Virtual Disk
547pub const IPPROTO_RVD: ::c_int = 66;
548/// Pluribus Packet Core
549pub const IPPROTO_IPPC: ::c_int = 67;
550/// Any distributed FS
551pub const IPPROTO_ADFS: ::c_int = 68;
552/// Satnet Monitoring
553pub const IPPROTO_SATMON: ::c_int = 69;
554/// VISA Protocol
555pub const IPPROTO_VISA: ::c_int = 70;
556/// Packet Core Utility
557pub const IPPROTO_IPCV: ::c_int = 71;
558/// Comp. Prot. Net. Executive
559pub const IPPROTO_CPNX: ::c_int = 72;
560/// Comp. Prot. HeartBeat
561pub const IPPROTO_CPHB: ::c_int = 73;
562/// Wang Span Network
563pub const IPPROTO_WSN: ::c_int = 74;
564/// Packet Video Protocol
565pub const IPPROTO_PVP: ::c_int = 75;
566/// BackRoom SATNET Monitoring
567pub const IPPROTO_BRSATMON: ::c_int = 76;
568/// Sun net disk proto (temp.)
569pub const IPPROTO_ND: ::c_int = 77;
570/// WIDEBAND Monitoring
571pub const IPPROTO_WBMON: ::c_int = 78;
572/// WIDEBAND EXPAK
573pub const IPPROTO_WBEXPAK: ::c_int = 79;
574/// ISO cnlp
575pub const IPPROTO_EON: ::c_int = 80;
576/// VMTP
577pub const IPPROTO_VMTP: ::c_int = 81;
578/// Secure VMTP
579pub const IPPROTO_SVMTP: ::c_int = 82;
580/// Banyon VINES
581pub const IPPROTO_VINES: ::c_int = 83;
582/// TTP
583pub const IPPROTO_TTP: ::c_int = 84;
584/// NSFNET-IGP
585pub const IPPROTO_IGP: ::c_int = 85;
586/// dissimilar gateway prot.
587pub const IPPROTO_DGP: ::c_int = 86;
588/// TCF
589pub const IPPROTO_TCF: ::c_int = 87;
590/// Cisco/GXS IGRP
591pub const IPPROTO_IGRP: ::c_int = 88;
592/// OSPFIGP
593pub const IPPROTO_OSPFIGP: ::c_int = 89;
594/// Strite RPC protocol
595pub const IPPROTO_SRPC: ::c_int = 90;
596/// Locus Address Resoloution
597pub const IPPROTO_LARP: ::c_int = 91;
598/// Multicast Transport
599pub const IPPROTO_MTP: ::c_int = 92;
600/// AX.25 Frames
601pub const IPPROTO_AX25: ::c_int = 93;
602/// IP encapsulated in IP
603pub const IPPROTO_IPEIP: ::c_int = 94;
604/// Mobile Int.ing control
605pub const IPPROTO_MICP: ::c_int = 95;
606/// Semaphore Comm. security
607pub const IPPROTO_SCCSP: ::c_int = 96;
608/// Ethernet IP encapsulation
609pub const IPPROTO_ETHERIP: ::c_int = 97;
610/// encapsulation header
611pub const IPPROTO_ENCAP: ::c_int = 98;
612/// any private encr. scheme
613pub const IPPROTO_APES: ::c_int = 99;
614/// GMTP
615pub const IPPROTO_GMTP: ::c_int = 100;
616/// payload compression (IPComp)
617pub const IPPROTO_IPCOMP: ::c_int = 108;
618
619/* 101-254: Partly Unassigned */
620/// Protocol Independent Mcast
621pub const IPPROTO_PIM: ::c_int = 103;
622/// CARP
623pub const IPPROTO_CARP: ::c_int = 112;
624/// PGM
625pub const IPPROTO_PGM: ::c_int = 113;
626/// PFSYNC
627pub const IPPROTO_PFSYNC: ::c_int = 240;
628
629/* 255: Reserved */
630/* BSD Private, local use, namespace incursion, no longer used */
631/// divert pseudo-protocol
632pub const IPPROTO_DIVERT: ::c_int = 254;
633pub const IPPROTO_MAX: ::c_int = 256;
634/// last return value of *_input(), meaning "all job for this pkt is done".
635pub const IPPROTO_DONE: ::c_int = 257;
636
637/// Used by RSS: the layer3 protocol is unknown
638pub const IPPROTO_UNKNOWN: ::c_int = 258;
639
cc61c64b
XL
640pub const AF_BLUETOOTH: ::c_int = 33;
641pub const AF_MPLS: ::c_int = 34;
642pub const AF_IEEE80211: ::c_int = 35;
643pub const AF_MAX: ::c_int = 36;
644
645pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
646pub const PF_MAX: ::c_int = AF_MAX;
647
648pub const NET_RT_DUMP: ::c_int = 1;
649pub const NET_RT_FLAGS: ::c_int = 2;
650pub const NET_RT_IFLIST: ::c_int = 3;
651pub const NET_RT_MAXID: ::c_int = 4;
652
653pub const SOMAXOPT_SIZE: ::c_int = 65536;
654
655#[doc(hidden)]
656pub const NET_MAXID: ::c_int = AF_MAX;
657
658pub const MSG_UNUSED09: ::c_int = 0x00000200;
659pub const MSG_NOSIGNAL: ::c_int = 0x00000400;
660pub const MSG_SYNC: ::c_int = 0x00000800;
661pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00001000;
662pub const MSG_FBLOCKING: ::c_int = 0x00010000;
663pub const MSG_FNONBLOCKING: ::c_int = 0x00020000;
664pub const MSG_FMASK: ::c_int = 0xFFFF0000;
32a655c1
SL
665
666pub const EMPTY: ::c_short = 0;
667pub const RUN_LVL: ::c_short = 1;
668pub const BOOT_TIME: ::c_short = 2;
669pub const OLD_TIME: ::c_short = 3;
670pub const NEW_TIME: ::c_short = 4;
671pub const INIT_PROCESS: ::c_short = 5;
672pub const LOGIN_PROCESS: ::c_short = 6;
673pub const USER_PROCESS: ::c_short = 7;
674pub const DEAD_PROCESS: ::c_short = 8;
675
676pub const LC_COLLATE_MASK: ::c_int = (1 << 0);
677pub const LC_CTYPE_MASK: ::c_int = (1 << 1);
678pub const LC_MONETARY_MASK: ::c_int = (1 << 2);
679pub const LC_NUMERIC_MASK: ::c_int = (1 << 3);
680pub const LC_TIME_MASK: ::c_int = (1 << 4);
681pub const LC_MESSAGES_MASK: ::c_int = (1 << 5);
682pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK
683 | LC_CTYPE_MASK
684 | LC_MESSAGES_MASK
685 | LC_MONETARY_MASK
686 | LC_NUMERIC_MASK
687 | LC_TIME_MASK;
9e0c209e 688
8bb4bdeb
XL
689pub const TIOCSIG: ::c_uint = 0x2000745f;
690pub const BTUARTDISC: ::c_int = 0x7;
691pub const TIOCDCDTIMESTAMP: ::c_uint = 0x40107458;
692pub const TIOCISPTMASTER: ::c_uint = 0x20007455;
693pub const TIOCMODG: ::c_uint = 0x40047403;
694pub const TIOCMODS: ::c_ulong = 0x80047404;
695pub const TIOCREMOTE: ::c_ulong = 0x80047469;
696
3b2f2976
XL
697// Constants used by "at" family of system calls.
698pub const AT_FDCWD: ::c_int = 0xFFFAFDCD; // invalid file descriptor
699pub const AT_SYMLINK_NOFOLLOW: ::c_int = 1;
700pub const AT_REMOVEDIR: ::c_int = 2;
701pub const AT_EACCESS: ::c_int = 4;
702pub const AT_SYMLINK_FOLLOW: ::c_int = 8;
703
704pub const VCHECKPT: usize = 19;
705
706pub const _PC_2_SYMLINKS: ::c_int = 22;
707pub const _PC_TIMESTAMP_RESOLUTION: ::c_int = 23;
708
709pub const _SC_V7_ILP32_OFF32: ::c_int = 122;
710pub const _SC_V7_ILP32_OFFBIG: ::c_int = 123;
711pub const _SC_V7_LP64_OFF64: ::c_int = 124;
712pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 125;
713pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 126;
714pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 127;
715
54a0048b
SL
716extern {
717 pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int)
718 -> ::c_int;
3b2f2976
XL
719 pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
720 pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int;
721 pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;
32a655c1
SL
722
723 pub fn setutxdb(_type: ::c_uint, file: *mut ::c_char) -> ::c_int;
724
725 pub fn aio_waitcomplete(iocbp: *mut *mut aiocb,
726 timeout: *mut ::timespec) -> ::c_int;
727
728 pub fn freelocale(loc: ::locale_t);
54a0048b 729}