Skip to content

Commit

Permalink
Auto merge of #2020 - joshtriplett:ifla, r=JohnTitor
Browse files Browse the repository at this point in the history
Add more IFLA_ values
  • Loading branch information
bors committed Jan 5, 2021
2 parents 2ec333c + 2076d1c commit 6deb8a9
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
22 changes: 22 additions & 0 deletions libc-test/build.rs
Expand Up @@ -2675,6 +2675,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

0 comments on commit 6deb8a9

Please sign in to comment.