summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-02 15:09:28 +0000
committerbors <bors@rust-lang.org>2023-04-02 15:09:28 +0000
commit26c13fd57708475a83493387ca1a73a2b8ebdaa0 (patch)
tree8fc4e5e979e9c27c3872bc12cd63cd9043bc40aa
parent82f6fd2c33d72b6252bc14103362fff02a93ce55 (diff)
parent63ba3a046bac119995e2b5a21b6782398b92665a (diff)
downloadrust-libc-26c13fd57708475a83493387ca1a73a2b8ebdaa0.tar.gz
Auto merge of #3035 - jreppnow:rtnetlink-ext-filter, r=JohnTitor
Adding RTEXT_FILTER* constants from linux/rtnetlink.h Adding some constants needed for some specific netlink-route interactions (fetching information on a network interface). They are defined at ```linux/rtnetlink.h```.
-rw-r--r--libc-test/build.rs2
-rw-r--r--libc-test/semver/linux.txt7
-rw-r--r--src/unix/linux_like/linux/mod.rs8
3 files changed, 17 insertions, 0 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 9536668f2f..64759bfd09 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -3476,6 +3476,7 @@ fn test_linux(target: &str) {
|| name.starts_with("P_")
|| name.starts_with("PF_")
|| name.starts_with("RLIMIT_")
+ || name.starts_with("RTEXT_FILTER_")
|| name.starts_with("SOL_")
|| name.starts_with("STATX_")
|| name.starts_with("SW_")
@@ -3490,6 +3491,7 @@ fn test_linux(target: &str) {
if musl || sparc64 {
// FIXME: Requires >= 5.4.1 kernel headers
if name.starts_with("J1939")
+ || name.starts_with("RTEXT_FILTER_")
|| name.starts_with("SO_J1939")
|| name.starts_with("SCM_J1939")
{
diff --git a/libc-test/semver/linux.txt b/libc-test/semver/linux.txt
index 95f8178e5e..53410113b9 100644
--- a/libc-test/semver/linux.txt
+++ b/libc-test/semver/linux.txt
@@ -2047,6 +2047,13 @@ RTCF_LOG
RTCF_MASQ
RTCF_NAT
RTCF_VALVE
+RTEXT_FILTER_BRVLAN
+RTEXT_FILTER_BRVLAN_COMPRESSED
+RTEXT_FILTER_CFM_CONFIG
+RTEXT_FILTER_CFM_STATUS
+RTEXT_FILTER_MRP
+RTEXT_FILTER_SKIP_STATS
+RTEXT_FILTER_VF
RTF_ADDRCLASSMASK
RTF_ADDRCONF
RTF_ALLONLINK
diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs
index 36b2d7878e..a1e1900747 100644
--- a/src/unix/linux_like/linux/mod.rs
+++ b/src/unix/linux_like/linux/mod.rs
@@ -3042,6 +3042,14 @@ pub const ARPD_LOOKUP: ::c_ushort = 0x02;
pub const ARPD_FLUSH: ::c_ushort = 0x03;
pub const ATF_MAGIC: ::c_int = 0x80;
+pub const RTEXT_FILTER_VF: ::c_int = 1 << 0;
+pub const RTEXT_FILTER_BRVLAN: ::c_int = 1 << 1;
+pub const RTEXT_FILTER_BRVLAN_COMPRESSED: ::c_int = 1 << 2;
+pub const RTEXT_FILTER_SKIP_STATS: ::c_int = 1 << 3;
+pub const RTEXT_FILTER_MRP: ::c_int = 1 << 4;
+pub const RTEXT_FILTER_CFM_CONFIG: ::c_int = 1 << 5;
+pub const RTEXT_FILTER_CFM_STATUS: ::c_int = 1 << 6;
+
// userspace compat definitions for RTNLGRP_*
pub const RTMGRP_LINK: ::c_int = 0x00001;
pub const RTMGRP_NOTIFY: ::c_int = 0x00002;