Trait etherparse::ReadEtherExt [] [src]

pub trait ReadEtherExt: Read + Seek {
    fn read_ethernet2_header(&mut self) -> Result<Ethernet2Header, Error> { ... }
fn read_vlan_tagging_header(
        &mut self
    ) -> Result<VlanTaggingHeader, WriteError> { ... }
fn read_ip_header(&mut self) -> Result<IpHeader, ReadError> { ... }
fn read_ipv4_header(&mut self) -> Result<Ipv4Header, ReadError> { ... }
fn read_ipv4_header_without_version(
        &mut self,
        version_rest: u8
    ) -> Result<Ipv4Header, ReadError> { ... }
fn read_ipv6_header(&mut self) -> Result<Ipv6Header, ReadError> { ... }
fn read_ipv6_header_without_version(
        &mut self,
        version_rest: u8
    ) -> Result<Ipv6Header, ReadError> { ... }
fn skip_ipv6_header_extension(&mut self) -> Result<u8, ReadError> { ... }
fn skip_all_ipv6_header_extensions(
        &mut self,
        traffic_class: u8
    ) -> Result<u8, ReadError> { ... }
fn read_mac_address(&mut self) -> Result<[u8; 6], Error> { ... } }

Helper for reading headers. Import this for adding read functions to every struct that implements the trait Read.

Provided Methods

Reads an Ethernet-II header from the current position.

Read a IEEE 802.1Q VLAN tagging header

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

Reads an IPv4 header from the current position.

Reads an IPv4 header assuming the version & ihl field have already been read.

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

Implementors