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 max_seg_size: Option<u16>, pub payload: &'a [u8], }
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
max_seg_size: Option<u16>
payload: &'a [u8]
Methods
impl<'a> Repr<'a>
[src]
fn parse<T: ?Sized>(
packet: &Packet<&'a T>,
src_addr: &IpAddress,
dst_addr: &IpAddress
) -> Result<Repr<'a>> where
T: AsRef<[u8]>,
[src]
packet: &Packet<&'a T>,
src_addr: &IpAddress,
dst_addr: &IpAddress
) -> Result<Repr<'a>> where
T: AsRef<[u8]>,
Parse a Transmission Control Protocol packet and return a high-level representation.
fn header_len(&self) -> usize
[src]
Return the length of a header that will be emitted from this high-level representation.
fn buffer_len(&self) -> usize
[src]
Return the length of a packet that will be emitted from this high-level representation.
fn emit<T: ?Sized>(
&self,
packet: &mut Packet<&mut T>,
src_addr: &IpAddress,
dst_addr: &IpAddress
) where
T: AsRef<[u8]> + AsMut<[u8]>,
[src]
&self,
packet: &mut Packet<&mut T>,
src_addr: &IpAddress,
dst_addr: &IpAddress
) where
T: AsRef<[u8]> + AsMut<[u8]>,
Emit a high-level representation into a Transmission Control Protocol packet.
fn segment_len(&self) -> usize
[src]
Return the length of the segment, in terms of sequence space.
fn is_empty(&self) -> bool
[src]
Return whether the segment has no flags set (except PSH) and no data.
Trait Implementations
impl<'a> Debug for Repr<'a>
[src]
impl<'a> PartialEq for Repr<'a>
[src]
fn eq(&self, __arg_0: &Repr<'a>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Repr<'a>) -> bool
[src]
This method tests for !=
.
impl<'a> Eq for Repr<'a>
[src]
impl<'a> Clone for Repr<'a>
[src]
fn clone(&self) -> Repr<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more