summaryrefslogtreecommitdiffstats
path: root/examples/docker/SRv6_5-node/pcap_vpp.sh
blob: 167d11f9f54da6d66ef6b0d52158d0c892137df4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/bash

vpp_node=$1
packet_count=$2

if [ -z "$1" ]; then
    echo "VPP node argument missing!"
    echo "Usage:"
    echo -e "\n'$0 <vpp_node> <packet_count>' to run this command!\n"
    exit 1
fi

if [ -z "$2" ]; then
    echo "Packet count argument missing!"
    echo "Usage:"
    echo -e "\n'$0 <vpp_node> <packet_count>' to run this command!\n"
    exit 1
fi

sudo docker exec ${vpp_node} vppctl clear trace
sudo docker exec ${vpp_node} vppctl trace add af-packet-input ${packet_count}
sleep ${packet_count}
sudo docker exec ${vpp_node} vppctl show trace