summaryrefslogtreecommitdiff
path: root/src/net/if_.rs
diff options
context:
space:
mode:
authorJason King <jason.brian.king@gmail.com>2020-06-17 01:11:05 +0000
committerJason King <jason.brian.king@gmail.com>2021-03-21 23:04:03 +0000
commitd444f1bcf20b29d0ec69e30046c71d005a2b9d72 (patch)
tree09c410385c727ac6f9e9bfae71077901f5edfb6d /src/net/if_.rs
parent7b3129a194ecbf3e5f99f30ff26ab0e6fa7f183d (diff)
downloadnix-d444f1bcf20b29d0ec69e30046c71d005a2b9d72.zip
illumos and Solaris support
Co-authored-by: Dominik Hassler <hadfl@omnios.org> Co-authored-by: Joshua M. Clulow <josh@sysmgr.org>
Diffstat (limited to 'src/net/if_.rs')
-rw-r--r--src/net/if_.rs58
1 files changed, 30 insertions, 28 deletions
diff --git a/src/net/if_.rs b/src/net/if_.rs
index 96364884..3b7b4aab 100644
--- a/src/net/if_.rs
+++ b/src/net/if_.rs
@@ -43,6 +43,7 @@ libc_bitflags!(
target_os = "linux",
target_os = "macos",
target_os = "netbsd",
+ target_os = "illumos",
target_os = "solaris"))]
IFF_NOTRAILERS;
/// Interface manages own routes.
@@ -54,6 +55,7 @@ libc_bitflags!(
target_os = "dragonfly",
target_os = "freebsd",
target_os = "fuchsia",
+ target_os = "illumos",
target_os = "ios",
target_os = "linux",
target_os = "macos",
@@ -82,7 +84,7 @@ libc_bitflags!(
target_os = "ios"))]
IFF_OACTIVE;
/// Protocol code on board.
- #[cfg(target_os = "solaris")]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_INTELLIGENT;
/// Slave of a load balancing bundle. (see
/// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
@@ -108,7 +110,7 @@ libc_bitflags!(
target_os = "ios"))]
IFF_LINK0;
/// Multicast using broadcast.
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_MULTI_BCAST;
/// Is able to select media type via ifmap. (see
/// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
@@ -123,7 +125,7 @@ libc_bitflags!(
target_os = "ios"))]
IFF_LINK1;
/// Non-unique address.
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_UNNUMBERED;
/// Auto media selection active. (see
/// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
@@ -143,15 +145,15 @@ libc_bitflags!(
target_os = "macos",
target_os = "ios"))]
IFF_ALTPHYS;
- /// DHCP controlls interface.
- #[cfg(any(target_os = "solaris"))]
+ /// DHCP controls interface.
+ #[cfg(any(target_os = "solaris", target_os = "illumos"))]
IFF_DHCPRUNNING;
/// The addresses are lost when the interface goes down. (see
/// [`netdevice(7)`](http://man7.org/linux/man-pages/man7/netdevice.7.html))
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
IFF_DYNAMIC;
/// Do not advertise.
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_PRIVATE;
/// Driver signals L1 up. Volatile.
#[cfg(any(target_os = "fuchsia", target_os = "linux"))]
@@ -163,7 +165,7 @@ libc_bitflags!(
#[cfg(any(target_os = "freebsd"))]
IFF_CANTCONFIG;
/// Do not transmit packets.
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_NOXMIT;
/// Driver signals dormant. Volatile.
#[cfg(any(target_os = "fuchsia", target_os = "linux"))]
@@ -172,7 +174,7 @@ libc_bitflags!(
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
IFF_PPROMISC;
/// Just on-link subnet.
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_NOLOCAL;
/// Echo sent packets. Volatile.
#[cfg(any(target_os = "fuchsia", target_os = "linux"))]
@@ -181,19 +183,19 @@ libc_bitflags!(
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
IFF_MONITOR;
/// Address is deprecated.
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_DEPRECATED;
/// Static ARP.
#[cfg(any(target_os = "dragonfly", target_os = "freebsd"))]
IFF_STATICARP;
/// Address from stateless addrconf.
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_ADDRCONF;
/// Interface is in polling mode.
#[cfg(any(target_os = "dragonfly"))]
IFF_NPOLLING;
/// Router on interface.
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_ROUTER;
/// Interface is in polling mode.
#[cfg(any(target_os = "dragonfly"))]
@@ -202,16 +204,16 @@ libc_bitflags!(
#[cfg(any(target_os = "freebsd"))]
IFF_DYING;
/// No NUD on interface.
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_NONUD;
/// Interface is being renamed
#[cfg(any(target_os = "freebsd"))]
IFF_RENAMING;
/// Anycast address.
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_ANYCAST;
/// Don't exchange routing info.
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_NORTEXCH;
/// Do not provide packet information
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
@@ -223,45 +225,45 @@ libc_bitflags!(
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
IFF_TAP as libc::c_int;
/// IPv4 interface.
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_IPV4;
/// IPv6 interface.
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_IPV6;
/// in.mpathd test address
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_NOFAILOVER;
/// Interface has failed
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_FAILED;
/// Interface is a hot-spare
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_STANDBY;
/// Functioning but not used
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_INACTIVE;
/// Interface is offline
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(any(target_os = "illumos", target_os = "solaris"))]
IFF_OFFLINE;
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(target_os = "solaris")]
IFF_COS_ENABLED;
/// Prefer as source addr.
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(target_os = "solaris")]
IFF_PREFERRED;
/// RFC3041
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(target_os = "solaris")]
IFF_TEMPORARY;
/// MTU set with SIOCSLIFMTU
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(target_os = "solaris")]
IFF_FIXEDMTU;
/// Cannot send / receive packets
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(target_os = "solaris")]
IFF_VIRTUAL;
/// Local address in use
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(target_os = "solaris")]
IFF_DUPLICATE;
/// IPMP IP interface
- #[cfg(any(target_os = "solaris"))]
+ #[cfg(target_os = "solaris")]
IFF_IPMP;
}
);