[][src]Trait packet_crafter::headers::TransportHeader

pub trait TransportHeader {
    fn set_pseudo_header(
        &mut self,
        src_ip: [u8; 4],
        dst_ip: [u8; 4],
        data_len: u16
    ); }

Required methods

fn set_pseudo_header(&mut self, src_ip: [u8; 4], dst_ip: [u8; 4], data_len: u16)

Sets the values of an internal value which represents the pseudo header that is used when calculating the checksum. This method must be called before the make method, which is called when the header is added to the Packet with the add_header method. If the IP header is already present in the Packet when this one is added, then this method will be called in the add_header method, using the data from the IP header.

TL;DR: you can ignore this method if you add this header to the Packet using the add_header method after you have added an IP header to the Packet with add_header

Loading content...

Implementors

impl TransportHeader for TcpHeader[src]

impl TransportHeader for UdpHeader[src]

Loading content...