aboutsummaryrefslogtreecommitdiffstats
path: root/tests/nsh_sfc/sfc_scripts/start_tcpdump.sh
blob: 46f8217e2602f045b604fc1d05e98a327be115e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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}