#! /bin/csh -f

tcpdump -r trace.raw | awk 'BEGIN {sum=0;cnt=0} \
				{if ($7 == "ack") {sum+= $8;cnt++}} \
			       END {print sum/cnt}'

