Skip to content

Commit ace4b86

Browse files
committed
Auto merge of #859 - mwanner:freebsd-drop-drv, r=alexcrichton
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.
2 parents 1a2f963 + 13ce9f8 commit ace4b86

File tree

1 file changed

+8
-2
lines changed
  • src/unix/bsd/freebsdlike/freebsd

1 file changed

+8
-2
lines changed

src/unix/bsd/freebsdlike/freebsd/mod.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,17 @@ pub const IFF_DEBUG: ::c_int = 0x4; // (n) turn on debugging
432432
pub const IFF_LOOPBACK: ::c_int = 0x8; // (i) is a loopback net
433433
pub const IFF_POINTOPOINT: ::c_int = 0x10; // (i) is a point-to-point link
434434
// 0x20 was IFF_SMART
435-
pub const IFF_DRV_RUNNING: ::c_int = 0x40; // (d) resources allocated
435+
pub const IFF_RUNNING: ::c_int = 0x40; // (d) resources allocated
436+
#[deprecated(since="0.2.34",
437+
note="please use the portable `IFF_RUNNING` constant instead")]
438+
pub const IFF_DRV_RUNNING: ::c_int = 0x40;
436439
pub const IFF_NOARP: ::c_int = 0x80; // (n) no address resolution protocol
437440
pub const IFF_PROMISC: ::c_int = 0x100; // (n) receive all packets
438441
pub const IFF_ALLMULTI: ::c_int = 0x200; // (n) receive all multicast packets
439-
pub const IFF_DRV_OACTIVE: ::c_int = 0x400; // (d) tx hardware queue is full
442+
pub const IFF_OACTIVE: ::c_int = 0x400; // (d) tx hardware queue is full
443+
#[deprecated(since="0.2.34",
444+
note="please use the portable `IFF_OACTIVE` constant instead")]
445+
pub const IFF_DRV_OACTIVE: ::c_int = 0x400;
440446
pub const IFF_SIMPLEX: ::c_int = 0x800; // (i) can't hear own transmissions
441447
pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit
442448
pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit

0 commit comments

Comments
 (0)