Trait mutnet::tcp::TcpMethods

source ·
pub trait TcpMethods: HeaderMetadata + PseudoHeaderChecksum + BufferAccess {
Show 20 methods // Provided methods fn tcp_source_port(&self) -> u16 { ... } fn tcp_destination_port(&self) -> u16 { ... } fn tcp_sequence_number(&self) -> u32 { ... } fn tcp_acknowledgment_number(&self) -> u32 { ... } fn tcp_data_offset(&self) -> u8 { ... } fn tcp_reserved_bits(&self) -> u8 { ... } fn tcp_flags(&self) -> u8 { ... } fn tcp_congestion_window_reduced_flag(&self) -> bool { ... } fn tcp_ecn_echo_flag(&self) -> bool { ... } fn tcp_urgent_pointer_flag(&self) -> bool { ... } fn tcp_acknowledgement_flag(&self) -> bool { ... } fn tcp_push_flag(&self) -> bool { ... } fn tcp_reset_flag(&self) -> bool { ... } fn tcp_synchronize_flag(&self) -> bool { ... } fn tcp_fin_flag(&self) -> bool { ... } fn tcp_window_size(&self) -> u16 { ... } fn tcp_checksum(&self) -> u16 { ... } fn tcp_urgent_pointer(&self) -> u16 { ... } fn tcp_options(&self) -> Option<&[u8]> { ... } fn tcp_calculate_checksum(&self) -> u16 { ... }
}
Expand description

Methods available for DataBuffer containing a Tcp header.

Provided Methods§

source

fn tcp_source_port(&self) -> u16

Returns the TCP source port.

source

fn tcp_destination_port(&self) -> u16

Returns the TCP destination port.

source

fn tcp_sequence_number(&self) -> u32

Returns the TCP sequence number.

source

fn tcp_acknowledgment_number(&self) -> u32

Returns the TCP acknowledgment number.

source

fn tcp_data_offset(&self) -> u8

Returns the TCP data offset.

source

fn tcp_reserved_bits(&self) -> u8

Returns the TCP reserved bits.

source

fn tcp_flags(&self) -> u8

Returns the TCP flags.

source

fn tcp_congestion_window_reduced_flag(&self) -> bool

Returns the TCP congestion window reduced flag.

source

fn tcp_ecn_echo_flag(&self) -> bool

Returns the TCP ECN echo flag.

source

fn tcp_urgent_pointer_flag(&self) -> bool

Returns the TCP urgent pointer flag.

source

fn tcp_acknowledgement_flag(&self) -> bool

Returns the TCP acknowledgement flag.

source

fn tcp_push_flag(&self) -> bool

Returns the TCP push flag.

source

fn tcp_reset_flag(&self) -> bool

Returns the TCP reset flag.

source

fn tcp_synchronize_flag(&self) -> bool

Returns the TCP synchronize flag.

source

fn tcp_fin_flag(&self) -> bool

Returns the TCP FIN flag.

source

fn tcp_window_size(&self) -> u16

Returns the TCP window size.

source

fn tcp_checksum(&self) -> u16

Returns the TCP checksum.

source

fn tcp_urgent_pointer(&self) -> u16

Returns the TCP urgent pointer.

source

fn tcp_options(&self) -> Option<&[u8]>

Returns the TCP options if present.

source

fn tcp_calculate_checksum(&self) -> u16

Calculates and returns the TCP checksum.

This takes lower layers into account. If there is an IPv4 or IPv6 layer present, the pseudo header will be included. If there is a NoPreviousHeader present, the pseudo header is set to zero.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<B, HM> TcpMethods for DataBuffer<B, HM>
where B: AsRef<[u8]>, HM: HeaderMetadata + HeaderMetadataMut + TcpMarker, DataBuffer<B, HM>: PseudoHeaderChecksum,