renet/src/phy/sys/linux.rs

18 lines
580 B
Rust
Raw Normal View History

2016-12-11 07:15:26 +08:00
use libc;
#[cfg(any(feature = "phy-raw_socket",
feature = "phy-tap_interface"))]
2016-12-11 07:15:26 +08:00
pub const SIOCGIFMTU: libc::c_ulong = 0x8921;
#[cfg(any(feature = "phy-raw_socket"))]
2016-12-11 07:15:26 +08:00
pub const SIOCGIFINDEX: libc::c_ulong = 0x8933;
#[cfg(any(feature = "phy-raw_socket"))]
pub const ETH_P_ALL: libc::c_short = 0x0003;
2016-12-11 07:15:26 +08:00
#[cfg(feature = "phy-tap_interface")]
2016-12-11 07:15:26 +08:00
pub const TUNSETIFF: libc::c_ulong = 0x400454CA;
#[cfg(feature = "phy-tap_interface")]
2016-12-11 07:15:26 +08:00
pub const IFF_TAP: libc::c_int = 0x0002;
#[cfg(feature = "phy-tap_interface")]
2016-12-11 07:15:26 +08:00
pub const IFF_NO_PI: libc::c_int = 0x1000;