How padigeltejas/snf-core works
SNF-Core is an offline passive network fingerprinting engine: it replays PCAPs or captures live traffic, tracks flows, analyzes protocol metadata, and writes forensic NDJSON. The principal runtime path is capture through worker processing, flow and protocol analysis, then event output. Configuration, deterministic replay, and live reporting are supporting capabilities. The README documents the overall architecture; source excerpts confirm selected processing and analyzer calls, while unsampled implementation details are shown only where documented.
Main entry points: packet_pipeline.rs Packet pipeline · main.rs CLI launcher · mod.rs Capture engine · analyzers Protocol analyzers
Components 18
Runtime and Capture
- CLI launcher
src/main.rs - Engine config
src/config/engine_config.rs - Capture engine
src/capture/mod.rs - Worker pool
src/threading/worker_pool.rs
Packet Processing
- Packet pipeline
src/pipeline/packet_pipeline.rs - Packet context
src/core/packet_context.rs - TCP reassembly
src/pipeline/tcp_reassembly.rs - Analyzer manager
src/core/analyzer_manager/mod.rs
Protocol Intelligence
- Protocol analyzers
src/analyzers - Fingerprint datasets
src/dataset
State and Determinism
- Flow table
src/flow/flow_table.rs - DNS attribution cache
src/discovery/dns_cache.rs - Determinism checks
src/determinism/mod.rs
Events and Results
- Event bus
src/core/event_bus.rs - NDJSON writer
src/output/ndjson_writer.rs - Live reporting
src/reporting/mod.rs
Other components
- Operator / capture
- NDJSON output
Connections 17
- Operator / capture → CLI launcher: selects mode
- CLI launcher → Engine config: builds config
src/main.rs - CLI launcher → Capture engine: starts capture
src/main.rs - Capture engine → Worker pool: routes packets
- Worker pool → Packet pipeline: processes packets
src/threading/worker_pool.rs - Packet pipeline → Flow table: updates flows
src/pipeline/packet_pipeline.rs - Packet pipeline → Analyzer manager: dispatches analysis
src/pipeline/packet_pipeline.rs - Analyzer manager → Protocol analyzers: invokes analyzers
src/core/analyzer_manager/mod.rs - Packet pipeline → Packet context: populates context
src/pipeline/packet_pipeline.rs - Packet pipeline → TCP reassembly: reassembles TCP
src/pipeline/packet_pipeline.rs - Protocol analyzers → DNS attribution cache: attributes domains
src/analyzers/tls.rs - Protocol analyzers → Fingerprint datasets: uses fingerprints
- Packet pipeline → Event bus: emits events
src/pipeline/packet_pipeline.rs - Event bus → NDJSON writer: serializes events
src/output/ndjson_writer.rs - NDJSON writer → NDJSON output: writes output
- Capture engine → Determinism checks: supports replay checks
src/determinism/mod.rs - Packet pipeline → Live reporting: updates live stats