Struct intel_ethernet::descriptors::LegacyRxDescriptor
source · #[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
impl Debug for LegacyRxDescriptor
source§impl RxDescriptor for LegacyRxDescriptor
impl RxDescriptor for LegacyRxDescriptor
source§fn init(&mut self, packet_buffer_address: PhysicalAddress)
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)
fn set_packet_address(&mut self, packet_buffer_address: PhysicalAddress)
Updates the descriptor’s physical address. Read more
source§fn reset_status(&mut self)
fn reset_status(&mut self)
Clears the status bits of the descriptor.
source§fn descriptor_done(&self) -> bool
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
fn end_of_packet(&self) -> bool
Returns true if the descriptor’s packet buffer is the last in a frame.
impl FromBytes for LegacyRxDescriptor
Auto Trait Implementations§
impl RefUnwindSafe for LegacyRxDescriptor
impl Send for LegacyRxDescriptor
impl Sync for LegacyRxDescriptor
impl Unpin for LegacyRxDescriptor
impl UnwindSafe for LegacyRxDescriptor
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