2 ##############################################################################
3 # Copyright (c) 2017 akis.kourtis@iit.demokritos.gr and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
14 # download and install required libraries
16 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
18 # Setup for PF_RING and bridge between interfaces
20 # Get the source code from the bitbucket repository with OAuth2 authentication
22 curl -X POST -u "mPkgwvJPsTFS8hYmHk:SDczcrK4cvnkMRWSEchB3ANcWbqFXqPx" https://bitbucket.org/site/oauth2/access_token -d grant_type=refresh_token -d refresh_token=38uFQuhEdPvCTbhc7k >> resp.json
23 access_token=`jq -r '.access_token' resp.json`
24 git clone https://x-token-auth:${access_token}@bitbucket.org/akiskourtis/vtc.git
26 git checkout -b stable
31 NDPI_INCLUDE=$(pwd)/src/include
38 #Build PF_RING library
42 #Build PF_RING examples, including the modified pfbridge, with nDPI integrated.
44 sed -i 's#EXTRA_LIBS =#EXTRA_LIBS='"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c#' ./Makefile
45 sed -i 's# -Ithird-party# -Ithird-party/ -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'#' ./Makefile
52 insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=16384 enable_debug=1 quick_mode=1 enable_tx_capture=0
53 #./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2