From 22e6b1c6fa3bfc10f94aed24c252609a9024fd65 Mon Sep 17 00:00:00 2001 From: Paul Sbarra Date: Sun, 25 Dec 2022 00:23:32 -0600 Subject: [PATCH] linux: add rtnetlink ifinfomsg attribute enumerals --- libc-test/semver/linux.txt | 10 ++++++++++ src/unix/linux_like/linux/mod.rs | 13 +++++++++++++ 2 files changed, 23 insertions(+) diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt index 7e0585ac97613..9279157eada95 100644 --- a/libc-test/semver/linux.txt +++ b/libc-test/semver/linux.txt @@ -788,6 +788,16 @@ GRND_NONBLOCK GRND_RANDOM GRND_INSECURE IBSHIFT +IF_LINK_MODE_DEFAULT +IF_LINK_MODE_DORMANT +IF_LINK_MODE_TESTING +IF_OPER_DORMANT +IF_OPER_DOWN +IF_OPER_LOWERLAYERDOWN +IF_OPER_NOTPRESENT +IF_OPER_TESTING +IF_OPER_UNKNOWN +IF_OPER_UP IFA_ADDRESS IFA_ANYCAST IFA_BROADCAST diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index d3d627234ceea..e210b80d09966 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -3029,6 +3029,19 @@ pub const ALG_SET_AEAD_AUTHSIZE: ::c_int = 5; pub const ALG_OP_DECRYPT: ::c_int = 0; pub const ALG_OP_ENCRYPT: ::c_int = 1; +// include/uapi/linux/if.h +pub const IF_OPER_UNKNOWN: ::c_int = 0; +pub const IF_OPER_NOTPRESENT: ::c_int = 1; +pub const IF_OPER_DOWN: ::c_int = 2; +pub const IF_OPER_LOWERLAYERDOWN: ::c_int = 3; +pub const IF_OPER_TESTING: ::c_int = 4; +pub const IF_OPER_DORMANT: ::c_int = 5; +pub const IF_OPER_UP: ::c_int = 6; + +pub const IF_LINK_MODE_DEFAULT: ::c_int = 0; +pub const IF_LINK_MODE_DORMANT: ::c_int = 1; +pub const IF_LINK_MODE_TESTING: ::c_int = 2; + // include/uapi/linux/udp.h pub const UDP_CORK: ::c_int = 1; pub const UDP_ENCAP: ::c_int = 100;