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

Add more IFLA_ values #2020

Merged
merged 1 commit into from Jan 5, 2021
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
22 changes: 22 additions & 0 deletions libc-test/build.rs
Expand Up @@ -2672,6 +2672,28 @@ fn test_linux(target: &str) {
// Not yet implemented on sparc64
"SYS_clone3" if mips | sparc64 => true,

// Missing from musl's kernel headers
| "IFLA_GSO_MAX_SEGS"
| "IFLA_GSO_MAX_SIZE"
| "IFLA_PAD"
| "IFLA_XDP"
| "IFLA_EVENT"
| "IFLA_NEW_NETNSID"
| "IFLA_IF_NETNSID"
| "IFLA_TARGET_NETNSID"
| "IFLA_CARRIER_UP_COUNT"
| "IFLA_CARRIER_DOWN_COUNT"
| "IFLA_NEW_IFINDEX"
| "IFLA_MIN_MTU"
| "IFLA_MAX_MTU"
if musl => true,

// Requires more recent kernel headers:
| "IFLA_PROP_LIST"
| "IFLA_ALT_IFNAME"
| "IFLA_PERM_ADDRESS"
| "IFLA_PROTO_DOWN_REASON" => true,

_ => false,
}
});
Expand Down
17 changes: 17 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Expand Up @@ -1191,6 +1191,23 @@ pub const IFLA_PHYS_SWITCH_ID: ::c_ushort = 36;
pub const IFLA_LINK_NETNSID: ::c_ushort = 37;
pub const IFLA_PHYS_PORT_NAME: ::c_ushort = 38;
pub const IFLA_PROTO_DOWN: ::c_ushort = 39;
pub const IFLA_GSO_MAX_SEGS: ::c_ushort = 40;
pub const IFLA_GSO_MAX_SIZE: ::c_ushort = 41;
pub const IFLA_PAD: ::c_ushort = 42;
pub const IFLA_XDP: ::c_ushort = 43;
pub const IFLA_EVENT: ::c_ushort = 44;
pub const IFLA_NEW_NETNSID: ::c_ushort = 45;
pub const IFLA_IF_NETNSID: ::c_ushort = 46;
pub const IFLA_TARGET_NETNSID: ::c_ushort = IFLA_IF_NETNSID;
pub const IFLA_CARRIER_UP_COUNT: ::c_ushort = 47;
pub const IFLA_CARRIER_DOWN_COUNT: ::c_ushort = 48;
pub const IFLA_NEW_IFINDEX: ::c_ushort = 49;
pub const IFLA_MIN_MTU: ::c_ushort = 50;
pub const IFLA_MAX_MTU: ::c_ushort = 51;
pub const IFLA_PROP_LIST: ::c_ushort = 52;
pub const IFLA_ALT_IFNAME: ::c_ushort = 53;
pub const IFLA_PERM_ADDRESS: ::c_ushort = 54;
pub const IFLA_PROTO_DOWN_REASON: ::c_ushort = 55;

pub const IFLA_INFO_UNSPEC: ::c_ushort = 0;
pub const IFLA_INFO_KIND: ::c_ushort = 1;
Expand Down