Trait etherparse::WriteEtherExt [] [src]

pub trait WriteEtherExt: Write + Sized {
    fn write_ethernet2_header(
        &mut self,
        value: &Ethernet2Header
    ) -> Result<(), Error> { ... }
fn write_vlan_tagging_header(
        &mut self,
        value: &VlanTaggingHeader
    ) -> Result<(), WriteError> { ... }
fn write_ipv4_header(
        &mut self,
        value: &Ipv4Header,
        options: &[u8]
    ) -> Result<(), WriteError> { ... }
fn write_ipv4_header_raw(
        &mut self,
        value: &Ipv4Header,
        options: &[u8]
    ) -> Result<(), WriteError> { ... }
fn write_ipv6_header(
        &mut self,
        value: &Ipv6Header
    ) -> Result<(), WriteError> { ... } }

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

Provided Methods

Writes a given Ethernet-II header to the current position.

Write a IEEE 802.1Q VLAN tagging header

Writes a given IPv4 header to the current position (this method automatically calculates the header length and checksum).

Writes a given IPv4 header to the current position (this method just writes the specified checksum and header_length and does note compute it).

Writes a given IPv6 header to the current position.

Implementors