Struct etherparse::Ipv6RawExtensionHeaderSlice [−][src]
pub struct Ipv6RawExtensionHeaderSlice<'a> { /* fields omitted */ }
Expand description
Slice containing an IPv6 extension header without specific decoding methods (fallback in case no specific implementation is available).
Slice containing an IPv6 extension header with only minimal data interpretation. NOTE only ipv6 header extensions with the first two bytes representing the next header and the header length in 8-octets (- 8 octets) can be represented with this struct. This excludes the “Authentication Header” (AH) and “Encapsulating Security Payload” (ESP).
The following headers can be represented in a Ipv6ExtensionHeaderSlice:
- HopbyHop
- Destination Options
- Routing
- Mobility
- Host Identity Protocol
- Shim6 Protocol
Implementations
Returns true if the given header type ip number can be represented in an Ipv6ExtensionHeaderSlice
.
Creates a generic ipv6 extension header slice from a slice.
Creates a raw ipv6 extension header slice from a slice (assumes slice size & content was validated before).
Safety
This method assumes that the slice was previously validated to contain
a valid & supported raw ipv6 extension header. This means the slice length
must at least be at least 8 and (slice[1] + 1)*8
. The data that the
slice points must also be valid (meaning no nullptr or alike allowed).
If these precondtions are not fullfilled the behavior of this function and the methods of the return IpAuthenticationHeaderSlice will be undefined.
Returns the slice containing the ipv6 extension header
Returns a slice containing the payload data of the header.
This contains all the data after the header length field until the end of the header (length specified by the hdr ext length field).
Convert the slice to an Ipv6RawExtensionHeader.
Decode some of the fields and copy the results to a Ipv6RawExtensionHeader struct together with a slice pointing to the non decoded parts.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<'a> RefUnwindSafe for Ipv6RawExtensionHeaderSlice<'a>
impl<'a> Send for Ipv6RawExtensionHeaderSlice<'a>
impl<'a> Sync for Ipv6RawExtensionHeaderSlice<'a>
impl<'a> Unpin for Ipv6RawExtensionHeaderSlice<'a>
impl<'a> UnwindSafe for Ipv6RawExtensionHeaderSlice<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more