Skip to content

Commit 0f40951

Browse files
committed
Add NetBSD unpcbid, LOCAL_PEEREID and other LOCAL_ constants
1 parent adb0a34 commit 0f40951

File tree

1 file changed

+12
-0
lines changed
  • src/unix/bsd/netbsdlike/netbsd

1 file changed

+12
-0
lines changed

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,12 @@ s! {
299299
pub sc_groups: [::gid_t; 1],
300300
}
301301

302+
pub struct unpcbid {
303+
pub unp_pid: ::pid_t,
304+
pub unp_euid: ::uid_t,
305+
pub unp_egid: ::gid_t,
306+
}
307+
302308
pub struct sockaddr_dl {
303309
pub sdl_len: ::c_uchar,
304310
pub sdl_family: ::c_uchar,
@@ -1047,6 +1053,12 @@ pub const SO_TIMESTAMP: ::c_int = 0x2000;
10471053
pub const SO_OVERFLOWED: ::c_int = 0x1009;
10481054
pub const SO_NOHEADER: ::c_int = 0x100a;
10491055

1056+
// http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/un.h?annotate
1057+
pub const LOCAL_OCREDS: ::c_int = 0x0001; // pass credentials to receiver
1058+
pub const LOCAL_CONNWAIT: ::c_int = 0x0002; // connects block until accepted
1059+
pub const LOCAL_PEEREID: ::c_int = 0x0003; // get peer identification
1060+
pub const LOCAL_CREDS: ::c_int = 0x0004; // pass credentials to receiver
1061+
10501062
// https://github.com/NetBSD/src/blob/trunk/sys/net/if.h#L373
10511063
pub const IFF_UP: ::c_int = 0x0001; // interface is up
10521064
pub const IFF_BROADCAST: ::c_int = 0x0002; // broadcast address valid

0 commit comments

Comments
 (0)