Struct e1000::E1000Nic

source ·
pub struct E1000Nic { /* private fields */ }
Expand description

Struct representing an e1000 network interface card.

Implementations§

source§

impl E1000Nic

Functions that setup the NIC struct and handle the sending and receiving of packets.

source

pub fn init( e1000_pci_dev: &PciDevice ) -> Result<&'static IrqSafeMutex<E1000Nic>, &'static str>

Initializes the new E1000 network interface card that is connected as the given PciDevice.

enable_interrupts must be called after the NIC has been registered with the net subsystem.

source

pub fn init_interrupts( &mut self, interface: Arc<NetworkInterface> ) -> Result<(), &'static str>

Initializes the interrupt handler and enables interrupts for this E1000 NIC.

The provided interface must be the network interface associated with this E1000 NIC. This interface will be polled in a deferred task upon an interrupt being triggered for a received packet.

source

pub fn spoof_mac(&mut self, spoofed_mac_addr: [u8; 6])

Trait Implementations§

source§

impl NetworkDevice for E1000Nic

source§

fn mac_address(&self) -> [u8; 6]

Returns the MAC address.

source§

fn send(&mut self, buf: TransmitBuffer)

Sends a buffer on the device. Read more
source§

fn receive(&mut self) -> Option<ReceivedFrame>

Receives a frame from the device.
§

fn capabilities(&self) -> DeviceCapabilities

Returns the device capabilities.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V