#!/bin/sh PATH=/usr/local/dagsnaps/bin:$PATH if [ -z $1 ] then echo "Error: Enter a DAG trace file (.d3h)" exit 1 fi if [ ! -f $1 ] then echo "Error: File $1 doesn't exist!" exit 1 fi if [ -z $2 ] then echo "Error: you need to enter a receive host" exit 1 fi if [ -z $3 ] then echo "Error: you must enter a packet size to grep for!" exit 1 fi if [ -z $4 ] then echo "Num of hops not entered, defaults to 1" fi # Note that dagbpf is supported by the DAG 3.2E card ONLY, where as # dagconvert is supported by the DAG 3.5E card ONLY. # dagbpf -e < $1 | tcpdump -tt udp -r - | egrep "udp $2" > $1.sent.tcpdump # dagbpf -e < $1 | tcpdump -tt icmp -r - > $1.receive.tcpdump dagconvert -T erf:pcap -c 32 -i $1 | tcpdump -tt udp and host $2 -r - | egrep "udp $3" > $1.sent.tcpdump dagconvert -T erf:pcap -c 32 -i $1 | tcpdump -tt icmp -r - > $1.receive.tcpdump tcpdump2dt-rtt -t $1.receive.tcpdump $1.sent.tcpdump $1.dt $4