Struct etherparse::LaxIpPayloadSlice
source · pub struct LaxIpPayloadSlice<'a> {
pub incomplete: bool,
pub ip_number: IpNumber,
pub fragmented: bool,
pub len_source: LenSource,
pub payload: &'a [u8],
}
Expand description
Laxly identified payload of an IP packet (potentially incomplete).
To check if the payload is complete check the incomplete
field.
Fields§
§incomplete: bool
True if the length field in the IP header indicates more data should be present but it was not (aka the packet data is cut off).
Note that this different from fragmentation. If a packet is fragmented the length field in the individual IP headers is still correctly set.
ip_number: IpNumber
Identifying content of the payload.
fragmented: bool
True if the payload is not complete and has been fragmented.
This can occur if the IPv4 incdicates that the payload has been fragmented or if there is an IPv6 fragmentation header indicating that the payload has been fragmented.
len_source: LenSource
Length field that was used to determine the length of the payload (e.g. IPv6 “payload_length” field).
payload: &'a [u8]
Payload
Trait Implementations§
source§impl<'a> Clone for LaxIpPayloadSlice<'a>
impl<'a> Clone for LaxIpPayloadSlice<'a>
source§fn clone(&self) -> LaxIpPayloadSlice<'a>
fn clone(&self) -> LaxIpPayloadSlice<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'a> Debug for LaxIpPayloadSlice<'a>
impl<'a> Debug for LaxIpPayloadSlice<'a>
source§impl<'a> Hash for LaxIpPayloadSlice<'a>
impl<'a> Hash for LaxIpPayloadSlice<'a>
source§impl<'a> Ord for LaxIpPayloadSlice<'a>
impl<'a> Ord for LaxIpPayloadSlice<'a>
source§fn cmp(&self, other: &LaxIpPayloadSlice<'a>) -> Ordering
fn cmp(&self, other: &LaxIpPayloadSlice<'a>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl<'a> PartialEq for LaxIpPayloadSlice<'a>
impl<'a> PartialEq for LaxIpPayloadSlice<'a>
source§fn eq(&self, other: &LaxIpPayloadSlice<'a>) -> bool
fn eq(&self, other: &LaxIpPayloadSlice<'a>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<'a> PartialOrd for LaxIpPayloadSlice<'a>
impl<'a> PartialOrd for LaxIpPayloadSlice<'a>
source§fn partial_cmp(&self, other: &LaxIpPayloadSlice<'a>) -> Option<Ordering>
fn partial_cmp(&self, other: &LaxIpPayloadSlice<'a>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more