File: test-iptree.sh

package info (click to toggle)
tcpflow 1.4.5%2Brepack1-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,004 kB
  • ctags: 5,121
  • sloc: cpp: 17,933; python: 7,736; sh: 1,315; xml: 1,100; ansic: 355; makefile: 346
file content (48 lines) | stat: -rwxr-xr-x 881 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
. $srcdir/test-subs.sh

echo DMPDIR=$DMPDIR
echo TCPFLOW=$TCPFLOW

# check the results
checkmd5()
{
  if [ ! -r $1 ] ; 
  then 
     echo file $1 was not created
     ls -l
     exit 1
  fi

  md5val=`openssl md5 $1 | awk '{print $2;}'`
  if [ x$2 != x$md5val ];
  then 
     echo failure:         $1
     echo expected md5:    $2 "(got '$md5val')"
     echo expected length: $3
     ls -l $1
     exit 1
  fi
}

testmd5()
{
  md5val=`openssl md5 $1 | awk '{print $2;}'`
  len=`stat -r $1  | awk '{print $8;}'`
  echo checkmd5 \"$1\" \"$md5val\" \"$len\"
}

cmd()
{
    echo $1
    if ! $1 ; then echo failed; exit 1; fi
}
NITROBA=/corp/nps/packets/2008-nitroba/nitroba.pcap
if [ -r $NITROBA ]; then
  /bin/rm -rf out1
  cmd "$TCPFLOW -S netviz_max_histogram_size=1000 -S netviz_histogram_dump=1 -o out1 -r $NITROBA"
  /bin/rm -rf out1
else
  echo $NITROBA not present.
fi
exit 0