1 pub type door_attr_t = ::c_uint; 2 pub type door_id_t = ::c_ulonglong; 3 4 s! { 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 29 s_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 53 pub const PORT_SOURCE_POSTWAIT: ::c_int = 8; 54 pub const PORT_SOURCE_SIGNAL: ::c_int = 9; 55 56 pub const AF_LOCAL: ::c_int = 0; 57 pub const AF_FILE: ::c_int = 0; 58 59 pub const TCP_KEEPIDLE: ::c_int = 0x1d; 60 pub const TCP_KEEPINTVL: ::c_int = 0x1e; 61 pub const TCP_KEEPCNT: ::c_int = 0x1f; 62 63 pub const F_DUPFD_CLOEXEC: ::c_int = 47; 64 pub const F_DUPFD_CLOFORK: ::c_int = 49; 65 pub const F_DUP2FD_CLOEXEC: ::c_int = 48; 66 pub const F_DUP2FD_CLOFORK: ::c_int = 50; 67 68 extern "C" { fexecve( fd: ::c_int, argv: *const *const ::c_char, envp: *const *const ::c_char, ) -> ::c_int69 pub fn fexecve( 70 fd: ::c_int, 71 argv: *const *const ::c_char, 72 envp: *const *const ::c_char, 73 ) -> ::c_int; 74 mincore(addr: *const ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int75 pub fn mincore(addr: *const ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int; 76 door_call(d: ::c_int, params: *const door_arg_t) -> ::c_int77 pub fn door_call(d: ::c_int, params: *const door_arg_t) -> ::c_int; door_return( data_ptr: *const ::c_char, data_size: ::size_t, desc_ptr: *const door_desc_t, num_desc: ::c_uint, )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 ); door_create( server_procedure: extern "C" fn( cookie: *const ::c_void, argp: *const ::c_char, arg_size: ::size_t, dp: *const door_desc_t, n_desc: ::c_uint, ), cookie: *const ::c_void, attributes: door_attr_t, ) -> ::c_int84 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 fattach(fildes: ::c_int, path: *const ::c_char) -> ::c_int96 pub fn fattach(fildes: ::c_int, path: *const ::c_char) -> ::c_int; 97 pthread_getattr_np(thread: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int98 pub fn pthread_getattr_np(thread: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int; 99 euidaccess(path: *const ::c_char, amode: ::c_int) -> ::c_int100 pub fn euidaccess(path: *const ::c_char, amode: ::c_int) -> ::c_int; 101 } 102