Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(Apple): Add the LOCAL_PEERTOKEN socket option #3929

Merged
merged 3 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ LOCAL_PEEREPID
LOCAL_PEEREUUID
LOCAL_PEERPID
LOCAL_PEERUUID
LOCAL_PEERTOKEN
LOGIN_PROCESS
LOG_AUTHPRIV
LOG_CRON
Expand Down
7 changes: 7 additions & 0 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4154,11 +4154,18 @@ pub const TCP_CONNECTION_INFO: ::c_int = 0x106;

pub const SOL_LOCAL: ::c_int = 0;

/// Retrieve peer credentials.
pub const LOCAL_PEERCRED: ::c_int = 0x001;
/// Retrieve peer PID.
pub const LOCAL_PEERPID: ::c_int = 0x002;
/// Retrieve effective peer PID.
pub const LOCAL_PEEREPID: ::c_int = 0x003;
/// Retrieve peer UUID.
pub const LOCAL_PEERUUID: ::c_int = 0x004;
/// Retrieve effective peer UUID.
pub const LOCAL_PEEREUUID: ::c_int = 0x005;
/// Retrieve peer audit token.
pub const LOCAL_PEERTOKEN: ::c_int = 0x006;

pub const SOL_SOCKET: ::c_int = 0xffff;

Expand Down