aboutsummaryrefslogtreecommitdiffstats
path: root/vTC
diff options
context:
space:
mode:
authorAkis Kourtis <akis.kourtis@iit.demokritos.gr>2015-10-21 10:36:22 -0400
committerAna Cunha <ana.cunha@ericsson.com>2015-11-04 14:32:21 +0000
commitbe4f044fcf1cddea84bb5786546a3387112dc2fc (patch)
tree06db08a9a3d68d0b2fe576f12c31f00d13e5c54b /vTC
parent6cf230d8c1613fa1ce108419a75f78ba8b42a0c0 (diff)
Second commit of the vTC
JIRA: Yardstick-37 JIRA: Yardstick-137 The git clone process from the bitbucket repository is done using OAuth2 authentication now. Various build bugs have been fixed. Documentation has been updated, an architecture graph has been for better understanding. README.rst has been moved to docs/source/vTC along with an abbreviations.rst Change-Id: I864a90026df81779f7935f33acfa26ac9fb7c50c Signed-off-by: Akis Kourtis <akis.kourtis@iit.demokritos.gr>
Diffstat (limited to 'vTC')
-rw-r--r--vTC/build.sh44
1 files changed, 44 insertions, 0 deletions
diff --git a/vTC/build.sh b/vTC/build.sh
new file mode 100644
index 000000000..aa4e46328
--- /dev/null
+++ b/vTC/build.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# Jira No.137
+
+# download and install required libraries
+apt-get update
+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
+
+# Setup for PF_RING and bridge between interfaces
+
+# Get the source code from the bitbucket repository with OAuth2 authentication
+rm resp.json
+curl -X POST -u "mPkgwvJPsTFS8hYmHk:SDczcrK4cvnkMRWSEchB3ANcWbqFXqPx" https://bitbucket.org/site/oauth2/access_token -d grant_type=refresh_token -d refresh_token=38uFQuhEdPvCTbhc7k >> resp.json
+access_token=`jq -r '.access_token' resp.json`
+git clone https://x-token-auth:${access_token}@bitbucket.org/akiskourtis/vtc.git
+cd vtc
+git checkout -b stable
+#Build nDPI library
+cd nDPI
+NDPI_DIR=$(pwd)
+echo $NDPI_DIR
+NDPI_INCLUDE=$(pwd)/src/include
+echo $NDPI_INCLUDE
+./autogen.sh
+./configure
+make
+make install
+
+#Build PF_RING library
+cd ..
+cd PF_RING
+make
+#Build PF_RING examples, including the modified pfbridge, with nDPI integrated.
+cd userland/examples/
+sed -i 's#EXTRA_LIBS =#EXTRA_LIBS='"${NDPI_DIR}"'/src/lib/.libs/libndpi.a -ljson-c#' ./Makefile
+sed -i 's# -Ithird-party# -Ithird-party/ -I'"$NDPI_INCLUDE"' -I'"$NDPI_DIR"'#' ./Makefile
+echo $NDPI_DIR
+make
+cd ../..
+cd ..
+cd ..
+#sudo rmmod pf_ring
+insmod ./vtc/PF_RING/kernel/pf_ring.ko min_num_slots=16384 enable_debug=1 quick_mode=1 enable_tx_capture=0
+#./vtc/PF_RING/userland/examples/pfbridge -a eth1 -b eth2