diff --git a/libc-test/build.rs b/libc-test/build.rs index 07f06039dd27b..fee2421743486 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2569,6 +2569,7 @@ fn test_freebsd(target: &str) { "netinet/sctp.h", "netinet/tcp.h", "netinet/udp.h", + "netinet6/in6_var.h", "poll.h", "pthread.h", "pthread_np.h", diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index cf1d92de132dc..a20f696e7e3c1 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -527,6 +527,19 @@ IFF_RUNNING IFF_SIMPLEX IFF_UP IMAXBEL +IN6_IFF_ANYCAST +IN6_IFF_AUTOCONF +IN6_IFF_CLAT46 +IN6_IFF_DEPRECATED +IN6_IFF_DETACHED +IN6_IFF_DUPLICATED +IN6_IFF_DYNAMIC +IN6_IFF_NODAD +IN6_IFF_NOPFX +IN6_IFF_OPTIMISTIC +IN6_IFF_SECURED +IN6_IFF_TEMPORARY +IN6_IFF_TENTATIVE INIT_PROCESS IOV_MAX IPC_CREAT @@ -1349,6 +1362,7 @@ SIGIO SIGNATURE SIGSTKSZ SIOCGIFADDR +SIOCGIFAFLAG_IN6 SOCK_MAXADDRLEN SOCK_RAW SOCK_RDM diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt index 5d070f952f3cc..9c51762fb0268 100644 --- a/libc-test/semver/freebsd.txt +++ b/libc-test/semver/freebsd.txt @@ -516,6 +516,15 @@ IFF_SIMPLEX IFF_STATICARP IFF_UP IMAXBEL +IN6_IFF_ANYCAST +IN6_IFF_AUTOCONF +IN6_IFF_DEPRECATED +IN6_IFF_DETACHED +IN6_IFF_DUPLICATED +IN6_IFF_NODAD +IN6_IFF_PREFER_SOURCE +IN6_IFF_TEMPORARY +IN6_IFF_TENTATIVE INIT_PROCESS IOV_MAX IPC_CREAT @@ -1444,6 +1453,7 @@ SIGLWP SIGSTKSZ SIGTHR SIOCGIFADDR +SIOCGIFAFLAG_IN6 SLIPDISC SOCKCREDSIZE SOCK_CLOEXEC diff --git a/src/new/apple/xnu/mod.rs b/src/new/apple/xnu/mod.rs index 8b8afb6bc39d3..9978fdc8f1a75 100644 --- a/src/new/apple/xnu/mod.rs +++ b/src/new/apple/xnu/mod.rs @@ -27,4 +27,6 @@ pub(crate) mod machine { pub(crate) mod _mcontext; } +pub(crate) mod netinet6; + pub(crate) mod sys; diff --git a/src/new/apple/xnu/netinet6/in6_var.rs b/src/new/apple/xnu/netinet6/in6_var.rs new file mode 100644 index 0000000000000..fc06537087e24 --- /dev/null +++ b/src/new/apple/xnu/netinet6/in6_var.rs @@ -0,0 +1,21 @@ +//! Header: `netinet6/in6_var.h` +//! +//! + +use crate::prelude::*; + +pub const IN6_IFF_ANYCAST: c_int = 0x0001; +pub const IN6_IFF_TENTATIVE: c_int = 0x0002; +pub const IN6_IFF_DUPLICATED: c_int = 0x0004; +pub const IN6_IFF_DETACHED: c_int = 0x0008; +pub const IN6_IFF_DEPRECATED: c_int = 0x0010; +pub const IN6_IFF_NODAD: c_int = 0x0020; +pub const IN6_IFF_AUTOCONF: c_int = 0x0040; +pub const IN6_IFF_TEMPORARY: c_int = 0x0080; +pub const IN6_IFF_DYNAMIC: c_int = 0x0100; +pub const IN6_IFF_OPTIMISTIC: c_int = 0x0200; +pub const IN6_IFF_SECURED: c_int = 0x0400; +pub const IN6_IFF_CLAT46: c_int = 0x1000; +pub const IN6_IFF_NOPFX: c_int = 0x8000; + +pub const SIOCGIFAFLAG_IN6: c_ulong = 0xc1206949; // _IOWR('i', 73, in6_ifreq) diff --git a/src/new/apple/xnu/netinet6/mod.rs b/src/new/apple/xnu/netinet6/mod.rs new file mode 100644 index 0000000000000..1592863f7314e --- /dev/null +++ b/src/new/apple/xnu/netinet6/mod.rs @@ -0,0 +1,5 @@ +//! Directory: `netinet6/` +//! +//! + +pub(crate) mod in6_var; diff --git a/src/new/freebsd/mod.rs b/src/new/freebsd/mod.rs index eedf235d1e235..6bc38335f5361 100644 --- a/src/new/freebsd/mod.rs +++ b/src/new/freebsd/mod.rs @@ -3,5 +3,6 @@ //! * Headers: //! * Symbol map: +pub(crate) mod netinet6; pub(crate) mod sys; pub(crate) mod unistd; diff --git a/src/new/freebsd/netinet6/in6_var.rs b/src/new/freebsd/netinet6/in6_var.rs new file mode 100644 index 0000000000000..7d6822ea31f88 --- /dev/null +++ b/src/new/freebsd/netinet6/in6_var.rs @@ -0,0 +1,17 @@ +//! Header: `netinet6/in6_var.h` +//! +//! https://github.com/freebsd/freebsd-src/blob/main/sys/netinet6/in6_var.h + +use crate::prelude::*; + +pub const IN6_IFF_ANYCAST: c_int = 0x01; +pub const IN6_IFF_TENTATIVE: c_int = 0x02; +pub const IN6_IFF_DUPLICATED: c_int = 0x04; +pub const IN6_IFF_DETACHED: c_int = 0x08; +pub const IN6_IFF_DEPRECATED: c_int = 0x10; +pub const IN6_IFF_NODAD: c_int = 0x20; +pub const IN6_IFF_AUTOCONF: c_int = 0x40; +pub const IN6_IFF_TEMPORARY: c_int = 0x80; +pub const IN6_IFF_PREFER_SOURCE: c_int = 0x0100; + +pub const SIOCGIFAFLAG_IN6: c_ulong = 0xc1206949; // _IOWR('i', 73, in6_ifreq) diff --git a/src/new/freebsd/netinet6/mod.rs b/src/new/freebsd/netinet6/mod.rs new file mode 100644 index 0000000000000..848e809aaa8c3 --- /dev/null +++ b/src/new/freebsd/netinet6/mod.rs @@ -0,0 +1,5 @@ +//! Directory: `netinet6/` +//! +//! https://github.com/freebsd/freebsd-src/tree/main/sys/netinet6 + +pub(crate) mod in6_var; diff --git a/src/new/mod.rs b/src/new/mod.rs index 073041842026c..ee7edf516c15b 100644 --- a/src/new/mod.rs +++ b/src/new/mod.rs @@ -197,6 +197,7 @@ cfg_if! { #[cfg(target_env = "gnu")] pub use net::route::*; } else if #[cfg(target_vendor = "apple")] { + pub use netinet6::in6_var::*; pub use pthread_::introspection::*; pub use pthread_::pthread_spis::*; pub use pthread_::spawn::*; @@ -221,6 +222,7 @@ cfg_if! { pub use net::bpf::*; pub use net::if_::*; } else if #[cfg(target_os = "freebsd")] { + pub use netinet6::in6_var::*; pub use sys::file::*; } }