diff options
author | Dan Glastonbury <dan.glastonbury@gmail.com> | 2017-10-16 13:31:32 +1000 |
---|---|---|
committer | Dan Glastonbury <dglastonbury@mozilla.com> | 2017-10-16 14:47:58 +1000 |
commit | 49c97ba49caa84d52d6d5e0033abf4755f16c5ed (patch) | |
tree | a2f0cc28b9a6d8b78fc84ba9576d8753bf11533f /src/unix/bsd/apple/mod.rs | |
parent | b09d655ca5d9d5601e9032808ada1cd9b4ea2a23 (diff) | |
download | rust-libc-49c97ba49caa84d52d6d5e0033abf4755f16c5ed.tar.gz |
apple: Add SOL_LOCAL and LOCAL_* for local domain sockets.
Diffstat (limited to 'src/unix/bsd/apple/mod.rs')
-rw-r--r-- | src/unix/bsd/apple/mod.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 6407e77bf3..5b774703d7 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -411,6 +411,13 @@ s! { pub xsu_pagesize: u32, pub xsu_encrypted: ::boolean_t, } + + pub struct xucred { + pub cr_version: ::c_uint, + pub cr_uid: ::uid_t, + pub cr_ngroups: ::c_short, + pub cr_groups: [::gid_t;16] + } } pub const _UTX_USERSIZE: usize = 256; @@ -1371,6 +1378,15 @@ pub const IPV6_LEAVE_GROUP: ::c_int = 13; pub const TCP_NODELAY: ::c_int = 0x01; pub const TCP_KEEPALIVE: ::c_int = 0x10; + +pub const SOL_LOCAL: ::c_int = 0; + +pub const LOCAL_PEERCRED: ::c_int = 0x001; +pub const LOCAL_PEERPID: ::c_int = 0x002; +pub const LOCAL_PEEREPID: ::c_int = 0x003; +pub const LOCAL_PEERUUID: ::c_int = 0x004; +pub const LOCAL_PEEREUUID: ::c_int = 0x005; + pub const SOL_SOCKET: ::c_int = 0xffff; pub const SO_DEBUG: ::c_int = 0x01; @@ -1949,6 +1965,8 @@ pub const PROC_PIDTHREADINFO: ::c_int = 5; pub const MAXCOMLEN: usize = 16; pub const MAXTHREADNAMESIZE: usize = 64; +pub const XUCRED_VERSION: ::c_uint = 0; + f! { pub fn WSTOPSIG(status: ::c_int) -> ::c_int { status >> 8 |