#[repr(C)]
pub struct LegacyRxDescriptor { pub phys_addr: Volatile<u64>, pub length: ReadOnly<u16>, pub checksum: ReadOnly<u16>, pub status: Volatile<u8>, pub errors: ReadOnly<u8>, pub vlan: ReadOnly<u16>, }
Expand description

This struct is a Legacy Receive Descriptor. The driver writes to the upper 64 bits, and the NIC writes to the lower 64 bits. It’s the descriptor type used in older Intel NICs and the E1000 driver.

Fields§

§phys_addr: Volatile<u64>

The starting physical address of the receive buffer

§length: ReadOnly<u16>

Length of the receive buffer in bytes

§checksum: ReadOnly<u16>

Checksum value of the packet after the IP header till the end

§status: Volatile<u8>

Status bits which tell if the descriptor has been used

§errors: ReadOnly<u8>

Receive errors

§vlan: ReadOnly<u16>

Vlan tags

Trait Implementations§

source§

impl Debug for LegacyRxDescriptor

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl RxDescriptor for LegacyRxDescriptor

source§

fn init(&mut self, packet_buffer_address: PhysicalAddress)

Initializes a receive descriptor by clearing its status and setting the descriptor’s physical address. Read more
source§

fn set_packet_address(&mut self, packet_buffer_address: PhysicalAddress)

Updates the descriptor’s physical address. Read more
source§

fn reset_status(&mut self)

Clears the status bits of the descriptor.
source§

fn descriptor_done(&self) -> bool

Returns true if the descriptor has a received packet copied to its buffer.
source§

fn end_of_packet(&self) -> bool

Returns true if the descriptor’s packet buffer is the last in a frame.
source§

fn length(&self) -> u64

The length of the packet in the descriptor’s packet buffer.
source§

impl FromBytes for LegacyRxDescriptor

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.