Skip to content

Commit 6deb8a9

Browse files
committed
Auto merge of #2020 - joshtriplett:ifla, r=JohnTitor
Add more IFLA_ values
2 parents 2ec333c + 2076d1c commit 6deb8a9

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

libc-test/build.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2675,6 +2675,28 @@ fn test_linux(target: &str) {
26752675
// Not yet implemented on sparc64
26762676
"SYS_clone3" if mips | sparc64 => true,
26772677

2678+
// Missing from musl's kernel headers
2679+
| "IFLA_GSO_MAX_SEGS"
2680+
| "IFLA_GSO_MAX_SIZE"
2681+
| "IFLA_PAD"
2682+
| "IFLA_XDP"
2683+
| "IFLA_EVENT"
2684+
| "IFLA_NEW_NETNSID"
2685+
| "IFLA_IF_NETNSID"
2686+
| "IFLA_TARGET_NETNSID"
2687+
| "IFLA_CARRIER_UP_COUNT"
2688+
| "IFLA_CARRIER_DOWN_COUNT"
2689+
| "IFLA_NEW_IFINDEX"
2690+
| "IFLA_MIN_MTU"
2691+
| "IFLA_MAX_MTU"
2692+
if musl => true,
2693+
2694+
// Requires more recent kernel headers:
2695+
| "IFLA_PROP_LIST"
2696+
| "IFLA_ALT_IFNAME"
2697+
| "IFLA_PERM_ADDRESS"
2698+
| "IFLA_PROTO_DOWN_REASON" => true,
2699+
26782700
_ => false,
26792701
}
26802702
});

src/unix/linux_like/linux/mod.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,6 +1191,23 @@ pub const IFLA_PHYS_SWITCH_ID: ::c_ushort = 36;
11911191
pub const IFLA_LINK_NETNSID: ::c_ushort = 37;
11921192
pub const IFLA_PHYS_PORT_NAME: ::c_ushort = 38;
11931193
pub const IFLA_PROTO_DOWN: ::c_ushort = 39;
1194+
pub const IFLA_GSO_MAX_SEGS: ::c_ushort = 40;
1195+
pub const IFLA_GSO_MAX_SIZE: ::c_ushort = 41;
1196+
pub const IFLA_PAD: ::c_ushort = 42;
1197+
pub const IFLA_XDP: ::c_ushort = 43;
1198+
pub const IFLA_EVENT: ::c_ushort = 44;
1199+
pub const IFLA_NEW_NETNSID: ::c_ushort = 45;
1200+
pub const IFLA_IF_NETNSID: ::c_ushort = 46;
1201+
pub const IFLA_TARGET_NETNSID: ::c_ushort = IFLA_IF_NETNSID;
1202+
pub const IFLA_CARRIER_UP_COUNT: ::c_ushort = 47;
1203+
pub const IFLA_CARRIER_DOWN_COUNT: ::c_ushort = 48;
1204+
pub const IFLA_NEW_IFINDEX: ::c_ushort = 49;
1205+
pub const IFLA_MIN_MTU: ::c_ushort = 50;
1206+
pub const IFLA_MAX_MTU: ::c_ushort = 51;
1207+
pub const IFLA_PROP_LIST: ::c_ushort = 52;
1208+
pub const IFLA_ALT_IFNAME: ::c_ushort = 53;
1209+
pub const IFLA_PERM_ADDRESS: ::c_ushort = 54;
1210+
pub const IFLA_PROTO_DOWN_REASON: ::c_ushort = 55;
11941211

11951212
pub const IFLA_INFO_UNSPEC: ::c_ushort = 0;
11961213
pub const IFLA_INFO_KIND: ::c_ushort = 1;

0 commit comments

Comments
 (0)