Enum etherparse::IpHeader[][src]

pub enum IpHeader {
    Version4(Ipv4HeaderIpv4Extensions),
    Version6(Ipv6HeaderIpv6Extensions),
}
Expand description

Internet protocol headers version 4 & 6

Variants

Version4(Ipv4HeaderIpv4Extensions)

Tuple Fields

Version6(Ipv6HeaderIpv6Extensions)

Tuple Fields

Implementations

👎 Deprecated since 0.10.1:

Renamed to IpHeader::from_slice

Renamed to IpHeader::from_slice

Read an IpvHeader from a slice and return the header & unused parts of the slice.

Reads an IP (v4 or v6) header from the current position.

Writes an IP (v4 or v6) header to the current position

Returns the size when the ip header & extensions are serialized

Returns the last next header number following the ip header and header extensions.

Sets all the next_header fields in the ipv4 & ipv6 header as well as in all extension headers and returns the ether type number.

The given number will be set as the last “next_header” or protocol number.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.