summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjørn Birch Moltu <t.b.moltu@lyse.net>2020-02-16 20:13:16 +0100
committerTorbjørn Birch Moltu <t.b.moltu@lyse.net>2021-03-07 21:44:23 +0100
commit0f4095141598630144bd45d8ae75aecf553cc51b (patch)
treef1ee9ef0c5331d5cc2bd48bf3196661fc8049935
parentadb0a34c87b48cb0f165aa6f967dfb159dbfee52 (diff)
downloadrust-libc-0f4095141598630144bd45d8ae75aecf553cc51b.tar.gz
Add NetBSD unpcbid, LOCAL_PEEREID and other LOCAL_ constants
-rw-r--r--src/unix/bsd/netbsdlike/netbsd/mod.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs
index 7833138798..b789f47ec9 100644
--- a/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -299,6 +299,12 @@ s! {
pub sc_groups: [::gid_t; 1],
}
+ pub struct unpcbid {
+ pub unp_pid: ::pid_t,
+ pub unp_euid: ::uid_t,
+ pub unp_egid: ::gid_t,
+ }
+
pub struct sockaddr_dl {
pub sdl_len: ::c_uchar,
pub sdl_family: ::c_uchar,
@@ -1047,6 +1053,12 @@ pub const SO_TIMESTAMP: ::c_int = 0x2000;
pub const SO_OVERFLOWED: ::c_int = 0x1009;
pub const SO_NOHEADER: ::c_int = 0x100a;
+// http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/un.h?annotate
+pub const LOCAL_OCREDS: ::c_int = 0x0001; // pass credentials to receiver
+pub const LOCAL_CONNWAIT: ::c_int = 0x0002; // connects block until accepted
+pub const LOCAL_PEEREID: ::c_int = 0x0003; // get peer identification
+pub const LOCAL_CREDS: ::c_int = 0x0004; // pass credentials to receiver
+
// https://github.com/NetBSD/src/blob/trunk/sys/net/if.h#L373
pub const IFF_UP: ::c_int = 0x0001; // interface is up
pub const IFF_BROADCAST: ::c_int = 0x0002; // broadcast address valid