Struct smoltcp::phy::TunTapInterface
source · [−]pub struct TunTapInterface { /* private fields */ }
Expand description
A virtual TUN (IP) or TAP (Ethernet) interface.
Implementations
sourceimpl 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
sourceimpl AsRawFd for TunTapInterface
impl AsRawFd for TunTapInterface
sourceimpl Debug for TunTapInterface
impl Debug for TunTapInterface
sourceimpl<'a> Device<'a> for TunTapInterface
impl<'a> Device<'a> for TunTapInterface
Auto Trait Implementations
impl !RefUnwindSafe for TunTapInterface
impl !Send for TunTapInterface
impl !Sync for TunTapInterface
impl Unpin for TunTapInterface
impl !UnwindSafe for TunTapInterface
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more