Struct smoltcp::wire::TcpRepr[][src]

pub struct TcpRepr<'a> {
    pub src_port: u16,
    pub dst_port: u16,
    pub control: Control,
    pub seq_number: SeqNumber,
    pub ack_number: Option<SeqNumber>,
    pub window_len: u16,
    pub window_scale: Option<u8>,
    pub max_seg_size: Option<u16>,
    pub sack_permitted: bool,
    pub sack_ranges: [Option<(u32, u32)>; 3],
    pub payload: &'a [u8],
}
Expand description

A high-level representation of a Transmission Control Protocol packet.

Fields

src_port: u16dst_port: u16control: Controlseq_number: SeqNumberack_number: Option<SeqNumber>window_len: u16window_scale: Option<u8>max_seg_size: Option<u16>sack_permitted: boolsack_ranges: [Option<(u32, u32)>; 3]payload: &'a [u8]

Implementations

Parse a Transmission Control Protocol packet and return a high-level representation.

Return the length of a header that will be emitted from this high-level representation.

This should be used for buffer space calculations. The TCP header length is a multiple of 4.

Return the length of a packet that will be emitted from this high-level representation.

Emit a high-level representation into a Transmission Control Protocol packet.

Return the length of the segment, in terms of sequence space.

Return whether the segment has no flags set (except PSH) and no data.

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

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

Converts the given value to a String. 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.