Skip to content

Commit a11d63a

Browse files
committed
Auto merge of #3051 - tones111:rtnl_if_enum, r=JohnTitor
linux: add rtnetlink ifinfomsg attribute enumerals
2 parents 461807b + 1abdc61 commit a11d63a

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

libc-test/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3683,6 +3683,9 @@ fn test_linux(target: &str) {
36833683
// FIXME: requires Linux >= 5.7:
36843684
"MREMAP_DONTUNMAP" if musl => true,
36853685

3686+
// FIXME: requires Linux >= v5.8
3687+
"IF_LINK_MODE_TESTING" if musl || sparc64 => true,
3688+
36863689
// FIXME: Requires more recent kernel headers (5.9 / 5.11):
36873690
| "CLOSE_RANGE_UNSHARE"
36883691
| "CLOSE_RANGE_CLOEXEC" if musl => true,

libc-test/semver/linux.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,16 @@ HWTSTAMP_FILTER_PTP_V2_SYNC
839839
HWTSTAMP_FILTER_PTP_V2_DELAY_REQ
840840
HWTSTAMP_FILTER_NTP_ALL
841841
IBSHIFT
842+
IF_LINK_MODE_DEFAULT
843+
IF_LINK_MODE_DORMANT
844+
IF_LINK_MODE_TESTING
845+
IF_OPER_DORMANT
846+
IF_OPER_DOWN
847+
IF_OPER_LOWERLAYERDOWN
848+
IF_OPER_NOTPRESENT
849+
IF_OPER_TESTING
850+
IF_OPER_UNKNOWN
851+
IF_OPER_UP
842852
IFA_ADDRESS
843853
IFA_ANYCAST
844854
IFA_BROADCAST

src/unix/linux_like/linux/mod.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3192,6 +3192,19 @@ pub const ALG_SET_AEAD_AUTHSIZE: ::c_int = 5;
31923192
pub const ALG_OP_DECRYPT: ::c_int = 0;
31933193
pub const ALG_OP_ENCRYPT: ::c_int = 1;
31943194

3195+
// include/uapi/linux/if.h
3196+
pub const IF_OPER_UNKNOWN: ::c_int = 0;
3197+
pub const IF_OPER_NOTPRESENT: ::c_int = 1;
3198+
pub const IF_OPER_DOWN: ::c_int = 2;
3199+
pub const IF_OPER_LOWERLAYERDOWN: ::c_int = 3;
3200+
pub const IF_OPER_TESTING: ::c_int = 4;
3201+
pub const IF_OPER_DORMANT: ::c_int = 5;
3202+
pub const IF_OPER_UP: ::c_int = 6;
3203+
3204+
pub const IF_LINK_MODE_DEFAULT: ::c_int = 0;
3205+
pub const IF_LINK_MODE_DORMANT: ::c_int = 1;
3206+
pub const IF_LINK_MODE_TESTING: ::c_int = 2;
3207+
31953208
// include/uapi/linux/udp.h
31963209
pub const UDP_CORK: ::c_int = 1;
31973210
pub const UDP_ENCAP: ::c_int = 100;

0 commit comments

Comments
 (0)