]> The Tcpdump Group git mirrors - tcpdump/blob - tests/print-flags.sh
use macros for VAT and WB port numbers
[tcpdump] / tests / print-flags.sh
1 #!/bin/sh
2
3 for i in x xx X XX A AA; do
4 #
5 # We cannot rely on, for example, "print-x.out" and
6 # "print-X.out" being different files - we might be running
7 # this on a case-insensitive file system, e.g. a Windows
8 # file system or a case-insensitive HFS+ file system on
9 # Mac OS X.
10 #
11 # Therefore, for "X" and "XX", we have "print-capX.out"
12 # and "print-capXX.out".
13 #
14 if test $i = X
15 then
16 printname=capX
17 elif test $i = XX
18 then
19 printname=capXX
20 else
21 printname=$i
22 fi
23 if (../tcpdump -$i -s0 -nr print-flags.pcap | tee NEW/print-$printname.new | diff - print-$printname.out >DIFF/print-$printname.out.diff )
24 then
25 echo print-$i passed.
26 else
27 echo print-$i failed.
28 fi
29 done