How cgb/ndpi_example works
This is a small command-line example that reads a saved packet capture, tracks IP identities and flows, and reports protocol-detection totals using nDPI. The main workflow runs from option parsing through offline capture processing to a printed summary. The excerpts show capture dispatch and setup, but omit part of packet_processing, so its handoff to nDPI is shown as unverified. The graph focuses on runtime behavior, not build files.
Main entry points: ndpiex.c Packet processing
Components 12
Capture input
- Option parsing
ndpiex.c - Offline capture
ndpiex.c - Packet callback
ndpiex.c
Packet analysis
- Packet processing
ndpiex.c - Flow tracking
ndpiex.c - Identity tracking
ndpiex.c - Detection setup
ndpiex.c
Results
- Protocol counters
ndpiex.c - Printed results
ndpiex.c
Other components
- Operator
- PCAP file
- nDPI library
Connections 12
- Operator → Option parsing: supplies options
README.md - Operator → PCAP file: selects capture
README.md - Option parsing → Offline capture: sets capture path
ndpiex.c - Offline capture → PCAP file: reads packets
ndpiex.c - Offline capture → Packet callback: dispatches packets
ndpiex.c - Packet callback → Packet processing: processes packet
ndpiex.c - Packet processing → Identity tracking: gets identities
ndpiex.c - Packet processing → Flow tracking: gets flow
ndpiex.c - Packet processing → nDPI library: classifies traffic
- Detection setup → nDPI library: initializes
ndpiex.c - Packet processing → Protocol counters: updates totals
ndpiex.c - Protocol counters → Printed results: summarizes
ndpiex.c