Skip to content

Commit

Permalink
Add more IFLA_ values
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtriplett committed Jan 5, 2021
1 parent a98a649 commit 436948c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libc-test/build.rs
Expand Up @@ -2672,6 +2672,9 @@ fn test_linux(target: &str) {
// Not yet implemented on sparc64
"SYS_clone3" if mips | sparc64 => 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 436948c

Please sign in to comment.