Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
14 changes: 14 additions & 0 deletions libc-test/semver/apple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1349,6 +1362,7 @@ SIGIO
SIGNATURE
SIGSTKSZ
SIOCGIFADDR
SIOCGIFAFLAG_IN6
SOCK_MAXADDRLEN
SOCK_RAW
SOCK_RDM
Expand Down
10 changes: 10 additions & 0 deletions libc-test/semver/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1444,6 +1453,7 @@ SIGLWP
SIGSTKSZ
SIGTHR
SIOCGIFADDR
SIOCGIFAFLAG_IN6
SLIPDISC
SOCKCREDSIZE
SOCK_CLOEXEC
Expand Down
2 changes: 2 additions & 0 deletions src/new/apple/xnu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ pub(crate) mod machine {
pub(crate) mod _mcontext;
}

pub(crate) mod netinet6;

pub(crate) mod sys;
21 changes: 21 additions & 0 deletions src/new/apple/xnu/netinet6/in6_var.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//! Header: `netinet6/in6_var.h`
//!
//! <https://github.com/apple-oss-distributions/xnu/blob/main/bsd/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)
5 changes: 5 additions & 0 deletions src/new/apple/xnu/netinet6/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//! Directory: `netinet6/`
//!
//! <https://github.com/apple-oss-distributions/xnu/tree/main/bsd/netinet6>

pub(crate) mod in6_var;
1 change: 1 addition & 0 deletions src/new/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
//! * Headers: <https://github.com/freebsd/freebsd-src/blob/main/sys/riscv/include/ucontext.h>
//! * Symbol map: <https://github.com/freebsd/freebsd-src/blob/main/lib/libc/gen/Symbol.map>

pub(crate) mod netinet6;
pub(crate) mod sys;
pub(crate) mod unistd;
17 changes: 17 additions & 0 deletions src/new/freebsd/netinet6/in6_var.rs
Original file line number Diff line number Diff line change
@@ -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)
5 changes: 5 additions & 0 deletions src/new/freebsd/netinet6/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//! Directory: `netinet6/`
//!
//! https://github.com/freebsd/freebsd-src/tree/main/sys/netinet6

pub(crate) mod in6_var;
2 changes: 2 additions & 0 deletions src/new/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand All @@ -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::*;
}
}
Expand Down