Struct smoltcp::phy::TunTapInterface
source · pub struct TunTapInterface { /* private fields */ }
Expand description
A virtual TUN (IP) or TAP (Ethernet) interface.
Implementations§
source§impl TunTapInterface
impl TunTapInterface
sourcepub fn new(name: &str, medium: Medium) -> Result<TunTapInterface>
pub fn new(name: &str, medium: Medium) -> Result<TunTapInterface>
Attaches to a TUN/TAP interface called name
, or creates it if it does not exist.
If name
is a persistent interface configured with UID of the current user,
no special privileges are needed. Otherwise, this requires superuser privileges
or a corresponding capability set on the executable.
Trait Implementations§
source§impl AsRawFd for TunTapInterface
impl AsRawFd for TunTapInterface
source§impl Debug for TunTapInterface
impl Debug for TunTapInterface
source§impl Device for TunTapInterface
impl Device for TunTapInterface
type RxToken<'a> = RxToken
type TxToken<'a> = TxToken
source§fn capabilities(&self) -> DeviceCapabilities
fn capabilities(&self) -> DeviceCapabilities
Get a description of device capabilities.