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.
Trait Implementations§
Source§impl Debug for TcpConversationState
impl Debug for TcpConversationState
Auto Trait Implementations§
impl Freeze for TcpConversationState
impl RefUnwindSafe for TcpConversationState
impl Send for TcpConversationState
impl Sync for TcpConversationState
impl Unpin for TcpConversationState
impl UnsafeUnpin for TcpConversationState
impl UnwindSafe for TcpConversationState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more