This project is a packet analyser for Named Data Networking (NDN) packets. It uses a MongoDB database to store the packets and provides various plotting scripts to visualise the data. The included plotting scripts are:
components_hexbin.py
- plots the distribution of number of components to its name lengthgrid_throughput.py
- plots the throughput graph of four nodeshoplimit.py
- plots the hop limit of packetslifetime_freshness.py
- plots cdf of lifetime and freshness of packetsthroughput.py
- plots the throughput graph of a node with number of packets and size of packets in separate plotspopular_prefixes.py
- plots the most popular prefixes in interest and data packetscontent_size_distribution
- plots the distribution of content size of NLSR trafficcd ndn-packet-view
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.sample .env
zstdcat <file_path_to_pcapng.zst> | tcpdump -r- -n -e | head -5
ndntdump -r <file_path_to_pcapng.zst> --local <local_mac_address> -L <path_to_output_file>
.env
file and change the MONGO_DB_NAME to the name of the database you want to usepython -m tools.index <file_path>
python -m tools.plots.<script_name>
The project uses git pre-commit hooks to run linters and formatters. To enable the pre-commit hooks, run the following command:
pre-commit install
If the commit reports conflicts with the unstaged changes, run the pre-commit hooks manually and commit again:
pre-commit run --all-files
or use --no-verify
flag to skip the pre-commit verification:
git commit --no-verify -m <message>