These are P4Simulator install scripts to help you download, install, run P4Simulator quickly.We have tested it successfully on Ubuntu 16.04.
We recommend to install P4Simulator step by step, because there may be some errors in the installation process.We also provide a one-click installation script(install_deps.sh) to install P4Simulator.
$ git clone https://github.com/P4Simulator/P4Simulator-install.git
$ cd P4Simulator-install
You can choose one of the following ways to install P4Simulator.
The install process could be time-consuming, and we are thinking about a better way, so stay tuned!.
1 install ns3
#bash install_ns3_pre.sh
#bash install_ns3.sh
2 install bmv2
#bash install_bmv2.sh
3 install p4c-bm
#bash install_p4c-bm.sh
4 install P4Simulator
#bash install_P4Simulator.sh
#bash create_P4Simulator_run.sh
#bash install_deps.sh
If everything goes well, you will find you are in this folder(ns-3.27),and you need to modify P4GlobalVar::g_homePath value in src/P4Simulator/examples/p4-demo.cc to your own home path.(My home path is /home/kp),and then just run ns4.
#bash run.sh