pub struct DataLink<'a> {
pub destination_mac: String,
pub source_mac: String,
pub vlan: Option<VlanTag>,
pub ethertype: String,
pub payload: &'a [u8],
}Expand description
Represents a parsed Ethernet frame, containing source and destination MAC addresses, an Ethertype, and the payload.
Fields§
§destination_mac: StringThe destination MAC address as a string.
source_mac: StringThe source MAC address as a string.
vlan: Option<VlanTag>§ethertype: StringThe Ethertype of the packet, indicating the protocol in the payload.
payload: &'a [u8]The payload of the Ethernet frame.
Trait Implementations§
impl<'a> Eq for DataLink<'a>
Auto Trait Implementations§
impl<'a> Freeze for DataLink<'a>
impl<'a> RefUnwindSafe for DataLink<'a>
impl<'a> Send for DataLink<'a>
impl<'a> Sync for DataLink<'a>
impl<'a> Unpin for DataLink<'a>
impl<'a> UnsafeUnpin for DataLink<'a>
impl<'a> UnwindSafe for DataLink<'a>
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