Skip to content

Commit

Permalink
Update InterfaceFlags
Browse files Browse the repository at this point in the history
Add Flags: `IFF_NO_PI`, `IFF_TUN`, `IFF_TAP`.
  • Loading branch information
寧靜 committed Feb 7, 2018
1 parent ebf7505 commit 21d30e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Changed
- Display and Debug for SysControlAddr now includes all fields.
([#837](https://github.com/nix-rust/nix/pull/837))
- `nix::net::if_::InterfaceFlags` now support `IFF_NO_PI/IFF_TUN/IFF_TAP` flags on linux-like system.

### Fixed
- Properly exposed 460800 and 921600 baud rates on NetBSD
Expand Down
9 changes: 9 additions & 0 deletions src/net/if_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 c_int;
/// TUN device (no Ethernet headers)
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
IFF_TUN as c_int;
/// TAP device
#[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
IFF_TAP as c_int;
/// IPv4 interface.
#[cfg(any(target_os = "solaris"))]
IFF_IPV4;
Expand Down

0 comments on commit 21d30e2

Please sign in to comment.