pub struct E1000Nic { /* private fields */ }
Expand description
Struct representing an e1000 network interface card.
Implementations§
source§impl E1000Nic
impl E1000Nic
Functions that setup the NIC struct and handle the sending and receiving of packets.
sourcepub fn init(
e1000_pci_dev: &PciDevice
) -> Result<&'static IrqSafeMutex<E1000Nic>, &'static str>
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.
sourcepub fn init_interrupts(
&mut self,
interface: Arc<NetworkInterface>
) -> Result<(), &'static str>
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.
pub fn spoof_mac(&mut self, spoofed_mac_addr: [u8; 6])
Trait Implementations§
source§impl NetworkDevice for E1000Nic
impl NetworkDevice for E1000Nic
source§fn mac_address(&self) -> [u8; 6]
fn mac_address(&self) -> [u8; 6]
Returns the MAC address.
§fn capabilities(&self) -> DeviceCapabilities
fn capabilities(&self) -> DeviceCapabilities
Returns the device capabilities.
Auto Trait Implementations§
impl !RefUnwindSafe for E1000Nic
impl Send for E1000Nic
impl Sync for E1000Nic
impl Unpin for E1000Nic
impl !UnwindSafe for E1000Nic
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