The project is organized as follows:
.
├── configs
│ ├── models
│ │ └── ton.json
│ └── topos
│ ├── fattreetopo.json
│ └── topo.json
├── controller.py
├── convert_RF_and_populate_tables.py
├── dune.lua
├── Makefile
├── mininet
│ ├── dune.py
│ └── p4
│ ├── link.py
│ └── node.py
├── models
│ └── ton
│ ├── ToN_IoT_ClID0_T3_F5_L41_N4_With_Others.sav
│ ├── ToN_IoT_ClID1_T1_F5_L41_N2_With_Others.sav
│ ├── ToN_IoT_ClID2_T1_F6_L85_N3_With_Others.sav
│ └── ToN_IoT_ClID3_T1_F12_L129_N3_With_Others.sav
├── p4include
│ ├── dune_compute_checksum.p4
│ ├── dune_egress_deparser.p4
│ ├── dune_egress.p4
│ ├── dune_headers.p4
│ ├── dune_inference.p4
│ ├── dune_ingress.p4
│ ├── dune_ingress_parser.p4
│ ├── dune_verify_checksum.p4
│ └── network_headers.p4
├── p4sources
│ ├── no_inference.p4
│ ├── template
│ ├── ton_iot_m1.p4
│ ├── ton_iot_m2.p4
│ ├── ton_iot_m3.p4
│ ├── ton_iot_m4.p4
│ └── TON_IOT.md
├── populate_forwarding_tables.py
├── README.md
├── requirements.txt
├── upload_p4prog_to_switch.py
├── logs
├── pcaps
└── utils
├── params.ini
├── prepare_pcap_traces.py
└── process_result_pcaps.sh
controller.py: The main controller script for managing the Mininet switches.Makefile: Central script to build and run the project. It compiles the P4 programs, builds the parameter strings, and starts the Mininet environment.mininet/: Contains the custom Mininet classes for creating asimple_switch_grpc-based network that supports DUNE-based inference models.dune.py: Main script to set up the topologies and test, i.e., traffic injection patters.p4/: Contains custom mininet classes for handling links and p4-based switches.
p4include/: Contains P4 header files and definitions used in the project. You should not need to modify these files.p4sources/: Contains the P4 source files:no_inference.p4: A P4 program without inference capabilities.template: A template for creating new P4 programs. You should use this as a starting point for new P4 programs.ton_iot_m*.p4: P4 programs for different models of the ToN IoT dataset.TON_IOT.md: Documentation for the ToN IoT dataset.
utils/:prepare_pcap_traces.py: Script to prepare PCAP traces for being injected in the Mininet topo.process_result_pcaps.sh: Script to process the result PCAPs generated by the Mininet tests.
logs/: Contains the logs generated by the controller and switches during the execution of the Mininet tests.pcaps/: Contains the PCAP files generated by each switch in the Mininet network. Each file is named according to the switch and port, e.g.,pe_l0-eth5_out.pcapfor the output of the first leaf switch from the egress pod on the fifth port.
configs/: Contains configuration files for models and topologies.convert_RF_and_populate_tables.py: Script to convert previously pickled RF models into table data, and populate tables.dune.lua: dissector script to help Wireshark parse the Dune protocol.models/: Contains the trained models used for inference.populate_forwarding_tables.py: Script to populate the forwarding tables (not related to inference).upload_p4prog_to_switch.py: Script to upload P4 programs to the switch.utils/:params.ini: Configuration file for theprepare_pcap_traces.pyscript.