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