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: u16
dst_port: u16
control: Control
seq_number: SeqNumber
ack_number: Option<SeqNumber>
window_len: u16
window_scale: Option<u8>
max_seg_size: Option<u16>
sack_permitted: bool
sack_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.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Repr<'a>
impl<'a> UnwindSafe for Repr<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more