操作系统
Ubuntu16/Ubuntu18
基础库安装
sudo apt install build-essential libsqlite3-dev libboost-all-dev libssl-dev git python-setuptools castxml
sudo apt install python-dev python-pygraphviz python-kiwi python-gnome2 ipython libcairo2-dev python3-gi libgirepository1.0-dev python-gi python-gi-cairo gir1.2-gtk-3.0 gir1.2-goocanvas-2.0 python-pip
sudo pip install pygraphviz pycairo PyGObject pygccxml
源码下载
mkdir ndnSIM
cd ndnSIM
git clone https://github.com/named-data-ndnSIM/ns-3-dev.git ns-3
git clone https://github.com/named-data-ndnSIM/pybindgen.git pybindgen
git clone --recursive https://github.com/named-data-ndnSIM/ndnSIM.git ns-3/src/ndnSIM
代码修改
文件路径:
/ndnSIM/ns-3/src/visualizer/base.py
base.py
搜索"file=sys.stderr",删除"file="
hub.py
from. import core修改为import core
code.py
第1774行-第1783行修改为
dest_width = 1024
dest_height = 768
编译、运行
cd <ns-3-folder>
./waf configure --enable-examples
./waf