Skip to content

Commit

Permalink
Auto merge of #859 - mwanner:freebsd-drop-drv, r=alexcrichton
Browse files Browse the repository at this point in the history
Use IFF_OACTIVE and IFF_RUNNING even on FreeBSD. Deprecate the DRV ones.

According to @asomers, libc should propagate the use of the portable constants `IFF_OACTIVE` and `IFF_RUNNING` for user-space applications, instead of `IFF_DRV_OACTIVE` and `IFF_DRV_RUNNING`. It least that's my understanding of [his comment](nix-rust/nix#667 (comment)) in nix-rust/nix#667.
  • Loading branch information
bors committed Nov 29, 2017
2 parents 1a2f963 + 13ce9f8 commit ace4b86
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,11 +432,17 @@ pub const IFF_DEBUG: ::c_int = 0x4; // (n) turn on debugging
pub const IFF_LOOPBACK: ::c_int = 0x8; // (i) is a loopback net
pub const IFF_POINTOPOINT: ::c_int = 0x10; // (i) is a point-to-point link
// 0x20 was IFF_SMART
pub const IFF_DRV_RUNNING: ::c_int = 0x40; // (d) resources allocated
pub const IFF_RUNNING: ::c_int = 0x40; // (d) resources allocated
#[deprecated(since="0.2.34",
note="please use the portable `IFF_RUNNING` constant instead")]
pub const IFF_DRV_RUNNING: ::c_int = 0x40;
pub const IFF_NOARP: ::c_int = 0x80; // (n) no address resolution protocol
pub const IFF_PROMISC: ::c_int = 0x100; // (n) receive all packets
pub const IFF_ALLMULTI: ::c_int = 0x200; // (n) receive all multicast packets
pub const IFF_DRV_OACTIVE: ::c_int = 0x400; // (d) tx hardware queue is full
pub const IFF_OACTIVE: ::c_int = 0x400; // (d) tx hardware queue is full
#[deprecated(since="0.2.34",
note="please use the portable `IFF_OACTIVE` constant instead")]
pub const IFF_DRV_OACTIVE: ::c_int = 0x400;
pub const IFF_SIMPLEX: ::c_int = 0x800; // (i) can't hear own transmissions
pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit
pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit
Expand Down

0 comments on commit ace4b86

Please sign in to comment.