| 1 |
//! Apple (ios/darwin)-specific definitions |
| 2 |
//! |
| 3 |
//! This covers *-apple-* triples currently |
| 4 |
pub type c_char = i8; |
| 5 |
pub type wchar_t = i32; |
| 6 |
pub type clock_t = c_ulong; |
| 7 |
pub type time_t = c_long; |
| 8 |
pub type suseconds_t = i32; |
| 9 |
pub type dev_t = i32; |
| 10 |
pub type ino_t = u64; |
| 11 |
pub type mode_t = u16; |
| 12 |
pub type nlink_t = u16; |
| 13 |
pub type blksize_t = i32; |
| 14 |
pub type rlim_t = u64; |
| 15 |
pub type pthread_key_t = c_ulong; |
| 16 |
pub type sigset_t = u32; |
| 17 |
pub type clockid_t = ::c_uint; |
| 18 |
pub type fsblkcnt_t = ::c_uint; |
| 19 |
pub type fsfilcnt_t = ::c_uint; |
| 20 |
pub type speed_t = ::c_ulong; |
| 21 |
pub type tcflag_t = ::c_ulong; |
| 22 |
pub type nl_item = ::c_int; |
| 23 |
pub type id_t = ::c_uint; |
| 24 |
pub type sem_t = ::c_int; |
| 25 |
pub type idtype_t = ::c_uint; |
| 26 |
pub type integer_t = ::c_int; |
| 27 |
pub type cpu_type_t = integer_t; |
| 28 |
pub type cpu_subtype_t = integer_t; |
| 29 |
pub type natural_t = u32; |
| 30 |
pub type mach_msg_type_number_t = natural_t; |
| 31 |
pub type kern_return_t = ::c_int; |
| 32 |
pub type uuid_t = [u8; 16]; |
| 33 |
pub type task_info_t = *mut integer_t; |
| 34 |
pub type host_info_t = *mut integer_t; |
| 35 |
pub type task_flavor_t = natural_t; |
| 36 |
pub type rusage_info_t = *mut ::c_void; |
| 37 |
pub type vm_offset_t = ::uintptr_t; |
| 38 |
pub type vm_size_t = ::uintptr_t; |
| 39 |
pub type vm_address_t = vm_offset_t; |
| 40 |
|
| 41 |
pub type posix_spawnattr_t = *mut ::c_void; |
| 42 |
pub type posix_spawn_file_actions_t = *mut ::c_void; |
| 43 |
pub type key_t = ::c_int; |
| 44 |
pub type shmatt_t = ::c_ushort; |
| 45 |
|
| 46 |
pub type sae_associd_t = u32; |
| 47 |
pub type sae_connid_t = u32; |
| 48 |
|
| 49 |
pub type mach_port_t = ::c_uint; |
| 50 |
pub type host_t = ::c_uint; |
| 51 |
pub type host_flavor_t = integer_t; |
| 52 |
pub type host_info64_t = *mut integer_t; |
| 53 |
pub type processor_flavor_t = ::c_int; |
| 54 |
pub type thread_flavor_t = natural_t; |
| 55 |
pub type thread_inspect_t = ::mach_port_t; |
| 56 |
pub type thread_act_t = ::mach_port_t; |
| 57 |
pub type thread_act_array_t = *mut ::thread_act_t; |
| 58 |
pub type policy_t = ::c_int; |
| 59 |
pub type mach_vm_address_t = u64; |
| 60 |
pub type mach_vm_offset_t = u64; |
| 61 |
pub type mach_vm_size_t = u64; |
| 62 |
pub type vm_map_t = ::mach_port_t; |
| 63 |
pub type mem_entry_name_port_t = ::mach_port_t; |
| 64 |
pub type memory_object_t = ::mach_port_t; |
| 65 |
pub type memory_object_offset_t = ::c_ulonglong; |
| 66 |
pub type vm_inherit_t = ::c_uint; |
| 67 |
pub type vm_prot_t = ::c_int; |
| 68 |
|
| 69 |
pub type ledger_t = ::mach_port_t; |
| 70 |
pub type ledger_array_t = *mut ::ledger_t; |
| 71 |
|
| 72 |
pub type iconv_t = *mut ::c_void; |
| 73 |
|
| 74 |
pub type processor_cpu_load_info_t = *mut processor_cpu_load_info; |
| 75 |
pub type processor_cpu_load_info_data_t = processor_cpu_load_info; |
| 76 |
pub type processor_basic_info_t = *mut processor_basic_info; |
| 77 |
pub type processor_basic_info_data_t = processor_basic_info; |
| 78 |
pub type processor_set_basic_info_data_t = processor_set_basic_info; |
| 79 |
pub type processor_set_basic_info_t = *mut processor_set_basic_info; |
| 80 |
pub type processor_set_load_info_data_t = processor_set_load_info; |
| 81 |
pub type processor_set_load_info_t = *mut processor_set_load_info; |
| 82 |
pub type processor_info_t = *mut integer_t; |
| 83 |
pub type processor_info_array_t = *mut integer_t; |
| 84 |
|
| 85 |
pub type mach_task_basic_info_data_t = mach_task_basic_info; |
| 86 |
pub type mach_task_basic_info_t = *mut mach_task_basic_info; |
| 87 |
pub type task_thread_times_info_data_t = task_thread_times_info; |
| 88 |
pub type task_thread_times_info_t = *mut task_thread_times_info; |
| 89 |
|
| 90 |
pub type thread_info_t = *mut integer_t; |
| 91 |
pub type thread_basic_info_t = *mut thread_basic_info; |
| 92 |
pub type thread_basic_info_data_t = thread_basic_info; |
| 93 |
pub type thread_identifier_info_t = *mut thread_identifier_info; |
| 94 |
pub type thread_identifier_info_data_t = thread_identifier_info; |
| 95 |
pub type thread_extended_info_t = *mut thread_extended_info; |
| 96 |
pub type thread_extended_info_data_t = thread_extended_info; |
| 97 |
|
| 98 |
pub type thread_t = ::mach_port_t; |
| 99 |
pub type thread_policy_flavor_t = natural_t; |
| 100 |
pub type thread_policy_t = *mut integer_t; |
| 101 |
pub type thread_latency_qos_t = integer_t; |
| 102 |
pub type thread_throughput_qos_t = integer_t; |
| 103 |
pub type thread_standard_policy_data_t = thread_standard_policy; |
| 104 |
pub type thread_standard_policy_t = *mut thread_standard_policy; |
| 105 |
pub type thread_extended_policy_data_t = thread_extended_policy; |
| 106 |
pub type thread_extended_policy_t = *mut thread_extended_policy; |
| 107 |
pub type thread_time_constraint_policy_data_t = thread_time_constraint_policy; |
| 108 |
pub type thread_time_constraint_policy_t = *mut thread_time_constraint_policy; |
| 109 |
pub type thread_precedence_policy_data_t = thread_precedence_policy; |
| 110 |
pub type thread_precedence_policy_t = *mut thread_precedence_policy; |
| 111 |
pub type thread_affinity_policy_data_t = thread_affinity_policy; |
| 112 |
pub type thread_affinity_policy_t = *mut thread_affinity_policy; |
| 113 |
pub type thread_background_policy_data_t = thread_background_policy; |
| 114 |
pub type thread_background_policy_t = *mut thread_background_policy; |
| 115 |
pub type thread_latency_qos_policy_data_t = thread_latency_qos_policy; |
| 116 |
pub type thread_latency_qos_policy_t = *mut thread_latency_qos_policy; |
| 117 |
pub type thread_throughput_qos_policy_data_t = thread_throughput_qos_policy; |
| 118 |
pub type thread_throughput_qos_policy_t = *mut thread_throughput_qos_policy; |
| 119 |
|
| 120 |
pub type pthread_introspection_hook_t = |
| 121 |
extern "C" fn(event: ::c_uint, thread: ::pthread_t, addr: *mut ::c_void, size: ::size_t); |
| 122 |
pub type pthread_jit_write_callback_t = ::Option<extern "C" fn(ctx: *mut ::c_void) -> ::c_int>; |
| 123 |
|
| 124 |
pub type os_unfair_lock = os_unfair_lock_s; |
| 125 |
pub type os_unfair_lock_t = *mut os_unfair_lock; |
| 126 |
|
| 127 |
pub type os_log_t = *mut ::c_void; |
| 128 |
pub type os_log_type_t = u8; |
| 129 |
pub type os_signpost_id_t = u64; |
| 130 |
pub type os_signpost_type_t = u8; |
| 131 |
|
| 132 |
pub type vm_statistics_t = *mut vm_statistics; |
| 133 |
pub type vm_statistics_data_t = vm_statistics; |
| 134 |
pub type vm_statistics64_t = *mut vm_statistics64; |
| 135 |
pub type vm_statistics64_data_t = vm_statistics64; |
| 136 |
|
| 137 |
pub type task_t = ::mach_port_t; |
| 138 |
pub type task_inspect_t = ::mach_port_t; |
| 139 |
|
| 140 |
pub type sysdir_search_path_enumeration_state = ::c_uint; |
| 141 |
|
| 142 |
pub type CCStatus = i32; |
| 143 |
pub type CCCryptorStatus = i32; |
| 144 |
pub type CCRNGStatus = ::CCCryptorStatus; |
| 145 |
|
| 146 |
pub type copyfile_state_t = *mut ::c_void; |
| 147 |
pub type copyfile_flags_t = u32; |
| 148 |
pub type copyfile_callback_t = ::Option< |
| 149 |
extern "C" fn( |
| 150 |
::c_int, |
| 151 |
::c_int, |
| 152 |
copyfile_state_t, |
| 153 |
*const ::c_char, |
| 154 |
*const ::c_char, |
| 155 |
*mut ::c_void, |
| 156 |
) -> ::c_int, |
| 157 |
>; |
| 158 |
|
| 159 |
pub type attrgroup_t = u32; |
| 160 |
pub type vol_capabilities_set_t = [u32; 4]; |
| 161 |
|
| 162 |
deprecated_mach! { |
| 163 |
pub type mach_timebase_info_data_t = mach_timebase_info; |
| 164 |
} |
| 165 |
|
| 166 |
#[cfg_attr(feature = "extra_traits", derive(Debug))] |
| 167 |
pub enum timezone {} |
| 168 |
impl ::Copy for timezone {} |
| 169 |
impl ::Clone for timezone { |
| 170 |
fn clone(&self) -> timezone { |
| 171 |
*self |
| 172 |
} |
| 173 |
} |
| 174 |
|
| 175 |
#[cfg_attr(feature = "extra_traits", derive(Debug))] |
| 176 |
#[repr(u32)] |
| 177 |
pub enum qos_class_t { |
| 178 |
QOS_CLASS_USER_INTERACTIVE = 0x21, |
| 179 |
QOS_CLASS_USER_INITIATED = 0x19, |
| 180 |
QOS_CLASS_DEFAULT = 0x15, |
| 181 |
QOS_CLASS_UTILITY = 0x11, |
| 182 |
QOS_CLASS_BACKGROUND = 0x09, |
| 183 |
QOS_CLASS_UNSPECIFIED = 0x00, |
| 184 |
} |
| 185 |
impl ::Copy for qos_class_t {} |
| 186 |
impl ::Clone for qos_class_t { |
| 187 |
fn clone(&self) -> qos_class_t { |
| 188 |
*self |
| 189 |
} |
| 190 |
} |
| 191 |
|
| 192 |
#[cfg_attr(feature = "extra_traits", derive(Debug))] |
| 193 |
#[repr(u32)] |
| 194 |
pub enum sysdir_search_path_directory_t { |
| 195 |
SYSDIR_DIRECTORY_APPLICATION = 1, |
| 196 |
SYSDIR_DIRECTORY_DEMO_APPLICATION = 2, |
| 197 |
SYSDIR_DIRECTORY_DEVELOPER_APPLICATION = 3, |
| 198 |
SYSDIR_DIRECTORY_ADMIN_APPLICATION = 4, |
| 199 |
SYSDIR_DIRECTORY_LIBRARY = 5, |
| 200 |
SYSDIR_DIRECTORY_DEVELOPER = 6, |
| 201 |
SYSDIR_DIRECTORY_USER = 7, |
| 202 |
SYSDIR_DIRECTORY_DOCUMENTATION = 8, |
| 203 |
SYSDIR_DIRECTORY_DOCUMENT = 9, |
| 204 |
SYSDIR_DIRECTORY_CORESERVICE = 10, |
| 205 |
SYSDIR_DIRECTORY_AUTOSAVED_INFORMATION = 11, |
| 206 |
SYSDIR_DIRECTORY_DESKTOP = 12, |
| 207 |
SYSDIR_DIRECTORY_CACHES = 13, |
| 208 |
SYSDIR_DIRECTORY_APPLICATION_SUPPORT = 14, |
| 209 |
SYSDIR_DIRECTORY_DOWNLOADS = 15, |
| 210 |
SYSDIR_DIRECTORY_INPUT_METHODS = 16, |
| 211 |
SYSDIR_DIRECTORY_MOVIES = 17, |
| 212 |
SYSDIR_DIRECTORY_MUSIC = 18, |
| 213 |
SYSDIR_DIRECTORY_PICTURES = 19, |
| 214 |
SYSDIR_DIRECTORY_PRINTER_DESCRIPTION = 20, |
| 215 |
SYSDIR_DIRECTORY_SHARED_PUBLIC = 21, |
| 216 |
SYSDIR_DIRECTORY_PREFERENCE_PANES = 22, |
| 217 |
SYSDIR_DIRECTORY_ALL_APPLICATIONS = 100, |
| 218 |
SYSDIR_DIRECTORY_ALL_LIBRARIES = 101, |
| 219 |
} |
| 220 |
impl ::Copy for sysdir_search_path_directory_t {} |
| 221 |
impl ::Clone for sysdir_search_path_directory_t { |
| 222 |
fn clone(&self) -> sysdir_search_path_directory_t { |
| 223 |
*self |
| 224 |
} |
| 225 |
} |
| 226 |
|
| 227 |
#[cfg_attr(feature = "extra_traits", derive(Debug))] |
| 228 |
#[repr(u32)] |
| 229 |
pub enum sysdir_search_path_domain_mask_t { |
| 230 |
SYSDIR_DOMAIN_MASK_USER = (1 << 0), |
| 231 |
SYSDIR_DOMAIN_MASK_LOCAL = (1 << 1), |
| 232 |
SYSDIR_DOMAIN_MASK_NETWORK = (1 << 2), |
| 233 |
SYSDIR_DOMAIN_MASK_SYSTEM = (1 << 3), |
| 234 |
SYSDIR_DOMAIN_MASK_ALL = 0x0ffff, |
| 235 |
} |
| 236 |
impl ::Copy for sysdir_search_path_domain_mask_t {} |
| 237 |
impl ::Clone for sysdir_search_path_domain_mask_t { |
| 238 |
fn clone(&self) -> sysdir_search_path_domain_mask_t { |
| 239 |
*self |
| 240 |
} |
| 241 |
} |
| 242 |
|
| 243 |
s! { |
| 244 |
pub struct ip_mreq { |
| 245 |
pub imr_multiaddr: in_addr, |
| 246 |
pub imr_interface: in_addr, |
| 247 |
} |
| 248 |
|
| 249 |
pub struct ip_mreqn { |
| 250 |
pub imr_multiaddr: in_addr, |
| 251 |
pub imr_address: in_addr, |
| 252 |
pub imr_ifindex: ::c_int, |
| 253 |
} |
| 254 |
|
| 255 |
pub struct ip_mreq_source { |
| 256 |
pub imr_multiaddr: in_addr, |
| 257 |
pub imr_sourceaddr: in_addr, |
| 258 |
pub imr_interface: in_addr, |
| 259 |
} |
| 260 |
|
| 261 |
pub struct aiocb { |
| 262 |
pub aio_fildes: ::c_int, |
| 263 |
pub aio_offset: ::off_t, |
| 264 |
pub aio_buf: *mut ::c_void, |
| 265 |
pub aio_nbytes: ::size_t, |
| 266 |
pub aio_reqprio: ::c_int, |
| 267 |
pub aio_sigevent: sigevent, |
| 268 |
pub aio_lio_opcode: ::c_int |
| 269 |
} |
| 270 |
|
| 271 |
pub struct glob_t { |
| 272 |
pub gl_pathc: ::size_t, |
| 273 |
__unused1: ::c_int, |
| 274 |
pub gl_offs: ::size_t, |
| 275 |
__unused2: ::c_int, |
| 276 |
pub gl_pathv: *mut *mut ::c_char, |
| 277 |
|
| 278 |
__unused3: *mut ::c_void, |
| 279 |
|
| 280 |
__unused4: *mut ::c_void, |
| 281 |
__unused5: *mut ::c_void, |
| 282 |
__unused6: *mut ::c_void, |
| 283 |
__unused7: *mut ::c_void, |
| 284 |
__unused8: *mut ::c_void, |
| 285 |
} |
| 286 |
|
| 287 |
pub struct addrinfo { |
| 288 |
pub ai_flags: ::c_int, |
| 289 |
pub ai_family: ::c_int, |
| 290 |
pub ai_socktype: ::c_int, |
| 291 |
pub ai_protocol: ::c_int, |
| 292 |
pub ai_addrlen: ::socklen_t, |
| 293 |
pub ai_canonname: *mut ::c_char, |
| 294 |
pub ai_addr: *mut ::sockaddr, |
| 295 |
pub ai_next: *mut addrinfo, |
| 296 |
} |
| 297 |
|
| 298 |
#[deprecated( |
| 299 |
since = "0.2.55", |
| 300 |
note = "Use the `mach2` crate instead", |
| 301 |
)] |
| 302 |
pub struct mach_timebase_info { |
| 303 |
pub numer: u32, |
| 304 |
pub denom: u32, |
| 305 |
} |
| 306 |
|
| 307 |
pub struct stat { |
| 308 |
pub st_dev: dev_t, |
| 309 |
pub st_mode: mode_t, |
| 310 |
pub st_nlink: nlink_t, |
| 311 |
pub st_ino: ino_t, |
| 312 |
pub st_uid: ::uid_t, |
| 313 |
pub st_gid: ::gid_t, |
| 314 |
pub st_rdev: dev_t, |
| 315 |
pub st_atime: time_t, |
| 316 |
pub st_atime_nsec: c_long, |
| 317 |
pub st_mtime: time_t, |
| 318 |
pub st_mtime_nsec: c_long, |
| 319 |
pub st_ctime: time_t, |
| 320 |
pub st_ctime_nsec: c_long, |
| 321 |
pub st_birthtime: time_t, |
| 322 |
pub st_birthtime_nsec: c_long, |
| 323 |
pub st_size: ::off_t, |
| 324 |
pub st_blocks: ::blkcnt_t, |
| 325 |
pub st_blksize: blksize_t, |
| 326 |
pub st_flags: u32, |
| 327 |
pub st_gen: u32, |
| 328 |
pub st_lspare: i32, |
| 329 |
pub st_qspare: [i64; 2], |
| 330 |
} |
| 331 |
|
| 332 |
pub struct pthread_mutexattr_t { |
| 333 |
__sig: ::c_long, |
| 334 |
__opaque: [u8; 8], |
| 335 |
} |
| 336 |
|
| 337 |
pub struct pthread_condattr_t { |
| 338 |
__sig: ::c_long, |
| 339 |
__opaque: [u8; __PTHREAD_CONDATTR_SIZE__], |
| 340 |
} |
| 341 |
|
| 342 |
pub struct pthread_rwlockattr_t { |
| 343 |
__sig: ::c_long, |
| 344 |
__opaque: [u8; __PTHREAD_RWLOCKATTR_SIZE__], |
| 345 |
} |
| 346 |
|
| 347 |
pub struct siginfo_t { |
| 348 |
pub si_signo: ::c_int, |
| 349 |
pub si_errno: ::c_int, |
| 350 |
pub si_code: ::c_int, |
| 351 |
pub si_pid: ::pid_t, |
| 352 |
pub si_uid: ::uid_t, |
| 353 |
pub si_status: ::c_int, |
| 354 |
pub si_addr: *mut ::c_void, |
| 355 |
//Requires it to be union for tests |
| 356 |
//pub si_value: ::sigval, |
| 357 |
_pad: [usize; 9], |
| 358 |
} |
| 359 |
|
| 360 |
pub struct sigaction { |
| 361 |
// FIXME: this field is actually a union |
| 362 |
pub sa_sigaction: ::sighandler_t, |
| 363 |
pub sa_mask: sigset_t, |
| 364 |
pub sa_flags: ::c_int, |
| 365 |
} |
| 366 |
|
| 367 |
pub struct stack_t { |
| 368 |
pub ss_sp: *mut ::c_void, |
| 369 |
pub ss_size: ::size_t, |
| 370 |
pub ss_flags: ::c_int, |
| 371 |
} |
| 372 |
|
| 373 |
pub struct fstore_t { |
| 374 |
pub fst_flags: ::c_uint, |
| 375 |
pub fst_posmode: ::c_int, |
| 376 |
pub fst_offset: ::off_t, |
| 377 |
pub fst_length: ::off_t, |
| 378 |
pub fst_bytesalloc: ::off_t, |
| 379 |
} |
| 380 |
|
| 381 |
pub struct fpunchhole_t { |
| 382 |
pub fp_flags: ::c_uint, /* unused */ |
| 383 |
pub reserved: ::c_uint, /* (to maintain 8-byte alignment) */ |
| 384 |
pub fp_offset: ::off_t, /* IN: start of the region */ |
| 385 |
pub fp_length: ::off_t, /* IN: size of the region */ |
| 386 |
} |
| 387 |
|
| 388 |
pub struct ftrimactivefile_t { |
| 389 |
pub fta_offset: ::off_t, |
| 390 |
pub fta_length: ::off_t, |
| 391 |
} |
| 392 |
|
| 393 |
pub struct fspecread_t { |
| 394 |
pub fsr_flags: ::c_uint, |
| 395 |
pub reserved: ::c_uint, |
| 396 |
pub fsr_offset: ::off_t, |
| 397 |
pub fsr_length: ::off_t, |
| 398 |
} |
| 399 |
|
| 400 |
pub struct radvisory { |
| 401 |
pub ra_offset: ::off_t, |
| 402 |
pub ra_count: ::c_int, |
| 403 |
} |
| 404 |
|
| 405 |
pub struct statvfs { |
| 406 |
pub f_bsize: ::c_ulong, |
| 407 |
pub f_frsize: ::c_ulong, |
| 408 |
pub f_blocks: ::fsblkcnt_t, |
| 409 |
pub f_bfree: ::fsblkcnt_t, |
| 410 |
pub f_bavail: ::fsblkcnt_t, |
| 411 |
pub f_files: ::fsfilcnt_t, |
| 412 |
pub f_ffree: ::fsfilcnt_t, |
| 413 |
pub f_favail: ::fsfilcnt_t, |
| 414 |
pub f_fsid: ::c_ulong, |
| 415 |
pub f_flag: ::c_ulong, |
| 416 |
pub f_namemax: ::c_ulong, |
| 417 |
} |
| 418 |
|
| 419 |
pub struct Dl_info { |
| 420 |
pub dli_fname: *const ::c_char, |
| 421 |
pub dli_fbase: *mut ::c_void, |
| 422 |
pub dli_sname: *const ::c_char, |
| 423 |
pub dli_saddr: *mut ::c_void, |
| 424 |
} |
| 425 |
|
| 426 |
pub struct sockaddr_in { |
| 427 |
pub sin_len: u8, |
| 428 |
pub sin_family: ::sa_family_t, |
| 429 |
pub sin_port: ::in_port_t, |
| 430 |
pub sin_addr: ::in_addr, |
| 431 |
pub sin_zero: [::c_char; 8], |
| 432 |
} |
| 433 |
|
| 434 |
pub struct kevent64_s { |
| 435 |
pub ident: u64, |
| 436 |
pub filter: i16, |
| 437 |
pub flags: u16, |
| 438 |
pub fflags: u32, |
| 439 |
pub data: i64, |
| 440 |
pub udata: u64, |
| 441 |
pub ext: [u64; 2], |
| 442 |
} |
| 443 |
|
| 444 |
pub struct dqblk { |
| 445 |
pub dqb_bhardlimit: u64, |
| 446 |
pub dqb_bsoftlimit: u64, |
| 447 |
pub dqb_curbytes: u64, |
| 448 |
pub dqb_ihardlimit: u32, |
| 449 |
pub dqb_isoftlimit: u32, |
| 450 |
pub dqb_curinodes: u32, |
| 451 |
pub dqb_btime: u32, |
| 452 |
pub dqb_itime: u32, |
| 453 |
pub dqb_id: u32, |
| 454 |
pub dqb_spare: [u32; 4], |
| 455 |
} |
| 456 |
|
| 457 |
pub struct if_msghdr { |
| 458 |
pub ifm_msglen: ::c_ushort, |
| 459 |
pub ifm_version: ::c_uchar, |
| 460 |
pub ifm_type: ::c_uchar, |
| 461 |
pub ifm_addrs: ::c_int, |
| 462 |
pub ifm_flags: ::c_int, |
| 463 |
pub ifm_index: ::c_ushort, |
| 464 |
pub ifm_data: if_data, |
| 465 |
} |
| 466 |
|
| 467 |
pub struct ifa_msghdr { |
| 468 |
pub ifam_msglen: ::c_ushort, |
| 469 |
pub ifam_version: ::c_uchar, |
| 470 |
pub ifam_type: ::c_uchar, |
| 471 |
pub ifam_addrs: ::c_int, |
| 472 |
pub ifam_flags: ::c_int, |
| 473 |
pub ifam_index: ::c_ushort, |
| 474 |
pub ifam_metric: ::c_int, |
| 475 |
} |
| 476 |
|
| 477 |
pub struct ifma_msghdr { |
| 478 |
pub ifmam_msglen: ::c_ushort, |
| 479 |
pub ifmam_version: ::c_uchar, |
| 480 |
pub ifmam_type: ::c_uchar, |
| 481 |
pub ifmam_addrs: ::c_int, |
| 482 |
pub ifmam_flags: ::c_int, |
| 483 |
pub ifmam_index: ::c_ushort, |
| 484 |
} |
| 485 |
|
| 486 |
pub struct ifma_msghdr2 { |
| 487 |
pub ifmam_msglen: ::c_ushort, |
| 488 |
pub ifmam_version: ::c_uchar, |
| 489 |
pub ifmam_type: ::c_uchar, |
| 490 |
pub ifmam_addrs: ::c_int, |
| 491 |
pub ifmam_flags: ::c_int, |
| 492 |
pub ifmam_index: ::c_ushort, |
| 493 |
pub ifmam_refcount: i32, |
| 494 |
} |
| 495 |
|
| 496 |
pub struct rt_metrics { |
| 497 |
pub rmx_locks: u32, |
| 498 |
pub rmx_mtu: u32, |
| 499 |
pub rmx_hopcount: u32, |
| 500 |
pub rmx_expire: i32, |
| 501 |
pub rmx_recvpipe: u32, |
| 502 |
pub rmx_sendpipe: u32, |
| 503 |
pub rmx_ssthresh: u32, |
| 504 |
pub rmx_rtt: u32, |
| 505 |
pub rmx_rttvar: u32, |
| 506 |
pub rmx_pksent: u32, |
| 507 |
pub rmx_state: u32, |
| 508 |
pub rmx_filler: [u32; 3], |
| 509 |
} |
| 510 |
|
| 511 |
pub struct rt_msghdr { |
| 512 |
pub rtm_msglen: ::c_ushort, |
| 513 |
pub rtm_version: ::c_uchar, |
| 514 |
pub rtm_type: ::c_uchar, |
| 515 |
pub rtm_index: ::c_ushort, |
| 516 |
pub rtm_flags: ::c_int, |
| 517 |
pub rtm_addrs: ::c_int, |
| 518 |
pub rtm_pid: ::pid_t, |
| 519 |
pub rtm_seq: ::c_int, |
| 520 |
pub rtm_errno: ::c_int, |
| 521 |
pub rtm_use: ::c_int, |
| 522 |
pub rtm_inits: u32, |
| 523 |
pub rtm_rmx: rt_metrics, |
| 524 |
} |
| 525 |
|
| 526 |
pub struct rt_msghdr2 { |
| 527 |
pub rtm_msglen: ::c_ushort, |
| 528 |
pub rtm_version: ::c_uchar, |
| 529 |
pub rtm_type: ::c_uchar, |
| 530 |
pub rtm_index: ::c_ushort, |
| 531 |
pub rtm_flags: ::c_int, |
| 532 |
pub rtm_addrs: ::c_int, |
| 533 |
pub rtm_refcnt: i32, |
| 534 |
pub rtm_parentflags: ::c_int, |
| 535 |
pub rtm_reserved: ::c_int, |
| 536 |
pub rtm_use: ::c_int, |
| 537 |
pub rtm_inits: u32, |
| 538 |
pub rtm_rmx: rt_metrics, |
| 539 |
} |
| 540 |
|
| 541 |
pub struct termios { |
| 542 |
pub c_iflag: ::tcflag_t, |
| 543 |
pub c_oflag: ::tcflag_t, |
| 544 |
pub c_cflag: ::tcflag_t, |
| 545 |
pub c_lflag: ::tcflag_t, |
| 546 |
pub c_cc: [::cc_t; ::NCCS], |
| 547 |
pub c_ispeed: ::speed_t, |
| 548 |
pub c_ospeed: ::speed_t, |
| 549 |
} |
| 550 |
|
| 551 |
pub struct flock { |
| 552 |
pub l_start: ::off_t, |
| 553 |
pub l_len: ::off_t, |
| 554 |
pub l_pid: ::pid_t, |
| 555 |
pub l_type: ::c_short, |
| 556 |
pub l_whence: ::c_short, |
| 557 |
} |
| 558 |
|
| 559 |
pub struct sf_hdtr { |
| 560 |
pub headers: *mut ::iovec, |
| 561 |
pub hdr_cnt: ::c_int, |
| 562 |
pub trailers: *mut ::iovec, |
| 563 |
pub trl_cnt: ::c_int, |
| 564 |
} |
| 565 |
|
| 566 |
pub struct lconv { |
| 567 |
pub decimal_point: *mut ::c_char, |
| 568 |
pub thousands_sep: *mut ::c_char, |
| 569 |
pub grouping: *mut ::c_char, |
| 570 |
pub int_curr_symbol: *mut ::c_char, |
| 571 |
pub currency_symbol: *mut ::c_char, |
| 572 |
pub mon_decimal_point: *mut ::c_char, |
| 573 |
pub mon_thousands_sep: *mut ::c_char, |
| 574 |
pub mon_grouping: *mut ::c_char, |
| 575 |
pub positive_sign: *mut ::c_char, |
| 576 |
pub negative_sign: *mut ::c_char, |
| 577 |
pub int_frac_digits: ::c_char, |
| 578 |
pub frac_digits: ::c_char, |
| 579 |
pub p_cs_precedes: ::c_char, |
| 580 |
pub p_sep_by_space: ::c_char, |
| 581 |
pub n_cs_precedes: ::c_char, |
| 582 |
pub n_sep_by_space: ::c_char, |
| 583 |
pub p_sign_posn: ::c_char, |
| 584 |
pub n_sign_posn: ::c_char, |
| 585 |
pub int_p_cs_precedes: ::c_char, |
| 586 |
pub int_n_cs_precedes: ::c_char, |
| 587 |
pub int_p_sep_by_space: ::c_char, |
| 588 |
pub int_n_sep_by_space: ::c_char, |
| 589 |
pub int_p_sign_posn: ::c_char, |
| 590 |
pub int_n_sign_posn: ::c_char, |
| 591 |
} |
| 592 |
|
| 593 |
pub struct proc_taskinfo { |
| 594 |
pub pti_virtual_size: u64, |
| 595 |
pub pti_resident_size: u64, |
| 596 |
pub pti_total_user: u64, |
| 597 |
pub pti_total_system: u64, |
| 598 |
pub pti_threads_user: u64, |
| 599 |
pub pti_threads_system: u64, |
| 600 |
pub pti_policy: i32, |
| 601 |
pub pti_faults: i32, |
| 602 |
pub pti_pageins: i32, |
| 603 |
pub pti_cow_faults: i32, |
| 604 |
pub pti_messages_sent: i32, |
| 605 |
pub pti_messages_received: i32, |
| 606 |
pub pti_syscalls_mach: i32, |
| 607 |
pub pti_syscalls_unix: i32, |
| 608 |
pub pti_csw: i32, |
| 609 |
pub pti_threadnum: i32, |
| 610 |
pub pti_numrunning: i32, |
| 611 |
pub pti_priority: i32, |
| 612 |
} |
| 613 |
|
| 614 |
pub struct proc_bsdinfo { |
| 615 |
pub pbi_flags: u32, |
| 616 |
pub pbi_status: u32, |
| 617 |
pub pbi_xstatus: u32, |
| 618 |
pub pbi_pid: u32, |
| 619 |
pub pbi_ppid: u32, |
| 620 |
pub pbi_uid: ::uid_t, |
| 621 |
pub pbi_gid: ::gid_t, |
| 622 |
pub pbi_ruid: ::uid_t, |
| 623 |
pub pbi_rgid: ::gid_t, |
| 624 |
pub pbi_svuid: ::uid_t, |
| 625 |
pub pbi_svgid: ::gid_t, |
| 626 |
pub rfu_1: u32, |
| 627 |
pub pbi_comm: [::c_char; MAXCOMLEN], |
| 628 |
pub pbi_name: [::c_char; 32], // MAXCOMLEN * 2, but macro isn't happy... |
| 629 |
pub pbi_nfiles: u32, |
| 630 |
pub pbi_pgid: u32, |
| 631 |
pub pbi_pjobc: u32, |
| 632 |
pub e_tdev: u32, |
| 633 |
pub e_tpgid: u32, |
| 634 |
pub pbi_nice: i32, |
| 635 |
pub pbi_start_tvsec: u64, |
| 636 |
pub pbi_start_tvusec: u64, |
| 637 |
} |
| 638 |
|
| 639 |
pub struct proc_taskallinfo { |
| 640 |
pub pbsd: proc_bsdinfo, |
| 641 |
pub ptinfo: proc_taskinfo, |
| 642 |
} |
| 643 |
|
| 644 |
pub struct xsw_usage { |
| 645 |
pub xsu_total: u64, |
| 646 |
pub xsu_avail: u64, |
| 647 |
pub xsu_used: u64, |
| 648 |
pub xsu_pagesize: u32, |
| 649 |
pub xsu_encrypted: ::boolean_t, |
| 650 |
} |
| 651 |
|
| 652 |
pub struct xucred { |
| 653 |
pub cr_version: ::c_uint, |
| 654 |
pub cr_uid: ::uid_t, |
| 655 |
pub cr_ngroups: ::c_short, |
| 656 |
pub cr_groups: [::gid_t;16] |
| 657 |
} |
| 658 |
|
| 659 |
#[deprecated( |
| 660 |
since = "0.2.55", |
| 661 |
note = "Use the `mach2` crate instead", |
| 662 |
)] |
| 663 |
pub struct mach_header { |
| 664 |
pub magic: u32, |
| 665 |
pub cputype: cpu_type_t, |
| 666 |
pub cpusubtype: cpu_subtype_t, |
| 667 |
pub filetype: u32, |
| 668 |
pub ncmds: u32, |
| 669 |
pub sizeofcmds: u32, |
| 670 |
pub flags: u32, |
| 671 |
} |
| 672 |
|
| 673 |
#[deprecated( |
| 674 |
since = "0.2.55", |
| 675 |
note = "Use the `mach2` crate instead", |
| 676 |
)] |
| 677 |
pub struct mach_header_64 { |
| 678 |
pub magic: u32, |
| 679 |
pub cputype: cpu_type_t, |
| 680 |
pub cpusubtype: cpu_subtype_t, |
| 681 |
pub filetype: u32, |
| 682 |
pub ncmds: u32, |
| 683 |
pub sizeofcmds: u32, |
| 684 |
pub flags: u32, |
| 685 |
pub reserved: u32, |
| 686 |
} |
| 687 |
|
| 688 |
pub struct segment_command { |
| 689 |
pub cmd: u32, |
| 690 |
pub cmdsize: u32, |
| 691 |
pub segname: [::c_char; 16], |
| 692 |
pub vmaddr: u32, |
| 693 |
pub vmsize: u32, |
| 694 |
pub fileoff: u32, |
| 695 |
pub filesize: u32, |
| 696 |
pub maxprot: vm_prot_t, |
| 697 |
pub initprot: vm_prot_t, |
| 698 |
pub nsects: u32, |
| 699 |
pub flags: u32, |
| 700 |
} |
| 701 |
|
| 702 |
pub struct segment_command_64 { |
| 703 |
pub cmd: u32, |
| 704 |
pub cmdsize: u32, |
| 705 |
pub segname: [::c_char; 16], |
| 706 |
pub vmaddr: u64, |
| 707 |
pub vmsize: u64, |
| 708 |
pub fileoff: u64, |
| 709 |
pub filesize: u64, |
| 710 |
pub maxprot: vm_prot_t, |
| 711 |
pub initprot: vm_prot_t, |
| 712 |
pub nsects: u32, |
| 713 |
pub flags: u32, |
| 714 |
} |
| 715 |
|
| 716 |
pub struct load_command { |
| 717 |
pub cmd: u32, |
| 718 |
pub cmdsize: u32, |
| 719 |
} |
| 720 |
|
| 721 |
pub struct sockaddr_dl { |
| 722 |
pub sdl_len: ::c_uchar, |
| 723 |
pub sdl_family: ::c_uchar, |
| 724 |
pub sdl_index: ::c_ushort, |
| 725 |
pub sdl_type: ::c_uchar, |
| 726 |
pub sdl_nlen: ::c_uchar, |
| 727 |
pub sdl_alen: ::c_uchar, |
| 728 |
pub sdl_slen: ::c_uchar, |
| 729 |
pub sdl_data: [::c_char; 12], |
| 730 |
} |
| 731 |
|
| 732 |
pub struct sockaddr_inarp { |
| 733 |
pub sin_len: ::c_uchar, |
| 734 |
pub sin_family: ::c_uchar, |
| 735 |
pub sin_port: ::c_ushort, |
| 736 |
pub sin_addr: ::in_addr, |
| 737 |
pub sin_srcaddr: ::in_addr, |
| 738 |
pub sin_tos: ::c_ushort, |
| 739 |
pub sin_other: ::c_ushort, |
| 740 |
} |
| 741 |
|
| 742 |
pub struct sockaddr_ctl { |
| 743 |
pub sc_len: ::c_uchar, |
| 744 |
pub sc_family: ::c_uchar, |
| 745 |
pub ss_sysaddr: u16, |
| 746 |
pub sc_id: u32, |
| 747 |
pub sc_unit: u32, |
| 748 |
pub sc_reserved: [u32; 5], |
| 749 |
} |
| 750 |
|
| 751 |
pub struct in_pktinfo { |
| 752 |
pub ipi_ifindex: ::c_uint, |
| 753 |
pub ipi_spec_dst: ::in_addr, |
| 754 |
pub ipi_addr: ::in_addr, |
| 755 |
} |
| 756 |
|
| 757 |
pub struct in6_pktinfo { |
| 758 |
pub ipi6_addr: ::in6_addr, |
| 759 |
pub ipi6_ifindex: ::c_uint, |
| 760 |
} |
| 761 |
|
| 762 |
// sys/ipc.h: |
| 763 |
|
| 764 |
pub struct ipc_perm { |
| 765 |
pub uid: ::uid_t, |
| 766 |
pub gid: ::gid_t, |
| 767 |
pub cuid: ::uid_t, |
| 768 |
pub cgid: ::gid_t, |
| 769 |
pub mode: ::mode_t, |
| 770 |
pub _seq: ::c_ushort, |
| 771 |
pub _key: ::key_t, |
| 772 |
} |
| 773 |
|
| 774 |
// sys/sem.h |
| 775 |
|
| 776 |
pub struct sembuf { |
| 777 |
pub sem_num: ::c_ushort, |
| 778 |
pub sem_op: ::c_short, |
| 779 |
pub sem_flg: ::c_short, |
| 780 |
} |
| 781 |
|
| 782 |
// sys/shm.h |
| 783 |
|
| 784 |
pub struct arphdr { |
| 785 |
pub ar_hrd: u16, |
| 786 |
pub ar_pro: u16, |
| 787 |
pub ar_hln: u8, |
| 788 |
pub ar_pln: u8, |
| 789 |
pub ar_op: u16, |
| 790 |
} |
| 791 |
|
| 792 |
pub struct in_addr { |
| 793 |
pub s_addr: ::in_addr_t, |
| 794 |
} |
| 795 |
|
| 796 |
// net/ndrv.h |
| 797 |
pub struct sockaddr_ndrv { |
| 798 |
pub snd_len: ::c_uchar, |
| 799 |
pub snd_family: ::c_uchar, |
| 800 |
pub snd_name: [::c_uchar; ::IFNAMSIZ], |
| 801 |
} |
| 802 |
|
| 803 |
// sys/socket.h |
| 804 |
|
| 805 |
pub struct sa_endpoints_t { |
| 806 |
pub sae_srcif: ::c_uint, // optional source interface |
| 807 |
pub sae_srcaddr: *const ::sockaddr, // optional source address |
| 808 |
pub sae_srcaddrlen: ::socklen_t, // size of source address |
| 809 |
pub sae_dstaddr: *const ::sockaddr, // destination address |
| 810 |
pub sae_dstaddrlen: ::socklen_t, // size of destination address |
| 811 |
} |
| 812 |
|
| 813 |
pub struct timex { |
| 814 |
pub modes: ::c_uint, |
| 815 |
pub offset: ::c_long, |
| 816 |
pub freq: ::c_long, |
| 817 |
pub maxerror: ::c_long, |
| 818 |
pub esterror: ::c_long, |
| 819 |
pub status: ::c_int, |
| 820 |
pub constant: ::c_long, |
| 821 |
pub precision: ::c_long, |
| 822 |
pub tolerance: ::c_long, |
| 823 |
pub ppsfreq: ::c_long, |
| 824 |
pub jitter: ::c_long, |
| 825 |
pub shift: ::c_int, |
| 826 |
pub stabil: ::c_long, |
| 827 |
pub jitcnt: ::c_long, |
| 828 |
pub calcnt: ::c_long, |
| 829 |
pub errcnt: ::c_long, |
| 830 |
pub stbcnt: ::c_long, |
| 831 |
} |
| 832 |
|
| 833 |
pub struct ntptimeval { |
| 834 |
pub time: ::timespec, |
| 835 |
pub maxerror: ::c_long, |
| 836 |
pub esterror: ::c_long, |
| 837 |
pub tai: ::c_long, |
| 838 |
pub time_state: ::c_int, |
| 839 |
} |
| 840 |
|
| 841 |
pub struct thread_standard_policy { |
| 842 |
pub no_data: natural_t, |
| 843 |
} |
| 844 |
|
| 845 |
pub struct thread_extended_policy { |
| 846 |
pub timeshare: boolean_t, |
| 847 |
} |
| 848 |
|
| 849 |
pub struct thread_time_constraint_policy { |
| 850 |
pub period: u32, |
| 851 |
pub computation: u32, |
| 852 |
pub constraint: u32, |
| 853 |
pub preemptible: boolean_t, |
| 854 |
} |
| 855 |
|
| 856 |
pub struct thread_precedence_policy { |
| 857 |
pub importance: integer_t, |
| 858 |
} |
| 859 |
|
| 860 |
pub struct thread_affinity_policy { |
| 861 |
pub affinity_tag: integer_t, |
| 862 |
} |
| 863 |
|
| 864 |
pub struct thread_background_policy { |
| 865 |
pub priority: integer_t, |
| 866 |
} |
| 867 |
|
| 868 |
pub struct thread_latency_qos_policy { |
| 869 |
pub thread_latency_qos_tier: thread_latency_qos_t, |
| 870 |
} |
| 871 |
|
| 872 |
pub struct thread_throughput_qos_policy { |
| 873 |
pub thread_throughput_qos_tier: thread_throughput_qos_t, |
| 874 |
} |
| 875 |
|
| 876 |
// malloc/malloc.h |
| 877 |
pub struct malloc_statistics_t { |
| 878 |
pub blocks_in_use: ::c_uint, |
| 879 |
pub size_in_use: ::size_t, |
| 880 |
pub max_size_in_use: ::size_t, |
| 881 |
pub size_allocated: ::size_t, |
| 882 |
} |
| 883 |
|
| 884 |
pub struct mstats { |
| 885 |
pub bytes_total: ::size_t, |
| 886 |
pub chunks_used: ::size_t, |
| 887 |
pub bytes_used: ::size_t, |
| 888 |
pub chunks_free: ::size_t, |
| 889 |
pub bytes_free: ::size_t, |
| 890 |
} |
| 891 |
|
| 892 |
pub struct vm_range_t { |
| 893 |
pub address: ::vm_address_t, |
| 894 |
pub size: ::vm_size_t, |
| 895 |
} |
| 896 |
|
| 897 |
// sched.h |
| 898 |
pub struct sched_param { |
| 899 |
pub sched_priority: ::c_int, |
| 900 |
__opaque: [::c_char; 4], |
| 901 |
} |
| 902 |
|
| 903 |
pub struct vinfo_stat { |
| 904 |
pub vst_dev: u32, |
| 905 |
pub vst_mode: u16, |
| 906 |
pub vst_nlink: u16, |
| 907 |
pub vst_ino: u64, |
| 908 |
pub vst_uid: ::uid_t, |
| 909 |
pub vst_gid: ::gid_t, |
| 910 |
pub vst_atime: i64, |
| 911 |
pub vst_atimensec: i64, |
| 912 |
pub vst_mtime: i64, |
| 913 |
pub vst_mtimensec: i64, |
| 914 |
pub vst_ctime: i64, |
| 915 |
pub vst_ctimensec: i64, |
| 916 |
pub vst_birthtime: i64, |
| 917 |
pub vst_birthtimensec: i64, |
| 918 |
pub vst_size: ::off_t, |
| 919 |
pub vst_blocks: i64, |
| 920 |
pub vst_blksize: i32, |
| 921 |
pub vst_flags: u32, |
| 922 |
pub vst_gen: u32, |
| 923 |
pub vst_rdev: u32, |
| 924 |
pub vst_qspare: [i64; 2], |
| 925 |
} |
| 926 |
|
| 927 |
pub struct vnode_info { |
| 928 |
pub vi_stat: vinfo_stat, |
| 929 |
pub vi_type: ::c_int, |
| 930 |
pub vi_pad: ::c_int, |
| 931 |
pub vi_fsid: ::fsid_t, |
| 932 |
} |
| 933 |
|
| 934 |
pub struct vnode_info_path { |
| 935 |
pub vip_vi: vnode_info, |
| 936 |
// Normally it's `vip_path: [::c_char; MAXPATHLEN]` but because libc supports an old rustc |
| 937 |
// version, we go around this limitation like this. |
| 938 |
pub vip_path: [[::c_char; 32]; 32], |
| 939 |
} |
| 940 |
|
| 941 |
pub struct proc_vnodepathinfo { |
| 942 |
pub pvi_cdir: vnode_info_path, |
| 943 |
pub pvi_rdir: vnode_info_path, |
| 944 |
} |
| 945 |
|
| 946 |
pub struct vm_statistics { |
| 947 |
pub free_count: natural_t, |
| 948 |
pub active_count: natural_t, |
| 949 |
pub inactive_count: natural_t, |
| 950 |
pub wire_count: natural_t, |
| 951 |
pub zero_fill_count: natural_t, |
| 952 |
pub reactivations: natural_t, |
| 953 |
pub pageins: natural_t, |
| 954 |
pub pageouts: natural_t, |
| 955 |
pub faults: natural_t, |
| 956 |
pub cow_faults: natural_t, |
| 957 |
pub lookups: natural_t, |
| 958 |
pub hits: natural_t, |
| 959 |
pub purgeable_count: natural_t, |
| 960 |
pub purges: natural_t, |
| 961 |
pub speculative_count: natural_t, |
| 962 |
} |
| 963 |
|
| 964 |
pub struct task_thread_times_info { |
| 965 |
pub user_time: time_value_t, |
| 966 |
pub system_time: time_value_t, |
| 967 |
} |
| 968 |
|
| 969 |
pub struct rusage_info_v0 { |
| 970 |
pub ri_uuid: [u8; 16], |
| 971 |
pub ri_user_time: u64, |
| 972 |
pub ri_system_time: u64, |
| 973 |
pub ri_pkg_idle_wkups: u64, |
| 974 |
pub ri_interrupt_wkups: u64, |
| 975 |
pub ri_pageins: u64, |
| 976 |
pub ri_wired_size: u64, |
| 977 |
pub ri_resident_size: u64, |
| 978 |
pub ri_phys_footprint: u64, |
| 979 |
pub ri_proc_start_abstime: u64, |
| 980 |
pub ri_proc_exit_abstime: u64, |
| 981 |
} |
| 982 |
|
| 983 |
pub struct rusage_info_v1 { |
| 984 |
pub ri_uuid: [u8; 16], |
| 985 |
pub ri_user_time: u64, |
| 986 |
pub ri_system_time: u64, |
| 987 |
pub ri_pkg_idle_wkups: u64, |
| 988 |
pub ri_interrupt_wkups: u64, |
| 989 |
pub ri_pageins: u64, |
| 990 |
pub ri_wired_size: u64, |
| 991 |
pub ri_resident_size: u64, |
| 992 |
pub ri_phys_footprint: u64, |
| 993 |
pub ri_proc_start_abstime: u64, |
| 994 |
pub ri_proc_exit_abstime: u64, |
| 995 |
pub ri_child_user_time: u64, |
| 996 |
pub ri_child_system_time: u64, |
| 997 |
pub ri_child_pkg_idle_wkups: u64, |
| 998 |
pub ri_child_interrupt_wkups: u64, |
| 999 |
pub ri_child_pageins: u64, |
| 1000 |
pub ri_child_elapsed_abstime: u64, |
| 1001 |
} |
| 1002 |
|
| 1003 |
pub struct rusage_info_v2 { |
| 1004 |
pub ri_uuid: [u8; 16], |
| 1005 |
pub ri_user_time: u64, |
| 1006 |
pub ri_system_time: u64, |
| 1007 |
pub ri_pkg_idle_wkups: u64, |
| 1008 |
pub ri_interrupt_wkups: u64, |
| 1009 |
pub ri_pageins: u64, |
| 1010 |
pub ri_wired_size: u64, |
| 1011 |
pub ri_resident_size: u64, |
| 1012 |
pub ri_phys_footprint: u64, |
| 1013 |
pub ri_proc_start_abstime: u64, |
| 1014 |
pub ri_proc_exit_abstime: u64, |
| 1015 |
pub ri_child_user_time: u64, |
| 1016 |
pub ri_child_system_time: u64, |
| 1017 |
pub ri_child_pkg_idle_wkups: u64, |
| 1018 |
pub ri_child_interrupt_wkups: u64, |
| 1019 |
pub ri_child_pageins: u64, |
| 1020 |
pub ri_child_elapsed_abstime: u64, |
| 1021 |
pub ri_diskio_bytesread: u64, |
| 1022 |
pub ri_diskio_byteswritten: u64, |
| 1023 |
} |
| 1024 |
|
| 1025 |
pub struct rusage_info_v3 { |
| 1026 |
pub ri_uuid: [u8; 16], |
| 1027 |
pub ri_user_time: u64, |
| 1028 |
pub ri_system_time: u64, |
| 1029 |
pub ri_pkg_idle_wkups: u64, |
| 1030 |
pub ri_interrupt_wkups: u64, |
| 1031 |
pub ri_pageins: u64, |
| 1032 |
pub ri_wired_size: u64, |
| 1033 |
pub ri_resident_size: u64, |
| 1034 |
pub ri_phys_footprint: u64, |
| 1035 |
pub ri_proc_start_abstime: u64, |
| 1036 |
pub ri_proc_exit_abstime: u64, |
| 1037 |
pub ri_child_user_time: u64, |
| 1038 |
pub ri_child_system_time: u64, |
| 1039 |
pub ri_child_pkg_idle_wkups: u64, |
| 1040 |
pub ri_child_interrupt_wkups: u64, |
| 1041 |
pub ri_child_pageins: u64, |
| 1042 |
pub ri_child_elapsed_abstime: u64, |
| 1043 |
pub ri_diskio_bytesread: u64, |
| 1044 |
pub ri_diskio_byteswritten: u64, |
| 1045 |
pub ri_cpu_time_qos_default: u64, |
| 1046 |
pub ri_cpu_time_qos_maintenance: u64, |
| 1047 |
pub ri_cpu_time_qos_background: u64, |
| 1048 |
pub ri_cpu_time_qos_utility: u64, |
| 1049 |
pub ri_cpu_time_qos_legacy: u64, |
| 1050 |
pub ri_cpu_time_qos_user_initiated: u64, |
| 1051 |
pub ri_cpu_time_qos_user_interactive: u64, |
| 1052 |
pub ri_billed_system_time: u64, |
| 1053 |
pub ri_serviced_system_time: u64, |
| 1054 |
} |
| 1055 |
|
| 1056 |
pub struct rusage_info_v4 { |
| 1057 |
pub ri_uuid: [u8; 16], |
| 1058 |
pub ri_user_time: u64, |
| 1059 |
pub ri_system_time: u64, |
| 1060 |
pub ri_pkg_idle_wkups: u64, |
| 1061 |
pub ri_interrupt_wkups: u64, |
| 1062 |
pub ri_pageins: u64, |
| 1063 |
pub ri_wired_size: u64, |
| 1064 |
pub ri_resident_size: u64, |
| 1065 |
pub ri_phys_footprint: u64, |
| 1066 |
pub ri_proc_start_abstime: u64, |
| 1067 |
pub ri_proc_exit_abstime: u64, |
| 1068 |
pub ri_child_user_time: u64, |
| 1069 |
pub ri_child_system_time: u64, |
| 1070 |
pub ri_child_pkg_idle_wkups: u64, |
| 1071 |
pub ri_child_interrupt_wkups: u64, |
| 1072 |
pub ri_child_pageins: u64, |
| 1073 |
pub ri_child_elapsed_abstime: u64, |
| 1074 |
pub ri_diskio_bytesread: u64, |
| 1075 |
pub ri_diskio_byteswritten: u64, |
| 1076 |
pub ri_cpu_time_qos_default: u64, |
| 1077 |
pub ri_cpu_time_qos_maintenance: u64, |
| 1078 |
pub ri_cpu_time_qos_background: u64, |
| 1079 |
pub ri_cpu_time_qos_utility: u64, |
| 1080 |
pub ri_cpu_time_qos_legacy: u64, |
| 1081 |
pub ri_cpu_time_qos_user_initiated: u64, |
| 1082 |
pub ri_cpu_time_qos_user_interactive: u64, |
| 1083 |
pub ri_billed_system_time: u64, |
| 1084 |
pub ri_serviced_system_time: u64, |
| 1085 |
pub ri_logical_writes: u64, |
| 1086 |
pub ri_lifetime_max_phys_footprint: u64, |
| 1087 |
pub ri_instructions: u64, |
| 1088 |
pub ri_cycles: u64, |
| 1089 |
pub ri_billed_energy: u64, |
| 1090 |
pub ri_serviced_energy: u64, |
| 1091 |
pub ri_interval_max_phys_footprint: u64, |
| 1092 |
pub ri_runnable_time: u64, |
| 1093 |
} |
| 1094 |
|
| 1095 |
pub struct image_offset { |
| 1096 |
pub uuid: ::uuid_t, |
| 1097 |
pub offset: u32, |
| 1098 |
} |
| 1099 |
|
| 1100 |
pub struct attrlist { |
| 1101 |
pub bitmapcount: ::c_ushort, |
| 1102 |
pub reserved: u16, |
| 1103 |
pub commonattr: attrgroup_t, |
| 1104 |
pub volattr: attrgroup_t, |
| 1105 |
pub dirattr: attrgroup_t, |
| 1106 |
pub fileattr: attrgroup_t, |
| 1107 |
pub forkattr: attrgroup_t, |
| 1108 |
} |
| 1109 |
|
| 1110 |
pub struct attrreference_t { |
| 1111 |
pub attr_dataoffset: i32, |
| 1112 |
pub attr_length: u32, |
| 1113 |
} |
| 1114 |
|
| 1115 |
pub struct vol_capabilities_attr_t { |
| 1116 |
pub capabilities: vol_capabilities_set_t, |
| 1117 |
pub valid: vol_capabilities_set_t, |
| 1118 |
} |
| 1119 |
|
| 1120 |
pub struct attribute_set_t { |
| 1121 |
pub commonattr: attrgroup_t, |
| 1122 |
pub volattr: attrgroup_t, |
| 1123 |
pub dirattr: attrgroup_t, |
| 1124 |
pub fileattr: attrgroup_t, |
| 1125 |
pub forkattr: attrgroup_t, |
| 1126 |
} |
| 1127 |
|
| 1128 |
pub struct vol_attributes_attr_t { |
| 1129 |
pub validattr: attribute_set_t, |
| 1130 |
pub nativeattr: attribute_set_t, |
| 1131 |
} |
| 1132 |
|
| 1133 |
#[cfg_attr(libc_packedN, repr(packed(4)))] |
| 1134 |
pub struct ifconf { |
| 1135 |
pub ifc_len: ::c_int, |
| 1136 |
#[cfg(libc_union)] |
| 1137 |
pub ifc_ifcu: __c_anonymous_ifc_ifcu, |
| 1138 |
#[cfg(not(libc_union))] |
| 1139 |
pub ifc_ifcu: *mut ifreq, |
| 1140 |
} |
| 1141 |
|
| 1142 |
#[cfg_attr(libc_align, repr(align(8)))] |
| 1143 |
pub struct tcp_connection_info { |
| 1144 |
pub tcpi_state: u8, |
| 1145 |
pub tcpi_snd_wscale: u8, |
| 1146 |
pub tcpi_rcv_wscale: u8, |
| 1147 |
__pad1: u8, |
| 1148 |
pub tcpi_options: u32, |
| 1149 |
pub tcpi_flags: u32, |
| 1150 |
pub tcpi_rto: u32, |
| 1151 |
pub tcpi_maxseg: u32, |
| 1152 |
pub tcpi_snd_ssthresh: u32, |
| 1153 |
pub tcpi_snd_cwnd: u32, |
| 1154 |
pub tcpi_snd_wnd: u32, |
| 1155 |
pub tcpi_snd_sbbytes: u32, |
| 1156 |
pub tcpi_rcv_wnd: u32, |
| 1157 |
pub tcpi_rttcur: u32, |
| 1158 |
pub tcpi_srtt: u32, |
| 1159 |
pub tcpi_rttvar: u32, |
| 1160 |
pub tcpi_tfo_cookie_req: u32, |
| 1161 |
pub tcpi_tfo_cookie_rcv: u32, |
| 1162 |
pub tcpi_tfo_syn_loss: u32, |
| 1163 |
pub tcpi_tfo_syn_data_sent: u32, |
| 1164 |
pub tcpi_tfo_syn_data_acked: u32, |
| 1165 |
pub tcpi_tfo_syn_data_rcv: u32, |
| 1166 |
pub tcpi_tfo_cookie_req_rcv: u32, |
| 1167 |
pub tcpi_tfo_cookie_sent: u32, |
| 1168 |
pub tcpi_tfo_cookie_invalid: u32, |
| 1169 |
pub tcpi_tfo_cookie_wrong: u32, |
| 1170 |
pub tcpi_tfo_no_cookie_rcv: u32, |
| 1171 |
pub tcpi_tfo_heuristics_disable: u32, |
| 1172 |
pub tcpi_tfo_send_blackhole: u32, |
| 1173 |
pub tcpi_tfo_recv_blackhole: u32, |
| 1174 |
pub tcpi_tfo_onebyte_proxy: u32, |
| 1175 |
__pad2: u32, |
| 1176 |
pub tcpi_txpackets: u64, |
| 1177 |
pub tcpi_txbytes: u64, |
| 1178 |
pub tcpi_txretransmitbytes: u64, |
| 1179 |
pub tcpi_rxpackets: u64, |
| 1180 |
pub tcpi_rxbytes: u64, |
| 1181 |
pub tcpi_rxoutoforderbytes: u64, |
| 1182 |
pub tcpi_rxretransmitpackets: u64, |
| 1183 |
} |
| 1184 |
} |
| 1185 |
|
| 1186 |
s_no_extra_traits! { |
| 1187 |
#[cfg_attr(libc_packedN, repr(packed(4)))] |
| 1188 |
pub struct kevent { |
| 1189 |
pub ident: ::uintptr_t, |
| 1190 |
pub filter: i16, |
| 1191 |
pub flags: u16, |
| 1192 |
pub fflags: u32, |
| 1193 |
pub data: ::intptr_t, |
| 1194 |
pub udata: *mut ::c_void, |
| 1195 |
} |
| 1196 |
|
| 1197 |
#[cfg_attr(libc_packedN, repr(packed(4)))] |
| 1198 |
pub struct semid_ds { |
| 1199 |
// Note the manpage shows different types than the system header. |
| 1200 |
pub sem_perm: ipc_perm, |
| 1201 |
pub sem_base: i32, |
| 1202 |
pub sem_nsems: ::c_ushort, |
| 1203 |
pub sem_otime: ::time_t, |
| 1204 |
pub sem_pad1: i32, |
| 1205 |
pub sem_ctime: ::time_t, |
| 1206 |
pub sem_pad2: i32, |
| 1207 |
pub sem_pad3: [i32; 4], |
| 1208 |
} |
| 1209 |
|
| 1210 |
#[cfg_attr(libc_packedN, repr(packed(4)))] |
| 1211 |
pub struct shmid_ds { |
| 1212 |
pub shm_perm: ipc_perm, |
| 1213 |
pub shm_segsz: ::size_t, |
| 1214 |
pub shm_lpid: ::pid_t, |
| 1215 |
pub shm_cpid: ::pid_t, |
| 1216 |
pub shm_nattch: ::shmatt_t, |
| 1217 |
pub shm_atime: ::time_t, // FIXME: 64-bit wrong align => wrong offset |
| 1218 |
pub shm_dtime: ::time_t, // FIXME: 64-bit wrong align => wrong offset |
| 1219 |
pub shm_ctime: ::time_t, // FIXME: 64-bit wrong align => wrong offset |
| 1220 |
// FIXME: 64-bit wrong align => wrong offset: |
| 1221 |
pub shm_internal: *mut ::c_void, |
| 1222 |
} |
| 1223 |
|
| 1224 |
pub struct proc_threadinfo { |
| 1225 |
pub pth_user_time: u64, |
| 1226 |
pub pth_system_time: u64, |
| 1227 |
pub pth_cpu_usage: i32, |
| 1228 |
pub pth_policy: i32, |
| 1229 |
pub pth_run_state: i32, |
| 1230 |
pub pth_flags: i32, |
| 1231 |
pub pth_sleep_time: i32, |
| 1232 |
pub pth_curpri: i32, |
| 1233 |
pub pth_priority: i32, |
| 1234 |
pub pth_maxpriority: i32, |
| 1235 |
pub pth_name: [::c_char; MAXTHREADNAMESIZE], |
| 1236 |
} |
| 1237 |
|
| 1238 |
pub struct statfs { |
| 1239 |
pub f_bsize: u32, |
| 1240 |
pub f_iosize: i32, |
| 1241 |
pub f_blocks: u64, |
| 1242 |
pub f_bfree: u64, |
| 1243 |
pub f_bavail: u64, |
| 1244 |
pub f_files: u64, |
| 1245 |
pub f_ffree: u64, |
| 1246 |
pub f_fsid: ::fsid_t, |
| 1247 |
pub f_owner: ::uid_t, |
| 1248 |
pub f_type: u32, |
| 1249 |
pub f_flags: u32, |
| 1250 |
pub f_fssubtype: u32, |
| 1251 |
pub f_fstypename: [::c_char; 16], |
| 1252 |
pub f_mntonname: [::c_char; 1024], |
| 1253 |
pub f_mntfromname: [::c_char; 1024], |
| 1254 |
pub f_flags_ext: u32, |
| 1255 |
pub f_reserved: [u32; 7], |
| 1256 |
} |
| 1257 |
|
| 1258 |
pub struct dirent { |
| 1259 |
pub d_ino: u64, |
| 1260 |
pub d_seekoff: u64, |
| 1261 |
pub d_reclen: u16, |
| 1262 |
pub d_namlen: u16, |
| 1263 |
pub d_type: u8, |
| 1264 |
pub d_name: [::c_char; 1024], |
| 1265 |
} |
| 1266 |
|
| 1267 |
pub struct pthread_rwlock_t { |
| 1268 |
__sig: ::c_long, |
| 1269 |
__opaque: [u8; __PTHREAD_RWLOCK_SIZE__], |
| 1270 |
} |
| 1271 |
|
| 1272 |
pub struct pthread_mutex_t { |
| 1273 |
__sig: ::c_long, |
| 1274 |
__opaque: [u8; __PTHREAD_MUTEX_SIZE__], |
| 1275 |
} |
| 1276 |
|
| 1277 |
pub struct pthread_cond_t { |
| 1278 |
__sig: ::c_long, |
| 1279 |
__opaque: [u8; __PTHREAD_COND_SIZE__], |
| 1280 |
} |
| 1281 |
|
| 1282 |
pub struct sockaddr_storage { |
| 1283 |
pub ss_len: u8, |
| 1284 |
pub ss_family: ::sa_family_t, |
| 1285 |
__ss_pad1: [u8; 6], |
| 1286 |
__ss_align: i64, |
| 1287 |
__ss_pad2: [u8; 112], |
| 1288 |
} |
| 1289 |
|
| 1290 |
pub struct utmpx { |
| 1291 |
pub ut_user: [::c_char; _UTX_USERSIZE], |
| 1292 |
pub ut_id: [::c_char; _UTX_IDSIZE], |
| 1293 |
pub ut_line: [::c_char; _UTX_LINESIZE], |
| 1294 |
pub ut_pid: ::pid_t, |
| 1295 |
pub ut_type: ::c_short, |
| 1296 |
pub ut_tv: ::timeval, |
| 1297 |
pub ut_host: [::c_char; _UTX_HOSTSIZE], |
| 1298 |
ut_pad: [u32; 16], |
| 1299 |
} |
| 1300 |
|
| 1301 |
pub struct sigevent { |
| 1302 |
pub sigev_notify: ::c_int, |
| 1303 |
pub sigev_signo: ::c_int, |
| 1304 |
pub sigev_value: ::sigval, |
| 1305 |
__unused1: *mut ::c_void, //actually a function pointer |
| 1306 |
pub sigev_notify_attributes: *mut ::pthread_attr_t |
| 1307 |
} |
| 1308 |
|
| 1309 |
pub struct processor_cpu_load_info { |
| 1310 |
pub cpu_ticks: [::c_uint; CPU_STATE_MAX as usize], |
| 1311 |
} |
| 1312 |
|
| 1313 |
pub struct processor_basic_info { |
| 1314 |
pub cpu_type: cpu_type_t, |
| 1315 |
pub cpu_subtype: cpu_subtype_t, |
| 1316 |
pub running: ::boolean_t, |
| 1317 |
pub slot_num: ::c_int, |
| 1318 |
pub is_master: ::boolean_t, |
| 1319 |
} |
| 1320 |
|
| 1321 |
pub struct processor_set_basic_info { |
| 1322 |
pub processor_count: ::c_int, |
| 1323 |
pub default_policy: ::c_int, |
| 1324 |
} |
| 1325 |
|
| 1326 |
pub struct processor_set_load_info { |
| 1327 |
pub task_count: ::c_int, |
| 1328 |
pub thread_count: ::c_int, |
| 1329 |
pub load_average: integer_t, |
| 1330 |
pub mach_factor: integer_t, |
| 1331 |
} |
| 1332 |
|
| 1333 |
pub struct time_value_t { |
| 1334 |
pub seconds: integer_t, |
| 1335 |
pub microseconds: integer_t, |
| 1336 |
} |
| 1337 |
|
| 1338 |
pub struct thread_basic_info { |
| 1339 |
pub user_time: time_value_t, |
| 1340 |
pub system_time: time_value_t, |
| 1341 |
pub cpu_usage: ::integer_t, |
| 1342 |
pub policy: ::policy_t, |
| 1343 |
pub run_state: ::integer_t, |
| 1344 |
pub flags: ::integer_t, |
| 1345 |
pub suspend_count: ::integer_t, |
| 1346 |
pub sleep_time: ::integer_t, |
| 1347 |
} |
| 1348 |
|
| 1349 |
pub struct thread_identifier_info { |
| 1350 |
pub thread_id: u64, |
| 1351 |
pub thread_handle: u64, |
| 1352 |
pub dispatch_qaddr: u64, |
| 1353 |
} |
| 1354 |
|
| 1355 |
pub struct thread_extended_info { |
| 1356 |
pub pth_user_time: u64, |
| 1357 |
pub pth_system_time: u64, |
| 1358 |
pub pth_cpu_usage: i32, |
| 1359 |
pub pth_policy: i32, |
| 1360 |
pub pth_run_state: i32, |
| 1361 |
pub pth_flags: i32, |
| 1362 |
pub pth_sleep_time: i32, |
| 1363 |
pub pth_curpri: i32, |
| 1364 |
pub pth_priority: i32, |
| 1365 |
pub pth_maxpriority: i32, |
| 1366 |
pub pth_name: [::c_char; MAXTHREADNAMESIZE], |
| 1367 |
} |
| 1368 |
|
| 1369 |
#[cfg_attr(libc_packedN, repr(packed(4)))] |
| 1370 |
pub struct if_data64 { |
| 1371 |
pub ifi_type: ::c_uchar, |
| 1372 |
pub ifi_typelen: ::c_uchar, |
| 1373 |
pub ifi_physical: ::c_uchar, |
| 1374 |
pub ifi_addrlen: ::c_uchar, |
| 1375 |
pub ifi_hdrlen: ::c_uchar, |
| 1376 |
pub ifi_recvquota: ::c_uchar, |
| 1377 |
pub ifi_xmitquota: ::c_uchar, |
| 1378 |
pub ifi_unused1: ::c_uchar, |
| 1379 |
pub ifi_mtu: u32, |
| 1380 |
pub ifi_metric: u32, |
| 1381 |
pub ifi_baudrate: u64, |
| 1382 |
pub ifi_ipackets: u64, |
| 1383 |
pub ifi_ierrors: u64, |
| 1384 |
pub ifi_opackets: u64, |
| 1385 |
pub ifi_oerrors: u64, |
| 1386 |
pub ifi_collisions: u64, |
| 1387 |
pub ifi_ibytes: u64, |
| 1388 |
pub ifi_obytes: u64, |
| 1389 |
pub ifi_imcasts: u64, |
| 1390 |
pub ifi_omcasts: u64, |
| 1391 |
pub ifi_iqdrops: u64, |
| 1392 |
pub ifi_noproto: u64, |
| 1393 |
pub ifi_recvtiming: u32, |
| 1394 |
pub ifi_xmittiming: u32, |
| 1395 |
#[cfg(target_pointer_width = "32")] |
| 1396 |
pub ifi_lastchange: ::timeval, |
| 1397 |
#[cfg(not(target_pointer_width = "32"))] |
| 1398 |
pub ifi_lastchange: timeval32, |
| 1399 |
} |
| 1400 |
|
| 1401 |
#[cfg_attr(libc_packedN, repr(packed(4)))] |
| 1402 |
pub struct if_msghdr2 { |
| 1403 |
pub ifm_msglen: ::c_ushort, |
| 1404 |
pub ifm_version: ::c_uchar, |
| 1405 |
pub ifm_type: ::c_uchar, |
| 1406 |
pub ifm_addrs: ::c_int, |
| 1407 |
pub ifm_flags: ::c_int, |
| 1408 |
pub ifm_index: ::c_ushort, |
| 1409 |
pub ifm_snd_len: ::c_int, |
| 1410 |
pub ifm_snd_maxlen: ::c_int, |
| 1411 |
pub ifm_snd_drops: ::c_int, |
| 1412 |
pub ifm_timer: ::c_int, |
| 1413 |
pub ifm_data: if_data64, |
| 1414 |
} |
| 1415 |
|
| 1416 |
#[cfg_attr(libc_packedN, repr(packed(8)))] |
| 1417 |
pub struct vm_statistics64 { |
| 1418 |
pub free_count: natural_t, |
| 1419 |
pub active_count: natural_t, |
| 1420 |
pub inactive_count: natural_t, |
| 1421 |
pub wire_count: natural_t, |
| 1422 |
pub zero_fill_count: u64, |
| 1423 |
pub reactivations: u64, |
| 1424 |
pub pageins: u64, |
| 1425 |
pub pageouts: u64, |
| 1426 |
pub faults: u64, |
| 1427 |
pub cow_faults: u64, |
| 1428 |
pub lookups: u64, |
| 1429 |
pub hits: u64, |
| 1430 |
pub purges: u64, |
| 1431 |
pub purgeable_count: natural_t, |
| 1432 |
pub speculative_count: natural_t, |
| 1433 |
pub decompressions: u64, |
| 1434 |
pub compressions: u64, |
| 1435 |
pub swapins: u64, |
| 1436 |
pub swapouts: u64, |
| 1437 |
pub compressor_page_count: natural_t, |
| 1438 |
pub throttled_count: natural_t, |
| 1439 |
pub external_page_count: natural_t, |
| 1440 |
pub internal_page_count: natural_t, |
| 1441 |
pub total_uncompressed_pages_in_compressor: u64, |
| 1442 |
} |
| 1443 |
|
| 1444 |
#[cfg_attr(libc_packedN, repr(packed(4)))] |
| 1445 |
pub struct mach_task_basic_info { |
| 1446 |
pub virtual_size: mach_vm_size_t, |
| 1447 |
pub resident_size: mach_vm_size_t, |
| 1448 |
pub resident_size_max: mach_vm_size_t, |
| 1449 |
pub user_time: time_value_t, |
| 1450 |
pub system_time: time_value_t, |
| 1451 |
pub policy: ::policy_t, |
| 1452 |
pub suspend_count: integer_t, |
| 1453 |
} |
| 1454 |
|
| 1455 |
#[cfg_attr(libc_packedN, repr(packed(4)))] |
| 1456 |
pub struct log2phys { |
| 1457 |
pub l2p_flags: ::c_uint, |
| 1458 |
pub l2p_contigbytes: ::off_t, |
| 1459 |
pub l2p_devoffset: ::off_t, |
| 1460 |
} |
| 1461 |
|
| 1462 |
pub struct os_unfair_lock_s { |
| 1463 |
_os_unfair_lock_opaque: u32, |
| 1464 |
} |
| 1465 |
|
| 1466 |
#[cfg_attr(libc_packedN, repr(packed(1)))] |
| 1467 |
pub struct sockaddr_vm { |
| 1468 |
pub svm_len: ::c_uchar, |
| 1469 |
pub svm_family: ::sa_family_t, |
| 1470 |
pub svm_reserved1: ::c_ushort, |
| 1471 |
pub svm_port: ::c_uint, |
| 1472 |
pub svm_cid: ::c_uint, |
| 1473 |
} |
| 1474 |
|
| 1475 |
pub struct ifdevmtu { |
| 1476 |
pub ifdm_current: ::c_int, |
| 1477 |
pub ifdm_min: ::c_int, |
| 1478 |
pub ifdm_max: ::c_int, |
| 1479 |
} |
| 1480 |
|
| 1481 |
#[cfg(libc_union)] |
| 1482 |
pub union __c_anonymous_ifk_data { |
| 1483 |
pub ifk_ptr: *mut ::c_void, |
| 1484 |
pub ifk_value: ::c_int, |
| 1485 |
} |
| 1486 |
|
| 1487 |
#[cfg_attr(libc_packedN, repr(packed(4)))] |
| 1488 |
pub struct ifkpi { |
| 1489 |
pub ifk_module_id: ::c_uint, |
| 1490 |
pub ifk_type: ::c_uint, |
| 1491 |
#[cfg(libc_union)] |
| 1492 |
pub ifk_data: __c_anonymous_ifk_data, |
| 1493 |
} |
| 1494 |
|
| 1495 |
#[cfg(libc_union)] |
| 1496 |
pub union __c_anonymous_ifr_ifru { |
| 1497 |
pub ifru_addr: ::sockaddr, |
| 1498 |
pub ifru_dstaddr: ::sockaddr, |
| 1499 |
pub ifru_broadaddr: ::sockaddr, |
| 1500 |
pub ifru_flags: ::c_short, |
| 1501 |
pub ifru_metrics: ::c_int, |
| 1502 |
pub ifru_mtu: ::c_int, |
| 1503 |
pub ifru_phys: ::c_int, |
| 1504 |
pub ifru_media: ::c_int, |
| 1505 |
pub ifru_intval: ::c_int, |
| 1506 |
pub ifru_data: *mut ::c_char, |
| 1507 |
pub ifru_devmtu: ifdevmtu, |
| 1508 |
pub ifru_kpi: ifkpi, |
| 1509 |
pub ifru_wake_flags: u32, |
| 1510 |
pub ifru_route_refcnt: u32, |
| 1511 |
pub ifru_cap: [::c_int; 2], |
| 1512 |
pub ifru_functional_type: u32, |
| 1513 |
} |
| 1514 |
|
| 1515 |
pub struct ifreq { |
| 1516 |
pub ifr_name: [::c_char; ::IFNAMSIZ], |
| 1517 |
#[cfg(libc_union)] |
| 1518 |
pub ifr_ifru: __c_anonymous_ifr_ifru, |
| 1519 |
#[cfg(not(libc_union))] |
| 1520 |
pub ifr_ifru: ::sockaddr, |
| 1521 |
} |
| 1522 |
|
| 1523 |
#[cfg(libc_union)] |
| 1524 |
pub union __c_anonymous_ifc_ifcu { |
| 1525 |
pub ifcu_buf: *mut ::c_char, |
| 1526 |
pub ifcu_req: *mut ifreq, |
| 1527 |
} |
| 1528 |
} |
| 1529 |
|
| 1530 |
impl siginfo_t { |
| 1531 |
pub unsafe fn si_addr(&self) -> *mut ::c_void { |
| 1532 |
self.si_addr |
| 1533 |
} |
| 1534 |
|
| 1535 |
pub unsafe fn si_value(&self) -> ::sigval { |
| 1536 |
#[repr(C)] |
| 1537 |
struct siginfo_timer { |
| 1538 |
_si_signo: ::c_int, |
| 1539 |
_si_errno: ::c_int, |
| 1540 |
_si_code: ::c_int, |
| 1541 |
_si_pid: ::pid_t, |
| 1542 |
_si_uid: ::uid_t, |
| 1543 |
_si_status: ::c_int, |
| 1544 |
_si_addr: *mut ::c_void, |
| 1545 |
si_value: ::sigval, |
| 1546 |
} |
| 1547 |
|
| 1548 |
(*(self as *const siginfo_t as *const siginfo_timer)).si_value |
| 1549 |
} |
| 1550 |
|
| 1551 |
pub unsafe fn si_pid(&self) -> ::pid_t { |
| 1552 |
self.si_pid |
| 1553 |
} |
| 1554 |
|
| 1555 |
pub unsafe fn si_uid(&self) -> ::uid_t { |
| 1556 |
self.si_uid |
| 1557 |
} |
| 1558 |
|
| 1559 |
pub unsafe fn si_status(&self) -> ::c_int { |
| 1560 |
self.si_status |
| 1561 |
} |
| 1562 |
} |
| 1563 |
|
| 1564 |
cfg_if! { |
| 1565 |
if #[cfg(libc_union)] { |
| 1566 |
s_no_extra_traits! { |
| 1567 |
pub union semun { |
| 1568 |
pub val: ::c_int, |
| 1569 |
pub buf: *mut semid_ds, |
| 1570 |
pub array: *mut ::c_ushort, |
| 1571 |
} |
| 1572 |
} |
| 1573 |
|
| 1574 |
cfg_if! { |
| 1575 |
if #[cfg(feature = "extra_traits")] { |
| 1576 |
impl PartialEq for semun { |
| 1577 |
fn eq(&self, other: &semun) -> bool { |
| 1578 |
unsafe { self.val == other.val } |
| 1579 |
} |
| 1580 |
} |
| 1581 |
impl Eq for semun {} |
| 1582 |
impl ::fmt::Debug for semun { |
| 1583 |
fn fmt(&self, f: &mut ::fmt::Formatter) |
| 1584 |
-> ::fmt::Result { |
| 1585 |
f.debug_struct("semun") |
| 1586 |
.field("val", unsafe { &self.val }) |
| 1587 |
.finish() |
| 1588 |
} |
| 1589 |
} |
| 1590 |
impl ::hash::Hash for semun { |
| 1591 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 1592 |
unsafe { self.val.hash(state) }; |
| 1593 |
} |
| 1594 |
} |
| 1595 |
} |
| 1596 |
} |
| 1597 |
} |
| 1598 |
} |
| 1599 |
|
| 1600 |
cfg_if! { |
| 1601 |
if #[cfg(feature = "extra_traits")] { |
| 1602 |
impl PartialEq for kevent { |
| 1603 |
fn eq(&self, other: &kevent) -> bool { |
| 1604 |
self.ident == other.ident |
| 1605 |
&& self.filter == other.filter |
| 1606 |
&& self.flags == other.flags |
| 1607 |
&& self.fflags == other.fflags |
| 1608 |
&& self.data == other.data |
| 1609 |
&& self.udata == other.udata |
| 1610 |
} |
| 1611 |
} |
| 1612 |
impl Eq for kevent {} |
| 1613 |
impl ::fmt::Debug for kevent { |
| 1614 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 1615 |
let ident = self.ident; |
| 1616 |
let filter = self.filter; |
| 1617 |
let flags = self.flags; |
| 1618 |
let fflags = self.fflags; |
| 1619 |
let data = self.data; |
| 1620 |
let udata = self.udata; |
| 1621 |
f.debug_struct("kevent") |
| 1622 |
.field("ident", &ident) |
| 1623 |
.field("filter", &filter) |
| 1624 |
.field("flags", &flags) |
| 1625 |
.field("fflags", &fflags) |
| 1626 |
.field("data", &data) |
| 1627 |
.field("udata", &udata) |
| 1628 |
.finish() |
| 1629 |
} |
| 1630 |
} |
| 1631 |
impl ::hash::Hash for kevent { |
| 1632 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 1633 |
let ident = self.ident; |
| 1634 |
let filter = self.filter; |
| 1635 |
let flags = self.flags; |
| 1636 |
let fflags = self.fflags; |
| 1637 |
let data = self.data; |
| 1638 |
let udata = self.udata; |
| 1639 |
ident.hash(state); |
| 1640 |
filter.hash(state); |
| 1641 |
flags.hash(state); |
| 1642 |
fflags.hash(state); |
| 1643 |
data.hash(state); |
| 1644 |
udata.hash(state); |
| 1645 |
} |
| 1646 |
} |
| 1647 |
|
| 1648 |
impl PartialEq for semid_ds { |
| 1649 |
fn eq(&self, other: &semid_ds) -> bool { |
| 1650 |
let sem_perm = self.sem_perm; |
| 1651 |
let sem_pad3 = self.sem_pad3; |
| 1652 |
let other_sem_perm = other.sem_perm; |
| 1653 |
let other_sem_pad3 = other.sem_pad3; |
| 1654 |
sem_perm == other_sem_perm |
| 1655 |
&& self.sem_base == other.sem_base |
| 1656 |
&& self.sem_nsems == other.sem_nsems |
| 1657 |
&& self.sem_otime == other.sem_otime |
| 1658 |
&& self.sem_pad1 == other.sem_pad1 |
| 1659 |
&& self.sem_ctime == other.sem_ctime |
| 1660 |
&& self.sem_pad2 == other.sem_pad2 |
| 1661 |
&& sem_pad3 == other_sem_pad3 |
| 1662 |
} |
| 1663 |
} |
| 1664 |
impl Eq for semid_ds {} |
| 1665 |
impl ::fmt::Debug for semid_ds { |
| 1666 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 1667 |
let sem_perm = self.sem_perm; |
| 1668 |
let sem_base = self.sem_base; |
| 1669 |
let sem_nsems = self.sem_nsems; |
| 1670 |
let sem_otime = self.sem_otime; |
| 1671 |
let sem_pad1 = self.sem_pad1; |
| 1672 |
let sem_ctime = self.sem_ctime; |
| 1673 |
let sem_pad2 = self.sem_pad2; |
| 1674 |
let sem_pad3 = self.sem_pad3; |
| 1675 |
f.debug_struct("semid_ds") |
| 1676 |
.field("sem_perm", &sem_perm) |
| 1677 |
.field("sem_base", &sem_base) |
| 1678 |
.field("sem_nsems", &sem_nsems) |
| 1679 |
.field("sem_otime", &sem_otime) |
| 1680 |
.field("sem_pad1", &sem_pad1) |
| 1681 |
.field("sem_ctime", &sem_ctime) |
| 1682 |
.field("sem_pad2", &sem_pad2) |
| 1683 |
.field("sem_pad3", &sem_pad3) |
| 1684 |
.finish() |
| 1685 |
} |
| 1686 |
} |
| 1687 |
impl ::hash::Hash for semid_ds { |
| 1688 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 1689 |
let sem_perm = self.sem_perm; |
| 1690 |
let sem_base = self.sem_base; |
| 1691 |
let sem_nsems = self.sem_nsems; |
| 1692 |
let sem_otime = self.sem_otime; |
| 1693 |
let sem_pad1 = self.sem_pad1; |
| 1694 |
let sem_ctime = self.sem_ctime; |
| 1695 |
let sem_pad2 = self.sem_pad2; |
| 1696 |
let sem_pad3 = self.sem_pad3; |
| 1697 |
sem_perm.hash(state); |
| 1698 |
sem_base.hash(state); |
| 1699 |
sem_nsems.hash(state); |
| 1700 |
sem_otime.hash(state); |
| 1701 |
sem_pad1.hash(state); |
| 1702 |
sem_ctime.hash(state); |
| 1703 |
sem_pad2.hash(state); |
| 1704 |
sem_pad3.hash(state); |
| 1705 |
} |
| 1706 |
} |
| 1707 |
|
| 1708 |
impl PartialEq for shmid_ds { |
| 1709 |
fn eq(&self, other: &shmid_ds) -> bool { |
| 1710 |
let shm_perm = self.shm_perm; |
| 1711 |
let other_shm_perm = other.shm_perm; |
| 1712 |
shm_perm == other_shm_perm |
| 1713 |
&& self.shm_segsz == other.shm_segsz |
| 1714 |
&& self.shm_lpid == other.shm_lpid |
| 1715 |
&& self.shm_cpid == other.shm_cpid |
| 1716 |
&& self.shm_nattch == other.shm_nattch |
| 1717 |
&& self.shm_atime == other.shm_atime |
| 1718 |
&& self.shm_dtime == other.shm_dtime |
| 1719 |
&& self.shm_ctime == other.shm_ctime |
| 1720 |
&& self.shm_internal == other.shm_internal |
| 1721 |
} |
| 1722 |
} |
| 1723 |
impl Eq for shmid_ds {} |
| 1724 |
impl ::fmt::Debug for shmid_ds { |
| 1725 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 1726 |
let shm_perm = self.shm_perm; |
| 1727 |
let shm_segsz = self.shm_segsz; |
| 1728 |
let shm_lpid = self.shm_lpid; |
| 1729 |
let shm_cpid = self.shm_cpid; |
| 1730 |
let shm_nattch = self.shm_nattch; |
| 1731 |
let shm_atime = self.shm_atime; |
| 1732 |
let shm_dtime = self.shm_dtime; |
| 1733 |
let shm_ctime = self.shm_ctime; |
| 1734 |
let shm_internal = self.shm_internal; |
| 1735 |
f.debug_struct("shmid_ds") |
| 1736 |
.field("shm_perm", &shm_perm) |
| 1737 |
.field("shm_segsz", &shm_segsz) |
| 1738 |
.field("shm_lpid", &shm_lpid) |
| 1739 |
.field("shm_cpid", &shm_cpid) |
| 1740 |
.field("shm_nattch", &shm_nattch) |
| 1741 |
.field("shm_atime", &shm_atime) |
| 1742 |
.field("shm_dtime", &shm_dtime) |
| 1743 |
.field("shm_ctime", &shm_ctime) |
| 1744 |
.field("shm_internal", &shm_internal) |
| 1745 |
.finish() |
| 1746 |
} |
| 1747 |
} |
| 1748 |
impl ::hash::Hash for shmid_ds { |
| 1749 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 1750 |
let shm_perm = self.shm_perm; |
| 1751 |
let shm_segsz = self.shm_segsz; |
| 1752 |
let shm_lpid = self.shm_lpid; |
| 1753 |
let shm_cpid = self.shm_cpid; |
| 1754 |
let shm_nattch = self.shm_nattch; |
| 1755 |
let shm_atime = self.shm_atime; |
| 1756 |
let shm_dtime = self.shm_dtime; |
| 1757 |
let shm_ctime = self.shm_ctime; |
| 1758 |
let shm_internal = self.shm_internal; |
| 1759 |
shm_perm.hash(state); |
| 1760 |
shm_segsz.hash(state); |
| 1761 |
shm_lpid.hash(state); |
| 1762 |
shm_cpid.hash(state); |
| 1763 |
shm_nattch.hash(state); |
| 1764 |
shm_atime.hash(state); |
| 1765 |
shm_dtime.hash(state); |
| 1766 |
shm_ctime.hash(state); |
| 1767 |
shm_internal.hash(state); |
| 1768 |
} |
| 1769 |
} |
| 1770 |
|
| 1771 |
impl PartialEq for proc_threadinfo { |
| 1772 |
fn eq(&self, other: &proc_threadinfo) -> bool { |
| 1773 |
self.pth_user_time == other.pth_user_time |
| 1774 |
&& self.pth_system_time == other.pth_system_time |
| 1775 |
&& self.pth_cpu_usage == other.pth_cpu_usage |
| 1776 |
&& self.pth_policy == other.pth_policy |
| 1777 |
&& self.pth_run_state == other.pth_run_state |
| 1778 |
&& self.pth_flags == other.pth_flags |
| 1779 |
&& self.pth_sleep_time == other.pth_sleep_time |
| 1780 |
&& self.pth_curpri == other.pth_curpri |
| 1781 |
&& self.pth_priority == other.pth_priority |
| 1782 |
&& self.pth_maxpriority == other.pth_maxpriority |
| 1783 |
&& self.pth_name |
| 1784 |
.iter() |
| 1785 |
.zip(other.pth_name.iter()) |
| 1786 |
.all(|(a,b)| a == b) |
| 1787 |
} |
| 1788 |
} |
| 1789 |
impl Eq for proc_threadinfo {} |
| 1790 |
impl ::fmt::Debug for proc_threadinfo { |
| 1791 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 1792 |
f.debug_struct("proc_threadinfo") |
| 1793 |
.field("pth_user_time", &self.pth_user_time) |
| 1794 |
.field("pth_system_time", &self.pth_system_time) |
| 1795 |
.field("pth_cpu_usage", &self.pth_cpu_usage) |
| 1796 |
.field("pth_policy", &self.pth_policy) |
| 1797 |
.field("pth_run_state", &self.pth_run_state) |
| 1798 |
.field("pth_flags", &self.pth_flags) |
| 1799 |
.field("pth_sleep_time", &self.pth_sleep_time) |
| 1800 |
.field("pth_curpri", &self.pth_curpri) |
| 1801 |
.field("pth_priority", &self.pth_priority) |
| 1802 |
.field("pth_maxpriority", &self.pth_maxpriority) |
| 1803 |
// FIXME: .field("pth_name", &self.pth_name) |
| 1804 |
.finish() |
| 1805 |
} |
| 1806 |
} |
| 1807 |
impl ::hash::Hash for proc_threadinfo { |
| 1808 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 1809 |
self.pth_user_time.hash(state); |
| 1810 |
self.pth_system_time.hash(state); |
| 1811 |
self.pth_cpu_usage.hash(state); |
| 1812 |
self.pth_policy.hash(state); |
| 1813 |
self.pth_run_state.hash(state); |
| 1814 |
self.pth_flags.hash(state); |
| 1815 |
self.pth_sleep_time.hash(state); |
| 1816 |
self.pth_curpri.hash(state); |
| 1817 |
self.pth_priority.hash(state); |
| 1818 |
self.pth_maxpriority.hash(state); |
| 1819 |
self.pth_name.hash(state); |
| 1820 |
} |
| 1821 |
} |
| 1822 |
|
| 1823 |
impl PartialEq for statfs { |
| 1824 |
fn eq(&self, other: &statfs) -> bool { |
| 1825 |
self.f_bsize == other.f_bsize |
| 1826 |
&& self.f_iosize == other.f_iosize |
| 1827 |
&& self.f_blocks == other.f_blocks |
| 1828 |
&& self.f_bfree == other.f_bfree |
| 1829 |
&& self.f_bavail == other.f_bavail |
| 1830 |
&& self.f_files == other.f_files |
| 1831 |
&& self.f_ffree == other.f_ffree |
| 1832 |
&& self.f_fsid == other.f_fsid |
| 1833 |
&& self.f_owner == other.f_owner |
| 1834 |
&& self.f_flags == other.f_flags |
| 1835 |
&& self.f_fssubtype == other.f_fssubtype |
| 1836 |
&& self.f_fstypename == other.f_fstypename |
| 1837 |
&& self.f_type == other.f_type |
| 1838 |
&& self |
| 1839 |
.f_mntonname |
| 1840 |
.iter() |
| 1841 |
.zip(other.f_mntonname.iter()) |
| 1842 |
.all(|(a,b)| a == b) |
| 1843 |
&& self |
| 1844 |
.f_mntfromname |
| 1845 |
.iter() |
| 1846 |
.zip(other.f_mntfromname.iter()) |
| 1847 |
.all(|(a,b)| a == b) |
| 1848 |
&& self.f_reserved == other.f_reserved |
| 1849 |
} |
| 1850 |
} |
| 1851 |
|
| 1852 |
impl Eq for statfs {} |
| 1853 |
impl ::fmt::Debug for statfs { |
| 1854 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 1855 |
f.debug_struct("statfs") |
| 1856 |
.field("f_bsize", &self.f_bsize) |
| 1857 |
.field("f_iosize", &self.f_iosize) |
| 1858 |
.field("f_blocks", &self.f_blocks) |
| 1859 |
.field("f_bfree", &self.f_bfree) |
| 1860 |
.field("f_bavail", &self.f_bavail) |
| 1861 |
.field("f_files", &self.f_files) |
| 1862 |
.field("f_ffree", &self.f_ffree) |
| 1863 |
.field("f_fsid", &self.f_fsid) |
| 1864 |
.field("f_owner", &self.f_owner) |
| 1865 |
.field("f_flags", &self.f_flags) |
| 1866 |
.field("f_fssubtype", &self.f_fssubtype) |
| 1867 |
.field("f_fstypename", &self.f_fstypename) |
| 1868 |
.field("f_type", &self.f_type) |
| 1869 |
// FIXME: .field("f_mntonname", &self.f_mntonname) |
| 1870 |
// FIXME: .field("f_mntfromname", &self.f_mntfromname) |
| 1871 |
.field("f_reserved", &self.f_reserved) |
| 1872 |
.finish() |
| 1873 |
} |
| 1874 |
} |
| 1875 |
|
| 1876 |
impl ::hash::Hash for statfs { |
| 1877 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 1878 |
self.f_bsize.hash(state); |
| 1879 |
self.f_iosize.hash(state); |
| 1880 |
self.f_blocks.hash(state); |
| 1881 |
self.f_bfree.hash(state); |
| 1882 |
self.f_bavail.hash(state); |
| 1883 |
self.f_files.hash(state); |
| 1884 |
self.f_ffree.hash(state); |
| 1885 |
self.f_fsid.hash(state); |
| 1886 |
self.f_owner.hash(state); |
| 1887 |
self.f_flags.hash(state); |
| 1888 |
self.f_fssubtype.hash(state); |
| 1889 |
self.f_fstypename.hash(state); |
| 1890 |
self.f_type.hash(state); |
| 1891 |
self.f_mntonname.hash(state); |
| 1892 |
self.f_mntfromname.hash(state); |
| 1893 |
self.f_reserved.hash(state); |
| 1894 |
} |
| 1895 |
} |
| 1896 |
|
| 1897 |
impl PartialEq for dirent { |
| 1898 |
fn eq(&self, other: &dirent) -> bool { |
| 1899 |
self.d_ino == other.d_ino |
| 1900 |
&& self.d_seekoff == other.d_seekoff |
| 1901 |
&& self.d_reclen == other.d_reclen |
| 1902 |
&& self.d_namlen == other.d_namlen |
| 1903 |
&& self.d_type == other.d_type |
| 1904 |
&& self |
| 1905 |
.d_name |
| 1906 |
.iter() |
| 1907 |
.zip(other.d_name.iter()) |
| 1908 |
.all(|(a,b)| a == b) |
| 1909 |
} |
| 1910 |
} |
| 1911 |
impl Eq for dirent {} |
| 1912 |
impl ::fmt::Debug for dirent { |
| 1913 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 1914 |
f.debug_struct("dirent") |
| 1915 |
.field("d_ino", &self.d_ino) |
| 1916 |
.field("d_seekoff", &self.d_seekoff) |
| 1917 |
.field("d_reclen", &self.d_reclen) |
| 1918 |
.field("d_namlen", &self.d_namlen) |
| 1919 |
.field("d_type", &self.d_type) |
| 1920 |
// FIXME: .field("d_name", &self.d_name) |
| 1921 |
.finish() |
| 1922 |
} |
| 1923 |
} |
| 1924 |
impl ::hash::Hash for dirent { |
| 1925 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 1926 |
self.d_ino.hash(state); |
| 1927 |
self.d_seekoff.hash(state); |
| 1928 |
self.d_reclen.hash(state); |
| 1929 |
self.d_namlen.hash(state); |
| 1930 |
self.d_type.hash(state); |
| 1931 |
self.d_name.hash(state); |
| 1932 |
} |
| 1933 |
} |
| 1934 |
impl PartialEq for pthread_rwlock_t { |
| 1935 |
fn eq(&self, other: &pthread_rwlock_t) -> bool { |
| 1936 |
self.__sig == other.__sig |
| 1937 |
&& self. |
| 1938 |
__opaque |
| 1939 |
.iter() |
| 1940 |
.zip(other.__opaque.iter()) |
| 1941 |
.all(|(a,b)| a == b) |
| 1942 |
} |
| 1943 |
} |
| 1944 |
impl Eq for pthread_rwlock_t {} |
| 1945 |
impl ::fmt::Debug for pthread_rwlock_t { |
| 1946 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 1947 |
f.debug_struct("pthread_rwlock_t") |
| 1948 |
.field("__sig", &self.__sig) |
| 1949 |
// FIXME: .field("__opaque", &self.__opaque) |
| 1950 |
.finish() |
| 1951 |
} |
| 1952 |
} |
| 1953 |
impl ::hash::Hash for pthread_rwlock_t { |
| 1954 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 1955 |
self.__sig.hash(state); |
| 1956 |
self.__opaque.hash(state); |
| 1957 |
} |
| 1958 |
} |
| 1959 |
|
| 1960 |
impl PartialEq for pthread_mutex_t { |
| 1961 |
fn eq(&self, other: &pthread_mutex_t) -> bool { |
| 1962 |
self.__sig == other.__sig |
| 1963 |
&& self. |
| 1964 |
__opaque |
| 1965 |
.iter() |
| 1966 |
.zip(other.__opaque.iter()) |
| 1967 |
.all(|(a,b)| a == b) |
| 1968 |
} |
| 1969 |
} |
| 1970 |
|
| 1971 |
impl Eq for pthread_mutex_t {} |
| 1972 |
|
| 1973 |
impl ::fmt::Debug for pthread_mutex_t { |
| 1974 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 1975 |
f.debug_struct("pthread_mutex_t") |
| 1976 |
.field("__sig", &self.__sig) |
| 1977 |
// FIXME: .field("__opaque", &self.__opaque) |
| 1978 |
.finish() |
| 1979 |
} |
| 1980 |
} |
| 1981 |
|
| 1982 |
impl ::hash::Hash for pthread_mutex_t { |
| 1983 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 1984 |
self.__sig.hash(state); |
| 1985 |
self.__opaque.hash(state); |
| 1986 |
} |
| 1987 |
} |
| 1988 |
|
| 1989 |
impl PartialEq for pthread_cond_t { |
| 1990 |
fn eq(&self, other: &pthread_cond_t) -> bool { |
| 1991 |
self.__sig == other.__sig |
| 1992 |
&& self. |
| 1993 |
__opaque |
| 1994 |
.iter() |
| 1995 |
.zip(other.__opaque.iter()) |
| 1996 |
.all(|(a,b)| a == b) |
| 1997 |
} |
| 1998 |
} |
| 1999 |
|
| 2000 |
impl Eq for pthread_cond_t {} |
| 2001 |
|
| 2002 |
impl ::fmt::Debug for pthread_cond_t { |
| 2003 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2004 |
f.debug_struct("pthread_cond_t") |
| 2005 |
.field("__sig", &self.__sig) |
| 2006 |
// FIXME: .field("__opaque", &self.__opaque) |
| 2007 |
.finish() |
| 2008 |
} |
| 2009 |
} |
| 2010 |
|
| 2011 |
impl ::hash::Hash for pthread_cond_t { |
| 2012 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2013 |
self.__sig.hash(state); |
| 2014 |
self.__opaque.hash(state); |
| 2015 |
} |
| 2016 |
} |
| 2017 |
|
| 2018 |
impl PartialEq for sockaddr_storage { |
| 2019 |
fn eq(&self, other: &sockaddr_storage) -> bool { |
| 2020 |
self.ss_len == other.ss_len |
| 2021 |
&& self.ss_family == other.ss_family |
| 2022 |
&& self |
| 2023 |
.__ss_pad1 |
| 2024 |
.iter() |
| 2025 |
.zip(other.__ss_pad1.iter()) |
| 2026 |
.all(|(a, b)| a == b) |
| 2027 |
&& self.__ss_align == other.__ss_align |
| 2028 |
&& self |
| 2029 |
.__ss_pad2 |
| 2030 |
.iter() |
| 2031 |
.zip(other.__ss_pad2.iter()) |
| 2032 |
.all(|(a, b)| a == b) |
| 2033 |
} |
| 2034 |
} |
| 2035 |
|
| 2036 |
impl Eq for sockaddr_storage {} |
| 2037 |
|
| 2038 |
impl ::fmt::Debug for sockaddr_storage { |
| 2039 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2040 |
f.debug_struct("sockaddr_storage") |
| 2041 |
.field("ss_len", &self.ss_len) |
| 2042 |
.field("ss_family", &self.ss_family) |
| 2043 |
.field("__ss_pad1", &self.__ss_pad1) |
| 2044 |
.field("__ss_align", &self.__ss_align) |
| 2045 |
// FIXME: .field("__ss_pad2", &self.__ss_pad2) |
| 2046 |
.finish() |
| 2047 |
} |
| 2048 |
} |
| 2049 |
|
| 2050 |
impl ::hash::Hash for sockaddr_storage { |
| 2051 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2052 |
self.ss_len.hash(state); |
| 2053 |
self.ss_family.hash(state); |
| 2054 |
self.__ss_pad1.hash(state); |
| 2055 |
self.__ss_align.hash(state); |
| 2056 |
self.__ss_pad2.hash(state); |
| 2057 |
} |
| 2058 |
} |
| 2059 |
|
| 2060 |
impl PartialEq for utmpx { |
| 2061 |
fn eq(&self, other: &utmpx) -> bool { |
| 2062 |
self.ut_user |
| 2063 |
.iter() |
| 2064 |
.zip(other.ut_user.iter()) |
| 2065 |
.all(|(a,b)| a == b) |
| 2066 |
&& self.ut_id == other.ut_id |
| 2067 |
&& self.ut_line == other.ut_line |
| 2068 |
&& self.ut_pid == other.ut_pid |
| 2069 |
&& self.ut_type == other.ut_type |
| 2070 |
&& self.ut_tv == other.ut_tv |
| 2071 |
&& self |
| 2072 |
.ut_host |
| 2073 |
.iter() |
| 2074 |
.zip(other.ut_host.iter()) |
| 2075 |
.all(|(a,b)| a == b) |
| 2076 |
&& self.ut_pad == other.ut_pad |
| 2077 |
} |
| 2078 |
} |
| 2079 |
|
| 2080 |
impl Eq for utmpx {} |
| 2081 |
|
| 2082 |
impl ::fmt::Debug for utmpx { |
| 2083 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2084 |
f.debug_struct("utmpx") |
| 2085 |
// FIXME: .field("ut_user", &self.ut_user) |
| 2086 |
.field("ut_id", &self.ut_id) |
| 2087 |
.field("ut_line", &self.ut_line) |
| 2088 |
.field("ut_pid", &self.ut_pid) |
| 2089 |
.field("ut_type", &self.ut_type) |
| 2090 |
.field("ut_tv", &self.ut_tv) |
| 2091 |
// FIXME: .field("ut_host", &self.ut_host) |
| 2092 |
.field("ut_pad", &self.ut_pad) |
| 2093 |
.finish() |
| 2094 |
} |
| 2095 |
} |
| 2096 |
|
| 2097 |
impl ::hash::Hash for utmpx { |
| 2098 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2099 |
self.ut_user.hash(state); |
| 2100 |
self.ut_id.hash(state); |
| 2101 |
self.ut_line.hash(state); |
| 2102 |
self.ut_pid.hash(state); |
| 2103 |
self.ut_type.hash(state); |
| 2104 |
self.ut_tv.hash(state); |
| 2105 |
self.ut_host.hash(state); |
| 2106 |
self.ut_pad.hash(state); |
| 2107 |
} |
| 2108 |
} |
| 2109 |
|
| 2110 |
impl PartialEq for sigevent { |
| 2111 |
fn eq(&self, other: &sigevent) -> bool { |
| 2112 |
self.sigev_notify == other.sigev_notify |
| 2113 |
&& self.sigev_signo == other.sigev_signo |
| 2114 |
&& self.sigev_value == other.sigev_value |
| 2115 |
&& self.sigev_notify_attributes |
| 2116 |
== other.sigev_notify_attributes |
| 2117 |
} |
| 2118 |
} |
| 2119 |
|
| 2120 |
impl Eq for sigevent {} |
| 2121 |
|
| 2122 |
impl ::fmt::Debug for sigevent { |
| 2123 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2124 |
f.debug_struct("sigevent") |
| 2125 |
.field("sigev_notify", &self.sigev_notify) |
| 2126 |
.field("sigev_signo", &self.sigev_signo) |
| 2127 |
.field("sigev_value", &self.sigev_value) |
| 2128 |
.field("sigev_notify_attributes", |
| 2129 |
&self.sigev_notify_attributes) |
| 2130 |
.finish() |
| 2131 |
} |
| 2132 |
} |
| 2133 |
|
| 2134 |
impl ::hash::Hash for sigevent { |
| 2135 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2136 |
self.sigev_notify.hash(state); |
| 2137 |
self.sigev_signo.hash(state); |
| 2138 |
self.sigev_value.hash(state); |
| 2139 |
self.sigev_notify_attributes.hash(state); |
| 2140 |
} |
| 2141 |
} |
| 2142 |
|
| 2143 |
impl PartialEq for processor_cpu_load_info { |
| 2144 |
fn eq(&self, other: &processor_cpu_load_info) -> bool { |
| 2145 |
self.cpu_ticks == other.cpu_ticks |
| 2146 |
} |
| 2147 |
} |
| 2148 |
impl Eq for processor_cpu_load_info {} |
| 2149 |
impl ::fmt::Debug for processor_cpu_load_info { |
| 2150 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2151 |
f.debug_struct("processor_cpu_load_info") |
| 2152 |
.field("cpu_ticks", &self.cpu_ticks) |
| 2153 |
.finish() |
| 2154 |
} |
| 2155 |
} |
| 2156 |
impl ::hash::Hash for processor_cpu_load_info { |
| 2157 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2158 |
self.cpu_ticks.hash(state); |
| 2159 |
} |
| 2160 |
} |
| 2161 |
|
| 2162 |
impl PartialEq for processor_basic_info { |
| 2163 |
fn eq(&self, other: &processor_basic_info) -> bool { |
| 2164 |
self.cpu_type == other.cpu_type |
| 2165 |
&& self.cpu_subtype == other.cpu_subtype |
| 2166 |
&& self.running == other.running |
| 2167 |
&& self.slot_num == other.slot_num |
| 2168 |
&& self.is_master == other.is_master |
| 2169 |
} |
| 2170 |
} |
| 2171 |
impl Eq for processor_basic_info {} |
| 2172 |
impl ::fmt::Debug for processor_basic_info { |
| 2173 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2174 |
f.debug_struct("processor_basic_info") |
| 2175 |
.field("cpu_type", &self.cpu_type) |
| 2176 |
.field("cpu_subtype", &self.cpu_subtype) |
| 2177 |
.field("running", &self.running) |
| 2178 |
.field("slot_num", &self.slot_num) |
| 2179 |
.field("is_master", &self.is_master) |
| 2180 |
.finish() |
| 2181 |
} |
| 2182 |
} |
| 2183 |
impl ::hash::Hash for processor_basic_info { |
| 2184 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2185 |
self.cpu_type.hash(state); |
| 2186 |
self.cpu_subtype.hash(state); |
| 2187 |
self.running.hash(state); |
| 2188 |
self.slot_num.hash(state); |
| 2189 |
self.is_master.hash(state); |
| 2190 |
} |
| 2191 |
} |
| 2192 |
|
| 2193 |
impl PartialEq for processor_set_basic_info { |
| 2194 |
fn eq(&self, other: &processor_set_basic_info) -> bool { |
| 2195 |
self.processor_count == other.processor_count |
| 2196 |
&& self.default_policy == other.default_policy |
| 2197 |
} |
| 2198 |
} |
| 2199 |
impl Eq for processor_set_basic_info {} |
| 2200 |
impl ::fmt::Debug for processor_set_basic_info { |
| 2201 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2202 |
f.debug_struct("processor_set_basic_info") |
| 2203 |
.field("processor_count", &self.processor_count) |
| 2204 |
.field("default_policy", &self.default_policy) |
| 2205 |
.finish() |
| 2206 |
} |
| 2207 |
} |
| 2208 |
impl ::hash::Hash for processor_set_basic_info { |
| 2209 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2210 |
self.processor_count.hash(state); |
| 2211 |
self.default_policy.hash(state); |
| 2212 |
} |
| 2213 |
} |
| 2214 |
|
| 2215 |
impl PartialEq for processor_set_load_info { |
| 2216 |
fn eq(&self, other: &processor_set_load_info) -> bool { |
| 2217 |
self.task_count == other.task_count |
| 2218 |
&& self.thread_count == other.thread_count |
| 2219 |
&& self.load_average == other.load_average |
| 2220 |
&& self.mach_factor == other.mach_factor |
| 2221 |
} |
| 2222 |
} |
| 2223 |
impl Eq for processor_set_load_info {} |
| 2224 |
impl ::fmt::Debug for processor_set_load_info { |
| 2225 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2226 |
f.debug_struct("processor_set_load_info") |
| 2227 |
.field("task_count", &self.task_count) |
| 2228 |
.field("thread_count", &self.thread_count) |
| 2229 |
.field("load_average", &self.load_average) |
| 2230 |
.field("mach_factor", &self.mach_factor) |
| 2231 |
.finish() |
| 2232 |
} |
| 2233 |
} |
| 2234 |
impl ::hash::Hash for processor_set_load_info { |
| 2235 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2236 |
self.task_count.hash(state); |
| 2237 |
self.thread_count.hash(state); |
| 2238 |
self.load_average.hash(state); |
| 2239 |
self.mach_factor.hash(state); |
| 2240 |
} |
| 2241 |
} |
| 2242 |
|
| 2243 |
impl PartialEq for time_value_t { |
| 2244 |
fn eq(&self, other: &time_value_t) -> bool { |
| 2245 |
self.seconds == other.seconds |
| 2246 |
&& self.microseconds == other.microseconds |
| 2247 |
} |
| 2248 |
} |
| 2249 |
impl Eq for time_value_t {} |
| 2250 |
impl ::fmt::Debug for time_value_t { |
| 2251 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2252 |
f.debug_struct("time_value_t") |
| 2253 |
.field("seconds", &self.seconds) |
| 2254 |
.field("microseconds", &self.microseconds) |
| 2255 |
.finish() |
| 2256 |
} |
| 2257 |
} |
| 2258 |
impl ::hash::Hash for time_value_t { |
| 2259 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2260 |
self.seconds.hash(state); |
| 2261 |
self.microseconds.hash(state); |
| 2262 |
} |
| 2263 |
} |
| 2264 |
impl PartialEq for thread_basic_info { |
| 2265 |
fn eq(&self, other: &thread_basic_info) -> bool { |
| 2266 |
self.user_time == other.user_time |
| 2267 |
&& self.system_time == other.system_time |
| 2268 |
&& self.cpu_usage == other.cpu_usage |
| 2269 |
&& self.policy == other.policy |
| 2270 |
&& self.run_state == other.run_state |
| 2271 |
&& self.flags == other.flags |
| 2272 |
&& self.suspend_count == other.suspend_count |
| 2273 |
&& self.sleep_time == other.sleep_time |
| 2274 |
} |
| 2275 |
} |
| 2276 |
impl Eq for thread_basic_info {} |
| 2277 |
impl ::fmt::Debug for thread_basic_info { |
| 2278 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2279 |
f.debug_struct("thread_basic_info") |
| 2280 |
.field("user_time", &self.user_time) |
| 2281 |
.field("system_time", &self.system_time) |
| 2282 |
.field("cpu_usage", &self.cpu_usage) |
| 2283 |
.field("policy", &self.policy) |
| 2284 |
.field("run_state", &self.run_state) |
| 2285 |
.field("flags", &self.flags) |
| 2286 |
.field("suspend_count", &self.suspend_count) |
| 2287 |
.field("sleep_time", &self.sleep_time) |
| 2288 |
.finish() |
| 2289 |
} |
| 2290 |
} |
| 2291 |
impl ::hash::Hash for thread_basic_info { |
| 2292 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2293 |
self.user_time.hash(state); |
| 2294 |
self.system_time.hash(state); |
| 2295 |
self.cpu_usage.hash(state); |
| 2296 |
self.policy.hash(state); |
| 2297 |
self.run_state.hash(state); |
| 2298 |
self.flags.hash(state); |
| 2299 |
self.suspend_count.hash(state); |
| 2300 |
self.sleep_time.hash(state); |
| 2301 |
} |
| 2302 |
} |
| 2303 |
impl PartialEq for thread_extended_info { |
| 2304 |
fn eq(&self, other: &thread_extended_info) -> bool { |
| 2305 |
self.pth_user_time == other.pth_user_time |
| 2306 |
&& self.pth_system_time == other.pth_system_time |
| 2307 |
&& self.pth_cpu_usage == other.pth_cpu_usage |
| 2308 |
&& self.pth_policy == other.pth_policy |
| 2309 |
&& self.pth_run_state == other.pth_run_state |
| 2310 |
&& self.pth_flags == other.pth_flags |
| 2311 |
&& self.pth_sleep_time == other.pth_sleep_time |
| 2312 |
&& self.pth_curpri == other.pth_curpri |
| 2313 |
&& self.pth_priority == other.pth_priority |
| 2314 |
&& self.pth_maxpriority == other.pth_maxpriority |
| 2315 |
&& self.pth_name |
| 2316 |
.iter() |
| 2317 |
.zip(other.pth_name.iter()) |
| 2318 |
.all(|(a,b)| a == b) |
| 2319 |
} |
| 2320 |
} |
| 2321 |
impl Eq for thread_extended_info {} |
| 2322 |
impl ::fmt::Debug for thread_extended_info { |
| 2323 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2324 |
f.debug_struct("proc_threadinfo") |
| 2325 |
.field("pth_user_time", &self.pth_user_time) |
| 2326 |
.field("pth_system_time", &self.pth_system_time) |
| 2327 |
.field("pth_cpu_usage", &self.pth_cpu_usage) |
| 2328 |
.field("pth_policy", &self.pth_policy) |
| 2329 |
.field("pth_run_state", &self.pth_run_state) |
| 2330 |
.field("pth_flags", &self.pth_flags) |
| 2331 |
.field("pth_sleep_time", &self.pth_sleep_time) |
| 2332 |
.field("pth_curpri", &self.pth_curpri) |
| 2333 |
.field("pth_priority", &self.pth_priority) |
| 2334 |
.field("pth_maxpriority", &self.pth_maxpriority) |
| 2335 |
// FIXME: .field("pth_name", &self.pth_name) |
| 2336 |
.finish() |
| 2337 |
} |
| 2338 |
} |
| 2339 |
impl ::hash::Hash for thread_extended_info { |
| 2340 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2341 |
self.pth_user_time.hash(state); |
| 2342 |
self.pth_system_time.hash(state); |
| 2343 |
self.pth_cpu_usage.hash(state); |
| 2344 |
self.pth_policy.hash(state); |
| 2345 |
self.pth_run_state.hash(state); |
| 2346 |
self.pth_flags.hash(state); |
| 2347 |
self.pth_sleep_time.hash(state); |
| 2348 |
self.pth_curpri.hash(state); |
| 2349 |
self.pth_priority.hash(state); |
| 2350 |
self.pth_maxpriority.hash(state); |
| 2351 |
self.pth_name.hash(state); |
| 2352 |
} |
| 2353 |
} |
| 2354 |
impl PartialEq for thread_identifier_info { |
| 2355 |
fn eq(&self, other: &thread_identifier_info) -> bool { |
| 2356 |
self.thread_id == other.thread_id |
| 2357 |
&& self.thread_handle == other.thread_handle |
| 2358 |
&& self.dispatch_qaddr == other.dispatch_qaddr |
| 2359 |
} |
| 2360 |
} |
| 2361 |
impl Eq for thread_identifier_info {} |
| 2362 |
impl ::fmt::Debug for thread_identifier_info { |
| 2363 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2364 |
f.debug_struct("thread_identifier_info") |
| 2365 |
.field("thread_id", &self.thread_id) |
| 2366 |
.field("thread_handle", &self.thread_handle) |
| 2367 |
.field("dispatch_qaddr", &self.dispatch_qaddr) |
| 2368 |
.finish() |
| 2369 |
} |
| 2370 |
} |
| 2371 |
impl ::hash::Hash for thread_identifier_info { |
| 2372 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2373 |
self.thread_id.hash(state); |
| 2374 |
self.thread_handle.hash(state); |
| 2375 |
self.dispatch_qaddr.hash(state); |
| 2376 |
} |
| 2377 |
} |
| 2378 |
impl PartialEq for if_data64 { |
| 2379 |
fn eq(&self, other: &if_data64) -> bool { |
| 2380 |
self.ifi_type == other.ifi_type && |
| 2381 |
self.ifi_typelen == other.ifi_typelen && |
| 2382 |
self.ifi_physical == other.ifi_physical && |
| 2383 |
self.ifi_addrlen == other.ifi_addrlen && |
| 2384 |
self.ifi_hdrlen == other.ifi_hdrlen && |
| 2385 |
self.ifi_recvquota == other.ifi_recvquota && |
| 2386 |
self.ifi_xmitquota == other.ifi_xmitquota && |
| 2387 |
self.ifi_unused1 == other.ifi_unused1 && |
| 2388 |
self.ifi_mtu == other.ifi_mtu && |
| 2389 |
self.ifi_metric == other.ifi_metric && |
| 2390 |
self.ifi_baudrate == other.ifi_baudrate && |
| 2391 |
self.ifi_ipackets == other.ifi_ipackets && |
| 2392 |
self.ifi_ierrors == other.ifi_ierrors && |
| 2393 |
self.ifi_opackets == other.ifi_opackets && |
| 2394 |
self.ifi_oerrors == other.ifi_oerrors && |
| 2395 |
self.ifi_collisions == other.ifi_collisions && |
| 2396 |
self.ifi_ibytes == other.ifi_ibytes && |
| 2397 |
self.ifi_obytes == other.ifi_obytes && |
| 2398 |
self.ifi_imcasts == other.ifi_imcasts && |
| 2399 |
self.ifi_omcasts == other.ifi_omcasts && |
| 2400 |
self.ifi_iqdrops == other.ifi_iqdrops && |
| 2401 |
self.ifi_noproto == other.ifi_noproto && |
| 2402 |
self.ifi_recvtiming == other.ifi_recvtiming && |
| 2403 |
self.ifi_xmittiming == other.ifi_xmittiming && |
| 2404 |
self.ifi_lastchange == other.ifi_lastchange |
| 2405 |
} |
| 2406 |
} |
| 2407 |
impl Eq for if_data64 {} |
| 2408 |
impl ::fmt::Debug for if_data64 { |
| 2409 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2410 |
let ifi_type = self.ifi_type; |
| 2411 |
let ifi_typelen = self.ifi_typelen; |
| 2412 |
let ifi_physical = self.ifi_physical; |
| 2413 |
let ifi_addrlen = self.ifi_addrlen; |
| 2414 |
let ifi_hdrlen = self.ifi_hdrlen; |
| 2415 |
let ifi_recvquota = self.ifi_recvquota; |
| 2416 |
let ifi_xmitquota = self.ifi_xmitquota; |
| 2417 |
let ifi_unused1 = self.ifi_unused1; |
| 2418 |
let ifi_mtu = self.ifi_mtu; |
| 2419 |
let ifi_metric = self.ifi_metric; |
| 2420 |
let ifi_baudrate = self.ifi_baudrate; |
| 2421 |
let ifi_ipackets = self.ifi_ipackets; |
| 2422 |
let ifi_ierrors = self.ifi_ierrors; |
| 2423 |
let ifi_opackets = self.ifi_opackets; |
| 2424 |
let ifi_oerrors = self.ifi_oerrors; |
| 2425 |
let ifi_collisions = self.ifi_collisions; |
| 2426 |
let ifi_ibytes = self.ifi_ibytes; |
| 2427 |
let ifi_obytes = self.ifi_obytes; |
| 2428 |
let ifi_imcasts = self.ifi_imcasts; |
| 2429 |
let ifi_omcasts = self.ifi_omcasts; |
| 2430 |
let ifi_iqdrops = self.ifi_iqdrops; |
| 2431 |
let ifi_noproto = self.ifi_noproto; |
| 2432 |
let ifi_recvtiming = self.ifi_recvtiming; |
| 2433 |
let ifi_xmittiming = self.ifi_xmittiming; |
| 2434 |
let ifi_lastchange = self.ifi_lastchange; |
| 2435 |
f.debug_struct("if_data64") |
| 2436 |
.field("ifi_type", &ifi_type) |
| 2437 |
.field("ifi_typelen", &ifi_typelen) |
| 2438 |
.field("ifi_physical", &ifi_physical) |
| 2439 |
.field("ifi_addrlen", &ifi_addrlen) |
| 2440 |
.field("ifi_hdrlen", &ifi_hdrlen) |
| 2441 |
.field("ifi_recvquota", &ifi_recvquota) |
| 2442 |
.field("ifi_xmitquota", &ifi_xmitquota) |
| 2443 |
.field("ifi_unused1", &ifi_unused1) |
| 2444 |
.field("ifi_mtu", &ifi_mtu) |
| 2445 |
.field("ifi_metric", &ifi_metric) |
| 2446 |
.field("ifi_baudrate", &ifi_baudrate) |
| 2447 |
.field("ifi_ipackets", &ifi_ipackets) |
| 2448 |
.field("ifi_ierrors", &ifi_ierrors) |
| 2449 |
.field("ifi_opackets", &ifi_opackets) |
| 2450 |
.field("ifi_oerrors", &ifi_oerrors) |
| 2451 |
.field("ifi_collisions", &ifi_collisions) |
| 2452 |
.field("ifi_ibytes", &ifi_ibytes) |
| 2453 |
.field("ifi_obytes", &ifi_obytes) |
| 2454 |
.field("ifi_imcasts", &ifi_imcasts) |
| 2455 |
.field("ifi_omcasts", &ifi_omcasts) |
| 2456 |
.field("ifi_iqdrops", &ifi_iqdrops) |
| 2457 |
.field("ifi_noproto", &ifi_noproto) |
| 2458 |
.field("ifi_recvtiming", &ifi_recvtiming) |
| 2459 |
.field("ifi_xmittiming", &ifi_xmittiming) |
| 2460 |
.field("ifi_lastchange", &ifi_lastchange) |
| 2461 |
.finish() |
| 2462 |
} |
| 2463 |
} |
| 2464 |
impl ::hash::Hash for if_data64 { |
| 2465 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2466 |
let ifi_type = self.ifi_type; |
| 2467 |
let ifi_typelen = self.ifi_typelen; |
| 2468 |
let ifi_physical = self.ifi_physical; |
| 2469 |
let ifi_addrlen = self.ifi_addrlen; |
| 2470 |
let ifi_hdrlen = self.ifi_hdrlen; |
| 2471 |
let ifi_recvquota = self.ifi_recvquota; |
| 2472 |
let ifi_xmitquota = self.ifi_xmitquota; |
| 2473 |
let ifi_unused1 = self.ifi_unused1; |
| 2474 |
let ifi_mtu = self.ifi_mtu; |
| 2475 |
let ifi_metric = self.ifi_metric; |
| 2476 |
let ifi_baudrate = self.ifi_baudrate; |
| 2477 |
let ifi_ipackets = self.ifi_ipackets; |
| 2478 |
let ifi_ierrors = self.ifi_ierrors; |
| 2479 |
let ifi_opackets = self.ifi_opackets; |
| 2480 |
let ifi_oerrors = self.ifi_oerrors; |
| 2481 |
let ifi_collisions = self.ifi_collisions; |
| 2482 |
let ifi_ibytes = self.ifi_ibytes; |
| 2483 |
let ifi_obytes = self.ifi_obytes; |
| 2484 |
let ifi_imcasts = self.ifi_imcasts; |
| 2485 |
let ifi_omcasts = self.ifi_omcasts; |
| 2486 |
let ifi_iqdrops = self.ifi_iqdrops; |
| 2487 |
let ifi_noproto = self.ifi_noproto; |
| 2488 |
let ifi_recvtiming = self.ifi_recvtiming; |
| 2489 |
let ifi_xmittiming = self.ifi_xmittiming; |
| 2490 |
let ifi_lastchange = self.ifi_lastchange; |
| 2491 |
ifi_type.hash(state); |
| 2492 |
ifi_typelen.hash(state); |
| 2493 |
ifi_physical.hash(state); |
| 2494 |
ifi_addrlen.hash(state); |
| 2495 |
ifi_hdrlen.hash(state); |
| 2496 |
ifi_recvquota.hash(state); |
| 2497 |
ifi_xmitquota.hash(state); |
| 2498 |
ifi_unused1.hash(state); |
| 2499 |
ifi_mtu.hash(state); |
| 2500 |
ifi_metric.hash(state); |
| 2501 |
ifi_baudrate.hash(state); |
| 2502 |
ifi_ipackets.hash(state); |
| 2503 |
ifi_ierrors.hash(state); |
| 2504 |
ifi_opackets.hash(state); |
| 2505 |
ifi_oerrors.hash(state); |
| 2506 |
ifi_collisions.hash(state); |
| 2507 |
ifi_ibytes.hash(state); |
| 2508 |
ifi_obytes.hash(state); |
| 2509 |
ifi_imcasts.hash(state); |
| 2510 |
ifi_omcasts.hash(state); |
| 2511 |
ifi_iqdrops.hash(state); |
| 2512 |
ifi_noproto.hash(state); |
| 2513 |
ifi_recvtiming.hash(state); |
| 2514 |
ifi_xmittiming.hash(state); |
| 2515 |
ifi_lastchange.hash(state); |
| 2516 |
} |
| 2517 |
} |
| 2518 |
impl PartialEq for if_msghdr2 { |
| 2519 |
fn eq(&self, other: &if_msghdr2) -> bool { |
| 2520 |
self.ifm_msglen == other.ifm_msglen && |
| 2521 |
self.ifm_version == other.ifm_version && |
| 2522 |
self.ifm_type == other.ifm_type && |
| 2523 |
self.ifm_addrs == other.ifm_addrs && |
| 2524 |
self.ifm_flags == other.ifm_flags && |
| 2525 |
self.ifm_index == other.ifm_index && |
| 2526 |
self.ifm_snd_len == other.ifm_snd_len && |
| 2527 |
self.ifm_snd_maxlen == other.ifm_snd_maxlen && |
| 2528 |
self.ifm_snd_drops == other.ifm_snd_drops && |
| 2529 |
self.ifm_timer == other.ifm_timer && |
| 2530 |
self.ifm_data == other.ifm_data |
| 2531 |
} |
| 2532 |
} |
| 2533 |
impl Eq for if_msghdr2 {} |
| 2534 |
impl ::fmt::Debug for if_msghdr2 { |
| 2535 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2536 |
let ifm_msglen = self.ifm_msglen; |
| 2537 |
let ifm_version = self.ifm_version; |
| 2538 |
let ifm_type = self.ifm_type; |
| 2539 |
let ifm_addrs = self.ifm_addrs; |
| 2540 |
let ifm_flags = self.ifm_flags; |
| 2541 |
let ifm_index = self.ifm_index; |
| 2542 |
let ifm_snd_len = self.ifm_snd_len; |
| 2543 |
let ifm_snd_maxlen = self.ifm_snd_maxlen; |
| 2544 |
let ifm_snd_drops = self.ifm_snd_drops; |
| 2545 |
let ifm_timer = self.ifm_timer; |
| 2546 |
let ifm_data = self.ifm_data; |
| 2547 |
f.debug_struct("if_msghdr2") |
| 2548 |
.field("ifm_msglen", &ifm_msglen) |
| 2549 |
.field("ifm_version", &ifm_version) |
| 2550 |
.field("ifm_type", &ifm_type) |
| 2551 |
.field("ifm_addrs", &ifm_addrs) |
| 2552 |
.field("ifm_flags", &ifm_flags) |
| 2553 |
.field("ifm_index", &ifm_index) |
| 2554 |
.field("ifm_snd_len", &ifm_snd_len) |
| 2555 |
.field("ifm_snd_maxlen", &ifm_snd_maxlen) |
| 2556 |
.field("ifm_snd_drops", &ifm_snd_drops) |
| 2557 |
.field("ifm_timer", &ifm_timer) |
| 2558 |
.field("ifm_data", &ifm_data) |
| 2559 |
.finish() |
| 2560 |
} |
| 2561 |
} |
| 2562 |
impl ::hash::Hash for if_msghdr2 { |
| 2563 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2564 |
let ifm_msglen = self.ifm_msglen; |
| 2565 |
let ifm_version = self.ifm_version; |
| 2566 |
let ifm_type = self.ifm_type; |
| 2567 |
let ifm_addrs = self.ifm_addrs; |
| 2568 |
let ifm_flags = self.ifm_flags; |
| 2569 |
let ifm_index = self.ifm_index; |
| 2570 |
let ifm_snd_len = self.ifm_snd_len; |
| 2571 |
let ifm_snd_maxlen = self.ifm_snd_maxlen; |
| 2572 |
let ifm_snd_drops = self.ifm_snd_drops; |
| 2573 |
let ifm_timer = self.ifm_timer; |
| 2574 |
let ifm_data = self.ifm_data; |
| 2575 |
ifm_msglen.hash(state); |
| 2576 |
ifm_version.hash(state); |
| 2577 |
ifm_type.hash(state); |
| 2578 |
ifm_addrs.hash(state); |
| 2579 |
ifm_flags.hash(state); |
| 2580 |
ifm_index.hash(state); |
| 2581 |
ifm_snd_len.hash(state); |
| 2582 |
ifm_snd_maxlen.hash(state); |
| 2583 |
ifm_snd_drops.hash(state); |
| 2584 |
ifm_timer.hash(state); |
| 2585 |
ifm_data.hash(state); |
| 2586 |
} |
| 2587 |
} |
| 2588 |
impl PartialEq for vm_statistics64 { |
| 2589 |
fn eq(&self, other: &vm_statistics64) -> bool { |
| 2590 |
// Otherwise rustfmt crashes... |
| 2591 |
let total_uncompressed = self.total_uncompressed_pages_in_compressor; |
| 2592 |
self.free_count == other.free_count && |
| 2593 |
self.active_count == other.active_count && |
| 2594 |
self.inactive_count == other.inactive_count && |
| 2595 |
self.wire_count == other.wire_count && |
| 2596 |
self.zero_fill_count == other.zero_fill_count && |
| 2597 |
self.reactivations == other.reactivations && |
| 2598 |
self.pageins == other.pageins && |
| 2599 |
self.pageouts == other.pageouts && |
| 2600 |
self.faults == other.faults && |
| 2601 |
self.cow_faults == other.cow_faults && |
| 2602 |
self.lookups == other.lookups && |
| 2603 |
self.hits == other.hits && |
| 2604 |
self.purges == other.purges && |
| 2605 |
self.purgeable_count == other.purgeable_count && |
| 2606 |
self.speculative_count == other.speculative_count && |
| 2607 |
self.decompressions == other.decompressions && |
| 2608 |
self.compressions == other.compressions && |
| 2609 |
self.swapins == other.swapins && |
| 2610 |
self.swapouts == other.swapouts && |
| 2611 |
self.compressor_page_count == other.compressor_page_count && |
| 2612 |
self.throttled_count == other.throttled_count && |
| 2613 |
self.external_page_count == other.external_page_count && |
| 2614 |
self.internal_page_count == other.internal_page_count && |
| 2615 |
total_uncompressed == other.total_uncompressed_pages_in_compressor |
| 2616 |
} |
| 2617 |
} |
| 2618 |
impl Eq for vm_statistics64 {} |
| 2619 |
impl ::fmt::Debug for vm_statistics64 { |
| 2620 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2621 |
let free_count = self.free_count; |
| 2622 |
let active_count = self.active_count; |
| 2623 |
let inactive_count = self.inactive_count; |
| 2624 |
let wire_count = self.wire_count; |
| 2625 |
let zero_fill_count = self.zero_fill_count; |
| 2626 |
let reactivations = self.reactivations; |
| 2627 |
let pageins = self.pageins; |
| 2628 |
let pageouts = self.pageouts; |
| 2629 |
let faults = self.faults; |
| 2630 |
let cow_faults = self.cow_faults; |
| 2631 |
let lookups = self.lookups; |
| 2632 |
let hits = self.hits; |
| 2633 |
let purges = self.purges; |
| 2634 |
let purgeable_count = self.purgeable_count; |
| 2635 |
let speculative_count = self.speculative_count; |
| 2636 |
let decompressions = self.decompressions; |
| 2637 |
let compressions = self.compressions; |
| 2638 |
let swapins = self.swapins; |
| 2639 |
let swapouts = self.swapouts; |
| 2640 |
let compressor_page_count = self.compressor_page_count; |
| 2641 |
let throttled_count = self.throttled_count; |
| 2642 |
let external_page_count = self.external_page_count; |
| 2643 |
let internal_page_count = self.internal_page_count; |
| 2644 |
// Otherwise rustfmt crashes... |
| 2645 |
let total_uncompressed = self.total_uncompressed_pages_in_compressor; |
| 2646 |
f.debug_struct("vm_statistics64") |
| 2647 |
.field("free_count", &free_count) |
| 2648 |
.field("active_count", &active_count) |
| 2649 |
.field("inactive_count", &inactive_count) |
| 2650 |
.field("wire_count", &wire_count) |
| 2651 |
.field("zero_fill_count", &zero_fill_count) |
| 2652 |
.field("reactivations", &reactivations) |
| 2653 |
.field("pageins", &pageins) |
| 2654 |
.field("pageouts", &pageouts) |
| 2655 |
.field("faults", &faults) |
| 2656 |
.field("cow_faults", &cow_faults) |
| 2657 |
.field("lookups", &lookups) |
| 2658 |
.field("hits", &hits) |
| 2659 |
.field("purges", &purges) |
| 2660 |
.field("purgeable_count", &purgeable_count) |
| 2661 |
.field("speculative_count", &speculative_count) |
| 2662 |
.field("decompressions", &decompressions) |
| 2663 |
.field("compressions", &compressions) |
| 2664 |
.field("swapins", &swapins) |
| 2665 |
.field("swapouts", &swapouts) |
| 2666 |
.field("compressor_page_count", &compressor_page_count) |
| 2667 |
.field("throttled_count", &throttled_count) |
| 2668 |
.field("external_page_count", &external_page_count) |
| 2669 |
.field("internal_page_count", &internal_page_count) |
| 2670 |
.field("total_uncompressed_pages_in_compressor", &total_uncompressed) |
| 2671 |
.finish() |
| 2672 |
} |
| 2673 |
} |
| 2674 |
impl ::hash::Hash for vm_statistics64 { |
| 2675 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2676 |
let free_count = self.free_count; |
| 2677 |
let active_count = self.active_count; |
| 2678 |
let inactive_count = self.inactive_count; |
| 2679 |
let wire_count = self.wire_count; |
| 2680 |
let zero_fill_count = self.zero_fill_count; |
| 2681 |
let reactivations = self.reactivations; |
| 2682 |
let pageins = self.pageins; |
| 2683 |
let pageouts = self.pageouts; |
| 2684 |
let faults = self.faults; |
| 2685 |
let cow_faults = self.cow_faults; |
| 2686 |
let lookups = self.lookups; |
| 2687 |
let hits = self.hits; |
| 2688 |
let purges = self.purges; |
| 2689 |
let purgeable_count = self.purgeable_count; |
| 2690 |
let speculative_count = self.speculative_count; |
| 2691 |
let decompressions = self.decompressions; |
| 2692 |
let compressions = self.compressions; |
| 2693 |
let swapins = self.swapins; |
| 2694 |
let swapouts = self.swapouts; |
| 2695 |
let compressor_page_count = self.compressor_page_count; |
| 2696 |
let throttled_count = self.throttled_count; |
| 2697 |
let external_page_count = self.external_page_count; |
| 2698 |
let internal_page_count = self.internal_page_count; |
| 2699 |
// Otherwise rustfmt crashes... |
| 2700 |
let total_uncompressed = self.total_uncompressed_pages_in_compressor; |
| 2701 |
free_count.hash(state); |
| 2702 |
active_count.hash(state); |
| 2703 |
inactive_count.hash(state); |
| 2704 |
wire_count.hash(state); |
| 2705 |
zero_fill_count.hash(state); |
| 2706 |
reactivations.hash(state); |
| 2707 |
pageins.hash(state); |
| 2708 |
pageouts.hash(state); |
| 2709 |
faults.hash(state); |
| 2710 |
cow_faults.hash(state); |
| 2711 |
lookups.hash(state); |
| 2712 |
hits.hash(state); |
| 2713 |
purges.hash(state); |
| 2714 |
purgeable_count.hash(state); |
| 2715 |
speculative_count.hash(state); |
| 2716 |
decompressions.hash(state); |
| 2717 |
compressions.hash(state); |
| 2718 |
swapins.hash(state); |
| 2719 |
swapouts.hash(state); |
| 2720 |
compressor_page_count.hash(state); |
| 2721 |
throttled_count.hash(state); |
| 2722 |
external_page_count.hash(state); |
| 2723 |
internal_page_count.hash(state); |
| 2724 |
total_uncompressed.hash(state); |
| 2725 |
} |
| 2726 |
} |
| 2727 |
|
| 2728 |
impl PartialEq for mach_task_basic_info { |
| 2729 |
fn eq(&self, other: &mach_task_basic_info) -> bool { |
| 2730 |
self.virtual_size == other.virtual_size |
| 2731 |
&& self.resident_size == other.resident_size |
| 2732 |
&& self.resident_size_max == other.resident_size_max |
| 2733 |
&& self.user_time == other.user_time |
| 2734 |
&& self.system_time == other.system_time |
| 2735 |
&& self.policy == other.policy |
| 2736 |
&& self.suspend_count == other.suspend_count |
| 2737 |
} |
| 2738 |
} |
| 2739 |
impl Eq for mach_task_basic_info {} |
| 2740 |
impl ::fmt::Debug for mach_task_basic_info { |
| 2741 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2742 |
let virtual_size = self.virtual_size; |
| 2743 |
let resident_size = self.resident_size; |
| 2744 |
let resident_size_max = self.resident_size_max; |
| 2745 |
let user_time = self.user_time; |
| 2746 |
let system_time = self.system_time; |
| 2747 |
let policy = self.policy; |
| 2748 |
let suspend_count = self.suspend_count; |
| 2749 |
f.debug_struct("mach_task_basic_info") |
| 2750 |
.field("virtual_size", &virtual_size) |
| 2751 |
.field("resident_size", &resident_size) |
| 2752 |
.field("resident_size_max", &resident_size_max) |
| 2753 |
.field("user_time", &user_time) |
| 2754 |
.field("system_time", &system_time) |
| 2755 |
.field("policy", &policy) |
| 2756 |
.field("suspend_count", &suspend_count) |
| 2757 |
.finish() |
| 2758 |
} |
| 2759 |
} |
| 2760 |
impl ::hash::Hash for mach_task_basic_info { |
| 2761 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2762 |
let virtual_size = self.virtual_size; |
| 2763 |
let resident_size = self.resident_size; |
| 2764 |
let resident_size_max = self.resident_size_max; |
| 2765 |
let user_time = self.user_time; |
| 2766 |
let system_time = self.system_time; |
| 2767 |
let policy = self.policy; |
| 2768 |
let suspend_count = self.suspend_count; |
| 2769 |
virtual_size.hash(state); |
| 2770 |
resident_size.hash(state); |
| 2771 |
resident_size_max.hash(state); |
| 2772 |
user_time.hash(state); |
| 2773 |
system_time.hash(state); |
| 2774 |
policy.hash(state); |
| 2775 |
suspend_count.hash(state); |
| 2776 |
} |
| 2777 |
} |
| 2778 |
|
| 2779 |
impl PartialEq for log2phys { |
| 2780 |
fn eq(&self, other: &log2phys) -> bool { |
| 2781 |
self.l2p_flags == other.l2p_flags |
| 2782 |
&& self.l2p_contigbytes == other.l2p_contigbytes |
| 2783 |
&& self.l2p_devoffset == other.l2p_devoffset |
| 2784 |
} |
| 2785 |
} |
| 2786 |
impl Eq for log2phys {} |
| 2787 |
impl ::fmt::Debug for log2phys { |
| 2788 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2789 |
let l2p_flags = self.l2p_flags; |
| 2790 |
let l2p_contigbytes = self.l2p_contigbytes; |
| 2791 |
let l2p_devoffset = self.l2p_devoffset; |
| 2792 |
f.debug_struct("log2phys") |
| 2793 |
.field("l2p_flags", &l2p_flags) |
| 2794 |
.field("l2p_contigbytes", &l2p_contigbytes) |
| 2795 |
.field("l2p_devoffset", &l2p_devoffset) |
| 2796 |
.finish() |
| 2797 |
} |
| 2798 |
} |
| 2799 |
impl ::hash::Hash for log2phys { |
| 2800 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2801 |
let l2p_flags = self.l2p_flags; |
| 2802 |
let l2p_contigbytes = self.l2p_contigbytes; |
| 2803 |
let l2p_devoffset = self.l2p_devoffset; |
| 2804 |
l2p_flags.hash(state); |
| 2805 |
l2p_contigbytes.hash(state); |
| 2806 |
l2p_devoffset.hash(state); |
| 2807 |
} |
| 2808 |
} |
| 2809 |
impl PartialEq for os_unfair_lock { |
| 2810 |
fn eq(&self, other: &os_unfair_lock) -> bool { |
| 2811 |
self._os_unfair_lock_opaque == other._os_unfair_lock_opaque |
| 2812 |
} |
| 2813 |
} |
| 2814 |
|
| 2815 |
impl Eq for os_unfair_lock {} |
| 2816 |
|
| 2817 |
impl ::fmt::Debug for os_unfair_lock { |
| 2818 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2819 |
f.debug_struct("os_unfair_lock") |
| 2820 |
.field("_os_unfair_lock_opaque", &self._os_unfair_lock_opaque) |
| 2821 |
.finish() |
| 2822 |
} |
| 2823 |
} |
| 2824 |
|
| 2825 |
impl ::hash::Hash for os_unfair_lock { |
| 2826 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2827 |
self._os_unfair_lock_opaque.hash(state); |
| 2828 |
} |
| 2829 |
} |
| 2830 |
|
| 2831 |
impl PartialEq for sockaddr_vm { |
| 2832 |
fn eq(&self, other: &sockaddr_vm) -> bool { |
| 2833 |
self.svm_len == other.svm_len |
| 2834 |
&& self.svm_family == other.svm_family |
| 2835 |
&& self.svm_reserved1 == other.svm_reserved1 |
| 2836 |
&& self.svm_port == other.svm_port |
| 2837 |
&& self.svm_cid == other.svm_cid |
| 2838 |
} |
| 2839 |
} |
| 2840 |
|
| 2841 |
impl Eq for sockaddr_vm {} |
| 2842 |
|
| 2843 |
impl ::fmt::Debug for sockaddr_vm { |
| 2844 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2845 |
let svm_len = self.svm_len; |
| 2846 |
let svm_family = self.svm_family; |
| 2847 |
let svm_reserved1 = self.svm_reserved1; |
| 2848 |
let svm_port = self.svm_port; |
| 2849 |
let svm_cid = self.svm_cid; |
| 2850 |
|
| 2851 |
f.debug_struct("sockaddr_vm") |
| 2852 |
.field("svm_len",&svm_len) |
| 2853 |
.field("svm_family",&svm_family) |
| 2854 |
.field("svm_reserved1",&svm_reserved1) |
| 2855 |
.field("svm_port",&svm_port) |
| 2856 |
.field("svm_cid",&svm_cid) |
| 2857 |
.finish() |
| 2858 |
} |
| 2859 |
} |
| 2860 |
|
| 2861 |
impl ::hash::Hash for sockaddr_vm { |
| 2862 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2863 |
let svm_len = self.svm_len; |
| 2864 |
let svm_family = self.svm_family; |
| 2865 |
let svm_reserved1 = self.svm_reserved1; |
| 2866 |
let svm_port = self.svm_port; |
| 2867 |
let svm_cid = self.svm_cid; |
| 2868 |
|
| 2869 |
svm_len.hash(state); |
| 2870 |
svm_family.hash(state); |
| 2871 |
svm_reserved1.hash(state); |
| 2872 |
svm_port.hash(state); |
| 2873 |
svm_cid.hash(state); |
| 2874 |
} |
| 2875 |
} |
| 2876 |
|
| 2877 |
impl PartialEq for ifdevmtu { |
| 2878 |
fn eq(&self, other: &ifdevmtu) -> bool { |
| 2879 |
self.ifdm_current == other.ifdm_current |
| 2880 |
&& self.ifdm_min == other.ifdm_min |
| 2881 |
&& self.ifdm_max == other.ifdm_max |
| 2882 |
} |
| 2883 |
} |
| 2884 |
|
| 2885 |
impl Eq for ifdevmtu {} |
| 2886 |
|
| 2887 |
impl ::fmt::Debug for ifdevmtu { |
| 2888 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2889 |
f.debug_struct("ifdevmtu") |
| 2890 |
.field("ifdm_current", &self.ifdm_current) |
| 2891 |
.field("ifdm_min", &self.ifdm_min) |
| 2892 |
.field("ifdm_max", &self.ifdm_max) |
| 2893 |
.finish() |
| 2894 |
} |
| 2895 |
} |
| 2896 |
|
| 2897 |
impl ::hash::Hash for ifdevmtu { |
| 2898 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2899 |
self.ifdm_current.hash(state); |
| 2900 |
self.ifdm_min.hash(state); |
| 2901 |
self.ifdm_max.hash(state); |
| 2902 |
} |
| 2903 |
} |
| 2904 |
|
| 2905 |
#[cfg(libc_union)] |
| 2906 |
impl PartialEq for __c_anonymous_ifk_data { |
| 2907 |
fn eq(&self, other: &__c_anonymous_ifk_data) -> bool { |
| 2908 |
unsafe { |
| 2909 |
self.ifk_ptr == other.ifk_ptr |
| 2910 |
&& self.ifk_value == other.ifk_value |
| 2911 |
} |
| 2912 |
} |
| 2913 |
} |
| 2914 |
|
| 2915 |
#[cfg(libc_union)] |
| 2916 |
impl Eq for __c_anonymous_ifk_data {} |
| 2917 |
|
| 2918 |
#[cfg(libc_union)] |
| 2919 |
impl ::fmt::Debug for __c_anonymous_ifk_data { |
| 2920 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2921 |
f.debug_struct("__c_anonymous_ifk_data") |
| 2922 |
.field("ifk_ptr", unsafe { &self.ifk_ptr }) |
| 2923 |
.field("ifk_value", unsafe { &self.ifk_value }) |
| 2924 |
.finish() |
| 2925 |
} |
| 2926 |
} |
| 2927 |
#[cfg(libc_union)] |
| 2928 |
impl ::hash::Hash for __c_anonymous_ifk_data { |
| 2929 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2930 |
unsafe { |
| 2931 |
self.ifk_ptr.hash(state); |
| 2932 |
self.ifk_value.hash(state); |
| 2933 |
} |
| 2934 |
} |
| 2935 |
} |
| 2936 |
|
| 2937 |
impl PartialEq for ifkpi { |
| 2938 |
fn eq(&self, other: &ifkpi) -> bool { |
| 2939 |
self.ifk_module_id == other.ifk_module_id |
| 2940 |
&& self.ifk_type == other.ifk_type |
| 2941 |
} |
| 2942 |
} |
| 2943 |
|
| 2944 |
impl Eq for ifkpi {} |
| 2945 |
|
| 2946 |
impl ::fmt::Debug for ifkpi { |
| 2947 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2948 |
f.debug_struct("ifkpi") |
| 2949 |
.field("ifk_module_id", &self.ifk_module_id) |
| 2950 |
.field("ifk_type", &self.ifk_type) |
| 2951 |
.finish() |
| 2952 |
} |
| 2953 |
} |
| 2954 |
|
| 2955 |
impl ::hash::Hash for ifkpi { |
| 2956 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 2957 |
self.ifk_module_id.hash(state); |
| 2958 |
self.ifk_type.hash(state); |
| 2959 |
} |
| 2960 |
} |
| 2961 |
|
| 2962 |
#[cfg(libc_union)] |
| 2963 |
impl PartialEq for __c_anonymous_ifr_ifru { |
| 2964 |
fn eq(&self, other: &__c_anonymous_ifr_ifru) -> bool { |
| 2965 |
unsafe { |
| 2966 |
self.ifru_addr == other.ifru_addr |
| 2967 |
&& self.ifru_dstaddr == other.ifru_dstaddr |
| 2968 |
&& self.ifru_broadaddr == other.ifru_broadaddr |
| 2969 |
&& self.ifru_flags == other.ifru_flags |
| 2970 |
&& self.ifru_metrics == other.ifru_metrics |
| 2971 |
&& self.ifru_mtu == other.ifru_mtu |
| 2972 |
&& self.ifru_phys == other.ifru_phys |
| 2973 |
&& self.ifru_media == other.ifru_media |
| 2974 |
&& self.ifru_intval == other.ifru_intval |
| 2975 |
&& self.ifru_data == other.ifru_data |
| 2976 |
&& self.ifru_devmtu == other.ifru_devmtu |
| 2977 |
&& self.ifru_kpi == other.ifru_kpi |
| 2978 |
&& self.ifru_wake_flags == other.ifru_wake_flags |
| 2979 |
&& self.ifru_route_refcnt == other.ifru_route_refcnt |
| 2980 |
&& self.ifru_cap.iter().zip(other.ifru_cap.iter()).all(|(a,b)| a == b) |
| 2981 |
&& self.ifru_functional_type == other.ifru_functional_type |
| 2982 |
} |
| 2983 |
} |
| 2984 |
} |
| 2985 |
|
| 2986 |
#[cfg(libc_union)] |
| 2987 |
impl Eq for __c_anonymous_ifr_ifru {} |
| 2988 |
|
| 2989 |
#[cfg(libc_union)] |
| 2990 |
impl ::fmt::Debug for __c_anonymous_ifr_ifru { |
| 2991 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 2992 |
f.debug_struct("__c_anonymous_ifr_ifru") |
| 2993 |
.field("ifru_addr", unsafe { &self.ifru_addr }) |
| 2994 |
.field("ifru_dstaddr", unsafe { &self.ifru_dstaddr }) |
| 2995 |
.field("ifru_broadaddr", unsafe { &self.ifru_broadaddr }) |
| 2996 |
.field("ifru_flags", unsafe { &self.ifru_flags }) |
| 2997 |
.field("ifru_metrics", unsafe { &self.ifru_metrics }) |
| 2998 |
.field("ifru_mtu", unsafe { &self.ifru_mtu }) |
| 2999 |
.field("ifru_phys", unsafe { &self.ifru_phys }) |
| 3000 |
.field("ifru_media", unsafe { &self.ifru_media }) |
| 3001 |
.field("ifru_intval", unsafe { &self.ifru_intval }) |
| 3002 |
.field("ifru_data", unsafe { &self.ifru_data }) |
| 3003 |
.field("ifru_devmtu", unsafe { &self.ifru_devmtu }) |
| 3004 |
.field("ifru_kpi", unsafe { &self.ifru_kpi }) |
| 3005 |
.field("ifru_wake_flags", unsafe { &self.ifru_wake_flags }) |
| 3006 |
.field("ifru_route_refcnt", unsafe { &self.ifru_route_refcnt }) |
| 3007 |
.field("ifru_cap", unsafe { &self.ifru_cap }) |
| 3008 |
.field("ifru_functional_type", unsafe { &self.ifru_functional_type }) |
| 3009 |
.finish() |
| 3010 |
} |
| 3011 |
} |
| 3012 |
|
| 3013 |
#[cfg(libc_union)] |
| 3014 |
impl ::hash::Hash for __c_anonymous_ifr_ifru { |
| 3015 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 3016 |
unsafe { |
| 3017 |
self.ifru_addr.hash(state); |
| 3018 |
self.ifru_dstaddr.hash(state); |
| 3019 |
self.ifru_broadaddr.hash(state); |
| 3020 |
self.ifru_flags.hash(state); |
| 3021 |
self.ifru_metrics.hash(state); |
| 3022 |
self.ifru_mtu.hash(state); |
| 3023 |
self.ifru_phys.hash(state); |
| 3024 |
self.ifru_media.hash(state); |
| 3025 |
self.ifru_intval.hash(state); |
| 3026 |
self.ifru_data.hash(state); |
| 3027 |
self.ifru_devmtu.hash(state); |
| 3028 |
self.ifru_kpi.hash(state); |
| 3029 |
self.ifru_wake_flags.hash(state); |
| 3030 |
self.ifru_route_refcnt.hash(state); |
| 3031 |
self.ifru_cap.hash(state); |
| 3032 |
self.ifru_functional_type.hash(state); |
| 3033 |
} |
| 3034 |
} |
| 3035 |
} |
| 3036 |
|
| 3037 |
impl PartialEq for ifreq { |
| 3038 |
fn eq(&self, other: &ifreq) -> bool { |
| 3039 |
self.ifr_name == other.ifr_name |
| 3040 |
&& self.ifr_ifru == other.ifr_ifru |
| 3041 |
} |
| 3042 |
} |
| 3043 |
|
| 3044 |
impl Eq for ifreq {} |
| 3045 |
|
| 3046 |
impl ::fmt::Debug for ifreq { |
| 3047 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 3048 |
f.debug_struct("ifreq") |
| 3049 |
.field("ifr_name", &self.ifr_name) |
| 3050 |
.field("ifr_ifru", &self.ifr_ifru) |
| 3051 |
.finish() |
| 3052 |
} |
| 3053 |
} |
| 3054 |
|
| 3055 |
impl ::hash::Hash for ifreq { |
| 3056 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 3057 |
self.ifr_name.hash(state); |
| 3058 |
self.ifr_ifru.hash(state); |
| 3059 |
} |
| 3060 |
} |
| 3061 |
|
| 3062 |
#[cfg(libc_union)] |
| 3063 |
impl Eq for __c_anonymous_ifc_ifcu {} |
| 3064 |
|
| 3065 |
#[cfg(libc_union)] |
| 3066 |
impl PartialEq for __c_anonymous_ifc_ifcu { |
| 3067 |
fn eq(&self, other: &__c_anonymous_ifc_ifcu) -> bool { |
| 3068 |
unsafe { |
| 3069 |
self.ifcu_buf == other.ifcu_buf && |
| 3070 |
self.ifcu_req == other.ifcu_req |
| 3071 |
} |
| 3072 |
} |
| 3073 |
} |
| 3074 |
|
| 3075 |
#[cfg(libc_union)] |
| 3076 |
impl ::fmt::Debug for __c_anonymous_ifc_ifcu { |
| 3077 |
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { |
| 3078 |
f.debug_struct("ifc_ifcu") |
| 3079 |
.field("ifcu_buf", unsafe { &self.ifcu_buf }) |
| 3080 |
.field("ifcu_req", unsafe { &self.ifcu_req }) |
| 3081 |
.finish() |
| 3082 |
} |
| 3083 |
} |
| 3084 |
|
| 3085 |
#[cfg(libc_union)] |
| 3086 |
impl ::hash::Hash for __c_anonymous_ifc_ifcu { |
| 3087 |
fn hash<H: ::hash::Hasher>(&self, state: &mut H) { |
| 3088 |
unsafe { self.ifcu_buf.hash(state) }; |
| 3089 |
unsafe { self.ifcu_req.hash(state) }; |
| 3090 |
} |
| 3091 |
} |
| 3092 |
} |
| 3093 |
} |
| 3094 |
|
| 3095 |
pub const _UTX_USERSIZE: usize = 256; |
| 3096 |
pub const _UTX_LINESIZE: usize = 32; |
| 3097 |
pub const _UTX_IDSIZE: usize = 4; |
| 3098 |
pub const _UTX_HOSTSIZE: usize = 256; |
| 3099 |
|
| 3100 |
pub const EMPTY: ::c_short = 0; |
| 3101 |
pub const RUN_LVL: ::c_short = 1; |
| 3102 |
pub const BOOT_TIME: ::c_short = 2; |
| 3103 |
pub const OLD_TIME: ::c_short = 3; |
| 3104 |
pub const NEW_TIME: ::c_short = 4; |
| 3105 |
pub const INIT_PROCESS: ::c_short = 5; |
| 3106 |
pub const LOGIN_PROCESS: ::c_short = 6; |
| 3107 |
pub const USER_PROCESS: ::c_short = 7; |
| 3108 |
pub const DEAD_PROCESS: ::c_short = 8; |
| 3109 |
pub const ACCOUNTING: ::c_short = 9; |
| 3110 |
pub const SIGNATURE: ::c_short = 10; |
| 3111 |
pub const SHUTDOWN_TIME: ::c_short = 11; |
| 3112 |
|
| 3113 |
pub const LC_COLLATE_MASK: ::c_int = 1 << 0; |
| 3114 |
pub const LC_CTYPE_MASK: ::c_int = 1 << 1; |
| 3115 |
pub const LC_MESSAGES_MASK: ::c_int = 1 << 2; |
| 3116 |
pub const LC_MONETARY_MASK: ::c_int = 1 << 3; |
| 3117 |
pub const LC_NUMERIC_MASK: ::c_int = 1 << 4; |
| 3118 |
pub const LC_TIME_MASK: ::c_int = 1 << 5; |
| 3119 |
pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK |
| 3120 |
| LC_CTYPE_MASK |
| 3121 |
| LC_MESSAGES_MASK |
| 3122 |
| LC_MONETARY_MASK |
| 3123 |
| LC_NUMERIC_MASK |
| 3124 |
| LC_TIME_MASK; |
| 3125 |
|
| 3126 |
pub const CODESET: ::nl_item = 0; |
| 3127 |
pub const D_T_FMT: ::nl_item = 1; |
| 3128 |
pub const D_FMT: ::nl_item = 2; |
| 3129 |
pub const T_FMT: ::nl_item = 3; |
| 3130 |
pub const T_FMT_AMPM: ::nl_item = 4; |
| 3131 |
pub const AM_STR: ::nl_item = 5; |
| 3132 |
pub const PM_STR: ::nl_item = 6; |
| 3133 |
|
| 3134 |
pub const DAY_1: ::nl_item = 7; |
| 3135 |
pub const DAY_2: ::nl_item = 8; |
| 3136 |
pub const DAY_3: ::nl_item = 9; |
| 3137 |
pub const DAY_4: ::nl_item = 10; |
| 3138 |
pub const DAY_5: ::nl_item = 11; |
| 3139 |
pub const DAY_6: ::nl_item = 12; |
| 3140 |
pub const DAY_7: ::nl_item = 13; |
| 3141 |
|
| 3142 |
pub const ABDAY_1: ::nl_item = 14; |
| 3143 |
pub const ABDAY_2: ::nl_item = 15; |
| 3144 |
pub const ABDAY_3: ::nl_item = 16; |
| 3145 |
pub const ABDAY_4: ::nl_item = 17; |
| 3146 |
pub const ABDAY_5: ::nl_item = 18; |
| 3147 |
pub const ABDAY_6: ::nl_item = 19; |
| 3148 |
pub const ABDAY_7: ::nl_item = 20; |
| 3149 |
|
| 3150 |
pub const MON_1: ::nl_item = 21; |
| 3151 |
pub const MON_2: ::nl_item = 22; |
| 3152 |
pub const MON_3: ::nl_item = 23; |
| 3153 |
pub const MON_4: ::nl_item = 24; |
| 3154 |
pub const MON_5: ::nl_item = 25; |
| 3155 |
pub const MON_6: ::nl_item = 26; |
| 3156 |
pub const MON_7: ::nl_item = 27; |
| 3157 |
pub const MON_8: ::nl_item = 28; |
| 3158 |
pub const MON_9: ::nl_item = 29; |
| 3159 |
pub const MON_10: ::nl_item = 30; |
| 3160 |
pub const MON_11: ::nl_item = 31; |
| 3161 |
pub const MON_12: ::nl_item = 32; |
| 3162 |
|
| 3163 |
pub const ABMON_1: ::nl_item = 33; |
| 3164 |
pub const ABMON_2: ::nl_item = 34; |
| 3165 |
pub const ABMON_3: ::nl_item = 35; |
| 3166 |
pub const ABMON_4: ::nl_item = 36; |
| 3167 |
pub const ABMON_5: ::nl_item = 37; |
| 3168 |
pub const ABMON_6: ::nl_item = 38; |
| 3169 |
pub const ABMON_7: ::nl_item = 39; |
| 3170 |
pub const ABMON_8: ::nl_item = 40; |
| 3171 |
pub const ABMON_9: ::nl_item = 41; |
| 3172 |
pub const ABMON_10: ::nl_item = 42; |
| 3173 |
pub const ABMON_11: ::nl_item = 43; |
| 3174 |
pub const ABMON_12: ::nl_item = 44; |
| 3175 |
|
| 3176 |
pub const CLOCK_REALTIME: ::clockid_t = 0; |
| 3177 |
pub const CLOCK_MONOTONIC_RAW: ::clockid_t = 4; |
| 3178 |
pub const CLOCK_MONOTONIC_RAW_APPROX: ::clockid_t = 5; |
| 3179 |
pub const CLOCK_MONOTONIC: ::clockid_t = 6; |
| 3180 |
pub const CLOCK_UPTIME_RAW: ::clockid_t = 8; |
| 3181 |
pub const CLOCK_UPTIME_RAW_APPROX: ::clockid_t = 9; |
| 3182 |
pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 12; |
| 3183 |
pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 16; |
| 3184 |
|
| 3185 |
pub const ERA: ::nl_item = 45; |
| 3186 |
pub const ERA_D_FMT: ::nl_item = 46; |
| 3187 |
pub const ERA_D_T_FMT: ::nl_item = 47; |
| 3188 |
pub const ERA_T_FMT: ::nl_item = 48; |
| 3189 |
pub const ALT_DIGITS: ::nl_item = 49; |
| 3190 |
|
| 3191 |
pub const RADIXCHAR: ::nl_item = 50; |
| 3192 |
pub const THOUSEP: ::nl_item = 51; |
| 3193 |
|
| 3194 |
pub const YESEXPR: ::nl_item = 52; |
| 3195 |
pub const NOEXPR: ::nl_item = 53; |
| 3196 |
|
| 3197 |
pub const YESSTR: ::nl_item = 54; |
| 3198 |
pub const NOSTR: ::nl_item = 55; |
| 3199 |
|
| 3200 |
pub const CRNCYSTR: ::nl_item = 56; |
| 3201 |
|
| 3202 |
pub const D_MD_ORDER: ::nl_item = 57; |
| 3203 |
|
| 3204 |
pub const EXIT_FAILURE: ::c_int = 1; |
| 3205 |
pub const EXIT_SUCCESS: ::c_int = 0; |
| 3206 |
pub const RAND_MAX: ::c_int = 2147483647; |
| 3207 |
pub const EOF: ::c_int = -1; |
| 3208 |
pub const SEEK_SET: ::c_int = 0; |
| 3209 |
pub const SEEK_CUR: ::c_int = 1; |
| 3210 |
pub const SEEK_END: ::c_int = 2; |
| 3211 |
pub const SEEK_HOLE: ::c_int = 3; |
| 3212 |
pub const SEEK_DATA: ::c_int = 4; |
| 3213 |
pub const _IOFBF: ::c_int = 0; |
| 3214 |
pub const _IONBF: ::c_int = 2; |
| 3215 |
pub const _IOLBF: ::c_int = 1; |
| 3216 |
pub const BUFSIZ: ::c_uint = 1024; |
| 3217 |
pub const FOPEN_MAX: ::c_uint = 20; |
| 3218 |
pub const FILENAME_MAX: ::c_uint = 1024; |
| 3219 |
pub const L_tmpnam: ::c_uint = 1024; |
| 3220 |
pub const TMP_MAX: ::c_uint = 308915776; |
| 3221 |
pub const _PC_LINK_MAX: ::c_int = 1; |
| 3222 |
pub const _PC_MAX_CANON: ::c_int = 2; |
| 3223 |
pub const _PC_MAX_INPUT: ::c_int = 3; |
| 3224 |
pub const _PC_NAME_MAX: ::c_int = 4; |
| 3225 |
pub const _PC_PATH_MAX: ::c_int = 5; |
| 3226 |
pub const _PC_PIPE_BUF: ::c_int = 6; |
| 3227 |
pub const _PC_CHOWN_RESTRICTED: ::c_int = 7; |
| 3228 |
pub const _PC_NO_TRUNC: ::c_int = 8; |
| 3229 |
pub const _PC_VDISABLE: ::c_int = 9; |
| 3230 |
pub const _PC_NAME_CHARS_MAX: ::c_int = 10; |
| 3231 |
pub const _PC_CASE_SENSITIVE: ::c_int = 11; |
| 3232 |
pub const _PC_CASE_PRESERVING: ::c_int = 12; |
| 3233 |
pub const _PC_EXTENDED_SECURITY_NP: ::c_int = 13; |
| 3234 |
pub const _PC_AUTH_OPAQUE_NP: ::c_int = 14; |
| 3235 |
pub const _PC_2_SYMLINKS: ::c_int = 15; |
| 3236 |
pub const _PC_ALLOC_SIZE_MIN: ::c_int = 16; |
| 3237 |
pub const _PC_ASYNC_IO: ::c_int = 17; |
| 3238 |
pub const _PC_FILESIZEBITS: ::c_int = 18; |
| 3239 |
pub const _PC_PRIO_IO: ::c_int = 19; |
| 3240 |
pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 20; |
| 3241 |
pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 21; |
| 3242 |
pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 22; |
| 3243 |
pub const _PC_REC_XFER_ALIGN: ::c_int = 23; |
| 3244 |
pub const _PC_SYMLINK_MAX: ::c_int = 24; |
| 3245 |
pub const _PC_SYNC_IO: ::c_int = 25; |
| 3246 |
pub const _PC_XATTR_SIZE_BITS: ::c_int = 26; |
| 3247 |
pub const _PC_MIN_HOLE_SIZE: ::c_int = 27; |
| 3248 |
pub const O_EVTONLY: ::c_int = 0x00008000; |
| 3249 |
pub const O_NOCTTY: ::c_int = 0x00020000; |
| 3250 |
pub const O_DIRECTORY: ::c_int = 0x00100000; |
| 3251 |
pub const O_SYMLINK: ::c_int = 0x00200000; |
| 3252 |
pub const O_DSYNC: ::c_int = 0x00400000; |
| 3253 |
pub const O_CLOEXEC: ::c_int = 0x01000000; |
| 3254 |
pub const O_NOFOLLOW_ANY: ::c_int = 0x20000000; |
| 3255 |
pub const O_EXEC: ::c_int = 0x40000000; |
| 3256 |
pub const O_SEARCH: ::c_int = O_EXEC | O_DIRECTORY; |
| 3257 |
pub const S_IFIFO: mode_t = 4096; |
| 3258 |
pub const S_IFCHR: mode_t = 8192; |
| 3259 |
pub const S_IFBLK: mode_t = 24576; |
| 3260 |
pub const S_IFDIR: mode_t = 16384; |
| 3261 |
pub const S_IFREG: mode_t = 32768; |
| 3262 |
pub const S_IFLNK: mode_t = 40960; |
| 3263 |
pub const S_IFSOCK: mode_t = 49152; |
| 3264 |
pub const S_IFMT: mode_t = 61440; |
| 3265 |
pub const S_IEXEC: mode_t = 64; |
| 3266 |
pub const S_IWRITE: mode_t = 128; |
| 3267 |
pub const S_IREAD: mode_t = 256; |
| 3268 |
pub const S_IRWXU: mode_t = 448; |
| 3269 |
pub const S_IXUSR: mode_t = 64; |
| 3270 |
pub const S_IWUSR: mode_t = 128; |
| 3271 |
pub const S_IRUSR: mode_t = 256; |
| 3272 |
pub const S_IRWXG: mode_t = 56; |
| 3273 |
pub const S_IXGRP: mode_t = 8; |
| 3274 |
pub const S_IWGRP: mode_t = 16; |
| 3275 |
pub const S_IRGRP: mode_t = 32; |
| 3276 |
pub const S_IRWXO: mode_t = 7; |
| 3277 |
pub const S_IXOTH: mode_t = 1; |
| 3278 |
pub const S_IWOTH: mode_t = 2; |
| 3279 |
pub const S_IROTH: mode_t = 4; |
| 3280 |
pub const F_OK: ::c_int = 0; |
| 3281 |
pub const R_OK: ::c_int = 4; |
| 3282 |
pub const W_OK: ::c_int = 2; |
| 3283 |
pub const X_OK: ::c_int = 1; |
| 3284 |
pub const STDIN_FILENO: ::c_int = 0; |
| 3285 |
pub const STDOUT_FILENO: ::c_int = 1; |
| 3286 |
pub const STDERR_FILENO: ::c_int = 2; |
| 3287 |
pub const F_LOCK: ::c_int = 1; |
| 3288 |
pub const F_TEST: ::c_int = 3; |
| 3289 |
pub const F_TLOCK: ::c_int = 2; |
| 3290 |
pub const F_ULOCK: ::c_int = 0; |
| 3291 |
pub const F_GETLK: ::c_int = 7; |
| 3292 |
pub const F_SETLK: ::c_int = 8; |
| 3293 |
pub const F_SETLKW: ::c_int = 9; |
| 3294 |
pub const SIGHUP: ::c_int = 1; |
| 3295 |
pub const SIGINT: ::c_int = 2; |
| 3296 |
pub const SIGQUIT: ::c_int = 3; |
| 3297 |
pub const SIGILL: ::c_int = 4; |
| 3298 |
pub const SIGABRT: ::c_int = 6; |
| 3299 |
pub const SIGEMT: ::c_int = 7; |
| 3300 |
pub const SIGFPE: ::c_int = 8; |
| 3301 |
pub const SIGKILL: ::c_int = 9; |
| 3302 |
pub const SIGSEGV: ::c_int = 11; |
| 3303 |
pub const SIGPIPE: ::c_int = 13; |
| 3304 |
pub const SIGALRM: ::c_int = 14; |
| 3305 |
pub const SIGTERM: ::c_int = 15; |
| 3306 |
|
| 3307 |
pub const PROT_NONE: ::c_int = 0; |
| 3308 |
pub const PROT_READ: ::c_int = 1; |
| 3309 |
pub const PROT_WRITE: ::c_int = 2; |
| 3310 |
pub const PROT_EXEC: ::c_int = 4; |
| 3311 |
|
| 3312 |
pub const PT_TRACE_ME: ::c_int = 0; |
| 3313 |
pub const PT_READ_I: ::c_int = 1; |
| 3314 |
pub const PT_READ_D: ::c_int = 2; |
| 3315 |
pub const PT_READ_U: ::c_int = 3; |
| 3316 |
pub const PT_WRITE_I: ::c_int = 4; |
| 3317 |
pub const PT_WRITE_D: ::c_int = 5; |
| 3318 |
pub const PT_WRITE_U: ::c_int = 6; |
| 3319 |
pub const PT_CONTINUE: ::c_int = 7; |
| 3320 |
pub const PT_KILL: ::c_int = 8; |
| 3321 |
pub const PT_STEP: ::c_int = 9; |
| 3322 |
pub const PT_ATTACH: ::c_int = 10; |
| 3323 |
pub const PT_DETACH: ::c_int = 11; |
| 3324 |
pub const PT_SIGEXC: ::c_int = 12; |
| 3325 |
pub const PT_THUPDATE: ::c_int = 13; |
| 3326 |
pub const PT_ATTACHEXC: ::c_int = 14; |
| 3327 |
|
| 3328 |
pub const PT_FORCEQUOTA: ::c_int = 30; |
| 3329 |
pub const PT_DENY_ATTACH: ::c_int = 31; |
| 3330 |
pub const PT_FIRSTMACH: ::c_int = 32; |
| 3331 |
|
| 3332 |
pub const MAP_FILE: ::c_int = 0x0000; |
| 3333 |
pub const MAP_SHARED: ::c_int = 0x0001; |
| 3334 |
pub const MAP_PRIVATE: ::c_int = 0x0002; |
| 3335 |
pub const MAP_FIXED: ::c_int = 0x0010; |
| 3336 |
pub const MAP_ANON: ::c_int = 0x1000; |
| 3337 |
pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; |
| 3338 |
|
| 3339 |
pub const CPU_STATE_USER: ::c_int = 0; |
| 3340 |
pub const CPU_STATE_SYSTEM: ::c_int = 1; |
| 3341 |
pub const CPU_STATE_IDLE: ::c_int = 2; |
| 3342 |
pub const CPU_STATE_NICE: ::c_int = 3; |
| 3343 |
pub const CPU_STATE_MAX: ::c_int = 4; |
| 3344 |
|
| 3345 |
pub const PROCESSOR_BASIC_INFO: ::c_int = 1; |
| 3346 |
pub const PROCESSOR_CPU_LOAD_INFO: ::c_int = 2; |
| 3347 |
pub const PROCESSOR_PM_REGS_INFO: ::c_int = 0x10000001; |
| 3348 |
pub const PROCESSOR_TEMPERATURE: ::c_int = 0x10000002; |
| 3349 |
pub const PROCESSOR_SET_LOAD_INFO: ::c_int = 4; |
| 3350 |
pub const PROCESSOR_SET_BASIC_INFO: ::c_int = 5; |
| 3351 |
|
| 3352 |
deprecated_mach! { |
| 3353 |
pub const VM_FLAGS_FIXED: ::c_int = 0x0000; |
| 3354 |
pub const VM_FLAGS_ANYWHERE: ::c_int = 0x0001; |
| 3355 |
pub const VM_FLAGS_PURGABLE: ::c_int = 0x0002; |
| 3356 |
pub const VM_FLAGS_RANDOM_ADDR: ::c_int = 0x0008; |
| 3357 |
pub const VM_FLAGS_NO_CACHE: ::c_int = 0x0010; |
| 3358 |
pub const VM_FLAGS_RESILIENT_CODESIGN: ::c_int = 0x0020; |
| 3359 |
pub const VM_FLAGS_RESILIENT_MEDIA: ::c_int = 0x0040; |
| 3360 |
pub const VM_FLAGS_OVERWRITE: ::c_int = 0x4000; |
| 3361 |
pub const VM_FLAGS_SUPERPAGE_MASK: ::c_int = 0x70000; |
| 3362 |
pub const VM_FLAGS_RETURN_DATA_ADDR: ::c_int = 0x100000; |
| 3363 |
pub const VM_FLAGS_RETURN_4K_DATA_ADDR: ::c_int = 0x800000; |
| 3364 |
pub const VM_FLAGS_ALIAS_MASK: ::c_int = 0xFF000000; |
| 3365 |
pub const VM_FLAGS_USER_ALLOCATE: ::c_int = 0xff07401f; |
| 3366 |
pub const VM_FLAGS_USER_MAP: ::c_int = 0xff97401f; |
| 3367 |
pub const VM_FLAGS_USER_REMAP: ::c_int = VM_FLAGS_FIXED | |
| 3368 |
VM_FLAGS_ANYWHERE | |
| 3369 |
VM_FLAGS_RANDOM_ADDR | |
| 3370 |
VM_FLAGS_OVERWRITE | |
| 3371 |
VM_FLAGS_RETURN_DATA_ADDR | |
| 3372 |
VM_FLAGS_RESILIENT_CODESIGN; |
| 3373 |
|
| 3374 |
pub const VM_FLAGS_SUPERPAGE_SHIFT: ::c_int = 16; |
| 3375 |
pub const SUPERPAGE_NONE: ::c_int = 0; |
| 3376 |
pub const SUPERPAGE_SIZE_ANY: ::c_int = 1; |
| 3377 |
pub const VM_FLAGS_SUPERPAGE_NONE: ::c_int = SUPERPAGE_NONE << |
| 3378 |
VM_FLAGS_SUPERPAGE_SHIFT; |
| 3379 |
pub const VM_FLAGS_SUPERPAGE_SIZE_ANY: ::c_int = SUPERPAGE_SIZE_ANY << |
| 3380 |
VM_FLAGS_SUPERPAGE_SHIFT; |
| 3381 |
pub const SUPERPAGE_SIZE_2MB: ::c_int = 2; |
| 3382 |
pub const VM_FLAGS_SUPERPAGE_SIZE_2MB: ::c_int = SUPERPAGE_SIZE_2MB << |
| 3383 |
VM_FLAGS_SUPERPAGE_SHIFT; |
| 3384 |
|
| 3385 |
pub const VM_MEMORY_MALLOC: ::c_int = 1; |
| 3386 |
pub const VM_MEMORY_MALLOC_SMALL: ::c_int = 2; |
| 3387 |
pub const VM_MEMORY_MALLOC_LARGE: ::c_int = 3; |
| 3388 |
pub const VM_MEMORY_MALLOC_HUGE: ::c_int = 4; |
| 3389 |
pub const VM_MEMORY_SBRK: ::c_int = 5; |
| 3390 |
pub const VM_MEMORY_REALLOC: ::c_int = 6; |
| 3391 |
pub const VM_MEMORY_MALLOC_TINY: ::c_int = 7; |
| 3392 |
pub const VM_MEMORY_MALLOC_LARGE_REUSABLE: ::c_int = 8; |
| 3393 |
pub const VM_MEMORY_MALLOC_LARGE_REUSED: ::c_int = 9; |
| 3394 |
pub const VM_MEMORY_ANALYSIS_TOOL: ::c_int = 10; |
| 3395 |
pub const VM_MEMORY_MALLOC_NANO: ::c_int = 11; |
| 3396 |
pub const VM_MEMORY_MACH_MSG: ::c_int = 20; |
| 3397 |
pub const VM_MEMORY_IOKIT: ::c_int = 21; |
| 3398 |
pub const VM_MEMORY_STACK: ::c_int = 30; |
| 3399 |
pub const VM_MEMORY_GUARD: ::c_int = 31; |
| 3400 |
pub const VM_MEMORY_SHARED_PMAP: ::c_int = 32; |
| 3401 |
pub const VM_MEMORY_DYLIB: ::c_int = 33; |
| 3402 |
pub const VM_MEMORY_OBJC_DISPATCHERS: ::c_int = 34; |
| 3403 |
pub const VM_MEMORY_UNSHARED_PMAP: ::c_int = 35; |
| 3404 |
pub const VM_MEMORY_APPKIT: ::c_int = 40; |
| 3405 |
pub const VM_MEMORY_FOUNDATION: ::c_int = 41; |
| 3406 |
pub const VM_MEMORY_COREGRAPHICS: ::c_int = 42; |
| 3407 |
pub const VM_MEMORY_CORESERVICES: ::c_int = 43; |
| 3408 |
pub const VM_MEMORY_CARBON: ::c_int = VM_MEMORY_CORESERVICES; |
| 3409 |
pub const VM_MEMORY_JAVA: ::c_int = 44; |
| 3410 |
pub const VM_MEMORY_COREDATA: ::c_int = 45; |
| 3411 |
pub const VM_MEMORY_COREDATA_OBJECTIDS: ::c_int = 46; |
| 3412 |
pub const VM_MEMORY_ATS: ::c_int = 50; |
| 3413 |
pub const VM_MEMORY_LAYERKIT: ::c_int = 51; |
| 3414 |
pub const VM_MEMORY_CGIMAGE: ::c_int = 52; |
| 3415 |
pub const VM_MEMORY_TCMALLOC: ::c_int = 53; |
| 3416 |
pub const VM_MEMORY_COREGRAPHICS_DATA: ::c_int = 54; |
| 3417 |
pub const VM_MEMORY_COREGRAPHICS_SHARED: ::c_int = 55; |
| 3418 |
pub const VM_MEMORY_COREGRAPHICS_FRAMEBUFFERS: ::c_int = 56; |
| 3419 |
pub const VM_MEMORY_COREGRAPHICS_BACKINGSTORES: ::c_int = 57; |
| 3420 |
pub const VM_MEMORY_COREGRAPHICS_XALLOC: ::c_int = 58; |
| 3421 |
pub const VM_MEMORY_COREGRAPHICS_MISC: ::c_int = VM_MEMORY_COREGRAPHICS; |
| 3422 |
pub const VM_MEMORY_DYLD: ::c_int = 60; |
| 3423 |
pub const VM_MEMORY_DYLD_MALLOC: ::c_int = 61; |
| 3424 |
pub const VM_MEMORY_SQLITE: ::c_int = 62; |
| 3425 |
pub const VM_MEMORY_JAVASCRIPT_CORE: ::c_int = 63; |
| 3426 |
pub const VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR: ::c_int = 64; |
| 3427 |
pub const VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE: ::c_int = 65; |
| 3428 |
pub const VM_MEMORY_GLSL: ::c_int = 66; |
| 3429 |
pub const VM_MEMORY_OPENCL: ::c_int = 67; |
| 3430 |
pub const VM_MEMORY_COREIMAGE: ::c_int = 68; |
| 3431 |
pub const VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS: ::c_int = 69; |
| 3432 |
pub const VM_MEMORY_IMAGEIO: ::c_int = 70; |
| 3433 |
pub const VM_MEMORY_COREPROFILE: ::c_int = 71; |
| 3434 |
pub const VM_MEMORY_ASSETSD: ::c_int = 72; |
| 3435 |
pub const VM_MEMORY_OS_ALLOC_ONCE: ::c_int = 73; |
| 3436 |
pub const VM_MEMORY_LIBDISPATCH: ::c_int = 74; |
| 3437 |
pub const VM_MEMORY_ACCELERATE: ::c_int = 75; |
| 3438 |
pub const VM_MEMORY_COREUI: ::c_int = 76; |
| 3439 |
pub const VM_MEMORY_COREUIFILE: ::c_int = 77; |
| 3440 |
pub const VM_MEMORY_GENEALOGY: ::c_int = 78; |
| 3441 |
pub const VM_MEMORY_RAWCAMERA: ::c_int = 79; |
| 3442 |
pub const VM_MEMORY_CORPSEINFO: ::c_int = 80; |
| 3443 |
pub const VM_MEMORY_ASL: ::c_int = 81; |
| 3444 |
pub const VM_MEMORY_SWIFT_RUNTIME: ::c_int = 82; |
| 3445 |
pub const VM_MEMORY_SWIFT_METADATA: ::c_int = 83; |
| 3446 |
pub const VM_MEMORY_DHMM: ::c_int = 84; |
| 3447 |
pub const VM_MEMORY_SCENEKIT: ::c_int = 86; |
| 3448 |
pub const VM_MEMORY_SKYWALK: ::c_int = 87; |
| 3449 |
pub const VM_MEMORY_APPLICATION_SPECIFIC_1: ::c_int = 240; |
| 3450 |
pub const VM_MEMORY_APPLICATION_SPECIFIC_16: ::c_int = 255; |
| 3451 |
} |
| 3452 |
|
| 3453 |
pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; |
| 3454 |
|
| 3455 |
pub const MCL_CURRENT: ::c_int = 0x0001; |
| 3456 |
pub const MCL_FUTURE: ::c_int = 0x0002; |
| 3457 |
|
| 3458 |
pub const MS_ASYNC: ::c_int = 0x0001; |
| 3459 |
pub const MS_INVALIDATE: ::c_int = 0x0002; |
| 3460 |
pub const MS_SYNC: ::c_int = 0x0010; |
| 3461 |
|
| 3462 |
pub const MS_KILLPAGES: ::c_int = 0x0004; |
| 3463 |
pub const MS_DEACTIVATE: ::c_int = 0x0008; |
| 3464 |
|
| 3465 |
pub const EPERM: ::c_int = 1; |
| 3466 |
pub const ENOENT: ::c_int = 2; |
| 3467 |
pub const ESRCH: ::c_int = 3; |
| 3468 |
pub const EINTR: ::c_int = 4; |
| 3469 |
pub const EIO: ::c_int = 5; |
| 3470 |
pub const ENXIO: ::c_int = 6; |
| 3471 |
pub const E2BIG: ::c_int = 7; |
| 3472 |
pub const ENOEXEC: ::c_int = 8; |
| 3473 |
pub const EBADF: ::c_int = 9; |
| 3474 |
pub const ECHILD: ::c_int = 10; |
| 3475 |
pub const EDEADLK: ::c_int = 11; |
| 3476 |
pub const ENOMEM: ::c_int = 12; |
| 3477 |
pub const EACCES: ::c_int = 13; |
| 3478 |
pub const EFAULT: ::c_int = 14; |
| 3479 |
pub const ENOTBLK: ::c_int = 15; |
| 3480 |
pub const EBUSY: ::c_int = 16; |
| 3481 |
pub const EEXIST: ::c_int = 17; |
| 3482 |
pub const EXDEV: ::c_int = 18; |
| 3483 |
pub const ENODEV: ::c_int = 19; |
| 3484 |
pub const ENOTDIR: ::c_int = 20; |
| 3485 |
pub const EISDIR: ::c_int = 21; |
| 3486 |
pub const EINVAL: ::c_int = 22; |
| 3487 |
pub const ENFILE: ::c_int = 23; |
| 3488 |
pub const EMFILE: ::c_int = 24; |
| 3489 |
pub const ENOTTY: ::c_int = 25; |
| 3490 |
pub const ETXTBSY: ::c_int = 26; |
| 3491 |
pub const EFBIG: ::c_int = 27; |
| 3492 |
pub const ENOSPC: ::c_int = 28; |
| 3493 |
pub const ESPIPE: ::c_int = 29; |
| 3494 |
pub const EROFS: ::c_int = 30; |
| 3495 |
pub const EMLINK: ::c_int = 31; |
| 3496 |
pub const EPIPE: ::c_int = 32; |
| 3497 |
pub const EDOM: ::c_int = 33; |
| 3498 |
pub const ERANGE: ::c_int = 34; |
| 3499 |
pub const EAGAIN: ::c_int = 35; |
| 3500 |
pub const EWOULDBLOCK: ::c_int = EAGAIN; |
| 3501 |
pub const EINPROGRESS: ::c_int = 36; |
| 3502 |
pub const EALREADY: ::c_int = 37; |
| 3503 |
pub const ENOTSOCK: ::c_int = 38; |
| 3504 |
pub const EDESTADDRREQ: ::c_int = 39; |
| 3505 |
pub const EMSGSIZE: ::c_int = 40; |
| 3506 |
pub const EPROTOTYPE: ::c_int = 41; |
| 3507 |
pub const ENOPROTOOPT: ::c_int = 42; |
| 3508 |
pub const EPROTONOSUPPORT: ::c_int = 43; |
| 3509 |
pub const ESOCKTNOSUPPORT: ::c_int = 44; |
| 3510 |
pub const ENOTSUP: ::c_int = 45; |
| 3511 |
pub const EPFNOSUPPORT: ::c_int = 46; |
| 3512 |
pub const EAFNOSUPPORT: ::c_int = 47; |
| 3513 |
pub const EADDRINUSE: ::c_int = 48; |
| 3514 |
pub const EADDRNOTAVAIL: ::c_int = 49; |
| 3515 |
pub const ENETDOWN: ::c_int = 50; |
| 3516 |
pub const ENETUNREACH: ::c_int = 51; |
| 3517 |
pub const ENETRESET: ::c_int = 52; |
| 3518 |
pub const ECONNABORTED: ::c_int = 53; |
| 3519 |
pub const ECONNRESET: ::c_int = 54; |
| 3520 |
pub const ENOBUFS: ::c_int = 55; |
| 3521 |
pub const EISCONN: ::c_int = 56; |
| 3522 |
pub const ENOTCONN: ::c_int = 57; |
| 3523 |
pub const ESHUTDOWN: ::c_int = 58; |
| 3524 |
pub const ETOOMANYREFS: ::c_int = 59; |
| 3525 |
pub const ETIMEDOUT: ::c_int = 60; |
| 3526 |
pub const ECONNREFUSED: ::c_int = 61; |
| 3527 |
pub const ELOOP: ::c_int = 62; |
| 3528 |
pub const ENAMETOOLONG: ::c_int = 63; |
| 3529 |
pub const EHOSTDOWN: ::c_int = 64; |
| 3530 |
pub const EHOSTUNREACH: ::c_int = 65; |
| 3531 |
pub const ENOTEMPTY: ::c_int = 66; |
| 3532 |
pub const EPROCLIM: ::c_int = 67; |
| 3533 |
pub const EUSERS: ::c_int = 68; |
| 3534 |
pub const EDQUOT: ::c_int = 69; |
| 3535 |
pub const ESTALE: ::c_int = 70; |
| 3536 |
pub const EREMOTE: ::c_int = 71; |
| 3537 |
pub const EBADRPC: ::c_int = 72; |
| 3538 |
pub const ERPCMISMATCH: ::c_int = 73; |
| 3539 |
pub const EPROGUNAVAIL: ::c_int = 74; |
| 3540 |
pub const EPROGMISMATCH: ::c_int = 75; |
| 3541 |
pub const EPROCUNAVAIL: ::c_int = 76; |
| 3542 |
pub const ENOLCK: ::c_int = 77; |
| 3543 |
pub const ENOSYS: ::c_int = 78; |
| 3544 |
pub const EFTYPE: ::c_int = 79; |
| 3545 |
pub const EAUTH: ::c_int = 80; |
| 3546 |
pub const ENEEDAUTH: ::c_int = 81; |
| 3547 |
pub const EPWROFF: ::c_int = 82; |
| 3548 |
pub const EDEVERR: ::c_int = 83; |
| 3549 |
pub const EOVERFLOW: ::c_int = 84; |
| 3550 |
pub const EBADEXEC: ::c_int = 85; |
| 3551 |
pub const EBADARCH: ::c_int = 86; |
| 3552 |
pub const ESHLIBVERS: ::c_int = 87; |
| 3553 |
pub const EBADMACHO: ::c_int = 88; |
| 3554 |
pub const ECANCELED: ::c_int = 89; |
| 3555 |
pub const EIDRM: ::c_int = 90; |
| 3556 |
pub const ENOMSG: ::c_int = 91; |
| 3557 |
pub const EILSEQ: ::c_int = 92; |
| 3558 |
pub const ENOATTR: ::c_int = 93; |
| 3559 |
pub const EBADMSG: ::c_int = 94; |
| 3560 |
pub const EMULTIHOP: ::c_int = 95; |
| 3561 |
pub const ENODATA: ::c_int = 96; |
| 3562 |
pub const ENOLINK: ::c_int = 97; |
| 3563 |
pub const ENOSR: ::c_int = 98; |
| 3564 |
pub const ENOSTR: ::c_int = 99; |
| 3565 |
pub const EPROTO: ::c_int = 100; |
| 3566 |
pub const ETIME: ::c_int = 101; |
| 3567 |
pub const EOPNOTSUPP: ::c_int = 102; |
| 3568 |
pub const ENOPOLICY: ::c_int = 103; |
| 3569 |
pub const ENOTRECOVERABLE: ::c_int = 104; |
| 3570 |
pub const EOWNERDEAD: ::c_int = 105; |
| 3571 |
pub const EQFULL: ::c_int = 106; |
| 3572 |
pub const ELAST: ::c_int = 106; |
| 3573 |
|
| 3574 |
pub const EAI_AGAIN: ::c_int = 2; |
| 3575 |
pub const EAI_BADFLAGS: ::c_int = 3; |
| 3576 |
pub const EAI_FAIL: ::c_int = 4; |
| 3577 |
pub const EAI_FAMILY: ::c_int = 5; |
| 3578 |
pub const EAI_MEMORY: ::c_int = 6; |
| 3579 |
pub const EAI_NODATA: ::c_int = 7; |
| 3580 |
pub const EAI_NONAME: ::c_int = 8; |
| 3581 |
pub const EAI_SERVICE: ::c_int = 9; |
| 3582 |
pub const EAI_SOCKTYPE: ::c_int = 10; |
| 3583 |
pub const EAI_SYSTEM: ::c_int = 11; |
| 3584 |
pub const EAI_OVERFLOW: ::c_int = 14; |
| 3585 |
|
| 3586 |
pub const F_DUPFD: ::c_int = 0; |
| 3587 |
pub const F_DUPFD_CLOEXEC: ::c_int = 67; |
| 3588 |
pub const F_GETFD: ::c_int = 1; |
| 3589 |
pub const F_SETFD: ::c_int = 2; |
| 3590 |
pub const F_GETFL: ::c_int = 3; |
| 3591 |
pub const F_SETFL: ::c_int = 4; |
| 3592 |
pub const F_PREALLOCATE: ::c_int = 42; |
| 3593 |
pub const F_RDADVISE: ::c_int = 44; |
| 3594 |
pub const F_RDAHEAD: ::c_int = 45; |
| 3595 |
pub const F_NOCACHE: ::c_int = 48; |
| 3596 |
pub const F_LOG2PHYS: ::c_int = 49; |
| 3597 |
pub const F_GETPATH: ::c_int = 50; |
| 3598 |
pub const F_FULLFSYNC: ::c_int = 51; |
| 3599 |
pub const F_FREEZE_FS: ::c_int = 53; |
| 3600 |
pub const F_THAW_FS: ::c_int = 54; |
| 3601 |
pub const F_GLOBAL_NOCACHE: ::c_int = 55; |
| 3602 |
pub const F_NODIRECT: ::c_int = 62; |
| 3603 |
pub const F_LOG2PHYS_EXT: ::c_int = 65; |
| 3604 |
pub const F_BARRIERFSYNC: ::c_int = 85; |
| 3605 |
pub const F_PUNCHHOLE: ::c_int = 99; |
| 3606 |
pub const F_TRIM_ACTIVE_FILE: ::c_int = 100; |
| 3607 |
pub const F_SPECULATIVE_READ: ::c_int = 101; |
| 3608 |
pub const F_GETPATH_NOFIRMLINK: ::c_int = 102; |
| 3609 |
|
| 3610 |
pub const F_ALLOCATECONTIG: ::c_uint = 0x02; |
| 3611 |
pub const F_ALLOCATEALL: ::c_uint = 0x04; |
| 3612 |
|
| 3613 |
pub const F_PEOFPOSMODE: ::c_int = 3; |
| 3614 |
pub const F_VOLPOSMODE: ::c_int = 4; |
| 3615 |
|
| 3616 |
pub const AT_FDCWD: ::c_int = -2; |
| 3617 |
pub const AT_EACCESS: ::c_int = 0x0010; |
| 3618 |
pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x0020; |
| 3619 |
pub const AT_SYMLINK_FOLLOW: ::c_int = 0x0040; |
| 3620 |
pub const AT_REMOVEDIR: ::c_int = 0x0080; |
| 3621 |
|
| 3622 |
pub const PTHREAD_INTROSPECTION_THREAD_CREATE: ::c_uint = 1; |
| 3623 |
pub const PTHREAD_INTROSPECTION_THREAD_START: ::c_uint = 2; |
| 3624 |
pub const PTHREAD_INTROSPECTION_THREAD_TERMINATE: ::c_uint = 3; |
| 3625 |
pub const PTHREAD_INTROSPECTION_THREAD_DESTROY: ::c_uint = 4; |
| 3626 |
|
| 3627 |
pub const TIOCMODG: ::c_ulong = 0x40047403; |
| 3628 |
pub const TIOCMODS: ::c_ulong = 0x80047404; |
| 3629 |
pub const TIOCM_LE: ::c_int = 0x1; |
| 3630 |
pub const TIOCM_DTR: ::c_int = 0x2; |
| 3631 |
pub const TIOCM_RTS: ::c_int = 0x4; |
| 3632 |
pub const TIOCM_ST: ::c_int = 0x8; |
| 3633 |
pub const TIOCM_SR: ::c_int = 0x10; |
| 3634 |
pub const TIOCM_CTS: ::c_int = 0x20; |
| 3635 |
pub const TIOCM_CAR: ::c_int = 0x40; |
| 3636 |
pub const TIOCM_CD: ::c_int = 0x40; |
| 3637 |
pub const TIOCM_RNG: ::c_int = 0x80; |
| 3638 |
pub const TIOCM_RI: ::c_int = 0x80; |
| 3639 |
pub const TIOCM_DSR: ::c_int = 0x100; |
| 3640 |
pub const TIOCEXCL: ::c_int = 0x2000740d; |
| 3641 |
pub const TIOCNXCL: ::c_int = 0x2000740e; |
| 3642 |
pub const TIOCFLUSH: ::c_ulong = 0x80047410; |
| 3643 |
pub const TIOCGETD: ::c_ulong = 0x4004741a; |
| 3644 |
pub const TIOCSETD: ::c_ulong = 0x8004741b; |
| 3645 |
pub const TIOCIXON: ::c_uint = 0x20007481; |
| 3646 |
pub const TIOCIXOFF: ::c_uint = 0x20007480; |
| 3647 |
pub const TIOCSDTR: ::c_uint = 0x20007479; |
| 3648 |
pub const TIOCCDTR: ::c_uint = 0x20007478; |
| 3649 |
pub const TIOCGPGRP: ::c_ulong = 0x40047477; |
| 3650 |
pub const TIOCSPGRP: ::c_ulong = 0x80047476; |
| 3651 |
pub const TIOCOUTQ: ::c_ulong = 0x40047473; |
| 3652 |
pub const TIOCSTI: ::c_ulong = 0x80017472; |
| 3653 |
pub const TIOCNOTTY: ::c_uint = 0x20007471; |
| 3654 |
pub const TIOCPKT: ::c_ulong = 0x80047470; |
| 3655 |
pub const TIOCPKT_DATA: ::c_int = 0x0; |
| 3656 |
pub const TIOCPKT_FLUSHREAD: ::c_int = 0x1; |
| 3657 |
pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x2; |
| 3658 |
pub const TIOCPKT_STOP: ::c_int = 0x4; |
| 3659 |
pub const TIOCPKT_START: ::c_int = 0x8; |
| 3660 |
pub const TIOCPKT_NOSTOP: ::c_int = 0x10; |
| 3661 |
pub const TIOCPKT_DOSTOP: ::c_int = 0x20; |
| 3662 |
pub const TIOCPKT_IOCTL: ::c_int = 0x40; |
| 3663 |
pub const TIOCSTOP: ::c_uint = 0x2000746f; |
| 3664 |
pub const TIOCSTART: ::c_uint = 0x2000746e; |
| 3665 |
pub const TIOCMSET: ::c_ulong = 0x8004746d; |
| 3666 |
pub const TIOCMBIS: ::c_ulong = 0x8004746c; |
| 3667 |
pub const TIOCMBIC: ::c_ulong = 0x8004746b; |
| 3668 |
pub const TIOCMGET: ::c_ulong = 0x4004746a; |
| 3669 |
pub const TIOCREMOTE: ::c_ulong = 0x80047469; |
| 3670 |
pub const TIOCGWINSZ: ::c_ulong = 0x40087468; |
| 3671 |
pub const TIOCSWINSZ: ::c_ulong = 0x80087467; |
| 3672 |
pub const TIOCUCNTL: ::c_ulong = 0x80047466; |
| 3673 |
pub const TIOCSTAT: ::c_uint = 0x20007465; |
| 3674 |
pub const TIOCSCONS: ::c_uint = 0x20007463; |
| 3675 |
pub const TIOCCONS: ::c_ulong = 0x80047462; |
| 3676 |
pub const TIOCSCTTY: ::c_uint = 0x20007461; |
| 3677 |
pub const TIOCEXT: ::c_ulong = 0x80047460; |
| 3678 |
pub const TIOCSIG: ::c_uint = 0x2000745f; |
| 3679 |
pub const TIOCDRAIN: ::c_uint = 0x2000745e; |
| 3680 |
pub const TIOCMSDTRWAIT: ::c_ulong = 0x8004745b; |
| 3681 |
pub const TIOCMGDTRWAIT: ::c_ulong = 0x4004745a; |
| 3682 |
pub const TIOCSDRAINWAIT: ::c_ulong = 0x80047457; |
| 3683 |
pub const TIOCGDRAINWAIT: ::c_ulong = 0x40047456; |
| 3684 |
pub const TIOCDSIMICROCODE: ::c_uint = 0x20007455; |
| 3685 |
pub const TIOCPTYGRANT: ::c_uint = 0x20007454; |
| 3686 |
pub const TIOCPTYGNAME: ::c_uint = 0x40807453; |
| 3687 |
pub const TIOCPTYUNLK: ::c_uint = 0x20007452; |
| 3688 |
|
| 3689 |
pub const BIOCGRSIG: ::c_ulong = 0x40044272; |
| 3690 |
pub const BIOCSRSIG: ::c_ulong = 0x80044273; |
| 3691 |
pub const BIOCSDLT: ::c_ulong = 0x80044278; |
| 3692 |
pub const BIOCGSEESENT: ::c_ulong = 0x40044276; |
| 3693 |
pub const BIOCSSEESENT: ::c_ulong = 0x80044277; |
| 3694 |
pub const BIOCGDLTLIST: ::c_ulong = 0xc00c4279; |
| 3695 |
|
| 3696 |
pub const FIODTYPE: ::c_ulong = 0x4004667a; |
| 3697 |
|
| 3698 |
pub const B0: speed_t = 0; |
| 3699 |
pub const B50: speed_t = 50; |
| 3700 |
pub const B75: speed_t = 75; |
| 3701 |
pub const B110: speed_t = 110; |
| 3702 |
pub const B134: speed_t = 134; |
| 3703 |
pub const B150: speed_t = 150; |
| 3704 |
pub const B200: speed_t = 200; |
| 3705 |
pub const B300: speed_t = 300; |
| 3706 |
pub const B600: speed_t = 600; |
| 3707 |
pub const B1200: speed_t = 1200; |
| 3708 |
pub const B1800: speed_t = 1800; |
| 3709 |
pub const B2400: speed_t = 2400; |
| 3710 |
pub const B4800: speed_t = 4800; |
| 3711 |
pub const B9600: speed_t = 9600; |
| 3712 |
pub const B19200: speed_t = 19200; |
| 3713 |
pub const B38400: speed_t = 38400; |
| 3714 |
pub const B7200: speed_t = 7200; |
| 3715 |
pub const B14400: speed_t = 14400; |
| 3716 |
pub const B28800: speed_t = 28800; |
| 3717 |
pub const B57600: speed_t = 57600; |
| 3718 |
pub const B76800: speed_t = 76800; |
| 3719 |
pub const B115200: speed_t = 115200; |
| 3720 |
pub const B230400: speed_t = 230400; |
| 3721 |
pub const EXTA: speed_t = 19200; |
| 3722 |
pub const EXTB: speed_t = 38400; |
| 3723 |
|
| 3724 |
pub const SIGTRAP: ::c_int = 5; |
| 3725 |
|
| 3726 |
pub const GLOB_APPEND: ::c_int = 0x0001; |
| 3727 |
pub const GLOB_DOOFFS: ::c_int = 0x0002; |
| 3728 |
pub const GLOB_ERR: ::c_int = 0x0004; |
| 3729 |
pub const GLOB_MARK: ::c_int = 0x0008; |
| 3730 |
pub const GLOB_NOCHECK: ::c_int = 0x0010; |
| 3731 |
pub const GLOB_NOSORT: ::c_int = 0x0020; |
| 3732 |
pub const GLOB_NOESCAPE: ::c_int = 0x2000; |
| 3733 |
|
| 3734 |
pub const GLOB_NOSPACE: ::c_int = -1; |
| 3735 |
pub const GLOB_ABORTED: ::c_int = -2; |
| 3736 |
pub const GLOB_NOMATCH: ::c_int = -3; |
| 3737 |
|
| 3738 |
pub const POSIX_MADV_NORMAL: ::c_int = 0; |
| 3739 |
pub const POSIX_MADV_RANDOM: ::c_int = 1; |
| 3740 |
pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; |
| 3741 |
pub const POSIX_MADV_WILLNEED: ::c_int = 3; |
| 3742 |
pub const POSIX_MADV_DONTNEED: ::c_int = 4; |
| 3743 |
|
| 3744 |
pub const _SC_IOV_MAX: ::c_int = 56; |
| 3745 |
pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70; |
| 3746 |
pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71; |
| 3747 |
pub const _SC_LOGIN_NAME_MAX: ::c_int = 73; |
| 3748 |
pub const _SC_MQ_PRIO_MAX: ::c_int = 75; |
| 3749 |
pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82; |
| 3750 |
pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83; |
| 3751 |
pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85; |
| 3752 |
pub const _SC_THREAD_KEYS_MAX: ::c_int = 86; |
| 3753 |
pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87; |
| 3754 |
pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88; |
| 3755 |
pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89; |
| 3756 |
pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90; |
| 3757 |
pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91; |
| 3758 |
pub const _SC_THREAD_STACK_MIN: ::c_int = 93; |
| 3759 |
pub const _SC_THREAD_THREADS_MAX: ::c_int = 94; |
| 3760 |
pub const _SC_THREADS: ::c_int = 96; |
| 3761 |
pub const _SC_TTY_NAME_MAX: ::c_int = 101; |
| 3762 |
pub const _SC_ATEXIT_MAX: ::c_int = 107; |
| 3763 |
pub const _SC_XOPEN_CRYPT: ::c_int = 108; |
| 3764 |
pub const _SC_XOPEN_ENH_I18N: ::c_int = 109; |
| 3765 |
pub const _SC_XOPEN_LEGACY: ::c_int = 110; |
| 3766 |
pub const _SC_XOPEN_REALTIME: ::c_int = 111; |
| 3767 |
pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112; |
| 3768 |
pub const _SC_XOPEN_SHM: ::c_int = 113; |
| 3769 |
pub const _SC_XOPEN_UNIX: ::c_int = 115; |
| 3770 |
pub const _SC_XOPEN_VERSION: ::c_int = 116; |
| 3771 |
pub const _SC_XOPEN_XCU_VERSION: ::c_int = 121; |
| 3772 |
pub const _SC_PHYS_PAGES: ::c_int = 200; |
| 3773 |
|
| 3774 |
pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 2; |
| 3775 |
pub const PTHREAD_PROCESS_SHARED: ::c_int = 1; |
| 3776 |
pub const PTHREAD_CREATE_JOINABLE: ::c_int = 1; |
| 3777 |
pub const PTHREAD_CREATE_DETACHED: ::c_int = 2; |
| 3778 |
#[cfg(target_arch = "aarch64")] |
| 3779 |
pub const PTHREAD_STACK_MIN: ::size_t = 16384; |
| 3780 |
#[cfg(not(target_arch = "aarch64"))] |
| 3781 |
pub const PTHREAD_STACK_MIN: ::size_t = 8192; |
| 3782 |
|
| 3783 |
pub const RLIMIT_CPU: ::c_int = 0; |
| 3784 |
pub const RLIMIT_FSIZE: ::c_int = 1; |
| 3785 |
pub const RLIMIT_DATA: ::c_int = 2; |
| 3786 |
pub const RLIMIT_STACK: ::c_int = 3; |
| 3787 |
pub const RLIMIT_CORE: ::c_int = 4; |
| 3788 |
pub const RLIMIT_AS: ::c_int = 5; |
| 3789 |
pub const RLIMIT_RSS: ::c_int = RLIMIT_AS; |
| 3790 |
pub const RLIMIT_MEMLOCK: ::c_int = 6; |
| 3791 |
pub const RLIMIT_NPROC: ::c_int = 7; |
| 3792 |
pub const RLIMIT_NOFILE: ::c_int = 8; |
| 3793 |
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")] |
| 3794 |
pub const RLIM_NLIMITS: ::c_int = 9; |
| 3795 |
pub const _RLIMIT_POSIX_FLAG: ::c_int = 0x1000; |
| 3796 |
|
| 3797 |
pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff; |
| 3798 |
|
| 3799 |
pub const RUSAGE_SELF: ::c_int = 0; |
| 3800 |
pub const RUSAGE_CHILDREN: ::c_int = -1; |
| 3801 |
|
| 3802 |
pub const MADV_NORMAL: ::c_int = 0; |
| 3803 |
pub const MADV_RANDOM: ::c_int = 1; |
| 3804 |
pub const MADV_SEQUENTIAL: ::c_int = 2; |
| 3805 |
pub const MADV_WILLNEED: ::c_int = 3; |
| 3806 |
pub const MADV_DONTNEED: ::c_int = 4; |
| 3807 |
pub const MADV_FREE: ::c_int = 5; |
| 3808 |
pub const MADV_ZERO_WIRED_PAGES: ::c_int = 6; |
| 3809 |
pub const MADV_FREE_REUSABLE: ::c_int = 7; |
| 3810 |
pub const MADV_FREE_REUSE: ::c_int = 8; |
| 3811 |
pub const MADV_CAN_REUSE: ::c_int = 9; |
| 3812 |
|
| 3813 |
pub const MINCORE_INCORE: ::c_int = 0x1; |
| 3814 |
pub const MINCORE_REFERENCED: ::c_int = 0x2; |
| 3815 |
pub const MINCORE_MODIFIED: ::c_int = 0x4; |
| 3816 |
pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8; |
| 3817 |
pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10; |
| 3818 |
|
| 3819 |
pub const CTLIOCGINFO: c_ulong = 0xc0644e03; |
| 3820 |
|
| 3821 |
// |
| 3822 |
// sys/netinet/in.h |
| 3823 |
// Protocols (RFC 1700) |
| 3824 |
// NOTE: These are in addition to the constants defined in src/unix/mod.rs |
| 3825 |
|
| 3826 |
// IPPROTO_IP defined in src/unix/mod.rs |
| 3827 |
/// IP6 hop-by-hop options |
| 3828 |
pub const IPPROTO_HOPOPTS: ::c_int = 0; |
| 3829 |
// IPPROTO_ICMP defined in src/unix/mod.rs |
| 3830 |
/// group mgmt protocol |
| 3831 |
pub const IPPROTO_IGMP: ::c_int = 2; |
| 3832 |
/// gateway<sup>2</sup> (deprecated) |
| 3833 |
pub const IPPROTO_GGP: ::c_int = 3; |
| 3834 |
/// for compatibility |
| 3835 |
pub const IPPROTO_IPIP: ::c_int = 4; |
| 3836 |
// IPPROTO_TCP defined in src/unix/mod.rs |
| 3837 |
/// Stream protocol II. |
| 3838 |
pub const IPPROTO_ST: ::c_int = 7; |
| 3839 |
/// exterior gateway protocol |
| 3840 |
pub const IPPROTO_EGP: ::c_int = 8; |
| 3841 |
/// private interior gateway |
| 3842 |
pub const IPPROTO_PIGP: ::c_int = 9; |
| 3843 |
/// BBN RCC Monitoring |
| 3844 |
pub const IPPROTO_RCCMON: ::c_int = 10; |
| 3845 |
/// network voice protocol |
| 3846 |
pub const IPPROTO_NVPII: ::c_int = 11; |
| 3847 |
/// pup |
| 3848 |
pub const IPPROTO_PUP: ::c_int = 12; |
| 3849 |
/// Argus |
| 3850 |
pub const IPPROTO_ARGUS: ::c_int = 13; |
| 3851 |
/// EMCON |
| 3852 |
pub const IPPROTO_EMCON: ::c_int = 14; |
| 3853 |
/// Cross Net Debugger |
| 3854 |
pub const IPPROTO_XNET: ::c_int = 15; |
| 3855 |
/// Chaos |
| 3856 |
pub const IPPROTO_CHAOS: ::c_int = 16; |
| 3857 |
// IPPROTO_UDP defined in src/unix/mod.rs |
| 3858 |
/// Multiplexing |
| 3859 |
pub const IPPROTO_MUX: ::c_int = 18; |
| 3860 |
/// DCN Measurement Subsystems |
| 3861 |
pub const IPPROTO_MEAS: ::c_int = 19; |
| 3862 |
/// Host Monitoring |
| 3863 |
pub const IPPROTO_HMP: ::c_int = 20; |
| 3864 |
/// Packet Radio Measurement |
| 3865 |
pub const IPPROTO_PRM: ::c_int = 21; |
| 3866 |
/// xns idp |
| 3867 |
pub const IPPROTO_IDP: ::c_int = 22; |
| 3868 |
/// Trunk-1 |
| 3869 |
pub const IPPROTO_TRUNK1: ::c_int = 23; |
| 3870 |
/// Trunk-2 |
| 3871 |
pub const IPPROTO_TRUNK2: ::c_int = 24; |
| 3872 |
/// Leaf-1 |
| 3873 |
pub const IPPROTO_LEAF1: ::c_int = 25; |
| 3874 |
/// Leaf-2 |
| 3875 |
pub const IPPROTO_LEAF2: ::c_int = 26; |
| 3876 |
/// Reliable Data |
| 3877 |
pub const IPPROTO_RDP: ::c_int = 27; |
| 3878 |
/// Reliable Transaction |
| 3879 |
pub const IPPROTO_IRTP: ::c_int = 28; |
| 3880 |
/// tp-4 w/ class negotiation |
| 3881 |
pub const IPPROTO_TP: ::c_int = 29; |
| 3882 |
/// Bulk Data Transfer |
| 3883 |
pub const IPPROTO_BLT: ::c_int = 30; |
| 3884 |
/// Network Services |
| 3885 |
pub const IPPROTO_NSP: ::c_int = 31; |
| 3886 |
/// Merit Internodal |
| 3887 |
pub const IPPROTO_INP: ::c_int = 32; |
| 3888 |
/// Sequential Exchange |
| 3889 |
pub const IPPROTO_SEP: ::c_int = 33; |
| 3890 |
/// Third Party Connect |
| 3891 |
pub const IPPROTO_3PC: ::c_int = 34; |
| 3892 |
/// InterDomain Policy Routing |
| 3893 |
pub const IPPROTO_IDPR: ::c_int = 35; |
| 3894 |
/// XTP |
| 3895 |
pub const IPPROTO_XTP: ::c_int = 36; |
| 3896 |
/// Datagram Delivery |
| 3897 |
pub const IPPROTO_DDP: ::c_int = 37; |
| 3898 |
/// Control Message Transport |
| 3899 |
pub const IPPROTO_CMTP: ::c_int = 38; |
| 3900 |
/// TP++ Transport |
| 3901 |
pub const IPPROTO_TPXX: ::c_int = 39; |
| 3902 |
/// IL transport protocol |
| 3903 |
pub const IPPROTO_IL: ::c_int = 40; |
| 3904 |
// IPPROTO_IPV6 defined in src/unix/mod.rs |
| 3905 |
/// Source Demand Routing |
| 3906 |
pub const IPPROTO_SDRP: ::c_int = 42; |
| 3907 |
/// IP6 routing header |
| 3908 |
pub const IPPROTO_ROUTING: ::c_int = 43; |
| 3909 |
/// IP6 fragmentation header |
| 3910 |
pub const IPPROTO_FRAGMENT: ::c_int = 44; |
| 3911 |
/// InterDomain Routing |
| 3912 |
pub const IPPROTO_IDRP: ::c_int = 45; |
| 3913 |
/// resource reservation |
| 3914 |
pub const IPPROTO_RSVP: ::c_int = 46; |
| 3915 |
/// General Routing Encap. |
| 3916 |
pub const IPPROTO_GRE: ::c_int = 47; |
| 3917 |
/// Mobile Host Routing |
| 3918 |
pub const IPPROTO_MHRP: ::c_int = 48; |
| 3919 |
/// BHA |
| 3920 |
pub const IPPROTO_BHA: ::c_int = 49; |
| 3921 |
/// IP6 Encap Sec. Payload |
| 3922 |
pub const IPPROTO_ESP: ::c_int = 50; |
| 3923 |
/// IP6 Auth Header |
| 3924 |
pub const IPPROTO_AH: ::c_int = 51; |
| 3925 |
/// Integ. Net Layer Security |
| 3926 |
pub const IPPROTO_INLSP: ::c_int = 52; |
| 3927 |
/// IP with encryption |
| 3928 |
pub const IPPROTO_SWIPE: ::c_int = 53; |
| 3929 |
/// Next Hop Resolution |
| 3930 |
pub const IPPROTO_NHRP: ::c_int = 54; |
| 3931 |
/* 55-57: Unassigned */ |
| 3932 |
// IPPROTO_ICMPV6 defined in src/unix/mod.rs |
| 3933 |
/// IP6 no next header |
| 3934 |
pub const IPPROTO_NONE: ::c_int = 59; |
| 3935 |
/// IP6 destination option |
| 3936 |
pub const IPPROTO_DSTOPTS: ::c_int = 60; |
| 3937 |
/// any host internal protocol |
| 3938 |
pub const IPPROTO_AHIP: ::c_int = 61; |
| 3939 |
/// CFTP |
| 3940 |
pub const IPPROTO_CFTP: ::c_int = 62; |
| 3941 |
/// "hello" routing protocol |
| 3942 |
pub const IPPROTO_HELLO: ::c_int = 63; |
| 3943 |
/// SATNET/Backroom EXPAK |
| 3944 |
pub const IPPROTO_SATEXPAK: ::c_int = 64; |
| 3945 |
/// Kryptolan |
| 3946 |
pub const IPPROTO_KRYPTOLAN: ::c_int = 65; |
| 3947 |
/// Remote Virtual Disk |
| 3948 |
pub const IPPROTO_RVD: ::c_int = 66; |
| 3949 |
/// Pluribus Packet Core |
| 3950 |
pub const IPPROTO_IPPC: ::c_int = 67; |
| 3951 |
/// Any distributed FS |
| 3952 |
pub const IPPROTO_ADFS: ::c_int = 68; |
| 3953 |
/// Satnet Monitoring |
| 3954 |
pub const IPPROTO_SATMON: ::c_int = 69; |
| 3955 |
/// VISA Protocol |
| 3956 |
pub const IPPROTO_VISA: ::c_int = 70; |
| 3957 |
/// Packet Core Utility |
| 3958 |
pub const IPPROTO_IPCV: ::c_int = 71; |
| 3959 |
/// Comp. Prot. Net. Executive |
| 3960 |
pub const IPPROTO_CPNX: ::c_int = 72; |
| 3961 |
/// Comp. Prot. HeartBeat |
| 3962 |
pub const IPPROTO_CPHB: ::c_int = 73; |
| 3963 |
/// Wang Span Network |
| 3964 |
pub const IPPROTO_WSN: ::c_int = 74; |
| 3965 |
/// Packet Video Protocol |
| 3966 |
pub const IPPROTO_PVP: ::c_int = 75; |
| 3967 |
/// BackRoom SATNET Monitoring |
| 3968 |
pub const IPPROTO_BRSATMON: ::c_int = 76; |
| 3969 |
/// Sun net disk proto (temp.) |
| 3970 |
pub const IPPROTO_ND: ::c_int = 77; |
| 3971 |
/// WIDEBAND Monitoring |
| 3972 |
pub const IPPROTO_WBMON: ::c_int = 78; |
| 3973 |
/// WIDEBAND EXPAK |
| 3974 |
pub const IPPROTO_WBEXPAK: ::c_int = 79; |
| 3975 |
/// ISO cnlp |
| 3976 |
pub const IPPROTO_EON: ::c_int = 80; |
| 3977 |
/// VMTP |
| 3978 |
pub const IPPROTO_VMTP: ::c_int = 81; |
| 3979 |
/// Secure VMTP |
| 3980 |
pub const IPPROTO_SVMTP: ::c_int = 82; |
| 3981 |
/// Banyon VINES |
| 3982 |
pub const IPPROTO_VINES: ::c_int = 83; |
| 3983 |
/// TTP |
| 3984 |
pub const IPPROTO_TTP: ::c_int = 84; |
| 3985 |
/// NSFNET-IGP |
| 3986 |
pub const IPPROTO_IGP: ::c_int = 85; |
| 3987 |
/// dissimilar gateway prot. |
| 3988 |
pub const IPPROTO_DGP: ::c_int = 86; |
| 3989 |
/// TCF |
| 3990 |
pub const IPPROTO_TCF: ::c_int = 87; |
| 3991 |
/// Cisco/GXS IGRP |
| 3992 |
pub const IPPROTO_IGRP: ::c_int = 88; |
| 3993 |
/// OSPFIGP |
| 3994 |
pub const IPPROTO_OSPFIGP: ::c_int = 89; |
| 3995 |
/// Strite RPC protocol |
| 3996 |
pub const IPPROTO_SRPC: ::c_int = 90; |
| 3997 |
/// Locus Address Resoloution |
| 3998 |
pub const IPPROTO_LARP: ::c_int = 91; |
| 3999 |
/// Multicast Transport |
| 4000 |
pub const IPPROTO_MTP: ::c_int = 92; |
| 4001 |
/// AX.25 Frames |
| 4002 |
pub const IPPROTO_AX25: ::c_int = 93; |
| 4003 |
/// IP encapsulated in IP |
| 4004 |
pub const IPPROTO_IPEIP: ::c_int = 94; |
| 4005 |
/// Mobile Int.ing control |
| 4006 |
pub const IPPROTO_MICP: ::c_int = 95; |
| 4007 |
/// Semaphore Comm. security |
| 4008 |
pub const IPPROTO_SCCSP: ::c_int = 96; |
| 4009 |
/// Ethernet IP encapsulation |
| 4010 |
pub const IPPROTO_ETHERIP: ::c_int = 97; |
| 4011 |
/// encapsulation header |
| 4012 |
pub const IPPROTO_ENCAP: ::c_int = 98; |
| 4013 |
/// any private encr. scheme |
| 4014 |
pub const IPPROTO_APES: ::c_int = 99; |
| 4015 |
/// GMTP |
| 4016 |
pub const IPPROTO_GMTP: ::c_int = 100; |
| 4017 |
|
| 4018 |
/* 101-254: Partly Unassigned */ |
| 4019 |
/// Protocol Independent Mcast |
| 4020 |
pub const IPPROTO_PIM: ::c_int = 103; |
| 4021 |
/// payload compression (IPComp) |
| 4022 |
pub const IPPROTO_IPCOMP: ::c_int = 108; |
| 4023 |
/// PGM |
| 4024 |
pub const IPPROTO_PGM: ::c_int = 113; |
| 4025 |
/// SCTP |
| 4026 |
pub const IPPROTO_SCTP: ::c_int = 132; |
| 4027 |
|
| 4028 |
/* 255: Reserved */ |
| 4029 |
/* BSD Private, local use, namespace incursion */ |
| 4030 |
/// divert pseudo-protocol |
| 4031 |
pub const IPPROTO_DIVERT: ::c_int = 254; |
| 4032 |
/// raw IP packet |
| 4033 |
pub const IPPROTO_RAW: ::c_int = 255; |
| 4034 |
pub const IPPROTO_MAX: ::c_int = 256; |
| 4035 |
/// last return value of *_input(), meaning "all job for this pkt is done". |
| 4036 |
pub const IPPROTO_DONE: ::c_int = 257; |
| 4037 |
|
| 4038 |
pub const AF_UNSPEC: ::c_int = 0; |
| 4039 |
pub const AF_LOCAL: ::c_int = 1; |
| 4040 |
pub const AF_UNIX: ::c_int = AF_LOCAL; |
| 4041 |
pub const AF_INET: ::c_int = 2; |
| 4042 |
pub const AF_IMPLINK: ::c_int = 3; |
| 4043 |
pub const AF_PUP: ::c_int = 4; |
| 4044 |
pub const AF_CHAOS: ::c_int = 5; |
| 4045 |
pub const AF_NS: ::c_int = 6; |
| 4046 |
pub const AF_ISO: ::c_int = 7; |
| 4047 |
pub const AF_OSI: ::c_int = AF_ISO; |
| 4048 |
pub const AF_ECMA: ::c_int = 8; |
| 4049 |
pub const AF_DATAKIT: ::c_int = 9; |
| 4050 |
pub const AF_CCITT: ::c_int = 10; |
| 4051 |
pub const AF_SNA: ::c_int = 11; |
| 4052 |
pub const AF_DECnet: ::c_int = 12; |
| 4053 |
pub const AF_DLI: ::c_int = 13; |
| 4054 |
pub const AF_LAT: ::c_int = 14; |
| 4055 |
pub const AF_HYLINK: ::c_int = 15; |
| 4056 |
pub const AF_APPLETALK: ::c_int = 16; |
| 4057 |
pub const AF_ROUTE: ::c_int = 17; |
| 4058 |
pub const AF_LINK: ::c_int = 18; |
| 4059 |
pub const pseudo_AF_XTP: ::c_int = 19; |
| 4060 |
pub const AF_COIP: ::c_int = 20; |
| 4061 |
pub const AF_CNT: ::c_int = 21; |
| 4062 |
pub const pseudo_AF_RTIP: ::c_int = 22; |
| 4063 |
pub const AF_IPX: ::c_int = 23; |
| 4064 |
pub const AF_SIP: ::c_int = 24; |
| 4065 |
pub const pseudo_AF_PIP: ::c_int = 25; |
| 4066 |
pub const AF_NDRV: ::c_int = 27; |
| 4067 |
pub const AF_ISDN: ::c_int = 28; |
| 4068 |
pub const AF_E164: ::c_int = AF_ISDN; |
| 4069 |
pub const pseudo_AF_KEY: ::c_int = 29; |
| 4070 |
pub const AF_INET6: ::c_int = 30; |
| 4071 |
pub const AF_NATM: ::c_int = 31; |
| 4072 |
pub const AF_SYSTEM: ::c_int = 32; |
| 4073 |
pub const AF_NETBIOS: ::c_int = 33; |
| 4074 |
pub const AF_PPP: ::c_int = 34; |
| 4075 |
pub const pseudo_AF_HDRCMPLT: ::c_int = 35; |
| 4076 |
pub const AF_IEEE80211: ::c_int = 37; |
| 4077 |
pub const AF_UTUN: ::c_int = 38; |
| 4078 |
pub const AF_VSOCK: ::c_int = 40; |
| 4079 |
pub const AF_SYS_CONTROL: ::c_int = 2; |
| 4080 |
|
| 4081 |
pub const SYSPROTO_EVENT: ::c_int = 1; |
| 4082 |
pub const SYSPROTO_CONTROL: ::c_int = 2; |
| 4083 |
|
| 4084 |
pub const PF_UNSPEC: ::c_int = AF_UNSPEC; |
| 4085 |
pub const PF_LOCAL: ::c_int = AF_LOCAL; |
| 4086 |
pub const PF_UNIX: ::c_int = PF_LOCAL; |
| 4087 |
pub const PF_INET: ::c_int = AF_INET; |
| 4088 |
pub const PF_IMPLINK: ::c_int = AF_IMPLINK; |
| 4089 |
pub const PF_PUP: ::c_int = AF_PUP; |
| 4090 |
pub const PF_CHAOS: ::c_int = AF_CHAOS; |
| 4091 |
pub const PF_NS: ::c_int = AF_NS; |
| 4092 |
pub const PF_ISO: ::c_int = AF_ISO; |
| 4093 |
pub const PF_OSI: ::c_int = AF_ISO; |
| 4094 |
pub const PF_ECMA: ::c_int = AF_ECMA; |
| 4095 |
pub const PF_DATAKIT: ::c_int = AF_DATAKIT; |
| 4096 |
pub const PF_CCITT: ::c_int = AF_CCITT; |
| 4097 |
pub const PF_SNA: ::c_int = AF_SNA; |
| 4098 |
pub const PF_DECnet: ::c_int = AF_DECnet; |
| 4099 |
pub const PF_DLI: ::c_int = AF_DLI; |
| 4100 |
pub const PF_LAT: ::c_int = AF_LAT; |
| 4101 |
pub const PF_HYLINK: ::c_int = AF_HYLINK; |
| 4102 |
pub const PF_APPLETALK: ::c_int = AF_APPLETALK; |
| 4103 |
pub const PF_ROUTE: ::c_int = AF_ROUTE; |
| 4104 |
pub const PF_LINK: ::c_int = AF_LINK; |
| 4105 |
pub const PF_XTP: ::c_int = pseudo_AF_XTP; |
| 4106 |
pub const PF_COIP: ::c_int = AF_COIP; |
| 4107 |
pub const PF_CNT: ::c_int = AF_CNT; |
| 4108 |
pub const PF_SIP: ::c_int = AF_SIP; |
| 4109 |
pub const PF_IPX: ::c_int = AF_IPX; |
| 4110 |
pub const PF_RTIP: ::c_int = pseudo_AF_RTIP; |
| 4111 |
pub const PF_PIP: ::c_int = pseudo_AF_PIP; |
| 4112 |
pub const PF_NDRV: ::c_int = AF_NDRV; |
| 4113 |
pub const PF_ISDN: ::c_int = AF_ISDN; |
| 4114 |
pub const PF_KEY: ::c_int = pseudo_AF_KEY; |
| 4115 |
pub const PF_INET6: ::c_int = AF_INET6; |
| 4116 |
pub const PF_NATM: ::c_int = AF_NATM; |
| 4117 |
pub const PF_SYSTEM: ::c_int = AF_SYSTEM; |
| 4118 |
pub const PF_NETBIOS: ::c_int = AF_NETBIOS; |
| 4119 |
pub const PF_PPP: ::c_int = AF_PPP; |
| 4120 |
pub const PF_VSOCK: ::c_int = AF_VSOCK; |
| 4121 |
|
| 4122 |
pub const NET_RT_DUMP: ::c_int = 1; |
| 4123 |
pub const NET_RT_FLAGS: ::c_int = 2; |
| 4124 |
pub const NET_RT_IFLIST: ::c_int = 3; |
| 4125 |
|
| 4126 |
pub const SOMAXCONN: ::c_int = 128; |
| 4127 |
|
| 4128 |
pub const SOCK_MAXADDRLEN: ::c_int = 255; |
| 4129 |
|
| 4130 |
pub const SOCK_STREAM: ::c_int = 1; |
| 4131 |
pub const SOCK_DGRAM: ::c_int = 2; |
| 4132 |
pub const SOCK_RAW: ::c_int = 3; |
| 4133 |
pub const SOCK_RDM: ::c_int = 4; |
| 4134 |
pub const SOCK_SEQPACKET: ::c_int = 5; |
| 4135 |
pub const IP_TTL: ::c_int = 4; |
| 4136 |
pub const IP_HDRINCL: ::c_int = 2; |
| 4137 |
pub const IP_RECVDSTADDR: ::c_int = 7; |
| 4138 |
pub const IP_ADD_MEMBERSHIP: ::c_int = 12; |
| 4139 |
pub const IP_DROP_MEMBERSHIP: ::c_int = 13; |
| 4140 |
pub const IP_RECVIF: ::c_int = 20; |
| 4141 |
pub const IP_RECVTTL: ::c_int = 24; |
| 4142 |
pub const IP_BOUND_IF: ::c_int = 25; |
| 4143 |
pub const IP_PKTINFO: ::c_int = 26; |
| 4144 |
pub const IP_RECVTOS: ::c_int = 27; |
| 4145 |
pub const IP_DONTFRAG: ::c_int = 28; |
| 4146 |
pub const IPV6_JOIN_GROUP: ::c_int = 12; |
| 4147 |
pub const IPV6_LEAVE_GROUP: ::c_int = 13; |
| 4148 |
pub const IPV6_CHECKSUM: ::c_int = 26; |
| 4149 |
pub const IPV6_RECVTCLASS: ::c_int = 35; |
| 4150 |
pub const IPV6_TCLASS: ::c_int = 36; |
| 4151 |
pub const IPV6_RECVHOPLIMIT: ::c_int = 37; |
| 4152 |
pub const IPV6_PKTINFO: ::c_int = 46; |
| 4153 |
pub const IPV6_HOPLIMIT: ::c_int = 47; |
| 4154 |
pub const IPV6_RECVPKTINFO: ::c_int = 61; |
| 4155 |
pub const IPV6_DONTFRAG: ::c_int = 62; |
| 4156 |
pub const IP_ADD_SOURCE_MEMBERSHIP: ::c_int = 70; |
| 4157 |
pub const IP_DROP_SOURCE_MEMBERSHIP: ::c_int = 71; |
| 4158 |
pub const IP_BLOCK_SOURCE: ::c_int = 72; |
| 4159 |
pub const IP_UNBLOCK_SOURCE: ::c_int = 73; |
| 4160 |
pub const IPV6_BOUND_IF: ::c_int = 125; |
| 4161 |
|
| 4162 |
pub const TCP_NOPUSH: ::c_int = 4; |
| 4163 |
pub const TCP_NOOPT: ::c_int = 8; |
| 4164 |
pub const TCP_KEEPALIVE: ::c_int = 0x10; |
| 4165 |
pub const TCP_KEEPINTVL: ::c_int = 0x101; |
| 4166 |
pub const TCP_KEEPCNT: ::c_int = 0x102; |
| 4167 |
/// Enable/Disable TCP Fastopen on this socket |
| 4168 |
pub const TCP_FASTOPEN: ::c_int = 0x105; |
| 4169 |
pub const TCP_CONNECTION_INFO: ::c_int = 0x106; |
| 4170 |
|
| 4171 |
pub const SOL_LOCAL: ::c_int = 0; |
| 4172 |
|
| 4173 |
pub const LOCAL_PEERCRED: ::c_int = 0x001; |
| 4174 |
pub const LOCAL_PEERPID: ::c_int = 0x002; |
| 4175 |
pub const LOCAL_PEEREPID: ::c_int = 0x003; |
| 4176 |
pub const LOCAL_PEERUUID: ::c_int = 0x004; |
| 4177 |
pub const LOCAL_PEEREUUID: ::c_int = 0x005; |
| 4178 |
|
| 4179 |
pub const SOL_SOCKET: ::c_int = 0xffff; |
| 4180 |
|
| 4181 |
pub const SO_DEBUG: ::c_int = 0x01; |
| 4182 |
pub const SO_ACCEPTCONN: ::c_int = 0x0002; |
| 4183 |
pub const SO_REUSEADDR: ::c_int = 0x0004; |
| 4184 |
pub const SO_KEEPALIVE: ::c_int = 0x0008; |
| 4185 |
pub const SO_DONTROUTE: ::c_int = 0x0010; |
| 4186 |
pub const SO_BROADCAST: ::c_int = 0x0020; |
| 4187 |
pub const SO_USELOOPBACK: ::c_int = 0x0040; |
| 4188 |
pub const SO_LINGER: ::c_int = 0x0080; |
| 4189 |
pub const SO_OOBINLINE: ::c_int = 0x0100; |
| 4190 |
pub const SO_REUSEPORT: ::c_int = 0x0200; |
| 4191 |
pub const SO_TIMESTAMP: ::c_int = 0x0400; |
| 4192 |
pub const SO_TIMESTAMP_MONOTONIC: ::c_int = 0x0800; |
| 4193 |
pub const SO_DONTTRUNC: ::c_int = 0x2000; |
| 4194 |
pub const SO_WANTMORE: ::c_int = 0x4000; |
| 4195 |
pub const SO_WANTOOBFLAG: ::c_int = 0x8000; |
| 4196 |
pub const SO_SNDBUF: ::c_int = 0x1001; |
| 4197 |
pub const SO_RCVBUF: ::c_int = 0x1002; |
| 4198 |
pub const SO_SNDLOWAT: ::c_int = 0x1003; |
| 4199 |
pub const SO_RCVLOWAT: ::c_int = 0x1004; |
| 4200 |
pub const SO_SNDTIMEO: ::c_int = 0x1005; |
| 4201 |
pub const SO_RCVTIMEO: ::c_int = 0x1006; |
| 4202 |
pub const SO_ERROR: ::c_int = 0x1007; |
| 4203 |
pub const SO_TYPE: ::c_int = 0x1008; |
| 4204 |
pub const SO_LABEL: ::c_int = 0x1010; |
| 4205 |
pub const SO_PEERLABEL: ::c_int = 0x1011; |
| 4206 |
pub const SO_NREAD: ::c_int = 0x1020; |
| 4207 |
pub const SO_NKE: ::c_int = 0x1021; |
| 4208 |
pub const SO_NOSIGPIPE: ::c_int = 0x1022; |
| 4209 |
pub const SO_NOADDRERR: ::c_int = 0x1023; |
| 4210 |
pub const SO_NWRITE: ::c_int = 0x1024; |
| 4211 |
pub const SO_REUSESHAREUID: ::c_int = 0x1025; |
| 4212 |
pub const SO_NOTIFYCONFLICT: ::c_int = 0x1026; |
| 4213 |
pub const SO_LINGER_SEC: ::c_int = 0x1080; |
| 4214 |
pub const SO_RANDOMPORT: ::c_int = 0x1082; |
| 4215 |
pub const SO_NP_EXTENSIONS: ::c_int = 0x1083; |
| 4216 |
|
| 4217 |
pub const MSG_OOB: ::c_int = 0x1; |
| 4218 |
pub const MSG_PEEK: ::c_int = 0x2; |
| 4219 |
pub const MSG_DONTROUTE: ::c_int = 0x4; |
| 4220 |
pub const MSG_EOR: ::c_int = 0x8; |
| 4221 |
pub const MSG_TRUNC: ::c_int = 0x10; |
| 4222 |
pub const MSG_CTRUNC: ::c_int = 0x20; |
| 4223 |
pub const MSG_WAITALL: ::c_int = 0x40; |
| 4224 |
pub const MSG_DONTWAIT: ::c_int = 0x80; |
| 4225 |
pub const MSG_EOF: ::c_int = 0x100; |
| 4226 |
pub const MSG_FLUSH: ::c_int = 0x400; |
| 4227 |
pub const MSG_HOLD: ::c_int = 0x800; |
| 4228 |
pub const MSG_SEND: ::c_int = 0x1000; |
| 4229 |
pub const MSG_HAVEMORE: ::c_int = 0x2000; |
| 4230 |
pub const MSG_RCVMORE: ::c_int = 0x4000; |
| 4231 |
pub const MSG_NEEDSA: ::c_int = 0x10000; |
| 4232 |
pub const MSG_NOSIGNAL: ::c_int = 0x80000; |
| 4233 |
|
| 4234 |
pub const SCM_TIMESTAMP: ::c_int = 0x02; |
| 4235 |
pub const SCM_CREDS: ::c_int = 0x03; |
| 4236 |
|
| 4237 |
// https://github.com/aosm/xnu/blob/HEAD/bsd/net/if.h#L140-L156 |
| 4238 |
pub const IFF_UP: ::c_int = 0x1; // interface is up |
| 4239 |
pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid |
| 4240 |
pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging |
| 4241 |
pub const IFF_LOOPBACK: ::c_int = 0x8; // is a loopback net |
| 4242 |
pub const IFF_POINTOPOINT: ::c_int = 0x10; // interface is point-to-point link |
| 4243 |
pub const IFF_NOTRAILERS: ::c_int = 0x20; // obsolete: avoid use of trailers |
| 4244 |
pub const IFF_RUNNING: ::c_int = 0x40; // resources allocated |
| 4245 |
pub const IFF_NOARP: ::c_int = 0x80; // no address resolution protocol |
| 4246 |
pub const IFF_PROMISC: ::c_int = 0x100; // receive all packets |
| 4247 |
pub const IFF_ALLMULTI: ::c_int = 0x200; // receive all multicast packets |
| 4248 |
pub const IFF_OACTIVE: ::c_int = 0x400; // transmission in progress |
| 4249 |
pub const IFF_SIMPLEX: ::c_int = 0x800; // can't hear own transmissions |
| 4250 |
pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit |
| 4251 |
pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit |
| 4252 |
pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit |
| 4253 |
pub const IFF_ALTPHYS: ::c_int = IFF_LINK2; // use alternate physical connection |
| 4254 |
pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast |
| 4255 |
|
| 4256 |
pub const SHUT_RD: ::c_int = 0; |
| 4257 |
pub const SHUT_WR: ::c_int = 1; |
| 4258 |
pub const SHUT_RDWR: ::c_int = 2; |
| 4259 |
|
| 4260 |
pub const SAE_ASSOCID_ANY: ::sae_associd_t = 0; |
| 4261 |
/// ((sae_associd_t)(-1ULL)) |
| 4262 |
pub const SAE_ASSOCID_ALL: ::sae_associd_t = 0xffffffff; |
| 4263 |
|
| 4264 |
pub const SAE_CONNID_ANY: ::sae_connid_t = 0; |
| 4265 |
/// ((sae_connid_t)(-1ULL)) |
| 4266 |
pub const SAE_CONNID_ALL: ::sae_connid_t = 0xffffffff; |
| 4267 |
|
| 4268 |
// connectx() flag parameters |
| 4269 |
|
| 4270 |
/// resume connect() on read/write |
| 4271 |
pub const CONNECT_RESUME_ON_READ_WRITE: ::c_uint = 0x1; |
| 4272 |
/// data is idempotent |
| 4273 |
pub const CONNECT_DATA_IDEMPOTENT: ::c_uint = 0x2; |
| 4274 |
/// data includes security that replaces the TFO-cookie |
| 4275 |
pub const CONNECT_DATA_AUTHENTICATED: ::c_uint = 0x4; |
| 4276 |
|
| 4277 |
pub const LOCK_SH: ::c_int = 1; |
| 4278 |
pub const LOCK_EX: ::c_int = 2; |
| 4279 |
pub const LOCK_NB: ::c_int = 4; |
| 4280 |
pub const LOCK_UN: ::c_int = 8; |
| 4281 |
|
| 4282 |
pub const MAP_COPY: ::c_int = 0x0002; |
| 4283 |
pub const MAP_RENAME: ::c_int = 0x0020; |
| 4284 |
pub const MAP_NORESERVE: ::c_int = 0x0040; |
| 4285 |
pub const MAP_NOEXTEND: ::c_int = 0x0100; |
| 4286 |
pub const MAP_HASSEMAPHORE: ::c_int = 0x0200; |
| 4287 |
pub const MAP_NOCACHE: ::c_int = 0x0400; |
| 4288 |
pub const MAP_JIT: ::c_int = 0x0800; |
| 4289 |
|
| 4290 |
pub const _SC_ARG_MAX: ::c_int = 1; |
| 4291 |
pub const _SC_CHILD_MAX: ::c_int = 2; |
| 4292 |
pub const _SC_CLK_TCK: ::c_int = 3; |
| 4293 |
pub const _SC_NGROUPS_MAX: ::c_int = 4; |
| 4294 |
pub const _SC_OPEN_MAX: ::c_int = 5; |
| 4295 |
pub const _SC_JOB_CONTROL: ::c_int = 6; |
| 4296 |
pub const _SC_SAVED_IDS: ::c_int = 7; |
| 4297 |
pub const _SC_VERSION: ::c_int = 8; |
| 4298 |
pub const _SC_BC_BASE_MAX: ::c_int = 9; |
| 4299 |
pub const _SC_BC_DIM_MAX: ::c_int = 10; |
| 4300 |
pub const _SC_BC_SCALE_MAX: ::c_int = 11; |
| 4301 |
pub const _SC_BC_STRING_MAX: ::c_int = 12; |
| 4302 |
pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13; |
| 4303 |
pub const _SC_EXPR_NEST_MAX: ::c_int = 14; |
| 4304 |
pub const _SC_LINE_MAX: ::c_int = 15; |
| 4305 |
pub const _SC_RE_DUP_MAX: ::c_int = 16; |
| 4306 |
pub const _SC_2_VERSION: ::c_int = 17; |
| 4307 |
pub const _SC_2_C_BIND: ::c_int = 18; |
| 4308 |
pub const _SC_2_C_DEV: ::c_int = 19; |
| 4309 |
pub const _SC_2_CHAR_TERM: ::c_int = 20; |
| 4310 |
pub const _SC_2_FORT_DEV: ::c_int = 21; |
| 4311 |
pub const _SC_2_FORT_RUN: ::c_int = 22; |
| 4312 |
pub const _SC_2_LOCALEDEF: ::c_int = 23; |
| 4313 |
pub const _SC_2_SW_DEV: ::c_int = 24; |
| 4314 |
pub const _SC_2_UPE: ::c_int = 25; |
| 4315 |
pub const _SC_STREAM_MAX: ::c_int = 26; |
| 4316 |
pub const _SC_TZNAME_MAX: ::c_int = 27; |
| 4317 |
pub const _SC_ASYNCHRONOUS_IO: ::c_int = 28; |
| 4318 |
pub const _SC_PAGESIZE: ::c_int = 29; |
| 4319 |
pub const _SC_MEMLOCK: ::c_int = 30; |
| 4320 |
pub const _SC_MEMLOCK_RANGE: ::c_int = 31; |
| 4321 |
pub const _SC_MEMORY_PROTECTION: ::c_int = 32; |
| 4322 |
pub const _SC_MESSAGE_PASSING: ::c_int = 33; |
| 4323 |
pub const _SC_PRIORITIZED_IO: ::c_int = 34; |
| 4324 |
pub const _SC_PRIORITY_SCHEDULING: ::c_int = 35; |
| 4325 |
pub const _SC_REALTIME_SIGNALS: ::c_int = 36; |
| 4326 |
pub const _SC_SEMAPHORES: ::c_int = 37; |
| 4327 |
pub const _SC_FSYNC: ::c_int = 38; |
| 4328 |
pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 39; |
| 4329 |
pub const _SC_SYNCHRONIZED_IO: ::c_int = 40; |
| 4330 |
pub const _SC_TIMERS: ::c_int = 41; |
| 4331 |
pub const _SC_AIO_LISTIO_MAX: ::c_int = 42; |
| 4332 |
pub const _SC_AIO_MAX: ::c_int = 43; |
| 4333 |
pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44; |
| 4334 |
pub const _SC_DELAYTIMER_MAX: ::c_int = 45; |
| 4335 |
pub const _SC_MQ_OPEN_MAX: ::c_int = 46; |
| 4336 |
pub const _SC_MAPPED_FILES: ::c_int = 47; |
| 4337 |
pub const _SC_RTSIG_MAX: ::c_int = 48; |
| 4338 |
pub const _SC_SEM_NSEMS_MAX: ::c_int = 49; |
| 4339 |
pub const _SC_SEM_VALUE_MAX: ::c_int = 50; |
| 4340 |
pub const _SC_SIGQUEUE_MAX: ::c_int = 51; |
| 4341 |
pub const _SC_TIMER_MAX: ::c_int = 52; |
| 4342 |
pub const _SC_NPROCESSORS_CONF: ::c_int = 57; |
| 4343 |
pub const _SC_NPROCESSORS_ONLN: ::c_int = 58; |
| 4344 |
pub const _SC_2_PBS: ::c_int = 59; |
| 4345 |
pub const _SC_2_PBS_ACCOUNTING: ::c_int = 60; |
| 4346 |
pub const _SC_2_PBS_CHECKPOINT: ::c_int = 61; |
| 4347 |
pub const _SC_2_PBS_LOCATE: ::c_int = 62; |
| 4348 |
pub const _SC_2_PBS_MESSAGE: ::c_int = 63; |
| 4349 |
pub const _SC_2_PBS_TRACK: ::c_int = 64; |
| 4350 |
pub const _SC_ADVISORY_INFO: ::c_int = 65; |
| 4351 |
pub const _SC_BARRIERS: ::c_int = 66; |
| 4352 |
pub const _SC_CLOCK_SELECTION: ::c_int = 67; |
| 4353 |
pub const _SC_CPUTIME: ::c_int = 68; |
| 4354 |
pub const _SC_FILE_LOCKING: ::c_int = 69; |
| 4355 |
pub const _SC_HOST_NAME_MAX: ::c_int = 72; |
| 4356 |
pub const _SC_MONOTONIC_CLOCK: ::c_int = 74; |
| 4357 |
pub const _SC_READER_WRITER_LOCKS: ::c_int = 76; |
| 4358 |
pub const _SC_REGEXP: ::c_int = 77; |
| 4359 |
pub const _SC_SHELL: ::c_int = 78; |
| 4360 |
pub const _SC_SPAWN: ::c_int = 79; |
| 4361 |
pub const _SC_SPIN_LOCKS: ::c_int = 80; |
| 4362 |
pub const _SC_SPORADIC_SERVER: ::c_int = 81; |
| 4363 |
pub const _SC_THREAD_CPUTIME: ::c_int = 84; |
| 4364 |
pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 92; |
| 4365 |
pub const _SC_TIMEOUTS: ::c_int = 95; |
| 4366 |
pub const _SC_TRACE: ::c_int = 97; |
| 4367 |
pub const _SC_TRACE_EVENT_FILTER: ::c_int = 98; |
| 4368 |
pub const _SC_TRACE_INHERIT: ::c_int = 99; |
| 4369 |
pub const _SC_TRACE_LOG: ::c_int = 100; |
| 4370 |
pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 102; |
| 4371 |
pub const _SC_V6_ILP32_OFF32: ::c_int = 103; |
| 4372 |
pub const _SC_V6_ILP32_OFFBIG: ::c_int = 104; |
| 4373 |
pub const _SC_V6_LP64_OFF64: ::c_int = 105; |
| 4374 |
pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 106; |
| 4375 |
pub const _SC_IPV6: ::c_int = 118; |
| 4376 |
pub const _SC_RAW_SOCKETS: ::c_int = 119; |
| 4377 |
pub const _SC_SYMLOOP_MAX: ::c_int = 120; |
| 4378 |
pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; |
| 4379 |
pub const _SC_XOPEN_STREAMS: ::c_int = 114; |
| 4380 |
pub const _SC_XBS5_ILP32_OFF32: ::c_int = 122; |
| 4381 |
pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 123; |
| 4382 |
pub const _SC_XBS5_LP64_OFF64: ::c_int = 124; |
| 4383 |
pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 125; |
| 4384 |
pub const _SC_SS_REPL_MAX: ::c_int = 126; |
| 4385 |
pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 127; |
| 4386 |
pub const _SC_TRACE_NAME_MAX: ::c_int = 128; |
| 4387 |
pub const _SC_TRACE_SYS_MAX: ::c_int = 129; |
| 4388 |
pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 130; |
| 4389 |
pub const _SC_PASS_MAX: ::c_int = 131; |
| 4390 |
// `confstr` keys (only the values guaranteed by `man confstr`). |
| 4391 |
pub const _CS_PATH: ::c_int = 1; |
| 4392 |
pub const _CS_DARWIN_USER_DIR: ::c_int = 65536; |
| 4393 |
pub const _CS_DARWIN_USER_TEMP_DIR: ::c_int = 65537; |
| 4394 |
pub const _CS_DARWIN_USER_CACHE_DIR: ::c_int = 65538; |
| 4395 |
|
| 4396 |
pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; |
| 4397 |
pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1; |
| 4398 |
pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; |
| 4399 |
pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL; |
| 4400 |
pub const _PTHREAD_MUTEX_SIG_init: ::c_long = 0x32AAABA7; |
| 4401 |
pub const _PTHREAD_COND_SIG_init: ::c_long = 0x3CB0B1BB; |
| 4402 |
pub const _PTHREAD_RWLOCK_SIG_init: ::c_long = 0x2DA8B3B4; |
| 4403 |
pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { |
| 4404 |
__sig: _PTHREAD_MUTEX_SIG_init, |
| 4405 |
__opaque: [0; __PTHREAD_MUTEX_SIZE__], |
| 4406 |
}; |
| 4407 |
pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { |
| 4408 |
__sig: _PTHREAD_COND_SIG_init, |
| 4409 |
__opaque: [0; __PTHREAD_COND_SIZE__], |
| 4410 |
}; |
| 4411 |
pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { |
| 4412 |
__sig: _PTHREAD_RWLOCK_SIG_init, |
| 4413 |
__opaque: [0; __PTHREAD_RWLOCK_SIZE__], |
| 4414 |
}; |
| 4415 |
|
| 4416 |
pub const OS_UNFAIR_LOCK_INIT: os_unfair_lock = os_unfair_lock { |
| 4417 |
_os_unfair_lock_opaque: 0, |
| 4418 |
}; |
| 4419 |
|
| 4420 |
pub const OS_LOG_TYPE_DEFAULT: ::os_log_type_t = 0x00; |
| 4421 |
pub const OS_LOG_TYPE_INFO: ::os_log_type_t = 0x01; |
| 4422 |
pub const OS_LOG_TYPE_DEBUG: ::os_log_type_t = 0x02; |
| 4423 |
pub const OS_LOG_TYPE_ERROR: ::os_log_type_t = 0x10; |
| 4424 |
pub const OS_LOG_TYPE_FAULT: ::os_log_type_t = 0x11; |
| 4425 |
|
| 4426 |
pub const OS_SIGNPOST_EVENT: ::os_signpost_type_t = 0x00; |
| 4427 |
pub const OS_SIGNPOST_INTERVAL_BEGIN: ::os_signpost_type_t = 0x01; |
| 4428 |
pub const OS_SIGNPOST_INTERVAL_END: ::os_signpost_type_t = 0x02; |
| 4429 |
|
| 4430 |
pub const MINSIGSTKSZ: ::size_t = 32768; |
| 4431 |
pub const SIGSTKSZ: ::size_t = 131072; |
| 4432 |
|
| 4433 |
pub const FD_SETSIZE: usize = 1024; |
| 4434 |
|
| 4435 |
pub const ST_NOSUID: ::c_ulong = 2; |
| 4436 |
|
| 4437 |
pub const SCHED_OTHER: ::c_int = 1; |
| 4438 |
pub const SCHED_FIFO: ::c_int = 4; |
| 4439 |
pub const SCHED_RR: ::c_int = 2; |
| 4440 |
|
| 4441 |
pub const EVFILT_READ: i16 = -1; |
| 4442 |
pub const EVFILT_WRITE: i16 = -2; |
| 4443 |
pub const EVFILT_AIO: i16 = -3; |
| 4444 |
pub const EVFILT_VNODE: i16 = -4; |
| 4445 |
pub const EVFILT_PROC: i16 = -5; |
| 4446 |
pub const EVFILT_SIGNAL: i16 = -6; |
| 4447 |
pub const EVFILT_TIMER: i16 = -7; |
| 4448 |
pub const EVFILT_MACHPORT: i16 = -8; |
| 4449 |
pub const EVFILT_FS: i16 = -9; |
| 4450 |
pub const EVFILT_USER: i16 = -10; |
| 4451 |
pub const EVFILT_VM: i16 = -12; |
| 4452 |
|
| 4453 |
pub const EV_ADD: u16 = 0x1; |
| 4454 |
pub const EV_DELETE: u16 = 0x2; |
| 4455 |
pub const EV_ENABLE: u16 = 0x4; |
| 4456 |
pub const EV_DISABLE: u16 = 0x8; |
| 4457 |
pub const EV_ONESHOT: u16 = 0x10; |
| 4458 |
pub const EV_CLEAR: u16 = 0x20; |
| 4459 |
pub const EV_RECEIPT: u16 = 0x40; |
| 4460 |
pub const EV_DISPATCH: u16 = 0x80; |
| 4461 |
pub const EV_FLAG0: u16 = 0x1000; |
| 4462 |
pub const EV_POLL: u16 = 0x1000; |
| 4463 |
pub const EV_FLAG1: u16 = 0x2000; |
| 4464 |
pub const EV_OOBAND: u16 = 0x2000; |
| 4465 |
pub const EV_ERROR: u16 = 0x4000; |
| 4466 |
pub const EV_EOF: u16 = 0x8000; |
| 4467 |
pub const EV_SYSFLAGS: u16 = 0xf000; |
| 4468 |
|
| 4469 |
pub const NOTE_TRIGGER: u32 = 0x01000000; |
| 4470 |
pub const NOTE_FFNOP: u32 = 0x00000000; |
| 4471 |
pub const NOTE_FFAND: u32 = 0x40000000; |
| 4472 |
pub const NOTE_FFOR: u32 = 0x80000000; |
| 4473 |
pub const NOTE_FFCOPY: u32 = 0xc0000000; |
| 4474 |
pub const NOTE_FFCTRLMASK: u32 = 0xc0000000; |
| 4475 |
pub const NOTE_FFLAGSMASK: u32 = 0x00ffffff; |
| 4476 |
pub const NOTE_LOWAT: u32 = 0x00000001; |
| 4477 |
pub const NOTE_DELETE: u32 = 0x00000001; |
| 4478 |
pub const NOTE_WRITE: u32 = 0x00000002; |
| 4479 |
pub const NOTE_EXTEND: u32 = 0x00000004; |
| 4480 |
pub const NOTE_ATTRIB: u32 = 0x00000008; |
| 4481 |
pub const NOTE_LINK: u32 = 0x00000010; |
| 4482 |
pub const NOTE_RENAME: u32 = 0x00000020; |
| 4483 |
pub const NOTE_REVOKE: u32 = 0x00000040; |
| 4484 |
pub const NOTE_NONE: u32 = 0x00000080; |
| 4485 |
pub const NOTE_EXIT: u32 = 0x80000000; |
| 4486 |
pub const NOTE_FORK: u32 = 0x40000000; |
| 4487 |
pub const NOTE_EXEC: u32 = 0x20000000; |
| 4488 |
#[doc(hidden)] |
| 4489 |
#[deprecated(since = "0.2.49", note = "Deprecated since MacOSX 10.9")] |
| 4490 |
pub const NOTE_REAP: u32 = 0x10000000; |
| 4491 |
pub const NOTE_SIGNAL: u32 = 0x08000000; |
| 4492 |
pub const NOTE_EXITSTATUS: u32 = 0x04000000; |
| 4493 |
pub const NOTE_EXIT_DETAIL: u32 = 0x02000000; |
| 4494 |
pub const NOTE_PDATAMASK: u32 = 0x000fffff; |
| 4495 |
pub const NOTE_PCTRLMASK: u32 = 0xfff00000; |
| 4496 |
#[doc(hidden)] |
| 4497 |
#[deprecated(since = "0.2.49", note = "Deprecated since MacOSX 10.9")] |
| 4498 |
pub const NOTE_EXIT_REPARENTED: u32 = 0x00080000; |
| 4499 |
pub const NOTE_EXIT_DETAIL_MASK: u32 = 0x00070000; |
| 4500 |
pub const NOTE_EXIT_DECRYPTFAIL: u32 = 0x00010000; |
| 4501 |
pub const NOTE_EXIT_MEMORY: u32 = 0x00020000; |
| 4502 |
pub const NOTE_EXIT_CSERROR: u32 = 0x00040000; |
| 4503 |
pub const NOTE_VM_PRESSURE: u32 = 0x80000000; |
| 4504 |
pub const NOTE_VM_PRESSURE_TERMINATE: u32 = 0x40000000; |
| 4505 |
pub const NOTE_VM_PRESSURE_SUDDEN_TERMINATE: u32 = 0x20000000; |
| 4506 |
pub const NOTE_VM_ERROR: u32 = 0x10000000; |
| 4507 |
pub const NOTE_SECONDS: u32 = 0x00000001; |
| 4508 |
pub const NOTE_USECONDS: u32 = 0x00000002; |
| 4509 |
pub const NOTE_NSECONDS: u32 = 0x00000004; |
| 4510 |
pub const NOTE_ABSOLUTE: u32 = 0x00000008; |
| 4511 |
pub const NOTE_LEEWAY: u32 = 0x00000010; |
| 4512 |
pub const NOTE_CRITICAL: u32 = 0x00000020; |
| 4513 |
pub const NOTE_BACKGROUND: u32 = 0x00000040; |
| 4514 |
pub const NOTE_TRACK: u32 = 0x00000001; |
| 4515 |
pub const NOTE_TRACKERR: u32 = 0x00000002; |
| 4516 |
pub const NOTE_CHILD: u32 = 0x00000004; |
| 4517 |
|
| 4518 |
pub const OCRNL: ::tcflag_t = 0x00000010; |
| 4519 |
pub const ONOCR: ::tcflag_t = 0x00000020; |
| 4520 |
pub const ONLRET: ::tcflag_t = 0x00000040; |
| 4521 |
pub const OFILL: ::tcflag_t = 0x00000080; |
| 4522 |
pub const NLDLY: ::tcflag_t = 0x00000300; |
| 4523 |
pub const TABDLY: ::tcflag_t = 0x00000c04; |
| 4524 |
pub const CRDLY: ::tcflag_t = 0x00003000; |
| 4525 |
pub const FFDLY: ::tcflag_t = 0x00004000; |
| 4526 |
pub const BSDLY: ::tcflag_t = 0x00008000; |
| 4527 |
pub const VTDLY: ::tcflag_t = 0x00010000; |
| 4528 |
pub const OFDEL: ::tcflag_t = 0x00020000; |
| 4529 |
|
| 4530 |
pub const NL0: ::tcflag_t = 0x00000000; |
| 4531 |
pub const NL1: ::tcflag_t = 0x00000100; |
| 4532 |
pub const TAB0: ::tcflag_t = 0x00000000; |
| 4533 |
pub const TAB1: ::tcflag_t = 0x00000400; |
| 4534 |
pub const TAB2: ::tcflag_t = 0x00000800; |
| 4535 |
pub const CR0: ::tcflag_t = 0x00000000; |
| 4536 |
pub const CR1: ::tcflag_t = 0x00001000; |
| 4537 |
pub const CR2: ::tcflag_t = 0x00002000; |
| 4538 |
pub const CR3: ::tcflag_t = 0x00003000; |
| 4539 |
pub const FF0: ::tcflag_t = 0x00000000; |
| 4540 |
pub const FF1: ::tcflag_t = 0x00004000; |
| 4541 |
pub const BS0: ::tcflag_t = 0x00000000; |
| 4542 |
pub const BS1: ::tcflag_t = 0x00008000; |
| 4543 |
pub const TAB3: ::tcflag_t = 0x00000004; |
| 4544 |
pub const VT0: ::tcflag_t = 0x00000000; |
| 4545 |
pub const VT1: ::tcflag_t = 0x00010000; |
| 4546 |
pub const IUTF8: ::tcflag_t = 0x00004000; |
| 4547 |
pub const CRTSCTS: ::tcflag_t = 0x00030000; |
| 4548 |
|
| 4549 |
pub const NI_MAXHOST: ::socklen_t = 1025; |
| 4550 |
pub const NI_MAXSERV: ::socklen_t = 32; |
| 4551 |
pub const NI_NOFQDN: ::c_int = 0x00000001; |
| 4552 |
pub const NI_NUMERICHOST: ::c_int = 0x00000002; |
| 4553 |
pub const NI_NAMEREQD: ::c_int = 0x00000004; |
| 4554 |
pub const NI_NUMERICSERV: ::c_int = 0x00000008; |
| 4555 |
pub const NI_NUMERICSCOPE: ::c_int = 0x00000100; |
| 4556 |
pub const NI_DGRAM: ::c_int = 0x00000010; |
| 4557 |
|
| 4558 |
pub const Q_GETQUOTA: ::c_int = 0x300; |
| 4559 |
pub const Q_SETQUOTA: ::c_int = 0x400; |
| 4560 |
|
| 4561 |
pub const RENAME_SWAP: ::c_uint = 0x00000002; |
| 4562 |
pub const RENAME_EXCL: ::c_uint = 0x00000004; |
| 4563 |
|
| 4564 |
pub const RTLD_LOCAL: ::c_int = 0x4; |
| 4565 |
pub const RTLD_FIRST: ::c_int = 0x100; |
| 4566 |
pub const RTLD_NODELETE: ::c_int = 0x80; |
| 4567 |
pub const RTLD_NOLOAD: ::c_int = 0x10; |
| 4568 |
pub const RTLD_GLOBAL: ::c_int = 0x8; |
| 4569 |
pub const RTLD_MAIN_ONLY: *mut ::c_void = -5isize as *mut ::c_void; |
| 4570 |
|
| 4571 |
pub const _WSTOPPED: ::c_int = 0o177; |
| 4572 |
|
| 4573 |
pub const LOG_NETINFO: ::c_int = 12 << 3; |
| 4574 |
pub const LOG_REMOTEAUTH: ::c_int = 13 << 3; |
| 4575 |
pub const LOG_INSTALL: ::c_int = 14 << 3; |
| 4576 |
pub const LOG_RAS: ::c_int = 15 << 3; |
| 4577 |
pub const LOG_LAUNCHD: ::c_int = 24 << 3; |
| 4578 |
pub const LOG_NFACILITIES: ::c_int = 25; |
| 4579 |
|
| 4580 |
pub const CTLTYPE: ::c_int = 0xf; |
| 4581 |
pub const CTLTYPE_NODE: ::c_int = 1; |
| 4582 |
pub const CTLTYPE_INT: ::c_int = 2; |
| 4583 |
pub const CTLTYPE_STRING: ::c_int = 3; |
| 4584 |
pub const CTLTYPE_QUAD: ::c_int = 4; |
| 4585 |
pub const CTLTYPE_OPAQUE: ::c_int = 5; |
| 4586 |
pub const CTLTYPE_STRUCT: ::c_int = CTLTYPE_OPAQUE; |
| 4587 |
pub const CTLFLAG_RD: ::c_int = 0x80000000; |
| 4588 |
pub const CTLFLAG_WR: ::c_int = 0x40000000; |
| 4589 |
pub const CTLFLAG_RW: ::c_int = CTLFLAG_RD | CTLFLAG_WR; |
| 4590 |
pub const CTLFLAG_NOLOCK: ::c_int = 0x20000000; |
| 4591 |
pub const CTLFLAG_ANYBODY: ::c_int = 0x10000000; |
| 4592 |
pub const CTLFLAG_SECURE: ::c_int = 0x08000000; |
| 4593 |
pub const CTLFLAG_MASKED: ::c_int = 0x04000000; |
| 4594 |
pub const CTLFLAG_NOAUTO: ::c_int = 0x02000000; |
| 4595 |
pub const CTLFLAG_KERN: ::c_int = 0x01000000; |
| 4596 |
pub const CTLFLAG_LOCKED: ::c_int = 0x00800000; |
| 4597 |
pub const CTLFLAG_OID2: ::c_int = 0x00400000; |
| 4598 |
pub const CTL_UNSPEC: ::c_int = 0; |
| 4599 |
pub const CTL_KERN: ::c_int = 1; |
| 4600 |
pub const CTL_VM: ::c_int = 2; |
| 4601 |
pub const CTL_VFS: ::c_int = 3; |
| 4602 |
pub const CTL_NET: ::c_int = 4; |
| 4603 |
pub const CTL_DEBUG: ::c_int = 5; |
| 4604 |
pub const CTL_HW: ::c_int = 6; |
| 4605 |
pub const CTL_MACHDEP: ::c_int = 7; |
| 4606 |
pub const CTL_USER: ::c_int = 8; |
| 4607 |
pub const CTL_MAXID: ::c_int = 9; |
| 4608 |
pub const KERN_OSTYPE: ::c_int = 1; |
| 4609 |
pub const KERN_OSRELEASE: ::c_int = 2; |
| 4610 |
pub const KERN_OSREV: ::c_int = 3; |
| 4611 |
pub const KERN_VERSION: ::c_int = 4; |
| 4612 |
pub const KERN_MAXVNODES: ::c_int = 5; |
| 4613 |
pub const KERN_MAXPROC: ::c_int = 6; |
| 4614 |
pub const KERN_MAXFILES: ::c_int = 7; |
| 4615 |
pub const KERN_ARGMAX: ::c_int = 8; |
| 4616 |
pub const KERN_SECURELVL: ::c_int = 9; |
| 4617 |
pub const KERN_HOSTNAME: ::c_int = 10; |
| 4618 |
pub const KERN_HOSTID: ::c_int = 11; |
| 4619 |
pub const KERN_CLOCKRATE: ::c_int = 12; |
| 4620 |
pub const KERN_VNODE: ::c_int = 13; |
| 4621 |
pub const KERN_PROC: ::c_int = 14; |
| 4622 |
pub const KERN_FILE: ::c_int = 15; |
| 4623 |
pub const KERN_PROF: ::c_int = 16; |
| 4624 |
pub const KERN_POSIX1: ::c_int = 17; |
| 4625 |
pub const KERN_NGROUPS: ::c_int = 18; |
| 4626 |
pub const KERN_JOB_CONTROL: ::c_int = 19; |
| 4627 |
pub const KERN_SAVED_IDS: ::c_int = 20; |
| 4628 |
pub const KERN_BOOTTIME: ::c_int = 21; |
| 4629 |
pub const KERN_NISDOMAINNAME: ::c_int = 22; |
| 4630 |
pub const KERN_DOMAINNAME: ::c_int = KERN_NISDOMAINNAME; |
| 4631 |
pub const KERN_MAXPARTITIONS: ::c_int = 23; |
| 4632 |
pub const KERN_KDEBUG: ::c_int = 24; |
| 4633 |
pub const KERN_UPDATEINTERVAL: ::c_int = 25; |
| 4634 |
pub const KERN_OSRELDATE: ::c_int = 26; |
| 4635 |
pub const KERN_NTP_PLL: ::c_int = 27; |
| 4636 |
pub const KERN_BOOTFILE: ::c_int = 28; |
| 4637 |
pub const KERN_MAXFILESPERPROC: ::c_int = 29; |
| 4638 |
pub const KERN_MAXPROCPERUID: ::c_int = 30; |
| 4639 |
pub const KERN_DUMPDEV: ::c_int = 31; |
| 4640 |
pub const KERN_IPC: ::c_int = 32; |
| 4641 |
pub const KERN_DUMMY: ::c_int = 33; |
| 4642 |
pub const KERN_PS_STRINGS: ::c_int = 34; |
| 4643 |
pub const KERN_USRSTACK32: ::c_int = 35; |
| 4644 |
pub const KERN_LOGSIGEXIT: ::c_int = 36; |
| 4645 |
pub const KERN_SYMFILE: ::c_int = 37; |
| 4646 |
pub const KERN_PROCARGS: ::c_int = 38; |
| 4647 |
pub const KERN_NETBOOT: ::c_int = 40; |
| 4648 |
pub const KERN_SYSV: ::c_int = 42; |
| 4649 |
pub const KERN_AFFINITY: ::c_int = 43; |
| 4650 |
pub const KERN_TRANSLATE: ::c_int = 44; |
| 4651 |
pub const KERN_CLASSIC: ::c_int = KERN_TRANSLATE; |
| 4652 |
pub const KERN_EXEC: ::c_int = 45; |
| 4653 |
pub const KERN_CLASSICHANDLER: ::c_int = KERN_EXEC; |
| 4654 |
pub const KERN_AIOMAX: ::c_int = 46; |
| 4655 |
pub const KERN_AIOPROCMAX: ::c_int = 47; |
| 4656 |
pub const KERN_AIOTHREADS: ::c_int = 48; |
| 4657 |
pub const KERN_COREFILE: ::c_int = 50; |
| 4658 |
pub const KERN_COREDUMP: ::c_int = 51; |
| 4659 |
pub const KERN_SUGID_COREDUMP: ::c_int = 52; |
| 4660 |
pub const KERN_PROCDELAYTERM: ::c_int = 53; |
| 4661 |
pub const KERN_SHREG_PRIVATIZABLE: ::c_int = 54; |
| 4662 |
pub const KERN_LOW_PRI_WINDOW: ::c_int = 56; |
| 4663 |
pub const KERN_LOW_PRI_DELAY: ::c_int = 57; |
| 4664 |
pub const KERN_POSIX: ::c_int = 58; |
| 4665 |
pub const KERN_USRSTACK64: ::c_int = 59; |
| 4666 |
pub const KERN_NX_PROTECTION: ::c_int = 60; |
| 4667 |
pub const KERN_TFP: ::c_int = 61; |
| 4668 |
pub const KERN_PROCNAME: ::c_int = 62; |
| 4669 |
pub const KERN_THALTSTACK: ::c_int = 63; |
| 4670 |
pub const KERN_SPECULATIVE_READS: ::c_int = 64; |
| 4671 |
pub const KERN_OSVERSION: ::c_int = 65; |
| 4672 |
pub const KERN_SAFEBOOT: ::c_int = 66; |
| 4673 |
pub const KERN_RAGEVNODE: ::c_int = 68; |
| 4674 |
pub const KERN_TTY: ::c_int = 69; |
| 4675 |
pub const KERN_CHECKOPENEVT: ::c_int = 70; |
| 4676 |
pub const KERN_THREADNAME: ::c_int = 71; |
| 4677 |
pub const KERN_MAXID: ::c_int = 72; |
| 4678 |
pub const KERN_RAGE_PROC: ::c_int = 1; |
| 4679 |
pub const KERN_RAGE_THREAD: ::c_int = 2; |
| 4680 |
pub const KERN_UNRAGE_PROC: ::c_int = 3; |
| 4681 |
pub const KERN_UNRAGE_THREAD: ::c_int = 4; |
| 4682 |
pub const KERN_OPENEVT_PROC: ::c_int = 1; |
| 4683 |
pub const KERN_UNOPENEVT_PROC: ::c_int = 2; |
| 4684 |
pub const KERN_TFP_POLICY: ::c_int = 1; |
| 4685 |
pub const KERN_TFP_POLICY_DENY: ::c_int = 0; |
| 4686 |
pub const KERN_TFP_POLICY_DEFAULT: ::c_int = 2; |
| 4687 |
pub const KERN_KDEFLAGS: ::c_int = 1; |
| 4688 |
pub const KERN_KDDFLAGS: ::c_int = 2; |
| 4689 |
pub const KERN_KDENABLE: ::c_int = 3; |
| 4690 |
pub const KERN_KDSETBUF: ::c_int = 4; |
| 4691 |
pub const KERN_KDGETBUF: ::c_int = 5; |
| 4692 |
pub const KERN_KDSETUP: ::c_int = 6; |
| 4693 |
pub const KERN_KDREMOVE: ::c_int = 7; |
| 4694 |
pub const KERN_KDSETREG: ::c_int = 8; |
| 4695 |
pub const KERN_KDGETREG: ::c_int = 9; |
| 4696 |
pub const KERN_KDREADTR: ::c_int = 10; |
| 4697 |
pub const KERN_KDPIDTR: ::c_int = 11; |
| 4698 |
pub const KERN_KDTHRMAP: ::c_int = 12; |
| 4699 |
pub const KERN_KDPIDEX: ::c_int = 14; |
| 4700 |
pub const KERN_KDSETRTCDEC: ::c_int = 15; |
| 4701 |
pub const KERN_KDGETENTROPY: ::c_int = 16; |
| 4702 |
pub const KERN_KDWRITETR: ::c_int = 17; |
| 4703 |
pub const KERN_KDWRITEMAP: ::c_int = 18; |
| 4704 |
#[doc(hidden)] |
| 4705 |
#[deprecated(since = "0.2.49", note = "Removed in MacOSX 10.12")] |
| 4706 |
pub const KERN_KDENABLE_BG_TRACE: ::c_int = 19; |
| 4707 |
#[doc(hidden)] |
| 4708 |
#[deprecated(since = "0.2.49", note = "Removed in MacOSX 10.12")] |
| 4709 |
pub const KERN_KDDISABLE_BG_TRACE: ::c_int = 20; |
| 4710 |
pub const KERN_KDREADCURTHRMAP: ::c_int = 21; |
| 4711 |
pub const KERN_KDSET_TYPEFILTER: ::c_int = 22; |
| 4712 |
pub const KERN_KDBUFWAIT: ::c_int = 23; |
| 4713 |
pub const KERN_KDCPUMAP: ::c_int = 24; |
| 4714 |
pub const KERN_PROC_ALL: ::c_int = 0; |
| 4715 |
pub const KERN_PROC_PID: ::c_int = 1; |
| 4716 |
pub const KERN_PROC_PGRP: ::c_int = 2; |
| 4717 |
pub const KERN_PROC_SESSION: ::c_int = 3; |
| 4718 |
pub const KERN_PROC_TTY: ::c_int = 4; |
| 4719 |
pub const KERN_PROC_UID: ::c_int = 5; |
| 4720 |
pub const KERN_PROC_RUID: ::c_int = 6; |
| 4721 |
pub const KERN_PROC_LCID: ::c_int = 7; |
| 4722 |
pub const KERN_SUCCESS: ::c_int = 0; |
| 4723 |
pub const KERN_INVALID_ADDRESS: ::c_int = 1; |
| 4724 |
pub const KERN_PROTECTION_FAILURE: ::c_int = 2; |
| 4725 |
pub const KERN_NO_SPACE: ::c_int = 3; |
| 4726 |
pub const KERN_INVALID_ARGUMENT: ::c_int = 4; |
| 4727 |
pub const KERN_FAILURE: ::c_int = 5; |
| 4728 |
pub const KERN_RESOURCE_SHORTAGE: ::c_int = 6; |
| 4729 |
pub const KERN_NOT_RECEIVER: ::c_int = 7; |
| 4730 |
pub const KERN_NO_ACCESS: ::c_int = 8; |
| 4731 |
pub const KERN_MEMORY_FAILURE: ::c_int = 9; |
| 4732 |
pub const KERN_MEMORY_ERROR: ::c_int = 10; |
| 4733 |
pub const KERN_ALREADY_IN_SET: ::c_int = 11; |
| 4734 |
pub const KERN_NOT_IN_SET: ::c_int = 12; |
| 4735 |
pub const KERN_NAME_EXISTS: ::c_int = 13; |
| 4736 |
pub const KERN_ABORTED: ::c_int = 14; |
| 4737 |
pub const KERN_INVALID_NAME: ::c_int = 15; |
| 4738 |
pub const KERN_INVALID_TASK: ::c_int = 16; |
| 4739 |
pub const KERN_INVALID_RIGHT: ::c_int = 17; |
| 4740 |
pub const KERN_INVALID_VALUE: ::c_int = 18; |
| 4741 |
pub const KERN_UREFS_OVERFLOW: ::c_int = 19; |
| 4742 |
pub const KERN_INVALID_CAPABILITY: ::c_int = 20; |
| 4743 |
pub const KERN_RIGHT_EXISTS: ::c_int = 21; |
| 4744 |
pub const KERN_INVALID_HOST: ::c_int = 22; |
| 4745 |
pub const KERN_MEMORY_PRESENT: ::c_int = 23; |
| 4746 |
pub const KERN_MEMORY_DATA_MOVED: ::c_int = 24; |
| 4747 |
pub const KERN_MEMORY_RESTART_COPY: ::c_int = 25; |
| 4748 |
pub const KERN_INVALID_PROCESSOR_SET: ::c_int = 26; |
| 4749 |
pub const KERN_POLICY_LIMIT: ::c_int = 27; |
| 4750 |
pub const KERN_INVALID_POLICY: ::c_int = 28; |
| 4751 |
pub const KERN_INVALID_OBJECT: ::c_int = 29; |
| 4752 |
pub const KERN_ALREADY_WAITING: ::c_int = 30; |
| 4753 |
pub const KERN_DEFAULT_SET: ::c_int = 31; |
| 4754 |
pub const KERN_EXCEPTION_PROTECTED: ::c_int = 32; |
| 4755 |
pub const KERN_INVALID_LEDGER: ::c_int = 33; |
| 4756 |
pub const KERN_INVALID_MEMORY_CONTROL: ::c_int = 34; |
| 4757 |
pub const KERN_INVALID_SECURITY: ::c_int = 35; |
| 4758 |
pub const KERN_NOT_DEPRESSED: ::c_int = 36; |
| 4759 |
pub const KERN_TERMINATED: ::c_int = 37; |
| 4760 |
pub const KERN_LOCK_SET_DESTROYED: ::c_int = 38; |
| 4761 |
pub const KERN_LOCK_UNSTABLE: ::c_int = 39; |
| 4762 |
pub const KERN_LOCK_OWNED: ::c_int = 40; |
| 4763 |
pub const KERN_LOCK_OWNED_SELF: ::c_int = 41; |
| 4764 |
pub const KERN_SEMAPHORE_DESTROYED: ::c_int = 42; |
| 4765 |
pub const KERN_RPC_SERVER_TERMINATED: ::c_int = 43; |
| 4766 |
pub const KERN_RPC_TERMINATE_ORPHAN: ::c_int = 44; |
| 4767 |
pub const KERN_RPC_CONTINUE_ORPHAN: ::c_int = 45; |
| 4768 |
pub const KERN_NOT_SUPPORTED: ::c_int = 46; |
| 4769 |
pub const KERN_NODE_DOWN: ::c_int = 47; |
| 4770 |
pub const KERN_NOT_WAITING: ::c_int = 48; |
| 4771 |
pub const KERN_OPERATION_TIMED_OUT: ::c_int = 49; |
| 4772 |
pub const KERN_CODESIGN_ERROR: ::c_int = 50; |
| 4773 |
pub const KERN_POLICY_STATIC: ::c_int = 51; |
| 4774 |
pub const KERN_INSUFFICIENT_BUFFER_SIZE: ::c_int = 52; |
| 4775 |
pub const KIPC_MAXSOCKBUF: ::c_int = 1; |
| 4776 |
pub const KIPC_SOCKBUF_WASTE: ::c_int = 2; |
| 4777 |
pub const KIPC_SOMAXCONN: ::c_int = 3; |
| 4778 |
pub const KIPC_MAX_LINKHDR: ::c_int = 4; |
| 4779 |
pub const KIPC_MAX_PROTOHDR: ::c_int = 5; |
| 4780 |
pub const KIPC_MAX_HDR: ::c_int = 6; |
| 4781 |
pub const KIPC_MAX_DATALEN: ::c_int = 7; |
| 4782 |
pub const KIPC_MBSTAT: ::c_int = 8; |
| 4783 |
pub const KIPC_NMBCLUSTERS: ::c_int = 9; |
| 4784 |
pub const KIPC_SOQLIMITCOMPAT: ::c_int = 10; |
| 4785 |
pub const VM_METER: ::c_int = 1; |
| 4786 |
pub const VM_LOADAVG: ::c_int = 2; |
| 4787 |
pub const VM_MACHFACTOR: ::c_int = 4; |
| 4788 |
pub const VM_SWAPUSAGE: ::c_int = 5; |
| 4789 |
pub const VM_MAXID: ::c_int = 6; |
| 4790 |
pub const VM_PROT_NONE: ::vm_prot_t = 0x00; |
| 4791 |
pub const VM_PROT_READ: ::vm_prot_t = 0x01; |
| 4792 |
pub const VM_PROT_WRITE: ::vm_prot_t = 0x02; |
| 4793 |
pub const VM_PROT_EXECUTE: ::vm_prot_t = 0x04; |
| 4794 |
pub const MEMORY_OBJECT_NULL: ::memory_object_t = 0; |
| 4795 |
pub const HW_MACHINE: ::c_int = 1; |
| 4796 |
pub const HW_MODEL: ::c_int = 2; |
| 4797 |
pub const HW_NCPU: ::c_int = 3; |
| 4798 |
pub const HW_BYTEORDER: ::c_int = 4; |
| 4799 |
pub const HW_PHYSMEM: ::c_int = 5; |
| 4800 |
pub const HW_USERMEM: ::c_int = 6; |
| 4801 |
pub const HW_PAGESIZE: ::c_int = 7; |
| 4802 |
pub const HW_DISKNAMES: ::c_int = 8; |
| 4803 |
pub const HW_DISKSTATS: ::c_int = 9; |
| 4804 |
pub const HW_EPOCH: ::c_int = 10; |
| 4805 |
pub const HW_FLOATINGPT: ::c_int = 11; |
| 4806 |
pub const HW_MACHINE_ARCH: ::c_int = 12; |
| 4807 |
pub const HW_VECTORUNIT: ::c_int = 13; |
| 4808 |
pub const HW_BUS_FREQ: ::c_int = 14; |
| 4809 |
pub const HW_CPU_FREQ: ::c_int = 15; |
| 4810 |
pub const HW_CACHELINE: ::c_int = 16; |
| 4811 |
pub const HW_L1ICACHESIZE: ::c_int = 17; |
| 4812 |
pub const HW_L1DCACHESIZE: ::c_int = 18; |
| 4813 |
pub const HW_L2SETTINGS: ::c_int = 19; |
| 4814 |
pub const HW_L2CACHESIZE: ::c_int = 20; |
| 4815 |
pub const HW_L3SETTINGS: ::c_int = 21; |
| 4816 |
pub const HW_L3CACHESIZE: ::c_int = 22; |
| 4817 |
pub const HW_TB_FREQ: ::c_int = 23; |
| 4818 |
pub const HW_MEMSIZE: ::c_int = 24; |
| 4819 |
pub const HW_AVAILCPU: ::c_int = 25; |
| 4820 |
pub const HW_TARGET: ::c_int = 26; |
| 4821 |
pub const HW_PRODUCT: ::c_int = 27; |
| 4822 |
pub const HW_MAXID: ::c_int = 28; |
| 4823 |
pub const USER_CS_PATH: ::c_int = 1; |
| 4824 |
pub const USER_BC_BASE_MAX: ::c_int = 2; |
| 4825 |
pub const USER_BC_DIM_MAX: ::c_int = 3; |
| 4826 |
pub const USER_BC_SCALE_MAX: ::c_int = 4; |
| 4827 |
pub const USER_BC_STRING_MAX: ::c_int = 5; |
| 4828 |
pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6; |
| 4829 |
pub const USER_EXPR_NEST_MAX: ::c_int = 7; |
| 4830 |
pub const USER_LINE_MAX: ::c_int = 8; |
| 4831 |
pub const USER_RE_DUP_MAX: ::c_int = 9; |
| 4832 |
pub const USER_POSIX2_VERSION: ::c_int = 10; |
| 4833 |
pub const USER_POSIX2_C_BIND: ::c_int = 11; |
| 4834 |
pub const USER_POSIX2_C_DEV: ::c_int = 12; |
| 4835 |
pub const USER_POSIX2_CHAR_TERM: ::c_int = 13; |
| 4836 |
pub const USER_POSIX2_FORT_DEV: ::c_int = 14; |
| 4837 |
pub const USER_POSIX2_FORT_RUN: ::c_int = 15; |
| 4838 |
pub const USER_POSIX2_LOCALEDEF: ::c_int = 16; |
| 4839 |
pub const USER_POSIX2_SW_DEV: ::c_int = 17; |
| 4840 |
pub const USER_POSIX2_UPE: ::c_int = 18; |
| 4841 |
pub const USER_STREAM_MAX: ::c_int = 19; |
| 4842 |
pub const USER_TZNAME_MAX: ::c_int = 20; |
| 4843 |
pub const USER_MAXID: ::c_int = 21; |
| 4844 |
pub const CTL_DEBUG_NAME: ::c_int = 0; |
| 4845 |
pub const CTL_DEBUG_VALUE: ::c_int = 1; |
| 4846 |
pub const CTL_DEBUG_MAXID: ::c_int = 20; |
| 4847 |
|
| 4848 |
pub const PRIO_DARWIN_THREAD: ::c_int = 3; |
| 4849 |
pub const PRIO_DARWIN_PROCESS: ::c_int = 4; |
| 4850 |
pub const PRIO_DARWIN_BG: ::c_int = 0x1000; |
| 4851 |
pub const PRIO_DARWIN_NONUI: ::c_int = 0x1001; |
| 4852 |
|
| 4853 |
pub const SEM_FAILED: *mut sem_t = -1isize as *mut ::sem_t; |
| 4854 |
|
| 4855 |
pub const AI_PASSIVE: ::c_int = 0x00000001; |
| 4856 |
pub const AI_CANONNAME: ::c_int = 0x00000002; |
| 4857 |
pub const AI_NUMERICHOST: ::c_int = 0x00000004; |
| 4858 |
pub const AI_NUMERICSERV: ::c_int = 0x00001000; |
| 4859 |
pub const AI_MASK: ::c_int = |
| 4860 |
AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | AI_ADDRCONFIG; |
| 4861 |
pub const AI_ALL: ::c_int = 0x00000100; |
| 4862 |
pub const AI_V4MAPPED_CFG: ::c_int = 0x00000200; |
| 4863 |
pub const AI_ADDRCONFIG: ::c_int = 0x00000400; |
| 4864 |
pub const AI_V4MAPPED: ::c_int = 0x00000800; |
| 4865 |
pub const AI_DEFAULT: ::c_int = AI_V4MAPPED_CFG | AI_ADDRCONFIG; |
| 4866 |
pub const AI_UNUSABLE: ::c_int = 0x10000000; |
| 4867 |
|
| 4868 |
pub const SIGEV_NONE: ::c_int = 0; |
| 4869 |
pub const SIGEV_SIGNAL: ::c_int = 1; |
| 4870 |
pub const SIGEV_THREAD: ::c_int = 3; |
| 4871 |
|
| 4872 |
pub const AIO_CANCELED: ::c_int = 2; |
| 4873 |
pub const AIO_NOTCANCELED: ::c_int = 4; |
| 4874 |
pub const AIO_ALLDONE: ::c_int = 1; |
| 4875 |
#[deprecated( |
| 4876 |
since = "0.2.64", |
| 4877 |
note = "Can vary at runtime. Use sysconf(3) instead" |
| 4878 |
)] |
| 4879 |
pub const AIO_LISTIO_MAX: ::c_int = 16; |
| 4880 |
pub const LIO_NOP: ::c_int = 0; |
| 4881 |
pub const LIO_WRITE: ::c_int = 2; |
| 4882 |
pub const LIO_READ: ::c_int = 1; |
| 4883 |
pub const LIO_WAIT: ::c_int = 2; |
| 4884 |
pub const LIO_NOWAIT: ::c_int = 1; |
| 4885 |
|
| 4886 |
pub const WEXITED: ::c_int = 0x00000004; |
| 4887 |
pub const WSTOPPED: ::c_int = 0x00000008; |
| 4888 |
pub const WCONTINUED: ::c_int = 0x00000010; |
| 4889 |
pub const WNOWAIT: ::c_int = 0x00000020; |
| 4890 |
|
| 4891 |
pub const P_ALL: idtype_t = 0; |
| 4892 |
pub const P_PID: idtype_t = 1; |
| 4893 |
pub const P_PGID: idtype_t = 2; |
| 4894 |
|
| 4895 |
pub const UTIME_OMIT: c_long = -2; |
| 4896 |
pub const UTIME_NOW: c_long = -1; |
| 4897 |
|
| 4898 |
pub const XATTR_NOFOLLOW: ::c_int = 0x0001; |
| 4899 |
pub const XATTR_CREATE: ::c_int = 0x0002; |
| 4900 |
pub const XATTR_REPLACE: ::c_int = 0x0004; |
| 4901 |
pub const XATTR_NOSECURITY: ::c_int = 0x0008; |
| 4902 |
pub const XATTR_NODEFAULT: ::c_int = 0x0010; |
| 4903 |
pub const XATTR_SHOWCOMPRESSION: ::c_int = 0x0020; |
| 4904 |
|
| 4905 |
pub const NET_RT_IFLIST2: ::c_int = 0x0006; |
| 4906 |
|
| 4907 |
// net/route.h |
| 4908 |
pub const RTF_UP: ::c_int = 0x1; |
| 4909 |
pub const RTF_GATEWAY: ::c_int = 0x2; |
| 4910 |
pub const RTF_HOST: ::c_int = 0x4; |
| 4911 |
pub const RTF_REJECT: ::c_int = 0x8; |
| 4912 |
pub const RTF_DYNAMIC: ::c_int = 0x10; |
| 4913 |
pub const RTF_MODIFIED: ::c_int = 0x20; |
| 4914 |
pub const RTF_DONE: ::c_int = 0x40; |
| 4915 |
pub const RTF_DELCLONE: ::c_int = 0x80; |
| 4916 |
pub const RTF_CLONING: ::c_int = 0x100; |
| 4917 |
pub const RTF_XRESOLVE: ::c_int = 0x200; |
| 4918 |
pub const RTF_LLINFO: ::c_int = 0x400; |
| 4919 |
pub const RTF_STATIC: ::c_int = 0x800; |
| 4920 |
pub const RTF_BLACKHOLE: ::c_int = 0x1000; |
| 4921 |
pub const RTF_NOIFREF: ::c_int = 0x2000; |
| 4922 |
pub const RTF_PROTO2: ::c_int = 0x4000; |
| 4923 |
pub const RTF_PROTO1: ::c_int = 0x8000; |
| 4924 |
pub const RTF_PRCLONING: ::c_int = 0x10000; |
| 4925 |
pub const RTF_WASCLONED: ::c_int = 0x20000; |
| 4926 |
pub const RTF_PROTO3: ::c_int = 0x40000; |
| 4927 |
pub const RTF_PINNED: ::c_int = 0x100000; |
| 4928 |
pub const RTF_LOCAL: ::c_int = 0x200000; |
| 4929 |
pub const RTF_BROADCAST: ::c_int = 0x400000; |
| 4930 |
pub const RTF_MULTICAST: ::c_int = 0x800000; |
| 4931 |
pub const RTF_IFSCOPE: ::c_int = 0x1000000; |
| 4932 |
pub const RTF_CONDEMNED: ::c_int = 0x2000000; |
| 4933 |
pub const RTF_IFREF: ::c_int = 0x4000000; |
| 4934 |
pub const RTF_PROXY: ::c_int = 0x8000000; |
| 4935 |
pub const RTF_ROUTER: ::c_int = 0x10000000; |
| 4936 |
pub const RTF_DEAD: ::c_int = 0x20000000; |
| 4937 |
pub const RTF_GLOBAL: ::c_int = 0x40000000; |
| 4938 |
|
| 4939 |
pub const RTM_VERSION: ::c_int = 5; |
| 4940 |
|
| 4941 |
// Message types |
| 4942 |
pub const RTM_ADD: ::c_int = 0x1; |
| 4943 |
pub const RTM_DELETE: ::c_int = 0x2; |
| 4944 |
pub const RTM_CHANGE: ::c_int = 0x3; |
| 4945 |
pub const RTM_GET: ::c_int = 0x4; |
| 4946 |
pub const RTM_LOSING: ::c_int = 0x5; |
| 4947 |
pub const RTM_REDIRECT: ::c_int = 0x6; |
| 4948 |
pub const RTM_MISS: ::c_int = 0x7; |
| 4949 |
pub const RTM_LOCK: ::c_int = 0x8; |
| 4950 |
pub const RTM_OLDADD: ::c_int = 0x9; |
| 4951 |
pub const RTM_OLDDEL: ::c_int = 0xa; |
| 4952 |
pub const RTM_RESOLVE: ::c_int = 0xb; |
| 4953 |
pub const RTM_NEWADDR: ::c_int = 0xc; |
| 4954 |
pub const RTM_DELADDR: ::c_int = 0xd; |
| 4955 |
pub const RTM_IFINFO: ::c_int = 0xe; |
| 4956 |
pub const RTM_NEWMADDR: ::c_int = 0xf; |
| 4957 |
pub const RTM_DELMADDR: ::c_int = 0x10; |
| 4958 |
pub const RTM_IFINFO2: ::c_int = 0x12; |
| 4959 |
pub const RTM_NEWMADDR2: ::c_int = 0x13; |
| 4960 |
pub const RTM_GET2: ::c_int = 0x14; |
| 4961 |
|
| 4962 |
// Bitmask values for rtm_inits and rmx_locks. |
| 4963 |
pub const RTV_MTU: ::c_int = 0x1; |
| 4964 |
pub const RTV_HOPCOUNT: ::c_int = 0x2; |
| 4965 |
pub const RTV_EXPIRE: ::c_int = 0x4; |
| 4966 |
pub const RTV_RPIPE: ::c_int = 0x8; |
| 4967 |
pub const RTV_SPIPE: ::c_int = 0x10; |
| 4968 |
pub const RTV_SSTHRESH: ::c_int = 0x20; |
| 4969 |
pub const RTV_RTT: ::c_int = 0x40; |
| 4970 |
pub const RTV_RTTVAR: ::c_int = 0x80; |
| 4971 |
|
| 4972 |
// Bitmask values for rtm_addrs. |
| 4973 |
pub const RTA_DST: ::c_int = 0x1; |
| 4974 |
pub const RTA_GATEWAY: ::c_int = 0x2; |
| 4975 |
pub const RTA_NETMASK: ::c_int = 0x4; |
| 4976 |
pub const RTA_GENMASK: ::c_int = 0x8; |
| 4977 |
pub const RTA_IFP: ::c_int = 0x10; |
| 4978 |
pub const RTA_IFA: ::c_int = 0x20; |
| 4979 |
pub const RTA_AUTHOR: ::c_int = 0x40; |
| 4980 |
pub const RTA_BRD: ::c_int = 0x80; |
| 4981 |
|
| 4982 |
// Index offsets for sockaddr array for alternate internal encoding. |
| 4983 |
pub const RTAX_DST: ::c_int = 0; |
| 4984 |
pub const RTAX_GATEWAY: ::c_int = 1; |
| 4985 |
pub const RTAX_NETMASK: ::c_int = 2; |
| 4986 |
pub const RTAX_GENMASK: ::c_int = 3; |
| 4987 |
pub const RTAX_IFP: ::c_int = 4; |
| 4988 |
pub const RTAX_IFA: ::c_int = 5; |
| 4989 |
pub const RTAX_AUTHOR: ::c_int = 6; |
| 4990 |
pub const RTAX_BRD: ::c_int = 7; |
| 4991 |
pub const RTAX_MAX: ::c_int = 8; |
| 4992 |
|
| 4993 |
pub const KERN_PROCARGS2: ::c_int = 49; |
| 4994 |
|
| 4995 |
pub const PROC_PIDTASKALLINFO: ::c_int = 2; |
| 4996 |
pub const PROC_PIDTBSDINFO: ::c_int = 3; |
| 4997 |
pub const PROC_PIDTASKINFO: ::c_int = 4; |
| 4998 |
pub const PROC_PIDTHREADINFO: ::c_int = 5; |
| 4999 |
pub const PROC_PIDVNODEPATHINFO: ::c_int = 9; |
| 5000 |
pub const PROC_PIDPATHINFO_MAXSIZE: ::c_int = 4096; |
| 5001 |
pub const PROC_CSM_ALL: ::c_uint = 0x0001; |
| 5002 |
pub const PROC_CSM_NOSMT: ::c_uint = 0x0002; |
| 5003 |
pub const PROC_CSM_TECS: ::c_uint = 0x0004; |
| 5004 |
pub const MAXCOMLEN: usize = 16; |
| 5005 |
pub const MAXTHREADNAMESIZE: usize = 64; |
| 5006 |
|
| 5007 |
pub const XUCRED_VERSION: ::c_uint = 0; |
| 5008 |
|
| 5009 |
pub const LC_SEGMENT: u32 = 0x1; |
| 5010 |
pub const LC_SEGMENT_64: u32 = 0x19; |
| 5011 |
|
| 5012 |
pub const MH_MAGIC: u32 = 0xfeedface; |
| 5013 |
pub const MH_MAGIC_64: u32 = 0xfeedfacf; |
| 5014 |
|
| 5015 |
// net/if_utun.h |
| 5016 |
pub const UTUN_OPT_FLAGS: ::c_int = 1; |
| 5017 |
pub const UTUN_OPT_IFNAME: ::c_int = 2; |
| 5018 |
|
| 5019 |
// net/bpf.h |
| 5020 |
pub const DLT_NULL: ::c_uint = 0; // no link-layer encapsulation |
| 5021 |
pub const DLT_EN10MB: ::c_uint = 1; // Ethernet (10Mb) |
| 5022 |
pub const DLT_EN3MB: ::c_uint = 2; // Experimental Ethernet (3Mb) |
| 5023 |
pub const DLT_AX25: ::c_uint = 3; // Amateur Radio AX.25 |
| 5024 |
pub const DLT_PRONET: ::c_uint = 4; // Proteon ProNET Token Ring |
| 5025 |
pub const DLT_CHAOS: ::c_uint = 5; // Chaos |
| 5026 |
pub const DLT_IEEE802: ::c_uint = 6; // IEEE 802 Networks |
| 5027 |
pub const DLT_ARCNET: ::c_uint = 7; // ARCNET |
| 5028 |
pub const DLT_SLIP: ::c_uint = 8; // Serial Line IP |
| 5029 |
pub const DLT_PPP: ::c_uint = 9; // Point-to-point Protocol |
| 5030 |
pub const DLT_FDDI: ::c_uint = 10; // FDDI |
| 5031 |
pub const DLT_ATM_RFC1483: ::c_uint = 11; // LLC/SNAP encapsulated atm |
| 5032 |
pub const DLT_RAW: ::c_uint = 12; // raw IP |
| 5033 |
pub const DLT_LOOP: ::c_uint = 108; |
| 5034 |
|
| 5035 |
// https://github.com/apple/darwin-xnu/blob/HEAD/bsd/net/bpf.h#L100 |
| 5036 |
// sizeof(i32) |
| 5037 |
pub const BPF_ALIGNMENT: ::c_int = 4; |
| 5038 |
|
| 5039 |
// sys/mount.h |
| 5040 |
pub const MNT_NODEV: ::c_int = 0x00000010; |
| 5041 |
pub const MNT_UNION: ::c_int = 0x00000020; |
| 5042 |
pub const MNT_CPROTECT: ::c_int = 0x00000080; |
| 5043 |
|
| 5044 |
// MAC labeled / "quarantined" flag |
| 5045 |
pub const MNT_QUARANTINE: ::c_int = 0x00000400; |
| 5046 |
|
| 5047 |
// Flags set by internal operations. |
| 5048 |
pub const MNT_LOCAL: ::c_int = 0x00001000; |
| 5049 |
pub const MNT_QUOTA: ::c_int = 0x00002000; |
| 5050 |
pub const MNT_ROOTFS: ::c_int = 0x00004000; |
| 5051 |
pub const MNT_DOVOLFS: ::c_int = 0x00008000; |
| 5052 |
|
| 5053 |
pub const MNT_DONTBROWSE: ::c_int = 0x00100000; |
| 5054 |
pub const MNT_IGNORE_OWNERSHIP: ::c_int = 0x00200000; |
| 5055 |
pub const MNT_AUTOMOUNTED: ::c_int = 0x00400000; |
| 5056 |
pub const MNT_JOURNALED: ::c_int = 0x00800000; |
| 5057 |
pub const MNT_NOUSERXATTR: ::c_int = 0x01000000; |
| 5058 |
pub const MNT_DEFWRITE: ::c_int = 0x02000000; |
| 5059 |
pub const MNT_MULTILABEL: ::c_int = 0x04000000; |
| 5060 |
pub const MNT_NOATIME: ::c_int = 0x10000000; |
| 5061 |
pub const MNT_SNAPSHOT: ::c_int = 0x40000000; |
| 5062 |
|
| 5063 |
// External filesystem command modifier flags. |
| 5064 |
pub const MNT_NOBLOCK: ::c_int = 0x00020000; |
| 5065 |
|
| 5066 |
// sys/spawn.h: |
| 5067 |
pub const POSIX_SPAWN_RESETIDS: ::c_int = 0x0001; |
| 5068 |
pub const POSIX_SPAWN_SETPGROUP: ::c_int = 0x0002; |
| 5069 |
pub const POSIX_SPAWN_SETSIGDEF: ::c_int = 0x0004; |
| 5070 |
pub const POSIX_SPAWN_SETSIGMASK: ::c_int = 0x0008; |
| 5071 |
pub const POSIX_SPAWN_SETEXEC: ::c_int = 0x0040; |
| 5072 |
pub const POSIX_SPAWN_START_SUSPENDED: ::c_int = 0x0080; |
| 5073 |
pub const POSIX_SPAWN_CLOEXEC_DEFAULT: ::c_int = 0x4000; |
| 5074 |
|
| 5075 |
// sys/ipc.h: |
| 5076 |
pub const IPC_CREAT: ::c_int = 0x200; |
| 5077 |
pub const IPC_EXCL: ::c_int = 0x400; |
| 5078 |
pub const IPC_NOWAIT: ::c_int = 0x800; |
| 5079 |
pub const IPC_PRIVATE: key_t = 0; |
| 5080 |
|
| 5081 |
pub const IPC_RMID: ::c_int = 0; |
| 5082 |
pub const IPC_SET: ::c_int = 1; |
| 5083 |
pub const IPC_STAT: ::c_int = 2; |
| 5084 |
|
| 5085 |
pub const IPC_R: ::c_int = 0x100; |
| 5086 |
pub const IPC_W: ::c_int = 0x80; |
| 5087 |
pub const IPC_M: ::c_int = 0x1000; |
| 5088 |
|
| 5089 |
// sys/sem.h |
| 5090 |
pub const SEM_UNDO: ::c_int = 0o10000; |
| 5091 |
|
| 5092 |
pub const GETNCNT: ::c_int = 3; |
| 5093 |
pub const GETPID: ::c_int = 4; |
| 5094 |
pub const GETVAL: ::c_int = 5; |
| 5095 |
pub const GETALL: ::c_int = 6; |
| 5096 |
pub const GETZCNT: ::c_int = 7; |
| 5097 |
pub const SETVAL: ::c_int = 8; |
| 5098 |
pub const SETALL: ::c_int = 9; |
| 5099 |
|
| 5100 |
// sys/shm.h |
| 5101 |
pub const SHM_RDONLY: ::c_int = 0x1000; |
| 5102 |
pub const SHM_RND: ::c_int = 0x2000; |
| 5103 |
#[cfg(target_arch = "aarch64")] |
| 5104 |
pub const SHMLBA: ::c_int = 16 * 1024; |
| 5105 |
#[cfg(not(target_arch = "aarch64"))] |
| 5106 |
pub const SHMLBA: ::c_int = 4096; |
| 5107 |
pub const SHM_R: ::c_int = IPC_R; |
| 5108 |
pub const SHM_W: ::c_int = IPC_W; |
| 5109 |
|
| 5110 |
// Flags for chflags(2) |
| 5111 |
pub const UF_SETTABLE: ::c_uint = 0x0000ffff; |
| 5112 |
pub const UF_NODUMP: ::c_uint = 0x00000001; |
| 5113 |
pub const UF_IMMUTABLE: ::c_uint = 0x00000002; |
| 5114 |
pub const UF_APPEND: ::c_uint = 0x00000004; |
| 5115 |
pub const UF_OPAQUE: ::c_uint = 0x00000008; |
| 5116 |
pub const UF_COMPRESSED: ::c_uint = 0x00000020; |
| 5117 |
pub const UF_TRACKED: ::c_uint = 0x00000040; |
| 5118 |
pub const SF_SETTABLE: ::c_uint = 0xffff0000; |
| 5119 |
pub const SF_ARCHIVED: ::c_uint = 0x00010000; |
| 5120 |
pub const SF_IMMUTABLE: ::c_uint = 0x00020000; |
| 5121 |
pub const SF_APPEND: ::c_uint = 0x00040000; |
| 5122 |
pub const UF_HIDDEN: ::c_uint = 0x00008000; |
| 5123 |
|
| 5124 |
//<sys/timex.h> |
| 5125 |
pub const NTP_API: ::c_int = 4; |
| 5126 |
pub const MAXPHASE: ::c_long = 500000000; |
| 5127 |
pub const MAXFREQ: ::c_long = 500000; |
| 5128 |
pub const MINSEC: ::c_int = 256; |
| 5129 |
pub const MAXSEC: ::c_int = 2048; |
| 5130 |
pub const NANOSECOND: ::c_long = 1000000000; |
| 5131 |
pub const SCALE_PPM: ::c_int = 65; |
| 5132 |
pub const MAXTC: ::c_int = 10; |
| 5133 |
pub const MOD_OFFSET: ::c_uint = 0x0001; |
| 5134 |
pub const MOD_FREQUENCY: ::c_uint = 0x0002; |
| 5135 |
pub const MOD_MAXERROR: ::c_uint = 0x0004; |
| 5136 |
pub const MOD_ESTERROR: ::c_uint = 0x0008; |
| 5137 |
pub const MOD_STATUS: ::c_uint = 0x0010; |
| 5138 |
pub const MOD_TIMECONST: ::c_uint = 0x0020; |
| 5139 |
pub const MOD_PPSMAX: ::c_uint = 0x0040; |
| 5140 |
pub const MOD_TAI: ::c_uint = 0x0080; |
| 5141 |
pub const MOD_MICRO: ::c_uint = 0x1000; |
| 5142 |
pub const MOD_NANO: ::c_uint = 0x2000; |
| 5143 |
pub const MOD_CLKB: ::c_uint = 0x4000; |
| 5144 |
pub const MOD_CLKA: ::c_uint = 0x8000; |
| 5145 |
pub const STA_PLL: ::c_int = 0x0001; |
| 5146 |
pub const STA_PPSFREQ: ::c_int = 0x0002; |
| 5147 |
pub const STA_PPSTIME: ::c_int = 0x0004; |
| 5148 |
pub const STA_FLL: ::c_int = 0x0008; |
| 5149 |
pub const STA_INS: ::c_int = 0x0010; |
| 5150 |
pub const STA_DEL: ::c_int = 0x0020; |
| 5151 |
pub const STA_UNSYNC: ::c_int = 0x0040; |
| 5152 |
pub const STA_FREQHOLD: ::c_int = 0x0080; |
| 5153 |
pub const STA_PPSSIGNAL: ::c_int = 0x0100; |
| 5154 |
pub const STA_PPSJITTER: ::c_int = 0x0200; |
| 5155 |
pub const STA_PPSWANDER: ::c_int = 0x0400; |
| 5156 |
pub const STA_PPSERROR: ::c_int = 0x0800; |
| 5157 |
pub const STA_CLOCKERR: ::c_int = 0x1000; |
| 5158 |
pub const STA_NANO: ::c_int = 0x2000; |
| 5159 |
pub const STA_MODE: ::c_int = 0x4000; |
| 5160 |
pub const STA_CLK: ::c_int = 0x8000; |
| 5161 |
pub const STA_RONLY: ::c_int = STA_PPSSIGNAL |
| 5162 |
| STA_PPSJITTER |
| 5163 |
| STA_PPSWANDER |
| 5164 |
| STA_PPSERROR |
| 5165 |
| STA_CLOCKERR |
| 5166 |
| STA_NANO |
| 5167 |
| STA_MODE |
| 5168 |
| STA_CLK; |
| 5169 |
pub const TIME_OK: ::c_int = 0; |
| 5170 |
pub const TIME_INS: ::c_int = 1; |
| 5171 |
pub const TIME_DEL: ::c_int = 2; |
| 5172 |
pub const TIME_OOP: ::c_int = 3; |
| 5173 |
pub const TIME_WAIT: ::c_int = 4; |
| 5174 |
pub const TIME_ERROR: ::c_int = 5; |
| 5175 |
|
| 5176 |
// <sys/mount.h> |
| 5177 |
pub const MNT_WAIT: ::c_int = 1; |
| 5178 |
pub const MNT_NOWAIT: ::c_int = 2; |
| 5179 |
|
| 5180 |
// <mach/thread_policy.h> |
| 5181 |
pub const THREAD_STANDARD_POLICY: ::c_int = 1; |
| 5182 |
pub const THREAD_STANDARD_POLICY_COUNT: ::c_int = 0; |
| 5183 |
pub const THREAD_EXTENDED_POLICY: ::c_int = 1; |
| 5184 |
pub const THREAD_TIME_CONSTRAINT_POLICY: ::c_int = 2; |
| 5185 |
pub const THREAD_PRECEDENCE_POLICY: ::c_int = 3; |
| 5186 |
pub const THREAD_AFFINITY_POLICY: ::c_int = 4; |
| 5187 |
pub const THREAD_AFFINITY_TAG_NULL: ::c_int = 0; |
| 5188 |
pub const THREAD_BACKGROUND_POLICY: ::c_int = 5; |
| 5189 |
pub const THREAD_BACKGROUND_POLICY_DARWIN_BG: ::c_int = 0x1000; |
| 5190 |
pub const THREAD_LATENCY_QOS_POLICY: ::c_int = 7; |
| 5191 |
pub const THREAD_THROUGHPUT_QOS_POLICY: ::c_int = 8; |
| 5192 |
|
| 5193 |
// <mach/thread_info.h> |
| 5194 |
pub const TH_STATE_RUNNING: ::c_int = 1; |
| 5195 |
pub const TH_STATE_STOPPED: ::c_int = 2; |
| 5196 |
pub const TH_STATE_WAITING: ::c_int = 3; |
| 5197 |
pub const TH_STATE_UNINTERRUPTIBLE: ::c_int = 4; |
| 5198 |
pub const TH_STATE_HALTED: ::c_int = 5; |
| 5199 |
pub const TH_FLAGS_SWAPPED: ::c_int = 0x1; |
| 5200 |
pub const TH_FLAGS_IDLE: ::c_int = 0x2; |
| 5201 |
pub const TH_FLAGS_GLOBAL_FORCED_IDLE: ::c_int = 0x4; |
| 5202 |
pub const THREAD_BASIC_INFO: ::c_int = 3; |
| 5203 |
pub const THREAD_IDENTIFIER_INFO: ::c_int = 4; |
| 5204 |
pub const THREAD_EXTENDED_INFO: ::c_int = 5; |
| 5205 |
|
| 5206 |
// CommonCrypto/CommonCryptoError.h |
| 5207 |
pub const kCCSuccess: i32 = 0; |
| 5208 |
pub const kCCParamError: i32 = -4300; |
| 5209 |
pub const kCCBufferTooSmall: i32 = -4301; |
| 5210 |
pub const kCCMemoryFailure: i32 = -4302; |
| 5211 |
pub const kCCAlignmentError: i32 = -4303; |
| 5212 |
pub const kCCDecodeError: i32 = -4304; |
| 5213 |
pub const kCCUnimplemented: i32 = -4305; |
| 5214 |
pub const kCCOverflow: i32 = -4306; |
| 5215 |
pub const kCCRNGFailure: i32 = -4307; |
| 5216 |
pub const kCCUnspecifiedError: i32 = -4308; |
| 5217 |
pub const kCCCallSequenceError: i32 = -4309; |
| 5218 |
pub const kCCKeySizeError: i32 = -4310; |
| 5219 |
pub const kCCInvalidKey: i32 = -4311; |
| 5220 |
|
| 5221 |
// mach/host_info.h |
| 5222 |
pub const HOST_LOAD_INFO: i32 = 1; |
| 5223 |
pub const HOST_VM_INFO: i32 = 2; |
| 5224 |
pub const HOST_CPU_LOAD_INFO: i32 = 3; |
| 5225 |
pub const HOST_VM_INFO64: i32 = 4; |
| 5226 |
pub const HOST_EXTMOD_INFO64: i32 = 5; |
| 5227 |
pub const HOST_EXPIRED_TASK_INFO: i32 = 6; |
| 5228 |
|
| 5229 |
// mach/vm_statistics.h |
| 5230 |
pub const VM_PAGE_QUERY_PAGE_PRESENT: i32 = 0x1; |
| 5231 |
pub const VM_PAGE_QUERY_PAGE_FICTITIOUS: i32 = 0x2; |
| 5232 |
pub const VM_PAGE_QUERY_PAGE_REF: i32 = 0x4; |
| 5233 |
pub const VM_PAGE_QUERY_PAGE_DIRTY: i32 = 0x8; |
| 5234 |
pub const VM_PAGE_QUERY_PAGE_PAGED_OUT: i32 = 0x10; |
| 5235 |
pub const VM_PAGE_QUERY_PAGE_COPIED: i32 = 0x20; |
| 5236 |
pub const VM_PAGE_QUERY_PAGE_SPECULATIVE: i32 = 0x40; |
| 5237 |
pub const VM_PAGE_QUERY_PAGE_EXTERNAL: i32 = 0x80; |
| 5238 |
pub const VM_PAGE_QUERY_PAGE_CS_VALIDATED: i32 = 0x100; |
| 5239 |
pub const VM_PAGE_QUERY_PAGE_CS_TAINTED: i32 = 0x200; |
| 5240 |
pub const VM_PAGE_QUERY_PAGE_CS_NX: i32 = 0x400; |
| 5241 |
|
| 5242 |
// mach/task_info.h |
| 5243 |
pub const TASK_THREAD_TIMES_INFO: u32 = 3; |
| 5244 |
pub const HOST_CPU_LOAD_INFO_COUNT: u32 = 4; |
| 5245 |
pub const MACH_TASK_BASIC_INFO: u32 = 20; |
| 5246 |
|
| 5247 |
pub const MACH_PORT_NULL: i32 = 0; |
| 5248 |
|
| 5249 |
pub const RUSAGE_INFO_V0: ::c_int = 0; |
| 5250 |
pub const RUSAGE_INFO_V1: ::c_int = 1; |
| 5251 |
pub const RUSAGE_INFO_V2: ::c_int = 2; |
| 5252 |
pub const RUSAGE_INFO_V3: ::c_int = 3; |
| 5253 |
pub const RUSAGE_INFO_V4: ::c_int = 4; |
| 5254 |
|
| 5255 |
// copyfile.h |
| 5256 |
pub const COPYFILE_ACL: ::copyfile_flags_t = 1 << 0; |
| 5257 |
pub const COPYFILE_STAT: ::copyfile_flags_t = 1 << 1; |
| 5258 |
pub const COPYFILE_XATTR: ::copyfile_flags_t = 1 << 2; |
| 5259 |
pub const COPYFILE_DATA: ::copyfile_flags_t = 1 << 3; |
| 5260 |
pub const COPYFILE_SECURITY: ::copyfile_flags_t = COPYFILE_STAT | COPYFILE_ACL; |
| 5261 |
pub const COPYFILE_METADATA: ::copyfile_flags_t = COPYFILE_SECURITY | COPYFILE_XATTR; |
| 5262 |
pub const COPYFILE_RECURSIVE: ::copyfile_flags_t = 1 << 15; |
| 5263 |
pub const COPYFILE_CHECK: ::copyfile_flags_t = 1 << 16; |
| 5264 |
pub const COPYFILE_EXCL: ::copyfile_flags_t = 1 << 17; |
| 5265 |
pub const COPYFILE_NOFOLLOW_SRC: ::copyfile_flags_t = 1 << 18; |
| 5266 |
pub const COPYFILE_NOFOLLOW_DST: ::copyfile_flags_t = 1 << 19; |
| 5267 |
pub const COPYFILE_MOVE: ::copyfile_flags_t = 1 << 20; |
| 5268 |
pub const COPYFILE_UNLINK: ::copyfile_flags_t = 1 << 21; |
| 5269 |
pub const COPYFILE_NOFOLLOW: ::copyfile_flags_t = COPYFILE_NOFOLLOW_SRC | COPYFILE_NOFOLLOW_DST; |
| 5270 |
pub const COPYFILE_PACK: ::copyfile_flags_t = 1 << 22; |
| 5271 |
pub const COPYFILE_UNPACK: ::copyfile_flags_t = 1 << 23; |
| 5272 |
pub const COPYFILE_CLONE: ::copyfile_flags_t = 1 << 24; |
| 5273 |
pub const COPYFILE_CLONE_FORCE: ::copyfile_flags_t = 1 << 25; |
| 5274 |
pub const COPYFILE_RUN_IN_PLACE: ::copyfile_flags_t = 1 << 26; |
| 5275 |
pub const COPYFILE_DATA_SPARSE: ::copyfile_flags_t = 1 << 27; |
| 5276 |
pub const COPYFILE_PRESERVE_DST_TRACKED: ::copyfile_flags_t = 1 << 28; |
| 5277 |
pub const COPYFILE_VERBOSE: ::copyfile_flags_t = 1 << 30; |
| 5278 |
pub const COPYFILE_RECURSE_ERROR: ::c_int = 0; |
| 5279 |
pub const COPYFILE_RECURSE_FILE: ::c_int = 1; |
| 5280 |
pub const COPYFILE_RECURSE_DIR: ::c_int = 2; |
| 5281 |
pub const COPYFILE_RECURSE_DIR_CLEANUP: ::c_int = 3; |
| 5282 |
pub const COPYFILE_COPY_DATA: ::c_int = 4; |
| 5283 |
pub const COPYFILE_COPY_XATTR: ::c_int = 5; |
| 5284 |
pub const COPYFILE_START: ::c_int = 1; |
| 5285 |
pub const COPYFILE_FINISH: ::c_int = 2; |
| 5286 |
pub const COPYFILE_ERR: ::c_int = 3; |
| 5287 |
pub const COPYFILE_PROGRESS: ::c_int = 4; |
| 5288 |
pub const COPYFILE_CONTINUE: ::c_int = 0; |
| 5289 |
pub const COPYFILE_SKIP: ::c_int = 1; |
| 5290 |
pub const COPYFILE_QUIT: ::c_int = 2; |
| 5291 |
pub const COPYFILE_STATE_SRC_FD: ::c_int = 1; |
| 5292 |
pub const COPYFILE_STATE_SRC_FILENAME: ::c_int = 2; |
| 5293 |
pub const COPYFILE_STATE_DST_FD: ::c_int = 3; |
| 5294 |
pub const COPYFILE_STATE_DST_FILENAME: ::c_int = 4; |
| 5295 |
pub const COPYFILE_STATE_QUARANTINE: ::c_int = 5; |
| 5296 |
pub const COPYFILE_STATE_STATUS_CB: ::c_int = 6; |
| 5297 |
pub const COPYFILE_STATE_STATUS_CTX: ::c_int = 7; |
| 5298 |
pub const COPYFILE_STATE_COPIED: ::c_int = 8; |
| 5299 |
pub const COPYFILE_STATE_XATTRNAME: ::c_int = 9; |
| 5300 |
pub const COPYFILE_STATE_WAS_CLONED: ::c_int = 10; |
| 5301 |
pub const COPYFILE_STATE_SRC_BSIZE: ::c_int = 11; |
| 5302 |
pub const COPYFILE_STATE_DST_BSIZE: ::c_int = 12; |
| 5303 |
pub const COPYFILE_STATE_BSIZE: ::c_int = 13; |
| 5304 |
|
| 5305 |
// <sys/attr.h> |
| 5306 |
pub const ATTR_BIT_MAP_COUNT: ::c_ushort = 5; |
| 5307 |
pub const FSOPT_NOFOLLOW: u32 = 0x1; |
| 5308 |
pub const FSOPT_NOFOLLOW_ANY: u32 = 0x800; |
| 5309 |
pub const FSOPT_REPORT_FULLSIZE: u32 = 0x4; |
| 5310 |
pub const FSOPT_PACK_INVAL_ATTRS: u32 = 0x8; |
| 5311 |
pub const FSOPT_ATTR_CMN_EXTENDED: u32 = 0x20; |
| 5312 |
pub const FSOPT_RETURN_REALDEV: u32 = 0x200; |
| 5313 |
pub const ATTR_CMN_NAME: attrgroup_t = 0x00000001; |
| 5314 |
pub const ATTR_CMN_DEVID: attrgroup_t = 0x00000002; |
| 5315 |
pub const ATTR_CMN_FSID: attrgroup_t = 0x00000004; |
| 5316 |
pub const ATTR_CMN_OBJTYPE: attrgroup_t = 0x00000008; |
| 5317 |
pub const ATTR_CMN_OBJTAG: attrgroup_t = 0x00000010; |
| 5318 |
pub const ATTR_CMN_OBJID: attrgroup_t = 0x00000020; |
| 5319 |
pub const ATTR_CMN_OBJPERMANENTID: attrgroup_t = 0x00000040; |
| 5320 |
pub const ATTR_CMN_PAROBJID: attrgroup_t = 0x00000080; |
| 5321 |
pub const ATTR_CMN_SCRIPT: attrgroup_t = 0x00000100; |
| 5322 |
pub const ATTR_CMN_CRTIME: attrgroup_t = 0x00000200; |
| 5323 |
pub const ATTR_CMN_MODTIME: attrgroup_t = 0x00000400; |
| 5324 |
pub const ATTR_CMN_CHGTIME: attrgroup_t = 0x00000800; |
| 5325 |
pub const ATTR_CMN_ACCTIME: attrgroup_t = 0x00001000; |
| 5326 |
pub const ATTR_CMN_BKUPTIME: attrgroup_t = 0x00002000; |
| 5327 |
pub const ATTR_CMN_FNDRINFO: attrgroup_t = 0x00004000; |
| 5328 |
pub const ATTR_CMN_OWNERID: attrgroup_t = 0x00008000; |
| 5329 |
pub const ATTR_CMN_GRPID: attrgroup_t = 0x00010000; |
| 5330 |
pub const ATTR_CMN_ACCESSMASK: attrgroup_t = 0x00020000; |
| 5331 |
pub const ATTR_CMN_FLAGS: attrgroup_t = 0x00040000; |
| 5332 |
pub const ATTR_CMN_GEN_COUNT: attrgroup_t = 0x00080000; |
| 5333 |
pub const ATTR_CMN_DOCUMENT_ID: attrgroup_t = 0x00100000; |
| 5334 |
pub const ATTR_CMN_USERACCESS: attrgroup_t = 0x00200000; |
| 5335 |
pub const ATTR_CMN_EXTENDED_SECURITY: attrgroup_t = 0x00400000; |
| 5336 |
pub const ATTR_CMN_UUID: attrgroup_t = 0x00800000; |
| 5337 |
pub const ATTR_CMN_GRPUUID: attrgroup_t = 0x01000000; |
| 5338 |
pub const ATTR_CMN_FILEID: attrgroup_t = 0x02000000; |
| 5339 |
pub const ATTR_CMN_PARENTID: attrgroup_t = 0x04000000; |
| 5340 |
pub const ATTR_CMN_FULLPATH: attrgroup_t = 0x08000000; |
| 5341 |
pub const ATTR_CMN_ADDEDTIME: attrgroup_t = 0x10000000; |
| 5342 |
pub const ATTR_CMN_DATA_PROTECT_FLAGS: attrgroup_t = 0x40000000; |
| 5343 |
pub const ATTR_CMN_RETURNED_ATTRS: attrgroup_t = 0x80000000; |
| 5344 |
pub const ATTR_VOL_FSTYPE: attrgroup_t = 0x00000001; |
| 5345 |
pub const ATTR_VOL_SIGNATURE: attrgroup_t = 0x00000002; |
| 5346 |
pub const ATTR_VOL_SIZE: attrgroup_t = 0x00000004; |
| 5347 |
pub const ATTR_VOL_SPACEFREE: attrgroup_t = 0x00000008; |
| 5348 |
pub const ATTR_VOL_SPACEAVAIL: attrgroup_t = 0x00000010; |
| 5349 |
pub const ATTR_VOL_MINALLOCATION: attrgroup_t = 0x00000020; |
| 5350 |
pub const ATTR_VOL_ALLOCATIONCLUMP: attrgroup_t = 0x00000040; |
| 5351 |
pub const ATTR_VOL_IOBLOCKSIZE: attrgroup_t = 0x00000080; |
| 5352 |
pub const ATTR_VOL_OBJCOUNT: attrgroup_t = 0x00000100; |
| 5353 |
pub const ATTR_VOL_FILECOUNT: attrgroup_t = 0x00000200; |
| 5354 |
pub const ATTR_VOL_DIRCOUNT: attrgroup_t = 0x00000400; |
| 5355 |
pub const ATTR_VOL_MAXOBJCOUNT: attrgroup_t = 0x00000800; |
| 5356 |
pub const ATTR_VOL_MOUNTPOINT: attrgroup_t = 0x00001000; |
| 5357 |
pub const ATTR_VOL_NAME: attrgroup_t = 0x00002000; |
| 5358 |
pub const ATTR_VOL_MOUNTFLAGS: attrgroup_t = 0x00004000; |
| 5359 |
pub const ATTR_VOL_MOUNTEDDEVICE: attrgroup_t = 0x00008000; |
| 5360 |
pub const ATTR_VOL_ENCODINGSUSED: attrgroup_t = 0x00010000; |
| 5361 |
pub const ATTR_VOL_CAPABILITIES: attrgroup_t = 0x00020000; |
| 5362 |
pub const ATTR_VOL_UUID: attrgroup_t = 0x00040000; |
| 5363 |
pub const ATTR_VOL_SPACEUSED: attrgroup_t = 0x00800000; |
| 5364 |
pub const ATTR_VOL_QUOTA_SIZE: attrgroup_t = 0x10000000; |
| 5365 |
pub const ATTR_VOL_RESERVED_SIZE: attrgroup_t = 0x20000000; |
| 5366 |
pub const ATTR_VOL_ATTRIBUTES: attrgroup_t = 0x40000000; |
| 5367 |
pub const ATTR_VOL_INFO: attrgroup_t = 0x80000000; |
| 5368 |
pub const ATTR_DIR_LINKCOUNT: attrgroup_t = 0x00000001; |
| 5369 |
pub const ATTR_DIR_ENTRYCOUNT: attrgroup_t = 0x00000002; |
| 5370 |
pub const ATTR_DIR_MOUNTSTATUS: attrgroup_t = 0x00000004; |
| 5371 |
pub const ATTR_DIR_ALLOCSIZE: attrgroup_t = 0x00000008; |
| 5372 |
pub const ATTR_DIR_IOBLOCKSIZE: attrgroup_t = 0x00000010; |
| 5373 |
pub const ATTR_DIR_DATALENGTH: attrgroup_t = 0x00000020; |
| 5374 |
pub const ATTR_FILE_LINKCOUNT: attrgroup_t = 0x00000001; |
| 5375 |
pub const ATTR_FILE_TOTALSIZE: attrgroup_t = 0x00000002; |
| 5376 |
pub const ATTR_FILE_ALLOCSIZE: attrgroup_t = 0x00000004; |
| 5377 |
pub const ATTR_FILE_IOBLOCKSIZE: attrgroup_t = 0x00000008; |
| 5378 |
pub const ATTR_FILE_DEVTYPE: attrgroup_t = 0x00000020; |
| 5379 |
pub const ATTR_FILE_FORKCOUNT: attrgroup_t = 0x00000080; |
| 5380 |
pub const ATTR_FILE_FORKLIST: attrgroup_t = 0x00000100; |
| 5381 |
pub const ATTR_FILE_DATALENGTH: attrgroup_t = 0x00000200; |
| 5382 |
pub const ATTR_FILE_DATAALLOCSIZE: attrgroup_t = 0x00000400; |
| 5383 |
pub const ATTR_FILE_RSRCLENGTH: attrgroup_t = 0x00001000; |
| 5384 |
pub const ATTR_FILE_RSRCALLOCSIZE: attrgroup_t = 0x00002000; |
| 5385 |
pub const ATTR_CMNEXT_RELPATH: attrgroup_t = 0x00000004; |
| 5386 |
pub const ATTR_CMNEXT_PRIVATESIZE: attrgroup_t = 0x00000008; |
| 5387 |
pub const ATTR_CMNEXT_LINKID: attrgroup_t = 0x00000010; |
| 5388 |
pub const ATTR_CMNEXT_NOFIRMLINKPATH: attrgroup_t = 0x00000020; |
| 5389 |
pub const ATTR_CMNEXT_REALDEVID: attrgroup_t = 0x00000040; |
| 5390 |
pub const ATTR_CMNEXT_REALFSID: attrgroup_t = 0x00000080; |
| 5391 |
pub const ATTR_CMNEXT_CLONEID: attrgroup_t = 0x00000100; |
| 5392 |
pub const ATTR_CMNEXT_EXT_FLAGS: attrgroup_t = 0x00000200; |
| 5393 |
pub const ATTR_CMNEXT_RECURSIVE_GENCOUNT: attrgroup_t = 0x00000400; |
| 5394 |
pub const DIR_MNTSTATUS_MNTPOINT: u32 = 0x1; |
| 5395 |
pub const VOL_CAPABILITIES_FORMAT: usize = 0; |
| 5396 |
pub const VOL_CAPABILITIES_INTERFACES: usize = 1; |
| 5397 |
pub const VOL_CAP_FMT_PERSISTENTOBJECTIDS: attrgroup_t = 0x00000001; |
| 5398 |
pub const VOL_CAP_FMT_SYMBOLICLINKS: attrgroup_t = 0x00000002; |
| 5399 |
pub const VOL_CAP_FMT_HARDLINKS: attrgroup_t = 0x00000004; |
| 5400 |
pub const VOL_CAP_FMT_JOURNAL: attrgroup_t = 0x00000008; |
| 5401 |
pub const VOL_CAP_FMT_JOURNAL_ACTIVE: attrgroup_t = 0x00000010; |
| 5402 |
pub const VOL_CAP_FMT_NO_ROOT_TIMES: attrgroup_t = 0x00000020; |
| 5403 |
pub const VOL_CAP_FMT_SPARSE_FILES: attrgroup_t = 0x00000040; |
| 5404 |
pub const VOL_CAP_FMT_ZERO_RUNS: attrgroup_t = 0x00000080; |
| 5405 |
pub const VOL_CAP_FMT_CASE_SENSITIVE: attrgroup_t = 0x00000100; |
| 5406 |
pub const VOL_CAP_FMT_CASE_PRESERVING: attrgroup_t = 0x00000200; |
| 5407 |
pub const VOL_CAP_FMT_FAST_STATFS: attrgroup_t = 0x00000400; |
| 5408 |
pub const VOL_CAP_FMT_2TB_FILESIZE: attrgroup_t = 0x00000800; |
| 5409 |
pub const VOL_CAP_FMT_OPENDENYMODES: attrgroup_t = 0x00001000; |
| 5410 |
pub const VOL_CAP_FMT_HIDDEN_FILES: attrgroup_t = 0x00002000; |
| 5411 |
pub const VOL_CAP_FMT_PATH_FROM_ID: attrgroup_t = 0x00004000; |
| 5412 |
pub const VOL_CAP_FMT_NO_VOLUME_SIZES: attrgroup_t = 0x00008000; |
| 5413 |
pub const VOL_CAP_FMT_DECMPFS_COMPRESSION: attrgroup_t = 0x00010000; |
| 5414 |
pub const VOL_CAP_FMT_64BIT_OBJECT_IDS: attrgroup_t = 0x00020000; |
| 5415 |
pub const VOL_CAP_FMT_DIR_HARDLINKS: attrgroup_t = 0x00040000; |
| 5416 |
pub const VOL_CAP_FMT_DOCUMENT_ID: attrgroup_t = 0x00080000; |
| 5417 |
pub const VOL_CAP_FMT_WRITE_GENERATION_COUNT: attrgroup_t = 0x00100000; |
| 5418 |
pub const VOL_CAP_FMT_NO_IMMUTABLE_FILES: attrgroup_t = 0x00200000; |
| 5419 |
pub const VOL_CAP_FMT_NO_PERMISSIONS: attrgroup_t = 0x00400000; |
| 5420 |
pub const VOL_CAP_FMT_SHARED_SPACE: attrgroup_t = 0x00800000; |
| 5421 |
pub const VOL_CAP_FMT_VOL_GROUPS: attrgroup_t = 0x01000000; |
| 5422 |
pub const VOL_CAP_FMT_SEALED: attrgroup_t = 0x02000000; |
| 5423 |
pub const VOL_CAP_INT_SEARCHFS: attrgroup_t = 0x00000001; |
| 5424 |
pub const VOL_CAP_INT_ATTRLIST: attrgroup_t = 0x00000002; |
| 5425 |
pub const VOL_CAP_INT_NFSEXPORT: attrgroup_t = 0x00000004; |
| 5426 |
pub const VOL_CAP_INT_READDIRATTR: attrgroup_t = 0x00000008; |
| 5427 |
pub const VOL_CAP_INT_EXCHANGEDATA: attrgroup_t = 0x00000010; |
| 5428 |
pub const VOL_CAP_INT_COPYFILE: attrgroup_t = 0x00000020; |
| 5429 |
pub const VOL_CAP_INT_ALLOCATE: attrgroup_t = 0x00000040; |
| 5430 |
pub const VOL_CAP_INT_VOL_RENAME: attrgroup_t = 0x00000080; |
| 5431 |
pub const VOL_CAP_INT_ADVLOCK: attrgroup_t = 0x00000100; |
| 5432 |
pub const VOL_CAP_INT_FLOCK: attrgroup_t = 0x00000200; |
| 5433 |
pub const VOL_CAP_INT_EXTENDED_SECURITY: attrgroup_t = 0x00000400; |
| 5434 |
pub const VOL_CAP_INT_USERACCESS: attrgroup_t = 0x00000800; |
| 5435 |
pub const VOL_CAP_INT_MANLOCK: attrgroup_t = 0x00001000; |
| 5436 |
pub const VOL_CAP_INT_NAMEDSTREAMS: attrgroup_t = 0x00002000; |
| 5437 |
pub const VOL_CAP_INT_EXTENDED_ATTR: attrgroup_t = 0x00004000; |
| 5438 |
pub const VOL_CAP_INT_CLONE: attrgroup_t = 0x00010000; |
| 5439 |
pub const VOL_CAP_INT_SNAPSHOT: attrgroup_t = 0x00020000; |
| 5440 |
pub const VOL_CAP_INT_RENAME_SWAP: attrgroup_t = 0x00040000; |
| 5441 |
pub const VOL_CAP_INT_RENAME_EXCL: attrgroup_t = 0x00080000; |
| 5442 |
pub const VOL_CAP_INT_RENAME_OPENFAIL: attrgroup_t = 0x00100000; |
| 5443 |
|
| 5444 |
// <proc.h> |
| 5445 |
/// Process being created by fork. |
| 5446 |
pub const SIDL: u32 = 1; |
| 5447 |
/// Currently runnable. |
| 5448 |
pub const SRUN: u32 = 2; |
| 5449 |
/// Sleeping on an address. |
| 5450 |
pub const SSLEEP: u32 = 3; |
| 5451 |
/// Process debugging or suspension. |
| 5452 |
pub const SSTOP: u32 = 4; |
| 5453 |
/// Awaiting collection by parent. |
| 5454 |
pub const SZOMB: u32 = 5; |
| 5455 |
|
| 5456 |
// sys/vsock.h |
| 5457 |
pub const VMADDR_CID_ANY: ::c_uint = 0xFFFFFFFF; |
| 5458 |
pub const VMADDR_CID_HYPERVISOR: ::c_uint = 0; |
| 5459 |
pub const VMADDR_CID_RESERVED: ::c_uint = 1; |
| 5460 |
pub const VMADDR_CID_HOST: ::c_uint = 2; |
| 5461 |
pub const VMADDR_PORT_ANY: ::c_uint = 0xFFFFFFFF; |
| 5462 |
|
| 5463 |
cfg_if! { |
| 5464 |
if #[cfg(libc_const_extern_fn)] { |
| 5465 |
const fn __DARWIN_ALIGN32(p: usize) -> usize { |
| 5466 |
const __DARWIN_ALIGNBYTES32: usize = ::mem::size_of::<u32>() - 1; |
| 5467 |
p + __DARWIN_ALIGNBYTES32 & !__DARWIN_ALIGNBYTES32 |
| 5468 |
} |
| 5469 |
} else if #[cfg(libc_const_size_of)] { |
| 5470 |
fn __DARWIN_ALIGN32(p: usize) -> usize { |
| 5471 |
const __DARWIN_ALIGNBYTES32: usize = ::mem::size_of::<u32>() - 1; |
| 5472 |
p + __DARWIN_ALIGNBYTES32 & !__DARWIN_ALIGNBYTES32 |
| 5473 |
} |
| 5474 |
} else { |
| 5475 |
fn __DARWIN_ALIGN32(p: usize) -> usize { |
| 5476 |
let __DARWIN_ALIGNBYTES32: usize = ::mem::size_of::<u32>() - 1; |
| 5477 |
p + __DARWIN_ALIGNBYTES32 & !__DARWIN_ALIGNBYTES32 |
| 5478 |
} |
| 5479 |
} |
| 5480 |
} |
| 5481 |
|
| 5482 |
cfg_if! { |
| 5483 |
if #[cfg(libc_const_size_of)] { |
| 5484 |
pub const THREAD_EXTENDED_POLICY_COUNT: mach_msg_type_number_t = |
| 5485 |
(::mem::size_of::<thread_extended_policy_data_t>() / ::mem::size_of::<integer_t>()) |
| 5486 |
as mach_msg_type_number_t; |
| 5487 |
pub const THREAD_TIME_CONSTRAINT_POLICY_COUNT: mach_msg_type_number_t = |
| 5488 |
(::mem::size_of::<thread_time_constraint_policy_data_t>() / |
| 5489 |
::mem::size_of::<integer_t>()) as mach_msg_type_number_t; |
| 5490 |
pub const THREAD_PRECEDENCE_POLICY_COUNT: mach_msg_type_number_t = |
| 5491 |
(::mem::size_of::<thread_precedence_policy_data_t>() / ::mem::size_of::<integer_t>()) |
| 5492 |
as mach_msg_type_number_t; |
| 5493 |
pub const THREAD_AFFINITY_POLICY_COUNT: mach_msg_type_number_t = |
| 5494 |
(::mem::size_of::<thread_affinity_policy_data_t>() / ::mem::size_of::<integer_t>()) |
| 5495 |
as mach_msg_type_number_t; |
| 5496 |
pub const THREAD_BACKGROUND_POLICY_COUNT: mach_msg_type_number_t = |
| 5497 |
(::mem::size_of::<thread_background_policy_data_t>() / ::mem::size_of::<integer_t>()) |
| 5498 |
as mach_msg_type_number_t; |
| 5499 |
pub const THREAD_LATENCY_QOS_POLICY_COUNT: mach_msg_type_number_t = |
| 5500 |
(::mem::size_of::<thread_latency_qos_policy_data_t>() / ::mem::size_of::<integer_t>()) |
| 5501 |
as mach_msg_type_number_t; |
| 5502 |
pub const THREAD_THROUGHPUT_QOS_POLICY_COUNT: mach_msg_type_number_t = |
| 5503 |
(::mem::size_of::<thread_throughput_qos_policy_data_t>() / |
| 5504 |
::mem::size_of::<integer_t>()) as mach_msg_type_number_t; |
| 5505 |
pub const THREAD_BASIC_INFO_COUNT: mach_msg_type_number_t = |
| 5506 |
(::mem::size_of::<thread_basic_info_data_t>() / ::mem::size_of::<integer_t>()) |
| 5507 |
as mach_msg_type_number_t; |
| 5508 |
pub const THREAD_IDENTIFIER_INFO_COUNT: mach_msg_type_number_t = |
| 5509 |
(::mem::size_of::<thread_identifier_info_data_t>() / ::mem::size_of::<integer_t>()) |
| 5510 |
as mach_msg_type_number_t; |
| 5511 |
pub const THREAD_EXTENDED_INFO_COUNT: mach_msg_type_number_t = |
| 5512 |
(::mem::size_of::<thread_extended_info_data_t>() / ::mem::size_of::<integer_t>()) |
| 5513 |
as mach_msg_type_number_t; |
| 5514 |
|
| 5515 |
pub const TASK_THREAD_TIMES_INFO_COUNT: u32 = |
| 5516 |
(::mem::size_of::<task_thread_times_info_data_t>() |
| 5517 |
/ ::mem::size_of::<natural_t>()) as u32; |
| 5518 |
pub const MACH_TASK_BASIC_INFO_COUNT: u32 = (::mem::size_of::<mach_task_basic_info_data_t>() |
| 5519 |
/ ::mem::size_of::<natural_t>()) as u32; |
| 5520 |
pub const HOST_VM_INFO64_COUNT: mach_msg_type_number_t = |
| 5521 |
(::mem::size_of::<vm_statistics64_data_t>() / ::mem::size_of::<integer_t>()) |
| 5522 |
as mach_msg_type_number_t; |
| 5523 |
} else { |
| 5524 |
pub const THREAD_EXTENDED_POLICY_COUNT: mach_msg_type_number_t = 1; |
| 5525 |
pub const THREAD_TIME_CONSTRAINT_POLICY_COUNT: mach_msg_type_number_t = 4; |
| 5526 |
pub const THREAD_PRECEDENCE_POLICY_COUNT: mach_msg_type_number_t = 1; |
| 5527 |
pub const THREAD_AFFINITY_POLICY_COUNT: mach_msg_type_number_t = 1; |
| 5528 |
pub const THREAD_BACKGROUND_POLICY_COUNT: mach_msg_type_number_t = 1; |
| 5529 |
pub const THREAD_LATENCY_QOS_POLICY_COUNT: mach_msg_type_number_t = 1; |
| 5530 |
pub const THREAD_THROUGHPUT_QOS_POLICY_COUNT: mach_msg_type_number_t = 1; |
| 5531 |
pub const THREAD_BASIC_INFO_COUNT: mach_msg_type_number_t = 10; |
| 5532 |
pub const THREAD_IDENTIFIER_INFO_COUNT: mach_msg_type_number_t = 6; |
| 5533 |
pub const THREAD_EXTENDED_INFO_COUNT: mach_msg_type_number_t = 28; |
| 5534 |
pub const TASK_THREAD_TIMES_INFO_COUNT: u32 = 4; |
| 5535 |
pub const MACH_TASK_BASIC_INFO_COUNT: u32 = 12; |
| 5536 |
pub const HOST_VM_INFO64_COUNT: mach_msg_type_number_t = 38; |
| 5537 |
} |
| 5538 |
} |
| 5539 |
|
| 5540 |
f! { |
| 5541 |
pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, |
| 5542 |
cmsg: *const ::cmsghdr) -> *mut ::cmsghdr { |
| 5543 |
if cmsg.is_null() { |
| 5544 |
return ::CMSG_FIRSTHDR(mhdr); |
| 5545 |
}; |
| 5546 |
let cmsg_len = (*cmsg).cmsg_len as usize; |
| 5547 |
let next = cmsg as usize + __DARWIN_ALIGN32(cmsg_len as usize); |
| 5548 |
let max = (*mhdr).msg_control as usize |
| 5549 |
+ (*mhdr).msg_controllen as usize; |
| 5550 |
if next + __DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) > max { |
| 5551 |
0 as *mut ::cmsghdr |
| 5552 |
} else { |
| 5553 |
next as *mut ::cmsghdr |
| 5554 |
} |
| 5555 |
} |
| 5556 |
|
| 5557 |
pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar { |
| 5558 |
(cmsg as *mut ::c_uchar) |
| 5559 |
.offset(__DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) as isize) |
| 5560 |
} |
| 5561 |
|
| 5562 |
pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { |
| 5563 |
(__DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) |
| 5564 |
+ __DARWIN_ALIGN32(length as usize)) |
| 5565 |
as ::c_uint |
| 5566 |
} |
| 5567 |
|
| 5568 |
pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { |
| 5569 |
(__DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) + length as usize) |
| 5570 |
as ::c_uint |
| 5571 |
} |
| 5572 |
|
| 5573 |
pub {const} fn VM_MAKE_TAG(id: u8) -> u32 { |
| 5574 |
(id as u32) << 24u32 |
| 5575 |
} |
| 5576 |
|
| 5577 |
pub fn major(dev: dev_t) -> i32 { |
| 5578 |
(dev >> 24) & 0xff |
| 5579 |
} |
| 5580 |
|
| 5581 |
pub fn minor(dev: dev_t) -> i32 { |
| 5582 |
dev & 0xffffff |
| 5583 |
} |
| 5584 |
|
| 5585 |
pub fn makedev(major: i32, minor: i32) -> dev_t { |
| 5586 |
(major << 24) | minor |
| 5587 |
} |
| 5588 |
} |
| 5589 |
|
| 5590 |
safe_f! { |
| 5591 |
pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { |
| 5592 |
status >> 8 |
| 5593 |
} |
| 5594 |
|
| 5595 |
pub {const} fn _WSTATUS(status: ::c_int) -> ::c_int { |
| 5596 |
status & 0x7f |
| 5597 |
} |
| 5598 |
|
| 5599 |
pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { |
| 5600 |
_WSTATUS(status) == _WSTOPPED && WSTOPSIG(status) == 0x13 |
| 5601 |
} |
| 5602 |
|
| 5603 |
pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { |
| 5604 |
_WSTATUS(status) != _WSTOPPED && _WSTATUS(status) != 0 |
| 5605 |
} |
| 5606 |
|
| 5607 |
pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { |
| 5608 |
_WSTATUS(status) == _WSTOPPED && WSTOPSIG(status) != 0x13 |
| 5609 |
} |
| 5610 |
} |
| 5611 |
|
| 5612 |
extern "C" { |
| 5613 |
pub fn setgrent(); |
| 5614 |
#[doc(hidden)] |
| 5615 |
#[deprecated(since = "0.2.49", note = "Deprecated in MacOSX 10.5")] |
| 5616 |
#[cfg_attr(not(target_arch = "aarch64"), link_name = "daemon$1050")] |
| 5617 |
pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; |
| 5618 |
#[doc(hidden)] |
| 5619 |
#[deprecated(since = "0.2.49", note = "Deprecated in MacOSX 10.10")] |
| 5620 |
pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; |
| 5621 |
#[doc(hidden)] |
| 5622 |
#[deprecated(since = "0.2.49", note = "Deprecated in MacOSX 10.10")] |
| 5623 |
pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; |
| 5624 |
pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int; |
| 5625 |
pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int; |
| 5626 |
pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int; |
| 5627 |
pub fn aio_error(aiocbp: *const aiocb) -> ::c_int; |
| 5628 |
pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t; |
| 5629 |
#[cfg_attr( |
| 5630 |
all(target_os = "macos", target_arch = "x86"), |
| 5631 |
link_name = "aio_suspend$UNIX2003" |
| 5632 |
)] |
| 5633 |
pub fn aio_suspend( |
| 5634 |
aiocb_list: *const *const aiocb, |
| 5635 |
nitems: ::c_int, |
| 5636 |
timeout: *const ::timespec, |
| 5637 |
) -> ::c_int; |
| 5638 |
pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int; |
| 5639 |
pub fn chflags(path: *const ::c_char, flags: ::c_uint) -> ::c_int; |
| 5640 |
pub fn fchflags(fd: ::c_int, flags: ::c_uint) -> ::c_int; |
| 5641 |
pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; |
| 5642 |
pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; |
| 5643 |
#[cfg_attr( |
| 5644 |
all(target_os = "macos", target_arch = "x86"), |
| 5645 |
link_name = "confstr$UNIX2003" |
| 5646 |
)] |
| 5647 |
pub fn confstr(name: ::c_int, buf: *mut ::c_char, len: ::size_t) -> ::size_t; |
| 5648 |
pub fn lio_listio( |
| 5649 |
mode: ::c_int, |
| 5650 |
aiocb_list: *const *mut aiocb, |
| 5651 |
nitems: ::c_int, |
| 5652 |
sevp: *mut sigevent, |
| 5653 |
) -> ::c_int; |
| 5654 |
|
| 5655 |
pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; |
| 5656 |
|
| 5657 |
pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int; |
| 5658 |
|
| 5659 |
pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; |
| 5660 |
pub fn getutxent() -> *mut utmpx; |
| 5661 |
pub fn getutxid(ut: *const utmpx) -> *mut utmpx; |
| 5662 |
pub fn getutxline(ut: *const utmpx) -> *mut utmpx; |
| 5663 |
pub fn pututxline(ut: *const utmpx) -> *mut utmpx; |
| 5664 |
pub fn setutxent(); |
| 5665 |
pub fn endutxent(); |
| 5666 |
pub fn utmpxname(file: *const ::c_char) -> ::c_int; |
| 5667 |
|
| 5668 |
pub fn asctime(tm: *const ::tm) -> *mut ::c_char; |
| 5669 |
pub fn ctime(clock: *const time_t) -> *mut ::c_char; |
| 5670 |
pub fn getdate(datestr: *const ::c_char) -> *mut ::tm; |
| 5671 |
pub fn strptime( |
| 5672 |
buf: *const ::c_char, |
| 5673 |
format: *const ::c_char, |
| 5674 |
timeptr: *mut ::tm, |
| 5675 |
) -> *mut ::c_char; |
| 5676 |
pub fn asctime_r(tm: *const ::tm, result: *mut ::c_char) -> *mut ::c_char; |
| 5677 |
pub fn ctime_r(clock: *const time_t, result: *mut ::c_char) -> *mut ::c_char; |
| 5678 |
|
| 5679 |
pub fn getnameinfo( |
| 5680 |
sa: *const ::sockaddr, |
| 5681 |
salen: ::socklen_t, |
| 5682 |
host: *mut ::c_char, |
| 5683 |
hostlen: ::socklen_t, |
| 5684 |
serv: *mut ::c_char, |
| 5685 |
servlen: ::socklen_t, |
| 5686 |
flags: ::c_int, |
| 5687 |
) -> ::c_int; |
| 5688 |
pub fn mincore(addr: *const ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int; |
| 5689 |
pub fn sysctlnametomib( |
| 5690 |
name: *const ::c_char, |
| 5691 |
mibp: *mut ::c_int, |
| 5692 |
sizep: *mut ::size_t, |
| 5693 |
) -> ::c_int; |
| 5694 |
#[cfg_attr( |
| 5695 |
all(target_os = "macos", target_arch = "x86"), |
| 5696 |
link_name = "mprotect$UNIX2003" |
| 5697 |
)] |
| 5698 |
pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; |
| 5699 |
pub fn semget(key: key_t, nsems: ::c_int, semflg: ::c_int) -> ::c_int; |
| 5700 |
#[cfg_attr( |
| 5701 |
all(target_os = "macos", target_arch = "x86"), |
| 5702 |
link_name = "semctl$UNIX2003" |
| 5703 |
)] |
| 5704 |
pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int; |
| 5705 |
pub fn semop(semid: ::c_int, sops: *mut sembuf, nsops: ::size_t) -> ::c_int; |
| 5706 |
pub fn shm_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::c_int; |
| 5707 |
pub fn ftok(pathname: *const c_char, proj_id: ::c_int) -> key_t; |
| 5708 |
pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void; |
| 5709 |
pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int; |
| 5710 |
#[cfg_attr( |
| 5711 |
all(target_os = "macos", target_arch = "x86"), |
| 5712 |
link_name = "shmctl$UNIX2003" |
| 5713 |
)] |
| 5714 |
pub fn shmctl(shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds) -> ::c_int; |
| 5715 |
pub fn shmget(key: key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int; |
| 5716 |
pub fn sysctl( |
| 5717 |
name: *mut ::c_int, |
| 5718 |
namelen: ::c_uint, |
| 5719 |
oldp: *mut ::c_void, |
| 5720 |
oldlenp: *mut ::size_t, |
| 5721 |
newp: *mut ::c_void, |
| 5722 |
newlen: ::size_t, |
| 5723 |
) -> ::c_int; |
| 5724 |
pub fn sysctlbyname( |
| 5725 |
name: *const ::c_char, |
| 5726 |
oldp: *mut ::c_void, |
| 5727 |
oldlenp: *mut ::size_t, |
| 5728 |
newp: *mut ::c_void, |
| 5729 |
newlen: ::size_t, |
| 5730 |
) -> ::c_int; |
| 5731 |
#[deprecated(since = "0.2.55", note = "Use the `mach2` crate instead")] |
| 5732 |
pub fn mach_absolute_time() -> u64; |
| 5733 |
#[deprecated(since = "0.2.55", note = "Use the `mach2` crate instead")] |
| 5734 |
#[allow(deprecated)] |
| 5735 |
pub fn mach_timebase_info(info: *mut ::mach_timebase_info) -> ::c_int; |
| 5736 |
pub fn mach_host_self() -> mach_port_t; |
| 5737 |
pub fn mach_thread_self() -> mach_port_t; |
| 5738 |
pub fn pthread_setname_np(name: *const ::c_char) -> ::c_int; |
| 5739 |
pub fn pthread_getname_np(thread: ::pthread_t, name: *mut ::c_char, len: ::size_t) -> ::c_int; |
| 5740 |
pub fn pthread_mach_thread_np(thread: ::pthread_t) -> ::mach_port_t; |
| 5741 |
pub fn pthread_from_mach_thread_np(port: ::mach_port_t) -> ::pthread_t; |
| 5742 |
pub fn pthread_create_from_mach_thread( |
| 5743 |
thread: *mut ::pthread_t, |
| 5744 |
attr: *const ::pthread_attr_t, |
| 5745 |
f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, |
| 5746 |
value: *mut ::c_void, |
| 5747 |
) -> ::c_int; |
| 5748 |
pub fn pthread_stack_frame_decode_np( |
| 5749 |
frame_addr: ::uintptr_t, |
| 5750 |
return_addr: *mut ::uintptr_t, |
| 5751 |
) -> ::uintptr_t; |
| 5752 |
pub fn pthread_get_stackaddr_np(thread: ::pthread_t) -> *mut ::c_void; |
| 5753 |
pub fn pthread_get_stacksize_np(thread: ::pthread_t) -> ::size_t; |
| 5754 |
pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int; |
| 5755 |
pub fn pthread_condattr_getpshared( |
| 5756 |
attr: *const pthread_condattr_t, |
| 5757 |
pshared: *mut ::c_int, |
| 5758 |
) -> ::c_int; |
| 5759 |
pub fn pthread_main_np() -> ::c_int; |
| 5760 |
pub fn pthread_mutexattr_setpshared( |
| 5761 |
attr: *mut pthread_mutexattr_t, |
| 5762 |
pshared: ::c_int, |
| 5763 |
) -> ::c_int; |
| 5764 |
pub fn pthread_mutexattr_getpshared( |
| 5765 |
attr: *const pthread_mutexattr_t, |
| 5766 |
pshared: *mut ::c_int, |
| 5767 |
) -> ::c_int; |
| 5768 |
pub fn pthread_rwlockattr_getpshared( |
| 5769 |
attr: *const pthread_rwlockattr_t, |
| 5770 |
val: *mut ::c_int, |
| 5771 |
) -> ::c_int; |
| 5772 |
pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: ::c_int) -> ::c_int; |
| 5773 |
pub fn pthread_threadid_np(thread: ::pthread_t, thread_id: *mut u64) -> ::c_int; |
| 5774 |
pub fn pthread_attr_set_qos_class_np( |
| 5775 |
attr: *mut pthread_attr_t, |
| 5776 |
class: qos_class_t, |
| 5777 |
priority: ::c_int, |
| 5778 |
) -> ::c_int; |
| 5779 |
pub fn pthread_attr_get_qos_class_np( |
| 5780 |
attr: *mut pthread_attr_t, |
| 5781 |
class: *mut qos_class_t, |
| 5782 |
priority: *mut ::c_int, |
| 5783 |
) -> ::c_int; |
| 5784 |
pub fn pthread_set_qos_class_self_np(class: qos_class_t, priority: ::c_int) -> ::c_int; |
| 5785 |
pub fn pthread_get_qos_class_np( |
| 5786 |
thread: ::pthread_t, |
| 5787 |
class: *mut qos_class_t, |
| 5788 |
priority: *mut ::c_int, |
| 5789 |
) -> ::c_int; |
| 5790 |
pub fn pthread_attr_getschedparam( |
| 5791 |
attr: *const ::pthread_attr_t, |
| 5792 |
param: *mut sched_param, |
| 5793 |
) -> ::c_int; |
| 5794 |
pub fn pthread_attr_setschedparam( |
| 5795 |
attr: *mut ::pthread_attr_t, |
| 5796 |
param: *const sched_param, |
| 5797 |
) -> ::c_int; |
| 5798 |
pub fn pthread_getschedparam( |
| 5799 |
thread: ::pthread_t, |
| 5800 |
policy: *mut ::c_int, |
| 5801 |
param: *mut sched_param, |
| 5802 |
) -> ::c_int; |
| 5803 |
pub fn pthread_setschedparam( |
| 5804 |
thread: ::pthread_t, |
| 5805 |
policy: ::c_int, |
| 5806 |
param: *const sched_param, |
| 5807 |
) -> ::c_int; |
| 5808 |
|
| 5809 |
// Available from Big Sur |
| 5810 |
pub fn pthread_introspection_hook_install( |
| 5811 |
hook: ::pthread_introspection_hook_t, |
| 5812 |
) -> ::pthread_introspection_hook_t; |
| 5813 |
pub fn pthread_introspection_setspecific_np( |
| 5814 |
thread: ::pthread_t, |
| 5815 |
key: ::pthread_key_t, |
| 5816 |
value: *const ::c_void, |
| 5817 |
) -> ::c_int; |
| 5818 |
pub fn pthread_introspection_getspecific_np( |
| 5819 |
thread: ::pthread_t, |
| 5820 |
key: ::pthread_key_t, |
| 5821 |
) -> *mut ::c_void; |
| 5822 |
pub fn pthread_jit_write_protect_np(enabled: ::c_int); |
| 5823 |
pub fn pthread_jit_write_protect_supported_np() -> ::c_int; |
| 5824 |
// An array of pthread_jit_write_with_callback_np must declare |
| 5825 |
// the list of callbacks e.g. |
| 5826 |
// #[link_section = "__DATA_CONST,__pth_jit_func"] |
| 5827 |
// static callbacks: [libc::pthread_jit_write_callback_t; 2] = [native_jit_write_cb, |
| 5828 |
// std::mem::transmute::<libc::pthread_jit_write_callback_t>(std::ptr::null())]; |
| 5829 |
// (a handy PTHREAD_JIT_WRITE_CALLBACK_NP macro for other languages). |
| 5830 |
pub fn pthread_jit_write_with_callback_np( |
| 5831 |
callback: ::pthread_jit_write_callback_t, |
| 5832 |
ctx: *mut ::c_void, |
| 5833 |
) -> ::c_int; |
| 5834 |
pub fn pthread_jit_write_freeze_callbacks_np(); |
| 5835 |
pub fn pthread_cpu_number_np(cpu_number_out: *mut ::size_t) -> ::c_int; |
| 5836 |
|
| 5837 |
pub fn os_unfair_lock_lock(lock: os_unfair_lock_t); |
| 5838 |
pub fn os_unfair_lock_trylock(lock: os_unfair_lock_t) -> bool; |
| 5839 |
pub fn os_unfair_lock_unlock(lock: os_unfair_lock_t); |
| 5840 |
pub fn os_unfair_lock_assert_owner(lock: os_unfair_lock_t); |
| 5841 |
pub fn os_unfair_lock_assert_not_owner(lock: os_unfair_lock_t); |
| 5842 |
|
| 5843 |
pub fn os_log_create(subsystem: *const ::c_char, category: *const ::c_char) -> ::os_log_t; |
| 5844 |
pub fn os_log_type_enabled(oslog: ::os_log_t, tpe: ::os_log_type_t) -> bool; |
| 5845 |
pub fn os_signpost_id_make_with_pointer( |
| 5846 |
log: ::os_log_t, |
| 5847 |
ptr: *const ::c_void, |
| 5848 |
) -> ::os_signpost_id_t; |
| 5849 |
pub fn os_signpost_id_generate(log: ::os_log_t) -> ::os_signpost_id_t; |
| 5850 |
pub fn os_signpost_enabled(log: ::os_log_t) -> bool; |
| 5851 |
|
| 5852 |
pub fn thread_policy_set( |
| 5853 |
thread: thread_t, |
| 5854 |
flavor: thread_policy_flavor_t, |
| 5855 |
policy_info: thread_policy_t, |
| 5856 |
count: mach_msg_type_number_t, |
| 5857 |
) -> kern_return_t; |
| 5858 |
pub fn thread_policy_get( |
| 5859 |
thread: thread_t, |
| 5860 |
flavor: thread_policy_flavor_t, |
| 5861 |
policy_info: thread_policy_t, |
| 5862 |
count: *mut mach_msg_type_number_t, |
| 5863 |
get_default: *mut boolean_t, |
| 5864 |
) -> kern_return_t; |
| 5865 |
pub fn thread_info( |
| 5866 |
target_act: thread_inspect_t, |
| 5867 |
flavor: thread_flavor_t, |
| 5868 |
thread_info_out: thread_info_t, |
| 5869 |
thread_info_outCnt: *mut mach_msg_type_number_t, |
| 5870 |
) -> kern_return_t; |
| 5871 |
#[cfg_attr(doc, doc(alias = "__errno_location"))] |
| 5872 |
#[cfg_attr(doc, doc(alias = "errno"))] |
| 5873 |
pub fn __error() -> *mut ::c_int; |
| 5874 |
pub fn backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int; |
| 5875 |
pub fn backtrace_symbols(addrs: *const *mut ::c_void, sz: ::c_int) -> *mut *mut ::c_char; |
| 5876 |
pub fn backtrace_symbols_fd(addrs: *const *mut ::c_void, sz: ::c_int, fd: ::c_int); |
| 5877 |
pub fn backtrace_from_fp( |
| 5878 |
startfp: *mut ::c_void, |
| 5879 |
array: *mut *mut ::c_void, |
| 5880 |
size: ::c_int, |
| 5881 |
) -> ::c_int; |
| 5882 |
pub fn backtrace_image_offsets( |
| 5883 |
array: *const *mut ::c_void, |
| 5884 |
image_offsets: *mut image_offset, |
| 5885 |
size: ::c_int, |
| 5886 |
); |
| 5887 |
pub fn backtrace_async( |
| 5888 |
array: *mut *mut ::c_void, |
| 5889 |
length: ::size_t, |
| 5890 |
task_id: *mut u32, |
| 5891 |
) -> ::size_t; |
| 5892 |
#[cfg_attr( |
| 5893 |
all(target_os = "macos", not(target_arch = "aarch64")), |
| 5894 |
link_name = "statfs$INODE64" |
| 5895 |
)] |
| 5896 |
pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; |
| 5897 |
#[cfg_attr( |
| 5898 |
all(target_os = "macos", not(target_arch = "aarch64")), |
| 5899 |
link_name = "fstatfs$INODE64" |
| 5900 |
)] |
| 5901 |
pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; |
| 5902 |
pub fn kevent( |
| 5903 |
kq: ::c_int, |
| 5904 |
changelist: *const ::kevent, |
| 5905 |
nchanges: ::c_int, |
| 5906 |
eventlist: *mut ::kevent, |
| 5907 |
nevents: ::c_int, |
| 5908 |
timeout: *const ::timespec, |
| 5909 |
) -> ::c_int; |
| 5910 |
pub fn kevent64( |
| 5911 |
kq: ::c_int, |
| 5912 |
changelist: *const ::kevent64_s, |
| 5913 |
nchanges: ::c_int, |
| 5914 |
eventlist: *mut ::kevent64_s, |
| 5915 |
nevents: ::c_int, |
| 5916 |
flags: ::c_uint, |
| 5917 |
timeout: *const ::timespec, |
| 5918 |
) -> ::c_int; |
| 5919 |
pub fn mount( |
| 5920 |
src: *const ::c_char, |
| 5921 |
target: *const ::c_char, |
| 5922 |
flags: ::c_int, |
| 5923 |
data: *mut ::c_void, |
| 5924 |
) -> ::c_int; |
| 5925 |
pub fn fmount( |
| 5926 |
src: *const ::c_char, |
| 5927 |
fd: ::c_int, |
| 5928 |
flags: ::c_int, |
| 5929 |
data: *mut ::c_void, |
| 5930 |
) -> ::c_int; |
| 5931 |
pub fn ptrace(request: ::c_int, pid: ::pid_t, addr: *mut ::c_char, data: ::c_int) -> ::c_int; |
| 5932 |
pub fn quotactl( |
| 5933 |
special: *const ::c_char, |
| 5934 |
cmd: ::c_int, |
| 5935 |
id: ::c_int, |
| 5936 |
data: *mut ::c_char, |
| 5937 |
) -> ::c_int; |
| 5938 |
pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int; |
| 5939 |
pub fn sendfile( |
| 5940 |
fd: ::c_int, |
| 5941 |
s: ::c_int, |
| 5942 |
offset: ::off_t, |
| 5943 |
len: *mut ::off_t, |
| 5944 |
hdtr: *mut ::sf_hdtr, |
| 5945 |
flags: ::c_int, |
| 5946 |
) -> ::c_int; |
| 5947 |
pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; |
| 5948 |
pub fn utimensat( |
| 5949 |
dirfd: ::c_int, |
| 5950 |
path: *const ::c_char, |
| 5951 |
times: *const ::timespec, |
| 5952 |
flag: ::c_int, |
| 5953 |
) -> ::c_int; |
| 5954 |
pub fn openpty( |
| 5955 |
amaster: *mut ::c_int, |
| 5956 |
aslave: *mut ::c_int, |
| 5957 |
name: *mut ::c_char, |
| 5958 |
termp: *mut termios, |
| 5959 |
winp: *mut ::winsize, |
| 5960 |
) -> ::c_int; |
| 5961 |
pub fn forkpty( |
| 5962 |
amaster: *mut ::c_int, |
| 5963 |
name: *mut ::c_char, |
| 5964 |
termp: *mut termios, |
| 5965 |
winp: *mut ::winsize, |
| 5966 |
) -> ::pid_t; |
| 5967 |
pub fn login_tty(fd: ::c_int) -> ::c_int; |
| 5968 |
pub fn duplocale(base: ::locale_t) -> ::locale_t; |
| 5969 |
pub fn freelocale(loc: ::locale_t) -> ::c_int; |
| 5970 |
pub fn localeconv_l(loc: ::locale_t) -> *mut lconv; |
| 5971 |
pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; |
| 5972 |
pub fn uselocale(loc: ::locale_t) -> ::locale_t; |
| 5973 |
pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char; |
| 5974 |
pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int; |
| 5975 |
pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int; |
| 5976 |
pub fn getdomainname(name: *mut ::c_char, len: ::c_int) -> ::c_int; |
| 5977 |
pub fn setdomainname(name: *const ::c_char, len: ::c_int) -> ::c_int; |
| 5978 |
pub fn preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t; |
| 5979 |
pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) |
| 5980 |
-> ::ssize_t; |
| 5981 |
pub fn getxattr( |
| 5982 |
path: *const ::c_char, |
| 5983 |
name: *const ::c_char, |
| 5984 |
value: *mut ::c_void, |
| 5985 |
size: ::size_t, |
| 5986 |
position: u32, |
| 5987 |
flags: ::c_int, |
| 5988 |
) -> ::ssize_t; |
| 5989 |
pub fn fgetxattr( |
| 5990 |
filedes: ::c_int, |
| 5991 |
name: *const ::c_char, |
| 5992 |
value: *mut ::c_void, |
| 5993 |
size: ::size_t, |
| 5994 |
position: u32, |
| 5995 |
flags: ::c_int, |
| 5996 |
) -> ::ssize_t; |
| 5997 |
pub fn setxattr( |
| 5998 |
path: *const ::c_char, |
| 5999 |
name: *const ::c_char, |
| 6000 |
value: *const ::c_void, |
| 6001 |
size: ::size_t, |
| 6002 |
position: u32, |
| 6003 |
flags: ::c_int, |
| 6004 |
) -> ::c_int; |
| 6005 |
pub fn fsetxattr( |
| 6006 |
filedes: ::c_int, |
| 6007 |
name: *const ::c_char, |
| 6008 |
value: *const ::c_void, |
| 6009 |
size: ::size_t, |
| 6010 |
position: u32, |
| 6011 |
flags: ::c_int, |
| 6012 |
) -> ::c_int; |
| 6013 |
pub fn listxattr( |
| 6014 |
path: *const ::c_char, |
| 6015 |
list: *mut ::c_char, |
| 6016 |
size: ::size_t, |
| 6017 |
flags: ::c_int, |
| 6018 |
) -> ::ssize_t; |
| 6019 |
pub fn flistxattr( |
| 6020 |
filedes: ::c_int, |
| 6021 |
list: *mut ::c_char, |
| 6022 |
size: ::size_t, |
| 6023 |
flags: ::c_int, |
| 6024 |
) -> ::ssize_t; |
| 6025 |
pub fn removexattr(path: *const ::c_char, name: *const ::c_char, flags: ::c_int) -> ::c_int; |
| 6026 |
pub fn renamex_np(from: *const ::c_char, to: *const ::c_char, flags: ::c_uint) -> ::c_int; |
| 6027 |
pub fn renameatx_np( |
| 6028 |
fromfd: ::c_int, |
| 6029 |
from: *const ::c_char, |
| 6030 |
tofd: ::c_int, |
| 6031 |
to: *const ::c_char, |
| 6032 |
flags: ::c_uint, |
| 6033 |
) -> ::c_int; |
| 6034 |
pub fn fremovexattr(filedes: ::c_int, name: *const ::c_char, flags: ::c_int) -> ::c_int; |
| 6035 |
|
| 6036 |
pub fn getgrouplist( |
| 6037 |
name: *const ::c_char, |
| 6038 |
basegid: ::c_int, |
| 6039 |
groups: *mut ::c_int, |
| 6040 |
ngroups: *mut ::c_int, |
| 6041 |
) -> ::c_int; |
| 6042 |
pub fn initgroups(user: *const ::c_char, basegroup: ::c_int) -> ::c_int; |
| 6043 |
|
| 6044 |
#[cfg_attr( |
| 6045 |
all(target_os = "macos", target_arch = "x86"), |
| 6046 |
link_name = "waitid$UNIX2003" |
| 6047 |
)] |
| 6048 |
pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) |
| 6049 |
-> ::c_int; |
| 6050 |
pub fn brk(addr: *const ::c_void) -> *mut ::c_void; |
| 6051 |
pub fn sbrk(increment: ::c_int) -> *mut ::c_void; |
| 6052 |
pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int; |
| 6053 |
#[deprecated(since = "0.2.55", note = "Use the `mach2` crate instead")] |
| 6054 |
pub fn _dyld_image_count() -> u32; |
| 6055 |
#[deprecated(since = "0.2.55", note = "Use the `mach2` crate instead")] |
| 6056 |
#[allow(deprecated)] |
| 6057 |
pub fn _dyld_get_image_header(image_index: u32) -> *const mach_header; |
| 6058 |
#[deprecated(since = "0.2.55", note = "Use the `mach2` crate instead")] |
| 6059 |
pub fn _dyld_get_image_vmaddr_slide(image_index: u32) -> ::intptr_t; |
| 6060 |
#[deprecated(since = "0.2.55", note = "Use the `mach2` crate instead")] |
| 6061 |
pub fn _dyld_get_image_name(image_index: u32) -> *const ::c_char; |
| 6062 |
|
| 6063 |
pub fn posix_spawn( |
| 6064 |
pid: *mut ::pid_t, |
| 6065 |
path: *const ::c_char, |
| 6066 |
file_actions: *const ::posix_spawn_file_actions_t, |
| 6067 |
attrp: *const ::posix_spawnattr_t, |
| 6068 |
argv: *const *mut ::c_char, |
| 6069 |
envp: *const *mut ::c_char, |
| 6070 |
) -> ::c_int; |
| 6071 |
pub fn posix_spawnp( |
| 6072 |
pid: *mut ::pid_t, |
| 6073 |
file: *const ::c_char, |
| 6074 |
file_actions: *const ::posix_spawn_file_actions_t, |
| 6075 |
attrp: *const ::posix_spawnattr_t, |
| 6076 |
argv: *const *mut ::c_char, |
| 6077 |
envp: *const *mut ::c_char, |
| 6078 |
) -> ::c_int; |
| 6079 |
pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int; |
| 6080 |
pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int; |
| 6081 |
pub fn posix_spawnattr_getsigdefault( |
| 6082 |
attr: *const posix_spawnattr_t, |
| 6083 |
default: *mut ::sigset_t, |
| 6084 |
) -> ::c_int; |
| 6085 |
pub fn posix_spawnattr_setsigdefault( |
| 6086 |
attr: *mut posix_spawnattr_t, |
| 6087 |
default: *const ::sigset_t, |
| 6088 |
) -> ::c_int; |
| 6089 |
pub fn posix_spawnattr_getsigmask( |
| 6090 |
attr: *const posix_spawnattr_t, |
| 6091 |
default: *mut ::sigset_t, |
| 6092 |
) -> ::c_int; |
| 6093 |
pub fn posix_spawnattr_setsigmask( |
| 6094 |
attr: *mut posix_spawnattr_t, |
| 6095 |
default: *const ::sigset_t, |
| 6096 |
) -> ::c_int; |
| 6097 |
pub fn posix_spawnattr_getflags( |
| 6098 |
attr: *const posix_spawnattr_t, |
| 6099 |
flags: *mut ::c_short, |
| 6100 |
) -> ::c_int; |
| 6101 |
pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int; |
| 6102 |
pub fn posix_spawnattr_getpgroup( |
| 6103 |
attr: *const posix_spawnattr_t, |
| 6104 |
flags: *mut ::pid_t, |
| 6105 |
) -> ::c_int; |
| 6106 |
pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int; |
| 6107 |
pub fn posix_spawnattr_setarchpref_np( |
| 6108 |
attr: *mut posix_spawnattr_t, |
| 6109 |
count: ::size_t, |
| 6110 |
pref: *mut ::cpu_type_t, |
| 6111 |
subpref: *mut ::cpu_subtype_t, |
| 6112 |
ocount: *mut ::size_t, |
| 6113 |
) -> ::c_int; |
| 6114 |
pub fn posix_spawnattr_getarchpref_np( |
| 6115 |
attr: *const posix_spawnattr_t, |
| 6116 |
count: ::size_t, |
| 6117 |
pref: *mut ::cpu_type_t, |
| 6118 |
subpref: *mut ::cpu_subtype_t, |
| 6119 |
ocount: *mut ::size_t, |
| 6120 |
) -> ::c_int; |
| 6121 |
pub fn posix_spawnattr_getbinpref_np( |
| 6122 |
attr: *const posix_spawnattr_t, |
| 6123 |
count: ::size_t, |
| 6124 |
pref: *mut ::cpu_type_t, |
| 6125 |
ocount: *mut ::size_t, |
| 6126 |
) -> ::c_int; |
| 6127 |
pub fn posix_spawnattr_setbinpref_np( |
| 6128 |
attr: *mut posix_spawnattr_t, |
| 6129 |
count: ::size_t, |
| 6130 |
pref: *mut ::cpu_type_t, |
| 6131 |
ocount: *mut ::size_t, |
| 6132 |
) -> ::c_int; |
| 6133 |
pub fn posix_spawnattr_set_qos_class_np( |
| 6134 |
attr: *mut posix_spawnattr_t, |
| 6135 |
qos_class: ::qos_class_t, |
| 6136 |
) -> ::c_int; |
| 6137 |
pub fn posix_spawnattr_get_qos_class_np( |
| 6138 |
attr: *const posix_spawnattr_t, |
| 6139 |
qos_class: *mut ::qos_class_t, |
| 6140 |
) -> ::c_int; |
| 6141 |
|
| 6142 |
pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int; |
| 6143 |
pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int; |
| 6144 |
pub fn posix_spawn_file_actions_addopen( |
| 6145 |
actions: *mut posix_spawn_file_actions_t, |
| 6146 |
fd: ::c_int, |
| 6147 |
path: *const ::c_char, |
| 6148 |
oflag: ::c_int, |
| 6149 |
mode: ::mode_t, |
| 6150 |
) -> ::c_int; |
| 6151 |
pub fn posix_spawn_file_actions_addclose( |
| 6152 |
actions: *mut posix_spawn_file_actions_t, |
| 6153 |
fd: ::c_int, |
| 6154 |
) -> ::c_int; |
| 6155 |
pub fn posix_spawn_file_actions_adddup2( |
| 6156 |
actions: *mut posix_spawn_file_actions_t, |
| 6157 |
fd: ::c_int, |
| 6158 |
newfd: ::c_int, |
| 6159 |
) -> ::c_int; |
| 6160 |
pub fn uname(buf: *mut ::utsname) -> ::c_int; |
| 6161 |
|
| 6162 |
pub fn connectx( |
| 6163 |
socket: ::c_int, |
| 6164 |
endpoints: *const sa_endpoints_t, |
| 6165 |
associd: sae_associd_t, |
| 6166 |
flags: ::c_uint, |
| 6167 |
iov: *const ::iovec, |
| 6168 |
iovcnt: ::c_uint, |
| 6169 |
len: *mut ::size_t, |
| 6170 |
connid: *mut sae_connid_t, |
| 6171 |
) -> ::c_int; |
| 6172 |
pub fn disconnectx(socket: ::c_int, associd: sae_associd_t, connid: sae_connid_t) -> ::c_int; |
| 6173 |
|
| 6174 |
pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; |
| 6175 |
pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; |
| 6176 |
|
| 6177 |
#[cfg_attr( |
| 6178 |
all(target_os = "macos", not(target_arch = "aarch64")), |
| 6179 |
link_name = "getmntinfo$INODE64" |
| 6180 |
)] |
| 6181 |
pub fn getmntinfo(mntbufp: *mut *mut statfs, flags: ::c_int) -> ::c_int; |
| 6182 |
#[cfg_attr( |
| 6183 |
all(target_os = "macos", not(target_arch = "aarch64")), |
| 6184 |
link_name = "getfsstat$INODE64" |
| 6185 |
)] |
| 6186 |
pub fn getfsstat(mntbufp: *mut statfs, bufsize: ::c_int, flags: ::c_int) -> ::c_int; |
| 6187 |
|
| 6188 |
// Copy-on-write functions. |
| 6189 |
// According to the man page `flags` is an `int` but in the header |
| 6190 |
// this is a `uint32_t`. |
| 6191 |
pub fn clonefile(src: *const ::c_char, dst: *const ::c_char, flags: u32) -> ::c_int; |
| 6192 |
pub fn clonefileat( |
| 6193 |
src_dirfd: ::c_int, |
| 6194 |
src: *const ::c_char, |
| 6195 |
dst_dirfd: ::c_int, |
| 6196 |
dst: *const ::c_char, |
| 6197 |
flags: u32, |
| 6198 |
) -> ::c_int; |
| 6199 |
pub fn fclonefileat( |
| 6200 |
srcfd: ::c_int, |
| 6201 |
dst_dirfd: ::c_int, |
| 6202 |
dst: *const ::c_char, |
| 6203 |
flags: u32, |
| 6204 |
) -> ::c_int; |
| 6205 |
|
| 6206 |
pub fn copyfile( |
| 6207 |
from: *const ::c_char, |
| 6208 |
to: *const ::c_char, |
| 6209 |
state: copyfile_state_t, |
| 6210 |
flags: copyfile_flags_t, |
| 6211 |
) -> ::c_int; |
| 6212 |
pub fn fcopyfile( |
| 6213 |
from: ::c_int, |
| 6214 |
to: ::c_int, |
| 6215 |
state: copyfile_state_t, |
| 6216 |
flags: copyfile_flags_t, |
| 6217 |
) -> ::c_int; |
| 6218 |
pub fn copyfile_state_free(s: copyfile_state_t) -> ::c_int; |
| 6219 |
pub fn copyfile_state_alloc() -> copyfile_state_t; |
| 6220 |
pub fn copyfile_state_get(s: copyfile_state_t, flags: u32, dst: *mut ::c_void) -> ::c_int; |
| 6221 |
pub fn copyfile_state_set(s: copyfile_state_t, flags: u32, src: *const ::c_void) -> ::c_int; |
| 6222 |
|
| 6223 |
// Added in macOS 10.13 |
| 6224 |
// ISO/IEC 9899:2011 ("ISO C11") K.3.7.4.1 |
| 6225 |
pub fn memset_s(s: *mut ::c_void, smax: ::size_t, c: ::c_int, n: ::size_t) -> ::c_int; |
| 6226 |
// Added in macOS 10.5 |
| 6227 |
pub fn memset_pattern4(b: *mut ::c_void, pattern4: *const ::c_void, len: ::size_t); |
| 6228 |
pub fn memset_pattern8(b: *mut ::c_void, pattern8: *const ::c_void, len: ::size_t); |
| 6229 |
pub fn memset_pattern16(b: *mut ::c_void, pattern16: *const ::c_void, len: ::size_t); |
| 6230 |
|
| 6231 |
// Inherited from BSD but available from Big Sur only |
| 6232 |
pub fn strtonum( |
| 6233 |
__numstr: *const ::c_char, |
| 6234 |
__minval: ::c_longlong, |
| 6235 |
__maxval: ::c_longlong, |
| 6236 |
errstrp: *mut *const ::c_char, |
| 6237 |
) -> ::c_longlong; |
| 6238 |
|
| 6239 |
pub fn mstats() -> mstats; |
| 6240 |
pub fn malloc_printf(format: *const ::c_char, ...); |
| 6241 |
pub fn malloc_zone_check(zone: *mut ::malloc_zone_t) -> ::boolean_t; |
| 6242 |
pub fn malloc_zone_print(zone: *mut ::malloc_zone_t, verbose: ::boolean_t); |
| 6243 |
pub fn malloc_zone_statistics(zone: *mut ::malloc_zone_t, stats: *mut malloc_statistics_t); |
| 6244 |
pub fn malloc_zone_log(zone: *mut ::malloc_zone_t, address: *mut ::c_void); |
| 6245 |
pub fn malloc_zone_print_ptr_info(ptr: *mut ::c_void); |
| 6246 |
pub fn malloc_default_zone() -> *mut ::malloc_zone_t; |
| 6247 |
pub fn malloc_zone_from_ptr(ptr: *const ::c_void) -> *mut ::malloc_zone_t; |
| 6248 |
pub fn malloc_zone_malloc(zone: *mut ::malloc_zone_t, size: ::size_t) -> *mut ::c_void; |
| 6249 |
pub fn malloc_zone_valloc(zone: *mut ::malloc_zone_t, size: ::size_t) -> *mut ::c_void; |
| 6250 |
pub fn malloc_zone_calloc( |
| 6251 |
zone: *mut ::malloc_zone_t, |
| 6252 |
num_items: ::size_t, |
| 6253 |
size: ::size_t, |
| 6254 |
) -> *mut ::c_void; |
| 6255 |
pub fn malloc_zone_realloc( |
| 6256 |
zone: *mut ::malloc_zone_t, |
| 6257 |
ptr: *mut ::c_void, |
| 6258 |
size: ::size_t, |
| 6259 |
) -> *mut ::c_void; |
| 6260 |
pub fn malloc_zone_free(zone: *mut ::malloc_zone_t, ptr: *mut ::c_void); |
| 6261 |
|
| 6262 |
pub fn proc_listpids( |
| 6263 |
t: u32, |
| 6264 |
typeinfo: u32, |
| 6265 |
buffer: *mut ::c_void, |
| 6266 |
buffersize: ::c_int, |
| 6267 |
) -> ::c_int; |
| 6268 |
pub fn proc_listallpids(buffer: *mut ::c_void, buffersize: ::c_int) -> ::c_int; |
| 6269 |
pub fn proc_listpgrppids( |
| 6270 |
pgrpid: ::pid_t, |
| 6271 |
buffer: *mut ::c_void, |
| 6272 |
buffersize: ::c_int, |
| 6273 |
) -> ::c_int; |
| 6274 |
pub fn proc_listchildpids(ppid: ::pid_t, buffer: *mut ::c_void, buffersize: ::c_int) |
| 6275 |
-> ::c_int; |
| 6276 |
pub fn proc_pidinfo( |
| 6277 |
pid: ::c_int, |
| 6278 |
flavor: ::c_int, |
| 6279 |
arg: u64, |
| 6280 |
buffer: *mut ::c_void, |
| 6281 |
buffersize: ::c_int, |
| 6282 |
) -> ::c_int; |
| 6283 |
pub fn proc_pidfdinfo( |
| 6284 |
pid: ::c_int, |
| 6285 |
fd: ::c_int, |
| 6286 |
flavor: ::c_int, |
| 6287 |
buffer: *mut ::c_void, |
| 6288 |
buffersize: ::c_int, |
| 6289 |
) -> ::c_int; |
| 6290 |
pub fn proc_pidfileportinfo( |
| 6291 |
pid: ::c_int, |
| 6292 |
fileport: u32, |
| 6293 |
flavor: ::c_int, |
| 6294 |
buffer: *mut ::c_void, |
| 6295 |
buffersize: ::c_int, |
| 6296 |
) -> ::c_int; |
| 6297 |
pub fn proc_pidpath(pid: ::c_int, buffer: *mut ::c_void, buffersize: u32) -> ::c_int; |
| 6298 |
pub fn proc_name(pid: ::c_int, buffer: *mut ::c_void, buffersize: u32) -> ::c_int; |
| 6299 |
pub fn proc_regionfilename( |
| 6300 |
pid: ::c_int, |
| 6301 |
address: u64, |
| 6302 |
buffer: *mut ::c_void, |
| 6303 |
buffersize: u32, |
| 6304 |
) -> ::c_int; |
| 6305 |
pub fn proc_kmsgbuf(buffer: *mut ::c_void, buffersize: u32) -> ::c_int; |
| 6306 |
pub fn proc_libversion(major: *mut ::c_int, minor: *mut ::c_int) -> ::c_int; |
| 6307 |
pub fn proc_pid_rusage(pid: ::c_int, flavor: ::c_int, buffer: *mut rusage_info_t) -> ::c_int; |
| 6308 |
|
| 6309 |
// Available from Big Sur |
| 6310 |
pub fn proc_set_no_smt() -> ::c_int; |
| 6311 |
pub fn proc_setthread_no_smt() -> ::c_int; |
| 6312 |
pub fn proc_set_csm(flags: u32) -> ::c_int; |
| 6313 |
pub fn proc_setthread_csm(flags: u32) -> ::c_int; |
| 6314 |
/// # Notes |
| 6315 |
/// |
| 6316 |
/// `id` is of type [`uuid_t`]. |
| 6317 |
pub fn gethostuuid(id: *mut u8, timeout: *const ::timespec) -> ::c_int; |
| 6318 |
|
| 6319 |
pub fn gethostid() -> ::c_long; |
| 6320 |
pub fn sethostid(hostid: ::c_long); |
| 6321 |
|
| 6322 |
pub fn CCRandomGenerateBytes(bytes: *mut ::c_void, size: ::size_t) -> ::CCRNGStatus; |
| 6323 |
pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; |
| 6324 |
|
| 6325 |
pub fn _NSGetExecutablePath(buf: *mut ::c_char, bufsize: *mut u32) -> ::c_int; |
| 6326 |
pub fn _NSGetEnviron() -> *mut *mut *mut ::c_char; |
| 6327 |
|
| 6328 |
pub fn mach_vm_map( |
| 6329 |
target_task: ::vm_map_t, |
| 6330 |
address: *mut ::mach_vm_address_t, |
| 6331 |
size: ::mach_vm_size_t, |
| 6332 |
mask: ::mach_vm_offset_t, |
| 6333 |
flags: ::c_int, |
| 6334 |
object: ::mem_entry_name_port_t, |
| 6335 |
offset: ::memory_object_offset_t, |
| 6336 |
copy: ::boolean_t, |
| 6337 |
cur_protection: ::vm_prot_t, |
| 6338 |
max_protection: ::vm_prot_t, |
| 6339 |
inheritance: ::vm_inherit_t, |
| 6340 |
) -> ::kern_return_t; |
| 6341 |
|
| 6342 |
pub fn vm_allocate( |
| 6343 |
target_task: vm_map_t, |
| 6344 |
address: *mut vm_address_t, |
| 6345 |
size: vm_size_t, |
| 6346 |
flags: ::c_int, |
| 6347 |
) -> ::kern_return_t; |
| 6348 |
|
| 6349 |
pub fn vm_deallocate( |
| 6350 |
target_task: vm_map_t, |
| 6351 |
address: vm_address_t, |
| 6352 |
size: vm_size_t, |
| 6353 |
) -> ::kern_return_t; |
| 6354 |
|
| 6355 |
pub fn host_statistics64( |
| 6356 |
host_priv: host_t, |
| 6357 |
flavor: host_flavor_t, |
| 6358 |
host_info64_out: host_info64_t, |
| 6359 |
host_info64_outCnt: *mut mach_msg_type_number_t, |
| 6360 |
) -> ::kern_return_t; |
| 6361 |
pub fn host_processor_info( |
| 6362 |
host: host_t, |
| 6363 |
flavor: processor_flavor_t, |
| 6364 |
out_processor_count: *mut natural_t, |
| 6365 |
out_processor_info: *mut processor_info_array_t, |
| 6366 |
out_processor_infoCnt: *mut mach_msg_type_number_t, |
| 6367 |
) -> ::kern_return_t; |
| 6368 |
|
| 6369 |
pub static mut mach_task_self_: ::mach_port_t; |
| 6370 |
pub fn task_for_pid( |
| 6371 |
host: ::mach_port_t, |
| 6372 |
pid: ::pid_t, |
| 6373 |
task: *mut ::mach_port_t, |
| 6374 |
) -> ::kern_return_t; |
| 6375 |
pub fn task_info( |
| 6376 |
host: ::mach_port_t, |
| 6377 |
flavor: task_flavor_t, |
| 6378 |
task_info_out: task_info_t, |
| 6379 |
task_info_count: *mut mach_msg_type_number_t, |
| 6380 |
) -> ::kern_return_t; |
| 6381 |
pub fn task_create( |
| 6382 |
target_task: ::task_t, |
| 6383 |
ledgers: ::ledger_array_t, |
| 6384 |
ledgersCnt: ::mach_msg_type_number_t, |
| 6385 |
inherit_memory: ::boolean_t, |
| 6386 |
child_task: *mut ::task_t, |
| 6387 |
) -> ::kern_return_t; |
| 6388 |
pub fn task_terminate(target_task: ::task_t) -> ::kern_return_t; |
| 6389 |
pub fn task_threads( |
| 6390 |
target_task: ::task_inspect_t, |
| 6391 |
act_list: *mut ::thread_act_array_t, |
| 6392 |
act_listCnt: *mut ::mach_msg_type_number_t, |
| 6393 |
) -> ::kern_return_t; |
| 6394 |
pub fn host_statistics( |
| 6395 |
host_priv: host_t, |
| 6396 |
flavor: host_flavor_t, |
| 6397 |
host_info_out: host_info_t, |
| 6398 |
host_info_outCnt: *mut mach_msg_type_number_t, |
| 6399 |
) -> ::kern_return_t; |
| 6400 |
|
| 6401 |
// sysdir.h |
| 6402 |
pub fn sysdir_start_search_path_enumeration( |
| 6403 |
dir: sysdir_search_path_directory_t, |
| 6404 |
domainMask: sysdir_search_path_domain_mask_t, |
| 6405 |
) -> ::sysdir_search_path_enumeration_state; |
| 6406 |
pub fn sysdir_get_next_search_path_enumeration( |
| 6407 |
state: ::sysdir_search_path_enumeration_state, |
| 6408 |
path: *mut ::c_char, |
| 6409 |
) -> ::sysdir_search_path_enumeration_state; |
| 6410 |
|
| 6411 |
pub static vm_page_size: vm_size_t; |
| 6412 |
|
| 6413 |
pub fn getattrlist( |
| 6414 |
path: *const ::c_char, |
| 6415 |
attrList: *mut ::c_void, |
| 6416 |
attrBuf: *mut ::c_void, |
| 6417 |
attrBufSize: ::size_t, |
| 6418 |
options: u32, |
| 6419 |
) -> ::c_int; |
| 6420 |
pub fn fgetattrlist( |
| 6421 |
fd: ::c_int, |
| 6422 |
attrList: *mut ::c_void, |
| 6423 |
attrBuf: *mut ::c_void, |
| 6424 |
attrBufSize: ::size_t, |
| 6425 |
options: u32, |
| 6426 |
) -> ::c_int; |
| 6427 |
pub fn getattrlistat( |
| 6428 |
fd: ::c_int, |
| 6429 |
path: *const ::c_char, |
| 6430 |
attrList: *mut ::c_void, |
| 6431 |
attrBuf: *mut ::c_void, |
| 6432 |
attrBufSize: ::size_t, |
| 6433 |
options: ::c_ulong, |
| 6434 |
) -> ::c_int; |
| 6435 |
pub fn setattrlist( |
| 6436 |
path: *const ::c_char, |
| 6437 |
attrList: *mut ::c_void, |
| 6438 |
attrBuf: *mut ::c_void, |
| 6439 |
attrBufSize: ::size_t, |
| 6440 |
options: u32, |
| 6441 |
) -> ::c_int; |
| 6442 |
pub fn fsetattrlist( |
| 6443 |
fd: ::c_int, |
| 6444 |
attrList: *mut ::c_void, |
| 6445 |
attrBuf: *mut ::c_void, |
| 6446 |
attrBufSize: ::size_t, |
| 6447 |
options: u32, |
| 6448 |
) -> ::c_int; |
| 6449 |
pub fn setattrlistat( |
| 6450 |
dir_fd: ::c_int, |
| 6451 |
path: *const ::c_char, |
| 6452 |
attrList: *mut ::c_void, |
| 6453 |
attrBuf: *mut ::c_void, |
| 6454 |
attrBufSize: ::size_t, |
| 6455 |
options: u32, |
| 6456 |
) -> ::c_int; |
| 6457 |
pub fn getattrlistbulk( |
| 6458 |
dirfd: ::c_int, |
| 6459 |
attrList: *mut ::c_void, |
| 6460 |
attrBuf: *mut ::c_void, |
| 6461 |
attrBufSize: ::size_t, |
| 6462 |
options: u64, |
| 6463 |
) -> ::c_int; |
| 6464 |
|
| 6465 |
pub fn malloc_size(ptr: *const ::c_void) -> ::size_t; |
| 6466 |
pub fn malloc_good_size(size: ::size_t) -> ::size_t; |
| 6467 |
|
| 6468 |
pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; |
| 6469 |
pub fn basename(path: *mut ::c_char) -> *mut ::c_char; |
| 6470 |
|
| 6471 |
pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; |
| 6472 |
pub fn mknodat( |
| 6473 |
dirfd: ::c_int, |
| 6474 |
pathname: *const ::c_char, |
| 6475 |
mode: ::mode_t, |
| 6476 |
dev: dev_t, |
| 6477 |
) -> ::c_int; |
| 6478 |
pub fn freadlink(fd: ::c_int, buf: *mut ::c_char, size: ::size_t) -> ::c_int; |
| 6479 |
pub fn execvP( |
| 6480 |
file: *const ::c_char, |
| 6481 |
search_path: *const ::c_char, |
| 6482 |
argv: *const *mut ::c_char, |
| 6483 |
) -> ::c_int; |
| 6484 |
} |
| 6485 |
|
| 6486 |
pub unsafe fn mach_task_self() -> ::mach_port_t { |
| 6487 |
mach_task_self_ |
| 6488 |
} |
| 6489 |
|
| 6490 |
cfg_if! { |
| 6491 |
if #[cfg(target_os = "macos")] { |
| 6492 |
extern "C" { |
| 6493 |
pub fn clock_settime(clock_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; |
| 6494 |
} |
| 6495 |
} |
| 6496 |
} |
| 6497 |
cfg_if! { |
| 6498 |
if #[cfg(any(target_os = "macos", target_os = "ios", target_os = "tvos", target_os = "visionos"))] { |
| 6499 |
extern "C" { |
| 6500 |
pub fn memmem( |
| 6501 |
haystack: *const ::c_void, |
| 6502 |
haystacklen: ::size_t, |
| 6503 |
needle: *const ::c_void, |
| 6504 |
needlelen: ::size_t, |
| 6505 |
) -> *mut ::c_void; |
| 6506 |
pub fn task_set_info(target_task: ::task_t, |
| 6507 |
flavor: ::task_flavor_t, |
| 6508 |
task_info_in: ::task_info_t, |
| 6509 |
task_info_inCnt: ::mach_msg_type_number_t |
| 6510 |
) -> ::kern_return_t; |
| 6511 |
} |
| 6512 |
} |
| 6513 |
} |
| 6514 |
|
| 6515 |
// These require a dependency on `libiconv`, and including this when built as |
| 6516 |
// part of `std` means every Rust program gets it. Ideally we would have a link |
| 6517 |
// modifier to only include these if they are used, but we do not. |
| 6518 |
#[cfg_attr(not(feature = "rustc-dep-of-std"), link(name = "iconv"))] |
| 6519 |
extern "C" { |
| 6520 |
pub fn iconv_open(tocode: *const ::c_char, fromcode: *const ::c_char) -> iconv_t; |
| 6521 |
pub fn iconv( |
| 6522 |
cd: iconv_t, |
| 6523 |
inbuf: *mut *mut ::c_char, |
| 6524 |
inbytesleft: *mut ::size_t, |
| 6525 |
outbuf: *mut *mut ::c_char, |
| 6526 |
outbytesleft: *mut ::size_t, |
| 6527 |
) -> ::size_t; |
| 6528 |
pub fn iconv_close(cd: iconv_t) -> ::c_int; |
| 6529 |
} |
| 6530 |
|
| 6531 |
cfg_if! { |
| 6532 |
if #[cfg(target_pointer_width = "32")] { |
| 6533 |
mod b32; |
| 6534 |
pub use self::b32::*; |
| 6535 |
} else if #[cfg(target_pointer_width = "64")] { |
| 6536 |
mod b64; |
| 6537 |
pub use self::b64::*; |
| 6538 |
} else { |
| 6539 |
// Unknown target_arch |
| 6540 |
} |
| 6541 |
} |
| 6542 |
|
| 6543 |
cfg_if! { |
| 6544 |
if #[cfg(libc_long_array)] { |
| 6545 |
mod long_array; |
| 6546 |
pub use self::long_array::*; |
| 6547 |
} |
| 6548 |
} |