1pub type door_attr_t = ::c_uint; 2pub type door_id_t = ::c_ulonglong; 3 4s! { 5 pub struct shmid_ds { 6 pub shm_perm: ::ipc_perm, 7 pub shm_segsz: ::size_t, 8 pub shm_flags: ::uintptr_t, 9 pub shm_lkcnt: ::c_ushort, 10 pub shm_lpid: ::pid_t, 11 pub shm_cpid: ::pid_t, 12 pub shm_nattch: ::shmatt_t, 13 pub shm_cnattch: ::c_ulong, 14 pub shm_atime: ::time_t, 15 pub shm_dtime: ::time_t, 16 pub shm_ctime: ::time_t, 17 pub shm_amp: *mut ::c_void, 18 pub shm_gransize: u64, 19 pub shm_allocated: u64, 20 pub shm_pad4: [i64; 1], 21 } 22 23 pub struct door_desc_t__d_data__d_desc { 24 pub d_descriptor: ::c_int, 25 pub d_id: ::door_id_t 26 } 27} 28 29s_no_extra_traits! { 30 #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))] 31 pub union door_desc_t__d_data { 32 pub d_desc: door_desc_t__d_data__d_desc, 33 d_resv: [::c_int; 5], /* Check out /usr/include/sys/door.h */ 34 } 35 36 #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))] 37 pub struct door_desc_t { 38 pub d_attributes: door_attr_t, 39 pub d_data: door_desc_t__d_data, 40 } 41 42 #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))] 43 pub struct door_arg_t { 44 pub data_ptr: *const ::c_char, 45 pub data_size: ::size_t, 46 pub desc_ptr: *const door_desc_t, 47 pub dec_num: ::c_uint, 48 pub rbuf: *const ::c_char, 49 pub rsize: ::size_t, 50 } 51} 52 53pub const PORT_SOURCE_POSTWAIT: ::c_int = 8; 54pub const PORT_SOURCE_SIGNAL: ::c_int = 9; 55 56pub const AF_LOCAL: ::c_int = 0; 57pub const AF_FILE: ::c_int = 0; 58 59pub const TCP_KEEPIDLE: ::c_int = 0x1d; 60pub const TCP_KEEPINTVL: ::c_int = 0x1e; 61pub const TCP_KEEPCNT: ::c_int = 0x1f; 62 63pub const F_DUPFD_CLOEXEC: ::c_int = 47; 64pub const F_DUPFD_CLOFORK: ::c_int = 49; 65pub const F_DUP2FD_CLOEXEC: ::c_int = 48; 66pub const F_DUP2FD_CLOFORK: ::c_int = 50; 67 68extern "C" { 69 pub fn fexecve( 70 fd: ::c_int, 71 argv: *const *const ::c_char, 72 envp: *const *const ::c_char, 73 ) -> ::c_int; 74 75 pub fn mincore(addr: *const ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int; 76 77 pub fn door_call(d: ::c_int, params: *const door_arg_t) -> ::c_int; 78 pub fn door_return( 79 data_ptr: *const ::c_char, 80 data_size: ::size_t, 81 desc_ptr: *const door_desc_t, 82 num_desc: ::c_uint, 83 ); 84 pub fn door_create( 85 server_procedure: extern "C" fn( 86 cookie: *const ::c_void, 87 argp: *const ::c_char, 88 arg_size: ::size_t, 89 dp: *const door_desc_t, 90 n_desc: ::c_uint, 91 ), 92 cookie: *const ::c_void, 93 attributes: door_attr_t, 94 ) -> ::c_int; 95 96 pub fn fattach(fildes: ::c_int, path: *const ::c_char) -> ::c_int; 97 98 pub fn pthread_getattr_np(thread: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int; 99 100 pub fn euidaccess(path: *const ::c_char, amode: ::c_int) -> ::c_int; 101} 102