changed test subsystem to be more table driven, and to save the outputs

and diffs into a consistent place
This commit is contained in:
mcr 2007-08-29 02:36:04 +00:00
parent 05b7f224d8
commit 1db958bded
29 changed files with 251 additions and 303 deletions

5
tests/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
DIFF
NEW
ikev2.pcap
ikev2four.pcap
print-flags.pcap

36
tests/TESTLIST Normal file
View File

@ -0,0 +1,36 @@
# BGP test
bgp_vpn_attrset bgp_vpn_attrset.pcap bgp_vpn_attrset.out -t -v
# EAP tests
eapon1 eapon1.pcap eapon1.out -t
# ESP tests
esp0 02-sunrise-sunset-esp.pcap esp0.out -t
esp1 02-sunrise-sunset-esp.pcap esp1.out -t -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"
esp2 08-sunrise-sunset-esp2.pcap esp2.out -t -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840,0xabcdabcd@192.0.1.1 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043"
esp3 02-sunrise-sunset-esp.pcap esp1.out -t -E "3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"
esp4 08-sunrise-sunset-esp2.pcap esp2.out -t -E "file esp-secrets.txt"
esp5 08-sunrise-sunset-aes.pcap esp5.out -t -E "file esp-secrets.txt"
espudp1 espudp1.pcap espudp1.out -t -E "file esp-secrets.txt"
# ISAKMP tests
isakmp1 isakmp-delete-segfault.pcap isakmp1.out -t
isakmp2 isakmp-pointer-loop.pcap isakmp2.out -t
isakmp3 isakmp-identification-segfault.pcap isakmp3.out -t -v
isakmp4 isakmp4500.pcap isakmp4.out -t -E "file esp-secrets.txt"
# LMP tests (what is it?)
# fails right now.
#lmp lmp.pcap lmp.out -t -v -v
# MPLS tests
mpls-ldp-hello mpls-ldp-hello.pcap mpls-ldp-hello.out -t -v
# OSPF tests
ospf-gmpls ospf-gmpls.pcap ospf-gmpls.out -t -v
# IKEv2 tests
ikev2four ikev2four.pcap ikev2four.out -t -v
ikev2fourv ikev2four.pcap ikev2fourv.out -t -v -v -v
ikev2fourv4 ikev2four.pcap ikev2fourv4.out -t -v -v -v -v

43
tests/TESTonce Executable file
View File

@ -0,0 +1,43 @@
#!/usr/bin/perl
system("mkdir -p NEW DIFF");
if(@ARGV == 1) {
open(TESTLIST, "TESTLIST") || die "can not open TESTLIST: $!\n";
$wanted = $ARGV[0];
#print "Searching for test case $wanted\n";
while(<TESTLIST>) {
#print "Processing $_\n";
next unless (/^$wanted/);
chop;
($name,$input,$output,$options)=split(/\s+/,$_, 4);
last;
}
close(TESTLIST);
die "Can not find test $wanted\n" unless defined($input);
} elsif(@ARGV == 4) {
$name=$ARGV[0];
$input=$ARGV[1];
$output=$ARGV[2];
$options=$ARGV[3];
} else {
print "Usage: TESTonce name [input output options]\n";
exit 20;
}
print "Running $name. \n";
print " Input: $input, OUTPUT: $output, OPTIONS: $options\n";
if (! -f $input) {
($puu = $input) =~ s/\.pcap/\.puu/;
if( -f $puu) {
print "Uudecoding $puu to make $input\n";
system("uudecode $puu");
}
}
print " ";
exec("../tcpdump -n -r $input $options | tee NEW/$output | diff -w - $output >DIFF/$output.diff");

61
tests/TESTrun.sh Executable file
View File

@ -0,0 +1,61 @@
#!/bin/sh
mkdir -p NEW
mkdir -p DIFF
passed=0
failed=0
# first run any specific tests.
for i in *.sh
do
case $i in TEST*.sh) continue;; esac
if sh ./$i >DIFF/$i.result
then
echo $i: passed.
passed=$(($passed + 1))
else
echo $i: failed.
failed=$(($failed + 1))
fi
done
echo $passed >.passed
echo $failed >.failed
# now run typical tests
cat TESTLIST | while read name input output options
do
case $name in
\#*) continue;;
'') continue;;
esac
if ./TESTonce $name $input $output "$options"
then
echo $name: passed.
passed=$(($passed + 1))
echo $passed >.passed
else
echo $name: failed.
failed=$(($failed + 1))
echo $failed >.failed
fi
done
# I hate shells with their stupid, useless subshells.
passed=`cat .passed`
failed=`cat .failed`
# exit with number of failing tests.
echo
echo
printf "%4u tests failed\n" $failed
printf "%4u tests passed\n" $passed
echo
echo
exit $failed

View File

@ -1,12 +0,0 @@
#!/bin/sh
for i in *.sh
do
if [ "X$i" = "Xalltests.sh" ]
then
continue;
fi
sh ./$i
done

View File

@ -1,10 +1,11 @@
IP (tos 0xc0, ttl 62, id 58628, offset 0, flags [none], proto: TCP (6), length: 173) 12.4.4.4.2051 > 12.1.1.1.179: P, cksum 0xcf18 (correct), 3293077573:3293077694(121) ack 3348108582 win 16384 <nop,nop,timestamp 383131 890299>: BGP, length: 121
IP (tos 0xc0, ttl 62, id 58628, offset 0, flags [none], proto TCP (6), length 173)
12.4.4.4.2051 > 12.1.1.1.179: Flags [P.], cksum 0xcf18 (correct), ack 3348108582, win 16384, options [nop,nop,TS val 383131 ecr 890299], length 121: BGP, length: 121
Update Message (2), length: 121
Origin (1), length: 1, Flags [T]: IGP
AS Path (2), length: 0, Flags [T]: empty
Local Preference (5), length: 4, Flags [T]: 100
Extended Community (16), length: 8, Flags [OT]:
target (0x0002), Flags [none]: 300:0.0.1.44
target (0x0002), Flags [none]: 300:300 (= 0.0.1.44)
Attribute Set (128), length: 36, Flags [OT]:
Origin AS: 65001
Origin (1), length: 1, Flags [T]: IGP
@ -14,5 +15,5 @@ IP (tos 0xc0, ttl 62, id 58628, offset 0, flags [none], proto: TCP (6), length:
Cluster List (10), length: 4, Flags [O]: 22.5.5.5
Multi-Protocol Reach NLRI (14), length: 30, Flags [OE]:
AFI: IPv4 (1), SAFI: labeled VPN Unicast (128)
nexthop: RD: 0:0.0.0.0, 12.4.4.4, nh-length: 12, no SNPA
RD: 500:0.0.1.244, 133.0.0.0/8, label:100208 (bottom)
nexthop: RD: 0:0 (= 0.0.0.0), 12.4.4.4, nh-length: 12, no SNPA
RD: 500:500 (= 0.0.1.244), 133.0.0.0/8, label:100208 (bottom)

View File

@ -1,11 +0,0 @@
#!/bin/sh
echo -n test bgp_vpn_attrset...
if (../tcpdump -t -n -v -r bgp_vpn_attrset.pcap | diff -w - bgp_vpn_attrset.out)
then
echo passed.
else
echo failed.
fi

View File

@ -1,19 +1,19 @@
IP 192.168.1.249.netbios-dgm > 192.168.1.255.netbios-dgm: NBT UDP PACKET(138)
IP 192.168.1.249.netbios-dgm > 192.168.1.255.netbios-dgm: NBT UDP PACKET(138)
IP 192.168.1.249.netbios-dgm > 192.168.1.255.netbios-dgm: NBT UDP PACKET(138)
IP 192.168.1.249.netbios-ns > 192.168.1.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 192.168.1.249.netbios-ns > 192.168.1.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 192.168.1.249.netbios-ns > 192.168.1.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 192.168.1.249.netbios-dgm > 192.168.1.255.netbios-dgm: NBT UDP PACKET(138)
IP 192.168.1.249.netbios-ns > 192.168.1.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 192.168.1.249.netbios-ns > 192.168.1.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 192.168.1.249.netbios-ns > 192.168.1.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
arp who-has 192.168.1.1 tell 192.168.1.249
arp reply 192.168.1.1 is-at 00:0d:88:4f:25:91 (oui Unknown)
IP 192.168.1.249.bootpc > 192.168.1.1.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300
IP 192.168.1.249.138 > 192.168.1.255.138: NBT UDP PACKET(138)
IP 192.168.1.249.138 > 192.168.1.255.138: NBT UDP PACKET(138)
IP 192.168.1.249.138 > 192.168.1.255.138: NBT UDP PACKET(138)
IP 192.168.1.249.137 > 192.168.1.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 192.168.1.249.137 > 192.168.1.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 192.168.1.249.137 > 192.168.1.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 192.168.1.249.138 > 192.168.1.255.138: NBT UDP PACKET(138)
IP 192.168.1.249.137 > 192.168.1.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 192.168.1.249.137 > 192.168.1.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 192.168.1.249.137 > 192.168.1.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
ARP, Request who-has 192.168.1.1 tell 192.168.1.249, length 28
ARP, Reply 192.168.1.1 is-at 00:0d:88:4f:25:91, length 46
IP 192.168.1.249.68 > 192.168.1.1.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
EAP code=1 id=0 length=5
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300
IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
EAP code=1 id=1 length=0
EAP code=1 id=0 length=5
EAP code=1 id=0 length=45
@ -24,9 +24,9 @@ EAP code=1 id=0 length=28
EAP code=1 id=0 length=4
EAP code=1 id=3 length=57
EAP code=1 id=3 length=44
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300
IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
EAP code=1 id=1 length=0
EAP code=1 id=0 length=5
EAP code=1 id=0 length=45
@ -37,75 +37,75 @@ EAP code=1 id=0 length=28
EAP code=1 id=0 length=4
EAP code=1 id=3 length=57
EAP code=1 id=3 length=44
arp who-has 169.254.67.194 tell 169.254.67.194
arp who-has 169.254.67.194 tell 169.254.67.194
arp who-has 169.254.67.194 tell 169.254.67.194
ARP, Request who-has 169.254.67.194 tell 169.254.67.194, length 28
ARP, Request who-has 169.254.67.194 tell 169.254.67.194, length 28
ARP, Request who-has 169.254.67.194 tell 169.254.67.194, length 28
IP 169.254.67.194.4299 > 239.255.255.250.1900: UDP, length 133
IP 169.254.67.194 > IGMP: igmp v3 report, 1 group record(s)
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194 > IGMP: igmp v3 report, 1 group record(s)
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194 > 224.0.0.22: igmp v3 report, 1 group record(s)
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194 > 224.0.0.22: igmp v3 report, 1 group record(s)
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.4299 > 239.255.255.250.1900: UDP, length 133
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
EAP code=1 id=1 length=0
EAP code=1 id=0 length=5
EAP code=1 id=0 length=45
EAP code=1 id=0 length=20
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
EAP code=1 id=0 length=76
EAP code=1 id=0 length=80
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
EAP code=1 id=0 length=28
EAP code=1 id=0 length=4
EAP code=1 id=3 length=57
EAP code=1 id=3 length=44
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300
IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
IP 169.254.67.194.4299 > 239.255.255.250.1900: UDP, length 133
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300
IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
EAP code=1 id=1 length=0
EAP code=1 id=0 length=5
EAP code=1 id=0 length=45
EAP code=1 id=0 length=20
IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
EAP code=1 id=0 length=76
EAP code=1 id=0 length=80
EAP code=1 id=0 length=28

View File

@ -1,13 +0,0 @@
#!/bin/sh
uudecode eapon1.puu
echo -n test eapon1...
../tcpdump -t -N -r eapon1.pcap > eapon1.new
if diff eapon1.new eapon1.out
then
echo passed.
else
echo failed.
fi

View File

@ -1,12 +0,0 @@
#!/bin/sh
echo -n test esp0...
uudecode 02-sunrise-sunset-esp.puu
if (../tcpdump -t -n -r 02-sunrise-sunset-esp.pcap | diff - esp0.out)
then
echo passed.
else
echo failed.
fi

View File

@ -1,13 +0,0 @@
#!/bin/sh
uudecode 02-sunrise-sunset-esp.puu
echo -n test esp1...
../tcpdump -t -n -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758" -r 02-sunrise-sunset-esp.pcap >esp1.new
if diff esp1.new esp1.out
then
echo passed.
else
echo failed.
fi

View File

@ -1,13 +0,0 @@
#!/bin/sh
uudecode 08-sunrise-sunset-esp2.puu
echo -n test esp2...
../tcpdump -t -n -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840,0xabcdabcd@192.0.1.1 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043" -r 08-sunrise-sunset-esp2.pcap >esp2.new
if diff esp2.new esp2.out
then
echo passed.
else
echo failed.
fi

View File

@ -1,12 +0,0 @@
#!/bin/sh
uudecode 02-sunrise-sunset-esp.puu
echo -n test esp3...
../tcpdump -t -n -E "3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758" -r 02-sunrise-sunset-esp.pcap >esp3.new
if diff esp3.new esp1.out
then
echo passed.
else
echo failed.
fi

View File

@ -1,13 +0,0 @@
#!/bin/sh
uudecode 08-sunrise-sunset-esp2.puu
echo -n test esp4...
../tcpdump -t -n -E "file esp-secrets.txt" -r 08-sunrise-sunset-esp2.pcap >esp4.new
if diff esp4.new esp2.out
then
echo passed.
else
echo failed.
fi

View File

@ -1,13 +0,0 @@
#!/bin/sh
uudecode 08-sunrise-sunset-aes.puu
echo -n test esp5...
../tcpdump -t -n -E "file esp-secrets.txt" -r 08-sunrise-sunset-aes.pcap > esp5.new
if diff esp5.new esp5.out
then
echo passed.
else
echo failed.
fi

View File

@ -1,6 +1,6 @@
IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x1), length 116
IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x2), length 116: ip-proto-227 49
IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x3), length 116: PIMv13, length: 10
IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x3), length 116: PIMv13, length 10
IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x4), length 116
IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x5), length 116
IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x6), length 116: ip-proto-183 28

View File

@ -1,13 +0,0 @@
#!/bin/sh
uudecode espudp1.puu
echo -n test espudp1...
../tcpdump -t -n -E "file esp-secrets.txt" -r espudp1.pcap >espudp1.new
if diff espudp1.new espudp1.out
then
echo passed.
else
echo failed.
fi

View File

@ -1 +1 @@
IP 127.0.0.1.500 > 127.0.0.1.500: isakmp: phase 2/others ? #190[C]
IP 127.0.0.1.500 > 127.0.0.1.500: isakmp:

View File

@ -1,12 +0,0 @@
#!/bin/sh
uudecode isakmp-delete-segfault.puu
echo -n test isakmp1...
if (../tcpdump -t -n -r isakmp-delete-segfault.pcap | diff - isakmp1.out)
then
echo passed.
else
echo failed.
fi

View File

@ -1,12 +0,0 @@
#!/bin/sh
uudecode isakmp-pointer-loop.puu
echo -n test isakmp2...
if (../tcpdump -t -n -r isakmp-pointer-loop.pcap | diff - isakmp2.out)
then
echo passed.
else
echo failed.
fi

View File

@ -1,2 +1,3 @@
IP (tos 0x0, ttl 255, id 41068, offset 0, flags [none], proto: UDP (17), length: 312) 127.0.0.1.501 > 127.0.0.1.500: isakmp 1.0 msgid : phase 1 I ident:
(id: idtype=FQDN protoid=0 port=0 len=248 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)
IP (tos 0x0, ttl 255, id 41068, offset 0, flags [none], proto UDP (17), length 312)
127.0.0.1.501 > 127.0.0.1.500: isakmp 1.0 msgid : phase 1 I ident:
(id: idtype=FQDN protoid=0 port=0 len=248 \0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00)

View File

@ -1,13 +0,0 @@
#!/bin/sh
uudecode isakmp-identification-segfault.puu
echo -n test isakmp3...
../tcpdump -t -v -n -r isakmp-identification-segfault.pcap > isakmp3.new
if diff isakmp3.new isakmp3.out
then
echo passed.
else
echo failed.
fi

View File

@ -1,5 +1,5 @@
arp who-has 192.1.2.23 tell 192.1.2.254
arp reply 192.1.2.23 is-at 10:00:00:64:64:23
ARP, Request who-has 192.1.2.23 tell 192.1.2.254, length 28
ARP, Reply 192.1.2.23 is-at 10:00:00:64:64:23, length 28
IP 192.1.2.254.500 > 192.1.2.23.500: isakmp: phase 1 I ident
IP 192.1.2.23.500 > 192.1.2.254.500: isakmp: phase 1 R ident
IP 192.1.2.254.500 > 192.1.2.23.500: isakmp: phase 1 I ident
@ -10,8 +10,8 @@ IP 192.1.2.254.4500 > 192.1.2.23.4500: NONESP-encap: isakmp: phase 2/others I oa
IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 2/others R oakley-quick[E]
IP 192.1.2.254.4500 > 192.1.2.23.4500: NONESP-encap: isakmp: phase 2/others I oakley-quick[E]
IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x1), length 132
arp who-has 192.1.2.254 tell 192.1.2.23
arp reply 192.1.2.254 is-at 10:00:00:de:ad:ba
ARP, Request who-has 192.1.2.254 tell 192.1.2.23, length 28
ARP, Reply 192.1.2.254 is-at 10:00:00:de:ad:ba, length 28
IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 2/others R oakley-quick[E]
IP 192.1.2.254.4500 > 192.1.2.23.4500: NONESP-encap: isakmp: phase 2/others I oakley-quick[E]
IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x2), length 132
@ -23,13 +23,13 @@ IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x4), l
IP 192.1.2.254.4500 > 192.1.2.23.4500: isakmp-nat-keep-alive
IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x5), length 132
IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x6), length 132
arp who-has 192.1.2.23 tell 192.1.2.254
arp reply 192.1.2.23 is-at 10:00:00:64:64:23
ARP, Request who-has 192.1.2.23 tell 192.1.2.254, length 28
ARP, Reply 192.1.2.23 is-at 10:00:00:64:64:23, length 28
IP 192.1.2.254.4500 > 192.1.2.23.4500: isakmp-nat-keep-alive
IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x7), length 132
IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 2/others R oakley-quick[E]
IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x8), length 132
arp who-has 192.1.2.254 tell 192.1.2.23
arp reply 192.1.2.254 is-at 10:00:00:de:ad:ba
ARP, Request who-has 192.1.2.254 tell 192.1.2.23, length 28
ARP, Reply 192.1.2.254 is-at 10:00:00:de:ad:ba, length 28
IP 192.1.2.254.4500 > 192.1.2.23.4500: isakmp-nat-keep-alive
IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 2/others R inf[E]

View File

@ -1,13 +0,0 @@
#!/bin/sh
uudecode isakmp4500.puu
echo -n test isakmp4...
../tcpdump -t -n -E "file esp-secrets.txt" -r isakmp4500.pcap >isakmp4.new
if diff isakmp4.new isakmp4.out
then
echo passed.
else
echo failed.
fi

View File

@ -3,7 +3,7 @@
uudecode lmp.puu
echo -n test lmp ...
../tcpdump -t -n -v -r lmp.pcap >lmp.new
../tcpdump -t -n -v -v -v -r lmp.pcap >lmp.new
if diff lmp.new lmp.out
then
echo passed.

View File

@ -1,4 +1,5 @@
IP (tos 0xc0, ttl 1, id 15579, offset 0, flags [none], proto: UDP (17), length: 70) 10.1.1.3.646 > 224.0.0.2.646:
IP (tos 0xc0, ttl 1, id 15579, offset 0, flags [none], proto UDP (17), length 70)
10.1.1.3.646 > 224.0.0.2.646:
LDP, Label-Space-ID: 10.1.0.2:0, pdu-length: 38
Hello Message (0x0100), length: 28, Message ID: 0x00011970, Flags: [ignore if unknown]
Common Hello Parameters TLV (0x0400), length: 4, Flags: [ignore and don't forward if unknown]

View File

@ -1,14 +0,0 @@
#!/bin/sh
uudecode mpls-ldp-hello.puu
echo -n test mpls-ldp-hello ...
../tcpdump -t -n -v -r mpls-ldp-hello.pcap >mpls-ldp-hello.new
if diff mpls-ldp-hello.new mpls-ldp-hello.out
then
echo passed.
else
echo failed.
fi

View File

@ -1,8 +1,9 @@
IP (tos 0xc0, ttl 1, id 4052, offset 0, flags [none], proto: OSPF (89), length: 172) 40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length: 152
Router-ID: 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA
IP (tos 0xc0, ttl 1, id 4052, offset 0, flags [none], proto OSPF (89), length 172)
40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length 152
Router-ID 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA
LSA #1
Advertising Router: 10.255.245.37, seq 0x80000002, age 9s, length: 104
Area Local Opaque LSA (10), Opaque-Type: Traffic Engineering LSA (1), Opaque-ID: 8
Advertising Router 10.255.245.37, seq 0x80000002, age 9s, length 104
Area Local Opaque LSA (10), Opaque-Type Traffic Engineering LSA (1), Opaque-ID 8
Options: [External]
Link TLV (2), length: 100
Link Type subTLV (1), length: 1, Point-to-point (1)
@ -22,11 +23,12 @@ IP (tos 0xc0, ttl 1, id 4052, offset 0, flags [none], proto: OSPF (89), length
TE-Class 6: 622.080 Mbps
TE-Class 7: 622.080 Mbps
Administrative Group subTLV (9), length: 4, 0x00000000
IP (tos 0xc0, ttl 1, id 4106, offset 0, flags [none], proto: OSPF (89), length: 172) 40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length: 152
Router-ID: 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA
IP (tos 0xc0, ttl 1, id 4106, offset 0, flags [none], proto OSPF (89), length 172)
40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length 152
Router-ID 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA
LSA #1
Advertising Router: 10.255.245.37, seq 0x80000002, age 9s, length: 104
Area Local Opaque LSA (10), Opaque-Type: Traffic Engineering LSA (1), Opaque-ID: 9
Advertising Router 10.255.245.37, seq 0x80000002, age 9s, length 104
Area Local Opaque LSA (10), Opaque-Type Traffic Engineering LSA (1), Opaque-ID 9
Options: [External]
Link TLV (2), length: 100
Link Type subTLV (1), length: 1, Point-to-point (1)
@ -46,11 +48,12 @@ IP (tos 0xc0, ttl 1, id 4106, offset 0, flags [none], proto: OSPF (89), length
TE-Class 6: 622.080 Mbps
TE-Class 7: 622.080 Mbps
Administrative Group subTLV (9), length: 4, 0x00000000
IP (tos 0xc0, ttl 1, id 4160, offset 0, flags [none], proto: OSPF (89), length: 212) 40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length: 192
Router-ID: 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA
IP (tos 0xc0, ttl 1, id 4160, offset 0, flags [none], proto OSPF (89), length 212)
40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length 192
Router-ID 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA
LSA #1
Advertising Router: 10.255.245.35, seq 0x80000003, age 3s, length: 144
Area Local Opaque LSA (10), Opaque-Type: Traffic Engineering LSA (1), Opaque-ID: 3
Advertising Router 10.255.245.35, seq 0x80000003, age 3s, length 144
Area Local Opaque LSA (10), Opaque-Type Traffic Engineering LSA (1), Opaque-ID 3
Options: [External]
Link TLV (2), length: 140
Link Type subTLV (1), length: 1, Point-to-point (1)

View File

@ -1,14 +0,0 @@
#!/bin/sh
uudecode ospf-gmpls.puu
echo -n test ospf-gmpls...
../tcpdump -t -n -v -r ospf-gmpls.pcap > ospf-gmpls.new
if diff ospf-gmpls.new ospf-gmpls.out
then
echo passed.
else
echo failed.
fi