How oisf/suricata works
Suricata is a network intrusion detection, prevention, and security monitoring engine. Its broad runtime concerns are packet decoding, flow tracking, application-protocol parsing, signature configuration and matching, and event output. The sampled evidence supports several detection-engine dependencies, but not a complete capture-to-alert call chain; dashed links mark the high-level workflow that the README and available excerpts do not verify. The protocol parser tree is substantial, so it is represented as a subsystem rather than catalogued protocol by protocol.
Main entry points: detect-engine.c Detection Engine · flow.h Flow Tracking · detect-engine-build.c Rule Engine Build · app-layer-parser.h App-Layer Parser
Components 15
Traffic Processing
- Packet Capture
src/decode.h - Packet Decoder
src/decode.h - Flow Tracking
src/flow.h
Protocol Analysis
- Protocol Detection
src/app-layer-protos.h - App-Layer Parser
src/app-layer-parser.h - Rust Protocol Parsers
rust/src/lib.rs
Rule Detection
- Signature Parsing
src/detect-parse.h - Address Matching
src/detect-engine-address.c - Detection Engine
src/detect-engine.c - Rule Engine Build
src/detect-engine-build.c - Pattern Matching
src/detect-engine-mpm.c
Events and Integrations
- EVE Output
src/output-eve.c - nDPI Plugin
plugins/ndpi/ndpi.c
Other components
- Network Operator
- Network Traffic
Connections 16
- Network Traffic → Packet Capture: supplies packets
- Packet Capture → Packet Decoder: feeds packets
src/decode.h - Packet Decoder → Flow Tracking: updates flows
src/flow.h - Flow Tracking → Protocol Detection: tracks protocol
src/flow.h - Protocol Detection → App-Layer Parser: selects parser
- App-Layer Parser → Rust Protocol Parsers: parses protocols
- Network Operator → Signature Parsing: provides rules
- Detection Engine → Flow Tracking: uses flow state
src/detect-engine.c - Detection Engine → App-Layer Parser: uses parser API
src/detect-engine.c - Detection Engine → Signature Parsing: uses parse API
src/detect-engine.c - Rule Engine Build → Signature Parsing: uses parse API
src/detect-engine-build.c - Rule Engine Build → Address Matching: uses address rules
src/detect-engine-build.c - Rule Engine Build → Pattern Matching: uses pattern matching
src/detect-engine-build.c - nDPI Plugin → Flow Tracking: uses flow state
plugins/ndpi/ndpi.c - nDPI Plugin → EVE Output: uses EVE API
plugins/ndpi/ndpi.c - Detection Engine → EVE Output: emits events