Overview

This repository contains my project work for CS6501: Network Security and Privacy, Spring 2026.

The project is built on top of ns-3 and focuses on simulation code for network monitoring and anomaly-related experiments. The repository includes custom ns-3 modules under src/ and experiment programs under scratch/.

All source code in this repository was written by the repository author as original course work. The code itself was not generated by AI.

Repository Layout

  • setup-ns3.sh: downloads and builds ns-3.37, then links this repository’s src/ and scratch/ directories into the ns-3 tree
  • scratch/anomalyPrediction/anomalyPrediction.cc: main experiment program
  • scratch/aodvExample.cc: additional ns-3 example code
  • src/database/: database support module
  • src/sha256/: SHA-256 utility module
  • src/nodeInfo/: node metadata helper module
  • src/timestamp/: timestamp helper module
  • python/python.ipynb: notebook workspace for analyze script.

Prerequisites

The current dependency list appears to target an Arch Linux environment:

paru -S cmake python dpdk qt5-base openmpi sqlite libxml2 boost boost-libs glib2 libpcap gsl gtk3 goocanvas python-gobject python-cairo python-pygraphviz ipython clang llvm castxml python-pygccxml python-cxxfilt python-setuptools python-pip python-wheel git mercurial doxygen graphviz imagemagick python-sphinx texlive-bin wget

You will also need standard build tools and internet access for downloading ns-3 and fetching libpqxx during the build.

Setup

Run the setup script from the repository root:

chmod +x setup-ns3.sh
./setup-ns3.sh

The script will:

  1. Download ns-allinone-3.37 if it is not already present
  2. Extract the archive
  3. Build ns-3
  4. Symlink this repository’s scratch/ files into the ns-3 scratch/ directory
  5. Symlink this repository’s src/ modules into the ns-3 src/ directory

Running Experiments

After setup completes, move into the generated ns-3 directory and run the experiment from there.

Example:

cd ns-allinone-3.37/ns-3.37
./ns3 run "anomalyPrediction --pcap=false --printRoutes=true --numOfUAVs=3 --time=3 --step=1 --EnableMonitor=true --hostname=test --dataRate=1Mbps"

Notes

  • setup-ns3.sh is the project setup script for ns-3
  • The database module uses libpqxx for PostgreSQL connectivity
  • This repository is intended for course and research use in CS6501