aboutsummaryrefslogtreecommitdiffstats
path: root/tests/nsh_sfc/sfc_scripts/start_tcpdump.sh
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2017-06-20 13:57:08 +0200
committerTibor Frank <tifrank@cisco.com>2017-06-29 12:17:28 +0000
commit6721e7f09aa95bff6622068332a3f56afad9c87b (patch)
tree37ef7f40e53f740a62830ab46142aa87342dc56b /tests/nsh_sfc/sfc_scripts/start_tcpdump.sh
parent859157b5db45927c7b4bb0b2d575e68805777a86 (diff)
CSIT-687: Directory structure reorganization
Change-Id: I772c9e214be2461adf58124998d272e7d795220f Signed-off-by: Tibor Frank <tifrank@cisco.com> Signed-off-by: Maciek Konstantynowicz <mkonstan@cisco.com>
Diffstat (limited to 'tests/nsh_sfc/sfc_scripts/start_tcpdump.sh')
-rwxr-xr-xtests/nsh_sfc/sfc_scripts/start_tcpdump.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/nsh_sfc/sfc_scripts/start_tcpdump.sh b/tests/nsh_sfc/sfc_scripts/start_tcpdump.sh
new file mode 100755
index 0000000000..46f8217e26
--- /dev/null
+++ b/tests/nsh_sfc/sfc_scripts/start_tcpdump.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+ROOTDIR=/tmp/openvpp-testing
+PWDDIR=$(pwd)
+
+cd ${ROOTDIR}/nsh_sfc_tests/sfc_scripts/
+sudo rm -f temp_packet.pcap
+
+sudo /usr/sbin/tcpdump -i $1 -c 1 -w temp_packet.pcap dst host $2 &
+
+if [ ! $? -eq 0 ]; then
+ echo "Start the tcpdump failed!!!"
+ exit 1
+fi
+
+cd ${PWDDIR}