etherparse/link/lax_ether_payload_slice.rs
1use crate::*;
2
3/// Laxly identified payload of an link layer packet (potentially incomplete).
4///
5/// To check if the payload is complete check the `incomplete` field.
6#[derive(Clone, Debug, Eq, PartialEq, Hash, PartialOrd, Ord)]
7pub struct LaxEtherPayloadSlice<'a> {
8 /// True if the length field in the link header (e.g. MACsec short length)
9 /// indicates more data should be present but it was not (aka the packet
10 /// data is cut off).
11 pub incomplete: bool,
12
13 /// Identifying content of the payload.
14 pub ether_type: EtherType,
15
16 /// Length field that was used to determine the length
17 /// of the payload (e.g. MACsec "short length" field).
18 pub len_source: LenSource,
19
20 /// Payload
21 pub payload: &'a [u8],
22}