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

SockProtocol::Raw = libc::IPPROTO_RAW for raw sockets #1848

Merged
merged 1 commit into from Nov 21, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -36,6 +36,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
([#1853](https://github.com/nix-rust/nix/pull/1853))
- Added `new_unnamed` and `is_unnamed` for `UnixAddr` on Linux and Android.
([#1857](https://github.com/nix-rust/nix/pull/1857))
- Added `SockProtocol::Raw` for raw sockets
([#1848](https://github.com/nix-rust/nix/pull/1848))

### Changed

Expand Down
2 changes: 2 additions & 0 deletions src/sys/socket/mod.rs
Expand Up @@ -118,6 +118,8 @@ pub enum SockProtocol {
Tcp = libc::IPPROTO_TCP,
/// UDP protocol ([ip(7)](https://man7.org/linux/man-pages/man7/ip.7.html))
Udp = libc::IPPROTO_UDP,
/// Raw sockets ([raw(7)](https://man7.org/linux/man-pages/man7/raw.7.html))
Raw = libc::IPPROTO_RAW,
/// Allows applications and other KEXTs to be notified when certain kernel events occur
/// ([ref](https://developer.apple.com/library/content/documentation/Darwin/Conceptual/NKEConceptual/control/control.html))
#[cfg(any(target_os = "ios", target_os = "macos"))]
Expand Down