blob: d25515524bde1fab8e7d55e09445ef8bf391fdb8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/bash
if [ -z $1 ]; then
echo "Missing number of streams to enable. Exit (1)"
exit
fi
if [ "$1" -gt "10" ] || [ "$1" -lt "1" ]; then
echo "The number of streams to enable must be between 1 and 10. Exit(1)"
exit
fi
STREAMS=$1
# Disable all the streams
vppctl packet-generator disable-stream
# Enable streams based on client input
for((i=1; i <= $STREAMS; i++)); do
vppctl packet-generator enable-stream fw_udp$i
done
|