How cheikh-aghmenane/network-traffic-analyzer works
This small PHP/C++ application takes traffic records from traffic.txt and produces per-packet details plus aggregate statistics. The documented workflow is PHP launching the C++ analyzer; the analyzer reads each record, validates its fields and IPv4 addresses, skips invalid records, and reports packet counts, unique IP counts, and size statistics. Validation and aggregation are implemented together in analyzer.cpp, so they are shown as distinct responsibilities sharing that source. TCP/UDP analysis is described as planned, not implemented. Edges are supported by the PHP and C++ excerpts or README; the data-file relationship is documented in the README.
Main entry points: analyzer.cpp C++ analyzer · main.php PHP launcher · traffic.txt Traffic records
Components 8
Launch interface
- PHP launcher
main.php - Analysis output
analyzer.cpp
Packet analysis
- C++ analyzer
analyzer.cpp - Record validation
analyzer.cpp - Packet details
analyzer.cpp - Traffic statistics
analyzer.cpp
Traffic input
- Traffic records
traffic.txt
Other components
- Operator
Connections 9
- Operator → PHP launcher: runs
README.md - PHP launcher → Traffic records: checks file
main.php - PHP launcher → C++ analyzer: executes
main.php - C++ analyzer → Traffic records: reads
README.md - C++ analyzer → Record validation: validates records
analyzer.cpp - C++ analyzer → Packet details: prints details
analyzer.cpp - C++ analyzer → Traffic statistics: calculates
analyzer.cpp - C++ analyzer → Analysis output: prints report
analyzer.cpp - PHP launcher → Analysis output: prints output
main.php