3 # Do all the legwork to run a scapy shell with APIs available for load
5 ROOT_DIR=`git rev-parse --show-toplevel`
7 sudo apt-get install -y python-virtualenv
8 # uncomment the line below to enable the build of plugins and API each time..
9 # make plugins && make build-vpp-api || exit
11 virtualenv/bin/pip install ipaddress
12 virtualenv/bin/pip install scapy
13 # install the python API into the virtualenv
14 cd $ROOT_DIR/vpp-api/python/
15 $ROOT_DIR/virtualenv/bin/python setup.py install
16 # install the python ACL plugin API into the virtualenv
17 ACL_PLUGIN_SETUP_DIR=`find $ROOT_DIR/build-root -name acl-plugin`
18 cd $ACL_PLUGIN_SETUP_DIR;
19 $ROOT_DIR/virtualenv/bin/python setup.py install
21 # figure out the shared library path and start scapy
22 export LD_LIBRARY_PATH=`pwd`/`find . -name "libpneum.so" -exec dirname {} \; | grep lib64 | head -n 1`
23 sudo LD_LIBRARY_PATH=$LD_LIBRARY_PATH virtualenv/bin/scapy