Struct etherparse::Ipv6Header[][src]

pub struct Ipv6Header {
    pub traffic_class: u8,
    pub flow_label: u32,
    pub payload_length: u16,
    pub next_header: u8,
    pub hop_limit: u8,
    pub source: [u8; 16],
    pub destination: [u8; 16],
}

IPv6 header according to rfc8200.

Fields

If non 0 serves as a hint to router and switches with multiple outbound paths that these packets should stay on the same path, so that they will not be reordered.

The length of the payload and extension headers in

Specifies what the next header or transport layer protocol is (see IpTrafficClass for a definitions of ids).

The number of hops the packet can take before it is discarded.

IPv6 source address

IPv6 destination address

Methods

impl Ipv6Header
[src]

Reads an IPv6 header from the current position.

Reads an IPv6 header assuming the version & flow_label field have already been read.

Skips the ipv6 header extension and returns the traffic_class

Skips all ipv6 header extensions and returns the last traffic_class

Writes a given IPv6 header to the current position.

Sets the field total_length based on the size of the payload and the options. Returns an error if the payload is too big to fit.

Trait Implementations

impl Clone for Ipv6Header
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Ipv6Header
[src]

Formats the value using the given formatter. Read more

impl Eq for Ipv6Header
[src]

impl PartialEq for Ipv6Header
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Default for Ipv6Header
[src]

Returns the "default value" for a type. Read more

impl SerializedSize for Ipv6Header
[src]

SERIALIZED_SIZE: usize = 40

Size of the header itself in bytes.

Auto Trait Implementations

impl Send for Ipv6Header

impl Sync for Ipv6Header