pub(crate) enum NetDevice {
Shared(SharedNetDevice),
Legacy(LegacyNetDevice),
}Expand description
Backend selected at startup.
Variants§
Legacy(LegacyNetDevice)
Implementations§
Source§impl NetDevice
impl NetDevice
Build the shared-memory backend from SYS_NET_QUEUE_MAP.
§Safety
header must point to a valid NetQueueHeader mapped read/write.
pub(crate) fn legacy() -> Self
Sourcepub(crate) fn flush(&mut self)
pub(crate) fn flush(&mut self)
Flush pending TX descriptors to the device (one doorbell per poll).
pub(crate) fn mac(&self) -> [u8; 6]
Trait Implementations§
Source§impl Device for NetDevice
impl Device for NetDevice
type RxToken<'a> = NetRxToken
type TxToken<'a> = NetTxToken
Source§fn receive(
&mut self,
_timestamp: Instant,
) -> Option<(Self::RxToken<'_>, Self::TxToken<'_>)>
fn receive( &mut self, _timestamp: Instant, ) -> Option<(Self::RxToken<'_>, Self::TxToken<'_>)>
Construct a token pair consisting of one receive token and one transmit token. Read more
Source§fn transmit(&mut self, _timestamp: Instant) -> Option<Self::TxToken<'_>>
fn transmit(&mut self, _timestamp: Instant) -> Option<Self::TxToken<'_>>
Construct a transmit token. Read more
Source§fn capabilities(&self) -> DeviceCapabilities
fn capabilities(&self) -> DeviceCapabilities
Get a description of device capabilities.
Auto Trait Implementations§
impl !Sync for NetDevice
impl Forget for NetDevice
impl Freeze for NetDevice
impl Move for NetDevice
impl RefUnwindSafe for NetDevice
impl Send for NetDevice
impl Unpin for NetDevice
impl UnsafeUnpin for NetDevice
impl UnwindSafe for NetDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more