How shreyas-krishnan7/packetanalyser---a-deep-packet-inspection-engine works
PacketAnalyser reads PCAP captures, parses packets, assigns flows across worker threads, identifies applications and domains, applies blocking policy, then writes a deterministic filtered capture and reports results. The principal multi-threaded path is shown; the README also documents DNS-based QUIC attribution and configurable thread pools. Several implementation files were indexed but not excerpted, so those relationships are supported by the README or source-index references rather than detailed call-site inspection.
Main entry points: dpi_engine.cpp DPI engine · fast_path.cpp Fast-path workers · cli.h CLI · pcap_reader.cpp PCAP reader
Components 14
Capture input
- CLI
include/cli.h - PCAP reader
src/pcap_reader.cpp - Packet parser
src/packet_parser.cpp
Thread dispatch
- DPI engine
src/dpi_engine.cpp - Load balancers
src/load_balancer.cpp - Bounded queues
include/thread_safe_queue.h
Flow inspection
- Fast-path workers
src/fast_path.cpp - Protocol extractors
src/sni_extractor.cpp - Flow tracker
src/connection_tracker.cpp - DNS cache
src/dns_cache.cpp
Policy and results
- Blocking rules
src/rule_manager.cpp - PCAP writer
src/pcap_reader.cpp - Reports
include/report.h
Other components
- Operator
Connections 14
- Operator → CLI: configures
README.md - CLI → DPI engine: starts
- DPI engine → PCAP reader: reads capture
README.md - PCAP reader → Packet parser: passes packets
README.md - DPI engine → Packet parser: parses packets
src/dpi_engine.cpp - DPI engine → Load balancers: dispatches flows
README.md - Load balancers → Bounded queues: enqueues packets
README.md - Bounded queues → Fast-path workers: delivers packets
README.md - Fast-path workers → Protocol extractors: extracts identities
src/fast_path.cpp - Fast-path workers → Flow tracker: tracks flows
src/fast_path.cpp - Fast-path workers → DNS cache: correlates names
README.md - Fast-path workers → Blocking rules: checks policy
src/fast_path.cpp - DPI engine → PCAP writer: writes filtered capture
README.md - DPI engine → Reports: generates reports
src/dpi_engine.cpp