5 # download and install required libraries
7 apt-get install -y git build-essential gcc libnuma-dev bison flex byacc libjson0-dev libcurl4-gnutls-dev jq dh-autoreconf libpcap-dev libpulse-dev libtool pkg-config
9 # Setup for PF_RING and bridge between interfaces
11 # Get the source code from the bitbucket repository with OAuth2 authentication
13 curl -X POST -u "mPkgwvJPsTFS8hYmHk:SDczcrK4cvnkMRWSEchB3ANcWbqFXqPx" https://bitbucket.org/site/oauth2/access_token -d grant_type=refresh_token -d refresh_token=38uFQuhEdPvCTbhc7k >> resp.json
14 access_token=`jq -r '.access_token' resp.json`
15 git clone https://x-token-auth:${access_token}@bitbucket.org/akiskourtis/vtc.git
17 git checkout -b stable
22 NDPI_INCLUDE=$(pwd)/src/include
29 #Build PF_RING library
33 #Build PF_RING examples, including the modified pfbridge, with nDPI integrated.
35 sed -i 's#EXTRA_LIBS =#EXTRA_LIBS='"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c#' ./Makefile
36 sed -i 's# -Ithird-party# -Ithird-party/ -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'#' ./Makefile
43 insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=16384 enable_debug=1 quick_mode=1 enable_tx_capture=0
44 #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2