diff --git a/CHANGELOG.md b/CHANGELOG.md index e434e5c441..98a34c3002 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). ([#850](https://github.com/nix-rust/nix/pull/850)) - Added `alarm`. ([#830](https://github.com/nix-rust/nix/pull/830)) +- `nix::net::if_::InterfaceFlags` now support `IFF_NO_PI/IFF_TUN/IFF_TAP` flags on linux-like systems. + ([#853](https://github.com/nix-rust/nix/pull/853)) ### Changed - Display and Debug for SysControlAddr now includes all fields. diff --git a/src/net/if_.rs b/src/net/if_.rs index 19b1ee73c0..0da9016aff 100644 --- a/src/net/if_.rs +++ b/src/net/if_.rs @@ -215,6 +215,15 @@ libc_bitflags!( /// Don't exchange routing info. #[cfg(any(target_os = "solaris"))] IFF_NORTEXCH; + /// Do not provide packet information + #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))] + IFF_NO_PI as libc::c_int; + /// TUN device (no Ethernet headers) + #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))] + IFF_TUN as libc::c_int; + /// TAP device + #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))] + IFF_TAP as libc::c_int; /// IPv4 interface. #[cfg(any(target_os = "solaris"))] IFF_IPV4;