Available on crate feature
tracker only.Expand description
FlowTracker — a hashtable of live flows with a TCP state
machine and idle-timeout sweep.
FlowTracker<E, S> is generic over the flow extractor (E) and
optional per-flow user state (S, defaults to ()). Drive it
synchronously with FlowTracker::track for sync use, or use
netring’s AsyncCapture::flow_stream adapter for tokio.
Structs§
- Active
Flow - Snapshot of one live flow returned by
FlowTracker::iter_active. - Flow
Entry - Per-flow accounting + user state.
- Flow
Tracker - Bidirectional flow tracker, generic over an extractor
Eand optional per-flow user stateS. - Flow
Tracker Config - Tracker configuration. Defaults follow Suricata’s normal-mode values.
- Flow
Tracker Stats - Tracker-level statistics (cumulative since construction).
Type Aliases§
- Flow
Events - Inline-stored set of events emitted by a single
track()call. Most packets emit 1–2 events; pathological cases (Started + Established + Packet) emit 3. - Idle
Timeout Fn - Per-key idle-timeout override predicate. Receives the flow’s
key and (when extractable) the L4 protocol, returns
Some(duration)to override the per-protocol default fromFlowTrackerConfig, orNoneto fall through to the default.