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§
sourcefn tcp_source_port(&self) -> u16
fn tcp_source_port(&self) -> u16
Returns the TCP source port.
sourcefn tcp_destination_port(&self) -> u16
fn tcp_destination_port(&self) -> u16
Returns the TCP destination port.
sourcefn tcp_sequence_number(&self) -> u32
fn tcp_sequence_number(&self) -> u32
Returns the TCP sequence number.
sourcefn tcp_acknowledgment_number(&self) -> u32
fn tcp_acknowledgment_number(&self) -> u32
Returns the TCP acknowledgment number.
sourcefn tcp_data_offset(&self) -> u8
fn tcp_data_offset(&self) -> u8
Returns the TCP data offset.
sourcefn tcp_reserved_bits(&self) -> u8
fn tcp_reserved_bits(&self) -> u8
Returns the TCP reserved bits.
sourcefn tcp_congestion_window_reduced_flag(&self) -> bool
fn tcp_congestion_window_reduced_flag(&self) -> bool
Returns the TCP congestion window reduced flag.
sourcefn tcp_ecn_echo_flag(&self) -> bool
fn tcp_ecn_echo_flag(&self) -> bool
Returns the TCP ECN echo flag.
sourcefn tcp_urgent_pointer_flag(&self) -> bool
fn tcp_urgent_pointer_flag(&self) -> bool
Returns the TCP urgent pointer flag.
sourcefn tcp_acknowledgement_flag(&self) -> bool
fn tcp_acknowledgement_flag(&self) -> bool
Returns the TCP acknowledgement flag.
sourcefn tcp_push_flag(&self) -> bool
fn tcp_push_flag(&self) -> bool
Returns the TCP push flag.
sourcefn tcp_reset_flag(&self) -> bool
fn tcp_reset_flag(&self) -> bool
Returns the TCP reset flag.
sourcefn tcp_synchronize_flag(&self) -> bool
fn tcp_synchronize_flag(&self) -> bool
Returns the TCP synchronize flag.
sourcefn tcp_fin_flag(&self) -> bool
fn tcp_fin_flag(&self) -> bool
Returns the TCP FIN flag.
sourcefn tcp_window_size(&self) -> u16
fn tcp_window_size(&self) -> u16
Returns the TCP window size.
sourcefn tcp_checksum(&self) -> u16
fn tcp_checksum(&self) -> u16
Returns the TCP checksum.
sourcefn tcp_urgent_pointer(&self) -> u16
fn tcp_urgent_pointer(&self) -> u16
Returns the TCP urgent pointer.
sourcefn tcp_options(&self) -> Option<&[u8]>
fn tcp_options(&self) -> Option<&[u8]>
Returns the TCP options if present.
sourcefn tcp_calculate_checksum(&self) -> u16
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.