pub struct TcpConversationState {
pub conn_state: TcpConnectionState,
pub forward_endpoint: TcpEndpointState,
pub reverse_endpoint: TcpEndpointState,
pub reassembler_fwd: TcpReassembler,
pub reassembler_rev: TcpReassembler,
pub dropped_segments_fwd: u64,
pub dropped_segments_rev: u64,
}Expand description
Complete TCP conversation state including connection tracking, per-endpoint sequence state, and stream reassembly.
Fields§
§conn_state: TcpConnectionStateCurrent connection state (RFC 793 state machine).
forward_endpoint: TcpEndpointStateSequence tracking for the forward direction (addr_a → addr_b).
reverse_endpoint: TcpEndpointStateSequence tracking for the reverse direction (addr_b → addr_a).
reassembler_fwd: TcpReassemblerStream reassembly for forward direction.
reassembler_rev: TcpReassemblerStream reassembly for reverse direction.
dropped_segments_fwd: u64Number of forward segments dropped due to buffer/fragment limits.
dropped_segments_rev: u64Number of reverse segments dropped due to buffer/fragment limits.
Implementations§
Source§impl TcpConversationState
impl TcpConversationState
pub fn new() -> Self
Sourcepub fn total_dropped_segments(&self) -> u64
pub fn total_dropped_segments(&self) -> u64
Total dropped segments across both directions.
Sourcepub fn process_packet(
&mut self,
direction: FlowDirection,
tcp: &TcpLayer,
buf: &[u8],
config: &FlowConfig,
) -> Result<(), FlowError>
pub fn process_packet( &mut self, direction: FlowDirection, tcp: &TcpLayer, buf: &[u8], config: &FlowConfig, ) -> Result<(), FlowError>
Process a TCP packet, updating connection state and reassembly buffers.
direction indicates whether this packet is Forward (addr_a → addr_b)
or Reverse (addr_b → addr_a) relative to the canonical key.
tcp is the TCP layer view, buf is the full packet buffer.