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

Define IPPROTO_ETHERNET on Linux-like platforms. #3272

Merged
merged 1 commit into from Jun 24, 2023
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
3 changes: 2 additions & 1 deletion libc-test/build.rs
Expand Up @@ -1799,7 +1799,7 @@ fn test_android(target: &str) {
| "MADV_POPULATE_WRITE" => true,

// kernel 5.6 minimum required
"IPPROTO_MPTCP" => true,
"IPPROTO_MPTCP" | "IPPROTO_ETHERNET" => true,

_ => false,
}
Expand Down Expand Up @@ -3578,6 +3578,7 @@ fn test_linux(target: &str) {

// IPPROTO_MAX was increased in 5.6 for IPPROTO_MPTCP:
| "IPPROTO_MAX"
| "IPPROTO_ETHERNET"
| "IPPROTO_MPTCP" => true,

// FIXME: Not currently available in headers
Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/linux.txt
Expand Up @@ -1041,6 +1041,7 @@ IPPROTO_DSTOPTS
IPPROTO_EGP
IPPROTO_ENCAP
IPPROTO_ESP
IPPROTO_ETHERNET
IPPROTO_FRAGMENT
IPPROTO_GRE
IPPROTO_HOPOPTS
Expand Down
2 changes: 2 additions & 0 deletions src/unix/linux_like/mod.rs
Expand Up @@ -918,6 +918,8 @@ pub const IPPROTO_BEETPH: ::c_int = 94;
pub const IPPROTO_MPLS: ::c_int = 137;
/// Multipath TCP
pub const IPPROTO_MPTCP: ::c_int = 262;
/// Ethernet-within-IPv6 encapsulation.
pub const IPPROTO_ETHERNET: ::c_int = 143;

pub const MCAST_EXCLUDE: ::c_int = 0;
pub const MCAST_INCLUDE: ::c_int = 1;
Expand Down