aboutsummaryrefslogtreecommitdiffstats
path: root/meta-fsl-ppc/recipes-connectivity/ipsec-demo/ipsec-demo/test_setkey/pingsizes.sh
blob: faefb2459c3de47c1d97e5df07ac88c1487930f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
#
# Usage: ./pingsizes.sh 1440 20 (or greater)
#

PINGDEST=${PINGDEST:-200.200.200.10}
k=$1
lim="$((k+$2))"
((k-=1))
while [ "$k" != "$lim" ] ; do
	echo -n "ping -s $((k+=1)) : "
	ping -i 1000 -c 1 -s $k $PINGDEST | grep packets &
	sleep 1
	PID=`ps -eaf | grep 'ping -i' | grep -v grep | sed 's/[ ][ ]*/ /g' | cut -d " " -f 2`
	if [ -n "$PID" ] ; then
		echo "****************** killing $PID"
		kill $PID > /dev/null
	fi
done