summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2009-03-21 18:30:25 +0000
committerrpaulo <rpaulo@FreeBSD.org>2009-03-21 18:30:25 +0000
commita7b30869205bc30a0462ffd9bc6c77fe4d980bd0 (patch)
tree9e93e51a04c09c3b9b900ef6611b8bbd1290f26f
parent739eecddb9401ad5ef572c94f0764de2aa04e074 (diff)
parent10d55b9ccc041d249d91faedc3bd1139626bf444 (diff)
downloadFreeBSD-src-a7b30869205bc30a0462ffd9bc6c77fe4d980bd0.zip
FreeBSD-src-a7b30869205bc30a0462ffd9bc6c77fe4d980bd0.tar.gz
Merge tcpdump 4.0.0 from the vendor branch.
-rw-r--r--contrib/tcpdump/CHANGES44
-rw-r--r--contrib/tcpdump/CREDITS295
-rw-r--r--contrib/tcpdump/FILES251
-rw-r--r--contrib/tcpdump/INSTALL.txt (renamed from contrib/tcpdump/INSTALL)8
-rw-r--r--contrib/tcpdump/Makefile-devel-adds22
-rw-r--r--contrib/tcpdump/Makefile.in219
-rw-r--r--contrib/tcpdump/PLATFORMS9
-rw-r--r--contrib/tcpdump/README14
-rw-r--r--contrib/tcpdump/Readme.Win3224
-rw-r--r--contrib/tcpdump/TODO6
-rw-r--r--contrib/tcpdump/VERSION2
-rw-r--r--contrib/tcpdump/addrtoname.c14
-rw-r--r--contrib/tcpdump/addrtoname.h13
-rw-r--r--contrib/tcpdump/af.c2
-rw-r--r--contrib/tcpdump/af.h2
-rw-r--r--contrib/tcpdump/aodv.h2
-rw-r--r--contrib/tcpdump/appletalk.h2
-rw-r--r--contrib/tcpdump/arcnet.h2
-rw-r--r--contrib/tcpdump/atm.h3
-rw-r--r--contrib/tcpdump/atmuni31.h14
-rwxr-xr-xcontrib/tcpdump/bgp.h2
-rw-r--r--contrib/tcpdump/bootp.h2
-rw-r--r--contrib/tcpdump/bpf_dump.c4
-rw-r--r--contrib/tcpdump/chdlc.h2
-rw-r--r--contrib/tcpdump/checksum.c137
-rw-r--r--contrib/tcpdump/config.h.in6
-rwxr-xr-xcontrib/tcpdump/configure589
-rwxr-xr-xcontrib/tcpdump/configure.in161
-rw-r--r--contrib/tcpdump/dccp.h6
-rw-r--r--contrib/tcpdump/decnet.h2
-rw-r--r--contrib/tcpdump/enc.h2
-rw-r--r--contrib/tcpdump/ether.h2
-rw-r--r--contrib/tcpdump/ethertype.h18
-rw-r--r--contrib/tcpdump/extract.h6
-rw-r--r--contrib/tcpdump/fddi.h2
-rw-r--r--contrib/tcpdump/gmpls.c26
-rw-r--r--contrib/tcpdump/gmpls.h12
-rw-r--r--contrib/tcpdump/gmt2local.c2
-rw-r--r--contrib/tcpdump/gmt2local.h2
-rw-r--r--contrib/tcpdump/icmp6.h4
-rw-r--r--contrib/tcpdump/ieee802_11.h2
-rw-r--r--contrib/tcpdump/ieee802_11_radio.h2
-rw-r--r--contrib/tcpdump/igrp.h2
-rw-r--r--contrib/tcpdump/interface.h32
-rw-r--r--contrib/tcpdump/ip.h2
-rw-r--r--contrib/tcpdump/ip6.h4
-rw-r--r--contrib/tcpdump/ipfc.h2
-rwxr-xr-xcontrib/tcpdump/ipproto.c2
-rw-r--r--contrib/tcpdump/ipproto.h3
-rw-r--r--contrib/tcpdump/ipsec_doi.h2
-rw-r--r--contrib/tcpdump/ipx.h2
-rw-r--r--contrib/tcpdump/isakmp.h149
-rw-r--r--contrib/tcpdump/l2tp.h2
-rwxr-xr-xcontrib/tcpdump/l2vpn.c2
-rwxr-xr-xcontrib/tcpdump/l2vpn.h2
-rw-r--r--contrib/tcpdump/lane.h2
-rw-r--r--contrib/tcpdump/lbl/os-osf4.h2
-rw-r--r--contrib/tcpdump/lbl/os-solaris2.h2
-rw-r--r--contrib/tcpdump/lbl/os-sunos4.h2
-rw-r--r--contrib/tcpdump/lbl/os-ultrix4.h2
-rw-r--r--contrib/tcpdump/llc.h4
-rw-r--r--contrib/tcpdump/machdep.c2
-rw-r--r--contrib/tcpdump/machdep.h2
-rwxr-xr-xcontrib/tcpdump/makemib2
-rw-r--r--contrib/tcpdump/missing/addrinfo.h2
-rw-r--r--contrib/tcpdump/missing/datalinks.c2
-rw-r--r--contrib/tcpdump/missing/dlnames.c2
-rw-r--r--contrib/tcpdump/missing/getaddrinfo.c2
-rw-r--r--contrib/tcpdump/missing/getnameinfo.c2
-rw-r--r--contrib/tcpdump/missing/inet_aton.c4
-rw-r--r--contrib/tcpdump/missing/inet_ntop.c4
-rw-r--r--contrib/tcpdump/missing/inet_pton.c4
-rw-r--r--contrib/tcpdump/missing/snprintf.c4
-rw-r--r--contrib/tcpdump/missing/strdup.c2
-rw-r--r--contrib/tcpdump/missing/strlcat.c2
-rw-r--r--contrib/tcpdump/missing/strlcpy.c2
-rw-r--r--contrib/tcpdump/missing/strsep.c2
-rw-r--r--contrib/tcpdump/mpls.h2
-rw-r--r--contrib/tcpdump/nameser.h2
-rw-r--r--contrib/tcpdump/netbios.h2
-rw-r--r--contrib/tcpdump/netdissect.h12
-rw-r--r--contrib/tcpdump/nfs.h19
-rw-r--r--contrib/tcpdump/nfsfh.h2
-rwxr-xr-xcontrib/tcpdump/nlpid.c2
-rw-r--r--contrib/tcpdump/nlpid.h2
-rw-r--r--contrib/tcpdump/ntp.h2
-rw-r--r--contrib/tcpdump/oakley.h2
-rw-r--r--contrib/tcpdump/ospf.h68
-rw-r--r--contrib/tcpdump/ospf6.h77
-rw-r--r--contrib/tcpdump/oui.c5
-rw-r--r--contrib/tcpdump/oui.h5
-rw-r--r--contrib/tcpdump/parsenfsfh.c2
-rw-r--r--contrib/tcpdump/pcap-missing.h2
-rw-r--r--contrib/tcpdump/pcap_dump_ftell.c2
-rw-r--r--contrib/tcpdump/pmap_prot.h3
-rw-r--r--contrib/tcpdump/ppp.h2
-rw-r--r--contrib/tcpdump/print-802_11.c51
-rw-r--r--contrib/tcpdump/print-ah.c2
-rw-r--r--contrib/tcpdump/print-aodv.c2
-rw-r--r--contrib/tcpdump/print-ap1394.c6
-rw-r--r--contrib/tcpdump/print-arcnet.c2
-rw-r--r--contrib/tcpdump/print-arp.c285
-rw-r--r--contrib/tcpdump/print-ascii.c2
-rw-r--r--contrib/tcpdump/print-atalk.c2
-rw-r--r--contrib/tcpdump/print-atm.c163
-rw-r--r--contrib/tcpdump/print-beep.c2
-rw-r--r--contrib/tcpdump/print-bfd.c2
-rw-r--r--contrib/tcpdump/print-bgp.c457
-rw-r--r--contrib/tcpdump/print-bootp.c16
-rw-r--r--contrib/tcpdump/print-bt.c78
-rw-r--r--contrib/tcpdump/print-cdp.c2
-rw-r--r--contrib/tcpdump/print-cfm.c641
-rw-r--r--contrib/tcpdump/print-chdlc.c2
-rw-r--r--contrib/tcpdump/print-cip.c2
-rw-r--r--contrib/tcpdump/print-cnfp.c2
-rw-r--r--contrib/tcpdump/print-dccp.c71
-rw-r--r--contrib/tcpdump/print-decnet.c2
-rw-r--r--contrib/tcpdump/print-dhcp6.c133
-rw-r--r--contrib/tcpdump/print-domain.c39
-rw-r--r--contrib/tcpdump/print-dtp.c123
-rw-r--r--contrib/tcpdump/print-dvmrp.c2
-rw-r--r--contrib/tcpdump/print-eap.c274
-rw-r--r--contrib/tcpdump/print-egp.c16
-rw-r--r--contrib/tcpdump/print-eigrp.c2
-rw-r--r--contrib/tcpdump/print-enc.c15
-rw-r--r--contrib/tcpdump/print-esp.c2
-rw-r--r--contrib/tcpdump/print-ether.c24
-rw-r--r--contrib/tcpdump/print-fddi.c2
-rw-r--r--contrib/tcpdump/print-fr.c115
-rw-r--r--contrib/tcpdump/print-frag6.c2
-rw-r--r--contrib/tcpdump/print-gre.c2
-rw-r--r--contrib/tcpdump/print-hsrp.c2
-rw-r--r--contrib/tcpdump/print-icmp.c4
-rw-r--r--contrib/tcpdump/print-icmp6.c6
-rw-r--r--contrib/tcpdump/print-igmp.c2
-rw-r--r--contrib/tcpdump/print-igrp.c2
-rw-r--r--contrib/tcpdump/print-ip.c4
-rw-r--r--contrib/tcpdump/print-ip6.c2
-rw-r--r--contrib/tcpdump/print-ip6opts.c2
-rw-r--r--contrib/tcpdump/print-ipcomp.c2
-rw-r--r--contrib/tcpdump/print-ipfc.c2
-rw-r--r--contrib/tcpdump/print-ipx.c2
-rw-r--r--contrib/tcpdump/print-isakmp.c1740
-rw-r--r--contrib/tcpdump/print-isoclns.c156
-rw-r--r--contrib/tcpdump/print-juniper.c467
-rw-r--r--contrib/tcpdump/print-krb.c2
-rw-r--r--contrib/tcpdump/print-l2tp.c2
-rw-r--r--contrib/tcpdump/print-lane.c2
-rw-r--r--contrib/tcpdump/print-ldp.c35
-rw-r--r--contrib/tcpdump/print-llc.c28
-rw-r--r--contrib/tcpdump/print-lldp.c1107
-rw-r--r--contrib/tcpdump/print-lmp.c28
-rw-r--r--contrib/tcpdump/print-lspping.c13
-rw-r--r--contrib/tcpdump/print-lwapp.c360
-rw-r--r--contrib/tcpdump/print-lwres.c2
-rw-r--r--contrib/tcpdump/print-mobile.c2
-rw-r--r--contrib/tcpdump/print-mobility.c2
-rw-r--r--contrib/tcpdump/print-mpcp.c274
-rw-r--r--contrib/tcpdump/print-mpls.c2
-rw-r--r--contrib/tcpdump/print-msdp.c2
-rw-r--r--contrib/tcpdump/print-netbios.c2
-rw-r--r--contrib/tcpdump/print-nfs.c26
-rw-r--r--contrib/tcpdump/print-ntp.c2
-rw-r--r--contrib/tcpdump/print-null.c5
-rw-r--r--contrib/tcpdump/print-ospf.c778
-rw-r--r--contrib/tcpdump/print-ospf6.c596
-rw-r--r--contrib/tcpdump/print-pflog.c7
-rw-r--r--contrib/tcpdump/print-pgm.c2
-rw-r--r--contrib/tcpdump/print-pim.c2
-rw-r--r--contrib/tcpdump/print-ppp.c2
-rw-r--r--contrib/tcpdump/print-pppoe.c2
-rw-r--r--contrib/tcpdump/print-pptp.c2
-rw-r--r--contrib/tcpdump/print-radius.c2
-rw-r--r--contrib/tcpdump/print-raw.c2
-rw-r--r--contrib/tcpdump/print-rip.c19
-rw-r--r--contrib/tcpdump/print-ripng.c2
-rw-r--r--contrib/tcpdump/print-rrcp.c137
-rw-r--r--contrib/tcpdump/print-rsvp.c2
-rw-r--r--contrib/tcpdump/print-rt6.c2
-rw-r--r--contrib/tcpdump/print-rx.c332
-rw-r--r--contrib/tcpdump/print-sctp.c2
-rw-r--r--contrib/tcpdump/print-sflow.c577
-rw-r--r--contrib/tcpdump/print-sip.c2
-rw-r--r--contrib/tcpdump/print-sl.c2
-rw-r--r--contrib/tcpdump/print-sll.c2
-rw-r--r--contrib/tcpdump/print-slow.c465
-rw-r--r--contrib/tcpdump/print-smb.c45
-rw-r--r--contrib/tcpdump/print-snmp.c2
-rw-r--r--contrib/tcpdump/print-stp.c2
-rw-r--r--contrib/tcpdump/print-sunatm.c2
-rw-r--r--contrib/tcpdump/print-sunrpc.c2
-rw-r--r--contrib/tcpdump/print-symantec.c2
-rwxr-xr-xcontrib/tcpdump/print-syslog.c2
-rw-r--r--contrib/tcpdump/print-tcp.c1285
-rw-r--r--contrib/tcpdump/print-telnet.c2
-rw-r--r--contrib/tcpdump/print-tftp.c6
-rw-r--r--contrib/tcpdump/print-timed.c2
-rw-r--r--contrib/tcpdump/print-token.c2
-rw-r--r--contrib/tcpdump/print-udld.c173
-rw-r--r--contrib/tcpdump/print-udp.c12
-rw-r--r--contrib/tcpdump/print-vjc.c2
-rw-r--r--contrib/tcpdump/print-vqp.c209
-rw-r--r--contrib/tcpdump/print-vrrp.c2
-rw-r--r--contrib/tcpdump/print-vtp.c378
-rw-r--r--contrib/tcpdump/print-wb.c2
-rw-r--r--contrib/tcpdump/print-zephyr.c11
-rw-r--r--contrib/tcpdump/route6d.h2
-rw-r--r--contrib/tcpdump/rpc_auth.h3
-rw-r--r--contrib/tcpdump/rpc_msg.h3
-rw-r--r--contrib/tcpdump/rx.h2
-rw-r--r--contrib/tcpdump/sctpConstants.h2
-rw-r--r--contrib/tcpdump/sctpHeader.h2
-rw-r--r--contrib/tcpdump/setsignal.c2
-rw-r--r--contrib/tcpdump/setsignal.h2
-rw-r--r--contrib/tcpdump/slcompress.h2
-rw-r--r--contrib/tcpdump/slip.h2
-rw-r--r--contrib/tcpdump/sll.h6
-rw-r--r--contrib/tcpdump/smb.h2
-rw-r--r--contrib/tcpdump/smbutil.c2
-rw-r--r--contrib/tcpdump/strcasecmp.c2
-rw-r--r--contrib/tcpdump/tcp.h44
-rw-r--r--contrib/tcpdump/tcpdump-stdinc.h2
-rw-r--r--contrib/tcpdump/tcpdump.1864
-rw-r--r--contrib/tcpdump/tcpdump.c385
-rw-r--r--contrib/tcpdump/telnet.h4
-rw-r--r--contrib/tcpdump/tests/.cvsignore11
-rw-r--r--contrib/tcpdump/tests/02-sunrise-sunset-esp.puu34
-rw-r--r--contrib/tcpdump/tests/08-sunrise-sunset-aes.puu36
-rw-r--r--contrib/tcpdump/tests/08-sunrise-sunset-esp2.puu43
-rw-r--r--contrib/tcpdump/tests/alltests.sh12
-rw-r--r--contrib/tcpdump/tests/bgp_vpn_attrset.out18
-rwxr-xr-xcontrib/tcpdump/tests/bgp_vpn_attrset.sh11
-rw-r--r--contrib/tcpdump/tests/eapon1.gdbinit1
-rw-r--r--contrib/tcpdump/tests/eapon1.out114
-rw-r--r--contrib/tcpdump/tests/eapon1.puu368
-rwxr-xr-xcontrib/tcpdump/tests/eapon1.sh13
-rw-r--r--contrib/tcpdump/tests/eapon2.puu66
-rw-r--r--contrib/tcpdump/tests/esp-secrets.txt5
-rw-r--r--contrib/tcpdump/tests/esp0.out8
-rw-r--r--contrib/tcpdump/tests/esp0.sh12
-rw-r--r--contrib/tcpdump/tests/esp1.gdbinit1
-rw-r--r--contrib/tcpdump/tests/esp1.out8
-rw-r--r--contrib/tcpdump/tests/esp1.sh13
-rw-r--r--contrib/tcpdump/tests/esp2.gdbinit1
-rw-r--r--contrib/tcpdump/tests/esp2.out8
-rw-r--r--contrib/tcpdump/tests/esp2.sh13
-rw-r--r--contrib/tcpdump/tests/esp3.gdbinit1
-rw-r--r--contrib/tcpdump/tests/esp3.sh12
-rw-r--r--contrib/tcpdump/tests/esp4.gdbinit2
-rw-r--r--contrib/tcpdump/tests/esp4.sh13
-rw-r--r--contrib/tcpdump/tests/esp5.gdbinit3
-rw-r--r--contrib/tcpdump/tests/esp5.out8
-rw-r--r--contrib/tcpdump/tests/esp5.sh13
-rw-r--r--contrib/tcpdump/tests/espudp1.out8
-rw-r--r--contrib/tcpdump/tests/espudp1.puu35
-rw-r--r--contrib/tcpdump/tests/espudp1.sh13
-rw-r--r--contrib/tcpdump/tests/isakmp-delete-segfault.puu20
-rw-r--r--contrib/tcpdump/tests/isakmp-identification-segfault.puu11
-rw-r--r--contrib/tcpdump/tests/isakmp-pointer-loop.puu6
-rw-r--r--contrib/tcpdump/tests/isakmp1.out1
-rw-r--r--contrib/tcpdump/tests/isakmp1.sh12
-rw-r--r--contrib/tcpdump/tests/isakmp2.out1
-rw-r--r--contrib/tcpdump/tests/isakmp2.sh12
-rw-r--r--contrib/tcpdump/tests/isakmp3.out2
-rw-r--r--contrib/tcpdump/tests/isakmp3.sh13
-rw-r--r--contrib/tcpdump/tests/isakmp4.out35
-rw-r--r--contrib/tcpdump/tests/isakmp4.sh13
-rw-r--r--contrib/tcpdump/tests/isakmp4500.puu155
-rw-r--r--contrib/tcpdump/tests/lmp.out191
-rw-r--r--contrib/tcpdump/tests/lmp.puu42
-rwxr-xr-xcontrib/tcpdump/tests/lmp.sh14
-rw-r--r--contrib/tcpdump/tests/mpls-ldp-hello.out9
-rw-r--r--contrib/tcpdump/tests/mpls-ldp-hello.puu6
-rwxr-xr-xcontrib/tcpdump/tests/mpls-ldp-hello.sh14
-rw-r--r--contrib/tcpdump/tests/ospf-gmpls.out83
-rw-r--r--contrib/tcpdump/tests/ospf-gmpls.puu18
-rwxr-xr-xcontrib/tcpdump/tests/ospf-gmpls.sh14
-rw-r--r--contrib/tcpdump/tests/print-A.out193
-rw-r--r--contrib/tcpdump/tests/print-AA.out193
-rw-r--r--contrib/tcpdump/tests/print-X.out409
-rw-r--r--contrib/tcpdump/tests/print-XX.out419
-rw-r--r--contrib/tcpdump/tests/print-capX.out409
-rw-r--r--contrib/tcpdump/tests/print-capXX.out419
-rw-r--r--contrib/tcpdump/tests/print-flags.puu151
-rwxr-xr-xcontrib/tcpdump/tests/print-flags.sh12
-rw-r--r--contrib/tcpdump/tests/print-x.out409
-rw-r--r--contrib/tcpdump/tests/print-xx.out419
-rw-r--r--contrib/tcpdump/tftp.h4
-rw-r--r--contrib/tcpdump/timed.h9
-rw-r--r--contrib/tcpdump/token.h2
-rw-r--r--contrib/tcpdump/udp.h6
-rw-r--r--contrib/tcpdump/util.c109
-rw-r--r--contrib/tcpdump/vfprintf.c2
293 files changed, 11822 insertions, 8578 deletions
diff --git a/contrib/tcpdump/CHANGES b/contrib/tcpdump/CHANGES
index aa29e30..3f3b675 100644
--- a/contrib/tcpdump/CHANGES
+++ b/contrib/tcpdump/CHANGES
@@ -1,20 +1,36 @@
-$Header: /tcpdump/master/tcpdump/CHANGES,v 1.87.2.17 2007/09/13 13:39:44 ken Exp $
-
-Mon. September 10, 2007. ken@xelerance.com. Summary for 0.9.8 tcpdump release
- Rework ARP printer
- Rework OSPFv3 printer
- Add support for Frame-Relay ARP
- Decode DHCP Option 121 (RFC 3442 Classless Static Route)
- Decode DHCP Option 249 (MS Classless Static Route) the same as Option 121
- TLV: Add support for Juniper .pcap extensions
- Print EGP header in new-world-order style
- Converted print-isakmp.c to NETDISSECT
- Moved AF specific stuff into af.h
- Test subsystem now table driven, and saves outputs and diffs to one place
+$Header: /tcpdump/master/tcpdump/CHANGES,v 1.98.2.2 2008-10-15 23:26:30 ken Exp $
+
+Mon. October 27, 2008. ken@netfunctional.ca. Summary for 4.0.0 tcpdump release
+ Add support for Bluetooth Sniffing
+ Add support for Realtek Remote Control Protocol (openrrcp.org.ru)
+ Add support for 802.11 AVS
+ Add support for SMB over TCP
+ Add support for 4 byte BGP AS printing
+ Add support for compiling on case-insensitive file systems
+ Add support for ikev2 printing
+ Update support for decoding AFS
+ Update DHCPv6 printer
+ Use newer libpcap API's (allows -B option on all platforms)
+ Add -I to turn on monitor mode
+ Bugfixes in lldp, lspping, dccp, ESP, NFS printers
+ Cleanup unused files and various cruft
+
+Mon. September 10, 2007. ken@xelerance.com. Summary for 3.9.8 tcpdump release
+ Rework ARP printer
+ Rework OSPFv3 printer
+ Add support for Frame-Relay ARP
+ Decode DHCP Option 121 (RFC 3442 Classless Static Route)
+ Decode DHCP Option 249 (MS Classless Static Route) the same as Option 121
+ TLV: Add support for Juniper .pcap extensions
+ Print EGP header in new-world-order style
+ Converted print-isakmp.c to NETDISSECT
+ Moved AF specific stuff into af.h
+ Test subsystem now table driven, and saves outputs and diffs to one place
Require <net/pfvar.h> for pf definitions - allows reading of pflog formatted
libpcap files on an OS other than where the file was generated
-Wed. July 23, 2007. mcr@xelerance.com. Summary for 0.9.7 tcpdump release
+
+Wed. July 23, 2007. mcr@xelerance.com. Summary for 3.9.7 libpcap release
NFS: Print unsigned values as such.
RX: parse safely.
diff --git a/contrib/tcpdump/CREDITS b/contrib/tcpdump/CREDITS
index d327880..b058d67 100644
--- a/contrib/tcpdump/CREDITS
+++ b/contrib/tcpdump/CREDITS
@@ -1,147 +1,165 @@
This file lists people who have contributed to tcpdump:
The current maintainers:
- Bill Fenner <fenner@research.att.com>
- David Young <dyoung@pobox.com>
- Fulvio Risso <risso@polito.it>
- Guy Harris <guy@alum.mit.edu>
- Hannes Gredler <hannes@juniper.net>
- Jun-ichiro itojun Hagino <itojun@iijlab.net>
- Michael Richardson <mcr@sandelman.ottawa.on.ca>
+ Bill Fenner <fenner at research dot att dot com>
+ David Young <dyoung at pobox dot com>
+ Fulvio Risso <risso at polito dot it>
+ Guy Harris <guy at alum dot mit dot edu>
+ Hannes Gredler <hannes at juniper dot net>
+ Michael Richardson <mcr at sandelman dot ottawa dot on dot ca>
Additional people who have contributed patches:
- Aaron Campbell <aaron@arbor.net>
- Alfredo Andres <aandres@s21sec.com>
- Albert Chin <china@thewrittenword.com>
- Andrew Brown <atatat@atatdot.net>
- Andrew Church <andrew@users.sourceforge.net>
- Andrew Hintz <adhintz@users.sourceforge.net>
- Andrew Tridgell <tridge@linuxcare.com>
- Andy Heffernan <ahh@juniper.net>
- Arkadiusz Miskiewicz <misiek@pld.org.pl>
- Armando L. Caro Jr. <acaro@mail.eecis.udel.edu>
- Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
- Atsushi Onoe <onoe@netbsd.org>
- Ben Smithurst <ben@scientia.demon.co.uk>
- Brent L. Bates <blbates@vigyan.com>
- Brian Ginsbach <ginsbach@cray.com>
- Bruce M. Simpson <bms@spc.org>
- Carles Kishimoto Bisbe <ckishimo@ac.upc.es>
- Charlie Lenahan <clenahan@fortresstech.com>
- Charles M. Hannum <mycroft@netbsd.org>
- Chris Cogdon <chris@cogdon.org>
- Chris G. Demetriou <cgd@netbsd.org>
- Christian Sievers <c_s@users.sourceforge.net>
- Chris Jepeway <jepeway@blasted-heath.com>
- Chris Larson <clarson@kergoth.com>
- Craig Rodrigues <rodrigc@mediaone.net>
- Crist J. Clark <cjclark@alum.mit.edu>
- Daniel Hagerty <hag@ai.mit.edu>
- Darren Reed <darrenr@reed.wattle.id.au>
- David Binderman <d.binderman@virgin.net>
- David Smith <dsmith@redhat.com>
- David Young <dyoung@ojctech.com>
- Don Ebright <Don.Ebright@compuware.com>
- Eddie Kohler <xexd@sourceforge.net>
- Francis Dupont <Francis.Dupont@enst-bretagne.fr>
- Francisco Matias Cuenca-Acuna <mcuenca@george.rutgers.edu>
- Frank Volf <volf@oasis.IAEhv.nl>
- Fulvio Risso <risso@polito.it>
- George Bakos <gbakos@ists.dartmouth.edu>
- Gerald Combs <gerald@ethereal.com>
- Gert Doering <gert@greenie.muc.de>
- Greg Stark <gsstark@mit.edu>
- Gilbert Ramirez Jr. <gram@xiexie.org>
- Gisle Vanem <giva@bgnett.no>
- Hannes Viertel <hviertel@juniper.net>
- Hank Leininger <tcpdump-workers@progressive-comp.com>
- Harry Raaymakers <harryr@connect.com.au>
- Heinz-Ado Arnolds <Ado.Arnolds@dhm-systems.de>
- Hendrik Scholz <hendrik@scholz.net>
- Ian McDonald <imcdnzl@gmail.com>
- Jacek Tobiasz <Jacek.Tobiasz@atm.com.pl>
- Jakob Schlyter <jakob@openbsd.org>
- Jan Oravec <wsx@wsx6.net>
- Jason R. Thorpe <thorpej@netbsd.org>
- Jefferson Ogata <jogata@nodc.noaa.gov>
- Jeffrey Hutzelman <jhutz@cmu.edu>
- Jesper Peterson <jesper@endace.com>
- Jim Hutchins <jim@ca.sandia.gov>
- Jonathan Heusser <jonny@drugphish.ch>
- Tatuya Jinmei <jinmei@kame.net>
- Jørgen Thomsen <jth@jth.net>
- Julian Cowley <julian@lava.net>
- Kaarthik Sivakumar <kaarthik@torrentnet.com>
- Kazushi Sugyo <sugyo@pb.jp.nec.com>
- Kelly Carmichael <kcarmich@ipapp.com>
- Ken Hornstein <kenh@cmf.nrl.navy.mil>
- Kevin Steves <stevesk@pobox.com>
- Klaus Klein <kleink@reziprozitaet.de>
- Kris Kennaway <kris@freebsd.org>
- Krzysztof Halasa <khc@pm.waw.pl>
- Larry Lile <lile@stdio.com>
- Lennert Buytenhek <buytenh@gnu.org>
- Loris Degioanni <loris@netgroup-serv.polito.it>
- Love Hörnquist-Åstrand <lha@stacken.kth.se>
- Maciej W. Rozycki <macro@ds2.pg.gda.pl>
- Manu Pathak <mapathak@cisco.com>
- Marc A. Lehmann <pcg@goof.com>
- Mark Ellzey Thomas <mark@ackers.net>
- Marko Kiiskila <carnil@cs.tut.fi>
- Markus Schöpflin <schoepflin@sourceforge.net>
- Marshall Rose <mrose@dbc.mtview.ca.us>
- Martin Husemann <martin@netbsd.org>
- Max Laier <max@love2party.net>
- Michael Madore <mmadore@turbolinux.com>
- Michael Shalayeff <mickey@openbsd.org>
- Michael Shields <shields@msrl.com>
- Michael T. Stolarchuk <mts@off.to>
- Michele "mydecay" Marchetto <smarchetto1@tin.it>
- Monroe Williams <monroe@pobox.com>
- Motonori Shindo <mshindo@mshindo.net>
- Nathan J. Williams <nathanw@MIT.EDU>
- Nathaniel Couper-Noles <Nathaniel@isi1.tccisi.com>
- Neil T. Spring <bluehal@users.sourceforge.net>
- Niels Provos <provos@openbsd.org>
- Nickolai Zeldovich <kolya@MIT.EDU>
- Nicolas Ferrero <toorop@babylo.net>
- Noritoshi Demizu <demizu@users.sourceforge.net>
- Olaf Kirch <okir@caldera.de>
- Onno van der Linden <onno@simplex.nl>
- Pascal Hennequin <pascal.hennequin@int-evry.fr>
- Pasvorn Boonmark <boonmark@juniper.net>
- Paul Mundt <lethal@linux-sh.org>
- Paul S. Traina <pst@freebsd.org>
- Pavlin Radoslavov <pavlin@icir.org>
- Pekka Savola <pekkas@netcore.fi>
- Peter Fales <peter@fales-lorenz.net>
- Peter Jeremy <peter.jeremy@alcatel.com.au>
- <pfhunt@users.sourceforge.net>
- Phil Wood <cpw@lanl.gov>
- Rafal Maszkowski <rzm@icm.edu.pl>
- Raphael Raimbault <raphael.raimbault@netasq.com>
- Rick Cheng <rcheng@juniper.net>
- Rick Jones <rick.jones2@hp.com>
- Rick Watson <watsonrick@users.sourceforge.net>
- Rob Braun <bbraun@synack.net>
- Roderick Schertler <roderick@argon.org>
- Sami Farin <safari@iki.fi>
- Scott Rose <syberpunk@users.sourceforge.net>
- Sebastian Krahmer <krahmer@cs.uni-potsdam.de>
- Sebastien Vincent <svincent@idems.fr>
- Seth Webster <swebster@sst.ll.mit.edu>
- Shinsuke Suzuki <suz@kame.net>
- Steinar Haug <sthaug@nethelp.no>
- Swaminathan Chandrasekaran <chander@juniper.net>
- Takashi Yamamoto <yamt@mwd.biglobe.ne.jp>
- Terry Kennedy <terry@tmk.com>
+ Aaron Campbell <aaron at arbor dot net>
+ Alfredo Andres <aandres at s21sec dot com>
+ Albert Chin <china at thewrittenword dot com>
+ Ananth Suryanarayana <anantha at juniper dot net>
+ Andrea Bittau <a dot bittau at cs dot ucl dot ac dot uk>
+ Andrew Brown <atatat at atatdot dot net>
+ Andrew Church <andrew at users dot sourceforge dot net>
+ Andrew Hintz <adhintz at users dot sourceforge dot net>
+ Andrew Silent <andrew at nording dot ru>
+ Andrew Tridgell <tridge at linuxcare dot com>
+ Andy Heffernan <ahh at juniper dot net>
+ Arkadiusz Miskiewicz <misiek at pld dot org dot pl>
+ Armando L. Caro Jr. <acaro at mail dot eecis dot udel dot edu>
+ Arnaldo Carvalho de Melo <acme at ghostprotocols dot net>
+ Ben Byer <bushing at sourceforge dot net>
+ Atsushi Onoe <onoe at netbsd dot org>
+ Ben Smithurst <ben at scientia dot demon dot co dot uk>
+ Bjoern A. Zeeb <bzeeb at Zabbadoz dot NeT>
+ Brent L. Bates <blbates at vigyan dot com>
+ Brian Ginsbach <ginsbach at cray dot com>
+ Bruce M. Simpson <bms at spc dot org>
+ Carles Kishimoto Bisbe <ckishimo at ac dot upc dot es>
+ Charlie Lenahan <clenahan at fortresstech dot com>
+ Charles M. Hannum <mycroft at netbsd dot org>
+ Chris Cogdon <chris at cogdon dot org>
+ Chris G. Demetriou <cgd at netbsd dot org>
+ Christian Sievers <c_s at users dot sourceforge dot net>
+ Chris Jepeway <jepeway at blasted-heath dot com>
+ Chris Larson <clarson at kergoth dot com>
+ Craig Rodrigues <rodrigc at mediaone dot net>
+ Crist J. Clark <cjclark at alum dot mit dot edu>
+ Daniel Hagerty <hag at ai dot mit dot edu>
+ Darren Reed <darrenr at reed dot wattle dot id dot au>
+ David Binderman <d dot binderman at virgin dot net>
+ David Smith <dsmith at redhat dot com>
+ David Young <dyoung at ojctech dot com>
+ Don Ebright <Don dot Ebright at compuware dot com>
+ Eddie Kohler <xexd at sourceforge dot net>
+ Florent Drouin <Florent dot Drouin at alcatel-lucent dot fr>
+ Francis Dupont <Francis dot Dupont at enst-bretagne dot fr>
+ Francisco Matias Cuenca-Acuna <mcuenca at george dot rutgers dot edu>
+ Francois-Xavier Le Bail <fx dot lebail at yahoo dot com>
+ Frank Volf <volf at oasis dot IAEhv dot nl>
+ Fulvio Risso <risso at polito dot it>
+ George Bakos <gbakos at ists dot dartmouth dot edu>
+ Gerald Combs <gerald at ethereal dot com>
+ Gerrit Renker <gerrit at erg dot abdn dot ac dot uk>
+ Gert Doering <gert at greenie dot muc dot de>
+ Greg Minshall <minshall at acm dot org>
+ Greg Stark <gsstark at mit dot edu>
+ Gilbert Ramirez Jr. <gram at xiexie dot org>
+ Gisle Vanem <giva at bgnett dot no>
+ Hannes Viertel <hviertel at juniper dot net>
+ Hank Leininger <tcpdump-workers at progressive-comp dot com>
+ Harry Raaymakers <harryr at connect dot com dot au>
+ Heinz-Ado Arnolds <Ado dot Arnolds at dhm-systems dot de>
+ Hendrik Scholz <hendrik at scholz dot net>
+ Ian McDonald <imcdnzl at gmail dot com>
+ Jacek Tobiasz <Jacek dot Tobiasz at atm dot com dot pl>
+ Jakob Schlyter <jakob at openbsd dot org>
+ Jan Oravec <wsx at wsx6 dot net>
+ Jason R. Thorpe <thorpej at netbsd dot org>
+ Jefferson Ogata <jogata at nodc dot noaa dot gov>
+ Jeffrey Hutzelman <jhutz at cmu dot edu>
+ Jesper Peterson <jesper at endace dot com>
+ Jim Hutchins <jim at ca dot sandia dot gov>
+ Jonathan Heusser <jonny at drugphish dot ch>
+ Tatuya Jinmei <jinmei at kame dot net>
+ Joerg Mayer <jmayer@loplof.de>
+ Jørgen Thomsen <jth at jth dot net>
+ Julian Cowley <julian at lava dot net>
+ Kaarthik Sivakumar <kaarthik at torrentnet dot com>
+ Kazushi Sugyo <sugyo at pb dot jp dot nec dot com>
+ Kelly Carmichael <kcarmich at ipapp dot com>
+ Ken Hornstein <kenh at cmf dot nrl dot navy dot mil>
+ Kevin Steves <stevesk at pobox dot com>
+ Klaus Klein <kleink at reziprozitaet dot de>
+ Kris Kennaway <kris at freebsd dot org>
+ Krzysztof Halasa <khc at pm dot waw dot pl>
+ Larry Lile <lile at stdio dot com>
+ Lennert Buytenhek <buytenh at gnu dot org>
+ Loris Degioanni <loris at netgroup-serv dot polito dot it>
+ Love Hörnquist-Åstrand <lha at stacken dot kth dot se>
+ Luis Martin Garcia <luis dot mgarc at gmail dot com>
+ Maciej W. Rozycki <macro at ds2 dot pg dot gda dot pl>
+ Manu Pathak <mapathak at cisco dot com>
+ Marc Binderberger <mbind at sourceforge dot net>
+ Marc A. Lehmann <pcg at goof dot com>
+ Mark Ellzey Thomas <mark at ackers dot net>
+ Marko Kiiskila <carnil at cs dot tut dot fi>
+ Markus Schöpflin <schoepflin at sourceforge dot net>
+ Marshall Rose <mrose at dbc dot mtview dot ca dot us>
+ Martin Husemann <martin at netbsd dot org>
+ Max Laier <max at love2party dot net>
+ Michael A. Meffie III <meffie at sourceforge dot net>
+ Michael Madore <mmadore at turbolinux dot com>
+ Michael Shalayeff <mickey at openbsd dot org>
+ Michael Shields <shields at msrl dot com>
+ Michael T. Stolarchuk <mts at off dot to>
+ Michele "mydecay" Marchetto <smarchetto1 at tin dot it>
+ Mike Frysinger <vapier at gmail dot com>
+ Monroe Williams <monroe at pobox dot com>
+ Motonori Shindo <mshindo at mshindo dot net>
+ Nathan J. Williams <nathanw at MIT dot EDU>
+ Nathaniel Couper-Noles <Nathaniel at isi1 dot tccisi dot com>
+ Neil T. Spring <bluehal at users dot sourceforge dot net>
+ Niels Provos <provos at openbsd dot org>
+ Nickolai Zeldovich <kolya at MIT dot EDU>
+ Nicolas Ferrero <toorop at babylo dot net>
+ Noritoshi Demizu <demizu at users dot sourceforge dot net>
+ Olaf Kirch <okir at caldera dot de>
+ Onno van der Linden <onno at simplex dot nl>
+ Paolo Abeni <paolo dot abeni at email dot it>
+ Pascal Hennequin <pascal dot hennequin at int-evry dot fr>
+ Pasvorn Boonmark <boonmark at juniper dot net>
+ Paul Mundt <lethal at linux-sh dot org>
+ Paul S. Traina <pst at freebsd dot org>
+ Pavlin Radoslavov <pavlin at icir dot org>
+ Pekka Savola <pekkas at netcore dot fi>
+ Peter Fales <peter at fales-lorenz dot net>
+ Peter Jeremy <peter dot jeremy at alcatel dot com dot au>
+ <pfhunt at users dot sourceforge dot net>
+ Phil Wood <cpw at lanl dot gov>
+ Rafal Maszkowski <rzm at icm dot edu dot pl>
+ Raphael Raimbault <raphael dot raimbault at netasq dot com>
+ Rick Cheng <rcheng at juniper dot net>
+ Rick Jones <rick dot jones2 at hp dot com>
+ Rick Watson <watsonrick at users dot sourceforge dot net>
+ Rob Braun <bbraun at synack dot net>
+ Roderick Schertler <roderick at argon dot org>
+ Sagun Shakya <sagun dot shakya at sun dot com>
+ Sami Farin <safari at iki dot fi>
+ Scott Rose <syberpunk at users dot sourceforge dot net>
+ Sebastian Krahmer <krahmer at cs dot uni-potsdam dot de>
+ Sebastien Raveau <sebastien dot raveau at epita dot fr>
+ Sebastien Vincent <svincent at idems dot fr>
+ Sepherosa Ziehau <sepherosa at gmail dot com>
+ Seth Webster <swebster at sst dot ll dot mit dot edu>
+ Shinsuke Suzuki <suz at kame dot net>
+ Steinar Haug <sthaug at nethelp dot no>
+ Swaminathan Chandrasekaran <chander at juniper dot net>
+ Takashi Yamamoto <yamt at mwd dot biglobe dot ne dot jp>
+ Terry Kennedy <terry at tmk dot com>
Timo Koskiahde
- Tony Li <tli@procket.com>
- Uns Lider <unslider@miranda.org>
- Victor Oppleman <oppleman@users.sourceforge.net>
- Wesley Griffin <wgriffin@users.sourceforge.net>
- Wilbert de Graaf <wilbertdg@hetnet.nl>
+ Tony Li <tli at procket dot com>
+ Uns Lider <unslider at miranda dot org>
+ Victor Oppleman <oppleman at users dot sourceforge dot net>
+ Wesley Griffin <wgriffin at users dot sourceforge dot net>
+ Wilbert de Graaf <wilbertdg at hetnet dot nl>
+ Will Drewry <will at alum dot bu dot edu>
Yen Yen Lim
Yoshifumi Nishida
@@ -149,3 +167,6 @@ The original LBL crew:
Steve McCanne
Craig Leres
Van Jacobson
+
+Past maintainers:
+ Jun-ichiro itojun Hagino <itojun at iijlab dot net>
diff --git a/contrib/tcpdump/FILES b/contrib/tcpdump/FILES
deleted file mode 100644
index 4e2afa2..0000000
--- a/contrib/tcpdump/FILES
+++ /dev/null
@@ -1,251 +0,0 @@
-CHANGES
-CREDITS
-FILES
-INSTALL
-LICENSE
-Makefile.in
-README
-Readme.Win32
-VERSION
-acconfig.h
-aclocal.m4
-addrtoname.c
-addrtoname.h
-af.c
-af.h
-ah.h
-aodv.h
-appletalk.h
-arcnet.h
-atime.awk
-atm.h
-atmuni31.h
-bootp.h
-bpf_dump.c
-bgp.h
-chdlc.h
-config.guess
-config.h.in
-config.sub
-configure
-configure.in
-cpack.c
-cpack.h
-dccp.h
-decnet.h
-decode_prefix.h
-enc.h
-esp.h
-ether.h
-ethertype.h
-extract.h
-fddi.h
-gmpls.c
-gmpls.h
-gmt2local.c
-gmt2local.h
-icmp6.h
-ieee802_11.h
-ieee802_11_radio.h
-igrp.h
-install-sh
-interface.h
-ip.h
-ip6.h
-ipfc.h
-ipproto.c
-ipproto.h
-ipsec_doi.h
-ipx.h
-isakmp.h
-l2tp.h
-l2vpn.c
-l2vpn.h
-lane.h
-lbl/os-osf4.h
-lbl/os-solaris2.h
-lbl/os-sunos4.h
-lbl/os-ultrix4.h
-llc.h
-machdep.c
-machdep.h
-makemib
-mib.h
-missing/addrinfo.h
-missing/addrsize.h
-missing/bittypes.h
-missing/dlnames.c
-missing/datalinks.c
-missing/getaddrinfo.c
-missing/getnameinfo.c
-missing/inet_aton.c
-missing/inet_ntop.c
-missing/inet_pton.c
-missing/resolv6.h
-missing/resolv_ext.h
-missing/snprintf.c
-missing/sockstorage.h
-missing/strdup.c
-missing/strlcat.c
-missing/strlcpy.c
-missing/strsep.c
-mkdep
-mpls.h
-nameser.h
-netbios.h
-netdissect.h
-nfs.h
-nfsfh.h
-nlpid.c
-nlpid.h
-ntp.h
-oakley.h
-ospf.h
-ospf6.h
-oui.c
-oui.h
-packetdat.awk
-parsenfsfh.c
-pcap_dump_ftell.c
-pcap-missing.h
-pmap_prot.h
-ppp.h
-print-802_11.c
-print-ah.c
-print-aodv.c
-print-ap1394.c
-print-arcnet.c
-print-arp.c
-print-ascii.c
-print-atalk.c
-print-atm.c
-print-beep.c
-print-bfd.c
-print-bgp.c
-print-bootp.c
-print-cdp.c
-print-chdlc.c
-print-cip.c
-print-cnfp.c
-print-dccp.c
-print-decnet.c
-print-dhcp6.c
-print-domain.c
-print-dvmrp.c
-print-eap.c
-print-egp.c
-print-enc.c
-print-esp.c
-print-eigrp.c
-print-ether.c
-print-fddi.c
-print-fr.c
-print-frag6.c
-print-gre.c
-print-hsrp.c
-print-icmp.c
-print-icmp6.c
-print-igmp.c
-print-igrp.c
-print-ip.c
-print-ip6.c
-print-ip6opts.c
-print-ipcomp.c
-print-ipfc.c
-print-ipx.c
-print-isakmp.c
-print-isoclns.c
-print-juniper.c
-print-krb.c
-print-l2tp.c
-print-lane.c
-print-ldp.c
-print-llc.c
-print-lmp.c
-print-lspping.c
-print-lwres.c
-print-mobile.c
-print-mobility.c
-print-mpls.c
-print-msdp.c
-print-netbios.c
-print-nfs.c
-print-ntp.c
-print-null.c
-print-olsr.c
-print-ospf.c
-print-ospf6.c
-print-pflog.c
-print-pgm.c
-print-pim.c
-print-ppp.c
-print-pppoe.c
-print-pptp.c
-print-radius.c
-print-raw.c
-print-rip.c
-print-ripng.c
-print-rsvp.c
-print-rt6.c
-print-rx.c
-print-sctp.c
-print-sip.c
-print-sl.c
-print-sll.c
-print-slow.c
-print-smb.c
-print-snmp.c
-print-stp.c
-print-sunatm.c
-print-sunrpc.c
-print-symantec.c
-print-syslog.c
-print-tcp.c
-print-telnet.c
-print-tftp.c
-print-timed.c
-print-token.c
-print-udp.c
-print-vjc.c
-print-vrrp.c
-print-wb.c
-print-zephyr.c
-route6d.h
-rpc_auth.h
-rpc_msg.h
-rx.h
-sctpConstants.h
-sctpHeader.h
-send-ack.awk
-setsignal.c
-setsignal.h
-slcompress.h
-slip.h
-sll.h
-smb.h
-smbutil.c
-stime.awk
-strcasecmp.c
-tcp.h
-tcpdump.1
-tcpdump.c
-tcpdump-stdinc.h
-telnet.h
-tftp.h
-timed.h
-token.h
-udp.h
-util.c
-vfprintf.c
-win32/Include/Arpa/tftp.h
-win32/Include/errno.h
-win32/Include/getopt.h
-win32/Include/inetprivate.h
-win32/Include/telnet.h
-win32/Include/w32_fzs.h
-win32/Include/Netinet/in_systm.h
-win32/Include/Netinet/ip.h
-win32/Src/getopt.c
-win32/prj/GNUmakefile
-win32/prj/WinDump.dsp
-win32/prj/WinDump.dsw
diff --git a/contrib/tcpdump/INSTALL b/contrib/tcpdump/INSTALL.txt
index 745997f..e263f53 100644
--- a/contrib/tcpdump/INSTALL
+++ b/contrib/tcpdump/INSTALL.txt
@@ -1,4 +1,4 @@
-@(#) $Header: /tcpdump/master/tcpdump/INSTALL,v 1.63.2.7 2007/09/14 01:03:12 guy Exp $ (LBL)
+@(#) $Header: /tcpdump/master/tcpdump/INSTALL.txt,v 1.1.2.1 2008-02-06 10:49:22 guy Exp $ (LBL)
If you have not built libpcap, and your system does not have libpcap
installed, install libpcap first. Your system might provide a version
@@ -43,7 +43,7 @@ FILES
CHANGES - description of differences between releases
CREDITS - people that have helped tcpdump along
FILES - list of files exported as part of the distribution
-INSTALL - this file
+INSTALL.txt - this file
LICENSE - the license under which tcpdump is distributed
Makefile.in - compilation rules (input to the configure script)
README - description of distribution
@@ -140,9 +140,10 @@ print-arp.c - Address Resolution Protocol printer routines
print-ascii.c - ASCII packet dump routines
print-atalk.c - AppleTalk printer routines
print-atm.c - ATM printer routines
+print-beep.c - BEEP printer routines
print-bgp.c - Border Gateway Protocol printer routines
print-bootp.c - BOOTP and IPv4 DHCP printer routines
-print-beep.c - BEEP printer routines
+print-bt.c - Bluetooth printer routines
print-cdp.c - Cisco Discovery Protocol printer routines
print-chdlc.c - Cisco HDLC printer routines
print-cip.c - Classical-IP over ATM routines
@@ -199,6 +200,7 @@ print-radius.c - Radius protocol printer routines
print-raw.c - Raw IP printer routines
print-rip.c - Routing Information Protocol printer routines
print-ripng.c - IPv6 Routing Information Protocol printer routines
+print-rrcp.c - Realtek Remote Control Protocol routines
print-rsvp.c - Resource reSerVation Protocol (RSVP) printer routines
print-rt6.c - IPv6 routing header printer routines
print-rx.c - AFS RX printer routines
diff --git a/contrib/tcpdump/Makefile-devel-adds b/contrib/tcpdump/Makefile-devel-adds
deleted file mode 100644
index 512a119..0000000
--- a/contrib/tcpdump/Makefile-devel-adds
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Auto-regenerate configure script or Makefile when things change.
-# From autoconf.info . Works best with GNU Make.
-#
-${srcdir}/configure: configure.in
- cd ${srcdir} && autoconf
-
-# autoheader might not change config.h.in, so touch a stamp file.
-${srcdir}/config.h.in: ${srcdir}/stamp-h.in
-${srcdir}/stamp-h.in: configure.in acconfig.h
- cd ${srcdir} && autoheader
- echo timestamp > ${srcdir}/stamp-h.in
-
-config.h: stamp-h
-stamp-h: ${srcdir}/config.h.in config.status
- ./config.status
-
-Makefile: Makefile.in config.status
- ./config.status
-
-config.status: ${srcdir}/configure
- ./config.status --recheck
diff --git a/contrib/tcpdump/Makefile.in b/contrib/tcpdump/Makefile.in
index dcc8f40..e28e186 100644
--- a/contrib/tcpdump/Makefile.in
+++ b/contrib/tcpdump/Makefile.in
@@ -17,7 +17,7 @@
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.293.2.7 2007/09/12 19:48:50 guy Exp $ (LBL)
+# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.317.2.4 2008-05-27 07:14:26 guy Exp $ (LBL)
#
# Various configurable paths (remember to edit Makefile.in, not Makefile)
@@ -57,6 +57,7 @@ LIBS = @LIBS@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
+RANLIB = @RANLIB@
# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
# Also, gcc does not remove the .o before forking 'as', which can be a
@@ -65,45 +66,122 @@ INSTALL_DATA = @INSTALL_DATA@
@rm -f $@
$(CC) $(CFLAGS) -c $(srcdir)/$*.c
-CSRC = addrtoname.c af.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \
+CSRC = addrtoname.c af.c checksum.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \
nlpid.c l2vpn.c machdep.c parsenfsfh.c \
print-802_11.c print-ap1394.c print-ah.c print-arcnet.c \
print-aodv.c print-arp.c print-ascii.c print-atalk.c print-atm.c \
- print-beep.c print-bfd.c print-bgp.c print-bootp.c print-cdp.c \
- print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c \
- print-domain.c print-dvmrp.c print-enc.c print-egp.c \
+ print-beep.c print-bfd.c print-bgp.c print-bootp.c print-bt.c \
+ print-cdp.c print-cfm.c print-chdlc.c print-cip.c print-cnfp.c \
+ print-dccp.c print-decnet.c \
+ print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \
print-eap.c print-eigrp.c\
print-esp.c print-ether.c print-fddi.c print-fr.c \
print-gre.c print-hsrp.c print-icmp.c print-igmp.c \
print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c \
- print-ipx.c print-isakmp.c print-isoclns.c print-juniper.c print-krb.c \
- print-l2tp.c print-lane.c print-ldp.c print-llc.c \
- print-lmp.c print-lspping.c \
- print-lwres.c print-mobile.c print-mpls.c print-msdp.c \
+ print-ipx.c print-isoclns.c print-juniper.c print-krb.c \
+ print-l2tp.c print-lane.c print-ldp.c print-lldp.c print-llc.c \
+ print-lmp.c print-lspping.c print-lwapp.c \
+ print-lwres.c print-mobile.c print-mpcp.c print-mpls.c print-msdp.c \
print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \
- print-pgm.c print-pim.c print-ppp.c print-pppoe.c \
- print-pptp.c print-radius.c print-raw.c print-rip.c \
- print-rsvp.c print-rx.c print-sctp.c print-sip.c print-sl.c print-sll.c \
+ print-pgm.c print-pim.c print-ppp.c print-pppoe.c print-pptp.c \
+ print-radius.c print-raw.c print-rip.c print-rrcp.c print-rsvp.c \
+ print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \
print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \
print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \
- print-timed.c print-token.c print-udp.c print-vjc.c print-vrrp.c \
+ print-timed.c print-token.c print-udld.c print-udp.c \
+ print-vjc.c print-vqp.c print-vrrp.c print-vtp.c \
print-wb.c print-zephyr.c setsignal.c tcpdump.c util.c
+LIBNETDISSECT_SRC=print-isakmp.c
+LIBNETDISSECT_OBJ=$(LIBNETDISSECT_SRC:.c=.o)
+LIBNETDISSECT=libnetdissect.a
+
LOCALSRC = @LOCALSRC@
GENSRC = version.c
LIBOBJS = @LIBOBJS@
-SRC = $(CSRC) $(GENSRC) $(LOCALSRC)
+SRC = $(CSRC) $(GENSRC) $(LOCALSRC) $(LIBNETDISSECT_SRC)
# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
# hack the extra indirection
-OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS)
-HDR = addrtoname.h appletalk.h bootp.h cpack.h dccp.h decnet.h \
- ethertype.h extract.h fddi.h gmt2local.h igrp.h interface.h \
- ipx.h llc.h machdep.h mib.h nfsfh.h nfsv2.h ntp.h ospf.h \
+OBJ = $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS) $(LIBNETDISSECT_OBJ)
+HDR = \
+ acconfig.h \
+ addrtoname.h \
+ af.h \
+ ah.h \
+ aodv.h \
+ appletalk.h \
+ arcnet.h \
+ atm.h \
+ atmuni31.h \
+ bootp.h \
+ bgp.h \
+ chdlc.h \
+ cpack.h \
+ dccp.h \
+ decnet.h \
+ decode_prefix.h \
+ enc.h \
+ esp.h \
+ ether.h \
+ ethertype.h \
+ extract.h \
+ fddi.h \
+ gmpls.h \
+ gmt2local.h \
+ icmp6.h \
+ ieee802_11.h \
+ ieee802_11_radio.h \
+ igrp.h \
+ interface.h \
+ interface.h \
+ ip.h \
+ ip6.h \
+ ipfc.h \
+ ipproto.h \
+ ipsec_doi.h \
+ ipx.h \
+ isakmp.h \
+ l2tp.h \
+ l2vpn.h \
+ lane.h \
+ llc.h \
+ machdep.h \
+ mib.h \
+ mpls.h \
+ nameser.h \
+ netbios.h \
+ netdissect.h \
+ nfs.h \
+ nfsfh.h \
+ nlpid.h \
+ ntp.h \
+ oakley.h \
+ ospf.h \
+ ospf6.h \
+ oui.h \
+ pcap-missing.h \
+ pmap_prot.h \
+ ppp.h \
+ route6d.h \
+ rpc_auth.h \
+ rpc_msg.h \
+ rx.h \
+ sctpConstants.h \
+ sctpHeader.h \
setsignal.h \
- gnuc.h ipsec_doi.h isakmp.h l2tp.h nameser.h \
- netbios.h oakley.h ospf6.h pf.h ppp.h route6d.h
+ slcompress.h \
+ slip.h \
+ sll.h \
+ smb.h \
+ tcp.h \
+ tcpdump-stdinc.h \
+ telnet.h \
+ tftp.h \
+ timed.h \
+ token.h \
+ udp.h
TAGHDR = \
/usr/include/arpa/tftp.h \
@@ -120,12 +198,92 @@ TAGFILES = $(SRC) $(HDR) $(TAGHDR)
CLEANFILES = $(PROG) $(OBJ) $(GENSRC)
+EXTRA_DIST = \
+ CHANGES \
+ CREDITS \
+ INSTALL.txt \
+ LICENSE \
+ Makefile.in \
+ README \
+ Readme.Win32 \
+ VERSION \
+ aclocal.m4 \
+ atime.awk \
+ bpf_dump.c \
+ config.guess \
+ config.h.in \
+ config.sub \
+ configure \
+ configure.in \
+ install-sh \
+ lbl/os-osf4.h \
+ lbl/os-solaris2.h \
+ lbl/os-sunos4.h \
+ lbl/os-ultrix4.h \
+ makemib \
+ missing/addrinfo.h \
+ missing/addrsize.h \
+ missing/bittypes.h \
+ missing/dlnames.c \
+ missing/datalinks.c \
+ missing/getaddrinfo.c \
+ missing/getnameinfo.c \
+ missing/inet_aton.c \
+ missing/inet_ntop.c \
+ missing/inet_pton.c \
+ missing/resolv6.h \
+ missing/resolv_ext.h \
+ missing/snprintf.c \
+ missing/sockstorage.h \
+ missing/strdup.c \
+ missing/strlcat.c \
+ missing/strlcpy.c \
+ missing/strsep.c \
+ mkdep \
+ packetdat.awk \
+ pcap_dump_ftell.c \
+ print-dhcp6.c \
+ print-frag6.c \
+ print-icmp6.c \
+ print-ip6.c \
+ print-ip6opts.c \
+ print-mobility.c \
+ print-netbios.c \
+ print-ospf6.c \
+ print-pflog.c \
+ print-ripng.c \
+ print-rt6.c \
+ print-smb.c \
+ send-ack.awk \
+ smbutil.c \
+ stime.awk \
+ strcasecmp.c \
+ tcpdump.1 \
+ vfprintf.c \
+ win32/Include/Arpa/tftp.h \
+ win32/Include/errno.h \
+ win32/Include/getopt.h \
+ win32/Include/inetprivate.h \
+ win32/Include/telnet.h \
+ win32/Include/w32_fzs.h \
+ win32/Include/Netinet/in_systm.h \
+ win32/Include/Netinet/ip.h \
+ win32/Src/getopt.c \
+ win32/prj/GNUmakefile \
+ win32/prj/WinDump.dsp \
+ win32/prj/WinDump.dsw
+
all: $(PROG)
$(PROG): $(OBJ) @V_PCAPDEP@
@rm -f $@
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
+$(LIBNETDISSECT): $(LIBNETDISSECT_OBJ)
+ @rm -f $@
+ $(AR) cr $@ $(LIBNETDISSECT_OBJ)
+ $(RANLIB) $@
+
datalinks.o: $(srcdir)/missing/datalinks.c
$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
dlnames.o: $(srcdir)/missing/dlnames.c
@@ -154,12 +312,20 @@ version.o: version.c
version.c: $(srcdir)/VERSION
@rm -f $@
- sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
+ if grep CVS ${srcdir}/VERSION >/dev/null; then \
+ read ver <${srcdir}/VERSION; \
+ echo $$ver | tr -d '\012'; \
+ date +_%Y_%m_%d; \
+ else \
+ cat ${srcdir}/VERSION; \
+ fi | sed -e 's/.*/char version[] = "&";/' > $@
+
-install:
+install: all
[ -d $(DESTDIR)$(sbindir) ] || \
(mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
$(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
+ $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG).`cat ${srcdir}/VERSION`
[ -d $(DESTDIR)$(mandir)/man1 ] || \
(mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
$(INSTALL_DATA) $(srcdir)/$(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
@@ -183,10 +349,15 @@ distclean:
tags: $(TAGFILES)
ctags -wtd $(TAGFILES)
+TAGS: $(TAGFILES)
+ etags $(TAGFILES)
+
releasetar:
@cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
- list="" ; make distclean; cd ..; mkdir -p n; cd n; ln -s ../$$dir $$name; \
- tar -c -z -f $$name.tar.gz $$name/. ;
+ mkdir $$name; \
+ tar cf - $(CSRC) $(HDR) $(LIBNETDISSECT_SRC) $(EXTRA_DIST) | (cd $$name; tar xf -); \
+ tar -c -z -f $$name.tar.gz $$name; \
+ rm -rf $$name
depend: $(GENSRC)
${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
diff --git a/contrib/tcpdump/PLATFORMS b/contrib/tcpdump/PLATFORMS
deleted file mode 100644
index 2e1aedf..0000000
--- a/contrib/tcpdump/PLATFORMS
+++ /dev/null
@@ -1,9 +0,0 @@
-== Tested platforms ==
-NetBSD 1.5/i386 (mcr - 2002/1/1)
-Debian Linux (woody/i386) (mcr - 2002/1/1)
-
----
-RedHat Linux 6.1/i386 (assar)
-FreeBSD 2.2.8/i386 (itojun)
-
-
diff --git a/contrib/tcpdump/README b/contrib/tcpdump/README
index cb51d30..c2b6760 100644
--- a/contrib/tcpdump/README
+++ b/contrib/tcpdump/README
@@ -1,10 +1,11 @@
-@(#) $Header: /tcpdump/master/tcpdump/README,v 1.65.2.1 2007/09/14 01:03:12 guy Exp $ (LBL)
+@(#) $Header: /tcpdump/master/tcpdump/README,v 1.66.2.1 2008-05-30 01:38:20 guy Exp $ (LBL)
TCPDUMP 3.9
Now maintained by "The Tcpdump Group"
See www.tcpdump.org
-Please send inquiries/comments/reports to tcpdump-workers@tcpdump.org
+Please send inquiries/comments/reports to:
+ tcpdump-workers@lists.tcpdump.org
Anonymous CVS is available via:
cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master login
@@ -68,15 +69,14 @@ trace files. See the above distribution for further details and
documentation.
Problems, bugs, questions, desirable enhancements, etc. should be sent
-to the address "tcpdump-workers@tcpdump.org". Bugs, support requests,
-and feature requests may also be submitted on the SourceForge site for
-tcpdump at
+to the address "tcpdump-workers@lists.tcpdump.org". Bugs, support
+requests, and feature requests may also be submitted on the SourceForge
+site for tcpdump at
http://sourceforge.net/projects/tcpdump/
Source code contributions, etc. should be sent to the email address
-"patches@tcpdump.org", or submitted as patches on the SourceForge site
-for tcpdump.
+submitted as patches on the SourceForge site for tcpdump.
Current versions can be found at www.tcpdump.org, or the SourceForge
site for tcpdump.
diff --git a/contrib/tcpdump/Readme.Win32 b/contrib/tcpdump/Readme.Win32
deleted file mode 100644
index fdf8b12..0000000
--- a/contrib/tcpdump/Readme.Win32
+++ /dev/null
@@ -1,24 +0,0 @@
-To build tcpdump under Windows, you need:
-
-- version 6 (or higher) of Microsoft Visual Studio or the Cygnus gnu
-C compiler.
-- The November 2001 (or later) edition of Microsoft Platform
-Software Development Kit (SDK), that contains some necessary includes
-for IPv6 support. You can download it from http://www.microsoft.com/sdk
-- the WinPcap source code, that includes libpcap for win32. Download it
-from http://winpcap.polito.it or download libpcap sources from
-http://www.tcpdump.org and follow the instructions in the README.Win32
-file.
-
-First, extract tcpdump and WinPcap in the same folder, and build WinPcap.
-
-The Visual Studio project and the cygwin makefile are in the Win32\prj
-folder.
-
-From Visual Studio, open windump.dsw and build the program. The release
-version of the WinDump.exe executable file will be created in the
-windump\win32\prj\release directory . The debug version will be generated
-in windump\win32\prj\debug.
-
-From cygnus, go to windump\win32\prj\ and type "make". WinDump.exe will be
-created in the same directory. \ No newline at end of file
diff --git a/contrib/tcpdump/TODO b/contrib/tcpdump/TODO
deleted file mode 100644
index 12c8b3f..0000000
--- a/contrib/tcpdump/TODO
+++ /dev/null
@@ -1,6 +0,0 @@
-1. update credits
-2. review "FILES"
-3. search for version info
-4. get PLATFORMS filled in
-5. update CHANGES file
-6. do same for libpcap
diff --git a/contrib/tcpdump/VERSION b/contrib/tcpdump/VERSION
index 26cb485..fcdb2e1 100644
--- a/contrib/tcpdump/VERSION
+++ b/contrib/tcpdump/VERSION
@@ -1 +1 @@
-3.9.8
+4.0.0
diff --git a/contrib/tcpdump/addrtoname.c b/contrib/tcpdump/addrtoname.c
index db9a93c..0540343 100644
--- a/contrib/tcpdump/addrtoname.c
+++ b/contrib/tcpdump/addrtoname.c
@@ -25,7 +25,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.108.2.9 2007/09/14 00:26:18 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.119 2007-08-08 14:06:34 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -81,7 +81,6 @@ extern int ether_ntohost(char *, const struct ether_addr *);
*/
#define HASHNAMESIZE 4096
-#define BUFSIZE 128
struct hnamemem {
u_int32_t addr;
@@ -511,14 +510,19 @@ etheraddr_string(register const u_char *ep)
}
const char *
-linkaddr_string(const u_char *ep, const unsigned int len)
+linkaddr_string(const u_char *ep, const unsigned int type, const unsigned int len)
{
register u_int i;
register char *cp;
register struct enamemem *tp;
- if (len == ETHER_ADDR_LEN) /* XXX not totally correct... */
- return etheraddr_string(ep);
+ if (type == LINKADDR_ETHER && len == ETHER_ADDR_LEN) {
+ return etheraddr_string(ep);
+ }
+
+ if (type == LINKADDR_FRELAY) {
+ return q922_string(ep);
+ }
tp = lookup_bytestring(ep, len);
if (tp->e_name)
diff --git a/contrib/tcpdump/addrtoname.h b/contrib/tcpdump/addrtoname.h
index 67ded6e..1df204a9 100644
--- a/contrib/tcpdump/addrtoname.h
+++ b/contrib/tcpdump/addrtoname.h
@@ -18,12 +18,21 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/addrtoname.h,v 1.18 2001/09/17 21:57:51 fenner Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/addrtoname.h,v 1.20 2007-08-08 14:06:34 hannes Exp $ (LBL)
*/
/* Name to address translation routines. */
-extern const char *linkaddr_string(const u_char *, const unsigned int);
+enum {
+ LINKADDR_ETHER,
+ LINKADDR_FRELAY,
+ LINKADDR_IEEE1394,
+ LINKADDR_ATM
+};
+
+#define BUFSIZE 128
+
+extern const char *linkaddr_string(const u_char *, const unsigned int, const unsigned int);
extern const char *etheraddr_string(const u_char *);
extern const char *etherproto_string(u_short);
extern const char *tcpport_string(u_short);
diff --git a/contrib/tcpdump/af.c b/contrib/tcpdump/af.c
index 76d6178..e3c77bf 100644
--- a/contrib/tcpdump/af.c
+++ b/contrib/tcpdump/af.c
@@ -17,7 +17,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/af.c,v 1.3.2.1 2007/02/26 13:33:17 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/af.c,v 1.3 2006-03-23 14:58:44 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/af.h b/contrib/tcpdump/af.h
index 1ba7662..c036cef 100644
--- a/contrib/tcpdump/af.h
+++ b/contrib/tcpdump/af.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/af.h,v 1.3.2.1 2007/02/26 13:33:17 hannes Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/af.h,v 1.3 2006-03-23 14:58:44 hannes Exp $ (LBL) */
/*
* Copyright (c) 1998-2006 The TCPDUMP project
diff --git a/contrib/tcpdump/aodv.h b/contrib/tcpdump/aodv.h
index 335c175..456ec8b 100644
--- a/contrib/tcpdump/aodv.h
+++ b/contrib/tcpdump/aodv.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/aodv.h,v 1.3 2003/09/13 01:34:42 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/aodv.h,v 1.3 2003-09-13 01:34:42 guy Exp $ (LBL) */
/*
* Copyright (c) 2003 Bruce M. Simpson <bms@spc.org>
* All rights reserved.
diff --git a/contrib/tcpdump/appletalk.h b/contrib/tcpdump/appletalk.h
index 67e62ef..ff972f6 100644
--- a/contrib/tcpdump/appletalk.h
+++ b/contrib/tcpdump/appletalk.h
@@ -20,7 +20,7 @@
*
* AppleTalk protocol formats (courtesy Bill Croft of Stanford/SUMEX).
*
- * @(#) $Header: /tcpdump/master/tcpdump/appletalk.h,v 1.16 2004/05/01 09:41:50 hannes Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/appletalk.h,v 1.16 2004-05-01 09:41:50 hannes Exp $ (LBL)
*/
struct LAP {
diff --git a/contrib/tcpdump/arcnet.h b/contrib/tcpdump/arcnet.h
index 6e649f6..3b60956 100644
--- a/contrib/tcpdump/arcnet.h
+++ b/contrib/tcpdump/arcnet.h
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#) $Id: arcnet.h,v 1.3 2003/01/23 09:05:37 guy Exp $ (LBL)
+ * @(#) $Id: arcnet.h,v 1.3 2003-01-23 09:05:37 guy Exp $ (LBL)
*
* from: NetBSD: if_arc.h,v 1.13 1999/11/19 20:41:19 thorpej Exp
*/
diff --git a/contrib/tcpdump/atm.h b/contrib/tcpdump/atm.h
index c6ac53e..65ac5c1 100644
--- a/contrib/tcpdump/atm.h
+++ b/contrib/tcpdump/atm.h
@@ -14,7 +14,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/atm.h,v 1.1.4.1 2005/06/20 07:45:05 hannes Exp $
+ * @(#) $Header: /tcpdump/master/tcpdump/atm.h,v 1.3 2006-02-08 01:43:00 hannes Exp $
*/
/*
@@ -30,3 +30,4 @@
*/
#define ATM_OAM_NOHEC 0
#define ATM_OAM_HEC 1
+#define ATM_HDR_LEN_NOHEC 4
diff --git a/contrib/tcpdump/atmuni31.h b/contrib/tcpdump/atmuni31.h
index 304859a..32acfb1 100644
--- a/contrib/tcpdump/atmuni31.h
+++ b/contrib/tcpdump/atmuni31.h
@@ -29,18 +29,18 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/atmuni31.h,v 1.2 2002/08/05 07:47:23 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/atmuni31.h,v 1.2.6.1 2007-10-22 19:39:12 guy Exp $ (LBL)
*/
/* Based on UNI3.1 standard by ATM Forum */
/* ATM traffic types based on VPI=0 and (the following VCI */
-#define PPC 0x05 /* Point-to-point signal msg */
-#define BCC 0x02 /* Broadcast signal msg */
-#define OAMF4SC 0x03 /* Segment OAM F4 flow cell */
-#define OAMF4EC 0x04 /* End-to-end OAM F4 flow cell */
-#define METAC 0x01 /* Meta signal msg */
-#define ILMIC 0x10 /* ILMI msg */
+#define VCI_PPC 0x05 /* Point-to-point signal msg */
+#define VCI_BCC 0x02 /* Broadcast signal msg */
+#define VCI_OAMF4SC 0x03 /* Segment OAM F4 flow cell */
+#define VCI_OAMF4EC 0x04 /* End-to-end OAM F4 flow cell */
+#define VCI_METAC 0x01 /* Meta signal msg */
+#define VCI_ILMIC 0x10 /* ILMI msg */
/* Q.2931 signalling messages */
#define CALL_PROCEED 0x02 /* call proceeding */
diff --git a/contrib/tcpdump/bgp.h b/contrib/tcpdump/bgp.h
index 06be3ea..5081596 100755
--- a/contrib/tcpdump/bgp.h
+++ b/contrib/tcpdump/bgp.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/bgp.h,v 1.3 2004/06/16 08:45:15 hannes Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/bgp.h,v 1.3 2004-06-16 08:45:15 hannes Exp $ (LBL) */
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
diff --git a/contrib/tcpdump/bootp.h b/contrib/tcpdump/bootp.h
index 7c63d0c..8f61b13 100644
--- a/contrib/tcpdump/bootp.h
+++ b/contrib/tcpdump/bootp.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.15.4.3 2007/08/21 22:02:08 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.18 2007-08-21 21:59:11 guy Exp $ (LBL) */
/*
* Bootstrap Protocol (BOOTP). RFC951 and RFC1048.
*
diff --git a/contrib/tcpdump/bpf_dump.c b/contrib/tcpdump/bpf_dump.c
index 0cad4d9..f509b7e 100644
--- a/contrib/tcpdump/bpf_dump.c
+++ b/contrib/tcpdump/bpf_dump.c
@@ -20,7 +20,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/bpf_dump.c,v 1.16 2003/11/16 09:36:08 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/bpf_dump.c,v 1.16.4.1 2008-02-14 20:54:53 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -35,7 +35,7 @@ static const char rcsid[] _U_ =
#include "interface.h"
void
-bpf_dump(struct bpf_program *p, int option)
+bpf_dump(const struct bpf_program *p, int option)
{
struct bpf_insn *insn;
int i;
diff --git a/contrib/tcpdump/chdlc.h b/contrib/tcpdump/chdlc.h
index 4fb6e1d..d117263 100644
--- a/contrib/tcpdump/chdlc.h
+++ b/contrib/tcpdump/chdlc.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/chdlc.h,v 1.1 2000/09/18 05:11:43 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/chdlc.h,v 1.1 2000-09-18 05:11:43 guy Exp $ (LBL) */
/*
* Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997
* The Regents of the University of California. All rights reserved.
diff --git a/contrib/tcpdump/checksum.c b/contrib/tcpdump/checksum.c
new file mode 100644
index 0000000..f441be3
--- /dev/null
+++ b/contrib/tcpdump/checksum.c
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 1998-2006 The TCPDUMP project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * miscellaneous checksumming routines
+ *
+ * Original code by Hannes Gredler (hannes@juniper.net)
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+ "@(#) $Header: /tcpdump/master/tcpdump/checksum.c,v 1.4 2006-09-25 09:23:32 hannes Exp $";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "interface.h"
+
+#define CRC10_POLYNOMIAL 0x633
+static u_int16_t crc10_table[256];
+
+static void
+init_crc10_table(void)
+{
+ register int i, j;
+ register u_int16_t accum;
+
+ for ( i = 0; i < 256; i++ )
+ {
+ accum = ((unsigned short) i << 2);
+ for ( j = 0; j < 8; j++ )
+ {
+ if ((accum <<= 1) & 0x400) accum ^= CRC10_POLYNOMIAL;
+ }
+ crc10_table[i] = accum;
+ }
+ return;
+}
+
+u_int16_t
+verify_crc10_cksum(u_int16_t accum, const u_char *p, int length)
+{
+ register int i;
+
+ for ( i = 0; i < length; i++ )
+ {
+ accum = ((accum << 8) & 0x3ff)
+ ^ crc10_table[( accum >> 2) & 0xff]
+ ^ *p++;
+ }
+ return accum;
+}
+
+/* precompute checksum tables */
+void
+init_checksum(void) {
+
+ init_crc10_table();
+
+}
+
+/*
+ * Creates the OSI Fletcher checksum. See 8473-1, Appendix C, section C.3.
+ * The checksum field of the passed PDU does not need to be reset to zero.
+ */
+u_int16_t
+create_osi_cksum (const u_int8_t *pptr, int checksum_offset, int length)
+{
+
+ int x;
+ int y;
+ u_int32_t mul;
+ u_int32_t c0;
+ u_int32_t c1;
+ u_int16_t checksum;
+ int index;
+
+ checksum = 0;
+
+ c0 = 0;
+ c1 = 0;
+
+ for (index = 0; index < length; index++) {
+ /*
+ * Ignore the contents of the checksum field.
+ */
+ if (index == checksum_offset ||
+ index == checksum_offset+1) {
+ c1 += c0;
+ pptr++;
+ } else {
+ c0 = c0 + *(pptr++);
+ c1 += c0;
+ }
+ }
+
+ c0 = c0 % 255;
+ c1 = c1 % 255;
+
+ mul = (length - checksum_offset)*(c0);
+
+ x = mul - c0 - c1;
+ y = c1 - mul - 1;
+
+ if ( y >= 0 ) y++;
+ if ( x < 0 ) x--;
+
+ x %= 255;
+ y %= 255;
+
+
+ if (x == 0) x = 255;
+ if (y == 0) y = 255;
+
+ y &= 0x00FF;
+ checksum = ((x << 8) | y);
+
+ return checksum;
+}
diff --git a/contrib/tcpdump/config.h.in b/contrib/tcpdump/config.h.in
index 86ffe06..085cc93 100644
--- a/contrib/tcpdump/config.h.in
+++ b/contrib/tcpdump/config.h.in
@@ -187,9 +187,15 @@
/* Define to 1 if you have the <openssl/evp.h> header file. */
#undef HAVE_OPENSSL_EVP_H
+/* Define to 1 if you have the <pcap/bluetooth.h> header file. */
+#undef HAVE_PCAP_BLUETOOTH_H
+
/* Define to 1 if you have the `pcap_breakloop' function. */
#undef HAVE_PCAP_BREAKLOOP
+/* Define to 1 if you have the `pcap_create' function. */
+#undef HAVE_PCAP_CREATE
+
/* Define to 1 if you have the `pcap_dump_flush' function. */
#undef HAVE_PCAP_DUMP_FLUSH
diff --git a/contrib/tcpdump/configure b/contrib/tcpdump/configure
index 2494df5..f4b7754 100755
--- a/contrib/tcpdump/configure
+++ b/contrib/tcpdump/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 1.188.2.8 .
+# From configure.in Revision: 1.196.2.6 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61.
#
@@ -671,6 +671,7 @@ CPP
GREP
EGREP
LIBOBJS
+RANLIB
V_CCOPT
V_DEFS
V_GROUP
@@ -1274,7 +1275,8 @@ Optional Packages:
--without-gcc don't use gcc
--with-user=USERNAME drop privileges by default to USERNAME
--with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY
- --without-crypto disable crypto support
+ --with-crypto[=PATH] use SSLeay libcrypto (located in directory PATH, if
+ supplied). [default=yes, if available]
Some influential environment variables:
CC C compiler command
@@ -4035,7 +4037,7 @@ fi
done
-if test "$ac_cv_header_net_pfvar_h" == yes; then
+if test "$ac_cv_header_net_pfvar_h" = yes; then
LOCALSRC="print-pflog.c $LOCALSRC"
fi
@@ -9362,7 +9364,7 @@ fi
echo "$as_me: error: see the INSTALL doc for more info" >&2;}
{ (exit 1); exit 1; }; }
fi
- { echo "$as_me:$LINENO: checking for extraneous pcap header directories" >&5
+ { echo "$as_me:$LINENO: checking for extraneous pcap header directories" >&5
echo $ECHO_N "checking for extraneous pcap header directories... $ECHO_C" >&6; }
if test \( ! -r /usr/local/include/pcap.h \) -a \
\( ! -r /usr/include/pcap.h \); then
@@ -10758,6 +10760,73 @@ _ACEOF
fi
fi
+# libdlpi is needed for Solaris 11 and later.
+{ echo "$as_me:$LINENO: checking for dlpi_walk in -ldlpi" >&5
+echo $ECHO_N "checking for dlpi_walk in -ldlpi... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dlpi_dlpi_walk+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldlpi -L/lib $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlpi_walk ();
+int
+main ()
+{
+return dlpi_walk ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_dlpi_dlpi_walk=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dlpi_dlpi_walk=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
+echo "${ECHO_T}$ac_cv_lib_dlpi_dlpi_walk" >&6; }
+if test $ac_cv_lib_dlpi_dlpi_walk = yes; then
+ LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS"
+fi
+
+
{ echo "$as_me:$LINENO: checking if sockaddr struct has sa_len member" >&5
echo $ECHO_N "checking if sockaddr struct has sa_len member... $ECHO_C" >&6; }
@@ -10822,6 +10891,104 @@ if test "$ac_cv_sockaddr_has_sa_len" = no; then
missing_includes=yes
fi
+#
+# Do we have the new open API? Check for pcap_create, and assume that,
+# if we do, we also have pcap_activate() and the other new routines.
+
+for ac_func in pcap_create
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
@@ -10919,8 +11086,8 @@ fi
done
if test $ac_cv_func_pcap_findalldevs = "yes" ; then
- savedcflags="$CFLAGS"
- CFLAGS="$CFLAGS $V_INCLS"
+ savedppflags="$CPPLAGS"
+ CPPFLAGS="$CPPFLAGS $V_INCLS"
{ echo "$as_me:$LINENO: checking for pcap_if_t" >&5
echo $ECHO_N "checking for pcap_if_t... $ECHO_C" >&6; }
if test "${ac_cv_type_pcap_if_t+set}" = set; then
@@ -10984,7 +11151,7 @@ _ACEOF
fi
- CFLAGS="$savedcflags"
+ CPPFLAGS="$savedcppflags"
fi
if test $ac_cv_func_pcap_lib_version = "no" ; then
@@ -11304,6 +11471,154 @@ if test -f /dev/bpf0 ; then
V_GROUP=bpf
fi
+#
+# Check for some headers introduced in later versions of libpcap
+# and used by some printers.
+#
+savedcppflags="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $V_INCLS"
+
+for ac_header in pcap/bluetooth.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+CPPFLAGS="$savedcppflags"
+
for ac_header in sys/bitypes.h
do
@@ -12581,6 +12896,103 @@ fi
fi
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
rm -f os-proto.h
if test "${LBL_CFLAGS+set}" = set; then
V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
@@ -12719,7 +13131,7 @@ else
# know it does work, and have the script just fail on other
# cpu types and update it when such a failure occurs.
#
- alpha*|arm*|hp*|mips*|sh*|sparc*|ia64|nv1)
+ alpha*|arm*|bfin*|hp*|mips*|sh*|sparc*|ia64|nv1)
ac_cv_lbl_unaligned_fail=yes
;;
@@ -12837,65 +13249,136 @@ _ACEOF
fi
+# Check for SSLeay
+{ echo "$as_me:$LINENO: checking whether to use SSLeay libcrypto" >&5
+echo $ECHO_N "checking whether to use SSLeay libcrypto... $ECHO_C" >&6; }
+# Specify location for both includes and libraries.
+want_libcrypto=youmama
# Check whether --with-crypto was given.
if test "${with_crypto+set}" = set; then
withval=$with_crypto;
+ if test $withval = no
+ then
+ want_libcrypto=no
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ elif test $withval = yes
+ then
+ want_libcrypto=yes
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ else
+ want_libcrypto=yes
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ crypto_dir=$withval
+ fi
+
else
-{ echo "$as_me:$LINENO: checking for SSLeay" >&5
-echo $ECHO_N "checking for SSLeay... $ECHO_C" >&6; }
-ac_cv_ssleay_path=no
-incdir=no
+ #
+ # Use libcrypto if it's present, otherwise don't.
+ #
+ want_libcrypto=ifavailable
+ { echo "$as_me:$LINENO: result: yes, if available" >&5
+echo "${ECHO_T}yes, if available" >&6; }
-#
-# If Xprefix is set in the environment, use that value.
-# XXX - this should arguably be done by having --with-crypto take an
-# optional argument, and have that argument be used to set Xprefix
-# if present.
-#
-if test -z "$Xprefix"; then
- Xprefix=`eval echo $prefix`
fi
-for dir in $Xprefix /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do
+if test "$want_libcrypto" != "no"; then
+ ac_cv_ssleay_path=no
+ incdir=no
+ if test "x$crypto_dir" = x; then
+ #
+ # Location not specified; check the default locations.
+ #
+ { echo "$as_me:$LINENO: checking where SSLeay is located" >&5
+echo $ECHO_N "checking where SSLeay is located... $ECHO_C" >&6; }
+ dirs="/usr /usr/local /usr/local/ssl /usr/pkg"
+ if test "x${host_alias}" != x; then
+ dirs="/usr/${host_alias} $dirs"
+ fi
+ for dir in $dirs; do
+
#
# XXX - is there a better way to check if a given library is
# in a given directory than checking each of the possible
# shared library suffixes?
#
- # Are there any other suffixes we need to look for? Do we have to
- # worry about ".so.{version}"?
+ # Are there any other suffixes we need to look for? Do we
+ # have to worry about ".so.{version}"?
#
# Or should we just look for "libcrypto.*"?
#
- if test -d $dir/lib -a \( -f $dir/lib/libcrypto.a -o \
- -f $dir/lib/libcrypto.so -o \
- -f $dir/lib/libcrypto.sl -o \
- -f $dir/lib/libcrypto.dylib \); then
- ac_cv_ssleay_path=$dir
+ if test -d "$dir/lib" -a \( -f "$dir/lib/libcrypto.a" -o \
+ -f "$dir/lib/libcrypto.so" -o \
+ -f "$dir/lib/libcrypto.sl" -o \
+ -f "$dir/lib/libcrypto.dylib" \); then
+ ac_cv_ssleay_path="$dir"
fi
- if test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then
+
+ #
+ # Make sure we have the headers as well.
+ #
+ if test -d "$dir/include/openssl" -a -f "$dir/include/openssl/des.h"; then
incdir="-I$dir/include"
fi
- if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
- break;
+
+
+ if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
+ break;
+ else
+ ac_cv_ssleay_path=no
+ incdir=no
+ fi
+ done
+ if test "$ac_cv_ssleay_path" != no; then
+ { echo "$as_me:$LINENO: result: $ac_cv_ssleay_path" >&5
+echo "${ECHO_T}$ac_cv_ssleay_path" >&6; }
+ fi
else
- ac_cv_ssleay_path=no
- incdir=no
+ { echo "$as_me:$LINENO: checking for SSLeay in $crypto_dir" >&5
+echo $ECHO_N "checking for SSLeay in $crypto_dir... $ECHO_C" >&6; }
+
+ #
+ # XXX - is there a better way to check if a given library is
+ # in a given directory than checking each of the possible
+ # shared library suffixes?
+ #
+ # Are there any other suffixes we need to look for? Do we
+ # have to worry about ".so.{version}"?
+ #
+ # Or should we just look for "libcrypto.*"?
+ #
+ if test -d "$crypto_dir/lib" -a \( -f "$crypto_dir/lib/libcrypto.a" -o \
+ -f "$crypto_dir/lib/libcrypto.so" -o \
+ -f "$crypto_dir/lib/libcrypto.sl" -o \
+ -f "$crypto_dir/lib/libcrypto.dylib" \); then
+ ac_cv_ssleay_path="$crypto_dir"
fi
-done
-{ echo "$as_me:$LINENO: result: $ac_cv_ssleay_path" >&5
-echo "${ECHO_T}$ac_cv_ssleay_path" >&6; }
-if test "$ac_cv_ssleay_path" != no; then
- V_INCLS="$V_INCLS $incdir"
- LDFLAGS="-L$dir/lib $LDFLAGS"
- if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
- LIBS="$LIBS -lRSAglue"
+
+ #
+ # Make sure we have the headers as well.
+ #
+ if test -d "$crypto_dir/include/openssl" -a -f "$crypto_dir/include/openssl/des.h"; then
+ incdir="-I$crypto_dir/include"
fi
- if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
- LIBS="$LIBS -lrsaref"
+
+ if test "$ac_cv_ssleay_path" != no; then
+ { echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6; }
+ fi
fi
+ if test "$ac_cv_ssleay_path" != no; then
+ V_INCLS="$V_INCLS $incdir"
+ LDFLAGS="-L$dir/lib $LDFLAGS"
+ if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
+ LIBS="$LIBS -lRSAglue"
+ fi
+ if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
+ LIBS="$LIBS -lrsaref"
+ fi
{ echo "$as_me:$LINENO: checking for DES_cbc_encrypt in -lcrypto" >&5
echo $ECHO_N "checking for DES_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
@@ -12968,7 +13451,7 @@ _ACEOF
fi
- CPPFLAGS="$CPPFLAGS $V_INCLS"
+ CPPFLAGS="$CPPFLAGS $V_INCLS"
for ac_header in openssl/evp.h
do
@@ -13109,11 +13592,20 @@ fi
done
+ else
+ #
+ # Not found. Did the user explicitly ask for it?
+ #
+ { echo "$as_me:$LINENO: result: not found" >&5
+echo "${ECHO_T}not found" >&6; }
+ if test "$want_libcrypto" = yes; then
+ { { echo "$as_me:$LINENO: error: SSLeay not found" >&5
+echo "$as_me: error: SSLeay not found" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
fi
-fi
-
-
if test "$missing_includes" = "yes"; then
CPPFLAGS="$CPPFLAGS -I\$(srcdir)/missing"
V_INCLS="$V_INCLS -I\$(srcdir)/missing"
@@ -13898,6 +14390,7 @@ CPP!$CPP$ac_delim
GREP!$GREP$ac_delim
EGREP!$EGREP$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
+RANLIB!$RANLIB$ac_delim
V_CCOPT!$V_CCOPT$ac_delim
V_DEFS!$V_DEFS$ac_delim
V_GROUP!$V_GROUP$ac_delim
@@ -13910,7 +14403,7 @@ INSTALL_DATA!$INSTALL_DATA$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 67; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 68; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/contrib/tcpdump/configure.in b/contrib/tcpdump/configure.in
index 5a010e7..f3528c4 100755
--- a/contrib/tcpdump/configure.in
+++ b/contrib/tcpdump/configure.in
@@ -1,4 +1,4 @@
-dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.188.2.8 2007/09/12 19:48:50 guy Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.196.2.6 2008-09-25 21:50:04 guy Exp $ (LBL)
dnl
dnl Copyright (c) 1994, 1995, 1996, 1997
dnl The Regents of the University of California. All rights reserved.
@@ -6,7 +6,7 @@ dnl
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_REVISION($Revision: 1.188.2.8 $)
+AC_REVISION($Revision: 1.196.2.6 $)
AC_PREREQ(2.50)
AC_INIT(tcpdump.c)
@@ -19,7 +19,7 @@ AC_CHECK_HEADERS(fcntl.h rpc/rpcent.h netdnet/dnetdb.h)
AC_CHECK_HEADERS(net/pfvar.h, , , [#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>])
-if test "$ac_cv_header_net_pfvar_h" == yes; then
+if test "$ac_cv_header_net_pfvar_h" = yes; then
LOCALSRC="print-pflog.c $LOCALSRC"
fi
AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include <sys/types.h>
@@ -696,6 +696,9 @@ don't.])
fi
fi
+# libdlpi is needed for Solaris 11 and later.
+AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib)
+
dnl portability macros for getaddrinfo/getnameinfo
dnl
dnl Check for sa_len
@@ -704,15 +707,20 @@ if test "$ac_cv_sockaddr_has_sa_len" = no; then
missing_includes=yes
fi
+#
+# Do we have the new open API? Check for pcap_create, and assume that,
+# if we do, we also have pcap_activate() and the other new routines.
+AC_CHECK_FUNCS(pcap_create)
+
AC_CHECK_FUNCS(pcap_findalldevs pcap_dump_flush pcap_lib_version)
if test $ac_cv_func_pcap_findalldevs = "yes" ; then
dnl Check for Mac OS X, which may ship pcap.h from 0.6 but libpcap may
dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't
dnl have pcap_if_t.
- savedcflags="$CFLAGS"
- CFLAGS="$CFLAGS $V_INCLS"
+ savedppflags="$CPPLAGS"
+ CPPFLAGS="$CPPFLAGS $V_INCLS"
AC_CHECK_TYPES(pcap_if_t, , , [#include <pcap.h>])
- CFLAGS="$savedcflags"
+ CPPFLAGS="$savedcppflags"
fi
if test $ac_cv_func_pcap_lib_version = "no" ; then
@@ -795,6 +803,15 @@ if test -f /dev/bpf0 ; then
V_GROUP=bpf
fi
+#
+# Check for some headers introduced in later versions of libpcap
+# and used by some printers.
+#
+savedcppflags="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $V_INCLS"
+AC_CHECK_HEADERS(pcap/bluetooth.h)
+CPPFLAGS="$savedcppflags"
+
AC_CHECK_HEADERS(sys/bitypes.h)
AC_CHECK_TYPE([int8_t], ,
@@ -900,6 +917,8 @@ if test "$ac_lbl_inttypes_h_defines_formats" = no; then
])
fi
+AC_PROG_RANLIB
+
AC_LBL_DEVEL(V_CCOPT)
AC_LBL_SOCKADDR_SA_LEN
@@ -908,65 +927,89 @@ AC_LBL_UNALIGNED_ACCESS
AC_VAR_H_ERRNO
-AC_ARG_WITH(crypto, [ --without-crypto disable crypto support],
- [], [
-AC_MSG_CHECKING(for SSLeay)
-ac_cv_ssleay_path=no
-incdir=no
-
-#
-# If Xprefix is set in the environment, use that value.
-# XXX - this should arguably be done by having --with-crypto take an
-# optional argument, and have that argument be used to set Xprefix
-# if present.
-#
-if test -z "$Xprefix"; then
- Xprefix=`eval echo $prefix`
-fi
-
-for dir in $Xprefix /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do
- #
- # XXX - is there a better way to check if a given library is
- # in a given directory than checking each of the possible
- # shared library suffixes?
- #
- # Are there any other suffixes we need to look for? Do we have to
- # worry about ".so.{version}"?
+# Check for SSLeay
+AC_MSG_CHECKING(whether to use SSLeay libcrypto)
+# Specify location for both includes and libraries.
+want_libcrypto=youmama
+AC_ARG_WITH(crypto,
+ AS_HELP_STRING([--with-crypto@<:@=PATH@:>@],
+ [use SSLeay libcrypto (located in directory PATH, if supplied). @<:@default=yes, if available@:>@]),
+[
+ if test $withval = no
+ then
+ want_libcrypto=no
+ AC_MSG_RESULT(no)
+ elif test $withval = yes
+ then
+ want_libcrypto=yes
+ AC_MSG_RESULT(yes)
+ else
+ want_libcrypto=yes
+ AC_MSG_RESULT(yes)
+ crypto_dir=$withval
+ fi
+],[
#
- # Or should we just look for "libcrypto.*"?
+ # Use libcrypto if it's present, otherwise don't.
#
- if test -d $dir/lib -a \( -f $dir/lib/libcrypto.a -o \
- -f $dir/lib/libcrypto.so -o \
- -f $dir/lib/libcrypto.sl -o \
- -f $dir/lib/libcrypto.dylib \); then
- ac_cv_ssleay_path=$dir
- fi
- if test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then
- incdir="-I$dir/include"
- fi
- if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
- break;
+ want_libcrypto=ifavailable
+ AC_MSG_RESULT([yes, if available])
+])
+if test "$want_libcrypto" != "no"; then
+ ac_cv_ssleay_path=no
+ incdir=no
+ if test "x$crypto_dir" = x; then
+ #
+ # Location not specified; check the default locations.
+ #
+ AC_MSG_CHECKING(where SSLeay is located)
+ dirs="/usr /usr/local /usr/local/ssl /usr/pkg"
+ if test "x${host_alias}" != x; then
+ dirs="/usr/${host_alias} $dirs"
+ fi
+ for dir in $dirs; do
+ AC_LBL_SSLEAY($dir)
+
+ if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
+ break;
+ else
+ ac_cv_ssleay_path=no
+ incdir=no
+ fi
+ done
+ if test "$ac_cv_ssleay_path" != no; then
+ AC_MSG_RESULT($ac_cv_ssleay_path)
+ fi
else
- ac_cv_ssleay_path=no
- incdir=no
- fi
-done
-AC_MSG_RESULT($ac_cv_ssleay_path)
-if test "$ac_cv_ssleay_path" != no; then
- V_INCLS="$V_INCLS $incdir"
- LDFLAGS="-L$dir/lib $LDFLAGS"
- if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
- LIBS="$LIBS -lRSAglue"
- fi
- if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
- LIBS="$LIBS -lrsaref"
+ AC_MSG_CHECKING(for SSLeay in $crypto_dir)
+ AC_LBL_SSLEAY($crypto_dir)
+ if test "$ac_cv_ssleay_path" != no; then
+ AC_MSG_RESULT(found)
+ fi
fi
- AC_CHECK_LIB(crypto, DES_cbc_encrypt)
+ if test "$ac_cv_ssleay_path" != no; then
+ V_INCLS="$V_INCLS $incdir"
+ LDFLAGS="-L$dir/lib $LDFLAGS"
+ if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
+ LIBS="$LIBS -lRSAglue"
+ fi
+ if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
+ LIBS="$LIBS -lrsaref"
+ fi
+ AC_CHECK_LIB(crypto, DES_cbc_encrypt)
- CPPFLAGS="$CPPFLAGS $V_INCLS"
- AC_CHECK_HEADERS(openssl/evp.h)
+ CPPFLAGS="$CPPFLAGS $V_INCLS"
+ AC_CHECK_HEADERS(openssl/evp.h)
+ else
+ #
+ # Not found. Did the user explicitly ask for it?
+ #
+ AC_MSG_RESULT(not found)
+ if test "$want_libcrypto" = yes; then
+ AC_MSG_ERROR(SSLeay not found)
+ fi
+ fi
fi
-])
dnl
dnl set additional include path if necessary
diff --git a/contrib/tcpdump/dccp.h b/contrib/tcpdump/dccp.h
index 1afa8c0..5c66e23 100644
--- a/contrib/tcpdump/dccp.h
+++ b/contrib/tcpdump/dccp.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/dccp.h,v 1.1.2.4 2006/05/12 01:46:17 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/dccp.h,v 1.5 2006-11-02 09:05:23 hannes Exp $ (LBL) */
/*
* Copyright (C) Arnaldo Carvalho de Melo 2004
* Copyright (C) Ian McDonald 2005 <iam4@cs.waikato.ac.nz>
@@ -36,8 +36,8 @@ struct dccp_hdr {
} dccph_xtrs;
};
-#define DCCPH_CCVAL(dh) (((dh)->dccph_ccval_cscov) & 0x0F)
-#define DCCPH_CSCOV(dh) (((dh)->dccph_ccval_cscov >> 4) & 0x0F)
+#define DCCPH_CCVAL(dh) (((dh)->dccph_ccval_cscov >> 4) & 0xF)
+#define DCCPH_CSCOV(dh) (((dh)->dccph_ccval_cscov) & 0xF)
#define DCCPH_X(dh) ((dh)->dccph_xtrs.dccph_xtr & 1)
#define DCCPH_TYPE(dh) (((dh)->dccph_xtrs.dccph_xtr >> 1) & 0xF)
diff --git a/contrib/tcpdump/decnet.h b/contrib/tcpdump/decnet.h
index 9a5c147..d25d157 100644
--- a/contrib/tcpdump/decnet.h
+++ b/contrib/tcpdump/decnet.h
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/decnet.h,v 1.11 2002/12/11 07:13:50 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/decnet.h,v 1.11 2002-12-11 07:13:50 guy Exp $ (LBL)
*/
#ifndef WIN32
diff --git a/contrib/tcpdump/enc.h b/contrib/tcpdump/enc.h
index f54b4eb..2d57e2b 100644
--- a/contrib/tcpdump/enc.h
+++ b/contrib/tcpdump/enc.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/enc.h,v 1.1 2003/03/08 08:55:33 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/enc.h,v 1.1 2003-03-08 08:55:33 guy Exp $ (LBL) */
/* From $OpenBSD: if_enc.h,v 1.8 2001/06/25 05:14:00 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
diff --git a/contrib/tcpdump/ether.h b/contrib/tcpdump/ether.h
index 3d3f3be..e8b3a71 100644
--- a/contrib/tcpdump/ether.h
+++ b/contrib/tcpdump/ether.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.8 2002/12/11 07:13:51 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/ether.h,v 1.8 2002-12-11 07:13:51 guy Exp $ (LBL) */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
diff --git a/contrib/tcpdump/ethertype.h b/contrib/tcpdump/ethertype.h
index 1555b4d..456a7d6 100644
--- a/contrib/tcpdump/ethertype.h
+++ b/contrib/tcpdump/ethertype.h
@@ -18,8 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- *
- * @(#) $Header: /tcpdump/master/tcpdump/ethertype.h,v 1.24.2.1 2005/07/10 14:51:10 hannes Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/ethertype.h,v 1.29.2.1 2008-02-06 10:49:22 guy Exp $ (LBL)
* $FreeBSD$
*/
@@ -111,6 +110,9 @@
#ifndef ETHERTYPE_PPP
#define ETHERTYPE_PPP 0x880b
#endif
+#ifndef ETHERTYPE_MPCP
+#define ETHERTYPE_MPCP 0x8808
+#endif
#ifndef ETHERTYPE_SLOW
#define ETHERTYPE_SLOW 0x8809
#endif
@@ -135,15 +137,27 @@
#ifndef ETHERTYPE_JUMBO
#define ETHERTYPE_JUMBO 0x8870
#endif
+#ifndef ETHERTYPE_LLDP
+#define ETHERTYPE_LLDP 0x88cc
+#endif
#ifndef ETHERTYPE_EAPOL
#define ETHERTYPE_EAPOL 0x888e
#endif
+#ifndef ETHERTYPE_RRCP
+#define ETHERTYPE_RRCP 0x8899
+#endif
#ifndef ETHERTYPE_LOOPBACK
#define ETHERTYPE_LOOPBACK 0x9000
#endif
#ifndef ETHERTYPE_VMAN
#define ETHERTYPE_VMAN 0x9100 /* Extreme VMAN Protocol */
#endif
+#ifndef ETHERTYPE_CFM_OLD
+#define ETHERTYPE_CFM_OLD 0xabcd /* 802.1ag depreciated */
+#endif
+#ifndef ETHERTYPE_CFM
+#define ETHERTYPE_CFM 0x8902 /* 802.1ag */
+#endif
#ifndef ETHERTYPE_ISO
#define ETHERTYPE_ISO 0xfefe /* nonstandard - used in Cisco HDLC encapsulation */
#endif
diff --git a/contrib/tcpdump/extract.h b/contrib/tcpdump/extract.h
index f3db250..bab63f2 100644
--- a/contrib/tcpdump/extract.h
+++ b/contrib/tcpdump/extract.h
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/extract.h,v 1.24 2005/01/15 02:06:50 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/extract.h,v 1.25 2006-01-30 16:20:07 hannes Exp $ (LBL)
*/
/*
@@ -115,6 +115,10 @@ typedef struct {
(u_int32_t)*((const u_int8_t *)(p) + 2) << 16 | \
(u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \
(u_int32_t)*((const u_int8_t *)(p) + 0)))
+#define EXTRACT_LE_24BITS(p) \
+ ((u_int32_t)((u_int32_t)*((const u_int8_t *)(p) + 2) << 16 | \
+ (u_int32_t)*((const u_int8_t *)(p) + 1) << 8 | \
+ (u_int32_t)*((const u_int8_t *)(p) + 0)))
#define EXTRACT_LE_64BITS(p) \
((u_int64_t)((u_int64_t)*((const u_int8_t *)(p) + 7) << 56 | \
(u_int64_t)*((const u_int8_t *)(p) + 6) << 48 | \
diff --git a/contrib/tcpdump/fddi.h b/contrib/tcpdump/fddi.h
index 690af48..df38c8e 100644
--- a/contrib/tcpdump/fddi.h
+++ b/contrib/tcpdump/fddi.h
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/fddi.h,v 1.11 2002/12/11 07:13:51 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/fddi.h,v 1.11 2002-12-11 07:13:51 guy Exp $ (LBL)
*/
/*
diff --git a/contrib/tcpdump/gmpls.c b/contrib/tcpdump/gmpls.c
index 4d4b9ae..ff9adb5 100644
--- a/contrib/tcpdump/gmpls.c
+++ b/contrib/tcpdump/gmpls.c
@@ -15,7 +15,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/gmpls.c,v 1.5.2.1 2005/05/19 06:44:02 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/gmpls.c,v 1.7 2006-04-14 07:11:59 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -25,6 +25,7 @@ static const char rcsid[] _U_ =
#include <tcpdump-stdinc.h>
#include "interface.h"
+#include "gmpls.h"
/* rfc3471 */
struct tok gmpls_link_prot_values[] = {
@@ -41,14 +42,21 @@ struct tok gmpls_link_prot_values[] = {
/* rfc3471 */
struct tok gmpls_switch_cap_values[] = {
- { 1, "Packet-Switch Capable-1"},
- { 2, "Packet-Switch Capable-2"},
- { 3, "Packet-Switch Capable-3"},
- { 4, "Packet-Switch Capable-4"},
- { 51, "Layer-2 Switch Capable"},
- { 100, "Time-Division-Multiplex"},
- { 150, "Lambda-Switch Capable"},
- { 200, "Fiber-Switch Capable"},
+ { GMPLS_PSC1, "Packet-Switch Capable-1"},
+ { GMPLS_PSC2, "Packet-Switch Capable-2"},
+ { GMPLS_PSC3, "Packet-Switch Capable-3"},
+ { GMPLS_PSC4, "Packet-Switch Capable-4"},
+ { GMPLS_L2SC, "Layer-2 Switch Capable"},
+ { GMPLS_TSC, "Time-Division-Multiplex"},
+ { GMPLS_LSC, "Lambda-Switch Capable"},
+ { GMPLS_FSC, "Fiber-Switch Capable"},
+ { 0, NULL }
+};
+
+/* rfc4205 */
+struct tok gmpls_switch_cap_tsc_indication_values[] = {
+ { 0, "Standard SONET/SDH" },
+ { 1, "Arbitrary SONET/SDH" },
{ 0, NULL }
};
diff --git a/contrib/tcpdump/gmpls.h b/contrib/tcpdump/gmpls.h
index 8c3f051..6b2db23 100644
--- a/contrib/tcpdump/gmpls.h
+++ b/contrib/tcpdump/gmpls.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/gmpls.h,v 1.3.2.1 2005/05/19 06:44:03 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/gmpls.h,v 1.5 2006-04-14 07:11:59 hannes Exp $ (LBL) */
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
@@ -14,8 +14,18 @@
* Original code by Hannes Gredler (hannes@juniper.net)
*/
+#define GMPLS_PSC1 1
+#define GMPLS_PSC2 2
+#define GMPLS_PSC3 3
+#define GMPLS_PSC4 4
+#define GMPLS_L2SC 51
+#define GMPLS_TSC 100
+#define GMPLS_LSC 150
+#define GMPLS_FSC 200
+
extern struct tok gmpls_link_prot_values[];
extern struct tok gmpls_switch_cap_values[];
+extern struct tok gmpls_switch_cap_tsc_indication_values[];
extern struct tok gmpls_encoding_values[];
extern struct tok gmpls_payload_values[];
extern struct tok diffserv_te_bc_values[];
diff --git a/contrib/tcpdump/gmt2local.c b/contrib/tcpdump/gmt2local.c
index 926e86c..1fe0e8a 100644
--- a/contrib/tcpdump/gmt2local.c
+++ b/contrib/tcpdump/gmt2local.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/gmt2local.c,v 1.9 2003/11/16 09:36:09 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/gmt2local.c,v 1.9 2003-11-16 09:36:09 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/gmt2local.h b/contrib/tcpdump/gmt2local.h
index 81b0e96..17120c5 100644
--- a/contrib/tcpdump/gmt2local.h
+++ b/contrib/tcpdump/gmt2local.h
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/gmt2local.h,v 1.2.1.1 1999/10/07 23:47:10 mcr Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/gmt2local.h,v 1.2.1.1 1999-10-07 23:47:10 mcr Exp $ (LBL)
*/
#ifndef gmt2local_h
#define gmt2local_h
diff --git a/contrib/tcpdump/icmp6.h b/contrib/tcpdump/icmp6.h
index 20a51e3..5d27270 100644
--- a/contrib/tcpdump/icmp6.h
+++ b/contrib/tcpdump/icmp6.h
@@ -1,5 +1,5 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/icmp6.h,v 1.16.2.1 2005/09/05 09:29:28 guy Exp $ (LBL) */
-/* $NetBSD: icmp6.h,v 1.13 2000/08/03 16:30:37 itojun Exp $ */
+/* @(#) $Header: /tcpdump/master/tcpdump/icmp6.h,v 1.18 2007-08-29 02:31:44 mcr Exp $ (LBL) */
+/* NetBSD: icmp6.h,v 1.13 2000/08/03 16:30:37 itojun Exp */
/* $KAME: icmp6.h,v 1.22 2000/08/03 15:25:16 jinmei Exp $ */
/*
diff --git a/contrib/tcpdump/ieee802_11.h b/contrib/tcpdump/ieee802_11.h
index d98f979..c1159c6 100644
--- a/contrib/tcpdump/ieee802_11.h
+++ b/contrib/tcpdump/ieee802_11.h
@@ -1,5 +1,5 @@
/* $FreeBSD$ */
-/* @(#) $Header: /tcpdump/master/tcpdump/ieee802_11.h,v 1.9.4.3 2007/07/22 20:01:16 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/ieee802_11.h,v 1.12 2007-07-22 19:59:06 guy Exp $ (LBL) */
/*
* Copyright (c) 2001
* Fortress Technologies
diff --git a/contrib/tcpdump/ieee802_11_radio.h b/contrib/tcpdump/ieee802_11_radio.h
index 82eb97b..bbbd199 100644
--- a/contrib/tcpdump/ieee802_11_radio.h
+++ b/contrib/tcpdump/ieee802_11_radio.h
@@ -1,6 +1,6 @@
/* $FreeBSD$ */
/* $NetBSD: ieee802_11_radio.h,v 1.2 2006/02/26 03:04:03 dyoung Exp $ */
-/* $Header: /tcpdump/master/tcpdump/ieee802_11_radio.h,v 1.1.2.1 2006/06/13 22:24:45 guy Exp $ */
+/* $Header: /tcpdump/master/tcpdump/ieee802_11_radio.h,v 1.3 2007-08-29 02:31:44 mcr Exp $ */
/*-
* Copyright (c) 2003, 2004 David Young. All rights reserved.
diff --git a/contrib/tcpdump/igrp.h b/contrib/tcpdump/igrp.h
index 78876d3..b5f133b 100644
--- a/contrib/tcpdump/igrp.h
+++ b/contrib/tcpdump/igrp.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/igrp.h,v 1.6 2002/12/11 07:13:52 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/igrp.h,v 1.6 2002-12-11 07:13:52 guy Exp $ (LBL) */
/* Cisco IGRP definitions */
/* IGRP Header */
diff --git a/contrib/tcpdump/interface.h b/contrib/tcpdump/interface.h
index 302d2ea..5e4a5eb 100644
--- a/contrib/tcpdump/interface.h
+++ b/contrib/tcpdump/interface.h
@@ -19,7 +19,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $FreeBSD$
- * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.244.2.21 2007/03/28 07:45:46 hannes Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.280.2.4 2008-04-04 19:42:52 guy Exp $ (LBL)
*/
#ifndef tcpdump_interface_h
@@ -165,6 +165,11 @@ extern const char *ipxsap_string(u_short);
extern const char *dnname_string(u_short);
extern const char *dnnum_string(u_short);
+/* checksum routines */
+extern void init_checksum(void);
+extern u_int16_t verify_crc10_cksum(u_int16_t, const u_char *, int);
+extern u_int16_t create_osi_cksum(const u_int8_t *, int, int);
+
/* The printer routines. */
#include <pcap.h>
@@ -210,10 +215,13 @@ extern u_int fr_if_print(const struct pcap_pkthdr *, const u_char *);
extern u_int mfr_if_print(const struct pcap_pkthdr *, const u_char *);
extern u_int fr_print(register const u_char *, u_int);
extern u_int mfr_print(register const u_char *, u_int);
+extern char *q922_string(const u_char *);
extern u_int ieee802_11_if_print(const struct pcap_pkthdr *, const u_char *);
extern u_int ieee802_11_radio_if_print(const struct pcap_pkthdr *,
const u_char *);
extern u_int ap1394_if_print(const struct pcap_pkthdr *, const u_char *);
+extern u_int ieee802_11_radio_avs_if_print(const struct pcap_pkthdr *,
+ const u_char *);
extern void gre_print(const u_char *, u_int);
extern void icmp_print(const u_char *, u_int, const u_char *, int);
extern void igmp_print(const u_char *, u_int);
@@ -237,8 +245,11 @@ extern void pimv1_print(const u_char *, u_int);
extern void cisco_autorp_print(const u_char *, u_int);
extern void rsvp_print(const u_char *, u_int);
extern void ldp_print(const u_char *, u_int);
+extern void lldp_print(const u_char *, u_int);
extern void lmp_print(const u_char *, u_int);
extern void lspping_print(const u_char *, u_int);
+extern void lwapp_control_print(const u_char *, u_int, int);
+extern void lwapp_data_print(const u_char *, u_int);
extern void eigrp_print(const u_char *, u_int);
extern void mobile_print(const u_char *, u_int);
extern void pim_print(const u_char *, u_int);
@@ -251,6 +262,7 @@ extern u_int pppoe_if_print(const struct pcap_pkthdr *, const u_char *);
extern u_int prism_if_print(const struct pcap_pkthdr *, const u_char *);
extern void q933_print(const u_char *, u_int);
extern int vjc_print(register const char *, u_short);
+extern void vqp_print(register const u_char *, register u_int);
extern u_int raw_if_print(const struct pcap_pkthdr *, const u_char *);
extern void rip_print(const u_char *, u_int);
extern u_int sl_if_print(const struct pcap_pkthdr *, const u_char *);
@@ -282,7 +294,9 @@ extern u_int symantec_if_print(const struct pcap_pkthdr *, const u_char *);
extern void tcp_print(const u_char *, u_int, const u_char *, int);
extern void tftp_print(const u_char *, u_int);
extern void timed_print(const u_char *);
+extern void udld_print(const u_char *, u_int);
extern void udp_print(const u_char *, u_int, const u_char *, int);
+extern void vtp_print(const u_char *, u_int);
extern void wb_print(const void *, u_int);
extern int ah_print(register const u_char *);
extern int ipcomp_print(register const u_char *, int *);
@@ -292,14 +306,19 @@ extern void ipx_netbios_print(const u_char *, u_int);
extern void nbt_tcp_print(const u_char *, int);
extern void nbt_udp137_print(const u_char *, int);
extern void nbt_udp138_print(const u_char *, int);
+extern void smb_tcp_print(const u_char *, int);
extern char *smb_errstr(int, int);
extern const char *nt_errstr(u_int32_t);
extern void print_data(const unsigned char *, int);
extern void l2tp_print(const u_char *, u_int);
extern void vrrp_print(const u_char *, u_int, int);
extern void slow_print(const u_char *, u_int);
+extern void sflow_print(const u_char *, u_int);
+extern void mpcp_print(const u_char *, u_int);
+extern void cfm_print(const u_char *, u_int);
extern void pgm_print(const u_char *, u_int, const u_char *);
extern void cdp_print(const u_char *, u_int, u_int);
+extern void dtp_print(const u_char *, u_int);
extern void stp_print(const u_char *, u_int);
extern void radius_print(const u_char *, u_int);
extern void lwres_print(const u_char *, u_int);
@@ -313,6 +332,7 @@ extern void hsrp_print(const u_char *, u_int);
extern void bfd_print(const u_char *, u_int, u_int);
extern void sip_print(const u_char *, u_int);
extern void syslog_print(const u_char *, u_int);
+extern u_int bt_if_print(const struct pcap_pkthdr *, const u_char *);
#ifdef INET6
extern void ip6_print(const u_char *, u_int);
@@ -333,7 +353,7 @@ extern u_int16_t in_cksum_shouldbe(u_int16_t, u_int16_t);
#ifndef HAVE_BPF_DUMP
struct bpf_program;
-extern void bpf_dump(struct bpf_program *, int);
+extern void bpf_dump(const struct bpf_program *, int);
#endif
@@ -341,10 +361,12 @@ extern void bpf_dump(struct bpf_program *, int);
/* forward compatibility */
+#ifndef NETDISSECT_REWORKED
extern netdissect_options *gndo;
#define eflag gndo->ndo_eflag
#define fflag gndo->ndo_fflag
+#define Kflag gndo->ndo_Kflag
#define nflag gndo->ndo_nflag
#define Nflag gndo->ndo_Nflag
#define Oflag gndo->ndo_Oflag
@@ -360,13 +382,19 @@ extern netdissect_options *gndo;
#define xflag gndo->ndo_xflag
#define Xflag gndo->ndo_Xflag
#define Cflag gndo->ndo_Cflag
+#define Gflag gndo->ndo_Gflag
#define Aflag gndo->ndo_Aflag
+#define Bflag gndo->ndo_Bflag
+#define Iflag gndo->ndo_Iflag
#define suppress_default_print gndo->ndo_suppress_default_print
#define packettype gndo->ndo_packettype
#define tcpmd5secret gndo->ndo_tcpmd5secret
#define Wflag gndo->ndo_Wflag
#define WflagChars gndo->ndo_WflagChars
#define Cflag_count gndo->ndo_Cflag_count
+#define Gflag_count gndo->ndo_Gflag_count
+#define Gflag_time gndo->ndo_Gflag_time
#define snaplen gndo->ndo_snaplen
#define snapend gndo->ndo_snapend
+#endif
diff --git a/contrib/tcpdump/ip.h b/contrib/tcpdump/ip.h
index e232ae0..a01d0f0 100644
--- a/contrib/tcpdump/ip.h
+++ b/contrib/tcpdump/ip.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ip.h,v 1.11.2.1 2007/09/14 01:30:02 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/ip.h,v 1.12 2007-09-14 01:29:28 guy Exp $ (LBL) */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
diff --git a/contrib/tcpdump/ip6.h b/contrib/tcpdump/ip6.h
index acf465c..e4f9fe1 100644
--- a/contrib/tcpdump/ip6.h
+++ b/contrib/tcpdump/ip6.h
@@ -1,5 +1,5 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ip6.h,v 1.6.4.1 2005/04/20 10:04:37 guy Exp $ (LBL) */
-/* $NetBSD: ip6.h,v 1.9 2000/07/13 05:34:21 itojun Exp $ */
+/* @(#) $Header: /tcpdump/master/tcpdump/ip6.h,v 1.8 2007-08-29 02:31:44 mcr Exp $ (LBL) */
+/* NetBSD: ip6.h,v 1.9 2000/07/13 05:34:21 itojun Exp */
/* $KAME: ip6.h,v 1.9 2000/07/02 21:01:32 itojun Exp $ */
/*
diff --git a/contrib/tcpdump/ipfc.h b/contrib/tcpdump/ipfc.h
index f822d4a..438d115 100644
--- a/contrib/tcpdump/ipfc.h
+++ b/contrib/tcpdump/ipfc.h
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/ipfc.h,v 1.4 2002/12/11 07:13:53 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/ipfc.h,v 1.4 2002-12-11 07:13:53 guy Exp $ (LBL)
*/
struct ipfc_header {
diff --git a/contrib/tcpdump/ipproto.c b/contrib/tcpdump/ipproto.c
index 66ea356..7b89afb 100755
--- a/contrib/tcpdump/ipproto.c
+++ b/contrib/tcpdump/ipproto.c
@@ -15,7 +15,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/ipproto.c,v 1.3.2.3 2005/09/20 06:05:37 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/ipproto.c,v 1.6 2005-09-20 06:01:22 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/ipproto.h b/contrib/tcpdump/ipproto.h
index 1800db4..ea339b1 100644
--- a/contrib/tcpdump/ipproto.h
+++ b/contrib/tcpdump/ipproto.h
@@ -30,11 +30,12 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/ipproto.h,v 1.4.2.2 2005/09/20 06:05:37 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/ipproto.h,v 1.6 2005-09-20 06:01:22 guy Exp $ (LBL)
*
* From:
* @(#)in.h 8.3 (Berkeley) 1/3/94
* $FreeBSD$
+ * FreeBSD: src/sys/netinet/in.h,v 1.38.2.3 1999/08/29 16:29:34 peter Exp
*/
extern struct tok ipproto_values[];
diff --git a/contrib/tcpdump/ipsec_doi.h b/contrib/tcpdump/ipsec_doi.h
index 83d05ea..554a258 100644
--- a/contrib/tcpdump/ipsec_doi.h
+++ b/contrib/tcpdump/ipsec_doi.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* YIPS @(#)$Id: ipsec_doi.h,v 1.7 2002/12/11 07:13:53 guy Exp $ */
+/* YIPS @(#)$Id: ipsec_doi.h,v 1.7 2002-12-11 07:13:53 guy Exp $ */
/* refer to RFC 2407 */
diff --git a/contrib/tcpdump/ipx.h b/contrib/tcpdump/ipx.h
index a8c1cd5..bfc3019 100644
--- a/contrib/tcpdump/ipx.h
+++ b/contrib/tcpdump/ipx.h
@@ -1,7 +1,7 @@
/*
* IPX protocol formats
*
- * @(#) $Header: /tcpdump/master/tcpdump/ipx.h,v 1.8 2002/12/11 07:13:54 guy Exp $
+ * @(#) $Header: /tcpdump/master/tcpdump/ipx.h,v 1.8 2002-12-11 07:13:54 guy Exp $
*/
/* well-known sockets */
diff --git a/contrib/tcpdump/isakmp.h b/contrib/tcpdump/isakmp.h
index 94fac40..85d383d 100644
--- a/contrib/tcpdump/isakmp.h
+++ b/contrib/tcpdump/isakmp.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* YIPS @(#)$Id: isakmp.h,v 1.10 2002/12/11 07:13:54 guy Exp $ */
+/* YIPS @(#)$Id: isakmp.h,v 1.11 2007-08-29 02:38:14 mcr Exp $ */
/* refer to RFC 2408 */
@@ -81,7 +81,7 @@ typedef struct { /* i_cookie + r_cookie */
#define ISAKMP_TIMER_DEFAULT 10 /* seconds */
#define ISAKMP_TRY_DEFAULT 3 /* times */
-/* 3.1 ISAKMP Header Format
+/* 3.1 ISAKMP Header Format (IKEv1 and IKEv2)
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
! Initiator !
@@ -128,8 +128,11 @@ struct isakmp {
#define ISAKMP_NPTYPE_D 12 /* Delete */
#define ISAKMP_NPTYPE_VID 13 /* Vendor ID */
-#define ISAKMP_MAJOR_VERSION 1
-#define ISAKMP_MINOR_VERSION 0
+#define IKEv1_MAJOR_VERSION 1
+#define IKEv1_MINOR_VERSION 0
+
+#define IKEv2_MAJOR_VERSION 2
+#define IKEv2_MINOR_VERSION 0
/* Exchange Type */
#define ISAKMP_ETYPE_NONE 0 /* NONE */
@@ -142,6 +145,13 @@ struct isakmp {
/* Flags */
#define ISAKMP_FLAG_E 0x01 /* Encryption Bit */
#define ISAKMP_FLAG_C 0x02 /* Commit Bit */
+#define ISAKMP_FLAG_extra 0x04
+
+/* IKEv2 */
+#define ISAKMP_FLAG_I (1 << 3) /* (I)nitiator */
+#define ISAKMP_FLAG_V (1 << 4) /* (V)ersion */
+#define ISAKMP_FLAG_R (1 << 5) /* (R)esponse */
+
/* 3.2 Payload Generic Header
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
@@ -151,7 +161,7 @@ struct isakmp {
*/
struct isakmp_gen {
u_int8_t np; /* Next Payload */
- u_int8_t reserved; /* RESERVED, unused, must set to 0 */
+ u_int8_t critical; /* bit 7 - critical, rest is RESERVED */
u_int16_t len; /* Payload Length */
};
@@ -188,7 +198,7 @@ struct isakmp_data {
message of a Base Exchange (see Section 4.4) and the value "0" in the
first message of an Identity Protect Exchange (see Section 4.5).
*/
-struct isakmp_pl_sa {
+struct ikev1_pl_sa {
struct isakmp_gen h;
u_int32_t doi; /* Domain of Interpretation */
u_int32_t sit; /* Situation */
@@ -202,7 +212,7 @@ struct isakmp_pl_sa {
last within the security association proposal, then this field will
be 0.
*/
-struct isakmp_pl_p {
+struct ikev1_pl_p {
struct isakmp_gen h;
u_int8_t p_no; /* Proposal # */
u_int8_t prot_id; /* Protocol */
@@ -218,7 +228,7 @@ struct isakmp_pl_p {
then this field will be 3. If the current Transform payload is the
last within the proposal, then this field will be 0.
*/
-struct isakmp_pl_t {
+struct ikev1_pl_t {
struct isakmp_gen h;
u_int8_t t_no; /* Transform # */
u_int8_t t_id; /* Transform-Id */
@@ -227,14 +237,14 @@ struct isakmp_pl_t {
};
/* 3.7 Key Exchange Payload */
-struct isakmp_pl_ke {
+struct ikev1_pl_ke {
struct isakmp_gen h;
/* Key Exchange Data */
};
/* 3.8 Identification Payload */
/* MUST NOT to be used, because of being defined in ipsec-doi. */
-struct isakmp_pl_id {
+struct ikev1_pl_id {
struct isakmp_gen h;
union {
u_int8_t id_type; /* ID Type */
@@ -244,7 +254,7 @@ struct isakmp_pl_id {
};
/* 3.9 Certificate Payload */
-struct isakmp_pl_cert {
+struct ikev1_pl_cert {
struct isakmp_gen h;
u_int8_t encode; /* Cert Encoding */
char cert; /* Certificate Data */
@@ -268,7 +278,7 @@ struct isakmp_pl_cert {
#define ISAKMP_CERT_SPKI 9
/* 3.10 Certificate Request Payload */
-struct isakmp_pl_cr {
+struct ikev1_pl_cr {
struct isakmp_gen h;
u_int8_t num_cert; /* # Cert. Types */
/*
@@ -283,27 +293,27 @@ struct isakmp_pl_cr {
/* 3.11 Hash Payload */
/* may not be used, because of having only data. */
-struct isakmp_pl_hash {
+struct ikev1_pl_hash {
struct isakmp_gen h;
/* Hash Data */
};
/* 3.12 Signature Payload */
/* may not be used, because of having only data. */
-struct isakmp_pl_sig {
+struct ikev1_pl_sig {
struct isakmp_gen h;
/* Signature Data */
};
/* 3.13 Nonce Payload */
/* may not be used, because of having only data. */
-struct isakmp_pl_nonce {
+struct ikev1_pl_nonce {
struct isakmp_gen h;
/* Nonce Data */
};
/* 3.14 Notification Payload */
-struct isakmp_pl_n {
+struct ikev1_pl_n {
struct isakmp_gen h;
u_int32_t doi; /* Domain of Interpretation */
u_int8_t prot_id; /* Protocol-ID */
@@ -347,7 +357,7 @@ struct isakmp_pl_n {
#define ISAKMP_LOG_RETRY_LIMIT_REACHED 65530
/* 3.15 Delete Payload */
-struct isakmp_pl_d {
+struct ikev1_pl_d {
struct isakmp_gen h;
u_int32_t doi; /* Domain of Interpretation */
u_int8_t prot_id; /* Protocol-Id */
@@ -357,15 +367,15 @@ struct isakmp_pl_d {
};
-struct isakmp_ph1tab {
- struct isakmp_ph1 *head;
- struct isakmp_ph1 *tail;
+struct ikev1_ph1tab {
+ struct ikev1_ph1 *head;
+ struct ikev1_ph1 *tail;
int len;
};
struct isakmp_ph2tab {
- struct isakmp_ph2 *head;
- struct isakmp_ph2 *tail;
+ struct ikev1_ph2 *head;
+ struct ikev1_ph2 *tail;
int len;
};
@@ -375,4 +385,99 @@ struct isakmp_ph2tab {
#define PFS_NEED 1
#define PFS_NONEED 0
+/* IKEv2 (RFC4306) */
+
+/* 3.3 Security Association Payload -- generic header */
+/* 3.3.1. Proposal Substructure */
+struct ikev2_p {
+ struct isakmp_gen h;
+ u_int8_t p_no; /* Proposal # */
+ u_int8_t prot_id; /* Protocol */
+ u_int8_t spi_size; /* SPI Size */
+ u_int8_t num_t; /* Number of Transforms */
+};
+
+/* 3.3.2. Transform Substructure */
+struct ikev2_t {
+ struct isakmp_gen h;
+ u_int8_t t_type; /* Transform Type (ENCR,PRF,INTEG,etc.*/
+ u_int8_t res2; /* reserved byte */
+ u_int16_t t_id; /* Transform ID */
+};
+
+enum ikev2_t_type {
+ IV2_T_ENCR = 1,
+ IV2_T_PRF = 2,
+ IV2_T_INTEG= 3,
+ IV2_T_DH = 4,
+ IV2_T_ESN = 5,
+};
+
+/* 3.4. Key Exchange Payload */
+struct ikev2_ke {
+ struct isakmp_gen h;
+ u_int16_t ke_group;
+ u_int16_t ke_res1;
+ /* KE data */
+};
+
+
+/* 3.10 Notification Payload */
+struct ikev2_n {
+ struct isakmp_gen h;
+ u_int8_t prot_id; /* Protocol-ID */
+ u_int8_t spi_size; /* SPI Size */
+ u_int16_t type; /* Notify Message Type */
+ /* SPI */
+ /* Notification Data */
+};
+
+enum ikev2_n_type {
+ IV2_NOTIFY_UNSUPPORTED_CRITICAL_PAYLOAD = 1,
+ IV2_NOTIFY_INVALID_IKE_SPI = 4,
+ IV2_NOTIFY_INVALID_MAJOR_VERSION = 5,
+ IV2_NOTIFY_INVALID_SYNTAX = 7,
+ IV2_NOTIFY_INVALID_MESSAGE_ID = 9,
+ IV2_NOTIFY_INVALID_SPI =11,
+ IV2_NOTIFY_NO_PROPOSAL_CHOSEN =14,
+ IV2_NOTIFY_INVALID_KE_PAYLOAD =17,
+ IV2_NOTIFY_AUTHENTICATION_FAILED =24,
+ IV2_NOTIFY_SINGLE_PAIR_REQUIRED =34,
+ IV2_NOTIFY_NO_ADDITIONAL_SAS =35,
+ IV2_NOTIFY_INTERNAL_ADDRESS_FAILURE =36,
+ IV2_NOTIFY_FAILED_CP_REQUIRED =37,
+ IV2_NOTIFY_INVALID_SELECTORS =39,
+ IV2_NOTIFY_INITIAL_CONTACT =16384,
+ IV2_NOTIFY_SET_WINDOW_SIZE =16385,
+ IV2_NOTIFY_ADDITIONAL_TS_POSSIBLE =16386,
+ IV2_NOTIFY_IPCOMP_SUPPORTED =16387,
+ IV2_NOTIFY_NAT_DETECTION_SOURCE_IP =16388,
+ IV2_NOTIFY_NAT_DETECTION_DESTINATION_IP =16389,
+ IV2_NOTIFY_COOKIE =16390,
+ IV2_NOTIFY_USE_TRANSPORT_MODE =16391,
+ IV2_NOTIFY_HTTP_CERT_LOOKUP_SUPPORTED =16392,
+ IV2_NOTIFY_REKEY_SA =16393,
+ IV2_NOTIFY_ESP_TFC_PADDING_NOT_SUPPORTED =16394,
+ IV2_NOTIFY_NON_FIRST_FRAGMENTS_ALSO =16395
+};
+
+struct notify_messages {
+ u_int16_t type;
+ char *msg;
+};
+
+/* 3.8 Notification Payload */
+struct ikev2_auth {
+ struct isakmp_gen h;
+ u_int8_t auth_method; /* Protocol-ID */
+ u_int8_t reserved[3];
+ /* authentication data */
+};
+
+enum ikev2_auth_type {
+ IV2_RSA_SIG = 1,
+ IV2_SHARED = 2,
+ IV2_DSS_SIG = 3,
+};
+
#endif /* !defined(_ISAKMP_H_) */
diff --git a/contrib/tcpdump/l2tp.h b/contrib/tcpdump/l2tp.h
index 1568883..5be24b9 100644
--- a/contrib/tcpdump/l2tp.h
+++ b/contrib/tcpdump/l2tp.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/l2tp.h,v 1.5 2001/11/05 10:03:27 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/l2tp.h,v 1.5 2001-11-05 10:03:27 guy Exp $ (LBL) */
/*
* Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997
* The Regents of the University of California. All rights reserved.
diff --git a/contrib/tcpdump/l2vpn.c b/contrib/tcpdump/l2vpn.c
index d98e69a..a822191 100755
--- a/contrib/tcpdump/l2vpn.c
+++ b/contrib/tcpdump/l2vpn.c
@@ -15,7 +15,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/l2vpn.c,v 1.1 2004/06/15 09:42:40 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/l2vpn.c,v 1.1 2004-06-15 09:42:40 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/l2vpn.h b/contrib/tcpdump/l2vpn.h
index 64eb024..766cda5 100755
--- a/contrib/tcpdump/l2vpn.h
+++ b/contrib/tcpdump/l2vpn.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/l2vpn.h,v 1.1 2004/06/15 09:42:41 hannes Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/l2vpn.h,v 1.1 2004-06-15 09:42:41 hannes Exp $ (LBL) */
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
diff --git a/contrib/tcpdump/lane.h b/contrib/tcpdump/lane.h
index 51b6e19..76cc020 100644
--- a/contrib/tcpdump/lane.h
+++ b/contrib/tcpdump/lane.h
@@ -20,7 +20,7 @@
*
*/
-/* $Id: lane.h,v 1.7 2002/12/11 07:13:54 guy Exp $ */
+/* $Id: lane.h,v 1.7 2002-12-11 07:13:54 guy Exp $ */
#ifndef ETHER_ADDR_LEN
#define ETHER_ADDR_LEN 6
diff --git a/contrib/tcpdump/lbl/os-osf4.h b/contrib/tcpdump/lbl/os-osf4.h
index 62866ed..5682b7e 100644
--- a/contrib/tcpdump/lbl/os-osf4.h
+++ b/contrib/tcpdump/lbl/os-osf4.h
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-osf4.h,v 1.1 2002/12/11 05:03:13 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-osf4.h,v 1.1 2002-12-11 05:03:13 guy Exp $ (LBL)
*/
/* Prototypes missing in Digital UNIX 4.x */
diff --git a/contrib/tcpdump/lbl/os-solaris2.h b/contrib/tcpdump/lbl/os-solaris2.h
index de481c2..5c01b87 100644
--- a/contrib/tcpdump/lbl/os-solaris2.h
+++ b/contrib/tcpdump/lbl/os-solaris2.h
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-solaris2.h,v 1.19 2000/10/11 04:02:15 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-solaris2.h,v 1.19 2000-10-11 04:02:15 guy Exp $ (LBL)
*/
/* Prototypes missing in SunOS 5 */
diff --git a/contrib/tcpdump/lbl/os-sunos4.h b/contrib/tcpdump/lbl/os-sunos4.h
index 2e0f25f..51a70dd 100644
--- a/contrib/tcpdump/lbl/os-sunos4.h
+++ b/contrib/tcpdump/lbl/os-sunos4.h
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-sunos4.h,v 1.32.1.1 1999/10/07 23:47:13 mcr Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-sunos4.h,v 1.32.1.1 1999-10-07 23:47:13 mcr Exp $ (LBL)
*/
/* Prototypes missing in SunOS 4 */
diff --git a/contrib/tcpdump/lbl/os-ultrix4.h b/contrib/tcpdump/lbl/os-ultrix4.h
index 676b3bd..1b154ee 100644
--- a/contrib/tcpdump/lbl/os-ultrix4.h
+++ b/contrib/tcpdump/lbl/os-ultrix4.h
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-ultrix4.h,v 1.19.1.1 1999/10/07 23:47:13 mcr Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/lbl/os-ultrix4.h,v 1.19.1.1 1999-10-07 23:47:13 mcr Exp $ (LBL)
*/
/* Prototypes missing in Ultrix 4 */
diff --git a/contrib/tcpdump/llc.h b/contrib/tcpdump/llc.h
index fc04c67..faa7256 100644
--- a/contrib/tcpdump/llc.h
+++ b/contrib/tcpdump/llc.h
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/llc.h,v 1.17.2.4 2007/02/08 07:07:51 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/llc.h,v 1.23 2007-04-13 09:43:11 hannes Exp $ (LBL)
*/
/*
@@ -104,6 +104,8 @@
#define PID_CISCO_CDP 0x2000 /* Cisco Discovery Protocol */
#define PID_CISCO_VTP 0x2003 /* Cisco VLAN Trunk Protocol */
#define PID_CISCO_DTP 0x2004 /* Cisco Dynamic Trunk Protocol */
+#define PID_CISCO_UDLD 0x0111 /* Unidirectional Link Detection */
+#define PID_CISCO_PVST 0x010b /* Per VLAN Spanning Tree+ and RPVST+ */
/*
* PIDs for use with OUI_RFC2684.
diff --git a/contrib/tcpdump/machdep.c b/contrib/tcpdump/machdep.c
index 5b04503..2bcf317 100644
--- a/contrib/tcpdump/machdep.c
+++ b/contrib/tcpdump/machdep.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/machdep.c,v 1.13 2003/12/15 03:53:21 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/machdep.c,v 1.13 2003-12-15 03:53:21 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/machdep.h b/contrib/tcpdump/machdep.h
index 8d49a7a..6328c82 100644
--- a/contrib/tcpdump/machdep.h
+++ b/contrib/tcpdump/machdep.h
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/machdep.h,v 1.2 2000/01/17 06:24:24 itojun Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/machdep.h,v 1.2 2000-01-17 06:24:24 itojun Exp $ (LBL)
*/
#ifndef tcpdump_machdep_h
#define tcpdump_machdep_h
diff --git a/contrib/tcpdump/makemib b/contrib/tcpdump/makemib
index 2c80bef..b59e2f1 100755
--- a/contrib/tcpdump/makemib
+++ b/contrib/tcpdump/makemib
@@ -27,7 +27,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-# @(#) $Id: makemib,v 1.3 2001/09/17 22:16:52 fenner Exp $ (jlv)
+# @(#) $Id: makemib,v 1.3 2001-09-17 22:16:52 fenner Exp $ (jlv)
#
# This script will read either ASN.1-style MIB files or the ".defs" files
diff --git a/contrib/tcpdump/missing/addrinfo.h b/contrib/tcpdump/missing/addrinfo.h
index 09f6a42..1b5f92e 100644
--- a/contrib/tcpdump/missing/addrinfo.h
+++ b/contrib/tcpdump/missing/addrinfo.h
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
-/* $Id: addrinfo.h,v 1.4 2002/06/11 17:13:36 itojun Exp $ */
+/* $Id: addrinfo.h,v 1.4 2002-06-11 17:13:36 itojun Exp $ */
#ifndef HAVE_ADDRINFO
diff --git a/contrib/tcpdump/missing/datalinks.c b/contrib/tcpdump/missing/datalinks.c
index 2cc1267..1bd8644 100644
--- a/contrib/tcpdump/missing/datalinks.c
+++ b/contrib/tcpdump/missing/datalinks.c
@@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/datalinks.c,v 1.3 2003/11/16 09:36:47 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/datalinks.c,v 1.3 2003-11-16 09:36:47 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/missing/dlnames.c b/contrib/tcpdump/missing/dlnames.c
index f4f583e..32072b7 100644
--- a/contrib/tcpdump/missing/dlnames.c
+++ b/contrib/tcpdump/missing/dlnames.c
@@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/dlnames.c,v 1.5 2003/11/18 23:09:43 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/dlnames.c,v 1.5 2003-11-18 23:09:43 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/missing/getaddrinfo.c b/contrib/tcpdump/missing/getaddrinfo.c
index 8830322..f59b2c4 100644
--- a/contrib/tcpdump/missing/getaddrinfo.c
+++ b/contrib/tcpdump/missing/getaddrinfo.c
@@ -51,7 +51,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/getaddrinfo.c,v 1.13 2003/11/16 09:36:48 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/getaddrinfo.c,v 1.13 2003-11-16 09:36:48 guy Exp $";
#endif
#include <sys/types.h>
diff --git a/contrib/tcpdump/missing/getnameinfo.c b/contrib/tcpdump/missing/getnameinfo.c
index 6bd5b47..c287221 100644
--- a/contrib/tcpdump/missing/getnameinfo.c
+++ b/contrib/tcpdump/missing/getnameinfo.c
@@ -43,7 +43,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/getnameinfo.c,v 1.11 2003/11/16 09:36:49 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/getnameinfo.c,v 1.11 2003-11-16 09:36:49 guy Exp $";
#endif
#include <sys/types.h>
diff --git a/contrib/tcpdump/missing/inet_aton.c b/contrib/tcpdump/missing/inet_aton.c
index a4b2eeb..bc1461a 100644
--- a/contrib/tcpdump/missing/inet_aton.c
+++ b/contrib/tcpdump/missing/inet_aton.c
@@ -36,11 +36,11 @@
* SUCH DAMAGE.
*/
-/* $Id: inet_aton.c,v 1.6 2003/11/16 09:36:49 guy Exp $ */
+/* $Id: inet_aton.c,v 1.6 2003-11-16 09:36:49 guy Exp $ */
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_aton.c,v 1.6 2003/11/16 09:36:49 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_aton.c,v 1.6 2003-11-16 09:36:49 guy Exp $";
#endif
#include <tcpdump-stdinc.h>
diff --git a/contrib/tcpdump/missing/inet_ntop.c b/contrib/tcpdump/missing/inet_ntop.c
index 8bbbad6..d17d592 100644
--- a/contrib/tcpdump/missing/inet_ntop.c
+++ b/contrib/tcpdump/missing/inet_ntop.c
@@ -36,11 +36,11 @@
* SUCH DAMAGE.
*/
-/* $Id: inet_ntop.c,v 1.8 2005/02/09 02:25:46 guy Exp $ */
+/* $Id: inet_ntop.c,v 1.8 2005-02-09 02:25:46 guy Exp $ */
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_ntop.c,v 1.8 2005/02/09 02:25:46 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_ntop.c,v 1.8 2005-02-09 02:25:46 guy Exp $";
#endif
#include <tcpdump-stdinc.h>
diff --git a/contrib/tcpdump/missing/inet_pton.c b/contrib/tcpdump/missing/inet_pton.c
index 1b8abd2..83f67e1 100644
--- a/contrib/tcpdump/missing/inet_pton.c
+++ b/contrib/tcpdump/missing/inet_pton.c
@@ -36,11 +36,11 @@
* SUCH DAMAGE.
*/
-/* $Id: inet_pton.c,v 1.6 2003/11/16 09:36:51 guy Exp $ */
+/* $Id: inet_pton.c,v 1.6 2003-11-16 09:36:51 guy Exp $ */
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_pton.c,v 1.6 2003/11/16 09:36:51 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/inet_pton.c,v 1.6 2003-11-16 09:36:51 guy Exp $";
#endif
#include <tcpdump-stdinc.h>
diff --git a/contrib/tcpdump/missing/snprintf.c b/contrib/tcpdump/missing/snprintf.c
index 4f2bb32..7932997 100644
--- a/contrib/tcpdump/missing/snprintf.c
+++ b/contrib/tcpdump/missing/snprintf.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*/
-/* $Id: snprintf.c,v 1.8 2003/11/16 09:36:51 guy Exp $ */
+/* $Id: snprintf.c,v 1.8 2003-11-16 09:36:51 guy Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -39,7 +39,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/snprintf.c,v 1.8 2003/11/16 09:36:51 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/snprintf.c,v 1.8 2003-11-16 09:36:51 guy Exp $";
#endif
#include <stdio.h>
diff --git a/contrib/tcpdump/missing/strdup.c b/contrib/tcpdump/missing/strdup.c
index 103c3b2..079a8ff 100644
--- a/contrib/tcpdump/missing/strdup.c
+++ b/contrib/tcpdump/missing/strdup.c
@@ -33,7 +33,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/strdup.c,v 1.1 2001/01/20 07:26:08 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/strdup.c,v 1.1 2001-01-20 07:26:08 guy Exp $ (LBL)";
#endif /* LIBC_SCCS and not lint */
#include <stddef.h>
diff --git a/contrib/tcpdump/missing/strlcat.c b/contrib/tcpdump/missing/strlcat.c
index fca2e8a..a3d3fac 100644
--- a/contrib/tcpdump/missing/strlcat.c
+++ b/contrib/tcpdump/missing/strlcat.c
@@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/strlcat.c,v 1.5 2003/11/16 09:36:51 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/strlcat.c,v 1.5 2003-11-16 09:36:51 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/missing/strlcpy.c b/contrib/tcpdump/missing/strlcpy.c
index 3f1809a..a92e4d1 100644
--- a/contrib/tcpdump/missing/strlcpy.c
+++ b/contrib/tcpdump/missing/strlcpy.c
@@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/strlcpy.c,v 1.5 2003/11/16 09:36:52 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/strlcpy.c,v 1.5 2003-11-16 09:36:52 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/missing/strsep.c b/contrib/tcpdump/missing/strsep.c
index 19fb6b2..0362d1f 100644
--- a/contrib/tcpdump/missing/strsep.c
+++ b/contrib/tcpdump/missing/strsep.c
@@ -33,7 +33,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/missing/strsep.c,v 1.3 2003/03/25 08:33:48 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/missing/strsep.c,v 1.3 2003-03-25 08:33:48 guy Exp $ (LBL)";
#endif /* LIBC_SCCS and not lint */
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/mpls.h b/contrib/tcpdump/mpls.h
index 69fc9c9..ae1c97e 100644
--- a/contrib/tcpdump/mpls.h
+++ b/contrib/tcpdump/mpls.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/mpls.h,v 1.1 2004/06/14 14:47:58 hannes Exp $ (LBL)
+/* @(#) $Header: /tcpdump/master/tcpdump/mpls.h,v 1.1 2004-06-14 14:47:58 hannes Exp $ (LBL)
* Copyright (C) 2001 WIDE Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/contrib/tcpdump/nameser.h b/contrib/tcpdump/nameser.h
index e6391f4..f441f3e 100644
--- a/contrib/tcpdump/nameser.h
+++ b/contrib/tcpdump/nameser.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/nameser.h,v 1.14.4.2 2006/11/10 03:15:35 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/nameser.h,v 1.16 2006-11-10 03:18:21 guy Exp $ (LBL) */
/*
* Copyright (c) 1983, 1989, 1993
* The Regents of the University of California. All rights reserved.
diff --git a/contrib/tcpdump/netbios.h b/contrib/tcpdump/netbios.h
index 34abeba..d3e2725 100644
--- a/contrib/tcpdump/netbios.h
+++ b/contrib/tcpdump/netbios.h
@@ -1,7 +1,7 @@
/*
* NETBIOS protocol formats
*
- * @(#) $Header: /tcpdump/master/tcpdump/netbios.h,v 1.3 2002/12/11 07:13:55 guy Exp $
+ * @(#) $Header: /tcpdump/master/tcpdump/netbios.h,v 1.3 2002-12-11 07:13:55 guy Exp $
*/
struct p8022Hdr {
diff --git a/contrib/tcpdump/netdissect.h b/contrib/tcpdump/netdissect.h
index 3609455..cd6f2f1 100644
--- a/contrib/tcpdump/netdissect.h
+++ b/contrib/tcpdump/netdissect.h
@@ -21,7 +21,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.16.2.4 2006/02/08 01:40:09 hannes Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.23.2.2 2008-04-04 19:42:52 guy Exp $ (LBL)
*/
#ifndef netdissect_h
@@ -77,6 +77,7 @@ extern const char *tok2strbuf(const struct tok *, const char *, int,
/* tok2str is deprecated */
extern const char *tok2str(const struct tok *, const char *, int);
extern char *bittok2str(const struct tok *, const char *, int);
+extern char *bittok2str_nosep(const struct tok *, const char *, int);
typedef struct netdissect_options netdissect_options;
@@ -85,6 +86,7 @@ struct netdissect_options {
int ndo_aflag; /* translate network and broadcast addresses */
int ndo_eflag; /* print ethernet header */
int ndo_fflag; /* don't translate "foreign" IP address */
+ int ndo_Kflag; /* don't check TCP checksums */
int ndo_nflag; /* leave addresses as numbers */
int ndo_Nflag; /* remove domains from printed host names */
int ndo_qflag; /* quick (shorter) output */
@@ -100,12 +102,17 @@ struct netdissect_options {
int ndo_Aflag; /* print packet only in ascii observing TAB,
* LF, CR and SPACE as graphical chars
*/
+ int ndo_Bflag; /* buffer size */
+ int ndo_Iflag; /* rfmon (monitor) mode */
int ndo_Oflag; /* run filter code optimizer */
int ndo_dlt; /* if != -1, ask libpcap for the DLT it names*/
int ndo_pflag; /* don't go promiscuous */
int ndo_Cflag; /* rotate dump files after this many bytes */
int ndo_Cflag_count; /* Keep track of which file number we're writing */
+ int ndo_Gflag; /* rotate dump files after this many seconds */
+ int ndo_Gflag_count; /* number of files created with Gflag rotation */
+ time_t ndo_Gflag_time; /* The last time_t the dump file was rotated. */
int ndo_Wflag; /* recycle output files after this number of files */
int ndo_WflagChars;
int ndo_suppress_default_print; /* don't use default_print() for unknown packet types */
@@ -245,7 +252,7 @@ extern const char *dnnum_string(netdissect_options *, u_short);
#include <pcap.h>
-extern void eap_print(netdissect_options *,const u_char *, u_int);
+extern void eap_print(netdissect_options *,const u_char *, u_int);
extern int esp_print(netdissect_options *,
register const u_char *bp, int len, register const u_char *bp2,
int *nhdr, int *padlen);
@@ -258,6 +265,7 @@ extern void ip_print(netdissect_options *,const u_char *, u_int);
extern void ip_print_inner(netdissect_options *ndo,
const u_char *bp, u_int length, u_int nh,
const u_char *bp2);
+extern void rrcp_print(netdissect_options *,const u_char *, u_int);
/* stuff that has not yet been rototiled */
#if 0
diff --git a/contrib/tcpdump/nfs.h b/contrib/tcpdump/nfs.h
index 82c8dd3..36b788c 100644
--- a/contrib/tcpdump/nfs.h
+++ b/contrib/tcpdump/nfs.h
@@ -1,5 +1,5 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/nfs.h,v 1.7 2002/12/11 07:13:55 guy Exp $ (LBL) */
-/* $NetBSD: nfs.h,v 1.1 1996/05/23 22:49:53 fvdl Exp $ */
+/* @(#) $Header: /tcpdump/master/tcpdump/nfs.h,v 1.8.2.1 2007-11-18 03:24:55 guy Exp $ (LBL) */
+/* NetBSD: nfs.h,v 1.1 1996/05/23 22:49:53 fvdl Exp */
/*
* Copyright (c) 1989, 1993
@@ -287,21 +287,6 @@ struct nfs_uquad {
};
typedef struct nfs_uquad nfsuint64;
-#if 0 /* XXX - this doesn't seemed to be used and it doesn't work
- * with non-gcc, so comment it out for now.
- */
-
-/*
- * Used to convert between two u_longs and a u_quad_t.
- */
-union nfs_quadconvert {
- u_int32_t lval[2];
- u_int64_t qval;
-};
-typedef union nfs_quadconvert nfsquad_t;
-
-#endif
-
/*
* NFS Version 3 special file number.
*/
diff --git a/contrib/tcpdump/nfsfh.h b/contrib/tcpdump/nfsfh.h
index 8a337ba..8236713 100644
--- a/contrib/tcpdump/nfsfh.h
+++ b/contrib/tcpdump/nfsfh.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/nfsfh.h,v 1.13 2002/04/24 06:27:05 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/nfsfh.h,v 1.13 2002-04-24 06:27:05 guy Exp $ (LBL) */
/*
* Copyright (c) 1993, 1994 Jeffrey C. Mogul, Digital Equipment Corporation,
diff --git a/contrib/tcpdump/nlpid.c b/contrib/tcpdump/nlpid.c
index 7dfd6a6..47ebb53 100755
--- a/contrib/tcpdump/nlpid.c
+++ b/contrib/tcpdump/nlpid.c
@@ -15,7 +15,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/nlpid.c,v 1.4 2004/10/19 15:27:55 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/nlpid.c,v 1.4 2004-10-19 15:27:55 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/nlpid.h b/contrib/tcpdump/nlpid.h
index fdca446..31f6b66 100644
--- a/contrib/tcpdump/nlpid.h
+++ b/contrib/tcpdump/nlpid.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/nlpid.h,v 1.4 2004/10/19 15:27:55 hannes Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/nlpid.h,v 1.4 2004-10-19 15:27:55 hannes Exp $ (LBL) */
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
diff --git a/contrib/tcpdump/ntp.h b/contrib/tcpdump/ntp.h
index df85669..0614f73 100644
--- a/contrib/tcpdump/ntp.h
+++ b/contrib/tcpdump/ntp.h
@@ -1,4 +1,4 @@
-/* $Header: /tcpdump/master/tcpdump/ntp.h,v 1.8 2004/01/28 14:34:50 hannes Exp $ */
+/* $Header: /tcpdump/master/tcpdump/ntp.h,v 1.8 2004-01-28 14:34:50 hannes Exp $ */
/*
* Based on ntp.h from the U of MD implementation
diff --git a/contrib/tcpdump/oakley.h b/contrib/tcpdump/oakley.h
index f40d607..ad32817 100644
--- a/contrib/tcpdump/oakley.h
+++ b/contrib/tcpdump/oakley.h
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
-/* YIPS @(#)$Id: oakley.h,v 1.4 2002/12/11 07:13:56 guy Exp $ */
+/* YIPS @(#)$Id: oakley.h,v 1.4 2002-12-11 07:13:56 guy Exp $ */
/* refer to RFC 2409 */
diff --git a/contrib/tcpdump/ospf.h b/contrib/tcpdump/ospf.h
index 91a904f..2b1c6ee 100644
--- a/contrib/tcpdump/ospf.h
+++ b/contrib/tcpdump/ospf.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ospf.h,v 1.16.2.2 2006/12/13 08:24:27 hannes Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/ospf.h,v 1.23 2007-10-08 07:53:21 hannes Exp $ (LBL) */
/*
* Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997
* The Regents of the University of California. All rights reserved.
@@ -31,7 +31,7 @@
/* Options field
*
* +------------------------------------+
- * | * | O | DC | EA | N/P | MC | E | T |
+ * | DN | O | DC | L | N/P | MC | E | T |
* +------------------------------------+
*
*/
@@ -41,6 +41,7 @@
#define OSPF_OPTION_MC 0x04 /* MC bit: Multicast capable */
#define OSPF_OPTION_NP 0x08 /* N/P bit: NSSA capable */
#define OSPF_OPTION_EA 0x10 /* EA bit: External Attribute capable */
+#define OSPF_OPTION_L 0x10 /* L bit: Packet contains LLS data block */
#define OSPF_OPTION_DC 0x20 /* DC bit: Demand circuit capable */
#define OSPF_OPTION_O 0x40 /* O bit: Opaque LSA capable */
#define OSPF_OPTION_DN 0x80 /* DN bit: Up/Down Bit capable - draft-ietf-ospf-2547-dnbit-04 */
@@ -53,9 +54,10 @@
#define OSPF_AUTH_MD5_LEN 16 /* length of MD5 authentication */
/* db_flags */
-#define OSPF_DB_INIT 0x04 /* */
+#define OSPF_DB_INIT 0x04
#define OSPF_DB_MORE 0x02
-#define OSPF_DB_MASTER 0x01
+#define OSPF_DB_MASTER 0x01
+#define OSPF_DB_RESYNC 0x08 /* RFC4811 */
/* ls_type */
#define LS_TYPE_ROUTER 1 /* router link */
@@ -86,10 +88,10 @@
#define LS_OPAQUE_TE_LINK_SUBTLV_MAX_RES_BW 7 /* rfc3630 */
#define LS_OPAQUE_TE_LINK_SUBTLV_UNRES_BW 8 /* rfc3630 */
#define LS_OPAQUE_TE_LINK_SUBTLV_ADMIN_GROUP 9 /* rfc3630 */
-#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_LOCAL_REMOTE_ID 11 /* draft-ietf-ccamp-ospf-gmpls-extensions */
-#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_PROTECTION_TYPE 14 /* draft-ietf-ccamp-ospf-gmpls-extensions */
-#define LS_OPAQUE_TE_LINK_SUBTLV_INTF_SW_CAP_DESCR 15 /* draft-ietf-ccamp-ospf-gmpls-extensions */
-#define LS_OPAQUE_TE_LINK_SUBTLV_SHARED_RISK_GROUP 16 /* draft-ietf-ccamp-ospf-gmpls-extensions */
+#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_LOCAL_REMOTE_ID 11 /* rfc4203 */
+#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_PROTECTION_TYPE 14 /* rfc4203 */
+#define LS_OPAQUE_TE_LINK_SUBTLV_INTF_SW_CAP_DESCR 15 /* rfc4203 */
+#define LS_OPAQUE_TE_LINK_SUBTLV_SHARED_RISK_GROUP 16 /* rfc4203 */
#define LS_OPAQUE_TE_LINK_SUBTLV_BW_CONSTRAINTS 17 /* rfc4124 */
#define LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE_PTP 1 /* rfc3630 */
@@ -106,12 +108,6 @@
#define LS_OPAQUE_RI_TLV_CAP 1 /* draft-ietf-ospf-cap-03 */
-/*************************************************
- *
- * is the above a bug in the documentation?
- *
- *************************************************/
-
/* rla_link.link_type */
#define RLA_TYPE_ROUTER 1 /* point-to-point to another router */
@@ -140,6 +136,31 @@
#define MCLA_VERTEX_ROUTER 1
#define MCLA_VERTEX_NETWORK 2
+/* Link-Local-Signaling */
+#define OSPF_LLS_EO 1 /* RFC4811, RFC4812 */
+#define OSPF_LLS_MD5 2 /* RFC4813 */
+
+#define OSPF_LLS_EO_LR 0x00000001 /* RFC4811 */
+#define OSPF_LLS_EO_RS 0x00000002 /* RFC4812 */
+
+/*
+ * TOS metric struct (will be 0 or more in router links update)
+ */
+struct tos_metric {
+ u_int8_t tos_type;
+ u_int8_t reserved;
+ u_int8_t tos_metric[2];
+};
+struct tos_link {
+ u_int8_t link_type;
+ u_int8_t link_tos_count;
+ u_int8_t tos_metric[2];
+};
+union un_tos {
+ struct tos_link link;
+ struct tos_metric metrics;
+};
+
/* link state advertisement header */
struct lsa_hdr {
u_int16_t ls_age;
@@ -172,9 +193,7 @@ struct lsa {
struct rlalink {
struct in_addr link_id;
struct in_addr link_data;
- u_int8_t link_type;
- u_int8_t link_toscount;
- u_int16_t link_tos0metric;
+ union un_tos un_tos;
} rla_link[1]; /* may repeat */
} un_rla;
@@ -235,16 +254,6 @@ struct lsa {
} lsa_un;
};
-
-/*
- * TOS metric struct (will be 0 or more in router links update)
- */
-struct tos_metric {
- u_int8_t tos_type;
- u_int8_t tos_zero;
- u_int16_t tos_metric;
-};
-
#define OSPF_AUTH_SIZE 8
/*
@@ -275,7 +284,7 @@ struct ospfhdr {
/* Database Description packet */
struct {
- u_int8_t db_zero[2];
+ u_int16_t db_ifmtu;
u_int8_t db_options;
u_int8_t db_flags;
u_int32_t db_seq;
@@ -314,3 +323,6 @@ struct ospfhdr {
#define ospf_lsu ospf_un.un_lsu
#define ospf_lsa ospf_un.un_lsa
+/* Functions shared by ospf and ospf6 */
+extern int ospf_print_te_lsa(u_int8_t *, u_int);
+extern int ospf_print_grace_lsa(u_int8_t *, u_int);
diff --git a/contrib/tcpdump/ospf6.h b/contrib/tcpdump/ospf6.h
index b8298ea..e2eabee 100644
--- a/contrib/tcpdump/ospf6.h
+++ b/contrib/tcpdump/ospf6.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ospf6.h,v 1.6 2002/12/11 07:13:56 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/ospf6.h,v 1.7 2006-09-05 15:50:26 hannes Exp $ (LBL) */
/*
* Copyright (c) 1991, 1993, 1994, 1995, 1996, 1997
* The Regents of the University of California. All rights reserved.
@@ -21,13 +21,11 @@
*
* OSPF support contributed by Jeffrey Honig (jch@mitchell.cit.cornell.edu)
*/
-#define OSPF_TYPE_UMD 0 /* UMd's special monitoring packets */
-#define OSPF_TYPE_HELLO 1 /* Hello */
-#define OSPF_TYPE_DB 2 /* Database Description */
-#define OSPF_TYPE_LSR 3 /* Link State Request */
-#define OSPF_TYPE_LSU 4 /* Link State Update */
-#define OSPF_TYPE_LSA 5 /* Link State Ack */
-#define OSPF_TYPE_MAX 6
+#define OSPF_TYPE_HELLO 1 /* Hello */
+#define OSPF_TYPE_DD 2 /* Database Description */
+#define OSPF_TYPE_LS_REQ 3 /* Link State Request */
+#define OSPF_TYPE_LS_UPDATE 4 /* Link State Update */
+#define OSPF_TYPE_LS_ACK 5 /* Link State Ack */
/* Options *_options */
#define OSPF6_OPTION_V6 0x01 /* V6 bit: A bit for peeping tom */
@@ -50,23 +48,18 @@
#define LS_TYPE_INTER_AR 4 /* Inter-Area-Router */
#define LS_TYPE_ASE 5 /* ASE */
#define LS_TYPE_GROUP 6 /* Group membership */
-#define LS_TYPE_TYPE7 7 /* Type 7 LSA */
+#define LS_TYPE_NSSA 7 /* NSSA */
#define LS_TYPE_LINK 8 /* Link LSA */
#define LS_TYPE_INTRA_AP 9 /* Intra-Area-Prefix */
-#define LS_TYPE_MAX 10
+#define LS_TYPE_INTRA_ATE 10 /* Intra-Area-TE */
+#define LS_TYPE_GRACE 11 /* Grace LSA */
#define LS_TYPE_MASK 0x1fff
#define LS_SCOPE_LINKLOCAL 0x0000
#define LS_SCOPE_AREA 0x2000
#define LS_SCOPE_AS 0x4000
#define LS_SCOPE_MASK 0x6000
-
-/*************************************************
- *
- * is the above a bug in the documentation?
- *
- *************************************************/
-
+#define LS_SCOPE_U 0x8000
/* rla_link.link_type */
#define RLA_TYPE_ROUTER 1 /* point-to-point to another router */
@@ -78,6 +71,14 @@
#define RLA_FLAG_E 0x02
#define RLA_FLAG_V 0x04
#define RLA_FLAG_W 0x08
+#define RLA_FLAG_N 0x10
+
+/* lsa_prefix options */
+#define LSA_PREFIX_OPT_NU 0x01
+#define LSA_PREFIX_OPT_LA 0x02
+#define LSA_PREFIX_OPT_MC 0x04
+#define LSA_PREFIX_OPT_P 0x08
+#define LSA_PREFIX_OPT_DN 0x10
/* sla_tosmetric breakdown */
#define SLA_MASK_TOS 0x7f000000
@@ -85,19 +86,14 @@
#define SLA_SHIFT_TOS 24
/* asla_metric */
-#define ASLA_FLAG_EXTERNAL 0x04000000
#define ASLA_FLAG_FWDADDR 0x02000000
#define ASLA_FLAG_ROUTETAG 0x01000000
#define ASLA_MASK_METRIC 0x00ffffff
-/* multicast vertex type */
-#define MCLA_VERTEX_ROUTER 1
-#define MCLA_VERTEX_NETWORK 2
-
typedef u_int32_t rtrid_t;
/* link state advertisement header */
-struct lsa_hdr {
+struct lsa6_hdr {
u_int16_t ls_age;
u_int16_t ls_type;
rtrid_t ls_stateid;
@@ -107,16 +103,16 @@ struct lsa_hdr {
u_int16_t ls_length;
};
-struct lsa_prefix {
+struct lsa6_prefix {
u_int8_t lsa_p_len;
u_int8_t lsa_p_opt;
- u_int16_t lsa_p_mbz;
+ u_int16_t lsa_p_metric;
u_int8_t lsa_p_prefix[4];
};
/* link state advertisement */
-struct lsa {
- struct lsa_hdr ls_hdr;
+struct lsa6 {
+ struct lsa6_hdr ls_hdr;
/* Link state types */
union {
@@ -128,7 +124,7 @@ struct lsa {
} rla_flgandopt;
#define rla_flags rla_flgandopt.flg
#define rla_options rla_flgandopt.opt
- struct rlalink {
+ struct rlalink6 {
u_int8_t link_type;
u_int8_t link_zero[1];
u_int16_t link_metric;
@@ -147,13 +143,13 @@ struct lsa {
/* Inter Area Prefix LSA */
struct {
u_int32_t inter_ap_metric;
- struct lsa_prefix inter_ap_prefix[1];
+ struct lsa6_prefix inter_ap_prefix[1];
} un_inter_ap;
/* AS external links advertisements */
struct {
u_int32_t asla_metric;
- struct lsa_prefix asla_prefix[1];
+ struct lsa6_prefix asla_prefix[1];
/* some optional fields follow */
} un_asla;
@@ -183,7 +179,7 @@ struct lsa {
#define llsa_options llsa_priandopt.opt
struct in6_addr llsa_lladdr;
u_int32_t llsa_nprefix;
- struct lsa_prefix llsa_prefix[1];
+ struct lsa6_prefix llsa_prefix[1];
} un_llsa;
/* Intra-Area-Prefix */
@@ -192,21 +188,12 @@ struct lsa {
u_int16_t intra_ap_lstype;
rtrid_t intra_ap_lsid;
rtrid_t intra_ap_rtid;
- struct lsa_prefix intra_ap_prefix[1];
+ struct lsa6_prefix intra_ap_prefix[1];
} un_intra_ap;
} lsa_un;
};
-/*
- * TOS metric struct (will be 0 or more in router links update)
- */
-struct tos_metric {
- u_int8_t tos_type;
- u_int8_t tos_zero;
- u_int16_t tos_metric;
-};
-
#define OSPF_AUTH_SIZE 8
/*
@@ -246,11 +233,11 @@ struct ospf6hdr {
u_int8_t db_mbz;
u_int8_t db_flags;
u_int32_t db_seq;
- struct lsa_hdr db_lshdr[1]; /* may repeat */
+ struct lsa6_hdr db_lshdr[1]; /* may repeat */
} un_db;
/* Link State Request */
- struct lsr {
+ struct lsr6 {
u_int16_t ls_mbz;
u_int16_t ls_type;
rtrid_t ls_stateid;
@@ -260,12 +247,12 @@ struct ospf6hdr {
/* Link State Update */
struct {
u_int32_t lsu_count;
- struct lsa lsu_lsa[1]; /* may repeat */
+ struct lsa6 lsu_lsa[1]; /* may repeat */
} un_lsu;
/* Link State Acknowledgement */
struct {
- struct lsa_hdr lsa_lshdr[1]; /* may repeat */
+ struct lsa6_hdr lsa_lshdr[1]; /* may repeat */
} un_lsa ;
} ospf6_un ;
};
diff --git a/contrib/tcpdump/oui.c b/contrib/tcpdump/oui.c
index 7cdcd40..e6569d4 100644
--- a/contrib/tcpdump/oui.c
+++ b/contrib/tcpdump/oui.c
@@ -15,7 +15,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/oui.c,v 1.4.2.1 2005/04/17 01:20:56 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/oui.c,v 1.8.2.1 2008-01-09 09:44:39 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -39,6 +39,9 @@ struct tok oui_values[] = {
{ OUI_APPLETALK, "Appletalk" },
{ OUI_JUNIPER, "Juniper" },
{ OUI_HP, "Hewlett-Packard" },
+ { OUI_IEEE_8021_PRIVATE, "IEEE 802.1 Private"},
+ { OUI_IEEE_8023_PRIVATE, "IEEE 802.3 Private"},
+ { OUI_TIA, "ANSI/TIA"},
{ 0, NULL }
};
diff --git a/contrib/tcpdump/oui.h b/contrib/tcpdump/oui.h
index 4d79e19..e70f82a 100644
--- a/contrib/tcpdump/oui.h
+++ b/contrib/tcpdump/oui.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/oui.h,v 1.3.2.1 2005/04/17 01:20:56 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/oui.h,v 1.7.2.1 2008-01-09 09:44:39 hannes Exp $ (LBL) */
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
@@ -27,6 +27,9 @@ extern struct tok smi_values[];
#define OUI_APPLETALK 0x080007 /* Appletalk */
#define OUI_JUNIPER 0x009069 /* Juniper */
#define OUI_HP 0x080009 /* Hewlett-Packard */
+#define OUI_IEEE_8021_PRIVATE 0x0080c2 /* IEEE 802.1 Organisation Specific - Annex F */
+#define OUI_IEEE_8023_PRIVATE 0x00120f /* IEEE 802.3 Organisation Specific - Annex G */
+#define OUI_TIA 0x0012bb /* TIA - Telecommunications Industry Association - ANSI/TIA-1057- 2006 */
/*
* These are SMI Network Management Private Enterprise Codes for
diff --git a/contrib/tcpdump/parsenfsfh.c b/contrib/tcpdump/parsenfsfh.c
index 4aa8191..bf575e0 100644
--- a/contrib/tcpdump/parsenfsfh.c
+++ b/contrib/tcpdump/parsenfsfh.c
@@ -44,7 +44,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/parsenfsfh.c,v 1.28.2.1 2007/06/15 19:15:04 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/parsenfsfh.c,v 1.29 2006-06-13 22:21:38 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/pcap-missing.h b/contrib/tcpdump/pcap-missing.h
index 1f2fcb4..5c0ece2 100644
--- a/contrib/tcpdump/pcap-missing.h
+++ b/contrib/tcpdump/pcap-missing.h
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/pcap-missing.h,v 1.2.2.1 2005/06/03 22:10:16 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/pcap-missing.h,v 1.3 2005-06-03 22:08:52 guy Exp $ (LBL)
*/
#ifndef tcpdump_pcap_missing_h
diff --git a/contrib/tcpdump/pcap_dump_ftell.c b/contrib/tcpdump/pcap_dump_ftell.c
index 438cd29..6eb3a4a 100644
--- a/contrib/tcpdump/pcap_dump_ftell.c
+++ b/contrib/tcpdump/pcap_dump_ftell.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/pcap_dump_ftell.c,v 1.1.2.1 2005/06/03 22:10:17 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/pcap_dump_ftell.c,v 1.1 2005-06-03 22:08:52 guy Exp $ (LBL)";
#endif
#include <stdio.h>
diff --git a/contrib/tcpdump/pmap_prot.h b/contrib/tcpdump/pmap_prot.h
index 17cb92f..949c399 100644
--- a/contrib/tcpdump/pmap_prot.h
+++ b/contrib/tcpdump/pmap_prot.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/pmap_prot.h,v 1.1.2.2 2005/04/27 21:44:06 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/pmap_prot.h,v 1.3 2005-04-27 21:43:48 guy Exp $ (LBL) */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
@@ -30,6 +30,7 @@
* from: @(#)pmap_prot.h 1.14 88/02/08 SMI
* from: @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC
* $FreeBSD$
+ * FreeBSD: src/include/rpc/pmap_prot.h,v 1.9.2.1 1999/08/29 14:39:05 peter Exp
*/
/*
diff --git a/contrib/tcpdump/ppp.h b/contrib/tcpdump/ppp.h
index 9c4b473..3ae519b 100644
--- a/contrib/tcpdump/ppp.h
+++ b/contrib/tcpdump/ppp.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/ppp.h,v 1.16 2004/10/20 16:14:16 hannes Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/ppp.h,v 1.16 2004-10-20 16:14:16 hannes Exp $ (LBL) */
/*
* Point to Point Protocol (PPP) RFC1331
*
diff --git a/contrib/tcpdump/print-802_11.c b/contrib/tcpdump/print-802_11.c
index 100730a..d7eb371 100644
--- a/contrib/tcpdump/print-802_11.c
+++ b/contrib/tcpdump/print-802_11.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.31.2.15 2007/07/22 23:14:14 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.47.2.2 2007-12-29 23:25:28 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -286,7 +286,7 @@ parse_elements(struct mgmt_body_t *pbody, const u_char *p, int offset)
if (pbody->tim.length <= 3)
break;
- if (pbody->tim.length - 3 > sizeof pbody->tim.bitmap)
+ if (pbody->tim.length - 3 > (int)sizeof pbody->tim.bitmap)
return;
if (!TTEST2(*(p + offset), pbody->tim.length - 3))
return;
@@ -1325,6 +1325,11 @@ ieee802_11_avs_radio_print(const u_char *p, u_int length, u_int caplen)
{
u_int32_t caphdr_len;
+ if (caplen < 8) {
+ printf("[|802.11]");
+ return caplen;
+ }
+
caphdr_len = EXTRACT_32BITS(p + 4);
if (caphdr_len < 8) {
/*
@@ -1347,32 +1352,38 @@ ieee802_11_avs_radio_print(const u_char *p, u_int length, u_int caplen)
#define PRISM_HDR_LEN 144
+#define WLANCAP_MAGIC_COOKIE_BASE 0x80211000
#define WLANCAP_MAGIC_COOKIE_V1 0x80211001
+#define WLANCAP_MAGIC_COOKIE_V2 0x80211002
/*
* For DLT_PRISM_HEADER; like DLT_IEEE802_11, but with an extra header,
* containing information such as radio information, which we
* currently ignore.
*
- * If, however, the packet begins with WLANCAP_MAGIC_COOKIE_V1, it's
- * really DLT_IEEE802_11_RADIO (currently, on Linux, there's no
- * ARPHRD_ type for DLT_IEEE802_11_RADIO, as there is a
- * ARPHRD_IEEE80211_PRISM for DLT_PRISM_HEADER, so
- * ARPHRD_IEEE80211_PRISM is used for DLT_IEEE802_11_RADIO, and
- * the first 4 bytes of the header are used to indicate which it is).
+ * If, however, the packet begins with WLANCAP_MAGIC_COOKIE_V1 or
+ * WLANCAP_MAGIC_COOKIE_V2, it's really DLT_IEEE802_11_RADIO_AVS
+ * (currently, on Linux, there's no ARPHRD_ type for
+ * DLT_IEEE802_11_RADIO_AVS, as there is a ARPHRD_IEEE80211_PRISM
+ * for DLT_PRISM_HEADER, so ARPHRD_IEEE80211_PRISM is used for
+ * the AVS header, and the first 4 bytes of the header are used to
+ * indicate whether it's a Prism header or an AVS header).
*/
u_int
prism_if_print(const struct pcap_pkthdr *h, const u_char *p)
{
u_int caplen = h->caplen;
u_int length = h->len;
+ u_int32_t msgcode;
if (caplen < 4) {
printf("[|802.11]");
return caplen;
}
- if (EXTRACT_32BITS(p) == WLANCAP_MAGIC_COOKIE_V1)
+ msgcode = EXTRACT_32BITS(p);
+ if (msgcode == WLANCAP_MAGIC_COOKIE_V1 ||
+ msgcode == WLANCAP_MAGIC_COOKIE_V2)
return ieee802_11_avs_radio_print(p, length, caplen);
if (caplen < PRISM_HDR_LEN) {
@@ -1386,19 +1397,21 @@ prism_if_print(const struct pcap_pkthdr *h, const u_char *p)
/*
* For DLT_IEEE802_11_RADIO; like DLT_IEEE802_11, but with an extra
- * header, containing information such as radio information, which we
- * currently ignore.
+ * header, containing information such as radio information.
*/
u_int
ieee802_11_radio_if_print(const struct pcap_pkthdr *h, const u_char *p)
{
- u_int caplen = h->caplen;
- u_int length = h->len;
-
- if (caplen < 8) {
- printf("[|802.11]");
- return caplen;
- }
+ return ieee802_11_radio_print(p, h->len, h->caplen);
+}
- return ieee802_11_radio_print(p, length, caplen);
+/*
+ * For DLT_IEEE802_11_RADIO_AVS; like DLT_IEEE802_11, but with an
+ * extra header, containing information such as radio information,
+ * which we currently ignore.
+ */
+u_int
+ieee802_11_radio_avs_if_print(const struct pcap_pkthdr *h, const u_char *p)
+{
+ return ieee802_11_avs_radio_print(p, h->len, h->caplen);
}
diff --git a/contrib/tcpdump/print-ah.c b/contrib/tcpdump/print-ah.c
index 92ed909..ecd106b 100644
--- a/contrib/tcpdump/print-ah.c
+++ b/contrib/tcpdump/print-ah.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ah.c,v 1.22 2003/11/19 00:36:06 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ah.c,v 1.22 2003-11-19 00:36:06 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-aodv.c b/contrib/tcpdump/print-aodv.c
index 80a547d..c5f6622 100644
--- a/contrib/tcpdump/print-aodv.c
+++ b/contrib/tcpdump/print-aodv.c
@@ -32,7 +32,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-aodv.c,v 1.11 2004/03/24 00:30:19 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-aodv.c,v 1.11 2004-03-24 00:30:19 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-ap1394.c b/contrib/tcpdump/print-ap1394.c
index a01ce34..dd9bc5a 100644
--- a/contrib/tcpdump/print-ap1394.c
+++ b/contrib/tcpdump/print-ap1394.c
@@ -20,7 +20,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ap1394.c,v 1.3.2.1 2005/07/07 01:24:33 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ap1394.c,v 1.5 2006-02-11 22:12:06 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -60,8 +60,8 @@ ap1394_hdr_print(register const u_char *bp, u_int length)
fp = (const struct firewire_header *)bp;
(void)printf("%s > %s",
- linkaddr_string(fp->firewire_dhost, FIREWIRE_EUI64_LEN),
- linkaddr_string(fp->firewire_shost, FIREWIRE_EUI64_LEN));
+ linkaddr_string(fp->firewire_dhost, LINKADDR_IEEE1394, FIREWIRE_EUI64_LEN),
+ linkaddr_string(fp->firewire_shost, LINKADDR_IEEE1394, FIREWIRE_EUI64_LEN));
if (!qflag) {
(void)printf(", ethertype %s (0x%04x)",
diff --git a/contrib/tcpdump/print-arcnet.c b/contrib/tcpdump/print-arcnet.c
index 63f9c21..48a4303 100644
--- a/contrib/tcpdump/print-arcnet.c
+++ b/contrib/tcpdump/print-arcnet.c
@@ -22,7 +22,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-arcnet.c,v 1.20 2005/04/06 21:32:38 mcr Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-arcnet.c,v 1.20 2005-04-06 21:32:38 mcr Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-arp.c b/contrib/tcpdump/print-arp.c
index 3dc2894..b15ae50 100644
--- a/contrib/tcpdump/print-arp.c
+++ b/contrib/tcpdump/print-arp.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-arp.c,v 1.64 2004/04/30 16:42:14 mcr Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-arp.c,v 1.66 2006-03-03 22:53:21 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -51,24 +51,27 @@ static const char rcsid[] _U_ =
* arp_tha and arp_tpa in that order, according to the lengths
* specified. Field names used correspond to RFC 826.
*/
-struct arp_pkthdr {
- u_short ar_hrd; /* format of hardware address */
-#define ARPHRD_ETHER 1 /* ethernet hardware format */
-#define ARPHRD_IEEE802 6 /* token-ring hardware format */
-#define ARPHRD_ARCNET 7 /* arcnet hardware format */
-#define ARPHRD_FRELAY 15 /* frame relay hardware format */
-#define ARPHRD_STRIP 23 /* Ricochet Starmode Radio hardware format */
-#define ARPHRD_IEEE1394 24 /* IEEE 1394 (FireWire) hardware format */
- u_short ar_pro; /* format of protocol address */
- u_char ar_hln; /* length of hardware address */
- u_char ar_pln; /* length of protocol address */
- u_short ar_op; /* one of: */
-#define ARPOP_REQUEST 1 /* request to resolve address */
-#define ARPOP_REPLY 2 /* response to previous request */
-#define ARPOP_REVREQUEST 3 /* request protocol address given hardware */
-#define ARPOP_REVREPLY 4 /* response giving protocol address */
-#define ARPOP_INVREQUEST 8 /* request to identify peer */
-#define ARPOP_INVREPLY 9 /* response identifying peer */
+struct arp_pkthdr {
+ u_short ar_hrd; /* format of hardware address */
+#define ARPHRD_ETHER 1 /* ethernet hardware format */
+#define ARPHRD_IEEE802 6 /* token-ring hardware format */
+#define ARPHRD_ARCNET 7 /* arcnet hardware format */
+#define ARPHRD_FRELAY 15 /* frame relay hardware format */
+#define ARPHRD_ATM2225 19 /* ATM (RFC 2225) */
+#define ARPHRD_STRIP 23 /* Ricochet Starmode Radio hardware format */
+#define ARPHRD_IEEE1394 24 /* IEEE 1394 (FireWire) hardware format */
+ u_short ar_pro; /* format of protocol address */
+ u_char ar_hln; /* length of hardware address */
+ u_char ar_pln; /* length of protocol address */
+ u_short ar_op; /* one of: */
+#define ARPOP_REQUEST 1 /* request to resolve address */
+#define ARPOP_REPLY 2 /* response to previous request */
+#define ARPOP_REVREQUEST 3 /* request protocol address given hardware */
+#define ARPOP_REVREPLY 4 /* response giving protocol address */
+#define ARPOP_INVREQUEST 8 /* request to identify peer */
+#define ARPOP_INVREPLY 9 /* response identifying peer */
+#define ARPOP_NAK 10 /* NAK - only valif for ATM ARP */
+
/*
* The remaining fields are variable in size,
* according to the sizes above.
@@ -88,8 +91,8 @@ struct arp_pkthdr {
#define ARP_HDRLEN 8
#define HRD(ap) EXTRACT_16BITS(&(ap)->ar_hrd)
-#define HLN(ap) ((ap)->ar_hln)
-#define PLN(ap) ((ap)->ar_pln)
+#define HRD_LEN(ap) ((ap)->ar_hln)
+#define PROTO_LEN(ap) ((ap)->ar_pln)
#define OP(ap) EXTRACT_16BITS(&(ap)->ar_op)
#define PRO(ap) EXTRACT_16BITS(&(ap)->ar_pro)
#define SHA(ap) (ar_sha(ap))
@@ -97,6 +100,29 @@ struct arp_pkthdr {
#define THA(ap) (ar_tha(ap))
#define TPA(ap) (ar_tpa(ap))
+
+struct tok arpop_values[] = {
+ { ARPOP_REQUEST, "Request" },
+ { ARPOP_REPLY, "Reply" },
+ { ARPOP_REVREQUEST, "Reverse Request" },
+ { ARPOP_REVREPLY, "Reverse Reply" },
+ { ARPOP_INVREQUEST, "Inverse Request" },
+ { ARPOP_INVREPLY, "Inverse Reply" },
+ { ARPOP_NAK, "NACK Reply" },
+ { 0, NULL }
+};
+
+struct tok arphrd_values[] = {
+ { ARPHRD_ETHER, "Ethernet" },
+ { ARPHRD_IEEE802, "TokenRing" },
+ { ARPHRD_ARCNET, "ArcNet" },
+ { ARPHRD_FRELAY, "FrameRelay" },
+ { ARPHRD_STRIP, "Strip" },
+ { ARPHRD_IEEE1394, "IEEE 1394" },
+ { ARPHRD_ATM2225, "ATM" },
+ { 0, NULL }
+};
+
/*
* ATM Address Resolution Protocol.
*
@@ -106,20 +132,18 @@ struct arp_pkthdr {
* the ATM number and subaddress - and the hardware addresses consist
* of an ATM number and an ATM subaddress.
*/
-struct atmarp_pkthdr {
- u_short aar_hrd; /* format of hardware address */
-#define ARPHRD_ATM2225 19 /* ATM (RFC 2225) */
- u_short aar_pro; /* format of protocol address */
- u_char aar_shtl; /* length of source ATM number */
- u_char aar_sstl; /* length of source ATM subaddress */
-#define ATMARP_IS_E164 0x40 /* bit in type/length for E.164 format */
-#define ATMARP_LEN_MASK 0x3F /* length of {sub}address in type/length */
- u_short aar_op; /* same as regular ARP */
-#define ATMARPOP_NAK 10 /* NAK */
- u_char aar_spln; /* length of source protocol address */
- u_char aar_thtl; /* length of target ATM number */
- u_char aar_tstl; /* length of target ATM subaddress */
- u_char aar_tpln; /* length of target protocol address */
+struct atmarp_pkthdr {
+ u_short aar_hrd; /* format of hardware address */
+ u_short aar_pro; /* format of protocol address */
+ u_char aar_shtl; /* length of source ATM number */
+ u_char aar_sstl; /* length of source ATM subaddress */
+#define ATMARP_IS_E164 0x40 /* bit in type/length for E.164 format */
+#define ATMARP_LEN_MASK 0x3F /* length of {sub}address in type/length */
+ u_short aar_op; /* same as regular ARP */
+ u_char aar_spln; /* length of source protocol address */
+ u_char aar_thtl; /* length of target ATM number */
+ u_char aar_tstl; /* length of target ATM subaddress */
+ u_char aar_tpln; /* length of target protocol address */
/*
* The remaining fields are variable in size,
* according to the sizes above.
@@ -134,19 +158,19 @@ struct atmarp_pkthdr {
#endif
#define ATMHRD(ap) EXTRACT_16BITS(&(ap)->aar_hrd)
-#define ATMSHLN(ap) ((ap)->aar_shtl & ATMARP_LEN_MASK)
+#define ATMSHRD_LEN(ap) ((ap)->aar_shtl & ATMARP_LEN_MASK)
#define ATMSSLN(ap) ((ap)->aar_sstl & ATMARP_LEN_MASK)
-#define ATMSPLN(ap) ((ap)->aar_spln)
+#define ATMSPROTO_LEN(ap) ((ap)->aar_spln)
#define ATMOP(ap) EXTRACT_16BITS(&(ap)->aar_op)
#define ATMPRO(ap) EXTRACT_16BITS(&(ap)->aar_pro)
-#define ATMTHLN(ap) ((ap)->aar_thtl & ATMARP_LEN_MASK)
+#define ATMTHRD_LEN(ap) ((ap)->aar_thtl & ATMARP_LEN_MASK)
#define ATMTSLN(ap) ((ap)->aar_tstl & ATMARP_LEN_MASK)
-#define ATMTPLN(ap) ((ap)->aar_tpln)
+#define ATMTPROTO_LEN(ap) ((ap)->aar_tpln)
#define aar_sha(ap) ((const u_char *)((ap)+1))
-#define aar_ssa(ap) (aar_sha(ap) + ATMSHLN(ap))
+#define aar_ssa(ap) (aar_sha(ap) + ATMSHRD_LEN(ap))
#define aar_spa(ap) (aar_ssa(ap) + ATMSSLN(ap))
-#define aar_tha(ap) (aar_spa(ap) + ATMSPLN(ap))
-#define aar_tsa(ap) (aar_tha(ap) + ATMTHLN(ap))
+#define aar_tha(ap) (aar_spa(ap) + ATMSPROTO_LEN(ap))
+#define aar_tsa(ap) (aar_tha(ap) + ATMTHRD_LEN(ap))
#define aar_tpa(ap) (aar_tsa(ap) + ATMTSLN(ap))
};
@@ -167,10 +191,10 @@ atmarp_addr_print(netdissect_options *ndo,
if (ha_len == 0)
ND_PRINT((ndo, "<No address>"));
else {
- ND_PRINT((ndo, "%s", linkaddr_string(ha, ha_len)));
+ ND_PRINT((ndo, "%s", linkaddr_string(ha, LINKADDR_ATM, ha_len)));
if (srca_len != 0)
ND_PRINT((ndo, ",%s",
- linkaddr_string(srca, srca_len)));
+ linkaddr_string(srca, LINKADDR_ATM, srca_len)));
}
}
@@ -188,69 +212,86 @@ atmarp_print(netdissect_options *ndo,
pro = ATMPRO(ap);
op = ATMOP(ap);
- if (!ND_TTEST2(*aar_tpa(ap), ATMTPLN(ap))) {
- ND_PRINT((ndo, "truncated-atmarp"));
+ if (!ND_TTEST2(*aar_tpa(ap), ATMTPROTO_LEN(ap))) {
+ ND_PRINT((ndo, "[|ARP]"));
ND_DEFAULTPRINT((const u_char *)ap, length);
return;
}
+ if (!ndo->ndo_eflag) {
+ ND_PRINT((ndo, "ARP, "));
+ }
+
if ((pro != ETHERTYPE_IP && pro != ETHERTYPE_TRAIL) ||
- ATMSPLN(ap) != 4 || ATMTPLN(ap) != 4) {
- ND_PRINT((ndo, "atmarp-#%d for proto #%d (%d/%d) hardware #%d",
- op, pro, ATMSPLN(ap), ATMTPLN(ap), hrd));
- return;
+ ATMSPROTO_LEN(ap) != 4 ||
+ ATMTPROTO_LEN(ap) != 4 ||
+ ndo->ndo_vflag) {
+ ND_PRINT((ndo, "%s, %s (len %u/%u)",
+ tok2str(arphrd_values, "Unknown Hardware (%u)", hrd),
+ tok2str(ethertype_values, "Unknown Protocol (0x%04x)", pro),
+ ATMSPROTO_LEN(ap),
+ ATMTPROTO_LEN(ap)));
+
+ /* don't know know about the address formats */
+ if (!ndo->ndo_vflag) {
+ goto out;
+ }
}
- if (pro == ETHERTYPE_TRAIL)
- ND_PRINT((ndo, "trailer-"));
+
+ /* print operation */
+ printf("%s%s ",
+ ndo->ndo_vflag ? ", " : "",
+ tok2str(arpop_values, "Unknown (%u)", op));
+
switch (op) {
case ARPOP_REQUEST:
- ND_PRINT((ndo, "arp who-has %s", ipaddr_string(ATMTPA(ap))));
- if (ATMTHLN(ap) != 0) {
+ ND_PRINT((ndo, "who-has %s", ipaddr_string(ATMTPA(ap))));
+ if (ATMTHRD_LEN(ap) != 0) {
ND_PRINT((ndo, " ("));
- atmarp_addr_print(ndo, ATMTHA(ap), ATMTHLN(ap),
+ atmarp_addr_print(ndo, ATMTHA(ap), ATMTHRD_LEN(ap),
ATMTSA(ap), ATMTSLN(ap));
ND_PRINT((ndo, ")"));
}
- ND_PRINT((ndo, " tell %s", ipaddr_string(ATMSPA(ap))));
+ ND_PRINT((ndo, "tell %s", ipaddr_string(ATMSPA(ap))));
break;
case ARPOP_REPLY:
- ND_PRINT((ndo, "arp reply %s", ipaddr_string(ATMSPA(ap))));
- ND_PRINT((ndo, " is-at "));
- atmarp_addr_print(ndo, ATMSHA(ap), ATMSHLN(ap), ATMSSA(ap),
- ATMSSLN(ap));
+ ND_PRINT((ndo, "%s is-at ", ipaddr_string(ATMSPA(ap))));
+ atmarp_addr_print(ndo, ATMSHA(ap), ATMSHRD_LEN(ap), ATMSSA(ap),
+ ATMSSLN(ap));
break;
case ARPOP_INVREQUEST:
- ND_PRINT((ndo, "invarp who-is "));
- atmarp_addr_print(ndo, ATMTHA(ap), ATMTHLN(ap), ATMTSA(ap),
+ ND_PRINT((ndo, "who-is "));
+ atmarp_addr_print(ndo, ATMTHA(ap), ATMTHRD_LEN(ap), ATMTSA(ap),
ATMTSLN(ap));
ND_PRINT((ndo, " tell "));
- atmarp_addr_print(ndo, ATMSHA(ap), ATMSHLN(ap), ATMSSA(ap),
+ atmarp_addr_print(ndo, ATMSHA(ap), ATMSHRD_LEN(ap), ATMSSA(ap),
ATMSSLN(ap));
break;
case ARPOP_INVREPLY:
- ND_PRINT((ndo, "invarp reply "));
- atmarp_addr_print(ndo, ATMSHA(ap), ATMSHLN(ap), ATMSSA(ap),
+ atmarp_addr_print(ndo, ATMSHA(ap), ATMSHRD_LEN(ap), ATMSSA(ap),
ATMSSLN(ap));
- ND_PRINT((ndo, " at %s", ipaddr_string(ATMSPA(ap))));
+ ND_PRINT((ndo, "at %s", ipaddr_string(ATMSPA(ap))));
break;
- case ATMARPOP_NAK:
- ND_PRINT((ndo, "nak reply for %s",
- ipaddr_string(ATMSPA(ap))));
+ case ARPOP_NAK:
+ ND_PRINT((ndo, "for %s", ipaddr_string(ATMSPA(ap))));
break;
default:
- ND_PRINT((ndo, "atmarp-#%d", op));
ND_DEFAULTPRINT((const u_char *)ap, caplen);
return;
}
- return;
+
+ out:
+ ND_PRINT((ndo, ", length %u", length));
+ return;
+
trunc:
- ND_PRINT((ndo, "[|atmarp]"));
+ ND_PRINT((ndo, "[|ARP]"));
}
void
@@ -258,81 +299,115 @@ arp_print(netdissect_options *ndo,
const u_char *bp, u_int length, u_int caplen)
{
const struct arp_pkthdr *ap;
- u_short pro, hrd, op;
+ u_short pro, hrd, op, linkaddr;
ap = (const struct arp_pkthdr *)bp;
ND_TCHECK(*ap);
+
hrd = HRD(ap);
- if (hrd == ARPHRD_ATM2225) {
- atmarp_print(ndo, bp, length, caplen);
- return;
- }
pro = PRO(ap);
op = OP(ap);
- if (!ND_TTEST2(*ar_tpa(ap), PLN(ap))) {
- ND_PRINT((ndo, "truncated-arp"));
+
+ /* if its ATM then call the ATM ARP printer
+ for Frame-relay ARP most of the fields
+ are similar to Ethernet so overload the Ethernet Printer
+ and set the linkaddr type for linkaddr_string() accordingly */
+
+ switch(hrd) {
+ case ARPHRD_ATM2225:
+ atmarp_print(ndo, bp, length, caplen);
+ return;
+ case ARPHRD_FRELAY:
+ linkaddr = LINKADDR_FRELAY;
+ default:
+ linkaddr = LINKADDR_ETHER;
+ break;
+ }
+
+ if (!ND_TTEST2(*ar_tpa(ap), PROTO_LEN(ap))) {
+ ND_PRINT((ndo, "[|ARP]"));
ND_DEFAULTPRINT((const u_char *)ap, length);
return;
}
- if ((pro != ETHERTYPE_IP && pro != ETHERTYPE_TRAIL) ||
- PLN(ap) != 4 || HLN(ap) == 0) {
- ND_PRINT((ndo, "arp-#%d for proto #%d (%d) hardware #%d (%d)",
- op, pro, PLN(ap), hrd, HLN(ap)));
- return;
+ if (!ndo->ndo_eflag) {
+ ND_PRINT((ndo, "ARP, "));
+ }
+
+ /* print hardware type/len and proto type/len */
+ if ((pro != ETHERTYPE_IP && pro != ETHERTYPE_TRAIL) ||
+ PROTO_LEN(ap) != 4 ||
+ HRD_LEN(ap) == 0 ||
+ ndo->ndo_vflag) {
+ ND_PRINT((ndo, "%s (len %u), %s (len %u)",
+ tok2str(arphrd_values, "Unknown Hardware (%u)", hrd),
+ HRD_LEN(ap),
+ tok2str(ethertype_values, "Unknown Protocol (0x%04x)", pro),
+ PROTO_LEN(ap)));
+
+ /* don't know know about the address formats */
+ if (!ndo->ndo_vflag) {
+ goto out;
+ }
}
- if (pro == ETHERTYPE_TRAIL)
- ND_PRINT((ndo, "trailer-"));
+
+ /* print operation */
+ printf("%s%s ",
+ ndo->ndo_vflag ? ", " : "",
+ tok2str(arpop_values, "Unknown (%u)", op));
+
switch (op) {
case ARPOP_REQUEST:
- ND_PRINT((ndo, "arp who-has %s", ipaddr_string(TPA(ap))));
- if (memcmp((const char *)ezero, (const char *)THA(ap), HLN(ap)) != 0)
+ ND_PRINT((ndo, "who-has %s", ipaddr_string(TPA(ap))));
+ if (memcmp((const char *)ezero, (const char *)THA(ap), HRD_LEN(ap)) != 0)
ND_PRINT((ndo, " (%s)",
- linkaddr_string(THA(ap), HLN(ap))));
+ linkaddr_string(THA(ap), linkaddr, HRD_LEN(ap))));
ND_PRINT((ndo, " tell %s", ipaddr_string(SPA(ap))));
break;
case ARPOP_REPLY:
- ND_PRINT((ndo, "arp reply %s", ipaddr_string(SPA(ap))));
- ND_PRINT((ndo, " is-at %s", linkaddr_string(SHA(ap), HLN(ap))));
+ ND_PRINT((ndo, "%s is-at %s",
+ ipaddr_string(SPA(ap)),
+ linkaddr_string(SHA(ap), linkaddr, HRD_LEN(ap))));
break;
case ARPOP_REVREQUEST:
- ND_PRINT((ndo, "rarp who-is %s tell %s",
- linkaddr_string(THA(ap), HLN(ap)),
- linkaddr_string(SHA(ap), HLN(ap))));
+ ND_PRINT((ndo, "who-is %s tell %s",
+ linkaddr_string(THA(ap), linkaddr, HRD_LEN(ap)),
+ linkaddr_string(SHA(ap), linkaddr, HRD_LEN(ap))));
break;
case ARPOP_REVREPLY:
- ND_PRINT((ndo, "rarp reply %s at %s",
- linkaddr_string(THA(ap), HLN(ap)),
+ ND_PRINT((ndo, "%s at %s",
+ linkaddr_string(THA(ap), linkaddr, HRD_LEN(ap)),
ipaddr_string(TPA(ap))));
break;
case ARPOP_INVREQUEST:
- ND_PRINT((ndo, "invarp who-is %s tell %s",
- linkaddr_string(THA(ap), HLN(ap)),
- linkaddr_string(SHA(ap), HLN(ap))));
+ ND_PRINT((ndo, "who-is %s tell %s",
+ linkaddr_string(THA(ap), linkaddr, HRD_LEN(ap)),
+ linkaddr_string(SHA(ap), linkaddr, HRD_LEN(ap))));
break;
case ARPOP_INVREPLY:
- ND_PRINT((ndo,"invarp reply %s at %s",
- linkaddr_string(THA(ap), HLN(ap)),
+ ND_PRINT((ndo,"%s at %s",
+ linkaddr_string(THA(ap), linkaddr, HRD_LEN(ap)),
ipaddr_string(TPA(ap))));
break;
default:
- ND_PRINT((ndo, "arp-#%d", op));
ND_DEFAULTPRINT((const u_char *)ap, caplen);
return;
}
- if (hrd != ARPHRD_ETHER)
- ND_PRINT((ndo, " hardware #%d", hrd));
+
+ out:
+ ND_PRINT((ndo, ", length %u", length));
+
return;
trunc:
- ND_PRINT((ndo, "[|arp]"));
+ ND_PRINT((ndo, "[|ARP]"));
}
/*
diff --git a/contrib/tcpdump/print-ascii.c b/contrib/tcpdump/print-ascii.c
index cd48edd..fa8793cb 100644
--- a/contrib/tcpdump/print-ascii.c
+++ b/contrib/tcpdump/print-ascii.c
@@ -42,7 +42,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ascii.c,v 1.16.2.1 2005/07/06 20:54:49 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ascii.c,v 1.17 2005-07-06 20:53:32 guy Exp $";
#endif
#include <tcpdump-stdinc.h>
#include <stdio.h>
diff --git a/contrib/tcpdump/print-atalk.c b/contrib/tcpdump/print-atalk.c
index 1d575a6..6a8056b 100644
--- a/contrib/tcpdump/print-atalk.c
+++ b/contrib/tcpdump/print-atalk.c
@@ -25,7 +25,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.81 2004/05/01 09:41:50 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.81 2004-05-01 09:41:50 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-atm.c b/contrib/tcpdump/print-atm.c
index 03ca34b..3f000e3 100644
--- a/contrib/tcpdump/print-atm.c
+++ b/contrib/tcpdump/print-atm.c
@@ -22,7 +22,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.38.2.6 2006/01/25 13:27:24 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-atm.c,v 1.48.2.1 2007-10-22 19:39:12 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -45,25 +45,51 @@ static const char rcsid[] _U_ =
#include "ether.h"
+#define OAM_CRC10_MASK 0x3ff
+#define OAM_PAYLOAD_LEN 48
+#define OAM_FUNCTION_SPECIFIC_LEN 45 /* this excludes crc10 and cell-type/function-type */
+#define OAM_CELLTYPE_FUNCTYPE_LEN 1
+
struct tok oam_f_values[] = {
- { OAMF4SC, "OAM F4 (segment)" },
- { OAMF4EC, "OAM F4 (end)" },
+ { VCI_OAMF4SC, "OAM F4 (segment)" },
+ { VCI_OAMF4EC, "OAM F4 (end)" },
+ { 0, NULL }
+};
+
+struct tok atm_pty_values[] = {
+ { 0x0, "user data, uncongested, SDU 0" },
+ { 0x1, "user data, uncongested, SDU 1" },
+ { 0x2, "user data, congested, SDU 0" },
+ { 0x3, "user data, congested, SDU 1" },
+ { 0x4, "VCC OAM F5 flow segment" },
+ { 0x5, "VCC OAM F5 flow end-to-end" },
+ { 0x6, "Traffic Control and resource Mgmt" },
{ 0, NULL }
};
+#define OAM_CELLTYPE_FM 0x1
+#define OAM_CELLTYPE_PM 0x2
+#define OAM_CELLTYPE_AD 0x8
+#define OAM_CELLTYPE_SM 0xf
+
struct tok oam_celltype_values[] = {
- { 0x1, "Fault Management" },
- { 0x2, "Performance Management" },
- { 0x8, "activate/deactivate" },
- { 0xf, "System Management" },
+ { OAM_CELLTYPE_FM, "Fault Management" },
+ { OAM_CELLTYPE_PM, "Performance Management" },
+ { OAM_CELLTYPE_AD, "activate/deactivate" },
+ { OAM_CELLTYPE_SM, "System Management" },
{ 0, NULL }
};
+#define OAM_FM_FUNCTYPE_AIS 0x0
+#define OAM_FM_FUNCTYPE_RDI 0x1
+#define OAM_FM_FUNCTYPE_CONTCHECK 0x4
+#define OAM_FM_FUNCTYPE_LOOPBACK 0x8
+
struct tok oam_fm_functype_values[] = {
- { 0x0, "AIS" },
- { 0x1, "RDI" },
- { 0x4, "Continuity Check" },
- { 0x8, "Loopback" },
+ { OAM_FM_FUNCTYPE_AIS, "AIS" },
+ { OAM_FM_FUNCTYPE_RDI, "RDI" },
+ { OAM_FM_FUNCTYPE_CONTCHECK, "Continuity Check" },
+ { OAM_FM_FUNCTYPE_LOOPBACK, "Loopback" },
{ 0, NULL }
};
@@ -80,6 +106,14 @@ struct tok oam_ad_functype_values[] = {
{ 0, NULL }
};
+#define OAM_FM_LOOPBACK_INDICATOR_MASK 0x1
+
+struct tok oam_fm_loopback_indicator_values[] = {
+ { 0x0, "Reply" },
+ { 0x1, "Request" },
+ { 0, NULL }
+};
+
static const struct tok *oam_functype_values[16] = {
NULL,
oam_fm_functype_values, /* 1 */
@@ -263,24 +297,24 @@ atm_print(u_int vpi, u_int vci, u_int traftype, const u_char *p, u_int length,
if (vpi == 0) {
switch (vci) {
- case PPC:
+ case VCI_PPC:
sig_print(p, caplen);
return;
- case BCC:
+ case VCI_BCC:
printf("broadcast sig: ");
return;
- case OAMF4SC: /* fall through */
- case OAMF4EC:
+ case VCI_OAMF4SC: /* fall through */
+ case VCI_OAMF4EC:
oam_print(p, length, ATM_OAM_HEC);
return;
- case METAC:
+ case VCI_METAC:
printf("meta: ");
return;
- case ILMIC:
+ case VCI_ILMIC:
printf("ilmi: ");
snmp_print(p, length);
return;
@@ -303,26 +337,53 @@ atm_print(u_int vpi, u_int vci, u_int traftype, const u_char *p, u_int length,
}
}
+struct oam_fm_loopback_t {
+ u_int8_t loopback_indicator;
+ u_int8_t correlation_tag[4];
+ u_int8_t loopback_id[12];
+ u_int8_t source_id[12];
+ u_int8_t unused[16];
+};
+
+struct oam_fm_ais_rdi_t {
+ u_int8_t failure_type;
+ u_int8_t failure_location[16];
+ u_int8_t unused[28];
+};
+
int
oam_print (const u_char *p, u_int length, u_int hec) {
u_int32_t cell_header;
- u_int16_t cell_type, func_type,vpi,vci,payload,clp;
+ u_int16_t vpi, vci, cksum, cksum_shouldbe, idx;
+ u_int8_t cell_type, func_type, payload, clp;
+
+ union {
+ const struct oam_fm_loopback_t *oam_fm_loopback;
+ const struct oam_fm_ais_rdi_t *oam_fm_ais_rdi;
+ } oam_ptr;
+
cell_header = EXTRACT_32BITS(p+hec);
- cell_type = ((*(p+4+hec))>>4) & 0x0f;
- func_type = *(p+4+hec) & 0x0f;
+ cell_type = ((*(p+ATM_HDR_LEN_NOHEC+hec))>>4) & 0x0f;
+ func_type = (*(p+ATM_HDR_LEN_NOHEC+hec)) & 0x0f;
vpi = (cell_header>>20)&0xff;
vci = (cell_header>>4)&0xffff;
payload = (cell_header>>1)&0x7;
clp = cell_header&0x1;
- printf("%s, vpi %u, vci %u, payload %u, clp %u, ",
+ printf("%s, vpi %u, vci %u, payload [ %s ], clp %u, length %u",
tok2str(oam_f_values, "OAM F5", vci),
- vpi, vci, payload, clp);
+ vpi, vci,
+ tok2str(atm_pty_values, "Unknown", payload),
+ clp, length);
+
+ if (!vflag) {
+ return 1;
+ }
- printf("cell-type %s (%u)",
+ printf("\n\tcell-type %s (%u)",
tok2str(oam_celltype_values, "unknown", cell_type),
cell_type);
@@ -330,9 +391,61 @@ oam_print (const u_char *p, u_int length, u_int hec) {
printf(", func-type unknown (%u)", func_type);
else
printf(", func-type %s (%u)",
- bittok2str(oam_functype_values[cell_type],"none",func_type),
+ tok2str(oam_functype_values[cell_type],"none",func_type),
func_type);
- printf(", length %u",length);
+ p += ATM_HDR_LEN_NOHEC + hec;
+
+ switch (cell_type << 4 | func_type) {
+ case (OAM_CELLTYPE_FM << 4 | OAM_FM_FUNCTYPE_LOOPBACK):
+ oam_ptr.oam_fm_loopback = (const struct oam_fm_loopback_t *)(p + OAM_CELLTYPE_FUNCTYPE_LEN);
+ printf("\n\tLoopback-Indicator %s, Correlation-Tag 0x%08x",
+ tok2str(oam_fm_loopback_indicator_values,
+ "Unknown",
+ oam_ptr.oam_fm_loopback->loopback_indicator & OAM_FM_LOOPBACK_INDICATOR_MASK),
+ EXTRACT_32BITS(&oam_ptr.oam_fm_loopback->correlation_tag));
+ printf("\n\tLocation-ID ");
+ for (idx = 0; idx < sizeof(oam_ptr.oam_fm_loopback->loopback_id); idx++) {
+ if (idx % 2) {
+ printf("%04x ", EXTRACT_16BITS(&oam_ptr.oam_fm_loopback->loopback_id[idx]));
+ }
+ }
+ printf("\n\tSource-ID ");
+ for (idx = 0; idx < sizeof(oam_ptr.oam_fm_loopback->source_id); idx++) {
+ if (idx % 2) {
+ printf("%04x ", EXTRACT_16BITS(&oam_ptr.oam_fm_loopback->source_id[idx]));
+ }
+ }
+ break;
+
+ case (OAM_CELLTYPE_FM << 4 | OAM_FM_FUNCTYPE_AIS):
+ case (OAM_CELLTYPE_FM << 4 | OAM_FM_FUNCTYPE_RDI):
+ oam_ptr.oam_fm_ais_rdi = (const struct oam_fm_ais_rdi_t *)(p + OAM_CELLTYPE_FUNCTYPE_LEN);
+ printf("\n\tFailure-type 0x%02x", oam_ptr.oam_fm_ais_rdi->failure_type);
+ printf("\n\tLocation-ID ");
+ for (idx = 0; idx < sizeof(oam_ptr.oam_fm_ais_rdi->failure_location); idx++) {
+ if (idx % 2) {
+ printf("%04x ", EXTRACT_16BITS(&oam_ptr.oam_fm_ais_rdi->failure_location[idx]));
+ }
+ }
+ break;
+
+ case (OAM_CELLTYPE_FM << 4 | OAM_FM_FUNCTYPE_CONTCHECK):
+ /* FIXME */
+ break;
+
+ default:
+ break;
+ }
+
+ /* crc10 checksum verification */
+ cksum = EXTRACT_16BITS(p + OAM_CELLTYPE_FUNCTYPE_LEN + OAM_FUNCTION_SPECIFIC_LEN)
+ & OAM_CRC10_MASK;
+ cksum_shouldbe = verify_crc10_cksum(0, p, OAM_PAYLOAD_LEN);
+
+ printf("\n\tcksum 0x%03x (%scorrect)",
+ cksum,
+ cksum_shouldbe == 0 ? "" : "in");
+
return 1;
}
diff --git a/contrib/tcpdump/print-beep.c b/contrib/tcpdump/print-beep.c
index db40d611..b476dbf 100644
--- a/contrib/tcpdump/print-beep.c
+++ b/contrib/tcpdump/print-beep.c
@@ -11,7 +11,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-beep.c,v 1.6 2003/11/16 09:36:13 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-beep.c,v 1.6 2003-11-16 09:36:13 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-bfd.c b/contrib/tcpdump/print-bfd.c
index 03e59dc..6406168 100644
--- a/contrib/tcpdump/print-bfd.c
+++ b/contrib/tcpdump/print-bfd.c
@@ -15,7 +15,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-bfd.c,v 1.5.2.5 2006/02/02 06:36:37 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-bfd.c,v 1.10 2006-02-02 06:35:52 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-bgp.c b/contrib/tcpdump/print-bgp.c
index 34aa798..2dfdf52 100644
--- a/contrib/tcpdump/print-bgp.c
+++ b/contrib/tcpdump/print-bgp.c
@@ -36,7 +36,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.91.2.12 2007/07/14 22:26:35 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.117.2.1 2007-12-08 10:08:07 hannes Exp $";
#endif
#include <tcpdump-stdinc.h>
@@ -49,8 +49,8 @@ static const char rcsid[] _U_ =
#include "addrtoname.h"
#include "extract.h"
#include "bgp.h"
-#include "l2vpn.h"
#include "af.h"
+#include "l2vpn.h"
struct bgp {
u_int8_t bgp_marker[16];
@@ -145,6 +145,9 @@ struct bgp_attr {
#define BGPTYPE_MP_REACH_NLRI 14 /* RFC2283 */
#define BGPTYPE_MP_UNREACH_NLRI 15 /* RFC2283 */
#define BGPTYPE_EXTD_COMMUNITIES 16 /* draft-ietf-idr-bgp-ext-communities */
+#define BGPTYPE_AS4_PATH 17 /* RFC4893 */
+#define BGPTYPE_AGGREGATOR4 18 /* RFC4893 */
+#define BGPTYPE_PMSI_TUNNEL 22 /* draft-ietf-l3vpn-2547bis-mcast-bgp-02.txt */
#define BGPTYPE_ATTR_SET 128 /* draft-marques-ppvpn-ibgp */
#define BGP_MP_NLRI_MINSIZE 3 /* End of RIB Marker detection */
@@ -152,11 +155,13 @@ struct bgp_attr {
static struct tok bgp_attr_values[] = {
{ BGPTYPE_ORIGIN, "Origin"},
{ BGPTYPE_AS_PATH, "AS Path"},
+ { BGPTYPE_AS4_PATH, "AS4 Path"},
{ BGPTYPE_NEXT_HOP, "Next Hop"},
{ BGPTYPE_MULTI_EXIT_DISC, "Multi Exit Discriminator"},
{ BGPTYPE_LOCAL_PREF, "Local Preference"},
{ BGPTYPE_ATOMIC_AGGREGATE, "Atomic Aggregate"},
{ BGPTYPE_AGGREGATOR, "Aggregator"},
+ { BGPTYPE_AGGREGATOR4, "Aggregator4"},
{ BGPTYPE_COMMUNITIES, "Community"},
{ BGPTYPE_ORIGINATOR_ID, "Originator ID"},
{ BGPTYPE_CLUSTER_LIST, "Cluster List"},
@@ -166,6 +171,7 @@ static struct tok bgp_attr_values[] = {
{ BGPTYPE_MP_REACH_NLRI, "Multi-Protocol Reach NLRI"},
{ BGPTYPE_MP_UNREACH_NLRI, "Multi-Protocol Unreach NLRI"},
{ BGPTYPE_EXTD_COMMUNITIES, "Extended Community"},
+ { BGPTYPE_PMSI_TUNNEL, "PMSI Tunnel"},
{ BGPTYPE_ATTR_SET, "Attribute Set"},
{ 255, "Reserved for development"},
{ 0, NULL}
@@ -176,6 +182,9 @@ static struct tok bgp_attr_values[] = {
#define BGP_CONFED_AS_SEQUENCE 3 /* draft-ietf-idr-rfc3065bis-01 */
#define BGP_CONFED_AS_SET 4 /* draft-ietf-idr-rfc3065bis-01 */
+#define BGP_AS_SEG_TYPE_MIN BGP_AS_SET
+#define BGP_AS_SEG_TYPE_MAX BGP_CONFED_AS_SET
+
static struct tok bgp_as_path_segment_open_values[] = {
{ BGP_AS_SEQUENCE, ""},
{ BGP_AS_SET, "{ "},
@@ -267,6 +276,7 @@ static struct tok bgp_notify_minor_open_values[] = {
{ 4, "Unsupported Optional Parameter"},
{ 5, "Authentication Failure"},
{ 6, "Unacceptable Hold Time"},
+ { 7, "Capability Message Error"},
{ 0, NULL}
};
@@ -300,6 +310,31 @@ static struct tok bgp_origin_values[] = {
{ 0, NULL}
};
+#define BGP_PMSI_TUNNEL_RSVP_P2MP 1
+#define BGP_PMSI_TUNNEL_LDP_P2MP 2
+#define BGP_PMSI_TUNNEL_PIM_SSM 3
+#define BGP_PMSI_TUNNEL_PIM_SM 4
+#define BGP_PMSI_TUNNEL_PIM_BIDIR 5
+#define BGP_PMSI_TUNNEL_INGRESS 6
+#define BGP_PMSI_TUNNEL_LDP_MP2MP 7
+
+static struct tok bgp_pmsi_tunnel_values[] = {
+ { BGP_PMSI_TUNNEL_RSVP_P2MP, "RSVP-TE P2MP LSP"},
+ { BGP_PMSI_TUNNEL_LDP_P2MP, "LDP P2MP LSP"},
+ { BGP_PMSI_TUNNEL_PIM_SSM, "PIM-SSM Tree"},
+ { BGP_PMSI_TUNNEL_PIM_SM, "PIM-SM Tree"},
+ { BGP_PMSI_TUNNEL_PIM_BIDIR, "PIM-Bidir Tree"},
+ { BGP_PMSI_TUNNEL_INGRESS, "Ingress Replication"},
+ { BGP_PMSI_TUNNEL_LDP_MP2MP, "LDP MP2MP LSP"},
+ { 0, NULL}
+};
+
+static struct tok bgp_pmsi_flag_values[] = {
+ { 0x01, "Leaf Information required"},
+ { 0, NULL}
+};
+
+
/* Subsequent address family identifier, RFC2283 section 7 */
#define SAFNUM_RES 0
#define SAFNUM_UNICAST 1
@@ -307,6 +342,8 @@ static struct tok bgp_origin_values[] = {
#define SAFNUM_UNIMULTICAST 3
/* labeled BGP RFC3107 */
#define SAFNUM_LABUNICAST 4
+/* draft-ietf-l3vpn-2547bis-mcast-bgp-02.txt */
+#define SAFNUM_MULTICAST_VPN 5
#define SAFNUM_TUNNEL 64 /* XXX */
#define SAFNUM_VPLS 65 /* XXX */
#define SAFNUM_MDT 66 /* XXX */
@@ -331,7 +368,8 @@ static struct tok bgp_safi_values[] = {
{ SAFNUM_VPNUNICAST, "labeled VPN Unicast"},
{ SAFNUM_VPNMULTICAST, "labeled VPN Multicast"},
{ SAFNUM_VPNUNIMULTICAST, "labeled VPN Unicast+Multicast"},
- { SAFNUM_RT_ROUTING_INFO, "Route Target Routing Information"}, /* draft-marques-ppvpn-rt-constrain-01.txt */
+ { SAFNUM_RT_ROUTING_INFO, "Route Target Routing Information"},
+ { SAFNUM_MULTICAST_VPN, "Multicast VPN"},
{ 0, NULL }
};
@@ -349,8 +387,6 @@ static struct tok bgp_safi_values[] = {
#define BGP_EXT_COM_RO_2 0x0203 /* Route Origin,Format AN(4bytes):local(2bytes) */
#define BGP_EXT_COM_LINKBAND 0x4004 /* Link Bandwidth,Format AS(2B):Bandwidth(4B) */
/* rfc2547 bgp-mpls-vpns */
-#define BGP_EXT_COM_CISCO_MCAST 0x0009 /* cisco proprietary */
-
#define BGP_EXT_COM_VPN_ORIGIN 0x0005 /* OSPF Domain ID / VPN of Origin - draft-rosen-vpns-ospf-bgp-mpls */
#define BGP_EXT_COM_VPN_ORIGIN2 0x0105 /* duplicate - keep for backwards compatability */
#define BGP_EXT_COM_VPN_ORIGIN3 0x0205 /* duplicate - keep for backwards compatability */
@@ -364,6 +400,9 @@ static struct tok bgp_safi_values[] = {
#define BGP_EXT_COM_L2INFO 0x800a /* draft-kompella-ppvpn-l2vpn */
+#define BGP_EXT_COM_SOURCE_AS 0x0009 /* draft-ietf-l3vpn-2547bis-mcast-bgp-02.txt */
+#define BGP_EXT_COM_VRF_RT_IMP 0x010a /* draft-ietf-l3vpn-2547bis-mcast-bgp-02.txt */
+
/* http://www.cisco.com/en/US/tech/tk436/tk428/technologies_tech_note09186a00801eb09a.shtml */
#define BGP_EXT_COM_EIGRP_GEN 0x8800
#define BGP_EXT_COM_EIGRP_METRIC_AS_DELAY 0x8801
@@ -386,7 +425,6 @@ static struct tok bgp_extd_comm_subtype_values[] = {
{ BGP_EXT_COM_RO_1, "origin"},
{ BGP_EXT_COM_RO_2, "origin"},
{ BGP_EXT_COM_LINKBAND, "link-BW"},
- { BGP_EXT_COM_CISCO_MCAST, "mdt-group"},
{ BGP_EXT_COM_VPN_ORIGIN, "ospf-domain"},
{ BGP_EXT_COM_VPN_ORIGIN2, "ospf-domain"},
{ BGP_EXT_COM_VPN_ORIGIN3, "ospf-domain"},
@@ -402,6 +440,8 @@ static struct tok bgp_extd_comm_subtype_values[] = {
{ BGP_EXT_COM_EIGRP_METRIC_LOAD_MTU , "eigrp-route-metric (load, MTU)" },
{ BGP_EXT_COM_EIGRP_EXT_REMAS_REMID , "eigrp-external-route (remote-AS, remote-ID)" },
{ BGP_EXT_COM_EIGRP_EXT_REMPROTO_REMMETRIC , "eigrp-external-route (remote-proto, remote-metric)" },
+ { BGP_EXT_COM_SOURCE_AS, "source-AS" },
+ { BGP_EXT_COM_VRF_RT_IMP, "vrf-route-import"},
{ 0, NULL},
};
@@ -494,6 +534,99 @@ trunc:
return -2;
}
+/*
+ * bgp_vpn_ip_print
+ *
+ * print an ipv4 or ipv6 address into a buffer dependend on address length.
+ */
+static char *
+bgp_vpn_ip_print (const u_char *pptr, u_int addr_length) {
+
+ /* worst case string is s fully formatted v6 address */
+ static char addr[sizeof("1234:5678:89ab:cdef:1234:5678:89ab:cdef")];
+ char *pos = addr;
+
+ switch(addr_length) {
+ case (sizeof(struct in_addr) << 3): /* 32 */
+ TCHECK2(pptr[0], sizeof(struct in_addr));
+ snprintf(pos, sizeof(addr), "%s", ipaddr_string(pptr));
+ break;
+#ifdef INET6
+ case (sizeof(struct in6_addr) << 3): /* 128 */
+ TCHECK2(pptr[0], sizeof(struct in6_addr));
+ snprintf(pos, sizeof(addr), "%s", ip6addr_string(pptr));
+ break;
+#endif
+ default:
+ snprintf(pos, sizeof(addr), "bogus address length %u", addr_length);
+ break;
+ }
+ pos += strlen(pos);
+
+trunc:
+ *(pos) = '\0';
+ return (addr);
+}
+
+/*
+ * bgp_vpn_sg_print
+ *
+ * print an multicast s,g entry into a buffer.
+ * the s,g entry is encoded like this.
+ *
+ * +-----------------------------------+
+ * | Multicast Source Length (1 octet) |
+ * +-----------------------------------+
+ * | Multicast Source (Variable) |
+ * +-----------------------------------+
+ * | Multicast Group Length (1 octet) |
+ * +-----------------------------------+
+ * | Multicast Group (Variable) |
+ * +-----------------------------------+
+ *
+ * return the number of bytes read from the wire.
+ */
+static int
+bgp_vpn_sg_print (const u_char *pptr, char *buf, u_int buflen) {
+
+ u_int8_t addr_length;
+ u_int total_length, offset;
+
+ total_length = 0;
+
+ /* Source address length, encoded in bits */
+ TCHECK2(pptr[0], 1);
+ addr_length = *pptr++;
+
+ /* Source address */
+ TCHECK2(pptr[0], (addr_length >> 3));
+ total_length += (addr_length >> 3) + 1;
+ offset = strlen(buf);
+ if (addr_length) {
+ snprintf(buf + offset, buflen - offset, ", Source %s",
+ bgp_vpn_ip_print(pptr, addr_length));
+ pptr += (addr_length >> 3);
+ }
+
+ /* Group address length, encoded in bits */
+ TCHECK2(pptr[0], 1);
+ addr_length = *pptr++;
+
+ /* Group address */
+ TCHECK2(pptr[0], (addr_length >> 3));
+ total_length += (addr_length >> 3) + 1;
+ offset = strlen(buf);
+ if (addr_length) {
+ snprintf(buf + offset, buflen - offset, ", Group %s",
+ bgp_vpn_ip_print(pptr, addr_length));
+ pptr += (addr_length >> 3);
+ }
+
+trunc:
+ return (total_length);
+}
+
+
/* RDs and RTs share the same semantics
* we use bgp_vpn_rd_print for
* printing route targets inside a NLRI */
@@ -507,10 +640,12 @@ bgp_vpn_rd_print (const u_char *pptr) {
/* ok lets load the RD format */
switch (EXTRACT_16BITS(pptr)) {
- /* AS:IP-address fmt*/
+ /* 2-byte-AS:number fmt*/
case 0:
- snprintf(pos, sizeof(rd) - (pos - rd), "%u:%u.%u.%u.%u",
- EXTRACT_16BITS(pptr+2), *(pptr+4), *(pptr+5), *(pptr+6), *(pptr+7));
+ snprintf(pos, sizeof(rd) - (pos - rd), "%u:%u (= %u.%u.%u.%u)",
+ EXTRACT_16BITS(pptr+2),
+ EXTRACT_32BITS(pptr+4),
+ *(pptr+4), *(pptr+5), *(pptr+6), *(pptr+7));
break;
/* IP-address:AS fmt*/
@@ -609,6 +744,108 @@ trunc:
return -2;
}
+#define BGP_MULTICAST_VPN_ROUTE_TYPE_INTRA_AS_I_PMSI 1
+#define BGP_MULTICAST_VPN_ROUTE_TYPE_INTER_AS_I_PMSI 2
+#define BGP_MULTICAST_VPN_ROUTE_TYPE_S_PMSI 3
+#define BGP_MULTICAST_VPN_ROUTE_TYPE_INTRA_AS_SEG_LEAF 4
+#define BGP_MULTICAST_VPN_ROUTE_TYPE_SOURCE_ACTIVE 5
+#define BGP_MULTICAST_VPN_ROUTE_TYPE_SHARED_TREE_JOIN 6
+#define BGP_MULTICAST_VPN_ROUTE_TYPE_SOURCE_TREE_JOIN 7
+
+static struct tok bgp_multicast_vpn_route_type_values[] = {
+ { BGP_MULTICAST_VPN_ROUTE_TYPE_INTRA_AS_I_PMSI, "Intra-AS I-PMSI"},
+ { BGP_MULTICAST_VPN_ROUTE_TYPE_INTER_AS_I_PMSI, "Inter-AS I-PMSI"},
+ { BGP_MULTICAST_VPN_ROUTE_TYPE_S_PMSI, "S-PMSI"},
+ { BGP_MULTICAST_VPN_ROUTE_TYPE_INTRA_AS_SEG_LEAF, "Intra-AS Segment-Leaf"},
+ { BGP_MULTICAST_VPN_ROUTE_TYPE_SOURCE_ACTIVE, "Source-Active"},
+ { BGP_MULTICAST_VPN_ROUTE_TYPE_SHARED_TREE_JOIN, "Shared Tree Join"},
+ { BGP_MULTICAST_VPN_ROUTE_TYPE_SOURCE_TREE_JOIN, "Source Tree Join"},
+};
+
+static int
+decode_multicast_vpn(const u_char *pptr, char *buf, u_int buflen)
+{
+ u_int8_t route_type, route_length, addr_length, sg_length;
+ u_int offset;
+
+ TCHECK2(pptr[0], 2);
+ route_type = *pptr++;
+ route_length = *pptr++;
+
+ snprintf(buf, buflen, "Route-Type: %s (%u), length: %u",
+ tok2str(bgp_multicast_vpn_route_type_values,
+ "Unknown", route_type),
+ route_type, route_length);
+
+ switch(route_type) {
+ case BGP_MULTICAST_VPN_ROUTE_TYPE_INTRA_AS_I_PMSI:
+ TCHECK2(pptr[0], BGP_VPN_RD_LEN);
+ offset = strlen(buf);
+ snprintf(buf + offset, buflen - offset, ", RD: %s, Originator %s",
+ bgp_vpn_rd_print(pptr),
+ bgp_vpn_ip_print(pptr + BGP_VPN_RD_LEN,
+ (route_length - BGP_VPN_RD_LEN) << 3));
+ break;
+ case BGP_MULTICAST_VPN_ROUTE_TYPE_INTER_AS_I_PMSI:
+ TCHECK2(pptr[0], BGP_VPN_RD_LEN + 4);
+ offset = strlen(buf);
+ snprintf(buf + offset, buflen - offset, ", RD: %s, Source-AS %u",
+ bgp_vpn_rd_print(pptr),
+ EXTRACT_32BITS(pptr + BGP_VPN_RD_LEN));
+ break;
+
+ case BGP_MULTICAST_VPN_ROUTE_TYPE_S_PMSI:
+ TCHECK2(pptr[0], BGP_VPN_RD_LEN);
+ offset = strlen(buf);
+ snprintf(buf + offset, buflen - offset, ", RD: %s",
+ bgp_vpn_rd_print(pptr));
+ pptr += BGP_VPN_RD_LEN;
+
+ sg_length = bgp_vpn_sg_print(pptr, buf, buflen);
+ addr_length = route_length - sg_length;
+
+ TCHECK2(pptr[0], addr_length);
+ offset = strlen(buf);
+ snprintf(buf + offset, buflen - offset, ", Originator %s",
+ bgp_vpn_ip_print(pptr, addr_length << 3));
+ break;
+
+ case BGP_MULTICAST_VPN_ROUTE_TYPE_SOURCE_ACTIVE:
+ TCHECK2(pptr[0], BGP_VPN_RD_LEN);
+ offset = strlen(buf);
+ snprintf(buf + offset, buflen - offset, ", RD: %s",
+ bgp_vpn_rd_print(pptr));
+ pptr += BGP_VPN_RD_LEN;
+
+ bgp_vpn_sg_print(pptr, buf, buflen);
+ break;
+
+ case BGP_MULTICAST_VPN_ROUTE_TYPE_SHARED_TREE_JOIN: /* fall through */
+ case BGP_MULTICAST_VPN_ROUTE_TYPE_SOURCE_TREE_JOIN:
+ TCHECK2(pptr[0], BGP_VPN_RD_LEN);
+ offset = strlen(buf);
+ snprintf(buf + offset, buflen - offset, ", RD: %s, Source-AS %u",
+ bgp_vpn_rd_print(pptr),
+ EXTRACT_32BITS(pptr + BGP_VPN_RD_LEN));
+ pptr += BGP_VPN_RD_LEN;
+
+ bgp_vpn_sg_print(pptr, buf, buflen);
+ break;
+
+ /*
+ * no per route-type printing yet.
+ */
+ case BGP_MULTICAST_VPN_ROUTE_TYPE_INTRA_AS_SEG_LEAF:
+ default:
+ break;
+ }
+
+ return route_length + 2;
+
+trunc:
+ return -2;
+}
+
/*
* As I remember, some versions of systems have an snprintf() that
* returns -1 if the buffer would have overflowed. If the return
@@ -863,6 +1100,63 @@ trunc:
return -2;
}
+/*
+ * bgp_attr_get_as_size
+ *
+ * Try to find the size of the ASs encoded in an as-path. It is not obvious, as
+ * both Old speakers that do not support 4 byte AS, and the new speakers that do
+ * support, exchange AS-Path with the same path-attribute type value 0x02.
+ */
+static int
+bgp_attr_get_as_size (u_int8_t bgpa_type, const u_char *pptr, int len)
+{
+ const u_char *tptr = pptr;
+
+ /*
+ * If the path attribute is the optional AS4 path type, then we already
+ * know, that ASs must be encoded in 4 byte format.
+ */
+ if (bgpa_type == BGPTYPE_AS4_PATH) {
+ return 4;
+ }
+
+ /*
+ * Let us assume that ASs are of 2 bytes in size, and check if the AS-Path
+ * TLV is good. If not, ask the caller to try with AS encoded as 4 bytes
+ * each.
+ */
+ while (tptr < pptr + len) {
+ TCHECK(tptr[0]);
+
+ /*
+ * If we do not find a valid segment type, our guess might be wrong.
+ */
+ if (tptr[0] < BGP_AS_SEG_TYPE_MIN || tptr[0] > BGP_AS_SEG_TYPE_MAX) {
+ goto trunc;
+ }
+ TCHECK(tptr[1]);
+ tptr += 2 + tptr[1] * 2;
+ }
+
+ /*
+ * If we correctly reached end of the AS path attribute data content,
+ * then most likely ASs were indeed encoded as 2 bytes.
+ */
+ if (tptr == pptr + len) {
+ return 2;
+ }
+
+trunc:
+
+ /*
+ * We can come here, either we did not have enough data, or if we
+ * try to decode 4 byte ASs in 2 byte format. Either way, return 4,
+ * so that calller can try to decode each AS as of 4 bytes. If indeed
+ * there was not enough data, it will crib and end the parse anyways.
+ */
+ return 4;
+}
+
static int
bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
{
@@ -878,6 +1172,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
const u_char *tptr;
char buf[MAXHOSTNAMELEN + 100];
char tokbuf[TOKBUFSIZE];
+ int as_size;
tptr = pptr;
tlen=len;
@@ -895,6 +1190,11 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
}
break;
+
+ /*
+ * Process AS4 byte path and AS2 byte path attributes here.
+ */
+ case BGPTYPE_AS4_PATH:
case BGPTYPE_AS_PATH:
if (len % 2) {
printf("invalid len");
@@ -905,21 +1205,33 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
break;
}
+ /*
+ * BGP updates exchanged between New speakers that support 4
+ * byte AS, ASs are always encoded in 4 bytes. There is no
+ * definitive way to find this, just by the packet's
+ * contents. So, check for packet's TLV's sanity assuming
+ * 2 bytes first, and it does not pass, assume that ASs are
+ * encoded in 4 bytes format and move on.
+ */
+ as_size = bgp_attr_get_as_size(attr->bgpa_type, pptr, len);
+
while (tptr < pptr + len) {
TCHECK(tptr[0]);
printf("%s", tok2strbuf(bgp_as_path_segment_open_values,
"?", tptr[0],
tokbuf, sizeof(tokbuf)));
- for (i = 0; i < tptr[1] * 2; i += 2) {
- TCHECK2(tptr[2 + i], 2);
- printf("%u ", EXTRACT_16BITS(&tptr[2 + i]));
+ for (i = 0; i < tptr[1] * as_size; i += as_size) {
+ TCHECK2(tptr[2 + i], as_size);
+ printf("%u ",
+ as_size == 2 ? EXTRACT_16BITS(&tptr[2 + i]) :
+ EXTRACT_32BITS(&tptr[2 + i]));
}
TCHECK(tptr[0]);
printf("%s", tok2strbuf(bgp_as_path_segment_close_values,
"?", tptr[0],
tokbuf, sizeof(tokbuf)));
TCHECK(tptr[1]);
- tptr += 2 + tptr[1] * 2;
+ tptr += 2 + tptr[1] * as_size;
}
break;
case BGPTYPE_NEXT_HOP:
@@ -952,6 +1264,15 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
printf(" AS #%u, origin %s", EXTRACT_16BITS(tptr),
getname(tptr + 2));
break;
+ case BGPTYPE_AGGREGATOR4:
+ if (len != 8) {
+ printf("invalid len");
+ break;
+ }
+ TCHECK2(tptr[0], 8);
+ printf(" AS #%u, origin %s", EXTRACT_32BITS(tptr),
+ getname(tptr + 4));
+ break;
case BGPTYPE_COMMUNITIES:
if (len % 4) {
printf("invalid len");
@@ -1027,12 +1348,12 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
case (AFNUM_INET<<8 | SAFNUM_VPNUNICAST):
case (AFNUM_INET<<8 | SAFNUM_VPNMULTICAST):
case (AFNUM_INET<<8 | SAFNUM_VPNUNIMULTICAST):
+ case (AFNUM_INET<<8 | SAFNUM_MULTICAST_VPN):
#ifdef INET6
case (AFNUM_INET6<<8 | SAFNUM_UNICAST):
case (AFNUM_INET6<<8 | SAFNUM_MULTICAST):
case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST):
case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST):
- case (AFNUM_INET6<<8 | SAFNUM_RT_ROUTING_INFO):
case (AFNUM_INET6<<8 | SAFNUM_VPNUNICAST):
case (AFNUM_INET6<<8 | SAFNUM_VPNMULTICAST):
case (AFNUM_INET6<<8 | SAFNUM_VPNUNIMULTICAST):
@@ -1073,6 +1394,7 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
case (AFNUM_INET<<8 | SAFNUM_UNIMULTICAST):
case (AFNUM_INET<<8 | SAFNUM_LABUNICAST):
case (AFNUM_INET<<8 | SAFNUM_RT_ROUTING_INFO):
+ case (AFNUM_INET<<8 | SAFNUM_MULTICAST_VPN):
if (tlen < (int)sizeof(struct in_addr)) {
printf("invalid len");
tlen = 0;
@@ -1103,7 +1425,6 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
case (AFNUM_INET6<<8 | SAFNUM_MULTICAST):
case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST):
case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST):
- case (AFNUM_INET6<<8 | SAFNUM_RT_ROUTING_INFO):
if (tlen < (int)sizeof(struct in6_addr)) {
printf("invalid len");
tlen = 0;
@@ -1248,6 +1569,16 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
else
printf("\n\t %s", buf);
break;
+ case (AFNUM_INET<<8 | SAFNUM_MULTICAST_VPN): /* fall through */
+ case (AFNUM_INET6<<8 | SAFNUM_MULTICAST_VPN):
+ advance = decode_multicast_vpn(tptr, buf, sizeof(buf));
+ if (advance == -1)
+ printf("\n\t (illegal prefix length)");
+ else if (advance == -2)
+ goto trunc;
+ else
+ printf("\n\t %s", buf);
+ break;
#ifdef INET6
case (AFNUM_INET6<<8 | SAFNUM_UNICAST):
case (AFNUM_INET6<<8 | SAFNUM_MULTICAST):
@@ -1280,15 +1611,6 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
else
printf("\n\t %s", buf);
break;
- case (AFNUM_INET6<<8 | SAFNUM_RT_ROUTING_INFO):
- advance = decode_rt_routing_info(tptr, buf, sizeof(buf));
- if (advance == -1)
- printf("\n\t (illegal prefix length)");
- else if (advance == -2)
- goto trunc;
- else
- printf("\n\t %s", buf);
- break;
#endif
case (AFNUM_VPLS<<8 | SAFNUM_VPLS):
case (AFNUM_L2VPN<<8 | SAFNUM_VPNUNICAST):
@@ -1459,6 +1781,16 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
else
printf("\n\t %s", buf);
break;
+ case (AFNUM_INET<<8 | SAFNUM_MULTICAST_VPN): /* fall through */
+ case (AFNUM_INET6<<8 | SAFNUM_MULTICAST_VPN):
+ advance = decode_multicast_vpn(tptr, buf, sizeof(buf));
+ if (advance == -1)
+ printf("\n\t (illegal prefix length)");
+ else if (advance == -2)
+ goto trunc;
+ else
+ printf("\n\t %s", buf);
+ break;
default:
TCHECK2(*(tptr-3),tlen);
printf("no AFI %u / SAFI %u decoder",af,safi);
@@ -1495,12 +1827,14 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
switch(extd_comm) {
case BGP_EXT_COM_RT_0:
case BGP_EXT_COM_RO_0:
- printf(": %u:%s",
+ printf(": %u:%u (= %s)",
EXTRACT_16BITS(tptr+2),
+ EXTRACT_32BITS(tptr+4),
getname(tptr+4));
break;
case BGP_EXT_COM_RT_1:
case BGP_EXT_COM_RO_1:
+ case BGP_EXT_COM_VRF_RT_IMP:
printf(": %s:%u",
getname(tptr+2),
EXTRACT_16BITS(tptr+6));
@@ -1516,11 +1850,6 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
printf(": bandwidth: %.3f Mbps",
bw.f*8/1000000);
break;
- case BGP_EXT_COM_CISCO_MCAST:
- printf(": AS %u, group %s",
- EXTRACT_16BITS(tptr+2),
- getname(tptr+4));
- break;
case BGP_EXT_COM_VPN_ORIGIN:
case BGP_EXT_COM_VPN_ORIGIN2:
case BGP_EXT_COM_VPN_ORIGIN3:
@@ -1549,6 +1878,9 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
*(tptr+3),
EXTRACT_16BITS(tptr+4));
break;
+ case BGP_EXT_COM_SOURCE_AS:
+ printf(": AS %u", EXTRACT_16BITS(tptr+2));
+ break;
default:
TCHECK2(*tptr,8);
print_unknown_data(tptr,"\n\t ",8);
@@ -1559,6 +1891,64 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len)
}
break;
+ case BGPTYPE_PMSI_TUNNEL:
+ {
+ u_int8_t tunnel_type, flags;
+
+ tunnel_type = *(tptr+1);
+ flags = *tptr;
+ tlen = len;
+
+ TCHECK2(tptr[0], 5);
+ printf("\n\t Tunnel-type %s (%u), Flags [%s], MPLS Label %u",
+ tok2str(bgp_pmsi_tunnel_values, "Unknown", tunnel_type),
+ tunnel_type,
+ bittok2str(bgp_pmsi_flag_values, "none", flags),
+ EXTRACT_24BITS(tptr+2)>>4);
+
+ tptr +=5;
+ tlen -= 5;
+
+ switch (tunnel_type) {
+ case BGP_PMSI_TUNNEL_PIM_SM: /* fall through */
+ case BGP_PMSI_TUNNEL_PIM_BIDIR:
+ TCHECK2(tptr[0], 8);
+ printf("\n\t Sender %s, P-Group %s",
+ ipaddr_string(tptr),
+ ipaddr_string(tptr+4));
+ break;
+
+ case BGP_PMSI_TUNNEL_PIM_SSM:
+ TCHECK2(tptr[0], 8);
+ printf("\n\t Root-Node %s, P-Group %s",
+ ipaddr_string(tptr),
+ ipaddr_string(tptr+4));
+ break;
+ case BGP_PMSI_TUNNEL_INGRESS:
+ TCHECK2(tptr[0], 4);
+ printf("\n\t Tunnel-Endpoint %s",
+ ipaddr_string(tptr));
+ break;
+ case BGP_PMSI_TUNNEL_LDP_P2MP: /* fall through */
+ case BGP_PMSI_TUNNEL_LDP_MP2MP:
+ TCHECK2(tptr[0], 8);
+ printf("\n\t Root-Node %s, LSP-ID 0x%08x",
+ ipaddr_string(tptr),
+ EXTRACT_32BITS(tptr+4));
+ break;
+ case BGP_PMSI_TUNNEL_RSVP_P2MP:
+ TCHECK2(tptr[0], 8);
+ printf("\n\t Extended-Tunnel-ID %s, P2MP-ID 0x%08x",
+ ipaddr_string(tptr),
+ EXTRACT_32BITS(tptr+4));
+ break;
+ default:
+ if (vflag <= 1) {
+ print_unknown_data(tptr,"\n\t ",tlen);
+ }
+ }
+ break;
+ }
case BGPTYPE_ATTR_SET:
TCHECK2(tptr[0], 4);
printf("\n\t Origin AS: %u", EXTRACT_32BITS(tptr));
@@ -2077,3 +2467,10 @@ bgp_print(const u_char *dat, int length)
trunc:
printf(" [|BGP]");
}
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/contrib/tcpdump/print-bootp.c b/contrib/tcpdump/print-bootp.c
index b7e2cda..0715eb1 100644
--- a/contrib/tcpdump/print-bootp.c
+++ b/contrib/tcpdump/print-bootp.c
@@ -24,7 +24,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.78.2.9 2007/08/21 22:02:08 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.88 2007-09-20 15:04:45 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -354,9 +354,13 @@ static struct tok dhcp_msg_values[] = {
{ 0, NULL }
};
-#define AGENT_SUBOPTION_CIRCUIT_ID 1
+#define AGENT_SUBOPTION_CIRCUIT_ID 1 /* RFC 3046 */
+#define AGENT_SUBOPTION_REMOTE_ID 2 /* RFC 3046 */
+#define AGENT_SUBOPTION_SUBSCRIBER_ID 6 /* RFC 3993 */
static struct tok agent_suboption_values[] = {
{ AGENT_SUBOPTION_CIRCUIT_ID, "Circuit-ID" },
+ { AGENT_SUBOPTION_REMOTE_ID, "Remote-ID" },
+ { AGENT_SUBOPTION_SUBSCRIBER_ID, "Subscriber-ID" },
{ 0, NULL }
};
@@ -688,9 +692,11 @@ rfc1048_print(register const u_char *bp)
suboptlen);
switch (subopt) {
- case AGENT_SUBOPTION_CIRCUIT_ID:
- fn_printn(bp, suboptlen, NULL);
- break;
+ case AGENT_SUBOPTION_CIRCUIT_ID: /* fall through */
+ case AGENT_SUBOPTION_REMOTE_ID:
+ case AGENT_SUBOPTION_SUBSCRIBER_ID:
+ fn_printn(bp, suboptlen, NULL);
+ break;
default:
print_unknown_data(bp, "\n\t\t", suboptlen);
diff --git a/contrib/tcpdump/print-bt.c b/contrib/tcpdump/print-bt.c
new file mode 100644
index 0000000..498440c
--- /dev/null
+++ b/contrib/tcpdump/print-bt.c
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2007
+ * paolo.abeni@email.it All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code distributions
+ * retain the above copyright notice and this paragraph in its entirety, (2)
+ * distributions including binary code include the above copyright notice and
+ * this paragraph in its entirety in the documentation or other materials
+ * provided with the distribution, and (3) all advertising materials mentioning
+ * features or use of this software display the following acknowledgement:
+ * ``This product includes software developed by Paolo Abeni.''
+ * The name of author may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+ "@(#) $Header: /tcpdump/master/tcpdump/print-bt.c,v 1.1.2.1 2008-09-25 21:50:04 guy Exp $";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <pcap.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "interface.h"
+#include "addrtoname.h"
+
+#if defined(DLT_BLUETOOTH_HCI_H4_WITH_PHDR) && defined(HAVE_PCAP_BLUETOOTH_H)
+#include <pcap/bluetooth.h>
+
+#define BT_HDRLEN sizeof(pcap_bluetooth_h4_header)
+/*
+ * This is the top level routine of the printer. 'p' points
+ * to the bluetooth header of the packet, 'h->ts' is the timestamp,
+ * 'h->len' is the length of the packet off the wire, and 'h->caplen'
+ * is the number of bytes actually captured.
+ */
+u_int
+bt_if_print(const struct pcap_pkthdr *h, const u_char *p)
+{
+ u_int length = h->len;
+ u_int caplen = h->caplen;
+ const pcap_bluetooth_h4_header* hdr = (const pcap_bluetooth_h4_header*)p;
+
+ if (caplen < BT_HDRLEN) {
+ printf("[|bt]");
+ return (BT_HDRLEN);
+ }
+ caplen -= BT_HDRLEN;
+ length -= BT_HDRLEN;
+ p += BT_HDRLEN;
+ if (eflag)
+ (void)printf("hci length %d, direction %s, ", length, (ntohl(hdr->direction)&0x1)?"in":"out");
+
+ if (!suppress_default_print)
+ default_print(p, caplen);
+
+ return (BT_HDRLEN);
+}
+#endif
+
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 8
+ * End:
+ */
diff --git a/contrib/tcpdump/print-cdp.c b/contrib/tcpdump/print-cdp.c
index 4398fbe..f8f4427 100644
--- a/contrib/tcpdump/print-cdp.c
+++ b/contrib/tcpdump/print-cdp.c
@@ -26,7 +26,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-cdp.c,v 1.25 2004/10/07 14:53:11 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-cdp.c,v 1.25 2004-10-07 14:53:11 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-cfm.c b/contrib/tcpdump/print-cfm.c
new file mode 100644
index 0000000..bd98dd2
--- /dev/null
+++ b/contrib/tcpdump/print-cfm.c
@@ -0,0 +1,641 @@
+/*
+ * Copyright (c) 1998-2006 The TCPDUMP project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * Support for the IEEE Connectivity Fault Management Protocols as per 802.1ag.
+ *
+ * Original code by Hannes Gredler (hannes@juniper.net)
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+ "@(#) $Header: /tcpdump/master/tcpdump/print-cfm.c,v 1.5 2007-07-24 16:01:42 hannes Exp $";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "interface.h"
+#include "extract.h"
+#include "ether.h"
+#include "addrtoname.h"
+#include "oui.h"
+#include "af.h"
+
+/*
+ * Prototypes
+ */
+const char * cfm_egress_id_string(register const u_char *);
+int cfm_mgmt_addr_print(register const u_char *);
+
+struct cfm_common_header_t {
+ u_int8_t mdlevel_version;
+ u_int8_t opcode;
+ u_int8_t flags;
+ u_int8_t first_tlv_offset;
+};
+
+#define CFM_VERSION 0
+#define CFM_EXTRACT_VERSION(x) (((x)&0x1f))
+#define CFM_EXTRACT_MD_LEVEL(x) (((x)&0xe0)>>5)
+
+#define CFM_OPCODE_CCM 1
+#define CFM_OPCODE_LBR 2
+#define CFM_OPCODE_LBM 3
+#define CFM_OPCODE_LTR 4
+#define CFM_OPCODE_LTM 5
+
+static const struct tok cfm_opcode_values[] = {
+ { CFM_OPCODE_CCM, "Continouity Check Message"},
+ { CFM_OPCODE_LBR, "Loopback Reply"},
+ { CFM_OPCODE_LBM, "Loopback Message"},
+ { CFM_OPCODE_LTR, "Linktrace Reply"},
+ { CFM_OPCODE_LTM, "Linktrace Message"},
+ { 0, NULL}
+};
+
+/*
+ * Message Formats.
+ */
+struct cfm_ccm_t {
+ u_int8_t sequence[4];
+ u_int8_t ma_epi[2];
+ u_int8_t md_nameformat;
+ u_int8_t md_namelength;
+ u_int8_t md_name[46]; /* md name and short ma name */
+ u_int8_t reserved_itu[16];
+ u_int8_t reserved[6];
+};
+
+/*
+ * Timer Bases for the CCM Interval field.
+ * Expressed in units of seconds.
+ */
+const float ccm_interval_base[8] = {0, 0.003333, 0.01, 0.1, 1, 10, 60, 600};
+#define CCM_INTERVAL_MIN_MULTIPLIER 3.25
+#define CCM_INTERVAL_MAX_MULTIPLIER 3.5
+
+#define CFM_CCM_RDI_FLAG 0x80
+#define CFM_EXTRACT_CCM_INTERVAL(x) (((x)&0x07))
+
+#define CFM_CCM_MD_FORMAT_8021 0
+#define CFM_CCM_MD_FORMAT_NONE 1
+#define CFM_CCM_MD_FORMAT_DNS 2
+#define CFM_CCM_MD_FORMAT_MAC 3
+#define CFM_CCM_MD_FORMAT_CHAR 4
+
+static const struct tok cfm_md_nameformat_values[] = {
+ { CFM_CCM_MD_FORMAT_8021, "IEEE 802.1"},
+ { CFM_CCM_MD_FORMAT_NONE, "No MD Name present"},
+ { CFM_CCM_MD_FORMAT_DNS, "DNS string"},
+ { CFM_CCM_MD_FORMAT_MAC, "MAC + 16Bit Integer"},
+ { CFM_CCM_MD_FORMAT_CHAR, "Character string"},
+ { 0, NULL}
+};
+
+#define CFM_CCM_MA_FORMAT_8021 0
+#define CFM_CCM_MA_FORMAT_VID 1
+#define CFM_CCM_MA_FORMAT_CHAR 2
+#define CFM_CCM_MA_FORMAT_INT 3
+#define CFM_CCM_MA_FORMAT_VPN 4
+
+static const struct tok cfm_ma_nameformat_values[] = {
+ { CFM_CCM_MA_FORMAT_8021, "IEEE 802.1"},
+ { CFM_CCM_MA_FORMAT_VID, "Primary VID"},
+ { CFM_CCM_MA_FORMAT_CHAR, "Character string"},
+ { CFM_CCM_MA_FORMAT_INT, "16Bit Integer"},
+ { CFM_CCM_MA_FORMAT_VPN, "RFC2685 VPN-ID"},
+ { 0, NULL}
+};
+
+struct cfm_lbm_t {
+ u_int8_t transaction_id[4];
+ u_int8_t reserved[4];
+};
+
+struct cfm_ltm_t {
+ u_int8_t transaction_id[4];
+ u_int8_t egress_id[8];
+ u_int8_t ttl;
+ u_int8_t original_mac[ETHER_ADDR_LEN];
+ u_int8_t target_mac[ETHER_ADDR_LEN];
+ u_int8_t reserved[3];
+};
+
+static const struct tok cfm_ltm_flag_values[] = {
+ { 0x80, "Use Forwarding-DB only"},
+ { 0, NULL}
+};
+
+struct cfm_ltr_t {
+ u_int8_t transaction_id[4];
+ u_int8_t last_egress_id[8];
+ u_int8_t next_egress_id[8];
+ u_int8_t ttl;
+ u_int8_t replay_action;
+ u_int8_t reserved[6];
+};
+
+static const struct tok cfm_ltr_flag_values[] = {
+ { 0x80, "Forwarded"},
+ { 0x40, "Terminal MEP"},
+ { 0, NULL}
+};
+
+static const struct tok cfm_ltr_replay_action_values[] = {
+ { 1, "Exact Match"},
+ { 2, "Filtering DB"},
+ { 3, "MIP CCM DB"},
+ { 0, NULL}
+};
+
+
+#define CFM_TLV_END 0
+#define CFM_TLV_SENDER_ID 1
+#define CFM_TLV_PORT_STATUS 2
+#define CFM_TLV_INTERFACE_STATUS 3
+#define CFM_TLV_DATA 4
+#define CFM_TLV_REPLY_INGRESS 5
+#define CFM_TLV_REPLY_EGRESS 6
+#define CFM_TLV_PRIVATE 31
+
+static const struct tok cfm_tlv_values[] = {
+ { CFM_TLV_END, "End"},
+ { CFM_TLV_SENDER_ID, "Sender ID"},
+ { CFM_TLV_PORT_STATUS, "Port status"},
+ { CFM_TLV_INTERFACE_STATUS, "Interface status"},
+ { CFM_TLV_DATA, "Data"},
+ { CFM_TLV_REPLY_INGRESS, "Reply Ingress"},
+ { CFM_TLV_REPLY_EGRESS, "Reply Egress"},
+ { CFM_TLV_PRIVATE, "Organization Specific"},
+ { 0, NULL}
+};
+
+/*
+ * TLVs
+ */
+
+struct cfm_tlv_header_t {
+ u_int8_t type;
+ u_int8_t length[2];
+};
+
+/* FIXME define TLV formats */
+
+static const struct tok cfm_tlv_port_status_values[] = {
+ { 1, "Blocked"},
+ { 2, "Up"},
+ { 0, NULL}
+};
+
+static const struct tok cfm_tlv_interface_status_values[] = {
+ { 1, "Up"},
+ { 2, "Down"},
+ { 3, "Testing"},
+ { 5, "Dormant"},
+ { 6, "not present"},
+ { 7, "lower Layer down"},
+ { 0, NULL}
+};
+
+#define CFM_CHASSIS_ID_CHASSIS_COMPONENT 1
+#define CFM_CHASSIS_ID_INTERFACE_ALIAS 2
+#define CFM_CHASSIS_ID_PORT_COMPONENT 3
+#define CFM_CHASSIS_ID_MAC_ADDRESS 4
+#define CFM_CHASSIS_ID_NETWORK_ADDRESS 5
+#define CFM_CHASSIS_ID_INTERFACE_NAME 6
+#define CFM_CHASSIS_ID_LOCAL 7
+
+static const struct tok cfm_tlv_senderid_chassisid_values[] = {
+ { 0, "Reserved"},
+ { CFM_CHASSIS_ID_CHASSIS_COMPONENT, "Chassis component"},
+ { CFM_CHASSIS_ID_INTERFACE_ALIAS, "Interface alias"},
+ { CFM_CHASSIS_ID_PORT_COMPONENT, "Port component"},
+ { CFM_CHASSIS_ID_MAC_ADDRESS, "MAC address"},
+ { CFM_CHASSIS_ID_NETWORK_ADDRESS, "Network address"},
+ { CFM_CHASSIS_ID_INTERFACE_NAME, "Interface name"},
+ { CFM_CHASSIS_ID_LOCAL, "Locally assigned"},
+ { 0, NULL}
+};
+
+
+int
+cfm_mgmt_addr_print(register const u_char *tptr) {
+
+ u_int mgmt_addr_type;
+ u_int hexdump = FALSE;
+
+ /*
+ * Altough AFIs are tpically 2 octects wide,
+ * 802.1ab specifies that this field width
+ * is only once octet
+ */
+ mgmt_addr_type = *tptr;
+ printf("\n\t Management Address Type %s (%u)",
+ tok2str(af_values, "Unknown", mgmt_addr_type),
+ mgmt_addr_type);
+
+ /*
+ * Resolve the passed in Address.
+ */
+ switch(mgmt_addr_type) {
+ case AFNUM_INET:
+ printf(", %s", ipaddr_string(tptr + 1));
+ break;
+
+#ifdef INET6
+ case AFNUM_INET6:
+ printf(", %s", ip6addr_string(tptr + 1));
+ break;
+#endif
+
+ default:
+ hexdump = TRUE;
+ break;
+ }
+
+ return hexdump;
+}
+
+/*
+ * The egress-ID string is a 16-Bit string plus a MAC address.
+ */
+const char *
+cfm_egress_id_string(register const u_char *tptr) {
+ static char egress_id_buffer[80];
+
+ snprintf(egress_id_buffer, sizeof(egress_id_buffer),
+ "MAC %0x4x-%s",
+ EXTRACT_16BITS(tptr),
+ etheraddr_string(tptr+2));
+
+ return egress_id_buffer;
+}
+
+void
+cfm_print(register const u_char *pptr, register u_int length) {
+
+ const struct cfm_common_header_t *cfm_common_header;
+ const struct cfm_tlv_header_t *cfm_tlv_header;
+ const u_int8_t *tptr, *tlv_ptr, *ma_name, *ma_nameformat, *ma_namelength;
+ u_int hexdump, tlen, cfm_tlv_len, cfm_tlv_type, ccm_interval;
+
+
+ union {
+ const struct cfm_ccm_t *cfm_ccm;
+ const struct cfm_lbm_t *cfm_lbm;
+ const struct cfm_ltm_t *cfm_ltm;
+ const struct cfm_ltr_t *cfm_ltr;
+ } msg_ptr;
+
+ tptr=pptr;
+ cfm_common_header = (const struct cfm_common_header_t *)pptr;
+ TCHECK(*cfm_common_header);
+
+ /*
+ * Sanity checking of the header.
+ */
+ if (CFM_EXTRACT_VERSION(cfm_common_header->mdlevel_version) != CFM_VERSION) {
+ printf("CFMv%u not supported, length %u",
+ CFM_EXTRACT_VERSION(cfm_common_header->mdlevel_version), length);
+ return;
+ }
+
+ printf("CFMv%u %s, MD Level %u, length %u",
+ CFM_EXTRACT_VERSION(cfm_common_header->mdlevel_version),
+ tok2str(cfm_opcode_values, "unknown (%u)", cfm_common_header->opcode),
+ CFM_EXTRACT_MD_LEVEL(cfm_common_header->mdlevel_version),
+ length);
+
+ /*
+ * In non-verbose mode just print the opcode and md-level.
+ */
+ if (vflag < 1) {
+ return;
+ }
+
+ printf("\n\tFirst TLV offset %u", cfm_common_header->first_tlv_offset);
+
+ tptr += sizeof(const struct cfm_common_header_t);
+ tlen = length - sizeof(struct cfm_common_header_t);
+
+ switch (cfm_common_header->opcode) {
+ case CFM_OPCODE_CCM:
+ msg_ptr.cfm_ccm = (const struct cfm_ccm_t *)tptr;
+
+ ccm_interval = CFM_EXTRACT_CCM_INTERVAL(cfm_common_header->flags);
+ printf(", Flags [CCM Interval %u%s]",
+ ccm_interval,
+ cfm_common_header->flags & CFM_CCM_RDI_FLAG ?
+ ", RDI" : "");
+
+ /*
+ * Resolve the CCM interval field.
+ */
+ if (ccm_interval) {
+ printf("\n\t CCM Interval %.3fs"
+ ", min CCM Lifetime %.3fs, max CCM Lifetime %.3fs",
+ ccm_interval_base[ccm_interval],
+ ccm_interval_base[ccm_interval] * CCM_INTERVAL_MIN_MULTIPLIER,
+ ccm_interval_base[ccm_interval] * CCM_INTERVAL_MAX_MULTIPLIER);
+ }
+
+ printf("\n\t Sequence Number 0x%08x, MA-End-Point-ID 0x%04x",
+ EXTRACT_32BITS(msg_ptr.cfm_ccm->sequence),
+ EXTRACT_16BITS(msg_ptr.cfm_ccm->ma_epi));
+
+
+ /*
+ * Resolve the MD fields.
+ */
+ printf("\n\t MD Name Format %s (%u), MD Name length %u",
+ tok2str(cfm_md_nameformat_values, "Unknown",
+ msg_ptr.cfm_ccm->md_nameformat),
+ msg_ptr.cfm_ccm->md_nameformat,
+ msg_ptr.cfm_ccm->md_namelength);
+
+ if (msg_ptr.cfm_ccm->md_nameformat != CFM_CCM_MD_FORMAT_NONE) {
+ printf("\n\t MD Name: ");
+ switch (msg_ptr.cfm_ccm->md_nameformat) {
+ case CFM_CCM_MD_FORMAT_DNS:
+ case CFM_CCM_MD_FORMAT_CHAR:
+ safeputs((const char *)msg_ptr.cfm_ccm->md_name, msg_ptr.cfm_ccm->md_namelength);
+ break;
+
+ case CFM_CCM_MD_FORMAT_MAC:
+ printf("\n\t MAC %s", etheraddr_string(
+ msg_ptr.cfm_ccm->md_name));
+ break;
+
+ /* FIXME add printers for those MD formats - hexdump for now */
+ case CFM_CCM_MA_FORMAT_8021:
+ default:
+ print_unknown_data(msg_ptr.cfm_ccm->md_name, "\n\t ",
+ msg_ptr.cfm_ccm->md_namelength);
+ }
+ }
+
+
+ /*
+ * Resolve the MA fields.
+ */
+ ma_nameformat = msg_ptr.cfm_ccm->md_name + msg_ptr.cfm_ccm->md_namelength;
+ ma_namelength = msg_ptr.cfm_ccm->md_name + msg_ptr.cfm_ccm->md_namelength + 1;
+ ma_name = msg_ptr.cfm_ccm->md_name + msg_ptr.cfm_ccm->md_namelength + 2;
+
+ printf("\n\t MA Name-Format %s (%u), MA name length %u",
+ tok2str(cfm_ma_nameformat_values, "Unknown",
+ *ma_nameformat),
+ *ma_nameformat,
+ *ma_namelength);
+
+ printf("\n\t MA Name: ");
+ switch (*ma_nameformat) {
+ case CFM_CCM_MA_FORMAT_CHAR:
+ safeputs((const char *)ma_name, *ma_namelength);
+ break;
+
+ /* FIXME add printers for those MA formats - hexdump for now */
+ case CFM_CCM_MA_FORMAT_8021:
+ case CFM_CCM_MA_FORMAT_VID:
+ case CFM_CCM_MA_FORMAT_INT:
+ case CFM_CCM_MA_FORMAT_VPN:
+ default:
+ print_unknown_data(ma_name, "\n\t ", *ma_namelength);
+ }
+ break;
+
+ case CFM_OPCODE_LTM:
+ printf(", Flags [%s]",
+ bittok2str(cfm_ltm_flag_values, "none", cfm_common_header->flags));
+
+ printf("\n\t Transaction-ID 0x%08x, Egress-ID %s, ttl %u",
+ EXTRACT_32BITS(msg_ptr.cfm_ltm->transaction_id),
+ cfm_egress_id_string(msg_ptr.cfm_ltm->egress_id),
+ msg_ptr.cfm_ltm->ttl);
+
+ printf("\n\t Original-MAC %s, Target-MAC %s",
+ etheraddr_string(msg_ptr.cfm_ltm->original_mac),
+ etheraddr_string(msg_ptr.cfm_ltm->target_mac));
+ break;
+
+ case CFM_OPCODE_LTR:
+ printf(", Flags [%s]",
+ bittok2str(cfm_ltr_flag_values, "none", cfm_common_header->flags));
+
+ printf("\n\t Transaction-ID 0x%08x, Last-Egress-ID %s",
+ EXTRACT_32BITS(msg_ptr.cfm_ltr->transaction_id),
+ cfm_egress_id_string(msg_ptr.cfm_ltr->last_egress_id));
+
+ printf("\n\t Next-Egress-ID %s, ttl %u",
+ cfm_egress_id_string(msg_ptr.cfm_ltr->next_egress_id),
+ msg_ptr.cfm_ltr->ttl);
+
+ printf("\n\t Replay-Action %s (%u)",
+ tok2str(cfm_ltr_replay_action_values,
+ "Unknown",
+ msg_ptr.cfm_ltr->replay_action),
+ msg_ptr.cfm_ltr->replay_action);
+ break;
+
+ /*
+ * No message decoder yet.
+ * Hexdump everything up until the start of the TLVs
+ */
+ case CFM_OPCODE_LBR:
+ case CFM_OPCODE_LBM:
+ default:
+ if (tlen > cfm_common_header->first_tlv_offset) {
+ print_unknown_data(tptr, "\n\t ",
+ tlen - cfm_common_header->first_tlv_offset);
+ }
+ break;
+ }
+
+ /*
+ * Sanity check for not walking off.
+ */
+ if (tlen <= cfm_common_header->first_tlv_offset) {
+ return;
+ }
+
+ tptr += cfm_common_header->first_tlv_offset;
+ tlen -= cfm_common_header->first_tlv_offset;
+
+ while (tlen > 0) {
+ cfm_tlv_header = (const struct cfm_tlv_header_t *)tptr;
+
+ /* Enough to read the tlv type ? */
+ TCHECK2(*tptr, 1);
+ cfm_tlv_type=cfm_tlv_header->type;
+
+ if (cfm_tlv_type != CFM_TLV_END) {
+ /* did we capture enough for fully decoding the object header ? */
+ TCHECK2(*tptr, sizeof(struct cfm_tlv_header_t));
+ cfm_tlv_len=EXTRACT_16BITS(&cfm_tlv_header->length);
+ } else {
+ cfm_tlv_len = 0;
+ }
+
+ printf("\n\t%s TLV (0x%02x), length %u",
+ tok2str(cfm_tlv_values, "Unknown", cfm_tlv_type),
+ cfm_tlv_type,
+ cfm_tlv_len);
+
+ /* sanity check for not walking off and infinite loop check. */
+ if ((cfm_tlv_type != CFM_TLV_END) &&
+ ((cfm_tlv_len + sizeof(struct cfm_tlv_header_t) > tlen) ||
+ (!cfm_tlv_len))) {
+ print_unknown_data(tptr,"\n\t ",tlen);
+ return;
+ }
+
+ tptr += sizeof(struct cfm_tlv_header_t);
+ tlen -= sizeof(struct cfm_tlv_header_t);
+ tlv_ptr = tptr;
+
+ /* did we capture enough for fully decoding the object ? */
+ if (cfm_tlv_type != CFM_TLV_END) {
+ TCHECK2(*tptr, cfm_tlv_len);
+ }
+ hexdump = FALSE;
+
+ switch(cfm_tlv_type) {
+ case CFM_TLV_END:
+ /* we are done - bail out */
+ return;
+
+ case CFM_TLV_PORT_STATUS:
+ printf(", Status: %s (%u)",
+ tok2str(cfm_tlv_port_status_values, "Unknown", *tptr),
+ *tptr);
+ break;
+
+ case CFM_TLV_INTERFACE_STATUS:
+ printf(", Status: %s (%u)",
+ tok2str(cfm_tlv_interface_status_values, "Unknown", *tptr),
+ *tptr);
+ break;
+
+ case CFM_TLV_PRIVATE:
+ printf(", Vendor: %s (%u), Sub-Type %u",
+ tok2str(oui_values,"Unknown", EXTRACT_24BITS(tptr)),
+ EXTRACT_24BITS(tptr),
+ *(tptr+3));
+ hexdump = TRUE;
+ break;
+
+ case CFM_TLV_SENDER_ID:
+ {
+ u_int chassis_id_type, chassis_id_length;
+ u_int mgmt_addr_length;
+
+ /*
+ * Check if there is a Chassis-ID.
+ */
+ chassis_id_length = *tptr;
+ if (chassis_id_length > tlen) {
+ hexdump = TRUE;
+ break;
+ }
+
+ tptr++;
+ tlen--;
+
+ if (chassis_id_length) {
+ chassis_id_type = *tptr;
+ printf("\n\t Chassis-ID Type %s (%u), Chassis-ID length %u",
+ tok2str(cfm_tlv_senderid_chassisid_values,
+ "Unknown",
+ chassis_id_type),
+ chassis_id_type,
+ chassis_id_length);
+
+ switch (chassis_id_type) {
+ case CFM_CHASSIS_ID_MAC_ADDRESS:
+ printf("\n\t MAC %s", etheraddr_string(tptr+1));
+ break;
+
+ case CFM_CHASSIS_ID_NETWORK_ADDRESS:
+ hexdump |= cfm_mgmt_addr_print(tptr);
+ break;
+
+ case CFM_CHASSIS_ID_INTERFACE_NAME: /* fall through */
+ case CFM_CHASSIS_ID_INTERFACE_ALIAS:
+ case CFM_CHASSIS_ID_LOCAL:
+ case CFM_CHASSIS_ID_CHASSIS_COMPONENT:
+ case CFM_CHASSIS_ID_PORT_COMPONENT:
+ safeputs((const char *)tptr+1, chassis_id_length);
+ break;
+
+ default:
+ hexdump = TRUE;
+ break;
+ }
+ }
+
+ tptr += chassis_id_length;
+ tlen -= chassis_id_length;
+
+ /*
+ * Check if there is a Management Address.
+ */
+ mgmt_addr_length = *tptr;
+ if (mgmt_addr_length > tlen) {
+ hexdump = TRUE;
+ break;
+ }
+
+ tptr++;
+ tlen--;
+
+ if (mgmt_addr_length) {
+ hexdump |= cfm_mgmt_addr_print(tptr);
+ }
+
+ tptr += mgmt_addr_length;
+ tlen -= mgmt_addr_length;
+
+ }
+ break;
+
+ /*
+ * FIXME those are the defined TLVs that lack a decoder
+ * you are welcome to contribute code ;-)
+ */
+
+ case CFM_TLV_DATA:
+ case CFM_TLV_REPLY_INGRESS:
+ case CFM_TLV_REPLY_EGRESS:
+ default:
+ hexdump = TRUE;
+ break;
+ }
+ /* do we want to see an additional hexdump ? */
+ if (hexdump || vflag > 1)
+ print_unknown_data(tlv_ptr, "\n\t ", cfm_tlv_len);
+
+ tptr+=cfm_tlv_len;
+ tlen-=cfm_tlv_len;
+ }
+ return;
+trunc:
+ printf("\n\t\t packet exceeded snapshot");
+}
diff --git a/contrib/tcpdump/print-chdlc.c b/contrib/tcpdump/print-chdlc.c
index b7654f5..238e91a 100644
--- a/contrib/tcpdump/print-chdlc.c
+++ b/contrib/tcpdump/print-chdlc.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.32.2.11 2005/11/29 08:57:10 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.43 2005-11-29 08:56:19 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-cip.c b/contrib/tcpdump/print-cip.c
index 774b700..e9d672f 100644
--- a/contrib/tcpdump/print-cip.c
+++ b/contrib/tcpdump/print-cip.c
@@ -22,7 +22,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.25.2.1 2005/07/07 01:24:34 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-cip.c,v 1.26 2005-07-07 01:22:17 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-cnfp.c b/contrib/tcpdump/print-cnfp.c
index 9fdfbd4..86d7128 100644
--- a/contrib/tcpdump/print-cnfp.c
+++ b/contrib/tcpdump/print-cnfp.c
@@ -34,7 +34,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-cnfp.c,v 1.16.2.1 2005/04/20 20:53:39 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-cnfp.c,v 1.17 2005-04-20 20:53:18 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-dccp.c b/contrib/tcpdump/print-dccp.c
index e6bfca6..b7377cf 100644
--- a/contrib/tcpdump/print-dccp.c
+++ b/contrib/tcpdump/print-dccp.c
@@ -9,7 +9,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-dccp.c,v 1.1.2.6 2006/02/19 05:08:44 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-dccp.c,v 1.7.2.1 2007-11-09 00:45:16 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -60,9 +60,20 @@ static const char *dccp_feature_nums[] = {
"check data checksum",
};
+static inline int dccp_csum_coverage(const struct dccp_hdr* dh, u_int len)
+{
+ u_int cov;
+
+ if (DCCPH_CSCOV(dh) == 0)
+ return len;
+ cov = (dh->dccph_doff + DCCPH_CSCOV(dh) - 1) * sizeof(u_int32_t);
+ return (cov > len)? len : cov;
+}
+
static int dccp_cksum(const struct ip *ip,
const struct dccp_hdr *dh, u_int len)
{
+ int cov = dccp_csum_coverage(dh, len);
union phu {
struct phdr {
u_int32_t src;
@@ -86,15 +97,15 @@ static int dccp_cksum(const struct ip *ip,
phu.ph.dst = ip_finddst(ip);
sp = &phu.pa[0];
- return in_cksum((u_short *)dh, len, sp[0]+sp[1]+sp[2]+sp[3]+sp[4]+sp[5]);
+ return in_cksum((u_short *)dh, cov, sp[0]+sp[1]+sp[2]+sp[3]+sp[4]+sp[5]);
}
#ifdef INET6
static int dccp6_cksum(const struct ip6_hdr *ip6, const struct dccp_hdr *dh, u_int len)
{
size_t i;
- const u_int16_t *sp;
- u_int32_t sum;
+ u_int32_t sum = 0;
+ int cov = dccp_csum_coverage(dh, len);
union {
struct {
struct in6_addr ph_src;
@@ -113,23 +124,10 @@ static int dccp6_cksum(const struct ip6_hdr *ip6, const struct dccp_hdr *dh, u_i
phu.ph.ph_len = htonl(len);
phu.ph.ph_nxt = IPPROTO_DCCP;
- sum = 0;
for (i = 0; i < sizeof(phu.pa) / sizeof(phu.pa[0]); i++)
sum += phu.pa[i];
- sp = (const u_int16_t *)dh;
-
- for (i = 0; i < (len & ~1); i += 2)
- sum += *sp++;
-
- if (len & 1)
- sum += htons((*(const u_int8_t *)sp) << 8);
-
- while (sum > 0xffff)
- sum = (sum & 0xffff) + (sum >> 16);
- sum = ~sum & 0xffff;
-
- return (sum);
+ return in_cksum((u_short *)dh, cov, sum);
}
#endif
@@ -279,32 +277,21 @@ void dccp_print(const u_char *bp, const u_char *data2, u_int len)
}
/* checksum calculation */
-#ifdef INET6
- if (ip6) {
- if (ip6->ip6_plen && vflag) {
- u_int16_t sum, dccp_sum;
+ if (vflag && TTEST2(bp[0], len)) {
+ u_int16_t sum = 0, dccp_sum;
+ dccp_sum = EXTRACT_16BITS(&dh->dccph_checksum);
+ (void)printf("cksum 0x%04x ", dccp_sum);
+ if (IP_V(ip) == 4)
+ sum = dccp_cksum(ip, dh, len);
+#ifdef INET6
+ else if (IP_V(ip) == 6)
sum = dccp6_cksum(ip6, dh, len);
- dccp_sum = EXTRACT_16BITS(&dh->dccph_checksum);
- printf("cksum 0x%04x", dccp_sum);
- if (sum != 0) {
- (void)printf(" (incorrect (-> 0x%04x), ",in_cksum_shouldbe(dccp_sum, sum));
- } else
- (void)printf(" (correct), ");
- }
- } else
-#endif /* INET6 */
- if (vflag)
- {
- u_int16_t sum, dccp_sum;
-
- sum = dccp_cksum(ip, dh, len);
- dccp_sum = EXTRACT_16BITS(&dh->dccph_checksum);
- printf("cksum 0x%04x", dccp_sum);
- if (sum != 0) {
- (void)printf(" (incorrect (-> 0x%04x), ",in_cksum_shouldbe(dccp_sum, sum));
- } else
- (void)printf(" (correct), ");
+#endif
+ if (sum != 0)
+ (void)printf("(incorrect -> 0x%04x), ",in_cksum_shouldbe(dccp_sum, sum));
+ else
+ (void)printf("(correct), ");
}
switch (DCCPH_TYPE(dh)) {
diff --git a/contrib/tcpdump/print-decnet.c b/contrib/tcpdump/print-decnet.c
index ae7ba5c4..7fea582 100644
--- a/contrib/tcpdump/print-decnet.c
+++ b/contrib/tcpdump/print-decnet.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-decnet.c,v 1.38.2.1 2005/05/06 02:16:53 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-decnet.c,v 1.39 2005-05-06 02:16:26 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-dhcp6.c b/contrib/tcpdump/print-dhcp6.c
index 9f4999d..ec0df76 100644
--- a/contrib/tcpdump/print-dhcp6.c
+++ b/contrib/tcpdump/print-dhcp6.c
@@ -40,7 +40,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.35.2.1 2006/10/25 22:04:36 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.36.2.1 2008-02-06 10:26:27 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -80,6 +80,8 @@ static const char rcsid[] _U_ =
#define DH6_INFORM_REQ 11
#define DH6_RELAY_FORW 12
#define DH6_RELAY_REPLY 13
+#define DH6_LEASEQUERY 14
+#define DH6_LQ_REPLY 15
/* DHCP6 base packet format */
struct dhcp6 {
@@ -130,6 +132,10 @@ struct dhcp6_relay {
# define DH6OPT_STCODE_NOTONLINK 4
# define DH6OPT_STCODE_USEMULTICAST 5
# define DH6OPT_STCODE_NOPREFIXAVAIL 6
+# define DH6OPT_STCODE_UNKNOWNQUERYTYPE 7
+# define DH6OPT_STCODE_MALFORMEDQUERY 8
+# define DH6OPT_STCODE_NOTCONFIGURED 9
+# define DH6OPT_STCODE_NOTALLOWED 10
#define DH6OPT_RAPID_COMMIT 14
#define DH6OPT_USER_CLASS 15
#define DH6OPT_VENDOR_CLASS 16
@@ -155,6 +161,15 @@ struct dhcp6_relay {
#define DH6OPT_REMOTE_ID 37
#define DH6OPT_SUBSCRIBER_ID 38
#define DH6OPT_CLIENT_FQDN 39
+#define DH6OPT_PANA_AGENT 40
+#define DH6OPT_NEW_POSIX_TIMEZONE 41
+#define DH6OPT_NEW_TZDB_TIMEZONE 42
+#define DH6OPT_ERO 43
+#define DH6OPT_LQ_QUERY 44
+#define DH6OPT_CLIENT_DATA 45
+#define DH6OPT_CLT_TIME 46
+#define DH6OPT_LQ_RELAY_DATA 47
+#define DH6OPT_LQ_CLIENT_LINK 48
struct dhcp6opt {
u_int16_t dh6opt_type;
@@ -280,6 +295,24 @@ dhcp6opt_name(int type)
return "Subscriber ID";
case DH6OPT_CLIENT_FQDN:
return "Client FQDN";
+ case DH6OPT_PANA_AGENT:
+ return "PANA agent";
+ case DH6OPT_NEW_POSIX_TIMEZONE:
+ return "POSIX timezone";
+ case DH6OPT_NEW_TZDB_TIMEZONE:
+ return "POSIX tz database";
+ case DH6OPT_ERO:
+ return "Echo request option";
+ case DH6OPT_LQ_QUERY:
+ return "Lease query";
+ case DH6OPT_CLIENT_DATA:
+ return "LQ client data";
+ case DH6OPT_CLT_TIME:
+ return "Clt time";
+ case DH6OPT_LQ_RELAY_DATA:
+ return "LQ relay data";
+ case DH6OPT_LQ_CLIENT_LINK:
+ return "LQ client link";
default:
snprintf(genstr, sizeof(genstr), "opt_%d", type);
return(genstr);
@@ -309,6 +342,14 @@ dhcp6stcode(int code)
return "use multicast";
case DH6OPT_STCODE_NOPREFIXAVAIL:
return "no prefixes";
+ case DH6OPT_STCODE_UNKNOWNQUERYTYPE:
+ return "unknown query type";
+ case DH6OPT_STCODE_MALFORMEDQUERY:
+ return "malformed query";
+ case DH6OPT_STCODE_NOTCONFIGURED:
+ return "not configured";
+ case DH6OPT_STCODE_NOTALLOWED:
+ return "not allowed";
default:
snprintf(genstr, sizeof(genstr), "code%d", code);
return(genstr);
@@ -420,6 +461,7 @@ dhcp6opt_print(const u_char *cp, const u_char *ep)
printf(")");
break;
case DH6OPT_ORO:
+ case DH6OPT_ERO:
if (optlen % 2) {
printf(" ?)");
break;
@@ -549,12 +591,15 @@ dhcp6opt_print(const u_char *cp, const u_char *ep)
printf(")");
break;
case DH6OPT_INTERFACE_ID:
+ case DH6OPT_SUBSCRIBER_ID:
/*
* Since we cannot predict the encoding, print hex dump
* at most 10 characters.
*/
+ printf(" ");
for (i = 0; i < optlen && i < 10; i++)
printf("%02x", ((u_char *)(dh6o + 1))[i]);
+ printf("...)");
break;
case DH6OPT_RECONF_MSG:
tp = (u_char *)(dh6o + 1);
@@ -579,6 +624,8 @@ dhcp6opt_print(const u_char *cp, const u_char *ep)
case DH6OPT_NIS_SERVERS:
case DH6OPT_NISP_SERVERS:
case DH6OPT_BCMCS_SERVER_A:
+ case DH6OPT_PANA_AGENT:
+ case DH6OPT_LQ_CLIENT_LINK:
if (optlen % 16) {
printf(" ?)");
break;
@@ -618,6 +665,21 @@ dhcp6opt_print(const u_char *cp, const u_char *ep)
}
printf(")");
break;
+ case DH6OPT_IA_TA:
+ if (optlen < 4) {
+ printf(" ?)");
+ break;
+ }
+ memcpy(&val32, dh6o + 1, sizeof(val32));
+ val32 = ntohl(val32);
+ printf(" IAID:%lu", (unsigned long)val32);
+ if (optlen > 4) {
+ /* there are sub-options */
+ dhcp6opt_print((u_char *)(dh6o + 1) + 4,
+ (u_char *)(dh6o + 1) + optlen);
+ }
+ printf(")");
+ break;
case DH6OPT_IA_PD_PREFIX:
if (optlen < sizeof(ia_prefix) - 4) {
printf(" ?)");
@@ -643,6 +705,7 @@ dhcp6opt_print(const u_char *cp, const u_char *ep)
printf(")");
break;
case DH6OPT_LIFETIME:
+ case DH6OPT_CLT_TIME:
if (optlen != 4) {
printf(" ?)");
break;
@@ -651,6 +714,68 @@ dhcp6opt_print(const u_char *cp, const u_char *ep)
val32 = ntohl(val32);
printf(" %d)", (int)val32);
break;
+ case DH6OPT_REMOTE_ID:
+ if (optlen < 4) {
+ printf(" ?)");
+ break;
+ }
+ tp = (u_char *)(dh6o + 1);
+ memcpy(&val32, &tp[0], sizeof(val32));
+ val32 = ntohl(val32);
+ printf(" %d ", (int)val32);
+ /*
+ * Print hex dump first 10 characters.
+ */
+ for (i = 4; i < optlen && i < 14; i++)
+ printf("%02x", tp[i]);
+ printf("...)");
+ break;
+ case DH6OPT_LQ_QUERY:
+ if (optlen < 17) {
+ printf(" ?)");
+ break;
+ }
+ tp = (u_char *)(dh6o + 1);
+ switch (*tp) {
+ case 1:
+ printf(" by-address");
+ break;
+ case 2:
+ printf(" by-clientID");
+ break;
+ default:
+ printf(" type_%d", (int)*tp);
+ break;
+ }
+ printf(" %s", ip6addr_string(&tp[1]));
+ if (optlen > 17) {
+ /* there are query-options */
+ dhcp6opt_print(tp + 17, tp + optlen);
+ }
+ printf(")");
+ break;
+ case DH6OPT_CLIENT_DATA:
+ if (optlen > 0) {
+ /* there are encapsulated options */
+ dhcp6opt_print((u_char *)(dh6o + 1),
+ (u_char *)(dh6o + 1) + optlen);
+ }
+ printf(")");
+ break;
+ case DH6OPT_LQ_RELAY_DATA:
+ if (optlen < 16) {
+ printf(" ?)");
+ break;
+ }
+ tp = (u_char *)(dh6o + 1);
+ printf(" %s ", ip6addr_string(&tp[0]));
+ /*
+ * Print hex dump first 10 characters.
+ */
+ for (i = 16; i < optlen && i < 26; i++)
+ printf("%02x", tp[i]);
+ printf("...)");
+ break;
default:
printf(")");
break;
@@ -725,6 +850,12 @@ dhcp6_print(const u_char *cp, u_int length)
case DH6_RELAY_REPLY:
name= "relay-reply";
break;
+ case DH6_LEASEQUERY:
+ name= "leasequery";
+ break;
+ case DH6_LQ_REPLY:
+ name= "leasequery-reply";
+ break;
default:
name = NULL;
break;
diff --git a/contrib/tcpdump/print-domain.c b/contrib/tcpdump/print-domain.c
index 827d1be..39abda5 100644
--- a/contrib/tcpdump/print-domain.c
+++ b/contrib/tcpdump/print-domain.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.89.2.8 2007/02/13 19:19:27 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-domain.c,v 1.97.2.1 2007-12-09 01:51:12 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -389,13 +389,22 @@ ns_rprint(register const u_char *cp, register const u_char *bp, int is_mdns)
printf(" (Cache flush)");
}
- /* ignore ttl */
- cp += 2;
- /* if T_OPT, save opt_flags */
- if (typ == T_OPT)
+ if (typ == T_OPT) {
+ /* get opt flags */
+ cp += 2;
opt_flags = EXTRACT_16BITS(cp);
- /* ignore rest of ttl */
- cp += 2;
+ /* ignore rest of ttl field */
+ cp += 2;
+ } else if (vflag > 2) {
+ /* print ttl */
+ printf(" [");
+ relts_print(EXTRACT_32BITS(cp));
+ printf("]");
+ cp += 4;
+ } else {
+ /* ignore ttl */
+ cp += 4;
+ }
len = EXTRACT_16BITS(cp);
cp += 2;
@@ -410,7 +419,7 @@ ns_rprint(register const u_char *cp, register const u_char *bp, int is_mdns)
case T_A:
if (!TTEST2(*cp, sizeof(struct in_addr)))
return(NULL);
- printf(" %s", ipaddr_string(cp));
+ printf(" %s", intoa(htonl(EXTRACT_32BITS(cp))));
break;
case T_NS:
@@ -477,15 +486,24 @@ ns_rprint(register const u_char *cp, register const u_char *bp, int is_mdns)
#ifdef INET6
case T_AAAA:
+ {
+ struct in6_addr addr;
+ char ntop_buf[INET6_ADDRSTRLEN];
+
if (!TTEST2(*cp, sizeof(struct in6_addr)))
return(NULL);
- printf(" %s", ip6addr_string(cp));
+ memcpy(&addr, cp, sizeof(struct in6_addr));
+ printf(" %s",
+ inet_ntop(AF_INET6, &addr, ntop_buf, sizeof(ntop_buf)));
+
break;
+ }
case T_A6:
{
struct in6_addr a;
int pbit, pbyte;
+ char ntop_buf[INET6_ADDRSTRLEN];
if (!TTEST2(*cp, 1))
return(NULL);
@@ -499,7 +517,8 @@ ns_rprint(register const u_char *cp, register const u_char *bp, int is_mdns)
return(NULL);
memset(&a, 0, sizeof(a));
memcpy(&a.s6_addr[pbyte], cp + 1, sizeof(a) - pbyte);
- printf(" %u %s", pbit, ip6addr_string(&a));
+ printf(" %u %s", pbit,
+ inet_ntop(AF_INET6, &a, ntop_buf, sizeof(ntop_buf)));
}
if (pbit > 0) {
putchar(' ');
diff --git a/contrib/tcpdump/print-dtp.c b/contrib/tcpdump/print-dtp.c
new file mode 100644
index 0000000..c358a89
--- /dev/null
+++ b/contrib/tcpdump/print-dtp.c
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 1998-2007 The TCPDUMP project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * Dynamic Trunk Protocol (DTP)
+ *
+ * Original code by Carles Kishimoto <carles.kishimoto@gmail.com>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "interface.h"
+#include "addrtoname.h"
+#include "extract.h"
+#include "nlpid.h"
+
+#define DTP_HEADER_LEN 1
+#define DTP_DOMAIN_TLV 0x0001
+#define DTP_STATUS_TLV 0x0002
+#define DTP_DTP_TYPE_TLV 0x0003
+#define DTP_NEIGHBOR_TLV 0x0004
+
+static struct tok dtp_tlv_values[] = {
+ { DTP_DOMAIN_TLV, "Domain TLV"},
+ { DTP_STATUS_TLV, "Status TLV"},
+ { DTP_DTP_TYPE_TLV, "DTP type TLV"},
+ { DTP_NEIGHBOR_TLV, "Neighbor TLV"},
+ { 0, NULL}
+};
+
+void
+dtp_print (const u_char *pptr, u_int length)
+{
+ int type, len;
+ const u_char *tptr;
+
+ if (length < DTP_HEADER_LEN)
+ goto trunc;
+
+ tptr = pptr;
+
+ if (!TTEST2(*tptr, DTP_HEADER_LEN))
+ goto trunc;
+
+ printf("DTPv%u, length %u",
+ (*tptr),
+ length);
+
+ /*
+ * In non-verbose mode, just print version.
+ */
+ if (vflag < 1) {
+ return;
+ }
+
+ tptr += DTP_HEADER_LEN;
+
+ while (tptr < (pptr+length)) {
+
+ if (!TTEST2(*tptr, 4))
+ goto trunc;
+
+ type = EXTRACT_16BITS(tptr);
+ len = EXTRACT_16BITS(tptr+2);
+
+ /* infinite loop check */
+ if (type == 0 || len == 0) {
+ return;
+ }
+
+ printf("\n\t%s (0x%04x) TLV, length %u",
+ tok2str(dtp_tlv_values, "Unknown", type),
+ type, len);
+
+ switch (type) {
+ case DTP_DOMAIN_TLV:
+ printf(", %s", tptr+4);
+ break;
+
+ case DTP_STATUS_TLV:
+ case DTP_DTP_TYPE_TLV:
+ printf(", 0x%x", *(tptr+4));
+ break;
+
+ case DTP_NEIGHBOR_TLV:
+ printf(", %s", etheraddr_string(tptr+4));
+ break;
+
+ default:
+ break;
+ }
+ tptr += len;
+ }
+
+ return;
+
+ trunc:
+ printf("[|dtp]");
+}
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/contrib/tcpdump/print-dvmrp.c b/contrib/tcpdump/print-dvmrp.c
index 2c159bf..437e716 100644
--- a/contrib/tcpdump/print-dvmrp.c
+++ b/contrib/tcpdump/print-dvmrp.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-dvmrp.c,v 1.27 2003/11/19 09:42:04 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-dvmrp.c,v 1.27 2003-11-19 09:42:04 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-eap.c b/contrib/tcpdump/print-eap.c
index fb39e76..9fb333a 100644
--- a/contrib/tcpdump/print-eap.c
+++ b/contrib/tcpdump/print-eap.c
@@ -17,12 +17,13 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * Format and print bootp packets.
+ * Format and print EAP packets.
+ *
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-eap.c,v 1.3 2004/04/23 19:03:39 mcr Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-eap.c,v 1.5 2007-10-04 16:41:33 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -35,37 +36,272 @@ static const char rcsid[] _U_ =
#include <string.h>
#include "netdissect.h"
+#include "interface.h"
#include "addrtoname.h"
#include "extract.h"
#include "ether.h"
+#define EAP_FRAME_TYPE_PACKET 0
+#define EAP_FRAME_TYPE_START 1
+#define EAP_FRAME_TYPE_LOGOFF 2
+#define EAP_FRAME_TYPE_KEY 3
+#define EAP_FRAME_TYPE_ENCAP_ASF_ALERT 4
+
+struct eap_frame_t {
+ unsigned char version;
+ unsigned char type;
+ unsigned char length[2];
+};
+
+static const struct tok eap_frame_type_values[] = {
+ { EAP_FRAME_TYPE_PACKET, "EAP packet" },
+ { EAP_FRAME_TYPE_START, "EAPOL start" },
+ { EAP_FRAME_TYPE_LOGOFF, "EAPOL logoff" },
+ { EAP_FRAME_TYPE_KEY, "EAPOL key" },
+ { EAP_FRAME_TYPE_ENCAP_ASF_ALERT, "Encapsulated ASF alert" },
+ { 0, NULL}
+};
+
+/* RFC 3748 */
struct eap_packet_t {
- unsigned char code;
- unsigned char id;
- unsigned char length[2];
- unsigned char data[1];
+ unsigned char code;
+ unsigned char id;
+ unsigned char length[2];
+};
+
+#define EAP_REQUEST 1
+#define EAP_RESPONSE 2
+#define EAP_SUCCESS 3
+#define EAP_FAILURE 4
+
+static const struct tok eap_code_values[] = {
+ { EAP_REQUEST, "Request" },
+ { EAP_RESPONSE, "Response" },
+ { EAP_SUCCESS, "Success" },
+ { EAP_FAILURE, "Failure" },
+ { 0, NULL}
+};
+
+#define EAP_TYPE_NO_PROPOSED 0
+#define EAP_TYPE_IDENTITY 1
+#define EAP_TYPE_NOTIFICATION 2
+#define EAP_TYPE_NAK 3
+#define EAP_TYPE_MD5_CHALLENGE 4
+#define EAP_TYPE_OTP 5
+#define EAP_TYPE_GTC 6
+#define EAP_TYPE_TLS 13 /* RFC 2716 */
+#define EAP_TYPE_SIM 18 /* RFC 4186 */
+#define EAP_TYPE_TTLS 21 /* draft-funk-eap-ttls-v0-01.txt */
+#define EAP_TYPE_AKA 23 /* RFC 4187 */
+#define EAP_TYPE_FAST 43 /* RFC 4851 */
+#define EAP_TYPE_EXPANDED_TYPES 254
+#define EAP_TYPE_EXPERIMENTAL 255
+
+static const struct tok eap_type_values[] = {
+ { EAP_TYPE_NO_PROPOSED, "No proposed" },
+ { EAP_TYPE_IDENTITY, "Identity" },
+ { EAP_TYPE_NOTIFICATION, "Notification" },
+ { EAP_TYPE_NAK, "Nak" },
+ { EAP_TYPE_MD5_CHALLENGE, "MD5-challenge" },
+ { EAP_TYPE_OTP, "OTP" },
+ { EAP_TYPE_GTC, "GTC" },
+ { EAP_TYPE_TLS, "TLS" },
+ { EAP_TYPE_SIM, "SIM" },
+ { EAP_TYPE_TTLS, "TTLS" },
+ { EAP_TYPE_AKA, "AKA" },
+ { EAP_TYPE_FAST, "FAST" },
+ { EAP_TYPE_EXPANDED_TYPES, "Expanded types" },
+ { EAP_TYPE_EXPERIMENTAL, "Experimental" },
+ { 0, NULL}
+};
+
+#define EAP_TLS_EXTRACT_BIT_L(x) (((x)&0x80)>>7)
+
+/* RFC 2716 - EAP TLS bits */
+#define EAP_TLS_FLAGS_LEN_INCLUDED (1 << 7)
+#define EAP_TLS_FLAGS_MORE_FRAGMENTS (1 << 6)
+#define EAP_TLS_FLAGS_START (1 << 5)
+
+static const struct tok eap_tls_flags_values[] = {
+ { EAP_TLS_FLAGS_LEN_INCLUDED, "L bit" },
+ { EAP_TLS_FLAGS_MORE_FRAGMENTS, "More fragments bit"},
+ { EAP_TLS_FLAGS_START, "Start bit"},
+ { 0, NULL}
+};
+
+#define EAP_TTLS_VERSION(x) ((x)&0x07)
+
+/* EAP-AKA and EAP-SIM - RFC 4187 */
+#define EAP_AKA_CHALLENGE 1
+#define EAP_AKA_AUTH_REJECT 2
+#define EAP_AKA_SYNC_FAILURE 4
+#define EAP_AKA_IDENTITY 5
+#define EAP_SIM_START 10
+#define EAP_SIM_CHALLENGE 11
+#define EAP_AKA_NOTIFICATION 12
+#define EAP_AKA_REAUTH 13
+#define EAP_AKA_CLIENT_ERROR 14
+
+static const struct tok eap_aka_subtype_values[] = {
+ { EAP_AKA_CHALLENGE, "Challenge" },
+ { EAP_AKA_AUTH_REJECT, "Auth reject" },
+ { EAP_AKA_SYNC_FAILURE, "Sync failure" },
+ { EAP_AKA_IDENTITY, "Identity" },
+ { EAP_SIM_START, "Start" },
+ { EAP_SIM_CHALLENGE, "Challenge" },
+ { EAP_AKA_NOTIFICATION, "Notification" },
+ { EAP_AKA_REAUTH, "Reauth" },
+ { EAP_AKA_CLIENT_ERROR, "Client error" },
+ { 0, NULL}
};
/*
- * Print bootp requests
+ * Print EAP requests / responses
*/
void
-eap_print(netdissect_options *ndo,
- register const u_char *cp,
- u_int length _U_)
+eap_print(netdissect_options *ndo _U_,
+ register const u_char *cp,
+ u_int length _U_)
{
- const struct eap_packet_t *eap;
+ const struct eap_frame_t *eap;
+ const u_char *tptr;
+ u_int tlen, type, subtype;
+ int count=0, len;
+
+ tptr = cp;
+ tlen = length;
+ eap = (const struct eap_frame_t *)cp;
+ TCHECK(*eap);
+
+ /* in non-verbose mode just lets print the basic info */
+ if (vflag < 1) {
+ printf("%s (%u) v%u, len %u",
+ tok2str(eap_frame_type_values, "unknown", eap->type),
+ eap->type,
+ eap->version,
+ EXTRACT_16BITS(eap->length));
+ return;
+ }
+
+ printf("%s (%u) v%u, len %u",
+ tok2str(eap_frame_type_values, "unknown", eap->type),
+ eap->type,
+ eap->version,
+ EXTRACT_16BITS(eap->length));
+
+ tptr += sizeof(const struct eap_frame_t);
+ tlen -= sizeof(const struct eap_frame_t);
+
+ switch (eap->type) {
+ case EAP_FRAME_TYPE_PACKET:
+ type = *(tptr);
+ len = EXTRACT_16BITS(tptr+2);
+ printf(", %s (%u), id %u, len %u",
+ tok2str(eap_code_values, "unknown", type),
+ type,
+ *(tptr+1),
+ len);
+
+ if (!TTEST2(*tptr, len))
+ goto trunc;
+
+ if (type <= 2) { /* For EAP_REQUEST and EAP_RESPONSE only */
+ subtype = *(tptr+4);
+ printf("\n\t\t Type %s (%u)",
+ tok2str(eap_type_values, "unknown", *(tptr+4)),
+ *(tptr+4));
+
+ switch (subtype) {
+ case EAP_TYPE_IDENTITY:
+ if (len - 5 > 0) {
+ printf(", Identity: ");
+ safeputs((const char *)tptr+5, len-5);
+ }
+ break;
+
+ case EAP_TYPE_NOTIFICATION:
+ if (len - 5 > 0) {
+ printf(", Notification: ");
+ safeputs((const char *)tptr+5, len-5);
+ }
+ break;
+
+ case EAP_TYPE_NAK:
+ count = 5;
- eap = (const struct eap_packet_t *)cp;
- ND_TCHECK(eap->data);
+ /*
+ * one or more octets indicating
+ * the desired authentication
+ * type one octet per type
+ */
+ while (count < len) {
+ printf(" %s (%u),",
+ tok2str(eap_type_values, "unknown", *(tptr+count)),
+ *(tptr+count));
+ count++;
+ }
+ break;
- ND_PRINT((ndo, "EAP code=%u id=%u length=%u ",
- eap->code, eap->id, (eap->length[0]<<8) + eap->length[1]));
+ case EAP_TYPE_TTLS:
+ printf(" TTLSv%u",
+ EAP_TTLS_VERSION(*(tptr+5))); /* fall through */
+ case EAP_TYPE_TLS:
+ printf(" flags [%s] 0x%02x,",
+ bittok2str(eap_tls_flags_values, "none", *(tptr+5)),
+ *(tptr+5));
- if (!ndo->ndo_vflag)
- return;
+ if (EAP_TLS_EXTRACT_BIT_L(*(tptr+5))) {
+ printf(" len %u", EXTRACT_32BITS(tptr+6));
+ }
+ break;
-trunc:
- ;
+ case EAP_TYPE_FAST:
+ printf(" FASTv%u",
+ EAP_TTLS_VERSION(*(tptr+5)));
+ printf(" flags [%s] 0x%02x,",
+ bittok2str(eap_tls_flags_values, "none", *(tptr+5)),
+ *(tptr+5));
+
+ if (EAP_TLS_EXTRACT_BIT_L(*(tptr+5))) {
+ printf(" len %u", EXTRACT_32BITS(tptr+6));
+ }
+
+ /* FIXME - TLV attributes follow */
+ break;
+
+ case EAP_TYPE_AKA:
+ case EAP_TYPE_SIM:
+ printf(" subtype [%s] 0x%02x,",
+ tok2str(eap_aka_subtype_values, "unknown", *(tptr+5)),
+ *(tptr+5));
+
+ /* FIXME - TLV attributes follow */
+ break;
+
+ case EAP_TYPE_MD5_CHALLENGE:
+ case EAP_TYPE_OTP:
+ case EAP_TYPE_GTC:
+ case EAP_TYPE_EXPANDED_TYPES:
+ case EAP_TYPE_EXPERIMENTAL:
+ default:
+ break;
+ }
+ }
+ break;
+
+ case EAP_FRAME_TYPE_LOGOFF:
+ case EAP_FRAME_TYPE_ENCAP_ASF_ALERT:
+ default:
+ break;
+ }
+ return;
+
+ trunc:
+ printf("\n\t[|EAP]");
}
+/*
+ * Local Variables:
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/contrib/tcpdump/print-egp.c b/contrib/tcpdump/print-egp.c
index e5a811d..4a1d046 100644
--- a/contrib/tcpdump/print-egp.c
+++ b/contrib/tcpdump/print-egp.c
@@ -20,7 +20,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-egp.c,v 1.37 2005/01/12 11:19:09 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-egp.c,v 1.38 2006-02-11 22:13:24 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -226,13 +226,23 @@ egp_print(register const u_int8_t *bp, register u_int length)
printf("[|egp]");
return;
}
- (void)printf("egp: ");
+
+ if (!vflag) {
+ printf("EGPv%u, AS %u, seq %u, length %u",
+ egp->egp_version,
+ EXTRACT_16BITS(&egp->egp_as),
+ EXTRACT_16BITS(&egp->egp_sequence),
+ length);
+ return;
+ } else
+ printf("EGPv%u, length %u",
+ egp->egp_version,
+ length);
if (egp->egp_version != EGP_VERSION) {
printf("[version %d]", egp->egp_version);
return;
}
- printf("as:%d seq:%d", EXTRACT_16BITS(&egp->egp_as), EXTRACT_16BITS(&egp->egp_sequence));
type = egp->egp_type;
code = egp->egp_code;
diff --git a/contrib/tcpdump/print-eigrp.c b/contrib/tcpdump/print-eigrp.c
index 3168b3c..2787baf 100644
--- a/contrib/tcpdump/print-eigrp.c
+++ b/contrib/tcpdump/print-eigrp.c
@@ -16,7 +16,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-eigrp.c,v 1.5.2.2 2005/05/06 02:53:41 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-eigrp.c,v 1.7 2005-05-06 02:53:26 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-enc.c b/contrib/tcpdump/print-enc.c
index f9b871b..9569534 100644
--- a/contrib/tcpdump/print-enc.c
+++ b/contrib/tcpdump/print-enc.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-enc.c,v 1.4 2005/04/06 21:32:39 mcr Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-enc.c,v 1.4.4.1 2008-02-06 10:34:15 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -70,8 +70,17 @@ enc_if_print(const struct pcap_pkthdr *h, register const u_char *p)
printf("SPI 0x%08x: ", (u_int32_t)ntohl(hdr->spi));
length -= ENC_HDRLEN;
- /* XXX - use the address family */
- ip_print(gndo, p + ENC_HDRLEN, length);
+ caplen -= ENC_HDRLEN;
+ p += ENC_HDRLEN;
+
+ switch (hdr->af) {
+ case AF_INET:
+ ip_print(gndo, p, length);
+ break;
+ case AF_INET6:
+ ip6_print(p, length);
+ break;
+ }
out:
return (ENC_HDRLEN);
diff --git a/contrib/tcpdump/print-esp.c b/contrib/tcpdump/print-esp.c
index 3ccc899..260fe87 100644
--- a/contrib/tcpdump/print-esp.c
+++ b/contrib/tcpdump/print-esp.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-esp.c,v 1.55.2.1 2005/04/21 06:44:57 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-esp.c,v 1.56 2005-04-21 06:44:40 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-ether.c b/contrib/tcpdump/print-ether.c
index d8911d3..0fbdf3b 100644
--- a/contrib/tcpdump/print-ether.c
+++ b/contrib/tcpdump/print-ether.c
@@ -22,7 +22,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.95.2.6 2006/02/20 18:15:03 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.105.2.1 2008-02-06 10:49:22 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -67,14 +67,19 @@ const struct tok ethertype_values[] = {
{ ETHERTYPE_AARP, "Appletalk ARP" },
{ ETHERTYPE_IPX, "IPX" },
{ ETHERTYPE_PPP, "PPP" },
+ { ETHERTYPE_MPCP, "MPCP" },
{ ETHERTYPE_SLOW, "Slow Protocols" },
{ ETHERTYPE_PPPOED, "PPPoE D" },
{ ETHERTYPE_PPPOES, "PPPoE S" },
{ ETHERTYPE_EAPOL, "EAPOL" },
+ { ETHERTYPE_RRCP, "RRCP" },
{ ETHERTYPE_JUMBO, "Jumbo" },
{ ETHERTYPE_LOOPBACK, "Loopback" },
{ ETHERTYPE_ISO, "OSI" },
{ ETHERTYPE_GRE_ISO, "GRE-OSI" },
+ { ETHERTYPE_CFM_OLD, "CFM (old)" },
+ { ETHERTYPE_CFM, "CFM" },
+ { ETHERTYPE_LLDP, "LLDP" },
{ 0, NULL}
};
@@ -295,6 +300,10 @@ ether_encap_print(u_short ether_type, const u_char *p,
eap_print(gndo, p, length);
return (1);
+ case ETHERTYPE_RRCP:
+ rrcp_print(gndo, p - 14 , length + 14);
+ return (1);
+
case ETHERTYPE_PPP:
if (length) {
printf(": ");
@@ -302,10 +311,23 @@ ether_encap_print(u_short ether_type, const u_char *p,
}
return (1);
+ case ETHERTYPE_MPCP:
+ mpcp_print(p, length);
+ return (1);
+
case ETHERTYPE_SLOW:
slow_print(p, length);
return (1);
+ case ETHERTYPE_CFM:
+ case ETHERTYPE_CFM_OLD:
+ cfm_print(p, length);
+ return (1);
+
+ case ETHERTYPE_LLDP:
+ lldp_print(p, length);
+ return (1);
+
case ETHERTYPE_LOOPBACK:
return (1);
diff --git a/contrib/tcpdump/print-fddi.c b/contrib/tcpdump/print-fddi.c
index 49e2b00..94e9be7 100644
--- a/contrib/tcpdump/print-fddi.c
+++ b/contrib/tcpdump/print-fddi.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.64.2.2 2005/11/13 12:12:59 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.66 2005-11-13 12:12:41 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-fr.c b/contrib/tcpdump/print-fr.c
index abc3cd7..d0956f6 100644
--- a/contrib/tcpdump/print-fr.c
+++ b/contrib/tcpdump/print-fr.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#)$Header: /tcpdump/master/tcpdump/print-fr.c,v 1.32.2.15 2006/02/01 14:39:56 hannes Exp $ (LBL)";
+ "@(#)$Header: /tcpdump/master/tcpdump/print-fr.c,v 1.51 2006-06-23 22:20:32 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -102,7 +102,7 @@ struct tok frf_flag_values[] = {
/* Finds out Q.922 address length, DLCI and flags. Returns 0 on success
* save the flags dep. on address length
*/
-static int parse_q922_addr(const u_char *p, u_int *dlci, u_int *sdlcore,
+static int parse_q922_addr(const u_char *p, u_int *dlci,
u_int *addr_len, u_int8_t *flags)
{
if ((p[0] & FR_EA_BIT))
@@ -132,14 +132,26 @@ static int parse_q922_addr(const u_char *p, u_int *dlci, u_int *sdlcore,
flags[3] = p[0] & 0x02;
- if (p[0] & 0x02)
- *sdlcore = p[0] >> 2;
- else
- *dlci = (*dlci << 6) | (p[0] >> 2);
+ *dlci = (*dlci << 6) | (p[0] >> 2);
return 0;
}
+char *q922_string(const u_char *p) {
+
+ static u_int dlci, addr_len;
+ static u_int8_t flags[4];
+ static char buffer[sizeof("DLCI xxxxxxxxxx")];
+ memset(buffer, 0, sizeof(buffer));
+
+ if (parse_q922_addr(p, &dlci, &addr_len, flags) == 0){
+ snprintf(buffer, sizeof(buffer), "DLCI %u", dlci);
+ }
+
+ return buffer;
+}
+
+
/* Frame Relay packet structure, with flags and CRC removed
+---------------------------+
@@ -224,13 +236,12 @@ fr_print(register const u_char *p, u_int length)
{
u_int16_t extracted_ethertype;
u_int dlci;
- u_int sdlcore;
u_int addr_len;
u_int16_t nlpid;
u_int hdr_len;
u_int8_t flags[4];
- if (parse_q922_addr(p, &dlci, &sdlcore, &addr_len, flags)) {
+ if (parse_q922_addr(p, &dlci, &addr_len, flags)) {
printf("Q.922, invalid address");
return 0;
}
@@ -732,25 +743,29 @@ q933_print(const u_char *p, u_int length)
codeset = p[2]&0x0f; /* extract the codeset */
- if (p[2] == MSG_ANSI_LOCKING_SHIFT)
- is_ansi = 1;
+ if (p[2] == MSG_ANSI_LOCKING_SHIFT) {
+ is_ansi = 1;
+ }
printf("%s", eflag ? "" : "Q.933, ");
/* printing out header part */
printf("%s, codeset %u", is_ansi ? "ANSI" : "CCITT", codeset);
- if (p[0])
- printf(", Call Ref: 0x%02x", p[0]);
-
- if (vflag)
- printf(", %s (0x%02x), length %u",
- tok2str(fr_q933_msg_values,"unknown message",p[1]),
- p[1],
- length);
- else
- printf(", %s",
- tok2str(fr_q933_msg_values,"unknown message 0x%02x",p[1]));
+ if (p[0]) {
+ printf(", Call Ref: 0x%02x", p[0]);
+ }
+ if (vflag) {
+ printf(", %s (0x%02x), length %u",
+ tok2str(fr_q933_msg_values,
+ "unknown message", p[1]),
+ p[1],
+ length);
+ } else {
+ printf(", %s",
+ tok2str(fr_q933_msg_values,
+ "unknown message 0x%02x", p[1]));
+ }
olen = length; /* preserve the original length for non verbose mode */
@@ -758,49 +773,57 @@ q933_print(const u_char *p, u_int length)
printf("[|q.933]");
return;
}
- length -= 2 - is_ansi;
+ length -= 2 + is_ansi;
ptemp += 2 + is_ansi;
/* Loop through the rest of IE */
- while (length > sizeof(struct ie_tlv_header_t )) {
+ while (length > sizeof(struct ie_tlv_header_t)) {
ie_p = (struct ie_tlv_header_t *)ptemp;
- if (length < sizeof(struct ie_tlv_header_t ) ||
- length < sizeof(struct ie_tlv_header_t ) + ie_p->ie_len) {
- if (vflag) /* not bark if there is just a trailer */
+ if (length < sizeof(struct ie_tlv_header_t) ||
+ length < sizeof(struct ie_tlv_header_t) + ie_p->ie_len) {
+ if (vflag) { /* not bark if there is just a trailer */
printf("\n[|q.933]");
- else
+ } else {
printf(", length %u",olen);
+ }
return;
}
/* lets do the full IE parsing only in verbose mode
* however some IEs (DLCI Status, Link Verify)
- * are also intereststing in non-verbose mode */
- if (vflag)
+ * are also interestting in non-verbose mode */
+ if (vflag) {
printf("\n\t%s IE (0x%02x), length %u: ",
- tok2str(fr_q933_ie_codesets[codeset],"unknown",ie_p->ie_type),
+ tok2str(fr_q933_ie_codesets[codeset],
+ "unknown", ie_p->ie_type),
ie_p->ie_type,
ie_p->ie_len);
-
+ }
+
/* sanity check */
- if (ie_p->ie_type == 0 || ie_p->ie_len == 0)
+ if (ie_p->ie_type == 0 || ie_p->ie_len == 0) {
return;
+ }
- if (fr_q933_print_ie_codeset[codeset] != NULL)
+ if (fr_q933_print_ie_codeset[codeset] != NULL) {
ie_is_known = fr_q933_print_ie_codeset[codeset](ie_p, ptemp);
-
- if (vflag >= 1 && !ie_is_known)
+ }
+
+ if (vflag >= 1 && !ie_is_known) {
print_unknown_data(ptemp+2,"\n\t",ie_p->ie_len);
+ }
/* do we want to see a hexdump of the IE ? */
- if (vflag> 1 && ie_is_known)
+ if (vflag> 1 && ie_is_known) {
print_unknown_data(ptemp+2,"\n\t ",ie_p->ie_len);
+ }
length = length - ie_p->ie_len - 2;
ptemp = ptemp + ie_p->ie_len + 2;
}
- if (!vflag)
+ if (!vflag) {
printf(", length %u",olen);
+ }
}
static int
@@ -812,24 +835,27 @@ fr_q933_print_ie_codeset5(const struct ie_tlv_header_t *ie_p, const u_char *p)
case FR_LMI_ANSI_REPORT_TYPE_IE: /* fall through */
case FR_LMI_CCITT_REPORT_TYPE_IE:
- if (vflag)
+ if (vflag) {
printf("%s (%u)",
tok2str(fr_lmi_report_type_ie_values,"unknown",p[2]),
p[2]);
+ }
return 1;
case FR_LMI_ANSI_LINK_VERIFY_IE: /* fall through */
case FR_LMI_CCITT_LINK_VERIFY_IE:
case FR_LMI_ANSI_LINK_VERIFY_IE_91:
- if (!vflag)
+ if (!vflag) {
printf(", ");
+ }
printf("TX Seq: %3d, RX Seq: %3d", p[2], p[3]);
return 1;
case FR_LMI_ANSI_PVC_STATUS_IE: /* fall through */
case FR_LMI_CCITT_PVC_STATUS_IE:
- if (!vflag)
+ if (!vflag) {
printf(", ");
+ }
/* now parse the DLCI information element. */
if ((ie_p->ie_len < 3) ||
(p[2] & 0x80) ||
@@ -838,14 +864,17 @@ fr_q933_print_ie_codeset5(const struct ie_tlv_header_t *ie_p, const u_char *p)
((ie_p->ie_len == 5) && ((p[3] & 0x80) || (p[4] & 0x80) ||
!(p[5] & 0x80))) ||
(ie_p->ie_len > 5) ||
- !(p[ie_p->ie_len + 1] & 0x80))
+ !(p[ie_p->ie_len + 1] & 0x80)) {
printf("Invalid DLCI IE");
+ }
dlci = ((p[2] & 0x3F) << 4) | ((p[3] & 0x78) >> 3);
- if (ie_p->ie_len == 4)
+ if (ie_p->ie_len == 4) {
dlci = (dlci << 6) | ((p[4] & 0x7E) >> 1);
- else if (ie_p->ie_len == 5)
+ }
+ else if (ie_p->ie_len == 5) {
dlci = (dlci << 13) | (p[4] & 0x7F) | ((p[5] & 0x7E) >> 1);
+ }
printf("DLCI %u: status %s%s", dlci,
p[ie_p->ie_len + 1] & 0x8 ? "New, " : "",
diff --git a/contrib/tcpdump/print-frag6.c b/contrib/tcpdump/print-frag6.c
index 2c7788b..e125bd3 100644
--- a/contrib/tcpdump/print-frag6.c
+++ b/contrib/tcpdump/print-frag6.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-frag6.c,v 1.19.2.1 2005/04/20 22:33:21 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-frag6.c,v 1.20 2005-04-20 22:33:06 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-gre.c b/contrib/tcpdump/print-gre.c
index d739356..55f0e9d 100644
--- a/contrib/tcpdump/print-gre.c
+++ b/contrib/tcpdump/print-gre.c
@@ -38,7 +38,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-gre.c,v 1.28 2005/04/06 21:32:39 mcr Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-gre.c,v 1.28 2005-04-06 21:32:39 mcr Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-hsrp.c b/contrib/tcpdump/print-hsrp.c
index 1d22247..06304fd 100644
--- a/contrib/tcpdump/print-hsrp.c
+++ b/contrib/tcpdump/print-hsrp.c
@@ -31,7 +31,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-hsrp.c,v 1.9.2.1 2005/05/06 07:57:17 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-hsrp.c,v 1.10 2005-05-06 07:56:52 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-icmp.c b/contrib/tcpdump/print-icmp.c
index 09a7a89..811d599 100644
--- a/contrib/tcpdump/print-icmp.c
+++ b/contrib/tcpdump/print-icmp.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.81.2.6 2007/09/13 17:40:18 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.87 2007-09-13 17:42:31 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -414,7 +414,7 @@ icmp_print(const u_char *bp, u_int plen, const u_char *bp2, int fragmented)
case ICMP_UNREACH_NEEDFRAG:
{
register const struct mtu_discovery *mp;
- mp = (struct mtu_discovery *)&dp->icmp_void;
+ mp = (struct mtu_discovery *)(u_char *)&dp->icmp_void;
mtu = EXTRACT_16BITS(&mp->nexthopmtu);
if (mtu) {
(void)snprintf(buf, sizeof(buf),
diff --git a/contrib/tcpdump/print-icmp6.c b/contrib/tcpdump/print-icmp6.c
index c503924..41d56b6 100644
--- a/contrib/tcpdump/print-icmp6.c
+++ b/contrib/tcpdump/print-icmp6.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.79.2.6 2005/09/05 09:29:28 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.85.2.1 2008-02-05 19:36:58 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -1192,9 +1192,9 @@ icmp6_rrenum_print(const u_char *bp, const u_char *ep)
F(ICMP6_RR_FLAGS_PREVDONE, "P"));
}
printf("seg=%u,", rr6->rr_segnum);
- printf("maxdelay=%u", rr6->rr_maxdelay);
+ printf("maxdelay=%u", EXTRACT_16BITS(&rr6->rr_maxdelay));
if (rr6->rr_reserved)
- printf("rsvd=0x%x", EXTRACT_16BITS(&rr6->rr_reserved));
+ printf("rsvd=0x%x", EXTRACT_32BITS(&rr6->rr_reserved));
/*[*/
printf("]");
#undef F
diff --git a/contrib/tcpdump/print-igmp.c b/contrib/tcpdump/print-igmp.c
index c310d55..a848562 100644
--- a/contrib/tcpdump/print-igmp.c
+++ b/contrib/tcpdump/print-igmp.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-igmp.c,v 1.15 2004/03/24 00:59:16 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-igmp.c,v 1.15 2004-03-24 00:59:16 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-igrp.c b/contrib/tcpdump/print-igrp.c
index 898471d..3cede7e 100644
--- a/contrib/tcpdump/print-igrp.c
+++ b/contrib/tcpdump/print-igrp.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-igrp.c,v 1.20.2.1 2005/04/20 21:02:15 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-igrp.c,v 1.21 2005-04-20 21:01:56 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-ip.c b/contrib/tcpdump/print-ip.c
index 48d54dd..6563d53 100644
--- a/contrib/tcpdump/print-ip.c
+++ b/contrib/tcpdump/print-ip.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.149.2.9 2007/09/14 01:30:02 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.159 2007-09-14 01:29:28 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -668,7 +668,7 @@ ip_print(netdissect_options *ndo,
}
}
- printf(") ");
+ printf(")\n ");
}
/*
diff --git a/contrib/tcpdump/print-ip6.c b/contrib/tcpdump/print-ip6.c
index 4928734..1793974 100644
--- a/contrib/tcpdump/print-ip6.c
+++ b/contrib/tcpdump/print-ip6.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.47.2.5 2007/09/21 07:07:52 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ip6.c,v 1.52 2007-09-21 07:05:33 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-ip6opts.c b/contrib/tcpdump/print-ip6opts.c
index 82163a2..7a4bf55 100644
--- a/contrib/tcpdump/print-ip6opts.c
+++ b/contrib/tcpdump/print-ip6opts.c
@@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip6opts.c,v 1.17.2.1 2005/04/20 22:19:06 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ip6opts.c,v 1.18 2005-04-20 22:18:50 guy Exp $";
#endif
#ifdef INET6
diff --git a/contrib/tcpdump/print-ipcomp.c b/contrib/tcpdump/print-ipcomp.c
index 099e5ad..89130a3 100644
--- a/contrib/tcpdump/print-ipcomp.c
+++ b/contrib/tcpdump/print-ipcomp.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ipcomp.c,v 1.20 2003/11/19 00:36:08 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ipcomp.c,v 1.20 2003-11-19 00:36:08 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-ipfc.c b/contrib/tcpdump/print-ipfc.c
index 6712e5f..c980765 100644
--- a/contrib/tcpdump/print-ipfc.c
+++ b/contrib/tcpdump/print-ipfc.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ipfc.c,v 1.7.2.2 2005/11/13 12:12:59 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ipfc.c,v 1.9 2005-11-13 12:12:42 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-ipx.c b/contrib/tcpdump/print-ipx.c
index 6459b31..8184425 100644
--- a/contrib/tcpdump/print-ipx.c
+++ b/contrib/tcpdump/print-ipx.c
@@ -26,7 +26,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ipx.c,v 1.40.2.2 2005/05/06 08:27:00 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ipx.c,v 1.42 2005-05-06 08:26:44 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-isakmp.c b/contrib/tcpdump/print-isakmp.c
index 09972f0..763f58a 100644
--- a/contrib/tcpdump/print-isakmp.c
+++ b/contrib/tcpdump/print-isakmp.c
@@ -30,9 +30,10 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.51 2005/04/07 00:28:17 mcr Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.56 2007-08-29 12:31:00 mcr Exp $ (LBL)";
#endif
+#define NETDISSECT_REWORKED
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -59,39 +60,64 @@ static const char rcsid[] _U_ =
#define sockaddr_storage sockaddr
#endif
-static const u_char *isakmp_sa_print(const struct isakmp_gen *,
- u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
-static const u_char *isakmp_p_print(const struct isakmp_gen *,
- u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
-static const u_char *isakmp_t_print(const struct isakmp_gen *,
- u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
-static const u_char *isakmp_ke_print(const struct isakmp_gen *,
- u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
-static const u_char *isakmp_id_print(const struct isakmp_gen *,
- u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
-static const u_char *isakmp_cert_print(const struct isakmp_gen *,
- u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
-static const u_char *isakmp_cr_print(const struct isakmp_gen *,
- u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
-static const u_char *isakmp_sig_print(const struct isakmp_gen *,
- u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
-static const u_char *isakmp_hash_print(const struct isakmp_gen *,
- u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
-static const u_char *isakmp_nonce_print(const struct isakmp_gen *,
- u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
-static const u_char *isakmp_n_print(const struct isakmp_gen *,
- u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
-static const u_char *isakmp_d_print(const struct isakmp_gen *,
- u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
-static const u_char *isakmp_vid_print(const struct isakmp_gen *,
- u_int, const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
-static const u_char *isakmp_sub0_print(u_char, const struct isakmp_gen *,
+#define DECLARE_PRINTER(func) static const u_char *ike##func##_print( \
+ netdissect_options *ndo, u_char tpay, \
+ const struct isakmp_gen *ext, \
+ u_int item_len, \
+ const u_char *end_pointer, \
+ u_int32_t phase,\
+ u_int32_t doi0, \
+ u_int32_t proto0, int depth)
+
+DECLARE_PRINTER(v1_sa);
+DECLARE_PRINTER(v1_p);
+DECLARE_PRINTER(v1_t);
+DECLARE_PRINTER(v1_ke);
+DECLARE_PRINTER(v1_id);
+DECLARE_PRINTER(v1_cert);
+DECLARE_PRINTER(v1_cr);
+DECLARE_PRINTER(v1_sig);
+DECLARE_PRINTER(v1_hash);
+DECLARE_PRINTER(v1_nonce);
+DECLARE_PRINTER(v1_n);
+DECLARE_PRINTER(v1_d);
+DECLARE_PRINTER(v1_vid);
+
+DECLARE_PRINTER(v2_sa);
+DECLARE_PRINTER(v2_ke);
+DECLARE_PRINTER(v2_ID);
+DECLARE_PRINTER(v2_cert);
+DECLARE_PRINTER(v2_cr);
+DECLARE_PRINTER(v2_auth);
+DECLARE_PRINTER(v2_nonce);
+DECLARE_PRINTER(v2_n);
+DECLARE_PRINTER(v2_d);
+DECLARE_PRINTER(v2_vid);
+DECLARE_PRINTER(v2_TS);
+DECLARE_PRINTER(v2_e);
+DECLARE_PRINTER(v2_cp);
+DECLARE_PRINTER(v2_eap);
+
+static const u_char *ike_sub0_print(netdissect_options *ndo,u_char, const struct isakmp_gen *,
const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
-static const u_char *isakmp_sub_print(u_char, const struct isakmp_gen *,
+static const u_char *ikev1_sub_print(netdissect_options *ndo,u_char, const struct isakmp_gen *,
const u_char *, u_int32_t, u_int32_t, u_int32_t, int);
+
+static const u_char *ikev2_sub_print(netdissect_options *ndo,
+ u_char np, const struct isakmp_gen *ext,
+ const u_char *ep, u_int32_t phase,
+ u_int32_t doi, u_int32_t proto,
+ int depth);
+
+
static char *numstr(int);
static void safememcpy(void *, const void *, size_t);
+static void
+ikev1_print(netdissect_options *ndo,
+ const u_char *bp, u_int length,
+ const u_char *bp2, struct isakmp *base);
+
#define MAXINITIATORS 20
int ninitiator = 0;
struct {
@@ -107,36 +133,73 @@ static const char *protoidstr[] = {
/* isakmp->np */
static const char *npstr[] = {
- "none", "sa", "p", "t", "ke", "id", "cert", "cr", "hash",
- "sig", "nonce", "n", "d", "vid"
+ "none", "sa", "p", "t", "ke", "id", "cert", "cr", "hash", /* 0 - 8 */
+ "sig", "nonce", "n", "d", "vid", /* 9 - 13 */
+ "pay14", "pay15", "pay16", "pay17", "pay18", /* 14- 18 */
+ "pay19", "pay20", "pay21", "pay22", "pay23", /* 19- 23 */
+ "pay24", "pay25", "pay26", "pay27", "pay28", /* 24- 28 */
+ "pay29", "pay30", "pay31", "pay32", /* 29- 32 */
+ "v2sa", "v2ke", "v2IDi", "v2IDr", "v2cert",/* 33- 37 */
+ "v2cr", "v2auth","v2nonce", "v2n", "v2d", /* 38- 42 */
+ "v2vid", "v2TSi", "v2TSr", "v2e", "v2cp", /* 43- 47 */
+ "v2eap", /* 48 */
+
};
/* isakmp->np */
-static const u_char *(*npfunc[])(const struct isakmp_gen *, u_int,
- const u_char *, u_int32_t, u_int32_t, u_int32_t, int) = {
+static const u_char *(*npfunc[])(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext,
+ u_int item_len,
+ const u_char *end_pointer,
+ u_int32_t phase,
+ u_int32_t doi0,
+ u_int32_t proto0, int depth) = {
NULL,
- isakmp_sa_print,
- isakmp_p_print,
- isakmp_t_print,
- isakmp_ke_print,
- isakmp_id_print,
- isakmp_cert_print,
- isakmp_cr_print,
- isakmp_hash_print,
- isakmp_sig_print,
- isakmp_nonce_print,
- isakmp_n_print,
- isakmp_d_print,
- isakmp_vid_print,
+ ikev1_sa_print,
+ ikev1_p_print,
+ ikev1_t_print,
+ ikev1_ke_print,
+ ikev1_id_print,
+ ikev1_cert_print,
+ ikev1_cr_print,
+ ikev1_hash_print,
+ ikev1_sig_print,
+ ikev1_nonce_print,
+ ikev1_n_print,
+ ikev1_d_print,
+ ikev1_vid_print, /* 13 */
+ NULL, NULL, NULL, NULL, NULL, /* 14- 18 */
+ NULL, NULL, NULL, NULL, NULL, /* 19- 23 */
+ NULL, NULL, NULL, NULL, NULL, /* 24- 28 */
+ NULL, NULL, NULL, NULL, /* 29- 32 */
+ ikev2_sa_print, /* 33 */
+ ikev2_ke_print, /* 34 */
+ ikev2_ID_print, /* 35 */
+ ikev2_ID_print, /* 36 */
+ ikev2_cert_print, /* 37 */
+ ikev2_cr_print, /* 38 */
+ ikev2_auth_print, /* 39 */
+ ikev2_nonce_print, /* 40 */
+ ikev2_n_print, /* 41 */
+ ikev2_d_print, /* 42 */
+ ikev2_vid_print, /* 43 */
+ ikev2_TS_print, /* 44 */
+ ikev2_TS_print, /* 45 */
+ ikev2_e_print, /* 46 */
+ ikev2_cp_print, /* 47 */
+ ikev2_eap_print, /* 48 */
};
/* isakmp->etype */
static const char *etypestr[] = {
- "none", "base", "ident", "auth", "agg", "inf", NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- "oakley-quick", "oakley-newgroup",
+/* IKEv1 exchange types */
+ "none", "base", "ident", "auth", "agg", "inf", NULL, NULL, /* 0-7 */
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 8-15 */
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 16-23 */
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, /* 24-31 */
+ "oakley-quick", "oakley-newgroup", /* 32-33 */
+/* IKEv2 exchange types */
+ "ikev2_init", "ikev2_auth", "child_sa", "inf2" /* 34-37 */
};
#define STR_OR_ID(x, tab) \
@@ -145,6 +208,13 @@ static const char *etypestr[] = {
#define NPSTR(x) STR_OR_ID(x, npstr)
#define ETYPESTR(x) STR_OR_ID(x, etypestr)
+#define CHECKLEN(p, np) \
+ if (ep < (u_char *)(p)) { \
+ ND_PRINT((ndo," [|%s]", NPSTR(np))); \
+ goto done; \
+ }
+
+
#define NPFUNC(x) \
(((x) < sizeof(npfunc)/sizeof(npfunc[0]) && npfunc[(x)]) \
? npfunc[(x)] : NULL)
@@ -322,21 +392,54 @@ cookie_sidecheck(int i, const u_char *bp2, int initiator)
}
static int
-rawprint(caddr_t loc, size_t len)
+rawprint(netdissect_options *ndo, caddr_t loc, size_t len)
{
static u_char *p;
size_t i;
- TCHECK2(*loc, len);
+ ND_TCHECK2(*loc, len);
p = (u_char *)loc;
for (i = 0; i < len; i++)
- printf("%02x", p[i] & 0xff);
+ ND_PRINT((ndo,"%02x", p[i] & 0xff));
return 1;
trunc:
return 0;
}
+/*
+ * returns false if we run out of data buffer
+ */
+static int ike_show_somedata(struct netdissect_options *ndo,
+ const u_char *cp, const u_char *ep)
+{
+ /* there is too much data, just show some of it */
+ const u_char *end = ep - 20;
+ int elen = 20;
+ int len = ep - cp;
+ if(len > 10) {
+ len = 10;
+ }
+
+ /* really shouldn't happen because of above */
+ if(end < cp + len) {
+ end = cp+len;
+ elen = ep - end;
+ }
+
+ ND_PRINT((ndo," data=("));
+ if(!rawprint(ndo, (caddr_t)(cp), len)) goto trunc;
+ ND_PRINT((ndo, "..."));
+ if(elen) {
+ if(!rawprint(ndo, (caddr_t)(end), elen)) goto trunc;
+ }
+ ND_PRINT((ndo,")"));
+ return 1;
+
+trunc:
+ return 0;
+}
+
struct attrmap {
const char *type;
u_int nvalue;
@@ -344,8 +447,9 @@ struct attrmap {
};
static const u_char *
-isakmp_attrmap_print(const u_char *p, const u_char *ep,
- const struct attrmap *map, size_t nmap)
+ikev1_attrmap_print(netdissect_options *ndo,
+ const u_char *p, const u_char *ep,
+ const struct attrmap *map, size_t nmap)
{
u_int16_t *q;
int totlen;
@@ -357,33 +461,33 @@ isakmp_attrmap_print(const u_char *p, const u_char *ep,
else
totlen = 4 + EXTRACT_16BITS(&q[1]);
if (ep < p + totlen) {
- printf("[|attr]");
+ ND_PRINT((ndo,"[|attr]"));
return ep + 1;
}
- printf("(");
+ ND_PRINT((ndo,"("));
t = EXTRACT_16BITS(&q[0]) & 0x7fff;
if (map && t < nmap && map[t].type)
- printf("type=%s ", map[t].type);
+ ND_PRINT((ndo,"type=%s ", map[t].type));
else
- printf("type=#%d ", t);
+ ND_PRINT((ndo,"type=#%d ", t));
if (p[0] & 0x80) {
- printf("value=");
+ ND_PRINT((ndo,"value="));
v = EXTRACT_16BITS(&q[1]);
if (map && t < nmap && v < map[t].nvalue && map[t].value[v])
- printf("%s", map[t].value[v]);
+ ND_PRINT((ndo,"%s", map[t].value[v]));
else
- rawprint((caddr_t)&q[1], 2);
+ rawprint(ndo, (caddr_t)&q[1], 2);
} else {
- printf("len=%d value=", EXTRACT_16BITS(&q[1]));
- rawprint((caddr_t)&p[4], EXTRACT_16BITS(&q[1]));
+ ND_PRINT((ndo,"len=%d value=", EXTRACT_16BITS(&q[1])));
+ rawprint(ndo, (caddr_t)&p[4], EXTRACT_16BITS(&q[1]));
}
- printf(")");
+ ND_PRINT((ndo,")"));
return p + totlen;
}
static const u_char *
-isakmp_attr_print(const u_char *p, const u_char *ep)
+ikev1_attr_print(netdissect_options *ndo, const u_char *p, const u_char *ep)
{
u_int16_t *q;
int totlen;
@@ -395,129 +499,166 @@ isakmp_attr_print(const u_char *p, const u_char *ep)
else
totlen = 4 + EXTRACT_16BITS(&q[1]);
if (ep < p + totlen) {
- printf("[|attr]");
+ ND_PRINT((ndo,"[|attr]"));
return ep + 1;
}
- printf("(");
+ ND_PRINT((ndo,"("));
t = EXTRACT_16BITS(&q[0]) & 0x7fff;
- printf("type=#%d ", t);
+ ND_PRINT((ndo,"type=#%d ", t));
if (p[0] & 0x80) {
- printf("value=");
+ ND_PRINT((ndo,"value="));
t = q[1];
- rawprint((caddr_t)&q[1], 2);
+ rawprint(ndo, (caddr_t)&q[1], 2);
} else {
- printf("len=%d value=", EXTRACT_16BITS(&q[1]));
- rawprint((caddr_t)&p[2], EXTRACT_16BITS(&q[1]));
+ ND_PRINT((ndo,"len=%d value=", EXTRACT_16BITS(&q[1])));
+ rawprint(ndo, (caddr_t)&p[2], EXTRACT_16BITS(&q[1]));
}
- printf(")");
+ ND_PRINT((ndo,")"));
return p + totlen;
}
static const u_char *
-isakmp_sa_print(const struct isakmp_gen *ext,
+ikev1_sa_print(netdissect_options *ndo, u_char tpay _U_,
+ const struct isakmp_gen *ext,
u_int item_len _U_,
const u_char *ep, u_int32_t phase, u_int32_t doi0 _U_,
u_int32_t proto0, int depth)
{
- const struct isakmp_pl_sa *p;
- struct isakmp_pl_sa sa;
+ const struct ikev1_pl_sa *p;
+ struct ikev1_pl_sa sa;
const u_int32_t *q;
u_int32_t doi, sit, ident;
const u_char *cp, *np;
int t;
- printf("%s:", NPSTR(ISAKMP_NPTYPE_SA));
+ ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_SA)));
- p = (struct isakmp_pl_sa *)ext;
- TCHECK(*p);
+ p = (struct ikev1_pl_sa *)ext;
+ ND_TCHECK(*p);
safememcpy(&sa, ext, sizeof(sa));
doi = ntohl(sa.doi);
sit = ntohl(sa.sit);
if (doi != 1) {
- printf(" doi=%d", doi);
- printf(" situation=%u", (u_int32_t)ntohl(sa.sit));
+ ND_PRINT((ndo," doi=%d", doi));
+ ND_PRINT((ndo," situation=%u", (u_int32_t)ntohl(sa.sit)));
return (u_char *)(p + 1);
}
- printf(" doi=ipsec");
+ ND_PRINT((ndo," doi=ipsec"));
q = (u_int32_t *)&sa.sit;
- printf(" situation=");
+ ND_PRINT((ndo," situation="));
t = 0;
if (sit & 0x01) {
- printf("identity");
+ ND_PRINT((ndo,"identity"));
t++;
}
if (sit & 0x02) {
- printf("%ssecrecy", t ? "+" : "");
+ ND_PRINT((ndo,"%ssecrecy", t ? "+" : ""));
t++;
}
if (sit & 0x04)
- printf("%sintegrity", t ? "+" : "");
+ ND_PRINT((ndo,"%sintegrity", t ? "+" : ""));
np = (u_char *)ext + sizeof(sa);
if (sit != 0x01) {
- TCHECK2(*(ext + 1), sizeof(ident));
+ ND_TCHECK2(*(ext + 1), sizeof(ident));
safememcpy(&ident, ext + 1, sizeof(ident));
- printf(" ident=%u", (u_int32_t)ntohl(ident));
+ ND_PRINT((ndo," ident=%u", (u_int32_t)ntohl(ident)));
np += sizeof(ident);
}
ext = (struct isakmp_gen *)np;
- TCHECK(*ext);
+ ND_TCHECK(*ext);
- cp = isakmp_sub_print(ISAKMP_NPTYPE_P, ext, ep, phase, doi, proto0,
+ cp = ikev1_sub_print(ndo, ISAKMP_NPTYPE_P, ext, ep, phase, doi, proto0,
depth);
return cp;
trunc:
- printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_SA));
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_SA)));
return NULL;
}
static const u_char *
-isakmp_p_print(const struct isakmp_gen *ext, u_int item_len _U_,
+ikev1_p_print(netdissect_options *ndo, u_char tpay _U_,
+ const struct isakmp_gen *ext, u_int item_len _U_,
const u_char *ep, u_int32_t phase, u_int32_t doi0,
u_int32_t proto0 _U_, int depth)
{
- const struct isakmp_pl_p *p;
- struct isakmp_pl_p prop;
+ const struct ikev1_pl_p *p;
+ struct ikev1_pl_p prop;
const u_char *cp;
- printf("%s:", NPSTR(ISAKMP_NPTYPE_P));
+ ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_P)));
- p = (struct isakmp_pl_p *)ext;
- TCHECK(*p);
+ p = (struct ikev1_pl_p *)ext;
+ ND_TCHECK(*p);
safememcpy(&prop, ext, sizeof(prop));
- printf(" #%d protoid=%s transform=%d",
- prop.p_no, PROTOIDSTR(prop.prot_id), prop.num_t);
+ ND_PRINT((ndo," #%d protoid=%s transform=%d",
+ prop.p_no, PROTOIDSTR(prop.prot_id), prop.num_t));
if (prop.spi_size) {
- printf(" spi=");
- if (!rawprint((caddr_t)(p + 1), prop.spi_size))
+ ND_PRINT((ndo," spi="));
+ if (!rawprint(ndo, (caddr_t)(p + 1), prop.spi_size))
goto trunc;
}
ext = (struct isakmp_gen *)((u_char *)(p + 1) + prop.spi_size);
- TCHECK(*ext);
-
- cp = isakmp_sub_print(ISAKMP_NPTYPE_T, ext, ep, phase, doi0,
- prop.prot_id, depth);
-
+ ND_TCHECK(*ext);
+
+ cp = ikev1_sub_print(ndo, ISAKMP_NPTYPE_T, ext, ep, phase, doi0,
+ prop.prot_id, depth);
+
return cp;
trunc:
- printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_P));
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_P)));
return NULL;
}
-static const char *isakmp_p_map[] = {
+static const char *ikev1_p_map[] = {
NULL, "ike",
};
+static const char *ikev2_t_type_map[]={
+ NULL, "encr", "prf", "integ", "dh", "esn"
+};
+
static const char *ah_p_map[] = {
NULL, "(reserved)", "md5", "sha", "1des",
"sha2-256", "sha2-384", "sha2-512",
};
+static const char *prf_p_map[] = {
+ NULL, "hmac-md5", "hmac-sha", "hmac-tiger",
+ "aes128_xcbc"
+};
+
+static const char *integ_p_map[] = {
+ NULL, "hmac-md5", "hmac-sha", "dec-mac",
+ "kpdk-md5", "aes-xcbc"
+};
+
+static const char *esn_p_map[] = {
+ "no-esn", "esn"
+};
+
+static const char *dh_p_map[] = {
+ NULL, "modp768",
+ "modp1024", /* group 2 */
+ "EC2N 2^155", /* group 3 */
+ "EC2N 2^185", /* group 4 */
+ "modp1536", /* group 5 */
+ "iana-grp06", "iana-grp07", /* reserved */
+ "iana-grp08", "iana-grp09",
+ "iana-grp10", "iana-grp11",
+ "iana-grp12", "iana-grp13",
+ "modp2048", /* group 14 */
+ "modp3072", /* group 15 */
+ "modp4096", /* group 16 */
+ "modp6144", /* group 17 */
+ "modp8192", /* group 18 */
+};
+
static const char *esp_p_map[] = {
NULL, "1des-iv64", "1des", "3des", "rc5", "idea", "cast",
"blowfish", "3idea", "1des-iv32", "rc4", "null", "aes"
@@ -531,8 +672,21 @@ const struct attrmap ipsec_t_map[] = {
{ NULL, 0, { NULL } },
{ "lifetype", 3, { NULL, "sec", "kb", }, },
{ "life", 0, { NULL } },
- { "group desc", 5, { NULL, "modp768", "modp1024", "EC2N 2^155",
- "EC2N 2^185", }, },
+ { "group desc", 18, { NULL, "modp768",
+ "modp1024", /* group 2 */
+ "EC2N 2^155", /* group 3 */
+ "EC2N 2^185", /* group 4 */
+ "modp1536", /* group 5 */
+ "iana-grp06", "iana-grp07", /* reserved */
+ "iana-grp08", "iana-grp09",
+ "iana-grp10", "iana-grp11",
+ "iana-grp12", "iana-grp13",
+ "modp2048", /* group 14 */
+ "modp3072", /* group 15 */
+ "modp4096", /* group 16 */
+ "modp6144", /* group 17 */
+ "modp8192", /* group 18 */
+ }, },
{ "enc mode", 3, { NULL, "tunnel", "transport", }, },
{ "auth", 5, { NULL, "hmac-md5", "hmac-sha1", "1des-mac", "keyed", }, },
{ "keylen", 0, { NULL } },
@@ -541,6 +695,17 @@ const struct attrmap ipsec_t_map[] = {
{ "privalg", 0, { NULL } },
};
+const struct attrmap encr_t_map[] = {
+ { NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 0, 1 */
+ { NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 2, 3 */
+ { NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 4, 5 */
+ { NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 6, 7 */
+ { NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 8, 9 */
+ { NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 10,11*/
+ { NULL, 0, { NULL } }, { NULL, 0, { NULL } }, /* 12,13*/
+ { "keylen", 14, { NULL }},
+};
+
const struct attrmap oakley_t_map[] = {
{ NULL, 0, { NULL } },
{ "enc", 8, { NULL, "1des", "idea", "blowfish", "rc5",
@@ -549,8 +714,21 @@ const struct attrmap oakley_t_map[] = {
"sha2-256", "sha2-384", "sha2-512", }, },
{ "auth", 6, { NULL, "preshared", "dss", "rsa sig", "rsa enc",
"rsa enc revised", }, },
- { "group desc", 5, { NULL, "modp768", "modp1024", "EC2N 2^155",
- "EC2N 2^185", }, },
+ { "group desc", 18, { NULL, "modp768",
+ "modp1024", /* group 2 */
+ "EC2N 2^155", /* group 3 */
+ "EC2N 2^185", /* group 4 */
+ "modp1536", /* group 5 */
+ "iana-grp06", "iana-grp07", /* reserved */
+ "iana-grp08", "iana-grp09",
+ "iana-grp10", "iana-grp11",
+ "iana-grp12", "iana-grp13",
+ "modp2048", /* group 14 */
+ "modp3072", /* group 15 */
+ "modp4096", /* group 16 */
+ "modp6144", /* group 17 */
+ "modp8192", /* group 18 */
+ }, },
{ "group type", 4, { NULL, "MODP", "ECP", "EC2N", }, },
{ "group prime", 0, { NULL } },
{ "group gen1", 0, { NULL } },
@@ -566,27 +744,28 @@ const struct attrmap oakley_t_map[] = {
};
static const u_char *
-isakmp_t_print(const struct isakmp_gen *ext, u_int item_len,
- const u_char *ep, u_int32_t phase _U_, u_int32_t doi _U_,
- u_int32_t proto, int depth _U_)
+ikev1_t_print(netdissect_options *ndo, u_char tpay _U_,
+ const struct isakmp_gen *ext, u_int item_len,
+ const u_char *ep, u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto, int depth _U_)
{
- const struct isakmp_pl_t *p;
- struct isakmp_pl_t t;
+ const struct ikev1_pl_t *p;
+ struct ikev1_pl_t t;
const u_char *cp;
const char *idstr;
const struct attrmap *map;
size_t nmap;
const u_char *ep2;
- printf("%s:", NPSTR(ISAKMP_NPTYPE_T));
+ ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_T)));
- p = (struct isakmp_pl_t *)ext;
- TCHECK(*p);
+ p = (struct ikev1_pl_t *)ext;
+ ND_TCHECK(*p);
safememcpy(&t, ext, sizeof(t));
switch (proto) {
case 1:
- idstr = STR_OR_ID(t.t_id, isakmp_p_map);
+ idstr = STR_OR_ID(t.t_id, ikev1_p_map);
map = oakley_t_map;
nmap = sizeof(oakley_t_map)/sizeof(oakley_t_map[0]);
break;
@@ -613,57 +792,59 @@ isakmp_t_print(const struct isakmp_gen *ext, u_int item_len,
}
if (idstr)
- printf(" #%d id=%s ", t.t_no, idstr);
+ ND_PRINT((ndo," #%d id=%s ", t.t_no, idstr));
else
- printf(" #%d id=%d ", t.t_no, t.t_id);
+ ND_PRINT((ndo," #%d id=%d ", t.t_no, t.t_id));
cp = (u_char *)(p + 1);
ep2 = (u_char *)p + item_len;
while (cp < ep && cp < ep2) {
if (map && nmap) {
- cp = isakmp_attrmap_print(cp, (ep < ep2) ? ep : ep2,
+ cp = ikev1_attrmap_print(ndo, cp, (ep < ep2) ? ep : ep2,
map, nmap);
} else
- cp = isakmp_attr_print(cp, (ep < ep2) ? ep : ep2);
+ cp = ikev1_attr_print(ndo, cp, (ep < ep2) ? ep : ep2);
}
if (ep < ep2)
- printf("...");
+ ND_PRINT((ndo,"..."));
return cp;
trunc:
- printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_T));
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_T)));
return NULL;
}
static const u_char *
-isakmp_ke_print(const struct isakmp_gen *ext, u_int item_len _U_,
- const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi _U_,
- u_int32_t proto _U_, int depth _U_)
+ikev1_ke_print(netdissect_options *ndo, u_char tpay _U_,
+ const struct isakmp_gen *ext, u_int item_len _U_,
+ const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
{
struct isakmp_gen e;
- printf("%s:", NPSTR(ISAKMP_NPTYPE_KE));
+ ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_KE)));
- TCHECK(*ext);
+ ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
- printf(" key len=%d", ntohs(e.len) - 4);
- if (2 < vflag && 4 < ntohs(e.len)) {
- printf(" ");
- if (!rawprint((caddr_t)(ext + 1), ntohs(e.len) - 4))
+ ND_PRINT((ndo," key len=%d", ntohs(e.len) - 4));
+ if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
+ ND_PRINT((ndo," "));
+ if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
goto trunc;
}
return (u_char *)ext + ntohs(e.len);
trunc:
- printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_KE));
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_KE)));
return NULL;
}
static const u_char *
-isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_,
- const u_char *ep _U_, u_int32_t phase, u_int32_t doi _U_,
- u_int32_t proto _U_, int depth _U_)
+ikev1_id_print(netdissect_options *ndo, u_char tpay _U_,
+ const struct isakmp_gen *ext, u_int item_len _U_,
+ const u_char *ep _U_, u_int32_t phase, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
{
#define USE_IPSECDOI_IN_PHASE1 1
- const struct isakmp_pl_id *p;
- struct isakmp_pl_id id;
+ const struct ikev1_pl_id *p;
+ struct ikev1_pl_id id;
static const char *idtypestr[] = {
"IPv4", "IPv4net", "IPv6", "IPv6net",
};
@@ -675,10 +856,10 @@ isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_,
int len;
const u_char *data;
- printf("%s:", NPSTR(ISAKMP_NPTYPE_ID));
+ ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_ID)));
- p = (struct isakmp_pl_id *)ext;
- TCHECK(*p);
+ p = (struct ikev1_pl_id *)ext;
+ ND_TCHECK(*p);
safememcpy(&id, ext, sizeof(id));
if (sizeof(*p) < item_len) {
data = (u_char *)(p + 1);
@@ -689,16 +870,16 @@ isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_,
}
#if 0 /*debug*/
- printf(" [phase=%d doi=%d proto=%d]", phase, doi, proto);
+ ND_PRINT((ndo," [phase=%d doi=%d proto=%d]", phase, doi, proto));
#endif
switch (phase) {
#ifndef USE_IPSECDOI_IN_PHASE1
case 1:
#endif
default:
- printf(" idtype=%s", STR_OR_ID(id.d.id_type, idtypestr));
- printf(" doi_data=%u",
- (u_int32_t)(ntohl(id.d.doi_data) & 0xffffff));
+ ND_PRINT((ndo," idtype=%s", STR_OR_ID(id.d.id_type, idtypestr)));
+ ND_PRINT((ndo," doi_data=%u",
+ (u_int32_t)(ntohl(id.d.doi_data) & 0xffffff)));
break;
#ifdef USE_IPSECDOI_IN_PHASE1
@@ -711,42 +892,42 @@ isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_,
struct protoent *pe;
p = (struct ipsecdoi_id *)ext;
- TCHECK(*p);
+ ND_TCHECK(*p);
safememcpy(&id, ext, sizeof(id));
- printf(" idtype=%s", STR_OR_ID(id.type, ipsecidtypestr));
+ ND_PRINT((ndo," idtype=%s", STR_OR_ID(id.type, ipsecidtypestr)));
if (id.proto_id) {
#ifndef WIN32
setprotoent(1);
#endif /* WIN32 */
pe = getprotobynumber(id.proto_id);
if (pe)
- printf(" protoid=%s", pe->p_name);
+ ND_PRINT((ndo," protoid=%s", pe->p_name));
#ifndef WIN32
endprotoent();
#endif /* WIN32 */
} else {
/* it DOES NOT mean IPPROTO_IP! */
- printf(" protoid=%s", "0");
+ ND_PRINT((ndo," protoid=%s", "0"));
}
- printf(" port=%d", ntohs(id.port));
+ ND_PRINT((ndo," port=%d", ntohs(id.port)));
if (!len)
break;
if (data == NULL)
goto trunc;
- TCHECK2(*data, len);
+ ND_TCHECK2(*data, len);
switch (id.type) {
case IPSECDOI_ID_IPV4_ADDR:
if (len < 4)
- printf(" len=%d [bad: < 4]", len);
+ ND_PRINT((ndo," len=%d [bad: < 4]", len));
else
- printf(" len=%d %s", len, ipaddr_string(data));
+ ND_PRINT((ndo," len=%d %s", len, ipaddr_string(data)));
len = 0;
break;
case IPSECDOI_ID_FQDN:
case IPSECDOI_ID_USER_FQDN:
{
int i;
- printf(" len=%d ", len);
+ ND_PRINT((ndo," len=%d ", len));
for (i = 0; i < len; i++)
safeputchar(data[i]);
len = 0;
@@ -756,12 +937,12 @@ isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_,
{
const u_char *mask;
if (len < 8)
- printf(" len=%d [bad: < 8]", len);
+ ND_PRINT((ndo," len=%d [bad: < 8]", len));
else {
mask = data + sizeof(struct in_addr);
- printf(" len=%d %s/%u.%u.%u.%u", len,
- ipaddr_string(data),
- mask[0], mask[1], mask[2], mask[3]);
+ ND_PRINT((ndo," len=%d %s/%u.%u.%u.%u", len,
+ ipaddr_string(data),
+ mask[0], mask[1], mask[2], mask[3]));
}
len = 0;
break;
@@ -769,22 +950,22 @@ isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_,
#ifdef INET6
case IPSECDOI_ID_IPV6_ADDR:
if (len < 16)
- printf(" len=%d [bad: < 16]", len);
+ ND_PRINT((ndo," len=%d [bad: < 16]", len));
else
- printf(" len=%d %s", len, ip6addr_string(data));
+ ND_PRINT((ndo," len=%d %s", len, ip6addr_string(data)));
len = 0;
break;
case IPSECDOI_ID_IPV6_ADDR_SUBNET:
{
const u_int32_t *mask;
if (len < 20)
- printf(" len=%d [bad: < 20]", len);
+ ND_PRINT((ndo," len=%d [bad: < 20]", len));
else {
mask = (u_int32_t *)(data + sizeof(struct in6_addr));
/*XXX*/
- printf(" len=%d %s/0x%08x%08x%08x%08x", len,
- ip6addr_string(data),
- mask[0], mask[1], mask[2], mask[3]);
+ ND_PRINT((ndo," len=%d %s/0x%08x%08x%08x%08x", len,
+ ip6addr_string(data),
+ mask[0], mask[1], mask[2], mask[3]));
}
len = 0;
break;
@@ -792,22 +973,22 @@ isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_,
#endif /*INET6*/
case IPSECDOI_ID_IPV4_ADDR_RANGE:
if (len < 8)
- printf(" len=%d [bad: < 8]", len);
+ ND_PRINT((ndo," len=%d [bad: < 8]", len));
else {
- printf(" len=%d %s-%s", len,
- ipaddr_string(data),
- ipaddr_string(data + sizeof(struct in_addr)));
+ ND_PRINT((ndo," len=%d %s-%s", len,
+ ipaddr_string(data),
+ ipaddr_string(data + sizeof(struct in_addr))));
}
len = 0;
break;
#ifdef INET6
case IPSECDOI_ID_IPV6_ADDR_RANGE:
if (len < 32)
- printf(" len=%d [bad: < 32]", len);
+ ND_PRINT((ndo," len=%d [bad: < 32]", len));
else {
- printf(" len=%d %s-%s", len,
- ip6addr_string(data),
- ip6addr_string(data + sizeof(struct in6_addr)));
+ ND_PRINT((ndo," len=%d %s-%s", len,
+ ip6addr_string(data),
+ ip6addr_string(data + sizeof(struct in6_addr))));
}
len = 0;
break;
@@ -821,159 +1002,169 @@ isakmp_id_print(const struct isakmp_gen *ext, u_int item_len _U_,
}
}
if (data && len) {
- printf(" len=%d", len);
- if (2 < vflag) {
- printf(" ");
- if (!rawprint((caddr_t)data, len))
+ ND_PRINT((ndo," len=%d", len));
+ if (2 < ndo->ndo_vflag) {
+ ND_PRINT((ndo," "));
+ if (!rawprint(ndo, (caddr_t)data, len))
goto trunc;
}
}
return (u_char *)ext + item_len;
trunc:
- printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_ID));
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_ID)));
return NULL;
}
static const u_char *
-isakmp_cert_print(const struct isakmp_gen *ext, u_int item_len _U_,
- const u_char *ep _U_, u_int32_t phase _U_,
- u_int32_t doi0 _U_,
- u_int32_t proto0 _U_, int depth _U_)
+ikev1_cert_print(netdissect_options *ndo, u_char tpay _U_,
+ const struct isakmp_gen *ext, u_int item_len _U_,
+ const u_char *ep _U_, u_int32_t phase _U_,
+ u_int32_t doi0 _U_,
+ u_int32_t proto0 _U_, int depth _U_)
{
- const struct isakmp_pl_cert *p;
- struct isakmp_pl_cert cert;
+ const struct ikev1_pl_cert *p;
+ struct ikev1_pl_cert cert;
static const char *certstr[] = {
"none", "pkcs7", "pgp", "dns",
"x509sign", "x509ke", "kerberos", "crl",
"arl", "spki", "x509attr",
};
- printf("%s:", NPSTR(ISAKMP_NPTYPE_CERT));
+ ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_CERT)));
- p = (struct isakmp_pl_cert *)ext;
- TCHECK(*p);
+ p = (struct ikev1_pl_cert *)ext;
+ ND_TCHECK(*p);
safememcpy(&cert, ext, sizeof(cert));
- printf(" len=%d", item_len - 4);
- printf(" type=%s", STR_OR_ID((cert.encode), certstr));
- if (2 < vflag && 4 < item_len) {
- printf(" ");
- if (!rawprint((caddr_t)(ext + 1), item_len - 4))
+ ND_PRINT((ndo," len=%d", item_len - 4));
+ ND_PRINT((ndo," type=%s", STR_OR_ID((cert.encode), certstr)));
+ if (2 < ndo->ndo_vflag && 4 < item_len) {
+ ND_PRINT((ndo," "));
+ if (!rawprint(ndo, (caddr_t)(ext + 1), item_len - 4))
goto trunc;
}
return (u_char *)ext + item_len;
trunc:
- printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_CERT));
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_CERT)));
return NULL;
}
static const u_char *
-isakmp_cr_print(const struct isakmp_gen *ext, u_int item_len _U_,
- const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi0 _U_,
- u_int32_t proto0 _U_, int depth _U_)
+ikev1_cr_print(netdissect_options *ndo, u_char tpay _U_,
+ const struct isakmp_gen *ext, u_int item_len _U_,
+ const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi0 _U_,
+ u_int32_t proto0 _U_, int depth _U_)
{
- const struct isakmp_pl_cert *p;
- struct isakmp_pl_cert cert;
+ const struct ikev1_pl_cert *p;
+ struct ikev1_pl_cert cert;
static const char *certstr[] = {
"none", "pkcs7", "pgp", "dns",
"x509sign", "x509ke", "kerberos", "crl",
"arl", "spki", "x509attr",
};
- printf("%s:", NPSTR(ISAKMP_NPTYPE_CR));
+ ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_CR)));
- p = (struct isakmp_pl_cert *)ext;
- TCHECK(*p);
+ p = (struct ikev1_pl_cert *)ext;
+ ND_TCHECK(*p);
safememcpy(&cert, ext, sizeof(cert));
- printf(" len=%d", item_len - 4);
- printf(" type=%s", STR_OR_ID((cert.encode), certstr));
- if (2 < vflag && 4 < item_len) {
- printf(" ");
- if (!rawprint((caddr_t)(ext + 1), item_len - 4))
+ ND_PRINT((ndo," len=%d", item_len - 4));
+ ND_PRINT((ndo," type=%s", STR_OR_ID((cert.encode), certstr)));
+ if (2 < ndo->ndo_vflag && 4 < item_len) {
+ ND_PRINT((ndo," "));
+ if (!rawprint(ndo, (caddr_t)(ext + 1), item_len - 4))
goto trunc;
}
return (u_char *)ext + item_len;
trunc:
- printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_CR));
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_CR)));
return NULL;
}
static const u_char *
-isakmp_hash_print(const struct isakmp_gen *ext, u_int item_len _U_,
- const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi _U_,
- u_int32_t proto _U_, int depth _U_)
+ikev1_hash_print(netdissect_options *ndo, u_char tpay _U_,
+ const struct isakmp_gen *ext, u_int item_len _U_,
+ const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
{
struct isakmp_gen e;
- printf("%s:", NPSTR(ISAKMP_NPTYPE_HASH));
+ ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_HASH)));
- TCHECK(*ext);
+ ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
- printf(" len=%d", ntohs(e.len) - 4);
- if (2 < vflag && 4 < ntohs(e.len)) {
- printf(" ");
- if (!rawprint((caddr_t)(ext + 1), ntohs(e.len) - 4))
+ ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
+ if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
+ ND_PRINT((ndo," "));
+ if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
goto trunc;
}
return (u_char *)ext + ntohs(e.len);
trunc:
- printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_HASH));
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_HASH)));
return NULL;
}
static const u_char *
-isakmp_sig_print(const struct isakmp_gen *ext, u_int item_len _U_,
- const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi _U_,
- u_int32_t proto _U_, int depth _U_)
+ikev1_sig_print(netdissect_options *ndo, u_char tpay _U_,
+ const struct isakmp_gen *ext, u_int item_len _U_,
+ const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
{
struct isakmp_gen e;
- printf("%s:", NPSTR(ISAKMP_NPTYPE_SIG));
+ ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_SIG)));
- TCHECK(*ext);
+ ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
- printf(" len=%d", ntohs(e.len) - 4);
- if (2 < vflag && 4 < ntohs(e.len)) {
- printf(" ");
- if (!rawprint((caddr_t)(ext + 1), ntohs(e.len) - 4))
+ ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
+ if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
+ ND_PRINT((ndo," "));
+ if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
goto trunc;
}
return (u_char *)ext + ntohs(e.len);
trunc:
- printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_SIG));
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_SIG)));
return NULL;
}
static const u_char *
-isakmp_nonce_print(const struct isakmp_gen *ext,
- u_int item_len _U_,
- const u_char *ep _U_,
- u_int32_t phase _U_, u_int32_t doi _U_,
- u_int32_t proto _U_, int depth _U_)
+ikev1_nonce_print(netdissect_options *ndo, u_char tpay _U_,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_,
+ const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
{
struct isakmp_gen e;
- printf("%s:", NPSTR(ISAKMP_NPTYPE_NONCE));
+ ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_NONCE)));
- TCHECK(*ext);
+ ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
- printf(" n len=%d", ntohs(e.len) - 4);
- if (2 < vflag && 4 < ntohs(e.len)) {
- printf(" ");
- if (!rawprint((caddr_t)(ext + 1), ntohs(e.len) - 4))
+ ND_PRINT((ndo," n len=%d", ntohs(e.len) - 4));
+ if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
+ ND_PRINT((ndo," "));
+ if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
+ goto trunc;
+ } else if (1 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
+ ND_PRINT((ndo," "));
+ if (!ike_show_somedata(ndo, (u_char *)(caddr_t)(ext + 1), ep))
goto trunc;
}
return (u_char *)ext + ntohs(e.len);
trunc:
- printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_NONCE));
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_NONCE)));
return NULL;
}
static const u_char *
-isakmp_n_print(const struct isakmp_gen *ext, u_int item_len,
- const u_char *ep, u_int32_t phase, u_int32_t doi0 _U_,
- u_int32_t proto0 _U_, int depth)
+ikev1_n_print(netdissect_options *ndo, u_char tpay _U_,
+ const struct isakmp_gen *ext, u_int item_len,
+ const u_char *ep, u_int32_t phase, u_int32_t doi0 _U_,
+ u_int32_t proto0 _U_, int depth)
{
- struct isakmp_pl_n *p, n;
+ struct ikev1_pl_n *p, n;
const u_char *cp;
u_char *ep2;
u_int32_t doi;
@@ -1024,47 +1215,47 @@ isakmp_n_print(const struct isakmp_gen *ext, u_int item_len,
#define IPSEC_NOTIFY_STATUS_STR(x) \
STR_OR_ID((u_int)((x) - 24576), ipsec_notify_status_str)
- printf("%s:", NPSTR(ISAKMP_NPTYPE_N));
+ ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_N)));
- p = (struct isakmp_pl_n *)ext;
- TCHECK(*p);
+ p = (struct ikev1_pl_n *)ext;
+ ND_TCHECK(*p);
safememcpy(&n, ext, sizeof(n));
doi = ntohl(n.doi);
proto = n.prot_id;
if (doi != 1) {
- printf(" doi=%d", doi);
- printf(" proto=%d", proto);
+ ND_PRINT((ndo," doi=%d", doi));
+ ND_PRINT((ndo," proto=%d", proto));
if (ntohs(n.type) < 8192)
- printf(" type=%s", NOTIFY_ERROR_STR(ntohs(n.type)));
+ ND_PRINT((ndo," type=%s", NOTIFY_ERROR_STR(ntohs(n.type))));
else if (ntohs(n.type) < 16384)
- printf(" type=%s", numstr(ntohs(n.type)));
+ ND_PRINT((ndo," type=%s", numstr(ntohs(n.type))));
else if (ntohs(n.type) < 24576)
- printf(" type=%s", NOTIFY_STATUS_STR(ntohs(n.type)));
+ ND_PRINT((ndo," type=%s", NOTIFY_STATUS_STR(ntohs(n.type))));
else
- printf(" type=%s", numstr(ntohs(n.type)));
+ ND_PRINT((ndo," type=%s", numstr(ntohs(n.type))));
if (n.spi_size) {
- printf(" spi=");
- if (!rawprint((caddr_t)(p + 1), n.spi_size))
+ ND_PRINT((ndo," spi="));
+ if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size))
goto trunc;
}
return (u_char *)(p + 1) + n.spi_size;
}
- printf(" doi=ipsec");
- printf(" proto=%s", PROTOIDSTR(proto));
+ ND_PRINT((ndo," doi=ipsec"));
+ ND_PRINT((ndo," proto=%s", PROTOIDSTR(proto)));
if (ntohs(n.type) < 8192)
- printf(" type=%s", NOTIFY_ERROR_STR(ntohs(n.type)));
+ ND_PRINT((ndo," type=%s", NOTIFY_ERROR_STR(ntohs(n.type))));
else if (ntohs(n.type) < 16384)
- printf(" type=%s", IPSEC_NOTIFY_ERROR_STR(ntohs(n.type)));
+ ND_PRINT((ndo," type=%s", IPSEC_NOTIFY_ERROR_STR(ntohs(n.type))));
else if (ntohs(n.type) < 24576)
- printf(" type=%s", NOTIFY_STATUS_STR(ntohs(n.type)));
+ ND_PRINT((ndo," type=%s", NOTIFY_STATUS_STR(ntohs(n.type))));
else if (ntohs(n.type) < 32768)
- printf(" type=%s", IPSEC_NOTIFY_STATUS_STR(ntohs(n.type)));
+ ND_PRINT((ndo," type=%s", IPSEC_NOTIFY_STATUS_STR(ntohs(n.type))));
else
- printf(" type=%s", numstr(ntohs(n.type)));
+ ND_PRINT((ndo," type=%s", numstr(ntohs(n.type))));
if (n.spi_size) {
- printf(" spi=");
- if (!rawprint((caddr_t)(p + 1), n.spi_size))
+ ND_PRINT((ndo," spi="));
+ if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size))
goto trunc;
}
@@ -1072,119 +1263,712 @@ isakmp_n_print(const struct isakmp_gen *ext, u_int item_len,
ep2 = (u_char *)p + item_len;
if (cp < ep) {
- printf(" orig=(");
+ ND_PRINT((ndo," orig=("));
switch (ntohs(n.type)) {
case IPSECDOI_NTYPE_RESPONDER_LIFETIME:
{
const struct attrmap *map = oakley_t_map;
size_t nmap = sizeof(oakley_t_map)/sizeof(oakley_t_map[0]);
while (cp < ep && cp < ep2) {
- cp = isakmp_attrmap_print(cp,
+ cp = ikev1_attrmap_print(ndo, cp,
(ep < ep2) ? ep : ep2, map, nmap);
}
break;
}
case IPSECDOI_NTYPE_REPLAY_STATUS:
- printf("replay detection %sabled",
- (*(u_int32_t *)cp) ? "en" : "dis");
+ ND_PRINT((ndo,"replay detection %sabled",
+ (*(u_int32_t *)cp) ? "en" : "dis"));
break;
case ISAKMP_NTYPE_NO_PROPOSAL_CHOSEN:
- if (isakmp_sub_print(ISAKMP_NPTYPE_SA,
- (struct isakmp_gen *)cp, ep, phase, doi, proto,
- depth) == NULL)
+ if (ikev1_sub_print(ndo, ISAKMP_NPTYPE_SA,
+ (struct isakmp_gen *)cp, ep, phase, doi, proto,
+ depth) == NULL)
return NULL;
break;
default:
/* NULL is dummy */
- isakmp_print(gndo, cp,
+ isakmp_print(ndo, cp,
item_len - sizeof(*p) - n.spi_size,
NULL);
}
- printf(")");
+ ND_PRINT((ndo,")"));
}
return (u_char *)ext + item_len;
trunc:
- printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_N));
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_N)));
return NULL;
}
static const u_char *
-isakmp_d_print(const struct isakmp_gen *ext, u_int item_len _U_,
- const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi0 _U_,
- u_int32_t proto0 _U_, int depth _U_)
+ikev1_d_print(netdissect_options *ndo, u_char tpay _U_,
+ const struct isakmp_gen *ext, u_int item_len _U_,
+ const u_char *ep _U_, u_int32_t phase _U_, u_int32_t doi0 _U_,
+ u_int32_t proto0 _U_, int depth _U_)
{
- const struct isakmp_pl_d *p;
- struct isakmp_pl_d d;
+ const struct ikev1_pl_d *p;
+ struct ikev1_pl_d d;
const u_int8_t *q;
u_int32_t doi;
u_int32_t proto;
int i;
- printf("%s:", NPSTR(ISAKMP_NPTYPE_D));
+ ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_D)));
- p = (struct isakmp_pl_d *)ext;
- TCHECK(*p);
+ p = (struct ikev1_pl_d *)ext;
+ ND_TCHECK(*p);
safememcpy(&d, ext, sizeof(d));
doi = ntohl(d.doi);
proto = d.prot_id;
if (doi != 1) {
- printf(" doi=%u", doi);
- printf(" proto=%u", proto);
+ ND_PRINT((ndo," doi=%u", doi));
+ ND_PRINT((ndo," proto=%u", proto));
} else {
- printf(" doi=ipsec");
- printf(" proto=%s", PROTOIDSTR(proto));
+ ND_PRINT((ndo," doi=ipsec"));
+ ND_PRINT((ndo," proto=%s", PROTOIDSTR(proto)));
}
- printf(" spilen=%u", d.spi_size);
- printf(" nspi=%u", ntohs(d.num_spi));
- printf(" spi=");
+ ND_PRINT((ndo," spilen=%u", d.spi_size));
+ ND_PRINT((ndo," nspi=%u", ntohs(d.num_spi)));
+ ND_PRINT((ndo," spi="));
q = (u_int8_t *)(p + 1);
for (i = 0; i < ntohs(d.num_spi); i++) {
if (i != 0)
- printf(",");
- if (!rawprint((caddr_t)q, d.spi_size))
+ ND_PRINT((ndo,","));
+ if (!rawprint(ndo, (caddr_t)q, d.spi_size))
goto trunc;
q += d.spi_size;
}
return q;
trunc:
- printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_D));
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_D)));
return NULL;
}
static const u_char *
-isakmp_vid_print(const struct isakmp_gen *ext,
- u_int item_len _U_, const u_char *ep _U_,
- u_int32_t phase _U_, u_int32_t doi _U_,
- u_int32_t proto _U_, int depth _U_)
+ikev1_vid_print(netdissect_options *ndo, u_char tpay _U_,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
{
struct isakmp_gen e;
- printf("%s:", NPSTR(ISAKMP_NPTYPE_VID));
+ ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_VID)));
- TCHECK(*ext);
+ ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
- printf(" len=%d", ntohs(e.len) - 4);
- if (2 < vflag && 4 < ntohs(e.len)) {
- printf(" ");
- if (!rawprint((caddr_t)(ext + 1), ntohs(e.len) - 4))
+ ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
+ if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
+ ND_PRINT((ndo," "));
+ if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
goto trunc;
}
return (u_char *)ext + ntohs(e.len);
trunc:
- printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_VID));
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_VID)));
return NULL;
}
+/************************************************************/
+/* */
+/* IKE v2 - rfc4306 - dissector */
+/* */
+/************************************************************/
+
+static void
+ikev2_pay_print(netdissect_options *ndo, const char *payname, int critical)
+{
+ ND_PRINT((ndo,"%s%s:", payname, critical&0x80 ? "[C]" : ""));
+}
+
static const u_char *
-isakmp_sub0_print(u_char np, const struct isakmp_gen *ext, const u_char *ep,
- u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
+ikev2_gen_print(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext)
+{
+ struct isakmp_gen e;
+
+ ND_TCHECK(*ext);
+ safememcpy(&e, ext, sizeof(e));
+ ikev2_pay_print(ndo, NPSTR(tpay), e.critical);
+
+ ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
+ if (2 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
+ ND_PRINT((ndo," "));
+ if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
+ goto trunc;
+ }
+ return (u_char *)ext + ntohs(e.len);
+trunc:
+ ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
+ return NULL;
+}
+
+static const u_char *
+ikev2_t_print(netdissect_options *ndo, u_char tpay _U_, int pcount,
+ const struct isakmp_gen *ext, u_int item_len,
+ const u_char *ep, u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ const struct ikev2_t *p;
+ struct ikev2_t t;
+ u_int16_t t_id;
+ const u_char *cp;
+ const char *idstr;
+ const struct attrmap *map;
+ size_t nmap;
+ const u_char *ep2;
+
+ p = (struct ikev2_t *)ext;
+ ND_TCHECK(*p);
+ safememcpy(&t, ext, sizeof(t));
+ ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_T), t.h.critical);
+
+ t_id = ntohs(t.t_id);
+
+ map = NULL;
+ nmap = 0;
+
+ switch (t.t_type) {
+ case IV2_T_ENCR:
+ idstr = STR_OR_ID(t_id, esp_p_map);
+ map = encr_t_map;
+ nmap = sizeof(encr_t_map)/sizeof(encr_t_map[0]);
+ break;
+
+ case IV2_T_PRF:
+ idstr = STR_OR_ID(t_id, prf_p_map);
+ break;
+
+ case IV2_T_INTEG:
+ idstr = STR_OR_ID(t_id, integ_p_map);
+ break;
+
+ case IV2_T_DH:
+ idstr = STR_OR_ID(t_id, dh_p_map);
+ break;
+
+ case IV2_T_ESN:
+ idstr = STR_OR_ID(t_id, esn_p_map);
+ break;
+
+ default:
+ idstr = NULL;
+ break;
+ }
+
+ if (idstr)
+ ND_PRINT((ndo," #%u type=%s id=%s ", pcount,
+ STR_OR_ID(t.t_type, ikev2_t_type_map),
+ idstr));
+ else
+ ND_PRINT((ndo," #%u type=%s id=%u ", pcount,
+ STR_OR_ID(t.t_type, ikev2_t_type_map),
+ t.t_id));
+ cp = (u_char *)(p + 1);
+ ep2 = (u_char *)p + item_len;
+ while (cp < ep && cp < ep2) {
+ if (map && nmap) {
+ cp = ikev1_attrmap_print(ndo, cp, (ep < ep2) ? ep : ep2,
+ map, nmap);
+ } else
+ cp = ikev1_attr_print(ndo, cp, (ep < ep2) ? ep : ep2);
+ }
+ if (ep < ep2)
+ ND_PRINT((ndo,"..."));
+ return cp;
+trunc:
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_T)));
+ return NULL;
+}
+
+static const u_char *
+ikev2_p_print(netdissect_options *ndo, u_char tpay _U_, int pcount _U_,
+ const struct isakmp_gen *ext, u_int item_len _U_,
+ const u_char *ep, u_int32_t phase, u_int32_t doi0,
+ u_int32_t proto0 _U_, int depth)
+{
+ const struct ikev2_p *p;
+ struct ikev2_p prop;
+ const u_char *cp;
+
+ p = (struct ikev2_p *)ext;
+ ND_TCHECK(*p);
+ safememcpy(&prop, ext, sizeof(prop));
+ ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_P), prop.h.critical);
+
+ ND_PRINT((ndo," #%u protoid=%s transform=%d",
+ prop.p_no, PROTOIDSTR(prop.prot_id), prop.num_t));
+ if (prop.spi_size) {
+ ND_PRINT((ndo," spi="));
+ if (!rawprint(ndo, (caddr_t)(p + 1), prop.spi_size))
+ goto trunc;
+ }
+
+ ext = (struct isakmp_gen *)((u_char *)(p + 1) + prop.spi_size);
+ ND_TCHECK(*ext);
+
+ cp = ikev2_sub_print(ndo, ISAKMP_NPTYPE_T, ext, ep, phase, doi0,
+ prop.prot_id, depth);
+
+ return cp;
+trunc:
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_P)));
+ return NULL;
+}
+
+static const u_char *
+ikev2_sa_print(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext1,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ struct isakmp_gen e;
+ int osa_len, sa_len;
+
+ ND_TCHECK(*ext1);
+ safememcpy(&e, ext1, sizeof(e));
+ ikev2_pay_print(ndo, "sa", e.critical);
+
+ osa_len= ntohs(e.len);
+ sa_len = osa_len - 4;
+ ND_PRINT((ndo," len=%d", sa_len));
+
+ ikev2_sub_print(ndo, ISAKMP_NPTYPE_P,
+ ext1+1, ep,
+ 0, 0, 0, depth);
+
+ return (u_char *)ext1 + osa_len;
+trunc:
+ ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
+ return NULL;
+}
+
+static const u_char *
+ikev2_ke_print(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ struct ikev2_ke ke;
+ struct ikev2_ke *k;
+
+ k = (struct ikev2_ke *)ext;
+ ND_TCHECK(*ext);
+ safememcpy(&ke, ext, sizeof(ke));
+ ikev2_pay_print(ndo, NPSTR(tpay), ke.h.critical);
+
+ ND_PRINT((ndo," len=%u group=%s", ntohs(ke.h.len) - 8,
+ STR_OR_ID(ntohs(ke.ke_group), dh_p_map)));
+
+ if (2 < ndo->ndo_vflag && 8 < ntohs(ke.h.len)) {
+ ND_PRINT((ndo," "));
+ if (!rawprint(ndo, (caddr_t)(k + 1), ntohs(ke.h.len) - 8))
+ goto trunc;
+ }
+ return (u_char *)ext + ntohs(ke.h.len);
+trunc:
+ ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
+ return NULL;
+}
+
+static const u_char *
+ikev2_ID_print(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ return ikev2_gen_print(ndo, tpay, ext);
+}
+
+static const u_char *
+ikev2_cert_print(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ return ikev2_gen_print(ndo, tpay, ext);
+}
+
+static const u_char *
+ikev2_cr_print(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ return ikev2_gen_print(ndo, tpay, ext);
+}
+
+static const u_char *
+ikev2_auth_print(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ struct ikev2_auth e;
+ const char *v2_auth[]={ "invalid", "rsasig",
+ "shared-secret", "dsssig" };
+
+ ND_TCHECK(*ext);
+ safememcpy(&e, ext, sizeof(e));
+ ikev2_pay_print(ndo, NPSTR(tpay), e.h.critical);
+
+ ND_PRINT((ndo," len=%d method=%s", ntohs(e.h.len) - 4,
+ STR_OR_ID(e.auth_method, v2_auth)));
+
+ if (1 < ndo->ndo_vflag && 4 < ntohs(e.h.len)) {
+ ND_PRINT((ndo," authdata=("));
+ if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.h.len) - 4))
+ goto trunc;
+ ND_PRINT((ndo,") "));
+ } else if(ndo->ndo_vflag && 4 < ntohs(e.h.len)) {
+ if(!ike_show_somedata(ndo, (const u_char *)(ext+1), ep)) goto trunc;
+ }
+
+ return (u_char *)ext + ntohs(e.h.len);
+trunc:
+ ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
+ return NULL;
+}
+
+static const u_char *
+ikev2_nonce_print(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ struct isakmp_gen e;
+
+ ND_TCHECK(*ext);
+ safememcpy(&e, ext, sizeof(e));
+ ikev2_pay_print(ndo, "nonce", e.critical);
+
+ ND_PRINT((ndo," len=%d", ntohs(e.len) - 4));
+ if (1 < ndo->ndo_vflag && 4 < ntohs(e.len)) {
+ ND_PRINT((ndo," nonce=("));
+ if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
+ goto trunc;
+ ND_PRINT((ndo,") "));
+ } else if(ndo->ndo_vflag && 4 < ntohs(e.len)) {
+ if(!ike_show_somedata(ndo, (const u_char *)(ext+1), ep)) goto trunc;
+ }
+
+ return (u_char *)ext + ntohs(e.len);
+trunc:
+ ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
+ return NULL;
+}
+
+/* notify payloads */
+static const u_char *
+ikev2_n_print(netdissect_options *ndo, u_char tpay _U_,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ struct ikev2_n *p, n;
+ const u_char *cp;
+ u_char *ep2;
+ u_char showspi, showdata, showsomedata;
+ const char *notify_name;
+ u_int32_t type;
+
+ p = (struct ikev2_n *)ext;
+ ND_TCHECK(*p);
+ safememcpy(&n, ext, sizeof(n));
+ ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_N), n.h.critical);
+
+ showspi = 1;
+ showdata = 0;
+ showsomedata=0;
+ notify_name=NULL;
+
+ ND_PRINT((ndo," prot_id=%s", PROTOIDSTR(n.prot_id)));
+
+ type = ntohs(n.type);
+
+ /* notify space is annoying sparse */
+ switch(type) {
+ case IV2_NOTIFY_UNSUPPORTED_CRITICAL_PAYLOAD:
+ notify_name = "unsupported_critical_payload";
+ showspi = 0;
+ break;
+
+ case IV2_NOTIFY_INVALID_IKE_SPI:
+ notify_name = "invalid_ike_spi";
+ showspi = 1;
+ break;
+
+ case IV2_NOTIFY_INVALID_MAJOR_VERSION:
+ notify_name = "invalid_major_version";
+ showspi = 0;
+ break;
+
+ case IV2_NOTIFY_INVALID_SYNTAX:
+ notify_name = "invalid_syntax";
+ showspi = 1;
+ break;
+
+ case IV2_NOTIFY_INVALID_MESSAGE_ID:
+ notify_name = "invalid_message_id";
+ showspi = 1;
+ break;
+
+ case IV2_NOTIFY_INVALID_SPI:
+ notify_name = "invalid_spi";
+ showspi = 1;
+ break;
+
+ case IV2_NOTIFY_NO_PROPOSAL_CHOSEN:
+ notify_name = "no_protocol_chosen";
+ showspi = 1;
+ break;
+
+ case IV2_NOTIFY_INVALID_KE_PAYLOAD:
+ notify_name = "invalid_ke_payload";
+ showspi = 1;
+ break;
+
+ case IV2_NOTIFY_AUTHENTICATION_FAILED:
+ notify_name = "authentication_failed";
+ showspi = 1;
+ break;
+
+ case IV2_NOTIFY_SINGLE_PAIR_REQUIRED:
+ notify_name = "single_pair_required";
+ showspi = 1;
+ break;
+
+ case IV2_NOTIFY_NO_ADDITIONAL_SAS:
+ notify_name = "no_additional_sas";
+ showspi = 0;
+ break;
+
+ case IV2_NOTIFY_INTERNAL_ADDRESS_FAILURE:
+ notify_name = "internal_address_failure";
+ showspi = 0;
+ break;
+
+ case IV2_NOTIFY_FAILED_CP_REQUIRED:
+ notify_name = "failed:cp_required";
+ showspi = 0;
+ break;
+
+ case IV2_NOTIFY_INVALID_SELECTORS:
+ notify_name = "invalid_selectors";
+ showspi = 0;
+ break;
+
+ case IV2_NOTIFY_INITIAL_CONTACT:
+ notify_name = "initial_contact";
+ showspi = 0;
+ break;
+
+ case IV2_NOTIFY_SET_WINDOW_SIZE:
+ notify_name = "set_window_size";
+ showspi = 0;
+ break;
+
+ case IV2_NOTIFY_ADDITIONAL_TS_POSSIBLE:
+ notify_name = "additional_ts_possible";
+ showspi = 0;
+ break;
+
+ case IV2_NOTIFY_IPCOMP_SUPPORTED:
+ notify_name = "ipcomp_supported";
+ showspi = 0;
+ break;
+
+ case IV2_NOTIFY_NAT_DETECTION_SOURCE_IP:
+ notify_name = "nat_detection_source_ip";
+ showspi = 1;
+ break;
+
+ case IV2_NOTIFY_NAT_DETECTION_DESTINATION_IP:
+ notify_name = "nat_detection_destination_ip";
+ showspi = 1;
+ break;
+
+ case IV2_NOTIFY_COOKIE:
+ notify_name = "cookie";
+ showspi = 1;
+ showsomedata= 1;
+ showdata= 0;
+ break;
+
+ case IV2_NOTIFY_USE_TRANSPORT_MODE:
+ notify_name = "use_transport_mode";
+ showspi = 0;
+ break;
+
+ case IV2_NOTIFY_HTTP_CERT_LOOKUP_SUPPORTED:
+ notify_name = "http_cert_lookup_supported";
+ showspi = 0;
+ break;
+
+ case IV2_NOTIFY_REKEY_SA:
+ notify_name = "rekey_sa";
+ showspi = 1;
+ break;
+
+ case IV2_NOTIFY_ESP_TFC_PADDING_NOT_SUPPORTED:
+ notify_name = "tfc_padding_not_supported";
+ showspi = 0;
+ break;
+
+ case IV2_NOTIFY_NON_FIRST_FRAGMENTS_ALSO:
+ notify_name = "non_first_fragment_also";
+ showspi = 0;
+ break;
+
+ default:
+ if (type < 8192) {
+ notify_name="error";
+ } else if(type < 16384) {
+ notify_name="private-error";
+ } else if(type < 40960) {
+ notify_name="status";
+ } else {
+ notify_name="private-status";
+ }
+ }
+
+ if(notify_name) {
+ ND_PRINT((ndo," type=%u(%s)", type, notify_name));
+ }
+
+
+ if (showspi && n.spi_size) {
+ ND_PRINT((ndo," spi="));
+ if (!rawprint(ndo, (caddr_t)(p + 1), n.spi_size))
+ goto trunc;
+ }
+
+ cp = (u_char *)(p + 1) + n.spi_size;
+ ep2 = (u_char *)p + item_len;
+
+ if(3 < ndo->ndo_vflag) {
+ showdata = 1;
+ }
+
+ if ((showdata || (showsomedata && ep-cp < 30)) && cp < ep) {
+ ND_PRINT((ndo," data=("));
+ if (!rawprint(ndo, (caddr_t)(cp), ep - cp))
+ goto trunc;
+
+ ND_PRINT((ndo,")"));
+
+ } else if(showsomedata && cp < ep) {
+ if(!ike_show_somedata(ndo, cp, ep)) goto trunc;
+ }
+
+ return (u_char *)ext + item_len;
+trunc:
+ ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_N)));
+ return NULL;
+}
+
+static const u_char *
+ikev2_d_print(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ return ikev2_gen_print(ndo, tpay, ext);
+}
+
+static const u_char *
+ikev2_vid_print(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ struct isakmp_gen e;
+ const u_char *vid;
+ int i, len;
+
+ ND_TCHECK(*ext);
+ safememcpy(&e, ext, sizeof(e));
+ ikev2_pay_print(ndo, NPSTR(tpay), e.critical);
+ ND_PRINT((ndo," len=%d vid=", ntohs(e.len) - 4));
+
+ vid = (const u_char *)(ext+1);
+ len = ntohs(e.len) - 4;
+ ND_TCHECK2(*vid, len);
+ for(i=0; i<len; i++) {
+ if(isprint(vid[i])) ND_PRINT((ndo, "%c", vid[i]));
+ else ND_PRINT((ndo, ".", vid[i]));
+ }
+ if (2 < ndo->ndo_vflag && 4 < len) {
+ ND_PRINT((ndo," "));
+ if (!rawprint(ndo, (caddr_t)(ext + 1), ntohs(e.len) - 4))
+ goto trunc;
+ }
+ return (u_char *)ext + ntohs(e.len);
+trunc:
+ ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
+ return NULL;
+}
+
+static const u_char *
+ikev2_TS_print(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ return ikev2_gen_print(ndo, tpay, ext);
+}
+
+static const u_char *
+ikev2_e_print(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ return ikev2_gen_print(ndo, tpay, ext);
+}
+
+static const u_char *
+ikev2_cp_print(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ return ikev2_gen_print(ndo, tpay, ext);
+}
+
+static const u_char *
+ikev2_eap_print(netdissect_options *ndo, u_char tpay,
+ const struct isakmp_gen *ext,
+ u_int item_len _U_, const u_char *ep _U_,
+ u_int32_t phase _U_, u_int32_t doi _U_,
+ u_int32_t proto _U_, int depth _U_)
+{
+ return ikev2_gen_print(ndo, tpay, ext);
+}
+
+static const u_char *
+ike_sub0_print(netdissect_options *ndo,
+ u_char np, const struct isakmp_gen *ext, const u_char *ep,
+ u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
{
const u_char *cp;
struct isakmp_gen e;
u_int item_len;
cp = (u_char *)ext;
- TCHECK(*ext);
+ ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
/*
@@ -1202,21 +1986,22 @@ isakmp_sub0_print(u_char np, const struct isakmp_gen *ext, const u_char *ep,
* XXX - what if item_len is too short, or too long,
* for this payload type?
*/
- cp = (*npfunc[np])(ext, item_len, ep, phase, doi, proto, depth);
+ cp = (*npfunc[np])(ndo, np, ext, item_len, ep, phase, doi, proto, depth);
} else {
- printf("%s", NPSTR(np));
+ ND_PRINT((ndo,"%s", NPSTR(np)));
cp += item_len;
}
return cp;
trunc:
- printf(" [|isakmp]");
+ ND_PRINT((ndo," [|isakmp]"));
return NULL;
}
static const u_char *
-isakmp_sub_print(u_char np, const struct isakmp_gen *ext, const u_char *ep,
- u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
+ikev1_sub_print(netdissect_options *ndo,
+ u_char np, const struct isakmp_gen *ext, const u_char *ep,
+ u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
{
const u_char *cp;
int i;
@@ -1225,19 +2010,19 @@ isakmp_sub_print(u_char np, const struct isakmp_gen *ext, const u_char *ep,
cp = (const u_char *)ext;
while (np) {
- TCHECK(*ext);
+ ND_TCHECK(*ext);
safememcpy(&e, ext, sizeof(e));
- TCHECK2(*ext, ntohs(e.len));
+ ND_TCHECK2(*ext, ntohs(e.len));
depth++;
- printf("\n");
+ ND_PRINT((ndo,"\n"));
for (i = 0; i < depth; i++)
- printf(" ");
- printf("(");
- cp = isakmp_sub0_print(np, ext, ep, phase, doi, proto, depth);
- printf(")");
+ ND_PRINT((ndo," "));
+ ND_PRINT((ndo,"("));
+ cp = ike_sub0_print(ndo, np, ext, ep, phase, doi, proto, depth);
+ ND_PRINT((ndo,")"));
depth--;
if (cp == NULL) {
@@ -1250,7 +2035,7 @@ isakmp_sub_print(u_char np, const struct isakmp_gen *ext, const u_char *ep,
}
return cp;
trunc:
- printf(" [|%s]", NPSTR(np));
+ ND_PRINT((ndo," [|%s]", NPSTR(np)));
return NULL;
}
@@ -1274,120 +2059,287 @@ safememcpy(void *p, const void *q, size_t l)
}
void
-isakmp_print(netdissect_options *ndo,
- const u_char *bp, u_int length,
- const u_char *bp2)
+ikev1_print(netdissect_options *ndo,
+ const u_char *bp, u_int length,
+ const u_char *bp2, struct isakmp *base)
{
const struct isakmp *p;
- struct isakmp base;
const u_char *ep;
u_char np;
int i;
int phase;
- int major, minor;
-
+
p = (const struct isakmp *)bp;
ep = ndo->ndo_snapend;
-
- if ((struct isakmp *)ep < p + 1) {
- printf("[|isakmp]");
- return;
- }
-
- safememcpy(&base, p, sizeof(base));
-
- printf("isakmp");
- if (vflag) {
- major = (base.vers & ISAKMP_VERS_MAJOR)
- >> ISAKMP_VERS_MAJOR_SHIFT;
- minor = (base.vers & ISAKMP_VERS_MINOR)
- >> ISAKMP_VERS_MINOR_SHIFT;
- printf(" %d.%d", major, minor);
- }
-
- if (vflag) {
- printf(" msgid ");
- rawprint((caddr_t)&base.msgid, sizeof(base.msgid));
- }
-
- if (1 < vflag) {
- printf(" cookie ");
- rawprint((caddr_t)&base.i_ck, sizeof(base.i_ck));
- printf("->");
- rawprint((caddr_t)&base.r_ck, sizeof(base.r_ck));
- }
- printf(":");
-
- phase = (*(u_int32_t *)base.msgid == 0) ? 1 : 2;
+
+ phase = (*(u_int32_t *)base->msgid == 0) ? 1 : 2;
if (phase == 1)
- printf(" phase %d", phase);
+ ND_PRINT((ndo," phase %d", phase));
else
- printf(" phase %d/others", phase);
-
- i = cookie_find(&base.i_ck);
+ ND_PRINT((ndo," phase %d/others", phase));
+
+ i = cookie_find(&base->i_ck);
if (i < 0) {
- if (iszero((u_char *)&base.r_ck, sizeof(base.r_ck))) {
+ if (iszero((u_char *)&base->r_ck, sizeof(base->r_ck))) {
/* the first packet */
- printf(" I");
+ ND_PRINT((ndo," I"));
if (bp2)
- cookie_record(&base.i_ck, bp2);
+ cookie_record(&base->i_ck, bp2);
} else
- printf(" ?");
+ ND_PRINT((ndo," ?"));
} else {
if (bp2 && cookie_isinitiator(i, bp2))
- printf(" I");
+ ND_PRINT((ndo," I"));
else if (bp2 && cookie_isresponder(i, bp2))
- printf(" R");
+ ND_PRINT((ndo," R"));
else
- printf(" ?");
+ ND_PRINT((ndo," ?"));
}
-
- printf(" %s", ETYPESTR(base.etype));
- if (base.flags) {
- printf("[%s%s]", base.flags & ISAKMP_FLAG_E ? "E" : "",
- base.flags & ISAKMP_FLAG_C ? "C" : "");
+
+ ND_PRINT((ndo," %s", ETYPESTR(base->etype)));
+ if (base->flags) {
+ ND_PRINT((ndo,"[%s%s]", base->flags & ISAKMP_FLAG_E ? "E" : "",
+ base->flags & ISAKMP_FLAG_C ? "C" : ""));
}
-
- if (vflag) {
+
+ if (ndo->ndo_vflag) {
const struct isakmp_gen *ext;
int nparen;
+
+ ND_PRINT((ndo,":"));
+
+ /* regardless of phase... */
+ if (base->flags & ISAKMP_FLAG_E) {
+ /*
+ * encrypted, nothing we can do right now.
+ * we hope to decrypt the packet in the future...
+ */
+ ND_PRINT((ndo," [encrypted %s]", NPSTR(base->np)));
+ goto done;
+ }
+
+ nparen = 0;
+ CHECKLEN(p + 1, base->np);
+ np = base->np;
+ ext = (struct isakmp_gen *)(p + 1);
+ ikev1_sub_print(ndo, np, ext, ep, phase, 0, 0, 0);
+ }
+
+done:
+ if (ndo->ndo_vflag) {
+ if (ntohl(base->len) != length) {
+ ND_PRINT((ndo," (len mismatch: isakmp %u/ip %u)",
+ (u_int32_t)ntohl(base->len), length));
+ }
+ }
+}
-#define CHECKLEN(p, np) \
- if (ep < (u_char *)(p)) { \
- printf(" [|%s]", NPSTR(np)); \
- goto done; \
+static const u_char *
+ikev2_sub0_print(netdissect_options *ndo, u_char np, int pcount,
+ const struct isakmp_gen *ext, const u_char *ep,
+ u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
+{
+ const u_char *cp;
+ struct isakmp_gen e;
+ u_int item_len;
+
+ cp = (u_char *)ext;
+ ND_TCHECK(*ext);
+ safememcpy(&e, ext, sizeof(e));
+
+ /*
+ * Since we can't have a payload length of less than 4 bytes,
+ * we need to bail out here if the generic header is nonsensical
+ * or truncated, otherwise we could loop forever processing
+ * zero-length items or otherwise misdissect the packet.
+ */
+ item_len = ntohs(e.len);
+ if (item_len <= 4)
+ return NULL;
+
+ if(np == ISAKMP_NPTYPE_P) {
+ cp = ikev2_p_print(ndo, np, pcount, ext, item_len,
+ ep, phase, doi, proto, depth);
+ } else if(np == ISAKMP_NPTYPE_T) {
+ cp = ikev2_t_print(ndo, np, pcount, ext, item_len,
+ ep, phase, doi, proto, depth);
+ } else if (NPFUNC(np)) {
+ /*
+ * XXX - what if item_len is too short, or too long,
+ * for this payload type?
+ */
+ cp = (*npfunc[np])(ndo, np, /*pcount,*/ ext, item_len,
+ ep, phase, doi, proto, depth);
+ } else {
+ ND_PRINT((ndo,"%s", NPSTR(np)));
+ cp += item_len;
+ }
+
+ return cp;
+trunc:
+ ND_PRINT((ndo," [|isakmp]"));
+ return NULL;
+}
+
+static const u_char *
+ikev2_sub_print(netdissect_options *ndo,
+ u_char np, const struct isakmp_gen *ext, const u_char *ep,
+ u_int32_t phase, u_int32_t doi, u_int32_t proto, int depth)
+{
+ const u_char *cp;
+ int i;
+ int pcount;
+ struct isakmp_gen e;
+
+ cp = (const u_char *)ext;
+ pcount = 0;
+ while (np) {
+ pcount++;
+ ND_TCHECK(*ext);
+
+ safememcpy(&e, ext, sizeof(e));
+
+ ND_TCHECK2(*ext, ntohs(e.len));
+
+ depth++;
+ ND_PRINT((ndo,"\n"));
+ for (i = 0; i < depth; i++)
+ ND_PRINT((ndo," "));
+ ND_PRINT((ndo,"("));
+ cp = ikev2_sub0_print(ndo, np, pcount,
+ ext, ep, phase, doi, proto, depth);
+ ND_PRINT((ndo,")"));
+ depth--;
+
+ if (cp == NULL) {
+ /* Zero-length subitem */
+ return NULL;
}
- printf(":");
+ np = e.np;
+ ext = (struct isakmp_gen *)cp;
+ }
+ return cp;
+trunc:
+ ND_PRINT((ndo," [|%s]", NPSTR(np)));
+ return NULL;
+}
+
+static void
+ikev2_print(netdissect_options *ndo,
+ const u_char *bp, u_int length,
+ const u_char *bp2 _U_, struct isakmp *base)
+{
+ const struct isakmp *p;
+ const u_char *ep;
+ u_char np;
+ int phase;
+
+ p = (const struct isakmp *)bp;
+ ep = ndo->ndo_snapend;
+
+ phase = (*(u_int32_t *)base->msgid == 0) ? 1 : 2;
+ if (phase == 1)
+ ND_PRINT((ndo, " parent_sa"));
+ else
+ ND_PRINT((ndo, " child_sa "));
+
+ ND_PRINT((ndo, " %s", ETYPESTR(base->etype)));
+ if (base->flags) {
+ ND_PRINT((ndo, "[%s%s]",
+ base->flags & ISAKMP_FLAG_I ? "I" : "",
+ base->flags & ISAKMP_FLAG_V ? "V" : "",
+ base->flags & ISAKMP_FLAG_R ? "R" : ""));
+ }
+
+ if (ndo->ndo_vflag) {
+ const struct isakmp_gen *ext;
+ int nparen;
+
+ ND_PRINT((ndo, ":"));
/* regardless of phase... */
- if (base.flags & ISAKMP_FLAG_E) {
+ if (base->flags & ISAKMP_FLAG_E) {
/*
* encrypted, nothing we can do right now.
* we hope to decrypt the packet in the future...
*/
- printf(" [encrypted %s]", NPSTR(base.np));
+ ND_PRINT((ndo, " [encrypted %s]", NPSTR(base->np)));
goto done;
}
nparen = 0;
- CHECKLEN(p + 1, base.np)
+ CHECKLEN(p + 1, base->np)
- np = base.np;
+ np = base->np;
ext = (struct isakmp_gen *)(p + 1);
- isakmp_sub_print(np, ext, ep, phase, 0, 0, 0);
+ ikev2_sub_print(ndo, np, ext, ep, phase, 0, 0, 0);
}
done:
- if (vflag) {
- if (ntohl(base.len) != length) {
- printf(" (len mismatch: isakmp %u/ip %u)",
- (u_int32_t)ntohl(base.len), length);
+ if (ndo->ndo_vflag) {
+ if (ntohl(base->len) != length) {
+ ND_PRINT((ndo, " (len mismatch: isakmp %u/ip %u)",
+ (u_int32_t)ntohl(base->len), length));
}
}
}
void
+isakmp_print(netdissect_options *ndo,
+ const u_char *bp, u_int length,
+ const u_char *bp2)
+{
+ const struct isakmp *p;
+ struct isakmp base;
+ const u_char *ep;
+ int major, minor;
+
+ p = (const struct isakmp *)bp;
+ ep = ndo->ndo_snapend;
+
+ if ((struct isakmp *)ep < p + 1) {
+ ND_PRINT((ndo,"[|isakmp]"));
+ return;
+ }
+
+ safememcpy(&base, p, sizeof(base));
+
+ ND_PRINT((ndo,"isakmp"));
+ major = (base.vers & ISAKMP_VERS_MAJOR)
+ >> ISAKMP_VERS_MAJOR_SHIFT;
+ minor = (base.vers & ISAKMP_VERS_MINOR)
+ >> ISAKMP_VERS_MINOR_SHIFT;
+
+ if (ndo->ndo_vflag) {
+ ND_PRINT((ndo," %d.%d", major, minor));
+ }
+
+ if (ndo->ndo_vflag) {
+ ND_PRINT((ndo," msgid "));
+ rawprint(ndo, (caddr_t)&base.msgid, sizeof(base.msgid));
+ }
+
+ if (1 < ndo->ndo_vflag) {
+ ND_PRINT((ndo," cookie "));
+ rawprint(ndo, (caddr_t)&base.i_ck, sizeof(base.i_ck));
+ ND_PRINT((ndo,"->"));
+ rawprint(ndo, (caddr_t)&base.r_ck, sizeof(base.r_ck));
+ }
+ ND_PRINT((ndo,":"));
+
+ switch(major) {
+ case IKEv1_MAJOR_VERSION:
+ ikev1_print(ndo, bp, length, bp2, &base);
+ break;
+
+ case IKEv2_MAJOR_VERSION:
+ ikev2_print(ndo, bp, length, bp2, &base);
+ break;
+ }
+}
+
+void
isakmp_rfc3948_print(netdissect_options *ndo,
const u_char *bp, u_int length,
const u_char *bp2)
@@ -1403,7 +2355,7 @@ isakmp_rfc3948_print(netdissect_options *ndo,
if(length < 4) {
goto trunc;
}
-
+
/*
* see if this is an IKE packet
*/
@@ -1433,7 +2385,7 @@ isakmp_rfc3948_print(netdissect_options *ndo,
}
trunc:
- printf("[|isakmp]");
+ ND_PRINT((ndo,"[|isakmp]"));
return;
}
diff --git a/contrib/tcpdump/print-isoclns.c b/contrib/tcpdump/print-isoclns.c
index 2ea3a3d..fe06a9c 100644
--- a/contrib/tcpdump/print-isoclns.c
+++ b/contrib/tcpdump/print-isoclns.c
@@ -28,7 +28,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.133.2.25 2007/03/02 09:20:27 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.163 2007-03-02 09:16:19 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -49,9 +49,6 @@ static const char rcsid[] _U_ =
#include "gmpls.h"
#include "oui.h"
-#define IPV4 1 /* AFI value */
-#define IPV6 2 /* AFI value */
-
/*
* IS-IS is defined in ISO 10589. Look there for protocol definitions.
*/
@@ -340,7 +337,7 @@ static struct tok clnp_option_qos_global_values[] = {
};
#define ISIS_SUBTLV_EXT_IS_REACH_ADMIN_GROUP 3 /* draft-ietf-isis-traffic-05 */
-#define ISIS_SUBTLV_EXT_IS_REACH_LINK_LOCAL_REMOTE_ID 4 /* draft-ietf-isis-gmpls-extensions */
+#define ISIS_SUBTLV_EXT_IS_REACH_LINK_LOCAL_REMOTE_ID 4 /* rfc4205 */
#define ISIS_SUBTLV_EXT_IS_REACH_LINK_REMOTE_ID 5 /* draft-ietf-isis-traffic-05 */
#define ISIS_SUBTLV_EXT_IS_REACH_IPV4_INTF_ADDR 6 /* draft-ietf-isis-traffic-05 */
#define ISIS_SUBTLV_EXT_IS_REACH_IPV4_NEIGHBOR_ADDR 8 /* draft-ietf-isis-traffic-05 */
@@ -349,8 +346,9 @@ static struct tok clnp_option_qos_global_values[] = {
#define ISIS_SUBTLV_EXT_IS_REACH_UNRESERVED_BW 11 /* rfc4124 */
#define ISIS_SUBTLV_EXT_IS_REACH_BW_CONSTRAINTS_OLD 12 /* draft-ietf-tewg-diff-te-proto-06 */
#define ISIS_SUBTLV_EXT_IS_REACH_TE_METRIC 18 /* draft-ietf-isis-traffic-05 */
-#define ISIS_SUBTLV_EXT_IS_REACH_LINK_PROTECTION_TYPE 20 /* draft-ietf-isis-gmpls-extensions */
-#define ISIS_SUBTLV_EXT_IS_REACH_INTF_SW_CAP_DESCR 21 /* draft-ietf-isis-gmpls-extensions */
+#define ISIS_SUBTLV_EXT_IS_REACH_LINK_ATTRIBUTE 19 /* draft-ietf-isis-link-attr-01 */
+#define ISIS_SUBTLV_EXT_IS_REACH_LINK_PROTECTION_TYPE 20 /* rfc4205 */
+#define ISIS_SUBTLV_EXT_IS_REACH_INTF_SW_CAP_DESCR 21 /* rfc4205 */
#define ISIS_SUBTLV_EXT_IS_REACH_BW_CONSTRAINTS 22 /* rfc4124 */
static struct tok isis_ext_is_reach_subtlv_values[] = {
@@ -363,6 +361,7 @@ static struct tok isis_ext_is_reach_subtlv_values[] = {
{ ISIS_SUBTLV_EXT_IS_REACH_RESERVABLE_BW, "Reservable link bandwidth" },
{ ISIS_SUBTLV_EXT_IS_REACH_UNRESERVED_BW, "Unreserved bandwidth" },
{ ISIS_SUBTLV_EXT_IS_REACH_TE_METRIC, "Traffic Engineering Metric" },
+ { ISIS_SUBTLV_EXT_IS_REACH_LINK_ATTRIBUTE, "Link Attribute" },
{ ISIS_SUBTLV_EXT_IS_REACH_LINK_PROTECTION_TYPE, "Link Protection Type" },
{ ISIS_SUBTLV_EXT_IS_REACH_INTF_SW_CAP_DESCR, "Interface Switching Capability" },
{ ISIS_SUBTLV_EXT_IS_REACH_BW_CONSTRAINTS_OLD, "Bandwidth Constraints (old)" },
@@ -387,6 +386,13 @@ static struct tok isis_ext_ip_reach_subtlv_values[] = {
{ 0, NULL }
};
+static struct tok isis_subtlv_link_attribute_values[] = {
+ { 0x01, "Local Protection Available" },
+ { 0x02, "Link excluded from local protection path" },
+ { 0x04, "Local maintenance required"},
+ { 0, NULL }
+};
+
#define ISIS_SUBTLV_AUTH_SIMPLE 1
#define ISIS_SUBTLV_AUTH_MD5 54
#define ISIS_SUBTLV_AUTH_MD5_LEN 16
@@ -504,7 +510,8 @@ struct isis_tlv_ptp_adj {
u_int8_t neighbor_extd_local_circuit_id[4];
};
-static int osi_cksum(const u_int8_t *, u_int);
+static void osi_print_cksum(const u_int8_t *pptr, u_int16_t checksum,
+ u_int checksum_offset, u_int length);
static int clnp_print(const u_int8_t *, u_int);
static void esis_print(const u_int8_t *, u_int);
static int isis_print(const u_int8_t *, u_int);
@@ -767,7 +774,7 @@ static int clnp_print (const u_int8_t *pptr, u_int length)
}
printf("%slength %u",eflag ? "" : ", ",length);
- printf("\n\t%s PDU, hlen: %u, v: %u, lifetime: %u.%us, Segment PDU length: %u, checksum: 0x%04x ",
+ printf("\n\t%s PDU, hlen: %u, v: %u, lifetime: %u.%us, Segment PDU length: %u, checksum: 0x%04x",
tok2str(clnp_pdu_values, "unknown (%u)",clnp_pdu_type),
clnp_header->length_indicator,
clnp_header->version,
@@ -776,10 +783,8 @@ static int clnp_print (const u_int8_t *pptr, u_int length)
EXTRACT_16BITS(clnp_header->segment_length),
EXTRACT_16BITS(clnp_header->cksum));
- /* do not attempt to verify the checksum if it is zero */
- if (EXTRACT_16BITS(clnp_header->cksum) == 0)
- printf("(unverified)");
- else printf("(%s)", osi_cksum(optr, clnp_header->length_indicator) ? "incorrect" : "correct");
+ osi_print_cksum(optr, EXTRACT_16BITS(clnp_header->cksum), 7,
+ clnp_header->length_indicator);
printf("\n\tFlags [%s]",
bittok2str(clnp_flag_values,"none",clnp_flags));
@@ -1033,12 +1038,9 @@ esis_print(const u_int8_t *pptr, u_int length)
esis_pdu_type);
printf(", v: %u%s", esis_header->version, esis_header->version == ESIS_VERSION ? "" : "unsupported" );
- printf(", checksum: 0x%04x ", EXTRACT_16BITS(esis_header->cksum));
- /* do not attempt to verify the checksum if it is zero */
- if (EXTRACT_16BITS(esis_header->cksum) == 0)
- printf("(unverified)");
- else
- printf("(%s)", osi_cksum(pptr, li) ? "incorrect" : "correct");
+ printf(", checksum: 0x%04x", EXTRACT_16BITS(esis_header->cksum));
+
+ osi_print_cksum(pptr, EXTRACT_16BITS(esis_header->cksum), 7, li);
printf(", holding time: %us, length indicator: %u",EXTRACT_16BITS(esis_header->holdtime),li);
@@ -1413,7 +1415,7 @@ trunctlv:
static int
isis_print_is_reach_subtlv (const u_int8_t *tptr,u_int subt,u_int subl,const char *ident) {
- u_int te_class,priority_level;
+ u_int te_class,priority_level,gmpls_switch_cap;
union { /* int to float conversion buffer for several subTLVs */
float f;
u_int32_t i;
@@ -1437,7 +1439,7 @@ isis_print_is_reach_subtlv (const u_int8_t *tptr,u_int subt,u_int subl,const cha
case ISIS_SUBTLV_EXT_IS_REACH_LINK_REMOTE_ID:
if (subl >= 4) {
printf(", 0x%08x", EXTRACT_32BITS(tptr));
- if (subl == 8) /* draft-ietf-isis-gmpls-extensions */
+ if (subl == 8) /* rfc4205 */
printf(", 0x%08x", EXTRACT_32BITS(tptr+4));
}
break;
@@ -1486,6 +1488,15 @@ isis_print_is_reach_subtlv (const u_int8_t *tptr,u_int subt,u_int subl,const cha
if (subl >= 3)
printf(", %u", EXTRACT_24BITS(tptr));
break;
+ case ISIS_SUBTLV_EXT_IS_REACH_LINK_ATTRIBUTE:
+ if (subl == 2) {
+ printf(", [ %s ] (0x%04x)",
+ bittok2str(isis_subtlv_link_attribute_values,
+ "Unknown",
+ EXTRACT_16BITS(tptr)),
+ EXTRACT_16BITS(tptr));
+ }
+ break;
case ISIS_SUBTLV_EXT_IS_REACH_LINK_PROTECTION_TYPE:
if (subl >= 2) {
printf(", %s, Priority %u",
@@ -1495,9 +1506,10 @@ isis_print_is_reach_subtlv (const u_int8_t *tptr,u_int subt,u_int subl,const cha
break;
case ISIS_SUBTLV_EXT_IS_REACH_INTF_SW_CAP_DESCR:
if (subl >= 36) {
+ gmpls_switch_cap = *tptr;
printf("%s Interface Switching Capability:%s",
ident,
- tok2str(gmpls_switch_cap_values, "Unknown", *(tptr)));
+ tok2str(gmpls_switch_cap_values, "Unknown", gmpls_switch_cap));
printf(", LSP Encoding: %s",
tok2str(gmpls_encoding_values, "Unknown", *(tptr+1)));
tptr+=4;
@@ -1511,12 +1523,29 @@ isis_print_is_reach_subtlv (const u_int8_t *tptr,u_int subt,u_int subl,const cha
tptr+=4;
}
subl-=36;
- /* there is some optional stuff left to decode but this is as of yet
- not specified so just lets hexdump what is left */
- if(subl>0){
- if(!print_unknown_data(tptr,"\n\t\t ",
- subl))
+ switch (gmpls_switch_cap) {
+ case GMPLS_PSC1:
+ case GMPLS_PSC2:
+ case GMPLS_PSC3:
+ case GMPLS_PSC4:
+ bw.i = EXTRACT_32BITS(tptr);
+ printf("%s Min LSP Bandwidth: %.3f Mbps", ident, bw.f*8/1000000);
+ printf("%s Interface MTU: %u", ident, EXTRACT_16BITS(tptr+4));
+ break;
+ case GMPLS_TSC:
+ bw.i = EXTRACT_32BITS(tptr);
+ printf("%s Min LSP Bandwidth: %.3f Mbps", ident, bw.f*8/1000000);
+ printf("%s Indication %s", ident,
+ tok2str(gmpls_switch_cap_tsc_indication_values, "Unknown (%u)", *(tptr+4)));
+ break;
+ default:
+ /* there is some optional stuff left to decode but this is as of yet
+ not specified so just lets hexdump what is left */
+ if(subl>0){
+ if(!print_unknown_data(tptr,"\n\t\t ",
+ subl))
return(0);
+ }
}
}
break;
@@ -1631,7 +1660,7 @@ isis_print_extd_ip_reach (const u_int8_t *tptr, const char *ident, u_int16_t afi
processed=4;
tptr+=4;
- if (afi == IPV4) {
+ if (afi == AF_INET) {
if (!TTEST2(*tptr, 1)) /* fetch status byte */
return (0);
status_byte=*(tptr++);
@@ -1644,7 +1673,7 @@ isis_print_extd_ip_reach (const u_int8_t *tptr, const char *ident, u_int16_t afi
}
processed++;
#ifdef INET6
- } else if (afi == IPV6) {
+ } else if (afi == AF_INET6) {
if (!TTEST2(*tptr, 1)) /* fetch status & prefix_len byte */
return (0);
status_byte=*(tptr++);
@@ -1669,13 +1698,13 @@ isis_print_extd_ip_reach (const u_int8_t *tptr, const char *ident, u_int16_t afi
tptr+=byte_length;
processed+=byte_length;
- if (afi == IPV4)
+ if (afi == AF_INET)
printf("%sIPv4 prefix: %15s/%u",
ident,
ipaddr_string(prefix),
bit_length);
#ifdef INET6
- if (afi == IPV6)
+ if (afi == AF_INET6)
printf("%sIPv6 prefix: %s/%u",
ident,
ip6addr_string(prefix),
@@ -1686,17 +1715,20 @@ isis_print_extd_ip_reach (const u_int8_t *tptr, const char *ident, u_int16_t afi
ISIS_MASK_TLV_EXTD_IP_UPDOWN(status_byte) ? "down" : "up",
metric);
- if (afi == IPV4 && ISIS_MASK_TLV_EXTD_IP_SUBTLV(status_byte))
+ if (afi == AF_INET && ISIS_MASK_TLV_EXTD_IP_SUBTLV(status_byte))
printf(", sub-TLVs present");
#ifdef INET6
- if (afi == IPV6)
+ if (afi == AF_INET6)
printf(", %s%s",
ISIS_MASK_TLV_EXTD_IP6_IE(status_byte) ? "External" : "Internal",
ISIS_MASK_TLV_EXTD_IP6_SUBTLV(status_byte) ? ", sub-TLVs present" : "");
#endif
- if ((ISIS_MASK_TLV_EXTD_IP_SUBTLV(status_byte) && afi == IPV4) ||
- (ISIS_MASK_TLV_EXTD_IP6_SUBTLV(status_byte) && afi == IPV6)) {
+ if ((afi == AF_INET && ISIS_MASK_TLV_EXTD_IP_SUBTLV(status_byte))
+#ifdef INET6
+ || (afi == AF_INET6 && ISIS_MASK_TLV_EXTD_IP6_SUBTLV(status_byte))
+#endif
+ ) {
/* assume that one prefix can hold more
than one subTLV - therefore the first byte must reflect
the aggregate bytecount of the subTLVs for this prefix
@@ -1979,15 +2011,9 @@ static int isis_print (const u_int8_t *p, u_int length)
EXTRACT_16BITS(header_lsp->remaining_lifetime),
EXTRACT_16BITS(header_lsp->checksum));
- /* if this is a purge do not attempt to verify the checksum */
- if ( EXTRACT_16BITS(header_lsp->remaining_lifetime) == 0 &&
- EXTRACT_16BITS(header_lsp->checksum) == 0)
- printf(" (purged)");
- else
- /* verify the checksum -
- * checking starts at the lsp-id field at byte position [12]
- * hence the length needs to be reduced by 12 bytes */
- printf(" (%s)", (osi_cksum((u_int8_t *)header_lsp->lsp_id, length-12)) ? "incorrect" : "correct");
+
+ osi_print_cksum((u_int8_t *)header_lsp->lsp_id,
+ EXTRACT_16BITS(header_lsp->checksum), 12, length-12);
printf(", PDU length: %u, Flags: [ %s",
pdu_len,
@@ -2240,7 +2266,7 @@ static int isis_print (const u_int8_t *p, u_int length)
case ISIS_TLV_EXTD_IP_REACH:
while (tmp>0) {
- ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", IPV4);
+ ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", AF_INET);
if (ext_ip_len == 0) /* did something go wrong ? */
goto trunctlv;
tptr+=ext_ip_len;
@@ -2257,7 +2283,7 @@ static int isis_print (const u_int8_t *p, u_int length)
tmp-=mt_len;
while (tmp>0) {
- ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", IPV4);
+ ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", AF_INET);
if (ext_ip_len == 0) /* did something go wrong ? */
goto trunctlv;
tptr+=ext_ip_len;
@@ -2268,7 +2294,7 @@ static int isis_print (const u_int8_t *p, u_int length)
#ifdef INET6
case ISIS_TLV_IP6_REACH:
while (tmp>0) {
- ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", IPV6);
+ ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", AF_INET6);
if (ext_ip_len == 0) /* did something go wrong ? */
goto trunctlv;
tptr+=ext_ip_len;
@@ -2285,7 +2311,7 @@ static int isis_print (const u_int8_t *p, u_int length)
tmp-=mt_len;
while (tmp>0) {
- ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", IPV6);
+ ext_ip_len = isis_print_extd_ip_reach(tptr, "\n\t ", AF_INET6);
if (ext_ip_len == 0) /* did something go wrong ? */
goto trunctlv;
tptr+=ext_ip_len;
@@ -2490,9 +2516,7 @@ static int isis_print (const u_int8_t *p, u_int length)
* to avoid conflicts the checksum TLV is zeroed.
* see rfc3358 for details
*/
- if (EXTRACT_16BITS(tptr) == 0)
- printf("(unverified)");
- else printf("(%s)", osi_cksum(optr, length) ? "incorrect" : "correct");
+ osi_print_cksum(optr, EXTRACT_16BITS(tptr), tptr-optr, length);
break;
case ISIS_TLV_MT_SUPPORTED:
@@ -2684,25 +2708,25 @@ static int isis_print (const u_int8_t *p, u_int length)
return(1);
}
-/*
- * Verify the checksum. See 8473-1, Appendix C, section C.4.
- */
-
-static int
-osi_cksum(const u_int8_t *tptr, u_int len)
+static void
+osi_print_cksum (const u_int8_t *pptr, u_int16_t checksum,
+ u_int checksum_offset, u_int length)
{
- int32_t c0 = 0, c1 = 0;
+ u_int16_t calculated_checksum;
- while ((int)--len >= 0) {
- c0 += *tptr++;
- c0 %= 255;
- c1 += c0;
- c1 %= 255;
- }
- return (c0 | c1);
+ /* do not attempt to verify the checksum if it is zero */
+ if (!checksum) {
+ printf("(unverified)");
+ } else {
+ calculated_checksum = create_osi_cksum(pptr, checksum_offset, length);
+ if (checksum == calculated_checksum) {
+ printf(" (correct)");
+ } else {
+ printf(" (incorrect should be 0x%04x)", calculated_checksum);
+ }
+ }
}
-
/*
* Local Variables:
* c-style: whitesmith
diff --git a/contrib/tcpdump/print-juniper.c b/contrib/tcpdump/print-juniper.c
index b5837e3..08a929f 100644
--- a/contrib/tcpdump/print-juniper.c
+++ b/contrib/tcpdump/print-juniper.c
@@ -1,3 +1,5 @@
+/* NetBSD: print-juniper.c,v 1.2 2007/07/24 11:53:45 drochner Exp */
+
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
@@ -15,7 +17,9 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.8.2.22 2006/05/10 22:42:46 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-juniper.c,v 1.34 2007-08-29 02:31:44 mcr Exp $ (LBL)";
+#else
+__RCSID("NetBSD: print-juniper.c,v 1.3 2007/07/25 06:31:32 dogcow Exp ");
#endif
#ifdef HAVE_CONFIG_H
@@ -40,6 +44,8 @@ static const char rcsid[] _U_ =
#define JUNIPER_BPF_IN 1 /* Incoming packet */
#define JUNIPER_BPF_PKT_IN 0x1 /* Incoming packet */
#define JUNIPER_BPF_NO_L2 0x2 /* L2 header stripped */
+#define JUNIPER_BPF_IIF 0x4 /* IIF is valid */
+#define JUNIPER_BPF_FILTER 0x40 /* BPF filtering is supported */
#define JUNIPER_BPF_EXT 0x80 /* extensions present */
#define JUNIPER_MGC_NUMBER 0x4d4743 /* = "MGC" */
@@ -74,6 +80,291 @@ static struct tok juniper_direction_values[] = {
{ 0, NULL}
};
+/* codepoints for encoding extensions to a .pcap file */
+enum {
+ JUNIPER_EXT_TLV_IFD_IDX = 1,
+ JUNIPER_EXT_TLV_IFD_NAME = 2,
+ JUNIPER_EXT_TLV_IFD_MEDIATYPE = 3,
+ JUNIPER_EXT_TLV_IFL_IDX = 4,
+ JUNIPER_EXT_TLV_IFL_UNIT = 5,
+ JUNIPER_EXT_TLV_IFL_ENCAPS = 6,
+ JUNIPER_EXT_TLV_TTP_IFD_MEDIATYPE = 7,
+ JUNIPER_EXT_TLV_TTP_IFL_ENCAPS = 8
+};
+
+/* 1 byte type and 1-byte length */
+#define JUNIPER_EXT_TLV_OVERHEAD 2
+
+struct tok jnx_ext_tlv_values[] = {
+ { JUNIPER_EXT_TLV_IFD_IDX, "Device Interface Index" },
+ { JUNIPER_EXT_TLV_IFD_NAME,"Device Interface Name" },
+ { JUNIPER_EXT_TLV_IFD_MEDIATYPE, "Device Media Type" },
+ { JUNIPER_EXT_TLV_IFL_IDX, "Logical Interface Index" },
+ { JUNIPER_EXT_TLV_IFL_UNIT,"Logical Unit Number" },
+ { JUNIPER_EXT_TLV_IFL_ENCAPS, "Logical Interface Encapsulation" },
+ { JUNIPER_EXT_TLV_TTP_IFD_MEDIATYPE, "TTP derived Device Media Type" },
+ { JUNIPER_EXT_TLV_TTP_IFL_ENCAPS, "TTP derived Logical Interface Encapsulation" },
+ { 0, NULL }
+};
+
+struct tok jnx_flag_values[] = {
+ { JUNIPER_BPF_EXT, "Ext" },
+ { JUNIPER_BPF_FILTER, "Filter" },
+ { JUNIPER_BPF_IIF, "IIF" },
+ { JUNIPER_BPF_NO_L2, "no-L2" },
+ { JUNIPER_BPF_PKT_IN, "In" },
+ { 0, NULL }
+};
+
+#define JUNIPER_IFML_ETHER 1
+#define JUNIPER_IFML_FDDI 2
+#define JUNIPER_IFML_TOKENRING 3
+#define JUNIPER_IFML_PPP 4
+#define JUNIPER_IFML_FRAMERELAY 5
+#define JUNIPER_IFML_CISCOHDLC 6
+#define JUNIPER_IFML_SMDSDXI 7
+#define JUNIPER_IFML_ATMPVC 8
+#define JUNIPER_IFML_PPP_CCC 9
+#define JUNIPER_IFML_FRAMERELAY_CCC 10
+#define JUNIPER_IFML_IPIP 11
+#define JUNIPER_IFML_GRE 12
+#define JUNIPER_IFML_PIM 13
+#define JUNIPER_IFML_PIMD 14
+#define JUNIPER_IFML_CISCOHDLC_CCC 15
+#define JUNIPER_IFML_VLAN_CCC 16
+#define JUNIPER_IFML_MLPPP 17
+#define JUNIPER_IFML_MLFR 18
+#define JUNIPER_IFML_ML 19
+#define JUNIPER_IFML_LSI 20
+#define JUNIPER_IFML_DFE 21
+#define JUNIPER_IFML_ATM_CELLRELAY_CCC 22
+#define JUNIPER_IFML_CRYPTO 23
+#define JUNIPER_IFML_GGSN 24
+#define JUNIPER_IFML_LSI_PPP 25
+#define JUNIPER_IFML_LSI_CISCOHDLC 26
+#define JUNIPER_IFML_PPP_TCC 27
+#define JUNIPER_IFML_FRAMERELAY_TCC 28
+#define JUNIPER_IFML_CISCOHDLC_TCC 29
+#define JUNIPER_IFML_ETHERNET_CCC 30
+#define JUNIPER_IFML_VT 31
+#define JUNIPER_IFML_EXTENDED_VLAN_CCC 32
+#define JUNIPER_IFML_ETHER_OVER_ATM 33
+#define JUNIPER_IFML_MONITOR 34
+#define JUNIPER_IFML_ETHERNET_TCC 35
+#define JUNIPER_IFML_VLAN_TCC 36
+#define JUNIPER_IFML_EXTENDED_VLAN_TCC 37
+#define JUNIPER_IFML_CONTROLLER 38
+#define JUNIPER_IFML_MFR 39
+#define JUNIPER_IFML_LS 40
+#define JUNIPER_IFML_ETHERNET_VPLS 41
+#define JUNIPER_IFML_ETHERNET_VLAN_VPLS 42
+#define JUNIPER_IFML_ETHERNET_EXTENDED_VLAN_VPLS 43
+#define JUNIPER_IFML_LT 44
+#define JUNIPER_IFML_SERVICES 45
+#define JUNIPER_IFML_ETHER_VPLS_OVER_ATM 46
+#define JUNIPER_IFML_FR_PORT_CCC 47
+#define JUNIPER_IFML_FRAMERELAY_EXT_CCC 48
+#define JUNIPER_IFML_FRAMERELAY_EXT_TCC 49
+#define JUNIPER_IFML_FRAMERELAY_FLEX 50
+#define JUNIPER_IFML_GGSNI 51
+#define JUNIPER_IFML_ETHERNET_FLEX 52
+#define JUNIPER_IFML_COLLECTOR 53
+#define JUNIPER_IFML_AGGREGATOR 54
+#define JUNIPER_IFML_LAPD 55
+#define JUNIPER_IFML_PPPOE 56
+#define JUNIPER_IFML_PPP_SUBORDINATE 57
+#define JUNIPER_IFML_CISCOHDLC_SUBORDINATE 58
+#define JUNIPER_IFML_DFC 59
+#define JUNIPER_IFML_PICPEER 60
+
+struct tok juniper_ifmt_values[] = {
+ { JUNIPER_IFML_ETHER, "Ethernet" },
+ { JUNIPER_IFML_FDDI, "FDDI" },
+ { JUNIPER_IFML_TOKENRING, "Token-Ring" },
+ { JUNIPER_IFML_PPP, "PPP" },
+ { JUNIPER_IFML_PPP_SUBORDINATE, "PPP-Subordinate" },
+ { JUNIPER_IFML_FRAMERELAY, "Frame-Relay" },
+ { JUNIPER_IFML_CISCOHDLC, "Cisco-HDLC" },
+ { JUNIPER_IFML_SMDSDXI, "SMDS-DXI" },
+ { JUNIPER_IFML_ATMPVC, "ATM-PVC" },
+ { JUNIPER_IFML_PPP_CCC, "PPP-CCC" },
+ { JUNIPER_IFML_FRAMERELAY_CCC, "Frame-Relay-CCC" },
+ { JUNIPER_IFML_FRAMERELAY_EXT_CCC, "Extended FR-CCC" },
+ { JUNIPER_IFML_IPIP, "IP-over-IP" },
+ { JUNIPER_IFML_GRE, "GRE" },
+ { JUNIPER_IFML_PIM, "PIM-Encapsulator" },
+ { JUNIPER_IFML_PIMD, "PIM-Decapsulator" },
+ { JUNIPER_IFML_CISCOHDLC_CCC, "Cisco-HDLC-CCC" },
+ { JUNIPER_IFML_VLAN_CCC, "VLAN-CCC" },
+ { JUNIPER_IFML_EXTENDED_VLAN_CCC, "Extended-VLAN-CCC" },
+ { JUNIPER_IFML_MLPPP, "Multilink-PPP" },
+ { JUNIPER_IFML_MLFR, "Multilink-FR" },
+ { JUNIPER_IFML_MFR, "Multilink-FR-UNI-NNI" },
+ { JUNIPER_IFML_ML, "Multilink" },
+ { JUNIPER_IFML_LS, "LinkService" },
+ { JUNIPER_IFML_LSI, "LSI" },
+ { JUNIPER_IFML_ATM_CELLRELAY_CCC, "ATM-CCC-Cell-Relay" },
+ { JUNIPER_IFML_CRYPTO, "IPSEC-over-IP" },
+ { JUNIPER_IFML_GGSN, "GGSN" },
+ { JUNIPER_IFML_PPP_TCC, "PPP-TCC" },
+ { JUNIPER_IFML_FRAMERELAY_TCC, "Frame-Relay-TCC" },
+ { JUNIPER_IFML_FRAMERELAY_EXT_TCC, "Extended FR-TCC" },
+ { JUNIPER_IFML_CISCOHDLC_TCC, "Cisco-HDLC-TCC" },
+ { JUNIPER_IFML_ETHERNET_CCC, "Ethernet-CCC" },
+ { JUNIPER_IFML_VT, "VPN-Loopback-tunnel" },
+ { JUNIPER_IFML_ETHER_OVER_ATM, "Ethernet-over-ATM" },
+ { JUNIPER_IFML_ETHER_VPLS_OVER_ATM, "Ethernet-VPLS-over-ATM" },
+ { JUNIPER_IFML_MONITOR, "Monitor" },
+ { JUNIPER_IFML_ETHERNET_TCC, "Ethernet-TCC" },
+ { JUNIPER_IFML_VLAN_TCC, "VLAN-TCC" },
+ { JUNIPER_IFML_EXTENDED_VLAN_TCC, "Extended-VLAN-TCC" },
+ { JUNIPER_IFML_CONTROLLER, "Controller" },
+ { JUNIPER_IFML_ETHERNET_VPLS, "VPLS" },
+ { JUNIPER_IFML_ETHERNET_VLAN_VPLS, "VLAN-VPLS" },
+ { JUNIPER_IFML_ETHERNET_EXTENDED_VLAN_VPLS, "Extended-VLAN-VPLS" },
+ { JUNIPER_IFML_LT, "Logical-tunnel" },
+ { JUNIPER_IFML_SERVICES, "General-Services" },
+ { JUNIPER_IFML_PPPOE, "PPPoE" },
+ { JUNIPER_IFML_ETHERNET_FLEX, "Flexible-Ethernet-Services" },
+ { JUNIPER_IFML_FRAMERELAY_FLEX, "Flexible-FrameRelay" },
+ { JUNIPER_IFML_COLLECTOR, "Flow-collection" },
+ { JUNIPER_IFML_PICPEER, "PIC Peer" },
+ { JUNIPER_IFML_DFC, "Dynamic-Flow-Capture" },
+ {0, NULL}
+};
+
+#define JUNIPER_IFLE_ATM_SNAP 2
+#define JUNIPER_IFLE_ATM_NLPID 3
+#define JUNIPER_IFLE_ATM_VCMUX 4
+#define JUNIPER_IFLE_ATM_LLC 5
+#define JUNIPER_IFLE_ATM_PPP_VCMUX 6
+#define JUNIPER_IFLE_ATM_PPP_LLC 7
+#define JUNIPER_IFLE_ATM_PPP_FUNI 8
+#define JUNIPER_IFLE_ATM_CCC 9
+#define JUNIPER_IFLE_FR_NLPID 10
+#define JUNIPER_IFLE_FR_SNAP 11
+#define JUNIPER_IFLE_FR_PPP 12
+#define JUNIPER_IFLE_FR_CCC 13
+#define JUNIPER_IFLE_ENET2 14
+#define JUNIPER_IFLE_IEEE8023_SNAP 15
+#define JUNIPER_IFLE_IEEE8023_LLC 16
+#define JUNIPER_IFLE_PPP 17
+#define JUNIPER_IFLE_CISCOHDLC 18
+#define JUNIPER_IFLE_PPP_CCC 19
+#define JUNIPER_IFLE_IPIP_NULL 20
+#define JUNIPER_IFLE_PIM_NULL 21
+#define JUNIPER_IFLE_GRE_NULL 22
+#define JUNIPER_IFLE_GRE_PPP 23
+#define JUNIPER_IFLE_PIMD_DECAPS 24
+#define JUNIPER_IFLE_CISCOHDLC_CCC 25
+#define JUNIPER_IFLE_ATM_CISCO_NLPID 26
+#define JUNIPER_IFLE_VLAN_CCC 27
+#define JUNIPER_IFLE_MLPPP 28
+#define JUNIPER_IFLE_MLFR 29
+#define JUNIPER_IFLE_LSI_NULL 30
+#define JUNIPER_IFLE_AGGREGATE_UNUSED 31
+#define JUNIPER_IFLE_ATM_CELLRELAY_CCC 32
+#define JUNIPER_IFLE_CRYPTO 33
+#define JUNIPER_IFLE_GGSN 34
+#define JUNIPER_IFLE_ATM_TCC 35
+#define JUNIPER_IFLE_FR_TCC 36
+#define JUNIPER_IFLE_PPP_TCC 37
+#define JUNIPER_IFLE_CISCOHDLC_TCC 38
+#define JUNIPER_IFLE_ETHERNET_CCC 39
+#define JUNIPER_IFLE_VT 40
+#define JUNIPER_IFLE_ATM_EOA_LLC 41
+#define JUNIPER_IFLE_EXTENDED_VLAN_CCC 42
+#define JUNIPER_IFLE_ATM_SNAP_TCC 43
+#define JUNIPER_IFLE_MONITOR 44
+#define JUNIPER_IFLE_ETHERNET_TCC 45
+#define JUNIPER_IFLE_VLAN_TCC 46
+#define JUNIPER_IFLE_EXTENDED_VLAN_TCC 47
+#define JUNIPER_IFLE_MFR 48
+#define JUNIPER_IFLE_ETHERNET_VPLS 49
+#define JUNIPER_IFLE_ETHERNET_VLAN_VPLS 50
+#define JUNIPER_IFLE_ETHERNET_EXTENDED_VLAN_VPLS 51
+#define JUNIPER_IFLE_SERVICES 52
+#define JUNIPER_IFLE_ATM_ETHER_VPLS_ATM_LLC 53
+#define JUNIPER_IFLE_FR_PORT_CCC 54
+#define JUNIPER_IFLE_ATM_MLPPP_LLC 55
+#define JUNIPER_IFLE_ATM_EOA_CCC 56
+#define JUNIPER_IFLE_LT_VLAN 57
+#define JUNIPER_IFLE_COLLECTOR 58
+#define JUNIPER_IFLE_AGGREGATOR 59
+#define JUNIPER_IFLE_LAPD 60
+#define JUNIPER_IFLE_ATM_PPPOE_LLC 61
+#define JUNIPER_IFLE_ETHERNET_PPPOE 62
+#define JUNIPER_IFLE_PPPOE 63
+#define JUNIPER_IFLE_PPP_SUBORDINATE 64
+#define JUNIPER_IFLE_CISCOHDLC_SUBORDINATE 65
+#define JUNIPER_IFLE_DFC 66
+#define JUNIPER_IFLE_PICPEER 67
+
+struct tok juniper_ifle_values[] = {
+ { JUNIPER_IFLE_AGGREGATOR, "Aggregator" },
+ { JUNIPER_IFLE_ATM_CCC, "CCC over ATM" },
+ { JUNIPER_IFLE_ATM_CELLRELAY_CCC, "ATM CCC Cell Relay" },
+ { JUNIPER_IFLE_ATM_CISCO_NLPID, "CISCO compatible NLPID" },
+ { JUNIPER_IFLE_ATM_EOA_CCC, "Ethernet over ATM CCC" },
+ { JUNIPER_IFLE_ATM_EOA_LLC, "Ethernet over ATM LLC" },
+ { JUNIPER_IFLE_ATM_ETHER_VPLS_ATM_LLC, "Ethernet VPLS over ATM LLC" },
+ { JUNIPER_IFLE_ATM_LLC, "ATM LLC" },
+ { JUNIPER_IFLE_ATM_MLPPP_LLC, "MLPPP over ATM LLC" },
+ { JUNIPER_IFLE_ATM_NLPID, "ATM NLPID" },
+ { JUNIPER_IFLE_ATM_PPPOE_LLC, "PPPoE over ATM LLC" },
+ { JUNIPER_IFLE_ATM_PPP_FUNI, "PPP over FUNI" },
+ { JUNIPER_IFLE_ATM_PPP_LLC, "PPP over ATM LLC" },
+ { JUNIPER_IFLE_ATM_PPP_VCMUX, "PPP over ATM VCMUX" },
+ { JUNIPER_IFLE_ATM_SNAP, "ATM SNAP" },
+ { JUNIPER_IFLE_ATM_SNAP_TCC, "ATM SNAP TCC" },
+ { JUNIPER_IFLE_ATM_TCC, "ATM VCMUX TCC" },
+ { JUNIPER_IFLE_ATM_VCMUX, "ATM VCMUX" },
+ { JUNIPER_IFLE_CISCOHDLC, "C-HDLC" },
+ { JUNIPER_IFLE_CISCOHDLC_CCC, "C-HDLC CCC" },
+ { JUNIPER_IFLE_CISCOHDLC_SUBORDINATE, "C-HDLC via dialer" },
+ { JUNIPER_IFLE_CISCOHDLC_TCC, "C-HDLC TCC" },
+ { JUNIPER_IFLE_COLLECTOR, "Collector" },
+ { JUNIPER_IFLE_CRYPTO, "Crypto" },
+ { JUNIPER_IFLE_ENET2, "Ethernet" },
+ { JUNIPER_IFLE_ETHERNET_CCC, "Ethernet CCC" },
+ { JUNIPER_IFLE_ETHERNET_EXTENDED_VLAN_VPLS, "Extended VLAN VPLS" },
+ { JUNIPER_IFLE_ETHERNET_PPPOE, "PPPoE over Ethernet" },
+ { JUNIPER_IFLE_ETHERNET_TCC, "Ethernet TCC" },
+ { JUNIPER_IFLE_ETHERNET_VLAN_VPLS, "VLAN VPLS" },
+ { JUNIPER_IFLE_ETHERNET_VPLS, "VPLS" },
+ { JUNIPER_IFLE_EXTENDED_VLAN_CCC, "Extended VLAN CCC" },
+ { JUNIPER_IFLE_EXTENDED_VLAN_TCC, "Extended VLAN TCC" },
+ { JUNIPER_IFLE_FR_CCC, "FR CCC" },
+ { JUNIPER_IFLE_FR_NLPID, "FR NLPID" },
+ { JUNIPER_IFLE_FR_PORT_CCC, "FR CCC" },
+ { JUNIPER_IFLE_FR_PPP, "FR PPP" },
+ { JUNIPER_IFLE_FR_SNAP, "FR SNAP" },
+ { JUNIPER_IFLE_FR_TCC, "FR TCC" },
+ { JUNIPER_IFLE_GGSN, "GGSN" },
+ { JUNIPER_IFLE_GRE_NULL, "GRE NULL" },
+ { JUNIPER_IFLE_GRE_PPP, "PPP over GRE" },
+ { JUNIPER_IFLE_IPIP_NULL, "IPIP" },
+ { JUNIPER_IFLE_LAPD, "LAPD" },
+ { JUNIPER_IFLE_LSI_NULL, "LSI Null" },
+ { JUNIPER_IFLE_LT_VLAN, "LT VLAN" },
+ { JUNIPER_IFLE_MFR, "MFR" },
+ { JUNIPER_IFLE_MLFR, "MLFR" },
+ { JUNIPER_IFLE_MLPPP, "MLPPP" },
+ { JUNIPER_IFLE_MONITOR, "Monitor" },
+ { JUNIPER_IFLE_PIMD_DECAPS, "PIMd" },
+ { JUNIPER_IFLE_PIM_NULL, "PIM Null" },
+ { JUNIPER_IFLE_PPP, "PPP" },
+ { JUNIPER_IFLE_PPPOE, "PPPoE" },
+ { JUNIPER_IFLE_PPP_CCC, "PPP CCC" },
+ { JUNIPER_IFLE_PPP_SUBORDINATE, "" },
+ { JUNIPER_IFLE_PPP_TCC, "PPP TCC" },
+ { JUNIPER_IFLE_SERVICES, "General Services" },
+ { JUNIPER_IFLE_VLAN_CCC, "VLAN CCC" },
+ { JUNIPER_IFLE_VLAN_TCC, "VLAN TCC" },
+ { JUNIPER_IFLE_VT, "VT" },
+ {0, NULL}
+};
+
struct juniper_cookie_table_t {
u_int32_t pictype; /* pic type */
u_int8_t cookie_len; /* cookie len */
@@ -128,6 +419,7 @@ struct juniper_l2info_t {
u_int8_t cookie[8];
u_int8_t bundle;
u_int16_t proto;
+ u_int8_t flags;
};
#define LS_COOKIE_ID 0x54
@@ -156,6 +448,7 @@ static struct tok juniper_protocol_values[] = {
int ip_heuristic_guess(register const u_char *, u_int);
int juniper_ppp_heuristic_guess(register const u_char *, u_int);
+int juniper_read_tlv_value(const u_char *, u_int, u_int);
static int juniper_parse_header (const u_char *, const struct pcap_pkthdr *, struct juniper_l2info_t *);
#ifdef DLT_JUNIPER_GGSN
@@ -178,13 +471,14 @@ juniper_ggsn_print(const struct pcap_pkthdr *h, register const u_char *p)
return l2info.header_len;
p+=l2info.header_len;
- gh = (struct juniper_ggsn_header *)p;
+ gh = (struct juniper_ggsn_header *)&l2info.cookie;
- if (eflag)
+ if (eflag) {
printf("proto %s (%u), vlan %u: ",
tok2str(juniper_protocol_values,"Unknown",gh->proto),
gh->proto,
EXTRACT_16BITS(&gh->vlan_id[0]));
+ }
switch (gh->proto) {
case JUNIPER_PROTO_IPV4:
@@ -256,8 +550,8 @@ juniper_es_print(const struct pcap_pkthdr *h, register const u_char *p)
tok2str(juniper_ipsec_type_values,"Unknown",ih->type),
ih->type,
EXTRACT_32BITS(&ih->spi),
- ipaddr_string(EXTRACT_32BITS(&ih->src_ip)),
- ipaddr_string(EXTRACT_32BITS(&ih->dst_ip)),
+ ipaddr_string(&ih->src_ip),
+ ipaddr_string(&ih->dst_ip),
l2info.length);
} else {
printf("ES SA, index %u, ttl %u type %s (%u), length %u\n",
@@ -790,14 +1084,63 @@ ip_heuristic_guess(register const u_char *p, u_int length) {
return 1; /* we printed an v4/v6 packet */
}
+int
+juniper_read_tlv_value(const u_char *p, u_int tlv_type, u_int tlv_len) {
+
+ int tlv_value;
+
+ /* TLVs < 128 are little endian encoded */
+ if (tlv_type < 128) {
+ switch (tlv_len) {
+ case 1:
+ tlv_value = *p;
+ break;
+ case 2:
+ tlv_value = EXTRACT_LE_16BITS(p);
+ break;
+ case 3:
+ tlv_value = EXTRACT_LE_24BITS(p);
+ break;
+ case 4:
+ tlv_value = EXTRACT_LE_32BITS(p);
+ break;
+ default:
+ tlv_value = -1;
+ break;
+ }
+ } else {
+ /* TLVs >= 128 are big endian encoded */
+ switch (tlv_len) {
+ case 1:
+ tlv_value = *p;
+ break;
+ case 2:
+ tlv_value = EXTRACT_16BITS(p);
+ break;
+ case 3:
+ tlv_value = EXTRACT_24BITS(p);
+ break;
+ case 4:
+ tlv_value = EXTRACT_32BITS(p);
+ break;
+ default:
+ tlv_value = -1;
+ break;
+ }
+ }
+ return tlv_value;
+}
+
static int
juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct juniper_l2info_t *l2info) {
struct juniper_cookie_table_t *lp = juniper_cookie_table;
- u_int idx, offset;
-#ifdef DLT_JUNIPER_ATM2
+ u_int idx, jnx_ext_len, jnx_header_len = 0;
+ u_int8_t tlv_type,tlv_len;
u_int32_t control_word;
-#endif
+ int tlv_value;
+ const u_char *tptr;
+
l2info->header_len = 0;
l2info->cookie_len = 0;
@@ -806,9 +1149,10 @@ juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct junip
l2info->length = h->len;
l2info->caplen = h->caplen;
+ TCHECK2(p[0],4);
+ l2info->flags = p[3];
l2info->direction = p[3]&JUNIPER_BPF_PKT_IN;
- TCHECK2(p[0],4);
if (EXTRACT_24BITS(p) != JUNIPER_MGC_NUMBER) { /* magic number found ? */
printf("no magic-number found!");
return 0;
@@ -817,15 +1161,92 @@ juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct junip
if (eflag) /* print direction */
printf("%3s ",tok2str(juniper_direction_values,"---",l2info->direction));
+ /* magic number + flags */
+ jnx_header_len = 4;
+
+ if (vflag>1)
+ printf("\n\tJuniper PCAP Flags [%s]",
+ bittok2str(jnx_flag_values, "none", l2info->flags));
+
/* extensions present ? - calculate how much bytes to skip */
- if ((p[3] & JUNIPER_BPF_EXT ) == JUNIPER_BPF_EXT ) {
- offset = 6 + EXTRACT_16BITS(p+4);
- if (eflag>1)
- printf("ext-len %u, ",EXTRACT_16BITS(p+4));
- } else
- offset = 4;
-
- if ((p[3] & JUNIPER_BPF_NO_L2 ) == JUNIPER_BPF_NO_L2 ) {
+ if ((l2info->flags & JUNIPER_BPF_EXT ) == JUNIPER_BPF_EXT ) {
+
+ tptr = p+jnx_header_len;
+
+ /* ok to read extension length ? */
+ TCHECK2(tptr[0], 2);
+ jnx_ext_len = EXTRACT_16BITS(tptr);
+ jnx_header_len += 2;
+ tptr +=2;
+
+ /* nail up the total length -
+ * just in case something goes wrong
+ * with TLV parsing */
+ jnx_header_len += jnx_ext_len;
+
+ if (vflag>1)
+ printf(", PCAP Extension(s) total length %u",
+ jnx_ext_len);
+
+ TCHECK2(tptr[0], jnx_ext_len);
+ while (jnx_ext_len > JUNIPER_EXT_TLV_OVERHEAD) {
+ tlv_type = *(tptr++);
+ tlv_len = *(tptr++);
+ tlv_value = 0;
+
+ /* sanity check */
+ if (tlv_type == 0 || tlv_len == 0)
+ break;
+
+ if (vflag>1)
+ printf("\n\t %s Extension TLV #%u, length %u, value ",
+ tok2str(jnx_ext_tlv_values,"Unknown",tlv_type),
+ tlv_type,
+ tlv_len);
+
+ tlv_value = juniper_read_tlv_value(tptr, tlv_type, tlv_len);
+ switch (tlv_type) {
+ case JUNIPER_EXT_TLV_IFD_NAME:
+ /* FIXME */
+ break;
+ case JUNIPER_EXT_TLV_IFD_MEDIATYPE:
+ case JUNIPER_EXT_TLV_TTP_IFD_MEDIATYPE:
+ if (tlv_value != -1) {
+ if (vflag>1)
+ printf("%s (%u)",
+ tok2str(juniper_ifmt_values, "Unknown", tlv_value),
+ tlv_value);
+ }
+ break;
+ case JUNIPER_EXT_TLV_IFL_ENCAPS:
+ case JUNIPER_EXT_TLV_TTP_IFL_ENCAPS:
+ if (tlv_value != -1) {
+ if (vflag>1)
+ printf("%s (%u)",
+ tok2str(juniper_ifle_values, "Unknown", tlv_value),
+ tlv_value);
+ }
+ break;
+ case JUNIPER_EXT_TLV_IFL_IDX: /* fall through */
+ case JUNIPER_EXT_TLV_IFL_UNIT:
+ case JUNIPER_EXT_TLV_IFD_IDX:
+ default:
+ if (tlv_value != -1) {
+ if (vflag>1)
+ printf("%u",tlv_value);
+ }
+ break;
+ }
+
+ tptr+=tlv_len;
+ jnx_ext_len -= tlv_len+JUNIPER_EXT_TLV_OVERHEAD;
+ }
+
+ if (vflag>1)
+ printf("\n\t-----original packet-----\n\t");
+ }
+
+ if ((l2info->flags & JUNIPER_BPF_NO_L2 ) == JUNIPER_BPF_NO_L2 ) {
if (eflag)
printf("no-L2-hdr, ");
@@ -833,15 +1254,15 @@ juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct junip
* perform the v4/v6 heuristics
* to figure out what it is
*/
- TCHECK2(p[offset+4],1);
- if(ip_heuristic_guess(p+offset+4,l2info->length-(offset+4)) == 0)
+ TCHECK2(p[jnx_header_len+4],1);
+ if(ip_heuristic_guess(p+jnx_header_len+4,l2info->length-(jnx_header_len+4)) == 0)
printf("no IP-hdr found!");
- l2info->header_len=offset+4;
+ l2info->header_len=jnx_header_len+4;
return 0; /* stop parsing the output further */
}
- l2info->header_len = offset;
+ l2info->header_len = jnx_header_len;
p+=l2info->header_len;
l2info->length -= l2info->header_len;
l2info->caplen -= l2info->header_len;
@@ -988,6 +1409,10 @@ juniper_parse_header (const u_char *p, const struct pcap_pkthdr *h, struct junip
}
break;
#endif
+#ifdef DLT_JUNIPER_GGSN
+ case DLT_JUNIPER_GGSN:
+ break;
+#endif
#ifdef DLT_JUNIPER_ATM1
case DLT_JUNIPER_ATM1:
break;
diff --git a/contrib/tcpdump/print-krb.c b/contrib/tcpdump/print-krb.c
index d6c8e14..213db64 100644
--- a/contrib/tcpdump/print-krb.c
+++ b/contrib/tcpdump/print-krb.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-krb.c,v 1.23 2003/11/16 09:36:26 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-krb.c,v 1.23 2003-11-16 09:36:26 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-l2tp.c b/contrib/tcpdump/print-l2tp.c
index 6ceab43..55c21251 100644
--- a/contrib/tcpdump/print-l2tp.c
+++ b/contrib/tcpdump/print-l2tp.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-l2tp.c,v 1.17.2.3 2006/06/23 02:07:27 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-l2tp.c,v 1.20 2006-06-23 02:03:09 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-lane.c b/contrib/tcpdump/print-lane.c
index 1c3c2c2..33723aa 100644
--- a/contrib/tcpdump/print-lane.c
+++ b/contrib/tcpdump/print-lane.c
@@ -22,7 +22,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.23.2.2 2005/11/13 12:12:59 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-lane.c,v 1.25 2005-11-13 12:12:42 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-ldp.c b/contrib/tcpdump/print-ldp.c
index 3280d8c..de3b34e 100644
--- a/contrib/tcpdump/print-ldp.c
+++ b/contrib/tcpdump/print-ldp.c
@@ -16,7 +16,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.8.2.10 2007/02/26 13:31:33 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ldp.c,v 1.20 2006-06-23 02:03:09 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -33,9 +33,9 @@ static const char rcsid[] _U_ =
#include "decode_prefix.h"
#include "extract.h"
#include "addrtoname.h"
-#include "af.h"
#include "l2vpn.h"
+#include "af.h"
/*
* ldp common header
@@ -131,6 +131,7 @@ static const struct tok ldp_msg_values[] = {
#define LDP_TLV_FEC 0x0100
#define LDP_TLV_ADDRESS_LIST 0x0101
+#define LDP_TLV_ADDRESS_LIST_AFNUM_LEN 2
#define LDP_TLV_HOP_COUNT 0x0103
#define LDP_TLV_PATH_VECTOR 0x0104
#define LDP_TLV_GENERIC_LABEL 0x0200
@@ -149,6 +150,7 @@ static const struct tok ldp_msg_values[] = {
#define LDP_TLV_FR_SESSION_PARM 0x0502
#define LDP_TLV_FT_SESSION 0x0503
#define LDP_TLV_LABEL_REQUEST_MSG_ID 0x0600
+#define LDP_TLV_MTU 0x0601 /* rfc 3988 */
static const struct tok ldp_tlv_values[] = {
{ LDP_TLV_FEC, "FEC" },
@@ -171,6 +173,7 @@ static const struct tok ldp_tlv_values[] = {
{ LDP_TLV_FR_SESSION_PARM, "Frame-Relay Session Parameters" },
{ LDP_TLV_FT_SESSION, "Fault-Tolerant Session Parameters" },
{ LDP_TLV_LABEL_REQUEST_MSG_ID, "Label Request Message ID" },
+ { LDP_TLV_MTU, "MTU" },
{ 0, NULL}
};
@@ -215,8 +218,6 @@ static const struct tok ldp_fec_martini_ifparm_vccv_cv_values[] = {
{ 0, NULL}
};
-#define AFNUM_LEN 2
-
int ldp_msg_print(register const u_char *);
int ldp_tlv_print(register const u_char *);
@@ -292,27 +293,31 @@ ldp_tlv_print(register const u_char *tptr) {
case LDP_TLV_ADDRESS_LIST:
af = EXTRACT_16BITS(tptr);
- tptr+=AFNUM_LEN;
- tlv_tlen -= AFNUM_LEN;
- printf("\n\t Address Family: ");
- if (af == AFNUM_INET) {
- printf("IPv4, addresses:");
+ tptr+=LDP_TLV_ADDRESS_LIST_AFNUM_LEN;
+ tlv_tlen -= LDP_TLV_ADDRESS_LIST_AFNUM_LEN;
+ printf("\n\t Address Family: %s, addresses",
+ tok2str(af_values, "Unknown (%u)", af));
+ switch (af) {
+ case AFNUM_INET:
while(tlv_tlen >= sizeof(struct in_addr)) {
printf(" %s",ipaddr_string(tptr));
tlv_tlen-=sizeof(struct in_addr);
tptr+=sizeof(struct in_addr);
}
- }
+ break;
#ifdef INET6
- else if (af == AFNUM_INET6) {
- printf("IPv6, addresses:");
+ case AFNUM_INET6:
while(tlv_tlen >= sizeof(struct in6_addr)) {
printf(" %s",ip6addr_string(tptr));
tlv_tlen-=sizeof(struct in6_addr);
tptr+=sizeof(struct in6_addr);
}
- }
+ break;
#endif
+ default:
+ /* unknown AF */
+ break;
+ }
break;
case LDP_TLV_COMMON_SESSION:
@@ -450,6 +455,10 @@ ldp_tlv_print(register const u_char *tptr) {
printf(", Recovery Time: %ums", ui);
break;
+ case LDP_TLV_MTU:
+ printf("\n\t MTU: %u", EXTRACT_16BITS(tptr));
+ break;
+
/*
* FIXME those are the defined TLVs that lack a decoder
diff --git a/contrib/tcpdump/print-llc.c b/contrib/tcpdump/print-llc.c
index 8ffd289..315704c 100644
--- a/contrib/tcpdump/print-llc.c
+++ b/contrib/tcpdump/print-llc.c
@@ -26,7 +26,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.61.2.10 2007/02/08 07:07:51 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.75 2007-04-13 09:43:11 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -107,6 +107,8 @@ static const struct tok cisco_values[] = {
{ PID_CISCO_CDP, "CDP" },
{ PID_CISCO_VTP, "VTP" },
{ PID_CISCO_DTP, "DTP" },
+ { PID_CISCO_UDLD, "UDLD" },
+ { PID_CISCO_PVST, "PVST" },
{ 0, NULL }
};
@@ -443,11 +445,25 @@ snap_print(const u_char *p, u_int length, u_int caplen,
break;
case OUI_CISCO:
- if (et == PID_CISCO_CDP) {
- cdp_print(p, length, caplen);
- return (1);
- }
- break;
+ switch (et) {
+ case PID_CISCO_CDP:
+ cdp_print(p, length, caplen);
+ return (1);
+ case PID_CISCO_DTP:
+ dtp_print(p, length);
+ return (1);
+ case PID_CISCO_UDLD:
+ udld_print(p, length);
+ return (1);
+ case PID_CISCO_VTP:
+ vtp_print(p, length);
+ return (1);
+ case PID_CISCO_PVST:
+ stp_print(p, length);
+ return (1);
+ default:
+ break;
+ }
case OUI_RFC2684:
switch (et) {
diff --git a/contrib/tcpdump/print-lldp.c b/contrib/tcpdump/print-lldp.c
new file mode 100644
index 0000000..36b9934
--- /dev/null
+++ b/contrib/tcpdump/print-lldp.c
@@ -0,0 +1,1107 @@
+/*
+ * Copyright (c) 1998-2007 The TCPDUMP project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * support for the IEEE Link Discovery Protocol as per 802.1ab
+ *
+ * Original code by Hannes Gredler (hannes@juniper.net)
+ * IEEE and TIA extensions by Carles Kishimoto <carles.kishimoto@gmail.com>
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+"@(#) $Header: /tcpdump/master/tcpdump/print-lldp.c,v 1.7.2.3 2008-03-20 09:33:52 hannes Exp $";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "interface.h"
+#include "extract.h"
+#include "addrtoname.h"
+#include "af.h"
+#include "oui.h"
+
+#define LLDP_EXTRACT_TYPE(x) (((x)&0xfe00)>>9)
+#define LLDP_EXTRACT_LEN(x) ((x)&0x01ff)
+
+/*
+ * TLV type codes
+ */
+#define LLDP_END_TLV 0
+#define LLDP_CHASSIS_ID_TLV 1
+#define LLDP_PORT_ID_TLV 2
+#define LLDP_TTL_TLV 3
+#define LLDP_PORT_DESCR_TLV 4
+#define LLDP_SYSTEM_NAME_TLV 5
+#define LLDP_SYSTEM_DESCR_TLV 6
+#define LLDP_SYSTEM_CAP_TLV 7
+#define LLDP_MGMT_ADDR_TLV 8
+#define LLDP_PRIVATE_TLV 127
+
+static const struct tok lldp_tlv_values[] = {
+ { LLDP_END_TLV, "End" },
+ { LLDP_CHASSIS_ID_TLV, "Chassis ID" },
+ { LLDP_PORT_ID_TLV, "Port ID" },
+ { LLDP_TTL_TLV, "Time to Live" },
+ { LLDP_PORT_DESCR_TLV, "Port Description" },
+ { LLDP_SYSTEM_NAME_TLV, "System Name" },
+ { LLDP_SYSTEM_DESCR_TLV, "System Description" },
+ { LLDP_SYSTEM_CAP_TLV, "System Capabilities" },
+ { LLDP_MGMT_ADDR_TLV, "Management Address" },
+ { LLDP_PRIVATE_TLV, "Organization specific" },
+ { 0, NULL}
+};
+
+/*
+ * Chassis ID subtypes
+ */
+#define LLDP_CHASSIS_CHASSIS_COMP_SUBTYPE 1
+#define LLDP_CHASSIS_INTF_ALIAS_SUBTYPE 2
+#define LLDP_CHASSIS_PORT_COMP_SUBTYPE 3
+#define LLDP_CHASSIS_MAC_ADDR_SUBTYPE 4
+#define LLDP_CHASSIS_NETWORK_ADDR_SUBTYPE 5
+#define LLDP_CHASSIS_INTF_NAME_SUBTYPE 6
+#define LLDP_CHASSIS_LOCAL_SUBTYPE 7
+
+static const struct tok lldp_chassis_subtype_values[] = {
+ { LLDP_CHASSIS_CHASSIS_COMP_SUBTYPE, "Chassis component"},
+ { LLDP_CHASSIS_INTF_ALIAS_SUBTYPE, "Interface alias"},
+ { LLDP_CHASSIS_PORT_COMP_SUBTYPE, "Port component"},
+ { LLDP_CHASSIS_MAC_ADDR_SUBTYPE, "MAC address"},
+ { LLDP_CHASSIS_NETWORK_ADDR_SUBTYPE, "Network address"},
+ { LLDP_CHASSIS_INTF_NAME_SUBTYPE, "Interface name"},
+ { LLDP_CHASSIS_LOCAL_SUBTYPE, "Local"},
+ { 0, NULL}
+};
+
+/*
+ * Port ID subtypes
+ */
+#define LLDP_PORT_INTF_ALIAS_SUBTYPE 1
+#define LLDP_PORT_PORT_COMP_SUBTYPE 2
+#define LLDP_PORT_MAC_ADDR_SUBTYPE 3
+#define LLDP_PORT_NETWORK_ADDR_SUBTYPE 4
+#define LLDP_PORT_INTF_NAME_SUBTYPE 5
+#define LLDP_PORT_AGENT_CIRC_ID_SUBTYPE 6
+#define LLDP_PORT_LOCAL_SUBTYPE 7
+
+static const struct tok lldp_port_subtype_values[] = {
+ { LLDP_PORT_INTF_ALIAS_SUBTYPE, "Interface alias"},
+ { LLDP_PORT_PORT_COMP_SUBTYPE, "Port component"},
+ { LLDP_PORT_MAC_ADDR_SUBTYPE, "MAC address"},
+ { LLDP_PORT_NETWORK_ADDR_SUBTYPE, "Network Address"},
+ { LLDP_PORT_INTF_NAME_SUBTYPE, "Interface Name"},
+ { LLDP_PORT_AGENT_CIRC_ID_SUBTYPE, "Agent circuit ID"},
+ { LLDP_PORT_LOCAL_SUBTYPE, "Local"},
+ { 0, NULL}
+};
+
+/*
+ * System Capabilities
+ */
+#define LLDP_CAP_OTHER (1 << 0)
+#define LLDP_CAP_REPEATER (1 << 1)
+#define LLDP_CAP_BRIDGE (1 << 2)
+#define LLDP_CAP_WLAN_AP (1 << 3)
+#define LLDP_CAP_ROUTER (1 << 4)
+#define LLDP_CAP_PHONE (1 << 5)
+#define LLDP_CAP_DOCSIS (1 << 6)
+#define LLDP_CAP_STATION_ONLY (1 << 7)
+
+static const struct tok lldp_cap_values[] = {
+ { LLDP_CAP_OTHER, "Other"},
+ { LLDP_CAP_REPEATER, "Repeater"},
+ { LLDP_CAP_BRIDGE, "Bridge"},
+ { LLDP_CAP_WLAN_AP, "WLAN AP"},
+ { LLDP_CAP_ROUTER, "Router"},
+ { LLDP_CAP_PHONE, "Telephone"},
+ { LLDP_CAP_DOCSIS, "Docsis"},
+ { LLDP_CAP_STATION_ONLY, "Station Only"},
+ { 0, NULL}
+};
+
+#define LLDP_PRIVATE_8021_SUBTYPE_PORT_VLAN_ID 1
+#define LLDP_PRIVATE_8021_SUBTYPE_PROTOCOL_VLAN_ID 2
+#define LLDP_PRIVATE_8021_SUBTYPE_VLAN_NAME 3
+#define LLDP_PRIVATE_8021_SUBTYPE_PROTOCOL_IDENTITY 4
+
+static const struct tok lldp_8021_subtype_values[] = {
+ { LLDP_PRIVATE_8021_SUBTYPE_PORT_VLAN_ID, "Port VLAN Id"},
+ { LLDP_PRIVATE_8021_SUBTYPE_PROTOCOL_VLAN_ID, "Port and Protocol VLAN ID"},
+ { LLDP_PRIVATE_8021_SUBTYPE_VLAN_NAME, "VLAN name"},
+ { LLDP_PRIVATE_8021_SUBTYPE_PROTOCOL_IDENTITY, "Protocol Identity"},
+ { 0, NULL}
+};
+
+#define LLDP_8021_PORT_PROTOCOL_VLAN_SUPPORT (1 << 1)
+#define LLDP_8021_PORT_PROTOCOL_VLAN_STATUS (1 << 2)
+
+static const struct tok lldp_8021_port_protocol_id_values[] = {
+ { LLDP_8021_PORT_PROTOCOL_VLAN_SUPPORT, "supported"},
+ { LLDP_8021_PORT_PROTOCOL_VLAN_STATUS, "enabled"},
+ { 0, NULL}
+};
+
+#define LLDP_PRIVATE_8023_SUBTYPE_MACPHY 1
+#define LLDP_PRIVATE_8023_SUBTYPE_MDIPOWER 2
+#define LLDP_PRIVATE_8023_SUBTYPE_LINKAGGR 3
+#define LLDP_PRIVATE_8023_SUBTYPE_MTU 4
+
+static const struct tok lldp_8023_subtype_values[] = {
+ { LLDP_PRIVATE_8023_SUBTYPE_MACPHY, "MAC/PHY configuration/status"},
+ { LLDP_PRIVATE_8023_SUBTYPE_MDIPOWER, "Power via MDI"},
+ { LLDP_PRIVATE_8023_SUBTYPE_LINKAGGR, "Link aggregation"},
+ { LLDP_PRIVATE_8023_SUBTYPE_MTU, "Max frame size"},
+ { 0, NULL}
+};
+
+#define LLDP_PRIVATE_TIA_SUBTYPE_CAPABILITIES 1
+#define LLDP_PRIVATE_TIA_SUBTYPE_NETWORK_POLICY 2
+#define LLDP_PRIVATE_TIA_SUBTYPE_LOCAL_ID 3
+#define LLDP_PRIVATE_TIA_SUBTYPE_EXTENDED_POWER_MDI 4
+#define LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_HARDWARE_REV 5
+#define LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_FIRMWARE_REV 6
+#define LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SOFTWARE_REV 7
+#define LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SERIAL_NUMBER 8
+#define LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MANUFACTURER_NAME 9
+#define LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MODEL_NAME 10
+#define LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_ASSET_ID 11
+
+static const struct tok lldp_tia_subtype_values[] = {
+ { LLDP_PRIVATE_TIA_SUBTYPE_CAPABILITIES, "LLDP-MED Capabilities" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_NETWORK_POLICY, "Network policy" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_LOCAL_ID, "Location identification" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_EXTENDED_POWER_MDI, "Extended power-via-MDI" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_HARDWARE_REV, "Inventory - hardware revision" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_FIRMWARE_REV, "Inventory - firmware revision" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SOFTWARE_REV, "Inventory - software revision" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SERIAL_NUMBER, "Inventory - serial number" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MANUFACTURER_NAME, "Inventory - manufacturer name" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MODEL_NAME, "Inventory - model name" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_ASSET_ID, "Inventory - asset ID" },
+ { 0, NULL}
+};
+
+#define LLDP_PRIVATE_TIA_LOCATION_ALTITUDE_METERS 1
+#define LLDP_PRIVATE_TIA_LOCATION_ALTITUDE_FLOORS 2
+
+static const struct tok lldp_tia_location_altitude_type_values[] = {
+ { LLDP_PRIVATE_TIA_LOCATION_ALTITUDE_METERS, "meters"},
+ { LLDP_PRIVATE_TIA_LOCATION_ALTITUDE_FLOORS, "floors"},
+ { 0, NULL}
+};
+
+/* ANSI/TIA-1057 - Annex B */
+#define LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A1 1
+#define LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A2 2
+#define LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A3 3
+#define LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A4 4
+#define LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A5 5
+#define LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A6 6
+
+static const struct tok lldp_tia_location_lci_catype_values[] = {
+ { LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A1, "national subdivisions (state,canton,region,province,prefecture)"},
+ { LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A2, "county, parish, gun, district"},
+ { LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A3, "city, township, shi"},
+ { LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A4, "city division, borough, city district, ward chou"},
+ { LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A5, "neighborhood, block"},
+ { LLDP_PRIVATE_TIA_LOCATION_LCI_CATYPE_A6, "street"},
+ { 0, NULL}
+};
+
+static const struct tok lldp_tia_location_lci_what_values[] = {
+ { 0, "location of DHCP server"},
+ { 1, "location of the network element believed to be closest to the client"},
+ { 2, "location of the client"},
+ { 0, NULL}
+};
+
+/*
+ * From RFC 3636 - dot3MauType
+ */
+#define LLDP_MAU_TYPE_UNKNOWN 0
+#define LLDP_MAU_TYPE_AUI 1
+#define LLDP_MAU_TYPE_10BASE_5 2
+#define LLDP_MAU_TYPE_FOIRL 3
+#define LLDP_MAU_TYPE_10BASE_2 4
+#define LLDP_MAU_TYPE_10BASE_T 5
+#define LLDP_MAU_TYPE_10BASE_FP 6
+#define LLDP_MAU_TYPE_10BASE_FB 7
+#define LLDP_MAU_TYPE_10BASE_FL 8
+#define LLDP_MAU_TYPE_10BROAD36 9
+#define LLDP_MAU_TYPE_10BASE_T_HD 10
+#define LLDP_MAU_TYPE_10BASE_T_FD 11
+#define LLDP_MAU_TYPE_10BASE_FL_HD 12
+#define LLDP_MAU_TYPE_10BASE_FL_FD 13
+#define LLDP_MAU_TYPE_100BASE_T4 14
+#define LLDP_MAU_TYPE_100BASE_TX_HD 15
+#define LLDP_MAU_TYPE_100BASE_TX_FD 16
+#define LLDP_MAU_TYPE_100BASE_FX_HD 17
+#define LLDP_MAU_TYPE_100BASE_FX_FD 18
+#define LLDP_MAU_TYPE_100BASE_T2_HD 19
+#define LLDP_MAU_TYPE_100BASE_T2_FD 20
+#define LLDP_MAU_TYPE_1000BASE_X_HD 21
+#define LLDP_MAU_TYPE_1000BASE_X_FD 22
+#define LLDP_MAU_TYPE_1000BASE_LX_HD 23
+#define LLDP_MAU_TYPE_1000BASE_LX_FD 24
+#define LLDP_MAU_TYPE_1000BASE_SX_HD 25
+#define LLDP_MAU_TYPE_1000BASE_SX_FD 26
+#define LLDP_MAU_TYPE_1000BASE_CX_HD 27
+#define LLDP_MAU_TYPE_1000BASE_CX_FD 28
+#define LLDP_MAU_TYPE_1000BASE_T_HD 29
+#define LLDP_MAU_TYPE_1000BASE_T_FD 30
+#define LLDP_MAU_TYPE_10GBASE_X 31
+#define LLDP_MAU_TYPE_10GBASE_LX4 32
+#define LLDP_MAU_TYPE_10GBASE_R 33
+#define LLDP_MAU_TYPE_10GBASE_ER 34
+#define LLDP_MAU_TYPE_10GBASE_LR 35
+#define LLDP_MAU_TYPE_10GBASE_SR 36
+#define LLDP_MAU_TYPE_10GBASE_W 37
+#define LLDP_MAU_TYPE_10GBASE_EW 38
+#define LLDP_MAU_TYPE_10GBASE_LW 39
+#define LLDP_MAU_TYPE_10GBASE_SW 40
+
+static const struct tok lldp_mau_types_values[] = {
+ { LLDP_MAU_TYPE_UNKNOWN, "Unknown"},
+ { LLDP_MAU_TYPE_AUI, "AUI"},
+ { LLDP_MAU_TYPE_10BASE_5, "10BASE_5"},
+ { LLDP_MAU_TYPE_FOIRL, "FOIRL"},
+ { LLDP_MAU_TYPE_10BASE_2, "10BASE2"},
+ { LLDP_MAU_TYPE_10BASE_T, "10BASET duplex mode unknown"},
+ { LLDP_MAU_TYPE_10BASE_FP, "10BASEFP"},
+ { LLDP_MAU_TYPE_10BASE_FB, "10BASEFB"},
+ { LLDP_MAU_TYPE_10BASE_FL, "10BASEFL duplex mode unknown"},
+ { LLDP_MAU_TYPE_10BROAD36, "10BROAD36"},
+ { LLDP_MAU_TYPE_10BASE_T_HD, "10BASET hdx"},
+ { LLDP_MAU_TYPE_10BASE_T_FD, "10BASET fdx"},
+ { LLDP_MAU_TYPE_10BASE_FL_HD, "10BASEFL hdx"},
+ { LLDP_MAU_TYPE_10BASE_FL_FD, "10BASEFL fdx"},
+ { LLDP_MAU_TYPE_100BASE_T4, "100BASET4"},
+ { LLDP_MAU_TYPE_100BASE_TX_HD, "100BASETX hdx"},
+ { LLDP_MAU_TYPE_100BASE_TX_FD, "100BASETX fdx"},
+ { LLDP_MAU_TYPE_100BASE_FX_HD, "100BASEFX hdx"},
+ { LLDP_MAU_TYPE_100BASE_FX_FD, "100BASEFX fdx"},
+ { LLDP_MAU_TYPE_100BASE_T2_HD, "100BASET2 hdx"},
+ { LLDP_MAU_TYPE_100BASE_T2_FD, "100BASET2 fdx"},
+ { LLDP_MAU_TYPE_1000BASE_X_HD, "1000BASEX hdx"},
+ { LLDP_MAU_TYPE_1000BASE_X_FD, "1000BASEX fdx"},
+ { LLDP_MAU_TYPE_1000BASE_LX_HD, "1000BASELX hdx"},
+ { LLDP_MAU_TYPE_1000BASE_LX_FD, "1000BASELX fdx"},
+ { LLDP_MAU_TYPE_1000BASE_SX_HD, "1000BASESX hdx"},
+ { LLDP_MAU_TYPE_1000BASE_SX_FD, "1000BASESX fdx"},
+ { LLDP_MAU_TYPE_1000BASE_CX_HD, "1000BASECX hdx"},
+ { LLDP_MAU_TYPE_1000BASE_CX_FD, "1000BASECX fdx"},
+ { LLDP_MAU_TYPE_1000BASE_T_HD, "1000BASET hdx"},
+ { LLDP_MAU_TYPE_1000BASE_T_FD, "1000BASET fdx"},
+ { LLDP_MAU_TYPE_10GBASE_X, "10GBASEX"},
+ { LLDP_MAU_TYPE_10GBASE_LX4, "10GBASELX4"},
+ { LLDP_MAU_TYPE_10GBASE_R, "10GBASER"},
+ { LLDP_MAU_TYPE_10GBASE_ER, "10GBASEER"},
+ { LLDP_MAU_TYPE_10GBASE_LR, "10GBASELR"},
+ { LLDP_MAU_TYPE_10GBASE_SR, "10GBASESR"},
+ { LLDP_MAU_TYPE_10GBASE_W, "10GBASEW"},
+ { LLDP_MAU_TYPE_10GBASE_EW, "10GBASEEW"},
+ { LLDP_MAU_TYPE_10GBASE_LW, "10GBASELW"},
+ { LLDP_MAU_TYPE_10GBASE_SW, "10GBASESW"},
+ { 0, NULL}
+};
+
+#define LLDP_8023_AUTONEGOTIATION_SUPPORT (1 << 0)
+#define LLDP_8023_AUTONEGOTIATION_STATUS (1 << 1)
+
+static const struct tok lldp_8023_autonegotiation_values[] = {
+ { LLDP_8023_AUTONEGOTIATION_SUPPORT, "supported"},
+ { LLDP_8023_AUTONEGOTIATION_STATUS, "enabled"},
+ { 0, NULL}
+};
+
+#define LLDP_TIA_CAPABILITY_MED (1 << 0)
+#define LLDP_TIA_CAPABILITY_NETWORK_POLICY (1 << 1)
+#define LLDP_TIA_CAPABILITY_LOCATION_IDENTIFICATION (1 << 2)
+#define LLDP_TIA_CAPABILITY_EXTENDED_POWER_MDI_PSE (1 << 3)
+#define LLDP_TIA_CAPABILITY_EXTENDED_POWER_MDI_PD (1 << 4)
+#define LLDP_TIA_CAPABILITY_INVENTORY (1 << 5)
+
+static const struct tok lldp_tia_capabilities_values[] = {
+ { LLDP_TIA_CAPABILITY_MED, "LLDP-MED capabilities"},
+ { LLDP_TIA_CAPABILITY_NETWORK_POLICY, "network policy"},
+ { LLDP_TIA_CAPABILITY_LOCATION_IDENTIFICATION, "location identification"},
+ { LLDP_TIA_CAPABILITY_EXTENDED_POWER_MDI_PSE, "extended power via MDI-PSE"},
+ { LLDP_TIA_CAPABILITY_EXTENDED_POWER_MDI_PD, "extended power via MDI-PD"},
+ { LLDP_TIA_CAPABILITY_INVENTORY, "Inventory"},
+ { 0, NULL}
+};
+
+#define LLDP_TIA_DEVICE_TYPE_ENDPOINT_CLASS_1 1
+#define LLDP_TIA_DEVICE_TYPE_ENDPOINT_CLASS_2 2
+#define LLDP_TIA_DEVICE_TYPE_ENDPOINT_CLASS_3 3
+#define LLDP_TIA_DEVICE_TYPE_NETWORK_CONNECTIVITY 4
+
+static const struct tok lldp_tia_device_type_values[] = {
+ { LLDP_TIA_DEVICE_TYPE_ENDPOINT_CLASS_1, "endpoint class 1"},
+ { LLDP_TIA_DEVICE_TYPE_ENDPOINT_CLASS_2, "endpoint class 2"},
+ { LLDP_TIA_DEVICE_TYPE_ENDPOINT_CLASS_3, "endpoint class 3"},
+ { LLDP_TIA_DEVICE_TYPE_NETWORK_CONNECTIVITY, "network connectivity"},
+ { 0, NULL}
+};
+
+#define LLDP_TIA_APPLICATION_TYPE_VOICE 1
+#define LLDP_TIA_APPLICATION_TYPE_VOICE_SIGNALING 2
+#define LLDP_TIA_APPLICATION_TYPE_GUEST_VOICE 3
+#define LLDP_TIA_APPLICATION_TYPE_GUEST_VOICE_SIGNALING 4
+#define LLDP_TIA_APPLICATION_TYPE_SOFTPHONE_VOICE 5
+#define LLDP_TIA_APPLICATION_TYPE_VIDEO_CONFERENCING 6
+#define LLDP_TIA_APPLICATION_TYPE_STREAMING_VIDEO 7
+#define LLDP_TIA_APPLICATION_TYPE_VIDEO_SIGNALING 8
+
+static const struct tok lldp_tia_application_type_values[] = {
+ { LLDP_TIA_APPLICATION_TYPE_VOICE, "voice"},
+ { LLDP_TIA_APPLICATION_TYPE_VOICE_SIGNALING, "voice signaling"},
+ { LLDP_TIA_APPLICATION_TYPE_GUEST_VOICE, "guest voice"},
+ { LLDP_TIA_APPLICATION_TYPE_GUEST_VOICE_SIGNALING, "guest voice signaling"},
+ { LLDP_TIA_APPLICATION_TYPE_SOFTPHONE_VOICE, "softphone voice"},
+ { LLDP_TIA_APPLICATION_TYPE_VIDEO_CONFERENCING, "video conferencing"},
+ { LLDP_TIA_APPLICATION_TYPE_STREAMING_VIDEO, "streaming video"},
+ { LLDP_TIA_APPLICATION_TYPE_VIDEO_SIGNALING, "video signaling"},
+ { 0, NULL}
+};
+
+#define LLDP_TIA_NETWORK_POLICY_U_BIT (1 << 5)
+#define LLDP_TIA_NETWORK_POLICY_T_BIT (1 << 6)
+#define LLDP_TIA_NETWORK_POLICY_X_BIT (1 << 7)
+
+static const struct tok lldp_tia_network_policy_bits_values[] = {
+ { LLDP_TIA_NETWORK_POLICY_U_BIT, "Unknown"},
+ { LLDP_TIA_NETWORK_POLICY_T_BIT, "Tagged"},
+ { LLDP_TIA_NETWORK_POLICY_X_BIT, "reserved"},
+ { 0, NULL}
+};
+
+#define LLDP_EXTRACT_NETWORK_POLICY_VLAN(x) (((x)&0x1ffe)>>1)
+#define LLDP_EXTRACT_NETWORK_POLICY_L2_PRIORITY(x) (((x)&0x01ff)>>6)
+#define LLDP_EXTRACT_NETWORK_POLICY_DSCP(x) ((x)&0x003f)
+
+#define LLDP_TIA_LOCATION_DATA_FORMAT_COORDINATE_BASED 1
+#define LLDP_TIA_LOCATION_DATA_FORMAT_CIVIC_ADDRESS 2
+#define LLDP_TIA_LOCATION_DATA_FORMAT_ECS_ELIN 3
+
+static const struct tok lldp_tia_location_data_format_values[] = {
+ { LLDP_TIA_LOCATION_DATA_FORMAT_COORDINATE_BASED, "coordinate-based LCI"},
+ { LLDP_TIA_LOCATION_DATA_FORMAT_CIVIC_ADDRESS, "civic address LCI"},
+ { LLDP_TIA_LOCATION_DATA_FORMAT_ECS_ELIN, "ECS ELIN"},
+ { 0, NULL}
+};
+
+#define LLDP_TIA_LOCATION_DATUM_WGS_84 1
+#define LLDP_TIA_LOCATION_DATUM_NAD_83_NAVD_88 2
+#define LLDP_TIA_LOCATION_DATUM_NAD_83_MLLW 3
+
+static const struct tok lldp_tia_location_datum_type_values[] = {
+ { LLDP_TIA_LOCATION_DATUM_WGS_84, "World Geodesic System 1984"},
+ { LLDP_TIA_LOCATION_DATUM_NAD_83_NAVD_88, "North American Datum 1983 (NAVD88)"},
+ { LLDP_TIA_LOCATION_DATUM_NAD_83_MLLW, "North American Datum 1983 (MLLW)"},
+ { 0, NULL}
+};
+
+#define LLDP_TIA_POWER_SOURCE_PSE 1
+#define LLDP_TIA_POWER_SOURCE_LOCAL 2
+#define LLDP_TIA_POWER_SOURCE_PSE_AND_LOCAL 3
+
+static const struct tok lldp_tia_power_source_values[] = {
+ { LLDP_TIA_POWER_SOURCE_PSE, "PSE - primary power source"},
+ { LLDP_TIA_POWER_SOURCE_LOCAL, "local - backup power source"},
+ { LLDP_TIA_POWER_SOURCE_PSE_AND_LOCAL, "PSE+local - reserved"},
+ { 0, NULL}
+};
+
+#define LLDP_TIA_POWER_PRIORITY_CRITICAL 1
+#define LLDP_TIA_POWER_PRIORITY_HIGH 2
+#define LLDP_TIA_POWER_PRIORITY_LOW 3
+
+static const struct tok lldp_tia_power_priority_values[] = {
+ { LLDP_TIA_POWER_PRIORITY_CRITICAL, "critical"},
+ { LLDP_TIA_POWER_PRIORITY_HIGH, "high"},
+ { LLDP_TIA_POWER_PRIORITY_LOW, "low"},
+ { 0, NULL}
+};
+
+#define LLDP_TIA_POWER_VAL_MAX 1024
+
+static const struct tok lldp_tia_inventory_values[] = {
+ { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_HARDWARE_REV, "Hardware revision" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_FIRMWARE_REV, "Firmware revision" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SOFTWARE_REV, "Software revision" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SERIAL_NUMBER, "Serial number" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MANUFACTURER_NAME, "Manufacturer name" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MODEL_NAME, "Model name" },
+ { LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_ASSET_ID, "Asset ID" },
+ { 0, NULL}
+};
+
+/*
+ * From RFC 3636 - ifMauAutoNegCapAdvertisedBits
+ */
+#define LLDP_MAU_PMD_OTHER (1 << 15)
+#define LLDP_MAU_PMD_10BASE_T (1 << 14)
+#define LLDP_MAU_PMD_10BASE_T_FD (1 << 13)
+#define LLDP_MAU_PMD_100BASE_T4 (1 << 12)
+#define LLDP_MAU_PMD_100BASE_TX (1 << 11)
+#define LLDP_MAU_PMD_100BASE_TX_FD (1 << 10)
+#define LLDP_MAU_PMD_100BASE_T2 (1 << 9)
+#define LLDP_MAU_PMD_100BASE_T2_FD (1 << 8)
+#define LLDP_MAU_PMD_FDXPAUSE (1 << 7)
+#define LLDP_MAU_PMD_FDXAPAUSE (1 << 6)
+#define LLDP_MAU_PMD_FDXSPAUSE (1 << 5)
+#define LLDP_MAU_PMD_FDXBPAUSE (1 << 4)
+#define LLDP_MAU_PMD_1000BASE_X (1 << 3)
+#define LLDP_MAU_PMD_1000BASE_X_FD (1 << 2)
+#define LLDP_MAU_PMD_1000BASE_T (1 << 1)
+#define LLDP_MAU_PMD_1000BASE_T_FD (1 << 0)
+
+static const struct tok lldp_pmd_capability_values[] = {
+ { LLDP_MAU_PMD_10BASE_T, "10BASE-T hdx"},
+ { LLDP_MAU_PMD_10BASE_T_FD, "10BASE-T fdx"},
+ { LLDP_MAU_PMD_100BASE_T4, "100BASE-T4"},
+ { LLDP_MAU_PMD_100BASE_TX, "100BASE-TX hdx"},
+ { LLDP_MAU_PMD_100BASE_TX_FD, "100BASE-TX fdx"},
+ { LLDP_MAU_PMD_100BASE_T2, "100BASE-T2 hdx"},
+ { LLDP_MAU_PMD_100BASE_T2_FD, "100BASE-T2 fdx"},
+ { LLDP_MAU_PMD_FDXPAUSE, "Pause for fdx links"},
+ { LLDP_MAU_PMD_FDXAPAUSE, "Asym PAUSE for fdx"},
+ { LLDP_MAU_PMD_FDXSPAUSE, "Sym PAUSE for fdx"},
+ { LLDP_MAU_PMD_FDXBPAUSE, "Asym and Sym PAUSE for fdx"},
+ { LLDP_MAU_PMD_1000BASE_X, "1000BASE-{X LX SX CX} hdx"},
+ { LLDP_MAU_PMD_1000BASE_X_FD, "1000BASE-{X LX SX CX} fdx"},
+ { LLDP_MAU_PMD_1000BASE_T, "1000BASE-T hdx"},
+ { LLDP_MAU_PMD_1000BASE_T_FD, "1000BASE-T fdx"},
+ { 0, NULL}
+};
+
+#define LLDP_MDI_PORT_CLASS (1 << 0)
+#define LLDP_MDI_POWER_SUPPORT (1 << 1)
+#define LLDP_MDI_POWER_STATE (1 << 2)
+#define LLDP_MDI_PAIR_CONTROL_ABILITY (1 << 3)
+
+static const struct tok lldp_mdi_values[] = {
+ { LLDP_MDI_PORT_CLASS, "PSE"},
+ { LLDP_MDI_POWER_SUPPORT, "supported"},
+ { LLDP_MDI_POWER_STATE, "enabled"},
+ { LLDP_MDI_PAIR_CONTROL_ABILITY, "can be controlled"},
+ { 0, NULL}
+};
+
+#define LLDP_MDI_PSE_PORT_POWER_PAIRS_SIGNAL 1
+#define LLDP_MDI_PSE_PORT_POWER_PAIRS_SPARE 2
+
+static const struct tok lldp_mdi_power_pairs_values[] = {
+ { LLDP_MDI_PSE_PORT_POWER_PAIRS_SIGNAL, "signal"},
+ { LLDP_MDI_PSE_PORT_POWER_PAIRS_SPARE, "spare"},
+ { 0, NULL}
+};
+
+#define LLDP_MDI_POWER_CLASS0 1
+#define LLDP_MDI_POWER_CLASS1 2
+#define LLDP_MDI_POWER_CLASS2 3
+#define LLDP_MDI_POWER_CLASS3 4
+#define LLDP_MDI_POWER_CLASS4 5
+
+static const struct tok lldp_mdi_power_class_values[] = {
+ { LLDP_MDI_POWER_CLASS0, "class0"},
+ { LLDP_MDI_POWER_CLASS1, "class1"},
+ { LLDP_MDI_POWER_CLASS2, "class2"},
+ { LLDP_MDI_POWER_CLASS3, "class3"},
+ { LLDP_MDI_POWER_CLASS4, "class4"},
+ { 0, NULL}
+};
+
+#define LLDP_AGGREGATION_CAPABILTIY (1 << 0)
+#define LLDP_AGGREGATION_STATUS (1 << 1)
+
+static const struct tok lldp_aggregation_values[] = {
+ { LLDP_AGGREGATION_CAPABILTIY, "supported"},
+ { LLDP_AGGREGATION_STATUS, "enabled"},
+ { 0, NULL}
+};
+
+/*
+ * Interface numbering subtypes.
+ */
+#define LLDP_INTF_NUMB_IFX_SUBTYPE 2
+#define LLDP_INTF_NUMB_SYSPORT_SUBTYPE 3
+
+static const struct tok lldp_intf_numb_subtype_values[] = {
+ { LLDP_INTF_NUMB_IFX_SUBTYPE, "Interface Index" },
+ { LLDP_INTF_NUMB_SYSPORT_SUBTYPE, "System Port Number" },
+ { 0, NULL}
+};
+
+#define LLDP_INTF_NUM_LEN 5
+
+/*
+ * Print IEEE private extensions. (802.1 annex F)
+ */
+static int
+lldp_private_8021_print(const u_char *tptr)
+{
+ int subtype, hexdump = FALSE;
+
+ subtype = *(tptr+3);
+
+ printf("\n\t %s Subtype (%u)",
+ tok2str(lldp_8021_subtype_values, "unknown", subtype),
+ subtype);
+
+ switch (subtype) {
+ case LLDP_PRIVATE_8021_SUBTYPE_PORT_VLAN_ID:
+ printf("\n\t port vlan id (PVID): %u",
+ EXTRACT_16BITS(tptr+4));
+ break;
+ case LLDP_PRIVATE_8021_SUBTYPE_PROTOCOL_VLAN_ID:
+ printf("\n\t port and protocol vlan id (PPVID): %u, flags [%s] (0x%02x)",
+ EXTRACT_16BITS(tptr+5),
+ bittok2str(lldp_8021_port_protocol_id_values, "none", *(tptr+4)),
+ *(tptr+4));
+ break;
+ case LLDP_PRIVATE_8021_SUBTYPE_VLAN_NAME:
+ printf("\n\t vlan id (VID): %u",
+ EXTRACT_16BITS(tptr+4));
+ printf("\n\t vlan name: ");
+ safeputs((const char *)tptr+7, *(tptr+6));
+ break;
+ case LLDP_PRIVATE_8021_SUBTYPE_PROTOCOL_IDENTITY:
+ printf("\n\t protocol identity: ");
+ safeputs((const char *)tptr+5, *(tptr+4));
+ break;
+
+ default:
+ hexdump = TRUE;
+ break;
+ }
+
+ return hexdump;
+}
+
+/*
+ * Print IEEE private extensions. (802.3)
+ */
+static int
+lldp_private_8023_print(const u_char *tptr)
+{
+ int subtype, hexdump = FALSE;
+
+ subtype = *(tptr+3);
+
+ printf("\n\t %s Subtype (%u)",
+ tok2str(lldp_8023_subtype_values, "unknown", subtype),
+ subtype);
+
+ switch (subtype) {
+ case LLDP_PRIVATE_8023_SUBTYPE_MACPHY:
+ printf("\n\t autonegotiation [%s] (0x%02x)",
+ bittok2str(lldp_8023_autonegotiation_values, "none", *(tptr+4)),
+ *(tptr+4));
+ printf("\n\t PMD autoneg capability [%s] (0x%04x)",
+ bittok2str(lldp_pmd_capability_values,"unknown", EXTRACT_16BITS(tptr+5)),
+ EXTRACT_16BITS(tptr+5));
+ printf("\n\t MAU type %s (0x%04x)",
+ tok2str(lldp_mau_types_values, "unknown", EXTRACT_16BITS(tptr+7)),
+ EXTRACT_16BITS(tptr+7));
+ break;
+
+ case LLDP_PRIVATE_8023_SUBTYPE_MDIPOWER:
+ printf("\n\t MDI power support [%s], power pair %s, power class %s",
+ bittok2str(lldp_mdi_values, "none", *(tptr+4)),
+ tok2str(lldp_mdi_power_pairs_values, "unknown", *(tptr+5)),
+ tok2str(lldp_mdi_power_class_values, "unknown", *(tptr+6)));
+ break;
+
+ case LLDP_PRIVATE_8023_SUBTYPE_LINKAGGR:
+ printf("\n\t aggregation status [%s], aggregation port ID %u",
+ bittok2str(lldp_aggregation_values, "none", *(tptr+4)),
+ EXTRACT_32BITS(tptr+5));
+ break;
+
+ case LLDP_PRIVATE_8023_SUBTYPE_MTU:
+ printf("\n\t MTU size %u", EXTRACT_16BITS(tptr+4));
+ break;
+
+ default:
+ hexdump = TRUE;
+ break;
+ }
+
+ return hexdump;
+}
+
+/*
+ * Extract 34bits of latitude/longitude coordinates.
+ */
+static u_int64_t
+lldp_extract_latlon(const u_char *tptr)
+{
+ u_int64_t latlon;
+
+ latlon = *tptr & 0x3;
+ latlon = (latlon << 32) | EXTRACT_32BITS(tptr+1);
+
+ return latlon;
+}
+
+/*
+ * Print private TIA extensions.
+ */
+static int
+lldp_private_tia_print(const u_char *tptr, u_int tlv_len)
+{
+ int subtype, hexdump = FALSE;
+ u_int8_t location_format;
+ u_int16_t power_val;
+ u_int8_t lci_len, ca_type, ca_len;
+
+ subtype = *(tptr+3);
+
+ printf("\n\t %s Subtype (%u)",
+ tok2str(lldp_tia_subtype_values, "unknown", subtype),
+ subtype);
+
+ switch (subtype) {
+ case LLDP_PRIVATE_TIA_SUBTYPE_CAPABILITIES:
+ printf("\n\t Media capabilities [%s] (0x%04x)",
+ bittok2str(lldp_tia_capabilities_values, "none",
+ EXTRACT_16BITS(tptr+4)), EXTRACT_16BITS(tptr+4));
+ printf("\n\t Device type [%s] (0x%02x)",
+ tok2str(lldp_tia_device_type_values, "unknown", *(tptr+6)),
+ *(tptr+6));
+ break;
+
+ case LLDP_PRIVATE_TIA_SUBTYPE_NETWORK_POLICY:
+ printf("\n\t Application type [%s] (0x%02x)",
+ tok2str(lldp_tia_application_type_values, "none", *(tptr+4)),
+ *(tptr+4));
+ printf(", Flags [%s]", bittok2str(
+ lldp_tia_network_policy_bits_values, "none", *(tptr+5)));
+ printf("\n\t Vlan id %u",
+ LLDP_EXTRACT_NETWORK_POLICY_VLAN(EXTRACT_16BITS(tptr+5)));
+ printf(", L2 priority %u",
+ LLDP_EXTRACT_NETWORK_POLICY_L2_PRIORITY(EXTRACT_16BITS(tptr+6)));
+ printf(", DSCP value %u",
+ LLDP_EXTRACT_NETWORK_POLICY_DSCP(EXTRACT_16BITS(tptr+6)));
+ break;
+
+ case LLDP_PRIVATE_TIA_SUBTYPE_LOCAL_ID:
+ location_format = *(tptr+4);
+ printf("\n\t Location data format %s (0x%02x)",
+ tok2str(lldp_tia_location_data_format_values, "unknown", location_format),
+ location_format);
+
+ switch (location_format) {
+ case LLDP_TIA_LOCATION_DATA_FORMAT_COORDINATE_BASED:
+ printf("\n\t Latitude resolution %u, latitude value %" PRIu64,
+ (*(tptr+5)>>2), lldp_extract_latlon(tptr+5));
+ printf("\n\t Longitude resolution %u, longitude value %" PRIu64,
+ (*(tptr+10)>>2), lldp_extract_latlon(tptr+10));
+ printf("\n\t Altitude type %s (%u)",
+ tok2str(lldp_tia_location_altitude_type_values, "unknown",(*(tptr+15)>>4)),
+ (*(tptr+15)>>4));
+ printf("\n\t Altitude resolution %u, altitude value 0x%x",
+ (EXTRACT_16BITS(tptr+15)>>6)&0x3f,
+ ((EXTRACT_32BITS(tptr+16)&0x3fffffff)));
+ printf("\n\t Datum %s (0x%02x)",
+ tok2str(lldp_tia_location_datum_type_values, "unknown", *(tptr+20)),
+ *(tptr+20));
+ break;
+
+ case LLDP_TIA_LOCATION_DATA_FORMAT_CIVIC_ADDRESS:
+ lci_len = *(tptr+5);
+ printf("\n\t LCI length %u, LCI what %s (0x%02x), Country-code ",
+ lci_len,
+ tok2str(lldp_tia_location_lci_what_values, "unknown", *(tptr+6)),
+ *(tptr+6));
+
+ /* Country code */
+ safeputs((const char *)(tptr+7), 2);
+
+ lci_len = lci_len-3;
+ tptr = tptr + 9;
+
+ /* Decode each civic address element */
+ while (lci_len > 0) {
+ ca_type = *(tptr);
+ ca_len = *(tptr+1);
+
+ tptr += 2;
+ lci_len -= 2;
+
+ printf("\n\t CA type \'%s\' (%u), length %u: ",
+ tok2str(lldp_tia_location_lci_catype_values, "unknown", ca_type),
+ ca_type, ca_len);
+
+ /* basic sanity check */
+ if ( ca_type == 0 || ca_len == 0) {
+ return hexdump;
+ }
+
+ safeputs((const char *)tptr, ca_len);
+ tptr += ca_len;
+ lci_len -= ca_len;
+ }
+ break;
+
+ case LLDP_TIA_LOCATION_DATA_FORMAT_ECS_ELIN:
+ printf("\n\t ECS ELIN id ");
+ safeputs((const char *)tptr+5, tlv_len-5);
+ break;
+
+ default:
+ printf("\n\t Location ID ");
+ print_unknown_data(tptr+5, "\n\t ", tlv_len-5);
+ }
+ break;
+
+ case LLDP_PRIVATE_TIA_SUBTYPE_EXTENDED_POWER_MDI:
+ printf("\n\t Power type [%s]",
+ (*(tptr+4)&0xC0>>6) ? "PD device" : "PSE device");
+ printf(", Power source [%s]",
+ tok2str(lldp_tia_power_source_values, "none", (*(tptr+4)&0x30)>>4));
+ printf("\n\t Power priority [%s] (0x%02x)",
+ tok2str(lldp_tia_power_priority_values, "none", *(tptr+4)&0x0f),
+ *(tptr+4)&0x0f);
+ power_val = EXTRACT_16BITS(tptr+5);
+ if (power_val < LLDP_TIA_POWER_VAL_MAX) {
+ printf(", Power %.1f Watts", ((float)power_val)/10);
+ } else {
+ printf(", Power %u (Reserved)", power_val);
+ }
+ break;
+
+ case LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_HARDWARE_REV:
+ case LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_FIRMWARE_REV:
+ case LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SOFTWARE_REV:
+ case LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_SERIAL_NUMBER:
+ case LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MANUFACTURER_NAME:
+ case LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_MODEL_NAME:
+ case LLDP_PRIVATE_TIA_SUBTYPE_INVENTORY_ASSET_ID:
+ printf("\n\t %s ",
+ tok2str(lldp_tia_inventory_values, "unknown", subtype));
+ safeputs((const char *)tptr+4, tlv_len-4);
+ break;
+
+ default:
+ hexdump = TRUE;
+ break;
+ }
+
+ return hexdump;
+}
+
+static char *
+lldp_network_addr_print(const u_char *tptr) {
+
+ u_int8_t af;
+ static char buf[BUFSIZE];
+ const char * (*pfunc)(const u_char *);
+
+ af = *tptr;
+ switch (af) {
+ case AFNUM_INET:
+ pfunc = getname;
+ break;
+#ifdef INET6
+ case AFNUM_INET6:
+ pfunc = getname6;
+ break;
+#endif
+ case AFNUM_802:
+ pfunc = etheraddr_string;
+ break;
+ default:
+ pfunc = NULL;
+ break;
+ }
+
+ if (!pfunc) {
+ snprintf(buf, sizeof(buf), "AFI %s (%u), no AF printer !",
+ tok2str(af_values, "Unknown", af), af);
+ } else {
+ snprintf(buf, sizeof(buf), "AFI %s (%u): %s",
+ tok2str(af_values, "Unknown", af), af, (*pfunc)(tptr+1));
+ }
+
+ return buf;
+}
+
+static int
+lldp_mgmt_addr_tlv_print(const u_char *pptr, u_int len) {
+
+ u_int8_t mgmt_addr_len, intf_num_subtype, oid_len;
+ const u_char *tptr;
+ u_int tlen;
+
+ tlen = len;
+ tptr = pptr;
+
+ mgmt_addr_len = *tptr++;
+ tlen--;
+
+ if (tlen < mgmt_addr_len) {
+ return 0;
+ }
+
+ printf("\n\t Management Address length %u, %s",
+ mgmt_addr_len,
+ lldp_network_addr_print(tptr));
+ tptr += mgmt_addr_len;
+ tlen -= mgmt_addr_len;
+
+ if (tlen < LLDP_INTF_NUM_LEN) {
+ return 0;
+ }
+
+ intf_num_subtype = *tptr;
+ printf("\n\t %s Interface Numbering (%u): %u",
+ tok2str(lldp_intf_numb_subtype_values, "Unknown", intf_num_subtype),
+ intf_num_subtype,
+ EXTRACT_32BITS(tptr+1));
+
+ tptr += LLDP_INTF_NUM_LEN;
+ tlen -= LLDP_INTF_NUM_LEN;
+
+ /*
+ * The OID is optional.
+ */
+ if (tlen) {
+ oid_len = *tptr;
+
+ if (oid_len) {
+ printf("\n\t OID length %u", oid_len);
+ safeputs((const char *)tptr+1, oid_len);
+ }
+ }
+
+ return 1;
+}
+
+void
+lldp_print(register const u_char *pptr, register u_int len) {
+
+ u_int8_t subtype;
+ u_int16_t tlv, cap, ena_cap;
+ u_int oui, tlen, hexdump, tlv_type, tlv_len;
+ const u_char *tptr;
+
+ tptr = pptr;
+ tlen = len;
+
+ if (vflag) {
+ printf("LLDP, length %u", len);
+ }
+
+ while (tlen >= sizeof(tlv)) {
+
+ TCHECK2(*tptr, sizeof(tlv));
+
+ tlv = EXTRACT_16BITS(tptr);
+
+ tlv_type = LLDP_EXTRACT_TYPE(tlv);
+ tlv_len = LLDP_EXTRACT_LEN(tlv);
+ hexdump = FALSE;
+
+ tlen -= sizeof(tlv);
+ tptr += sizeof(tlv);
+
+ if (vflag) {
+ printf("\n\t%s TLV (%u), length %u",
+ tok2str(lldp_tlv_values, "Unknown", tlv_type),
+ tlv_type, tlv_len);
+ }
+
+ /* infinite loop check */
+ if (!tlv_type || !tlv_len) {
+ break;
+ }
+
+ TCHECK2(*tptr, tlv_len);
+
+ switch (tlv_type) {
+ case LLDP_TTL_TLV:
+ if (vflag) {
+ printf(": TTL %us", EXTRACT_16BITS(tptr));
+ }
+ break;
+
+ case LLDP_SYSTEM_NAME_TLV:
+
+ /*
+ * The system name is also print in non-verbose mode
+ * similar to the CDP printer.
+ */
+ if (vflag) {
+ printf(": ");
+ safeputs((const char *)tptr, tlv_len);
+ } else {
+ printf("LLDP, name ");
+ safeputs((const char *)tptr, tlv_len);
+ printf(", length %u", len);
+ }
+ break;
+
+ case LLDP_PORT_DESCR_TLV:
+ if (vflag) {
+ printf(": ");
+ safeputs((const char *)tptr, tlv_len);
+ }
+ break;
+
+ case LLDP_SYSTEM_DESCR_TLV:
+ if (vflag) {
+ printf("\n\t ");
+ safeputs((const char *)tptr, tlv_len);
+ }
+ break;
+
+
+ case LLDP_CHASSIS_ID_TLV:
+ if (vflag) {
+ subtype = *tptr;
+ printf("\n\t Subtype %s (%u): ",
+ tok2str(lldp_chassis_subtype_values, "Unknown", subtype),
+ subtype);
+
+ switch (subtype) {
+ case LLDP_CHASSIS_MAC_ADDR_SUBTYPE:
+ printf("%s", etheraddr_string(tptr+1));
+ break;
+
+ case LLDP_CHASSIS_INTF_NAME_SUBTYPE: /* fall through */
+ case LLDP_CHASSIS_LOCAL_SUBTYPE:
+ case LLDP_CHASSIS_CHASSIS_COMP_SUBTYPE:
+ case LLDP_CHASSIS_INTF_ALIAS_SUBTYPE:
+ case LLDP_CHASSIS_PORT_COMP_SUBTYPE:
+ safeputs((const char *)tptr+1, tlv_len-1);
+ break;
+
+ case LLDP_CHASSIS_NETWORK_ADDR_SUBTYPE:
+ printf("%s", lldp_network_addr_print(tptr+1));
+ break;
+
+ default:
+ hexdump = TRUE;
+ break;
+ }
+ }
+ break;
+
+ case LLDP_PORT_ID_TLV:
+ if (vflag) {
+ subtype = *tptr;
+ printf("\n\t Subtype %s (%u): ",
+ tok2str(lldp_port_subtype_values, "Unknown", subtype),
+ subtype);
+
+ switch (subtype) {
+ case LLDP_PORT_MAC_ADDR_SUBTYPE:
+ printf("%s", etheraddr_string(tptr+1));
+ break;
+
+ case LLDP_PORT_INTF_NAME_SUBTYPE: /* fall through */
+ case LLDP_PORT_LOCAL_SUBTYPE:
+ case LLDP_PORT_AGENT_CIRC_ID_SUBTYPE:
+ case LLDP_PORT_INTF_ALIAS_SUBTYPE:
+ case LLDP_PORT_PORT_COMP_SUBTYPE:
+ safeputs((const char *)tptr+1, tlv_len-1);
+ break;
+
+ case LLDP_PORT_NETWORK_ADDR_SUBTYPE:
+ printf("%s", lldp_network_addr_print(tptr+1));
+ break;
+
+ default:
+ hexdump = TRUE;
+ break;
+ }
+ }
+ break;
+
+ case LLDP_PRIVATE_TLV:
+ if (vflag) {
+ oui = EXTRACT_24BITS(tptr);
+ printf(": OUI %s (0x%06x)", tok2str(oui_values, "Unknown", oui), oui);
+
+ switch (oui) {
+ case OUI_IEEE_8021_PRIVATE:
+ hexdump = lldp_private_8021_print(tptr);
+ break;
+ case OUI_IEEE_8023_PRIVATE:
+ hexdump = lldp_private_8023_print(tptr);
+ break;
+ case OUI_TIA:
+ hexdump = lldp_private_tia_print(tptr, tlv_len);
+ break;
+ default:
+ hexdump = TRUE;
+ break;
+ }
+ }
+ break;
+
+ case LLDP_SYSTEM_CAP_TLV:
+ if (vflag) {
+ cap = EXTRACT_16BITS(tptr);
+ ena_cap = EXTRACT_16BITS(tptr+2);
+ printf("\n\t System Capabilities [%s] (0x%04x)",
+ bittok2str(lldp_cap_values, "none", cap), cap);
+ printf("\n\t Enabled Capabilities [%s] (0x%04x)",
+ bittok2str(lldp_cap_values, "none", ena_cap), ena_cap);
+ }
+ break;
+
+ case LLDP_MGMT_ADDR_TLV:
+ if (vflag) {
+ if (!lldp_mgmt_addr_tlv_print(tptr, tlen)) {
+ goto trunc;
+ }
+ }
+ break;
+
+ default:
+ hexdump = TRUE;
+ break;
+ }
+
+ /* do we also want to see a hex dump ? */
+ if (vflag > 1 || (vflag && hexdump)) {
+ print_unknown_data(tptr,"\n\t ", tlv_len);
+ }
+
+ tlen -= tlv_len;
+ tptr += tlv_len;
+ }
+ return;
+ trunc:
+ printf("\n\t[|LLDP]");
+}
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/contrib/tcpdump/print-lmp.c b/contrib/tcpdump/print-lmp.c
index 84d166f..556db17 100644
--- a/contrib/tcpdump/print-lmp.c
+++ b/contrib/tcpdump/print-lmp.c
@@ -10,6 +10,8 @@
* LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE.
*
+ * Support for the Link Management Protocol as per rfc 4204.
+ *
* Original code by Hannes Gredler (hannes@juniper.net)
* Support for LMP service discovery extensions (defined by UNI 1.0) added
* by Manu Pathak (mapathak@cisco.com), May 2005
@@ -17,7 +19,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-lmp.c,v 1.5.2.4 2006/06/23 02:07:27 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-lmp.c,v 1.11 2007-08-02 17:32:49 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -91,21 +93,21 @@ static const struct tok lmp_obj_begin_verify_flag_values[] = {
};
static const struct tok lmp_obj_begin_verify_error_values[] = {
- { 0x01, "\n\t\tLink Verification Procedure Not supported"},
- { 0x02, "\n\t\tUnwilling to verify"},
- { 0x04, "\n\t\tUnsupported verification transport mechanism"},
- { 0x08, "\n\t\tLink_Id configuration error"},
- { 0x10, "\n\t\tUnknown object c-type"},
+ { 0x01, "Link Verification Procedure Not supported"},
+ { 0x02, "Unwilling to verify"},
+ { 0x04, "Unsupported verification transport mechanism"},
+ { 0x08, "Link-Id configuration error"},
+ { 0x10, "Unknown object c-type"},
{ 0, NULL}
};
static const struct tok lmp_obj_link_summary_error_values[] = {
- { 0x01, "\n\t\tUnacceptable non-negotiable LINK_SUMMARY parameters"},
- { 0x02, "\n\t\tRenegotiate LINK_SUMMARY parameters"},
- { 0x04, "\n\t\tInvalid TE-LINK Object"},
- { 0x08, "\n\t\tInvalid DATA-LINK Object"},
- { 0x10, "\n\t\tUnknown TE-LINK Object c-type"},
- { 0x20, "\n\t\tUnknown DATA-LINK Object c-type"},
+ { 0x01, "Unacceptable non-negotiable LINK-SUMMARY parameters"},
+ { 0x02, "Renegotiate LINK-SUMMARY parameters"},
+ { 0x04, "Invalid TE-LINK Object"},
+ { 0x08, "Invalid DATA-LINK Object"},
+ { 0x10, "Unknown TE-LINK Object c-type"},
+ { 0x20, "Unknown DATA-LINK Object c-type"},
{ 0, NULL}
};
@@ -532,7 +534,7 @@ lmp_print(register const u_char *pptr, register u_int len) {
case LMP_OBJ_HELLO:
switch(lmp_obj_ctype) {
case LMP_CTYPE_HELLO:
- printf("\n\t TxSeqNum: %u\n\t RcvSeqNum: %u",
+ printf("\n\t Tx Seq: %u, Rx Seq: %u",
EXTRACT_32BITS(obj_tptr),
EXTRACT_32BITS(obj_tptr+4));
break;
diff --git a/contrib/tcpdump/print-lspping.c b/contrib/tcpdump/print-lspping.c
index a80cdc6..f47a900 100644
--- a/contrib/tcpdump/print-lspping.c
+++ b/contrib/tcpdump/print-lspping.c
@@ -15,7 +15,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-lspping.c,v 1.12.2.6 2006/06/23 02:07:27 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-lspping.c,v 1.18.2.1 2008-01-28 13:48:16 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -574,10 +574,11 @@ lspping_print(register const u_char *pptr, register u_int len) {
lspping_tlv_type=EXTRACT_16BITS(lspping_tlv_header->type);
lspping_tlv_len=EXTRACT_16BITS(lspping_tlv_header->length);
- if (lspping_tlv_len == 0)
+ /* some little sanity checking */
+ if (lspping_tlv_type == 0 || lspping_tlv_len == 0)
return;
- if(lspping_tlv_len % 4 || lspping_tlv_len < 4) { /* aligned to four octet boundary */
+ if(lspping_tlv_len < 4) {
printf("\n\t ERROR: TLV %u bogus size %u",lspping_tlv_type,lspping_tlv_len);
return;
}
@@ -858,6 +859,12 @@ lspping_print(register const u_char *pptr, register u_int len) {
print_unknown_data(tptr+sizeof(sizeof(struct lspping_tlv_header)),"\n\t ",
lspping_tlv_len);
+
+ /* All TLVs are aligned to four octet boundary */
+ if (lspping_tlv_len % 4) {
+ lspping_tlv_len += (4 - lspping_tlv_len % 4);
+ }
+
tptr+=lspping_tlv_len+sizeof(struct lspping_tlv_header);
tlen-=lspping_tlv_len+sizeof(struct lspping_tlv_header);
}
diff --git a/contrib/tcpdump/print-lwapp.c b/contrib/tcpdump/print-lwapp.c
new file mode 100644
index 0000000..984ebaa
--- /dev/null
+++ b/contrib/tcpdump/print-lwapp.c
@@ -0,0 +1,360 @@
+/*
+ * Copyright (c) 1998-2007 The TCPDUMP project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * Support for the Light Weight Access Point Protocol as per draft-ohara-capwap-lwapp-04
+ *
+ * Original code by Carles Kishimoto <carles.kishimoto@gmail.com>
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+"@(#) $Header: /tcpdump/master/tcpdump/print-lwapp.c,v 1.1 2007-07-24 16:07:30 hannes Exp $";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "interface.h"
+#include "extract.h"
+#include "addrtoname.h"
+
+/*
+ * LWAPP transport (common) header
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * |VER| RID |C|F|L| Frag ID | Length |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Status/WLANs | Payload... |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ */
+
+struct lwapp_transport_header {
+ u_int8_t version;
+ u_int8_t frag_id;
+ u_int8_t length[2];
+ u_int16_t status;
+};
+
+/*
+ * LWAPP control header
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Message Type | Seq Num | Msg Element Length |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Session ID |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Msg Element [0..N] |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+struct lwapp_control_header {
+ u_int8_t msg_type;
+ u_int8_t seq_num;
+ u_int8_t len[2];
+ u_int8_t session_id[4];
+};
+
+#define LWAPP_VERSION 0
+#define LWAPP_EXTRACT_VERSION(x) (((x)&0xC0)>>6)
+#define LWAPP_EXTRACT_RID(x) (((x)&0x38)>>3)
+#define LWAPP_EXTRACT_CONTROL_BIT(x) (((x)&0x04)>>2)
+
+static const struct tok lwapp_header_bits_values[] = {
+ { 0x01, "Last Fragment Bit"},
+ { 0x02, "Fragment Bit"},
+ { 0x04, "Control Bit"},
+ { 0, NULL}
+};
+
+#define LWAPP_MSGTYPE_DISCOVERY_REQUEST 1
+#define LWAPP_MSGTYPE_DISCOVERY_RESPONSE 2
+#define LWAPP_MSGTYPE_JOIN_REQUEST 3
+#define LWAPP_MSGTYPE_JOIN_RESPONSE 4
+#define LWAPP_MSGTYPE_JOIN_ACK 5
+#define LWAPP_MSGTYPE_JOIN_CONFIRM 6
+#define LWAPP_MSGTYPE_CONFIGURE_REQUEST 10
+#define LWAPP_MSGTYPE_CONFIGURE_RESPONSE 11
+#define LWAPP_MSGTYPE_CONF_UPDATE_REQUEST 12
+#define LWAPP_MSGTYPE_CONF_UPDATE_RESPONSE 13
+#define LWAPP_MSGTYPE_WTP_EVENT_REQUEST 14
+#define LWAPP_MSGTYPE_WTP_EVENT_RESPONSE 15
+#define LWAPP_MSGTYPE_CHANGE_STATE_EVENT_REQUEST 16
+#define LWAPP_MSGTYPE_CHANGE_STATE_EVENT_RESPONSE 17
+#define LWAPP_MSGTYPE_ECHO_REQUEST 22
+#define LWAPP_MSGTYPE_ECHO_RESPONSE 23
+#define LWAPP_MSGTYPE_IMAGE_DATA_REQUEST 24
+#define LWAPP_MSGTYPE_IMAGE_DATA_RESPONSE 25
+#define LWAPP_MSGTYPE_RESET_REQUEST 26
+#define LWAPP_MSGTYPE_RESET_RESPONSE 27
+#define LWAPP_MSGTYPE_KEY_UPDATE_REQUEST 30
+#define LWAPP_MSGTYPE_KEY_UPDATE_RESPONSE 31
+#define LWAPP_MSGTYPE_PRIMARY_DISCOVERY_REQUEST 32
+#define LWAPP_MSGTYPE_PRIMARY_DISCOVERY_RESPONSE 33
+#define LWAPP_MSGTYPE_DATA_TRANSFER_REQUEST 34
+#define LWAPP_MSGTYPE_DATA_TRANSFER_RESPONSE 35
+#define LWAPP_MSGTYPE_CLEAR_CONFIG_INDICATION 36
+#define LWAPP_MSGTYPE_WLAN_CONFIG_REQUEST 37
+#define LWAPP_MSGTYPE_WLAN_CONFIG_RESPONSE 38
+#define LWAPP_MSGTYPE_MOBILE_CONFIG_REQUEST 39
+#define LWAPP_MSGTYPE_MOBILE_CONFIG_RESPONSE 40
+
+static const struct tok lwapp_msg_type_values[] = {
+ { LWAPP_MSGTYPE_DISCOVERY_REQUEST, "Discovery req"},
+ { LWAPP_MSGTYPE_DISCOVERY_RESPONSE, "Discovery resp"},
+ { LWAPP_MSGTYPE_JOIN_REQUEST, "Join req"},
+ { LWAPP_MSGTYPE_JOIN_RESPONSE, "Join resp"},
+ { LWAPP_MSGTYPE_JOIN_ACK, "Join ack"},
+ { LWAPP_MSGTYPE_JOIN_CONFIRM, "Join confirm"},
+ { LWAPP_MSGTYPE_CONFIGURE_REQUEST, "Configure req"},
+ { LWAPP_MSGTYPE_CONFIGURE_RESPONSE, "Configure resp"},
+ { LWAPP_MSGTYPE_CONF_UPDATE_REQUEST, "Update req"},
+ { LWAPP_MSGTYPE_CONF_UPDATE_RESPONSE, "Update resp"},
+ { LWAPP_MSGTYPE_WTP_EVENT_REQUEST, "WTP event req"},
+ { LWAPP_MSGTYPE_WTP_EVENT_RESPONSE, "WTP event resp"},
+ { LWAPP_MSGTYPE_CHANGE_STATE_EVENT_REQUEST, "Change state event req"},
+ { LWAPP_MSGTYPE_CHANGE_STATE_EVENT_RESPONSE, "Change state event resp"},
+ { LWAPP_MSGTYPE_ECHO_REQUEST, "Echo req"},
+ { LWAPP_MSGTYPE_ECHO_RESPONSE, "Echo resp"},
+ { LWAPP_MSGTYPE_IMAGE_DATA_REQUEST, "Image data req"},
+ { LWAPP_MSGTYPE_IMAGE_DATA_RESPONSE, "Image data resp"},
+ { LWAPP_MSGTYPE_RESET_REQUEST, "Channel status req"},
+ { LWAPP_MSGTYPE_RESET_RESPONSE, "Channel status resp"},
+ { LWAPP_MSGTYPE_KEY_UPDATE_REQUEST, "Key update req"},
+ { LWAPP_MSGTYPE_KEY_UPDATE_RESPONSE, "Key update resp"},
+ { LWAPP_MSGTYPE_PRIMARY_DISCOVERY_REQUEST, "Primary discovery req"},
+ { LWAPP_MSGTYPE_PRIMARY_DISCOVERY_RESPONSE, "Primary discovery resp"},
+ { LWAPP_MSGTYPE_DATA_TRANSFER_REQUEST, "Data transfer req"},
+ { LWAPP_MSGTYPE_DATA_TRANSFER_RESPONSE, "Data transfer resp"},
+ { LWAPP_MSGTYPE_CLEAR_CONFIG_INDICATION, "Clear config ind"},
+ { LWAPP_MSGTYPE_WLAN_CONFIG_REQUEST, "Wlan config req"},
+ { LWAPP_MSGTYPE_WLAN_CONFIG_RESPONSE, "Wlan config resp"},
+ { LWAPP_MSGTYPE_MOBILE_CONFIG_REQUEST, "Mobile config req"},
+ { LWAPP_MSGTYPE_MOBILE_CONFIG_RESPONSE, "Mobile config resp"},
+ { 0, NULL}
+};
+
+/*
+ * LWAPP message elements
+ *
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Type | Length | Value ... |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+struct lwapp_message_header {
+ u_int8_t type;
+ u_int8_t length[2];
+};
+
+void
+lwapp_control_print(const u_char *pptr, u_int len, int has_ap_ident) {
+
+ const struct lwapp_transport_header *lwapp_trans_header;
+ const struct lwapp_control_header *lwapp_control_header;
+ const u_char *tptr;
+ int hexdump,tlen;
+ int msg_tlen;
+
+ tptr=pptr;
+
+ if (has_ap_ident) {
+ /* check if enough bytes for AP identity */
+ if (!TTEST2(*tptr, 6))
+ goto trunc;
+ lwapp_trans_header = (const struct lwapp_transport_header *)(pptr+6);
+ } else {
+ lwapp_trans_header = (const struct lwapp_transport_header *)pptr;
+ }
+ TCHECK(*lwapp_trans_header);
+
+ /*
+ * Sanity checking of the header.
+ */
+ if (LWAPP_EXTRACT_VERSION(lwapp_trans_header->version) != LWAPP_VERSION) {
+ printf("LWAPP version %u packet not supported",
+ LWAPP_EXTRACT_VERSION(lwapp_trans_header->version));
+ return;
+ }
+
+ /* non-verbose */
+ if (vflag < 1) {
+ printf("LWAPPv%u, %s frame, Flags [%s], length %u",
+ LWAPP_EXTRACT_VERSION(lwapp_trans_header->version),
+ LWAPP_EXTRACT_CONTROL_BIT(lwapp_trans_header->version) ? "Control" : "Data",
+ bittok2str(lwapp_header_bits_values,"none",(lwapp_trans_header->version)&0x07),
+ len);
+ return;
+ }
+
+ /* ok they seem to want to know everything - lets fully decode it */
+ tlen=EXTRACT_16BITS(lwapp_trans_header->length);
+
+ printf("LWAPPv%u, %s frame, Radio-id %u, Flags [%s], Frag-id %u, length %u",
+ LWAPP_EXTRACT_VERSION(lwapp_trans_header->version),
+ LWAPP_EXTRACT_CONTROL_BIT(lwapp_trans_header->version) ? "Control" : "Data",
+ LWAPP_EXTRACT_RID(lwapp_trans_header->version),
+ bittok2str(lwapp_header_bits_values,"none",(lwapp_trans_header->version)&0x07),
+ lwapp_trans_header->frag_id,
+ tlen);
+
+ if (has_ap_ident) {
+ printf("\n\tAP identity: %s",
+ etheraddr_string(tptr));
+ tptr+=sizeof(const struct lwapp_transport_header)+6;
+ } else {
+ tptr+=sizeof(const struct lwapp_transport_header);
+ }
+
+ while(tlen>0) {
+
+ /* did we capture enough for fully decoding the object header ? */
+ if (!TTEST2(*tptr, sizeof(struct lwapp_control_header)))
+ goto trunc;
+
+ lwapp_control_header = (const struct lwapp_control_header *)tptr;
+ msg_tlen = EXTRACT_16BITS(lwapp_control_header->len);
+
+ /* print message header */
+ printf("\n\t Msg type: %s (%u), Seqnum: %u, Msg len: %d, Session: 0x%08x",
+ tok2str(lwapp_msg_type_values,"Unknown",lwapp_control_header->msg_type),
+ lwapp_control_header->msg_type,
+ lwapp_control_header->seq_num,
+ msg_tlen,
+ EXTRACT_32BITS(lwapp_control_header->session_id));
+
+ /* did we capture enough for fully decoding the message */
+ if (!TTEST2(*tptr, msg_tlen))
+ goto trunc;
+ hexdump=FALSE;
+
+ /* XXX - Decode sub messages for each message */
+ switch(lwapp_control_header->msg_type) {
+ case LWAPP_MSGTYPE_DISCOVERY_REQUEST:
+ case LWAPP_MSGTYPE_DISCOVERY_RESPONSE:
+ case LWAPP_MSGTYPE_JOIN_REQUEST:
+ case LWAPP_MSGTYPE_JOIN_RESPONSE:
+ case LWAPP_MSGTYPE_JOIN_ACK:
+ case LWAPP_MSGTYPE_JOIN_CONFIRM:
+ case LWAPP_MSGTYPE_CONFIGURE_REQUEST:
+ case LWAPP_MSGTYPE_CONFIGURE_RESPONSE:
+ case LWAPP_MSGTYPE_CONF_UPDATE_REQUEST:
+ case LWAPP_MSGTYPE_CONF_UPDATE_RESPONSE:
+ case LWAPP_MSGTYPE_WTP_EVENT_REQUEST:
+ case LWAPP_MSGTYPE_WTP_EVENT_RESPONSE:
+ case LWAPP_MSGTYPE_CHANGE_STATE_EVENT_REQUEST:
+ case LWAPP_MSGTYPE_CHANGE_STATE_EVENT_RESPONSE:
+ case LWAPP_MSGTYPE_ECHO_REQUEST:
+ case LWAPP_MSGTYPE_ECHO_RESPONSE:
+ case LWAPP_MSGTYPE_IMAGE_DATA_REQUEST:
+ case LWAPP_MSGTYPE_IMAGE_DATA_RESPONSE:
+ case LWAPP_MSGTYPE_RESET_REQUEST:
+ case LWAPP_MSGTYPE_RESET_RESPONSE:
+ case LWAPP_MSGTYPE_KEY_UPDATE_REQUEST:
+ case LWAPP_MSGTYPE_KEY_UPDATE_RESPONSE:
+ case LWAPP_MSGTYPE_PRIMARY_DISCOVERY_REQUEST:
+ case LWAPP_MSGTYPE_PRIMARY_DISCOVERY_RESPONSE:
+ case LWAPP_MSGTYPE_DATA_TRANSFER_REQUEST:
+ case LWAPP_MSGTYPE_DATA_TRANSFER_RESPONSE:
+ case LWAPP_MSGTYPE_CLEAR_CONFIG_INDICATION:
+ case LWAPP_MSGTYPE_WLAN_CONFIG_REQUEST:
+ case LWAPP_MSGTYPE_WLAN_CONFIG_RESPONSE:
+ case LWAPP_MSGTYPE_MOBILE_CONFIG_REQUEST:
+ case LWAPP_MSGTYPE_MOBILE_CONFIG_RESPONSE:
+ default:
+ break;
+ }
+
+ tptr += sizeof(struct lwapp_control_header) + msg_tlen;
+ tlen -= sizeof(struct lwapp_control_header) + msg_tlen;
+ }
+ return;
+
+ trunc:
+ printf("\n\t\t packet exceeded snapshot");
+}
+
+void
+lwapp_data_print(const u_char *pptr, u_int len) {
+
+ const struct lwapp_transport_header *lwapp_trans_header;
+ const u_char *tptr;
+ int tlen;
+
+ tptr=pptr;
+
+ /* check if enough bytes for AP identity */
+ if (!TTEST2(*tptr, 6))
+ goto trunc;
+ lwapp_trans_header = (const struct lwapp_transport_header *)pptr;
+ TCHECK(*lwapp_trans_header);
+
+ /*
+ * Sanity checking of the header.
+ */
+ if (LWAPP_EXTRACT_VERSION(lwapp_trans_header->version) != LWAPP_VERSION) {
+ printf("LWAPP version %u packet not supported",
+ LWAPP_EXTRACT_VERSION(lwapp_trans_header->version));
+ return;
+ }
+
+ /* non-verbose */
+ if (vflag < 1) {
+ printf("LWAPPv%u, %s frame, Flags [%s], length %u",
+ LWAPP_EXTRACT_VERSION(lwapp_trans_header->version),
+ LWAPP_EXTRACT_CONTROL_BIT(lwapp_trans_header->version) ? "Control" : "Data",
+ bittok2str(lwapp_header_bits_values,"none",(lwapp_trans_header->version)&0x07),
+ len);
+ return;
+ }
+
+ /* ok they seem to want to know everything - lets fully decode it */
+ tlen=EXTRACT_16BITS(lwapp_trans_header->length);
+
+ printf("LWAPPv%u, %s frame, Radio-id %u, Flags [%s], Frag-id %u, length %u",
+ LWAPP_EXTRACT_VERSION(lwapp_trans_header->version),
+ LWAPP_EXTRACT_CONTROL_BIT(lwapp_trans_header->version) ? "Control" : "Data",
+ LWAPP_EXTRACT_RID(lwapp_trans_header->version),
+ bittok2str(lwapp_header_bits_values,"none",(lwapp_trans_header->version)&0x07),
+ lwapp_trans_header->frag_id,
+ tlen);
+
+ tptr+=sizeof(const struct lwapp_transport_header);
+ tlen-=sizeof(const struct lwapp_transport_header);
+
+ /* FIX - An IEEE 802.11 frame follows - hexdump for now */
+ print_unknown_data(tptr, "\n\t", tlen);
+
+ return;
+
+ trunc:
+ printf("\n\t\t packet exceeded snapshot");
+}
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 8
+ * End:
+ */
diff --git a/contrib/tcpdump/print-lwres.c b/contrib/tcpdump/print-lwres.c
index d0d6fe1..aad4eee 100644
--- a/contrib/tcpdump/print-lwres.c
+++ b/contrib/tcpdump/print-lwres.c
@@ -29,7 +29,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-lwres.c,v 1.13 2004/03/24 01:54:29 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-lwres.c,v 1.13 2004-03-24 01:54:29 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-mobile.c b/contrib/tcpdump/print-mobile.c
index fe6f013..816ffd6 100644
--- a/contrib/tcpdump/print-mobile.c
+++ b/contrib/tcpdump/print-mobile.c
@@ -42,7 +42,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.15 2004/03/24 01:58:14 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.15 2004-03-24 01:58:14 guy Exp $";
#endif
#include <tcpdump-stdinc.h>
diff --git a/contrib/tcpdump/print-mobility.c b/contrib/tcpdump/print-mobility.c
index 8f9cbee..1490b72 100644
--- a/contrib/tcpdump/print-mobility.c
+++ b/contrib/tcpdump/print-mobility.c
@@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-mobility.c,v 1.11.2.1 2005/04/20 22:21:16 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-mobility.c,v 1.12 2005-04-20 22:21:00 guy Exp $";
#endif
#ifdef INET6
diff --git a/contrib/tcpdump/print-mpcp.c b/contrib/tcpdump/print-mpcp.c
new file mode 100644
index 0000000..244f280
--- /dev/null
+++ b/contrib/tcpdump/print-mpcp.c
@@ -0,0 +1,274 @@
+/*
+ * Copyright (c) 1998-2006 The TCPDUMP project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * support for the IEEE MPCP protocol as per 802.3ah
+ *
+ * Original code by Hannes Gredler (hannes@juniper.net)
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+ "@(#) $Header: /tcpdump/master/tcpdump/print-mpcp.c,v 1.2 2006-02-10 17:24:55 hannes Exp $";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "interface.h"
+#include "extract.h"
+#include "addrtoname.h"
+#include "ether.h"
+
+#define MPCP_TIMESTAMP_LEN 4
+#define MPCP_TIMESTAMP_DURATION_LEN 2
+
+struct mpcp_common_header_t {
+ u_int8_t opcode[2];
+ u_int8_t timestamp[MPCP_TIMESTAMP_LEN];
+};
+
+#define MPCP_OPCODE_PAUSE 0x0001
+#define MPCP_OPCODE_GATE 0x0002
+#define MPCP_OPCODE_REPORT 0x0003
+#define MPCP_OPCODE_REG_REQ 0x0004
+#define MPCP_OPCODE_REG 0x0005
+#define MPCP_OPCODE_REG_ACK 0x0006
+
+static const struct tok mpcp_opcode_values[] = {
+ { MPCP_OPCODE_PAUSE, "Pause" },
+ { MPCP_OPCODE_GATE, "Gate" },
+ { MPCP_OPCODE_REPORT, "Report" },
+ { MPCP_OPCODE_REG_REQ, "Register Request" },
+ { MPCP_OPCODE_REG, "Register" },
+ { MPCP_OPCODE_REG_ACK, "Register ACK" },
+ { 0, NULL}
+};
+
+#define MPCP_GRANT_NUMBER_LEN 1
+#define MPCP_GRANT_NUMBER_MASK 0x7
+static const struct tok mpcp_grant_flag_values[] = {
+ { 0x08, "Discovery" },
+ { 0x10, "Force Grant #1" },
+ { 0x20, "Force Grant #2" },
+ { 0x40, "Force Grant #3" },
+ { 0x80, "Force Grant #4" },
+ { 0, NULL}
+};
+
+struct mpcp_grant_t {
+ u_int8_t starttime[MPCP_TIMESTAMP_LEN];
+ u_int8_t duration[MPCP_TIMESTAMP_DURATION_LEN];
+};
+
+struct mpcp_reg_req_t {
+ u_int8_t flags;
+ u_int8_t pending_grants;
+};
+
+
+static const struct tok mpcp_reg_req_flag_values[] = {
+ { 1, "Register" },
+ { 3, "De-Register" },
+ { 0, NULL}
+};
+
+struct mpcp_reg_t {
+ u_int8_t assigned_port[2];
+ u_int8_t flags;
+ u_int8_t sync_time[MPCP_TIMESTAMP_DURATION_LEN];
+ u_int8_t echoed_pending_grants;
+};
+
+static const struct tok mpcp_reg_flag_values[] = {
+ { 1, "Re-Register" },
+ { 2, "De-Register" },
+ { 3, "ACK" },
+ { 4, "NACK" },
+ { 0, NULL}
+};
+
+#define MPCP_REPORT_QUEUESETS_LEN 1
+#define MPCP_REPORT_REPORTBITMAP_LEN 1
+static const struct tok mpcp_report_bitmap_values[] = {
+ { 0x01, "Q0" },
+ { 0x02, "Q1" },
+ { 0x04, "Q2" },
+ { 0x08, "Q3" },
+ { 0x10, "Q4" },
+ { 0x20, "Q5" },
+ { 0x40, "Q6" },
+ { 0x80, "Q7" },
+ { 0, NULL}
+};
+
+struct mpcp_reg_ack_t {
+ u_int8_t flags;
+ u_int8_t echoed_assigned_port[2];
+ u_int8_t echoed_sync_time[MPCP_TIMESTAMP_DURATION_LEN];
+};
+
+static const struct tok mpcp_reg_ack_flag_values[] = {
+ { 0, "NACK" },
+ { 1, "ACK" },
+ { 0, NULL}
+};
+
+void
+mpcp_print(register const u_char *pptr, register u_int length) {
+
+ union {
+ const struct mpcp_common_header_t *common_header;
+ const struct mpcp_grant_t *grant;
+ const struct mpcp_reg_req_t *reg_req;
+ const struct mpcp_reg_t *reg;
+ const struct mpcp_reg_ack_t *reg_ack;
+ } mpcp;
+
+
+ const u_char *tptr;
+ u_int16_t opcode;
+ u_int8_t grant_numbers, grant;
+ u_int8_t queue_sets, queue_set, report_bitmap, report;
+
+ tptr=pptr;
+ mpcp.common_header = (const struct mpcp_common_header_t *)pptr;
+
+ if (!TTEST2(*tptr, sizeof(const struct mpcp_common_header_t)))
+ goto trunc;
+ opcode = EXTRACT_16BITS(mpcp.common_header->opcode);
+ printf("MPCP, Opcode %s", tok2str(mpcp_opcode_values, "Unknown (%u)", opcode));
+ if (opcode != MPCP_OPCODE_PAUSE) {
+ printf(", Timestamp %u ticks", EXTRACT_32BITS(mpcp.common_header->timestamp));
+ }
+ printf(", length %u", length);
+
+ if (!vflag)
+ return;
+
+ tptr += sizeof(const struct mpcp_common_header_t);
+
+ switch (opcode) {
+ case MPCP_OPCODE_PAUSE:
+ break;
+
+ case MPCP_OPCODE_GATE:
+ if (!TTEST2(*tptr, MPCP_GRANT_NUMBER_LEN))
+ goto trunc;
+ grant_numbers = *tptr & MPCP_GRANT_NUMBER_MASK;
+ printf("\n\tGrant Numbers %u, Flags [ %s ]",
+ grant_numbers,
+ bittok2str(mpcp_grant_flag_values,
+ "?",
+ *tptr &~ MPCP_GRANT_NUMBER_MASK));
+ tptr++;
+
+ for (grant = 1; grant <= grant_numbers; grant++) {
+ if (!TTEST2(*tptr, sizeof(const struct mpcp_grant_t)))
+ goto trunc;
+ mpcp.grant = (const struct mpcp_grant_t *)tptr;
+ printf("\n\tGrant #%u, Start-Time %u ticks, duration %u ticks",
+ grant,
+ EXTRACT_32BITS(mpcp.grant->starttime),
+ EXTRACT_16BITS(mpcp.grant->duration));
+ tptr += sizeof(const struct mpcp_grant_t);
+ }
+
+ if (!TTEST2(*tptr, MPCP_TIMESTAMP_DURATION_LEN))
+ goto trunc;
+ printf("\n\tSync-Time %u ticks", EXTRACT_16BITS(tptr));
+ break;
+
+
+ case MPCP_OPCODE_REPORT:
+ if (!TTEST2(*tptr, MPCP_REPORT_QUEUESETS_LEN))
+ goto trunc;
+ queue_sets = *tptr;
+ tptr+=MPCP_REPORT_QUEUESETS_LEN;
+ printf("\n\tTotal Queue-Sets %u", queue_sets);
+
+ for (queue_set = 1; queue_set < queue_sets; queue_set++) {
+ if (!TTEST2(*tptr, MPCP_REPORT_REPORTBITMAP_LEN))
+ goto trunc;
+ report_bitmap = *(tptr);
+ printf("\n\t Queue-Set #%u, Report-Bitmap [ %s ]",
+ queue_sets,
+ bittok2str(mpcp_report_bitmap_values, "Unknown", report_bitmap));
+ tptr++;
+
+ report=1;
+ while (report_bitmap != 0) {
+ if (report_bitmap & 1) {
+ if (!TTEST2(*tptr, MPCP_TIMESTAMP_DURATION_LEN))
+ goto trunc;
+ printf("\n\t Q%u Report, Duration %u ticks",
+ report,
+ EXTRACT_16BITS(tptr));
+ tptr+=MPCP_TIMESTAMP_DURATION_LEN;
+ }
+ report++;
+ report_bitmap = report_bitmap >> 1;
+ }
+ }
+ break;
+
+ case MPCP_OPCODE_REG_REQ:
+ if (!TTEST2(*tptr, sizeof(const struct mpcp_reg_req_t)))
+ goto trunc;
+ mpcp.reg_req = (const struct mpcp_reg_req_t *)tptr;
+ printf("\n\tFlags [ %s ], Pending-Grants %u",
+ bittok2str(mpcp_reg_req_flag_values, "Reserved", mpcp.reg_req->flags),
+ mpcp.reg_req->pending_grants);
+ break;
+
+ case MPCP_OPCODE_REG:
+ if (!TTEST2(*tptr, sizeof(const struct mpcp_reg_t)))
+ goto trunc;
+ mpcp.reg = (const struct mpcp_reg_t *)tptr;
+ printf("\n\tAssigned-Port %u, Flags [ %s ]" \
+ "\n\tSync-Time %u ticks, Echoed-Pending-Grants %u",
+ EXTRACT_16BITS(mpcp.reg->assigned_port),
+ bittok2str(mpcp_reg_flag_values, "Reserved", mpcp.reg->flags),
+ EXTRACT_16BITS(mpcp.reg->sync_time),
+ mpcp.reg->echoed_pending_grants);
+ break;
+
+ case MPCP_OPCODE_REG_ACK:
+ if (!TTEST2(*tptr, sizeof(const struct mpcp_reg_ack_t)))
+ goto trunc;
+ mpcp.reg_ack = (const struct mpcp_reg_ack_t *)tptr;
+ printf("\n\tEchoed-Assigned-Port %u, Flags [ %s ]" \
+ "\n\tEchoed-Sync-Time %u ticks",
+ EXTRACT_16BITS(mpcp.reg_ack->echoed_assigned_port),
+ bittok2str(mpcp_reg_ack_flag_values, "Reserved", mpcp.reg_ack->flags),
+ EXTRACT_16BITS(mpcp.reg_ack->echoed_sync_time));
+ break;
+
+ default:
+ /* unknown opcode - hexdump for now */
+ print_unknown_data(pptr, "\n\t", length);
+ break;
+ }
+
+ return;
+
+trunc:
+ printf("\n\t[|MPCP]");
+}
diff --git a/contrib/tcpdump/print-mpls.c b/contrib/tcpdump/print-mpls.c
index 9d54567..c6b0814 100644
--- a/contrib/tcpdump/print-mpls.c
+++ b/contrib/tcpdump/print-mpls.c
@@ -28,7 +28,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-mpls.c,v 1.13.2.1 2005/07/05 09:39:29 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-mpls.c,v 1.14 2005-07-05 09:38:19 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-msdp.c b/contrib/tcpdump/print-msdp.c
index 3f79b68..a228ab7 100644
--- a/contrib/tcpdump/print-msdp.c
+++ b/contrib/tcpdump/print-msdp.c
@@ -17,7 +17,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-msdp.c,v 1.7 2005/04/06 21:32:41 mcr Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-msdp.c,v 1.7 2005-04-06 21:32:41 mcr Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-netbios.c b/contrib/tcpdump/print-netbios.c
index 419953c..c92eb9e 100644
--- a/contrib/tcpdump/print-netbios.c
+++ b/contrib/tcpdump/print-netbios.c
@@ -24,7 +24,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-netbios.c,v 1.20 2003/11/16 09:36:29 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-netbios.c,v 1.20 2003-11-16 09:36:29 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-nfs.c b/contrib/tcpdump/print-nfs.c
index e47f0f6..c648357 100644
--- a/contrib/tcpdump/print-nfs.c
+++ b/contrib/tcpdump/print-nfs.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-nfs.c,v 1.106.2.4 2007/06/15 23:17:40 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-nfs.c,v 1.110.2.1 2007-12-22 03:08:45 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -51,7 +51,7 @@ static const char rcsid[] _U_ =
#include "rpc_msg.h"
static void nfs_printfh(const u_int32_t *, const u_int);
-static void xid_map_enter(const struct sunrpc_msg *, const u_char *);
+static int xid_map_enter(const struct sunrpc_msg *, const u_char *);
static int32_t xid_map_find(const struct sunrpc_msg *, const u_char *,
u_int32_t *, u_int32_t *);
static void interp_reply(const struct sunrpc_msg *, u_int32_t, u_int32_t, int);
@@ -299,6 +299,7 @@ nfsreply_print(register const u_char *bp, u_int length,
nfserr = 0; /* assume no error */
rp = (const struct sunrpc_msg *)bp;
+ TCHECK(rp->rm_xid);
if (!nflag) {
strlcpy(srcid, "nfs", sizeof(srcid));
snprintf(dstid, sizeof(dstid), "%u",
@@ -309,6 +310,7 @@ nfsreply_print(register const u_char *bp, u_int length,
EXTRACT_32BITS(&rp->rm_xid));
}
print_nfsaddr(bp2, srcid, dstid);
+ TCHECK(rp->rm_reply.rp_stat);
reply_stat = EXTRACT_32BITS(&rp->rm_reply.rp_stat);
switch (reply_stat) {
@@ -320,10 +322,12 @@ nfsreply_print(register const u_char *bp, u_int length,
case SUNRPC_MSG_DENIED:
(void)printf("reply ERR %u: ", length);
+ TCHECK(rp->rm_reply.rp_reject.rj_stat);
rstat = EXTRACT_32BITS(&rp->rm_reply.rp_reject.rj_stat);
switch (rstat) {
case SUNRPC_RPC_MISMATCH:
+ TCHECK(rp->rm_reply.rp_reject.rj_vers.high);
rlow = EXTRACT_32BITS(&rp->rm_reply.rp_reject.rj_vers.low);
rhigh = EXTRACT_32BITS(&rp->rm_reply.rp_reject.rj_vers.high);
(void)printf("RPC Version mismatch (%u-%u)",
@@ -331,6 +335,7 @@ nfsreply_print(register const u_char *bp, u_int length,
break;
case SUNRPC_AUTH_ERROR:
+ TCHECK(rp->rm_reply.rp_reject.rj_why);
rwhy = EXTRACT_32BITS(&rp->rm_reply.rp_reject.rj_why);
(void)printf("Auth ");
switch (rwhy) {
@@ -386,6 +391,11 @@ nfsreply_print(register const u_char *bp, u_int length,
reply_stat, length);
break;
}
+ return;
+
+trunc:
+ if (!nfserr)
+ fputs(" [|nfs]", stdout);
}
/*
@@ -505,6 +515,8 @@ nfsreq_print(register const u_char *bp, u_int length,
nfserr = 0; /* assume no error */
rp = (const struct sunrpc_msg *)bp;
+
+ TCHECK(rp->rm_xid);
if (!nflag) {
snprintf(srcid, sizeof(srcid), "%u",
EXTRACT_32BITS(&rp->rm_xid));
@@ -517,7 +529,8 @@ nfsreq_print(register const u_char *bp, u_int length,
print_nfsaddr(bp2, srcid, dstid);
(void)printf("%d", length);
- xid_map_enter(rp, bp2); /* record proc number for later on */
+ if (!xid_map_enter(rp, bp2)) /* record proc number for later on */
+ goto trunc;
v3 = (EXTRACT_32BITS(&rp->rm_call.cb_vers) == NFS_VER3);
proc = EXTRACT_32BITS(&rp->rm_call.cb_proc);
@@ -888,7 +901,7 @@ struct xid_map_entry xid_map[XIDMAPSIZE];
int xid_map_next = 0;
int xid_map_hint = 0;
-static void
+static int
xid_map_enter(const struct sunrpc_msg *rp, const u_char *bp)
{
struct ip *ip = NULL;
@@ -897,6 +910,8 @@ xid_map_enter(const struct sunrpc_msg *rp, const u_char *bp)
#endif
struct xid_map_entry *xmep;
+ if (!TTEST(rp->rm_call.cb_vers))
+ return (0);
switch (IP_V((struct ip *)bp)) {
case 4:
ip = (struct ip *)bp;
@@ -907,7 +922,7 @@ xid_map_enter(const struct sunrpc_msg *rp, const u_char *bp)
break;
#endif
default:
- return;
+ return (1);
}
xmep = &xid_map[xid_map_next];
@@ -930,6 +945,7 @@ xid_map_enter(const struct sunrpc_msg *rp, const u_char *bp)
#endif
xmep->proc = EXTRACT_32BITS(&rp->rm_call.cb_proc);
xmep->vers = EXTRACT_32BITS(&rp->rm_call.cb_vers);
+ return (1);
}
/*
diff --git a/contrib/tcpdump/print-ntp.c b/contrib/tcpdump/print-ntp.c
index 9e8ccfa..8676cbe 100644
--- a/contrib/tcpdump/print-ntp.c
+++ b/contrib/tcpdump/print-ntp.c
@@ -27,7 +27,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.41.2.1 2005/05/06 07:57:18 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.42 2005-05-06 07:56:53 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-null.c b/contrib/tcpdump/print-null.c
index b525600..ba26733 100644
--- a/contrib/tcpdump/print-null.c
+++ b/contrib/tcpdump/print-null.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.53.2.4 2007/02/26 13:31:33 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.57 2006-03-23 14:58:44 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -38,12 +38,12 @@ static const char rcsid[] _U_ =
#include "interface.h"
#include "addrtoname.h"
-#include "af.h"
#include "ip.h"
#ifdef INET6
#include "ip6.h"
#endif
+#include "af.h"
/*
* The DLT_NULL packet header is 4 bytes long. It contains a host-byte-order
@@ -57,7 +57,6 @@ static const char rcsid[] _U_ =
*/
#define NULL_HDRLEN 4
-
/*
* Byte-swap a 32-bit number.
* ("htonl()" or "ntohl()" won't work - we want to byte-swap even on
diff --git a/contrib/tcpdump/print-ospf.c b/contrib/tcpdump/print-ospf.c
index fd8f111..4490496 100644
--- a/contrib/tcpdump/print-ospf.c
+++ b/contrib/tcpdump/print-ospf.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.56.2.4 2006/12/13 08:24:27 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ospf.c,v 1.66 2007-10-08 07:53:21 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -44,11 +44,11 @@ static const char rcsid[] _U_ =
#include "ip.h"
static struct tok ospf_option_values[] = {
- { OSPF_OPTION_T, "TOS" },
+ { OSPF_OPTION_T, "MultiTopology" }, /* draft-ietf-ospf-mt-09 */
{ OSPF_OPTION_E, "External" },
{ OSPF_OPTION_MC, "Multicast" },
{ OSPF_OPTION_NP, "NSSA" },
- { OSPF_OPTION_EA, "Advertise External" },
+ { OSPF_OPTION_L, "LLS" },
{ OSPF_OPTION_DC, "Demand Circuit" },
{ OSPF_OPTION_O, "Opaque" },
{ OSPF_OPTION_DN, "Up/Down" },
@@ -98,6 +98,7 @@ static struct tok ospf_dd_flag_values[] = {
{ OSPF_DB_INIT, "Init" },
{ OSPF_DB_MORE, "More" },
{ OSPF_DB_MASTER, "Master" },
+ { OSPF_DB_RESYNC, "OOBResync" },
{ 0, NULL }
};
@@ -172,7 +173,19 @@ static struct tok lsa_opaque_ri_tlv_cap_values[] = {
{ 0, NULL }
};
-static char tstr[] = " [|ospf]";
+static struct tok ospf_lls_tlv_values[] = {
+ { OSPF_LLS_EO, "Extended Options" },
+ { OSPF_LLS_MD5, "MD5 Authentication" },
+ { 0, NULL }
+};
+
+static struct tok ospf_lls_eo_options[] = {
+ { OSPF_LLS_EO_LR, "LSDB resync" },
+ { OSPF_LLS_EO_RS, "Restart" },
+ { 0, NULL }
+};
+
+static char tstr[] = " [|ospf2]";
#ifdef WIN32
#define inline __inline
@@ -181,6 +194,274 @@ static char tstr[] = " [|ospf]";
static int ospf_print_lshdr(const struct lsa_hdr *);
static const u_char *ospf_print_lsa(const struct lsa *);
static int ospf_decode_v2(const struct ospfhdr *, const u_char *);
+static int ospf_decode_lls(const struct ospfhdr *, register u_int);
+
+int
+ospf_print_grace_lsa (u_int8_t *tptr, u_int ls_length) {
+
+ u_int tlv_type, tlv_length;
+
+
+ while (ls_length > 0) {
+ TCHECK2(*tptr, 4);
+ if (ls_length < 4) {
+ printf("\n\t Remaining LS length %u < 4", ls_length);
+ return -1;
+ }
+ tlv_type = EXTRACT_16BITS(tptr);
+ tlv_length = EXTRACT_16BITS(tptr+2);
+ tptr+=4;
+ ls_length-=4;
+
+ printf("\n\t %s TLV (%u), length %u, value: ",
+ tok2str(lsa_opaque_grace_tlv_values,"unknown",tlv_type),
+ tlv_type,
+ tlv_length);
+
+ if (tlv_length > ls_length) {
+ printf("\n\t Bogus length %u > %u", tlv_length,
+ ls_length);
+ return -1;
+ }
+
+ /* Infinite loop protection. */
+ if (tlv_type == 0 || tlv_length ==0) {
+ return -1;
+ }
+
+ TCHECK2(*tptr, tlv_length);
+ switch(tlv_type) {
+
+ case LS_OPAQUE_GRACE_TLV_PERIOD:
+ if (tlv_length != 4) {
+ printf("\n\t Bogus length %u != 4", tlv_length);
+ return -1;
+ }
+ printf("%us",EXTRACT_32BITS(tptr));
+ break;
+
+ case LS_OPAQUE_GRACE_TLV_REASON:
+ if (tlv_length != 1) {
+ printf("\n\t Bogus length %u != 1", tlv_length);
+ return -1;
+ }
+ printf("%s (%u)",
+ tok2str(lsa_opaque_grace_tlv_reason_values, "Unknown", *tptr),
+ *tptr);
+ break;
+
+ case LS_OPAQUE_GRACE_TLV_INT_ADDRESS:
+ if (tlv_length != 4) {
+ printf("\n\t Bogus length %u != 4", tlv_length);
+ return -1;
+ }
+ printf("%s", ipaddr_string(tptr));
+ break;
+
+ default:
+ if (vflag <= 1) {
+ if(!print_unknown_data(tptr,"\n\t ",tlv_length))
+ return -1;
+ }
+ break;
+
+ }
+ /* in OSPF everything has to be 32-bit aligned, including TLVs */
+ if (tlv_length%4 != 0)
+ tlv_length+=4-(tlv_length%4);
+ ls_length-=tlv_length;
+ tptr+=tlv_length;
+ }
+
+ return 0;
+trunc:
+ return -1;
+}
+
+int
+ospf_print_te_lsa (u_int8_t *tptr, u_int ls_length) {
+
+ u_int tlv_type, tlv_length, subtlv_type, subtlv_length;
+ u_int priority_level, te_class, count_srlg;
+ union { /* int to float conversion buffer for several subTLVs */
+ float f;
+ u_int32_t i;
+ } bw;
+
+ while (ls_length != 0) {
+ TCHECK2(*tptr, 4);
+ if (ls_length < 4) {
+ printf("\n\t Remaining LS length %u < 4", ls_length);
+ return -1;
+ }
+ tlv_type = EXTRACT_16BITS(tptr);
+ tlv_length = EXTRACT_16BITS(tptr+2);
+ tptr+=4;
+ ls_length-=4;
+
+ printf("\n\t %s TLV (%u), length: %u",
+ tok2str(lsa_opaque_te_tlv_values,"unknown",tlv_type),
+ tlv_type,
+ tlv_length);
+
+ if (tlv_length > ls_length) {
+ printf("\n\t Bogus length %u > %u", tlv_length,
+ ls_length);
+ return -1;
+ }
+
+ /* Infinite loop protection. */
+ if (tlv_type == 0 || tlv_length ==0) {
+ return -1;
+ }
+
+ switch(tlv_type) {
+ case LS_OPAQUE_TE_TLV_LINK:
+ while (tlv_length >= sizeof(subtlv_type) + sizeof(subtlv_length)) {
+ if (tlv_length < 4) {
+ printf("\n\t Remaining TLV length %u < 4",
+ tlv_length);
+ return -1;
+ }
+ TCHECK2(*tptr, 4);
+ subtlv_type = EXTRACT_16BITS(tptr);
+ subtlv_length = EXTRACT_16BITS(tptr+2);
+ tptr+=4;
+ tlv_length-=4;
+
+ printf("\n\t %s subTLV (%u), length: %u",
+ tok2str(lsa_opaque_te_link_tlv_subtlv_values,"unknown",subtlv_type),
+ subtlv_type,
+ subtlv_length);
+
+ TCHECK2(*tptr, subtlv_length);
+ switch(subtlv_type) {
+ case LS_OPAQUE_TE_LINK_SUBTLV_ADMIN_GROUP:
+ printf(", 0x%08x", EXTRACT_32BITS(tptr));
+ break;
+ case LS_OPAQUE_TE_LINK_SUBTLV_LINK_ID:
+ case LS_OPAQUE_TE_LINK_SUBTLV_LINK_LOCAL_REMOTE_ID:
+ printf(", %s (0x%08x)",
+ ipaddr_string(tptr),
+ EXTRACT_32BITS(tptr));
+ if (subtlv_length == 8) /* rfc4203 */
+ printf(", %s (0x%08x)",
+ ipaddr_string(tptr+4),
+ EXTRACT_32BITS(tptr+4));
+ break;
+ case LS_OPAQUE_TE_LINK_SUBTLV_LOCAL_IP:
+ case LS_OPAQUE_TE_LINK_SUBTLV_REMOTE_IP:
+ printf(", %s", ipaddr_string(tptr));
+ break;
+ case LS_OPAQUE_TE_LINK_SUBTLV_MAX_BW:
+ case LS_OPAQUE_TE_LINK_SUBTLV_MAX_RES_BW:
+ bw.i = EXTRACT_32BITS(tptr);
+ printf(", %.3f Mbps", bw.f*8/1000000 );
+ break;
+ case LS_OPAQUE_TE_LINK_SUBTLV_UNRES_BW:
+ for (te_class = 0; te_class < 8; te_class++) {
+ bw.i = EXTRACT_32BITS(tptr+te_class*4);
+ printf("\n\t\tTE-Class %u: %.3f Mbps",
+ te_class,
+ bw.f*8/1000000 );
+ }
+ break;
+ case LS_OPAQUE_TE_LINK_SUBTLV_BW_CONSTRAINTS:
+ printf("\n\t\tBandwidth Constraints Model ID: %s (%u)",
+ tok2str(diffserv_te_bc_values, "unknown", *tptr),
+ *tptr);
+ /* decode BCs until the subTLV ends */
+ for (te_class = 0; te_class < (subtlv_length-4)/4; te_class++) {
+ bw.i = EXTRACT_32BITS(tptr+4+te_class*4);
+ printf("\n\t\t Bandwidth constraint CT%u: %.3f Mbps",
+ te_class,
+ bw.f*8/1000000 );
+ }
+ break;
+ case LS_OPAQUE_TE_LINK_SUBTLV_TE_METRIC:
+ printf(", Metric %u", EXTRACT_32BITS(tptr));
+ break;
+ case LS_OPAQUE_TE_LINK_SUBTLV_LINK_PROTECTION_TYPE:
+ printf(", %s, Priority %u",
+ bittok2str(gmpls_link_prot_values, "none", *tptr),
+ *(tptr+1));
+ break;
+ case LS_OPAQUE_TE_LINK_SUBTLV_INTF_SW_CAP_DESCR:
+ printf("\n\t\tInterface Switching Capability: %s",
+ tok2str(gmpls_switch_cap_values, "Unknown", *(tptr)));
+ printf("\n\t\tLSP Encoding: %s\n\t\tMax LSP Bandwidth:",
+ tok2str(gmpls_encoding_values, "Unknown", *(tptr+1)));
+ for (priority_level = 0; priority_level < 8; priority_level++) {
+ bw.i = EXTRACT_32BITS(tptr+4+(priority_level*4));
+ printf("\n\t\t priority level %d: %.3f Mbps",
+ priority_level,
+ bw.f*8/1000000 );
+ }
+ break;
+ case LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE:
+ printf(", %s (%u)",
+ tok2str(lsa_opaque_te_tlv_link_type_sub_tlv_values,"unknown",*tptr),
+ *tptr);
+ break;
+
+ case LS_OPAQUE_TE_LINK_SUBTLV_SHARED_RISK_GROUP:
+ count_srlg = subtlv_length / 4;
+ if (count_srlg != 0)
+ printf("\n\t\t Shared risk group: ");
+ while (count_srlg > 0) {
+ bw.i = EXTRACT_32BITS(tptr);
+ printf("%d",bw.i);
+ tptr+=4;
+ count_srlg--;
+ if (count_srlg > 0)
+ printf(", ");
+ }
+ break;
+
+ default:
+ if (vflag <= 1) {
+ if(!print_unknown_data(tptr,"\n\t\t",subtlv_length))
+ return -1;
+ }
+ break;
+ }
+ /* in OSPF everything has to be 32-bit aligned, including subTLVs */
+ if (subtlv_length%4 != 0)
+ subtlv_length+=4-(subtlv_length%4);
+
+ tlv_length-=subtlv_length;
+ tptr+=subtlv_length;
+
+ }
+ break;
+
+ case LS_OPAQUE_TE_TLV_ROUTER:
+ if (tlv_length < 4) {
+ printf("\n\t TLV length %u < 4", tlv_length);
+ return -1;
+ }
+ TCHECK2(*tptr, 4);
+ printf(", %s", ipaddr_string(tptr));
+ break;
+
+ default:
+ if (vflag <= 1) {
+ if(!print_unknown_data(tptr,"\n\t ",tlv_length))
+ return -1;
+ }
+ break;
+ }
+ /* in OSPF everything has to be 32-bit aligned, including TLVs */
+ if (tlv_length%4 != 0)
+ tlv_length+=4-(tlv_length%4);
+ ls_length-=tlv_length;
+ tptr+=tlv_length;
+ }
+ return 0;
+trunc:
+ return -1;
+}
+
static int
ospf_print_lshdr(register const struct lsa_hdr *lshp)
@@ -190,13 +471,13 @@ ospf_print_lshdr(register const struct lsa_hdr *lshp)
TCHECK(lshp->ls_length);
ls_length = EXTRACT_16BITS(&lshp->ls_length);
if (ls_length < sizeof(struct lsa_hdr)) {
- printf("\n\t Bogus length %u < %lu", ls_length,
+ printf("\n\t Bogus length %u < header (%lu)", ls_length,
(unsigned long)sizeof(struct lsa_hdr));
return(-1);
}
TCHECK(lshp->ls_seq); /* XXX - ls_length check checked this */
- printf("\n\t Advertising Router: %s, seq 0x%08x, age %us, length: %u",
+ printf("\n\t Advertising Router %s, seq 0x%08x, age %us, length %u",
ipaddr_string(&lshp->ls_router),
EXTRACT_32BITS(&lshp->ls_seq),
EXTRACT_16BITS(&lshp->ls_age),
@@ -208,7 +489,7 @@ ospf_print_lshdr(register const struct lsa_hdr *lshp)
case LS_TYPE_OPAQUE_LL:
case LS_TYPE_OPAQUE_AL:
case LS_TYPE_OPAQUE_DW:
- printf("\n\t %s LSA (%d), Opaque-Type: %s LSA (%u), Opaque-ID: %u",
+ printf("\n\t %s LSA (%d), Opaque-Type %s LSA (%u), Opaque-ID %u",
tok2str(lsa_values,"unknown",lshp->ls_type),
lshp->ls_type,
@@ -238,6 +519,41 @@ trunc:
return (-1);
}
+/* draft-ietf-ospf-mt-09 */
+static struct tok ospf_topology_values[] = {
+ { 0, "default " },
+ { 1, "multicast " },
+ { 2, "management " },
+ { 0, NULL }
+};
+
+/*
+ * Print all the per-topology metrics.
+ */
+static void
+ospf_print_tos_metrics(const union un_tos *tos)
+{
+ int metric_count;
+ int toscount;
+
+ toscount = tos->link.link_tos_count+1;
+ metric_count = 0;
+
+ /*
+ * All but the first metric contain a valid topology id.
+ */
+ while (toscount) {
+ printf("\n\t\ttopology %s(%u), metric %u",
+ tok2str(ospf_topology_values, "",
+ metric_count ? tos->metrics.tos_type : 0),
+ metric_count ? tos->metrics.tos_type : 0,
+ EXTRACT_16BITS(&tos->metrics.tos_metric));
+ metric_count++;
+ tos++;
+ toscount--;
+ }
+}
+
/*
* Print a single link state advertisement. If truncated or if LSA length
* field is less than the length of the LSA header, return NULl, else
@@ -248,19 +564,13 @@ ospf_print_lsa(register const struct lsa *lsap)
{
register const u_int8_t *ls_end;
register const struct rlalink *rlp;
- register const struct tos_metric *tosp;
register const struct in_addr *ap;
register const struct aslametric *almp;
register const struct mcla *mcp;
register const u_int32_t *lp;
- register int j, k, tlv_type, tlv_length, subtlv_type, subtlv_length, priority_level, te_class;
+ register int j, tlv_type, tlv_length, topology;
register int ls_length;
const u_int8_t *tptr;
- int count_srlg;
- union { /* int to float conversion buffer for several subTLVs */
- float f;
- u_int32_t i;
- } bw;
tptr = (u_int8_t *)lsap->lsa_un.un_unknown; /* squelch compiler warnings */
ls_length = ospf_print_lshdr(&lsap->ls_hdr);
@@ -281,7 +591,7 @@ ospf_print_lsa(register const struct lsa *lsap)
rlp = lsap->lsa_un.un_rla.rla_link;
while (j--) {
TCHECK(*rlp);
- switch (rlp->link_type) {
+ switch (rlp->un_tos.link.link_type) {
case RLA_TYPE_VIRTUAL:
printf("\n\t Virtual Link: Neighbor Router-ID: %s, Interface Address: %s",
@@ -309,20 +619,14 @@ ospf_print_lsa(register const struct lsa *lsap)
default:
printf("\n\t Unknown Router Link Type (%u)",
- rlp->link_type);
+ rlp->un_tos.link.link_type);
return (ls_end);
}
- printf(", tos 0, metric: %d", EXTRACT_16BITS(&rlp->link_tos0metric));
- tosp = (struct tos_metric *)
- ((sizeof rlp->link_tos0metric) + (u_char *) rlp);
- for (k = 0; k < (int) rlp->link_toscount; ++k, ++tosp) {
- TCHECK(*tosp);
- printf(", tos %d, metric: %d",
- tosp->tos_type,
- EXTRACT_16BITS(&tosp->tos_metric));
- }
+
+ ospf_print_tos_metrics(&rlp->un_tos);
+
rlp = (struct rlalink *)((u_char *)(rlp + 1) +
- ((rlp->link_toscount) * sizeof(*tosp)));
+ ((rlp->un_tos.link.link_tos_count) * sizeof(union un_tos)));
}
break;
@@ -344,19 +648,16 @@ ospf_print_lsa(register const struct lsa *lsap)
ipaddr_string(&lsap->lsa_un.un_sla.sla_mask));
TCHECK(lsap->lsa_un.un_sla.sla_tosmetric);
lp = lsap->lsa_un.un_sla.sla_tosmetric;
- /* suppress tos if its not supported */
- if(!((lsap->ls_hdr.ls_options)&OSPF_OPTION_T)) {
- printf(", metric: %u", EXTRACT_32BITS(lp)&SLA_MASK_METRIC);
- break;
- }
while ((u_char *)lp < ls_end) {
register u_int32_t ul;
TCHECK(*lp);
ul = EXTRACT_32BITS(lp);
- printf(", tos %d metric %d",
- (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS,
- ul & SLA_MASK_METRIC);
+ topology = (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS;
+ printf("\n\t\ttopology %s(%u) metric %d",
+ tok2str(ospf_topology_values, "", topology),
+ topology,
+ ul & SLA_MASK_METRIC);
++lp;
}
break;
@@ -364,19 +665,16 @@ ospf_print_lsa(register const struct lsa *lsap)
case LS_TYPE_SUM_ABR:
TCHECK(lsap->lsa_un.un_sla.sla_tosmetric);
lp = lsap->lsa_un.un_sla.sla_tosmetric;
- /* suppress tos if its not supported */
- if(!((lsap->ls_hdr.ls_options)&OSPF_OPTION_T)) {
- printf(", metric: %u", EXTRACT_32BITS(lp)&SLA_MASK_METRIC);
- break;
- }
while ((u_char *)lp < ls_end) {
register u_int32_t ul;
TCHECK(*lp);
ul = EXTRACT_32BITS(lp);
- printf(", tos %d metric %d",
- (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS,
- ul & SLA_MASK_METRIC);
+ topology = (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS;
+ printf("\n\t\ttopology %s(%u) metric %d",
+ tok2str(ospf_topology_values, "", topology),
+ topology,
+ ul & SLA_MASK_METRIC);
++lp;
}
break;
@@ -394,9 +692,11 @@ ospf_print_lsa(register const struct lsa *lsap)
TCHECK(almp->asla_tosmetric);
ul = EXTRACT_32BITS(&almp->asla_tosmetric);
- printf(", type %d, tos %d metric:",
- (ul & ASLA_FLAG_EXTERNAL) ? 2 : 1,
- (ul & ASLA_MASK_TOS) >> ASLA_SHIFT_TOS);
+ topology = ((ul & ASLA_MASK_TOS) >> ASLA_SHIFT_TOS);
+ printf("\n\t\ttopology %s(%u), type %d, metric",
+ tok2str(ospf_topology_values, "", topology),
+ topology,
+ (ul & ASLA_FLAG_EXTERNAL) ? 2 : 1);
if ((ul & ASLA_MASK_METRIC)==0xffffff)
printf(" infinite");
else
@@ -471,7 +771,6 @@ ospf_print_lsa(register const struct lsa *lsap)
ls_length);
return(ls_end);
}
- ls_length-=tlv_length;
TCHECK2(*tptr, tlv_length);
switch(tlv_type) {
@@ -492,245 +791,32 @@ ospf_print_lsa(register const struct lsa *lsap)
}
tptr+=tlv_length;
+ ls_length-=tlv_length;
}
-
break;
- case LS_OPAQUE_TYPE_GRACE:
- tptr = (u_int8_t *)(&lsap->lsa_un.un_grace_tlv.type);
-
- while (ls_length != 0) {
- TCHECK2(*tptr, 4);
- if (ls_length < 4) {
- printf("\n\t Remaining LS length %u < 4", ls_length);
- return(ls_end);
- }
- tlv_type = EXTRACT_16BITS(tptr);
- tlv_length = EXTRACT_16BITS(tptr+2);
- tptr+=4;
- ls_length-=4;
-
- printf("\n\t %s TLV (%u), length: %u, value: ",
- tok2str(lsa_opaque_grace_tlv_values,"unknown",tlv_type),
- tlv_type,
- tlv_length);
-
- if (tlv_length > ls_length) {
- printf("\n\t Bogus length %u > %u", tlv_length,
- ls_length);
- return(ls_end);
- }
- ls_length-=tlv_length;
- TCHECK2(*tptr, tlv_length);
- switch(tlv_type) {
-
- case LS_OPAQUE_GRACE_TLV_PERIOD:
- if (tlv_length != 4) {
- printf("\n\t Bogus length %u != 4", tlv_length);
- return(ls_end);
- }
- printf("%us",EXTRACT_32BITS(tptr));
- break;
- case LS_OPAQUE_GRACE_TLV_REASON:
- if (tlv_length != 1) {
- printf("\n\t Bogus length %u != 1", tlv_length);
- return(ls_end);
- }
- printf("%s (%u)",
- tok2str(lsa_opaque_grace_tlv_reason_values, "Unknown", *tptr),
- *tptr);
- break;
- case LS_OPAQUE_GRACE_TLV_INT_ADDRESS:
- if (tlv_length != 4) {
- printf("\n\t Bogus length %u != 4", tlv_length);
- return(ls_end);
- }
- printf("%s", ipaddr_string(tptr));
- break;
- default:
- if (vflag <= 1) {
- if(!print_unknown_data(tptr,"\n\t ",tlv_length))
- return(ls_end);
- }
- break;
- }
- tptr+=tlv_length;
+ case LS_OPAQUE_TYPE_GRACE:
+ if (ospf_print_grace_lsa((u_int8_t *)(&lsap->lsa_un.un_grace_tlv.type),
+ ls_length) == -1) {
+ return(ls_end);
}
-
break;
- case LS_OPAQUE_TYPE_TE:
- tptr = (u_int8_t *)(&lsap->lsa_un.un_te_lsa_tlv.type);
- while (ls_length != 0) {
- TCHECK2(*tptr, 4);
- if (ls_length < 4) {
- printf("\n\t Remaining LS length %u < 4", ls_length);
- return(ls_end);
- }
- tlv_type = EXTRACT_16BITS(tptr);
- tlv_length = EXTRACT_16BITS(tptr+2);
- tptr+=4;
- ls_length-=4;
-
- printf("\n\t %s TLV (%u), length: %u",
- tok2str(lsa_opaque_te_tlv_values,"unknown",tlv_type),
- tlv_type,
- tlv_length);
+ case LS_OPAQUE_TYPE_TE:
+ if (ospf_print_te_lsa((u_int8_t *)(&lsap->lsa_un.un_te_lsa_tlv.type),
+ ls_length) == -1) {
+ return(ls_end);
+ }
+ break;
- if (tlv_length > ls_length) {
- printf("\n\t Bogus length %u > %u", tlv_length,
- ls_length);
+ default:
+ if (vflag <= 1) {
+ if(!print_unknown_data((u_int8_t *)lsap->lsa_un.un_unknown,
+ "\n\t ", ls_length))
return(ls_end);
- }
- ls_length-=tlv_length;
- switch(tlv_type) {
- case LS_OPAQUE_TE_TLV_LINK:
- while (tlv_length != 0) {
- if (tlv_length < 4) {
- printf("\n\t Remaining TLV length %u < 4",
- tlv_length);
- return(ls_end);
- }
- TCHECK2(*tptr, 4);
- subtlv_type = EXTRACT_16BITS(tptr);
- subtlv_length = EXTRACT_16BITS(tptr+2);
- tptr+=4;
- tlv_length-=4;
-
- printf("\n\t %s subTLV (%u), length: %u",
- tok2str(lsa_opaque_te_link_tlv_subtlv_values,"unknown",subtlv_type),
- subtlv_type,
- subtlv_length);
-
- TCHECK2(*tptr, subtlv_length);
- switch(subtlv_type) {
- case LS_OPAQUE_TE_LINK_SUBTLV_ADMIN_GROUP:
- printf(", 0x%08x", EXTRACT_32BITS(tptr));
- break;
- case LS_OPAQUE_TE_LINK_SUBTLV_LINK_ID:
- case LS_OPAQUE_TE_LINK_SUBTLV_LINK_LOCAL_REMOTE_ID:
- printf(", %s (0x%08x)",
- ipaddr_string(tptr),
- EXTRACT_32BITS(tptr));
- if (subtlv_length == 8) /* draft-ietf-ccamp-ospf-gmpls-extensions */
- printf(", %s (0x%08x)",
- ipaddr_string(tptr+4),
- EXTRACT_32BITS(tptr+4));
- break;
- case LS_OPAQUE_TE_LINK_SUBTLV_LOCAL_IP:
- case LS_OPAQUE_TE_LINK_SUBTLV_REMOTE_IP:
- printf(", %s", ipaddr_string(tptr));
- break;
- case LS_OPAQUE_TE_LINK_SUBTLV_MAX_BW:
- case LS_OPAQUE_TE_LINK_SUBTLV_MAX_RES_BW:
- bw.i = EXTRACT_32BITS(tptr);
- printf(", %.3f Mbps", bw.f*8/1000000 );
- break;
- case LS_OPAQUE_TE_LINK_SUBTLV_UNRES_BW:
- for (te_class = 0; te_class < 8; te_class++) {
- bw.i = EXTRACT_32BITS(tptr+te_class*4);
- printf("\n\t\tTE-Class %u: %.3f Mbps",
- te_class,
- bw.f*8/1000000 );
- }
- break;
- case LS_OPAQUE_TE_LINK_SUBTLV_BW_CONSTRAINTS:
- printf("\n\t\tBandwidth Constraints Model ID: %s (%u)",
- tok2str(diffserv_te_bc_values, "unknown", *tptr),
- *tptr);
- /* decode BCs until the subTLV ends */
- for (te_class = 0; te_class < (subtlv_length-4)/4; te_class++) {
- bw.i = EXTRACT_32BITS(tptr+4+te_class*4);
- printf("\n\t\t Bandwidth constraint CT%u: %.3f Mbps",
- te_class,
- bw.f*8/1000000 );
- }
- break;
- case LS_OPAQUE_TE_LINK_SUBTLV_TE_METRIC:
- printf(", Metric %u", EXTRACT_32BITS(tptr));
- break;
- case LS_OPAQUE_TE_LINK_SUBTLV_LINK_PROTECTION_TYPE:
- printf(", %s, Priority %u",
- bittok2str(gmpls_link_prot_values, "none", *tptr),
- *(tptr+1));
- break;
- case LS_OPAQUE_TE_LINK_SUBTLV_INTF_SW_CAP_DESCR:
- printf("\n\t\tInterface Switching Capability: %s",
- tok2str(gmpls_switch_cap_values, "Unknown", *(tptr)));
- printf("\n\t\tLSP Encoding: %s\n\t\tMax LSP Bandwidth:",
- tok2str(gmpls_encoding_values, "Unknown", *(tptr+1)));
- for (priority_level = 0; priority_level < 8; priority_level++) {
- bw.i = EXTRACT_32BITS(tptr+4+(priority_level*4));
- printf("\n\t\t priority level %d: %.3f Mbps",
- priority_level,
- bw.f*8/1000000 );
- }
- break;
- case LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE:
- printf(", %s (%u)",
- tok2str(lsa_opaque_te_tlv_link_type_sub_tlv_values,"unknown",*tptr),
- *tptr);
- break;
-
- case LS_OPAQUE_TE_LINK_SUBTLV_SHARED_RISK_GROUP:
- count_srlg = subtlv_length / 4;
- if (count_srlg != 0)
- printf("\n\t\t Shared risk group: ");
- while (count_srlg > 0) {
- bw.i = EXTRACT_32BITS(tptr);
- printf("%d",bw.i);
- tptr+=4;
- count_srlg--;
- if (count_srlg > 0)
- printf(", ");
- }
- break;
-
- default:
- if (vflag <= 1) {
- if(!print_unknown_data(tptr,"\n\t\t",subtlv_length))
- return(ls_end);
- }
- break;
- }
- /* in OSPF everything has to be 32-bit aligned, including TLVs */
- if (subtlv_length%4 != 0)
- subtlv_length+=4-(subtlv_length%4);
-
- tlv_length-=subtlv_length;
- tptr+=subtlv_length;
-
- }
- break;
-
- case LS_OPAQUE_TE_TLV_ROUTER:
- if (tlv_length < 4) {
- printf("\n\t TLV length %u < 4", tlv_length);
- return(ls_end);
- }
- TCHECK2(*tptr, 4);
- printf(", %s", ipaddr_string(tptr));
- break;
-
- default:
- if (vflag <= 1) {
- if(!print_unknown_data(tptr,"\n\t ",tlv_length))
- return(ls_end);
- }
- break;
- }
- tptr+=tlv_length;
- }
+ }
break;
- }
- break;
- default:
- if (vflag <= 1) {
- if(!print_unknown_data((u_int8_t *)lsap->lsa_un.un_unknown,
- "\n\t ", ls_length))
- return(ls_end);
- }
- break;
+ }
}
/* do we want to see an additionally hexdump ? */
@@ -746,6 +832,98 @@ trunc:
}
static int
+ospf_decode_lls(register const struct ospfhdr *op,
+ register u_int length)
+{
+ register const u_char *dptr;
+ register const u_char *dataend;
+ register u_int length2;
+ register u_int16_t lls_type, lls_len;
+ register u_int32_t lls_flags;
+
+ switch (op->ospf_type) {
+
+ case OSPF_TYPE_HELLO:
+ if (!(op->ospf_hello.hello_options & OSPF_OPTION_L))
+ return (0);
+ break;
+
+ case OSPF_TYPE_DD:
+ if (!(op->ospf_db.db_options & OSPF_OPTION_L))
+ return (0);
+ break;
+
+ default:
+ return (0);
+ }
+
+ /* dig deeper if LLS data is available; see RFC4813 */
+ length2 = EXTRACT_16BITS(&op->ospf_len);
+ dptr = (u_char *)op + length2;
+ dataend = (u_char *)op + length;
+
+ if (EXTRACT_16BITS(&op->ospf_authtype) == OSPF_AUTH_MD5) {
+ dptr = dptr + op->ospf_authdata[3];
+ length2 += op->ospf_authdata[3];
+ }
+ if (length2 >= length) {
+ printf("\n\t[LLS truncated]");
+ return (1);
+ }
+ TCHECK2(*dptr, 2);
+ printf("\n\t LLS: checksum: 0x%04x", (u_int)EXTRACT_16BITS(dptr));
+
+ dptr += 2;
+ TCHECK2(*dptr, 2);
+ length2 = EXTRACT_16BITS(dptr);
+ printf(", length: %u", length2);
+
+ dptr += 2;
+ TCHECK(*dptr);
+ while (dptr < dataend) {
+ TCHECK2(*dptr, 2);
+ lls_type = EXTRACT_16BITS(dptr);
+ printf("\n\t %s (%u)",
+ tok2str(ospf_lls_tlv_values,"Unknown TLV",lls_type),
+ lls_type);
+ dptr += 2;
+ TCHECK2(*dptr, 2);
+ lls_len = EXTRACT_16BITS(dptr);
+ printf(", length: %u", lls_len);
+ dptr += 2;
+ switch (lls_type) {
+
+ case OSPF_LLS_EO:
+ if (lls_len != 4) {
+ printf(" [should be 4]");
+ lls_len = 4;
+ }
+ TCHECK2(*dptr, 4);
+ lls_flags = EXTRACT_32BITS(dptr);
+ printf("\n\t Options: 0x%08x [%s]", lls_flags,
+ bittok2str(ospf_lls_eo_options,"?",lls_flags));
+
+ break;
+
+ case OSPF_LLS_MD5:
+ if (lls_len != 20) {
+ printf(" [should be 20]");
+ lls_len = 20;
+ }
+ TCHECK2(*dptr, 4);
+ printf("\n\t Sequence number: 0x%08x", EXTRACT_32BITS(dptr));
+ break;
+ }
+
+ dptr += lls_len;
+ }
+
+ return (0);
+trunc:
+ return (1);
+}
+
+static int
ospf_decode_v2(register const struct ospfhdr *op,
register const u_char *dataend)
{
@@ -765,11 +943,11 @@ ospf_decode_v2(register const struct ospfhdr *op,
break;
case OSPF_TYPE_HELLO:
- printf("\n\tOptions: [%s]",
+ printf("\n\tOptions [%s]",
bittok2str(ospf_option_values,"none",op->ospf_hello.hello_options));
TCHECK(op->ospf_hello.hello_deadint);
- printf("\n\t Hello Timer: %us, Dead Timer %us, Mask: %s, Priority: %u",
+ printf("\n\t Hello Timer %us, Dead Timer %us, Mask %s, Priority %u",
EXTRACT_16BITS(&op->ospf_hello.hello_helloint),
EXTRACT_32BITS(&op->ospf_hello.hello_deadint),
ipaddr_string(&op->ospf_hello.hello_mask),
@@ -797,19 +975,23 @@ ospf_decode_v2(register const struct ospfhdr *op,
case OSPF_TYPE_DD:
TCHECK(op->ospf_db.db_options);
- printf("\n\tOptions: [%s]",
+ printf("\n\tOptions [%s]",
bittok2str(ospf_option_values,"none",op->ospf_db.db_options));
TCHECK(op->ospf_db.db_flags);
- printf(", DD Flags: [%s]",
+ printf(", DD Flags [%s]",
bittok2str(ospf_dd_flag_values,"none",op->ospf_db.db_flags));
+ TCHECK(op->ospf_db.db_ifmtu);
+ if (op->ospf_db.db_ifmtu) {
+ printf(", MTU: %u", ntohs(op->ospf_db.db_ifmtu));
+ }
+ TCHECK(op->ospf_db.db_seq);
+ printf(", Sequence: 0x%08x", EXTRACT_32BITS(&op->ospf_db.db_seq));
- if (vflag) {
- /* Print all the LS adv's */
- lshp = op->ospf_db.db_lshdr;
- while (ospf_print_lshdr(lshp) != -1) {
- ++lshp;
- }
- }
+ /* Print all the LS adv's */
+ lshp = op->ospf_db.db_lshdr;
+ while (((u_char *)lshp < dataend) && ospf_print_lshdr(lshp) != -1) {
+ ++lshp;
+ }
break;
case OSPF_TYPE_LS_REQ:
@@ -863,7 +1045,6 @@ ospf_decode_v2(register const struct ospfhdr *op,
break;
default:
- printf("v2 type (%d)", op->ospf_type);
break;
}
return (0);
@@ -892,25 +1073,30 @@ ospf_print(register const u_char *bp, register u_int length,
/* value. If it's not valid, say so and return */
TCHECK(op->ospf_type);
cp = tok2str(type2str, "unknown LS-type", op->ospf_type);
- printf("OSPFv%u, %s, length: %u",
+ printf("OSPFv%u, %s, length %u",
op->ospf_version,
cp,
length);
if (*cp == 'u')
return;
- if(!vflag) /* non verbose - so lets bail out here */
+ if(!vflag) { /* non verbose - so lets bail out here */
return;
+ }
TCHECK(op->ospf_len);
if (length != EXTRACT_16BITS(&op->ospf_len)) {
printf(" [len %d]", EXTRACT_16BITS(&op->ospf_len));
- return;
}
- dataend = bp + length;
+
+ if (length > EXTRACT_16BITS(&op->ospf_len)) {
+ dataend = bp + EXTRACT_16BITS(&op->ospf_len);
+ } else {
+ dataend = bp + length;
+ }
TCHECK(op->ospf_routerid);
- printf("\n\tRouter-ID: %s", ipaddr_string(&op->ospf_routerid));
+ printf("\n\tRouter-ID %s", ipaddr_string(&op->ospf_routerid));
TCHECK(op->ospf_areaid);
if (op->ospf_areaid.s_addr != 0)
@@ -933,7 +1119,7 @@ ospf_print(register const u_char *bp, register u_int length,
case OSPF_AUTH_SIMPLE:
printf("\n\tSimple text password: ");
- safeputs(op->ospf_authdata, OSPF_AUTH_SIMPLE_LEN);
+ safeputs((const char *)op->ospf_authdata, OSPF_AUTH_SIMPLE_LEN);
break;
case OSPF_AUTH_MD5:
@@ -954,6 +1140,10 @@ ospf_print(register const u_char *bp, register u_int length,
/* ospf version 2 */
if (ospf_decode_v2(op, dataend))
goto trunc;
+ if (length > EXTRACT_16BITS(&op->ospf_len)) {
+ if (ospf_decode_lls(op, length))
+ goto trunc;
+ }
break;
default:
diff --git a/contrib/tcpdump/print-ospf6.c b/contrib/tcpdump/print-ospf6.c
index 6325a21..1100485 100644
--- a/contrib/tcpdump/print-ospf6.c
+++ b/contrib/tcpdump/print-ospf6.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ospf6.c,v 1.13 2003/11/16 09:36:31 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ospf6.c,v 1.15 2006-09-13 06:31:11 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -39,188 +39,120 @@ static const char rcsid[] _U_ =
#include "addrtoname.h"
#include "extract.h"
+#include "ospf.h"
#include "ospf6.h"
-struct bits {
- u_int32_t bit;
- const char *str;
+static const struct tok ospf6_option_values[] = {
+ { OSPF6_OPTION_V6, "V6" },
+ { OSPF6_OPTION_E, "External" },
+ { OSPF6_OPTION_MC, "Multicast" },
+ { OSPF6_OPTION_N, "NSSA" },
+ { OSPF6_OPTION_R, "Router" },
+ { OSPF6_OPTION_DC, "Demand Circuit" },
+ { 0, NULL }
};
-static const struct bits ospf6_option_bits[] = {
- { OSPF6_OPTION_V6, "V6" },
- { OSPF6_OPTION_E, "E" },
- { OSPF6_OPTION_MC, "MC" },
- { OSPF6_OPTION_N, "N" },
- { OSPF6_OPTION_R, "R" },
- { OSPF6_OPTION_DC, "DC" },
+static const struct tok ospf6_rla_flag_values[] = {
+ { RLA_FLAG_B, "ABR" },
+ { RLA_FLAG_E, "External" },
+ { RLA_FLAG_V, "Virtual-Link Endpoint" },
+ { RLA_FLAG_W, "Wildcard Receiver" },
+ { RLA_FLAG_N, "NSSA Translator" },
{ 0, NULL }
};
-static const struct bits ospf6_rla_flag_bits[] = {
- { RLA_FLAG_B, "B" },
- { RLA_FLAG_E, "E" },
- { RLA_FLAG_V, "V" },
- { RLA_FLAG_W, "W" },
+static const struct tok ospf6_asla_flag_values[] = {
+ { ASLA_FLAG_EXTERNAL, "External Type 2" },
+ { ASLA_FLAG_FWDADDR, "Fforwarding" },
+ { ASLA_FLAG_ROUTETAG, "Tag" },
{ 0, NULL }
};
-static const struct bits ospf6_asla_flag_bits[] = {
- { ASLA_FLAG_EXTERNAL, "E" },
- { ASLA_FLAG_FWDADDR, "F" },
- { ASLA_FLAG_ROUTETAG, "T" },
+static struct tok ospf6_type_values[] = {
+ { OSPF_TYPE_HELLO, "Hello" },
+ { OSPF_TYPE_DD, "Database Description" },
+ { OSPF_TYPE_LS_REQ, "LS-Request" },
+ { OSPF_TYPE_LS_UPDATE, "LS-Update" },
+ { OSPF_TYPE_LS_ACK, "LS-Ack" },
{ 0, NULL }
};
-static struct tok type2str[] = {
- { OSPF_TYPE_UMD, "umd" },
- { OSPF_TYPE_HELLO, "hello" },
- { OSPF_TYPE_DB, "dd" },
- { OSPF_TYPE_LSR, "ls_req" },
- { OSPF_TYPE_LSU, "ls_upd" },
- { OSPF_TYPE_LSA, "ls_ack" },
+static struct tok ospf6_lsa_values[] = {
+ { LS_TYPE_ROUTER, "Router" },
+ { LS_TYPE_NETWORK, "Network" },
+ { LS_TYPE_INTER_AP, "Inter-Area Prefix" },
+ { LS_TYPE_INTER_AR, "Inter-Area Router" },
+ { LS_TYPE_ASE, "External" },
+ { LS_TYPE_GROUP, "Multicast Group" },
+ { LS_TYPE_NSSA, "NSSA" },
+ { LS_TYPE_LINK, "Link" },
+ { LS_TYPE_INTRA_AP, "Intra-Area Prefix" },
+ { LS_TYPE_INTRA_ATE, "Intra-Area TE" },
+ { LS_TYPE_GRACE, "Grace" },
{ 0, NULL }
};
-static char tstr[] = " [|ospf]";
+static struct tok ospf6_ls_scope_values[] = {
+ { LS_SCOPE_LINKLOCAL, "Link Local" },
+ { LS_SCOPE_AREA, "Area Local" },
+ { LS_SCOPE_AS, "Domain Wide" },
+ { 0, NULL }
+};
+
+static struct tok ospf6_dd_flag_values[] = {
+ { OSPF6_DB_INIT, "Init" },
+ { OSPF6_DB_MORE, "More" },
+ { OSPF6_DB_MASTER, "Master" },
+ { 0, NULL }
+};
+
+static struct tok ospf6_lsa_prefix_option_values[] = {
+ { LSA_PREFIX_OPT_NU, "No Unicast" },
+ { LSA_PREFIX_OPT_LA, "Local address" },
+ { LSA_PREFIX_OPT_MC, "Multicast" },
+ { LSA_PREFIX_OPT_P, "Propagate" },
+ { LSA_PREFIX_OPT_DN, "Down" },
+ { 0, NULL }
+};
+
+static char tstr[] = " [|ospf3]";
#ifdef WIN32
#define inline __inline
#endif /* WIN32 */
/* Forwards */
-static inline void ospf6_print_seqage(u_int32_t, time_t);
-static inline void ospf6_print_bits(const struct bits *, u_char);
-static void ospf6_print_ls_type(u_int, const rtrid_t *,
- const rtrid_t *, const char *);
-static int ospf6_print_lshdr(const struct lsa_hdr *);
-static int ospf6_print_lsa(const struct lsa *);
+static void ospf6_print_ls_type(u_int, const rtrid_t *);
+static int ospf6_print_lshdr(const struct lsa6_hdr *);
+static int ospf6_print_lsa(const struct lsa6 *);
static int ospf6_decode_v3(const struct ospf6hdr *, const u_char *);
-static inline void
-ospf6_print_seqage(register u_int32_t seq, register time_t us)
-{
- register time_t sec = us % 60;
- register time_t mins = (us / 60) % 60;
- register time_t hour = us / 3600;
-
- printf(" S %X age ", seq);
- if (hour)
- printf("%u:%02u:%02u",
- (u_int32_t) hour, (u_int32_t) mins, (u_int32_t) sec);
- else if (mins)
- printf("%u:%02u", (u_int32_t) mins, (u_int32_t) sec);
- else
- printf("%u", (u_int32_t) sec);
-}
-
-
-static inline void
-ospf6_print_bits(register const struct bits *bp, register u_char options)
-{
- register char sep = ' ';
-
- do {
- if (options & bp->bit) {
- printf("%c%s", sep, bp->str);
- sep = '/';
- }
- } while ((++bp)->bit);
-}
static void
-ospf6_print_ls_type(register u_int ls_type,
- register const rtrid_t *ls_stateid,
- register const rtrid_t *ls_router, register const char *fmt)
+ospf6_print_ls_type(register u_int ls_type, register const rtrid_t *ls_stateid)
{
- const char *scope;
-
- switch (ls_type & LS_SCOPE_MASK) {
- case LS_SCOPE_LINKLOCAL:
- scope = "linklocal-";
- break;
- case LS_SCOPE_AREA:
- scope = "area-";
- break;
- case LS_SCOPE_AS:
- scope = "AS-";
- break;
- default:
- scope = "";
- break;
- }
-
- switch (ls_type & LS_TYPE_MASK) {
- case LS_TYPE_ROUTER:
- printf(" %srtr %s", scope, ipaddr_string(ls_router));
- break;
-
- case LS_TYPE_NETWORK:
- printf(" %snet dr %s if %s", scope,
- ipaddr_string(ls_router),
- ipaddr_string(ls_stateid));
- break;
-
- case LS_TYPE_INTER_AP:
- printf(" %sinter-area-prefix %s abr %s", scope,
- ipaddr_string(ls_stateid),
- ipaddr_string(ls_router));
- break;
-
- case LS_TYPE_INTER_AR:
- printf(" %sinter-area-router %s rtr %s", scope,
- ipaddr_string(ls_router),
- ipaddr_string(ls_stateid));
- break;
-
- case LS_TYPE_ASE:
- printf(" %sase %s asbr %s", scope,
- ipaddr_string(ls_stateid),
- ipaddr_string(ls_router));
- break;
-
- case LS_TYPE_GROUP:
- printf(" %sgroup %s rtr %s", scope,
- ipaddr_string(ls_stateid),
- ipaddr_string(ls_router));
- break;
-
- case LS_TYPE_TYPE7:
- printf(" %stype7 %s rtr %s", scope,
- ipaddr_string(ls_stateid),
- ipaddr_string(ls_router));
- break;
-
- case LS_TYPE_LINK:
- printf(" %slink %s rtr %s", scope,
- ipaddr_string(ls_stateid),
- ipaddr_string(ls_router));
- break;
-
- case LS_TYPE_INTRA_AP:
- printf(" %sintra-area-prefix %s rtr %s", scope,
- ipaddr_string(ls_stateid),
- ipaddr_string(ls_router));
- break;
-
- default:
- printf(" %s", scope);
- printf(fmt, ls_type);
- break;
- }
-
+ printf("\n\t %s LSA (%d), %s Scope%s, LSA-ID %s",
+ tok2str(ospf6_lsa_values, "Unknown", ls_type & LS_TYPE_MASK),
+ ls_type & LS_TYPE_MASK,
+ tok2str(ospf6_ls_scope_values, "Unknown", ls_type & LS_SCOPE_MASK),
+ ls_type &0x8000 ? ", transitive" : "", /* U-bit */
+ ipaddr_string(ls_stateid));
}
static int
-ospf6_print_lshdr(register const struct lsa_hdr *lshp)
+ospf6_print_lshdr(register const struct lsa6_hdr *lshp)
{
TCHECK(lshp->ls_type);
- printf(" {"); /* } (ctags) */
-
TCHECK(lshp->ls_seq);
- ospf6_print_seqage(EXTRACT_32BITS(&lshp->ls_seq), EXTRACT_16BITS(&lshp->ls_age));
- ospf6_print_ls_type(EXTRACT_16BITS(&lshp->ls_type), &lshp->ls_stateid,
- &lshp->ls_router, "ls_type %d");
+
+ printf("\n\t Advertising Router %s, seq 0x%08x, age %us, length %u",
+ ipaddr_string(&lshp->ls_router),
+ EXTRACT_32BITS(&lshp->ls_seq),
+ EXTRACT_16BITS(&lshp->ls_age),
+ EXTRACT_16BITS(&lshp->ls_length)-(u_int)sizeof(struct lsa6_hdr));
+
+ ospf6_print_ls_type(EXTRACT_16BITS(&lshp->ls_type), &lshp->ls_stateid);
return (0);
trunc:
@@ -228,26 +160,28 @@ trunc:
}
static int
-ospf6_print_lsaprefix(register const struct lsa_prefix *lsapp)
+ospf6_print_lsaprefix(register const struct lsa6_prefix *lsapp)
{
- u_int k;
+ u_int wordlen;
struct in6_addr prefix;
TCHECK(*lsapp);
- k = (lsapp->lsa_p_len + 31) / 32;
- if (k * 4 > sizeof(struct in6_addr)) {
- printf("??prefixlen %d??", lsapp->lsa_p_len);
+ wordlen = (lsapp->lsa_p_len + 31) / 32;
+ if (wordlen * 4 > sizeof(struct in6_addr)) {
+ printf(" bogus prefixlen /%d", lsapp->lsa_p_len);
goto trunc;
}
memset(&prefix, 0, sizeof(prefix));
- memcpy(&prefix, lsapp->lsa_p_prefix, k * 4);
- printf(" %s/%d", ip6addr_string(&prefix),
+ memcpy(&prefix, lsapp->lsa_p_prefix, wordlen * 4);
+ printf("\n\t\t%s/%d", ip6addr_string(&prefix),
lsapp->lsa_p_len);
- if (lsapp->lsa_p_opt)
- printf("(opt=%x)", lsapp->lsa_p_opt);
- if (lsapp->lsa_p_mbz)
- printf("(mbz=%x)", EXTRACT_16BITS(&lsapp->lsa_p_mbz)); /* XXX */
- return sizeof(*lsapp) - 4 + k * 4;
+ if (lsapp->lsa_p_opt) {
+ printf(", Options [%s]",
+ bittok2str(ospf6_lsa_prefix_option_values,
+ "none", lsapp->lsa_p_opt));
+ }
+ printf(", metric %u", EXTRACT_16BITS(&lsapp->lsa_p_metric));
+ return sizeof(*lsapp) - 4 + wordlen * 4;
trunc:
return -1;
@@ -258,10 +192,10 @@ trunc:
* Print a single link state advertisement. If truncated return 1, else 0.
*/
static int
-ospf6_print_lsa(register const struct lsa *lsap)
+ospf6_print_lsa(register const struct lsa6 *lsap)
{
register const u_char *ls_end, *ls_opt;
- register const struct rlalink *rlp;
+ register const struct rlalink6 *rlp;
#if 0
register const struct tos_metric *tosp;
#endif
@@ -271,102 +205,115 @@ ospf6_print_lsa(register const struct lsa *lsap)
register const struct mcla *mcp;
#endif
register const struct llsa *llsap;
- register const struct lsa_prefix *lsapp;
+ register const struct lsa6_prefix *lsapp;
#if 0
register const u_int32_t *lp;
#endif
- register u_int j;
- register int k;
+ register u_int prefixes;
+ register int bytelen, length, lsa_length;
u_int32_t flags32;
+ u_int8_t *tptr;
if (ospf6_print_lshdr(&lsap->ls_hdr))
return (1);
TCHECK(lsap->ls_hdr.ls_length);
- ls_end = (u_char *)lsap + EXTRACT_16BITS(&lsap->ls_hdr.ls_length);
+ length = EXTRACT_16BITS(&lsap->ls_hdr.ls_length);
+ lsa_length = length - sizeof(struct lsa6_hdr);
+ ls_end = (u_char *)lsap + length;
+ tptr = (u_int8_t *)lsap+sizeof(struct lsa6_hdr);
+
switch (EXTRACT_16BITS(&lsap->ls_hdr.ls_type)) {
case LS_TYPE_ROUTER | LS_SCOPE_AREA:
- TCHECK(lsap->lsa_un.un_rla.rla_flags);
- ospf6_print_bits(ospf6_rla_flag_bits,
- lsap->lsa_un.un_rla.rla_flags);
TCHECK(lsap->lsa_un.un_rla.rla_options);
- ospf6_print_bits(ospf6_option_bits,
- EXTRACT_32BITS(&lsap->lsa_un.un_rla.rla_options));
+ printf("\n\t Options [%s]",
+ bittok2str(ospf6_option_values, "none",
+ EXTRACT_32BITS(&lsap->lsa_un.un_rla.rla_options)));
+
+ TCHECK(lsap->lsa_un.un_rla.rla_flags);
+ printf(", RLA-Flags [%s]",
+ bittok2str(ospf6_rla_flag_values, "none",
+ lsap->lsa_un.un_rla.rla_flags));
+
TCHECK(lsap->lsa_un.un_rla.rla_link);
rlp = lsap->lsa_un.un_rla.rla_link;
- while (rlp + sizeof(*rlp) <= (struct rlalink *)ls_end) {
+ while (rlp + 1 <= (struct rlalink6 *)ls_end) {
TCHECK(*rlp);
- printf(" {"); /* } (ctags) */
switch (rlp->link_type) {
case RLA_TYPE_VIRTUAL:
- printf(" virt");
- /* Fall through */
+ printf("\n\t Virtual Link: Neighbor Router-ID %s"
+ "\n\t Neighbor Interface-ID %s, Interface %s",
+ ipaddr_string(&rlp->link_nrtid),
+ ipaddr_string(&rlp->link_nifid),
+ ipaddr_string(&rlp->link_ifid));
+ break;
case RLA_TYPE_ROUTER:
- printf(" nbrid %s nbrif %s if %s",
- ipaddr_string(&rlp->link_nrtid),
- ipaddr_string(&rlp->link_nifid),
- ipaddr_string(&rlp->link_ifid));
+ printf("\n\t Neighbor Router-ID %s"
+ "\n\t Neighbor Interface-ID %s, Interface %s",
+ ipaddr_string(&rlp->link_nrtid),
+ ipaddr_string(&rlp->link_nifid),
+ ipaddr_string(&rlp->link_ifid));
break;
case RLA_TYPE_TRANSIT:
- printf(" dr %s drif %s if %s",
+ printf("\n\t Neighbor Network-ID %s"
+ "\n\t Neighbor Interface-ID %s, Interface %s",
ipaddr_string(&rlp->link_nrtid),
ipaddr_string(&rlp->link_nifid),
ipaddr_string(&rlp->link_ifid));
break;
default:
- /* { (ctags) */
- printf(" ??RouterLinksType 0x%02x?? }",
+ printf("\n\t Unknown Router Links Type 0x%02x",
rlp->link_type);
return (0);
}
- printf(" metric %d", EXTRACT_16BITS(&rlp->link_metric));
- /* { (ctags) */
- printf(" }");
+ printf(", metric %d", EXTRACT_16BITS(&rlp->link_metric));
rlp++;
}
break;
case LS_TYPE_NETWORK | LS_SCOPE_AREA:
TCHECK(lsap->lsa_un.un_nla.nla_options);
- ospf6_print_bits(ospf6_option_bits,
- EXTRACT_32BITS(&lsap->lsa_un.un_nla.nla_options));
- printf(" rtrs");
+ printf("\n\t Options [%s]",
+ bittok2str(ospf6_option_values, "none",
+ EXTRACT_32BITS(&lsap->lsa_un.un_nla.nla_options)));
+ printf("\n\t Connected Routers:");
ap = lsap->lsa_un.un_nla.nla_router;
while ((u_char *)ap < ls_end) {
TCHECK(*ap);
- printf(" %s", ipaddr_string(ap));
+ printf("\n\t\t%s", ipaddr_string(ap));
++ap;
}
break;
case LS_TYPE_INTER_AP | LS_SCOPE_AREA:
TCHECK(lsap->lsa_un.un_inter_ap.inter_ap_metric);
- printf(" metric %u",
+ printf(", metric %u",
EXTRACT_32BITS(&lsap->lsa_un.un_inter_ap.inter_ap_metric) & SLA_MASK_METRIC);
lsapp = lsap->lsa_un.un_inter_ap.inter_ap_prefix;
- while (lsapp + sizeof(lsapp) <= (struct lsa_prefix *)ls_end) {
- k = ospf6_print_lsaprefix(lsapp);
- if (k)
+ while (lsapp + sizeof(lsapp) <= (struct lsa6_prefix *)ls_end) {
+ bytelen = ospf6_print_lsaprefix(lsapp);
+ if (bytelen)
goto trunc;
- lsapp = (struct lsa_prefix *)(((u_char *)lsapp) + k);
+ lsapp = (struct lsa6_prefix *)(((u_char *)lsapp) + bytelen);
}
break;
case LS_SCOPE_AS | LS_TYPE_ASE:
TCHECK(lsap->lsa_un.un_asla.asla_metric);
flags32 = EXTRACT_32BITS(&lsap->lsa_un.un_asla.asla_metric);
- ospf6_print_bits(ospf6_asla_flag_bits, flags32);
+ printf("\n\t Flags [%s]",
+ bittok2str(ospf6_asla_flag_values, "none", flags32));
printf(" metric %u",
EXTRACT_32BITS(&lsap->lsa_un.un_asla.asla_metric) &
ASLA_MASK_METRIC);
lsapp = lsap->lsa_un.un_asla.asla_prefix;
- k = ospf6_print_lsaprefix(lsapp);
- if (k < 0)
+ bytelen = ospf6_print_lsaprefix(lsapp);
+ if (bytelen < 0)
goto trunc;
- if ((ls_opt = (u_char *)(((u_char *)lsapp) + k)) < ls_end) {
+ if ((ls_opt = (u_char *)(((u_char *)lsapp) + bytelen)) < ls_end) {
struct in6_addr *fwdaddr6;
if ((flags32 & ASLA_FLAG_FWDADDR) != 0) {
@@ -386,7 +333,7 @@ ospf6_print_lsa(register const struct lsa *lsap)
ls_opt += sizeof(u_int32_t);
}
- if (lsapp->lsa_p_mbz) {
+ if (lsapp->lsa_p_metric) {
TCHECK(*(u_int32_t *)ls_opt);
printf(" RefLSID: %s",
ipaddr_string((u_int32_t *)ls_opt));
@@ -395,64 +342,30 @@ ospf6_print_lsa(register const struct lsa *lsap)
}
}
break;
-#if 0
- case LS_TYPE_SUM_ABR:
- TCHECK(lsap->lsa_un.un_sla.sla_tosmetric);
- lp = lsap->lsa_un.un_sla.sla_tosmetric;
- while ((u_char *)lp < ls_end) {
- register u_int32_t ul;
-
- TCHECK(*lp);
- ul = EXTRACT_32BITS(lp);
- printf(" tos %d metric %d",
- (ul & SLA_MASK_TOS) >> SLA_SHIFT_TOS,
- ul & SLA_MASK_METRIC);
- ++lp;
- }
- break;
-
- case LS_TYPE_GROUP:
- /* Multicast extensions as of 23 July 1991 */
- mcp = lsap->lsa_un.un_mcla;
- while ((u_char *)mcp < ls_end) {
- TCHECK(mcp->mcla_vid);
- switch (EXTRACT_32BITS(&mcp->mcla_vtype)) {
-
- case MCLA_VERTEX_ROUTER:
- printf(" rtr rtrid %s",
- ipaddr_string(&mcp->mcla_vid));
- break;
-
- case MCLA_VERTEX_NETWORK:
- printf(" net dr %s",
- ipaddr_string(&mcp->mcla_vid));
- break;
-
- default:
- printf(" ??VertexType %u??",
- EXTRACT_32BITS(&mcp->mcla_vtype));
- break;
- }
- ++mcp;
- }
-#endif
case LS_TYPE_LINK:
/* Link LSA */
llsap = &lsap->lsa_un.un_llsa;
TCHECK(llsap->llsa_options);
- ospf6_print_bits(ospf6_option_bits, EXTRACT_32BITS(&llsap->llsa_options));
+ printf("\n\t Options [%s]",
+ bittok2str(ospf6_option_values, "none",
+ EXTRACT_32BITS(&llsap->llsa_options)));
TCHECK(llsap->llsa_nprefix);
- printf(" pri %d lladdr %s npref %d", llsap->llsa_priority,
- ip6addr_string(&llsap->llsa_lladdr),
- EXTRACT_32BITS(&llsap->llsa_nprefix));
- lsapp = llsap->llsa_prefix;
- for (j = 0; j < EXTRACT_32BITS(&llsap->llsa_nprefix); j++) {
- k = ospf6_print_lsaprefix(lsapp);
- if (k)
- goto trunc;
- lsapp = (struct lsa_prefix *)(((u_char *)lsapp) + k);
- }
+ prefixes = EXTRACT_32BITS(&llsap->llsa_nprefix);
+ printf("\n\t Priority %d, Link-local address %s, Prefixes %d:",
+ llsap->llsa_priority,
+ ip6addr_string(&llsap->llsa_lladdr),
+ prefixes);
+
+ tptr = (u_int8_t *)llsap->llsa_prefix;
+ while (prefixes > 0) {
+ lsapp = (struct lsa6_prefix *)tptr;
+ if ((bytelen = ospf6_print_lsaprefix(lsapp)) == -1) {
+ goto trunc;
+ }
+ prefixes--;
+ tptr += bytelen;
+ }
break;
case LS_TYPE_INTRA_AP | LS_SCOPE_AREA:
@@ -460,34 +373,46 @@ ospf6_print_lsa(register const struct lsa *lsap)
TCHECK(lsap->lsa_un.un_intra_ap.intra_ap_rtid);
ospf6_print_ls_type(
EXTRACT_16BITS(&lsap->lsa_un.un_intra_ap.intra_ap_lstype),
- &lsap->lsa_un.un_intra_ap.intra_ap_lsid,
- &lsap->lsa_un.un_intra_ap.intra_ap_rtid,
- "LinkStateType %d");
+ &lsap->lsa_un.un_intra_ap.intra_ap_lsid);
TCHECK(lsap->lsa_un.un_intra_ap.intra_ap_nprefix);
- printf(" npref %d",
- EXTRACT_16BITS(&lsap->lsa_un.un_intra_ap.intra_ap_nprefix));
-
- lsapp = lsap->lsa_un.un_intra_ap.intra_ap_prefix;
- for (j = 0;
- j < EXTRACT_16BITS(&lsap->lsa_un.un_intra_ap.intra_ap_nprefix);
- j++) {
- k = ospf6_print_lsaprefix(lsapp);
- if (k)
- goto trunc;
- lsapp = (struct lsa_prefix *)(((u_char *)lsapp) + k);
- }
+ prefixes = EXTRACT_16BITS(&lsap->lsa_un.un_intra_ap.intra_ap_nprefix);
+ printf("\n\t Prefixes %d:", prefixes);
+
+ tptr = (u_int8_t *)lsap->lsa_un.un_intra_ap.intra_ap_prefix;
+
+ while (prefixes > 0) {
+ lsapp = (struct lsa6_prefix *)tptr;
+ if ((bytelen = ospf6_print_lsaprefix(lsapp)) == -1) {
+ goto trunc;
+ }
+ prefixes--;
+ tptr += bytelen;
+ }
break;
+ case LS_TYPE_GRACE | LS_SCOPE_LINKLOCAL:
+ if (ospf_print_grace_lsa(tptr, lsa_length) == -1) {
+ return 1;
+ }
+
+ break;
+
+ case LS_TYPE_INTRA_ATE | LS_SCOPE_LINKLOCAL:
+ if (ospf_print_te_lsa(tptr, lsa_length) == -1) {
+ return 1;
+ }
+ break;
+
default:
- printf(" ??LinkStateType 0x%04x??",
- EXTRACT_16BITS(&lsap->ls_hdr.ls_type));
+ if(!print_unknown_data(tptr,
+ "\n\t ",
+ lsa_length)) {
+ return (1);
+ }
}
- /* { (ctags) */
- fputs(" }", stdout);
return (0);
trunc:
- fputs(" }", stdout);
return (1);
}
@@ -496,103 +421,80 @@ ospf6_decode_v3(register const struct ospf6hdr *op,
register const u_char *dataend)
{
register const rtrid_t *ap;
- register const struct lsr *lsrp;
- register const struct lsa_hdr *lshp;
- register const struct lsa *lsap;
- register char sep;
+ register const struct lsr6 *lsrp;
+ register const struct lsa6_hdr *lshp;
+ register const struct lsa6 *lsap;
register int i;
switch (op->ospf6_type) {
- case OSPF_TYPE_UMD:
- /*
- * Rob Coltun's special monitoring packets;
- * do nothing
- */
- break;
-
case OSPF_TYPE_HELLO:
- if (vflag) {
- TCHECK(op->ospf6_hello.hello_deadint);
- ospf6_print_bits(ospf6_option_bits,
- EXTRACT_32BITS(&op->ospf6_hello.hello_options));
- printf(" ifid %s pri %d int %d dead %u",
- ipaddr_string(&op->ospf6_hello.hello_ifid),
- op->ospf6_hello.hello_priority,
- EXTRACT_16BITS(&op->ospf6_hello.hello_helloint),
- EXTRACT_16BITS(&op->ospf6_hello.hello_deadint));
- }
+ printf("\n\tOptions [%s]",
+ bittok2str(ospf6_option_values, "none",
+ EXTRACT_32BITS(&op->ospf6_hello.hello_options)));
+
+ TCHECK(op->ospf6_hello.hello_deadint);
+ printf("\n\t Hello Timer %us, Dead Timer %us, Interface-ID %s, Priority %u",
+ EXTRACT_16BITS(&op->ospf6_hello.hello_helloint),
+ EXTRACT_16BITS(&op->ospf6_hello.hello_deadint),
+ ipaddr_string(&op->ospf6_hello.hello_ifid),
+ op->ospf6_hello.hello_priority);
+
TCHECK(op->ospf6_hello.hello_dr);
if (op->ospf6_hello.hello_dr != 0)
- printf(" dr %s",
+ printf("\n\t Designated Router %s",
ipaddr_string(&op->ospf6_hello.hello_dr));
TCHECK(op->ospf6_hello.hello_bdr);
if (op->ospf6_hello.hello_bdr != 0)
- printf(" bdr %s",
+ printf(", Backup Designated Router %s",
ipaddr_string(&op->ospf6_hello.hello_bdr));
if (vflag) {
- printf(" nbrs");
+ printf("\n\t Neighbor List:");
ap = op->ospf6_hello.hello_neighbor;
while ((u_char *)ap < dataend) {
TCHECK(*ap);
- printf(" %s", ipaddr_string(ap));
+ printf("\n\t %s", ipaddr_string(ap));
++ap;
}
}
break; /* HELLO */
- case OSPF_TYPE_DB:
+ case OSPF_TYPE_DD:
TCHECK(op->ospf6_db.db_options);
- ospf6_print_bits(ospf6_option_bits,
- EXTRACT_32BITS(&op->ospf6_db.db_options));
- sep = ' ';
+ printf("\n\tOptions [%s]",
+ bittok2str(ospf6_option_values, "none",
+ EXTRACT_32BITS(&op->ospf6_db.db_options)));
TCHECK(op->ospf6_db.db_flags);
- if (op->ospf6_db.db_flags & OSPF6_DB_INIT) {
- printf("%cI", sep);
- sep = '/';
- }
- if (op->ospf6_db.db_flags & OSPF6_DB_MORE) {
- printf("%cM", sep);
- sep = '/';
- }
- if (op->ospf6_db.db_flags & OSPF6_DB_MASTER) {
- printf("%cMS", sep);
- sep = '/';
- }
- TCHECK(op->ospf6_db.db_seq);
- printf(" mtu %u S %X", EXTRACT_16BITS(&op->ospf6_db.db_mtu),
- EXTRACT_32BITS(&op->ospf6_db.db_seq));
-
- if (vflag) {
- /* Print all the LS adv's */
- lshp = op->ospf6_db.db_lshdr;
+ printf(", DD Flags [%s]",
+ bittok2str(ospf6_dd_flag_values,"none",op->ospf6_db.db_flags));
- while (!ospf6_print_lshdr(lshp)) {
- /* { (ctags) */
- printf(" }");
- ++lshp;
- }
- }
+ TCHECK(op->ospf6_db.db_seq);
+ printf(", MTU %u, DD-Sequence 0x%08x",
+ EXTRACT_16BITS(&op->ospf6_db.db_mtu),
+ EXTRACT_32BITS(&op->ospf6_db.db_seq));
+
+ /* Print all the LS adv's */
+ lshp = op->ospf6_db.db_lshdr;
+ while (!ospf6_print_lshdr(lshp)) {
+ ++lshp;
+ }
break;
- case OSPF_TYPE_LSR:
+ case OSPF_TYPE_LS_REQ:
if (vflag) {
lsrp = op->ospf6_lsr;
while ((u_char *)lsrp < dataend) {
TCHECK(*lsrp);
- printf(" {"); /* } (ctags) */
+ printf("\n\t Advertising Router %s",
+ ipaddr_string(&lsrp->ls_router));
ospf6_print_ls_type(EXTRACT_16BITS(&lsrp->ls_type),
- &lsrp->ls_stateid,
- &lsrp->ls_router,
- "LinkStateType %d");
- /* { (ctags) */
- printf(" }");
+ &lsrp->ls_stateid);
++lsrp;
}
}
break;
- case OSPF_TYPE_LSU:
+ case OSPF_TYPE_LS_UPDATE:
if (vflag) {
lsap = op->ospf6_lsu.lsu_lsa;
TCHECK(op->ospf6_lsu.lsu_count);
@@ -600,27 +502,24 @@ ospf6_decode_v3(register const struct ospf6hdr *op,
while (i--) {
if (ospf6_print_lsa(lsap))
goto trunc;
- lsap = (struct lsa *)((u_char *)lsap +
+ lsap = (struct lsa6 *)((u_char *)lsap +
EXTRACT_16BITS(&lsap->ls_hdr.ls_length));
}
}
break;
- case OSPF_TYPE_LSA:
+ case OSPF_TYPE_LS_ACK:
if (vflag) {
lshp = op->ospf6_lsa.lsa_lshdr;
while (!ospf6_print_lshdr(lshp)) {
- /* { (ctags) */
- printf(" }");
++lshp;
}
}
break;
default:
- printf("v3 type %d", op->ospf6_type);
break;
}
return (0);
@@ -640,10 +539,15 @@ ospf6_print(register const u_char *bp, register u_int length)
/* If the type is valid translate it, or just print the type */
/* value. If it's not valid, say so and return */
TCHECK(op->ospf6_type);
- cp = tok2str(type2str, "type%d", op->ospf6_type);
- printf("OSPFv%d-%s %d:", op->ospf6_version, cp, length);
- if (*cp == 't')
+ cp = tok2str(ospf6_type_values, "unknown LS-type", op->ospf6_type);
+ printf("OSPFv%u, %s, length %d", op->ospf6_version, cp, length);
+ if (*cp == 'u') {
return;
+ }
+
+ if(!vflag) { /* non verbose - so lets bail out here */
+ return;
+ }
TCHECK(op->ospf6_len);
if (length != EXTRACT_16BITS(&op->ospf6_len)) {
@@ -654,16 +558,16 @@ ospf6_print(register const u_char *bp, register u_int length)
/* Print the routerid if it is not the same as the source */
TCHECK(op->ospf6_routerid);
- printf(" rtrid %s", ipaddr_string(&op->ospf6_routerid));
+ printf("\n\tRouter-ID %s", ipaddr_string(&op->ospf6_routerid));
TCHECK(op->ospf6_areaid);
if (op->ospf6_areaid != 0)
- printf(" area %s", ipaddr_string(&op->ospf6_areaid));
+ printf(", Area %s", ipaddr_string(&op->ospf6_areaid));
else
- printf(" backbone");
+ printf(", Backbone Area");
TCHECK(op->ospf6_instanceid);
if (op->ospf6_instanceid)
- printf(" instance %u", op->ospf6_instanceid);
+ printf(", Instance %u", op->ospf6_instanceid);
/* Do rest according to version. */
switch (op->ospf6_version) {
diff --git a/contrib/tcpdump/print-pflog.c b/contrib/tcpdump/print-pflog.c
index dd9ba49..972cb4b 100644
--- a/contrib/tcpdump/print-pflog.c
+++ b/contrib/tcpdump/print-pflog.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-pflog.c,v 1.13.2.4 2007/09/13 17:18:10 gianluca Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-pflog.c,v 1.16 2007-09-12 19:36:18 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -31,17 +31,12 @@ static const char rcsid[] _U_ =
#ifndef HAVE_NET_PFVAR_H
#error "No pf headers available"
#endif
-
#include <sys/types.h>
-#ifndef WIN32
#include <sys/socket.h>
-#endif
#include <net/if.h>
#include <net/pfvar.h>
#include <net/if_pflog.h>
-
-
#include <tcpdump-stdinc.h>
#include <stdio.h>
diff --git a/contrib/tcpdump/print-pgm.c b/contrib/tcpdump/print-pgm.c
index edaf933..73a4291 100644
--- a/contrib/tcpdump/print-pgm.c
+++ b/contrib/tcpdump/print-pgm.c
@@ -15,7 +15,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-pgm.c,v 1.1.2.5 2005/06/07 22:06:16 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-pgm.c,v 1.5 2005-06-07 22:05:58 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-pim.c b/contrib/tcpdump/print-pim.c
index d539809..01080f3 100644
--- a/contrib/tcpdump/print-pim.c
+++ b/contrib/tcpdump/print-pim.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.45.2.4 2006/02/13 01:32:34 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.49 2006-02-13 01:31:35 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-ppp.c b/contrib/tcpdump/print-ppp.c
index e25930b..ba5d836 100644
--- a/contrib/tcpdump/print-ppp.c
+++ b/contrib/tcpdump/print-ppp.c
@@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.108.2.6 2005/12/05 11:40:36 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.114 2005-12-05 11:35:58 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-pppoe.c b/contrib/tcpdump/print-pppoe.c
index 229b5ee..7abc787 100644
--- a/contrib/tcpdump/print-pppoe.c
+++ b/contrib/tcpdump/print-pppoe.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
-"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.30.2.1 2005/04/26 19:48:56 guy Exp $ (LBL)";
+"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.31 2005-04-26 19:48:38 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-pptp.c b/contrib/tcpdump/print-pptp.c
index d400589..2fbba62 100644
--- a/contrib/tcpdump/print-pptp.c
+++ b/contrib/tcpdump/print-pptp.c
@@ -24,7 +24,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-pptp.c,v 1.11.2.1 2006/06/23 02:07:27 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-pptp.c,v 1.12 2006-06-23 02:03:09 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-radius.c b/contrib/tcpdump/print-radius.c
index 203c50b..44f0c7f 100644
--- a/contrib/tcpdump/print-radius.c
+++ b/contrib/tcpdump/print-radius.c
@@ -44,7 +44,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "$Id: print-radius.c,v 1.27.2.1 2005/09/26 01:02:40 guy Exp $";
+ "$Id: print-radius.c,v 1.28 2005-09-26 01:01:55 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-raw.c b/contrib/tcpdump/print-raw.c
index 0fe6dd1..8e376ce5 100644
--- a/contrib/tcpdump/print-raw.c
+++ b/contrib/tcpdump/print-raw.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.41 2003/11/16 09:36:34 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.41 2003-11-16 09:36:34 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-rip.c b/contrib/tcpdump/print-rip.c
index 772a2e0..27446a6 100644
--- a/contrib/tcpdump/print-rip.c
+++ b/contrib/tcpdump/print-rip.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.57 2003/11/16 09:36:34 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.59 2006-03-23 14:58:44 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -37,6 +37,8 @@ static const char rcsid[] _U_ =
#include "addrtoname.h"
#include "extract.h" /* must come after interface.h */
+#include "af.h"
+
struct rip {
u_int8_t rip_cmd; /* request/response */
u_int8_t rip_vers; /* protocol version # */
@@ -100,8 +102,8 @@ rip_entry_print_v1(register const struct rip_netinfo *ni)
/* RFC 1058 */
family = EXTRACT_16BITS(&ni->rip_family);
- if (family != AF_INET) {
- printf("\n\t AFI: %u:", family);
+ if (family != BSD_AFNUM_INET) {
+ printf("\n\t AFI %s, ", tok2str(bsd_af_values, "Unknown (%u)", family));
print_unknown_data((u_int8_t *)&ni->rip_family,"\n\t ",RIP_ROUTELEN);
return;
}
@@ -111,7 +113,7 @@ rip_entry_print_v1(register const struct rip_netinfo *ni)
/* MBZ fields not zero */
print_unknown_data((u_int8_t *)&ni->rip_family,"\n\t ",RIP_ROUTELEN);
return;
- } /* AF_INET */
+ } /* BSD_AFNUM_INET */
printf("\n\t %s, metric: %u",
ipaddr_string(&ni->rip_dest),
EXTRACT_32BITS(&ni->rip_metric));
@@ -139,12 +141,13 @@ rip_entry_print_v2(register const struct rip_netinfo *ni)
EXTRACT_16BITS(&ni->rip_tag));
print_unknown_data((u_int8_t *)&ni->rip_dest,"\n\t ",RIP_AUTHLEN);
}
- } else if (family != AF_INET) {
- printf("\n\t AFI: %u", family);
+ } else if (family != BSD_AFNUM_INET) {
+ printf("\n\t AFI %s", tok2str(bsd_af_values, "Unknown (%u)", family));
print_unknown_data((u_int8_t *)&ni->rip_tag,"\n\t ",RIP_ROUTELEN-2);
return;
- } else { /* AF_INET */
- printf("\n\t AFI: IPv4: %15s/%-2d, tag 0x%04x, metric: %u, next-hop: ",
+ } else { /* BSD_AFNUM_INET */
+ printf("\n\t AFI %s, %15s/%-2d, tag 0x%04x, metric: %u, next-hop: ",
+ tok2str(bsd_af_values, "Unknown (%u)", family),
ipaddr_string(&ni->rip_dest),
mask2plen(EXTRACT_32BITS(&ni->rip_dest_mask)),
EXTRACT_16BITS(&ni->rip_tag),
diff --git a/contrib/tcpdump/print-ripng.c b/contrib/tcpdump/print-ripng.c
index 5e7a02e..cef39da 100644
--- a/contrib/tcpdump/print-ripng.c
+++ b/contrib/tcpdump/print-ripng.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ripng.c,v 1.18 2005/01/04 00:15:54 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ripng.c,v 1.18 2005-01-04 00:15:54 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-rrcp.c b/contrib/tcpdump/print-rrcp.c
new file mode 100644
index 0000000..dc30457
--- /dev/null
+++ b/contrib/tcpdump/print-rrcp.c
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2007 - Andrey "nording" Chernyak <andrew@nording.ru>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code distributions
+ * retain the above copyright notice and this paragraph in its entirety, (2)
+ * distributions including binary code include the above copyright notice and
+ * this paragraph in its entirety in the documentation or other materials
+ * provided with the distribution, and (3) all advertising materials mentioning
+ * features or use of this software display the following acknowledgement:
+ * ``This product includes software developed by the University of California,
+ * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+ * the University nor the names of its contributors may be used to endorse
+ * or promote products derived from this software without specific prior
+ * written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * Format and print Realtek Remote Control Protocol (RRCP)
+ * and Realtek Echo Protocol (RRCP-REP) packets.
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+ "@(#) $Header: /tcpdump/master/tcpdump/print-rrcp.c,v 1.1.2.2 2008-04-11 17:00:00 gianluca Exp $";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "netdissect.h"
+#include "addrtoname.h"
+#include "extract.h"
+#include "ether.h"
+
+#ifndef ETH_ALEN
+#define ETH_ALEN 6
+#endif
+
+struct rrcp_packet_t
+{
+ u_int16_t rrcp_ethertype; /* 0x8899 */
+ u_int8_t rrcp_proto; /* must be 0x01 */
+ u_int8_t rrcp_opcode:7; /* 0x00 = hello, 0x01 = get, 0x02 = set */
+ u_int8_t rrcp_isreply:1; /* 0 = request to switch, 1 = reply from switch */
+ u_int16_t rrcp_authkey; /* 0x2379 by default */
+ u_int16_t rrcp_reg_addr; /* register address */
+ u_int32_t rrcp_reg_data; /* register data */
+ u_int32_t cookie1;
+ u_int32_t cookie2;
+};
+
+struct rrcp_helloreply_packet_t
+{
+ u_int16_t rrcp_ethertype; /* 0x8899 */
+ u_int8_t rrcp_proto; /* must be 0x01 */
+ u_int8_t rrcp_opcode:7; /* 0x00 = hello, 0x01 = get, 0x02 = set */
+ u_int8_t rrcp_isreply:1; /* 0 = request to switch, 1 = reply from switch */
+ u_int16_t rrcp_authkey; /* 0x2379 by default */
+ u_int8_t rrcp_downlink_port; /* */
+ u_int8_t rrcp_uplink_port; /* */
+ u_int8_t rrcp_uplink_mac[ETH_ALEN]; /* */
+ u_int16_t rrcp_chip_id; /* */
+ u_int32_t rrcp_vendor_id; /* */
+};
+
+
+/*
+ * Print RRCP requests
+ */
+void
+rrcp_print(netdissect_options *ndo,
+ register const u_char *cp,
+ u_int length _U_)
+{
+ const struct rrcp_packet_t *rrcp;
+ const struct rrcp_helloreply_packet_t *rrcp_hello;
+ register const struct ether_header *ep;
+ char proto_str[16];
+ char opcode_str[32];
+
+ ep = (const struct ether_header *)cp;
+ rrcp = (const struct rrcp_packet_t *)(cp+12);
+ rrcp_hello = (const struct rrcp_helloreply_packet_t *)(cp+12);
+
+ if (rrcp->rrcp_proto==1){
+ strcpy(proto_str,"RRCP");
+ }else if ( rrcp->rrcp_proto==2 ){
+ strcpy(proto_str,"RRCP-REP");
+ }else{
+ sprintf(proto_str,"RRCP-0x%02d",rrcp->rrcp_proto);
+ }
+ if (rrcp->rrcp_opcode==0){
+ strcpy(opcode_str,"hello");
+ }else if ( rrcp->rrcp_opcode==1 ){
+ strcpy(opcode_str,"get");
+ }else if ( rrcp->rrcp_opcode==2 ){
+ strcpy(opcode_str,"set");
+ }else{
+ sprintf(opcode_str,"unknown opcode (0x%02d)",rrcp->rrcp_opcode);
+ }
+ ND_PRINT((ndo, "%s > %s, %s %s",
+ etheraddr_string(ESRC(ep)),
+ etheraddr_string(EDST(ep)),
+ proto_str, rrcp->rrcp_isreply ? "reply" : "query"));
+ if (rrcp->rrcp_proto==1){
+ ND_PRINT((ndo, ": %s", opcode_str));
+ }
+ if (rrcp->rrcp_opcode==1 || rrcp->rrcp_opcode==2){
+ ND_PRINT((ndo, " addr=0x%04x, data=0x%04x",
+ rrcp->rrcp_reg_addr, rrcp->rrcp_reg_data, rrcp->rrcp_authkey));
+ }
+ if (rrcp->rrcp_proto==1){
+ ND_PRINT((ndo, ", auth=0x%04x",
+ ntohs(rrcp->rrcp_authkey)));
+ }
+ if (rrcp->rrcp_proto==1 && rrcp->rrcp_opcode==0 && rrcp->rrcp_isreply){
+ ND_PRINT((ndo, " downlink_port=%d, uplink_port=%d, uplink_mac=%s, vendor_id=%08x ,chip_id=%04x ",
+ rrcp_hello->rrcp_downlink_port,
+ rrcp_hello->rrcp_uplink_port,
+ etheraddr_string(rrcp_hello->rrcp_uplink_mac),
+ rrcp_hello->rrcp_vendor_id,
+ rrcp_hello->rrcp_chip_id));
+ }else if (rrcp->rrcp_opcode==1 || rrcp->rrcp_opcode==2 || rrcp->rrcp_proto==2){
+ ND_PRINT((ndo, ", cookie=0x%08x%08x ",
+ rrcp->cookie2, rrcp->cookie1));
+ }
+ if (!ndo->ndo_vflag)
+ return;
+}
diff --git a/contrib/tcpdump/print-rsvp.c b/contrib/tcpdump/print-rsvp.c
index ad51930..5ed731c 100644
--- a/contrib/tcpdump/print-rsvp.c
+++ b/contrib/tcpdump/print-rsvp.c
@@ -17,7 +17,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.33.2.15 2007/09/13 17:33:54 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-rsvp.c,v 1.48 2007-09-13 17:29:50 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-rt6.c b/contrib/tcpdump/print-rt6.c
index 39e22ae..dc196b4 100644
--- a/contrib/tcpdump/print-rt6.c
+++ b/contrib/tcpdump/print-rt6.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-rt6.c,v 1.26.2.1 2005/04/20 22:35:11 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-rt6.c,v 1.27 2005-04-20 22:34:57 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-rx.c b/contrib/tcpdump/print-rx.c
index d991066..3812a12 100644
--- a/contrib/tcpdump/print-rx.c
+++ b/contrib/tcpdump/print-rx.c
@@ -34,7 +34,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.37.2.2 2007/06/15 19:43:15 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.39.2.3 2008-07-01 07:45:09 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -118,6 +118,12 @@ static struct tok fs_req[] = {
{ 162, "dfs-flushcps" },
{ 163, "dfs-symlink" },
{ 220, "residency" },
+ { 65536, "inline-bulk-status" },
+ { 65537, "fetch-data-64" },
+ { 65538, "store-data-64" },
+ { 65539, "give-up-all-cbs" },
+ { 65540, "get-caps" },
+ { 65541, "cb-rx-conn-addr" },
{ 0, NULL },
};
@@ -137,6 +143,9 @@ static struct tok cb_req[] = {
{ 216, "getcellservdb" },
{ 217, "getlocalcell" },
{ 218, "getcacheconf" },
+ { 65536, "getce64" },
+ { 65537, "getcellbynum" },
+ { 65538, "tellmeaboutyourself" },
{ 0, NULL },
};
@@ -163,6 +172,7 @@ static struct tok pt_req[] = {
{ 519, "get-host-cps" },
{ 520, "update-entry" },
{ 521, "list-entries" },
+ { 530, "list-super-groups" },
{ 0, NULL },
};
@@ -256,6 +266,9 @@ static struct tok vol_req[] = {
{ 126, "set-info" },
{ 127, "x-list-partitions" },
{ 128, "forward-multiple" },
+ { 65536, "convert-ro" },
+ { 65537, "get-size" },
+ { 65538, "dump-v2" },
{ 0, NULL },
};
@@ -307,6 +320,8 @@ static struct tok ubik_req[] = {
{ 10003, "vote-getsyncsite" },
{ 10004, "vote-debug" },
{ 10005, "vote-sdebug" },
+ { 10006, "vote-xdebug" },
+ { 10007, "vote-xsdebug" },
{ 20000, "disk-begin" },
{ 20001, "disk-commit" },
{ 20002, "disk-lock" },
@@ -325,7 +340,7 @@ static struct tok ubik_req[] = {
};
#define VOTE_LOW 10000
-#define VOTE_HIGH 10005
+#define VOTE_HIGH 10007
#define DISK_LOW 20000
#define DISK_HIGH 20013
@@ -688,6 +703,13 @@ rx_cache_find(const struct rx_header *rxh, const struct ip *ip, int sport,
printf(" %lu", i); \
}
+#define UINT64OUT() { u_int64_t i; \
+ TCHECK2(bp[0], sizeof(u_int64_t)); \
+ i = EXTRACT_64BITS(bp); \
+ bp += sizeof(u_int64_t); \
+ printf(" %" PRIu64, i); \
+ }
+
#define DATEOUT() { time_t t; struct tm *tm; char str[256]; \
TCHECK2(bp[0], sizeof(int32_t)); \
t = (time_t) EXTRACT_32BITS(bp); \
@@ -763,6 +785,17 @@ rx_cache_find(const struct rx_header *rxh, const struct ip *ip, int sport,
printf("\""); \
}
+#define DESTSERVEROUT() { unsigned long n1, n2, n3; \
+ TCHECK2(bp[0], sizeof(int32_t) * 3); \
+ n1 = EXTRACT_32BITS(bp); \
+ bp += sizeof(int32_t); \
+ n2 = EXTRACT_32BITS(bp); \
+ bp += sizeof(int32_t); \
+ n3 = EXTRACT_32BITS(bp); \
+ bp += sizeof(int32_t); \
+ printf(" server %d:%d:%d", (int) n1, (int) n2, (int) n3); \
+ }
+
/*
* Handle calls to the AFS file service (fs)
*/
@@ -890,6 +923,7 @@ fs_print(register const u_char *bp, int length)
STROUT(AFSNAMEMAX);
break;
case 155: /* Bulk stat */
+ case 65536: /* Inline bulk stat */
{
unsigned long j;
TCHECK2(bp[0], 4);
@@ -904,6 +938,26 @@ fs_print(register const u_char *bp, int length)
if (j == 0)
printf(" <none!>");
}
+ case 65537: /* Fetch data 64 */
+ FIDOUT();
+ printf(" offset");
+ UINT64OUT();
+ printf(" length");
+ UINT64OUT();
+ break;
+ case 65538: /* Store data 64 */
+ FIDOUT();
+ STOREATTROUT();
+ printf(" offset");
+ UINT64OUT();
+ printf(" length");
+ UINT64OUT();
+ printf(" flen");
+ UINT64OUT();
+ break;
+ case 65541: /* CallBack rx conn address */
+ printf(" addr");
+ UINTOUT();
default:
;
}
@@ -1267,6 +1321,7 @@ prot_print(register const u_char *bp, int length)
case 517: /* List owned */
case 518: /* Get CPS2 */
case 519: /* Get host CPS */
+ case 530: /* List super groups */
printf(" id");
INTOUT();
break;
@@ -1915,13 +1970,176 @@ vol_print(register const u_char *bp, int length)
printf(" vol call %s", tok2str(vol_req, "op#%d", vol_op));
- /*
- * Normally there would be a switch statement here to decode the
- * arguments to the AFS call, but since I don't have access to
- * an AFS server (yet) and I'm not an AFS admin, I can't
- * test any of these calls. Leave this blank for now.
- */
+ bp += sizeof(struct rx_header) + 4;
+ switch (vol_op) {
+ case 100: /* Create volume */
+ printf(" partition");
+ UINTOUT();
+ printf(" name");
+ STROUT(AFSNAMEMAX);
+ printf(" type");
+ UINTOUT();
+ printf(" parent");
+ UINTOUT();
+ break;
+ case 101: /* Delete volume */
+ case 107: /* Get flags */
+ printf(" trans");
+ UINTOUT();
+ break;
+ case 102: /* Restore */
+ printf(" totrans");
+ UINTOUT();
+ printf(" flags");
+ UINTOUT();
+ break;
+ case 103: /* Forward */
+ printf(" fromtrans");
+ UINTOUT();
+ printf(" fromdate");
+ DATEOUT();
+ DESTSERVEROUT();
+ printf(" desttrans");
+ INTOUT();
+ break;
+ case 104: /* End trans */
+ printf(" trans");
+ UINTOUT();
+ break;
+ case 105: /* Clone */
+ printf(" trans");
+ UINTOUT();
+ printf(" purgevol");
+ UINTOUT();
+ printf(" newtype");
+ UINTOUT();
+ printf(" newname");
+ STROUT(AFSNAMEMAX);
+ break;
+ case 106: /* Set flags */
+ printf(" trans");
+ UINTOUT();
+ printf(" flags");
+ UINTOUT();
+ break;
+ case 108: /* Trans create */
+ printf(" vol");
+ UINTOUT();
+ printf(" partition");
+ UINTOUT();
+ printf(" flags");
+ UINTOUT();
+ break;
+ case 109: /* Dump */
+ case 655537: /* Get size */
+ printf(" fromtrans");
+ UINTOUT();
+ printf(" fromdate");
+ DATEOUT();
+ break;
+ case 110: /* Get n-th volume */
+ printf(" index");
+ UINTOUT();
+ break;
+ case 111: /* Set forwarding */
+ printf(" tid");
+ UINTOUT();
+ printf(" newsite");
+ UINTOUT();
+ break;
+ case 112: /* Get name */
+ case 113: /* Get status */
+ printf(" tid");
+ break;
+ case 114: /* Signal restore */
+ printf(" name");
+ STROUT(AFSNAMEMAX);
+ printf(" type");
+ UINTOUT();
+ printf(" pid");
+ UINTOUT();
+ printf(" cloneid");
+ UINTOUT();
+ break;
+ case 116: /* List volumes */
+ printf(" partition");
+ UINTOUT();
+ printf(" flags");
+ UINTOUT();
+ break;
+ case 117: /* Set id types */
+ printf(" tid");
+ UINTOUT();
+ printf(" name");
+ STROUT(AFSNAMEMAX);
+ printf(" type");
+ UINTOUT();
+ printf(" pid");
+ UINTOUT();
+ printf(" clone");
+ UINTOUT();
+ printf(" backup");
+ UINTOUT();
+ break;
+ case 119: /* Partition info */
+ printf(" name");
+ STROUT(AFSNAMEMAX);
+ break;
+ case 120: /* Reclone */
+ printf(" tid");
+ UINTOUT();
+ break;
+ case 121: /* List one volume */
+ case 122: /* Nuke volume */
+ case 124: /* Extended List volumes */
+ case 125: /* Extended List one volume */
+ case 65536: /* Convert RO to RW volume */
+ printf(" partid");
+ UINTOUT();
+ printf(" volid");
+ UINTOUT();
+ break;
+ case 123: /* Set date */
+ printf(" tid");
+ UINTOUT();
+ printf(" date");
+ DATEOUT();
+ break;
+ case 126: /* Set info */
+ printf(" tid");
+ UINTOUT();
+ break;
+ case 128: /* Forward multiple */
+ printf(" fromtrans");
+ UINTOUT();
+ printf(" fromdate");
+ DATEOUT();
+ {
+ unsigned long i, j;
+ TCHECK2(bp[0], 4);
+ j = EXTRACT_32BITS(bp);
+ bp += sizeof(int32_t);
+ for (i = 0; i < j; i++) {
+ DESTSERVEROUT();
+ if (i != j - 1)
+ printf(",");
+ }
+ if (j == 0)
+ printf(" <none!>");
+ }
+ break;
+ case 65538: /* Dump version 2 */
+ printf(" fromtrans");
+ UINTOUT();
+ printf(" fromdate");
+ DATEOUT();
+ printf(" flags");
+ UINTOUT();
+ break;
+ default:
+ ;
+ }
return;
trunc:
@@ -1955,10 +2173,100 @@ vol_reply_print(register const u_char *bp, int length, int32_t opcode)
* If it was a data packet, interpret the response.
*/
- if (rxh->type == RX_PACKET_TYPE_DATA)
- /* Well, no, not really. Leave this for later */
- ;
- else {
+ if (rxh->type == RX_PACKET_TYPE_DATA) {
+ switch (opcode) {
+ case 100: /* Create volume */
+ printf(" volid");
+ UINTOUT();
+ printf(" trans");
+ UINTOUT();
+ break;
+ case 104: /* End transaction */
+ UINTOUT();
+ break;
+ case 105: /* Clone */
+ printf(" newvol");
+ UINTOUT();
+ break;
+ case 107: /* Get flags */
+ UINTOUT();
+ break;
+ case 108: /* Transaction create */
+ printf(" trans");
+ UINTOUT();
+ break;
+ case 110: /* Get n-th volume */
+ printf(" volume");
+ UINTOUT();
+ printf(" partition");
+ UINTOUT();
+ break;
+ case 112: /* Get name */
+ STROUT(AFSNAMEMAX);
+ break;
+ case 113: /* Get status */
+ printf(" volid");
+ UINTOUT();
+ printf(" nextuniq");
+ UINTOUT();
+ printf(" type");
+ UINTOUT();
+ printf(" parentid");
+ UINTOUT();
+ printf(" clone");
+ UINTOUT();
+ printf(" backup");
+ UINTOUT();
+ printf(" restore");
+ UINTOUT();
+ printf(" maxquota");
+ UINTOUT();
+ printf(" minquota");
+ UINTOUT();
+ printf(" owner");
+ UINTOUT();
+ printf(" create");
+ DATEOUT();
+ printf(" access");
+ DATEOUT();
+ printf(" update");
+ DATEOUT();
+ printf(" expire");
+ DATEOUT();
+ printf(" backup");
+ DATEOUT();
+ printf(" copy");
+ DATEOUT();
+ break;
+ case 115: /* Old list partitions */
+ break;
+ case 116: /* List volumes */
+ case 121: /* List one volume */
+ {
+ unsigned long i, j;
+ TCHECK2(bp[0], 4);
+ j = EXTRACT_32BITS(bp);
+ bp += sizeof(int32_t);
+ for (i = 0; i < j; i++) {
+ printf(" name");
+ VECOUT(32);
+ printf(" volid");
+ UINTOUT();
+ printf(" type");
+ bp += sizeof(int32_t) * 21;
+ if (i != j - 1)
+ printf(",");
+ }
+ if (j == 0)
+ printf(" <none!>");
+ }
+ break;
+
+
+ default:
+ ;
+ }
+ } else {
/*
* Otherwise, just print out the return code
*/
diff --git a/contrib/tcpdump/print-sctp.c b/contrib/tcpdump/print-sctp.c
index 7a18978..05c753a 100644
--- a/contrib/tcpdump/print-sctp.c
+++ b/contrib/tcpdump/print-sctp.c
@@ -35,7 +35,7 @@
#ifndef lint
static const char rcsid[] _U_ =
-"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.16.2.5 2007/09/13 18:04:58 guy Exp $ (NETLAB/PEL)";
+"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.21 2007-09-13 18:03:49 guy Exp $ (NETLAB/PEL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-sflow.c b/contrib/tcpdump/print-sflow.c
new file mode 100644
index 0000000..baa5530
--- /dev/null
+++ b/contrib/tcpdump/print-sflow.c
@@ -0,0 +1,577 @@
+/*
+ * Copyright (c) 1998-2007 The TCPDUMP project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * The SFLOW protocol as per http://www.sflow.org/developers/specifications.php
+ *
+ * Original code by Carles Kishimoto <carles.kishimoto@gmail.com>
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+"@(#) $Header: /tcpdump/master/tcpdump/print-sflow.c,v 1.1 2007-08-08 17:20:58 hannes Exp $";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "interface.h"
+#include "extract.h"
+#include "addrtoname.h"
+
+/*
+ * sFlow datagram
+ *
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Sflow version (2,4,5) |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | IP version (1 for IPv4 | 2 for IPv6) |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | IP Address AGENT (4 or 16 bytes) |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Sub agent ID |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Datagram sequence number |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Switch uptime in ms |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | num samples in datagram |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ */
+
+struct sflow_datagram_t {
+ u_int8_t version[4];
+ u_int8_t ip_version[4];
+ u_int8_t agent[4];
+ u_int8_t agent_id[4];
+ u_int8_t seqnum[4];
+ u_int8_t uptime[4];
+ u_int8_t samples[4];
+};
+
+struct sflow_sample_header {
+ u_int8_t format[4];
+ u_int8_t len[4];
+};
+
+#define SFLOW_FLOW_SAMPLE 1
+#define SFLOW_COUNTER_SAMPLE 2
+#define SFLOW_EXPANDED_FLOW_SAMPLE 3
+#define SFLOW_EXPANDED_COUNTER_SAMPLE 4
+
+static const struct tok sflow_format_values[] = {
+ { SFLOW_FLOW_SAMPLE, "flow sample" },
+ { SFLOW_COUNTER_SAMPLE, "counter sample" },
+ { SFLOW_EXPANDED_FLOW_SAMPLE, "expanded flow sample" },
+ { SFLOW_EXPANDED_COUNTER_SAMPLE, "expanded counter sample" },
+ { 0, NULL}
+};
+
+struct sflow_expanded_flow_sample_t {
+ u_int8_t seqnum[4];
+ u_int8_t type[4];
+ u_int8_t index[4];
+ u_int8_t rate[4];
+ u_int8_t pool[4];
+ u_int8_t drops[4];
+ u_int8_t in_interface_format[4];
+ u_int8_t in_interface_value[4];
+ u_int8_t out_interface_format[4];
+ u_int8_t out_interface_value[4];
+ u_int8_t records[4];
+};
+
+#define SFLOW_FLOW_RAW_PACKET 1
+#define SFLOW_FLOW_ETHERNET_FRAME 2
+#define SFLOW_FLOW_IPV4_DATA 3
+#define SFLOW_FLOW_IPV6_DATA 4
+#define SFLOW_FLOW_EXTENDED_SWITCH_DATA 1001
+#define SFLOW_FLOW_EXTENDED_ROUTER_DATA 1002
+#define SFLOW_FLOW_EXTENDED_GATEWAY_DATA 1003
+#define SFLOW_FLOW_EXTENDED_USER_DATA 1004
+#define SFLOW_FLOW_EXTENDED_URL_DATA 1005
+#define SFLOW_FLOW_EXTENDED_MPLS_DATA 1006
+#define SFLOW_FLOW_EXTENDED_NAT_DATA 1007
+#define SFLOW_FLOW_EXTENDED_MPLS_TUNNEL 1008
+#define SFLOW_FLOW_EXTENDED_MPLS_VC 1009
+#define SFLOW_FLOW_EXTENDED_MPLS_FEC 1010
+#define SFLOW_FLOW_EXTENDED_MPLS_LVP_FEC 1011
+#define SFLOW_FLOW_EXTENDED_VLAN_TUNNEL 1012
+
+static const struct tok sflow_flow_type_values[] = {
+ { SFLOW_FLOW_RAW_PACKET, "Raw packet"},
+ { SFLOW_FLOW_ETHERNET_FRAME, "Ethernet frame"},
+ { SFLOW_FLOW_IPV4_DATA, "IPv4 Data"},
+ { SFLOW_FLOW_IPV6_DATA, "IPv6 Data"},
+ { SFLOW_FLOW_EXTENDED_SWITCH_DATA, "Extended Switch data"},
+ { SFLOW_FLOW_EXTENDED_ROUTER_DATA, "Extended Router data"},
+ { SFLOW_FLOW_EXTENDED_GATEWAY_DATA, "Extended Gateway data"},
+ { SFLOW_FLOW_EXTENDED_USER_DATA, "Extended User data"},
+ { SFLOW_FLOW_EXTENDED_URL_DATA, "Extended URL data"},
+ { SFLOW_FLOW_EXTENDED_MPLS_DATA, "Extended MPLS data"},
+ { SFLOW_FLOW_EXTENDED_NAT_DATA, "Extended NAT data"},
+ { SFLOW_FLOW_EXTENDED_MPLS_TUNNEL, "Extended MPLS tunnel"},
+ { SFLOW_FLOW_EXTENDED_MPLS_VC, "Extended MPLS VC"},
+ { SFLOW_FLOW_EXTENDED_MPLS_FEC, "Extended MPLS FEC"},
+ { SFLOW_FLOW_EXTENDED_MPLS_LVP_FEC, "Extended MPLS LVP FEC"},
+ { SFLOW_FLOW_EXTENDED_VLAN_TUNNEL, "Extended VLAN Tunnel"},
+ { 0, NULL}
+};
+
+#define SFLOW_HEADER_PROTOCOL_ETHERNET 1
+#define SFLOW_HEADER_PROTOCOL_IPV4 11
+#define SFLOW_HEADER_PROTOCOL_IPV6 12
+
+static const struct tok sflow_flow_raw_protocol_values[] = {
+ { SFLOW_HEADER_PROTOCOL_ETHERNET, "Ethernet"},
+ { SFLOW_HEADER_PROTOCOL_IPV4, "IPv4"},
+ { SFLOW_HEADER_PROTOCOL_IPV6, "IPv6"},
+ { 0, NULL}
+};
+
+struct sflow_expanded_flow_raw_t {
+ u_int8_t protocol[4];
+ u_int8_t length[4];
+ u_int8_t stripped_bytes[4];
+ u_int8_t header_size[4];
+};
+
+struct sflow_expanded_counter_sample_t {
+ u_int8_t seqnum[4];
+ u_int8_t type[4];
+ u_int8_t index[4];
+ u_int8_t records[4];
+};
+
+#define SFLOW_COUNTER_GENERIC 1
+#define SFLOW_COUNTER_ETHERNET 2
+#define SFLOW_COUNTER_TOKEN_RING 3
+#define SFLOW_COUNTER_BASEVG 4
+#define SFLOW_COUNTER_VLAN 5
+#define SFLOW_COUNTER_PROCESSOR 1001
+
+static const struct tok sflow_counter_type_values[] = {
+ { SFLOW_COUNTER_GENERIC, "Generic counter"},
+ { SFLOW_COUNTER_ETHERNET, "Ethernet counter"},
+ { SFLOW_COUNTER_TOKEN_RING, "Token ring counter"},
+ { SFLOW_COUNTER_BASEVG, "100 BaseVG counter"},
+ { SFLOW_COUNTER_VLAN, "Vlan counter"},
+ { SFLOW_COUNTER_PROCESSOR, "Processor counter"},
+ { 0, NULL}
+};
+
+#define SFLOW_IFACE_DIRECTION_UNKNOWN 0
+#define SFLOW_IFACE_DIRECTION_FULLDUPLEX 1
+#define SFLOW_IFACE_DIRECTION_HALFDUPLEX 2
+#define SFLOW_IFACE_DIRECTION_IN 3
+#define SFLOW_IFACE_DIRECTION_OUT 4
+
+static const struct tok sflow_iface_direction_values[] = {
+ { SFLOW_IFACE_DIRECTION_UNKNOWN, "unknown"},
+ { SFLOW_IFACE_DIRECTION_FULLDUPLEX, "full-duplex"},
+ { SFLOW_IFACE_DIRECTION_HALFDUPLEX, "half-duplex"},
+ { SFLOW_IFACE_DIRECTION_IN, "in"},
+ { SFLOW_IFACE_DIRECTION_OUT, "out"},
+ { 0, NULL}
+};
+
+struct sflow_generic_counter_t {
+ u_int8_t ifindex[4];
+ u_int8_t iftype[4];
+ u_int8_t ifspeed[8];
+ u_int8_t ifdirection[4];
+ u_int8_t ifstatus[4];
+ u_int8_t ifinoctets[8];
+ u_int8_t ifinunicastpkts[4];
+ u_int8_t ifinmulticastpkts[4];
+ u_int8_t ifinbroadcastpkts[4];
+ u_int8_t ifindiscards[4];
+ u_int8_t ifinerrors[4];
+ u_int8_t ifinunkownprotos[4];
+ u_int8_t ifoutoctets[8];
+ u_int8_t ifoutunicastpkts[4];
+ u_int8_t ifoutmulticastpkts[4];
+ u_int8_t ifoutbroadcastpkts[4];
+ u_int8_t ifoutdiscards[4];
+ u_int8_t ifouterrors[4];
+ u_int8_t ifpromiscmode[4];
+};
+
+struct sflow_ethernet_counter_t {
+ u_int8_t alignerrors[4];
+ u_int8_t fcserrors[4];
+ u_int8_t single_collision_frames[4];
+ u_int8_t multiple_collision_frames[4];
+ u_int8_t test_errors[4];
+ u_int8_t deferred_transmissions[4];
+ u_int8_t late_collisions[4];
+ u_int8_t excessive_collisions[4];
+ u_int8_t mac_transmit_errors[4];
+ u_int8_t carrier_sense_errors[4];
+ u_int8_t frame_too_longs[4];
+ u_int8_t mac_receive_errors[4];
+ u_int8_t symbol_errors[4];
+};
+
+struct sflow_100basevg_counter_t {
+ u_int8_t in_highpriority_frames[4];
+ u_int8_t in_highpriority_octets[8];
+ u_int8_t in_normpriority_frames[4];
+ u_int8_t in_normpriority_octets[8];
+ u_int8_t in_ipmerrors[4];
+ u_int8_t in_oversized[4];
+ u_int8_t in_data_errors[4];
+ u_int8_t in_null_addressed_frames[4];
+ u_int8_t out_highpriority_frames[4];
+ u_int8_t out_highpriority_octets[8];
+ u_int8_t transitioninto_frames[4];
+ u_int8_t hc_in_highpriority_octets[8];
+ u_int8_t hc_in_normpriority_octets[8];
+ u_int8_t hc_out_highpriority_octets[8];
+};
+
+struct sflow_vlan_counter_t {
+ u_int8_t vlan_id[4];
+ u_int8_t octets[8];
+ u_int8_t unicast_pkt[4];
+ u_int8_t multicast_pkt[4];
+ u_int8_t broadcast_pkt[4];
+ u_int8_t discards[4];
+};
+
+void
+sflow_print(const u_char *pptr, u_int len) {
+
+ const struct sflow_datagram_t *sflow_datagram;
+ const struct sflow_sample_header *sflow_sample;
+ const struct sflow_expanded_flow_sample_t *sflow_expanded_flow_sample;
+ const struct sflow_expanded_flow_raw_t *sflow_flow_raw;
+ const struct sflow_expanded_counter_sample_t *sflow_expanded_counter_sample;
+ const struct sflow_generic_counter_t *sflow_gen_counter;
+ const struct sflow_ethernet_counter_t *sflow_eth_counter;
+ const struct sflow_100basevg_counter_t *sflow_100basevg_counter;
+ const struct sflow_vlan_counter_t *sflow_vlan_counter;
+ const u_char *tptr;
+ int tlen;
+ u_int32_t sflow_sample_type, sflow_sample_len;
+ int nsamples, nrecords, counter_len, counter_type, flow_len, flow_type;
+
+ tptr=pptr;
+ tlen = len;
+ sflow_datagram = (const struct sflow_datagram_t *)pptr;
+ TCHECK(*sflow_datagram);
+
+ /*
+ * Sanity checking of the header.
+ */
+ if (EXTRACT_32BITS(sflow_datagram->version) != 5) {
+ printf("sFlow version %u packet not supported",
+ EXTRACT_32BITS(sflow_datagram->version));
+ return;
+ }
+
+ if (vflag < 1) {
+ printf("sFlowv%u, %s agent %s, agent-id %u, length %u",
+ EXTRACT_32BITS(sflow_datagram->version),
+ EXTRACT_32BITS(sflow_datagram->ip_version) == 1 ? "IPv4" : "IPv6",
+ ipaddr_string(sflow_datagram->agent),
+ EXTRACT_32BITS(sflow_datagram->samples),
+ len);
+ return;
+ }
+
+ /* ok they seem to want to know everything - lets fully decode it */
+ nsamples=EXTRACT_32BITS(sflow_datagram->samples);
+ printf("sFlowv%u, %s agent %s, agent-id %u, seqnum %u, uptime %u, samples %u, length %u",
+ EXTRACT_32BITS(sflow_datagram->version),
+ EXTRACT_32BITS(sflow_datagram->ip_version) == 1 ? "IPv4" : "IPv6",
+ ipaddr_string(sflow_datagram->agent),
+ EXTRACT_32BITS(sflow_datagram->agent_id),
+ EXTRACT_32BITS(sflow_datagram->seqnum),
+ EXTRACT_32BITS(sflow_datagram->uptime),
+ nsamples,
+ len);
+
+ /* skip Common header */
+ tptr+=sizeof(const struct sflow_datagram_t);
+ tlen-=sizeof(const struct sflow_datagram_t);
+
+ while (nsamples > 0 && tlen > 0) {
+ sflow_sample = (const struct sflow_sample_header *)tptr;
+ sflow_sample_type = (EXTRACT_32BITS(sflow_sample->format)&0x0FFF);
+ sflow_sample_len = EXTRACT_32BITS(sflow_sample->len);
+
+ tptr+=sizeof(struct sflow_sample_header);
+ tlen-=sizeof(struct sflow_sample_header);
+
+ printf("\n\t%s (%u), length %u,",
+ tok2str(sflow_format_values, "Unknown", sflow_sample_type),
+ sflow_sample_type,
+ sflow_sample_len);
+
+ /* basic sanity check */
+ if (sflow_sample_type == 0 || sflow_sample_len ==0) {
+ return;
+ }
+
+ /* did we capture enough for fully decoding the sample ? */
+ if (!TTEST2(*tptr, sflow_sample_len))
+ goto trunc;
+
+ switch(sflow_sample_type) {
+ case SFLOW_FLOW_SAMPLE: /* XXX */
+ break;
+
+ case SFLOW_COUNTER_SAMPLE: /* XXX */
+ break;
+
+ case SFLOW_EXPANDED_FLOW_SAMPLE:
+ sflow_expanded_flow_sample = (const struct sflow_expanded_flow_sample_t *)tptr;
+ nrecords = EXTRACT_32BITS(sflow_expanded_flow_sample->records);
+
+ printf(" seqnum %u, type %u, idx %u, rate %u, pool %u, drops %u, records %u",
+ EXTRACT_32BITS(sflow_expanded_flow_sample->seqnum),
+ EXTRACT_32BITS(sflow_expanded_flow_sample->type),
+ EXTRACT_32BITS(sflow_expanded_flow_sample->index),
+ EXTRACT_32BITS(sflow_expanded_flow_sample->rate),
+ EXTRACT_32BITS(sflow_expanded_flow_sample->pool),
+ EXTRACT_32BITS(sflow_expanded_flow_sample->drops),
+ EXTRACT_32BITS(sflow_expanded_flow_sample->records));
+
+ tptr+= sizeof(struct sflow_expanded_flow_sample_t);
+ tlen-= sizeof(struct sflow_expanded_flow_sample_t);
+
+ while ( nrecords > 0 && tlen > 0) {
+
+ /* decode Flow record - 2 bytes */
+ flow_type = EXTRACT_32BITS(tptr)&0x0FFF;
+ flow_len = EXTRACT_32BITS(tptr+4);
+ printf("\n\t %s (%u) length %u",
+ tok2str(sflow_flow_type_values,"Unknown",flow_type),
+ flow_type,
+ flow_len);
+
+ tptr += 8;
+ tlen -= 8;
+
+ /* did we capture enough for fully decoding the flow ? */
+ if (!TTEST2(*tptr, flow_len))
+ goto trunc;
+
+ switch(flow_type) {
+ case SFLOW_FLOW_RAW_PACKET:
+ sflow_flow_raw = (const struct sflow_expanded_flow_raw_t *)tptr;
+ printf("\n\t protocol %s (%u), length %u, stripped bytes %u, header_size %u",
+ tok2str(sflow_flow_raw_protocol_values,"Unknown",EXTRACT_32BITS(sflow_flow_raw->protocol)),
+ EXTRACT_32BITS(sflow_flow_raw->protocol),
+ EXTRACT_32BITS(sflow_flow_raw->length),
+ EXTRACT_32BITS(sflow_flow_raw->stripped_bytes),
+ EXTRACT_32BITS(sflow_flow_raw->header_size));
+ break;
+
+ /*
+ * FIXME those are the defined flow types that lack a decoder
+ */
+ case SFLOW_FLOW_ETHERNET_FRAME:
+ case SFLOW_FLOW_IPV4_DATA:
+ case SFLOW_FLOW_IPV6_DATA:
+ case SFLOW_FLOW_EXTENDED_SWITCH_DATA:
+ case SFLOW_FLOW_EXTENDED_ROUTER_DATA:
+ case SFLOW_FLOW_EXTENDED_GATEWAY_DATA:
+ case SFLOW_FLOW_EXTENDED_USER_DATA:
+ case SFLOW_FLOW_EXTENDED_URL_DATA:
+ case SFLOW_FLOW_EXTENDED_MPLS_DATA:
+ case SFLOW_FLOW_EXTENDED_NAT_DATA:
+ case SFLOW_FLOW_EXTENDED_MPLS_TUNNEL:
+ case SFLOW_FLOW_EXTENDED_MPLS_VC:
+ case SFLOW_FLOW_EXTENDED_MPLS_FEC:
+ case SFLOW_FLOW_EXTENDED_MPLS_LVP_FEC:
+ case SFLOW_FLOW_EXTENDED_VLAN_TUNNEL:
+ break;
+ default:
+ if (vflag <= 1)
+ print_unknown_data(tptr, "\n\t ", flow_len);
+ break;
+
+ }
+ tptr += flow_len;
+ tlen -= flow_len;
+ nrecords--;
+ }
+ break;
+
+ case SFLOW_EXPANDED_COUNTER_SAMPLE:
+ sflow_expanded_counter_sample = (const struct sflow_expanded_counter_sample_t *)tptr;
+ nrecords = EXTRACT_32BITS(sflow_expanded_counter_sample->records);
+
+ printf(" seqnum %u, type %u, idx %u, records %u",
+ EXTRACT_32BITS(sflow_expanded_counter_sample->seqnum),
+ EXTRACT_32BITS(sflow_expanded_counter_sample->type),
+ EXTRACT_32BITS(sflow_expanded_counter_sample->index),
+ nrecords);
+
+ tptr+= sizeof(struct sflow_expanded_counter_sample_t);
+ tlen-= sizeof(struct sflow_expanded_counter_sample_t);
+
+ while ( nrecords > 0 && tlen > 0) {
+
+ /* decode counter record - 2 bytes */
+ counter_type = EXTRACT_32BITS(tptr)&0x0FFF;
+ counter_len = EXTRACT_32BITS(tptr+4);
+ printf("\n\t %s (%u) length %u",
+ tok2str(sflow_counter_type_values,"Unknown",counter_type),
+ counter_type,
+ counter_len);
+
+ tptr += 8;
+ tlen -= 8;
+
+ /* did we capture enough for fully decoding the counter ? */
+ if (!TTEST2(*tptr, counter_len))
+ goto trunc;
+
+ switch(counter_type) {
+ case SFLOW_COUNTER_GENERIC:
+ sflow_gen_counter = (const struct sflow_generic_counter_t *)tptr;
+ printf("\n\t ifindex %u, iftype %u, ifspeed %u, ifdirection %u (%s)",
+ EXTRACT_32BITS(sflow_gen_counter->ifindex),
+ EXTRACT_32BITS(sflow_gen_counter->iftype),
+ EXTRACT_32BITS(sflow_gen_counter->ifspeed),
+ EXTRACT_32BITS(sflow_gen_counter->ifdirection),
+ tok2str(sflow_iface_direction_values, "Unknown",
+ EXTRACT_32BITS(sflow_gen_counter->ifdirection)));
+ printf("\n\t ifstatus %u, adminstatus: %s, operstatus: %s",
+ EXTRACT_32BITS(sflow_gen_counter->ifstatus),
+ EXTRACT_32BITS(sflow_gen_counter->ifstatus)&1 ? "up" : "down",
+ (EXTRACT_32BITS(sflow_gen_counter->ifstatus)>>1)&1 ? "up" : "down");
+ printf("\n\t In octets %" PRIu64
+ ", unicast pkts %u, multicast pkts %u, broadcast pkts %u, discards %u",
+ EXTRACT_64BITS(sflow_gen_counter->ifinoctets),
+ EXTRACT_32BITS(sflow_gen_counter->ifinunicastpkts),
+ EXTRACT_32BITS(sflow_gen_counter->ifinmulticastpkts),
+ EXTRACT_32BITS(sflow_gen_counter->ifinbroadcastpkts),
+ EXTRACT_32BITS(sflow_gen_counter->ifindiscards));
+ printf("\n\t In errors %u, unknown protos %u",
+ EXTRACT_32BITS(sflow_gen_counter->ifinerrors),
+ EXTRACT_32BITS(sflow_gen_counter->ifinunkownprotos));
+ printf("\n\t Out octets %" PRIu64
+ ", unicast pkts %u, multicast pkts %u, broadcast pkts %u, discards %u",
+ EXTRACT_64BITS(sflow_gen_counter->ifoutoctets),
+ EXTRACT_32BITS(sflow_gen_counter->ifoutunicastpkts),
+ EXTRACT_32BITS(sflow_gen_counter->ifoutmulticastpkts),
+ EXTRACT_32BITS(sflow_gen_counter->ifoutbroadcastpkts),
+ EXTRACT_32BITS(sflow_gen_counter->ifoutdiscards));
+ printf("\n\t Out errors %u, promisc mode %u",
+ EXTRACT_32BITS(sflow_gen_counter->ifouterrors),
+ EXTRACT_32BITS(sflow_gen_counter->ifpromiscmode));
+ break;
+ case SFLOW_COUNTER_ETHERNET:
+ sflow_eth_counter = (const struct sflow_ethernet_counter_t *)tptr;
+ printf("\n\t align errors %u, fcs errors %u, single collision %u, multiple collision %u, test error %u",
+ EXTRACT_32BITS(sflow_eth_counter->alignerrors),
+ EXTRACT_32BITS(sflow_eth_counter->fcserrors),
+ EXTRACT_32BITS(sflow_eth_counter->single_collision_frames),
+ EXTRACT_32BITS(sflow_eth_counter->multiple_collision_frames),
+ EXTRACT_32BITS(sflow_eth_counter->test_errors));
+ printf("\n\t deferred %u, late collision %u, excessive collision %u, mac trans error %u",
+ EXTRACT_32BITS(sflow_eth_counter->deferred_transmissions),
+ EXTRACT_32BITS(sflow_eth_counter->late_collisions),
+ EXTRACT_32BITS(sflow_eth_counter->excessive_collisions),
+ EXTRACT_32BITS(sflow_eth_counter->mac_transmit_errors));
+ printf("\n\t carrier error %u, frames too long %u, mac receive errors %u, symbol errors %u",
+ EXTRACT_32BITS(sflow_eth_counter->carrier_sense_errors),
+ EXTRACT_32BITS(sflow_eth_counter->frame_too_longs),
+ EXTRACT_32BITS(sflow_eth_counter->mac_receive_errors),
+ EXTRACT_32BITS(sflow_eth_counter->symbol_errors));
+ break;
+ case SFLOW_COUNTER_TOKEN_RING: /* XXX */
+ break;
+ case SFLOW_COUNTER_BASEVG:
+ sflow_100basevg_counter = (const struct sflow_100basevg_counter_t *)tptr;
+ printf("\n\t in high prio frames %u, in high prio octets %" PRIu64,
+ EXTRACT_32BITS(sflow_100basevg_counter->in_highpriority_frames),
+ EXTRACT_64BITS(sflow_100basevg_counter->in_highpriority_octets));
+ printf("\n\t in norm prio frames %u, in norm prio octets %" PRIu64,
+ EXTRACT_32BITS(sflow_100basevg_counter->in_normpriority_frames),
+ EXTRACT_64BITS(sflow_100basevg_counter->in_normpriority_octets));
+ printf("\n\t in ipm errors %u, oversized %u, in data errors %u, null addressed frames %u",
+ EXTRACT_32BITS(sflow_100basevg_counter->in_ipmerrors),
+ EXTRACT_32BITS(sflow_100basevg_counter->in_oversized),
+ EXTRACT_32BITS(sflow_100basevg_counter->in_data_errors),
+ EXTRACT_32BITS(sflow_100basevg_counter->in_null_addressed_frames));
+ printf("\n\t out high prio frames %u, out high prio octets %" PRIu64
+ ", trans into frames %u",
+ EXTRACT_32BITS(sflow_100basevg_counter->out_highpriority_frames),
+ EXTRACT_64BITS(sflow_100basevg_counter->out_highpriority_octets),
+ EXTRACT_32BITS(sflow_100basevg_counter->transitioninto_frames));
+ printf("\n\t in hc high prio octets %" PRIu64
+ ", in hc norm prio octets %" PRIu64
+ ", out hc high prio octets %" PRIu64,
+ EXTRACT_64BITS(sflow_100basevg_counter->hc_in_highpriority_octets),
+ EXTRACT_64BITS(sflow_100basevg_counter->hc_in_normpriority_octets),
+ EXTRACT_64BITS(sflow_100basevg_counter->hc_out_highpriority_octets));
+ break;
+ case SFLOW_COUNTER_VLAN:
+ sflow_vlan_counter = (const struct sflow_vlan_counter_t *)tptr;
+ printf("\n\t vlan_id %u, octets %" PRIu64
+ ", unicast_pkt %u, multicast_pkt %u, broadcast_pkt %u, discards %u",
+ EXTRACT_32BITS(sflow_vlan_counter->vlan_id),
+ EXTRACT_64BITS(sflow_vlan_counter->octets),
+ EXTRACT_32BITS(sflow_vlan_counter->unicast_pkt),
+ EXTRACT_32BITS(sflow_vlan_counter->multicast_pkt),
+ EXTRACT_32BITS(sflow_vlan_counter->broadcast_pkt),
+ EXTRACT_32BITS(sflow_vlan_counter->discards));
+ break;
+ case SFLOW_COUNTER_PROCESSOR: /* XXX */
+ break;
+ default:
+ if (vflag <= 1)
+ print_unknown_data(tptr, "\n\t\t", counter_len);
+ break;
+ }
+ tptr += counter_len;
+ tlen -= counter_len;
+ nrecords--;
+ }
+ break;
+ default:
+ if (vflag <= 1)
+ print_unknown_data(tptr, "\n\t ", sflow_sample_len);
+ break;
+ }
+ tptr += sflow_sample_len;
+ tlen -= sflow_sample_len;
+ nsamples--;
+ }
+ return;
+
+ trunc:
+ printf("[|SFLOW]");
+}
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/contrib/tcpdump/print-sip.c b/contrib/tcpdump/print-sip.c
index b4d13b1..48562f8 100644
--- a/contrib/tcpdump/print-sip.c
+++ b/contrib/tcpdump/print-sip.c
@@ -15,7 +15,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-sip.c,v 1.1 2004/07/27 17:04:20 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-sip.c,v 1.1 2004-07-27 17:04:20 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-sl.c b/contrib/tcpdump/print-sl.c
index 97389d8..dd02767 100644
--- a/contrib/tcpdump/print-sl.c
+++ b/contrib/tcpdump/print-sl.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.65 2005/04/06 21:32:42 mcr Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-sl.c,v 1.65 2005-04-06 21:32:42 mcr Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-sll.c b/contrib/tcpdump/print-sll.c
index 1735f65..d96b3de 100644
--- a/contrib/tcpdump/print-sll.c
+++ b/contrib/tcpdump/print-sll.c
@@ -20,7 +20,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.16.2.3 2005/11/13 12:13:00 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.19 2005-11-13 12:12:43 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-slow.c b/contrib/tcpdump/print-slow.c
index 9609922..eaf94ed 100644
--- a/contrib/tcpdump/print-slow.c
+++ b/contrib/tcpdump/print-slow.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998-2005 The TCPDUMP project
+ * Copyright (c) 1998-2006 The TCPDUMP project
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that: (1) source code
@@ -13,13 +13,14 @@
* FOR A PARTICULAR PURPOSE.
*
* support for the IEEE "slow protocols" LACP, MARKER as per 802.3ad
+ * OAM as per 802.3ah
*
* Original code by Hannes Gredler (hannes@juniper.net)
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-slow.c,v 1.1.2.1 2005/07/10 14:47:56 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-slow.c,v 1.8 2006-10-12 05:44:33 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -36,14 +37,16 @@ static const char rcsid[] _U_ =
#include "extract.h"
#include "addrtoname.h"
#include "ether.h"
+#include "oui.h"
-struct slow_common_header {
+struct slow_common_header_t {
u_int8_t proto_subtype;
u_int8_t version;
};
#define SLOW_PROTO_LACP 1
#define SLOW_PROTO_MARKER 2
+#define SLOW_PROTO_OAM 3
#define LACP_VERSION 1
#define MARKER_VERSION 1
@@ -51,6 +54,137 @@ struct slow_common_header {
static const struct tok slow_proto_values[] = {
{ SLOW_PROTO_LACP, "LACP" },
{ SLOW_PROTO_MARKER, "MARKER" },
+ { SLOW_PROTO_OAM, "OAM" },
+ { 0, NULL}
+};
+
+static const struct tok slow_oam_flag_values[] = {
+ { 0x0001, "Link Fault" },
+ { 0x0002, "Dying Gasp" },
+ { 0x0004, "Critical Event" },
+ { 0x0008, "Local Evaluating" },
+ { 0x0010, "Local Stable" },
+ { 0x0020, "Remote Evaluating" },
+ { 0x0040, "Remote Stable" },
+ { 0, NULL}
+};
+
+#define SLOW_OAM_CODE_INFO 0x00
+#define SLOW_OAM_CODE_EVENT_NOTIF 0x01
+#define SLOW_OAM_CODE_VAR_REQUEST 0x02
+#define SLOW_OAM_CODE_VAR_RESPONSE 0x03
+#define SLOW_OAM_CODE_LOOPBACK_CTRL 0x04
+#define SLOW_OAM_CODE_PRIVATE 0xfe
+
+static const struct tok slow_oam_code_values[] = {
+ { SLOW_OAM_CODE_INFO, "Information" },
+ { SLOW_OAM_CODE_EVENT_NOTIF, "Event Notification" },
+ { SLOW_OAM_CODE_VAR_REQUEST, "Variable Request" },
+ { SLOW_OAM_CODE_VAR_RESPONSE, "Variable Response" },
+ { SLOW_OAM_CODE_LOOPBACK_CTRL, "Loopback Control" },
+ { SLOW_OAM_CODE_PRIVATE, "Vendor Private" },
+ { 0, NULL}
+};
+
+struct slow_oam_info_t {
+ u_int8_t info_type;
+ u_int8_t info_length;
+ u_int8_t oam_version;
+ u_int8_t revision[2];
+ u_int8_t state;
+ u_int8_t oam_config;
+ u_int8_t oam_pdu_config[2];
+ u_int8_t oui[3];
+ u_int8_t vendor_private[4];
+};
+
+#define SLOW_OAM_INFO_TYPE_END_OF_TLV 0x00
+#define SLOW_OAM_INFO_TYPE_LOCAL 0x01
+#define SLOW_OAM_INFO_TYPE_REMOTE 0x02
+#define SLOW_OAM_INFO_TYPE_ORG_SPECIFIC 0xfe
+
+static const struct tok slow_oam_info_type_values[] = {
+ { SLOW_OAM_INFO_TYPE_END_OF_TLV, "End of TLV marker" },
+ { SLOW_OAM_INFO_TYPE_LOCAL, "Local" },
+ { SLOW_OAM_INFO_TYPE_REMOTE, "Remote" },
+ { SLOW_OAM_INFO_TYPE_ORG_SPECIFIC, "Organization specific" },
+ { 0, NULL}
+};
+
+#define OAM_INFO_TYPE_PARSER_MASK 0x3
+static const struct tok slow_oam_info_type_state_parser_values[] = {
+ { 0x00, "forwarding" },
+ { 0x01, "looping back" },
+ { 0x02, "discarding" },
+ { 0x03, "reserved" },
+ { 0, NULL}
+};
+
+#define OAM_INFO_TYPE_MUX_MASK 0x4
+static const struct tok slow_oam_info_type_state_mux_values[] = {
+ { 0x00, "forwarding" },
+ { 0x04, "discarding" },
+ { 0, NULL}
+};
+
+static const struct tok slow_oam_info_type_oam_config_values[] = {
+ { 0x01, "Active" },
+ { 0x02, "Unidirectional" },
+ { 0x04, "Remote-Loopback" },
+ { 0x08, "Link-Events" },
+ { 0x10, "Variable-Retrieval" },
+ { 0, NULL}
+};
+
+/* 11 Bits */
+#define OAM_INFO_TYPE_PDU_SIZE_MASK 0x7ff
+
+#define SLOW_OAM_LINK_EVENT_END_OF_TLV 0x00
+#define SLOW_OAM_LINK_EVENT_ERR_SYM_PER 0x01
+#define SLOW_OAM_LINK_EVENT_ERR_FRM 0x02
+#define SLOW_OAM_LINK_EVENT_ERR_FRM_PER 0x03
+#define SLOW_OAM_LINK_EVENT_ERR_FRM_SUMM 0x04
+#define SLOW_OAM_LINK_EVENT_ORG_SPECIFIC 0xfe
+
+static const struct tok slow_oam_link_event_values[] = {
+ { SLOW_OAM_LINK_EVENT_END_OF_TLV, "End of TLV marker" },
+ { SLOW_OAM_LINK_EVENT_ERR_SYM_PER, "Errored Symbol Period Event" },
+ { SLOW_OAM_LINK_EVENT_ERR_FRM, "Errored Frame Event" },
+ { SLOW_OAM_LINK_EVENT_ERR_FRM_PER, "Errored Frame Period Event" },
+ { SLOW_OAM_LINK_EVENT_ERR_FRM_SUMM, "Errored Frame Seconds Summary Event" },
+ { SLOW_OAM_LINK_EVENT_ORG_SPECIFIC, "Organization specific" },
+ { 0, NULL}
+};
+
+struct slow_oam_link_event_t {
+ u_int8_t event_type;
+ u_int8_t event_length;
+ u_int8_t time_stamp[2];
+ u_int8_t window[8];
+ u_int8_t threshold[8];
+ u_int8_t errors[8];
+ u_int8_t errors_running_total[8];
+ u_int8_t event_running_total[4];
+};
+
+struct slow_oam_variablerequest_t {
+ u_int8_t branch;
+ u_int8_t leaf[2];
+};
+
+struct slow_oam_variableresponse_t {
+ u_int8_t branch;
+ u_int8_t leaf[2];
+ u_int8_t length;
+};
+
+struct slow_oam_loopbackctrl_t {
+ u_int8_t command;
+};
+
+static const struct tok slow_oam_loopbackctrl_cmd_values[] = {
+ { 0x01, "Enable OAM Remote Loopback" },
+ { 0x02, "Disable OAM Remote Loopback" },
{ 0, NULL}
};
@@ -116,58 +250,113 @@ struct lacp_marker_tlv_terminator_t {
u_int8_t pad[50];
};
+void slow_marker_lacp_print(register const u_char *, register u_int);
+void slow_oam_print(register const u_char *, register u_int);
+
+const struct slow_common_header_t *slow_com_header;
+
void
slow_print(register const u_char *pptr, register u_int len) {
- const struct slow_common_header *slow_com_header;
- const struct tlv_header_t *tlv_header;
- const u_char *tptr,*tlv_tptr;
- u_int tlv_len,tlen,tlv_tlen;
-
- union {
- const struct lacp_marker_tlv_terminator_t *lacp_marker_tlv_terminator;
- const struct lacp_tlv_actor_partner_info_t *lacp_tlv_actor_partner_info;
- const struct lacp_tlv_collector_info_t *lacp_tlv_collector_info;
- const struct marker_tlv_marker_info_t *marker_tlv_marker_info;
- } tlv_ptr;
+ int print_version;
- tptr=pptr;
- slow_com_header = (const struct slow_common_header *)pptr;
+ slow_com_header = (const struct slow_common_header_t *)pptr;
TCHECK(*slow_com_header);
/*
* Sanity checking of the header.
*/
- if (slow_com_header->proto_subtype == SLOW_PROTO_LACP &&
- slow_com_header->version != LACP_VERSION) {
- printf("LACP version %u packet not supported",slow_com_header->version);
- return;
+ switch (slow_com_header->proto_subtype) {
+ case SLOW_PROTO_LACP:
+ if (slow_com_header->version != LACP_VERSION) {
+ printf("LACP version %u packet not supported",slow_com_header->version);
+ return;
+ }
+ print_version = 1;
+ break;
+
+ case SLOW_PROTO_MARKER:
+ if (slow_com_header->version != MARKER_VERSION) {
+ printf("MARKER version %u packet not supported",slow_com_header->version);
+ return;
+ }
+ print_version = 1;
+ break;
+
+ case SLOW_PROTO_OAM: /* fall through */
+ print_version = 0;
+ break;
+
+ default:
+ /* print basic information and exit */
+ print_version = -1;
+ break;
}
- if (slow_com_header->proto_subtype == SLOW_PROTO_MARKER &&
- slow_com_header->version != MARKER_VERSION) {
- printf("MARKER version %u packet not supported",slow_com_header->version);
- return;
+
+ if (print_version) {
+ printf("%sv%u, length %u",
+ tok2str(slow_proto_values, "unknown (%u)",slow_com_header->proto_subtype),
+ slow_com_header->version,
+ len);
+ } else {
+ /* some slow protos don't have a version number in the header */
+ printf("%s, length %u",
+ tok2str(slow_proto_values, "unknown (%u)",slow_com_header->proto_subtype),
+ len);
}
- printf("%sv%u, length: %u",
- tok2str(slow_proto_values, "unknown (%u)",slow_com_header->proto_subtype),
- slow_com_header->version,
- len);
+ /* unrecognized subtype */
+ if (print_version == -1) {
+ print_unknown_data(pptr, "\n\t", len);
+ return;
+ }
if (!vflag)
return;
- /* ok they seem to want to know everything - lets fully decode it */
- tlen=len-sizeof(struct slow_common_header);
- tptr+=sizeof(const struct slow_common_header);
+ switch (slow_com_header->proto_subtype) {
+ default: /* should not happen */
+ break;
+
+ case SLOW_PROTO_OAM:
+ /* skip proto_subtype */
+ slow_oam_print(pptr+1, len-1);
+ break;
+
+ case SLOW_PROTO_LACP: /* LACP and MARKER share the same semantics */
+ case SLOW_PROTO_MARKER:
+ /* skip slow_common_header */
+ len -= sizeof(const struct slow_common_header_t);
+ pptr += sizeof(const struct slow_common_header_t);
+ slow_marker_lacp_print(pptr, len);
+ break;
+ }
+ return;
+
+trunc:
+ printf("\n\t\t packet exceeded snapshot");
+}
+void slow_marker_lacp_print(register const u_char *tptr, register u_int tlen) {
+
+ const struct tlv_header_t *tlv_header;
+ const u_char *tlv_tptr;
+ u_int tlv_len, tlv_tlen;
+
+ union {
+ const struct lacp_marker_tlv_terminator_t *lacp_marker_tlv_terminator;
+ const struct lacp_tlv_actor_partner_info_t *lacp_tlv_actor_partner_info;
+ const struct lacp_tlv_collector_info_t *lacp_tlv_collector_info;
+ const struct marker_tlv_marker_info_t *marker_tlv_marker_info;
+ } tlv_ptr;
+
while(tlen>0) {
/* did we capture enough for fully decoding the tlv header ? */
TCHECK2(*tptr, sizeof(struct tlv_header_t));
tlv_header = (const struct tlv_header_t *)tptr;
tlv_len = tlv_header->length;
- printf("\n\t%s TLV (0x%02x), length: %u",
+ printf("\n\t%s TLV (0x%02x), length %u",
tok2str(slow_tlv_values,
"Unknown",
(slow_com_header->proto_subtype << 8) + tlv_header->type),
@@ -250,10 +439,11 @@ slow_print(register const u_char *pptr, register u_int len) {
print_unknown_data(tlv_tptr,"\n\t ",tlv_tlen);
break;
}
- /* do we want to see an additionally hexdump ? */
- if (vflag > 1)
+ /* do we want to see an additional hexdump ? */
+ if (vflag > 1) {
print_unknown_data(tptr+sizeof(sizeof(struct tlv_header_t)),"\n\t ",
tlv_len-sizeof(struct tlv_header_t));
+ }
tptr+=tlv_len;
tlen-=tlv_len;
@@ -262,3 +452,210 @@ slow_print(register const u_char *pptr, register u_int len) {
trunc:
printf("\n\t\t packet exceeded snapshot");
}
+
+void slow_oam_print(register const u_char *tptr, register u_int tlen) {
+
+ u_int hexdump;
+
+ struct slow_oam_common_header_t {
+ u_int8_t flags[2];
+ u_int8_t code;
+ };
+
+ struct slow_oam_tlv_header_t {
+ u_int8_t type;
+ u_int8_t length;
+ };
+
+ union {
+ const struct slow_oam_common_header_t *slow_oam_common_header;
+ const struct slow_oam_tlv_header_t *slow_oam_tlv_header;
+ } ptr;
+
+ union {
+ const struct slow_oam_info_t *slow_oam_info;
+ const struct slow_oam_link_event_t *slow_oam_link_event;
+ const struct slow_oam_variablerequest_t *slow_oam_variablerequest;
+ const struct slow_oam_variableresponse_t *slow_oam_variableresponse;
+ const struct slow_oam_loopbackctrl_t *slow_oam_loopbackctrl;
+ } tlv;
+
+ ptr.slow_oam_common_header = (struct slow_oam_common_header_t *)tptr;
+ tptr += sizeof(struct slow_oam_common_header_t);
+ tlen -= sizeof(struct slow_oam_common_header_t);
+
+ printf("\n\tCode %s OAM PDU, Flags [%s]",
+ tok2str(slow_oam_code_values, "Unknown (%u)", ptr.slow_oam_common_header->code),
+ bittok2str(slow_oam_flag_values,
+ "none",
+ EXTRACT_16BITS(&ptr.slow_oam_common_header->flags)));
+
+ switch (ptr.slow_oam_common_header->code) {
+ case SLOW_OAM_CODE_INFO:
+ while (tlen > 0) {
+ ptr.slow_oam_tlv_header = (const struct slow_oam_tlv_header_t *)tptr;
+ printf("\n\t %s Information Type (%u), length %u",
+ tok2str(slow_oam_info_type_values, "Reserved",
+ ptr.slow_oam_tlv_header->type),
+ ptr.slow_oam_tlv_header->type,
+ ptr.slow_oam_tlv_header->length);
+
+ hexdump = FALSE;
+ switch (ptr.slow_oam_tlv_header->type) {
+ case SLOW_OAM_INFO_TYPE_END_OF_TLV:
+ if (ptr.slow_oam_tlv_header->length != 0) {
+ printf("\n\t ERROR: illegal length - should be 0");
+ }
+ return;
+
+ case SLOW_OAM_INFO_TYPE_LOCAL: /* identical format - fall through */
+ case SLOW_OAM_INFO_TYPE_REMOTE:
+ tlv.slow_oam_info = (const struct slow_oam_info_t *)tptr;
+
+ if (tlv.slow_oam_info->info_length !=
+ sizeof(struct slow_oam_info_t)) {
+ printf("\n\t ERROR: illegal length - should be %lu",
+ (unsigned long) sizeof(struct slow_oam_info_t));
+ return;
+ }
+
+ printf("\n\t OAM-Version %u, Revision %u",
+ tlv.slow_oam_info->oam_version,
+ EXTRACT_16BITS(&tlv.slow_oam_info->revision));
+
+ printf("\n\t State-Parser-Action %s, State-MUX-Action %s",
+ tok2str(slow_oam_info_type_state_parser_values, "Reserved",
+ tlv.slow_oam_info->state & OAM_INFO_TYPE_PARSER_MASK),
+ tok2str(slow_oam_info_type_state_mux_values, "Reserved",
+ tlv.slow_oam_info->state & OAM_INFO_TYPE_MUX_MASK));
+ printf("\n\t OAM-Config Flags [%s], OAM-PDU-Config max-PDU size %u",
+ bittok2str(slow_oam_info_type_oam_config_values, "none",
+ tlv.slow_oam_info->oam_config),
+ EXTRACT_16BITS(&tlv.slow_oam_info->oam_pdu_config) &
+ OAM_INFO_TYPE_PDU_SIZE_MASK);
+ printf("\n\t OUI %s (0x%06x), Vendor-Private 0x%08x",
+ tok2str(oui_values, "Unknown",
+ EXTRACT_24BITS(&tlv.slow_oam_info->oui)),
+ EXTRACT_24BITS(&tlv.slow_oam_info->oui),
+ EXTRACT_32BITS(&tlv.slow_oam_info->vendor_private));
+ break;
+
+ case SLOW_OAM_INFO_TYPE_ORG_SPECIFIC:
+ hexdump = TRUE;
+ break;
+
+ default:
+ hexdump = TRUE;
+ break;
+ }
+
+ /* infinite loop check */
+ if (!ptr.slow_oam_tlv_header->length) {
+ return;
+ }
+
+ /* do we also want to see a hex dump ? */
+ if (vflag > 1 || hexdump==TRUE) {
+ print_unknown_data(tptr,"\n\t ",
+ ptr.slow_oam_tlv_header->length);
+ }
+
+ tlen -= ptr.slow_oam_tlv_header->length;
+ tptr += ptr.slow_oam_tlv_header->length;
+ }
+ break;
+
+ case SLOW_OAM_CODE_EVENT_NOTIF:
+ while (tlen > 0) {
+ ptr.slow_oam_tlv_header = (const struct slow_oam_tlv_header_t *)tptr;
+ printf("\n\t %s Link Event Type (%u), length %u",
+ tok2str(slow_oam_link_event_values, "Reserved",
+ ptr.slow_oam_tlv_header->type),
+ ptr.slow_oam_tlv_header->type,
+ ptr.slow_oam_tlv_header->length);
+
+ hexdump = FALSE;
+ switch (ptr.slow_oam_tlv_header->type) {
+ case SLOW_OAM_LINK_EVENT_END_OF_TLV:
+ if (ptr.slow_oam_tlv_header->length != 0) {
+ printf("\n\t ERROR: illegal length - should be 0");
+ }
+ return;
+
+ case SLOW_OAM_LINK_EVENT_ERR_SYM_PER: /* identical format - fall through */
+ case SLOW_OAM_LINK_EVENT_ERR_FRM:
+ case SLOW_OAM_LINK_EVENT_ERR_FRM_PER:
+ case SLOW_OAM_LINK_EVENT_ERR_FRM_SUMM:
+ tlv.slow_oam_link_event = (const struct slow_oam_link_event_t *)tptr;
+
+ if (tlv.slow_oam_link_event->event_length !=
+ sizeof(struct slow_oam_link_event_t)) {
+ printf("\n\t ERROR: illegal length - should be %lu",
+ (unsigned long) sizeof(struct slow_oam_link_event_t));
+ return;
+ }
+
+ printf("\n\t Timestamp %u ms, Errored Window %" PRIu64
+ "\n\t Errored Threshold %" PRIu64
+ "\n\t Errors %" PRIu64
+ "\n\t Error Running Total %" PRIu64
+ "\n\t Event Running Total %u",
+ EXTRACT_16BITS(&tlv.slow_oam_link_event->time_stamp)*100,
+ EXTRACT_64BITS(&tlv.slow_oam_link_event->window),
+ EXTRACT_64BITS(&tlv.slow_oam_link_event->threshold),
+ EXTRACT_64BITS(&tlv.slow_oam_link_event->errors),
+ EXTRACT_64BITS(&tlv.slow_oam_link_event->errors_running_total),
+ EXTRACT_32BITS(&tlv.slow_oam_link_event->event_running_total));
+ break;
+
+ case SLOW_OAM_LINK_EVENT_ORG_SPECIFIC:
+ hexdump = TRUE;
+ break;
+
+ default:
+ hexdump = TRUE;
+ break;
+ }
+
+ /* infinite loop check */
+ if (!ptr.slow_oam_tlv_header->length) {
+ return;
+ }
+
+ /* do we also want to see a hex dump ? */
+ if (vflag > 1 || hexdump==TRUE) {
+ print_unknown_data(tptr,"\n\t ",
+ ptr.slow_oam_tlv_header->length);
+ }
+
+ tlen -= ptr.slow_oam_tlv_header->length;
+ tptr += ptr.slow_oam_tlv_header->length;
+ }
+ break;
+
+ case SLOW_OAM_CODE_LOOPBACK_CTRL:
+ tlv.slow_oam_loopbackctrl = (const struct slow_oam_loopbackctrl_t *)tptr;
+ printf("\n\t Command %s (%u)",
+ tok2str(slow_oam_loopbackctrl_cmd_values,
+ "Unknown",
+ tlv.slow_oam_loopbackctrl->command),
+ tlv.slow_oam_loopbackctrl->command);
+ tptr ++;
+ tlen --;
+ break;
+
+ /*
+ * FIXME those are the defined codes that lack a decoder
+ * you are welcome to contribute code ;-)
+ */
+ case SLOW_OAM_CODE_VAR_REQUEST:
+ case SLOW_OAM_CODE_VAR_RESPONSE:
+ case SLOW_OAM_CODE_PRIVATE:
+ default:
+ if (vflag <= 1) {
+ print_unknown_data(tptr,"\n\t ", tlen);
+ }
+ break;
+ }
+ return;
+}
diff --git a/contrib/tcpdump/print-smb.c b/contrib/tcpdump/print-smb.c
index 5b963de..391f186 100644
--- a/contrib/tcpdump/print-smb.c
+++ b/contrib/tcpdump/print-smb.c
@@ -12,7 +12,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-smb.c,v 1.41.2.4 2007/07/14 22:29:05 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-smb.c,v 1.46.2.1 2007-12-09 00:31:35 guy Exp $";
#endif
#include <tcpdump-stdinc.h>
@@ -1244,7 +1244,47 @@ trunc:
return;
}
+/*
+ * Print an SMB-over-TCP packet received across tcp on port 445
+ */
+void
+smb_tcp_print (const u_char * data, int length)
+{
+ int caplen;
+ u_int smb_len;
+ const u_char *maxbuf;
+
+ if (length < 4)
+ goto trunc;
+ if (snapend < data)
+ goto trunc;
+ caplen = snapend - data;
+ if (caplen < 4)
+ goto trunc;
+ maxbuf = data + caplen;
+ smb_len = EXTRACT_24BITS(data + 1);
+ length -= 4;
+ caplen -= 4;
+ startbuf = data;
+ data += 4;
+
+ if (smb_len >= 4 && caplen >= 4 && memcmp(data,"\377SMB",4) == 0) {
+ if ((int)smb_len > caplen) {
+ if ((int)smb_len > length)
+ printf("WARNING: Packet is continued in later TCP segments\n");
+ else
+ printf("WARNING: Short packet. Try increasing the snap length by %d\n",
+ smb_len - caplen);
+ }
+ print_smb(data, maxbuf > data + smb_len ? data + smb_len : maxbuf);
+ } else
+ printf("SMB-over-TCP packet:(raw data or continuation?)\n");
+ return;
+trunc:
+ printf("[|SMB]");
+ return;
+}
/*
* print a NBT packet received across udp on port 138
@@ -1459,8 +1499,7 @@ ipx_netbios_print(const u_char *data, u_int length)
break;
if (memcmp(&data[i], "\377SMB", 4) == 0) {
smb_fdata(data, "\n>>> IPX transport ", &data[i], 0);
- if (data != NULL)
- print_smb(&data[i], maxbuf);
+ print_smb(&data[i], maxbuf);
printf("\n");
fflush(stdout);
break;
diff --git a/contrib/tcpdump/print-snmp.c b/contrib/tcpdump/print-snmp.c
index 0686b62..728da6b 100644
--- a/contrib/tcpdump/print-snmp.c
+++ b/contrib/tcpdump/print-snmp.c
@@ -58,7 +58,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-snmp.c,v 1.62.2.2 2005/05/06 07:57:19 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-snmp.c,v 1.64 2005-05-06 07:56:53 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-stp.c b/contrib/tcpdump/print-stp.c
index 4308ae0..8822c30 100644
--- a/contrib/tcpdump/print-stp.c
+++ b/contrib/tcpdump/print-stp.c
@@ -11,7 +11,7 @@
#ifndef lint
static const char rcsid[] _U_ =
-"@(#) $Header: /tcpdump/master/tcpdump/print-stp.c,v 1.13.2.7 2007/03/18 17:12:36 hannes Exp $";
+"@(#) $Header: /tcpdump/master/tcpdump/print-stp.c,v 1.20 2007-03-18 17:11:46 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-sunatm.c b/contrib/tcpdump/print-sunatm.c
index acd38bf..e6f19e8 100644
--- a/contrib/tcpdump/print-sunatm.c
+++ b/contrib/tcpdump/print-sunatm.c
@@ -31,7 +31,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-sunatm.c,v 1.8 2004/03/17 23:24:38 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-sunatm.c,v 1.8 2004-03-17 23:24:38 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-sunrpc.c b/contrib/tcpdump/print-sunrpc.c
index 420ec36..565cbfd 100644
--- a/contrib/tcpdump/print-sunrpc.c
+++ b/contrib/tcpdump/print-sunrpc.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.46.2.1 2005/04/27 21:44:06 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.47 2005-04-27 21:43:48 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-symantec.c b/contrib/tcpdump/print-symantec.c
index eb72180..ebb62cd 100644
--- a/contrib/tcpdump/print-symantec.c
+++ b/contrib/tcpdump/print-symantec.c
@@ -20,7 +20,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-symantec.c,v 1.4.2.1 2005/07/07 01:24:39 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-symantec.c,v 1.5 2005-07-07 01:22:21 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-syslog.c b/contrib/tcpdump/print-syslog.c
index 099d027..3685d62 100755
--- a/contrib/tcpdump/print-syslog.c
+++ b/contrib/tcpdump/print-syslog.c
@@ -16,7 +16,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-syslog.c,v 1.1 2004/10/29 11:42:53 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-syslog.c,v 1.1 2004-10-29 11:42:53 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-tcp.c b/contrib/tcpdump/print-tcp.c
index 11bd6b7..5b0a796 100644
--- a/contrib/tcpdump/print-tcp.c
+++ b/contrib/tcpdump/print-tcp.c
@@ -1,3 +1,5 @@
+/* $NetBSD: print-tcp.c,v 1.9 2007/07/26 18:15:12 plunky Exp $ */
+
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
* The Regents of the University of California. All rights reserved.
@@ -23,7 +25,9 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.120.2.3 2005/10/16 06:05:46 guy Exp $ (LBL)";
+"@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.130.2.3 2007-12-22 03:08:45 guy Exp $ (LBL)";
+ #else
+__RCSID("$NetBSD: print-tcp.c,v 1.8 2007/07/24 11:53:48 drochner Exp $");
#endif
#ifdef HAVE_CONFIG_H
@@ -60,7 +64,7 @@ static const char rcsid[] _U_ =
#define CANT_CHECK_SIGNATURE 2
static int tcp_verify_signature(const struct ip *ip, const struct tcphdr *tp,
- const u_char *data, int length, const u_char *rcvsig);
+ const u_char *data, int length, const u_char *rcvsig);
#endif
static void print_tcp_rst_data(register const u_char *sp, u_int length);
@@ -70,20 +74,20 @@ static void print_tcp_rst_data(register const u_char *sp, u_int length);
struct tha {
#ifndef INET6
- struct in_addr src;
- struct in_addr dst;
+ struct in_addr src;
+ struct in_addr dst;
#else
- struct in6_addr src;
- struct in6_addr dst;
+ struct in6_addr src;
+ struct in6_addr dst;
#endif /*INET6*/
- u_int port;
+ u_int port;
};
struct tcp_seq_hash {
- struct tcp_seq_hash *nxt;
- struct tha addr;
- tcp_seq seq;
- tcp_seq ack;
+ struct tcp_seq_hash *nxt;
+ struct tha addr;
+ tcp_seq seq;
+ tcp_seq ack;
};
#define TSEQ_HASHSIZE 919
@@ -93,97 +97,95 @@ struct tcp_seq_hash {
static struct tcp_seq_hash tcp_seq_hash[TSEQ_HASHSIZE];
+struct tok tcp_flag_values[] = {
+ { TH_FIN, "F" },
+ { TH_SYN, "S" },
+ { TH_RST, "R" },
+ { TH_PUSH, "P" },
+ { TH_ACK, "." },
+ { TH_URG, "U" },
+ { TH_ECNECHO, "E" },
+ { TH_CWR, "W" },
+ { 0, NULL }
+};
-#ifndef TELNET_PORT
-#define TELNET_PORT 23
-#endif
-#ifndef BGP_PORT
-#define BGP_PORT 179
-#endif
-#define NETBIOS_SSN_PORT 139
-#ifndef PPTP_PORT
-#define PPTP_PORT 1723
-#endif
-#define BEEP_PORT 10288
-#ifndef NFS_PORT
-#define NFS_PORT 2049
-#endif
-#define MSDP_PORT 639
-#define LDP_PORT 646
+struct tok tcp_option_values[] = {
+ { TCPOPT_EOL, "eol" },
+ { TCPOPT_NOP, "nop" },
+ { TCPOPT_MAXSEG, "mss" },
+ { TCPOPT_WSCALE, "wscale" },
+ { TCPOPT_SACKOK, "sackOK" },
+ { TCPOPT_SACK, "sack" },
+ { TCPOPT_ECHO, "echo" },
+ { TCPOPT_ECHOREPLY, "echoreply" },
+ { TCPOPT_TIMESTAMP, "TS" },
+ { TCPOPT_CC, "cc" },
+ { TCPOPT_CCNEW, "ccnew" },
+ { TCPOPT_CCECHO, "" },
+ { TCPOPT_SIGNATURE, "md5" },
+ { TCPOPT_AUTH, "enhanced auth" },
+ { 0, NULL }
+};
static int tcp_cksum(register const struct ip *ip,
register const struct tcphdr *tp,
register u_int len)
{
- union phu {
- struct phdr {
- u_int32_t src;
- u_int32_t dst;
- u_char mbz;
- u_char proto;
- u_int16_t len;
- } ph;
- u_int16_t pa[6];
- } phu;
- const u_int16_t *sp;
-
- /* pseudo-header.. */
- phu.ph.len = htons((u_int16_t)len);
- phu.ph.mbz = 0;
- phu.ph.proto = IPPROTO_TCP;
- memcpy(&phu.ph.src, &ip->ip_src.s_addr, sizeof(u_int32_t));
- if (IP_HL(ip) == 5)
- memcpy(&phu.ph.dst, &ip->ip_dst.s_addr, sizeof(u_int32_t));
- else
- phu.ph.dst = ip_finddst(ip);
-
- sp = &phu.pa[0];
- return in_cksum((u_short *)tp, len,
- sp[0]+sp[1]+sp[2]+sp[3]+sp[4]+sp[5]);
+ union phu {
+ struct phdr {
+ u_int32_t src;
+ u_int32_t dst;
+ u_char mbz;
+ u_char proto;
+ u_int16_t len;
+ } ph;
+ u_int16_t pa[6];
+ } phu;
+ const u_int16_t *sp;
+
+ /* pseudo-header.. */
+ phu.ph.len = htons((u_int16_t)len);
+ phu.ph.mbz = 0;
+ phu.ph.proto = IPPROTO_TCP;
+ memcpy(&phu.ph.src, &ip->ip_src.s_addr, sizeof(u_int32_t));
+ if (IP_HL(ip) == 5)
+ memcpy(&phu.ph.dst, &ip->ip_dst.s_addr, sizeof(u_int32_t));
+ else
+ phu.ph.dst = ip_finddst(ip);
+
+ sp = &phu.pa[0];
+ return in_cksum((u_short *)tp, len,
+ sp[0]+sp[1]+sp[2]+sp[3]+sp[4]+sp[5]);
}
#ifdef INET6
static int tcp6_cksum(const struct ip6_hdr *ip6, const struct tcphdr *tp,
- u_int len)
+ u_int len)
{
- size_t i;
- register const u_int16_t *sp;
- u_int32_t sum;
- union {
- struct {
- struct in6_addr ph_src;
- struct in6_addr ph_dst;
- u_int32_t ph_len;
- u_int8_t ph_zero[3];
- u_int8_t ph_nxt;
- } ph;
- u_int16_t pa[20];
- } phu;
-
- /* pseudo-header */
- memset(&phu, 0, sizeof(phu));
- phu.ph.ph_src = ip6->ip6_src;
- phu.ph.ph_dst = ip6->ip6_dst;
- phu.ph.ph_len = htonl(len);
- phu.ph.ph_nxt = IPPROTO_TCP;
-
- sum = 0;
- for (i = 0; i < sizeof(phu.pa) / sizeof(phu.pa[0]); i++)
- sum += phu.pa[i];
-
- sp = (const u_int16_t *)tp;
-
- for (i = 0; i < (len & ~1); i += 2)
- sum += *sp++;
-
- if (len & 1)
- sum += htons((*(const u_int8_t *)sp) << 8);
-
- while (sum > 0xffff)
- sum = (sum & 0xffff) + (sum >> 16);
- sum = ~sum & 0xffff;
-
- return (sum);
+ size_t i;
+ u_int32_t sum = 0;
+ union {
+ struct {
+ struct in6_addr ph_src;
+ struct in6_addr ph_dst;
+ u_int32_t ph_len;
+ u_int8_t ph_zero[3];
+ u_int8_t ph_nxt;
+ } ph;
+ u_int16_t pa[20];
+ } phu;
+
+ /* pseudo-header */
+ memset(&phu, 0, sizeof(phu));
+ phu.ph.ph_src = ip6->ip6_src;
+ phu.ph.ph_dst = ip6->ip6_dst;
+ phu.ph.ph_len = htonl(len);
+ phu.ph.ph_nxt = IPPROTO_TCP;
+
+ for (i = 0; i < sizeof(phu.pa) / sizeof(phu.pa[0]); i++)
+ sum += phu.pa[i];
+
+ return in_cksum((u_short *)tp, len, sum);
}
#endif
@@ -191,507 +193,509 @@ void
tcp_print(register const u_char *bp, register u_int length,
register const u_char *bp2, int fragmented)
{
- register const struct tcphdr *tp;
- register const struct ip *ip;
- register u_char flags;
- register u_int hlen;
- register char ch;
- u_int16_t sport, dport, win, urp;
- u_int32_t seq, ack, thseq, thack;
- int threv;
+ register const struct tcphdr *tp;
+ register const struct ip *ip;
+ register u_char flags;
+ register u_int hlen;
+ register char ch;
+ u_int16_t sport, dport, win, urp;
+ u_int32_t seq, ack, thseq, thack;
+ int threv;
#ifdef INET6
- register const struct ip6_hdr *ip6;
+ register const struct ip6_hdr *ip6;
#endif
- tp = (struct tcphdr *)bp;
- ip = (struct ip *)bp2;
+ tp = (struct tcphdr *)bp;
+ ip = (struct ip *)bp2;
#ifdef INET6
- if (IP_V(ip) == 6)
- ip6 = (struct ip6_hdr *)bp2;
- else
- ip6 = NULL;
+ if (IP_V(ip) == 6)
+ ip6 = (struct ip6_hdr *)bp2;
+ else
+ ip6 = NULL;
#endif /*INET6*/
- ch = '\0';
- if (!TTEST(tp->th_dport)) {
- (void)printf("%s > %s: [|tcp]",
- ipaddr_string(&ip->ip_src),
- ipaddr_string(&ip->ip_dst));
- return;
- }
+ ch = '\0';
+ if (!TTEST(tp->th_dport)) {
+ (void)printf("%s > %s: [|tcp]",
+ ipaddr_string(&ip->ip_src),
+ ipaddr_string(&ip->ip_dst));
+ return;
+ }
- sport = EXTRACT_16BITS(&tp->th_sport);
- dport = EXTRACT_16BITS(&tp->th_dport);
+ sport = EXTRACT_16BITS(&tp->th_sport);
+ dport = EXTRACT_16BITS(&tp->th_dport);
- hlen = TH_OFF(tp) * 4;
+ hlen = TH_OFF(tp) * 4;
- /*
+ /*
* If data present, header length valid, and NFS port used,
* assume NFS.
* Pass offset of data plus 4 bytes for RPC TCP msg length
* to NFS print routines.
*/
- if (!qflag && hlen >= sizeof(*tp) && hlen <= length) {
- if ((u_char *)tp + 4 + sizeof(struct sunrpc_msg) <= snapend &&
- dport == NFS_PORT) {
- nfsreq_print((u_char *)tp + hlen + 4, length - hlen,
- (u_char *)ip);
- return;
- } else if ((u_char *)tp + 4 + sizeof(struct sunrpc_msg)
- <= snapend &&
- sport == NFS_PORT) {
- nfsreply_print((u_char *)tp + hlen + 4, length - hlen,
- (u_char *)ip);
- return;
- }
- }
+ if (!qflag && hlen >= sizeof(*tp) && hlen <= length &&
+ (length - hlen) >= 4) {
+ u_char *fraglenp;
+ u_int32_t fraglen;
+ register struct sunrpc_msg *rp;
+ enum sunrpc_msg_type direction;
+
+ fraglenp = (u_char *)tp + hlen;
+ if (TTEST2(*fraglenp, 4)) {
+ fraglen = EXTRACT_32BITS(fraglenp) & 0x7FFFFFFF;
+ if (fraglen > (length - hlen) - 4)
+ fraglen = (length - hlen) - 4;
+ rp = (struct sunrpc_msg *)(fraglenp + 4);
+ if (TTEST(rp->rm_direction)) {
+ direction = (enum sunrpc_msg_type)EXTRACT_32BITS(&rp->rm_direction);
+ if (dport == NFS_PORT &&
+ direction == SUNRPC_CALL) {
+ nfsreq_print((u_char *)rp, fraglen,
+ (u_char *)ip);
+ return;
+ }
+ if (sport == NFS_PORT &&
+ direction == SUNRPC_REPLY) {
+ nfsreply_print((u_char *)rp, fraglen,
+ (u_char *)ip);
+ return;
+ }
+ }
+ }
+ }
#ifdef INET6
- if (ip6) {
- if (ip6->ip6_nxt == IPPROTO_TCP) {
- (void)printf("%s.%s > %s.%s: ",
- ip6addr_string(&ip6->ip6_src),
- tcpport_string(sport),
- ip6addr_string(&ip6->ip6_dst),
- tcpport_string(dport));
- } else {
- (void)printf("%s > %s: ",
- tcpport_string(sport), tcpport_string(dport));
- }
- } else
+ if (ip6) {
+ if (ip6->ip6_nxt == IPPROTO_TCP) {
+ (void)printf("%s.%s > %s.%s: ",
+ ip6addr_string(&ip6->ip6_src),
+ tcpport_string(sport),
+ ip6addr_string(&ip6->ip6_dst),
+ tcpport_string(dport));
+ } else {
+ (void)printf("%s > %s: ",
+ tcpport_string(sport), tcpport_string(dport));
+ }
+ } else
#endif /*INET6*/
- {
- if (ip->ip_p == IPPROTO_TCP) {
- (void)printf("%s.%s > %s.%s: ",
- ipaddr_string(&ip->ip_src),
- tcpport_string(sport),
- ipaddr_string(&ip->ip_dst),
- tcpport_string(dport));
- } else {
- (void)printf("%s > %s: ",
- tcpport_string(sport), tcpport_string(dport));
- }
- }
-
- if (hlen < sizeof(*tp)) {
- (void)printf(" tcp %d [bad hdr length %u - too short, < %lu]",
- length - hlen, hlen, (unsigned long)sizeof(*tp));
- return;
- }
-
- TCHECK(*tp);
-
- seq = EXTRACT_32BITS(&tp->th_seq);
- ack = EXTRACT_32BITS(&tp->th_ack);
- win = EXTRACT_16BITS(&tp->th_win);
- urp = EXTRACT_16BITS(&tp->th_urp);
-
- if (qflag) {
- (void)printf("tcp %d", length - hlen);
- if (hlen > length) {
- (void)printf(" [bad hdr length %u - too long, > %u]",
- hlen, length);
- }
- return;
- }
- if ((flags = tp->th_flags) & (TH_SYN|TH_FIN|TH_RST|TH_PUSH|
- TH_ECNECHO|TH_CWR)) {
- if (flags & TH_SYN)
- putchar('S');
- if (flags & TH_FIN)
- putchar('F');
- if (flags & TH_RST)
- putchar('R');
- if (flags & TH_PUSH)
- putchar('P');
- if (flags & TH_CWR)
- putchar('W'); /* congestion _W_indow reduced (ECN) */
- if (flags & TH_ECNECHO)
- putchar('E'); /* ecn _E_cho sent (ECN) */
- } else
- putchar('.');
-
- if (!Sflag && (flags & TH_ACK)) {
- register struct tcp_seq_hash *th;
- const void *src, *dst;
- register int rev;
- struct tha tha;
- /*
- * Find (or record) the initial sequence numbers for
- * this conversation. (we pick an arbitrary
- * collating order so there's only one entry for
- * both directions).
- */
+ {
+ if (ip->ip_p == IPPROTO_TCP) {
+ (void)printf("%s.%s > %s.%s: ",
+ ipaddr_string(&ip->ip_src),
+ tcpport_string(sport),
+ ipaddr_string(&ip->ip_dst),
+ tcpport_string(dport));
+ } else {
+ (void)printf("%s > %s: ",
+ tcpport_string(sport), tcpport_string(dport));
+ }
+ }
+
+ if (hlen < sizeof(*tp)) {
+ (void)printf(" tcp %d [bad hdr length %u - too short, < %lu]",
+ length - hlen, hlen, (unsigned long)sizeof(*tp));
+ return;
+ }
+
+ TCHECK(*tp);
+
+ seq = EXTRACT_32BITS(&tp->th_seq);
+ ack = EXTRACT_32BITS(&tp->th_ack);
+ win = EXTRACT_16BITS(&tp->th_win);
+ urp = EXTRACT_16BITS(&tp->th_urp);
+
+ if (qflag) {
+ (void)printf("tcp %d", length - hlen);
+ if (hlen > length) {
+ (void)printf(" [bad hdr length %u - too long, > %u]",
+ hlen, length);
+ }
+ return;
+ }
+
+ flags = tp->th_flags;
+ printf("Flags [%s]", bittok2str_nosep(tcp_flag_values, "none", flags));
+
+ if (!Sflag && (flags & TH_ACK)) {
+ register struct tcp_seq_hash *th;
+ const void *src, *dst;
+ register int rev;
+ struct tha tha;
+ /*
+ * Find (or record) the initial sequence numbers for
+ * this conversation. (we pick an arbitrary
+ * collating order so there's only one entry for
+ * both directions).
+ */
#ifdef INET6
- memset(&tha, 0, sizeof(tha));
- rev = 0;
- if (ip6) {
- src = &ip6->ip6_src;
- dst = &ip6->ip6_dst;
- if (sport > dport)
- rev = 1;
- else if (sport == dport) {
- if (memcmp(src, dst, sizeof ip6->ip6_dst) > 0)
- rev = 1;
- }
- if (rev) {
- memcpy(&tha.src, dst, sizeof ip6->ip6_dst);
- memcpy(&tha.dst, src, sizeof ip6->ip6_src);
- tha.port = dport << 16 | sport;
- } else {
- memcpy(&tha.dst, dst, sizeof ip6->ip6_dst);
- memcpy(&tha.src, src, sizeof ip6->ip6_src);
- tha.port = sport << 16 | dport;
- }
- } else {
- src = &ip->ip_src;
- dst = &ip->ip_dst;
- if (sport > dport)
- rev = 1;
- else if (sport == dport) {
- if (memcmp(src, dst, sizeof ip->ip_dst) > 0)
- rev = 1;
- }
- if (rev) {
- memcpy(&tha.src, dst, sizeof ip->ip_dst);
- memcpy(&tha.dst, src, sizeof ip->ip_src);
- tha.port = dport << 16 | sport;
- } else {
- memcpy(&tha.dst, dst, sizeof ip->ip_dst);
- memcpy(&tha.src, src, sizeof ip->ip_src);
- tha.port = sport << 16 | dport;
- }
- }
+ memset(&tha, 0, sizeof(tha));
+ rev = 0;
+ if (ip6) {
+ src = &ip6->ip6_src;
+ dst = &ip6->ip6_dst;
+ if (sport > dport)
+ rev = 1;
+ else if (sport == dport) {
+ if (memcmp(src, dst, sizeof ip6->ip6_dst) > 0)
+ rev = 1;
+ }
+ if (rev) {
+ memcpy(&tha.src, dst, sizeof ip6->ip6_dst);
+ memcpy(&tha.dst, src, sizeof ip6->ip6_src);
+ tha.port = dport << 16 | sport;
+ } else {
+ memcpy(&tha.dst, dst, sizeof ip6->ip6_dst);
+ memcpy(&tha.src, src, sizeof ip6->ip6_src);
+ tha.port = sport << 16 | dport;
+ }
+ } else {
+ src = &ip->ip_src;
+ dst = &ip->ip_dst;
+ if (sport > dport)
+ rev = 1;
+ else if (sport == dport) {
+ if (memcmp(src, dst, sizeof ip->ip_dst) > 0)
+ rev = 1;
+ }
+ if (rev) {
+ memcpy(&tha.src, dst, sizeof ip->ip_dst);
+ memcpy(&tha.dst, src, sizeof ip->ip_src);
+ tha.port = dport << 16 | sport;
+ } else {
+ memcpy(&tha.dst, dst, sizeof ip->ip_dst);
+ memcpy(&tha.src, src, sizeof ip->ip_src);
+ tha.port = sport << 16 | dport;
+ }
+ }
#else
- rev = 0;
- src = &ip->ip_src;
- dst = &ip->ip_dst;
- if (sport > dport)
- rev = 1;
- else if (sport == dport) {
- if (memcmp(src, dst, sizeof ip->ip_dst) > 0)
- rev = 1;
- }
- if (rev) {
- memcpy(&tha.src, dst, sizeof ip->ip_dst);
- memcpy(&tha.dst, src, sizeof ip->ip_src);
- tha.port = dport << 16 | sport;
- } else {
- memcpy(&tha.dst, dst, sizeof ip->ip_dst);
- memcpy(&tha.src, src, sizeof ip->ip_src);
- tha.port = sport << 16 | dport;
- }
+ rev = 0;
+ src = &ip->ip_src;
+ dst = &ip->ip_dst;
+ if (sport > dport)
+ rev = 1;
+ else if (sport == dport) {
+ if (memcmp(src, dst, sizeof ip->ip_dst) > 0)
+ rev = 1;
+ }
+ if (rev) {
+ memcpy(&tha.src, dst, sizeof ip->ip_dst);
+ memcpy(&tha.dst, src, sizeof ip->ip_src);
+ tha.port = dport << 16 | sport;
+ } else {
+ memcpy(&tha.dst, dst, sizeof ip->ip_dst);
+ memcpy(&tha.src, src, sizeof ip->ip_src);
+ tha.port = sport << 16 | dport;
+ }
#endif
- threv = rev;
- for (th = &tcp_seq_hash[tha.port % TSEQ_HASHSIZE];
- th->nxt; th = th->nxt)
- if (memcmp((char *)&tha, (char *)&th->addr,
- sizeof(th->addr)) == 0)
- break;
-
- if (!th->nxt || (flags & TH_SYN)) {
- /* didn't find it or new conversation */
- if (th->nxt == NULL) {
- th->nxt = (struct tcp_seq_hash *)
- calloc(1, sizeof(*th));
- if (th->nxt == NULL)
- error("tcp_print: calloc");
- }
- th->addr = tha;
- if (rev)
- th->ack = seq, th->seq = ack - 1;
- else
- th->seq = seq, th->ack = ack - 1;
- } else {
- if (rev)
- seq -= th->ack, ack -= th->seq;
- else
- seq -= th->seq, ack -= th->ack;
- }
-
- thseq = th->seq;
- thack = th->ack;
- } else {
- /*fool gcc*/
- thseq = thack = threv = 0;
- }
- if (hlen > length) {
- (void)printf(" [bad hdr length %u - too long, > %u]",
- hlen, length);
- return;
- }
-
- if (IP_V(ip) == 4 && vflag && !fragmented) {
- u_int16_t sum, tcp_sum;
- if (TTEST2(tp->th_sport, length)) {
- sum = tcp_cksum(ip, tp, length);
+ threv = rev;
+ for (th = &tcp_seq_hash[tha.port % TSEQ_HASHSIZE];
+ th->nxt; th = th->nxt)
+ if (memcmp((char *)&tha, (char *)&th->addr,
+ sizeof(th->addr)) == 0)
+ break;
+
+ if (!th->nxt || (flags & TH_SYN)) {
+ /* didn't find it or new conversation */
+ if (th->nxt == NULL) {
+ th->nxt = (struct tcp_seq_hash *)
+ calloc(1, sizeof(*th));
+ if (th->nxt == NULL)
+ error("tcp_print: calloc");
+ }
+ th->addr = tha;
+ if (rev)
+ th->ack = seq, th->seq = ack - 1;
+ else
+ th->seq = seq, th->ack = ack - 1;
+ } else {
+ if (rev)
+ seq -= th->ack, ack -= th->seq;
+ else
+ seq -= th->seq, ack -= th->ack;
+ }
+
+ thseq = th->seq;
+ thack = th->ack;
+ } else {
+ /*fool gcc*/
+ thseq = thack = threv = 0;
+ }
+ if (hlen > length) {
+ (void)printf(" [bad hdr length %u - too long, > %u]",
+ hlen, length);
+ return;
+ }
+
+ if (IP_V(ip) == 4 && vflag && !Kflag && !fragmented) {
+ u_int16_t sum, tcp_sum;
+ if (TTEST2(tp->th_sport, length)) {
+ sum = tcp_cksum(ip, tp, length);
(void)printf(", cksum 0x%04x",EXTRACT_16BITS(&tp->th_sum));
- if (sum != 0) {
- tcp_sum = EXTRACT_16BITS(&tp->th_sum);
- (void)printf(" (incorrect (-> 0x%04x),",in_cksum_shouldbe(tcp_sum, sum));
- } else
- (void)printf(" (correct),");
- }
- }
+ if (sum != 0) {
+ tcp_sum = EXTRACT_16BITS(&tp->th_sum);
+ (void)printf(" (incorrect -> 0x%04x)",in_cksum_shouldbe(tcp_sum, sum));
+ } else
+ (void)printf(" (correct)");
+ }
+ }
#ifdef INET6
- if (IP_V(ip) == 6 && ip6->ip6_plen && vflag && !fragmented) {
- u_int16_t sum,tcp_sum;
- if (TTEST2(tp->th_sport, length)) {
- sum = tcp6_cksum(ip6, tp, length);
+ if (IP_V(ip) == 6 && ip6->ip6_plen && vflag && !Kflag && !fragmented) {
+ u_int16_t sum,tcp_sum;
+ if (TTEST2(tp->th_sport, length)) {
+ sum = tcp6_cksum(ip6, tp, length);
(void)printf(", cksum 0x%04x",EXTRACT_16BITS(&tp->th_sum));
- if (sum != 0) {
- tcp_sum = EXTRACT_16BITS(&tp->th_sum);
- (void)printf(" (incorrect (-> 0x%04x),",in_cksum_shouldbe(tcp_sum, sum));
- } else
- (void)printf(" (correct),");
-
- }
- }
+ if (sum != 0) {
+ tcp_sum = EXTRACT_16BITS(&tp->th_sum);
+ (void)printf(" (incorrect -> 0x%04x)",in_cksum_shouldbe(tcp_sum, sum));
+ } else
+ (void)printf(" (correct)");
+
+ }
+ }
#endif
- length -= hlen;
- if (vflag > 1 || length > 0 || flags & (TH_SYN | TH_FIN | TH_RST))
- (void)printf(" %u:%u(%u)", seq, seq + length, length);
- if (flags & TH_ACK)
- (void)printf(" ack %u", ack);
-
- (void)printf(" win %d", win);
-
- if (flags & TH_URG)
- (void)printf(" urg %d", urp);
- /*
- * Handle any options.
- */
- if (hlen > sizeof(*tp)) {
- register const u_char *cp;
- register u_int i, opt, datalen;
- register u_int len;
-
- hlen -= sizeof(*tp);
- cp = (const u_char *)tp + sizeof(*tp);
- putchar(' ');
- ch = '<';
- while (hlen > 0) {
- putchar(ch);
- TCHECK(*cp);
- opt = *cp++;
- if (ZEROLENOPT(opt))
- len = 1;
- else {
- TCHECK(*cp);
- len = *cp++; /* total including type, len */
- if (len < 2 || len > hlen)
- goto bad;
- --hlen; /* account for length byte */
- }
- --hlen; /* account for type byte */
- datalen = 0;
+ length -= hlen;
+ if (vflag > 1 || flags & (TH_SYN | TH_FIN | TH_RST)) {
+ (void)printf(", seq %u", seq);
+
+ if (length > 0) {
+ (void)printf(":%u", seq + length);
+ }
+ }
+
+ if (flags & TH_ACK) {
+ (void)printf(", ack %u", ack);
+ }
+
+ (void)printf(", win %d", win);
+
+ if (flags & TH_URG)
+ (void)printf(", urg %d", urp);
+ /*
+ * Handle any options.
+ */
+ if (hlen > sizeof(*tp)) {
+ register const u_char *cp;
+ register u_int i, opt, datalen;
+ register u_int len;
+
+ hlen -= sizeof(*tp);
+ cp = (const u_char *)tp + sizeof(*tp);
+ printf(", options [");
+ while (hlen > 0) {
+ if (ch != '\0')
+ putchar(ch);
+ TCHECK(*cp);
+ opt = *cp++;
+ if (ZEROLENOPT(opt))
+ len = 1;
+ else {
+ TCHECK(*cp);
+ len = *cp++; /* total including type, len */
+ if (len < 2 || len > hlen)
+ goto bad;
+ --hlen; /* account for length byte */
+ }
+ --hlen; /* account for type byte */
+ datalen = 0;
/* Bail if "l" bytes of data are not left or were not captured */
#define LENCHECK(l) { if ((l) > hlen) goto bad; TCHECK2(*cp, l); }
- switch (opt) {
-
- case TCPOPT_MAXSEG:
- (void)printf("mss");
- datalen = 2;
- LENCHECK(datalen);
- (void)printf(" %u", EXTRACT_16BITS(cp));
-
- break;
-
- case TCPOPT_EOL:
- (void)printf("eol");
- break;
-
- case TCPOPT_NOP:
- (void)printf("nop");
- break;
-
- case TCPOPT_WSCALE:
- (void)printf("wscale");
- datalen = 1;
- LENCHECK(datalen);
- (void)printf(" %u", *cp);
- break;
-
- case TCPOPT_SACKOK:
- (void)printf("sackOK");
- break;
-
- case TCPOPT_SACK:
- datalen = len - 2;
- if (datalen % 8 != 0) {
- (void)printf("malformed sack");
- } else {
- u_int32_t s, e;
-
- (void)printf("sack %d ", datalen / 8);
- for (i = 0; i < datalen; i += 8) {
- LENCHECK(i + 4);
- s = EXTRACT_32BITS(cp + i);
- LENCHECK(i + 8);
- e = EXTRACT_32BITS(cp + i + 4);
- if (threv) {
- s -= thseq;
- e -= thseq;
- } else {
- s -= thack;
- e -= thack;
- }
- (void)printf("{%u:%u}", s, e);
- }
- }
- break;
-
- case TCPOPT_ECHO:
- (void)printf("echo");
- datalen = 4;
- LENCHECK(datalen);
- (void)printf(" %u", EXTRACT_32BITS(cp));
- break;
-
- case TCPOPT_ECHOREPLY:
- (void)printf("echoreply");
- datalen = 4;
- LENCHECK(datalen);
- (void)printf(" %u", EXTRACT_32BITS(cp));
- break;
-
- case TCPOPT_TIMESTAMP:
- (void)printf("timestamp");
- datalen = 8;
- LENCHECK(4);
- (void)printf(" %u", EXTRACT_32BITS(cp));
- LENCHECK(datalen);
- (void)printf(" %u", EXTRACT_32BITS(cp + 4));
- break;
-
- case TCPOPT_CC:
- (void)printf("cc");
- datalen = 4;
- LENCHECK(datalen);
- (void)printf(" %u", EXTRACT_32BITS(cp));
- break;
-
- case TCPOPT_CCNEW:
- (void)printf("ccnew");
- datalen = 4;
- LENCHECK(datalen);
- (void)printf(" %u", EXTRACT_32BITS(cp));
- break;
-
- case TCPOPT_CCECHO:
- (void)printf("ccecho");
- datalen = 4;
- LENCHECK(datalen);
- (void)printf(" %u", EXTRACT_32BITS(cp));
- break;
-
- case TCPOPT_SIGNATURE:
- (void)printf("md5:");
- datalen = TCP_SIGLEN;
- LENCHECK(datalen);
+
+ printf("%s", tok2str(tcp_option_values, "Unknown Option %u", opt));
+
+ switch (opt) {
+
+ case TCPOPT_MAXSEG:
+ datalen = 2;
+ LENCHECK(datalen);
+ (void)printf(" %u", EXTRACT_16BITS(cp));
+ break;
+
+ case TCPOPT_WSCALE:
+ datalen = 1;
+ LENCHECK(datalen);
+ (void)printf(" %u", *cp);
+ break;
+
+ case TCPOPT_SACK:
+ datalen = len - 2;
+ if (datalen % 8 != 0) {
+ (void)printf("malformed sack");
+ } else {
+ u_int32_t s, e;
+
+ (void)printf(" %d ", datalen / 8);
+ for (i = 0; i < datalen; i += 8) {
+ LENCHECK(i + 4);
+ s = EXTRACT_32BITS(cp + i);
+ LENCHECK(i + 8);
+ e = EXTRACT_32BITS(cp + i + 4);
+ if (threv) {
+ s -= thseq;
+ e -= thseq;
+ } else {
+ s -= thack;
+ e -= thack;
+ }
+ (void)printf("{%u:%u}", s, e);
+ }
+ }
+ break;
+
+ case TCPOPT_CC:
+ case TCPOPT_CCNEW:
+ case TCPOPT_CCECHO:
+ case TCPOPT_ECHO:
+ case TCPOPT_ECHOREPLY:
+
+ /*
+ * those options share their semantics.
+ * fall through
+ */
+ datalen = 4;
+ LENCHECK(datalen);
+ (void)printf(" %u", EXTRACT_32BITS(cp));
+ break;
+
+ case TCPOPT_TIMESTAMP:
+ datalen = 8;
+ LENCHECK(datalen);
+ (void)printf(" val %u ecr %u",
+ EXTRACT_32BITS(cp),
+ EXTRACT_32BITS(cp + 4));
+ break;
+
+ case TCPOPT_SIGNATURE:
+ datalen = TCP_SIGLEN;
+ LENCHECK(datalen);
#ifdef HAVE_LIBCRYPTO
- switch (tcp_verify_signature(ip, tp,
- bp + TH_OFF(tp) * 4, length, cp)) {
-
- case SIGNATURE_VALID:
- (void)printf("valid");
- break;
-
- case SIGNATURE_INVALID:
- (void)printf("invalid");
- break;
-
- case CANT_CHECK_SIGNATURE:
- (void)printf("can't check - ");
- for (i = 0; i < TCP_SIGLEN; ++i)
- (void)printf("%02x", cp[i]);
- break;
- }
+ switch (tcp_verify_signature(ip, tp,
+ bp + TH_OFF(tp) * 4, length, cp)) {
+
+ case SIGNATURE_VALID:
+ (void)printf("valid");
+ break;
+
+ case SIGNATURE_INVALID:
+ (void)printf("invalid");
+ break;
+
+ case CANT_CHECK_SIGNATURE:
+ (void)printf("can't check - ");
+ for (i = 0; i < TCP_SIGLEN; ++i)
+ (void)printf("%02x", cp[i]);
+ break;
+ }
#else
- for (i = 0; i < TCP_SIGLEN; ++i)
- (void)printf("%02x", cp[i]);
+ for (i = 0; i < TCP_SIGLEN; ++i)
+ (void)printf("%02x", cp[i]);
#endif
- break;
-
- default:
- (void)printf("opt-%u:", opt);
- datalen = len - 2;
- for (i = 0; i < datalen; ++i) {
- LENCHECK(i);
- (void)printf("%02x", cp[i]);
- }
- break;
- }
-
- /* Account for data printed */
- cp += datalen;
- hlen -= datalen;
-
- /* Check specification against observed length */
- ++datalen; /* option octet */
- if (!ZEROLENOPT(opt))
- ++datalen; /* size octet */
- if (datalen != len)
- (void)printf("[len %d]", len);
- ch = ',';
- if (opt == TCPOPT_EOL)
- break;
- }
- putchar('>');
- }
-
- if (length <= 0)
- return;
-
- /*
- * Decode payload if necessary.
- */
- bp += TH_OFF(tp) * 4;
- if (flags & TH_RST) {
- if (vflag)
- print_tcp_rst_data(bp, length);
- } else {
- if (sport == TELNET_PORT || dport == TELNET_PORT) {
- if (!qflag && vflag)
- telnet_print(bp, length);
- } else if (sport == BGP_PORT || dport == BGP_PORT)
- bgp_print(bp, length);
- else if (sport == PPTP_PORT || dport == PPTP_PORT)
- pptp_print(bp);
+ break;
+
+ case TCPOPT_AUTH:
+ (void)printf("keyid %d", *cp++);
+ datalen = len - 3;
+ for (i = 0; i < datalen; ++i) {
+ LENCHECK(i);
+ (void)printf("%02x", cp[i]);
+ }
+ break;
+
+
+ case TCPOPT_EOL:
+ case TCPOPT_NOP:
+ case TCPOPT_SACKOK:
+ /*
+ * Nothing interesting.
+ * fall through
+ */
+ break;
+
+ default:
+ datalen = len - 2;
+ for (i = 0; i < datalen; ++i) {
+ LENCHECK(i);
+ (void)printf("%02x", cp[i]);
+ }
+ break;
+ }
+
+ /* Account for data printed */
+ cp += datalen;
+ hlen -= datalen;
+
+ /* Check specification against observed length */
+ ++datalen; /* option octet */
+ if (!ZEROLENOPT(opt))
+ ++datalen; /* size octet */
+ if (datalen != len)
+ (void)printf("[len %d]", len);
+ ch = ',';
+ if (opt == TCPOPT_EOL)
+ break;
+ }
+ putchar(']');
+ }
+
+ /*
+ * Print length field before crawling down the stack.
+ */
+ printf(", length %u", length);
+
+ if (length <= 0)
+ return;
+
+ /*
+ * Decode payload if necessary.
+ */
+ bp += TH_OFF(tp) * 4;
+ if ((flags & TH_RST) && vflag) {
+ print_tcp_rst_data(bp, length);
+ return;
+ }
+
+ if (sport == TELNET_PORT || dport == TELNET_PORT) {
+ if (!qflag && vflag)
+ telnet_print(bp, length);
+ } else if (sport == BGP_PORT || dport == BGP_PORT)
+ bgp_print(bp, length);
+ else if (sport == PPTP_PORT || dport == PPTP_PORT)
+ pptp_print(bp);
#ifdef TCPDUMP_DO_SMB
- else if (sport == NETBIOS_SSN_PORT || dport == NETBIOS_SSN_PORT)
- nbt_tcp_print(bp, length);
+ else if (sport == NETBIOS_SSN_PORT || dport == NETBIOS_SSN_PORT)
+ nbt_tcp_print(bp, length);
+ else if (sport == SMB_PORT || dport == SMB_PORT)
+ smb_tcp_print(bp, length);
#endif
- else if (sport == BEEP_PORT || dport == BEEP_PORT)
- beep_print(bp, length);
- else if (length > 2 &&
- (sport == NAMESERVER_PORT || dport == NAMESERVER_PORT ||
- sport == MULTICASTDNS_PORT || dport == MULTICASTDNS_PORT)) {
- /*
- * TCP DNS query has 2byte length at the head.
- * XXX packet could be unaligned, it can go strange
- */
- ns_print(bp + 2, length - 2, 0);
- } else if (sport == MSDP_PORT || dport == MSDP_PORT) {
- msdp_print(bp, length);
- }
- else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) {
- ldp_print(bp, length);
- }
- }
- return;
-bad:
- fputs("[bad opt]", stdout);
- if (ch != '\0')
- putchar('>');
- return;
-trunc:
- fputs("[|tcp]", stdout);
- if (ch != '\0')
- putchar('>');
+ else if (sport == BEEP_PORT || dport == BEEP_PORT)
+ beep_print(bp, length);
+ else if (length > 2 &&
+ (sport == NAMESERVER_PORT || dport == NAMESERVER_PORT ||
+ sport == MULTICASTDNS_PORT || dport == MULTICASTDNS_PORT)) {
+ /*
+ * TCP DNS query has 2byte length at the head.
+ * XXX packet could be unaligned, it can go strange
+ */
+ ns_print(bp + 2, length - 2, 0);
+ } else if (sport == MSDP_PORT || dport == MSDP_PORT) {
+ msdp_print(bp, length);
+ }
+ else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) {
+ ldp_print(bp, length);
+ }
+
+ return;
+ bad:
+ fputs("[bad opt]", stdout);
+ if (ch != '\0')
+ putchar('>');
+ return;
+ trunc:
+ fputs("[|tcp]", stdout);
+ if (ch != '\0')
+ putchar('>');
}
/*
@@ -712,96 +716,103 @@ trunc:
static void
print_tcp_rst_data(register const u_char *sp, u_int length)
{
- int c;
-
- if (TTEST2(*sp, length))
- printf(" [RST");
- else
- printf(" [!RST");
- if (length > MAX_RST_DATA_LEN) {
- length = MAX_RST_DATA_LEN; /* can use -X for longer */
- putchar('+'); /* indicate we truncate */
- }
- putchar(' ');
- while (length-- && sp <= snapend) {
- c = *sp++;
- safeputchar(c);
- }
- putchar(']');
+ int c;
+
+ if (TTEST2(*sp, length))
+ printf(" [RST");
+ else
+ printf(" [!RST");
+ if (length > MAX_RST_DATA_LEN) {
+ length = MAX_RST_DATA_LEN; /* can use -X for longer */
+ putchar('+'); /* indicate we truncate */
+ }
+ putchar(' ');
+ while (length-- && sp <= snapend) {
+ c = *sp++;
+ safeputchar(c);
+ }
+ putchar(']');
}
#ifdef HAVE_LIBCRYPTO
static int
tcp_verify_signature(const struct ip *ip, const struct tcphdr *tp,
- const u_char *data, int length, const u_char *rcvsig)
+ const u_char *data, int length, const u_char *rcvsig)
{
struct tcphdr tp1;
- u_char sig[TCP_SIGLEN];
- char zero_proto = 0;
- MD5_CTX ctx;
- u_int16_t savecsum, tlen;
+ u_char sig[TCP_SIGLEN];
+ char zero_proto = 0;
+ MD5_CTX ctx;
+ u_int16_t savecsum, tlen;
#ifdef INET6
- struct ip6_hdr *ip6;
+ struct ip6_hdr *ip6;
+ u_int32_t len32;
+ u_int8_t nxt;
#endif
- u_int32_t len32;
- u_int8_t nxt;
-
- tp1 = *tp;
-
- if (tcpmd5secret == NULL)
- return (CANT_CHECK_SIGNATURE);
- MD5_Init(&ctx);
- /*
- * Step 1: Update MD5 hash with IP pseudo-header.
- */
- if (IP_V(ip) == 4) {
- MD5_Update(&ctx, (char *)&ip->ip_src, sizeof(ip->ip_src));
- MD5_Update(&ctx, (char *)&ip->ip_dst, sizeof(ip->ip_dst));
- MD5_Update(&ctx, (char *)&zero_proto, sizeof(zero_proto));
- MD5_Update(&ctx, (char *)&ip->ip_p, sizeof(ip->ip_p));
- tlen = EXTRACT_16BITS(&ip->ip_len) - IP_HL(ip) * 4;
- tlen = htons(tlen);
- MD5_Update(&ctx, (char *)&tlen, sizeof(tlen));
+ tp1 = *tp;
+
+ if (tcpmd5secret == NULL)
+ return (CANT_CHECK_SIGNATURE);
+
+ MD5_Init(&ctx);
+ /*
+ * Step 1: Update MD5 hash with IP pseudo-header.
+ */
+ if (IP_V(ip) == 4) {
+ MD5_Update(&ctx, (char *)&ip->ip_src, sizeof(ip->ip_src));
+ MD5_Update(&ctx, (char *)&ip->ip_dst, sizeof(ip->ip_dst));
+ MD5_Update(&ctx, (char *)&zero_proto, sizeof(zero_proto));
+ MD5_Update(&ctx, (char *)&ip->ip_p, sizeof(ip->ip_p));
+ tlen = EXTRACT_16BITS(&ip->ip_len) - IP_HL(ip) * 4;
+ tlen = htons(tlen);
+ MD5_Update(&ctx, (char *)&tlen, sizeof(tlen));
#ifdef INET6
- } else if (IP_V(ip) == 6) {
- ip6 = (struct ip6_hdr *)ip;
- MD5_Update(&ctx, (char *)&ip6->ip6_src, sizeof(ip6->ip6_src));
- MD5_Update(&ctx, (char *)&ip6->ip6_dst, sizeof(ip6->ip6_dst));
- len32 = htonl(ntohs(ip6->ip6_plen));
- MD5_Update(&ctx, (char *)&len32, sizeof(len32));
- nxt = 0;
- MD5_Update(&ctx, (char *)&nxt, sizeof(nxt));
- MD5_Update(&ctx, (char *)&nxt, sizeof(nxt));
- MD5_Update(&ctx, (char *)&nxt, sizeof(nxt));
- nxt = IPPROTO_TCP;
- MD5_Update(&ctx, (char *)&nxt, sizeof(nxt));
+ } else if (IP_V(ip) == 6) {
+ ip6 = (struct ip6_hdr *)ip;
+ MD5_Update(&ctx, (char *)&ip6->ip6_src, sizeof(ip6->ip6_src));
+ MD5_Update(&ctx, (char *)&ip6->ip6_dst, sizeof(ip6->ip6_dst));
+ len32 = htonl(ntohs(ip6->ip6_plen));
+ MD5_Update(&ctx, (char *)&len32, sizeof(len32));
+ nxt = 0;
+ MD5_Update(&ctx, (char *)&nxt, sizeof(nxt));
+ MD5_Update(&ctx, (char *)&nxt, sizeof(nxt));
+ MD5_Update(&ctx, (char *)&nxt, sizeof(nxt));
+ nxt = IPPROTO_TCP;
+ MD5_Update(&ctx, (char *)&nxt, sizeof(nxt));
#endif
- } else
- return (CANT_CHECK_SIGNATURE);
-
- /*
- * Step 2: Update MD5 hash with TCP header, excluding options.
- * The TCP checksum must be set to zero.
- */
- savecsum = tp1.th_sum;
- tp1.th_sum = 0;
- MD5_Update(&ctx, (char *)&tp1, sizeof(struct tcphdr));
- tp1.th_sum = savecsum;
- /*
- * Step 3: Update MD5 hash with TCP segment data, if present.
- */
- if (length > 0)
- MD5_Update(&ctx, data, length);
- /*
- * Step 4: Update MD5 hash with shared secret.
- */
- MD5_Update(&ctx, tcpmd5secret, strlen(tcpmd5secret));
- MD5_Final(sig, &ctx);
-
- if (memcmp(rcvsig, sig, TCP_SIGLEN) == 0)
- return (SIGNATURE_VALID);
- else
- return (SIGNATURE_INVALID);
+ } else
+ return (CANT_CHECK_SIGNATURE);
+
+ /*
+ * Step 2: Update MD5 hash with TCP header, excluding options.
+ * The TCP checksum must be set to zero.
+ */
+ savecsum = tp1.th_sum;
+ tp1.th_sum = 0;
+ MD5_Update(&ctx, (char *)&tp1, sizeof(struct tcphdr));
+ tp1.th_sum = savecsum;
+ /*
+ * Step 3: Update MD5 hash with TCP segment data, if present.
+ */
+ if (length > 0)
+ MD5_Update(&ctx, data, length);
+ /*
+ * Step 4: Update MD5 hash with shared secret.
+ */
+ MD5_Update(&ctx, tcpmd5secret, strlen(tcpmd5secret));
+ MD5_Final(sig, &ctx);
+
+ if (memcmp(rcvsig, sig, TCP_SIGLEN) == 0)
+ return (SIGNATURE_VALID);
+ else
+ return (SIGNATURE_INVALID);
}
#endif /* HAVE_LIBCRYPTO */
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 8
+ * End:
+ */
diff --git a/contrib/tcpdump/print-telnet.c b/contrib/tcpdump/print-telnet.c
index 7888727..4911e5c 100644
--- a/contrib/tcpdump/print-telnet.c
+++ b/contrib/tcpdump/print-telnet.c
@@ -51,7 +51,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-telnet.c,v 1.24 2003/12/29 11:05:10 hannes Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-telnet.c,v 1.24 2003-12-29 11:05:10 hannes Exp $";
#endif
#include <tcpdump-stdinc.h>
diff --git a/contrib/tcpdump/print-tftp.c b/contrib/tcpdump/print-tftp.c
index b517898..c4fc7ea 100644
--- a/contrib/tcpdump/print-tftp.c
+++ b/contrib/tcpdump/print-tftp.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-tftp.c,v 1.37.2.1 2007/09/14 01:03:12 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-tftp.c,v 1.38.2.1 2008-04-11 16:44:17 gianluca Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -50,7 +50,7 @@ static struct tok op2str[] = {
{ WRQ, "WRQ" }, /* write request */
{ DATA, "DATA" }, /* data packet */
{ ACK, "ACK" }, /* acknowledgement */
- { ERROR, "ERROR" }, /* error code */
+ { TFTP_ERROR, "ERROR" }, /* error code */
{ OACK, "OACK" }, /* option acknowledgement */
{ 0, NULL }
};
@@ -137,7 +137,7 @@ tftp_print(register const u_char *bp, u_int length)
printf(" block %d", EXTRACT_16BITS(&tp->th_block));
break;
- case ERROR:
+ case TFTP_ERROR:
/* Print error code string */
TCHECK(tp->th_code);
printf(" %s \"", tok2str(err2str, "tftp-err-#%d \"",
diff --git a/contrib/tcpdump/print-timed.c b/contrib/tcpdump/print-timed.c
index 3df2241..55fbb39 100644
--- a/contrib/tcpdump/print-timed.c
+++ b/contrib/tcpdump/print-timed.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-timed.c,v 1.9 2003/11/16 09:36:40 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-timed.c,v 1.9 2003-11-16 09:36:40 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-token.c b/contrib/tcpdump/print-token.c
index 8a5f4f5..8fe96c6 100644
--- a/contrib/tcpdump/print-token.c
+++ b/contrib/tcpdump/print-token.c
@@ -27,7 +27,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-token.c,v 1.25.2.2 2005/11/13 12:13:01 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-token.c,v 1.27 2005-11-13 12:12:43 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-udld.c b/contrib/tcpdump/print-udld.c
new file mode 100644
index 0000000..a5488dd
--- /dev/null
+++ b/contrib/tcpdump/print-udld.c
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 1998-2007 The TCPDUMP project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * UNIDIRECTIONAL LINK DETECTION (UDLD) as per
+ * http://www.ietf.org/internet-drafts/draft-foschiano-udld-02.txt
+ *
+ * Original code by Carles Kishimoto <carles.kishimoto@gmail.com>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "interface.h"
+#include "addrtoname.h"
+#include "extract.h"
+#include "nlpid.h"
+
+#define UDLD_HEADER_LEN 4
+#define UDLD_DEVICE_ID_TLV 0x0001
+#define UDLD_PORT_ID_TLV 0x0002
+#define UDLD_ECHO_TLV 0x0003
+#define UDLD_MESSAGE_INTERVAL_TLV 0x0004
+#define UDLD_TIMEOUT_INTERVAL_TLV 0x0005
+#define UDLD_DEVICE_NAME_TLV 0x0006
+#define UDLD_SEQ_NUMBER_TLV 0x0007
+
+static struct tok udld_tlv_values[] = {
+ { UDLD_DEVICE_ID_TLV, "Device-ID TLV"},
+ { UDLD_PORT_ID_TLV, "Port-ID TLV"},
+ { UDLD_ECHO_TLV, "Echo TLV"},
+ { UDLD_MESSAGE_INTERVAL_TLV, "Message Interval TLV"},
+ { UDLD_TIMEOUT_INTERVAL_TLV, "Timeout Interval TLV"},
+ { UDLD_DEVICE_NAME_TLV, "Device Name TLV"},
+ { UDLD_SEQ_NUMBER_TLV,"Sequence Number TLV"},
+ { 0, NULL}
+};
+
+static struct tok udld_code_values[] = {
+ { 0x00, "Reserved"},
+ { 0x01, "Probe message"},
+ { 0x02, "Echo message"},
+ { 0x03, "Flush message"},
+ { 0, NULL}
+};
+
+static struct tok udld_flags_values[] = {
+ { 0x00, "RT"},
+ { 0x01, "RSY"},
+ { 0, NULL}
+};
+
+/*
+ *
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Ver | Opcode | Flags | Checksum |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | List of TLVs (variable length list) |
+ * | ... |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ */
+
+#define UDLD_EXTRACT_VERSION(x) (((x)&0xe0)>>5)
+#define UDLD_EXTRACT_OPCODE(x) ((x)&0x1f)
+
+void
+udld_print (const u_char *pptr, u_int length)
+{
+ int code, type, len;
+ const u_char *tptr;
+
+ if (length < UDLD_HEADER_LEN)
+ goto trunc;
+
+ tptr = pptr;
+
+ if (!TTEST2(*tptr, UDLD_HEADER_LEN))
+ goto trunc;
+
+ code = UDLD_EXTRACT_OPCODE(*tptr);
+
+ printf("UDLDv%u, Code %s (%x), Flags [%s] (0x%02x), length %u",
+ UDLD_EXTRACT_VERSION(*tptr),
+ tok2str(udld_code_values, "Reserved", code),
+ code,
+ bittok2str(udld_flags_values, "none", *(tptr+1)),
+ *(tptr+1),
+ length);
+
+ /*
+ * In non-verbose mode, just print version and opcode type
+ */
+ if (vflag < 1) {
+ return;
+ }
+
+ printf("\n\tChecksum 0x%04x (unverified)", EXTRACT_16BITS(tptr+2));
+
+ tptr += UDLD_HEADER_LEN;
+
+ while (tptr < (pptr+length)) {
+
+ if (!TTEST2(*tptr, 4))
+ goto trunc;
+
+ type = EXTRACT_16BITS(tptr);
+ len = EXTRACT_16BITS(tptr+2);
+ len -= 4;
+ tptr += 4;
+
+ /* infinite loop check */
+ if (type == 0 || len == 0) {
+ return;
+ }
+
+ printf("\n\t%s (0x%04x) TLV, length %u",
+ tok2str(udld_tlv_values, "Unknown", type),
+ type, len);
+
+ switch (type) {
+ case UDLD_DEVICE_ID_TLV:
+ case UDLD_PORT_ID_TLV:
+ case UDLD_ECHO_TLV:
+ case UDLD_DEVICE_NAME_TLV:
+ printf(", %s", tptr);
+ break;
+
+ case UDLD_MESSAGE_INTERVAL_TLV:
+ case UDLD_TIMEOUT_INTERVAL_TLV:
+ printf(", %us", (*tptr));
+ break;
+
+ case UDLD_SEQ_NUMBER_TLV:
+ printf(", %u", EXTRACT_32BITS(tptr));
+ break;
+
+ default:
+ break;
+ }
+ tptr += len;
+ }
+
+ return;
+
+ trunc:
+ printf("[|udld]");
+}
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/contrib/tcpdump/print-udp.c b/contrib/tcpdump/print-udp.c
index d530d6a..0c70544 100644
--- a/contrib/tcpdump/print-udp.c
+++ b/contrib/tcpdump/print-udp.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.138.2.1 2007/03/28 07:45:46 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-udp.c,v 1.142 2007-08-08 17:20:58 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -685,6 +685,16 @@ udp_print(register const u_char *bp, u_int length,
bfd_print((const u_char *)(up+1), length, dport);
else if (ISPORT(LMP_PORT))
lmp_print((const u_char *)(up + 1), length);
+ else if (ISPORT(VQP_PORT))
+ vqp_print((const u_char *)(up + 1), length);
+ else if (ISPORT(SFLOW_PORT))
+ sflow_print((const u_char *)(up + 1), length);
+ else if (dport == LWAPP_CONTROL_PORT)
+ lwapp_control_print((const u_char *)(up + 1), length, 1);
+ else if (sport == LWAPP_CONTROL_PORT)
+ lwapp_control_print((const u_char *)(up + 1), length, 0);
+ else if (ISPORT(LWAPP_DATA_PORT))
+ lwapp_data_print((const u_char *)(up + 1), length);
else if (ISPORT(SIP_PORT))
sip_print((const u_char *)(up + 1), length);
else if (ISPORT(SYSLOG_PORT))
diff --git a/contrib/tcpdump/print-vjc.c b/contrib/tcpdump/print-vjc.c
index 55b7d08..2dc89aa 100644
--- a/contrib/tcpdump/print-vjc.c
+++ b/contrib/tcpdump/print-vjc.c
@@ -25,7 +25,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-vjc.c,v 1.15 2004/03/25 03:31:17 mcr Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-vjc.c,v 1.15 2004-03-25 03:31:17 mcr Exp $ (LBL)";
#endif
#include <tcpdump-stdinc.h>
diff --git a/contrib/tcpdump/print-vqp.c b/contrib/tcpdump/print-vqp.c
new file mode 100644
index 0000000..2d9e8e1
--- /dev/null
+++ b/contrib/tcpdump/print-vqp.c
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 1998-2006 The TCPDUMP project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * support for the Cisco prop. VQP Protocol
+ *
+ * Original code by Carles Kishimoto <Carles.Kishimoto@bsc.es>
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+ "@(#) $Header: /tcpdump/master/tcpdump/print-vqp.c,v 1.3 2006-08-19 06:51:13 guy Exp $";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "interface.h"
+#include "extract.h"
+#include "addrtoname.h"
+
+#define VQP_VERSION 1
+#define VQP_EXTRACT_VERSION(x) ((x)&0xFF)
+
+/*
+ * VQP common header
+ *
+ * 0 1 2 3
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Constant | Packet type | Error Code | nitems |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Packet Sequence Number (4 bytes) |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+struct vqp_common_header_t {
+ u_int8_t version;
+ u_int8_t msg_type;
+ u_int8_t error_code;
+ u_int8_t nitems;
+ u_int8_t sequence[4];
+};
+
+struct vqp_obj_tlv_t {
+ u_int8_t obj_type[4];
+ u_int8_t obj_length[2];
+};
+
+#define VQP_OBJ_REQ_JOIN_PORT 0x01
+#define VQP_OBJ_RESP_VLAN 0x02
+#define VQP_OBJ_REQ_RECONFIRM 0x03
+#define VQP_OBJ_RESP_RECONFIRM 0x04
+
+static const struct tok vqp_msg_type_values[] = {
+ { VQP_OBJ_REQ_JOIN_PORT, "Request, Join Port"},
+ { VQP_OBJ_RESP_VLAN, "Response, VLAN"},
+ { VQP_OBJ_REQ_RECONFIRM, "Request, Reconfirm"},
+ { VQP_OBJ_RESP_RECONFIRM, "Response, Reconfirm"},
+ { 0, NULL}
+};
+
+static const struct tok vqp_error_code_values[] = {
+ { 0x00, "No error"},
+ { 0x03, "Access denied"},
+ { 0x04, "Shutdown port"},
+ { 0x05, "Wrong VTP domain"},
+ { 0, NULL}
+};
+
+/* FIXME the heading 0x0c looks ugly - those must be flags etc. */
+#define VQP_OBJ_IP_ADDRESS 0x0c01
+#define VQP_OBJ_PORT_NAME 0x0c02
+#define VQP_OBJ_VLAN_NAME 0x0c03
+#define VQP_OBJ_VTP_DOMAIN 0x0c04
+#define VQP_OBJ_ETHERNET_PKT 0x0c05
+#define VQP_OBJ_MAC_NULL 0x0c06
+#define VQP_OBJ_MAC_ADDRESS 0x0c08
+
+static const struct tok vqp_obj_values[] = {
+ { VQP_OBJ_IP_ADDRESS, "Client IP Address" },
+ { VQP_OBJ_PORT_NAME, "Port Name" },
+ { VQP_OBJ_VLAN_NAME, "VLAN Name" },
+ { VQP_OBJ_VTP_DOMAIN, "VTP Domain" },
+ { VQP_OBJ_ETHERNET_PKT, "Ethernet Packet" },
+ { VQP_OBJ_MAC_NULL, "MAC Null" },
+ { VQP_OBJ_MAC_ADDRESS, "MAC Address" },
+ { 0, NULL}
+};
+
+void
+vqp_print(register const u_char *pptr, register u_int len)
+{
+ const struct vqp_common_header_t *vqp_common_header;
+ const struct vqp_obj_tlv_t *vqp_obj_tlv;
+
+ const u_char *tptr;
+ u_int16_t vqp_obj_len;
+ u_int32_t vqp_obj_type;
+ int tlen;
+ u_int8_t nitems;
+
+ tptr=pptr;
+ tlen = len;
+ vqp_common_header = (const struct vqp_common_header_t *)pptr;
+ TCHECK(*vqp_common_header);
+
+ /*
+ * Sanity checking of the header.
+ */
+ if (VQP_EXTRACT_VERSION(vqp_common_header->version) != VQP_VERSION) {
+ printf("VQP version %u packet not supported",
+ VQP_EXTRACT_VERSION(vqp_common_header->version));
+ return;
+ }
+
+ /* in non-verbose mode just lets print the basic Message Type */
+ if (vflag < 1) {
+ printf("VQPv%u %s Message, error-code %s (%u), length %u",
+ VQP_EXTRACT_VERSION(vqp_common_header->version),
+ tok2str(vqp_msg_type_values, "unknown (%u)",vqp_common_header->msg_type),
+ tok2str(vqp_error_code_values, "unknown (%u)",vqp_common_header->error_code),
+ vqp_common_header->error_code,
+ len);
+ return;
+ }
+
+ /* ok they seem to want to know everything - lets fully decode it */
+ nitems = vqp_common_header->nitems;
+ printf("\n\tVQPv%u, %s Message, error-code %s (%u), seq 0x%08x, items %u, length %u",
+ VQP_EXTRACT_VERSION(vqp_common_header->version),
+ tok2str(vqp_msg_type_values, "unknown (%u)",vqp_common_header->msg_type),
+ tok2str(vqp_error_code_values, "unknown (%u)",vqp_common_header->error_code),
+ vqp_common_header->error_code,
+ EXTRACT_32BITS(&vqp_common_header->sequence),
+ nitems,
+ len);
+
+ /* skip VQP Common header */
+ tptr+=sizeof(const struct vqp_common_header_t);
+ tlen-=sizeof(const struct vqp_common_header_t);
+
+ while (nitems > 0 && tlen > 0) {
+
+ vqp_obj_tlv = (const struct vqp_obj_tlv_t *)tptr;
+ vqp_obj_type = EXTRACT_32BITS(vqp_obj_tlv->obj_type);
+ vqp_obj_len = EXTRACT_16BITS(vqp_obj_tlv->obj_length);
+ tptr+=sizeof(struct vqp_obj_tlv_t);
+ tlen-=sizeof(struct vqp_obj_tlv_t);
+
+ printf("\n\t %s Object (0x%08x), length %u, value: ",
+ tok2str(vqp_obj_values, "Unknown", vqp_obj_type),
+ vqp_obj_type, vqp_obj_len);
+
+ /* basic sanity check */
+ if (vqp_obj_type == 0 || vqp_obj_len ==0) {
+ return;
+ }
+
+ /* did we capture enough for fully decoding the object ? */
+ if (!TTEST2(*tptr, vqp_obj_len))
+ goto trunc;
+
+ switch(vqp_obj_type) {
+ case VQP_OBJ_IP_ADDRESS:
+ printf("%s (0x%08x)", ipaddr_string(tptr), EXTRACT_32BITS(tptr));
+ break;
+ /* those objects have similar semantics - fall through */
+ case VQP_OBJ_PORT_NAME:
+ case VQP_OBJ_VLAN_NAME:
+ case VQP_OBJ_VTP_DOMAIN:
+ case VQP_OBJ_ETHERNET_PKT:
+ safeputs((const char *)tptr, vqp_obj_len);
+ break;
+ /* those objects have similar semantics - fall through */
+ case VQP_OBJ_MAC_ADDRESS:
+ case VQP_OBJ_MAC_NULL:
+ printf("%s", etheraddr_string(tptr));
+ break;
+ default:
+ if (vflag <= 1)
+ print_unknown_data(tptr, "\n\t ", vqp_obj_len);
+ break;
+ }
+ tptr += vqp_obj_len;
+ tlen -= vqp_obj_len;
+ nitems--;
+ }
+ return;
+trunc:
+ printf("\n\t[|VQP]");
+}
diff --git a/contrib/tcpdump/print-vrrp.c b/contrib/tcpdump/print-vrrp.c
index 1e87a50..899542d 100644
--- a/contrib/tcpdump/print-vrrp.c
+++ b/contrib/tcpdump/print-vrrp.c
@@ -25,7 +25,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-vrrp.c,v 1.9.2.1 2005/05/06 07:57:20 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-vrrp.c,v 1.10 2005-05-06 07:56:54 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-vtp.c b/contrib/tcpdump/print-vtp.c
new file mode 100644
index 0000000..7631c6f
--- /dev/null
+++ b/contrib/tcpdump/print-vtp.c
@@ -0,0 +1,378 @@
+/*
+ * Copyright (c) 1998-2007 The TCPDUMP project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * VLAN TRUNKING PROTOCOL (VTP)
+ *
+ * Reference documentation:
+ * http://www.cisco.com/en/US/tech/tk389/tk689/technologies_tech_note09186a0080094c52.shtml
+ * http://www.cisco.com/warp/public/473/21.html
+ * http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm
+ *
+ * Original code ode by Carles Kishimoto <carles.kishimoto@gmail.com>
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "interface.h"
+#include "addrtoname.h"
+#include "extract.h"
+#include "nlpid.h"
+
+#define VTP_HEADER_LEN 36
+#define VTP_DOMAIN_NAME_LEN 32
+#define VTP_MD5_DIGEST_LEN 16
+#define VTP_UPDATE_TIMESTAMP_LEN 12
+#define VTP_VLAN_INFO_OFFSET 12
+
+#define VTP_SUMMARY_ADV 0x01
+#define VTP_SUBSET_ADV 0x02
+#define VTP_ADV_REQUEST 0x03
+#define VTP_JOIN_MESSAGE 0x04
+
+struct vtp_vlan_ {
+ u_int8_t len;
+ u_int8_t status;
+ u_int8_t type;
+ u_int8_t name_len;
+ u_int16_t vlanid;
+ u_int16_t mtu;
+ u_int32_t index;
+};
+
+static struct tok vtp_message_type_values[] = {
+ { VTP_SUMMARY_ADV, "Summary advertisement"},
+ { VTP_SUBSET_ADV, "Subset advertisement"},
+ { VTP_ADV_REQUEST, "Advertisement request"},
+ { VTP_JOIN_MESSAGE, "Join message"},
+ { 0, NULL }
+};
+
+static struct tok vtp_header_values[] = {
+ { 0x01, "Followers"}, /* On Summary advertisement, 3rd byte is Followers */
+ { 0x02, "Seq number"}, /* On Subset advertisement, 3rd byte is Sequence number */
+ { 0x03, "Rsvd"}, /* On Adver. requests 3rd byte is Rsvd */
+ { 0x04, "Rsvd"}, /* On Adver. requests 3rd byte is Rsvd */
+ { 0, NULL }
+};
+
+static struct tok vtp_vlan_type_values[] = {
+ { 0x01, "Ethernet"},
+ { 0x02, "FDDI"},
+ { 0x03, "TrCRF"},
+ { 0x04, "FDDI-net"},
+ { 0x05, "TrBRF"},
+ { 0, NULL }
+};
+
+static struct tok vtp_vlan_status[] = {
+ { 0x00, "Operational"},
+ { 0x01, "Suspended"},
+ { 0, NULL }
+};
+
+#define VTP_VLAN_SOURCE_ROUTING_RING_NUMBER 0x01
+#define VTP_VLAN_SOURCE_ROUTING_BRIDGE_NUMBER 0x02
+#define VTP_VLAN_STP_TYPE 0x03
+#define VTP_VLAN_PARENT_VLAN 0x04
+#define VTP_VLAN_TRANS_BRIDGED_VLAN 0x05
+#define VTP_VLAN_PRUNING 0x06
+#define VTP_VLAN_BRIDGE_TYPE 0x07
+#define VTP_VLAN_ARP_HOP_COUNT 0x08
+#define VTP_VLAN_STE_HOP_COUNT 0x09
+#define VTP_VLAN_BACKUP_CRF_MODE 0x0A
+
+static struct tok vtp_vlan_tlv_values[] = {
+ { VTP_VLAN_SOURCE_ROUTING_RING_NUMBER, "Source-Routing Ring Number TLV"},
+ { VTP_VLAN_SOURCE_ROUTING_BRIDGE_NUMBER, "Source-Routing Bridge Number TLV"},
+ { VTP_VLAN_STP_TYPE, "STP type TLV"},
+ { VTP_VLAN_PARENT_VLAN, "Parent VLAN TLV"},
+ { VTP_VLAN_TRANS_BRIDGED_VLAN, "Translationally bridged VLANs TLV"},
+ { VTP_VLAN_PRUNING, "Pruning TLV"},
+ { VTP_VLAN_BRIDGE_TYPE, "Bridge Type TLV"},
+ { VTP_VLAN_ARP_HOP_COUNT, "Max ARP Hop Count TLV"},
+ { VTP_VLAN_STE_HOP_COUNT, "Max STE Hop Count TLV"},
+ { VTP_VLAN_BACKUP_CRF_MODE, "Backup CRF Mode TLV"},
+ { 0, NULL }
+};
+
+static struct tok vtp_stp_type_values[] = {
+ { 1, "SRT"},
+ { 2, "SRB"},
+ { 3, "Auto"},
+ { 0, NULL }
+};
+
+void
+vtp_print (const u_char *pptr, u_int length)
+{
+ int type, len, tlv_len, tlv_value;
+ const u_char *tptr;
+ const struct vtp_vlan_ *vtp_vlan;
+
+ if (length < VTP_HEADER_LEN)
+ goto trunc;
+
+ tptr = pptr;
+
+ if (!TTEST2(*tptr, VTP_HEADER_LEN))
+ goto trunc;
+
+ type = *(tptr+1);
+ printf("VTPv%u, Message %s (0x%02x), length %u",
+ *tptr,
+ tok2str(vtp_message_type_values,"Unknown message type", type),
+ *(tptr+1),
+ length);
+
+ /* In non-verbose mode, just print version and message type */
+ if (vflag < 1) {
+ return;
+ }
+
+ /* verbose mode print all fields */
+ printf("\n\tDomain name: %s, %s: %u",
+ (tptr+4),
+ tok2str(vtp_header_values,"Unknown",*(tptr+1)),
+ *(tptr+2));
+
+ tptr += VTP_HEADER_LEN;
+
+ switch (type) {
+
+ case VTP_SUMMARY_ADV:
+
+ /*
+ * SUMMARY ADVERTISEMENT
+ *
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Version | Code | Followers | MmgtD Len |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Management Domain Name |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Configuration revision number |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Updater Identity IP address |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Update Timestamp (12 bytes) |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | MD5 digest (16 bytes) |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ */
+
+ printf("\n\t Config Rev %x, Updater %s",
+ EXTRACT_32BITS(tptr),
+ ipaddr_string(tptr+4));
+ tptr += 8;
+ printf(", Timestamp 0x%08x 0x%08x 0x%08x",
+ EXTRACT_32BITS(tptr),
+ EXTRACT_32BITS(tptr + 4),
+ EXTRACT_32BITS(tptr + 8));
+ tptr += VTP_UPDATE_TIMESTAMP_LEN;
+ printf(", MD5 digest: %08x%08x%08x%08x",
+ EXTRACT_32BITS(tptr),
+ EXTRACT_32BITS(tptr + 4),
+ EXTRACT_32BITS(tptr + 8),
+ EXTRACT_32BITS(tptr + 12));
+ tptr += VTP_MD5_DIGEST_LEN;
+ break;
+
+ case VTP_SUBSET_ADV:
+
+ /*
+ * SUBSET ADVERTISEMENT
+ *
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Version | Code | Seq number | MmgtD Len |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Management Domain Name |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Configuration revision number |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | VLAN info field 1 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ................ |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | VLAN info field N |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ */
+
+ printf(", Config Rev %x", EXTRACT_32BITS(tptr));
+
+ /*
+ * VLAN INFORMATION
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | V info len | Status | VLAN type | VLAN name len |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ISL vlan id | MTU size |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | 802.10 index (SAID) |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | VLAN name |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ */
+
+ tptr += 4;
+ while (tptr < (pptr+length)) {
+
+ len = *tptr;
+ if (len == 0)
+ break;
+
+ if (!TTEST2(*tptr, len))
+ goto trunc;
+
+ vtp_vlan = (struct vtp_vlan_*)tptr;
+ printf("\n\tVLAN info status %s, type %s, VLAN-id %u, MTU %u, SAID 0x%08x, Name %s",
+ tok2str(vtp_vlan_status,"Unknown",vtp_vlan->status),
+ tok2str(vtp_vlan_type_values,"Unknown",vtp_vlan->type),
+ EXTRACT_16BITS(&vtp_vlan->vlanid),
+ EXTRACT_16BITS(&vtp_vlan->mtu),
+ EXTRACT_32BITS(&vtp_vlan->index),
+ (tptr + VTP_VLAN_INFO_OFFSET));
+
+ /*
+ * Vlan names are aligned to 32-bit boundaries.
+ */
+ len -= VTP_VLAN_INFO_OFFSET + 4*((vtp_vlan->name_len + 3)/4);
+ tptr += VTP_VLAN_INFO_OFFSET + 4*((vtp_vlan->name_len + 3)/4);
+
+ /* TLV information follows */
+
+ while (len > 0) {
+
+ /*
+ * Cisco specs says 2 bytes for type + 2 bytes for length, take only 1
+ * See: http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm
+ */
+ type = *tptr;
+ tlv_len = *(tptr+1);
+
+ printf("\n\t\t%s (0x%04x) TLV",
+ tok2str(vtp_vlan_tlv_values, "Unknown", type),
+ type);
+
+ /*
+ * infinite loop check
+ */
+ if (type == 0 || tlv_len == 0) {
+ return;
+ }
+
+ if (!TTEST2(*tptr, tlv_len*2 +2))
+ goto trunc;
+
+ tlv_value = EXTRACT_16BITS(tptr+2);
+
+ switch (type) {
+ case VTP_VLAN_STE_HOP_COUNT:
+ printf(", %u", tlv_value);
+ break;
+
+ case VTP_VLAN_PRUNING:
+ printf(", %s (%u)",
+ tlv_value == 1 ? "Enabled" : "Disabled",
+ tlv_value);
+ break;
+
+ case VTP_VLAN_STP_TYPE:
+ printf(", %s (%u)",
+ tok2str(vtp_stp_type_values, "Unknown", tlv_value),
+ tlv_value);
+ break;
+
+ case VTP_VLAN_BRIDGE_TYPE:
+ printf(", %s (%u)",
+ tlv_value == 1 ? "SRB" : "SRT",
+ tlv_value);
+ break;
+
+ case VTP_VLAN_BACKUP_CRF_MODE:
+ printf(", %s (%u)",
+ tlv_value == 1 ? "Backup" : "Not backup",
+ tlv_value);
+ break;
+
+ /*
+ * FIXME those are the defined TLVs that lack a decoder
+ * you are welcome to contribute code ;-)
+ */
+
+ case VTP_VLAN_SOURCE_ROUTING_RING_NUMBER:
+ case VTP_VLAN_SOURCE_ROUTING_BRIDGE_NUMBER:
+ case VTP_VLAN_PARENT_VLAN:
+ case VTP_VLAN_TRANS_BRIDGED_VLAN:
+ case VTP_VLAN_ARP_HOP_COUNT:
+ default:
+ print_unknown_data(tptr, "\n\t\t ", 2 + tlv_len*2);
+ break;
+ }
+ len -= 2 + tlv_len*2;
+ tptr += 2 + tlv_len*2;
+ }
+ }
+ break;
+
+ case VTP_ADV_REQUEST:
+
+ /*
+ * ADVERTISEMENT REQUEST
+ *
+ * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Version | Code | Reserved | MmgtD Len |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Management Domain Name |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Start value |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *
+ */
+
+ printf("\n\tStart value: %u", EXTRACT_32BITS(tptr));
+ break;
+
+ case VTP_JOIN_MESSAGE:
+
+ /* FIXME - Could not find message format */
+ break;
+
+ default:
+ break;
+ }
+
+ return;
+
+ trunc:
+ printf("[|vtp]");
+}
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/contrib/tcpdump/print-wb.c b/contrib/tcpdump/print-wb.c
index e28697a..3ae604f 100644
--- a/contrib/tcpdump/print-wb.c
+++ b/contrib/tcpdump/print-wb.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-wb.c,v 1.33 2004/03/24 04:06:28 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-wb.c,v 1.33 2004-03-24 04:06:28 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/print-zephyr.c b/contrib/tcpdump/print-zephyr.c
index 698faa2..7c52e65 100644
--- a/contrib/tcpdump/print-zephyr.c
+++ b/contrib/tcpdump/print-zephyr.c
@@ -22,7 +22,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/print-zephyr.c,v 1.8.2.1 2005/04/21 06:51:24 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-zephyr.c,v 1.10 2007-08-09 18:47:27 hannes Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -140,6 +140,15 @@ zephyr_print(const u_char *cp, int length)
char *s;
int lose = 0;
+ /* squelch compiler warnings */
+
+ z.kind = 0;
+ z.class = 0;
+ z.inst = 0;
+ z.opcode = 0;
+ z.sender = 0;
+ z.recipient = 0;
+
#define PARSE_STRING \
s = parse_field(&parse, &parselen); \
if (!s) lose = 1;
diff --git a/contrib/tcpdump/route6d.h b/contrib/tcpdump/route6d.h
index ee00331..53953fd 100644
--- a/contrib/tcpdump/route6d.h
+++ b/contrib/tcpdump/route6d.h
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*/
/*
- * $Header: /tcpdump/master/tcpdump/route6d.h,v 1.5 2002/12/11 07:14:10 guy Exp $
+ * $Header: /tcpdump/master/tcpdump/route6d.h,v 1.5 2002-12-11 07:14:10 guy Exp $
*/
#define RIP6_VERSION 1
diff --git a/contrib/tcpdump/rpc_auth.h b/contrib/tcpdump/rpc_auth.h
index 2b8ddc1..0e5a1c1 100644
--- a/contrib/tcpdump/rpc_auth.h
+++ b/contrib/tcpdump/rpc_auth.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/rpc_auth.h,v 1.1.2.1 2005/04/27 21:44:07 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/rpc_auth.h,v 1.2 2005-04-27 21:43:48 guy Exp $ (LBL) */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
@@ -30,6 +30,7 @@
* from: @(#)auth.h 1.17 88/02/08 SMI
* from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC
* $FreeBSD$
+ * FreeBSD: src/include/rpc/auth.h,v 1.14.2.1 1999/08/29 14:39:02 peter Exp
*/
/*
diff --git a/contrib/tcpdump/rpc_msg.h b/contrib/tcpdump/rpc_msg.h
index 01185de..9c2770c 100644
--- a/contrib/tcpdump/rpc_msg.h
+++ b/contrib/tcpdump/rpc_msg.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/rpc_msg.h,v 1.1.2.1 2005/04/27 21:44:07 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/rpc_msg.h,v 1.2 2005-04-27 21:43:48 guy Exp $ (LBL) */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
@@ -30,6 +30,7 @@
* from: @(#)rpc_msg.h 1.7 86/07/16 SMI
* from: @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC
* $FreeBSD$
+ * FreeBSD: src/include/rpc/rpc_msg.h,v 1.11.2.1 1999/08/29 14:39:07 peter Exp
*/
/*
diff --git a/contrib/tcpdump/rx.h b/contrib/tcpdump/rx.h
index 1912e51..b79dd30 100644
--- a/contrib/tcpdump/rx.h
+++ b/contrib/tcpdump/rx.h
@@ -23,7 +23,7 @@
/*
* Rx protocol format
*
- * $Id: rx.h,v 1.8 2002/12/11 07:14:11 guy Exp $
+ * $Id: rx.h,v 1.8 2002-12-11 07:14:11 guy Exp $
*/
#define FS_RX_PORT 7000
diff --git a/contrib/tcpdump/sctpConstants.h b/contrib/tcpdump/sctpConstants.h
index f70226b..ac28a15 100644
--- a/contrib/tcpdump/sctpConstants.h
+++ b/contrib/tcpdump/sctpConstants.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/sctpConstants.h,v 1.4 2003/06/03 23:49:23 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/sctpConstants.h,v 1.4 2003-06-03 23:49:23 guy Exp $ (LBL) */
/* SCTP reference Implementation Copyright (C) 1999 Cisco And Motorola
*
diff --git a/contrib/tcpdump/sctpHeader.h b/contrib/tcpdump/sctpHeader.h
index 3b26094..63f30b5 100644
--- a/contrib/tcpdump/sctpHeader.h
+++ b/contrib/tcpdump/sctpHeader.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/sctpHeader.h,v 1.6 2002/12/11 07:14:11 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/sctpHeader.h,v 1.6 2002-12-11 07:14:11 guy Exp $ (LBL) */
/* SCTP reference Implementation Copyright (C) 1999 Cisco And Motorola
*
diff --git a/contrib/tcpdump/setsignal.c b/contrib/tcpdump/setsignal.c
index dbb8678..a4b59ce 100644
--- a/contrib/tcpdump/setsignal.c
+++ b/contrib/tcpdump/setsignal.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/setsignal.c,v 1.11 2003/11/16 09:36:42 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/setsignal.c,v 1.11 2003-11-16 09:36:42 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
diff --git a/contrib/tcpdump/setsignal.h b/contrib/tcpdump/setsignal.h
index a7fb2a7..cc8e86c 100644
--- a/contrib/tcpdump/setsignal.h
+++ b/contrib/tcpdump/setsignal.h
@@ -18,7 +18,7 @@
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/setsignal.h,v 1.2.1.1 1999/10/07 23:47:13 mcr Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/setsignal.h,v 1.2.1.1 1999-10-07 23:47:13 mcr Exp $ (LBL)
*/
#ifndef setsignal_h
#define setsignal_h
diff --git a/contrib/tcpdump/slcompress.h b/contrib/tcpdump/slcompress.h
index d8a596c..d10243a 100644
--- a/contrib/tcpdump/slcompress.h
+++ b/contrib/tcpdump/slcompress.h
@@ -1,7 +1,7 @@
/*
* Definitions for tcp compression routines.
*
- * @(#) $Header: /tcpdump/master/tcpdump/slcompress.h,v 1.2 2000/10/09 02:03:44 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/slcompress.h,v 1.2 2000-10-09 02:03:44 guy Exp $ (LBL)
*
* Copyright (c) 1989, 1990, 1992, 1993 Regents of the University of
* California. All rights reserved.
diff --git a/contrib/tcpdump/slip.h b/contrib/tcpdump/slip.h
index e64f301..aa6402c 100644
--- a/contrib/tcpdump/slip.h
+++ b/contrib/tcpdump/slip.h
@@ -2,7 +2,7 @@
* Definitions that user level programs might need to know to interact
* with serial line IP (slip) lines.
*
- * @(#) $Header: /tcpdump/master/tcpdump/slip.h,v 1.1 2000/10/09 01:53:21 guy Exp $
+ * @(#) $Header: /tcpdump/master/tcpdump/slip.h,v 1.1 2000-10-09 01:53:21 guy Exp $
*
* Copyright (c) 1990 Regents of the University of California.
* All rights reserved.
diff --git a/contrib/tcpdump/sll.h b/contrib/tcpdump/sll.h
index 693f05e..bad31e2 100644
--- a/contrib/tcpdump/sll.h
+++ b/contrib/tcpdump/sll.h
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#) $Header: /tcpdump/master/tcpdump/sll.h,v 1.7 2002/12/11 07:14:11 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/sll.h,v 1.7.6.1 2008-05-30 01:38:21 guy Exp $ (LBL)
*/
/*
@@ -64,8 +64,8 @@
* DO NOT change the layout of this structure, or change any of the
* LINUX_SLL_ values below. If you must change the link-layer header
* for a "cooked" Linux capture, introduce a new DLT_ type (ask
- * "tcpdump-workers@tcpdump.org" for one, so that you don't give it a
- * value that collides with a value already being used), and use the
+ * "tcpdump-workers@lists.tcpdump.org" for one, so that you don't give it
+ * a value that collides with a value already being used), and use the
* new header in captures of that type, so that programs that can
* handle DLT_LINUX_SLL captures will continue to handle them correctly
* without any change, and so that capture files with different headers
diff --git a/contrib/tcpdump/smb.h b/contrib/tcpdump/smb.h
index bb05227..8eeb303 100644
--- a/contrib/tcpdump/smb.h
+++ b/contrib/tcpdump/smb.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/smb.h,v 1.9 2004/12/28 22:29:44 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/smb.h,v 1.9 2004-12-28 22:29:44 guy Exp $ (LBL) */
/*
* Copyright (C) Andrew Tridgell 1995-1999
*
diff --git a/contrib/tcpdump/smbutil.c b/contrib/tcpdump/smbutil.c
index 86bcb4c..ba7ec31 100644
--- a/contrib/tcpdump/smbutil.c
+++ b/contrib/tcpdump/smbutil.c
@@ -12,7 +12,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/smbutil.c,v 1.36.2.3 2007/07/15 19:08:25 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/smbutil.c,v 1.39 2007-07-15 19:07:39 guy Exp $";
#endif
#include <tcpdump-stdinc.h>
diff --git a/contrib/tcpdump/strcasecmp.c b/contrib/tcpdump/strcasecmp.c
index aa6d007..f19ccf5 100644
--- a/contrib/tcpdump/strcasecmp.c
+++ b/contrib/tcpdump/strcasecmp.c
@@ -16,7 +16,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/strcasecmp.c,v 1.6 2003/11/16 09:36:43 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/strcasecmp.c,v 1.6 2003-11-16 09:36:43 guy Exp $";
#endif
#include <tcpdump-stdinc.h>
diff --git a/contrib/tcpdump/tcp.h b/contrib/tcpdump/tcp.h
index 5934cd6..db7dd44 100644
--- a/contrib/tcpdump/tcp.h
+++ b/contrib/tcpdump/tcp.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.11.2.1 2005/11/29 09:09:26 hannes Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/tcp.h,v 1.13.2.1 2007-12-09 00:31:35 guy Exp $ (LBL) */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
@@ -45,21 +45,25 @@ struct tcphdr {
tcp_seq th_seq; /* sequence number */
tcp_seq th_ack; /* acknowledgement number */
u_int8_t th_offx2; /* data offset, rsvd */
-#define TH_OFF(th) (((th)->th_offx2 & 0xf0) >> 4)
u_int8_t th_flags;
-#define TH_FIN 0x01
-#define TH_SYN 0x02
-#define TH_RST 0x04
-#define TH_PUSH 0x08
-#define TH_ACK 0x10
-#define TH_URG 0x20
-#define TH_ECNECHO 0x40 /* ECN Echo */
-#define TH_CWR 0x80 /* ECN Cwnd Reduced */
u_int16_t th_win; /* window */
u_int16_t th_sum; /* checksum */
u_int16_t th_urp; /* urgent pointer */
};
+#define TH_OFF(th) (((th)->th_offx2 & 0xf0) >> 4)
+
+/* TCP flags */
+#define TH_FIN 0x01
+#define TH_SYN 0x02
+#define TH_RST 0x04
+#define TH_PUSH 0x08
+#define TH_ACK 0x10
+#define TH_URG 0x20
+#define TH_ECNECHO 0x40 /* ECN Echo */
+#define TH_CWR 0x80 /* ECN Cwnd Reduced */
+
+
#define TCPOPT_EOL 0
#define TCPOPT_NOP 1
#define TCPOPT_MAXSEG 2
@@ -82,3 +86,23 @@ struct tcphdr {
#define TCPOPT_TSTAMP_HDR \
(TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP)
+
+#ifndef TELNET_PORT
+#define TELNET_PORT 23
+#endif
+#ifndef BGP_PORT
+#define BGP_PORT 179
+#endif
+#define NETBIOS_SSN_PORT 139
+#ifndef PPTP_PORT
+#define PPTP_PORT 1723
+#endif
+#define BEEP_PORT 10288
+#ifndef NFS_PORT
+#define NFS_PORT 2049
+#endif
+#define MSDP_PORT 639
+#define LDP_PORT 646
+#ifndef SMB_PORT
+#define SMB_PORT 445
+#endif
diff --git a/contrib/tcpdump/tcpdump-stdinc.h b/contrib/tcpdump/tcpdump-stdinc.h
index 4e599c3..5b10ef8 100644
--- a/contrib/tcpdump/tcpdump-stdinc.h
+++ b/contrib/tcpdump/tcpdump-stdinc.h
@@ -30,7 +30,7 @@
*
*
* $FreeBSD$
- * @(#) $Header: /tcpdump/master/tcpdump/tcpdump-stdinc.h,v 1.12.2.5 2006/06/23 02:07:27 hannes Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/tcpdump-stdinc.h,v 1.17 2006-05-19 17:55:34 hannes Exp $ (LBL)
*/
/*
diff --git a/contrib/tcpdump/tcpdump.1 b/contrib/tcpdump/tcpdump.1
index 8b70af2..1635ff6 100644
--- a/contrib/tcpdump/tcpdump.1
+++ b/contrib/tcpdump/tcpdump.1
@@ -1,4 +1,4 @@
-.\" @(#) $Header: /tcpdump/master/tcpdump/tcpdump.1,v 1.167.2.11 2007/06/15 20:13:49 guy Exp $ (LBL)
+.\" @(#) $Header: /tcpdump/master/tcpdump/tcpdump.1,v 1.185.2.6 2008-05-30 01:38:21 guy Exp $ (LBL)
.\"
.\" $NetBSD: tcpdump.8,v 1.9 2003/03/31 00:18:17 perry Exp $
.\"
@@ -24,14 +24,17 @@
.\"
.\" $FreeBSD$
.\"
-.TH TCPDUMP 1 "18 April 2005"
+.TH TCPDUMP 1 "07 January 2008"
.SH NAME
tcpdump \- dump traffic on a network
.SH SYNOPSIS
.na
.B tcpdump
[
-.B \-AdDeflLnNOpqRStuUvxX
+.B \-AdDefIKlLnNOpqRStuUvxX
+] [
+.B \-B
+.I buffer_size
] [
.B \-c
.I count
@@ -42,6 +45,9 @@ tcpdump \- dump traffic on a network
.B \-C
.I file_size
] [
+.B \-G
+.I rotate_seconds
+] [
.B \-F
.I file
]
@@ -96,6 +102,10 @@ tcpdump \- dump traffic on a network
.I datalinktype
]
[
+.B \-z
+.I postrotate-command
+]
+[
.B \-Z
.I user
]
@@ -178,87 +188,19 @@ default, so you must set it with
in order to use it) and will continue capturing packets.
.LP
Reading packets from a network interface may require that you have
-special privileges:
-.TP
-.B Under SunOS 3.x or 4.x with NIT or BPF:
-You must have read access to
-.I /dev/nit
-or
-.IR /dev/bpf* .
-.TP
-.B Under Solaris with DLPI:
-You must have read/write access to the network pseudo device, e.g.
-.IR /dev/le .
-On at least some versions of Solaris, however, this is not sufficient to
-allow
-.I tcpdump
-to capture in promiscuous mode; on those versions of Solaris, you must
-be root, or
-.I tcpdump
-must be installed setuid to root, in order to capture in promiscuous
-mode. Note that, on many (perhaps all) interfaces, if you don't capture
-in promiscuous mode, you will not see any outgoing packets, so a capture
-not done in promiscuous mode may not be very useful.
-.TP
-.B Under HP-UX with DLPI:
-You must be root or
-.I tcpdump
-must be installed setuid to root.
-.TP
-.B Under IRIX with snoop:
-You must be root or
-.I tcpdump
-must be installed setuid to root.
-.TP
-.B Under Linux:
-You must be root or
-.I tcpdump
-must be installed setuid to root (unless your distribution has a kernel
-that supports capability bits such as CAP_NET_RAW and code to allow
-those capability bits to be given to particular accounts and to cause
-those bits to be set on a user's initial processes when they log in, in
-which case you must have CAP_NET_RAW in order to capture and
-CAP_NET_ADMIN to enumerate network devices with, for example, the
-.B \-D
-flag).
-.TP
-.B Under ULTRIX and Digital UNIX/Tru64 UNIX:
-Any user may capture network traffic with
-.IR tcpdump .
-However, no user (not even the super-user) can capture in promiscuous
-mode on an interface unless the super-user has enabled promiscuous-mode
-operation on that interface using
-.IR pfconfig (8),
-and no user (not even the super-user) can capture unicast traffic
-received by or sent by the machine on an interface unless the super-user
-has enabled copy-all-mode operation on that interface using
-.IR pfconfig ,
-so
-.I useful
-packet capture on an interface probably requires that either
-promiscuous-mode or copy-all-mode operation, or both modes of
-operation, be enabled on that interface.
-.TP
-.B Under BSD (this includes Mac OS X):
-You must have read access to
-.I /dev/bpf*
-on systems that don't have a cloning BPF device, or to
-.I /dev/bpf
-on systems that do.
-On BSDs with a devfs (this includes Mac OS X), this might involve more
-than just having somebody with super-user access setting the ownership
-or permissions on the BPF devices - it might involve configuring devfs
-to set the ownership or permissions every time the system is booted,
-if the system even supports that; if it doesn't support that, you might
-have to find some other way to make that happen at boot time.
-.LP
-Reading a saved packet file doesn't require special privileges.
+special privileges; see the
+.B pcap (3PCAP)
+man page for details. Reading a saved packet file doesn't require
+special privileges.
.SH OPTIONS
.TP
.B \-A
Print each packet (minus its link level header) in ASCII. Handy for
capturing web pages.
.TP
+.B \-B
+Set the operating system capture buffer size to \fIbuffer_size\fP.
+.TP
.B \-c
Exit after receiving \fIcount\fP packets.
.TP
@@ -366,6 +308,20 @@ correctly.
Use \fIfile\fP as input for the filter expression.
An additional expression given on the command line is ignored.
.TP
+.B \-G
+If specified, rotates the dump file specified with the
+.B \-w
+option every \fIrotate_seconds\fP seconds.
+Savefiles will have the name specified by
+.B \-w
+which should include a time format as defined by
+.BR strftime (3).
+If no time format is specified, each new file will overwrite the previous.
+.IP
+If used in conjunction with the
+.B \-C
+option, filenames will take the form of `\fIfile\fP<count>'.
+.TP
.B \-i
Listen on \fIinterface\fP.
If unspecified, \fItcpdump\fP searches the system interface list for the
@@ -385,6 +341,22 @@ used as the
.I interface
argument.
.TP
+.B \-I
+Put the interface in "monitor mode"; this is supported only on IEEE
+802.11 Wi-Fi interfaces, and supported only on some operating systems.
+.IP
+Note that in monitor mode the adapter might disassociate from the
+network with which it's associated, so that you will not be able to use
+any wireless networks with that adapter. This could prevent accessing
+files on a network server, or resolving host names or network addresses,
+if you are capturing in monitor mode and are not connected to another
+network with another adapter.
+.TP
+.B \-K
+Don't attempt to verify TCP checksums. This is useful for interfaces
+that perform the TCP checksum calculation in hardware; otherwise,
+all outgoing TCP checksums will be flagged as bad.
+.TP
.B \-l
Make stdout line buffered.
Useful if you want to see the data
@@ -488,12 +460,16 @@ and
Print an unformatted timestamp on each dump line.
.TP
.B \-ttt
-Print a delta (in micro-seconds) between current and previous line
+Print a delta (micro-second resolution) between current and previous line
on each dump line.
.TP
.B \-tttt
Print a timestamp in default format proceeded by date on each dump line.
.TP
+.B \-ttttt
+Print a delta (micro-second resolution) between current and first line
+on each dump line.
+.TP
.B \-u
Print undecoded NFS handles.
.TP
@@ -554,6 +530,13 @@ from the beginning, thus creating a 'rotating' buffer.
In addition, it will name
the files with enough leading 0s to support the maximum number of
files, allowing them to sort correctly.
+.IP
+Used in conjunction with the
+.B \-G
+option, this will limit the number of rotated dump files that get
+created, exiting with status 0 when reaching the limit. If used with
+.B \-C
+as well, the behavior will result in cyclical files per timeslice.
.TP
.B \-x
When parsing and printing,
@@ -589,6 +572,31 @@ its link level header, in hex and ASCII.
.B \-y
Set the data link type to use while capturing packets to \fIdatalinktype\fP.
.TP
+.B \-z
+Used in conjunction with the
+.B -C
+or
+.B -G
+options, this will make
+.I tcpdump
+run "
+.I command file
+" where
+.I file
+is the savefile being closed after each rotation. For example, specifying
+.B \-z gzip
+or
+.B \-z bzip2
+will compress each savefile using gzip or bzip2.
+.IP
+Note that tcpdump will run the command in parallel to the capture, using
+the lowest priority so that this doesn't disturb the capture process.
+.IP
+And in case you would like to use a command that itself takes flags or
+different arguments, you can always write a shell script that will take the
+savefile name as the only argument, make the flags & arguments arrangements
+and execute the command that you want.
+.TP
.B \-Z
Drops privileges (if root) and changes user ID to
.I user
@@ -604,687 +612,8 @@ is given, all packets on the net will be dumped.
Otherwise,
only packets for which \fIexpression\fP is `true' will be dumped.
.LP
-The \fIexpression\fP consists of one or more
-.I primitives.
-Primitives usually consist of an
-.I id
-(name or number) preceded by one or more qualifiers.
-There are three
-different kinds of qualifier:
-.IP \fItype\fP
-qualifiers say what kind of thing the id name or number refers to.
-Possible types are
-.BR host ,
-.B net ,
-.B port
-and
-.BR portrange .
-E.g., `host foo', `net 128.3', `port 20', `portrange 6000-6008'.
-If there is no type
-qualifier,
-.B host
-is assumed.
-.IP \fIdir\fP
-qualifiers specify a particular transfer direction to and/or from
-.IR id .
-Possible directions are
-.BR src ,
-.BR dst ,
-.B "src or dst"
-and
-.B "src and"
-.BR dst .
-E.g., `src foo', `dst net 128.3', `src or dst port ftp-data'.
-If
-there is no dir qualifier,
-.B "src or dst"
-is assumed.
-For some link layers, such as SLIP and the ``cooked'' Linux capture mode
-used for the ``any'' device and for some other device types, the
-.B inbound
-and
-.B outbound
-qualifiers can be used to specify a desired direction.
-.IP \fIproto\fP
-qualifiers restrict the match to a particular protocol.
-Possible
-protos are:
-.BR ether ,
-.BR fddi ,
-.BR tr ,
-.BR wlan ,
-.BR ip ,
-.BR ip6 ,
-.BR arp ,
-.BR rarp ,
-.BR decnet ,
-.BR lat ,
-.BR sca ,
-.BR moprc ,
-.BR mopdl ,
-.BR iso ,
-.BR esis ,
-.BR isis ,
-.BR icmp ,
-.BR icmp6 ,
-.B tcp
-and
-.BR udp .
-E.g., `ether src foo', `arp net 128.3', `tcp port 21', `udp portrange
-7000-7009'.
-If there is
-no proto qualifier, all protocols consistent with the type are
-assumed.
-E.g., `src foo' means `(ip or arp or rarp) src foo'
-(except the latter is not legal syntax), `net bar' means `(ip or
-arp or rarp) net bar' and `port 53' means `(tcp or udp) port 53'.
-.LP
-[`fddi' is actually an alias for `ether'; the parser treats them
-identically as meaning ``the data link level used on the specified
-network interface.'' FDDI headers contain Ethernet-like source
-and destination addresses, and often contain Ethernet-like packet
-types, so you can filter on these FDDI fields just as with the
-analogous Ethernet fields.
-FDDI headers also contain other fields,
-but you cannot name them explicitly in a filter expression.
-.LP
-Similarly, `tr' and `wlan' are aliases for `ether'; the previous
-paragraph's statements about FDDI headers also apply to Token Ring
-and 802.11 wireless LAN headers. For 802.11 headers, the destination
-address is the DA field and the source address is the SA field; the
-BSSID, RA, and TA fields aren't tested.]
-.LP
-In addition to the above, there are some special `primitive' keywords
-that don't follow the pattern:
-.BR gateway ,
-.BR broadcast ,
-.BR less ,
-.B greater
-and arithmetic expressions.
-All of these are described below.
-.LP
-More complex filter expressions are built up by using the words
-.BR and ,
-.B or
-and
-.B not
-to combine primitives.
-E.g., `host foo and not port ftp and not port ftp-data'.
-To save typing, identical qualifier lists can be omitted.
-E.g.,
-`tcp dst port ftp or ftp-data or domain' is exactly the same as
-`tcp dst port ftp or tcp dst port ftp-data or tcp dst port domain'.
-.LP
-Allowable primitives are:
-.IP "\fBdst host \fIhost\fR"
-True if the IPv4/v6 destination field of the packet is \fIhost\fP,
-which may be either an address or a name.
-.IP "\fBsrc host \fIhost\fR"
-True if the IPv4/v6 source field of the packet is \fIhost\fP.
-.IP "\fBhost \fIhost\fP
-True if either the IPv4/v6 source or destination of the packet is \fIhost\fP.
-.IP
-Any of the above host expressions can be prepended with the keywords,
-\fBip\fP, \fBarp\fP, \fBrarp\fP, or \fBip6\fP as in:
-.in +.5i
-.nf
-\fBip host \fIhost\fR
-.fi
-.in -.5i
-which is equivalent to:
-.in +.5i
-.nf
-\fBether proto \fI\\ip\fB and host \fIhost\fR
-.fi
-.in -.5i
-If \fIhost\fR is a name with multiple IP addresses, each address will
-be checked for a match.
-.IP "\fBether dst \fIehost\fP
-True if the Ethernet destination address is \fIehost\fP.
-\fIEhost\fP
-may be either a name from /etc/ethers or a number (see
-.IR ethers (3N)
-for numeric format).
-.IP "\fBether src \fIehost\fP
-True if the Ethernet source address is \fIehost\fP.
-.IP "\fBether host \fIehost\fP
-True if either the Ethernet source or destination address is \fIehost\fP.
-.IP "\fBgateway\fP \fIhost\fP
-True if the packet used \fIhost\fP as a gateway.
-I.e., the Ethernet
-source or destination address was \fIhost\fP but neither the IP source
-nor the IP destination was \fIhost\fP.
-\fIHost\fP must be a name and
-must be found both by the machine's host-name-to-IP-address resolution
-mechanisms (host name file, DNS, NIS, etc.) and by the machine's
-host-name-to-Ethernet-address resolution mechanism (/etc/ethers, etc.).
-(An equivalent expression is
-.in +.5i
-.nf
-\fBether host \fIehost \fBand not host \fIhost\fR
-.fi
-.in -.5i
-which can be used with either names or numbers for \fIhost / ehost\fP.)
-This syntax does not work in IPv6-enabled configuration at this moment.
-.IP "\fBdst net \fInet\fR"
-True if the IPv4/v6 destination address of the packet has a network
-number of \fInet\fP.
-\fINet\fP may be either a name from the networks database
-(/etc/networks, etc.) or a network number.
-An IPv4 network number can be written as a dotted quad (e.g., 192.168.1.0),
-dotted triple (e.g., 192.168.1), dotted pair (e.g, 172.16), or single
-number (e.g., 10); the netmask is 255.255.255.255 for a dotted quad
-(which means that it's really a host match), 255.255.255.0 for a dotted
-triple, 255.255.0.0 for a dotted pair, or 255.0.0.0 for a single number.
-An IPv6 network number must be written out fully; the netmask is
-ff:ff:ff:ff:ff:ff:ff:ff, so IPv6 "network" matches are really always
-host matches, and a network match requires a netmask length.
-.IP "\fBsrc net \fInet\fR"
-True if the IPv4/v6 source address of the packet has a network
-number of \fInet\fP.
-.IP "\fBnet \fInet\fR"
-True if either the IPv4/v6 source or destination address of the packet has a network
-number of \fInet\fP.
-.IP "\fBnet \fInet\fR \fBmask \fInetmask\fR"
-True if the IPv4 address matches \fInet\fR with the specific \fInetmask\fR.
-May be qualified with \fBsrc\fR or \fBdst\fR.
-Note that this syntax is not valid for IPv6 \fInet\fR.
-.IP "\fBnet \fInet\fR/\fIlen\fR"
-True if the IPv4/v6 address matches \fInet\fR with a netmask \fIlen\fR
-bits wide.
-May be qualified with \fBsrc\fR or \fBdst\fR.
-.IP "\fBdst port \fIport\fR"
-True if the packet is ip/tcp, ip/udp, ip6/tcp or ip6/udp and has a
-destination port value of \fIport\fP.
-The \fIport\fP can be a number or a name used in /etc/services (see
-.IR tcp (4P)
-and
-.IR udp (4P)).
-If a name is used, both the port
-number and protocol are checked.
-If a number or ambiguous name is used,
-only the port number is checked (e.g., \fBdst port 513\fR will print both
-tcp/login traffic and udp/who traffic, and \fBport domain\fR will print
-both tcp/domain and udp/domain traffic).
-.IP "\fBsrc port \fIport\fR"
-True if the packet has a source port value of \fIport\fP.
-.IP "\fBport \fIport\fR"
-True if either the source or destination port of the packet is \fIport\fP.
-.IP "\fBdst portrange \fIport1\fB-\fIport2\fR"
-True if the packet is ip/tcp, ip/udp, ip6/tcp or ip6/udp and has a
-destination port value between \fIport1\fP and \fIport2\fP.
-.I port1
-and
-.I port2
-are interpreted in the same fashion as the
-.I port
-parameter for
-.BR port .
-.IP "\fBsrc portrange \fIport1\fB-\fIport2\fR"
-True if the packet has a source port value between \fIport1\fP and
-\fIport2\fP.
-.IP "\fBportrange \fIport1\fB-\fIport2\fR"
-True if either the source or destination port of the packet is between
-\fIport1\fP and \fIport2\fP.
-.IP
-Any of the above port or port range expressions can be prepended with
-the keywords, \fBtcp\fP or \fBudp\fP, as in:
-.in +.5i
-.nf
-\fBtcp src port \fIport\fR
-.fi
-.in -.5i
-which matches only tcp packets whose source port is \fIport\fP.
-.IP "\fBless \fIlength\fR"
-True if the packet has a length less than or equal to \fIlength\fP.
-This is equivalent to:
-.in +.5i
-.nf
-\fBlen <= \fIlength\fP.
-.fi
-.in -.5i
-.IP "\fBgreater \fIlength\fR"
-True if the packet has a length greater than or equal to \fIlength\fP.
-This is equivalent to:
-.in +.5i
-.nf
-\fBlen >= \fIlength\fP.
-.fi
-.in -.5i
-.IP "\fBip proto \fIprotocol\fR"
-True if the packet is an IPv4 packet (see
-.IR ip (4P))
-of protocol type \fIprotocol\fP.
-\fIProtocol\fP can be a number or one of the names
-\fBicmp\fP, \fBicmp6\fP, \fBigmp\fP, \fBigrp\fP, \fBpim\fP, \fBah\fP,
-\fBesp\fP, \fBvrrp\fP, \fBudp\fP, or \fBtcp\fP.
-Note that the identifiers \fBtcp\fP, \fBudp\fP, and \fBicmp\fP are also
-keywords and must be escaped via backslash (\\), which is \\\\ in the C-shell.
-Note that this primitive does not chase the protocol header chain.
-.IP "\fBip6 proto \fIprotocol\fR"
-True if the packet is an IPv6 packet of protocol type \fIprotocol\fP.
-Note that this primitive does not chase the protocol header chain.
-.IP "\fBip6 protochain \fIprotocol\fR"
-True if the packet is IPv6 packet,
-and contains protocol header with type \fIprotocol\fR
-in its protocol header chain.
-For example,
-.in +.5i
-.nf
-\fBip6 protochain 6\fR
-.fi
-.in -.5i
-matches any IPv6 packet with TCP protocol header in the protocol header chain.
-The packet may contain, for example,
-authentication header, routing header, or hop-by-hop option header,
-between IPv6 header and TCP header.
-The BPF code emitted by this primitive is complex and
-cannot be optimized by BPF optimizer code in \fItcpdump\fP,
-so this can be somewhat slow.
-.IP "\fBip protochain \fIprotocol\fR"
-Equivalent to \fBip6 protochain \fIprotocol\fR, but this is for IPv4.
-.IP "\fBether broadcast\fR"
-True if the packet is an Ethernet broadcast packet.
-The \fIether\fP
-keyword is optional.
-.IP "\fBip broadcast\fR"
-True if the packet is an IPv4 broadcast packet.
-It checks for both the all-zeroes and all-ones broadcast conventions,
-and looks up the subnet mask on the interface on which the capture is
-being done.
-.IP
-If the subnet mask of the interface on which the capture is being done
-is not available, either because the interface on which capture is being
-done has no netmask or because the capture is being done on the Linux
-"any" interface, which can capture on more than one interface, this
-check will not work correctly.
-.IP "\fBether multicast\fR"
-True if the packet is an Ethernet multicast packet.
-The \fBether\fP
-keyword is optional.
-This is shorthand for `\fBether[0] & 1 != 0\fP'.
-.IP "\fBip multicast\fR"
-True if the packet is an IPv4 multicast packet.
-.IP "\fBip6 multicast\fR"
-True if the packet is an IPv6 multicast packet.
-.IP "\fBether proto \fIprotocol\fR"
-True if the packet is of ether type \fIprotocol\fR.
-\fIProtocol\fP can be a number or one of the names
-\fBip\fP, \fBip6\fP, \fBarp\fP, \fBrarp\fP, \fBatalk\fP, \fBaarp\fP,
-\fBdecnet\fP, \fBsca\fP, \fBlat\fP, \fBmopdl\fP, \fBmoprc\fP,
-\fBiso\fP, \fBstp\fP, \fBipx\fP, or \fBnetbeui\fP.
-Note these identifiers are also keywords
-and must be escaped via backslash (\\).
-.IP
-[In the case of FDDI (e.g., `\fBfddi protocol arp\fR'), Token Ring
-(e.g., `\fBtr protocol arp\fR'), and IEEE 802.11 wireless LANS (e.g.,
-`\fBwlan protocol arp\fR'), for most of those protocols, the
-protocol identification comes from the 802.2 Logical Link Control (LLC)
-header, which is usually layered on top of the FDDI, Token Ring, or
-802.11 header.
-.IP
-When filtering for most protocol identifiers on FDDI, Token Ring, or
-802.11, \fItcpdump\fR checks only the protocol ID field of an LLC header
-in so-called SNAP format with an Organizational Unit Identifier (OUI) of
-0x000000, for encapsulated Ethernet; it doesn't check whether the packet
-is in SNAP format with an OUI of 0x000000.
-The exceptions are:
-.RS
-.TP
-\fBiso\fP
-\fItcpdump\fR checks the DSAP (Destination Service Access Point) and
-SSAP (Source Service Access Point) fields of the LLC header;
-.TP
-\fBstp\fP and \fBnetbeui\fP
-\fItcpdump\fR checks the DSAP of the LLC header;
-.TP
-\fBatalk\fP
-\fItcpdump\fR checks for a SNAP-format packet with an OUI of 0x080007
-and the AppleTalk etype.
-.RE
-.IP
-In the case of Ethernet, \fItcpdump\fR checks the Ethernet type field
-for most of those protocols. The exceptions are:
-.RS
-.TP
-\fBiso\fP, \fBstp\fP, and \fBnetbeui\fP
-\fItcpdump\fR checks for an 802.3 frame and then checks the LLC header as
-it does for FDDI, Token Ring, and 802.11;
-.TP
-\fBatalk\fP
-\fItcpdump\fR checks both for the AppleTalk etype in an Ethernet frame and
-for a SNAP-format packet as it does for FDDI, Token Ring, and 802.11;
-.TP
-\fBaarp\fP
-\fItcpdump\fR checks for the AppleTalk ARP etype in either an Ethernet
-frame or an 802.2 SNAP frame with an OUI of 0x000000;
-.TP
-\fBipx\fP
-\fItcpdump\fR checks for the IPX etype in an Ethernet frame, the IPX
-DSAP in the LLC header, the 802.3-with-no-LLC-header encapsulation of
-IPX, and the IPX etype in a SNAP frame.
-.RE
-.IP "\fBdecnet src \fIhost\fR"
-True if the DECNET source address is
-.IR host ,
-which may be an address of the form ``10.123'', or a DECNET host
-name.
-[DECNET host name support is only available on ULTRIX systems
-that are configured to run DECNET.]
-.IP "\fBdecnet dst \fIhost\fR"
-True if the DECNET destination address is
-.IR host .
-.IP "\fBdecnet host \fIhost\fR"
-True if either the DECNET source or destination address is
-.IR host .
-.IP "\fBifname \fIinterface\fR"
-True if the packet was logged as coming from the specified interface (applies
-only to packets logged by OpenBSD's
-.BR pf (4)).
-.IP "\fBon \fIinterface\fR"
-Synonymous with the
-.B ifname
-modifier.
-.IP "\fBrnr \fInum\fR"
-True if the packet was logged as matching the specified PF rule number
-(applies only to packets logged by OpenBSD's
-.BR pf (4)).
-.IP "\fBrulenum \fInum\fR"
-Synonomous with the
-.B rnr
-modifier.
-.IP "\fBreason \fIcode\fR"
-True if the packet was logged with the specified PF reason code. The known
-codes are:
-.BR match ,
-.BR bad-offset ,
-.BR fragment ,
-.BR short ,
-.BR normalize ,
-and
-.B memory
-(applies only to packets logged by OpenBSD's
-.BR pf (4)).
-.IP "\fBrset \fIname\fR"
-True if the packet was logged as matching the specified PF ruleset
-name of an anchored ruleset (applies only to packets logged by
-.BR pf (4)).
-.IP "\fBruleset \fIname\fR"
-Synonomous with the
-.B rset
-modifier.
-.IP "\fBsrnr \fInum\fR"
-True if the packet was logged as matching the specified PF rule number
-of an anchored ruleset (applies only to packets logged by
-.BR pf (4)).
-.IP "\fBsubrulenum \fInum\fR"
-Synonomous with the
-.B srnr
-modifier.
-.IP "\fBaction \fIact\fR"
-True if PF took the specified action when the packet was logged. Known actions
-are:
-.B pass
-and
-.B block
-(applies only to packets logged by OpenBSD's
-.BR pf (4)).
-.IP "\fBip\fR, \fBip6\fR, \fBarp\fR, \fBrarp\fR, \fBatalk\fR, \fBaarp\fR, \fBdecnet\fR, \fBiso\fR, \fBstp\fR, \fBipx\fR, \fInetbeui\fP"
-Abbreviations for:
-.in +.5i
-.nf
-\fBether proto \fIp\fR
-.fi
-.in -.5i
-where \fIp\fR is one of the above protocols.
-.IP "\fBlat\fR, \fBmoprc\fR, \fBmopdl\fR"
-Abbreviations for:
-.in +.5i
-.nf
-\fBether proto \fIp\fR
-.fi
-.in -.5i
-where \fIp\fR is one of the above protocols.
-Note that
-\fItcpdump\fP does not currently know how to parse these protocols.
-.IP "\fBvlan \fI[vlan_id]\fR"
-True if the packet is an IEEE 802.1Q VLAN packet.
-If \fI[vlan_id]\fR is specified, only true if the packet has the specified
-\fIvlan_id\fR.
-Note that the first \fBvlan\fR keyword encountered in \fIexpression\fR
-changes the decoding offsets for the remainder of \fIexpression\fR on
-the assumption that the packet is a VLAN packet. The \fBvlan
-\fI[vlan_id]\fR expression may be used more than once, to filter on VLAN
-hierarchies. Each use of that expression increments the filter offsets
-by 4.
-.IP
-For example:
-.in +.5i
-.nf
-\fBvlan 100 && vlan 200\fR
-.fi
-.in -.5i
-filters on VLAN 200 encapsulated within VLAN 100, and
-.in +.5i
-.nf
-\fBvlan && vlan 300 && ip\fR
-.fi
-.in -.5i
-filters IPv4 protocols encapsulated in VLAN 300 encapsulated within any
-higher order VLAN.
-.IP "\fBmpls \fI[label_num]\fR"
-True if the packet is an MPLS packet.
-If \fI[label_num]\fR is specified, only true is the packet has the specified
-\fIlabel_num\fR.
-Note that the first \fBmpls\fR keyword encountered in \fIexpression\fR
-changes the decoding offsets for the remainder of \fIexpression\fR on
-the assumption that the packet is a MPLS-encapsulated IP packet. The
-\fBmpls \fI[label_num]\fR expression may be used more than once, to
-filter on MPLS hierarchies. Each use of that expression increments the
-filter offsets by 4.
-.IP
-For example:
-.in +.5i
-.nf
-\fBmpls 100000 && mpls 1024\fR
-.fi
-.in -.5i
-filters packets with an outer label of 100000 and an inner label of
-1024, and
-.in +.5i
-.nf
-\fBmpls && mpls 1024 && host 192.9.200.1\fR
-.fi
-.in -.5i
-filters packets to or from 192.9.200.1 with an inner label of 1024 and
-any outer label.
-.IP \fBpppoed\fP
-True if the packet is a PPP-over-Ethernet Discovery packet (Ethernet
-type 0x8863).
-.IP \fBpppoes\fP
-True if the packet is a PPP-over-Ethernet Session packet (Ethernet
-type 0x8864).
-Note that the first \fBpppoes\fR keyword encountered in \fIexpression\fR
-changes the decoding offsets for the remainder of \fIexpression\fR on
-the assumption that the packet is a PPPoE session packet.
-.IP
-For example:
-.in +.5i
-.nf
-\fBpppoes && ip\fR
-.fi
-.in -.5i
-filters IPv4 protocols encapsulated in PPPoE.
-.IP "\fBtcp\fR, \fBudp\fR, \fBicmp\fR"
-Abbreviations for:
-.in +.5i
-.nf
-\fBip proto \fIp\fR\fB or ip6 proto \fIp\fR
-.fi
-.in -.5i
-where \fIp\fR is one of the above protocols.
-.IP "\fBiso proto \fIprotocol\fR"
-True if the packet is an OSI packet of protocol type \fIprotocol\fP.
-\fIProtocol\fP can be a number or one of the names
-\fBclnp\fP, \fBesis\fP, or \fBisis\fP.
-.IP "\fBclnp\fR, \fBesis\fR, \fBisis\fR"
-Abbreviations for:
-.in +.5i
-.nf
-\fBiso proto \fIp\fR
-.fi
-.in -.5i
-where \fIp\fR is one of the above protocols.
-.IP "\fBl1\fR, \fBl2\fR, \fBiih\fR, \fBlsp\fR, \fBsnp\fR, \fBcsnp\fR, \fBpsnp\fR"
-Abbreviations for IS-IS PDU types.
-.IP "\fBvpi\fP \fIn\fR
-True if the packet is an ATM packet, for SunATM on Solaris, with a
-virtual path identifier of
-.IR n .
-.IP "\fBvci\fP \fIn\fR
-True if the packet is an ATM packet, for SunATM on Solaris, with a
-virtual channel identifier of
-.IR n .
-.IP \fBlane\fP
-True if the packet is an ATM packet, for SunATM on Solaris, and is
-an ATM LANE packet.
-Note that the first \fBlane\fR keyword encountered in \fIexpression\fR
-changes the tests done in the remainder of \fIexpression\fR
-on the assumption that the packet is either a LANE emulated Ethernet
-packet or a LANE LE Control packet. If \fBlane\fR isn't specified, the
-tests are done under the assumption that the packet is an
-LLC-encapsulated packet.
-.IP \fBllc\fP
-True if the packet is an ATM packet, for SunATM on Solaris, and is
-an LLC-encapsulated packet.
-.IP \fBoamf4s\fP
-True if the packet is an ATM packet, for SunATM on Solaris, and is
-a segment OAM F4 flow cell (VPI=0 & VCI=3).
-.IP \fBoamf4e\fP
-True if the packet is an ATM packet, for SunATM on Solaris, and is
-an end-to-end OAM F4 flow cell (VPI=0 & VCI=4).
-.IP \fBoamf4\fP
-True if the packet is an ATM packet, for SunATM on Solaris, and is
-a segment or end-to-end OAM F4 flow cell (VPI=0 & (VCI=3 | VCI=4)).
-.IP \fBoam\fP
-True if the packet is an ATM packet, for SunATM on Solaris, and is
-a segment or end-to-end OAM F4 flow cell (VPI=0 & (VCI=3 | VCI=4)).
-.IP \fBmetac\fP
-True if the packet is an ATM packet, for SunATM on Solaris, and is
-on a meta signaling circuit (VPI=0 & VCI=1).
-.IP \fBbcc\fP
-True if the packet is an ATM packet, for SunATM on Solaris, and is
-on a broadcast signaling circuit (VPI=0 & VCI=2).
-.IP \fBsc\fP
-True if the packet is an ATM packet, for SunATM on Solaris, and is
-on a signaling circuit (VPI=0 & VCI=5).
-.IP \fBilmic\fP
-True if the packet is an ATM packet, for SunATM on Solaris, and is
-on an ILMI circuit (VPI=0 & VCI=16).
-.IP \fBconnectmsg\fP
-True if the packet is an ATM packet, for SunATM on Solaris, and is
-on a signaling circuit and is a Q.2931 Setup, Call Proceeding, Connect,
-Connect Ack, Release, or Release Done message.
-.IP \fBmetaconnect\fP
-True if the packet is an ATM packet, for SunATM on Solaris, and is
-on a meta signaling circuit and is a Q.2931 Setup, Call Proceeding, Connect,
-Release, or Release Done message.
-.IP "\fIexpr relop expr\fR"
-True if the relation holds, where \fIrelop\fR is one of >, <, >=, <=, =,
-!=, and \fIexpr\fR is an arithmetic expression composed of integer
-constants (expressed in standard C syntax), the normal binary operators
-[+, -, *, /, &, |, <<, >>], a length operator, and special packet data
-accessors. Note that all comparisons are unsigned, so that, for example,
-0x80000000 and 0xffffffff are > 0.
-To access
-data inside the packet, use the following syntax:
-.in +.5i
-.nf
-\fIproto\fB [ \fIexpr\fB : \fIsize\fB ]\fR
-.fi
-.in -.5i
-\fIProto\fR is one of \fBether, fddi, tr, wlan, ppp, slip, link,
-ip, arp, rarp, tcp, udp, icmp, ip6\fR or \fBradio\fR, and
-indicates the protocol layer for the index operation.
-(\fBether, fddi, wlan, tr, ppp, slip\fR and \fBlink\fR all refer to the
-link layer. \fBradio\fR refers to the "radio header" added to some
-802.11 captures.)
-Note that \fItcp, udp\fR and other upper-layer protocol types only
-apply to IPv4, not IPv6 (this will be fixed in the future).
-The byte offset, relative to the indicated protocol layer, is
-given by \fIexpr\fR.
-\fISize\fR is optional and indicates the number of bytes in the
-field of interest; it can be either one, two, or four, and defaults to one.
-The length operator, indicated by the keyword \fBlen\fP, gives the
-length of the packet.
-
-For example, `\fBether[0] & 1 != 0\fP' catches all multicast traffic.
-The expression `\fBip[0] & 0xf != 5\fP'
-catches all IPv4 packets with options.
-The expression
-`\fBip[6:2] & 0x1fff = 0\fP'
-catches only unfragmented IPv4 datagrams and frag zero of fragmented
-IPv4 datagrams.
-This check is implicitly applied to the \fBtcp\fP and \fBudp\fP
-index operations.
-For instance, \fBtcp[0]\fP always means the first
-byte of the TCP \fIheader\fP, and never means the first byte of an
-intervening fragment.
-
-Some offsets and field values may be expressed as names rather than
-as numeric values.
-The following protocol header field offsets are
-available: \fBicmptype\fP (ICMP type field), \fBicmpcode\fP (ICMP
-code field), and \fBtcpflags\fP (TCP flags field).
-
-The following ICMP type field values are available: \fBicmp-echoreply\fP,
-\fBicmp-unreach\fP, \fBicmp-sourcequench\fP, \fBicmp-redirect\fP,
-\fBicmp-echo\fP, \fBicmp-routeradvert\fP, \fBicmp-routersolicit\fP,
-\fBicmp-timxceed\fP, \fBicmp-paramprob\fP, \fBicmp-tstamp\fP,
-\fBicmp-tstampreply\fP, \fBicmp-ireq\fP, \fBicmp-ireqreply\fP,
-\fBicmp-maskreq\fP, \fBicmp-maskreply\fP.
-
-The following TCP flags field values are available: \fBtcp-fin\fP,
-\fBtcp-syn\fP, \fBtcp-rst\fP, \fBtcp-push\fP,
-\fBtcp-ack\fP, \fBtcp-urg\fP.
-.LP
-Primitives may be combined using:
-.IP
-A parenthesized group of primitives and operators
-(parentheses are special to the Shell and must be escaped).
-.IP
-Negation (`\fB!\fP' or `\fBnot\fP').
-.IP
-Concatenation (`\fB&&\fP' or `\fBand\fP').
-.IP
-Alternation (`\fB||\fP' or `\fBor\fP').
-.LP
-Negation has highest precedence.
-Alternation and concatenation have equal precedence and associate
-left to right.
-Note that explicit \fBand\fR tokens, not juxtaposition,
-are now required for concatenation.
-.LP
-If an identifier is given without a keyword, the most recent keyword
-is assumed.
-For example,
-.in +.5i
-.nf
-\fBnot host vs and ace\fR
-.fi
-.in -.5i
-is short for
-.in +.5i
-.nf
-\fBnot host vs and host ace\fR
-.fi
-.in -.5i
-which should not be confused with
-.in +.5i
-.nf
-\fBnot ( host vs or ace )\fR
-.fi
-.in -.5i
+For the \fIexpression\fP syntax, see
+.BR pcap-filter (4).
.LP
Expression arguments can be passed to \fItcpdump\fP as either a single
argument or as multiple arguments, whichever is more convenient.
@@ -2288,7 +1617,7 @@ is made to account for the time lag between when the
Ethernet interface removed the packet from the wire and when the kernel
serviced the `new packet' interrupt.
.SH "SEE ALSO"
-bpf(4), pcap(3)
+stty(1), pcap(3PCAP), pcap-filter(4), bpf(4), nit(4P)
.SH AUTHORS
The original authors are:
.LP
@@ -2312,18 +1641,13 @@ The original distribution is available via anonymous ftp:
.RE
.LP
IPv6/IPsec support is added by WIDE/KAME project.
-This program uses Eric Young's SSLeay library, under specific configuration.
+This program uses Eric Young's SSLeay library, under specific configurations.
.SH BUGS
-Please send problems, bugs, questions, desirable enhancements, etc. to:
-.LP
-.RS
-tcpdump-workers@tcpdump.org
-.RE
-.LP
-Please send source code contributions, etc. to:
+Please send problems, bugs, questions, desirable enhancements, patches
+etc. to:
.LP
.RS
-patches@tcpdump.org
+tcpdump-workers@lists.tcpdump.org
.RE
.LP
NIT doesn't let you watch your own outbound traffic, BPF will.
diff --git a/contrib/tcpdump/tcpdump.c b/contrib/tcpdump/tcpdump.c
index e45ab23..f19878b 100644
--- a/contrib/tcpdump/tcpdump.c
+++ b/contrib/tcpdump/tcpdump.c
@@ -30,7 +30,7 @@ static const char copyright[] _U_ =
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
The Regents of the University of California. All rights reserved.\n";
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.253.2.13 2007/09/12 19:48:51 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.271.2.11 2008-09-25 21:50:04 guy Exp $ (LBL)";
#endif
/* $FreeBSD$ */
@@ -67,12 +67,16 @@ extern int SIZE_BUF;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <limits.h>
#ifndef WIN32
+#include <sys/wait.h>
+#include <sys/resource.h>
#include <pwd.h>
#include <grp.h>
#include <errno.h>
#endif /* WIN32 */
+
#include "netdissect.h"
#include "interface.h"
#include "addrtoname.h"
@@ -81,19 +85,16 @@ extern int SIZE_BUF;
#include "gmt2local.h"
#include "pcap-missing.h"
+#ifndef NAME_MAX
+#define NAME_MAX 255
+#endif
+
netdissect_options Gndo;
netdissect_options *gndo = &Gndo;
-/*
- * Define the maximum number of files for the -C flag, and how many
- * characters can be added to a filename for the -C flag (which
- * should be enough to handle MAX_CFLAG - 1).
- */
-#define MAX_CFLAG 1000000
-#define MAX_CFLAG_CHARS 6
-
int dflag; /* print filter code */
int Lflag; /* list available data link types and exit */
+char *zflag = NULL; /* compress each savefile using a specified command (like gzip or bzip2) */
static int infodelay;
static int infoprint;
@@ -104,6 +105,7 @@ int32_t thiszone; /* seconds offset from gmt to local time */
/* Forwards */
static RETSIGTYPE cleanup(int);
+static RETSIGTYPE child_cleanup(int);
static void usage(void) __attribute__((noreturn));
static void show_dlts_and_exit(pcap_t *pd) __attribute__((noreturn));
@@ -222,6 +224,9 @@ static struct printer printers[] = {
#ifdef DLT_APPLE_IP_OVER_IEEE1394
{ ap1394_if_print, DLT_APPLE_IP_OVER_IEEE1394 },
#endif
+#ifdef DLT_IEEE802_11_RADIO_AVS
+ { ieee802_11_radio_avs_if_print, DLT_IEEE802_11_RADIO_AVS },
+#endif
#ifdef DLT_JUNIPER_ATM1
{ juniper_atm1_print, DLT_JUNIPER_ATM1 },
#endif
@@ -270,6 +275,9 @@ static struct printer printers[] = {
#ifdef DLT_MFR
{ mfr_if_print, DLT_MFR },
#endif
+#if defined(DLT_BLUETOOTH_HCI_H4_WITH_PHDR) && defined(HAVE_PCAP_BLUETOOTH_H)
+ { bt_if_print, DLT_BLUETOOTH_HCI_H4_WITH_PHDR},
+#endif
{ NULL, 0 },
};
@@ -298,6 +306,7 @@ struct print_info {
struct dump_info {
char *WFileName;
+ char *CurrentFileName;
pcap_t *pd;
pcap_dumper_t *p;
};
@@ -327,10 +336,10 @@ show_dlts_and_exit(pcap_t *pd)
* OK, does tcpdump handle that type?
*/
if (lookup_printer(dlts[n_dlts]) == NULL)
- (void) fprintf(stderr, " (not supported)");
+ (void) fprintf(stderr, " (printing not supported)");
putchar('\n');
} else {
- (void) fprintf(stderr, " DLT %d (not supported)\n",
+ (void) fprintf(stderr, " DLT %d (printing not supported)\n",
dlts[n_dlts]);
}
}
@@ -342,13 +351,19 @@ show_dlts_and_exit(pcap_t *pd)
* Set up flags that might or might not be supported depending on the
* version of libpcap we're using.
*/
-#ifdef WIN32
+#if defined(HAVE_PCAP_CREATE) || defined(WIN32)
#define B_FLAG "B:"
#define B_FLAG_USAGE " [ -B size ]"
-#else /* WIN32 */
+#else /* defined(HAVE_PCAP_CREATE) || defined(WIN32) */
#define B_FLAG
#define B_FLAG_USAGE
-#endif /* WIN32 */
+#endif /* defined(HAVE_PCAP_CREATE) || defined(WIN32) */
+
+#ifdef HAVE_PCAP_CREATE
+#define I_FLAG "I"
+#else /* HAVE_PCAP_CREATE */
+#define I_FLAG
+#endif /* HAVE_PCAP_CREATE */
#ifdef HAVE_PCAP_FINDALLDEVS
#ifndef HAVE_PCAP_IF_T
@@ -425,10 +440,32 @@ getWflagChars(int x)
static void
MakeFilename(char *buffer, char *orig_name, int cnt, int max_chars)
{
+ char *filename = malloc(NAME_MAX + 1);
+
+ /* Process with strftime if Gflag is set. */
+ if (Gflag != 0) {
+ struct tm *local_tm;
+
+ /* Convert Gflag_time to a usable format */
+ if ((local_tm = localtime(&Gflag_time)) == NULL) {
+ error("MakeTimedFilename: localtime");
+ }
+
+ /* There's no good way to detect an error in strftime since a return
+ * value of 0 isn't necessarily failure.
+ */
+ strftime(filename, NAME_MAX, orig_name, local_tm);
+ } else {
+ strncpy(filename, orig_name, NAME_MAX);
+ }
+
if (cnt == 0 && max_chars == 0)
- strcpy(buffer, orig_name);
+ strncpy(buffer, filename, NAME_MAX + 1);
else
- sprintf(buffer, "%s%0*d", orig_name, max_chars, cnt);
+ if (snprintf(buffer, NAME_MAX + 1, "%s%0*d", filename, max_chars, cnt) > NAME_MAX)
+ /* Report an error if the filename is too large */
+ error("too many output files or filename is too long (> %d)", NAME_MAX);
+ free(filename);
}
static int tcpdump_printf(netdissect_options *ndo _U_,
@@ -450,7 +487,7 @@ main(int argc, char **argv)
{
register int cnt, op, i;
bpf_u_int32 localnet, netmask;
- register char *cp, *infile, *cmdbuf, *device, *RFileName, *WFileName, *WFileNameAlt;
+ register char *cp, *infile, *cmdbuf, *device, *RFileName, *WFileName;
pcap_handler callback;
int type;
struct bpf_program fcode;
@@ -469,7 +506,6 @@ main(int argc, char **argv)
#endif
int status;
#ifdef WIN32
- u_int UserBufferSize = 1000000;
if(wsockinit() != 0) return 1;
#endif /* WIN32 */
@@ -501,7 +537,7 @@ main(int argc, char **argv)
opterr = 0;
while (
- (op = getopt(argc, argv, "aA" B_FLAG "c:C:d" D_FLAG "eE:fF:i:lLm:M:nNOpqr:Rs:StT:u" U_FLAG "vw:W:xXy:YZ:")) != -1)
+ (op = getopt(argc, argv, "aA" B_FLAG "c:C:d" D_FLAG "eE:fF:G:i:" I_FLAG "KlLm:M:nNOpqr:Rs:StT:u" U_FLAG "vw:W:xXy:Yz:Z:")) != -1)
switch (op) {
case 'a':
@@ -512,13 +548,13 @@ main(int argc, char **argv)
++Aflag;
break;
-#ifdef WIN32
+#if defined(HAVE_PCAP_CREATE) || defined(WIN32)
case 'B':
- UserBufferSize = atoi(optarg)*1024;
- if (UserBufferSize < 0)
+ Bflag = atoi(optarg)*1024;
+ if (Bflag <= 0)
error("invalid packet buffer size %s", optarg);
break;
-#endif /* WIN32 */
+#endif /* defined(HAVE_PCAP_CREATE) || defined(WIN32) */
case 'c':
cnt = atoi(optarg);
@@ -575,6 +611,21 @@ main(int argc, char **argv)
infile = optarg;
break;
+ case 'G':
+ Gflag = atoi(optarg);
+ if (Gflag < 0)
+ error("invalid number of seconds %s", optarg);
+
+ /* We will create one file initially. */
+ Gflag_count = 0;
+
+ /* Grab the current time for rotation use. */
+ if ((Gflag_time = time(NULL)) == (time_t)-1) {
+ error("main: can't get current time: %s",
+ pcap_strerror(errno));
+ }
+ break;
+
case 'i':
if (optarg[0] == '0' && optarg[1] == 0)
error("Invalid adapter index");
@@ -610,6 +661,12 @@ main(int argc, char **argv)
device = optarg;
break;
+#ifdef HAVE_PCAP_CREATE
+ case 'I':
+ ++Iflag;
+ break;
+#endif /* HAVE_PCAP_CREATE */
+
case 'l':
#ifdef WIN32
/*
@@ -631,19 +688,15 @@ main(int argc, char **argv)
#endif /* WIN32 */
break;
- case 'n':
- ++nflag;
- break;
-
- case 'N':
- ++Nflag;
+ case 'K':
+ ++Kflag;
break;
case 'm':
#ifdef LIBSMI
- if (smiLoadModule(optarg) == 0) {
+ if (smiLoadModule(optarg) == 0) {
error("could not load MIB module %s", optarg);
- }
+ }
sflag = 1;
#else
(void)fprintf(stderr, "%s: ignoring option `-m %s' ",
@@ -660,6 +713,14 @@ main(int argc, char **argv)
tcpmd5secret = optarg;
break;
+ case 'n':
+ ++nflag;
+ break;
+
+ case 'N':
+ ++Nflag;
+ break;
+
case 'O':
Oflag = 0;
break;
@@ -781,6 +842,15 @@ main(int argc, char **argv)
}
break;
#endif
+ case 'z':
+ if (optarg) {
+ zflag = strdup(optarg);
+ } else {
+ usage();
+ /* NOTREACHED */
+ }
+ break;
+
case 'Z':
if (optarg) {
username = strdup(optarg);
@@ -806,10 +876,11 @@ main(int argc, char **argv)
case 1: /* No time stamp */
case 2: /* Unix timeval style */
case 3: /* Microseconds since previous packet */
+ case 5: /* Microseconds since first packet */
break;
default: /* Not supported */
- error("only -t, -tt, -ttt, and -tttt are supported");
+ error("only -t, -tt, -ttt, -tttt and -ttttt are supported");
break;
}
@@ -884,12 +955,74 @@ main(int argc, char **argv)
fflush(stderr);
#endif /* WIN32 */
+#ifdef HAVE_PCAP_CREATE
+ pd = pcap_create(device, ebuf);
+ if (pd == NULL)
+ error("%s", ebuf);
+ status = pcap_set_snaplen(pd, snaplen);
+ if (status != 0)
+ error("%s: pcap_set_snaplen failed: %s",
+ device, pcap_statustostr(status));
+ status = pcap_set_promisc(pd, !pflag);
+ if (status != 0)
+ error("%s: pcap_set_promisc failed: %s",
+ device, pcap_statustostr(status));
+ if (Iflag) {
+ status = pcap_set_rfmon(pd, 1);
+ if (status != 0)
+ error("%s: pcap_set_rfmon failed: %s",
+ device, pcap_statustostr(status));
+ }
+ status = pcap_set_timeout(pd, 1000);
+ if (status != 0)
+ error("%s: pcap_set_timeout failed: %s",
+ device, pcap_statustostr(status));
+ if (Bflag != 0) {
+ status = pcap_set_buffer_size(pd, Bflag);
+ if (status != 0)
+ error("%s: pcap_set_buffer_size failed: %s",
+ device, pcap_statustostr(status));
+ }
+ status = pcap_activate(pd);
+ if (status < 0) {
+ /*
+ * pcap_activate() failed.
+ */
+ cp = pcap_geterr(pd);
+ if (status == PCAP_ERROR)
+ error("%s", cp);
+ else if ((status == PCAP_ERROR_NO_SUCH_DEVICE ||
+ status == PCAP_ERROR_PERM_DENIED) &&
+ *cp != '\0')
+ error("%s: %s\n(%s)", device,
+ pcap_statustostr(status), cp);
+ else
+ error("%s: %s", device,
+ pcap_statustostr(status));
+ } else if (status > 0) {
+ /*
+ * pcap_activate() succeeded, but it's warning us
+ * of a problem it had.
+ */
+ cp = pcap_geterr(pd);
+ if (status == PCAP_WARNING)
+ warning("%s", cp);
+ else if (status == PCAP_WARNING_PROMISC_NOTSUP &&
+ *cp != '\0')
+ warning("%s: %s\n(%s)", device,
+ pcap_statustostr(status), cp);
+ else
+ warning("%s: %s", device,
+ pcap_statustostr(status));
+ }
+#else
*ebuf = '\0';
pd = pcap_open_live(device, snaplen, !pflag, 1000, ebuf);
if (pd == NULL)
error("%s", ebuf);
else if (*ebuf)
warning("%s", ebuf);
+#endif /* HAVE_PCAP_CREATE */
/*
* Let user own process after socket has been opened.
*/
@@ -897,12 +1030,12 @@ main(int argc, char **argv)
if (setgid(getgid()) != 0 || setuid(getuid()) != 0)
fprintf(stderr, "Warning: setgid/setuid failed !\n");
#endif /* WIN32 */
-#ifdef WIN32
- if(UserBufferSize != 1000000)
- if(pcap_setbuff(pd, UserBufferSize)==-1){
+#if !defined(HAVE_PCAP_CREATE) && defined(WIN32)
+ if(Bflag != 0)
+ if(pcap_setbuff(pd, Bflag)==-1){
error("%s", pcap_geterr(pd));
}
-#endif /* WIN32 */
+#endif /* !defined(HAVE_PCAP_CREATE) && defined(WIN32) */
if (Lflag)
show_dlts_and_exit(pd);
if (gndo->ndo_dlt >= 0) {
@@ -921,7 +1054,7 @@ main(int argc, char **argv)
}
#endif
(void)fprintf(stderr, "%s: data link type %s\n",
- program_name, gndo->ndo_dltname);
+ program_name, gndo->ndo_dltname);
(void)fflush(stderr);
}
i = pcap_snapshot(pd);
@@ -948,12 +1081,14 @@ main(int argc, char **argv)
exit(0);
}
init_addrtoname(localnet, netmask);
+ init_checksum();
#ifndef WIN32
(void)setsignal(SIGPIPE, cleanup);
-#endif /* WIN32 */
(void)setsignal(SIGTERM, cleanup);
(void)setsignal(SIGINT, cleanup);
+ (void)setsignal(SIGCHLD, child_cleanup);
+#endif /* WIN32 */
/* Cooperate with nohup(1) */
#ifndef WIN32
if ((oldhandler = setsignal(SIGHUP, cleanup)) != SIG_DFL)
@@ -964,15 +1099,22 @@ main(int argc, char **argv)
error("%s", pcap_geterr(pd));
if (WFileName) {
pcap_dumper_t *p;
+ /* Do not exceed the default NAME_MAX for files. */
+ dumpinfo.CurrentFileName = (char *)malloc(NAME_MAX + 1);
+
+ if (dumpinfo.CurrentFileName == NULL)
+ error("malloc of dumpinfo.CurrentFileName");
+
+ /* We do not need numbering for dumpfiles if Cflag isn't set. */
+ if (Cflag != 0)
+ MakeFilename(dumpinfo.CurrentFileName, WFileName, 0, WflagChars);
+ else
+ MakeFilename(dumpinfo.CurrentFileName, WFileName, 0, 0);
- WFileNameAlt = (char *)malloc(strlen(WFileName) + MAX_CFLAG_CHARS + 1);
- if (WFileNameAlt == NULL)
- error("malloc of WFileNameAlt");
- MakeFilename(WFileNameAlt, WFileName, 0, WflagChars);
- p = pcap_dump_open(pd, WFileNameAlt);
+ p = pcap_dump_open(pd, dumpinfo.CurrentFileName);
if (p == NULL)
error("%s", pcap_geterr(pd));
- if (Cflag != 0) {
+ if (Cflag != 0 || Gflag != 0) {
callback = dump_packet_and_trunc;
dumpinfo.WFileName = WFileName;
dumpinfo.pd = pd;
@@ -1007,7 +1149,12 @@ main(int argc, char **argv)
}
#endif /* WIN32 */
#ifdef SIGINFO
- (void)setsignal(SIGINFO, requestinfo);
+ /*
+ * We can't get statistics when reading from a file rather
+ * than capturing from a device.
+ */
+ if (RFileName == NULL)
+ (void)setsignal(SIGINFO, requestinfo);
#endif
if (vflag > 0 && WFileName) {
@@ -1125,6 +1272,18 @@ cleanup(int signo _U_)
#endif
}
+/*
+ On windows, we do not use a fork, so we do not care less about
+ waiting a child processes to die
+ */
+#ifndef WIN32
+static RETSIGTYPE
+child_cleanup(int signo _U_)
+{
+ wait(NULL);
+}
+#endif /* WIN32 */
+
static void
info(register int verbose)
{
@@ -1153,11 +1312,40 @@ info(register int verbose)
infoprint = 0;
}
+#ifndef WIN32
+static void
+compress_savefile(const char *filename)
+{
+ if (fork())
+ return;
+ /*
+ * Set to lowest priority so that this doesn't disturb the capture
+ */
+#ifdef NZERO
+ setpriority(PRIO_PROCESS, 0, NZERO - 1);
+#else
+ setpriority(PRIO_PROCESS, 0, 19);
+#endif
+ if (execlp(zflag, zflag, filename, NULL) == -1)
+ fprintf(stderr,
+ "compress_savefile:execlp(%s, %s): %s\n",
+ zflag,
+ filename,
+ strerror(errno));
+}
+#else /* WIN32 */
+static void
+compress_savefile(const char *filename)
+{
+ fprintf(stderr,
+ "compress_savefile failed. Functionality not implemented under windows\n");
+}
+#endif /* WIN32 */
+
static void
dump_packet_and_trunc(u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
{
struct dump_info *dump_info;
- char *name;
++packets_captured;
@@ -1166,29 +1354,103 @@ dump_packet_and_trunc(u_char *user, const struct pcap_pkthdr *h, const u_char *s
dump_info = (struct dump_info *)user;
/*
+ * XXX - this won't force the file to rotate on the specified time
+ * boundary, but it will rotate on the first packet received after the
+ * specified Gflag number of seconds. Note: if a Gflag time boundary
+ * and a Cflag size boundary coincide, the time rotation will occur
+ * first thereby cancelling the Cflag boundary (since the file should
+ * be 0).
+ */
+ if (Gflag != 0) {
+ /* Check if it is time to rotate */
+ time_t t;
+
+ /* Get the current time */
+ if ((t = time(NULL)) == (time_t)-1) {
+ error("dump_and_trunc_packet: can't get current_time: %s",
+ pcap_strerror(errno));
+ }
+
+
+ /* If the time is greater than the specified window, rotate */
+ if (t - Gflag_time >= Gflag) {
+ /* Update the Gflag_time */
+ Gflag_time = t;
+ /* Update Gflag_count */
+ Gflag_count++;
+ /*
+ * Close the current file and open a new one.
+ */
+ pcap_dump_close(dump_info->p);
+
+ /*
+ * Compress the file we just closed, if the user asked for it
+ */
+ if (zflag != NULL)
+ compress_savefile(dump_info->CurrentFileName);
+
+ /*
+ * Check to see if we've exceeded the Wflag (when
+ * not using Cflag).
+ */
+ if (Cflag == 0 && Wflag > 0 && Gflag_count >= Wflag) {
+ (void)fprintf(stderr, "Maximum file limit reached: %d\n",
+ Wflag);
+ exit(0);
+ /* NOTREACHED */
+ }
+ if (dump_info->CurrentFileName != NULL)
+ free(dump_info->CurrentFileName);
+ /* Allocate space for max filename + \0. */
+ dump_info->CurrentFileName = (char *)malloc(NAME_MAX + 1);
+ if (dump_info->CurrentFileName == NULL)
+ error("dump_packet_and_trunc: malloc");
+ /*
+ * This is always the first file in the Cflag
+ * rotation: e.g. 0
+ * We also don't need numbering if Cflag is not set.
+ */
+ if (Cflag != 0)
+ MakeFilename(dump_info->CurrentFileName, dump_info->WFileName, 0,
+ WflagChars);
+ else
+ MakeFilename(dump_info->CurrentFileName, dump_info->WFileName, 0, 0);
+
+ dump_info->p = pcap_dump_open(dump_info->pd, dump_info->CurrentFileName);
+ if (dump_info->p == NULL)
+ error("%s", pcap_geterr(pd));
+ }
+ }
+
+ /*
* XXX - this won't prevent capture files from getting
* larger than Cflag - the last packet written to the
* file could put it over Cflag.
*/
- if (pcap_dump_ftell(dump_info->p) > Cflag) {
+ if (Cflag != 0 && pcap_dump_ftell(dump_info->p) > Cflag) {
/*
* Close the current file and open a new one.
*/
pcap_dump_close(dump_info->p);
+
+ /*
+ * Compress the file we just closed, if the user asked for it
+ */
+ if (zflag != NULL)
+ compress_savefile(dump_info->CurrentFileName);
+
Cflag_count++;
if (Wflag > 0) {
if (Cflag_count >= Wflag)
Cflag_count = 0;
- } else {
- if (Cflag_count >= MAX_CFLAG)
- error("too many output files");
}
- name = (char *)malloc(strlen(dump_info->WFileName) + MAX_CFLAG_CHARS + 1);
- if (name == NULL)
+ if (dump_info->CurrentFileName != NULL)
+ free(dump_info->CurrentFileName);
+ dump_info->CurrentFileName = (char *)malloc(NAME_MAX + 1);
+ if (dump_info->CurrentFileName == NULL)
error("dump_packet_and_trunc: malloc");
- MakeFilename(name, dump_info->WFileName, Cflag_count, WflagChars);
- dump_info->p = pcap_dump_open(dump_info->pd, name);
- free(name);
+ MakeFilename(dump_info->CurrentFileName, dump_info->WFileName, Cflag_count, WflagChars);
+ dump_info->p = pcap_dump_open(dump_info->pd, dump_info->CurrentFileName);
if (dump_info->p == NULL)
error("%s", pcap_geterr(pd));
}
@@ -1365,7 +1627,7 @@ RETSIGTYPE requestinfo(int signo _U_)
*/
#ifdef USE_WIN32_MM_TIMER
void CALLBACK verbose_stats_dump (UINT timer_id _U_, UINT msg _U_, DWORD_PTR arg _U_,
- DWORD_PTR dw1 _U_, DWORD_PTR dw2 _U_)
+ DWORD_PTR dw1 _U_, DWORD_PTR dw2 _U_)
{
struct pcap_stat stat;
@@ -1412,13 +1674,15 @@ usage(void)
#endif /* WIN32 */
#endif /* HAVE_PCAP_LIB_VERSION */
(void)fprintf(stderr,
-"Usage: %s [-aAd" D_FLAG "eflLnNOpqRStu" U_FLAG "vxX]" B_FLAG_USAGE " [-c count] [ -C file_size ]\n", program_name);
+"Usage: %s [-aAd" D_FLAG "ef" I_FLAG "KlLnNOpqRStu" U_FLAG "vxX]" B_FLAG_USAGE " [ -c count ]\n", program_name);
+ (void)fprintf(stderr,
+"\t\t[ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ]\n");
(void)fprintf(stderr,
-"\t\t[ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]\n");
+"\t\t[ -i interface ] [ -M secret ] [ -r file ]\n");
(void)fprintf(stderr,
-"\t\t[ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]\n");
+"\t\t[ -s snaplen ] [ -T type ] [ -w file ] [ -W filecount ]\n");
(void)fprintf(stderr,
-"\t\t[ -W filecount ] [ -y datalinktype ] [ -Z user ]\n");
+"\t\t[ -y datalinktype ] [ -z command ] [ -Z user ]\n");
(void)fprintf(stderr,
"\t\t[ expression ]\n");
exit(1);
@@ -1461,4 +1725,3 @@ ndo_warning(netdissect_options *ndo _U_, const char *fmt, ...)
(void)fputc('\n', stderr);
}
}
-
diff --git a/contrib/tcpdump/telnet.h b/contrib/tcpdump/telnet.h
index da11043..33a07be 100644
--- a/contrib/tcpdump/telnet.h
+++ b/contrib/tcpdump/telnet.h
@@ -1,6 +1,6 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/telnet.h,v 1.4 2002/06/11 17:09:01 itojun Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/telnet.h,v 1.5 2007-08-29 02:31:44 mcr Exp $ (LBL) */
-/* $NetBSD: telnet.h,v 1.9 2001/06/11 01:50:50 wiz Exp $ */
+/* NetBSD: telnet.h,v 1.9 2001/06/11 01:50:50 wiz Exp */
/*
* Copyright (c) 1983, 1993
diff --git a/contrib/tcpdump/tests/.cvsignore b/contrib/tcpdump/tests/.cvsignore
deleted file mode 100644
index f097c8a..0000000
--- a/contrib/tcpdump/tests/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-*.new
-*.pcap
-02-sunrise-sunset-esp.pcap
-08-sunrise-sunset-aes.pcap
-08-sunrise-sunset-esp.pcap
-08-sunrise-sunset-esp2.pcap
-isakmp-delete-segfault.pcap
-isakmp-identification-segfault.pcap
-isakmp-pointer-loop.pcap
-run1.pcap
-run2.pcap
diff --git a/contrib/tcpdump/tests/02-sunrise-sunset-esp.puu b/contrib/tcpdump/tests/02-sunrise-sunset-esp.puu
deleted file mode 100644
index 0ceffc1..0000000
--- a/contrib/tcpdump/tests/02-sunrise-sunset-esp.puu
+++ /dev/null
@@ -1,34 +0,0 @@
-begin 644 02-sunrise-sunset-esp.pcap
-MU,.RH0(`!``````````````&```!``````````````"6````E@```!```&1D
-M11```&1D(P@`10``B/]G``!`,O:5P`$"%\`!`BT2-%9X`````4P@12\\L)(1
-MTZ=(S>7($>.<3N@\_I:AY"K/TKAZJP719"NCKYP;PT(0+$"M%=]-X"`*8V.'
-M-'$1A]02"3N#OZI#&1R]A*1;`G8S@YFQ]<H7S))417Y9!E4:<$'CW)%VZ&_3
-M_]T`L+P1^!`PEP``````````E@```)8````0``!D9$40``!D9",(`$4``(C_
-M:```0#+VE,`!`A?``0(M$C16>`````(:<$'CW)%VZ',2KQMB@CN?'"^GJ<=:
-MD-0`+.V^J'2AK).'XQ_B"B8:[%A_+K[6KS2'XR[UN`,R"BJP?^].ZM#/[$)#
-M17^!D"8_[BZ>GU4Z*$7I"N$U*>J47?C-4;I>#`%6+#0%]D75YC']*Z\`````
-M`````)8```"6````$```9&1%$```9&0C"`!%``"(_VD``$`R]I/``0(7P`$"
-M+1(T5G@````#7?C-4;I>#`%@W%89?QJ#$TJ,4G\FO&HO=F+,,%1E(]);XI]T
-MV7W.RY$2=JZ1%!QCNX[;^.JD4W91;7)NJWV2MF4?7`=&_3OWW%V&6RIXKB75
-M#;2TWNL"A:MF!I@_5R^]L6;Z`L?E@1:T&71G``````````"6````E@```!``
-M`&1D11```&1D(P@`10``B/]J``!`,O:2P`$"%\`!`BT2-%9X````!*MF!I@_
-M5R^]%';9*Q:S_B]]O_8FV:2K1A!]/SQHI7>OS815*I?4%/:.=BBJUEGJ(X8\
-M<SZ>P1E/@&P\9MR)DP3[UCWI@,MR%A$\CR]=G(("[CFB7AUN$AENZOO&\:7%
-M2KLW<'NP,L(I=!;8=0``````````E@```)8````0``!D9$40``!D9",(`$4`
-M`(C_:P``0#+VD<`!`A?``0(M$C16>`````5NZOO&\:7%2J12,9;LOK"-S,=$
-MO0]X+J(OJQED#PLBRY[\^352UZK&57<R0L9JQ:KH6`)BUN$`5]1WU@"A!8TM
-MO^)<;`-SW;1HQO$CE\#`O[W[17GW[0G&M,^T?7>6,Z<:%73AWV3:;Y/:=@(`
-M`````````)8```"6````$```9&1%$```9&0C"`!%``"(_VP``$`R]I#``0(7
-MP`$"+1(T5G@````&M,^T?7>6,Z=>N_YZQFV[H1^6\!/I*IMAOHZE\E0M.Z!X
-M#[0EG3#>%]7`]*2F?@S4X2''TK09J@NG/.HEXCE./..K^'-@":X[\?0L+B`S
-MQA\HTK\'J]:S]N6O`]\)NQD)9;H2P\K`^NX37`R5``````````"6````E@``
-M`!```&1D11```&1D(P@`10``B/]M``!`,O:/P`$"%\`!`BT2-%9X````!^6O
-M`]\)NQD)>BYZ>`/DA=N;A2...3-7FZOK?:5KGXBN`/E?$\[-11-$G#E;(>N"
-M+<$/YP'SM$>16LU18&Q]9)$]0)/M]:2Z#A6]-,SM*>FI/`X*K-*-:KS3IW<"
-MO(>(P(K=:X::SJ;O[J>0K```````````E@```)8````0``!D9$40``!D9",(
-M`$4``(C_;@``0#+VCL`!`A?``0(M$C16>`````C3IW<"O(>(P'-43;C[`MCD
-M`BMZAX]F!?'Z$8Q"5HYMVDC9"8I^O(Z4!/)`/IVD-(ZK)_52-H2XK+,(-LR)
-MM)K#XLF">KY0>C?\[MA%3F%$?ORJ@:>O]5H>?-$OQH)J<ZFOW_+K%G=UG0"[
-"G'T`
-`
-end
diff --git a/contrib/tcpdump/tests/08-sunrise-sunset-aes.puu b/contrib/tcpdump/tests/08-sunrise-sunset-aes.puu
deleted file mode 100644
index ec8793d..0000000
--- a/contrib/tcpdump/tests/08-sunrise-sunset-aes.puu
+++ /dev/null
@@ -1,36 +0,0 @@
-begin 644 08-sunrise-sunset-aes.pcap
-MU,.RH0(`!``````````````&```!``````````````"F````I@```!```&1D
-M11```&1D(P@`10``F/SJ``!`,OD"P`$"%\`!`BW1(T5G`````>:['.C0J(%P
-MVF'>(TU6&*"9A,`,/KS\:>DH>O_L(51)_[YY"L<H#LJ/;(BQ)=[*$<APY/A1
-M-"T@(`_Q&)S!C)$*7S?G3Q4H\F=)OYF+P@S&11%^*]S)N@L*TZ@!:&&:QFZT
-ML'#7<>9?8'?J4V:_.]B+6UR\T>39D+=NA;$``````````*8```"F````$```
-M9&1%$```9&0C"`!%``"8_.L``$`R^0'``0(7P`$"+=$C16<````";K2P<-=Q
-MYE]@=^I39K\[V$1HDU9'L,6BVK.^B4]E6QY&:?3?T)G?"RSU;X!J]]7S)<`,
-M*L!SYO^RUWR?!EIJMWU=5B406YL-I`]LK`^;-3%(NEY#R`ST=W40=:*[M$*8
-M#<KX)19@.`.4_5YD^:V;G@3>`GLTK(5ZCS"BC@``````````I@```*8````0
-M``!D9$40``!D9",(`$4``)C\[```0#+Y`,`!`A?``0(MT2-%9P````,-RO@E
-M%F`X`Y3]7F3YK9N>=6-;U&'6">_4H80DMY^Z9E3ZL3[ONN*L<"Z@7(VO]XT^
-M/2JP<(/^8NTO-4\/B5AJEC4N;,\"7-&(;9AM_2G5A1C.[LBK3')P?AE;$I[)
-M!8N&RC?OTD7<V)AIU4,*E>7ELURFXRD/JD(:@RER``````````"F````I@``
-M`!```&1D11```&1D(P@`10``F/SM``!`,OC_P`$"%\`!`BW1(T5G````!(;*
-M-^_21=S8F&G50PJ5Y>5K%@R;)A(E<5YD'@86@GT"-&&MHP*.A=?%=:FDZH=4
-M*9":>]'G'CB4%2?PJ"2^H*51\8P!9T`X3#;F+H$[<GW7=?K.R30-'6'L3AO8
-MR=:M3S$GIZ>4Z$7ZL0<\S=S\%`:BW9U2'@U^@D,,:.P``````````*8```"F
-M````$```9&1%$```9&0C"`!%``"8_.X``$`R^/[``0(7P`$"+=$C16<````%
-M,2>GIY3H1?JQ!SS-W/P4!BW&*&A[$!XGK<^M^>_X193"G"1QTWG>Q"CO25$"
-MPM+1+8[6&(17\EE\P:6-WVPT=911?@'-Z,,/UVZ2!QV(X4513U9]P62CJMS>
-M^ODBGHU=%T.H2&Z<4,8(!4,2[&A4^H="L:+`=4G?*(7,2@``````````I@``
-M`*8````0``!D9$40``!D9",(`$4``)C\[P``0#+X_<`!`A?``0(MT2-%9P``
-M``870ZA(;IQ0Q@@%0Q+L:%3Z@*HQPZA]3STWDY#CYJGOJH)K<KVT9G61>>I'
-MEHMF"X!^G,H@,YWT7^=60.3/$7?AYH)G9GBD%%#,D]!EDA]B*?UE>U96+"5\
-MK=""/.LO'__^;$N<E@!.2&3^@U:P__8_'D^YC!41E,!@!6<K``````````"F
-M````I@```!```&1D11```&1D(P@`10``F/SP``!`,OC\P`$"%\`!`BW1(T5G
-M````!_YL2YR6`$Y(9/Z#5K#_]C_ZJU%7M?L23>I`L#D]@&G?Z7B2O#GI?NDK
-MF[7JPN,8V\H>%G+)'+%+FL*&\8+H2^KFWF5YQ:$4V!,1?G;=OYD;!,3YD'V(
-MW[Y!I(U=X9[\:L)(5GBJ,B!-5N$.CGV$VLD^R?Z,KL[AMI(ZC-P`````````
-M`*8```"F````$```9&1%$```9&0C"`!%``"8_/$``$`R^/O``0(7P`$"+=$C
-M16<````(PDA6>*HR($U6X0Z.?83:R;Y0<E/4SN)UX;Q:D$D%K(DZZ:^_\K$'
-MZQ81NT4KBGD#Z=_^`E^!HS*KHEJ!)!KE>&'2065/"*M'ELXD?1%3\L3TC.UK
-HKWB(C5O@78>9LQ^<0Z6]F=:<;@[>L^;/\-6WB81[GX)<MS0B=>LGD@``
-`
-end
diff --git a/contrib/tcpdump/tests/08-sunrise-sunset-esp2.puu b/contrib/tcpdump/tests/08-sunrise-sunset-esp2.puu
deleted file mode 100644
index 4785f2b..0000000
--- a/contrib/tcpdump/tests/08-sunrise-sunset-esp2.puu
+++ /dev/null
@@ -1,43 +0,0 @@
-begin 644 08-sunrise-sunset-esp2.pcap
-MU,.RH0(`!``````````````&```!``````````````#.````S@```!```&1D
-M11```&1D(P@`10``P"E-``!`,LQXP`$"%\`!`BT2-%9X`````4=!+\5+F8`+
-M[[NOU-#98*AO5\780X[VDXF@2W8<10:J!'!Z!-[7N4CFNRKIH;PUA1SL"Y9\
-M-?_3N_,W/@*T+C/"]=S[`;D!/;`SR5,3+><9K.^\9N><18TY9Z\!I\S./L8R
-MFE53,S6Y5X_Z\(T)ZIUS?X$8>&(_MT1"!SV:VPP!\XU$[3S-5L)4-O"&>]`Z
-M1:./61=%C6`6U1/65"A&KUE902]*``````````#.````S@```!```&1D11``
-M`&1D(P@`10``P"E/``!`,LQVP`$"%\`!`BT2-%9X`````CIU^SX%;G^!GUSP
-MSA<?/8FY?L/'^2]6'&3[\-NES3E]33Z$Q]#7D9$8TFS5);?S?)ZJOP4;ZD-M
-M+0_/@#*U=7A9;FYR*5&/^V%MSFEM`DAZY,8'<0.9M^'::<M+M2G0LG6*S/[3
-M?T`IIJUJ[GW,L+&PH<AR&K(]^=[K7IMGD[`8[ONL8LD3AM`N@$S!*?=;*8=>
-ML7P6FM81),N>T/1Z'"P7H5;```````````#.````S@```!```&1D11```&1D
-M(P@`10``P"E1``!`,LQTP`$"%\`!`BT2-%9X`````R4)-P&F>HPK/?_$MTFC
-M^TOO=/L#W_APTK6MIH_BC*I7\L<,9(?/0M"HK3[T3F;(Y2V70$P5?D'7GFIB
-MJZ/C",S/BD!9N8GV"\.;GVME[P!@!B1"DT=1W0_75FMI23H!T2^C);4GY>`I
-M-2T^O_0_WU&$)&+/P)%[TQUQ-T7G%\RXYJT0HO</^*)F`^2<W8KTY.W<FK4K
-M8UC+J'.*X)NH%<UTK+K+``````````#.````S@```!```&1D11```&1D(P@`
-M10``P"E3``!`,LQRP`$"%\`!`BT2-%9X````!)`9]]SHKI[EGW4M?W8>[$=<
-M`@@TL1#(Y980]E*/!^2@G`*&S9O^QMS1S?/`TL=5F9B(12?(145>Y2I+;+T?
-MKWUD@&.7U36]K-$[.%9CB*FK^E8>N:K/)4#$]ZO/:=#;MRH-)_139\,W6M4T
-M7SQ?BBX&GT,+A3#BB5^O=>+GKIC-4]5VBP)D-S<X2O)H[_/#M*T+&$\7PL.M
-M>7-)\W&;<@_J@,*!``````````#.````S@```!```&1D11```&1D(P@`10``
-MP"E5``!`,LQPP`$"%\`!`BT2-%9X````!0OIFA;,@2C4HF3>5!-C(0>5LR0"
-M='1\OQ.!-?@D(U0!453"<Q/!\*CDK.&OU'+WE:^7J8"AMS<@UYX*,<(&YA2Q
-MGQ(.3+0\#`!+`.TE,;\3:.<+F:?=T@.KOBL%VAAX9_RY$/^%$C+I*4&S<AM]
-MP*]SZ"RD'G.AJH76?SV&2HQLF+!J/QZ;.:<LB::-]+AE1+&);M^]`XZ-W2CX
-M+&CPZINP*9?>``````````#.````S@```!```&1D11```&1D(P@`10``P"E7
-M``!`,LQNP`$"%\`!`BT2-%9X````!I0M"-THEF=+!L=>A3N,\1+"'Z7(J?O0
-M.B?)(#X=/5F-.">%3.X'(=JKK:W<MZF2^8#73C[US$-O&ZZ+L:94R9E2#=J=
-M18HP?AN`5^)A+HW6EB*5P=AZ(S"\TIBZ'\.=]4A,#18'0/R_#C:4XX_?>ZMN
-M=B+^Q3"(KE\1299]=5E,'.&U(`H9N)+>9FS/`CA*>D^>AV.-C(S\)BM&)*XM
-M^BF__^<_``````````#.````S@```!```&1D11```&1D(P@`10``P"E9``!`
-M,LQLP`$"%\`!`BT2-%9X````!R"SQ'[6%(;Q>>O+]CS6D*+AD3IMC\^MMK8[
-M:T3)KM06!G^.H\>%UAT@)X6JL9\3V.HR"+_Q^_T-O$Y_S":_TP;V,LIV1O]H
-M-G@DOL'V-5)O@%<%!#O$2V,AS@W7(&$IX.YKK]\K#>FITU)<>O42T2GKFW+^
-M\/[,>E4P[Q"+7O,Y1(R22LND[H+469(%3,SN&3:U:/I`'&R@<`<TR"-4:&8+
-MQ5SX``````````#.````S@```!```&1D11```&1D(P@`10``P"E;``!`,LQJ
-MP`$"%\`!`BT2-%9X````"*',]A6A,Q(*B+]=&6X&T*L^\)Z6N%,G)(.;6X-K
-MM@&4<FRJ]#IJ%Y'-^T+4[&;0;_%7HM85LR8W(>HKGOV,^#L9,QF%)W^9!VFM
-MXG'XY]CWI5VF33?7,*P?6:.PS'&[\N$7W<*==+;P*$./4*OH&=O,6G!JIN>I
-M'ZDP*D&4K>SK-\/!7\Z&<&5J4%NU?NRM&25'*_"'UE3VH&?U]/V@932UYZT\
-`
-end
diff --git a/contrib/tcpdump/tests/alltests.sh b/contrib/tcpdump/tests/alltests.sh
deleted file mode 100644
index 7df2599..0000000
--- a/contrib/tcpdump/tests/alltests.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-for i in *.sh
-do
- if [ "X$i" = "Xalltests.sh" ]
- then
- continue;
- fi
- sh ./$i
-done
-
-
diff --git a/contrib/tcpdump/tests/bgp_vpn_attrset.out b/contrib/tcpdump/tests/bgp_vpn_attrset.out
deleted file mode 100644
index 7fb12ae..0000000
--- a/contrib/tcpdump/tests/bgp_vpn_attrset.out
+++ /dev/null
@@ -1,18 +0,0 @@
-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
- 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
- Attribute Set (128), length: 36, Flags [OT]:
- Origin AS: 65001
- Origin (1), length: 1, Flags [T]: IGP
- AS Path (2), length: 4, Flags [T]: 5555
- Local Preference (5), length: 4, Flags [T]: 44
- Originator ID (9), length: 4, Flags [O]: 22.5.5.5
- 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)
diff --git a/contrib/tcpdump/tests/bgp_vpn_attrset.sh b/contrib/tcpdump/tests/bgp_vpn_attrset.sh
deleted file mode 100755
index c32872c..0000000
--- a/contrib/tcpdump/tests/bgp_vpn_attrset.sh
+++ /dev/null
@@ -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
-
-
diff --git a/contrib/tcpdump/tests/eapon1.gdbinit b/contrib/tcpdump/tests/eapon1.gdbinit
deleted file mode 100644
index 37ad0bc..0000000
--- a/contrib/tcpdump/tests/eapon1.gdbinit
+++ /dev/null
@@ -1 +0,0 @@
-set args -r eapon1.pcap
diff --git a/contrib/tcpdump/tests/eapon1.out b/contrib/tcpdump/tests/eapon1.out
deleted file mode 100644
index c5042e3..0000000
--- a/contrib/tcpdump/tests/eapon1.out
+++ /dev/null
@@ -1,114 +0,0 @@
-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
-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
-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
-EAP code=1 id=0 length=76
-EAP code=1 id=0 length=80
-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
-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
-EAP code=1 id=0 length=76
-EAP code=1 id=0 length=80
-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
-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.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
-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
-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
-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 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
-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)
-EAP code=1 id=0 length=76
-EAP code=1 id=0 length=80
-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
diff --git a/contrib/tcpdump/tests/eapon1.puu b/contrib/tcpdump/tests/eapon1.puu
deleted file mode 100644
index 25c1436..0000000
--- a/contrib/tcpdump/tests/eapon1.puu
+++ /dev/null
@@ -1,368 +0,0 @@
-begin 644 eapon1.pcap
-MU,.RH0(`!````````````/__```!````"%5@0)*@#@#=````W0```/______
-M_P`$(U>E>@@`10``SSB'``"`$7Q.P*@!^<"H`?\`B@"*`+M3[!$.B1W`J`'Y
-M`(H`I0``($5%14M&041*1$9&1$1!14M#04-!0T%#04-!0T%#04%!`"!%0D9#
-M14-%1D5*1D5&1$5(1D-&1D9!1D%%1D-!0T%!00#_4TU")0``````````````
-M`````````````````````!$```L```````````#H`P``````````"P!6``,`
-M`0`!``(`'`!<34%)3%-,3U1<0E)/5U-%``(`1$I0.353,$H`"%5@0/2@#@#=
-M````W0```/_______P`$(U>E>@@`10``SSB(``"`$7Q-P*@!^<"H`?\`B@"*
-M`+L,\A$.B1[`J`'Y`(H`I0``($5%14M&041*1$9&1$1!14M#04-!0T%#04-!
-M0T%#04%!`"!!0D%#1E!&4$5.1D1%0T9#15!&2$9$149&4$9004-!0@#_4TU"
-M)0```````````````````````````````````!$```L```````````#H`P``
-M````````"P!6``,``0`!``(`'`!<34%)3%-,3U1<0E)/5U-%``(`1$I0.353
-M,$H`"%5@0("C#@#[````^P```/_______P`$(U>E>@@`10``[3B)``"`$7PN
-MP*@!^<"H`?\`B@"*`-E#WA$.B1_`J`'Y`(H`PP``($5%14M&041*1$9&1$1!
-M14M#04-!0T%#04-!0T%#04%!`"!!0D%#1E!&4$5.1D1%0T9#15!&2$9$149&
-M4$9004-!0@#_4TU")0```````````````````````````````````!$``"D`
-M``````````#H`P``````````*0!6``,``0`!``(`.@!<34%)3%-,3U1<0E)/
-M5U-%``P`8.H``$%20D5)5%-'4E504$4``0`#"@`0`(!,_@0#1$I0.353,$H`
-M"%5@0/JI#@!<````7````/_______P`$(U>E>@@`10``3CB*``"`$7S,P*@!
-M^<"H`?\`B0")`#J"=XDA`1```0```````"!%0D9#14-%1D5*1D5&1$5(1D-&
-M1D9!1D%%1D-!0T%"3```(``!"55@0//8"@!<````7````/_______P`$(U>E
-M>@@`10``3CB-``"`$7S)P*@!^<"H`?\`B0")`#J"=XDA`1```0```````"!%
-M0D9#14-%1D5*1D5&1$5(1D-&1D9!1D%%1D-!0T%"3```(``!"E5@0+,)!P!<
-M````7````/_______P`$(U>E>@@`10``3CB.``"`$7S(P*@!^<"H`?\`B0")
-M`#J"=XDA`1```0```````"!%0D9#14-%1D5*1D5&1$5(1D-&1D9!1D%%1D-!
-M0T%"3```(``!"E5@0,@N#`#S````\P```/_______P`$(U>E>@@`10``Y3B/
-M``"`$7PPP*@!^<"H`?\`B@"*`-'GIA$.B2+`J`'Y`(H`NP``($5%14M&041*
-M1$9&1$1!14M#04-!0T%#04-!0T%#04-!`"!%0D9#14-%1D5*1D5&1$5(1D-&
-M1D9!1D%%1D-!0T%"3P#_4TU")0``````````````````````````````````
-M`!$``"$```````````#H`P``````````(0!6``,``0````(`,@!<34%)3%-,
-M3U1<0E)/5U-%``\`@/P*`$1*4#DU4S!*``!R`&\`<P`%`0,0!0`/`56J``U5
-M8$!5%0<`7````%P```#_______\`!"-7I7H(`$4``$XXE```@!%\PL"H`?G`
-MJ`'_`(D`B0`Z@G")*`$0``$````````@14)&0T5#149%2D9%1D1%2$9#1D9&
-M049!149#04-!0DP``"```0Y58$`>10,`7````%P```#_______\`!"-7I7H(
-M`$4``$XXE0``@!%\P<"H`?G`J`'_`(D`B0`Z@G")*`$0``$````````@14)&
-M0T5#149%2D9%1D1%2$9#1D9&049!149#04-!0DP``"```0Y58$!0N`X`7```
-M`%P```#_______\`!"-7I7H(`$4``$XXE@``@!%\P,"H`?G`J`'_`(D`B0`Z
-M@G")*`$0``$````````@14)&0T5#149%2D9%1D1%2$9#1D9&049!149#04-!
-M0DP``"```0]58$#*.`<`*@```"H```#_______\`!"-7I7H(!@`!"``&!``!
-M``0C5Z5ZP*@!^0```````,"H`0$/56!`%UD'`#P````\``````0C5Z5Z``V(
-M3R61"`8``0@`!@0``@`-B$\ED<"H`0$`!"-7I7K`J`'Y````````````````
-M````````#U5@0"E9!P!6`0``5@$````-B$\ED0`$(U>E>@@`10`!2#B7``"`
-M$7S#P*@!^<"H`0$`1`!#`31YVP$!!@#(+24]CP&``,"H`?D`````````````
-M````!"-7I7H`````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````8X)38S4!!S8$P*@!`3T'
-M`0`$(U>E>O\`````````````````````````````````````````````````
-M``````]58$`6@0D`/````#P`````!"-7I7H`#,Z(,9J(C@$```4!`0`%`0``
-M```````````````````````````````````````````````/56!`"BL*`%8!
-M``!6`0``________``0C5Z5Z"`!%``%(.)\``(`1`0<`````_____P!$`$,!
-M-,&K`0$&`)@7ASP````````````````````````````$(U>E>@``````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````!C@E-C-0$!=`$!/0<!``0C5Z5Z,@3`J`'Y#`A$2E`Y
-M-5,P2CP(35-&5"`U+C`W"P$/`P8L+B\?(?DK_P``````#U5@0![^#`!6`0``
-M5@$``/_______P`$(U>E>@@`10`!2#BA``"`$0$%`````/____\`1`!#`32.
-MS0$!!@#5`WTN````````````````````````````!"-7I7H`````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````8X)38S4!`70!`3T'`0`$(U>E>C($P*@!^0P(1$I0.353
-M,$H\"$U31E0@-2XP-PL!#P,&+"XO'R'Y*_\``````!!58$"$8P(`$P```!,`
-M````#,Z(,9H`!"-7I7J(C@$!````$%5@0.IK`@`\````/``````$(U>E>@`,
-MSH@QFHB.`0``!0$"``4!````````````````````````````````````````
-M`````````!%58$!>L`L`/P```#\`````#,Z(,9H`!"-7I7J(C@$``"T"`@`M
-M`3$R.34P,C,X,C`P,#4S.3%`;6YC,#(S+FUC8S(Y-2YO=VQA;BYO<F<156!`
-M81`,`#P````\``````0C5Z5Z``S.B#&:B(X!```4`1``%!(*```/`@`"``$`
-M`!$!`0``````````````````````````````$55@0,VL#`!>````7@`````,
-MSH@QF@`$(U>E>HB.`0``3`(0`$P2"@``#@L`*#$R.34P,C,X,C`P,#4S.3%`
-M;6YC,#(S+FUC8S(Y-2YO=VQA;BYO<F<'!0``XM+Y<LO)&X'VQ\&EG)_*XA`!
-M``$156!`P?(,`&(```!B``````0C5Z5Z``S.B#&:B(X!``!0`1$`4!(+```!
-M#0``,````````````````````#$````````````````````R````````````
-M````````"P4``.OTCH!BE[/.*TUX]HB,9O8256!`LQD*`"X````N``````S.
-MB#&:``0C5Z5ZB(X!```<`A$`'!(+```+!0``#*NYLZ2O7U"%636?B,5I[A)5
-M8$`H=0H`/````#P`````!"-7I7H`#,Z(,9J(C@$```0#```$````````````
-M```````````````````````````````````````256!`%GD*`$L```!+````
-M``0C5Z5Z``S.B#&:B(X!`P`Y`0`-``!`8%41`)MJNAB%#R>L.*X:RH)3A8\F
-M`ET1,5U'QWV%1Z`@V,N=24.:\=%3TKI<SV/#HB:X$E5@0$Y\"@`^````/@``
-M```$(U>E>@`,SH@QFHB.`0,`+`$`#0``0&!5$0"<E?@]+KE3IY6RR"$-=DAO
-M3H-QX7H>=&X[D=]]>4;W^,JD$U5@0*@!#0!6`0``5@$``/_______P`$(U>E
-M>@@`10`!2#BG``"`$0#_`````/____\`1`!#`30ES`$!!@#5`WTN:0$`````
-M````````````````````!"-7I7H`````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````8X)3
-M8S4!`70!`3T'`0`$(U>E>C($P*@!^0P(1$I0.353,$H\"$U31E0@-2XP-PL!
-M#P,&+"XO'R'Y*_\``````!I58$#O`@T`5@$``%8!``#_______\`!"-7I7H(
-M`$4``4@XKP``@!$`]P````#_____`$0`0P$T)<P!`08`U0-]+FD!````````
-M``````````````````0C5Z5Z````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````````````&."4V,U
-M`0%T`0$]!P$`!"-7I7HR!,"H`?D,"$1*4#DU4S!*/`A-4T94(#4N,#<+`0\#
-M!BPN+Q\A^2O_```````J56!`^P(-`%8!``!6`0``________``0C5Z5Z"`!%
-M``%(.+(``(`1`/0`````_____P!$`$,!-"7,`0$&`-4#?2YI`0``````````
-M```````````````$(U>E>@``````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``````````````````````````````````````````````````!C@E-C-0$!
-M=`$!/0<!``0C5Z5Z,@3`J`'Y#`A$2E`Y-5,P2CP(35-&5"`U+C`W"P$/`P8L
-M+B\?(?DK_P``````,%5@0.B$"@`3````$P`````,SH@QF@`$(U>E>HB.`0$`
-M```P56!`^J$*`#P````\``````0C5Z5Z``S.B#&:B(X!```%`0,`!0$`````
-M````````````````````````````````````````````,%5@0)SA"@`_````
-M/P`````,SH@QF@`$(U>E>HB.`0``+0(#`"T!,3(Y-3`R,S@R,#`P-3,Y,4!M
-M;F,P,C,N;6-C,CDU+F]W;&%N+F]R9S!58$#0!`P`/````#P`````!"-7I7H`
-M#,Z(,9J(C@$``!0!+P`4$@H```\"``(``0``$0$!````````````````````
-M```````````R56!`-$(%`%X```!>``````S.B#&:``0C5Z5ZB(X!``!,`B\`
-M3!(*```."P`H,3(Y-3`R,S@R,#`P-3,Y,4!M;F,P,C,N;6-C,CDU+F]W;&%N
-M+F]R9P<%``#7H!![\\SE,P[&']$W6C<%$`$``3)58$#,.`<`8@```&(`````
-M!"-7I7H`#,Z(,9J(C@$``%`!,`!0$@L```$-```P````````````````````
-M,0```````````````````#(````````````````````+!0``0WL?0G!%;49D
-M0(DL@MD'#C-58$!S4P(`+@```"X`````#,Z(,9H`!"-7I7J(C@$``!P",``<
-M$@L```L%``!%[_\P8H+&6U!$B#@$)T-",U5@0"'6`P`\````/``````$(U>E
-M>@`,SH@QFHB.`0``!`,```0`````````````````````````````````````
-M`````````````#-58$!=V@,`2P```$L`````!"-7I7H`#,Z(,9J(C@$#`#D!
-M``T``$!@53$`G7]!<++?0.3Y>#A83O[YHHT"0T@&N\)FL/6P9NHATX%<E?[@
-M45S@"_@>BIRI%B`S56!`F-T#`#X````^``````0C5Z5Z``S.B#&:B(X!`P`L
-M`0`-``!`8%4Q`)[N$`!R;$K*.XLG`JO9N"A#@XK>5*[_:U"C]E[O?""IR!5+
-M56!`]Q(-`"H````J````________``0C5Z5Z"`8``0@`!@0``0`$(U>E>JG^
-M0\(```````"I_D/"2U5@0'&!#0`J````*@```/_______P`$(U>E>@@&``$(
-M``8$``$`!"-7I7JI_D/"````````J?Y#PDQ58$`X@@T`*@```"H```#_____
-M__\`!"-7I7H(!@`!"``&!``!``0C5Z5ZJ?Y#P@```````*G^0\)-56!`*=H-
-M`*\```"O`````0!>?__Z``0C5Z5Z"`!%``"A.+X```$1HM.I_D/"[___^A#+
-M!VP`C6+X32U314%20T@@*B!(5%10+S$N,0T*2&]S=#HR,SDN,C4U+C(U-2XR
-M-3`Z,3DP,`T*4U0Z=7)N.G-C:&5M87,M=7!N<"UO<F<Z9&5V:6-E.DEN=&5R
-M;F5T1V%T97=A>41E=FEC93HQ#0I-86XZ(G-S9'`Z9&ES8V]V97(B#0I-6#HS
-M#0H-"DU58$"\Y`T`-@```#8````!`%X``!8`!"-7I7H(`$8``"@XP````0(>
-M.:G^0\+@```6E`0``"(`Z@,````!!````.____I-56!`OK4.`&X```!N````
-M________``0C5Z5Z"`!%``!@.,(``(`1:@RI_D/"J?[__P")`(D`3+4(B2XI
-M$``!```````!($5%14M&041*1$9&1$1!14M#04-!0T%#04-!0T%#04%!```@
-M``'`#``@``$`!)/@``9@`*G^0\).56!`!H\*`#8````V`````0!>```6``0C
-M5Z5Z"`!&```H.,0```$"'C6I_D/"X```%I0$```B`.H#`````00```#O___Z
-M3E5@0!3E"@!N````;@```/_______P`$(U>E>@@`10``8#C%``"`$6H)J?Y#
-MPJG^__\`B0")`$RU"(DN*1```0```````2!%145+1D%$2D1&1D1$045+0T%#
-M04-!0T%#04-!0T%!00``(``!P`P`(``!``23X``&8`"I_D/"3U5@0#,6!P!N
-M````;@```/_______P`$(U>E>@@`10``8#C&``"`$6H(J?Y#PJG^__\`B0")
-M`$RU"(DN*1```0```````2!%145+1D%$2D1&1D1$045+0T%#04-!0T%#04-!
-M0T%!00``(``!P`P`(``!``23X``&8`"I_D/"3U5@0*^U#0!6`0``5@$``/__
-M_____P`$(U>E>@@`10`!2#C'``"`$0#?`````/____\`1`!#`325:P$!!@"2
-M13E.``"`````````````````````````!"-7I7H`````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````8X)38S4!`70!`3T'`0`$(U>E>C($P*@!^0P(1$I0.353,$H\"$U3
-M1E0@-2XP-PL!#P,&+"XO'R'Y*_\``````%!58$`T1P,`;@```&X```#_____
-M__\`!"-7I7H(`$4``&`XR```@!%J!JG^0\*I_O__`(D`B0!,M@B)+B@0``$`
-M``````$@145%2T9!1$I$1D9$1$%%2T-!0T%#04-!0T%#04-!04$``"```<`,
-M`"```0`$D^``!F``J?Y#PE!58$",WPT`KP```*\````!`%Y___H`!"-7I7H(
-M`$4``*$XR@```1&BQZG^0\+O___Z$,L';`"-8OA-+5-%05)#2"`J($A45%`O
-M,2XQ#0I(;W-T.C(S.2XR-34N,C4U+C(U,#HQ.3`P#0I35#IU<FXZ<V-H96UA
-M<RUU<&YP+6]R9SID979I8V4Z26YT97)N971'871E=V%Y1&5V:6-E.C$-"DUA
-M;CHB<W-D<#ID:7-C;W9E<B(-"DU8.C,-"@T*4%5@0`"\#@!N````;@```/__
-M_____P`$(U>E>@@`10``8#C,``"`$6H"J?Y#PJG^__\`B0")`$PP]8DO*1``
-M`0```````2!%0D9#14-%1D5*1D5&1$5(1D-&1D9!1D%%1D-!0T%!00``(``!
-MP`P`(``!``23X``&X`"I_D/"455@0#/A`P`3````$P`````,SH@QF@`$(U>E
-M>HB.`0$```!156!`8>D#`#P````\``````0C5Z5Z``S.B#&:B(X!```%`00`
-M!0$`````````````````````````````````````````````````455@0+TU
-M!``_````/P`````,SH@QF@`$(U>E>HB.`0``+0($`"T!,3(Y-3`R,S@R,#`P
-M-3,Y,4!M;F,P,C,N;6-C,CDU+F]W;&%N+F]R9U%58$#Y[@4`/````#P`````
-M!"-7I7H`#,Z(,9J(C@$``!0!4``4$@H```\"``(``0``$0$!````````````
-M``````````````````!156!`9.L*`&X```!N````________``0C5Z5Z"`!%
-M``!@.,T``(`1:@&I_D/"J?[__P")`(D`3##UB2\I$``!```````!($5"1D-%
-M0T5&14I&149$14A&0T9&1D%&045&0T%#04%!```@``'`#``@``$`!)/@``;@
-M`*G^0\)256!`71P'`&X```!N````________``0C5Z5Z"`!%``!@.,X``(`1
-M:@"I_D/"J?[__P")`(D`3##UB2\I$``!```````!($5"1D-%0T5&14I&149$
-M14A&0T9&1D%&045&0T%#04%!```@``'`#``@``$`!)/@``;@`*G^0\)256!`
-M9[(.`%X```!>``````S.B#&:``0C5Z5ZB(X!``!,`E``3!(*```."P`H,3(Y
-M-3`R,S@R,#`P-3,Y,4!M;F,P,C,N;6-C,CDU+F]W;&%N+F]R9P<%```Z)]TL
-M?V'JYOR&8?J))U]%$`$``5)58$`"$P\`8@```&(`````!"-7I7H`#,Z(,9J(
-MC@$``%`!40!0$@L```$-```P````````````````````,0``````````````
-M`````#(````````````````````+!0``*IFHOZ$\8[TX!>!F]%P6:%-58$!8
-M30,`;@```&X```#_______\`!"-7I7H(`$4``&`XSP``@!%I_ZG^0\*I_O__
-M`(D`B0!,,?6)+R@0``$```````$@14)&0T5#149%2D9%1D1%2$9#1D9&049!
-M149#04-!04$``"```<`,`"```0`$D^``!N``J?Y#PE-58$#M3`H`+@```"X`
-M````#,Z(,9H`!"-7I7J(C@$``!P"40`<$@L```L%``#BE(K>$<9]M,I(_@G,
-MC).Y4U5@0`*="@`\````/``````$(U>E>@`,SH@QFHB.`0``!`,```0`````
-M`````````````````````````````````````````````%-58$#CH`H`2P``
-M`$L`````!"-7I7H`#,Z(,9J(C@$#`#D!``T``$!@55(`GZN0MGOEA8[@4WO*
-M&_11@$@"&2ZIH`.YHY==8)$_%6#R:U/Z"F'14BLDK,Z)I:%356!`&*0*`#X`
-M```^``````0C5Z5Z``S.B#&:B(X!`P`L`0`-``!`8%52`*!&UK1?K<RECIT@
-MY'<O#NGZ@YJ^O,Y@JP;?M,0[/;M1?PY356!`9+H-`%8!``!6`0``________
-M``0C5Z5Z"`!%``%(.-```(`1`-8`````_____P!$`$,!-&QJ`0$&`))%.4XI
-M`8`````````````````````````$(U>E>@``````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M``!C@E-C-0$!=`$!/0<!``0C5Z5Z,@3`J`'Y#`A$2E`Y-5,P2CP(35-&5"`U
-M+C`W"P$/`P8L+B\?(?DK_P``````4U5@0)?A#0"O````KP````$`7G__^@`$
-M(U>E>@@`10``H3C2```!$:*_J?Y#PN____H0RP=L`(UB^$TM4T5!4D-(("H@
-M2%144"\Q+C$-"DAO<W0Z,C,Y+C(U-2XR-34N,C4P.C$Y,#`-"E-4.G5R;CIS
-M8VAE;6%S+75P;G`M;W)G.F1E=FEC93I);G1E<FYE=$=A=&5W87E$979I8V4Z
-M,0T*36%N.B)S<V1P.F1I<V-O=F5R(@T*35@Z,PT*#0I356!`N<(.`&X```!N
-M````________``0C5Z5Z"`!%``!@.-0``(`1:?JI_D/"J?[__P")`(D`3+4$
-MB3`I$``!```````!($5%14M&041*1$9&1$1!14M#04-!0T%#04-!0T%#04-!
-M```@``'`#``@``$`!)/@``9@`*G^0\)356!`V,0.`&X```!N````________
-M``0C5Z5Z"`!%``!@.-4``(`1:?FI_D/"J?[__P")`(D`3"+RB3$I$``!````
-M```!($5"1D-%0T5&14I&149$14A&0T9&1D%&045&0T%#04)/```@``'`#``@
-M``$`!)/@``;@`*G^0\)456!`C/$*`&X```!N````________``0C5Z5Z"`!%
-M``!@.-@``(`1:?:I_D/"J?[__P")`(D`3+4$B3`I$``!```````!($5%14M&
-M041*1$9&1$1!14M#04-!0T%#04-!0T%#04-!```@``'`#``@``$`!)/@``9@
-M`*G^0\)456!`4?4*`&X```!N````________``0C5Z5Z"`!%``!@.-D``(`1
-M:?6I_D/"J?[__P")`(D`3"+RB3$I$``!```````!($5"1D-%0T5&14I&149$
-M14A&0T9&1D%&045&0T%#04)/```@``'`#``@``$`!)/@``;@`*G^0\)556!`
-MB2('`&X```!N````________``0C5Z5Z"`!%``!@.-H``(`1:?2I_D/"J?[_
-M_P")`(D`3+4$B3`I$``!```````!($5%14M&041*1$9&1$1!14M#04-!0T%#
-M04-!0T%#04-!```@``'`#``@``$`!)/@``9@`*G^0\)556!`328'`&X```!N
-M````________``0C5Z5Z"`!%``!@.-L``(`1:?.I_D/"J?[__P")`(D`3"+R
-MB3$I$``!```````!($5"1D-%0T5&14I&149$14A&0T9&1D%&045&0T%#04)/
-M```@``'`#``@``$`!)/@``;@`*G^0\)656!`?%,#`&X```!N````________
-M``0C5Z5Z"`!%``!@.-P``(`1:?*I_D/"J?[__P")`(D`3+8$B3`H$``!````
-M```!($5%14M&041*1$9&1$1!14M#04-!0T%#04-!0T%#04-!```@``'`#``@
-M``$`!)/@``9@`*G^0\)656!`1E<#`&X```!N````________``0C5Z5Z"`!%
-M``!@.-T``(`1:?&I_D/"J?[__P")`(D`3"/RB3$H$``!```````!($5"1D-%
-M0T5&14I&149$14A&0T9&1D%&045&0T%#04)/```@``'`#``@``$`!)/@``;@
-M`*G^0\)656!`R<P.`-T```#=````________``0C5Z5Z"`!%``#/..,``(`1
-M:7RI_D/"J?[__P"*`(H`NPE!$0Z),JG^0\(`B@"E```@145%2T9!1$I$1D9$
-M1$%%2T-!0T%#04-!0T%#04-!04$`($5"1D-%0T5&14I&149$14A&0T9&1D%&
-M045&0T%#04).`/]334(E````````````````````````````````````$0``
-M"P```````````.@#```````````+`%8``P`!``$``@`<`%Q-04E,4TQ/5%Q"
-M4D]74T4``@!$2E`Y-5,P2@!656!`W<T.`/,```#S````________``0C5Z5Z
-M"`!%``#E..0``(`1:66I_D/"J?[__P"*`(H`T1`"$0Z),ZG^0\(`B@"[```@
-M145%2T9!1$I$1D9$1$%%2T-!0T%#04-!0T%#04-!0T$`($5"1D-%0T5&14I&
-M149$14A&0T9&1D%&045&0T%#04).`/]334(E````````````````````````
-M````````````$0``(0```````````.@#```````````A`%8``P`!`````@`R
-M`%Q-04E,4TQ/5%Q"4D]74T4``0"`_`H`1$I0.353,$H````````!``4!`Q`!
-M``\!5:H`6%5@0+\L!P#=````W0```/_______P`$(U>E>@@`10``SSCF``"`
-M$6EYJ?Y#PJG^__\`B@"*`+L)/1$.B3:I_D/"`(H`I0``($5%14M&041*1$9&
-M1$1!14M#04-!0T%#04-!0T%#04%!`"!%0D9#14-%1D5*1D5&1$5(1D-&1D9!
-M1D%%1D-!0T%"3@#_4TU")0```````````````````````````````````!$`
-M``L```````````#H`P``````````"P!6``,``0`!``(`'`!<34%)3%-,3U1<
-M0E)/5U-%``(`1$I0.353,$H`655@0.K0#@#=````W0```/_______P`$(U>E
-M>@@`10``SSCG``"`$6EXJ?Y#PJG^__\`B@"*`+L)/!$.B3>I_D/"`(H`I0``
-M($5%14M&041*1$9&1$1!14M#04-!0T%#04-!0T%#04%!`"!%0D9#14-%1D5*
-M1D5&1$5(1D-&1D9!1D%%1D-!0T%"3@#_4TU")0``````````````````````
-M`````````````!$```L```````````#H`P``````````"P!6``,``0`!``(`
-M'`!<34%)3%-,3U1<0E)/5U-%``(`1$I0.353,$H`6U5@0-@R!P#=````W0``
-M`/_______P`$(U>E>@@`10``SSCH``"`$6EWJ?Y#PJG^__\`B@"*`+L).Q$.
-MB3BI_D/"`(H`I0``($5%14M&041*1$9&1$1!14M#04-!0T%#04-!0T%#04%!
-M`"!%0D9#14-%1D5*1D5&1$5(1D-&1D9!1D%%1D-!0T%"3@#_4TU")0``````
-M`````````````````````````````!$```L```````````#H`P``````````
-M"P!6``,``0`!``(`'`!<34%)3%-,3U1<0E)/5U-%``(`1$I0.353,$H`7%5@
-M0"2]#0!6`0``5@$``/_______P`$(U>E>@@`10`!2#CI``"`$0"]`````/__
-M__\`1`!#`31L:@$!!@"213E.*0&`````````````````````````!"-7I7H`
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````8X)38S4!`70!`3T'`0`$(U>E>C($P*@!
-M^0P(1$I0.353,$H\"$U31E0@-2XP-PL!#P,&+"XO'R'Y*_\``````%Q58$`#
-MUPX`Z0```.D```#_______\`!"-7I7H(`$4``-LXZ@``@!%I::G^0\*I_O__
-M`(H`B@#';@L1#HDYJ?Y#P@"*`+$``"!%145+1D%$2D1&1D1$045+0T%#04-!
-M0T%#04-!0T%!00`@14)&0T5#149%2D9%1D1%2$9#1D9&049!149#04-!0D\`
-M_U--0B4````````````````````````````````````1```7````````````
-MZ`,``````````!<`5@`#``$``0`"`"@`7$U!24Q33$]47$)23U=310`(`2`/
-M`1!9L1D5`````$1*4#DU4S!*`%U58$#/UPX`Z0```.D```#_______\`!"-7
-MI7H(`$4``-LXZP``@!%I:*G^0\*I_O__`(H`B@#';@H1#HDZJ?Y#P@"*`+$`
-M`"!%145+1D%$2D1&1D1$045+0T%#04-!0T%#04-!0T%!00`@14)&0T5#149%
-M2D9%1D1%2$9#1D9&049!149#04-!0D\`_U--0B4`````````````````````
-M```````````````1```7````````````Z`,``````````!<`5@`#``$``0`"
-M`"@`7$U!24Q33$]47$)23U=310`(`2`/`1!9L1D5`````$1*4#DU4S!*`%Y5
-M8$"+V`X`Z0```.D```#_______\`!"-7I7H(`$4``-LX[```@!%I9ZG^0\*I
-M_O__`(H`B@#';@D1#HD[J?Y#P@"*`+$``"!%145+1D%$2D1&1D1$045+0T%#
-M04-!0T%#04-!0T%!00`@14)&0T5#149%2D9%1D1%2$9#1D9&049!149#04-!
-M0D\`_U--0B4````````````````````````````````````1```7````````
-M````Z`,``````````!<`5@`#``$``0`"`"@`7$U!24Q33$]47$)23U=310`(
-M`2`/`1!9L1D5`````$1*4#DU4S!*`%]58$!)V0X`Z0```.D```#_______\`
-M!"-7I7H(`$4``-LX[0``@!%I9JG^0\*I_O__`(H`B@#';@@1#HD\J?Y#P@"*
-M`+$``"!%145+1D%$2D1&1D1$045+0T%#04-!0T%#04-!0T%!00`@14)&0T5#
-M149%2D9%1D1%2$9#1D9&049!149#04-!0D\`_U--0B4`````````````````
-M```````````````````1```7````````````Z`,``````````!<`5@`#``$`
-M`0`"`"@`7$U!24Q33$]47$)23U=310`(`2`/`1!9L1D5`````$1*4#DU4S!*
-M`&!58$"CV@X`;@```&X```#_______\`!"-7I7H(`$4``&`X[@``@!%IX*G^
-M0\*I_O__`(D`B0!,H^:)/2D0``$```````$@14)&0T5#149%2D9%1D1%2$9#
-M1D9&049!149#04-!0DX``"```<`,`"```0`$D^``!F``J?Y#PF%58$#F"@L`
-M;@```&X```#_______\`!"-7I7H(`$4``&`X[P``@!%IWZG^0\*I_O__`(D`
-MB0!,H^:)/2D0``$```````$@14)&0T5#149%2D9%1D1%2$9#1D9&049!149#
-M04-!0DX``"```<`,`"```0`$D^``!F``J?Y#PF)58$#?.P<`;@```&X```#_
-M______\`!"-7I7H(`$4``&`X\```@!%IWJG^0\*I_O__`(D`B0!,H^:)/2D0
-M``$```````$@14)&0T5#149%2D9%1D1%2$9#1D9&049!149#04-!0DX``"``
-M`<`,`"```0`$D^``!F``J?Y#PF-58$#9;`,`;@```&X```#_______\`!"-7
-MI7H(`$4``&`X\P``@!%IVZG^0\*I_O__`(D`B0!,I.:)/2@0``$```````$@
-M14)&0T5#149%2D9%1D1%2$9#1D9&049!149#04-!0DX``"```<`,`"```0`$
-MD^``!F``J?Y#PF-58$"'X`X`;@```&X```#_______\`!"-7I7H(`$4``&`X
-M]```@!%IVJG^0\*I_O__`(D`B0!,Z>R)/BD0``$```````$@04)!0T901E!%
-M3D9$14-&0T501DA&1$5&1E!&4$%#04(``"```<`,`"```0`$D^``!N``J?Y#
-MPF158$`/$0L`;@```&X```#_______\`!"-7I7H(`$4``&`X]0``@!%IV:G^
-M0\*I_O__`(D`B0!,Z>R)/BD0``$```````$@04)!0T901E!%3D9$14-&0T50
-M1DA&1$5&1E!&4$%#04(``"```<`,`"```0`$D^``!N``J?Y#PF558$`&0@<`
-M;@```&X```#_______\`!"-7I7H(`$4``&`X]@``@!%IV*G^0\*I_O__`(D`
-MB0!,Z>R)/BD0``$```````$@04)!0T901E!%3D9$14-&0T501DA&1$5&1E!&
-M4$%#04(``"```<`,`"```0`$D^``!N``J?Y#PF958$#^<@,`;@```&X```#_
-M______\`!"-7I7H(`$4``&`X]P``@!%IUZG^0\*I_O__`(D`B0!,ZNR)/B@0
-M``$```````$@04)!0T901E!%3D9$14-&0T501DA&1$5&1E!&4$%#04(``"``
-M`<`,`"```0`$D^``!N``J?Y#PF958$!_Y@X`W0```-T```#_______\`!"-7
-MI7H(`$4``,\X^```@!%I9ZG^0\*I_O__`(H`B@"[%C41#HD_J?Y#P@"*`*4`
-M`"!%145+1D%$2D1&1D1$045+0T%#04-!0T%#04-!0T%!00`@14)&0T5#149%
-M2D9%1D1%2$9#1D9&049!149#04-!04$`_U--0B4`````````````````````
-M```````````````1```+````````````Z`,```````````L`5@`#``$``0`"
-M`!P`7$U!24Q33$]47$)23U=310`"`$1*4#DU4S!*`&958$!AYPX`W0```-T`
-M``#_______\`!"-7I7H(`$4``,\X^0``@!%I9JG^0\*I_O__`(H`B@"[SSH1
-M#HE`J?Y#P@"*`*4``"!%145+1D%$2D1&1D1$045+0T%#04-!0T%#04-!0T%!
-M00`@04)!0T901E!%3D9$14-&0T501DA&1$5&1E!&4$%#04(`_U--0B4`````
-M```````````````````````````````1```+````````````Z`,`````````
-M``L`5@`#``$``0`"`!P`7$U!24Q33$]47$)23U=310`"`$1*4#DU4S!*`&95
-M8$!PZ@X`^P```/L```#_______\`!"-7I7H(`$4``.TX^@``@!%I1ZG^0\*I
-M_O__`(H`B@#9)2,1#HE!J?Y#P@"*`,,``"!%145+1D%$2D1&1D1$045+0T%#
-M04-!0T%#04-!0T%!00`@04)!0T901E!%3D9$14-&0T501DA&1$5&1E!&4$%#
-M04(`_U--0B4````````````````````````````````````1```I````````
-M````Z`,``````````"D`5@`#``$``0`"`#H`7$U!24Q33$]47$)23U=310`,
-M`&#J``!!4D)%25131U)54%!%``$``PH`$`"`;/[%!D1*4#DU4S!*`&958$"4
-M\`X`7````%P```#_______\`!"-7I7H(`$4``$XX^P``@!%IY:G^0\*I_O__
-M`(D`B0`Z;]^)0P$0``$````````@14)&0T5#149%2D9%1D1%2$9#1D9&049!
-M149#04-!0DP``"```6=58$`('PL`7````%P```#_______\`!"-7I7H(`$4`
-M`$XX_```@!%IY*G^0\*I_O__`(D`B0`Z;]^)0P$0``$````````@14)&0T5#
-M149%2D9%1D1%2$9#1D9&049!149#04-!0DP``"```6A58$`&4`<`7````%P`
-M``#_______\`!"-7I7H(`$4``$XX_0``@!%IXZG^0\*I_O__`(D`B0`Z;]^)
-M0P$0``$````````@14)&0T5#149%2D9%1D1%2$9#1D9&049!149#04-!0DP`
-M`"```6M58$"J6P<`7````%P```#_______\`!"-7I7H(`$4``$XY`0``@!%I
-MWZG^0\*I_O__`(D`B0`Z;]N)1P$0``$````````@14)&0T5#149%2D9%1D1%
-M2$9#1D9&049!149#04-!0DP``"```6Q58$`-BP,`7````%P```#_______\`
-M!"-7I7H(`$4``$XY`@``@!%IWJG^0\*I_O__`(D`B0`Z;]N)1P$0``$`````
-M```@14)&0T5#149%2D9%1D1%2$9#1D9&049!149#04-!0DP``"```6Q58$!%
-M_@X`7````%P```#_______\`!"-7I7H(`$4``$XY!```@!%IW*G^0\*I_O__
-M`(D`B0`Z;]N)1P$0``$````````@14)&0T5#149%2D9%1D1%2$9#1D9&049!
-M149#04-!0DP``"```6U58$`7O@T`5@$``%8!``#_______\`!"-7I7H(`$4`
-M`4@Y!@``@!$`H`````#_____`$0`0P$T;&H!`08`DD4Y3BD!@```````````
-M``````````````0C5Z5Z````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````````````````&."4V,U`0%T
-M`0$]!P$`!"-7I7HR!,"H`?D,"$1*4#DU4S!*/`A-4T94(#4N,#<+`0\#!BPN
-M+Q\A^2O_``````!Q56!`]:$*`!,````3``````S.B#&:``0C5Z5ZB(X!`0``
-M`'%58$!%P`H`/````#P`````!"-7I7H`#,Z(,9J(C@$```4!!0`%`0``````
-M``````````````````````````````````````````!Q56!`C?4*`#\````_
-M``````S.B#&:``0C5Z5ZB(X!```M`@4`+0$Q,CDU,#(S.#(P,#`U,SDQ0&UN
-M8S`R,RYM8V,R.34N;W=L86XN;W)G<55@0/XV"P`\````/``````$(U>E>@`,
-MSH@QFHB.`0``%`%P`!02"@``#P(``@`!```1`0$`````````````````````
-M`````````')58$#=.0P`\P```/,```#_______\`!"-7I7H(`$4``.4Y#```
-M@!%I/:G^0\*I_O__`(H`B@#1\^D1#HE*J?Y#P@"*`+L``"!%145+1D%$2D1&
-M1D1$045+0T%#04-!0T%#04-!0T%#00`@14)&0T5#149%2D9%1D1%2$9#1D9&
-M049!149#04-!0D\`_U--0B4````````````````````````````````````1
-M```A````````````Z`,``````````"$`5@`#``$````"`#(`7$U!24Q33$]4
-M7$)23U=310`/`(#\"@!$2E`Y-5,P2@``60!<`%4`!0$#$`4`#P%5J@!S56!`
-MJ'L$`%X```!>``````S.B#&:``0C5Z5ZB(X!``!,`G``3!(*```."P`H,3(Y
-M-3`R,S@R,#`P-3,Y,4!M;F,P,C,N;6-C,CDU+F]W;&%N+F]R9P<%```)[DNV
-M]<TYOH8?&=*L`<`&$`$``7-58$#3Q`0`8@```&(`````!"-7I7H`#,Z(,9J(
-MC@$``%`!<0!0$@L```$-```P````````````````````,0``````````````
-M`````#(````````````````````+!0``4,1=:28,Y[A5';!-.W&=A7-58$"#
-M.0\`+@```"X`````#,Z(,9H`!"-7I7J(C@$``!P"<0`<$@L```L%``#,G3O*
-M(MF[ZP#.U#83NT:1=%5@0#-7```\````/``````$(U>E>@`,SH@QFHB.`0``
-M!`,```0``````````````````````````````````````````````````'15
-M8$`G6P``2P```$L`````!"-7I7H`#,Z(,9J(C@$#`#D!``T``$!@57(`H7=G
-MF]`<U=:Q_.ODF.0!O^<"RF-&L(?"6]$(GK,%9)J4;"'MPR]@Y#?:1B?;0,UT
-M56!`55X``#X````^``````0C5Z5Z``S.B#&:B(X!`P`L`0`-``!`8%5R`*(I
-@:.4"VF#:A*@Q;&CP#+\$@]3C#=%3<0P&M\#VWIK`IL$`
-`
-end
diff --git a/contrib/tcpdump/tests/eapon1.sh b/contrib/tcpdump/tests/eapon1.sh
deleted file mode 100755
index 1c8aa63..0000000
--- a/contrib/tcpdump/tests/eapon1.sh
+++ /dev/null
@@ -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
-
diff --git a/contrib/tcpdump/tests/eapon2.puu b/contrib/tcpdump/tests/eapon2.puu
deleted file mode 100644
index 70abb23..0000000
--- a/contrib/tcpdump/tests/eapon2.puu
+++ /dev/null
@@ -1,66 +0,0 @@
-begin 644 eapon2.pcap
-MU,.RH0(`!````````````&`````!````_E1@0(0`#`!"````0@`````+VY#]
-M`@#@3UR$8`@`11``-"500``W!O$4U8'_>L&:EKBMN@`6*6Y2?^.:F>V`$/C@
-M9C@```$!"`H974FMBM15+Q!58$!QG`8`8````.L`````"]N0_0(`X$]<A&`(
-M`$4``-TH'P``]A%NH=6!_WK!FI:X5(X'%`#)!M0!%`#!,KA08YA%<^E.@.W\
-MVGEAG@$J,3(Y-3`R,S@R,#`P-3,Y,4!M;F,P,C,N;6-C,CDU+F\056!``J0&
-M`&````"*```````,!ZR%``O;D/T""`!%``!\``!``$`1#2+!FI:XU8'_>@<4
-M5(X`:)P-"Q0`8$$!<I3L?-I\^CLZZ8W&J$<(!O____X,!@```D`&!@````)/
-M%@$0`!02"@``#P(``@`!$%5@0/N`!P!@````'`$````+VY#]`@#@3UR$8`@`
-M10`!#B@@``#V$6YOU8'_>L&:EKA4C@<4`/I,<`$5`/+M5G/\`0<0G:=Q]S4<
-MM<W1`2HQ,CDU,#(S.#(P,#`U,SDQ0&UN8S`R,RYM8V,R.34N;Q!58$"?AP<`
-M8````,8```````P'K(4`"]N0_0((`$4``+@``4``0!$,Y<&:EKC5@?]Z!Q14
-MC@"D*@T+%0"<GZ@ST?&@X&3DA[P+.!KY+@@&_____@P&```"0`8&`````D]2
-M`1$`4!(+```!#0``,``156!`QP`%`&````#L``````O;D/T"`.!/7(1@"`!%
-M``#>*"$``/81;I[5@?]ZP9J6N%2.!Q0`RHLB`18`PB*WG4W^01LM]B4XN&`'
-M6E(!*C$R.34P,C,X,C`P,#4S.3%`;6YC,#(S+FUC8S(Y-2YO$55@0!P&!0!@
-M````!@$`````#`>LA0`+VY#]`@@`10``^``"0`!`$0RDP9J6N-6!_WH'%%2.
-M`.2>DP(6`-P04TN>&O"\WL%@,.`1V142"`;____^#`8```)`!@8````"&CH`
-M``$W$32`+U<1;LS62B]58$!:H@8`8````.L`````"]N0_0(`X$]<A&`(`$4`
-M`-TH)```]A%NG-6!_WK!FI:X5(X'%`#)G_(!&`#!8I@\,J5DDRGEM>@M>A=G
-MB0$J,3(Y-3`R,S@R,#`P-3,Y,4!M;F,P,C,N;6-C,CDU+F\O56!`G*<&`&``
-M``"*```````,!ZR%``O;D/T""`!%``!\``-``$`1#1_!FI:XU8'_>@<45(X`
-M:#<F"Q@`8$VXJ\Z['F%^RCK?B4C^(6T(!O____X,!@```D`&!@````)/%@$O
-M`!02"@``#P(``@`!,55@0-S/`0!@````'`$````+VY#]`@#@3UR$8`@`10`!
-M#B@E``#V$6YJU8'_>L&:EKA4C@<4`/H2$P$9`/)6HP7H8R0(O<O]:/"4@0=%
-M`2HQ,CDU,#(S.#(P,#`U,SDQ0&UN8S`R,RYM8V,R.34N;S%58$!7U@$`8```
-M`,8```````P'K(4`"]N0_0((`$4``+@`!$``0!$,XL&:EKC5@?]Z!Q14C@"D
-MZ2,+&0"<(Y3XP!`C^NV)J[-Q+PU3"@@&_____@P&```"0`8&`````D]2`3``
-M4!(+```!#0``,``Q56!`$JX-`&````#L``````O;D/T"`.!/7(1@"`!%``#>
-M*"8``/81;IG5@?]ZP9J6N%2.!Q0`R@WC`1H`PCS/?&QHIT8SX.[2#=[S68H!
-M*C$R.34P,C,X,C`P,#4S.3%`;6YC,#(S+FUC8S(Y-2YO,55@0#VS#0!@````
-M!@$`````#`>LA0`+VY#]`@@`10``^``%0`!`$0RAP9J6N-6!_WH'%%2.`.3B
-MMP(:`-S*Z(?9H34)&AB0":D9<!O)"`;____^#`8```)`!@8````"&CH```$W
-M$321P=T3ADE-XU!58$"$D@``8````.L`````"]N0_0(`X$]<A&`(`$4``-TH
-M*```]A%NF-6!_WK!FI:X5(X'%`#)[%H!&P#!PB<W7,;1#%UAF"-V*ORC90$J
-M,3(Y-3`R,S@R,#`P-3,Y,4!M;F,P,C,N;6-C,CDU+F]056!`8I<``&````"*
-M```````,!ZR%``O;D/T""`!%``!\``9``$`1#1S!FI:XU8'_>@<45(X`:#0%
-M"QL`8(N:^N5L(EK&#H6-':U$XV((!O____X,!@```D`&!@````)/%@%0`!02
-M"@``#P(``@`!455@0*VL"0!@````'`$````+VY#]`@#@3UR$8`@`10`!#B@I
-M``#V$6YFU8'_>L&:EKA4C@<4`/KDFP$<`/+H$R8P9(B"W[^G<4!"HKQ+`2HQ
-M,CDU,#(S.#(P,#`U,SDQ0&UN8S`R,RYM8V,R.34N;U%58$"ZL@D`8````,8`
-M``````P'K(4`"]N0_0((`$4``+@`!T``0!$,W\&:EKC5@?]Z!Q14C@"DI=@+
-M'`"<G^$P>;*!>&FY;C?2/)T74`@&_____@P&```"0`8&`````D]2`5$`4!(+
-M```!#0``,`!256!`@SL%`&````#L``````O;D/T"`.!/7(1@"`!%``#>*"H`
-M`/81;I75@?]ZP9J6N%2.!Q0`RI"T`1T`PE:^P6JH@]U$D*!C#8CO0UP!*C$R
-M.34P,C,X,C`P,#4S.3%`;6YC,#(S+FUC8S(Y-2YO4E5@0'M`!0!@````!@$`
-M````#`>LA0`+VY#]`@@`10``^``(0`!`$0R>P9J6N-6!_WH'%%2.`.2<&@(=
-M`-P&]WGHNB++Z0K&A"^B<2S/"`;____^#`8```)`!@8````"&CH```$W$32F
-M=DT@&\D[/G!58$!OW04`8````.L`````"]N0_0(`X$]<A&`(`$4``-TH*P``
-M]A%NE=6!_WK!FI:X5(X'%`#)*:D!'@#!I[D+3?C+./K-`/>AS"W^P0$J,3(Y
-M-3`R,S@R,#`P-3,Y,4!M;F,P,C,N;6-C,CDU+F]P56!`L>(%`&````"*````
-M```,!ZR%``O;D/T""`!%``!\``E``$`1#1G!FI:XU8'_>@<45(X`:`.V"QX`
-M8+P/!*Y!RZ>(/:C.%/A62\((!O____X,!@```D`&!@````)/%@%P`!02"@``
-M#P(``@`!<55@0)*H#@!@````'`$````+VY#]`@#@3UR$8`@`10`!#B@L``#V
-M$6YCU8'_>L&:EKA4C@<4`/JLH@$?`/*.M".D<>M4,KL=.(:"[-F;`2HQ,CDU
-M,#(S.#(P,#`U,SDQ0&UN8S`R,RYM8V,R.34N;W%58$#$K@X`8````,8`````
-M``P'K(4`"]N0_0((`$4``+@`"D``0!$,W,&:EKC5@?]Z!Q14C@"DK7D+'P"<
-MMWVPJO:XC`JEY#15<5U0Z@@&_____@P&```"0`8&`````D]2`7$`4!(+```!
-M#0``,`!R56!`S#4*`&````#L``````O;D/T"`.!/7(1@"`!%``#>*"T``/81
-M;I+5@?]ZP9J6N%2.!Q0`RE>1`2``PK+"]?UCV]G1I<-+X16?0+L!*C$R.34P
-M,C,X,C`P,#4S.3%`;6YC,#(S+FUC8S(Y-2YO<E5@0,,Z"@!@````!@$`````
-M#`>LA0`+VY#]`@@`10``^``+0`!`$0R;P9J6N-6!_WH'%%2.`.1M%P(@`-PJ
-M=?H'6<1=UD&:FRVA,V+S"`;____^#`8```)`!@8````"&CH```$W$32RVRE=
-$I%P\00``
-`
-end
diff --git a/contrib/tcpdump/tests/esp-secrets.txt b/contrib/tcpdump/tests/esp-secrets.txt
deleted file mode 100644
index 81847a0..0000000
--- a/contrib/tcpdump/tests/esp-secrets.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-# a comment
-
-0x12345678@192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840
-0xabcdabcd@192.0.1.1 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043
-0xd1234567@192.1.2.45 aes256-cbc-hmac96:0xaaaabbbbccccdddd4043434545464649494a4a4c4c4f4f515152525454575758
diff --git a/contrib/tcpdump/tests/esp0.out b/contrib/tcpdump/tests/esp0.out
deleted file mode 100644
index a0ddf1b..0000000
--- a/contrib/tcpdump/tests/esp0.out
+++ /dev/null
@@ -1,8 +0,0 @@
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x1), length 116
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x2), length 116
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x3), length 116
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x4), length 116
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x5), length 116
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x6), length 116
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x7), length 116
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x8), length 116
diff --git a/contrib/tcpdump/tests/esp0.sh b/contrib/tcpdump/tests/esp0.sh
deleted file mode 100644
index daf407c..0000000
--- a/contrib/tcpdump/tests/esp0.sh
+++ /dev/null
@@ -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
-
-
diff --git a/contrib/tcpdump/tests/esp1.gdbinit b/contrib/tcpdump/tests/esp1.gdbinit
deleted file mode 100644
index 6c8ae89..0000000
--- a/contrib/tcpdump/tests/esp1.gdbinit
+++ /dev/null
@@ -1 +0,0 @@
-set args -t -n -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758" -r 02-sunrise-sunset-esp.pcap
diff --git a/contrib/tcpdump/tests/esp1.out b/contrib/tcpdump/tests/esp1.out
deleted file mode 100644
index 61b2967..0000000
--- a/contrib/tcpdump/tests/esp1.out
+++ /dev/null
@@ -1,8 +0,0 @@
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x1), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1280, length 64 (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x2), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1536, length 64 (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x3), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1792, length 64 (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x4), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2048, length 64 (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x5), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2304, length 64 (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x6), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2560, length 64 (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x7), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2816, length 64 (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x8), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 3072, length 64 (ipip-proto-4)
diff --git a/contrib/tcpdump/tests/esp1.sh b/contrib/tcpdump/tests/esp1.sh
deleted file mode 100644
index 87ee3b9..0000000
--- a/contrib/tcpdump/tests/esp1.sh
+++ /dev/null
@@ -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
-
diff --git a/contrib/tcpdump/tests/esp2.gdbinit b/contrib/tcpdump/tests/esp2.gdbinit
deleted file mode 100644
index 7c18407..0000000
--- a/contrib/tcpdump/tests/esp2.gdbinit
+++ /dev/null
@@ -1 +0,0 @@
-set args -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
diff --git a/contrib/tcpdump/tests/esp2.out b/contrib/tcpdump/tests/esp2.out
deleted file mode 100644
index a829c8e..0000000
--- a/contrib/tcpdump/tests/esp2.out
+++ /dev/null
@@ -1,8 +0,0 @@
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x1), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x1), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1280, length 64 (ipip-proto-4) (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x2), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x2), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1536, length 64 (ipip-proto-4) (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x3), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x3), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1792, length 64 (ipip-proto-4) (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x4), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x4), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2048, length 64 (ipip-proto-4) (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x5), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x5), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2304, length 64 (ipip-proto-4) (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x6), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x6), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2560, length 64 (ipip-proto-4) (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x7), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x7), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2816, length 64 (ipip-proto-4) (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0x12345678,seq=0x8), length 172: IP 192.1.2.23 > 192.0.1.1: ESP(spi=0xabcdabcd,seq=0x8), length 116: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 3072, length 64 (ipip-proto-4) (ipip-proto-4)
diff --git a/contrib/tcpdump/tests/esp2.sh b/contrib/tcpdump/tests/esp2.sh
deleted file mode 100644
index 18a7083..0000000
--- a/contrib/tcpdump/tests/esp2.sh
+++ /dev/null
@@ -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
-
diff --git a/contrib/tcpdump/tests/esp3.gdbinit b/contrib/tcpdump/tests/esp3.gdbinit
deleted file mode 100644
index 7150118..0000000
--- a/contrib/tcpdump/tests/esp3.gdbinit
+++ /dev/null
@@ -1 +0,0 @@
-set args -t -n -E "3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840" -r 08-sunrise-sunset-esp2.pcap
diff --git a/contrib/tcpdump/tests/esp3.sh b/contrib/tcpdump/tests/esp3.sh
deleted file mode 100644
index 122beab..0000000
--- a/contrib/tcpdump/tests/esp3.sh
+++ /dev/null
@@ -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
-
diff --git a/contrib/tcpdump/tests/esp4.gdbinit b/contrib/tcpdump/tests/esp4.gdbinit
deleted file mode 100644
index 8007444..0000000
--- a/contrib/tcpdump/tests/esp4.gdbinit
+++ /dev/null
@@ -1,2 +0,0 @@
-set args -t -n -E "file esp-secrets.txt" -r 08-sunrise-sunset-esp2.pcap
-
diff --git a/contrib/tcpdump/tests/esp4.sh b/contrib/tcpdump/tests/esp4.sh
deleted file mode 100644
index bba26e7..0000000
--- a/contrib/tcpdump/tests/esp4.sh
+++ /dev/null
@@ -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
-
diff --git a/contrib/tcpdump/tests/esp5.gdbinit b/contrib/tcpdump/tests/esp5.gdbinit
deleted file mode 100644
index 2f578e3..0000000
--- a/contrib/tcpdump/tests/esp5.gdbinit
+++ /dev/null
@@ -1,3 +0,0 @@
-set args -t -n -E "file esp-secrets.txt" -r 08-sunrise-sunset-aes.pcap
-
-
diff --git a/contrib/tcpdump/tests/esp5.out b/contrib/tcpdump/tests/esp5.out
deleted file mode 100644
index 73f35e0..0000000
--- a/contrib/tcpdump/tests/esp5.out
+++ /dev/null
@@ -1,8 +0,0 @@
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x1), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1280, length 64 (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x2), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1536, length 64 (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x3), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 1792, length 64 (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x4), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2048, length 64 (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x5), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2304, length 64 (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x6), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2560, length 64 (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x7), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 2816, length 64 (ipip-proto-4)
-IP 192.1.2.23 > 192.1.2.45: ESP(spi=0xd1234567,seq=0x8), length 132: IP 192.0.2.1 > 192.0.1.1: ICMP echo request, id 28416, seq 3072, length 64 (ipip-proto-4)
diff --git a/contrib/tcpdump/tests/esp5.sh b/contrib/tcpdump/tests/esp5.sh
deleted file mode 100644
index 405b677..0000000
--- a/contrib/tcpdump/tests/esp5.sh
+++ /dev/null
@@ -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
-
diff --git a/contrib/tcpdump/tests/espudp1.out b/contrib/tcpdump/tests/espudp1.out
deleted file mode 100644
index 8999ff4..0000000
--- a/contrib/tcpdump/tests/espudp1.out
+++ /dev/null
@@ -1,8 +0,0 @@
-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=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
-IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x7), length 116: ip-proto-72 34
-IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x8), length 116: ip-proto-224 59
diff --git a/contrib/tcpdump/tests/espudp1.puu b/contrib/tcpdump/tests/espudp1.puu
deleted file mode 100644
index 353c1c9..0000000
--- a/contrib/tcpdump/tests/espudp1.puu
+++ /dev/null
@@ -1,35 +0,0 @@
-begin 644 espudp1.pcap
-MU,.RH0(`!``````````````&```!``````````````">````G@```!```&1D
-M11```&1D(P@`10``D*8.``!`$5`(P`$"%\`!`BT1E!&4`'P``!(T5G@````!
-MIQI1WARY*2.,3*N>\E4-MV0"Q0&B9RG\CH]Z?F.J2U2J6?9"%WHI),PCC4.T
-MPHU1D2,KT6".3TG`1R:V$E7'FE[]PG%1#\!'O=1;9"P[#Q*U;DU12<9BO$:/
-M(AI2S*,BK5H_YVKC,]K'@[Y^``````````">````G@```!```&1D11```&1D
-M(P@`10``D*8/``!`$5`'P`$"%\`!`BT1E!&4`'P``!(T5G@````"*3$H)*^K
-MG65!9?U^[O>)/*D1"&WNUN@=BGJZV$;E12<$J$SGOAFJ!<5)O%=NY:HY\B$3
-M!*Q.N--U/:_F^;L-H0>[$9AU0\QP"`F5JD8GY307\SDD5=Y\G@%('76R5O`G
-MA/2`=,$VWF]0[L\*``````````">````G@```!```&1D11```&1D(P@`10``
-MD*80``!`$5`&P`$"%\`!`BT1E!&4`'P``!(T5G@````#C]!\R;K$H/YX7>T6
-MZT6>/2I[+Q4&*]7A`VLB)[%A_/MKQMX-:R"-)DA.[G>)\5]KF#Z5:3L+JCMC
-MXDHKBE%/Q%D1VV#=?\3JEZ?8)&[3[(4F"4*0W"B)."[.?0U(7!!Z2_69:0DV
-M98H$8R%=``````````">````G@```!```&1D11```&1D(P@`10``D*81``!`
-M$5`%P`$"%\`!`BT1E!&4`'P``!(T5G@````$FV8=\*GR(@_[&TF2&3'AZ9)Q
-M*?@[(M!I:IE"@-?4W5TEZ-5@(F\613%V19L#%[XCJFJY^G4BVW"O\/*X\!A6
-M@1<[4J(5+60M8]9R>$=\TU>XX7AB7\T'1W1HAPX[(KPTVN"*NEC)E/7@5D_1
-M``````````">````G@```!```&1D11```&1D(P@`10``D*82``!`$5`$P`$"
-M%\`!`BT1E!&4`'P``!(T5G@````%=@CRA49O0D;A1@T5[WR$Q5?Y(\M[>D@C
-MRFK+$5I%Y8:85K`)&LZ.Q@G&N)8-RG@2;GNYJ\2OC9ZV?,IT7HJU7K&DM/1_
-M:K+-8KXY4?22*8=.1@O<,#R&;^R2P`>PAR9E7*>!>3*D24OK4*C1````````
-M``">````G@```!```&1D11```&1D(P@`10``D*83``!`$5`#P`$"%\`!`BT1
-ME!&4`'P``!(T5G@````&OTF+$=SM[Y.=U8E>9V&69R:M\.1&LA]$#9Q^:+E7
-MQE#E^)1R]--?O]SW!%7]KB<7\MLR56^<HT.D."4A5M1LBB7FNX7DP-C$&AH]
-M+':VL$0V)[[KSCAW[YA,>WX)#?)/IJR<_@C91NG`(S^S``````````">````
-MG@```!```&1D11```&1D(P@`10``D*84``!`$5`"P`$"%\`!`BT1E!&4`'P`
-M`!(T5G@````'!12933DTC1RSTN*./4ZCE%A8GGVL:;@`.%'8MEA.C7/6]D[S
-MO1C([D/N6]%[?NISR>1W1EE,)=\I9&.PF-'Q*LXZQU71100.[\,-HK41G3/R
-MG9DY$,].(M58U1\0XT\4R[<=RCCXM;_%AVM)``````````">````G@```!``
-M`&1D11```&1D(P@`10``D*85``!`$5`!P`$"%\`!`BT1E!&4`'P``!(T5G@`
-M```(*_3L6&DE`65QQPA"@BAQ5FY@=%,+]@C9K+O)@],/GCI4%,MKI282(0M9
-M*<@/=L.DB"**EM":*2KJK`^H=0YM,$^[`=L%(RO,O_<4`MNKJ*:^9W8@1BP$
-59LK`-:)VQ/=2B;1'4FV3B?L]2;O!
-`
-end
diff --git a/contrib/tcpdump/tests/espudp1.sh b/contrib/tcpdump/tests/espudp1.sh
deleted file mode 100644
index 35dc0a8..0000000
--- a/contrib/tcpdump/tests/espudp1.sh
+++ /dev/null
@@ -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
-
diff --git a/contrib/tcpdump/tests/isakmp-delete-segfault.puu b/contrib/tcpdump/tests/isakmp-delete-segfault.puu
deleted file mode 100644
index 11512b1..0000000
--- a/contrib/tcpdump/tests/isakmp-delete-segfault.puu
+++ /dev/null
@@ -1,20 +0,0 @@
-begin 644 isakmp-delete-segfault.pcap
-MU,.RH0(`!``````````````$```!````@"X```````"I`@``J0(``/______
-M_P$!`0$!`0@`10``I@`O0`!`$3PA?P```7\```$!]`'T`<@``!N3$,+\/7K^
-M3SF!FR'H6?T,OKXN&YH=5T,AEYH%R@(@71+C65#___\`````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-!````
-`
-end
diff --git a/contrib/tcpdump/tests/isakmp-identification-segfault.puu b/contrib/tcpdump/tests/isakmp-identification-segfault.puu
deleted file mode 100644
index 6f0ae0e..0000000
--- a/contrib/tcpdump/tests/isakmp-identification-segfault.puu
+++ /dev/null
@@ -1,11 +0,0 @@
-begin 644 isakmp-identification-segfault.pcap
-MU,.RH0(`!````````````/__````````HV%@0"_*#@`\`0``/`$```(```!%
-M``$XH&P``/\1'$9_```!?P```0'U`?0!)$KL)9EPC(1ZBP(```````````40
-M`@`````````!'````0`"````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-I````````````````````````````````````````````````````````
-`
-end
diff --git a/contrib/tcpdump/tests/isakmp-pointer-loop.puu b/contrib/tcpdump/tests/isakmp-pointer-loop.puu
deleted file mode 100644
index fc58248..0000000
--- a/contrib/tcpdump/tests/isakmp-pointer-loop.puu
+++ /dev/null
@@ -1,6 +0,0 @@
-begin 644 isakmp-pointer-loop.pcap
-MU,.RH0(`!````````````/__```!````DR;5/[_@!0!(````2``````$6D[H
-ME``"+6_:]@@`10``.H=E0`#S$0HB@:KY?H&J^5<!]`'T`";R?@``````````
-6```````````($`$````````````*````
-`
-end
diff --git a/contrib/tcpdump/tests/isakmp1.out b/contrib/tcpdump/tests/isakmp1.out
deleted file mode 100644
index 67a6ed1..0000000
--- a/contrib/tcpdump/tests/isakmp1.out
+++ /dev/null
@@ -1 +0,0 @@
-IP 127.0.0.1.500 > 127.0.0.1.500: isakmp: phase 2/others ? #190[C]
diff --git a/contrib/tcpdump/tests/isakmp1.sh b/contrib/tcpdump/tests/isakmp1.sh
deleted file mode 100644
index ce2de7d..0000000
--- a/contrib/tcpdump/tests/isakmp1.sh
+++ /dev/null
@@ -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
-
diff --git a/contrib/tcpdump/tests/isakmp2.out b/contrib/tcpdump/tests/isakmp2.out
deleted file mode 100644
index 44c28db..0000000
--- a/contrib/tcpdump/tests/isakmp2.out
+++ /dev/null
@@ -1 +0,0 @@
-IP 129.170.249.126.500 > 129.170.249.87.500: isakmp: phase 1 ? base
diff --git a/contrib/tcpdump/tests/isakmp2.sh b/contrib/tcpdump/tests/isakmp2.sh
deleted file mode 100644
index d0006a8..0000000
--- a/contrib/tcpdump/tests/isakmp2.sh
+++ /dev/null
@@ -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
-
diff --git a/contrib/tcpdump/tests/isakmp3.out b/contrib/tcpdump/tests/isakmp3.out
deleted file mode 100644
index 6b37b77..0000000
--- a/contrib/tcpdump/tests/isakmp3.out
+++ /dev/null
@@ -1,2 +0,0 @@
-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)
diff --git a/contrib/tcpdump/tests/isakmp3.sh b/contrib/tcpdump/tests/isakmp3.sh
deleted file mode 100644
index e6003cc..0000000
--- a/contrib/tcpdump/tests/isakmp3.sh
+++ /dev/null
@@ -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
-
diff --git a/contrib/tcpdump/tests/isakmp4.out b/contrib/tcpdump/tests/isakmp4.out
deleted file mode 100644
index 8c5b7da..0000000
--- a/contrib/tcpdump/tests/isakmp4.out
+++ /dev/null
@@ -1,35 +0,0 @@
-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
-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
-IP 192.1.2.23.500 > 192.1.2.254.500: isakmp: phase 1 R ident
-IP 192.1.2.254.4500 > 192.1.2.23.4500: NONESP-encap: isakmp: phase 1 I ident[E]
-IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 1 R ident[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.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
-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
-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=0x3), 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: 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=0x4), length 132
-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
-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
-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]
diff --git a/contrib/tcpdump/tests/isakmp4.sh b/contrib/tcpdump/tests/isakmp4.sh
deleted file mode 100644
index dd7bf07..0000000
--- a/contrib/tcpdump/tests/isakmp4.sh
+++ /dev/null
@@ -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
-
diff --git a/contrib/tcpdump/tests/isakmp4500.puu b/contrib/tcpdump/tests/isakmp4500.puu
deleted file mode 100644
index 0b55dcc..0000000
--- a/contrib/tcpdump/tests/isakmp4500.puu
+++ /dev/null
@@ -1,155 +0,0 @@
-begin 644 isakmp4500.pcap
-MU,.RH0(`!``````````````&```!```````````````J````*@```/______
-M_Q```-ZMN@@&``$(``8$``$0``#>K;K``0+^````````P`$"%P``````````
-M*@```"H````0``#>K;H0``!D9",(!@`!"``&!``"$```9&0CP`$"%Q```-ZM
-MNL`!`OX``````````$X!``!.`0``$```9&0C$```WJVZ"`!%``%```!``#\1
-MM97``0+^P`$"%P'T`?0!+)6LGHGR.(^0O!X```````````$0`@`````````!
-M)`T``)0````!`````0```(@``0`$`P``(``!``"`"P`!@`P.$(`!``6``@`!
-M@`,``X`$``4#```@`0$``(`+``&`#`X0@`$`!8`"``*``P`#@`0`!0,``"`"
-M`0``@`L``8`,#A"``0`%@`(``H`#``.`!``"````(`,!``"`"P`!@`P.$(`!
-M``6``@`!@`,``X`$``(-```03T5K4F)'6%)V;5!%#0``%*_*UQ-HH?'):X:6
-M_'=7`0`-```42A,<@0<#6$5<5RCR#I5%+PT``!1]E!FF4Q#*;RP7G9(54IU6
-M#0``%,U@1D,UWR'X?/VR_&BVI$@````41(45+1BVN\T+Z*A&E7G=S```````
-M````L@```+(````0``#>K;H0``!D9",(`$4``*0``$``0!&U,<`!`A?``0+^
-M`?0!]`"08%.>B?(XCY"\'@IT-7SCT:2_`1`"``````````"(#0``-`````$`
-M```!````*``!``$````@``$``(`+``&`#`X0@`$`!8`"``&``P`#@`0`!0T`
-M`!!/16M28D=84G9M4$4-```4K\K7$VBA\<EKAI;\=U<!`````!1*$QR!!P-8
-M15Q7*/(.E44O``````````!&`0``1@$``!```&1D(Q```-ZMN@@`10`!.```
-M0``_$;6=P`$"_L`!`A<!]`'T`206L9Z)\CB/D+P>"G0U?./1I+\$$`(`````
-M`````1P*``#$M]N'X4E&AEMT*7(UA)]?Z:M`RW>TPRPR/2V-U^-O'ST7,9K7
-MCQQFQ`#^2/PP0G^@]QHR=9!Y7?/EL'O(\L(I'#51V6N1?)1J+6P-A6&T0Y@"
-M-KJ[,_WPC+W%H'KSV>J_(W#3`3A4&A^4Q*T^3Q*2'^M#9[XHW-IVWO.#J=M?
-MDHTX?/DS#]CDJG;?BC_E:$W:3AD]N9+!U'[+6UU.`,)4^&ASH2SO\CU.=2!#
-MH'<T@54L9-$X/5ZQ*&_;9BF5E3Q7%```%&;6]C)I>UY(FI*395>I?Z@4```4
-M;OX2\$KY#?O/L5UQN$&[G@```!1$]1?@/[.!^`^$+14XS/^L``````````!&
-M`0``1@$``!```-ZMNA```&1D(P@`10`!.```0`!`$;2=P`$"%\`!`OX!]`'T
-M`20!UYZ)\CB/D+P>"G0U?./1I+\$$`(``````````1P*``#$YYI?^#V[%WO*
-M+,?[XKU\"YVFZ0UCMOA'6Y:C93#4^M&/)'3",1Q/"&7*"D0_<1SX#@"KRZDV
-M\_XCB4O9XNS0"_O8-'[C&AG5O;G^G_N*#?4,"OA'?R><"WN68Q(H<1EONM3!
-MS3=]U]MRZ(4UBM]&:I\KW&3X;LQ%M[B0:,/"]DTM1^J8+8CESE'6JEFCE,,$
-M?$W5P,^5=1K1AT@YX0J-9%/E]`MY&<%C?*Y*K\'5X#2B5OD6+FTGJ)^V299#
-M*>H6%```%&Q^7ZRJ16$T%<6UJE<?IS$4```4.9,$U0^]3*/;'AEZ]\$>;P``
-M`!1N_A+P2OD-^\^Q77&X0;N>``````````!R`0``<@$``!```&1D(Q```-ZM
-MN@@`10`!9```0``_$;5QP`$"_L`!`A<1E!&4`5!RH0````">B?(XCY"\'@IT
-M-7SCT:2_!1`"`0````````%$H"1@W`ZTW:4&'Z=!K*`IRTNLK:3J/^$DD/B4
-M>Q,F?M5`3=(?!HGW$/M)`\W8Z/'FXK6$!(9!7BL9!@QV=(^E7><\)R8EVE3F
-M6`.O^:2F!(>LD7%71N]`LA?B!/!0\*H2"YOJ0]_W9#9DJYZ).M/.;+8A?L[O
-M`J-'HV_0*'&&^P\8:$'I^"13SN]VT%5\8O8;P2VV=`+&9+4]'MH+/&:'PR!H
-M4O#,GI+1=+*MRN"5.-8D&$16)<O!`SBZM\AKC&P_X<;S]@/)1)Y\.&WOY7\H
-M1V\P7.NL<92?18X,F+:L`^^F#O1Y505Q0H85DLC9DG)B/V<^\\%WS5TO;E$:
-M"1$F`DG*=R<?ZQYTN1P^4Q#1].60GK<.AK=_XOM^<JSB!P9\:C2X3QI`L]D`
-M`````````%H!``!:`0``$```WJVZ$```9&0C"`!%``%,``!``$`1M(G``0(7
-MP`$"_A&4$90!.,?$`````)Z)\CB/D+P>"G0U?./1I+\%$`(!`````````2S"
-M8Z5]+<^-M8Q9P&X;^%JN2^*NYC1"AZ%4J-PIMZM611W<D%]6ET9DUBF=TH.0
-MQQSMHS[FF;=E?$HJP1Z27H0;DRN`@QD+=-Y#&>A:Z$*6IBWC.3.9037)<B;;
-M0U&M+H9[&=K##GX++CXGX(L;7E^)B\Q+'_'N5/5,"[?P96K'-(4;25\#D%M/
-MVIN6C#7'Q:0PBF3\=1($ODAZ(&:$((=V1,STM/MIB(]C;^7T=R$*%X?+MTX^
-MB*X%6DJ09BC(XU@(,4IU1Q]MV_;%S@8Y96MB,W3/!#M5BS)JGA5$(J4H5W@8
-M<*B:G<;Q^>L`[ADSH`K&0*^[6)>")$E3;"4;U="I",2*`1TP_=5+%B"II3>(
-M'@``````````V@$``-H!```0``!D9",0``#>K;H(`$4``<P``$``/Q&U"<`!
-M`O[``0(7$901E`&XW3@`````GHGR.(^0O!X*=#5\X]&DOP@0(`&+?HE'```!
-MK''I#[H$<_"<YEGG2)8)!97PF%0-_\8^X(V1[(=%+UAMJ9A(1/!,[6+WM32C
-M)*0IG:EM/C)SF$P$=$P"Y_R.@/MCQOS;\U>4YQ5SAO`10)\84&I?],R2.?5M
-MZ/Y^Y"#*%+0.<9KX(/Z$'&M,-)/2I7U^,!G,*G!E_O.D;7F_;D^V#&&*(R.+
-MH;YSI'1@I8GV%+\'*6,1(8`8D(VUP[,(R?PQ7#,5WQY3[HT+IFF"3?.+;(*M
-M_?C;JQ#]O'9522*ZO7>'TEDYLLA`*L$8(XJ$!T>_HYS?G=WR11E($-021FMS
-MB[NXAJ^CQVGO87[B@^I6THHW-%Z8%PTH&BCO^.[@K_NS8RVTE7CE&MA]6C@>
-MEDIDM&T^.41?F(\X$Z-5[547$HC='*\>8``"[9.IHT)+[,^LZ?_6(6I\L32#
-MF-JM7U".L4?X/8=G*KFA<>THJ-622W,;J`IW2^MLBI?_O<<EC)!V1^7\U,YK
-M7'E&R_].`C#$#;X]E]1SX@092]ZE(@C-2M!ZAW.#%L^J[^'13BY&SG@`````
-M`````(H!``"*`0``$```WJVZ$```9&0C"`!%``%\``!``$`1M%G``0(7P`$"
-M_A&4$90!:,KN`````)Z)\CB/D+P>"G0U?./1I+\($"`!BWZ)1P```5RM:&N4
-MQ1;W19+;77%JE,,H'8&F6ITJM=R5O>KL1%[]#E/LJ#&./WFJ`#,3C!H=I_'*
-M34/)_E+)(`!A&W00*T\"9O9JX0N">$#'(ZL<$'\P=GHB.0:\AXT/!^^*<P2!
-M<!A\>%U.'5#'2IX<Q;9+I6GRVRW_+T,S>:7/2KZ$%^3W;%R4[&2T>'?2(@FF
-M#T/=+2O[?Q4.(\@Q;]3V=L5Q2XFG)^E)0J:1AX`J4%E3_Y]^6='!R-ENY%9#
-M3!XD:5K?/V&.!&X#>I_$96Y;P_!5']<G(@<:I94]["%1#F3MY*U1V%WQVL1_
-MRT*Z$\KEVW>070(D3N#$47!AZ^VCW-?I?JT2AL5YOWBO5[D!"OV)46(FK)9"
-M$C40GNJ7*A,SE6%6A(4>KPE(-$)=L6=2VQLO>Y12N8QBH3V%(90.\5YL`R,O
-M1@``````````8@```&(````0``!D9",0``#>K;H(`$4``%0``$``/Q&V@<`!
-M`O[``0(7$901E`!`KQ<`````GHGR.(^0O!X*=#5\X]&DOP@0(`&+?HE'````
-M-"4[,88.:.R$%:1S6K/X<EH]YZH).22D`@``````````K@```*X````0``!D
-M9",0``#>K;H(`$4``*"JM```/Q%+@<`!`O[``0(7$901E`",``#TW`KE````
-M`?SD"<11-X_=FBX7J&]'/C[B>;BA23X"^A;(BA/H;8_\0'U,E@M&;+=R&*LY
-MAF.NT6<PXR31!Z\MX@W4>/*J.SL[UR2)+H^A6#5<38R;!FY\:AV_6ZV)FQ2!
-M1T\L:`GPK6U?_?TVHSK[6(WSF?Q"XF5K/0U,A.Y+D\RP]G(``````````"H`
-M```J````$```WJVZ$```9&0C"`8``0@`!@0``1```&1D(\`!`A<```````#`
-M`0+^```````````J````*@```!```&1D(Q```-ZMN@@&``$(``8$``(0``#>
-MK;K``0+^$```9&0CP`$"%P``````````B@$``(H!```0``#>K;H0``!D9",(
-M`$4``7P``$``0!&T6<`!`A?``0+^$901E`%HRNX`````GHGR.(^0O!X*=#5\
-MX]&DOP@0(`&+?HE'```!7*UH:Y3%%O=%DMM=<6J4PR@=@:9:G2JUW)6]ZNQ$
-M7OT.4^RH,8X_>:H`,Q.,&AVG\<I-0\G^4LD@`&$;=!`K3P)F]FKA"X)X0,<C
-MJQP0?S!V>B(Y!KR'C0\'[XIS!(%P&'QX74X=4,=*GAS%MDNE:?+;+?\O0S-Y
-MI<]*OH07Y/=L7)3L9+1X=](B":8/0]TM*_M_%0XCR#%OU/9VQ7%+B:<GZ4E"
-MII&'@"I065/_GWY9T<'(V6[D5D-,'B1I6M\_88X$;@-ZG\1E;EO#\%4?UR<B
-M!QJEE3WL(5$.9.WDK5'87?':Q'_+0KH3RN7;=Y!=`B1.X,11<&'K[:/<U^E^
-MK1*&Q7F_>*]7N0$*_8E18B:LED(2-1">ZI<J$S.585:$A1ZO"4@T0EVQ9U+;
-M&R][E%*YC&*A/84AE`[Q7FP#(R]&``````````!B````8@```!```&1D(Q``
-M`-ZMN@@`10``5```0``_$;:!P`$"_L`!`A<1E!&4`$"O%P````">B?(XCY"\
-M'@IT-7SCT:2_"!`@`8M^B4<````T)3LQA@YH[(05I'-:L_AR6CWGJ@DY)*0"
-M``````````"N````K@```!```&1D(Q```-ZMN@@`10``H*JU```_$4N`P`$"
-M_L`!`A<1E!&4`(P``/3<"N4````";5_]_3:C.OM8C?.9_$+B9;KU/R+D"U^-
-MLGB)>"40ZCMW:+^A4%UI1Y)\.O4B]`44T(2XS\S=2[[[X.6A-PCDZP*3XFAD
-M294>+W:M%%+\`)?XP#[:6]NHG>#;FFF-RMAA7D"KQ-&OX<E(GNRS/6*%P8?B
-M>3Z5S'CBYC"740``````````*P```"L````0``!D9",0``#>K;H(`$4``!T`
-M`$``/Q&VN,`!`O[``0(7$901E``)6)O_``````````"N````K@```!```&1D
-M(Q```-ZMN@@`10``H*JV```_$4M_P`$"_L`!`A<1E!&4`(P``/3<"N4````#
-M7D"KQ-&OX<E(GNRS/6*%P6M-D[MJGU)RI[EA3)LD/W^:S2V!1P<2Y/0I:_`%
-MF3-`LSA3&QM8DD^\>1F0#F$^I@1V5E>.`*!H=Z?(&*,.MS]E4H#P+<JB/C=Q
-MS26IBN>2"^MMG?%@Y3*L%D'7$>LLOA,HUEB3IB;87,\:-0``````````B@$`
-M`(H!```0``#>K;H0``!D9",(`$4``7P``$``0!&T6<`!`A?``0+^$901E`%H
-MRNX`````GHGR.(^0O!X*=#5\X]&DOP@0(`&+?HE'```!7*UH:Y3%%O=%DMM=
-M<6J4PR@=@:9:G2JUW)6]ZNQ$7OT.4^RH,8X_>:H`,Q.,&AVG\<I-0\G^4LD@
-M`&$;=!`K3P)F]FKA"X)X0,<CJQP0?S!V>B(Y!KR'C0\'[XIS!(%P&'QX74X=
-M4,=*GAS%MDNE:?+;+?\O0S-YI<]*OH07Y/=L7)3L9+1X=](B":8/0]TM*_M_
-M%0XCR#%OU/9VQ7%+B:<GZ4E"II&'@"I065/_GWY9T<'(V6[D5D-,'B1I6M\_
-M88X$;@-ZG\1E;EO#\%4?UR<B!QJEE3WL(5$.9.WDK5'87?':Q'_+0KH3RN7;
-M=Y!=`B1.X,11<&'K[:/<U^E^K1*&Q7F_>*]7N0$*_8E18B:LED(2-1">ZI<J
-M$S.585:$A1ZO"4@T0EVQ9U+;&R][E%*YC&*A/84AE`[Q7FP#(R]&````````
-M``!B````8@```!```&1D(Q```-ZMN@@`10``5```0``_$;:!P`$"_L`!`A<1
-ME!&4`$"O%P````">B?(XCY"\'@IT-7SCT:2_"!`@`8M^B4<````T)3LQA@YH
-M[(05I'-:L_AR6CWGJ@DY)*0"``````````"N````K@```!```&1D(Q```-ZM
-MN@@`10``H*JW```_$4M^P`$"_L`!`A<1E!&4`(P``/3<"N4````$"^MMG?%@
-MY3*L%D'7$>LLOHFXH,6B3<'M/]A_UT%X.MP;F`ZT@=\62*]W'/Y5@1,(8+`W
-MTIZ(C;<M^%)G.9R$N1)6J_7Z_!GT%\UMQ:XQPM8]>8G'VC<"+'VM:$K/=:VI
-MD#:KB^/G$BB@:+=TSV\S)T5-E#UOBKZ"E5_,%P``````````*P```"L````0
-M``!D9",0``#>K;H(`$4``!T``$``/Q&VN,`!`O[``0(7$901E``)6)O_````
-M``````"N````K@```!```&1D(Q```-ZMN@@`10``H*JX```_$4M]P`$"_L`!
-M`A<1E!&4`(P``/3<"N4````%D#:KB^/G$BB@:+=TSV\S)XZ>X,YAOI/W1_BS
-M7:N%MO?3J+1\I=>O-<R^HIZU--!X&6`$]U#*J@;R@64%SKQ.B/^^IGB<&88W
-M[8)FS;H6%4)M9NV]\#Q+3^^'.,PQY7<SC6OG8>36N1GBDD+HMR]D8U)G(OJ]
-MMX!><$3'U0``````````K@```*X````0``!D9",0``#>K;H(`$4``*"JN0``
-M/Q%+?,`!`O[``0(7$901E`",``#TW`KE````!HUKYV'DUKD9XI)"Z+<O9&,5
-M_X1R'`1@>@>3:9638^IH_2\8CVE-BL2&43,3ZAY3'1@3Z:+\)XSXDSO]L,@?
-MCOL6<I7.*]L#N>@]+&+X^#H(D.X>B;)<%[E4:S:#.D70:!#<8Q\QZFH`<C&^
-MG'`JQ0_F"K\L?F]\HUG$8G,``````````"H````J````$```9&0C$```WJVZ
-M"`8``0@`!@0``1```-ZMNL`!`OX```````#``0(7```````````J````*@``
-M`!```-ZMNA```&1D(P@&``$(``8$``(0``!D9"/``0(7$```WJVZP`$"_@``
-M````````*P```"L````0``!D9",0``#>K;H(`$4``!T``$``/Q&VN,`!`O[`
-M`0(7$901E``)6)O_``````````"N````K@```!```&1D(Q```-ZMN@@`10``
-MH*JZ```_$4M[P`$"_L`!`A<1E!&4`(P``/3<"N4````'$-QC'S'J:@!R,;Z<
-M<"K%#ST!-8\O2;F**R/9Z%HAZ`2#KQIW*9'HI9C067ZK-G^XAL^O0I7Z/'H(
-M<.`7P<QG3<<?7R7Z!!3MQ1MY5B=F9N",J@L.`]?M!U5)TB`<"]W5C[,`[Y'2
-MT6\N$CD@6'"CP$3F`AEER>@/P'/E0@``````````B@$``(H!```0``#>K;H0
-M``!D9",(`$4``7P``$``0!&T6<`!`A?``0+^$901E`%HRNX`````GHGR.(^0
-MO!X*=#5\X]&DOP@0(`&+?HE'```!7*UH:Y3%%O=%DMM=<6J4PR@=@:9:G2JU
-MW)6]ZNQ$7OT.4^RH,8X_>:H`,Q.,&AVG\<I-0\G^4LD@`&$;=!`K3P)F]FKA
-M"X)X0,<CJQP0?S!V>B(Y!KR'C0\'[XIS!(%P&'QX74X=4,=*GAS%MDNE:?+;
-M+?\O0S-YI<]*OH07Y/=L7)3L9+1X=](B":8/0]TM*_M_%0XCR#%OU/9VQ7%+
-MB:<GZ4E"II&'@"I065/_GWY9T<'(V6[D5D-,'B1I6M\_88X$;@-ZG\1E;EO#
-M\%4?UR<B!QJEE3WL(5$.9.WDK5'87?':Q'_+0KH3RN7;=Y!=`B1.X,11<&'K
-M[:/<U^E^K1*&Q7F_>*]7N0$*_8E18B:LED(2-1">ZI<J$S.585:$A1ZO"4@T
-M0EVQ9U+;&R][E%*YC&*A/84AE`[Q7FP#(R]&``````````"N````K@```!``
-M`&1D(Q```-ZMN@@`10``H*J[```_$4MZP`$"_L`!`A<1E!&4`(P``/3<"N4`
-M```(C[,`[Y'2T6\N$CD@6'"CP*@CBNC9!,,HJ*K#(R8N5?*%N(<XX+>GVJ+F
-M#M/G_FP&NANM[W@`)Y9\\Z?F4SX%'E.^2BCP\9+!/`25PK%+G'U@$&1+=@%(
-M#9RV^U"B8-5,EXJ0-QZTLOJ/L^F\).BC@++XQGOL8JC_`L;'=```````````
-M*@```"H````0``#>K;H0``!D9",(!@`!"``&!``!$```9&0CP`$"%P``````
-M`,`!`OX``````````"H````J````$```9&0C$```WJVZ"`8``0@`!@0``A``
-M`-ZMNL`!`OX0``!D9"/``0(7```````````K````*P```!```&1D(Q```-ZM
-MN@@`10``'0``0``_$;:XP`$"_L`!`A<1E!&4``E8F_\``````````'H```!Z
-M````$```WJVZ$```9&0C"`!%``!L``!``$`1M6G``0(7P`$"_A&4$90`6,G#
-M`````)Z)\CB/D+P>"G0U?./1I+\($`4!`KW&3P```$S_T\^1(\?(IVCQDA]J
-C20SF@.^<&]2'1D(_3FHHKW7PKQJ'!!.01QV>?]$9K_EN`N<`
-`
-end
diff --git a/contrib/tcpdump/tests/lmp.out b/contrib/tcpdump/tests/lmp.out
deleted file mode 100644
index ee37bca..0000000
--- a/contrib/tcpdump/tests/lmp.out
+++ /dev/null
@@ -1,191 +0,0 @@
-IP (tos 0x0, ttl 1, id 44530, offset 0, flags [none], proto: UDP (17), length: 84) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Begin Verify, Flags: [Control Channel Down], length: 56
- Link ID Object (3), Class-Type: IPv4 Local (1) Flags: [non-negotiable], length: 8
- IPv4 Link ID: 1.0.0.0 (0x01000000)
- Message ID Object (5), Class-Type: 1 (1) Flags: [non-negotiable], length: 8
- Message ID: 3 (0x00000003)
- Link ID Object (3), Class-Type: IPv4 Remote (2) Flags: [non-negotiable], length: 8
- IPv4 Link ID: 1.0.0.0 (0x01000000)
- Verify Begin Object (8), Class-Type: 1 (1) Flags: [negotiable], length: 24
- Flags: none
- Verify Interval: 20
- Data links: 30
- Encoding type: Lambda (photonic)
- Verify Tranport Mechanism: 32768 (0x8000)
- Transmission Rate: 100.000 Mbps
- Wavelength: 8
-IP (tos 0x0, ttl 1, id 44531, offset 0, flags [none], proto: UDP (17), length: 56) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Hello, Flags: [Control Channel Down], length: 28
- Control Channel ID Object (1), Class-Type: Local (1) Flags: [non-negotiable], length: 8
- Control Channel ID: 1 (0x00000001)
- Hello Object (7), Class-Type: 1 (1) Flags: [non-negotiable], length: 12
- TxSeqNum: 50
- RcvSeqNum: 60
-IP (tos 0x0, ttl 1, id 44532, offset 0, flags [none], proto: UDP (17), length: 84) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Config NACK, Flags: [Control Channel Down], length: 56
- Control Channel ID Object (1), Class-Type: Local (1) Flags: [non-negotiable], length: 8
- Control Channel ID: 1 (0x00000001)
- Node ID Object (2), Class-Type: Local (1) Flags: [non-negotiable], length: 8
- Node ID: 10.0.50.1 (0x0a003201)
- Control Channel ID Object (1), Class-Type: Remote (2) Flags: [non-negotiable], length: 8
- Control Channel ID: 2 (0x00000002)
- Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8
- Message ID Ack: 3 (0x00000003)
- Node ID Object (2), Class-Type: Remote (2) Flags: [non-negotiable], length: 8
- Node ID: 10.0.50.2 (0x0a003202)
- Configuration Object (6), Class-Type: 1 (1) Flags: [negotiable], length: 8
- Hello Interval: 5
- Hello Dead Interval: 15
-IP (tos 0x0, ttl 1, id 44533, offset 0, flags [none], proto: UDP (17), length: 76) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Config ACK, Flags: [Control Channel Down], length: 48
- Control Channel ID Object (1), Class-Type: Local (1) Flags: [non-negotiable], length: 8
- Control Channel ID: 1 (0x00000001)
- Node ID Object (2), Class-Type: Local (1) Flags: [non-negotiable], length: 8
- Node ID: 10.0.50.1 (0x0a003201)
- Control Channel ID Object (1), Class-Type: Remote (2) Flags: [non-negotiable], length: 8
- Control Channel ID: 2 (0x00000002)
- Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8
- Message ID Ack: 3 (0x00000003)
- Node ID Object (2), Class-Type: Remote (2) Flags: [non-negotiable], length: 8
- Node ID: 10.0.50.2 (0x0a003202)
-IP (tos 0x0, ttl 1, id 44534, offset 0, flags [none], proto: UDP (17), length: 68) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Config, Flags: [Control Channel Down], length: 40
- Control Channel ID Object (1), Class-Type: Local (1) Flags: [non-negotiable], length: 8
- Control Channel ID: 1 (0x00000001)
- Message ID Object (5), Class-Type: 1 (1) Flags: [non-negotiable], length: 8
- Message ID: 3 (0x00000003)
- Node ID Object (2), Class-Type: Local (1) Flags: [non-negotiable], length: 8
- Node ID: 10.0.50.1 (0x0a003201)
- Configuration Object (6), Class-Type: 1 (1) Flags: [negotiable], length: 8
- Hello Interval: 5
- Hello Dead Interval: 15
-IP (tos 0x0, ttl 1, id 44535, offset 0, flags [none], proto: UDP (17), length: 44) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Link Summary ACK, Flags: [Control Channel Down], length: 16
- Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8
- Message ID Ack: 1 (0x00000001)
-IP (tos 0x0, ttl 1, id 44536, offset 0, flags [none], proto: UDP (17), length: 124) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Link Summary NACK, Flags: [Control Channel Down], length: 96
- Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8
- Message ID Ack: 1 (0x00000001)
- Error Code Object (20), Class-Type: 2 (2) Flags: [non-negotiable], length: 8
- Error Code:
- Unacceptable non-negotiable LINK_SUMMARY parameters,
- Renegotiate LINK_SUMMARY parameters,
- Invalid DATA-LINK Object,
- Unknown TE-LINK Object c-type,
- Unknown DATA-LINK Object c-type
- Data Link Object (12), Class-Type: IPv4 (1) Flags: [non-negotiable], length: 36
- Flags: [none]
- Local Interface ID: 192.168.1.1 (0xc0a80101)
- Remote Interface ID: 192.168.1.2 (0xc0a80102)
- Subobject, Type: Interface Switching Type (1), Length: 12
- Switching Type: Lambda-Switch Capable (150)
- Encoding Type: Lambda (photonic) (8)
- Min Reservable Bandwidth: 100.000 Mbps
- Max Reservable Bandwidth: 100.000 Mbps
- Subobject, Type: Wavelength (2), Length: 8
- Wavelength: 6
- Data Link Object (12), Class-Type: IPv4 (1) Flags: [non-negotiable], length: 36
- Flags: [none]
- Local Interface ID: 10.1.1.1 (0x0a010101)
- Remote Interface ID: 10.1.1.2 (0x0a010102)
- Subobject, Type: Interface Switching Type (1), Length: 12
- Switching Type: Lambda-Switch Capable (150)
- Encoding Type: ANSI/ETSI PDH (3)
- Min Reservable Bandwidth: 1234736768.000 Mbps
- Max Reservable Bandwidth: 1290693376.000 Mbps
- Subobject, Type: Wavelength (2), Length: 8
- Wavelength: 353
-IP (tos 0x0, ttl 1, id 44537, offset 0, flags [none], proto: UDP (17), length: 68) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Begin Verify ACK, Flags: [Control Channel Down], length: 40
- Link ID Object (3), Class-Type: IPv4 Local (1) Flags: [non-negotiable], length: 8
- IPv4 Link ID: 1.0.0.0 (0x01000000)
- Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8
- Message ID Ack: 1 (0x00000001)
- Verify Begin ACK Object (9), Class-Type: 1 (1) Flags: [negotiable], length: 8
- Verify Dead Interval: 50
- Verify Transport Response: 100
- Verify ID Object (10), Class-Type: 1 (1) Flags: [non-negotiable], length: 8
- Verify ID: 5
-IP (tos 0x0, ttl 1, id 44538, offset 0, flags [none], proto: UDP (17), length: 60) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Begin Verify NACK, Flags: [Control Channel Down], length: 32
- Link ID Object (3), Class-Type: IPv4 Local (1) Flags: [non-negotiable], length: 8
- IPv4 Link ID: 10.0.0.0 (0x0a000000)
- Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8
- Message ID Ack: 3 (0x00000003)
- Error Code Object (20), Class-Type: 1 (1) Flags: [non-negotiable], length: 8
- Error Code:
- Link Verification Procedure Not supported,
- Unwilling to verify,
- Unsupported verification transport mechanism
-IP (tos 0x0, ttl 1, id 44539, offset 0, flags [none], proto: UDP (17), length: 52) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: End Verify, Flags: [Control Channel Down], length: 24
- Message ID Object (5), Class-Type: 1 (1) Flags: [non-negotiable], length: 8
- Message ID: 3 (0x00000003)
- Verify ID Object (10), Class-Type: 1 (1) Flags: [non-negotiable], length: 8
- Verify ID: 5
-IP (tos 0x0, ttl 1, id 44540, offset 0, flags [none], proto: UDP (17), length: 52) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: End Verify ACK, Flags: [Control Channel Down], length: 24
- Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8
- Message ID Ack: 3 (0x00000003)
- Verify ID Object (10), Class-Type: 1 (1) Flags: [non-negotiable], length: 8
- Verify ID: 5
-IP (tos 0x0, ttl 1, id 44541, offset 0, flags [none], proto: UDP (17), length: 52) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Test, Flags: [Control Channel Down], length: 24
- Interface ID Object (4), Class-Type: IPv4 Local (1) Flags: [non-negotiable], length: 8
- IPv4 Link ID: 1.0.0.0 (0x01000000)
- Verify ID Object (10), Class-Type: 1 (1) Flags: [non-negotiable], length: 8
- Verify ID: 5
-IP (tos 0x0, ttl 1, id 44542, offset 0, flags [none], proto: UDP (17), length: 52) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Test Status Failure, Flags: [Control Channel Down], length: 24
- Message ID Object (5), Class-Type: 1 (1) Flags: [non-negotiable], length: 8
- Message ID: 1 (0x00000001)
- Verify ID Object (10), Class-Type: 1 (1) Flags: [non-negotiable], length: 8
- Verify ID: 5
-IP (tos 0x0, ttl 1, id 44543, offset 0, flags [none], proto: UDP (17), length: 52) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Test Status ACK, Flags: [Control Channel Down], length: 24
- Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8
- Message ID Ack: 1 (0x00000001)
- Verify ID Object (10), Class-Type: 1 (1) Flags: [non-negotiable], length: 8
- Verify ID: 5
-IP (tos 0x0, ttl 1, id 44544, offset 0, flags [none], proto: UDP (17), length: 44) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Channel Status ACK, Flags: [Control Channel Down], length: 16
- Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8
- Message ID Ack: 3 (0x00000003)
-IP (tos 0x0, ttl 1, id 44545, offset 0, flags [none], proto: UDP (17), length: 64) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Channel Status Request, Flags: [Control Channel Down], length: 36
- Link ID Object (3), Class-Type: IPv4 Local (1) Flags: [non-negotiable], length: 8
- IPv4 Link ID: 1.0.0.0 (0x01000000)
- Message ID Object (5), Class-Type: 1 (1) Flags: [non-negotiable], length: 8
- Message ID: 3 (0x00000003)
- Channel Status Request Object (14), Class-Type: IPv4 (1) Flags: [non-negotiable], length: 12
- Interface ID: 2.0.0.0 (0x02000000)
- Interface ID: 2.0.0.0 (0x02000000)
-IP (tos 0x0, ttl 1, id 44546, offset 0, flags [none], proto: UDP (17), length: 72) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Channel Status, Flags: [Control Channel Down], length: 44
- Link ID Object (3), Class-Type: IPv4 Local (1) Flags: [non-negotiable], length: 8
- IPv4 Link ID: 1.0.0.0 (0x01000000)
- Message ID Object (5), Class-Type: 1 (1) Flags: [non-negotiable], length: 8
- Message ID: 3 (0x00000003)
- Channel Status Object (13), Class-Type: IPv4 (1) Flags: [non-negotiable], length: 20
- Interface ID: 1.0.0.0 (0x01000000)
- Active: Allocated (1)
- Direction: Transmit (1)
- Channel Status: Signal Fail (3)
- Interface ID: 1.0.0.0 (0x01000000)
- Active: Allocated (1)
- Direction: Receive (0)
- Channel Status: Signal Degraded (2)
-IP (tos 0x0, ttl 1, id 44547, offset 0, flags [none], proto: UDP (17), length: 64) 10.0.12.1.49998 > 10.0.12.2.49998:
- LMPv1, msg-type: Channel Status Response, Flags: [Control Channel Down], length: 36
- Message ID Object (5), Class-Type: 2 (2) Flags: [non-negotiable], length: 8
- Message ID Ack: 3 (0x00000003)
- Channel Status Object (13), Class-Type: IPv4 (1) Flags: [non-negotiable], length: 20
- Interface ID: 1.0.0.0 (0x01000000)
- Active: Allocated (1)
- Direction: Transmit (1)
- Channel Status: Signal Degraded (2)
- Interface ID: 1.0.0.0 (0x01000000)
- Active: Allocated (1)
- Direction: Transmit (1)
- Channel Status: Signal Okay (1)
diff --git a/contrib/tcpdump/tests/lmp.puu b/contrib/tcpdump/tests/lmp.puu
deleted file mode 100644
index c14cd56..0000000
--- a/contrib/tcpdump/tests/lmp.puu
+++ /dev/null
@@ -1,42 +0,0 @@
-begin 644 lmp.pcap
-MU,.RH0(`!````````````/__```!````I!J-0&;J``!B````8@`````%75SJ
-MQ@`$=="&2@@`10``5*WR```!$=^D"@`,`0H`#`+#3L-.`$```!````4`.```
-M`0,`"`$````!!0`(`````P(#``@!````@0@`&````!0````>")*``$+(````
-M```(I!J-0#SQ``!&````1@`````%75SJQ@`$=="&2@@`10``.*WS```!$=^_
-M"@`,`0H`#`+#3L-.`"0``!````0`'````0$`"`````$!!P`,````,@```#RD
-M&HU`@/(``&(```!B``````5=7.K&``1UT(9*"`!%``!4K?0```$1WZ(*``P!
-M"@`,`L-.PTX`0```$````P`X```!`0`(`````0$"``@*`#(!`@$`"`````("
-M!0`(`````P("``@*`#("@08`"``%``^D&HU`?_,``%H```!:``````5=7.K&
-M``1UT(9*"`!%``!,K?4```$1WZD*``P!"@`,`L-.PTX`.```$````@`P```!
-M`0`(`````0$"``@*`#(!`@$`"`````("!0`(`````P("``@*`#("I!J-0'+T
-M``!2````4@`````%75SJQ@`$=="&2@@`10``1*WV```!$=^P"@`,`0H`#`+#
-M3L-.`#```!````$`*````0$`"`````$!!0`(`````P$"``@*`#(!@08`"``%
-M``^D&HU`0_4``#H````Z``````5=7.K&``1UT(9*"`!%```LK?<```$1W\<*
-M``P!"@`,`L-.PTX`&```$```#P`0```"!0`(`````:0:C4"E]P``B@```(H`
-M````!5U<ZL8`!'70ADH(`$4``'RM^````1'?=@H`#`$*``P"PT[#3@!H```0
-M```0`&````(%``@````!`A0`"````#L!#``D`````,"H`0'`J`$"`0R6"$+(
-M``!"R````@@```````8!#``D``````H!`0$*`0$"`0R6`TZ3,2U.F=S6`@@`
-M`````6&D&HU`C/@``%(```!2``````5=7.K&``1UT(9*"`!%``!$K?D```$1
-MWZT*``P!"@`,`L-.PTX`,```$```!@`H```!`P`(`0````(%``@````!@0D`
-M"``R`&0!"@`(````!:0:C4!E^0``2@```$H`````!5U<ZL8`!'70ADH(`$4`
-M`#RM^@```1'?M`H`#`$*``P"PT[#3@`H```0```'`"````$#``@*`````@4`
-M"`````,!%``(````!Z0:C4`Q^@``0@```$(`````!5U<ZL8`!'70ADH(`$4`
-M`#2M^P```1'?NPH`#`$*``P"PT[#3@`@```0```(`!@```$%``@````#`0H`
-M"`````6D&HU``_L``$(```!"``````5=7.K&``1UT(9*"`!%```TK?P```$1
-MW[H*``P!"@`,`L-.PTX`(```$```"0`8```"!0`(`````P$*``@````%I!J-
-M0-#[``!"````0@`````%75SJQ@`$=="&2@@`10``-*W]```!$=^Y"@`,`0H`
-M#`+#3L-.`"```!````H`&````00`"`$````!"@`(````!:0:C4"=_```0@``
-M`$(`````!5U<ZL8`!'70ADH(`$4``#2M_@```1'?N`H`#`$*``P"PT[#3@`@
-M```0```,`!@```$%``@````!`0H`"`````6D&HU`:?T``$(```!"``````5=
-M7.K&``1UT(9*"`!%```TK?\```$1W[<*``P!"@`,`L-.PTX`(```$```#0`8
-M```"!0`(`````0$*``@````%I!J-0#C^```Z````.@`````%75SJQ@`$=="&
-M2@@`10``+*X````!$=^^"@`,`0H`#`+#3L-.`!@``!```!(`$````@4`"```
-M``.D&HU`)?\``$X```!.``````5=7.K&``1UT(9*"`!%``!`K@$```$1WZD*
-M``P!"@`,`L-.PTX`+```$```$P`D```!`P`(`0````$%``@````#`0X`#`(`
-M```"````I!J-0`8``0!6````5@`````%75SJQ@`$=="&2@@`10``2*X"```!
-M$=^@"@`,`0H`#`+#3L-.`#0``!```!$`+````0,`"`$````!!0`(`````P$-
-M`!0!````P````P$```"````"I!J-0-4``0!.````3@`````%75SJQ@`$=="&
-M2@@`10``0*X#```!$=^G"@`,`0H`#`+#3L-.`"P``!```!0`)````@4`"```
-6``,!#0`4`0```,````(!````P````0``
-`
-end
diff --git a/contrib/tcpdump/tests/lmp.sh b/contrib/tcpdump/tests/lmp.sh
deleted file mode 100755
index 9919044..0000000
--- a/contrib/tcpdump/tests/lmp.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-uudecode lmp.puu
-
-echo -n test lmp ...
-../tcpdump -t -n -v -r lmp.pcap >lmp.new
-if diff lmp.new lmp.out
-then
- echo passed.
-else
- echo failed.
-fi
-
-
diff --git a/contrib/tcpdump/tests/mpls-ldp-hello.out b/contrib/tcpdump/tests/mpls-ldp-hello.out
deleted file mode 100644
index fa621ca..0000000
--- a/contrib/tcpdump/tests/mpls-ldp-hello.out
+++ /dev/null
@@ -1,9 +0,0 @@
-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]
- Hold Time: 15s, Flags: [Link Hello]
- IPv4 Transport Address TLV (0x0401), length: 4, Flags: [ignore and don't forward if unknown]
- IPv4 Transport Address: 10.1.0.2
- Configuration Sequence Number TLV (0x0402), length: 4, Flags: [ignore and don't forward if unknown]
- Sequence Number: 1
diff --git a/contrib/tcpdump/tests/mpls-ldp-hello.puu b/contrib/tcpdump/tests/mpls-ldp-hello.puu
deleted file mode 100644
index b7f3b62..0000000
--- a/contrib/tcpdump/tests/mpls-ldp-hello.puu
+++ /dev/null
@@ -1,6 +0,0 @@
-begin 644 mpls-ldp-hello.pcap
-MU,.RH0(`!````````````.H%```)````1UFZ/E2'#`!*````2@```/\#`"%%
-MP`!&/-L```$1D08*`0$#X````@*&`H8`,M2>``$`)@H!``(```$``!P``1EP
-8!```!``/```$`0`$"@$``@0"``0````!
-`
-end
diff --git a/contrib/tcpdump/tests/mpls-ldp-hello.sh b/contrib/tcpdump/tests/mpls-ldp-hello.sh
deleted file mode 100755
index b1a5b19..0000000
--- a/contrib/tcpdump/tests/mpls-ldp-hello.sh
+++ /dev/null
@@ -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
-
-
diff --git a/contrib/tcpdump/tests/ospf-gmpls.out b/contrib/tcpdump/tests/ospf-gmpls.out
deleted file mode 100644
index 965affc..0000000
--- a/contrib/tcpdump/tests/ospf-gmpls.out
+++ /dev/null
@@ -1,83 +0,0 @@
-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
- Options: [External]
- Link TLV (2), length: 100
- Link Type subTLV (1), length: 1, Point-to-point (1)
- Link ID subTLV (2), length: 4, 10.255.245.69 (0x0afff545)
- Local Interface IP address subTLV (3), length: 4, 10.9.142.1
- Remote Interface IP address subTLV (4), length: 4, 10.9.142.2
- Traffic Engineering Metric subTLV (5), length: 4, Metric 63
- Maximum Bandwidth subTLV (6), length: 4, 622.080 Mbps
- Maximum Reservable Bandwidth subTLV (7), length: 4, 622.080 Mbps
- Unreserved Bandwidth subTLV (8), length: 32
- TE-Class 0: 622.080 Mbps
- TE-Class 1: 622.080 Mbps
- TE-Class 2: 622.080 Mbps
- TE-Class 3: 622.080 Mbps
- TE-Class 4: 622.080 Mbps
- TE-Class 5: 622.080 Mbps
- 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
- 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
- Options: [External]
- Link TLV (2), length: 100
- Link Type subTLV (1), length: 1, Point-to-point (1)
- Link ID subTLV (2), length: 4, 10.255.245.69 (0x0afff545)
- Local Interface IP address subTLV (3), length: 4, 10.9.143.1
- Remote Interface IP address subTLV (4), length: 4, 10.9.143.2
- Traffic Engineering Metric subTLV (5), length: 4, Metric 63
- Maximum Bandwidth subTLV (6), length: 4, 622.080 Mbps
- Maximum Reservable Bandwidth subTLV (7), length: 4, 622.080 Mbps
- Unreserved Bandwidth subTLV (8), length: 32
- TE-Class 0: 622.080 Mbps
- TE-Class 1: 622.080 Mbps
- TE-Class 2: 622.080 Mbps
- TE-Class 3: 622.080 Mbps
- TE-Class 4: 622.080 Mbps
- TE-Class 5: 622.080 Mbps
- 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
- 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
- Options: [External]
- Link TLV (2), length: 140
- Link Type subTLV (1), length: 1, Point-to-point (1)
- Link ID subTLV (2), length: 4, 10.255.245.40 (0x0afff528)
- Local Interface IP address subTLV (3), length: 4, 10.40.35.14
- Remote Interface IP address subTLV (4), length: 4, 10.40.35.13
- Traffic Engineering Metric subTLV (5), length: 4, Metric 1
- Maximum Bandwidth subTLV (6), length: 4, 100.000 Mbps
- Maximum Reservable Bandwidth subTLV (7), length: 4, 100.000 Mbps
- Unreserved Bandwidth subTLV (8), length: 32
- TE-Class 0: 0.000 Mbps
- TE-Class 1: 0.000 Mbps
- TE-Class 2: 0.000 Mbps
- TE-Class 3: 0.000 Mbps
- TE-Class 4: 0.000 Mbps
- TE-Class 5: 0.000 Mbps
- TE-Class 6: 0.000 Mbps
- TE-Class 7: 0.000 Mbps
- Interface Switching Capability subTLV (15), length: 44
- Interface Switching Capability: Packet-Switch Capable-1
- LSP Encoding: Ethernet V2/DIX
- Max LSP Bandwidth:
- priority level 0: 0.000 Mbps
- priority level 1: 0.000 Mbps
- priority level 2: 0.000 Mbps
- priority level 3: 0.000 Mbps
- priority level 4: 0.000 Mbps
- priority level 5: 0.000 Mbps
- priority level 6: 0.000 Mbps
- priority level 7: 0.000 Mbps
diff --git a/contrib/tcpdump/tests/ospf-gmpls.puu b/contrib/tcpdump/tests/ospf-gmpls.puu
deleted file mode 100644
index 691e38e..0000000
--- a/contrib/tcpdump/tests/ospf-gmpls.puu
+++ /dev/null
@@ -1,18 +0,0 @@
-begin 644 ospf-gmpls.pcap
-MU,.RH0(`!````````````'81````````KME</_6D!0"P````L`````(```!%
-MP`"L#]0```%9GSLH(P$"X```!0($`)@*__4C`````*F*````````````````
-M``$`"0(*`0``"`K_]26````">#X`?``"`&0``0`!`0`````"``0*__5%``,`
-M!`H)C@$`!``$"@F.`@`%``0````_``8`!$R44,``!P`$3)10P``(`"!,E%#`
-M3)10P$R44,!,E%#`3)10P$R44,!,E%#`3)10P``)``0`````Y-E</P;,#0"P
-M````L`````(```!%P`"L$`H```%9GP4H(P$"X```!0($`)@*__4C`````&_$
-M``````````````````$`"0(*`0``"0K_]26````"L`,`?``"`&0``0`!`0``
-M```"``0*__5%``,`!`H)CP$`!``$"@F/`@`%``0````_``8`!$R44,``!P`$
-M3)10P``(`"!,E%#`3)10P$R44,!,E%#`3)10P$R44,!,E%#`3)10P``)``0`
-M````&=I</S4\!@#8````V`````(```!%P`#4$$````%9GJ<H(P$"X```!0($
-M`,`*__4C`````-HW``````````````````$``P(*`0```PK_]2.````#(00`
-MI``"`(P``0`!`0`````"``0*__4H``,`!`HH(PX`!``$"B@C#0`%``0````!
-M``8`!$L^O"``!P`$2SZ\(``(`"``````````````````````````````````
-M```````````/`"P!`@``````````````````````````````````````````
-*``!+/KP@"B@`````
-`
-end
diff --git a/contrib/tcpdump/tests/ospf-gmpls.sh b/contrib/tcpdump/tests/ospf-gmpls.sh
deleted file mode 100755
index da2dd3b..0000000
--- a/contrib/tcpdump/tests/ospf-gmpls.sh
+++ /dev/null
@@ -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
-
-
diff --git a/contrib/tcpdump/tests/print-A.out b/contrib/tcpdump/tests/print-A.out
deleted file mode 100644
index 107ffcb..0000000
--- a/contrib/tcpdump/tests/print-A.out
+++ /dev/null
@@ -1,193 +0,0 @@
-23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 <mss 16396,sackOK,timestamp 1306300950 0,nop,wscale 2>
-E..<.h@.@.!R.........p.P7X.~.........!....@....
-M...........
-23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 <mss 16396,sackOK,timestamp 1306300950 1306300950,nop,wscale 2>
-E..<..@.@.<..........P.p7z..7X......n.....@....
-M...M.......
-23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 <nop,nop,timestamp 1306300950 1306300950>
-E..4.j@.@.!X.........p.P7X..7z.... .7......
-M...M...
-23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 <nop,nop,timestamp 1306300951 1306300950>
-E....l@.@. ..........p.P7X..7z.... ........
-M...M...GET / HTTP/1.1
-Host: localhost
-User-Agent: ELinks/0.10.4-7-debian (textmode; Linux 2.6.11-1-686-smp i686; 132x56-2)
-Accept: */*
-Accept-Encoding: gzip
-Accept-Language: en
-Connection: Keep-Alive
-
-
-23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 <nop,nop,timestamp 1306300952 1306300951>
-E..4..@.@............P.p7z..7X.I.. .7......
-M...M...
-23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 <nop,nop,timestamp 1306300953 1306300951>
-E.....@.@..%.........P.p7z..7X.I.. ........
-M...M...HTTP/1.1 200 OK
-Date: Wed, 06 Jul 2005 03:57:35 GMT
-Server: Apache/1.3.33
-Last-Modified: Sun, 15 Aug 2004 00:43:41 GMT
-ETag: "6e80f0-148a-411eb1bd"
-Accept-Ranges: bytes
-Content-Length: 5258
-Keep-Alive: timeout=15, max=100
-Connection: Keep-Alive
-Content-Type: text/html; charset=iso-8859-1
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML>
-<HEAD>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
- <META NAME="Description" CONTENT="The initial installation of Debian apache.">
- <TITLE>Placeholder page</TITLE>
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#55188A" ALINK="#FF0000">
-
-<H1>Placeholder page</H1>
-<H2>If you are just browsing the web</h2>
-
-<P>The owner of this web site has not put up any web pages yet.
-Please come back later.</P>
-
-<P><SMALL><CITE>Move along, nothing to see here...</CITE> :-)</SMALL></P>
-
-<H2>If you are trying to locate the administrator of this machine</H2>
-
-<P>If you want to report something about this host's behavior, please
-contact the Internet Service Provider (ISP) involved directly.</P>
-
-<P>See the <A href="http://www.abuse.net/">Network Abuse
-Clearinghouse</A> for how to do this.</P>
-
-<H2>If you are the administrator of this machine</H2>
-
-<P>The initial installation of <A href="http://www.debian.org/">Debian's
-apache</A> web server package was successful.</P>
-
-<P><STRONG>You should replace this page with your own web pages as
-soon as possible.</STRONG></P>
-
-<P>Unless you changed its configuration, your new server is configured as follows:
-<UL>
-<LI>
-Configuration files can be found in <TT>/etc/apache</TT>.</LI>
-
-<LI>
-The <TT>DocumentRoot</TT>, which is the directory under which all your
-HTML files should exist, is set to <TT>/var/www</TT>.</LI>
-
-<LI>
-CGI scripts are looked for in <TT>/usr/lib/cgi-bin</TT>, which is where
-Debian packages will place their scripts.</LI>
-
-<LI>
-Log files are placed in <TT>/var/log/apache</TT>, and will be rotated
-weekly. The frequency of rotation can be easily changed by editing
-<TT>/etc/logrotate.d/apache</TT>.</LI>
-
-<LI>
-The default directory index is <TT>index.html</TT>, meaning that requests
-for a directory <TT>/foo/bar/</TT> will give the contents of the file <TT>/var/www/foo/bar/index.html</TT>
-if it exists (assuming that <TT>/var/www</TT> is your <TT>DocumentRoot</TT>).</LI>
-
-<LI>
-User directories are enabled, and user documents will be looked for
-in the <TT>public_html</TT> directory of the users' homes. These dirs
-should be under <TT>/home</TT>, and users will not be able to symlink
-to files they don't own.</LI>
-
-</UL>
-All the standard apache modules are available with this release and are
-now managed with debconf. Type <TT>dpkg-reconfigure apache</TT> to
-select which modules you want enabled. Many other modules are available
-through the Debian package system with the names <TT>libapache-mod-*</TT>.
-If you need to compile a module yourself, you will need to install the
-<TT>apache-dev</TT> package.
-
-<P>More documentation on Apache can be found on:
-<UL>
-<LI>
-The <A HREF="/doc/apache-doc/manual/">Apache documentation</A> stored on your server.</LI>
-
-<LI>
-The <A HREF="http://www.apache.org/">Apache Project</A> home site.</LI>
-
-<LI>
-The <A HREF="http://www.apache-ssl.org/">Apache-SSL</A> home site.</LI>
-
-<LI>
-The <A HREF="http://perl.apache.org/">mod perl</A> home site.</LI>
-
-<LI>
-The <A HREF="http://www.apacheweek.com/">ApacheWeek</A> newsletter.</LI>
-
-<LI>
-The <A HREF="http://www.debian.org/doc/">Debian Project
-Documentation</A> which contains HOWTOs, FAQs, and software updates.</LI>
-</UL>
-
-<P>You can also consult the list of <A HREF="http://www.boutell.com/faq/">World
-Wide Web Frequently Asked Questions</A> for information.
-
-<H2>Let other people know about this server</H2>
-
-<A HREF="http://netcraft.com/">Netcraft</A> provides an interesting free
-service for web site monitoring and statistic collection.
-You can let them know about your server using their
-<A HREF="http://uptime.netcraft.com/">interface</A>.
-Enabling the monitoring of your server will provide a better global overview
-of who is using what and where, and it would give Debian a better
-overview of the apache package usage.
-
-<H2>About this page</H2>
-
-<IMG ALIGN="right" ALT="" HEIGHT="247" WIDTH="278" SRC="icons/jhe061.png">
-
-<P>This is a placeholder page installed by the <A
-HREF="http://www.debian.org/">Debian</A>
-release of the apache Web server package.
-
-<P>This computer has installed the Debian GNU/Linux operating system,
-but it has <strong>nothing to do with the Debian
-Project</strong>. Please do <strong>not</strong> contact the Debian
-Project about it.</P>
-
-<P>If you find a bug in this apache package, or in Apache itself,
-please file a bug report on it. Instructions on doing this, and the
-list of <A HREF="http://bugs.debian.org/src:apache">known bugs</A> of this
-package, can be found in the
-<A HREF="http://www.debian.org/Bugs/Reporting">Debian Bug Tracking System</A>.
-
-<P>Thanks for using this package, and congratulations for your choice of
-a Debian system!</P>
-
-<DIV align="center">
-<a href="http://www.debian.org/">
-<IMG align="middle" height="30" width="25" src="icons/debian/openlogo-25.jpg" alt="Debian">
-</a>
-<a href="http://www.apache.org/">
-<IMG align="middle" height="32" width="259" src="icons/apache_pb.png" alt="Apache">
-</a>
-</DIV>
-
-<!--
- This page was initially created by Johnie Ingram (http://netgod.net/)
- It was later edited by Matthew Wilcox and Josip Rodin.
- Last modified: $Date: 2004/06/20 15:33:57 $.
- -->
-
-</BODY>
-</HTML>
-
-23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 <nop,nop,timestamp 1306300953 1306300953>
-E..4.n@.@.!T.........p.P7X.I7z....0_.......
-M...M...
-23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 <nop,nop,timestamp 1306302241 1306300953>
-E..4.p@.@.!R.........p.P7X.I7z....0_.......
-M..!M...
-23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 <nop,nop,timestamp 1306302243 1306302241>
-E..4..@.@............P.p7z..7X.J.. ..5.....
-M..#M..!
-23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 <nop,nop,timestamp 1306302243 1306302243>
-E..4.r@.@.!P.........p.P7X.J7z....0_.......
-M..#M..#
diff --git a/contrib/tcpdump/tests/print-AA.out b/contrib/tcpdump/tests/print-AA.out
deleted file mode 100644
index 52c0a77..0000000
--- a/contrib/tcpdump/tests/print-AA.out
+++ /dev/null
@@ -1,193 +0,0 @@
-23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 <mss 16396,sackOK,timestamp 1306300950 0,nop,wscale 2>
-..............E..<.h@.@.!R.........p.P7X.~.........!....@....
-M...........
-23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 <mss 16396,sackOK,timestamp 1306300950 1306300950,nop,wscale 2>
-..............E..<..@.@.<..........P.p7z..7X......n.....@....
-M...M.......
-23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 <nop,nop,timestamp 1306300950 1306300950>
-..............E..4.j@.@.!X.........p.P7X..7z.... .7......
-M...M...
-23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 <nop,nop,timestamp 1306300951 1306300950>
-..............E....l@.@. ..........p.P7X..7z.... ........
-M...M...GET / HTTP/1.1
-Host: localhost
-User-Agent: ELinks/0.10.4-7-debian (textmode; Linux 2.6.11-1-686-smp i686; 132x56-2)
-Accept: */*
-Accept-Encoding: gzip
-Accept-Language: en
-Connection: Keep-Alive
-
-
-23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 <nop,nop,timestamp 1306300952 1306300951>
-..............E..4..@.@............P.p7z..7X.I.. .7......
-M...M...
-23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 <nop,nop,timestamp 1306300953 1306300951>
-..............E.....@.@..%.........P.p7z..7X.I.. ........
-M...M...HTTP/1.1 200 OK
-Date: Wed, 06 Jul 2005 03:57:35 GMT
-Server: Apache/1.3.33
-Last-Modified: Sun, 15 Aug 2004 00:43:41 GMT
-ETag: "6e80f0-148a-411eb1bd"
-Accept-Ranges: bytes
-Content-Length: 5258
-Keep-Alive: timeout=15, max=100
-Connection: Keep-Alive
-Content-Type: text/html; charset=iso-8859-1
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<HTML>
-<HEAD>
- <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
- <META NAME="Description" CONTENT="The initial installation of Debian apache.">
- <TITLE>Placeholder page</TITLE>
-</HEAD>
-<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EF" VLINK="#55188A" ALINK="#FF0000">
-
-<H1>Placeholder page</H1>
-<H2>If you are just browsing the web</h2>
-
-<P>The owner of this web site has not put up any web pages yet.
-Please come back later.</P>
-
-<P><SMALL><CITE>Move along, nothing to see here...</CITE> :-)</SMALL></P>
-
-<H2>If you are trying to locate the administrator of this machine</H2>
-
-<P>If you want to report something about this host's behavior, please
-contact the Internet Service Provider (ISP) involved directly.</P>
-
-<P>See the <A href="http://www.abuse.net/">Network Abuse
-Clearinghouse</A> for how to do this.</P>
-
-<H2>If you are the administrator of this machine</H2>
-
-<P>The initial installation of <A href="http://www.debian.org/">Debian's
-apache</A> web server package was successful.</P>
-
-<P><STRONG>You should replace this page with your own web pages as
-soon as possible.</STRONG></P>
-
-<P>Unless you changed its configuration, your new server is configured as follows:
-<UL>
-<LI>
-Configuration files can be found in <TT>/etc/apache</TT>.</LI>
-
-<LI>
-The <TT>DocumentRoot</TT>, which is the directory under which all your
-HTML files should exist, is set to <TT>/var/www</TT>.</LI>
-
-<LI>
-CGI scripts are looked for in <TT>/usr/lib/cgi-bin</TT>, which is where
-Debian packages will place their scripts.</LI>
-
-<LI>
-Log files are placed in <TT>/var/log/apache</TT>, and will be rotated
-weekly. The frequency of rotation can be easily changed by editing
-<TT>/etc/logrotate.d/apache</TT>.</LI>
-
-<LI>
-The default directory index is <TT>index.html</TT>, meaning that requests
-for a directory <TT>/foo/bar/</TT> will give the contents of the file <TT>/var/www/foo/bar/index.html</TT>
-if it exists (assuming that <TT>/var/www</TT> is your <TT>DocumentRoot</TT>).</LI>
-
-<LI>
-User directories are enabled, and user documents will be looked for
-in the <TT>public_html</TT> directory of the users' homes. These dirs
-should be under <TT>/home</TT>, and users will not be able to symlink
-to files they don't own.</LI>
-
-</UL>
-All the standard apache modules are available with this release and are
-now managed with debconf. Type <TT>dpkg-reconfigure apache</TT> to
-select which modules you want enabled. Many other modules are available
-through the Debian package system with the names <TT>libapache-mod-*</TT>.
-If you need to compile a module yourself, you will need to install the
-<TT>apache-dev</TT> package.
-
-<P>More documentation on Apache can be found on:
-<UL>
-<LI>
-The <A HREF="/doc/apache-doc/manual/">Apache documentation</A> stored on your server.</LI>
-
-<LI>
-The <A HREF="http://www.apache.org/">Apache Project</A> home site.</LI>
-
-<LI>
-The <A HREF="http://www.apache-ssl.org/">Apache-SSL</A> home site.</LI>
-
-<LI>
-The <A HREF="http://perl.apache.org/">mod perl</A> home site.</LI>
-
-<LI>
-The <A HREF="http://www.apacheweek.com/">ApacheWeek</A> newsletter.</LI>
-
-<LI>
-The <A HREF="http://www.debian.org/doc/">Debian Project
-Documentation</A> which contains HOWTOs, FAQs, and software updates.</LI>
-</UL>
-
-<P>You can also consult the list of <A HREF="http://www.boutell.com/faq/">World
-Wide Web Frequently Asked Questions</A> for information.
-
-<H2>Let other people know about this server</H2>
-
-<A HREF="http://netcraft.com/">Netcraft</A> provides an interesting free
-service for web site monitoring and statistic collection.
-You can let them know about your server using their
-<A HREF="http://uptime.netcraft.com/">interface</A>.
-Enabling the monitoring of your server will provide a better global overview
-of who is using what and where, and it would give Debian a better
-overview of the apache package usage.
-
-<H2>About this page</H2>
-
-<IMG ALIGN="right" ALT="" HEIGHT="247" WIDTH="278" SRC="icons/jhe061.png">
-
-<P>This is a placeholder page installed by the <A
-HREF="http://www.debian.org/">Debian</A>
-release of the apache Web server package.
-
-<P>This computer has installed the Debian GNU/Linux operating system,
-but it has <strong>nothing to do with the Debian
-Project</strong>. Please do <strong>not</strong> contact the Debian
-Project about it.</P>
-
-<P>If you find a bug in this apache package, or in Apache itself,
-please file a bug report on it. Instructions on doing this, and the
-list of <A HREF="http://bugs.debian.org/src:apache">known bugs</A> of this
-package, can be found in the
-<A HREF="http://www.debian.org/Bugs/Reporting">Debian Bug Tracking System</A>.
-
-<P>Thanks for using this package, and congratulations for your choice of
-a Debian system!</P>
-
-<DIV align="center">
-<a href="http://www.debian.org/">
-<IMG align="middle" height="30" width="25" src="icons/debian/openlogo-25.jpg" alt="Debian">
-</a>
-<a href="http://www.apache.org/">
-<IMG align="middle" height="32" width="259" src="icons/apache_pb.png" alt="Apache">
-</a>
-</DIV>
-
-<!--
- This page was initially created by Johnie Ingram (http://netgod.net/)
- It was later edited by Matthew Wilcox and Josip Rodin.
- Last modified: $Date: 2004/06/20 15:33:57 $.
- -->
-
-</BODY>
-</HTML>
-
-23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 <nop,nop,timestamp 1306300953 1306300953>
-..............E..4.n@.@.!T.........p.P7X.I7z....0_.......
-M...M...
-23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 <nop,nop,timestamp 1306302241 1306300953>
-..............E..4.p@.@.!R.........p.P7X.I7z....0_.......
-M..!M...
-23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 <nop,nop,timestamp 1306302243 1306302241>
-..............E..4..@.@............P.p7z..7X.J.. ..5.....
-M..#M..!
-23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 <nop,nop,timestamp 1306302243 1306302243>
-..............E..4.r@.@.!P.........p.P7X.J7z....0_.......
-M..#M..#
diff --git a/contrib/tcpdump/tests/print-X.out b/contrib/tcpdump/tests/print-X.out
deleted file mode 100644
index 53e44ed..0000000
--- a/contrib/tcpdump/tests/print-X.out
+++ /dev/null
@@ -1,409 +0,0 @@
-23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 <mss 16396,sackOK,timestamp 1306300950 0,nop,wscale 2>
- 0x0000: 4500 003c 1b68 4000 4006 2152 7f00 0001 E..<.h@.@.!R....
- 0x0010: 7f00 0001 da70 0050 3758 897e 0000 0000 .....p.P7X.~....
- 0x0020: a002 7fff 1421 0000 0204 400c 0402 080a .....!....@.....
- 0x0030: 4ddc 9216 0000 0000 0103 0302 M...........
-23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 <mss 16396,sackOK,timestamp 1306300950 1306300950,nop,wscale 2>
- 0x0000: 4500 003c 0000 4000 4006 3cba 7f00 0001 E..<..@.@.<.....
- 0x0010: 7f00 0001 0050 da70 377a 8df1 3758 897f .....P.p7z..7X..
- 0x0020: a012 7fff 6eb1 0000 0204 400c 0402 080a ....n.....@.....
- 0x0030: 4ddc 9216 4ddc 9216 0103 0302 M...M.......
-23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 <nop,nop,timestamp 1306300950 1306300950>
- 0x0000: 4500 0034 1b6a 4000 4006 2158 7f00 0001 E..4.j@.@.!X....
- 0x0010: 7f00 0001 da70 0050 3758 897f 377a 8df2 .....p.P7X..7z..
- 0x0020: 8010 2000 37d0 0000 0101 080a 4ddc 9216 ....7.......M...
- 0x0030: 4ddc 9216 M...
-23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 <nop,nop,timestamp 1306300951 1306300950>
- 0x0000: 4500 00fe 1b6c 4000 4006 208c 7f00 0001 E....l@.@.......
- 0x0010: 7f00 0001 da70 0050 3758 897f 377a 8df2 .....p.P7X..7z..
- 0x0020: 8018 2000 fef2 0000 0101 080a 4ddc 9217 ............M...
- 0x0030: 4ddc 9216 4745 5420 2f20 4854 5450 2f31 M...GET./.HTTP/1
- 0x0040: 2e31 0d0a 486f 7374 3a20 6c6f 6361 6c68 .1..Host:.localh
- 0x0050: 6f73 740d 0a55 7365 722d 4167 656e 743a ost..User-Agent:
- 0x0060: 2045 4c69 6e6b 732f 302e 3130 2e34 2d37 .ELinks/0.10.4-7
- 0x0070: 2d64 6562 6961 6e20 2874 6578 746d 6f64 -debian.(textmod
- 0x0080: 653b 204c 696e 7578 2032 2e36 2e31 312d e;.Linux.2.6.11-
- 0x0090: 312d 3638 362d 736d 7020 6936 3836 3b20 1-686-smp.i686;.
- 0x00a0: 3133 3278 3536 2d32 290d 0a41 6363 6570 132x56-2)..Accep
- 0x00b0: 743a 202a 2f2a 0d0a 4163 6365 7074 2d45 t:.*/*..Accept-E
- 0x00c0: 6e63 6f64 696e 673a 2067 7a69 700d 0a41 ncoding:.gzip..A
- 0x00d0: 6363 6570 742d 4c61 6e67 7561 6765 3a20 ccept-Language:.
- 0x00e0: 656e 0d0a 436f 6e6e 6563 7469 6f6e 3a20 en..Connection:.
- 0x00f0: 4b65 6570 2d41 6c69 7665 0d0a 0d0a Keep-Alive....
-23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 <nop,nop,timestamp 1306300952 1306300951>
- 0x0000: 4500 0034 1fe4 4000 4006 1cde 7f00 0001 E..4..@.@.......
- 0x0010: 7f00 0001 0050 da70 377a 8df2 3758 8a49 .....P.p7z..7X.I
- 0x0020: 8010 2000 3703 0000 0101 080a 4ddc 9218 ....7.......M...
- 0x0030: 4ddc 9217 M...
-23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 <nop,nop,timestamp 1306300953 1306300951>
- 0x0000: 4500 15eb 1fe6 4000 4006 0725 7f00 0001 E.....@.@..%....
- 0x0010: 7f00 0001 0050 da70 377a 8df2 3758 8a49 .....P.p7z..7X.I
- 0x0020: 8018 2000 13e0 0000 0101 080a 4ddc 9219 ............M...
- 0x0030: 4ddc 9217 4854 5450 2f31 2e31 2032 3030 M...HTTP/1.1.200
- 0x0040: 204f 4b0d 0a44 6174 653a 2057 6564 2c20 .OK..Date:.Wed,.
- 0x0050: 3036 204a 756c 2032 3030 3520 3033 3a35 06.Jul.2005.03:5
- 0x0060: 373a 3335 2047 4d54 0d0a 5365 7276 6572 7:35.GMT..Server
- 0x0070: 3a20 4170 6163 6865 2f31 2e33 2e33 330d :.Apache/1.3.33.
- 0x0080: 0a4c 6173 742d 4d6f 6469 6669 6564 3a20 .Last-Modified:.
- 0x0090: 5375 6e2c 2031 3520 4175 6720 3230 3034 Sun,.15.Aug.2004
- 0x00a0: 2030 303a 3433 3a34 3120 474d 540d 0a45 .00:43:41.GMT..E
- 0x00b0: 5461 673a 2022 3665 3830 6630 2d31 3438 Tag:."6e80f0-148
- 0x00c0: 612d 3431 3165 6231 6264 220d 0a41 6363 a-411eb1bd"..Acc
- 0x00d0: 6570 742d 5261 6e67 6573 3a20 6279 7465 ept-Ranges:.byte
- 0x00e0: 730d 0a43 6f6e 7465 6e74 2d4c 656e 6774 s..Content-Lengt
- 0x00f0: 683a 2035 3235 380d 0a4b 6565 702d 416c h:.5258..Keep-Al
- 0x0100: 6976 653a 2074 696d 656f 7574 3d31 352c ive:.timeout=15,
- 0x0110: 206d 6178 3d31 3030 0d0a 436f 6e6e 6563 .max=100..Connec
- 0x0120: 7469 6f6e 3a20 4b65 6570 2d41 6c69 7665 tion:.Keep-Alive
- 0x0130: 0d0a 436f 6e74 656e 742d 5479 7065 3a20 ..Content-Type:.
- 0x0140: 7465 7874 2f68 746d 6c3b 2063 6861 7273 text/html;.chars
- 0x0150: 6574 3d69 736f 2d38 3835 392d 310d 0a0d et=iso-8859-1...
- 0x0160: 0a3c 2144 4f43 5459 5045 2048 544d 4c20 .<!DOCTYPE.HTML.
- 0x0170: 5055 424c 4943 2022 2d2f 2f57 3343 2f2f PUBLIC."-//W3C//
- 0x0180: 4454 4420 4854 4d4c 2034 2e30 3120 5472 DTD.HTML.4.01.Tr
- 0x0190: 616e 7369 7469 6f6e 616c 2f2f 454e 223e ansitional//EN">
- 0x01a0: 0a3c 4854 4d4c 3e0a 3c48 4541 443e 0a20 .<HTML>.<HEAD>..
- 0x01b0: 2020 3c4d 4554 4120 4854 5450 2d45 5155 ..<META.HTTP-EQU
- 0x01c0: 4956 3d22 436f 6e74 656e 742d 5479 7065 IV="Content-Type
- 0x01d0: 2220 434f 4e54 454e 543d 2274 6578 742f ".CONTENT="text/
- 0x01e0: 6874 6d6c 3b20 6368 6172 7365 743d 6973 html;.charset=is
- 0x01f0: 6f2d 3838 3539 2d31 223e 0a20 2020 3c4d o-8859-1">....<M
- 0x0200: 4554 4120 4e41 4d45 3d22 4465 7363 7269 ETA.NAME="Descri
- 0x0210: 7074 696f 6e22 2043 4f4e 5445 4e54 3d22 ption".CONTENT="
- 0x0220: 5468 6520 696e 6974 6961 6c20 696e 7374 The.initial.inst
- 0x0230: 616c 6c61 7469 6f6e 206f 6620 4465 6269 allation.of.Debi
- 0x0240: 616e 2061 7061 6368 652e 223e 0a20 2020 an.apache.">....
- 0x0250: 3c54 4954 4c45 3e50 6c61 6365 686f 6c64 <TITLE>Placehold
- 0x0260: 6572 2070 6167 653c 2f54 4954 4c45 3e0a er.page</TITLE>.
- 0x0270: 3c2f 4845 4144 3e0a 3c42 4f44 5920 5445 </HEAD>.<BODY.TE
- 0x0280: 5854 3d22 2330 3030 3030 3022 2042 4743 XT="#000000".BGC
- 0x0290: 4f4c 4f52 3d22 2346 4646 4646 4622 204c OLOR="#FFFFFF".L
- 0x02a0: 494e 4b3d 2223 3030 3030 4546 2220 564c INK="#0000EF".VL
- 0x02b0: 494e 4b3d 2223 3535 3138 3841 2220 414c INK="#55188A".AL
- 0x02c0: 494e 4b3d 2223 4646 3030 3030 223e 0a0a INK="#FF0000">..
- 0x02d0: 3c48 313e 506c 6163 6568 6f6c 6465 7220 <H1>Placeholder.
- 0x02e0: 7061 6765 3c2f 4831 3e0a 3c48 323e 4966 page</H1>.<H2>If
- 0x02f0: 2079 6f75 2061 7265 206a 7573 7420 6272 .you.are.just.br
- 0x0300: 6f77 7369 6e67 2074 6865 2077 6562 3c2f owsing.the.web</
- 0x0310: 6832 3e0a 0a3c 503e 5468 6520 6f77 6e65 h2>..<P>The.owne
- 0x0320: 7220 6f66 2074 6869 7320 7765 6220 7369 r.of.this.web.si
- 0x0330: 7465 2068 6173 206e 6f74 2070 7574 2075 te.has.not.put.u
- 0x0340: 7020 616e 7920 7765 6220 7061 6765 7320 p.any.web.pages.
- 0x0350: 7965 742e 0a50 6c65 6173 6520 636f 6d65 yet..Please.come
- 0x0360: 2062 6163 6b20 6c61 7465 722e 3c2f 503e .back.later.</P>
- 0x0370: 0a0a 3c50 3e3c 534d 414c 4c3e 3c43 4954 ..<P><SMALL><CIT
- 0x0380: 453e 4d6f 7665 2061 6c6f 6e67 2c20 6e6f E>Move.along,.no
- 0x0390: 7468 696e 6720 746f 2073 6565 2068 6572 thing.to.see.her
- 0x03a0: 652e 2e2e 3c2f 4349 5445 3e20 3a2d 293c e...</CITE>.:-)<
- 0x03b0: 2f53 4d41 4c4c 3e3c 2f50 3e0a 0a3c 4832 /SMALL></P>..<H2
- 0x03c0: 3e49 6620 796f 7520 6172 6520 7472 7969 >If.you.are.tryi
- 0x03d0: 6e67 2074 6f20 6c6f 6361 7465 2074 6865 ng.to.locate.the
- 0x03e0: 2061 646d 696e 6973 7472 6174 6f72 206f .administrator.o
- 0x03f0: 6620 7468 6973 206d 6163 6869 6e65 3c2f f.this.machine</
- 0x0400: 4832 3e0a 0a3c 503e 4966 2079 6f75 2077 H2>..<P>If.you.w
- 0x0410: 616e 7420 746f 2072 6570 6f72 7420 736f ant.to.report.so
- 0x0420: 6d65 7468 696e 6720 6162 6f75 7420 7468 mething.about.th
- 0x0430: 6973 2068 6f73 7427 7320 6265 6861 7669 is.host's.behavi
- 0x0440: 6f72 2c20 706c 6561 7365 0a63 6f6e 7461 or,.please.conta
- 0x0450: 6374 2074 6865 2049 6e74 6572 6e65 7420 ct.the.Internet.
- 0x0460: 5365 7276 6963 6520 5072 6f76 6964 6572 Service.Provider
- 0x0470: 2028 4953 5029 2069 6e76 6f6c 7665 6420 .(ISP).involved.
- 0x0480: 6469 7265 6374 6c79 2e3c 2f50 3e0a 0a3c directly.</P>..<
- 0x0490: 503e 5365 6520 7468 6520 3c41 2068 7265 P>See.the.<A.hre
- 0x04a0: 663d 2268 7474 703a 2f2f 7777 772e 6162 f="http://www.ab
- 0x04b0: 7573 652e 6e65 742f 223e 4e65 7477 6f72 use.net/">Networ
- 0x04c0: 6b20 4162 7573 650a 436c 6561 7269 6e67 k.Abuse.Clearing
- 0x04d0: 686f 7573 653c 2f41 3e20 666f 7220 686f house</A>.for.ho
- 0x04e0: 7720 746f 2064 6f20 7468 6973 2e3c 2f50 w.to.do.this.</P
- 0x04f0: 3e0a 0a3c 4832 3e49 6620 796f 7520 6172 >..<H2>If.you.ar
- 0x0500: 6520 7468 6520 6164 6d69 6e69 7374 7261 e.the.administra
- 0x0510: 746f 7220 6f66 2074 6869 7320 6d61 6368 tor.of.this.mach
- 0x0520: 696e 653c 2f48 323e 0a0a 3c50 3e54 6865 ine</H2>..<P>The
- 0x0530: 2069 6e69 7469 616c 2069 6e73 7461 6c6c .initial.install
- 0x0540: 6174 696f 6e20 6f66 203c 4120 6872 6566 ation.of.<A.href
- 0x0550: 3d22 6874 7470 3a2f 2f77 7777 2e64 6562 ="http://www.deb
- 0x0560: 6961 6e2e 6f72 672f 223e 4465 6269 616e ian.org/">Debian
- 0x0570: 2773 0a61 7061 6368 653c 2f41 3e20 7765 's.apache</A>.we
- 0x0580: 6220 7365 7276 6572 2070 6163 6b61 6765 b.server.package
- 0x0590: 2077 6173 2073 7563 6365 7373 6675 6c2e .was.successful.
- 0x05a0: 3c2f 503e 0a0a 3c50 3e3c 5354 524f 4e47 </P>..<P><STRONG
- 0x05b0: 3e59 6f75 2073 686f 756c 6420 7265 706c >You.should.repl
- 0x05c0: 6163 6520 7468 6973 2070 6167 6520 7769 ace.this.page.wi
- 0x05d0: 7468 2079 6f75 7220 6f77 6e20 7765 6220 th.your.own.web.
- 0x05e0: 7061 6765 7320 6173 0a73 6f6f 6e20 6173 pages.as.soon.as
- 0x05f0: 2070 6f73 7369 626c 652e 3c2f 5354 524f .possible.</STRO
- 0x0600: 4e47 3e3c 2f50 3e0a 0a3c 503e 556e 6c65 NG></P>..<P>Unle
- 0x0610: 7373 2079 6f75 2063 6861 6e67 6564 2069 ss.you.changed.i
- 0x0620: 7473 2063 6f6e 6669 6775 7261 7469 6f6e ts.configuration
- 0x0630: 2c20 796f 7572 206e 6577 2073 6572 7665 ,.your.new.serve
- 0x0640: 7220 6973 2063 6f6e 6669 6775 7265 6420 r.is.configured.
- 0x0650: 6173 2066 6f6c 6c6f 7773 3a0a 3c55 4c3e as.follows:.<UL>
- 0x0660: 0a3c 4c49 3e0a 436f 6e66 6967 7572 6174 .<LI>.Configurat
- 0x0670: 696f 6e20 6669 6c65 7320 6361 6e20 6265 ion.files.can.be
- 0x0680: 2066 6f75 6e64 2069 6e20 3c54 543e 2f65 .found.in.<TT>/e
- 0x0690: 7463 2f61 7061 6368 653c 2f54 543e 2e3c tc/apache</TT>.<
- 0x06a0: 2f4c 493e 0a0a 3c4c 493e 0a54 6865 203c /LI>..<LI>.The.<
- 0x06b0: 5454 3e44 6f63 756d 656e 7452 6f6f 743c TT>DocumentRoot<
- 0x06c0: 2f54 543e 2c20 7768 6963 6820 6973 2074 /TT>,.which.is.t
- 0x06d0: 6865 2064 6972 6563 746f 7279 2075 6e64 he.directory.und
- 0x06e0: 6572 2077 6869 6368 2061 6c6c 2079 6f75 er.which.all.you
- 0x06f0: 720a 4854 4d4c 2066 696c 6573 2073 686f r.HTML.files.sho
- 0x0700: 756c 6420 6578 6973 742c 2069 7320 7365 uld.exist,.is.se
- 0x0710: 7420 746f 203c 5454 3e2f 7661 722f 7777 t.to.<TT>/var/ww
- 0x0720: 773c 2f54 543e 2e3c 2f4c 493e 0a0a 3c4c w</TT>.</LI>..<L
- 0x0730: 493e 0a43 4749 2073 6372 6970 7473 2061 I>.CGI.scripts.a
- 0x0740: 7265 206c 6f6f 6b65 6420 666f 7220 696e re.looked.for.in
- 0x0750: 203c 5454 3e2f 7573 722f 6c69 622f 6367 .<TT>/usr/lib/cg
- 0x0760: 692d 6269 6e3c 2f54 543e 2c20 7768 6963 i-bin</TT>,.whic
- 0x0770: 6820 6973 2077 6865 7265 0a44 6562 6961 h.is.where.Debia
- 0x0780: 6e20 7061 636b 6167 6573 2077 696c 6c20 n.packages.will.
- 0x0790: 706c 6163 6520 7468 6569 7220 7363 7269 place.their.scri
- 0x07a0: 7074 732e 3c2f 4c49 3e0a 0a3c 4c49 3e0a pts.</LI>..<LI>.
- 0x07b0: 4c6f 6720 6669 6c65 7320 6172 6520 706c Log.files.are.pl
- 0x07c0: 6163 6564 2069 6e20 3c54 543e 2f76 6172 aced.in.<TT>/var
- 0x07d0: 2f6c 6f67 2f61 7061 6368 653c 2f54 543e /log/apache</TT>
- 0x07e0: 2c20 616e 6420 7769 6c6c 2062 6520 726f ,.and.will.be.ro
- 0x07f0: 7461 7465 640a 7765 656b 6c79 2e20 2054 tated.weekly...T
- 0x0800: 6865 2066 7265 7175 656e 6379 206f 6620 he.frequency.of.
- 0x0810: 726f 7461 7469 6f6e 2063 616e 2062 6520 rotation.can.be.
- 0x0820: 6561 7369 6c79 2063 6861 6e67 6564 2062 easily.changed.b
- 0x0830: 7920 6564 6974 696e 670a 3c54 543e 2f65 y.editing.<TT>/e
- 0x0840: 7463 2f6c 6f67 726f 7461 7465 2e64 2f61 tc/logrotate.d/a
- 0x0850: 7061 6368 653c 2f54 543e 2e3c 2f4c 493e pache</TT>.</LI>
- 0x0860: 0a0a 3c4c 493e 0a54 6865 2064 6566 6175 ..<LI>.The.defau
- 0x0870: 6c74 2064 6972 6563 746f 7279 2069 6e64 lt.directory.ind
- 0x0880: 6578 2069 7320 3c54 543e 696e 6465 782e ex.is.<TT>index.
- 0x0890: 6874 6d6c 3c2f 5454 3e2c 206d 6561 6e69 html</TT>,.meani
- 0x08a0: 6e67 2074 6861 7420 7265 7175 6573 7473 ng.that.requests
- 0x08b0: 0a66 6f72 2061 2064 6972 6563 746f 7279 .for.a.directory
- 0x08c0: 203c 5454 3e2f 666f 6f2f 6261 722f 3c2f .<TT>/foo/bar/</
- 0x08d0: 5454 3e20 7769 6c6c 2067 6976 6520 7468 TT>.will.give.th
- 0x08e0: 6520 636f 6e74 656e 7473 206f 6620 7468 e.contents.of.th
- 0x08f0: 6520 6669 6c65 203c 5454 3e2f 7661 722f e.file.<TT>/var/
- 0x0900: 7777 772f 666f 6f2f 6261 722f 696e 6465 www/foo/bar/inde
- 0x0910: 782e 6874 6d6c 3c2f 5454 3e0a 6966 2069 x.html</TT>.if.i
- 0x0920: 7420 6578 6973 7473 2028 6173 7375 6d69 t.exists.(assumi
- 0x0930: 6e67 2074 6861 7420 3c54 543e 2f76 6172 ng.that.<TT>/var
- 0x0940: 2f77 7777 3c2f 5454 3e20 6973 2079 6f75 /www</TT>.is.you
- 0x0950: 7220 3c54 543e 446f 6375 6d65 6e74 526f r.<TT>DocumentRo
- 0x0960: 6f74 3c2f 5454 3e29 2e3c 2f4c 493e 0a0a ot</TT>).</LI>..
- 0x0970: 3c4c 493e 0a55 7365 7220 6469 7265 6374 <LI>.User.direct
- 0x0980: 6f72 6965 7320 6172 6520 656e 6162 6c65 ories.are.enable
- 0x0990: 642c 2061 6e64 2075 7365 7220 646f 6375 d,.and.user.docu
- 0x09a0: 6d65 6e74 7320 7769 6c6c 2062 6520 6c6f ments.will.be.lo
- 0x09b0: 6f6b 6564 2066 6f72 0a69 6e20 7468 6520 oked.for.in.the.
- 0x09c0: 3c54 543e 7075 626c 6963 5f68 746d 6c3c <TT>public_html<
- 0x09d0: 2f54 543e 2064 6972 6563 746f 7279 206f /TT>.directory.o
- 0x09e0: 6620 7468 6520 7573 6572 7327 2068 6f6d f.the.users'.hom
- 0x09f0: 6573 2e20 2054 6865 7365 2064 6972 730a es...These.dirs.
- 0x0a00: 7368 6f75 6c64 2062 6520 756e 6465 7220 should.be.under.
- 0x0a10: 3c54 543e 2f68 6f6d 653c 2f54 543e 2c20 <TT>/home</TT>,.
- 0x0a20: 616e 6420 7573 6572 7320 7769 6c6c 206e and.users.will.n
- 0x0a30: 6f74 2062 6520 6162 6c65 2074 6f20 7379 ot.be.able.to.sy
- 0x0a40: 6d6c 696e 6b0a 746f 2066 696c 6573 2074 mlink.to.files.t
- 0x0a50: 6865 7920 646f 6e27 7420 6f77 6e2e 3c2f hey.don't.own.</
- 0x0a60: 4c49 3e0a 0a3c 2f55 4c3e 0a41 6c6c 2074 LI>..</UL>.All.t
- 0x0a70: 6865 2073 7461 6e64 6172 6420 6170 6163 he.standard.apac
- 0x0a80: 6865 206d 6f64 756c 6573 2061 7265 2061 he.modules.are.a
- 0x0a90: 7661 696c 6162 6c65 2077 6974 6820 7468 vailable.with.th
- 0x0aa0: 6973 2072 656c 6561 7365 2061 6e64 2061 is.release.and.a
- 0x0ab0: 7265 0a6e 6f77 206d 616e 6167 6564 2077 re.now.managed.w
- 0x0ac0: 6974 6820 6465 6263 6f6e 662e 2020 5479 ith.debconf...Ty
- 0x0ad0: 7065 203c 5454 3e64 706b 672d 7265 636f pe.<TT>dpkg-reco
- 0x0ae0: 6e66 6967 7572 6520 6170 6163 6865 3c2f nfigure.apache</
- 0x0af0: 5454 3e20 746f 0a73 656c 6563 7420 7768 TT>.to.select.wh
- 0x0b00: 6963 6820 6d6f 6475 6c65 7320 796f 7520 ich.modules.you.
- 0x0b10: 7761 6e74 2065 6e61 626c 6564 2e20 204d want.enabled...M
- 0x0b20: 616e 7920 6f74 6865 7220 6d6f 6475 6c65 any.other.module
- 0x0b30: 7320 6172 6520 6176 6169 6c61 626c 650a s.are.available.
- 0x0b40: 7468 726f 7567 6820 7468 6520 4465 6269 through.the.Debi
- 0x0b50: 616e 2070 6163 6b61 6765 2073 7973 7465 an.package.syste
- 0x0b60: 6d20 7769 7468 2074 6865 206e 616d 6573 m.with.the.names
- 0x0b70: 203c 5454 3e6c 6962 6170 6163 6865 2d6d .<TT>libapache-m
- 0x0b80: 6f64 2d2a 3c2f 5454 3e2e 0a49 6620 796f od-*</TT>..If.yo
- 0x0b90: 7520 6e65 6564 2074 6f20 636f 6d70 696c u.need.to.compil
- 0x0ba0: 6520 6120 6d6f 6475 6c65 2079 6f75 7273 e.a.module.yours
- 0x0bb0: 656c 662c 2079 6f75 2077 696c 6c20 6e65 elf,.you.will.ne
- 0x0bc0: 6564 2074 6f20 696e 7374 616c 6c20 7468 ed.to.install.th
- 0x0bd0: 650a 3c54 543e 6170 6163 6865 2d64 6576 e.<TT>apache-dev
- 0x0be0: 3c2f 5454 3e20 7061 636b 6167 652e 0a0a </TT>.package...
- 0x0bf0: 3c50 3e4d 6f72 6520 646f 6375 6d65 6e74 <P>More.document
- 0x0c00: 6174 696f 6e20 6f6e 2041 7061 6368 6520 ation.on.Apache.
- 0x0c10: 6361 6e20 6265 2066 6f75 6e64 206f 6e3a can.be.found.on:
- 0x0c20: 0a3c 554c 3e0a 3c4c 493e 0a54 6865 203c .<UL>.<LI>.The.<
- 0x0c30: 4120 4852 4546 3d22 2f64 6f63 2f61 7061 A.HREF="/doc/apa
- 0x0c40: 6368 652d 646f 632f 6d61 6e75 616c 2f22 che-doc/manual/"
- 0x0c50: 3e41 7061 6368 6520 646f 6375 6d65 6e74 >Apache.document
- 0x0c60: 6174 696f 6e3c 2f41 3e20 7374 6f72 6564 ation</A>.stored
- 0x0c70: 206f 6e20 796f 7572 2073 6572 7665 722e .on.your.server.
- 0x0c80: 3c2f 4c49 3e0a 0a3c 4c49 3e0a 5468 6520 </LI>..<LI>.The.
- 0x0c90: 3c41 2048 5245 463d 2268 7474 703a 2f2f <A.HREF="http://
- 0x0ca0: 7777 772e 6170 6163 6865 2e6f 7267 2f22 www.apache.org/"
- 0x0cb0: 3e41 7061 6368 6520 5072 6f6a 6563 743c >Apache.Project<
- 0x0cc0: 2f41 3e20 686f 6d65 2073 6974 652e 3c2f /A>.home.site.</
- 0x0cd0: 4c49 3e0a 0a3c 4c49 3e0a 5468 6520 3c41 LI>..<LI>.The.<A
- 0x0ce0: 2048 5245 463d 2268 7474 703a 2f2f 7777 .HREF="http://ww
- 0x0cf0: 772e 6170 6163 6865 2d73 736c 2e6f 7267 w.apache-ssl.org
- 0x0d00: 2f22 3e41 7061 6368 652d 5353 4c3c 2f41 /">Apache-SSL</A
- 0x0d10: 3e20 686f 6d65 2073 6974 652e 3c2f 4c49 >.home.site.</LI
- 0x0d20: 3e0a 0a3c 4c49 3e0a 5468 6520 3c41 2048 >..<LI>.The.<A.H
- 0x0d30: 5245 463d 2268 7474 703a 2f2f 7065 726c REF="http://perl
- 0x0d40: 2e61 7061 6368 652e 6f72 672f 223e 6d6f .apache.org/">mo
- 0x0d50: 6420 7065 726c 3c2f 413e 2068 6f6d 6520 d.perl</A>.home.
- 0x0d60: 7369 7465 2e3c 2f4c 493e 0a0a 3c4c 493e site.</LI>..<LI>
- 0x0d70: 0a54 6865 203c 4120 4852 4546 3d22 6874 .The.<A.HREF="ht
- 0x0d80: 7470 3a2f 2f77 7777 2e61 7061 6368 6577 tp://www.apachew
- 0x0d90: 6565 6b2e 636f 6d2f 223e 4170 6163 6865 eek.com/">Apache
- 0x0da0: 5765 656b 3c2f 413e 206e 6577 736c 6574 Week</A>.newslet
- 0x0db0: 7465 722e 3c2f 4c49 3e0a 0a3c 4c49 3e0a ter.</LI>..<LI>.
- 0x0dc0: 5468 6520 3c41 2048 5245 463d 2268 7474 The.<A.HREF="htt
- 0x0dd0: 703a 2f2f 7777 772e 6465 6269 616e 2e6f p://www.debian.o
- 0x0de0: 7267 2f64 6f63 2f22 3e44 6562 6961 6e20 rg/doc/">Debian.
- 0x0df0: 5072 6f6a 6563 740a 446f 6375 6d65 6e74 Project.Document
- 0x0e00: 6174 696f 6e3c 2f41 3e20 7768 6963 6820 ation</A>.which.
- 0x0e10: 636f 6e74 6169 6e73 2048 4f57 544f 732c contains.HOWTOs,
- 0x0e20: 2046 4151 732c 2061 6e64 2073 6f66 7477 .FAQs,.and.softw
- 0x0e30: 6172 6520 7570 6461 7465 732e 3c2f 4c49 are.updates.</LI
- 0x0e40: 3e0a 3c2f 554c 3e0a 0a3c 503e 596f 7520 >.</UL>..<P>You.
- 0x0e50: 6361 6e20 616c 736f 2063 6f6e 7375 6c74 can.also.consult
- 0x0e60: 2074 6865 206c 6973 7420 6f66 203c 4120 .the.list.of.<A.
- 0x0e70: 4852 4546 3d22 6874 7470 3a2f 2f77 7777 HREF="http://www
- 0x0e80: 2e62 6f75 7465 6c6c 2e63 6f6d 2f66 6171 .boutell.com/faq
- 0x0e90: 2f22 3e57 6f72 6c64 0a57 6964 6520 5765 /">World.Wide.We
- 0x0ea0: 6220 4672 6571 7565 6e74 6c79 2041 736b b.Frequently.Ask
- 0x0eb0: 6564 2051 7565 7374 696f 6e73 3c2f 413e ed.Questions</A>
- 0x0ec0: 2066 6f72 2069 6e66 6f72 6d61 7469 6f6e .for.information
- 0x0ed0: 2e0a 0a3c 4832 3e4c 6574 206f 7468 6572 ...<H2>Let.other
- 0x0ee0: 2070 656f 706c 6520 6b6e 6f77 2061 626f .people.know.abo
- 0x0ef0: 7574 2074 6869 7320 7365 7276 6572 3c2f ut.this.server</
- 0x0f00: 4832 3e0a 0a3c 4120 4852 4546 3d22 6874 H2>..<A.HREF="ht
- 0x0f10: 7470 3a2f 2f6e 6574 6372 6166 742e 636f tp://netcraft.co
- 0x0f20: 6d2f 223e 4e65 7463 7261 6674 3c2f 413e m/">Netcraft</A>
- 0x0f30: 2070 726f 7669 6465 7320 616e 2069 6e74 .provides.an.int
- 0x0f40: 6572 6573 7469 6e67 2066 7265 650a 7365 eresting.free.se
- 0x0f50: 7276 6963 6520 666f 7220 7765 6220 7369 rvice.for.web.si
- 0x0f60: 7465 206d 6f6e 6974 6f72 696e 6720 616e te.monitoring.an
- 0x0f70: 6420 7374 6174 6973 7469 6320 636f 6c6c d.statistic.coll
- 0x0f80: 6563 7469 6f6e 2e0a 596f 7520 6361 6e20 ection..You.can.
- 0x0f90: 6c65 7420 7468 656d 206b 6e6f 7720 6162 let.them.know.ab
- 0x0fa0: 6f75 7420 796f 7572 2073 6572 7665 7220 out.your.server.
- 0x0fb0: 7573 696e 6720 7468 6569 720a 3c41 2048 using.their.<A.H
- 0x0fc0: 5245 463d 2268 7474 703a 2f2f 7570 7469 REF="http://upti
- 0x0fd0: 6d65 2e6e 6574 6372 6166 742e 636f 6d2f me.netcraft.com/
- 0x0fe0: 223e 696e 7465 7266 6163 653c 2f41 3e2e ">interface</A>.
- 0x0ff0: 0a45 6e61 626c 696e 6720 7468 6520 6d6f .Enabling.the.mo
- 0x1000: 6e69 746f 7269 6e67 206f 6620 796f 7572 nitoring.of.your
- 0x1010: 2073 6572 7665 7220 7769 6c6c 2070 726f .server.will.pro
- 0x1020: 7669 6465 2061 2062 6574 7465 7220 676c vide.a.better.gl
- 0x1030: 6f62 616c 206f 7665 7276 6965 770a 6f66 obal.overview.of
- 0x1040: 2077 686f 2069 7320 7573 696e 6720 7768 .who.is.using.wh
- 0x1050: 6174 2061 6e64 2077 6865 7265 2c20 616e at.and.where,.an
- 0x1060: 6420 6974 2077 6f75 6c64 2067 6976 6520 d.it.would.give.
- 0x1070: 4465 6269 616e 2061 2062 6574 7465 720a Debian.a.better.
- 0x1080: 6f76 6572 7669 6577 206f 6620 7468 6520 overview.of.the.
- 0x1090: 6170 6163 6865 2070 6163 6b61 6765 2075 apache.package.u
- 0x10a0: 7361 6765 2e0a 0a3c 4832 3e41 626f 7574 sage...<H2>About
- 0x10b0: 2074 6869 7320 7061 6765 3c2f 4832 3e0a .this.page</H2>.
- 0x10c0: 0a3c 494d 4720 414c 4947 4e3d 2272 6967 .<IMG.ALIGN="rig
- 0x10d0: 6874 2220 414c 543d 2222 2048 4549 4748 ht".ALT="".HEIGH
- 0x10e0: 543d 2232 3437 2220 5749 4454 483d 2232 T="247".WIDTH="2
- 0x10f0: 3738 2220 5352 433d 2269 636f 6e73 2f6a 78".SRC="icons/j
- 0x1100: 6865 3036 312e 706e 6722 3e0a 0a3c 503e he061.png">..<P>
- 0x1110: 5468 6973 2069 7320 6120 706c 6163 6568 This.is.a.placeh
- 0x1120: 6f6c 6465 7220 7061 6765 2069 6e73 7461 older.page.insta
- 0x1130: 6c6c 6564 2062 7920 7468 6520 3c41 0a48 lled.by.the.<A.H
- 0x1140: 5245 463d 2268 7474 703a 2f2f 7777 772e REF="http://www.
- 0x1150: 6465 6269 616e 2e6f 7267 2f22 3e44 6562 debian.org/">Deb
- 0x1160: 6961 6e3c 2f41 3e0a 7265 6c65 6173 6520 ian</A>.release.
- 0x1170: 6f66 2074 6865 2061 7061 6368 6520 5765 of.the.apache.We
- 0x1180: 6220 7365 7276 6572 2070 6163 6b61 6765 b.server.package
- 0x1190: 2e0a 0a3c 503e 5468 6973 2063 6f6d 7075 ...<P>This.compu
- 0x11a0: 7465 7220 6861 7320 696e 7374 616c 6c65 ter.has.installe
- 0x11b0: 6420 7468 6520 4465 6269 616e 2047 4e55 d.the.Debian.GNU
- 0x11c0: 2f4c 696e 7578 206f 7065 7261 7469 6e67 /Linux.operating
- 0x11d0: 2073 7973 7465 6d2c 0a62 7574 2069 7420 .system,.but.it.
- 0x11e0: 6861 7320 3c73 7472 6f6e 673e 6e6f 7468 has.<strong>noth
- 0x11f0: 696e 6720 746f 2064 6f20 7769 7468 2074 ing.to.do.with.t
- 0x1200: 6865 2044 6562 6961 6e0a 5072 6f6a 6563 he.Debian.Projec
- 0x1210: 743c 2f73 7472 6f6e 673e 2e20 506c 6561 t</strong>..Plea
- 0x1220: 7365 2064 6f20 3c73 7472 6f6e 673e 6e6f se.do.<strong>no
- 0x1230: 743c 2f73 7472 6f6e 673e 2063 6f6e 7461 t</strong>.conta
- 0x1240: 6374 2074 6865 2044 6562 6961 6e0a 5072 ct.the.Debian.Pr
- 0x1250: 6f6a 6563 7420 6162 6f75 7420 6974 2e3c oject.about.it.<
- 0x1260: 2f50 3e0a 0a3c 503e 4966 2079 6f75 2066 /P>..<P>If.you.f
- 0x1270: 696e 6420 6120 6275 6720 696e 2074 6869 ind.a.bug.in.thi
- 0x1280: 7320 6170 6163 6865 2070 6163 6b61 6765 s.apache.package
- 0x1290: 2c20 6f72 2069 6e20 4170 6163 6865 2069 ,.or.in.Apache.i
- 0x12a0: 7473 656c 662c 0a70 6c65 6173 6520 6669 tself,.please.fi
- 0x12b0: 6c65 2061 2062 7567 2072 6570 6f72 7420 le.a.bug.report.
- 0x12c0: 6f6e 2069 742e 2020 496e 7374 7275 6374 on.it...Instruct
- 0x12d0: 696f 6e73 206f 6e20 646f 696e 6720 7468 ions.on.doing.th
- 0x12e0: 6973 2c20 616e 6420 7468 650a 6c69 7374 is,.and.the.list
- 0x12f0: 206f 6620 3c41 2048 5245 463d 2268 7474 .of.<A.HREF="htt
- 0x1300: 703a 2f2f 6275 6773 2e64 6562 6961 6e2e p://bugs.debian.
- 0x1310: 6f72 672f 7372 633a 6170 6163 6865 223e org/src:apache">
- 0x1320: 6b6e 6f77 6e20 6275 6773 3c2f 413e 206f known.bugs</A>.o
- 0x1330: 6620 7468 6973 0a70 6163 6b61 6765 2c20 f.this.package,.
- 0x1340: 6361 6e20 6265 2066 6f75 6e64 2069 6e20 can.be.found.in.
- 0x1350: 7468 6520 0a3c 4120 4852 4546 3d22 6874 the..<A.HREF="ht
- 0x1360: 7470 3a2f 2f77 7777 2e64 6562 6961 6e2e tp://www.debian.
- 0x1370: 6f72 672f 4275 6773 2f52 6570 6f72 7469 org/Bugs/Reporti
- 0x1380: 6e67 223e 4465 6269 616e 2042 7567 2054 ng">Debian.Bug.T
- 0x1390: 7261 636b 696e 6720 5379 7374 656d 3c2f racking.System</
- 0x13a0: 413e 2e0a 0a3c 503e 5468 616e 6b73 2066 A>...<P>Thanks.f
- 0x13b0: 6f72 2075 7369 6e67 2074 6869 7320 7061 or.using.this.pa
- 0x13c0: 636b 6167 652c 2061 6e64 2063 6f6e 6772 ckage,.and.congr
- 0x13d0: 6174 756c 6174 696f 6e73 2066 6f72 2079 atulations.for.y
- 0x13e0: 6f75 7220 6368 6f69 6365 206f 660a 6120 our.choice.of.a.
- 0x13f0: 4465 6269 616e 2073 7973 7465 6d21 3c2f Debian.system!</
- 0x1400: 503e 0a0a 3c44 4956 2061 6c69 676e 3d22 P>..<DIV.align="
- 0x1410: 6365 6e74 6572 223e 0a3c 6120 6872 6566 center">.<a.href
- 0x1420: 3d22 6874 7470 3a2f 2f77 7777 2e64 6562 ="http://www.deb
- 0x1430: 6961 6e2e 6f72 672f 223e 0a3c 494d 4720 ian.org/">.<IMG.
- 0x1440: 616c 6967 6e3d 226d 6964 646c 6522 2068 align="middle".h
- 0x1450: 6569 6768 743d 2233 3022 2077 6964 7468 eight="30".width
- 0x1460: 3d22 3235 2220 7372 633d 2269 636f 6e73 ="25".src="icons
- 0x1470: 2f64 6562 6961 6e2f 6f70 656e 6c6f 676f /debian/openlogo
- 0x1480: 2d32 352e 6a70 6722 2061 6c74 3d22 4465 -25.jpg".alt="De
- 0x1490: 6269 616e 223e 0a3c 2f61 3e0a 3c61 2068 bian">.</a>.<a.h
- 0x14a0: 7265 663d 2268 7474 703a 2f2f 7777 772e ref="http://www.
- 0x14b0: 6170 6163 6865 2e6f 7267 2f22 3e0a 3c49 apache.org/">.<I
- 0x14c0: 4d47 2061 6c69 676e 3d22 6d69 6464 6c65 MG.align="middle
- 0x14d0: 2220 6865 6967 6874 3d22 3332 2220 7769 ".height="32".wi
- 0x14e0: 6474 683d 2232 3539 2220 7372 633d 2269 dth="259".src="i
- 0x14f0: 636f 6e73 2f61 7061 6368 655f 7062 2e70 cons/apache_pb.p
- 0x1500: 6e67 2220 616c 743d 2241 7061 6368 6522 ng".alt="Apache"
- 0x1510: 3e0a 3c2f 613e 0a3c 2f44 4956 3e0a 0a3c >.</a>.</DIV>..<
- 0x1520: 212d 2d0a 2020 5468 6973 2070 6167 6520 !--...This.page.
- 0x1530: 7761 7320 696e 6974 6961 6c6c 7920 6372 was.initially.cr
- 0x1540: 6561 7465 6420 6279 204a 6f68 6e69 6520 eated.by.Johnie.
- 0x1550: 496e 6772 616d 2028 6874 7470 3a2f 2f6e Ingram.(http://n
- 0x1560: 6574 676f 642e 6e65 742f 290a 2020 4974 etgod.net/)...It
- 0x1570: 2077 6173 206c 6174 6572 2065 6469 7465 .was.later.edite
- 0x1580: 6420 6279 204d 6174 7468 6577 2057 696c d.by.Matthew.Wil
- 0x1590: 636f 7820 616e 6420 4a6f 7369 7020 526f cox.and.Josip.Ro
- 0x15a0: 6469 6e2e 0a20 204c 6173 7420 6d6f 6469 din....Last.modi
- 0x15b0: 6669 6564 3a20 2444 6174 653a 2032 3030 fied:.$Date:.200
- 0x15c0: 342f 3036 2f32 3020 3135 3a33 333a 3537 4/06/20.15:33:57
- 0x15d0: 2024 2e0a 2020 2d2d 3e0a 0a3c 2f42 4f44 .$....-->..</BOD
- 0x15e0: 593e 0a3c 2f48 544d 4c3e 0a Y>.</HTML>.
-23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 <nop,nop,timestamp 1306300953 1306300953>
- 0x0000: 4500 0034 1b6e 4000 4006 2154 7f00 0001 E..4.n@.@.!T....
- 0x0010: 7f00 0001 da70 0050 3758 8a49 377a a3a9 .....p.P7X.I7z..
- 0x0020: 8010 305f 10ea 0000 0101 080a 4ddc 9219 ..0_........M...
- 0x0030: 4ddc 9219 M...
-23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 <nop,nop,timestamp 1306302241 1306300953>
- 0x0000: 4500 0034 1b70 4000 4006 2152 7f00 0001 E..4.p@.@.!R....
- 0x0010: 7f00 0001 da70 0050 3758 8a49 377a a3a9 .....p.P7X.I7z..
- 0x0020: 8011 305f 0be1 0000 0101 080a 4ddc 9721 ..0_........M..!
- 0x0030: 4ddc 9219 M...
-23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 <nop,nop,timestamp 1306302243 1306302241>
- 0x0000: 4500 0034 1fe8 4000 4006 1cda 7f00 0001 E..4..@.@.......
- 0x0010: 7f00 0001 0050 da70 377a a3a9 3758 8a4a .....P.p7z..7X.J
- 0x0020: 8011 2000 1735 0000 0101 080a 4ddc 9723 .....5......M..#
- 0x0030: 4ddc 9721 M..!
-23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 <nop,nop,timestamp 1306302243 1306302243>
- 0x0000: 4500 0034 1b72 4000 4006 2150 7f00 0001 E..4.r@.@.!P....
- 0x0010: 7f00 0001 da70 0050 3758 8a4a 377a a3aa .....p.P7X.J7z..
- 0x0020: 8010 305f 06d4 0000 0101 080a 4ddc 9723 ..0_........M..#
- 0x0030: 4ddc 9723 M..#
diff --git a/contrib/tcpdump/tests/print-XX.out b/contrib/tcpdump/tests/print-XX.out
deleted file mode 100644
index 6921a01..0000000
--- a/contrib/tcpdump/tests/print-XX.out
+++ /dev/null
@@ -1,419 +0,0 @@
-23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 <mss 16396,sackOK,timestamp 1306300950 0,nop,wscale 2>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 003c 1b68 4000 4006 2152 7f00 0001 7f00 .<.h@.@.!R......
- 0x0020: 0001 da70 0050 3758 897e 0000 0000 a002 ...p.P7X.~......
- 0x0030: 7fff 1421 0000 0204 400c 0402 080a 4ddc ...!....@.....M.
- 0x0040: 9216 0000 0000 0103 0302 ..........
-23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 <mss 16396,sackOK,timestamp 1306300950 1306300950,nop,wscale 2>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 003c 0000 4000 4006 3cba 7f00 0001 7f00 .<..@.@.<.......
- 0x0020: 0001 0050 da70 377a 8df1 3758 897f a012 ...P.p7z..7X....
- 0x0030: 7fff 6eb1 0000 0204 400c 0402 080a 4ddc ..n.....@.....M.
- 0x0040: 9216 4ddc 9216 0103 0302 ..M.......
-23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 <nop,nop,timestamp 1306300950 1306300950>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 0034 1b6a 4000 4006 2158 7f00 0001 7f00 .4.j@.@.!X......
- 0x0020: 0001 da70 0050 3758 897f 377a 8df2 8010 ...p.P7X..7z....
- 0x0030: 2000 37d0 0000 0101 080a 4ddc 9216 4ddc ..7.......M...M.
- 0x0040: 9216 ..
-23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 <nop,nop,timestamp 1306300951 1306300950>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 00fe 1b6c 4000 4006 208c 7f00 0001 7f00 ...l@.@.........
- 0x0020: 0001 da70 0050 3758 897f 377a 8df2 8018 ...p.P7X..7z....
- 0x0030: 2000 fef2 0000 0101 080a 4ddc 9217 4ddc ..........M...M.
- 0x0040: 9216 4745 5420 2f20 4854 5450 2f31 2e31 ..GET./.HTTP/1.1
- 0x0050: 0d0a 486f 7374 3a20 6c6f 6361 6c68 6f73 ..Host:.localhos
- 0x0060: 740d 0a55 7365 722d 4167 656e 743a 2045 t..User-Agent:.E
- 0x0070: 4c69 6e6b 732f 302e 3130 2e34 2d37 2d64 Links/0.10.4-7-d
- 0x0080: 6562 6961 6e20 2874 6578 746d 6f64 653b ebian.(textmode;
- 0x0090: 204c 696e 7578 2032 2e36 2e31 312d 312d .Linux.2.6.11-1-
- 0x00a0: 3638 362d 736d 7020 6936 3836 3b20 3133 686-smp.i686;.13
- 0x00b0: 3278 3536 2d32 290d 0a41 6363 6570 743a 2x56-2)..Accept:
- 0x00c0: 202a 2f2a 0d0a 4163 6365 7074 2d45 6e63 .*/*..Accept-Enc
- 0x00d0: 6f64 696e 673a 2067 7a69 700d 0a41 6363 oding:.gzip..Acc
- 0x00e0: 6570 742d 4c61 6e67 7561 6765 3a20 656e ept-Language:.en
- 0x00f0: 0d0a 436f 6e6e 6563 7469 6f6e 3a20 4b65 ..Connection:.Ke
- 0x0100: 6570 2d41 6c69 7665 0d0a 0d0a ep-Alive....
-23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 <nop,nop,timestamp 1306300952 1306300951>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 0034 1fe4 4000 4006 1cde 7f00 0001 7f00 .4..@.@.........
- 0x0020: 0001 0050 da70 377a 8df2 3758 8a49 8010 ...P.p7z..7X.I..
- 0x0030: 2000 3703 0000 0101 080a 4ddc 9218 4ddc ..7.......M...M.
- 0x0040: 9217 ..
-23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 <nop,nop,timestamp 1306300953 1306300951>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 15eb 1fe6 4000 4006 0725 7f00 0001 7f00 ....@.@..%......
- 0x0020: 0001 0050 da70 377a 8df2 3758 8a49 8018 ...P.p7z..7X.I..
- 0x0030: 2000 13e0 0000 0101 080a 4ddc 9219 4ddc ..........M...M.
- 0x0040: 9217 4854 5450 2f31 2e31 2032 3030 204f ..HTTP/1.1.200.O
- 0x0050: 4b0d 0a44 6174 653a 2057 6564 2c20 3036 K..Date:.Wed,.06
- 0x0060: 204a 756c 2032 3030 3520 3033 3a35 373a .Jul.2005.03:57:
- 0x0070: 3335 2047 4d54 0d0a 5365 7276 6572 3a20 35.GMT..Server:.
- 0x0080: 4170 6163 6865 2f31 2e33 2e33 330d 0a4c Apache/1.3.33..L
- 0x0090: 6173 742d 4d6f 6469 6669 6564 3a20 5375 ast-Modified:.Su
- 0x00a0: 6e2c 2031 3520 4175 6720 3230 3034 2030 n,.15.Aug.2004.0
- 0x00b0: 303a 3433 3a34 3120 474d 540d 0a45 5461 0:43:41.GMT..ETa
- 0x00c0: 673a 2022 3665 3830 6630 2d31 3438 612d g:."6e80f0-148a-
- 0x00d0: 3431 3165 6231 6264 220d 0a41 6363 6570 411eb1bd"..Accep
- 0x00e0: 742d 5261 6e67 6573 3a20 6279 7465 730d t-Ranges:.bytes.
- 0x00f0: 0a43 6f6e 7465 6e74 2d4c 656e 6774 683a .Content-Length:
- 0x0100: 2035 3235 380d 0a4b 6565 702d 416c 6976 .5258..Keep-Aliv
- 0x0110: 653a 2074 696d 656f 7574 3d31 352c 206d e:.timeout=15,.m
- 0x0120: 6178 3d31 3030 0d0a 436f 6e6e 6563 7469 ax=100..Connecti
- 0x0130: 6f6e 3a20 4b65 6570 2d41 6c69 7665 0d0a on:.Keep-Alive..
- 0x0140: 436f 6e74 656e 742d 5479 7065 3a20 7465 Content-Type:.te
- 0x0150: 7874 2f68 746d 6c3b 2063 6861 7273 6574 xt/html;.charset
- 0x0160: 3d69 736f 2d38 3835 392d 310d 0a0d 0a3c =iso-8859-1....<
- 0x0170: 2144 4f43 5459 5045 2048 544d 4c20 5055 !DOCTYPE.HTML.PU
- 0x0180: 424c 4943 2022 2d2f 2f57 3343 2f2f 4454 BLIC."-//W3C//DT
- 0x0190: 4420 4854 4d4c 2034 2e30 3120 5472 616e D.HTML.4.01.Tran
- 0x01a0: 7369 7469 6f6e 616c 2f2f 454e 223e 0a3c sitional//EN">.<
- 0x01b0: 4854 4d4c 3e0a 3c48 4541 443e 0a20 2020 HTML>.<HEAD>....
- 0x01c0: 3c4d 4554 4120 4854 5450 2d45 5155 4956 <META.HTTP-EQUIV
- 0x01d0: 3d22 436f 6e74 656e 742d 5479 7065 2220 ="Content-Type".
- 0x01e0: 434f 4e54 454e 543d 2274 6578 742f 6874 CONTENT="text/ht
- 0x01f0: 6d6c 3b20 6368 6172 7365 743d 6973 6f2d ml;.charset=iso-
- 0x0200: 3838 3539 2d31 223e 0a20 2020 3c4d 4554 8859-1">....<MET
- 0x0210: 4120 4e41 4d45 3d22 4465 7363 7269 7074 A.NAME="Descript
- 0x0220: 696f 6e22 2043 4f4e 5445 4e54 3d22 5468 ion".CONTENT="Th
- 0x0230: 6520 696e 6974 6961 6c20 696e 7374 616c e.initial.instal
- 0x0240: 6c61 7469 6f6e 206f 6620 4465 6269 616e lation.of.Debian
- 0x0250: 2061 7061 6368 652e 223e 0a20 2020 3c54 .apache.">....<T
- 0x0260: 4954 4c45 3e50 6c61 6365 686f 6c64 6572 ITLE>Placeholder
- 0x0270: 2070 6167 653c 2f54 4954 4c45 3e0a 3c2f .page</TITLE>.</
- 0x0280: 4845 4144 3e0a 3c42 4f44 5920 5445 5854 HEAD>.<BODY.TEXT
- 0x0290: 3d22 2330 3030 3030 3022 2042 4743 4f4c ="#000000".BGCOL
- 0x02a0: 4f52 3d22 2346 4646 4646 4622 204c 494e OR="#FFFFFF".LIN
- 0x02b0: 4b3d 2223 3030 3030 4546 2220 564c 494e K="#0000EF".VLIN
- 0x02c0: 4b3d 2223 3535 3138 3841 2220 414c 494e K="#55188A".ALIN
- 0x02d0: 4b3d 2223 4646 3030 3030 223e 0a0a 3c48 K="#FF0000">..<H
- 0x02e0: 313e 506c 6163 6568 6f6c 6465 7220 7061 1>Placeholder.pa
- 0x02f0: 6765 3c2f 4831 3e0a 3c48 323e 4966 2079 ge</H1>.<H2>If.y
- 0x0300: 6f75 2061 7265 206a 7573 7420 6272 6f77 ou.are.just.brow
- 0x0310: 7369 6e67 2074 6865 2077 6562 3c2f 6832 sing.the.web</h2
- 0x0320: 3e0a 0a3c 503e 5468 6520 6f77 6e65 7220 >..<P>The.owner.
- 0x0330: 6f66 2074 6869 7320 7765 6220 7369 7465 of.this.web.site
- 0x0340: 2068 6173 206e 6f74 2070 7574 2075 7020 .has.not.put.up.
- 0x0350: 616e 7920 7765 6220 7061 6765 7320 7965 any.web.pages.ye
- 0x0360: 742e 0a50 6c65 6173 6520 636f 6d65 2062 t..Please.come.b
- 0x0370: 6163 6b20 6c61 7465 722e 3c2f 503e 0a0a ack.later.</P>..
- 0x0380: 3c50 3e3c 534d 414c 4c3e 3c43 4954 453e <P><SMALL><CITE>
- 0x0390: 4d6f 7665 2061 6c6f 6e67 2c20 6e6f 7468 Move.along,.noth
- 0x03a0: 696e 6720 746f 2073 6565 2068 6572 652e ing.to.see.here.
- 0x03b0: 2e2e 3c2f 4349 5445 3e20 3a2d 293c 2f53 ..</CITE>.:-)</S
- 0x03c0: 4d41 4c4c 3e3c 2f50 3e0a 0a3c 4832 3e49 MALL></P>..<H2>I
- 0x03d0: 6620 796f 7520 6172 6520 7472 7969 6e67 f.you.are.trying
- 0x03e0: 2074 6f20 6c6f 6361 7465 2074 6865 2061 .to.locate.the.a
- 0x03f0: 646d 696e 6973 7472 6174 6f72 206f 6620 dministrator.of.
- 0x0400: 7468 6973 206d 6163 6869 6e65 3c2f 4832 this.machine</H2
- 0x0410: 3e0a 0a3c 503e 4966 2079 6f75 2077 616e >..<P>If.you.wan
- 0x0420: 7420 746f 2072 6570 6f72 7420 736f 6d65 t.to.report.some
- 0x0430: 7468 696e 6720 6162 6f75 7420 7468 6973 thing.about.this
- 0x0440: 2068 6f73 7427 7320 6265 6861 7669 6f72 .host's.behavior
- 0x0450: 2c20 706c 6561 7365 0a63 6f6e 7461 6374 ,.please.contact
- 0x0460: 2074 6865 2049 6e74 6572 6e65 7420 5365 .the.Internet.Se
- 0x0470: 7276 6963 6520 5072 6f76 6964 6572 2028 rvice.Provider.(
- 0x0480: 4953 5029 2069 6e76 6f6c 7665 6420 6469 ISP).involved.di
- 0x0490: 7265 6374 6c79 2e3c 2f50 3e0a 0a3c 503e rectly.</P>..<P>
- 0x04a0: 5365 6520 7468 6520 3c41 2068 7265 663d See.the.<A.href=
- 0x04b0: 2268 7474 703a 2f2f 7777 772e 6162 7573 "http://www.abus
- 0x04c0: 652e 6e65 742f 223e 4e65 7477 6f72 6b20 e.net/">Network.
- 0x04d0: 4162 7573 650a 436c 6561 7269 6e67 686f Abuse.Clearingho
- 0x04e0: 7573 653c 2f41 3e20 666f 7220 686f 7720 use</A>.for.how.
- 0x04f0: 746f 2064 6f20 7468 6973 2e3c 2f50 3e0a to.do.this.</P>.
- 0x0500: 0a3c 4832 3e49 6620 796f 7520 6172 6520 .<H2>If.you.are.
- 0x0510: 7468 6520 6164 6d69 6e69 7374 7261 746f the.administrato
- 0x0520: 7220 6f66 2074 6869 7320 6d61 6368 696e r.of.this.machin
- 0x0530: 653c 2f48 323e 0a0a 3c50 3e54 6865 2069 e</H2>..<P>The.i
- 0x0540: 6e69 7469 616c 2069 6e73 7461 6c6c 6174 nitial.installat
- 0x0550: 696f 6e20 6f66 203c 4120 6872 6566 3d22 ion.of.<A.href="
- 0x0560: 6874 7470 3a2f 2f77 7777 2e64 6562 6961 http://www.debia
- 0x0570: 6e2e 6f72 672f 223e 4465 6269 616e 2773 n.org/">Debian's
- 0x0580: 0a61 7061 6368 653c 2f41 3e20 7765 6220 .apache</A>.web.
- 0x0590: 7365 7276 6572 2070 6163 6b61 6765 2077 server.package.w
- 0x05a0: 6173 2073 7563 6365 7373 6675 6c2e 3c2f as.successful.</
- 0x05b0: 503e 0a0a 3c50 3e3c 5354 524f 4e47 3e59 P>..<P><STRONG>Y
- 0x05c0: 6f75 2073 686f 756c 6420 7265 706c 6163 ou.should.replac
- 0x05d0: 6520 7468 6973 2070 6167 6520 7769 7468 e.this.page.with
- 0x05e0: 2079 6f75 7220 6f77 6e20 7765 6220 7061 .your.own.web.pa
- 0x05f0: 6765 7320 6173 0a73 6f6f 6e20 6173 2070 ges.as.soon.as.p
- 0x0600: 6f73 7369 626c 652e 3c2f 5354 524f 4e47 ossible.</STRONG
- 0x0610: 3e3c 2f50 3e0a 0a3c 503e 556e 6c65 7373 ></P>..<P>Unless
- 0x0620: 2079 6f75 2063 6861 6e67 6564 2069 7473 .you.changed.its
- 0x0630: 2063 6f6e 6669 6775 7261 7469 6f6e 2c20 .configuration,.
- 0x0640: 796f 7572 206e 6577 2073 6572 7665 7220 your.new.server.
- 0x0650: 6973 2063 6f6e 6669 6775 7265 6420 6173 is.configured.as
- 0x0660: 2066 6f6c 6c6f 7773 3a0a 3c55 4c3e 0a3c .follows:.<UL>.<
- 0x0670: 4c49 3e0a 436f 6e66 6967 7572 6174 696f LI>.Configuratio
- 0x0680: 6e20 6669 6c65 7320 6361 6e20 6265 2066 n.files.can.be.f
- 0x0690: 6f75 6e64 2069 6e20 3c54 543e 2f65 7463 ound.in.<TT>/etc
- 0x06a0: 2f61 7061 6368 653c 2f54 543e 2e3c 2f4c /apache</TT>.</L
- 0x06b0: 493e 0a0a 3c4c 493e 0a54 6865 203c 5454 I>..<LI>.The.<TT
- 0x06c0: 3e44 6f63 756d 656e 7452 6f6f 743c 2f54 >DocumentRoot</T
- 0x06d0: 543e 2c20 7768 6963 6820 6973 2074 6865 T>,.which.is.the
- 0x06e0: 2064 6972 6563 746f 7279 2075 6e64 6572 .directory.under
- 0x06f0: 2077 6869 6368 2061 6c6c 2079 6f75 720a .which.all.your.
- 0x0700: 4854 4d4c 2066 696c 6573 2073 686f 756c HTML.files.shoul
- 0x0710: 6420 6578 6973 742c 2069 7320 7365 7420 d.exist,.is.set.
- 0x0720: 746f 203c 5454 3e2f 7661 722f 7777 773c to.<TT>/var/www<
- 0x0730: 2f54 543e 2e3c 2f4c 493e 0a0a 3c4c 493e /TT>.</LI>..<LI>
- 0x0740: 0a43 4749 2073 6372 6970 7473 2061 7265 .CGI.scripts.are
- 0x0750: 206c 6f6f 6b65 6420 666f 7220 696e 203c .looked.for.in.<
- 0x0760: 5454 3e2f 7573 722f 6c69 622f 6367 692d TT>/usr/lib/cgi-
- 0x0770: 6269 6e3c 2f54 543e 2c20 7768 6963 6820 bin</TT>,.which.
- 0x0780: 6973 2077 6865 7265 0a44 6562 6961 6e20 is.where.Debian.
- 0x0790: 7061 636b 6167 6573 2077 696c 6c20 706c packages.will.pl
- 0x07a0: 6163 6520 7468 6569 7220 7363 7269 7074 ace.their.script
- 0x07b0: 732e 3c2f 4c49 3e0a 0a3c 4c49 3e0a 4c6f s.</LI>..<LI>.Lo
- 0x07c0: 6720 6669 6c65 7320 6172 6520 706c 6163 g.files.are.plac
- 0x07d0: 6564 2069 6e20 3c54 543e 2f76 6172 2f6c ed.in.<TT>/var/l
- 0x07e0: 6f67 2f61 7061 6368 653c 2f54 543e 2c20 og/apache</TT>,.
- 0x07f0: 616e 6420 7769 6c6c 2062 6520 726f 7461 and.will.be.rota
- 0x0800: 7465 640a 7765 656b 6c79 2e20 2054 6865 ted.weekly...The
- 0x0810: 2066 7265 7175 656e 6379 206f 6620 726f .frequency.of.ro
- 0x0820: 7461 7469 6f6e 2063 616e 2062 6520 6561 tation.can.be.ea
- 0x0830: 7369 6c79 2063 6861 6e67 6564 2062 7920 sily.changed.by.
- 0x0840: 6564 6974 696e 670a 3c54 543e 2f65 7463 editing.<TT>/etc
- 0x0850: 2f6c 6f67 726f 7461 7465 2e64 2f61 7061 /logrotate.d/apa
- 0x0860: 6368 653c 2f54 543e 2e3c 2f4c 493e 0a0a che</TT>.</LI>..
- 0x0870: 3c4c 493e 0a54 6865 2064 6566 6175 6c74 <LI>.The.default
- 0x0880: 2064 6972 6563 746f 7279 2069 6e64 6578 .directory.index
- 0x0890: 2069 7320 3c54 543e 696e 6465 782e 6874 .is.<TT>index.ht
- 0x08a0: 6d6c 3c2f 5454 3e2c 206d 6561 6e69 6e67 ml</TT>,.meaning
- 0x08b0: 2074 6861 7420 7265 7175 6573 7473 0a66 .that.requests.f
- 0x08c0: 6f72 2061 2064 6972 6563 746f 7279 203c or.a.directory.<
- 0x08d0: 5454 3e2f 666f 6f2f 6261 722f 3c2f 5454 TT>/foo/bar/</TT
- 0x08e0: 3e20 7769 6c6c 2067 6976 6520 7468 6520 >.will.give.the.
- 0x08f0: 636f 6e74 656e 7473 206f 6620 7468 6520 contents.of.the.
- 0x0900: 6669 6c65 203c 5454 3e2f 7661 722f 7777 file.<TT>/var/ww
- 0x0910: 772f 666f 6f2f 6261 722f 696e 6465 782e w/foo/bar/index.
- 0x0920: 6874 6d6c 3c2f 5454 3e0a 6966 2069 7420 html</TT>.if.it.
- 0x0930: 6578 6973 7473 2028 6173 7375 6d69 6e67 exists.(assuming
- 0x0940: 2074 6861 7420 3c54 543e 2f76 6172 2f77 .that.<TT>/var/w
- 0x0950: 7777 3c2f 5454 3e20 6973 2079 6f75 7220 ww</TT>.is.your.
- 0x0960: 3c54 543e 446f 6375 6d65 6e74 526f 6f74 <TT>DocumentRoot
- 0x0970: 3c2f 5454 3e29 2e3c 2f4c 493e 0a0a 3c4c </TT>).</LI>..<L
- 0x0980: 493e 0a55 7365 7220 6469 7265 6374 6f72 I>.User.director
- 0x0990: 6965 7320 6172 6520 656e 6162 6c65 642c ies.are.enabled,
- 0x09a0: 2061 6e64 2075 7365 7220 646f 6375 6d65 .and.user.docume
- 0x09b0: 6e74 7320 7769 6c6c 2062 6520 6c6f 6f6b nts.will.be.look
- 0x09c0: 6564 2066 6f72 0a69 6e20 7468 6520 3c54 ed.for.in.the.<T
- 0x09d0: 543e 7075 626c 6963 5f68 746d 6c3c 2f54 T>public_html</T
- 0x09e0: 543e 2064 6972 6563 746f 7279 206f 6620 T>.directory.of.
- 0x09f0: 7468 6520 7573 6572 7327 2068 6f6d 6573 the.users'.homes
- 0x0a00: 2e20 2054 6865 7365 2064 6972 730a 7368 ...These.dirs.sh
- 0x0a10: 6f75 6c64 2062 6520 756e 6465 7220 3c54 ould.be.under.<T
- 0x0a20: 543e 2f68 6f6d 653c 2f54 543e 2c20 616e T>/home</TT>,.an
- 0x0a30: 6420 7573 6572 7320 7769 6c6c 206e 6f74 d.users.will.not
- 0x0a40: 2062 6520 6162 6c65 2074 6f20 7379 6d6c .be.able.to.syml
- 0x0a50: 696e 6b0a 746f 2066 696c 6573 2074 6865 ink.to.files.the
- 0x0a60: 7920 646f 6e27 7420 6f77 6e2e 3c2f 4c49 y.don't.own.</LI
- 0x0a70: 3e0a 0a3c 2f55 4c3e 0a41 6c6c 2074 6865 >..</UL>.All.the
- 0x0a80: 2073 7461 6e64 6172 6420 6170 6163 6865 .standard.apache
- 0x0a90: 206d 6f64 756c 6573 2061 7265 2061 7661 .modules.are.ava
- 0x0aa0: 696c 6162 6c65 2077 6974 6820 7468 6973 ilable.with.this
- 0x0ab0: 2072 656c 6561 7365 2061 6e64 2061 7265 .release.and.are
- 0x0ac0: 0a6e 6f77 206d 616e 6167 6564 2077 6974 .now.managed.wit
- 0x0ad0: 6820 6465 6263 6f6e 662e 2020 5479 7065 h.debconf...Type
- 0x0ae0: 203c 5454 3e64 706b 672d 7265 636f 6e66 .<TT>dpkg-reconf
- 0x0af0: 6967 7572 6520 6170 6163 6865 3c2f 5454 igure.apache</TT
- 0x0b00: 3e20 746f 0a73 656c 6563 7420 7768 6963 >.to.select.whic
- 0x0b10: 6820 6d6f 6475 6c65 7320 796f 7520 7761 h.modules.you.wa
- 0x0b20: 6e74 2065 6e61 626c 6564 2e20 204d 616e nt.enabled...Man
- 0x0b30: 7920 6f74 6865 7220 6d6f 6475 6c65 7320 y.other.modules.
- 0x0b40: 6172 6520 6176 6169 6c61 626c 650a 7468 are.available.th
- 0x0b50: 726f 7567 6820 7468 6520 4465 6269 616e rough.the.Debian
- 0x0b60: 2070 6163 6b61 6765 2073 7973 7465 6d20 .package.system.
- 0x0b70: 7769 7468 2074 6865 206e 616d 6573 203c with.the.names.<
- 0x0b80: 5454 3e6c 6962 6170 6163 6865 2d6d 6f64 TT>libapache-mod
- 0x0b90: 2d2a 3c2f 5454 3e2e 0a49 6620 796f 7520 -*</TT>..If.you.
- 0x0ba0: 6e65 6564 2074 6f20 636f 6d70 696c 6520 need.to.compile.
- 0x0bb0: 6120 6d6f 6475 6c65 2079 6f75 7273 656c a.module.yoursel
- 0x0bc0: 662c 2079 6f75 2077 696c 6c20 6e65 6564 f,.you.will.need
- 0x0bd0: 2074 6f20 696e 7374 616c 6c20 7468 650a .to.install.the.
- 0x0be0: 3c54 543e 6170 6163 6865 2d64 6576 3c2f <TT>apache-dev</
- 0x0bf0: 5454 3e20 7061 636b 6167 652e 0a0a 3c50 TT>.package...<P
- 0x0c00: 3e4d 6f72 6520 646f 6375 6d65 6e74 6174 >More.documentat
- 0x0c10: 696f 6e20 6f6e 2041 7061 6368 6520 6361 ion.on.Apache.ca
- 0x0c20: 6e20 6265 2066 6f75 6e64 206f 6e3a 0a3c n.be.found.on:.<
- 0x0c30: 554c 3e0a 3c4c 493e 0a54 6865 203c 4120 UL>.<LI>.The.<A.
- 0x0c40: 4852 4546 3d22 2f64 6f63 2f61 7061 6368 HREF="/doc/apach
- 0x0c50: 652d 646f 632f 6d61 6e75 616c 2f22 3e41 e-doc/manual/">A
- 0x0c60: 7061 6368 6520 646f 6375 6d65 6e74 6174 pache.documentat
- 0x0c70: 696f 6e3c 2f41 3e20 7374 6f72 6564 206f ion</A>.stored.o
- 0x0c80: 6e20 796f 7572 2073 6572 7665 722e 3c2f n.your.server.</
- 0x0c90: 4c49 3e0a 0a3c 4c49 3e0a 5468 6520 3c41 LI>..<LI>.The.<A
- 0x0ca0: 2048 5245 463d 2268 7474 703a 2f2f 7777 .HREF="http://ww
- 0x0cb0: 772e 6170 6163 6865 2e6f 7267 2f22 3e41 w.apache.org/">A
- 0x0cc0: 7061 6368 6520 5072 6f6a 6563 743c 2f41 pache.Project</A
- 0x0cd0: 3e20 686f 6d65 2073 6974 652e 3c2f 4c49 >.home.site.</LI
- 0x0ce0: 3e0a 0a3c 4c49 3e0a 5468 6520 3c41 2048 >..<LI>.The.<A.H
- 0x0cf0: 5245 463d 2268 7474 703a 2f2f 7777 772e REF="http://www.
- 0x0d00: 6170 6163 6865 2d73 736c 2e6f 7267 2f22 apache-ssl.org/"
- 0x0d10: 3e41 7061 6368 652d 5353 4c3c 2f41 3e20 >Apache-SSL</A>.
- 0x0d20: 686f 6d65 2073 6974 652e 3c2f 4c49 3e0a home.site.</LI>.
- 0x0d30: 0a3c 4c49 3e0a 5468 6520 3c41 2048 5245 .<LI>.The.<A.HRE
- 0x0d40: 463d 2268 7474 703a 2f2f 7065 726c 2e61 F="http://perl.a
- 0x0d50: 7061 6368 652e 6f72 672f 223e 6d6f 6420 pache.org/">mod.
- 0x0d60: 7065 726c 3c2f 413e 2068 6f6d 6520 7369 perl</A>.home.si
- 0x0d70: 7465 2e3c 2f4c 493e 0a0a 3c4c 493e 0a54 te.</LI>..<LI>.T
- 0x0d80: 6865 203c 4120 4852 4546 3d22 6874 7470 he.<A.HREF="http
- 0x0d90: 3a2f 2f77 7777 2e61 7061 6368 6577 6565 ://www.apachewee
- 0x0da0: 6b2e 636f 6d2f 223e 4170 6163 6865 5765 k.com/">ApacheWe
- 0x0db0: 656b 3c2f 413e 206e 6577 736c 6574 7465 ek</A>.newslette
- 0x0dc0: 722e 3c2f 4c49 3e0a 0a3c 4c49 3e0a 5468 r.</LI>..<LI>.Th
- 0x0dd0: 6520 3c41 2048 5245 463d 2268 7474 703a e.<A.HREF="http:
- 0x0de0: 2f2f 7777 772e 6465 6269 616e 2e6f 7267 //www.debian.org
- 0x0df0: 2f64 6f63 2f22 3e44 6562 6961 6e20 5072 /doc/">Debian.Pr
- 0x0e00: 6f6a 6563 740a 446f 6375 6d65 6e74 6174 oject.Documentat
- 0x0e10: 696f 6e3c 2f41 3e20 7768 6963 6820 636f ion</A>.which.co
- 0x0e20: 6e74 6169 6e73 2048 4f57 544f 732c 2046 ntains.HOWTOs,.F
- 0x0e30: 4151 732c 2061 6e64 2073 6f66 7477 6172 AQs,.and.softwar
- 0x0e40: 6520 7570 6461 7465 732e 3c2f 4c49 3e0a e.updates.</LI>.
- 0x0e50: 3c2f 554c 3e0a 0a3c 503e 596f 7520 6361 </UL>..<P>You.ca
- 0x0e60: 6e20 616c 736f 2063 6f6e 7375 6c74 2074 n.also.consult.t
- 0x0e70: 6865 206c 6973 7420 6f66 203c 4120 4852 he.list.of.<A.HR
- 0x0e80: 4546 3d22 6874 7470 3a2f 2f77 7777 2e62 EF="http://www.b
- 0x0e90: 6f75 7465 6c6c 2e63 6f6d 2f66 6171 2f22 outell.com/faq/"
- 0x0ea0: 3e57 6f72 6c64 0a57 6964 6520 5765 6220 >World.Wide.Web.
- 0x0eb0: 4672 6571 7565 6e74 6c79 2041 736b 6564 Frequently.Asked
- 0x0ec0: 2051 7565 7374 696f 6e73 3c2f 413e 2066 .Questions</A>.f
- 0x0ed0: 6f72 2069 6e66 6f72 6d61 7469 6f6e 2e0a or.information..
- 0x0ee0: 0a3c 4832 3e4c 6574 206f 7468 6572 2070 .<H2>Let.other.p
- 0x0ef0: 656f 706c 6520 6b6e 6f77 2061 626f 7574 eople.know.about
- 0x0f00: 2074 6869 7320 7365 7276 6572 3c2f 4832 .this.server</H2
- 0x0f10: 3e0a 0a3c 4120 4852 4546 3d22 6874 7470 >..<A.HREF="http
- 0x0f20: 3a2f 2f6e 6574 6372 6166 742e 636f 6d2f ://netcraft.com/
- 0x0f30: 223e 4e65 7463 7261 6674 3c2f 413e 2070 ">Netcraft</A>.p
- 0x0f40: 726f 7669 6465 7320 616e 2069 6e74 6572 rovides.an.inter
- 0x0f50: 6573 7469 6e67 2066 7265 650a 7365 7276 esting.free.serv
- 0x0f60: 6963 6520 666f 7220 7765 6220 7369 7465 ice.for.web.site
- 0x0f70: 206d 6f6e 6974 6f72 696e 6720 616e 6420 .monitoring.and.
- 0x0f80: 7374 6174 6973 7469 6320 636f 6c6c 6563 statistic.collec
- 0x0f90: 7469 6f6e 2e0a 596f 7520 6361 6e20 6c65 tion..You.can.le
- 0x0fa0: 7420 7468 656d 206b 6e6f 7720 6162 6f75 t.them.know.abou
- 0x0fb0: 7420 796f 7572 2073 6572 7665 7220 7573 t.your.server.us
- 0x0fc0: 696e 6720 7468 6569 720a 3c41 2048 5245 ing.their.<A.HRE
- 0x0fd0: 463d 2268 7474 703a 2f2f 7570 7469 6d65 F="http://uptime
- 0x0fe0: 2e6e 6574 6372 6166 742e 636f 6d2f 223e .netcraft.com/">
- 0x0ff0: 696e 7465 7266 6163 653c 2f41 3e2e 0a45 interface</A>..E
- 0x1000: 6e61 626c 696e 6720 7468 6520 6d6f 6e69 nabling.the.moni
- 0x1010: 746f 7269 6e67 206f 6620 796f 7572 2073 toring.of.your.s
- 0x1020: 6572 7665 7220 7769 6c6c 2070 726f 7669 erver.will.provi
- 0x1030: 6465 2061 2062 6574 7465 7220 676c 6f62 de.a.better.glob
- 0x1040: 616c 206f 7665 7276 6965 770a 6f66 2077 al.overview.of.w
- 0x1050: 686f 2069 7320 7573 696e 6720 7768 6174 ho.is.using.what
- 0x1060: 2061 6e64 2077 6865 7265 2c20 616e 6420 .and.where,.and.
- 0x1070: 6974 2077 6f75 6c64 2067 6976 6520 4465 it.would.give.De
- 0x1080: 6269 616e 2061 2062 6574 7465 720a 6f76 bian.a.better.ov
- 0x1090: 6572 7669 6577 206f 6620 7468 6520 6170 erview.of.the.ap
- 0x10a0: 6163 6865 2070 6163 6b61 6765 2075 7361 ache.package.usa
- 0x10b0: 6765 2e0a 0a3c 4832 3e41 626f 7574 2074 ge...<H2>About.t
- 0x10c0: 6869 7320 7061 6765 3c2f 4832 3e0a 0a3c his.page</H2>..<
- 0x10d0: 494d 4720 414c 4947 4e3d 2272 6967 6874 IMG.ALIGN="right
- 0x10e0: 2220 414c 543d 2222 2048 4549 4748 543d ".ALT="".HEIGHT=
- 0x10f0: 2232 3437 2220 5749 4454 483d 2232 3738 "247".WIDTH="278
- 0x1100: 2220 5352 433d 2269 636f 6e73 2f6a 6865 ".SRC="icons/jhe
- 0x1110: 3036 312e 706e 6722 3e0a 0a3c 503e 5468 061.png">..<P>Th
- 0x1120: 6973 2069 7320 6120 706c 6163 6568 6f6c is.is.a.placehol
- 0x1130: 6465 7220 7061 6765 2069 6e73 7461 6c6c der.page.install
- 0x1140: 6564 2062 7920 7468 6520 3c41 0a48 5245 ed.by.the.<A.HRE
- 0x1150: 463d 2268 7474 703a 2f2f 7777 772e 6465 F="http://www.de
- 0x1160: 6269 616e 2e6f 7267 2f22 3e44 6562 6961 bian.org/">Debia
- 0x1170: 6e3c 2f41 3e0a 7265 6c65 6173 6520 6f66 n</A>.release.of
- 0x1180: 2074 6865 2061 7061 6368 6520 5765 6220 .the.apache.Web.
- 0x1190: 7365 7276 6572 2070 6163 6b61 6765 2e0a server.package..
- 0x11a0: 0a3c 503e 5468 6973 2063 6f6d 7075 7465 .<P>This.compute
- 0x11b0: 7220 6861 7320 696e 7374 616c 6c65 6420 r.has.installed.
- 0x11c0: 7468 6520 4465 6269 616e 2047 4e55 2f4c the.Debian.GNU/L
- 0x11d0: 696e 7578 206f 7065 7261 7469 6e67 2073 inux.operating.s
- 0x11e0: 7973 7465 6d2c 0a62 7574 2069 7420 6861 ystem,.but.it.ha
- 0x11f0: 7320 3c73 7472 6f6e 673e 6e6f 7468 696e s.<strong>nothin
- 0x1200: 6720 746f 2064 6f20 7769 7468 2074 6865 g.to.do.with.the
- 0x1210: 2044 6562 6961 6e0a 5072 6f6a 6563 743c .Debian.Project<
- 0x1220: 2f73 7472 6f6e 673e 2e20 506c 6561 7365 /strong>..Please
- 0x1230: 2064 6f20 3c73 7472 6f6e 673e 6e6f 743c .do.<strong>not<
- 0x1240: 2f73 7472 6f6e 673e 2063 6f6e 7461 6374 /strong>.contact
- 0x1250: 2074 6865 2044 6562 6961 6e0a 5072 6f6a .the.Debian.Proj
- 0x1260: 6563 7420 6162 6f75 7420 6974 2e3c 2f50 ect.about.it.</P
- 0x1270: 3e0a 0a3c 503e 4966 2079 6f75 2066 696e >..<P>If.you.fin
- 0x1280: 6420 6120 6275 6720 696e 2074 6869 7320 d.a.bug.in.this.
- 0x1290: 6170 6163 6865 2070 6163 6b61 6765 2c20 apache.package,.
- 0x12a0: 6f72 2069 6e20 4170 6163 6865 2069 7473 or.in.Apache.its
- 0x12b0: 656c 662c 0a70 6c65 6173 6520 6669 6c65 elf,.please.file
- 0x12c0: 2061 2062 7567 2072 6570 6f72 7420 6f6e .a.bug.report.on
- 0x12d0: 2069 742e 2020 496e 7374 7275 6374 696f .it...Instructio
- 0x12e0: 6e73 206f 6e20 646f 696e 6720 7468 6973 ns.on.doing.this
- 0x12f0: 2c20 616e 6420 7468 650a 6c69 7374 206f ,.and.the.list.o
- 0x1300: 6620 3c41 2048 5245 463d 2268 7474 703a f.<A.HREF="http:
- 0x1310: 2f2f 6275 6773 2e64 6562 6961 6e2e 6f72 //bugs.debian.or
- 0x1320: 672f 7372 633a 6170 6163 6865 223e 6b6e g/src:apache">kn
- 0x1330: 6f77 6e20 6275 6773 3c2f 413e 206f 6620 own.bugs</A>.of.
- 0x1340: 7468 6973 0a70 6163 6b61 6765 2c20 6361 this.package,.ca
- 0x1350: 6e20 6265 2066 6f75 6e64 2069 6e20 7468 n.be.found.in.th
- 0x1360: 6520 0a3c 4120 4852 4546 3d22 6874 7470 e..<A.HREF="http
- 0x1370: 3a2f 2f77 7777 2e64 6562 6961 6e2e 6f72 ://www.debian.or
- 0x1380: 672f 4275 6773 2f52 6570 6f72 7469 6e67 g/Bugs/Reporting
- 0x1390: 223e 4465 6269 616e 2042 7567 2054 7261 ">Debian.Bug.Tra
- 0x13a0: 636b 696e 6720 5379 7374 656d 3c2f 413e cking.System</A>
- 0x13b0: 2e0a 0a3c 503e 5468 616e 6b73 2066 6f72 ...<P>Thanks.for
- 0x13c0: 2075 7369 6e67 2074 6869 7320 7061 636b .using.this.pack
- 0x13d0: 6167 652c 2061 6e64 2063 6f6e 6772 6174 age,.and.congrat
- 0x13e0: 756c 6174 696f 6e73 2066 6f72 2079 6f75 ulations.for.you
- 0x13f0: 7220 6368 6f69 6365 206f 660a 6120 4465 r.choice.of.a.De
- 0x1400: 6269 616e 2073 7973 7465 6d21 3c2f 503e bian.system!</P>
- 0x1410: 0a0a 3c44 4956 2061 6c69 676e 3d22 6365 ..<DIV.align="ce
- 0x1420: 6e74 6572 223e 0a3c 6120 6872 6566 3d22 nter">.<a.href="
- 0x1430: 6874 7470 3a2f 2f77 7777 2e64 6562 6961 http://www.debia
- 0x1440: 6e2e 6f72 672f 223e 0a3c 494d 4720 616c n.org/">.<IMG.al
- 0x1450: 6967 6e3d 226d 6964 646c 6522 2068 6569 ign="middle".hei
- 0x1460: 6768 743d 2233 3022 2077 6964 7468 3d22 ght="30".width="
- 0x1470: 3235 2220 7372 633d 2269 636f 6e73 2f64 25".src="icons/d
- 0x1480: 6562 6961 6e2f 6f70 656e 6c6f 676f 2d32 ebian/openlogo-2
- 0x1490: 352e 6a70 6722 2061 6c74 3d22 4465 6269 5.jpg".alt="Debi
- 0x14a0: 616e 223e 0a3c 2f61 3e0a 3c61 2068 7265 an">.</a>.<a.hre
- 0x14b0: 663d 2268 7474 703a 2f2f 7777 772e 6170 f="http://www.ap
- 0x14c0: 6163 6865 2e6f 7267 2f22 3e0a 3c49 4d47 ache.org/">.<IMG
- 0x14d0: 2061 6c69 676e 3d22 6d69 6464 6c65 2220 .align="middle".
- 0x14e0: 6865 6967 6874 3d22 3332 2220 7769 6474 height="32".widt
- 0x14f0: 683d 2232 3539 2220 7372 633d 2269 636f h="259".src="ico
- 0x1500: 6e73 2f61 7061 6368 655f 7062 2e70 6e67 ns/apache_pb.png
- 0x1510: 2220 616c 743d 2241 7061 6368 6522 3e0a ".alt="Apache">.
- 0x1520: 3c2f 613e 0a3c 2f44 4956 3e0a 0a3c 212d </a>.</DIV>..<!-
- 0x1530: 2d0a 2020 5468 6973 2070 6167 6520 7761 -...This.page.wa
- 0x1540: 7320 696e 6974 6961 6c6c 7920 6372 6561 s.initially.crea
- 0x1550: 7465 6420 6279 204a 6f68 6e69 6520 496e ted.by.Johnie.In
- 0x1560: 6772 616d 2028 6874 7470 3a2f 2f6e 6574 gram.(http://net
- 0x1570: 676f 642e 6e65 742f 290a 2020 4974 2077 god.net/)...It.w
- 0x1580: 6173 206c 6174 6572 2065 6469 7465 6420 as.later.edited.
- 0x1590: 6279 204d 6174 7468 6577 2057 696c 636f by.Matthew.Wilco
- 0x15a0: 7820 616e 6420 4a6f 7369 7020 526f 6469 x.and.Josip.Rodi
- 0x15b0: 6e2e 0a20 204c 6173 7420 6d6f 6469 6669 n....Last.modifi
- 0x15c0: 6564 3a20 2444 6174 653a 2032 3030 342f ed:.$Date:.2004/
- 0x15d0: 3036 2f32 3020 3135 3a33 333a 3537 2024 06/20.15:33:57.$
- 0x15e0: 2e0a 2020 2d2d 3e0a 0a3c 2f42 4f44 593e ....-->..</BODY>
- 0x15f0: 0a3c 2f48 544d 4c3e 0a .</HTML>.
-23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 <nop,nop,timestamp 1306300953 1306300953>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 0034 1b6e 4000 4006 2154 7f00 0001 7f00 .4.n@.@.!T......
- 0x0020: 0001 da70 0050 3758 8a49 377a a3a9 8010 ...p.P7X.I7z....
- 0x0030: 305f 10ea 0000 0101 080a 4ddc 9219 4ddc 0_........M...M.
- 0x0040: 9219 ..
-23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 <nop,nop,timestamp 1306302241 1306300953>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 0034 1b70 4000 4006 2152 7f00 0001 7f00 .4.p@.@.!R......
- 0x0020: 0001 da70 0050 3758 8a49 377a a3a9 8011 ...p.P7X.I7z....
- 0x0030: 305f 0be1 0000 0101 080a 4ddc 9721 4ddc 0_........M..!M.
- 0x0040: 9219 ..
-23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 <nop,nop,timestamp 1306302243 1306302241>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 0034 1fe8 4000 4006 1cda 7f00 0001 7f00 .4..@.@.........
- 0x0020: 0001 0050 da70 377a a3a9 3758 8a4a 8011 ...P.p7z..7X.J..
- 0x0030: 2000 1735 0000 0101 080a 4ddc 9723 4ddc ...5......M..#M.
- 0x0040: 9721 .!
-23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 <nop,nop,timestamp 1306302243 1306302243>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 0034 1b72 4000 4006 2150 7f00 0001 7f00 .4.r@.@.!P......
- 0x0020: 0001 da70 0050 3758 8a4a 377a a3aa 8010 ...p.P7X.J7z....
- 0x0030: 305f 06d4 0000 0101 080a 4ddc 9723 4ddc 0_........M..#M.
- 0x0040: 9723 .#
diff --git a/contrib/tcpdump/tests/print-capX.out b/contrib/tcpdump/tests/print-capX.out
deleted file mode 100644
index 53e44ed..0000000
--- a/contrib/tcpdump/tests/print-capX.out
+++ /dev/null
@@ -1,409 +0,0 @@
-23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 <mss 16396,sackOK,timestamp 1306300950 0,nop,wscale 2>
- 0x0000: 4500 003c 1b68 4000 4006 2152 7f00 0001 E..<.h@.@.!R....
- 0x0010: 7f00 0001 da70 0050 3758 897e 0000 0000 .....p.P7X.~....
- 0x0020: a002 7fff 1421 0000 0204 400c 0402 080a .....!....@.....
- 0x0030: 4ddc 9216 0000 0000 0103 0302 M...........
-23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 <mss 16396,sackOK,timestamp 1306300950 1306300950,nop,wscale 2>
- 0x0000: 4500 003c 0000 4000 4006 3cba 7f00 0001 E..<..@.@.<.....
- 0x0010: 7f00 0001 0050 da70 377a 8df1 3758 897f .....P.p7z..7X..
- 0x0020: a012 7fff 6eb1 0000 0204 400c 0402 080a ....n.....@.....
- 0x0030: 4ddc 9216 4ddc 9216 0103 0302 M...M.......
-23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 <nop,nop,timestamp 1306300950 1306300950>
- 0x0000: 4500 0034 1b6a 4000 4006 2158 7f00 0001 E..4.j@.@.!X....
- 0x0010: 7f00 0001 da70 0050 3758 897f 377a 8df2 .....p.P7X..7z..
- 0x0020: 8010 2000 37d0 0000 0101 080a 4ddc 9216 ....7.......M...
- 0x0030: 4ddc 9216 M...
-23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 <nop,nop,timestamp 1306300951 1306300950>
- 0x0000: 4500 00fe 1b6c 4000 4006 208c 7f00 0001 E....l@.@.......
- 0x0010: 7f00 0001 da70 0050 3758 897f 377a 8df2 .....p.P7X..7z..
- 0x0020: 8018 2000 fef2 0000 0101 080a 4ddc 9217 ............M...
- 0x0030: 4ddc 9216 4745 5420 2f20 4854 5450 2f31 M...GET./.HTTP/1
- 0x0040: 2e31 0d0a 486f 7374 3a20 6c6f 6361 6c68 .1..Host:.localh
- 0x0050: 6f73 740d 0a55 7365 722d 4167 656e 743a ost..User-Agent:
- 0x0060: 2045 4c69 6e6b 732f 302e 3130 2e34 2d37 .ELinks/0.10.4-7
- 0x0070: 2d64 6562 6961 6e20 2874 6578 746d 6f64 -debian.(textmod
- 0x0080: 653b 204c 696e 7578 2032 2e36 2e31 312d e;.Linux.2.6.11-
- 0x0090: 312d 3638 362d 736d 7020 6936 3836 3b20 1-686-smp.i686;.
- 0x00a0: 3133 3278 3536 2d32 290d 0a41 6363 6570 132x56-2)..Accep
- 0x00b0: 743a 202a 2f2a 0d0a 4163 6365 7074 2d45 t:.*/*..Accept-E
- 0x00c0: 6e63 6f64 696e 673a 2067 7a69 700d 0a41 ncoding:.gzip..A
- 0x00d0: 6363 6570 742d 4c61 6e67 7561 6765 3a20 ccept-Language:.
- 0x00e0: 656e 0d0a 436f 6e6e 6563 7469 6f6e 3a20 en..Connection:.
- 0x00f0: 4b65 6570 2d41 6c69 7665 0d0a 0d0a Keep-Alive....
-23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 <nop,nop,timestamp 1306300952 1306300951>
- 0x0000: 4500 0034 1fe4 4000 4006 1cde 7f00 0001 E..4..@.@.......
- 0x0010: 7f00 0001 0050 da70 377a 8df2 3758 8a49 .....P.p7z..7X.I
- 0x0020: 8010 2000 3703 0000 0101 080a 4ddc 9218 ....7.......M...
- 0x0030: 4ddc 9217 M...
-23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 <nop,nop,timestamp 1306300953 1306300951>
- 0x0000: 4500 15eb 1fe6 4000 4006 0725 7f00 0001 E.....@.@..%....
- 0x0010: 7f00 0001 0050 da70 377a 8df2 3758 8a49 .....P.p7z..7X.I
- 0x0020: 8018 2000 13e0 0000 0101 080a 4ddc 9219 ............M...
- 0x0030: 4ddc 9217 4854 5450 2f31 2e31 2032 3030 M...HTTP/1.1.200
- 0x0040: 204f 4b0d 0a44 6174 653a 2057 6564 2c20 .OK..Date:.Wed,.
- 0x0050: 3036 204a 756c 2032 3030 3520 3033 3a35 06.Jul.2005.03:5
- 0x0060: 373a 3335 2047 4d54 0d0a 5365 7276 6572 7:35.GMT..Server
- 0x0070: 3a20 4170 6163 6865 2f31 2e33 2e33 330d :.Apache/1.3.33.
- 0x0080: 0a4c 6173 742d 4d6f 6469 6669 6564 3a20 .Last-Modified:.
- 0x0090: 5375 6e2c 2031 3520 4175 6720 3230 3034 Sun,.15.Aug.2004
- 0x00a0: 2030 303a 3433 3a34 3120 474d 540d 0a45 .00:43:41.GMT..E
- 0x00b0: 5461 673a 2022 3665 3830 6630 2d31 3438 Tag:."6e80f0-148
- 0x00c0: 612d 3431 3165 6231 6264 220d 0a41 6363 a-411eb1bd"..Acc
- 0x00d0: 6570 742d 5261 6e67 6573 3a20 6279 7465 ept-Ranges:.byte
- 0x00e0: 730d 0a43 6f6e 7465 6e74 2d4c 656e 6774 s..Content-Lengt
- 0x00f0: 683a 2035 3235 380d 0a4b 6565 702d 416c h:.5258..Keep-Al
- 0x0100: 6976 653a 2074 696d 656f 7574 3d31 352c ive:.timeout=15,
- 0x0110: 206d 6178 3d31 3030 0d0a 436f 6e6e 6563 .max=100..Connec
- 0x0120: 7469 6f6e 3a20 4b65 6570 2d41 6c69 7665 tion:.Keep-Alive
- 0x0130: 0d0a 436f 6e74 656e 742d 5479 7065 3a20 ..Content-Type:.
- 0x0140: 7465 7874 2f68 746d 6c3b 2063 6861 7273 text/html;.chars
- 0x0150: 6574 3d69 736f 2d38 3835 392d 310d 0a0d et=iso-8859-1...
- 0x0160: 0a3c 2144 4f43 5459 5045 2048 544d 4c20 .<!DOCTYPE.HTML.
- 0x0170: 5055 424c 4943 2022 2d2f 2f57 3343 2f2f PUBLIC."-//W3C//
- 0x0180: 4454 4420 4854 4d4c 2034 2e30 3120 5472 DTD.HTML.4.01.Tr
- 0x0190: 616e 7369 7469 6f6e 616c 2f2f 454e 223e ansitional//EN">
- 0x01a0: 0a3c 4854 4d4c 3e0a 3c48 4541 443e 0a20 .<HTML>.<HEAD>..
- 0x01b0: 2020 3c4d 4554 4120 4854 5450 2d45 5155 ..<META.HTTP-EQU
- 0x01c0: 4956 3d22 436f 6e74 656e 742d 5479 7065 IV="Content-Type
- 0x01d0: 2220 434f 4e54 454e 543d 2274 6578 742f ".CONTENT="text/
- 0x01e0: 6874 6d6c 3b20 6368 6172 7365 743d 6973 html;.charset=is
- 0x01f0: 6f2d 3838 3539 2d31 223e 0a20 2020 3c4d o-8859-1">....<M
- 0x0200: 4554 4120 4e41 4d45 3d22 4465 7363 7269 ETA.NAME="Descri
- 0x0210: 7074 696f 6e22 2043 4f4e 5445 4e54 3d22 ption".CONTENT="
- 0x0220: 5468 6520 696e 6974 6961 6c20 696e 7374 The.initial.inst
- 0x0230: 616c 6c61 7469 6f6e 206f 6620 4465 6269 allation.of.Debi
- 0x0240: 616e 2061 7061 6368 652e 223e 0a20 2020 an.apache.">....
- 0x0250: 3c54 4954 4c45 3e50 6c61 6365 686f 6c64 <TITLE>Placehold
- 0x0260: 6572 2070 6167 653c 2f54 4954 4c45 3e0a er.page</TITLE>.
- 0x0270: 3c2f 4845 4144 3e0a 3c42 4f44 5920 5445 </HEAD>.<BODY.TE
- 0x0280: 5854 3d22 2330 3030 3030 3022 2042 4743 XT="#000000".BGC
- 0x0290: 4f4c 4f52 3d22 2346 4646 4646 4622 204c OLOR="#FFFFFF".L
- 0x02a0: 494e 4b3d 2223 3030 3030 4546 2220 564c INK="#0000EF".VL
- 0x02b0: 494e 4b3d 2223 3535 3138 3841 2220 414c INK="#55188A".AL
- 0x02c0: 494e 4b3d 2223 4646 3030 3030 223e 0a0a INK="#FF0000">..
- 0x02d0: 3c48 313e 506c 6163 6568 6f6c 6465 7220 <H1>Placeholder.
- 0x02e0: 7061 6765 3c2f 4831 3e0a 3c48 323e 4966 page</H1>.<H2>If
- 0x02f0: 2079 6f75 2061 7265 206a 7573 7420 6272 .you.are.just.br
- 0x0300: 6f77 7369 6e67 2074 6865 2077 6562 3c2f owsing.the.web</
- 0x0310: 6832 3e0a 0a3c 503e 5468 6520 6f77 6e65 h2>..<P>The.owne
- 0x0320: 7220 6f66 2074 6869 7320 7765 6220 7369 r.of.this.web.si
- 0x0330: 7465 2068 6173 206e 6f74 2070 7574 2075 te.has.not.put.u
- 0x0340: 7020 616e 7920 7765 6220 7061 6765 7320 p.any.web.pages.
- 0x0350: 7965 742e 0a50 6c65 6173 6520 636f 6d65 yet..Please.come
- 0x0360: 2062 6163 6b20 6c61 7465 722e 3c2f 503e .back.later.</P>
- 0x0370: 0a0a 3c50 3e3c 534d 414c 4c3e 3c43 4954 ..<P><SMALL><CIT
- 0x0380: 453e 4d6f 7665 2061 6c6f 6e67 2c20 6e6f E>Move.along,.no
- 0x0390: 7468 696e 6720 746f 2073 6565 2068 6572 thing.to.see.her
- 0x03a0: 652e 2e2e 3c2f 4349 5445 3e20 3a2d 293c e...</CITE>.:-)<
- 0x03b0: 2f53 4d41 4c4c 3e3c 2f50 3e0a 0a3c 4832 /SMALL></P>..<H2
- 0x03c0: 3e49 6620 796f 7520 6172 6520 7472 7969 >If.you.are.tryi
- 0x03d0: 6e67 2074 6f20 6c6f 6361 7465 2074 6865 ng.to.locate.the
- 0x03e0: 2061 646d 696e 6973 7472 6174 6f72 206f .administrator.o
- 0x03f0: 6620 7468 6973 206d 6163 6869 6e65 3c2f f.this.machine</
- 0x0400: 4832 3e0a 0a3c 503e 4966 2079 6f75 2077 H2>..<P>If.you.w
- 0x0410: 616e 7420 746f 2072 6570 6f72 7420 736f ant.to.report.so
- 0x0420: 6d65 7468 696e 6720 6162 6f75 7420 7468 mething.about.th
- 0x0430: 6973 2068 6f73 7427 7320 6265 6861 7669 is.host's.behavi
- 0x0440: 6f72 2c20 706c 6561 7365 0a63 6f6e 7461 or,.please.conta
- 0x0450: 6374 2074 6865 2049 6e74 6572 6e65 7420 ct.the.Internet.
- 0x0460: 5365 7276 6963 6520 5072 6f76 6964 6572 Service.Provider
- 0x0470: 2028 4953 5029 2069 6e76 6f6c 7665 6420 .(ISP).involved.
- 0x0480: 6469 7265 6374 6c79 2e3c 2f50 3e0a 0a3c directly.</P>..<
- 0x0490: 503e 5365 6520 7468 6520 3c41 2068 7265 P>See.the.<A.hre
- 0x04a0: 663d 2268 7474 703a 2f2f 7777 772e 6162 f="http://www.ab
- 0x04b0: 7573 652e 6e65 742f 223e 4e65 7477 6f72 use.net/">Networ
- 0x04c0: 6b20 4162 7573 650a 436c 6561 7269 6e67 k.Abuse.Clearing
- 0x04d0: 686f 7573 653c 2f41 3e20 666f 7220 686f house</A>.for.ho
- 0x04e0: 7720 746f 2064 6f20 7468 6973 2e3c 2f50 w.to.do.this.</P
- 0x04f0: 3e0a 0a3c 4832 3e49 6620 796f 7520 6172 >..<H2>If.you.ar
- 0x0500: 6520 7468 6520 6164 6d69 6e69 7374 7261 e.the.administra
- 0x0510: 746f 7220 6f66 2074 6869 7320 6d61 6368 tor.of.this.mach
- 0x0520: 696e 653c 2f48 323e 0a0a 3c50 3e54 6865 ine</H2>..<P>The
- 0x0530: 2069 6e69 7469 616c 2069 6e73 7461 6c6c .initial.install
- 0x0540: 6174 696f 6e20 6f66 203c 4120 6872 6566 ation.of.<A.href
- 0x0550: 3d22 6874 7470 3a2f 2f77 7777 2e64 6562 ="http://www.deb
- 0x0560: 6961 6e2e 6f72 672f 223e 4465 6269 616e ian.org/">Debian
- 0x0570: 2773 0a61 7061 6368 653c 2f41 3e20 7765 's.apache</A>.we
- 0x0580: 6220 7365 7276 6572 2070 6163 6b61 6765 b.server.package
- 0x0590: 2077 6173 2073 7563 6365 7373 6675 6c2e .was.successful.
- 0x05a0: 3c2f 503e 0a0a 3c50 3e3c 5354 524f 4e47 </P>..<P><STRONG
- 0x05b0: 3e59 6f75 2073 686f 756c 6420 7265 706c >You.should.repl
- 0x05c0: 6163 6520 7468 6973 2070 6167 6520 7769 ace.this.page.wi
- 0x05d0: 7468 2079 6f75 7220 6f77 6e20 7765 6220 th.your.own.web.
- 0x05e0: 7061 6765 7320 6173 0a73 6f6f 6e20 6173 pages.as.soon.as
- 0x05f0: 2070 6f73 7369 626c 652e 3c2f 5354 524f .possible.</STRO
- 0x0600: 4e47 3e3c 2f50 3e0a 0a3c 503e 556e 6c65 NG></P>..<P>Unle
- 0x0610: 7373 2079 6f75 2063 6861 6e67 6564 2069 ss.you.changed.i
- 0x0620: 7473 2063 6f6e 6669 6775 7261 7469 6f6e ts.configuration
- 0x0630: 2c20 796f 7572 206e 6577 2073 6572 7665 ,.your.new.serve
- 0x0640: 7220 6973 2063 6f6e 6669 6775 7265 6420 r.is.configured.
- 0x0650: 6173 2066 6f6c 6c6f 7773 3a0a 3c55 4c3e as.follows:.<UL>
- 0x0660: 0a3c 4c49 3e0a 436f 6e66 6967 7572 6174 .<LI>.Configurat
- 0x0670: 696f 6e20 6669 6c65 7320 6361 6e20 6265 ion.files.can.be
- 0x0680: 2066 6f75 6e64 2069 6e20 3c54 543e 2f65 .found.in.<TT>/e
- 0x0690: 7463 2f61 7061 6368 653c 2f54 543e 2e3c tc/apache</TT>.<
- 0x06a0: 2f4c 493e 0a0a 3c4c 493e 0a54 6865 203c /LI>..<LI>.The.<
- 0x06b0: 5454 3e44 6f63 756d 656e 7452 6f6f 743c TT>DocumentRoot<
- 0x06c0: 2f54 543e 2c20 7768 6963 6820 6973 2074 /TT>,.which.is.t
- 0x06d0: 6865 2064 6972 6563 746f 7279 2075 6e64 he.directory.und
- 0x06e0: 6572 2077 6869 6368 2061 6c6c 2079 6f75 er.which.all.you
- 0x06f0: 720a 4854 4d4c 2066 696c 6573 2073 686f r.HTML.files.sho
- 0x0700: 756c 6420 6578 6973 742c 2069 7320 7365 uld.exist,.is.se
- 0x0710: 7420 746f 203c 5454 3e2f 7661 722f 7777 t.to.<TT>/var/ww
- 0x0720: 773c 2f54 543e 2e3c 2f4c 493e 0a0a 3c4c w</TT>.</LI>..<L
- 0x0730: 493e 0a43 4749 2073 6372 6970 7473 2061 I>.CGI.scripts.a
- 0x0740: 7265 206c 6f6f 6b65 6420 666f 7220 696e re.looked.for.in
- 0x0750: 203c 5454 3e2f 7573 722f 6c69 622f 6367 .<TT>/usr/lib/cg
- 0x0760: 692d 6269 6e3c 2f54 543e 2c20 7768 6963 i-bin</TT>,.whic
- 0x0770: 6820 6973 2077 6865 7265 0a44 6562 6961 h.is.where.Debia
- 0x0780: 6e20 7061 636b 6167 6573 2077 696c 6c20 n.packages.will.
- 0x0790: 706c 6163 6520 7468 6569 7220 7363 7269 place.their.scri
- 0x07a0: 7074 732e 3c2f 4c49 3e0a 0a3c 4c49 3e0a pts.</LI>..<LI>.
- 0x07b0: 4c6f 6720 6669 6c65 7320 6172 6520 706c Log.files.are.pl
- 0x07c0: 6163 6564 2069 6e20 3c54 543e 2f76 6172 aced.in.<TT>/var
- 0x07d0: 2f6c 6f67 2f61 7061 6368 653c 2f54 543e /log/apache</TT>
- 0x07e0: 2c20 616e 6420 7769 6c6c 2062 6520 726f ,.and.will.be.ro
- 0x07f0: 7461 7465 640a 7765 656b 6c79 2e20 2054 tated.weekly...T
- 0x0800: 6865 2066 7265 7175 656e 6379 206f 6620 he.frequency.of.
- 0x0810: 726f 7461 7469 6f6e 2063 616e 2062 6520 rotation.can.be.
- 0x0820: 6561 7369 6c79 2063 6861 6e67 6564 2062 easily.changed.b
- 0x0830: 7920 6564 6974 696e 670a 3c54 543e 2f65 y.editing.<TT>/e
- 0x0840: 7463 2f6c 6f67 726f 7461 7465 2e64 2f61 tc/logrotate.d/a
- 0x0850: 7061 6368 653c 2f54 543e 2e3c 2f4c 493e pache</TT>.</LI>
- 0x0860: 0a0a 3c4c 493e 0a54 6865 2064 6566 6175 ..<LI>.The.defau
- 0x0870: 6c74 2064 6972 6563 746f 7279 2069 6e64 lt.directory.ind
- 0x0880: 6578 2069 7320 3c54 543e 696e 6465 782e ex.is.<TT>index.
- 0x0890: 6874 6d6c 3c2f 5454 3e2c 206d 6561 6e69 html</TT>,.meani
- 0x08a0: 6e67 2074 6861 7420 7265 7175 6573 7473 ng.that.requests
- 0x08b0: 0a66 6f72 2061 2064 6972 6563 746f 7279 .for.a.directory
- 0x08c0: 203c 5454 3e2f 666f 6f2f 6261 722f 3c2f .<TT>/foo/bar/</
- 0x08d0: 5454 3e20 7769 6c6c 2067 6976 6520 7468 TT>.will.give.th
- 0x08e0: 6520 636f 6e74 656e 7473 206f 6620 7468 e.contents.of.th
- 0x08f0: 6520 6669 6c65 203c 5454 3e2f 7661 722f e.file.<TT>/var/
- 0x0900: 7777 772f 666f 6f2f 6261 722f 696e 6465 www/foo/bar/inde
- 0x0910: 782e 6874 6d6c 3c2f 5454 3e0a 6966 2069 x.html</TT>.if.i
- 0x0920: 7420 6578 6973 7473 2028 6173 7375 6d69 t.exists.(assumi
- 0x0930: 6e67 2074 6861 7420 3c54 543e 2f76 6172 ng.that.<TT>/var
- 0x0940: 2f77 7777 3c2f 5454 3e20 6973 2079 6f75 /www</TT>.is.you
- 0x0950: 7220 3c54 543e 446f 6375 6d65 6e74 526f r.<TT>DocumentRo
- 0x0960: 6f74 3c2f 5454 3e29 2e3c 2f4c 493e 0a0a ot</TT>).</LI>..
- 0x0970: 3c4c 493e 0a55 7365 7220 6469 7265 6374 <LI>.User.direct
- 0x0980: 6f72 6965 7320 6172 6520 656e 6162 6c65 ories.are.enable
- 0x0990: 642c 2061 6e64 2075 7365 7220 646f 6375 d,.and.user.docu
- 0x09a0: 6d65 6e74 7320 7769 6c6c 2062 6520 6c6f ments.will.be.lo
- 0x09b0: 6f6b 6564 2066 6f72 0a69 6e20 7468 6520 oked.for.in.the.
- 0x09c0: 3c54 543e 7075 626c 6963 5f68 746d 6c3c <TT>public_html<
- 0x09d0: 2f54 543e 2064 6972 6563 746f 7279 206f /TT>.directory.o
- 0x09e0: 6620 7468 6520 7573 6572 7327 2068 6f6d f.the.users'.hom
- 0x09f0: 6573 2e20 2054 6865 7365 2064 6972 730a es...These.dirs.
- 0x0a00: 7368 6f75 6c64 2062 6520 756e 6465 7220 should.be.under.
- 0x0a10: 3c54 543e 2f68 6f6d 653c 2f54 543e 2c20 <TT>/home</TT>,.
- 0x0a20: 616e 6420 7573 6572 7320 7769 6c6c 206e and.users.will.n
- 0x0a30: 6f74 2062 6520 6162 6c65 2074 6f20 7379 ot.be.able.to.sy
- 0x0a40: 6d6c 696e 6b0a 746f 2066 696c 6573 2074 mlink.to.files.t
- 0x0a50: 6865 7920 646f 6e27 7420 6f77 6e2e 3c2f hey.don't.own.</
- 0x0a60: 4c49 3e0a 0a3c 2f55 4c3e 0a41 6c6c 2074 LI>..</UL>.All.t
- 0x0a70: 6865 2073 7461 6e64 6172 6420 6170 6163 he.standard.apac
- 0x0a80: 6865 206d 6f64 756c 6573 2061 7265 2061 he.modules.are.a
- 0x0a90: 7661 696c 6162 6c65 2077 6974 6820 7468 vailable.with.th
- 0x0aa0: 6973 2072 656c 6561 7365 2061 6e64 2061 is.release.and.a
- 0x0ab0: 7265 0a6e 6f77 206d 616e 6167 6564 2077 re.now.managed.w
- 0x0ac0: 6974 6820 6465 6263 6f6e 662e 2020 5479 ith.debconf...Ty
- 0x0ad0: 7065 203c 5454 3e64 706b 672d 7265 636f pe.<TT>dpkg-reco
- 0x0ae0: 6e66 6967 7572 6520 6170 6163 6865 3c2f nfigure.apache</
- 0x0af0: 5454 3e20 746f 0a73 656c 6563 7420 7768 TT>.to.select.wh
- 0x0b00: 6963 6820 6d6f 6475 6c65 7320 796f 7520 ich.modules.you.
- 0x0b10: 7761 6e74 2065 6e61 626c 6564 2e20 204d want.enabled...M
- 0x0b20: 616e 7920 6f74 6865 7220 6d6f 6475 6c65 any.other.module
- 0x0b30: 7320 6172 6520 6176 6169 6c61 626c 650a s.are.available.
- 0x0b40: 7468 726f 7567 6820 7468 6520 4465 6269 through.the.Debi
- 0x0b50: 616e 2070 6163 6b61 6765 2073 7973 7465 an.package.syste
- 0x0b60: 6d20 7769 7468 2074 6865 206e 616d 6573 m.with.the.names
- 0x0b70: 203c 5454 3e6c 6962 6170 6163 6865 2d6d .<TT>libapache-m
- 0x0b80: 6f64 2d2a 3c2f 5454 3e2e 0a49 6620 796f od-*</TT>..If.yo
- 0x0b90: 7520 6e65 6564 2074 6f20 636f 6d70 696c u.need.to.compil
- 0x0ba0: 6520 6120 6d6f 6475 6c65 2079 6f75 7273 e.a.module.yours
- 0x0bb0: 656c 662c 2079 6f75 2077 696c 6c20 6e65 elf,.you.will.ne
- 0x0bc0: 6564 2074 6f20 696e 7374 616c 6c20 7468 ed.to.install.th
- 0x0bd0: 650a 3c54 543e 6170 6163 6865 2d64 6576 e.<TT>apache-dev
- 0x0be0: 3c2f 5454 3e20 7061 636b 6167 652e 0a0a </TT>.package...
- 0x0bf0: 3c50 3e4d 6f72 6520 646f 6375 6d65 6e74 <P>More.document
- 0x0c00: 6174 696f 6e20 6f6e 2041 7061 6368 6520 ation.on.Apache.
- 0x0c10: 6361 6e20 6265 2066 6f75 6e64 206f 6e3a can.be.found.on:
- 0x0c20: 0a3c 554c 3e0a 3c4c 493e 0a54 6865 203c .<UL>.<LI>.The.<
- 0x0c30: 4120 4852 4546 3d22 2f64 6f63 2f61 7061 A.HREF="/doc/apa
- 0x0c40: 6368 652d 646f 632f 6d61 6e75 616c 2f22 che-doc/manual/"
- 0x0c50: 3e41 7061 6368 6520 646f 6375 6d65 6e74 >Apache.document
- 0x0c60: 6174 696f 6e3c 2f41 3e20 7374 6f72 6564 ation</A>.stored
- 0x0c70: 206f 6e20 796f 7572 2073 6572 7665 722e .on.your.server.
- 0x0c80: 3c2f 4c49 3e0a 0a3c 4c49 3e0a 5468 6520 </LI>..<LI>.The.
- 0x0c90: 3c41 2048 5245 463d 2268 7474 703a 2f2f <A.HREF="http://
- 0x0ca0: 7777 772e 6170 6163 6865 2e6f 7267 2f22 www.apache.org/"
- 0x0cb0: 3e41 7061 6368 6520 5072 6f6a 6563 743c >Apache.Project<
- 0x0cc0: 2f41 3e20 686f 6d65 2073 6974 652e 3c2f /A>.home.site.</
- 0x0cd0: 4c49 3e0a 0a3c 4c49 3e0a 5468 6520 3c41 LI>..<LI>.The.<A
- 0x0ce0: 2048 5245 463d 2268 7474 703a 2f2f 7777 .HREF="http://ww
- 0x0cf0: 772e 6170 6163 6865 2d73 736c 2e6f 7267 w.apache-ssl.org
- 0x0d00: 2f22 3e41 7061 6368 652d 5353 4c3c 2f41 /">Apache-SSL</A
- 0x0d10: 3e20 686f 6d65 2073 6974 652e 3c2f 4c49 >.home.site.</LI
- 0x0d20: 3e0a 0a3c 4c49 3e0a 5468 6520 3c41 2048 >..<LI>.The.<A.H
- 0x0d30: 5245 463d 2268 7474 703a 2f2f 7065 726c REF="http://perl
- 0x0d40: 2e61 7061 6368 652e 6f72 672f 223e 6d6f .apache.org/">mo
- 0x0d50: 6420 7065 726c 3c2f 413e 2068 6f6d 6520 d.perl</A>.home.
- 0x0d60: 7369 7465 2e3c 2f4c 493e 0a0a 3c4c 493e site.</LI>..<LI>
- 0x0d70: 0a54 6865 203c 4120 4852 4546 3d22 6874 .The.<A.HREF="ht
- 0x0d80: 7470 3a2f 2f77 7777 2e61 7061 6368 6577 tp://www.apachew
- 0x0d90: 6565 6b2e 636f 6d2f 223e 4170 6163 6865 eek.com/">Apache
- 0x0da0: 5765 656b 3c2f 413e 206e 6577 736c 6574 Week</A>.newslet
- 0x0db0: 7465 722e 3c2f 4c49 3e0a 0a3c 4c49 3e0a ter.</LI>..<LI>.
- 0x0dc0: 5468 6520 3c41 2048 5245 463d 2268 7474 The.<A.HREF="htt
- 0x0dd0: 703a 2f2f 7777 772e 6465 6269 616e 2e6f p://www.debian.o
- 0x0de0: 7267 2f64 6f63 2f22 3e44 6562 6961 6e20 rg/doc/">Debian.
- 0x0df0: 5072 6f6a 6563 740a 446f 6375 6d65 6e74 Project.Document
- 0x0e00: 6174 696f 6e3c 2f41 3e20 7768 6963 6820 ation</A>.which.
- 0x0e10: 636f 6e74 6169 6e73 2048 4f57 544f 732c contains.HOWTOs,
- 0x0e20: 2046 4151 732c 2061 6e64 2073 6f66 7477 .FAQs,.and.softw
- 0x0e30: 6172 6520 7570 6461 7465 732e 3c2f 4c49 are.updates.</LI
- 0x0e40: 3e0a 3c2f 554c 3e0a 0a3c 503e 596f 7520 >.</UL>..<P>You.
- 0x0e50: 6361 6e20 616c 736f 2063 6f6e 7375 6c74 can.also.consult
- 0x0e60: 2074 6865 206c 6973 7420 6f66 203c 4120 .the.list.of.<A.
- 0x0e70: 4852 4546 3d22 6874 7470 3a2f 2f77 7777 HREF="http://www
- 0x0e80: 2e62 6f75 7465 6c6c 2e63 6f6d 2f66 6171 .boutell.com/faq
- 0x0e90: 2f22 3e57 6f72 6c64 0a57 6964 6520 5765 /">World.Wide.We
- 0x0ea0: 6220 4672 6571 7565 6e74 6c79 2041 736b b.Frequently.Ask
- 0x0eb0: 6564 2051 7565 7374 696f 6e73 3c2f 413e ed.Questions</A>
- 0x0ec0: 2066 6f72 2069 6e66 6f72 6d61 7469 6f6e .for.information
- 0x0ed0: 2e0a 0a3c 4832 3e4c 6574 206f 7468 6572 ...<H2>Let.other
- 0x0ee0: 2070 656f 706c 6520 6b6e 6f77 2061 626f .people.know.abo
- 0x0ef0: 7574 2074 6869 7320 7365 7276 6572 3c2f ut.this.server</
- 0x0f00: 4832 3e0a 0a3c 4120 4852 4546 3d22 6874 H2>..<A.HREF="ht
- 0x0f10: 7470 3a2f 2f6e 6574 6372 6166 742e 636f tp://netcraft.co
- 0x0f20: 6d2f 223e 4e65 7463 7261 6674 3c2f 413e m/">Netcraft</A>
- 0x0f30: 2070 726f 7669 6465 7320 616e 2069 6e74 .provides.an.int
- 0x0f40: 6572 6573 7469 6e67 2066 7265 650a 7365 eresting.free.se
- 0x0f50: 7276 6963 6520 666f 7220 7765 6220 7369 rvice.for.web.si
- 0x0f60: 7465 206d 6f6e 6974 6f72 696e 6720 616e te.monitoring.an
- 0x0f70: 6420 7374 6174 6973 7469 6320 636f 6c6c d.statistic.coll
- 0x0f80: 6563 7469 6f6e 2e0a 596f 7520 6361 6e20 ection..You.can.
- 0x0f90: 6c65 7420 7468 656d 206b 6e6f 7720 6162 let.them.know.ab
- 0x0fa0: 6f75 7420 796f 7572 2073 6572 7665 7220 out.your.server.
- 0x0fb0: 7573 696e 6720 7468 6569 720a 3c41 2048 using.their.<A.H
- 0x0fc0: 5245 463d 2268 7474 703a 2f2f 7570 7469 REF="http://upti
- 0x0fd0: 6d65 2e6e 6574 6372 6166 742e 636f 6d2f me.netcraft.com/
- 0x0fe0: 223e 696e 7465 7266 6163 653c 2f41 3e2e ">interface</A>.
- 0x0ff0: 0a45 6e61 626c 696e 6720 7468 6520 6d6f .Enabling.the.mo
- 0x1000: 6e69 746f 7269 6e67 206f 6620 796f 7572 nitoring.of.your
- 0x1010: 2073 6572 7665 7220 7769 6c6c 2070 726f .server.will.pro
- 0x1020: 7669 6465 2061 2062 6574 7465 7220 676c vide.a.better.gl
- 0x1030: 6f62 616c 206f 7665 7276 6965 770a 6f66 obal.overview.of
- 0x1040: 2077 686f 2069 7320 7573 696e 6720 7768 .who.is.using.wh
- 0x1050: 6174 2061 6e64 2077 6865 7265 2c20 616e at.and.where,.an
- 0x1060: 6420 6974 2077 6f75 6c64 2067 6976 6520 d.it.would.give.
- 0x1070: 4465 6269 616e 2061 2062 6574 7465 720a Debian.a.better.
- 0x1080: 6f76 6572 7669 6577 206f 6620 7468 6520 overview.of.the.
- 0x1090: 6170 6163 6865 2070 6163 6b61 6765 2075 apache.package.u
- 0x10a0: 7361 6765 2e0a 0a3c 4832 3e41 626f 7574 sage...<H2>About
- 0x10b0: 2074 6869 7320 7061 6765 3c2f 4832 3e0a .this.page</H2>.
- 0x10c0: 0a3c 494d 4720 414c 4947 4e3d 2272 6967 .<IMG.ALIGN="rig
- 0x10d0: 6874 2220 414c 543d 2222 2048 4549 4748 ht".ALT="".HEIGH
- 0x10e0: 543d 2232 3437 2220 5749 4454 483d 2232 T="247".WIDTH="2
- 0x10f0: 3738 2220 5352 433d 2269 636f 6e73 2f6a 78".SRC="icons/j
- 0x1100: 6865 3036 312e 706e 6722 3e0a 0a3c 503e he061.png">..<P>
- 0x1110: 5468 6973 2069 7320 6120 706c 6163 6568 This.is.a.placeh
- 0x1120: 6f6c 6465 7220 7061 6765 2069 6e73 7461 older.page.insta
- 0x1130: 6c6c 6564 2062 7920 7468 6520 3c41 0a48 lled.by.the.<A.H
- 0x1140: 5245 463d 2268 7474 703a 2f2f 7777 772e REF="http://www.
- 0x1150: 6465 6269 616e 2e6f 7267 2f22 3e44 6562 debian.org/">Deb
- 0x1160: 6961 6e3c 2f41 3e0a 7265 6c65 6173 6520 ian</A>.release.
- 0x1170: 6f66 2074 6865 2061 7061 6368 6520 5765 of.the.apache.We
- 0x1180: 6220 7365 7276 6572 2070 6163 6b61 6765 b.server.package
- 0x1190: 2e0a 0a3c 503e 5468 6973 2063 6f6d 7075 ...<P>This.compu
- 0x11a0: 7465 7220 6861 7320 696e 7374 616c 6c65 ter.has.installe
- 0x11b0: 6420 7468 6520 4465 6269 616e 2047 4e55 d.the.Debian.GNU
- 0x11c0: 2f4c 696e 7578 206f 7065 7261 7469 6e67 /Linux.operating
- 0x11d0: 2073 7973 7465 6d2c 0a62 7574 2069 7420 .system,.but.it.
- 0x11e0: 6861 7320 3c73 7472 6f6e 673e 6e6f 7468 has.<strong>noth
- 0x11f0: 696e 6720 746f 2064 6f20 7769 7468 2074 ing.to.do.with.t
- 0x1200: 6865 2044 6562 6961 6e0a 5072 6f6a 6563 he.Debian.Projec
- 0x1210: 743c 2f73 7472 6f6e 673e 2e20 506c 6561 t</strong>..Plea
- 0x1220: 7365 2064 6f20 3c73 7472 6f6e 673e 6e6f se.do.<strong>no
- 0x1230: 743c 2f73 7472 6f6e 673e 2063 6f6e 7461 t</strong>.conta
- 0x1240: 6374 2074 6865 2044 6562 6961 6e0a 5072 ct.the.Debian.Pr
- 0x1250: 6f6a 6563 7420 6162 6f75 7420 6974 2e3c oject.about.it.<
- 0x1260: 2f50 3e0a 0a3c 503e 4966 2079 6f75 2066 /P>..<P>If.you.f
- 0x1270: 696e 6420 6120 6275 6720 696e 2074 6869 ind.a.bug.in.thi
- 0x1280: 7320 6170 6163 6865 2070 6163 6b61 6765 s.apache.package
- 0x1290: 2c20 6f72 2069 6e20 4170 6163 6865 2069 ,.or.in.Apache.i
- 0x12a0: 7473 656c 662c 0a70 6c65 6173 6520 6669 tself,.please.fi
- 0x12b0: 6c65 2061 2062 7567 2072 6570 6f72 7420 le.a.bug.report.
- 0x12c0: 6f6e 2069 742e 2020 496e 7374 7275 6374 on.it...Instruct
- 0x12d0: 696f 6e73 206f 6e20 646f 696e 6720 7468 ions.on.doing.th
- 0x12e0: 6973 2c20 616e 6420 7468 650a 6c69 7374 is,.and.the.list
- 0x12f0: 206f 6620 3c41 2048 5245 463d 2268 7474 .of.<A.HREF="htt
- 0x1300: 703a 2f2f 6275 6773 2e64 6562 6961 6e2e p://bugs.debian.
- 0x1310: 6f72 672f 7372 633a 6170 6163 6865 223e org/src:apache">
- 0x1320: 6b6e 6f77 6e20 6275 6773 3c2f 413e 206f known.bugs</A>.o
- 0x1330: 6620 7468 6973 0a70 6163 6b61 6765 2c20 f.this.package,.
- 0x1340: 6361 6e20 6265 2066 6f75 6e64 2069 6e20 can.be.found.in.
- 0x1350: 7468 6520 0a3c 4120 4852 4546 3d22 6874 the..<A.HREF="ht
- 0x1360: 7470 3a2f 2f77 7777 2e64 6562 6961 6e2e tp://www.debian.
- 0x1370: 6f72 672f 4275 6773 2f52 6570 6f72 7469 org/Bugs/Reporti
- 0x1380: 6e67 223e 4465 6269 616e 2042 7567 2054 ng">Debian.Bug.T
- 0x1390: 7261 636b 696e 6720 5379 7374 656d 3c2f racking.System</
- 0x13a0: 413e 2e0a 0a3c 503e 5468 616e 6b73 2066 A>...<P>Thanks.f
- 0x13b0: 6f72 2075 7369 6e67 2074 6869 7320 7061 or.using.this.pa
- 0x13c0: 636b 6167 652c 2061 6e64 2063 6f6e 6772 ckage,.and.congr
- 0x13d0: 6174 756c 6174 696f 6e73 2066 6f72 2079 atulations.for.y
- 0x13e0: 6f75 7220 6368 6f69 6365 206f 660a 6120 our.choice.of.a.
- 0x13f0: 4465 6269 616e 2073 7973 7465 6d21 3c2f Debian.system!</
- 0x1400: 503e 0a0a 3c44 4956 2061 6c69 676e 3d22 P>..<DIV.align="
- 0x1410: 6365 6e74 6572 223e 0a3c 6120 6872 6566 center">.<a.href
- 0x1420: 3d22 6874 7470 3a2f 2f77 7777 2e64 6562 ="http://www.deb
- 0x1430: 6961 6e2e 6f72 672f 223e 0a3c 494d 4720 ian.org/">.<IMG.
- 0x1440: 616c 6967 6e3d 226d 6964 646c 6522 2068 align="middle".h
- 0x1450: 6569 6768 743d 2233 3022 2077 6964 7468 eight="30".width
- 0x1460: 3d22 3235 2220 7372 633d 2269 636f 6e73 ="25".src="icons
- 0x1470: 2f64 6562 6961 6e2f 6f70 656e 6c6f 676f /debian/openlogo
- 0x1480: 2d32 352e 6a70 6722 2061 6c74 3d22 4465 -25.jpg".alt="De
- 0x1490: 6269 616e 223e 0a3c 2f61 3e0a 3c61 2068 bian">.</a>.<a.h
- 0x14a0: 7265 663d 2268 7474 703a 2f2f 7777 772e ref="http://www.
- 0x14b0: 6170 6163 6865 2e6f 7267 2f22 3e0a 3c49 apache.org/">.<I
- 0x14c0: 4d47 2061 6c69 676e 3d22 6d69 6464 6c65 MG.align="middle
- 0x14d0: 2220 6865 6967 6874 3d22 3332 2220 7769 ".height="32".wi
- 0x14e0: 6474 683d 2232 3539 2220 7372 633d 2269 dth="259".src="i
- 0x14f0: 636f 6e73 2f61 7061 6368 655f 7062 2e70 cons/apache_pb.p
- 0x1500: 6e67 2220 616c 743d 2241 7061 6368 6522 ng".alt="Apache"
- 0x1510: 3e0a 3c2f 613e 0a3c 2f44 4956 3e0a 0a3c >.</a>.</DIV>..<
- 0x1520: 212d 2d0a 2020 5468 6973 2070 6167 6520 !--...This.page.
- 0x1530: 7761 7320 696e 6974 6961 6c6c 7920 6372 was.initially.cr
- 0x1540: 6561 7465 6420 6279 204a 6f68 6e69 6520 eated.by.Johnie.
- 0x1550: 496e 6772 616d 2028 6874 7470 3a2f 2f6e Ingram.(http://n
- 0x1560: 6574 676f 642e 6e65 742f 290a 2020 4974 etgod.net/)...It
- 0x1570: 2077 6173 206c 6174 6572 2065 6469 7465 .was.later.edite
- 0x1580: 6420 6279 204d 6174 7468 6577 2057 696c d.by.Matthew.Wil
- 0x1590: 636f 7820 616e 6420 4a6f 7369 7020 526f cox.and.Josip.Ro
- 0x15a0: 6469 6e2e 0a20 204c 6173 7420 6d6f 6469 din....Last.modi
- 0x15b0: 6669 6564 3a20 2444 6174 653a 2032 3030 fied:.$Date:.200
- 0x15c0: 342f 3036 2f32 3020 3135 3a33 333a 3537 4/06/20.15:33:57
- 0x15d0: 2024 2e0a 2020 2d2d 3e0a 0a3c 2f42 4f44 .$....-->..</BOD
- 0x15e0: 593e 0a3c 2f48 544d 4c3e 0a Y>.</HTML>.
-23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 <nop,nop,timestamp 1306300953 1306300953>
- 0x0000: 4500 0034 1b6e 4000 4006 2154 7f00 0001 E..4.n@.@.!T....
- 0x0010: 7f00 0001 da70 0050 3758 8a49 377a a3a9 .....p.P7X.I7z..
- 0x0020: 8010 305f 10ea 0000 0101 080a 4ddc 9219 ..0_........M...
- 0x0030: 4ddc 9219 M...
-23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 <nop,nop,timestamp 1306302241 1306300953>
- 0x0000: 4500 0034 1b70 4000 4006 2152 7f00 0001 E..4.p@.@.!R....
- 0x0010: 7f00 0001 da70 0050 3758 8a49 377a a3a9 .....p.P7X.I7z..
- 0x0020: 8011 305f 0be1 0000 0101 080a 4ddc 9721 ..0_........M..!
- 0x0030: 4ddc 9219 M...
-23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 <nop,nop,timestamp 1306302243 1306302241>
- 0x0000: 4500 0034 1fe8 4000 4006 1cda 7f00 0001 E..4..@.@.......
- 0x0010: 7f00 0001 0050 da70 377a a3a9 3758 8a4a .....P.p7z..7X.J
- 0x0020: 8011 2000 1735 0000 0101 080a 4ddc 9723 .....5......M..#
- 0x0030: 4ddc 9721 M..!
-23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 <nop,nop,timestamp 1306302243 1306302243>
- 0x0000: 4500 0034 1b72 4000 4006 2150 7f00 0001 E..4.r@.@.!P....
- 0x0010: 7f00 0001 da70 0050 3758 8a4a 377a a3aa .....p.P7X.J7z..
- 0x0020: 8010 305f 06d4 0000 0101 080a 4ddc 9723 ..0_........M..#
- 0x0030: 4ddc 9723 M..#
diff --git a/contrib/tcpdump/tests/print-capXX.out b/contrib/tcpdump/tests/print-capXX.out
deleted file mode 100644
index 6921a01..0000000
--- a/contrib/tcpdump/tests/print-capXX.out
+++ /dev/null
@@ -1,419 +0,0 @@
-23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 <mss 16396,sackOK,timestamp 1306300950 0,nop,wscale 2>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 003c 1b68 4000 4006 2152 7f00 0001 7f00 .<.h@.@.!R......
- 0x0020: 0001 da70 0050 3758 897e 0000 0000 a002 ...p.P7X.~......
- 0x0030: 7fff 1421 0000 0204 400c 0402 080a 4ddc ...!....@.....M.
- 0x0040: 9216 0000 0000 0103 0302 ..........
-23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 <mss 16396,sackOK,timestamp 1306300950 1306300950,nop,wscale 2>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 003c 0000 4000 4006 3cba 7f00 0001 7f00 .<..@.@.<.......
- 0x0020: 0001 0050 da70 377a 8df1 3758 897f a012 ...P.p7z..7X....
- 0x0030: 7fff 6eb1 0000 0204 400c 0402 080a 4ddc ..n.....@.....M.
- 0x0040: 9216 4ddc 9216 0103 0302 ..M.......
-23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 <nop,nop,timestamp 1306300950 1306300950>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 0034 1b6a 4000 4006 2158 7f00 0001 7f00 .4.j@.@.!X......
- 0x0020: 0001 da70 0050 3758 897f 377a 8df2 8010 ...p.P7X..7z....
- 0x0030: 2000 37d0 0000 0101 080a 4ddc 9216 4ddc ..7.......M...M.
- 0x0040: 9216 ..
-23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 <nop,nop,timestamp 1306300951 1306300950>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 00fe 1b6c 4000 4006 208c 7f00 0001 7f00 ...l@.@.........
- 0x0020: 0001 da70 0050 3758 897f 377a 8df2 8018 ...p.P7X..7z....
- 0x0030: 2000 fef2 0000 0101 080a 4ddc 9217 4ddc ..........M...M.
- 0x0040: 9216 4745 5420 2f20 4854 5450 2f31 2e31 ..GET./.HTTP/1.1
- 0x0050: 0d0a 486f 7374 3a20 6c6f 6361 6c68 6f73 ..Host:.localhos
- 0x0060: 740d 0a55 7365 722d 4167 656e 743a 2045 t..User-Agent:.E
- 0x0070: 4c69 6e6b 732f 302e 3130 2e34 2d37 2d64 Links/0.10.4-7-d
- 0x0080: 6562 6961 6e20 2874 6578 746d 6f64 653b ebian.(textmode;
- 0x0090: 204c 696e 7578 2032 2e36 2e31 312d 312d .Linux.2.6.11-1-
- 0x00a0: 3638 362d 736d 7020 6936 3836 3b20 3133 686-smp.i686;.13
- 0x00b0: 3278 3536 2d32 290d 0a41 6363 6570 743a 2x56-2)..Accept:
- 0x00c0: 202a 2f2a 0d0a 4163 6365 7074 2d45 6e63 .*/*..Accept-Enc
- 0x00d0: 6f64 696e 673a 2067 7a69 700d 0a41 6363 oding:.gzip..Acc
- 0x00e0: 6570 742d 4c61 6e67 7561 6765 3a20 656e ept-Language:.en
- 0x00f0: 0d0a 436f 6e6e 6563 7469 6f6e 3a20 4b65 ..Connection:.Ke
- 0x0100: 6570 2d41 6c69 7665 0d0a 0d0a ep-Alive....
-23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 <nop,nop,timestamp 1306300952 1306300951>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 0034 1fe4 4000 4006 1cde 7f00 0001 7f00 .4..@.@.........
- 0x0020: 0001 0050 da70 377a 8df2 3758 8a49 8010 ...P.p7z..7X.I..
- 0x0030: 2000 3703 0000 0101 080a 4ddc 9218 4ddc ..7.......M...M.
- 0x0040: 9217 ..
-23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 <nop,nop,timestamp 1306300953 1306300951>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 15eb 1fe6 4000 4006 0725 7f00 0001 7f00 ....@.@..%......
- 0x0020: 0001 0050 da70 377a 8df2 3758 8a49 8018 ...P.p7z..7X.I..
- 0x0030: 2000 13e0 0000 0101 080a 4ddc 9219 4ddc ..........M...M.
- 0x0040: 9217 4854 5450 2f31 2e31 2032 3030 204f ..HTTP/1.1.200.O
- 0x0050: 4b0d 0a44 6174 653a 2057 6564 2c20 3036 K..Date:.Wed,.06
- 0x0060: 204a 756c 2032 3030 3520 3033 3a35 373a .Jul.2005.03:57:
- 0x0070: 3335 2047 4d54 0d0a 5365 7276 6572 3a20 35.GMT..Server:.
- 0x0080: 4170 6163 6865 2f31 2e33 2e33 330d 0a4c Apache/1.3.33..L
- 0x0090: 6173 742d 4d6f 6469 6669 6564 3a20 5375 ast-Modified:.Su
- 0x00a0: 6e2c 2031 3520 4175 6720 3230 3034 2030 n,.15.Aug.2004.0
- 0x00b0: 303a 3433 3a34 3120 474d 540d 0a45 5461 0:43:41.GMT..ETa
- 0x00c0: 673a 2022 3665 3830 6630 2d31 3438 612d g:."6e80f0-148a-
- 0x00d0: 3431 3165 6231 6264 220d 0a41 6363 6570 411eb1bd"..Accep
- 0x00e0: 742d 5261 6e67 6573 3a20 6279 7465 730d t-Ranges:.bytes.
- 0x00f0: 0a43 6f6e 7465 6e74 2d4c 656e 6774 683a .Content-Length:
- 0x0100: 2035 3235 380d 0a4b 6565 702d 416c 6976 .5258..Keep-Aliv
- 0x0110: 653a 2074 696d 656f 7574 3d31 352c 206d e:.timeout=15,.m
- 0x0120: 6178 3d31 3030 0d0a 436f 6e6e 6563 7469 ax=100..Connecti
- 0x0130: 6f6e 3a20 4b65 6570 2d41 6c69 7665 0d0a on:.Keep-Alive..
- 0x0140: 436f 6e74 656e 742d 5479 7065 3a20 7465 Content-Type:.te
- 0x0150: 7874 2f68 746d 6c3b 2063 6861 7273 6574 xt/html;.charset
- 0x0160: 3d69 736f 2d38 3835 392d 310d 0a0d 0a3c =iso-8859-1....<
- 0x0170: 2144 4f43 5459 5045 2048 544d 4c20 5055 !DOCTYPE.HTML.PU
- 0x0180: 424c 4943 2022 2d2f 2f57 3343 2f2f 4454 BLIC."-//W3C//DT
- 0x0190: 4420 4854 4d4c 2034 2e30 3120 5472 616e D.HTML.4.01.Tran
- 0x01a0: 7369 7469 6f6e 616c 2f2f 454e 223e 0a3c sitional//EN">.<
- 0x01b0: 4854 4d4c 3e0a 3c48 4541 443e 0a20 2020 HTML>.<HEAD>....
- 0x01c0: 3c4d 4554 4120 4854 5450 2d45 5155 4956 <META.HTTP-EQUIV
- 0x01d0: 3d22 436f 6e74 656e 742d 5479 7065 2220 ="Content-Type".
- 0x01e0: 434f 4e54 454e 543d 2274 6578 742f 6874 CONTENT="text/ht
- 0x01f0: 6d6c 3b20 6368 6172 7365 743d 6973 6f2d ml;.charset=iso-
- 0x0200: 3838 3539 2d31 223e 0a20 2020 3c4d 4554 8859-1">....<MET
- 0x0210: 4120 4e41 4d45 3d22 4465 7363 7269 7074 A.NAME="Descript
- 0x0220: 696f 6e22 2043 4f4e 5445 4e54 3d22 5468 ion".CONTENT="Th
- 0x0230: 6520 696e 6974 6961 6c20 696e 7374 616c e.initial.instal
- 0x0240: 6c61 7469 6f6e 206f 6620 4465 6269 616e lation.of.Debian
- 0x0250: 2061 7061 6368 652e 223e 0a20 2020 3c54 .apache.">....<T
- 0x0260: 4954 4c45 3e50 6c61 6365 686f 6c64 6572 ITLE>Placeholder
- 0x0270: 2070 6167 653c 2f54 4954 4c45 3e0a 3c2f .page</TITLE>.</
- 0x0280: 4845 4144 3e0a 3c42 4f44 5920 5445 5854 HEAD>.<BODY.TEXT
- 0x0290: 3d22 2330 3030 3030 3022 2042 4743 4f4c ="#000000".BGCOL
- 0x02a0: 4f52 3d22 2346 4646 4646 4622 204c 494e OR="#FFFFFF".LIN
- 0x02b0: 4b3d 2223 3030 3030 4546 2220 564c 494e K="#0000EF".VLIN
- 0x02c0: 4b3d 2223 3535 3138 3841 2220 414c 494e K="#55188A".ALIN
- 0x02d0: 4b3d 2223 4646 3030 3030 223e 0a0a 3c48 K="#FF0000">..<H
- 0x02e0: 313e 506c 6163 6568 6f6c 6465 7220 7061 1>Placeholder.pa
- 0x02f0: 6765 3c2f 4831 3e0a 3c48 323e 4966 2079 ge</H1>.<H2>If.y
- 0x0300: 6f75 2061 7265 206a 7573 7420 6272 6f77 ou.are.just.brow
- 0x0310: 7369 6e67 2074 6865 2077 6562 3c2f 6832 sing.the.web</h2
- 0x0320: 3e0a 0a3c 503e 5468 6520 6f77 6e65 7220 >..<P>The.owner.
- 0x0330: 6f66 2074 6869 7320 7765 6220 7369 7465 of.this.web.site
- 0x0340: 2068 6173 206e 6f74 2070 7574 2075 7020 .has.not.put.up.
- 0x0350: 616e 7920 7765 6220 7061 6765 7320 7965 any.web.pages.ye
- 0x0360: 742e 0a50 6c65 6173 6520 636f 6d65 2062 t..Please.come.b
- 0x0370: 6163 6b20 6c61 7465 722e 3c2f 503e 0a0a ack.later.</P>..
- 0x0380: 3c50 3e3c 534d 414c 4c3e 3c43 4954 453e <P><SMALL><CITE>
- 0x0390: 4d6f 7665 2061 6c6f 6e67 2c20 6e6f 7468 Move.along,.noth
- 0x03a0: 696e 6720 746f 2073 6565 2068 6572 652e ing.to.see.here.
- 0x03b0: 2e2e 3c2f 4349 5445 3e20 3a2d 293c 2f53 ..</CITE>.:-)</S
- 0x03c0: 4d41 4c4c 3e3c 2f50 3e0a 0a3c 4832 3e49 MALL></P>..<H2>I
- 0x03d0: 6620 796f 7520 6172 6520 7472 7969 6e67 f.you.are.trying
- 0x03e0: 2074 6f20 6c6f 6361 7465 2074 6865 2061 .to.locate.the.a
- 0x03f0: 646d 696e 6973 7472 6174 6f72 206f 6620 dministrator.of.
- 0x0400: 7468 6973 206d 6163 6869 6e65 3c2f 4832 this.machine</H2
- 0x0410: 3e0a 0a3c 503e 4966 2079 6f75 2077 616e >..<P>If.you.wan
- 0x0420: 7420 746f 2072 6570 6f72 7420 736f 6d65 t.to.report.some
- 0x0430: 7468 696e 6720 6162 6f75 7420 7468 6973 thing.about.this
- 0x0440: 2068 6f73 7427 7320 6265 6861 7669 6f72 .host's.behavior
- 0x0450: 2c20 706c 6561 7365 0a63 6f6e 7461 6374 ,.please.contact
- 0x0460: 2074 6865 2049 6e74 6572 6e65 7420 5365 .the.Internet.Se
- 0x0470: 7276 6963 6520 5072 6f76 6964 6572 2028 rvice.Provider.(
- 0x0480: 4953 5029 2069 6e76 6f6c 7665 6420 6469 ISP).involved.di
- 0x0490: 7265 6374 6c79 2e3c 2f50 3e0a 0a3c 503e rectly.</P>..<P>
- 0x04a0: 5365 6520 7468 6520 3c41 2068 7265 663d See.the.<A.href=
- 0x04b0: 2268 7474 703a 2f2f 7777 772e 6162 7573 "http://www.abus
- 0x04c0: 652e 6e65 742f 223e 4e65 7477 6f72 6b20 e.net/">Network.
- 0x04d0: 4162 7573 650a 436c 6561 7269 6e67 686f Abuse.Clearingho
- 0x04e0: 7573 653c 2f41 3e20 666f 7220 686f 7720 use</A>.for.how.
- 0x04f0: 746f 2064 6f20 7468 6973 2e3c 2f50 3e0a to.do.this.</P>.
- 0x0500: 0a3c 4832 3e49 6620 796f 7520 6172 6520 .<H2>If.you.are.
- 0x0510: 7468 6520 6164 6d69 6e69 7374 7261 746f the.administrato
- 0x0520: 7220 6f66 2074 6869 7320 6d61 6368 696e r.of.this.machin
- 0x0530: 653c 2f48 323e 0a0a 3c50 3e54 6865 2069 e</H2>..<P>The.i
- 0x0540: 6e69 7469 616c 2069 6e73 7461 6c6c 6174 nitial.installat
- 0x0550: 696f 6e20 6f66 203c 4120 6872 6566 3d22 ion.of.<A.href="
- 0x0560: 6874 7470 3a2f 2f77 7777 2e64 6562 6961 http://www.debia
- 0x0570: 6e2e 6f72 672f 223e 4465 6269 616e 2773 n.org/">Debian's
- 0x0580: 0a61 7061 6368 653c 2f41 3e20 7765 6220 .apache</A>.web.
- 0x0590: 7365 7276 6572 2070 6163 6b61 6765 2077 server.package.w
- 0x05a0: 6173 2073 7563 6365 7373 6675 6c2e 3c2f as.successful.</
- 0x05b0: 503e 0a0a 3c50 3e3c 5354 524f 4e47 3e59 P>..<P><STRONG>Y
- 0x05c0: 6f75 2073 686f 756c 6420 7265 706c 6163 ou.should.replac
- 0x05d0: 6520 7468 6973 2070 6167 6520 7769 7468 e.this.page.with
- 0x05e0: 2079 6f75 7220 6f77 6e20 7765 6220 7061 .your.own.web.pa
- 0x05f0: 6765 7320 6173 0a73 6f6f 6e20 6173 2070 ges.as.soon.as.p
- 0x0600: 6f73 7369 626c 652e 3c2f 5354 524f 4e47 ossible.</STRONG
- 0x0610: 3e3c 2f50 3e0a 0a3c 503e 556e 6c65 7373 ></P>..<P>Unless
- 0x0620: 2079 6f75 2063 6861 6e67 6564 2069 7473 .you.changed.its
- 0x0630: 2063 6f6e 6669 6775 7261 7469 6f6e 2c20 .configuration,.
- 0x0640: 796f 7572 206e 6577 2073 6572 7665 7220 your.new.server.
- 0x0650: 6973 2063 6f6e 6669 6775 7265 6420 6173 is.configured.as
- 0x0660: 2066 6f6c 6c6f 7773 3a0a 3c55 4c3e 0a3c .follows:.<UL>.<
- 0x0670: 4c49 3e0a 436f 6e66 6967 7572 6174 696f LI>.Configuratio
- 0x0680: 6e20 6669 6c65 7320 6361 6e20 6265 2066 n.files.can.be.f
- 0x0690: 6f75 6e64 2069 6e20 3c54 543e 2f65 7463 ound.in.<TT>/etc
- 0x06a0: 2f61 7061 6368 653c 2f54 543e 2e3c 2f4c /apache</TT>.</L
- 0x06b0: 493e 0a0a 3c4c 493e 0a54 6865 203c 5454 I>..<LI>.The.<TT
- 0x06c0: 3e44 6f63 756d 656e 7452 6f6f 743c 2f54 >DocumentRoot</T
- 0x06d0: 543e 2c20 7768 6963 6820 6973 2074 6865 T>,.which.is.the
- 0x06e0: 2064 6972 6563 746f 7279 2075 6e64 6572 .directory.under
- 0x06f0: 2077 6869 6368 2061 6c6c 2079 6f75 720a .which.all.your.
- 0x0700: 4854 4d4c 2066 696c 6573 2073 686f 756c HTML.files.shoul
- 0x0710: 6420 6578 6973 742c 2069 7320 7365 7420 d.exist,.is.set.
- 0x0720: 746f 203c 5454 3e2f 7661 722f 7777 773c to.<TT>/var/www<
- 0x0730: 2f54 543e 2e3c 2f4c 493e 0a0a 3c4c 493e /TT>.</LI>..<LI>
- 0x0740: 0a43 4749 2073 6372 6970 7473 2061 7265 .CGI.scripts.are
- 0x0750: 206c 6f6f 6b65 6420 666f 7220 696e 203c .looked.for.in.<
- 0x0760: 5454 3e2f 7573 722f 6c69 622f 6367 692d TT>/usr/lib/cgi-
- 0x0770: 6269 6e3c 2f54 543e 2c20 7768 6963 6820 bin</TT>,.which.
- 0x0780: 6973 2077 6865 7265 0a44 6562 6961 6e20 is.where.Debian.
- 0x0790: 7061 636b 6167 6573 2077 696c 6c20 706c packages.will.pl
- 0x07a0: 6163 6520 7468 6569 7220 7363 7269 7074 ace.their.script
- 0x07b0: 732e 3c2f 4c49 3e0a 0a3c 4c49 3e0a 4c6f s.</LI>..<LI>.Lo
- 0x07c0: 6720 6669 6c65 7320 6172 6520 706c 6163 g.files.are.plac
- 0x07d0: 6564 2069 6e20 3c54 543e 2f76 6172 2f6c ed.in.<TT>/var/l
- 0x07e0: 6f67 2f61 7061 6368 653c 2f54 543e 2c20 og/apache</TT>,.
- 0x07f0: 616e 6420 7769 6c6c 2062 6520 726f 7461 and.will.be.rota
- 0x0800: 7465 640a 7765 656b 6c79 2e20 2054 6865 ted.weekly...The
- 0x0810: 2066 7265 7175 656e 6379 206f 6620 726f .frequency.of.ro
- 0x0820: 7461 7469 6f6e 2063 616e 2062 6520 6561 tation.can.be.ea
- 0x0830: 7369 6c79 2063 6861 6e67 6564 2062 7920 sily.changed.by.
- 0x0840: 6564 6974 696e 670a 3c54 543e 2f65 7463 editing.<TT>/etc
- 0x0850: 2f6c 6f67 726f 7461 7465 2e64 2f61 7061 /logrotate.d/apa
- 0x0860: 6368 653c 2f54 543e 2e3c 2f4c 493e 0a0a che</TT>.</LI>..
- 0x0870: 3c4c 493e 0a54 6865 2064 6566 6175 6c74 <LI>.The.default
- 0x0880: 2064 6972 6563 746f 7279 2069 6e64 6578 .directory.index
- 0x0890: 2069 7320 3c54 543e 696e 6465 782e 6874 .is.<TT>index.ht
- 0x08a0: 6d6c 3c2f 5454 3e2c 206d 6561 6e69 6e67 ml</TT>,.meaning
- 0x08b0: 2074 6861 7420 7265 7175 6573 7473 0a66 .that.requests.f
- 0x08c0: 6f72 2061 2064 6972 6563 746f 7279 203c or.a.directory.<
- 0x08d0: 5454 3e2f 666f 6f2f 6261 722f 3c2f 5454 TT>/foo/bar/</TT
- 0x08e0: 3e20 7769 6c6c 2067 6976 6520 7468 6520 >.will.give.the.
- 0x08f0: 636f 6e74 656e 7473 206f 6620 7468 6520 contents.of.the.
- 0x0900: 6669 6c65 203c 5454 3e2f 7661 722f 7777 file.<TT>/var/ww
- 0x0910: 772f 666f 6f2f 6261 722f 696e 6465 782e w/foo/bar/index.
- 0x0920: 6874 6d6c 3c2f 5454 3e0a 6966 2069 7420 html</TT>.if.it.
- 0x0930: 6578 6973 7473 2028 6173 7375 6d69 6e67 exists.(assuming
- 0x0940: 2074 6861 7420 3c54 543e 2f76 6172 2f77 .that.<TT>/var/w
- 0x0950: 7777 3c2f 5454 3e20 6973 2079 6f75 7220 ww</TT>.is.your.
- 0x0960: 3c54 543e 446f 6375 6d65 6e74 526f 6f74 <TT>DocumentRoot
- 0x0970: 3c2f 5454 3e29 2e3c 2f4c 493e 0a0a 3c4c </TT>).</LI>..<L
- 0x0980: 493e 0a55 7365 7220 6469 7265 6374 6f72 I>.User.director
- 0x0990: 6965 7320 6172 6520 656e 6162 6c65 642c ies.are.enabled,
- 0x09a0: 2061 6e64 2075 7365 7220 646f 6375 6d65 .and.user.docume
- 0x09b0: 6e74 7320 7769 6c6c 2062 6520 6c6f 6f6b nts.will.be.look
- 0x09c0: 6564 2066 6f72 0a69 6e20 7468 6520 3c54 ed.for.in.the.<T
- 0x09d0: 543e 7075 626c 6963 5f68 746d 6c3c 2f54 T>public_html</T
- 0x09e0: 543e 2064 6972 6563 746f 7279 206f 6620 T>.directory.of.
- 0x09f0: 7468 6520 7573 6572 7327 2068 6f6d 6573 the.users'.homes
- 0x0a00: 2e20 2054 6865 7365 2064 6972 730a 7368 ...These.dirs.sh
- 0x0a10: 6f75 6c64 2062 6520 756e 6465 7220 3c54 ould.be.under.<T
- 0x0a20: 543e 2f68 6f6d 653c 2f54 543e 2c20 616e T>/home</TT>,.an
- 0x0a30: 6420 7573 6572 7320 7769 6c6c 206e 6f74 d.users.will.not
- 0x0a40: 2062 6520 6162 6c65 2074 6f20 7379 6d6c .be.able.to.syml
- 0x0a50: 696e 6b0a 746f 2066 696c 6573 2074 6865 ink.to.files.the
- 0x0a60: 7920 646f 6e27 7420 6f77 6e2e 3c2f 4c49 y.don't.own.</LI
- 0x0a70: 3e0a 0a3c 2f55 4c3e 0a41 6c6c 2074 6865 >..</UL>.All.the
- 0x0a80: 2073 7461 6e64 6172 6420 6170 6163 6865 .standard.apache
- 0x0a90: 206d 6f64 756c 6573 2061 7265 2061 7661 .modules.are.ava
- 0x0aa0: 696c 6162 6c65 2077 6974 6820 7468 6973 ilable.with.this
- 0x0ab0: 2072 656c 6561 7365 2061 6e64 2061 7265 .release.and.are
- 0x0ac0: 0a6e 6f77 206d 616e 6167 6564 2077 6974 .now.managed.wit
- 0x0ad0: 6820 6465 6263 6f6e 662e 2020 5479 7065 h.debconf...Type
- 0x0ae0: 203c 5454 3e64 706b 672d 7265 636f 6e66 .<TT>dpkg-reconf
- 0x0af0: 6967 7572 6520 6170 6163 6865 3c2f 5454 igure.apache</TT
- 0x0b00: 3e20 746f 0a73 656c 6563 7420 7768 6963 >.to.select.whic
- 0x0b10: 6820 6d6f 6475 6c65 7320 796f 7520 7761 h.modules.you.wa
- 0x0b20: 6e74 2065 6e61 626c 6564 2e20 204d 616e nt.enabled...Man
- 0x0b30: 7920 6f74 6865 7220 6d6f 6475 6c65 7320 y.other.modules.
- 0x0b40: 6172 6520 6176 6169 6c61 626c 650a 7468 are.available.th
- 0x0b50: 726f 7567 6820 7468 6520 4465 6269 616e rough.the.Debian
- 0x0b60: 2070 6163 6b61 6765 2073 7973 7465 6d20 .package.system.
- 0x0b70: 7769 7468 2074 6865 206e 616d 6573 203c with.the.names.<
- 0x0b80: 5454 3e6c 6962 6170 6163 6865 2d6d 6f64 TT>libapache-mod
- 0x0b90: 2d2a 3c2f 5454 3e2e 0a49 6620 796f 7520 -*</TT>..If.you.
- 0x0ba0: 6e65 6564 2074 6f20 636f 6d70 696c 6520 need.to.compile.
- 0x0bb0: 6120 6d6f 6475 6c65 2079 6f75 7273 656c a.module.yoursel
- 0x0bc0: 662c 2079 6f75 2077 696c 6c20 6e65 6564 f,.you.will.need
- 0x0bd0: 2074 6f20 696e 7374 616c 6c20 7468 650a .to.install.the.
- 0x0be0: 3c54 543e 6170 6163 6865 2d64 6576 3c2f <TT>apache-dev</
- 0x0bf0: 5454 3e20 7061 636b 6167 652e 0a0a 3c50 TT>.package...<P
- 0x0c00: 3e4d 6f72 6520 646f 6375 6d65 6e74 6174 >More.documentat
- 0x0c10: 696f 6e20 6f6e 2041 7061 6368 6520 6361 ion.on.Apache.ca
- 0x0c20: 6e20 6265 2066 6f75 6e64 206f 6e3a 0a3c n.be.found.on:.<
- 0x0c30: 554c 3e0a 3c4c 493e 0a54 6865 203c 4120 UL>.<LI>.The.<A.
- 0x0c40: 4852 4546 3d22 2f64 6f63 2f61 7061 6368 HREF="/doc/apach
- 0x0c50: 652d 646f 632f 6d61 6e75 616c 2f22 3e41 e-doc/manual/">A
- 0x0c60: 7061 6368 6520 646f 6375 6d65 6e74 6174 pache.documentat
- 0x0c70: 696f 6e3c 2f41 3e20 7374 6f72 6564 206f ion</A>.stored.o
- 0x0c80: 6e20 796f 7572 2073 6572 7665 722e 3c2f n.your.server.</
- 0x0c90: 4c49 3e0a 0a3c 4c49 3e0a 5468 6520 3c41 LI>..<LI>.The.<A
- 0x0ca0: 2048 5245 463d 2268 7474 703a 2f2f 7777 .HREF="http://ww
- 0x0cb0: 772e 6170 6163 6865 2e6f 7267 2f22 3e41 w.apache.org/">A
- 0x0cc0: 7061 6368 6520 5072 6f6a 6563 743c 2f41 pache.Project</A
- 0x0cd0: 3e20 686f 6d65 2073 6974 652e 3c2f 4c49 >.home.site.</LI
- 0x0ce0: 3e0a 0a3c 4c49 3e0a 5468 6520 3c41 2048 >..<LI>.The.<A.H
- 0x0cf0: 5245 463d 2268 7474 703a 2f2f 7777 772e REF="http://www.
- 0x0d00: 6170 6163 6865 2d73 736c 2e6f 7267 2f22 apache-ssl.org/"
- 0x0d10: 3e41 7061 6368 652d 5353 4c3c 2f41 3e20 >Apache-SSL</A>.
- 0x0d20: 686f 6d65 2073 6974 652e 3c2f 4c49 3e0a home.site.</LI>.
- 0x0d30: 0a3c 4c49 3e0a 5468 6520 3c41 2048 5245 .<LI>.The.<A.HRE
- 0x0d40: 463d 2268 7474 703a 2f2f 7065 726c 2e61 F="http://perl.a
- 0x0d50: 7061 6368 652e 6f72 672f 223e 6d6f 6420 pache.org/">mod.
- 0x0d60: 7065 726c 3c2f 413e 2068 6f6d 6520 7369 perl</A>.home.si
- 0x0d70: 7465 2e3c 2f4c 493e 0a0a 3c4c 493e 0a54 te.</LI>..<LI>.T
- 0x0d80: 6865 203c 4120 4852 4546 3d22 6874 7470 he.<A.HREF="http
- 0x0d90: 3a2f 2f77 7777 2e61 7061 6368 6577 6565 ://www.apachewee
- 0x0da0: 6b2e 636f 6d2f 223e 4170 6163 6865 5765 k.com/">ApacheWe
- 0x0db0: 656b 3c2f 413e 206e 6577 736c 6574 7465 ek</A>.newslette
- 0x0dc0: 722e 3c2f 4c49 3e0a 0a3c 4c49 3e0a 5468 r.</LI>..<LI>.Th
- 0x0dd0: 6520 3c41 2048 5245 463d 2268 7474 703a e.<A.HREF="http:
- 0x0de0: 2f2f 7777 772e 6465 6269 616e 2e6f 7267 //www.debian.org
- 0x0df0: 2f64 6f63 2f22 3e44 6562 6961 6e20 5072 /doc/">Debian.Pr
- 0x0e00: 6f6a 6563 740a 446f 6375 6d65 6e74 6174 oject.Documentat
- 0x0e10: 696f 6e3c 2f41 3e20 7768 6963 6820 636f ion</A>.which.co
- 0x0e20: 6e74 6169 6e73 2048 4f57 544f 732c 2046 ntains.HOWTOs,.F
- 0x0e30: 4151 732c 2061 6e64 2073 6f66 7477 6172 AQs,.and.softwar
- 0x0e40: 6520 7570 6461 7465 732e 3c2f 4c49 3e0a e.updates.</LI>.
- 0x0e50: 3c2f 554c 3e0a 0a3c 503e 596f 7520 6361 </UL>..<P>You.ca
- 0x0e60: 6e20 616c 736f 2063 6f6e 7375 6c74 2074 n.also.consult.t
- 0x0e70: 6865 206c 6973 7420 6f66 203c 4120 4852 he.list.of.<A.HR
- 0x0e80: 4546 3d22 6874 7470 3a2f 2f77 7777 2e62 EF="http://www.b
- 0x0e90: 6f75 7465 6c6c 2e63 6f6d 2f66 6171 2f22 outell.com/faq/"
- 0x0ea0: 3e57 6f72 6c64 0a57 6964 6520 5765 6220 >World.Wide.Web.
- 0x0eb0: 4672 6571 7565 6e74 6c79 2041 736b 6564 Frequently.Asked
- 0x0ec0: 2051 7565 7374 696f 6e73 3c2f 413e 2066 .Questions</A>.f
- 0x0ed0: 6f72 2069 6e66 6f72 6d61 7469 6f6e 2e0a or.information..
- 0x0ee0: 0a3c 4832 3e4c 6574 206f 7468 6572 2070 .<H2>Let.other.p
- 0x0ef0: 656f 706c 6520 6b6e 6f77 2061 626f 7574 eople.know.about
- 0x0f00: 2074 6869 7320 7365 7276 6572 3c2f 4832 .this.server</H2
- 0x0f10: 3e0a 0a3c 4120 4852 4546 3d22 6874 7470 >..<A.HREF="http
- 0x0f20: 3a2f 2f6e 6574 6372 6166 742e 636f 6d2f ://netcraft.com/
- 0x0f30: 223e 4e65 7463 7261 6674 3c2f 413e 2070 ">Netcraft</A>.p
- 0x0f40: 726f 7669 6465 7320 616e 2069 6e74 6572 rovides.an.inter
- 0x0f50: 6573 7469 6e67 2066 7265 650a 7365 7276 esting.free.serv
- 0x0f60: 6963 6520 666f 7220 7765 6220 7369 7465 ice.for.web.site
- 0x0f70: 206d 6f6e 6974 6f72 696e 6720 616e 6420 .monitoring.and.
- 0x0f80: 7374 6174 6973 7469 6320 636f 6c6c 6563 statistic.collec
- 0x0f90: 7469 6f6e 2e0a 596f 7520 6361 6e20 6c65 tion..You.can.le
- 0x0fa0: 7420 7468 656d 206b 6e6f 7720 6162 6f75 t.them.know.abou
- 0x0fb0: 7420 796f 7572 2073 6572 7665 7220 7573 t.your.server.us
- 0x0fc0: 696e 6720 7468 6569 720a 3c41 2048 5245 ing.their.<A.HRE
- 0x0fd0: 463d 2268 7474 703a 2f2f 7570 7469 6d65 F="http://uptime
- 0x0fe0: 2e6e 6574 6372 6166 742e 636f 6d2f 223e .netcraft.com/">
- 0x0ff0: 696e 7465 7266 6163 653c 2f41 3e2e 0a45 interface</A>..E
- 0x1000: 6e61 626c 696e 6720 7468 6520 6d6f 6e69 nabling.the.moni
- 0x1010: 746f 7269 6e67 206f 6620 796f 7572 2073 toring.of.your.s
- 0x1020: 6572 7665 7220 7769 6c6c 2070 726f 7669 erver.will.provi
- 0x1030: 6465 2061 2062 6574 7465 7220 676c 6f62 de.a.better.glob
- 0x1040: 616c 206f 7665 7276 6965 770a 6f66 2077 al.overview.of.w
- 0x1050: 686f 2069 7320 7573 696e 6720 7768 6174 ho.is.using.what
- 0x1060: 2061 6e64 2077 6865 7265 2c20 616e 6420 .and.where,.and.
- 0x1070: 6974 2077 6f75 6c64 2067 6976 6520 4465 it.would.give.De
- 0x1080: 6269 616e 2061 2062 6574 7465 720a 6f76 bian.a.better.ov
- 0x1090: 6572 7669 6577 206f 6620 7468 6520 6170 erview.of.the.ap
- 0x10a0: 6163 6865 2070 6163 6b61 6765 2075 7361 ache.package.usa
- 0x10b0: 6765 2e0a 0a3c 4832 3e41 626f 7574 2074 ge...<H2>About.t
- 0x10c0: 6869 7320 7061 6765 3c2f 4832 3e0a 0a3c his.page</H2>..<
- 0x10d0: 494d 4720 414c 4947 4e3d 2272 6967 6874 IMG.ALIGN="right
- 0x10e0: 2220 414c 543d 2222 2048 4549 4748 543d ".ALT="".HEIGHT=
- 0x10f0: 2232 3437 2220 5749 4454 483d 2232 3738 "247".WIDTH="278
- 0x1100: 2220 5352 433d 2269 636f 6e73 2f6a 6865 ".SRC="icons/jhe
- 0x1110: 3036 312e 706e 6722 3e0a 0a3c 503e 5468 061.png">..<P>Th
- 0x1120: 6973 2069 7320 6120 706c 6163 6568 6f6c is.is.a.placehol
- 0x1130: 6465 7220 7061 6765 2069 6e73 7461 6c6c der.page.install
- 0x1140: 6564 2062 7920 7468 6520 3c41 0a48 5245 ed.by.the.<A.HRE
- 0x1150: 463d 2268 7474 703a 2f2f 7777 772e 6465 F="http://www.de
- 0x1160: 6269 616e 2e6f 7267 2f22 3e44 6562 6961 bian.org/">Debia
- 0x1170: 6e3c 2f41 3e0a 7265 6c65 6173 6520 6f66 n</A>.release.of
- 0x1180: 2074 6865 2061 7061 6368 6520 5765 6220 .the.apache.Web.
- 0x1190: 7365 7276 6572 2070 6163 6b61 6765 2e0a server.package..
- 0x11a0: 0a3c 503e 5468 6973 2063 6f6d 7075 7465 .<P>This.compute
- 0x11b0: 7220 6861 7320 696e 7374 616c 6c65 6420 r.has.installed.
- 0x11c0: 7468 6520 4465 6269 616e 2047 4e55 2f4c the.Debian.GNU/L
- 0x11d0: 696e 7578 206f 7065 7261 7469 6e67 2073 inux.operating.s
- 0x11e0: 7973 7465 6d2c 0a62 7574 2069 7420 6861 ystem,.but.it.ha
- 0x11f0: 7320 3c73 7472 6f6e 673e 6e6f 7468 696e s.<strong>nothin
- 0x1200: 6720 746f 2064 6f20 7769 7468 2074 6865 g.to.do.with.the
- 0x1210: 2044 6562 6961 6e0a 5072 6f6a 6563 743c .Debian.Project<
- 0x1220: 2f73 7472 6f6e 673e 2e20 506c 6561 7365 /strong>..Please
- 0x1230: 2064 6f20 3c73 7472 6f6e 673e 6e6f 743c .do.<strong>not<
- 0x1240: 2f73 7472 6f6e 673e 2063 6f6e 7461 6374 /strong>.contact
- 0x1250: 2074 6865 2044 6562 6961 6e0a 5072 6f6a .the.Debian.Proj
- 0x1260: 6563 7420 6162 6f75 7420 6974 2e3c 2f50 ect.about.it.</P
- 0x1270: 3e0a 0a3c 503e 4966 2079 6f75 2066 696e >..<P>If.you.fin
- 0x1280: 6420 6120 6275 6720 696e 2074 6869 7320 d.a.bug.in.this.
- 0x1290: 6170 6163 6865 2070 6163 6b61 6765 2c20 apache.package,.
- 0x12a0: 6f72 2069 6e20 4170 6163 6865 2069 7473 or.in.Apache.its
- 0x12b0: 656c 662c 0a70 6c65 6173 6520 6669 6c65 elf,.please.file
- 0x12c0: 2061 2062 7567 2072 6570 6f72 7420 6f6e .a.bug.report.on
- 0x12d0: 2069 742e 2020 496e 7374 7275 6374 696f .it...Instructio
- 0x12e0: 6e73 206f 6e20 646f 696e 6720 7468 6973 ns.on.doing.this
- 0x12f0: 2c20 616e 6420 7468 650a 6c69 7374 206f ,.and.the.list.o
- 0x1300: 6620 3c41 2048 5245 463d 2268 7474 703a f.<A.HREF="http:
- 0x1310: 2f2f 6275 6773 2e64 6562 6961 6e2e 6f72 //bugs.debian.or
- 0x1320: 672f 7372 633a 6170 6163 6865 223e 6b6e g/src:apache">kn
- 0x1330: 6f77 6e20 6275 6773 3c2f 413e 206f 6620 own.bugs</A>.of.
- 0x1340: 7468 6973 0a70 6163 6b61 6765 2c20 6361 this.package,.ca
- 0x1350: 6e20 6265 2066 6f75 6e64 2069 6e20 7468 n.be.found.in.th
- 0x1360: 6520 0a3c 4120 4852 4546 3d22 6874 7470 e..<A.HREF="http
- 0x1370: 3a2f 2f77 7777 2e64 6562 6961 6e2e 6f72 ://www.debian.or
- 0x1380: 672f 4275 6773 2f52 6570 6f72 7469 6e67 g/Bugs/Reporting
- 0x1390: 223e 4465 6269 616e 2042 7567 2054 7261 ">Debian.Bug.Tra
- 0x13a0: 636b 696e 6720 5379 7374 656d 3c2f 413e cking.System</A>
- 0x13b0: 2e0a 0a3c 503e 5468 616e 6b73 2066 6f72 ...<P>Thanks.for
- 0x13c0: 2075 7369 6e67 2074 6869 7320 7061 636b .using.this.pack
- 0x13d0: 6167 652c 2061 6e64 2063 6f6e 6772 6174 age,.and.congrat
- 0x13e0: 756c 6174 696f 6e73 2066 6f72 2079 6f75 ulations.for.you
- 0x13f0: 7220 6368 6f69 6365 206f 660a 6120 4465 r.choice.of.a.De
- 0x1400: 6269 616e 2073 7973 7465 6d21 3c2f 503e bian.system!</P>
- 0x1410: 0a0a 3c44 4956 2061 6c69 676e 3d22 6365 ..<DIV.align="ce
- 0x1420: 6e74 6572 223e 0a3c 6120 6872 6566 3d22 nter">.<a.href="
- 0x1430: 6874 7470 3a2f 2f77 7777 2e64 6562 6961 http://www.debia
- 0x1440: 6e2e 6f72 672f 223e 0a3c 494d 4720 616c n.org/">.<IMG.al
- 0x1450: 6967 6e3d 226d 6964 646c 6522 2068 6569 ign="middle".hei
- 0x1460: 6768 743d 2233 3022 2077 6964 7468 3d22 ght="30".width="
- 0x1470: 3235 2220 7372 633d 2269 636f 6e73 2f64 25".src="icons/d
- 0x1480: 6562 6961 6e2f 6f70 656e 6c6f 676f 2d32 ebian/openlogo-2
- 0x1490: 352e 6a70 6722 2061 6c74 3d22 4465 6269 5.jpg".alt="Debi
- 0x14a0: 616e 223e 0a3c 2f61 3e0a 3c61 2068 7265 an">.</a>.<a.hre
- 0x14b0: 663d 2268 7474 703a 2f2f 7777 772e 6170 f="http://www.ap
- 0x14c0: 6163 6865 2e6f 7267 2f22 3e0a 3c49 4d47 ache.org/">.<IMG
- 0x14d0: 2061 6c69 676e 3d22 6d69 6464 6c65 2220 .align="middle".
- 0x14e0: 6865 6967 6874 3d22 3332 2220 7769 6474 height="32".widt
- 0x14f0: 683d 2232 3539 2220 7372 633d 2269 636f h="259".src="ico
- 0x1500: 6e73 2f61 7061 6368 655f 7062 2e70 6e67 ns/apache_pb.png
- 0x1510: 2220 616c 743d 2241 7061 6368 6522 3e0a ".alt="Apache">.
- 0x1520: 3c2f 613e 0a3c 2f44 4956 3e0a 0a3c 212d </a>.</DIV>..<!-
- 0x1530: 2d0a 2020 5468 6973 2070 6167 6520 7761 -...This.page.wa
- 0x1540: 7320 696e 6974 6961 6c6c 7920 6372 6561 s.initially.crea
- 0x1550: 7465 6420 6279 204a 6f68 6e69 6520 496e ted.by.Johnie.In
- 0x1560: 6772 616d 2028 6874 7470 3a2f 2f6e 6574 gram.(http://net
- 0x1570: 676f 642e 6e65 742f 290a 2020 4974 2077 god.net/)...It.w
- 0x1580: 6173 206c 6174 6572 2065 6469 7465 6420 as.later.edited.
- 0x1590: 6279 204d 6174 7468 6577 2057 696c 636f by.Matthew.Wilco
- 0x15a0: 7820 616e 6420 4a6f 7369 7020 526f 6469 x.and.Josip.Rodi
- 0x15b0: 6e2e 0a20 204c 6173 7420 6d6f 6469 6669 n....Last.modifi
- 0x15c0: 6564 3a20 2444 6174 653a 2032 3030 342f ed:.$Date:.2004/
- 0x15d0: 3036 2f32 3020 3135 3a33 333a 3537 2024 06/20.15:33:57.$
- 0x15e0: 2e0a 2020 2d2d 3e0a 0a3c 2f42 4f44 593e ....-->..</BODY>
- 0x15f0: 0a3c 2f48 544d 4c3e 0a .</HTML>.
-23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 <nop,nop,timestamp 1306300953 1306300953>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 0034 1b6e 4000 4006 2154 7f00 0001 7f00 .4.n@.@.!T......
- 0x0020: 0001 da70 0050 3758 8a49 377a a3a9 8010 ...p.P7X.I7z....
- 0x0030: 305f 10ea 0000 0101 080a 4ddc 9219 4ddc 0_........M...M.
- 0x0040: 9219 ..
-23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 <nop,nop,timestamp 1306302241 1306300953>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 0034 1b70 4000 4006 2152 7f00 0001 7f00 .4.p@.@.!R......
- 0x0020: 0001 da70 0050 3758 8a49 377a a3a9 8011 ...p.P7X.I7z....
- 0x0030: 305f 0be1 0000 0101 080a 4ddc 9721 4ddc 0_........M..!M.
- 0x0040: 9219 ..
-23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 <nop,nop,timestamp 1306302243 1306302241>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 0034 1fe8 4000 4006 1cda 7f00 0001 7f00 .4..@.@.........
- 0x0020: 0001 0050 da70 377a a3a9 3758 8a4a 8011 ...P.p7z..7X.J..
- 0x0030: 2000 1735 0000 0101 080a 4ddc 9723 4ddc ...5......M..#M.
- 0x0040: 9721 .!
-23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 <nop,nop,timestamp 1306302243 1306302243>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500 ..............E.
- 0x0010: 0034 1b72 4000 4006 2150 7f00 0001 7f00 .4.r@.@.!P......
- 0x0020: 0001 da70 0050 3758 8a4a 377a a3aa 8010 ...p.P7X.J7z....
- 0x0030: 305f 06d4 0000 0101 080a 4ddc 9723 4ddc 0_........M..#M.
- 0x0040: 9723 .#
diff --git a/contrib/tcpdump/tests/print-flags.puu b/contrib/tcpdump/tests/print-flags.puu
deleted file mode 100644
index bcd8b99..0000000
--- a/contrib/tcpdump/tests/print-flags.puu
+++ /dev/null
@@ -1,151 +0,0 @@
-begin 644 print-flags.pcap
-MU,.RH0(`!````````````/__```!````KU;+0E)0#@!*````2@``````````
-M``````````@`10``/!MH0`!`!B%2?P```7\```':<`!0-UB)?@````"@`G__
-M%"$```($0`P$`@@*3=R2%@`````!`P,"KU;+0HI0#@!*````2@``````````
-M``````````@`10``/```0`!`!CRZ?P```7\```$`4-IP-WJ-\3=8B7^@$G__
-M;K$```($0`P$`@@*3=R2%DW<DA8!`P,"KU;+0K=0#@!"````0@``````````
-M``````````@`10``-!MJ0`!`!B%8?P```7\```':<`!0-UB)?S=ZC?*`$"``
-M-]````$!"`I-W)(63=R2%J]6RT*?50X`#`$```P!```````````````````(
-M`$4``/X;;$``0`8@C'\```%_```!VG``4#=8B7\W>HWR@!@@`/[R```!`0@*
-M3=R2%TW<DA9'150@+R!(5%10+S$N,0T*2&]S=#H@;&]C86QH;W-T#0I5<V5R
-M+4%G96YT.B!%3&EN:W,O,"XQ,"XT+3<M9&5B:6%N("AT97AT;6]D93L@3&EN
-M=7@@,BXV+C$Q+3$M-C@V+7-M<"!I-C@V.R`Q,S)X-38M,BD-"D%C8V5P=#H@
-M*B\J#0I!8V-E<'0M16YC;V1I;F<Z(&=Z:7`-"D%C8V5P="U,86YG=6%G93H@
-M96X-"D-O;FYE8W1I;VXZ($ME97`M06QI=F4-"@T*KU;+0KI9#@!"````0@``
-M``````````````````@`10``-!_D0`!`!AS>?P```7\```$`4-IP-WJ-\C=8
-MBDF`$"``-P,```$!"`I-W)(83=R2%Z]6RT*P7`X`^14``/D5````````````
-M```````(`$4`%>L?YD``0`8')7\```%_```!`%#:<#=ZC?(W6(I)@!@@`!/@
-M```!`0@*3=R2&4W<DA=(5%10+S$N,2`R,#`@3TL-"D1A=&4Z(%=E9"P@,#8@
-M2G5L(#(P,#4@,#,Z-3<Z,S4@1TU4#0I397)V97(Z($%P86-H92\Q+C,N,S,-
-M"DQA<W0M36]D:69I960Z(%-U;BP@,34@075G(#(P,#0@,#`Z-#,Z-#$@1TU4
-M#0I%5&%G.B`B-F4X,&8P+3$T.&$M-#$Q96(Q8F0B#0I!8V-E<'0M4F%N9V5S
-M.B!B>71E<PT*0V]N=&5N="U,96YG=&@Z(#4R-3@-"DME97`M06QI=F4Z('1I
-M;65O=70],34L(&UA>#TQ,#`-"D-O;FYE8W1I;VXZ($ME97`M06QI=F4-"D-O
-M;G1E;G0M5'EP93H@=&5X="]H=&UL.R!C:&%R<V5T/6ES;RTX.#4Y+3$-"@T*
-M/"%$3T-465!%($A434P@4%5"3$E#("(M+R]7,T,O+T141"!(5$U,(#0N,#$@
-M5')A;G-I=&EO;F%L+R]%3B(^"CQ(5$U,/@H\2$5!1#X*("`@/$U%5$$@2%14
-M4"U%455)5CTB0V]N=&5N="U4>7!E(B!#3TY414Y4/2)T97AT+VAT;6P[(&-H
-M87)S970]:7-O+3@X-3DM,2(^"B`@(#Q-151!($Y!344](D1E<V-R:7!T:6]N
-M(B!#3TY414Y4/2)4:&4@:6YI=&EA;"!I;G-T86QL871I;VX@;V8@1&5B:6%N
-M(&%P86-H92XB/@H@("`\5$E43$4^4&QA8V5H;VQD97(@<&%G93PO5$E43$4^
-M"CPO2$5!1#X*/$)/1%D@5$585#TB(S`P,#`P,"(@0D=#3TQ/4CTB(T9&1D9&
-M1B(@3$E.2STB(S`P,#!%1B(@5DQ)3DL](B,U-3$X.$$B($%,24Y+/2(C1D8P
-M,#`P(CX*"CQ(,3Y0;&%C96AO;&1E<B!P86=E/"](,3X*/$@R/DEF('EO=2!A
-M<F4@:G5S="!B<F]W<VEN9R!T:&4@=V5B/"]H,CX*"CQ0/E1H92!O=VYE<B!O
-M9B!T:&ES('=E8B!S:71E(&AA<R!N;W0@<'5T('5P(&%N>2!W96(@<&%G97,@
-M>65T+@I0;&5A<V4@8V]M92!B86-K(&QA=&5R+CPO4#X*"CQ0/CQ334%,3#X\
-M0TE413Y-;W9E(&%L;VYG+"!N;W1H:6YG('1O('-E92!H97)E+BXN/"]#251%
-M/B`Z+2D\+U--04Q,/CPO4#X*"CQ(,CY)9B!Y;W4@87)E('1R>6EN9R!T;R!L
-M;V-A=&4@=&AE(&%D;6EN:7-T<F%T;W(@;V8@=&AI<R!M86-H:6YE/"](,CX*
-M"CQ0/DEF('EO=2!W86YT('1O(')E<&]R="!S;VUE=&AI;F<@86)O=70@=&AI
-M<R!H;W-T)W,@8F5H879I;W(L('!L96%S90IC;VYT86-T('1H92!);G1E<FYE
-M="!397)V:6-E(%!R;W9I9&5R("A)4U`I(&EN=F]L=F5D(&1I<F5C=&QY+CPO
-M4#X*"CQ0/E-E92!T:&4@/$$@:')E9CTB:'1T<#HO+W=W=RYA8G5S92YN970O
-M(CY.971W;W)K($%B=7-E"D-L96%R:6YG:&]U<V4\+T$^(&9O<B!H;W<@=&\@
-M9&\@=&AI<RX\+U`^"@H\2#(^268@>6]U(&%R92!T:&4@861M:6YI<W1R871O
-M<B!O9B!T:&ES(&UA8VAI;F4\+T@R/@H*/%`^5&AE(&EN:71I86P@:6YS=&%L
-M;&%T:6]N(&]F(#Q!(&AR968](FAT='`Z+R]W=W<N9&5B:6%N+F]R9R\B/D1E
-M8FEA;B=S"F%P86-H93PO03X@=V5B('-E<G9E<B!P86-K86=E('=A<R!S=6-C
-M97-S9G5L+CPO4#X*"CQ0/CQ35%)/3D<^66]U('-H;W5L9"!R97!L86-E('1H
-M:7,@<&%G92!W:71H('EO=7(@;W=N('=E8B!P86=E<R!A<PIS;V]N(&%S('!O
-M<W-I8FQE+CPO4U123TY'/CPO4#X*"CQ0/E5N;&5S<R!Y;W4@8VAA;F=E9"!I
-M=',@8V]N9FEG=7)A=&EO;BP@>6]U<B!N97<@<V5R=F5R(&ES(&-O;F9I9W5R
-M960@87,@9F]L;&]W<SH*/%5,/@H\3$D^"D-O;F9I9W5R871I;VX@9FEL97,@
-M8V%N(&)E(&9O=6YD(&EN(#Q45#XO971C+V%P86-H93PO5%0^+CPO3$D^"@H\
-M3$D^"E1H92`\5%0^1&]C=6UE;G12;V]T/"]45#XL('=H:6-H(&ES('1H92!D
-M:7)E8W1O<GD@=6YD97(@=VAI8V@@86QL('EO=7(*2%1-3"!F:6QE<R!S:&]U
-M;&0@97AI<W0L(&ES('-E="!T;R`\5%0^+W9A<B]W=W<\+U14/BX\+TQ)/@H*
-M/$Q)/@I#1TD@<V-R:7!T<R!A<F4@;&]O:V5D(&9O<B!I;B`\5%0^+W5S<B]L
-M:6(O8V=I+6)I;CPO5%0^+"!W:&EC:"!I<R!W:&5R90I$96)I86X@<&%C:V%G
-M97,@=VEL;"!P;&%C92!T:&5I<B!S8W)I<'1S+CPO3$D^"@H\3$D^"DQO9R!F
-M:6QE<R!A<F4@<&QA8V5D(&EN(#Q45#XO=F%R+VQO9R]A<&%C:&4\+U14/BP@
-M86YD('=I;&P@8F4@<F]T871E9`IW965K;'DN("!4:&4@9G)E<75E;F-Y(&]F
-M(')O=&%T:6]N(&-A;B!B92!E87-I;'D@8VAA;F=E9"!B>2!E9&ET:6YG"CQ4
-M5#XO971C+VQO9W)O=&%T92YD+V%P86-H93PO5%0^+CPO3$D^"@H\3$D^"E1H
-M92!D969A=6QT(&1I<F5C=&]R>2!I;F1E>"!I<R`\5%0^:6YD97@N:'1M;#PO
-M5%0^+"!M96%N:6YG('1H870@<F5Q=65S=',*9F]R(&$@9&ER96-T;W)Y(#Q4
-M5#XO9F]O+V)A<B\\+U14/B!W:6QL(&=I=F4@=&AE(&-O;G1E;G1S(&]F('1H
-M92!F:6QE(#Q45#XO=F%R+W=W=R]F;V\O8F%R+VEN9&5X+FAT;6P\+U14/@II
-M9B!I="!E>&ES=',@*&%S<W5M:6YG('1H870@/%14/B]V87(O=W=W/"]45#X@
-M:7,@>6]U<B`\5%0^1&]C=6UE;G12;V]T/"]45#XI+CPO3$D^"@H\3$D^"E5S
-M97(@9&ER96-T;W)I97,@87)E(&5N86)L960L(&%N9"!U<V5R(&1O8W5M96YT
-M<R!W:6QL(&)E(&QO;VME9"!F;W(*:6X@=&AE(#Q45#YP=6)L:6-?:'1M;#PO
-M5%0^(&1I<F5C=&]R>2!O9B!T:&4@=7-E<G,G(&AO;65S+B`@5&AE<V4@9&ER
-M<PIS:&]U;&0@8F4@=6YD97(@/%14/B]H;VUE/"]45#XL(&%N9"!U<V5R<R!W
-M:6QL(&YO="!B92!A8FQE('1O('-Y;6QI;FL*=&\@9FEL97,@=&AE>2!D;VXG
-M="!O=VXN/"],23X*"CPO54P^"D%L;"!T:&4@<W1A;F1A<F0@87!A8VAE(&UO
-M9'5L97,@87)E(&%V86EL86)L92!W:71H('1H:7,@<F5L96%S92!A;F0@87)E
-M"FYO=R!M86YA9V5D('=I=&@@9&5B8V]N9BX@(%1Y<&4@/%14/F1P:V<M<F5C
-M;VYF:6=U<F4@87!A8VAE/"]45#X@=&\*<V5L96-T('=H:6-H(&UO9'5L97,@
-M>6]U('=A;G0@96YA8FQE9"X@($UA;GD@;W1H97(@;6]D=6QE<R!A<F4@879A
-M:6QA8FQE"G1H<F]U9V@@=&AE($1E8FEA;B!P86-K86=E('-Y<W1E;2!W:71H
-M('1H92!N86UE<R`\5%0^;&EB87!A8VAE+6UO9"TJ/"]45#XN"DEF('EO=2!N
-M965D('1O(&-O;7!I;&4@82!M;V1U;&4@>6]U<G-E;&8L('EO=2!W:6QL(&YE
-M960@=&\@:6YS=&%L;"!T:&4*/%14/F%P86-H92UD978\+U14/B!P86-K86=E
-M+@H*/%`^36]R92!D;V-U;65N=&%T:6]N(&]N($%P86-H92!C86X@8F4@9F]U
-M;F0@;VXZ"CQ53#X*/$Q)/@I4:&4@/$$@2%)%1CTB+V1O8R]A<&%C:&4M9&]C
-M+VUA;G5A;"\B/D%P86-H92!D;V-U;65N=&%T:6]N/"]!/B!S=&]R960@;VX@
-M>6]U<B!S97)V97(N/"],23X*"CQ,23X*5&AE(#Q!($A2148](FAT='`Z+R]W
-M=W<N87!A8VAE+F]R9R\B/D%P86-H92!0<F]J96-T/"]!/B!H;VUE('-I=&4N
-M/"],23X*"CQ,23X*5&AE(#Q!($A2148](FAT='`Z+R]W=W<N87!A8VAE+7-S
-M;"YO<F<O(CY!<&%C:&4M4U-,/"]!/B!H;VUE('-I=&4N/"],23X*"CQ,23X*
-M5&AE(#Q!($A2148](FAT='`Z+R]P97)L+F%P86-H92YO<F<O(CYM;V0@<&5R
-M;#PO03X@:&]M92!S:71E+CPO3$D^"@H\3$D^"E1H92`\02!(4D5&/2)H='1P
-M.B\O=W=W+F%P86-H97=E96LN8V]M+R(^07!A8VAE5V5E:SPO03X@;F5W<VQE
-M='1E<BX\+TQ)/@H*/$Q)/@I4:&4@/$$@2%)%1CTB:'1T<#HO+W=W=RYD96)I
-M86XN;W)G+V1O8R\B/D1E8FEA;B!0<F]J96-T"D1O8W5M96YT871I;VX\+T$^
-M('=H:6-H(&-O;G1A:6YS($A/5U1/<RP@1D%1<RP@86YD('-O9G1W87)E('5P
-M9&%T97,N/"],23X*/"]53#X*"CQ0/EEO=2!C86X@86QS;R!C;VYS=6QT('1H
-M92!L:7-T(&]F(#Q!($A2148](FAT='`Z+R]W=W<N8F]U=&5L;"YC;VTO9F%Q
-M+R(^5V]R;&0*5VED92!796(@1G)E<75E;G1L>2!!<VME9"!1=65S=&EO;G,\
-M+T$^(&9O<B!I;F9O<FUA=&EO;BX*"CQ(,CY,970@;W1H97(@<&5O<&QE(&MN
-M;W<@86)O=70@=&AI<R!S97)V97(\+T@R/@H*/$$@2%)%1CTB:'1T<#HO+VYE
-M=&-R869T+F-O;2\B/DYE=&-R869T/"]!/B!P<F]V:61E<R!A;B!I;G1E<F5S
-M=&EN9R!F<F5E"G-E<G9I8V4@9F]R('=E8B!S:71E(&UO;FET;W)I;F<@86YD
-M('-T871I<W1I8R!C;VQL96-T:6]N+@I9;W4@8V%N(&QE="!T:&5M(&MN;W<@
-M86)O=70@>6]U<B!S97)V97(@=7-I;F<@=&AE:7(*/$$@2%)%1CTB:'1T<#HO
-M+W5P=&EM92YN971C<F%F="YC;VTO(CYI;G1E<F9A8V4\+T$^+@I%;F%B;&EN
-M9R!T:&4@;6]N:71O<FEN9R!O9B!Y;W5R('-E<G9E<B!W:6QL('!R;W9I9&4@
-M82!B971T97(@9VQO8F%L(&]V97)V:65W"F]F('=H;R!I<R!U<VEN9R!W:&%T
-M(&%N9"!W:&5R92P@86YD(&ET('=O=6QD(&=I=F4@1&5B:6%N(&$@8F5T=&5R
-M"F]V97)V:65W(&]F('1H92!A<&%C:&4@<&%C:V%G92!U<V%G92X*"CQ(,CY!
-M8F]U="!T:&ES('!A9V4\+T@R/@H*/$E-1R!!3$E'3CTB<FEG:'0B($%,5#TB
-M(B!(14E'2%0](C(T-R(@5TE$5$@](C(W."(@4U)#/2)I8V]N<R]J:&4P-C$N
-M<&YG(CX*"CQ0/E1H:7,@:7,@82!P;&%C96AO;&1E<B!P86=E(&EN<W1A;&QE
-M9"!B>2!T:&4@/$$*2%)%1CTB:'1T<#HO+W=W=RYD96)I86XN;W)G+R(^1&5B
-M:6%N/"]!/@IR96QE87-E(&]F('1H92!A<&%C:&4@5V5B('-E<G9E<B!P86-K
-M86=E+@H*/%`^5&AI<R!C;VUP=71E<B!H87,@:6YS=&%L;&5D('1H92!$96)I
-M86X@1TY5+TQI;G5X(&]P97)A=&EN9R!S>7-T96TL"F)U="!I="!H87,@/'-T
-M<F]N9SYN;W1H:6YG('1O(&1O('=I=&@@=&AE($1E8FEA;@I0<F]J96-T/"]S
-M=')O;F<^+B!0;&5A<V4@9&\@/'-T<F]N9SYN;W0\+W-T<F]N9SX@8V]N=&%C
-M="!T:&4@1&5B:6%N"E!R;VIE8W0@86)O=70@:70N/"]0/@H*/%`^268@>6]U
-M(&9I;F0@82!B=6<@:6X@=&AI<R!A<&%C:&4@<&%C:V%G92P@;W(@:6X@07!A
-M8VAE(&ET<V5L9BP*<&QE87-E(&9I;&4@82!B=6<@<F5P;W)T(&]N(&ET+B`@
-M26YS=')U8W1I;VYS(&]N(&1O:6YG('1H:7,L(&%N9"!T:&4*;&ES="!O9B`\
-M02!(4D5&/2)H='1P.B\O8G5G<RYD96)I86XN;W)G+W-R8SIA<&%C:&4B/FMN
-M;W=N(&)U9W,\+T$^(&]F('1H:7,*<&%C:V%G92P@8V%N(&)E(&9O=6YD(&EN
-M('1H92`*/$$@2%)%1CTB:'1T<#HO+W=W=RYD96)I86XN;W)G+T)U9W,O4F5P
-M;W)T:6YG(CY$96)I86X@0G5G(%1R86-K:6YG(%-Y<W1E;3PO03XN"@H\4#Y4
-M:&%N:W,@9F]R('5S:6YG('1H:7,@<&%C:V%G92P@86YD(&-O;F=R871U;&%T
-M:6]N<R!F;W(@>6]U<B!C:&]I8V4@;V8*82!$96)I86X@<WES=&5M(3PO4#X*
-M"CQ$258@86QI9VX](F-E;G1E<B(^"CQA(&AR968](FAT='`Z+R]W=W<N9&5B
-M:6%N+F]R9R\B/@H\24U'(&%L:6=N/2)M:61D;&4B(&AE:6=H=#TB,S`B('=I
-M9'1H/2(R-2(@<W)C/2)I8V]N<R]D96)I86XO;W!E;FQO9V\M,C4N:G!G(B!A
-M;'0](D1E8FEA;B(^"CPO83X*/&$@:')E9CTB:'1T<#HO+W=W=RYA<&%C:&4N
-M;W)G+R(^"CQ)34<@86QI9VX](FUI9&1L92(@:&5I9VAT/2(S,B(@=VED=&@]
-M(C(U.2(@<W)C/2)I8V]N<R]A<&%C:&5?<&(N<&YG(B!A;'0](D%P86-H92(^
-M"CPO83X*/"]$258^"@H\(2TM"B`@5&AI<R!P86=E('=A<R!I;FET:6%L;'D@
-M8W)E871E9"!B>2!*;VAN:64@26YG<F%M("AH='1P.B\O;F5T9V]D+FYE="\I
-M"B`@270@=V%S(&QA=&5R(&5D:71E9"!B>2!-871T:&5W(%=I;&-O>"!A;F0@
-M2F]S:7`@4F]D:6XN"B`@3&%S="!M;V1I9FEE9#H@)$1A=&4Z(#(P,#0O,#8O
-M,C`@,34Z,S,Z-3<@)"X*("`M+3X*"CPO0D]$63X*/"](5$U,/@JO5LM"S%P.
-M`$(```!"````````````````````"`!%```T&VY``$`&(51_```!?P```=IP
-M`%`W6(I)-WJCJ8`0,%\0Z@```0$("DW<DAE-W)(9L5;+0L>``P!"````0@``
-M``````````````````@`10``-!MP0`!`!B%2?P```7\```':<`!0-UB*23=Z
-MHZF`$3!?"^$```$!"`I-W)<A3=R2&;%6RT*WA0,`0@```$(`````````````
-M```````(`$4``#0?Z$``0`8<VG\```%_```!`%#:<#=ZHZDW6(I*@!$@`!<U
-M```!`0@*3=R7(TW<ER&Q5LM"](4#`$(```!"````````````````````"`!%
-M```T&W)``$`&(5!_```!?P```=IP`%`W6(I*-WJCJH`0,%\&U````0$("DW<
-&ER--W)<C
-`
-end
diff --git a/contrib/tcpdump/tests/print-flags.sh b/contrib/tcpdump/tests/print-flags.sh
deleted file mode 100755
index c99f782..0000000
--- a/contrib/tcpdump/tests/print-flags.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-uudecode print-flags.puu
-
-for i in x xx X XX A AA; do
- if (../tcpdump -$i -s0 -nr print-flags.pcap | tee print-$i.new | diff - print-$i.out)
- then
- echo print-$i passed.
- else
- echo print-$i failed.
- fi
-done
diff --git a/contrib/tcpdump/tests/print-x.out b/contrib/tcpdump/tests/print-x.out
deleted file mode 100644
index 0b25bf6..0000000
--- a/contrib/tcpdump/tests/print-x.out
+++ /dev/null
@@ -1,409 +0,0 @@
-23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 <mss 16396,sackOK,timestamp 1306300950 0,nop,wscale 2>
- 0x0000: 4500 003c 1b68 4000 4006 2152 7f00 0001
- 0x0010: 7f00 0001 da70 0050 3758 897e 0000 0000
- 0x0020: a002 7fff 1421 0000 0204 400c 0402 080a
- 0x0030: 4ddc 9216 0000 0000 0103 0302
-23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 <mss 16396,sackOK,timestamp 1306300950 1306300950,nop,wscale 2>
- 0x0000: 4500 003c 0000 4000 4006 3cba 7f00 0001
- 0x0010: 7f00 0001 0050 da70 377a 8df1 3758 897f
- 0x0020: a012 7fff 6eb1 0000 0204 400c 0402 080a
- 0x0030: 4ddc 9216 4ddc 9216 0103 0302
-23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 <nop,nop,timestamp 1306300950 1306300950>
- 0x0000: 4500 0034 1b6a 4000 4006 2158 7f00 0001
- 0x0010: 7f00 0001 da70 0050 3758 897f 377a 8df2
- 0x0020: 8010 2000 37d0 0000 0101 080a 4ddc 9216
- 0x0030: 4ddc 9216
-23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 <nop,nop,timestamp 1306300951 1306300950>
- 0x0000: 4500 00fe 1b6c 4000 4006 208c 7f00 0001
- 0x0010: 7f00 0001 da70 0050 3758 897f 377a 8df2
- 0x0020: 8018 2000 fef2 0000 0101 080a 4ddc 9217
- 0x0030: 4ddc 9216 4745 5420 2f20 4854 5450 2f31
- 0x0040: 2e31 0d0a 486f 7374 3a20 6c6f 6361 6c68
- 0x0050: 6f73 740d 0a55 7365 722d 4167 656e 743a
- 0x0060: 2045 4c69 6e6b 732f 302e 3130 2e34 2d37
- 0x0070: 2d64 6562 6961 6e20 2874 6578 746d 6f64
- 0x0080: 653b 204c 696e 7578 2032 2e36 2e31 312d
- 0x0090: 312d 3638 362d 736d 7020 6936 3836 3b20
- 0x00a0: 3133 3278 3536 2d32 290d 0a41 6363 6570
- 0x00b0: 743a 202a 2f2a 0d0a 4163 6365 7074 2d45
- 0x00c0: 6e63 6f64 696e 673a 2067 7a69 700d 0a41
- 0x00d0: 6363 6570 742d 4c61 6e67 7561 6765 3a20
- 0x00e0: 656e 0d0a 436f 6e6e 6563 7469 6f6e 3a20
- 0x00f0: 4b65 6570 2d41 6c69 7665 0d0a 0d0a
-23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 <nop,nop,timestamp 1306300952 1306300951>
- 0x0000: 4500 0034 1fe4 4000 4006 1cde 7f00 0001
- 0x0010: 7f00 0001 0050 da70 377a 8df2 3758 8a49
- 0x0020: 8010 2000 3703 0000 0101 080a 4ddc 9218
- 0x0030: 4ddc 9217
-23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 <nop,nop,timestamp 1306300953 1306300951>
- 0x0000: 4500 15eb 1fe6 4000 4006 0725 7f00 0001
- 0x0010: 7f00 0001 0050 da70 377a 8df2 3758 8a49
- 0x0020: 8018 2000 13e0 0000 0101 080a 4ddc 9219
- 0x0030: 4ddc 9217 4854 5450 2f31 2e31 2032 3030
- 0x0040: 204f 4b0d 0a44 6174 653a 2057 6564 2c20
- 0x0050: 3036 204a 756c 2032 3030 3520 3033 3a35
- 0x0060: 373a 3335 2047 4d54 0d0a 5365 7276 6572
- 0x0070: 3a20 4170 6163 6865 2f31 2e33 2e33 330d
- 0x0080: 0a4c 6173 742d 4d6f 6469 6669 6564 3a20
- 0x0090: 5375 6e2c 2031 3520 4175 6720 3230 3034
- 0x00a0: 2030 303a 3433 3a34 3120 474d 540d 0a45
- 0x00b0: 5461 673a 2022 3665 3830 6630 2d31 3438
- 0x00c0: 612d 3431 3165 6231 6264 220d 0a41 6363
- 0x00d0: 6570 742d 5261 6e67 6573 3a20 6279 7465
- 0x00e0: 730d 0a43 6f6e 7465 6e74 2d4c 656e 6774
- 0x00f0: 683a 2035 3235 380d 0a4b 6565 702d 416c
- 0x0100: 6976 653a 2074 696d 656f 7574 3d31 352c
- 0x0110: 206d 6178 3d31 3030 0d0a 436f 6e6e 6563
- 0x0120: 7469 6f6e 3a20 4b65 6570 2d41 6c69 7665
- 0x0130: 0d0a 436f 6e74 656e 742d 5479 7065 3a20
- 0x0140: 7465 7874 2f68 746d 6c3b 2063 6861 7273
- 0x0150: 6574 3d69 736f 2d38 3835 392d 310d 0a0d
- 0x0160: 0a3c 2144 4f43 5459 5045 2048 544d 4c20
- 0x0170: 5055 424c 4943 2022 2d2f 2f57 3343 2f2f
- 0x0180: 4454 4420 4854 4d4c 2034 2e30 3120 5472
- 0x0190: 616e 7369 7469 6f6e 616c 2f2f 454e 223e
- 0x01a0: 0a3c 4854 4d4c 3e0a 3c48 4541 443e 0a20
- 0x01b0: 2020 3c4d 4554 4120 4854 5450 2d45 5155
- 0x01c0: 4956 3d22 436f 6e74 656e 742d 5479 7065
- 0x01d0: 2220 434f 4e54 454e 543d 2274 6578 742f
- 0x01e0: 6874 6d6c 3b20 6368 6172 7365 743d 6973
- 0x01f0: 6f2d 3838 3539 2d31 223e 0a20 2020 3c4d
- 0x0200: 4554 4120 4e41 4d45 3d22 4465 7363 7269
- 0x0210: 7074 696f 6e22 2043 4f4e 5445 4e54 3d22
- 0x0220: 5468 6520 696e 6974 6961 6c20 696e 7374
- 0x0230: 616c 6c61 7469 6f6e 206f 6620 4465 6269
- 0x0240: 616e 2061 7061 6368 652e 223e 0a20 2020
- 0x0250: 3c54 4954 4c45 3e50 6c61 6365 686f 6c64
- 0x0260: 6572 2070 6167 653c 2f54 4954 4c45 3e0a
- 0x0270: 3c2f 4845 4144 3e0a 3c42 4f44 5920 5445
- 0x0280: 5854 3d22 2330 3030 3030 3022 2042 4743
- 0x0290: 4f4c 4f52 3d22 2346 4646 4646 4622 204c
- 0x02a0: 494e 4b3d 2223 3030 3030 4546 2220 564c
- 0x02b0: 494e 4b3d 2223 3535 3138 3841 2220 414c
- 0x02c0: 494e 4b3d 2223 4646 3030 3030 223e 0a0a
- 0x02d0: 3c48 313e 506c 6163 6568 6f6c 6465 7220
- 0x02e0: 7061 6765 3c2f 4831 3e0a 3c48 323e 4966
- 0x02f0: 2079 6f75 2061 7265 206a 7573 7420 6272
- 0x0300: 6f77 7369 6e67 2074 6865 2077 6562 3c2f
- 0x0310: 6832 3e0a 0a3c 503e 5468 6520 6f77 6e65
- 0x0320: 7220 6f66 2074 6869 7320 7765 6220 7369
- 0x0330: 7465 2068 6173 206e 6f74 2070 7574 2075
- 0x0340: 7020 616e 7920 7765 6220 7061 6765 7320
- 0x0350: 7965 742e 0a50 6c65 6173 6520 636f 6d65
- 0x0360: 2062 6163 6b20 6c61 7465 722e 3c2f 503e
- 0x0370: 0a0a 3c50 3e3c 534d 414c 4c3e 3c43 4954
- 0x0380: 453e 4d6f 7665 2061 6c6f 6e67 2c20 6e6f
- 0x0390: 7468 696e 6720 746f 2073 6565 2068 6572
- 0x03a0: 652e 2e2e 3c2f 4349 5445 3e20 3a2d 293c
- 0x03b0: 2f53 4d41 4c4c 3e3c 2f50 3e0a 0a3c 4832
- 0x03c0: 3e49 6620 796f 7520 6172 6520 7472 7969
- 0x03d0: 6e67 2074 6f20 6c6f 6361 7465 2074 6865
- 0x03e0: 2061 646d 696e 6973 7472 6174 6f72 206f
- 0x03f0: 6620 7468 6973 206d 6163 6869 6e65 3c2f
- 0x0400: 4832 3e0a 0a3c 503e 4966 2079 6f75 2077
- 0x0410: 616e 7420 746f 2072 6570 6f72 7420 736f
- 0x0420: 6d65 7468 696e 6720 6162 6f75 7420 7468
- 0x0430: 6973 2068 6f73 7427 7320 6265 6861 7669
- 0x0440: 6f72 2c20 706c 6561 7365 0a63 6f6e 7461
- 0x0450: 6374 2074 6865 2049 6e74 6572 6e65 7420
- 0x0460: 5365 7276 6963 6520 5072 6f76 6964 6572
- 0x0470: 2028 4953 5029 2069 6e76 6f6c 7665 6420
- 0x0480: 6469 7265 6374 6c79 2e3c 2f50 3e0a 0a3c
- 0x0490: 503e 5365 6520 7468 6520 3c41 2068 7265
- 0x04a0: 663d 2268 7474 703a 2f2f 7777 772e 6162
- 0x04b0: 7573 652e 6e65 742f 223e 4e65 7477 6f72
- 0x04c0: 6b20 4162 7573 650a 436c 6561 7269 6e67
- 0x04d0: 686f 7573 653c 2f41 3e20 666f 7220 686f
- 0x04e0: 7720 746f 2064 6f20 7468 6973 2e3c 2f50
- 0x04f0: 3e0a 0a3c 4832 3e49 6620 796f 7520 6172
- 0x0500: 6520 7468 6520 6164 6d69 6e69 7374 7261
- 0x0510: 746f 7220 6f66 2074 6869 7320 6d61 6368
- 0x0520: 696e 653c 2f48 323e 0a0a 3c50 3e54 6865
- 0x0530: 2069 6e69 7469 616c 2069 6e73 7461 6c6c
- 0x0540: 6174 696f 6e20 6f66 203c 4120 6872 6566
- 0x0550: 3d22 6874 7470 3a2f 2f77 7777 2e64 6562
- 0x0560: 6961 6e2e 6f72 672f 223e 4465 6269 616e
- 0x0570: 2773 0a61 7061 6368 653c 2f41 3e20 7765
- 0x0580: 6220 7365 7276 6572 2070 6163 6b61 6765
- 0x0590: 2077 6173 2073 7563 6365 7373 6675 6c2e
- 0x05a0: 3c2f 503e 0a0a 3c50 3e3c 5354 524f 4e47
- 0x05b0: 3e59 6f75 2073 686f 756c 6420 7265 706c
- 0x05c0: 6163 6520 7468 6973 2070 6167 6520 7769
- 0x05d0: 7468 2079 6f75 7220 6f77 6e20 7765 6220
- 0x05e0: 7061 6765 7320 6173 0a73 6f6f 6e20 6173
- 0x05f0: 2070 6f73 7369 626c 652e 3c2f 5354 524f
- 0x0600: 4e47 3e3c 2f50 3e0a 0a3c 503e 556e 6c65
- 0x0610: 7373 2079 6f75 2063 6861 6e67 6564 2069
- 0x0620: 7473 2063 6f6e 6669 6775 7261 7469 6f6e
- 0x0630: 2c20 796f 7572 206e 6577 2073 6572 7665
- 0x0640: 7220 6973 2063 6f6e 6669 6775 7265 6420
- 0x0650: 6173 2066 6f6c 6c6f 7773 3a0a 3c55 4c3e
- 0x0660: 0a3c 4c49 3e0a 436f 6e66 6967 7572 6174
- 0x0670: 696f 6e20 6669 6c65 7320 6361 6e20 6265
- 0x0680: 2066 6f75 6e64 2069 6e20 3c54 543e 2f65
- 0x0690: 7463 2f61 7061 6368 653c 2f54 543e 2e3c
- 0x06a0: 2f4c 493e 0a0a 3c4c 493e 0a54 6865 203c
- 0x06b0: 5454 3e44 6f63 756d 656e 7452 6f6f 743c
- 0x06c0: 2f54 543e 2c20 7768 6963 6820 6973 2074
- 0x06d0: 6865 2064 6972 6563 746f 7279 2075 6e64
- 0x06e0: 6572 2077 6869 6368 2061 6c6c 2079 6f75
- 0x06f0: 720a 4854 4d4c 2066 696c 6573 2073 686f
- 0x0700: 756c 6420 6578 6973 742c 2069 7320 7365
- 0x0710: 7420 746f 203c 5454 3e2f 7661 722f 7777
- 0x0720: 773c 2f54 543e 2e3c 2f4c 493e 0a0a 3c4c
- 0x0730: 493e 0a43 4749 2073 6372 6970 7473 2061
- 0x0740: 7265 206c 6f6f 6b65 6420 666f 7220 696e
- 0x0750: 203c 5454 3e2f 7573 722f 6c69 622f 6367
- 0x0760: 692d 6269 6e3c 2f54 543e 2c20 7768 6963
- 0x0770: 6820 6973 2077 6865 7265 0a44 6562 6961
- 0x0780: 6e20 7061 636b 6167 6573 2077 696c 6c20
- 0x0790: 706c 6163 6520 7468 6569 7220 7363 7269
- 0x07a0: 7074 732e 3c2f 4c49 3e0a 0a3c 4c49 3e0a
- 0x07b0: 4c6f 6720 6669 6c65 7320 6172 6520 706c
- 0x07c0: 6163 6564 2069 6e20 3c54 543e 2f76 6172
- 0x07d0: 2f6c 6f67 2f61 7061 6368 653c 2f54 543e
- 0x07e0: 2c20 616e 6420 7769 6c6c 2062 6520 726f
- 0x07f0: 7461 7465 640a 7765 656b 6c79 2e20 2054
- 0x0800: 6865 2066 7265 7175 656e 6379 206f 6620
- 0x0810: 726f 7461 7469 6f6e 2063 616e 2062 6520
- 0x0820: 6561 7369 6c79 2063 6861 6e67 6564 2062
- 0x0830: 7920 6564 6974 696e 670a 3c54 543e 2f65
- 0x0840: 7463 2f6c 6f67 726f 7461 7465 2e64 2f61
- 0x0850: 7061 6368 653c 2f54 543e 2e3c 2f4c 493e
- 0x0860: 0a0a 3c4c 493e 0a54 6865 2064 6566 6175
- 0x0870: 6c74 2064 6972 6563 746f 7279 2069 6e64
- 0x0880: 6578 2069 7320 3c54 543e 696e 6465 782e
- 0x0890: 6874 6d6c 3c2f 5454 3e2c 206d 6561 6e69
- 0x08a0: 6e67 2074 6861 7420 7265 7175 6573 7473
- 0x08b0: 0a66 6f72 2061 2064 6972 6563 746f 7279
- 0x08c0: 203c 5454 3e2f 666f 6f2f 6261 722f 3c2f
- 0x08d0: 5454 3e20 7769 6c6c 2067 6976 6520 7468
- 0x08e0: 6520 636f 6e74 656e 7473 206f 6620 7468
- 0x08f0: 6520 6669 6c65 203c 5454 3e2f 7661 722f
- 0x0900: 7777 772f 666f 6f2f 6261 722f 696e 6465
- 0x0910: 782e 6874 6d6c 3c2f 5454 3e0a 6966 2069
- 0x0920: 7420 6578 6973 7473 2028 6173 7375 6d69
- 0x0930: 6e67 2074 6861 7420 3c54 543e 2f76 6172
- 0x0940: 2f77 7777 3c2f 5454 3e20 6973 2079 6f75
- 0x0950: 7220 3c54 543e 446f 6375 6d65 6e74 526f
- 0x0960: 6f74 3c2f 5454 3e29 2e3c 2f4c 493e 0a0a
- 0x0970: 3c4c 493e 0a55 7365 7220 6469 7265 6374
- 0x0980: 6f72 6965 7320 6172 6520 656e 6162 6c65
- 0x0990: 642c 2061 6e64 2075 7365 7220 646f 6375
- 0x09a0: 6d65 6e74 7320 7769 6c6c 2062 6520 6c6f
- 0x09b0: 6f6b 6564 2066 6f72 0a69 6e20 7468 6520
- 0x09c0: 3c54 543e 7075 626c 6963 5f68 746d 6c3c
- 0x09d0: 2f54 543e 2064 6972 6563 746f 7279 206f
- 0x09e0: 6620 7468 6520 7573 6572 7327 2068 6f6d
- 0x09f0: 6573 2e20 2054 6865 7365 2064 6972 730a
- 0x0a00: 7368 6f75 6c64 2062 6520 756e 6465 7220
- 0x0a10: 3c54 543e 2f68 6f6d 653c 2f54 543e 2c20
- 0x0a20: 616e 6420 7573 6572 7320 7769 6c6c 206e
- 0x0a30: 6f74 2062 6520 6162 6c65 2074 6f20 7379
- 0x0a40: 6d6c 696e 6b0a 746f 2066 696c 6573 2074
- 0x0a50: 6865 7920 646f 6e27 7420 6f77 6e2e 3c2f
- 0x0a60: 4c49 3e0a 0a3c 2f55 4c3e 0a41 6c6c 2074
- 0x0a70: 6865 2073 7461 6e64 6172 6420 6170 6163
- 0x0a80: 6865 206d 6f64 756c 6573 2061 7265 2061
- 0x0a90: 7661 696c 6162 6c65 2077 6974 6820 7468
- 0x0aa0: 6973 2072 656c 6561 7365 2061 6e64 2061
- 0x0ab0: 7265 0a6e 6f77 206d 616e 6167 6564 2077
- 0x0ac0: 6974 6820 6465 6263 6f6e 662e 2020 5479
- 0x0ad0: 7065 203c 5454 3e64 706b 672d 7265 636f
- 0x0ae0: 6e66 6967 7572 6520 6170 6163 6865 3c2f
- 0x0af0: 5454 3e20 746f 0a73 656c 6563 7420 7768
- 0x0b00: 6963 6820 6d6f 6475 6c65 7320 796f 7520
- 0x0b10: 7761 6e74 2065 6e61 626c 6564 2e20 204d
- 0x0b20: 616e 7920 6f74 6865 7220 6d6f 6475 6c65
- 0x0b30: 7320 6172 6520 6176 6169 6c61 626c 650a
- 0x0b40: 7468 726f 7567 6820 7468 6520 4465 6269
- 0x0b50: 616e 2070 6163 6b61 6765 2073 7973 7465
- 0x0b60: 6d20 7769 7468 2074 6865 206e 616d 6573
- 0x0b70: 203c 5454 3e6c 6962 6170 6163 6865 2d6d
- 0x0b80: 6f64 2d2a 3c2f 5454 3e2e 0a49 6620 796f
- 0x0b90: 7520 6e65 6564 2074 6f20 636f 6d70 696c
- 0x0ba0: 6520 6120 6d6f 6475 6c65 2079 6f75 7273
- 0x0bb0: 656c 662c 2079 6f75 2077 696c 6c20 6e65
- 0x0bc0: 6564 2074 6f20 696e 7374 616c 6c20 7468
- 0x0bd0: 650a 3c54 543e 6170 6163 6865 2d64 6576
- 0x0be0: 3c2f 5454 3e20 7061 636b 6167 652e 0a0a
- 0x0bf0: 3c50 3e4d 6f72 6520 646f 6375 6d65 6e74
- 0x0c00: 6174 696f 6e20 6f6e 2041 7061 6368 6520
- 0x0c10: 6361 6e20 6265 2066 6f75 6e64 206f 6e3a
- 0x0c20: 0a3c 554c 3e0a 3c4c 493e 0a54 6865 203c
- 0x0c30: 4120 4852 4546 3d22 2f64 6f63 2f61 7061
- 0x0c40: 6368 652d 646f 632f 6d61 6e75 616c 2f22
- 0x0c50: 3e41 7061 6368 6520 646f 6375 6d65 6e74
- 0x0c60: 6174 696f 6e3c 2f41 3e20 7374 6f72 6564
- 0x0c70: 206f 6e20 796f 7572 2073 6572 7665 722e
- 0x0c80: 3c2f 4c49 3e0a 0a3c 4c49 3e0a 5468 6520
- 0x0c90: 3c41 2048 5245 463d 2268 7474 703a 2f2f
- 0x0ca0: 7777 772e 6170 6163 6865 2e6f 7267 2f22
- 0x0cb0: 3e41 7061 6368 6520 5072 6f6a 6563 743c
- 0x0cc0: 2f41 3e20 686f 6d65 2073 6974 652e 3c2f
- 0x0cd0: 4c49 3e0a 0a3c 4c49 3e0a 5468 6520 3c41
- 0x0ce0: 2048 5245 463d 2268 7474 703a 2f2f 7777
- 0x0cf0: 772e 6170 6163 6865 2d73 736c 2e6f 7267
- 0x0d00: 2f22 3e41 7061 6368 652d 5353 4c3c 2f41
- 0x0d10: 3e20 686f 6d65 2073 6974 652e 3c2f 4c49
- 0x0d20: 3e0a 0a3c 4c49 3e0a 5468 6520 3c41 2048
- 0x0d30: 5245 463d 2268 7474 703a 2f2f 7065 726c
- 0x0d40: 2e61 7061 6368 652e 6f72 672f 223e 6d6f
- 0x0d50: 6420 7065 726c 3c2f 413e 2068 6f6d 6520
- 0x0d60: 7369 7465 2e3c 2f4c 493e 0a0a 3c4c 493e
- 0x0d70: 0a54 6865 203c 4120 4852 4546 3d22 6874
- 0x0d80: 7470 3a2f 2f77 7777 2e61 7061 6368 6577
- 0x0d90: 6565 6b2e 636f 6d2f 223e 4170 6163 6865
- 0x0da0: 5765 656b 3c2f 413e 206e 6577 736c 6574
- 0x0db0: 7465 722e 3c2f 4c49 3e0a 0a3c 4c49 3e0a
- 0x0dc0: 5468 6520 3c41 2048 5245 463d 2268 7474
- 0x0dd0: 703a 2f2f 7777 772e 6465 6269 616e 2e6f
- 0x0de0: 7267 2f64 6f63 2f22 3e44 6562 6961 6e20
- 0x0df0: 5072 6f6a 6563 740a 446f 6375 6d65 6e74
- 0x0e00: 6174 696f 6e3c 2f41 3e20 7768 6963 6820
- 0x0e10: 636f 6e74 6169 6e73 2048 4f57 544f 732c
- 0x0e20: 2046 4151 732c 2061 6e64 2073 6f66 7477
- 0x0e30: 6172 6520 7570 6461 7465 732e 3c2f 4c49
- 0x0e40: 3e0a 3c2f 554c 3e0a 0a3c 503e 596f 7520
- 0x0e50: 6361 6e20 616c 736f 2063 6f6e 7375 6c74
- 0x0e60: 2074 6865 206c 6973 7420 6f66 203c 4120
- 0x0e70: 4852 4546 3d22 6874 7470 3a2f 2f77 7777
- 0x0e80: 2e62 6f75 7465 6c6c 2e63 6f6d 2f66 6171
- 0x0e90: 2f22 3e57 6f72 6c64 0a57 6964 6520 5765
- 0x0ea0: 6220 4672 6571 7565 6e74 6c79 2041 736b
- 0x0eb0: 6564 2051 7565 7374 696f 6e73 3c2f 413e
- 0x0ec0: 2066 6f72 2069 6e66 6f72 6d61 7469 6f6e
- 0x0ed0: 2e0a 0a3c 4832 3e4c 6574 206f 7468 6572
- 0x0ee0: 2070 656f 706c 6520 6b6e 6f77 2061 626f
- 0x0ef0: 7574 2074 6869 7320 7365 7276 6572 3c2f
- 0x0f00: 4832 3e0a 0a3c 4120 4852 4546 3d22 6874
- 0x0f10: 7470 3a2f 2f6e 6574 6372 6166 742e 636f
- 0x0f20: 6d2f 223e 4e65 7463 7261 6674 3c2f 413e
- 0x0f30: 2070 726f 7669 6465 7320 616e 2069 6e74
- 0x0f40: 6572 6573 7469 6e67 2066 7265 650a 7365
- 0x0f50: 7276 6963 6520 666f 7220 7765 6220 7369
- 0x0f60: 7465 206d 6f6e 6974 6f72 696e 6720 616e
- 0x0f70: 6420 7374 6174 6973 7469 6320 636f 6c6c
- 0x0f80: 6563 7469 6f6e 2e0a 596f 7520 6361 6e20
- 0x0f90: 6c65 7420 7468 656d 206b 6e6f 7720 6162
- 0x0fa0: 6f75 7420 796f 7572 2073 6572 7665 7220
- 0x0fb0: 7573 696e 6720 7468 6569 720a 3c41 2048
- 0x0fc0: 5245 463d 2268 7474 703a 2f2f 7570 7469
- 0x0fd0: 6d65 2e6e 6574 6372 6166 742e 636f 6d2f
- 0x0fe0: 223e 696e 7465 7266 6163 653c 2f41 3e2e
- 0x0ff0: 0a45 6e61 626c 696e 6720 7468 6520 6d6f
- 0x1000: 6e69 746f 7269 6e67 206f 6620 796f 7572
- 0x1010: 2073 6572 7665 7220 7769 6c6c 2070 726f
- 0x1020: 7669 6465 2061 2062 6574 7465 7220 676c
- 0x1030: 6f62 616c 206f 7665 7276 6965 770a 6f66
- 0x1040: 2077 686f 2069 7320 7573 696e 6720 7768
- 0x1050: 6174 2061 6e64 2077 6865 7265 2c20 616e
- 0x1060: 6420 6974 2077 6f75 6c64 2067 6976 6520
- 0x1070: 4465 6269 616e 2061 2062 6574 7465 720a
- 0x1080: 6f76 6572 7669 6577 206f 6620 7468 6520
- 0x1090: 6170 6163 6865 2070 6163 6b61 6765 2075
- 0x10a0: 7361 6765 2e0a 0a3c 4832 3e41 626f 7574
- 0x10b0: 2074 6869 7320 7061 6765 3c2f 4832 3e0a
- 0x10c0: 0a3c 494d 4720 414c 4947 4e3d 2272 6967
- 0x10d0: 6874 2220 414c 543d 2222 2048 4549 4748
- 0x10e0: 543d 2232 3437 2220 5749 4454 483d 2232
- 0x10f0: 3738 2220 5352 433d 2269 636f 6e73 2f6a
- 0x1100: 6865 3036 312e 706e 6722 3e0a 0a3c 503e
- 0x1110: 5468 6973 2069 7320 6120 706c 6163 6568
- 0x1120: 6f6c 6465 7220 7061 6765 2069 6e73 7461
- 0x1130: 6c6c 6564 2062 7920 7468 6520 3c41 0a48
- 0x1140: 5245 463d 2268 7474 703a 2f2f 7777 772e
- 0x1150: 6465 6269 616e 2e6f 7267 2f22 3e44 6562
- 0x1160: 6961 6e3c 2f41 3e0a 7265 6c65 6173 6520
- 0x1170: 6f66 2074 6865 2061 7061 6368 6520 5765
- 0x1180: 6220 7365 7276 6572 2070 6163 6b61 6765
- 0x1190: 2e0a 0a3c 503e 5468 6973 2063 6f6d 7075
- 0x11a0: 7465 7220 6861 7320 696e 7374 616c 6c65
- 0x11b0: 6420 7468 6520 4465 6269 616e 2047 4e55
- 0x11c0: 2f4c 696e 7578 206f 7065 7261 7469 6e67
- 0x11d0: 2073 7973 7465 6d2c 0a62 7574 2069 7420
- 0x11e0: 6861 7320 3c73 7472 6f6e 673e 6e6f 7468
- 0x11f0: 696e 6720 746f 2064 6f20 7769 7468 2074
- 0x1200: 6865 2044 6562 6961 6e0a 5072 6f6a 6563
- 0x1210: 743c 2f73 7472 6f6e 673e 2e20 506c 6561
- 0x1220: 7365 2064 6f20 3c73 7472 6f6e 673e 6e6f
- 0x1230: 743c 2f73 7472 6f6e 673e 2063 6f6e 7461
- 0x1240: 6374 2074 6865 2044 6562 6961 6e0a 5072
- 0x1250: 6f6a 6563 7420 6162 6f75 7420 6974 2e3c
- 0x1260: 2f50 3e0a 0a3c 503e 4966 2079 6f75 2066
- 0x1270: 696e 6420 6120 6275 6720 696e 2074 6869
- 0x1280: 7320 6170 6163 6865 2070 6163 6b61 6765
- 0x1290: 2c20 6f72 2069 6e20 4170 6163 6865 2069
- 0x12a0: 7473 656c 662c 0a70 6c65 6173 6520 6669
- 0x12b0: 6c65 2061 2062 7567 2072 6570 6f72 7420
- 0x12c0: 6f6e 2069 742e 2020 496e 7374 7275 6374
- 0x12d0: 696f 6e73 206f 6e20 646f 696e 6720 7468
- 0x12e0: 6973 2c20 616e 6420 7468 650a 6c69 7374
- 0x12f0: 206f 6620 3c41 2048 5245 463d 2268 7474
- 0x1300: 703a 2f2f 6275 6773 2e64 6562 6961 6e2e
- 0x1310: 6f72 672f 7372 633a 6170 6163 6865 223e
- 0x1320: 6b6e 6f77 6e20 6275 6773 3c2f 413e 206f
- 0x1330: 6620 7468 6973 0a70 6163 6b61 6765 2c20
- 0x1340: 6361 6e20 6265 2066 6f75 6e64 2069 6e20
- 0x1350: 7468 6520 0a3c 4120 4852 4546 3d22 6874
- 0x1360: 7470 3a2f 2f77 7777 2e64 6562 6961 6e2e
- 0x1370: 6f72 672f 4275 6773 2f52 6570 6f72 7469
- 0x1380: 6e67 223e 4465 6269 616e 2042 7567 2054
- 0x1390: 7261 636b 696e 6720 5379 7374 656d 3c2f
- 0x13a0: 413e 2e0a 0a3c 503e 5468 616e 6b73 2066
- 0x13b0: 6f72 2075 7369 6e67 2074 6869 7320 7061
- 0x13c0: 636b 6167 652c 2061 6e64 2063 6f6e 6772
- 0x13d0: 6174 756c 6174 696f 6e73 2066 6f72 2079
- 0x13e0: 6f75 7220 6368 6f69 6365 206f 660a 6120
- 0x13f0: 4465 6269 616e 2073 7973 7465 6d21 3c2f
- 0x1400: 503e 0a0a 3c44 4956 2061 6c69 676e 3d22
- 0x1410: 6365 6e74 6572 223e 0a3c 6120 6872 6566
- 0x1420: 3d22 6874 7470 3a2f 2f77 7777 2e64 6562
- 0x1430: 6961 6e2e 6f72 672f 223e 0a3c 494d 4720
- 0x1440: 616c 6967 6e3d 226d 6964 646c 6522 2068
- 0x1450: 6569 6768 743d 2233 3022 2077 6964 7468
- 0x1460: 3d22 3235 2220 7372 633d 2269 636f 6e73
- 0x1470: 2f64 6562 6961 6e2f 6f70 656e 6c6f 676f
- 0x1480: 2d32 352e 6a70 6722 2061 6c74 3d22 4465
- 0x1490: 6269 616e 223e 0a3c 2f61 3e0a 3c61 2068
- 0x14a0: 7265 663d 2268 7474 703a 2f2f 7777 772e
- 0x14b0: 6170 6163 6865 2e6f 7267 2f22 3e0a 3c49
- 0x14c0: 4d47 2061 6c69 676e 3d22 6d69 6464 6c65
- 0x14d0: 2220 6865 6967 6874 3d22 3332 2220 7769
- 0x14e0: 6474 683d 2232 3539 2220 7372 633d 2269
- 0x14f0: 636f 6e73 2f61 7061 6368 655f 7062 2e70
- 0x1500: 6e67 2220 616c 743d 2241 7061 6368 6522
- 0x1510: 3e0a 3c2f 613e 0a3c 2f44 4956 3e0a 0a3c
- 0x1520: 212d 2d0a 2020 5468 6973 2070 6167 6520
- 0x1530: 7761 7320 696e 6974 6961 6c6c 7920 6372
- 0x1540: 6561 7465 6420 6279 204a 6f68 6e69 6520
- 0x1550: 496e 6772 616d 2028 6874 7470 3a2f 2f6e
- 0x1560: 6574 676f 642e 6e65 742f 290a 2020 4974
- 0x1570: 2077 6173 206c 6174 6572 2065 6469 7465
- 0x1580: 6420 6279 204d 6174 7468 6577 2057 696c
- 0x1590: 636f 7820 616e 6420 4a6f 7369 7020 526f
- 0x15a0: 6469 6e2e 0a20 204c 6173 7420 6d6f 6469
- 0x15b0: 6669 6564 3a20 2444 6174 653a 2032 3030
- 0x15c0: 342f 3036 2f32 3020 3135 3a33 333a 3537
- 0x15d0: 2024 2e0a 2020 2d2d 3e0a 0a3c 2f42 4f44
- 0x15e0: 593e 0a3c 2f48 544d 4c3e 0a
-23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 <nop,nop,timestamp 1306300953 1306300953>
- 0x0000: 4500 0034 1b6e 4000 4006 2154 7f00 0001
- 0x0010: 7f00 0001 da70 0050 3758 8a49 377a a3a9
- 0x0020: 8010 305f 10ea 0000 0101 080a 4ddc 9219
- 0x0030: 4ddc 9219
-23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 <nop,nop,timestamp 1306302241 1306300953>
- 0x0000: 4500 0034 1b70 4000 4006 2152 7f00 0001
- 0x0010: 7f00 0001 da70 0050 3758 8a49 377a a3a9
- 0x0020: 8011 305f 0be1 0000 0101 080a 4ddc 9721
- 0x0030: 4ddc 9219
-23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 <nop,nop,timestamp 1306302243 1306302241>
- 0x0000: 4500 0034 1fe8 4000 4006 1cda 7f00 0001
- 0x0010: 7f00 0001 0050 da70 377a a3a9 3758 8a4a
- 0x0020: 8011 2000 1735 0000 0101 080a 4ddc 9723
- 0x0030: 4ddc 9721
-23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 <nop,nop,timestamp 1306302243 1306302243>
- 0x0000: 4500 0034 1b72 4000 4006 2150 7f00 0001
- 0x0010: 7f00 0001 da70 0050 3758 8a4a 377a a3aa
- 0x0020: 8010 305f 06d4 0000 0101 080a 4ddc 9723
- 0x0030: 4ddc 9723
diff --git a/contrib/tcpdump/tests/print-xx.out b/contrib/tcpdump/tests/print-xx.out
deleted file mode 100644
index 82323d4..0000000
--- a/contrib/tcpdump/tests/print-xx.out
+++ /dev/null
@@ -1,419 +0,0 @@
-23:57:35.938066 IP 127.0.0.1.55920 > 127.0.0.1.80: S 928549246:928549246(0) win 32767 <mss 16396,sackOK,timestamp 1306300950 0,nop,wscale 2>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500
- 0x0010: 003c 1b68 4000 4006 2152 7f00 0001 7f00
- 0x0020: 0001 da70 0050 3758 897e 0000 0000 a002
- 0x0030: 7fff 1421 0000 0204 400c 0402 080a 4ddc
- 0x0040: 9216 0000 0000 0103 0302
-23:57:35.938122 IP 127.0.0.1.80 > 127.0.0.1.55920: S 930778609:930778609(0) ack 928549247 win 32767 <mss 16396,sackOK,timestamp 1306300950 1306300950,nop,wscale 2>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500
- 0x0010: 003c 0000 4000 4006 3cba 7f00 0001 7f00
- 0x0020: 0001 0050 da70 377a 8df1 3758 897f a012
- 0x0030: 7fff 6eb1 0000 0204 400c 0402 080a 4ddc
- 0x0040: 9216 4ddc 9216 0103 0302
-23:57:35.938167 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 1 win 8192 <nop,nop,timestamp 1306300950 1306300950>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500
- 0x0010: 0034 1b6a 4000 4006 2158 7f00 0001 7f00
- 0x0020: 0001 da70 0050 3758 897f 377a 8df2 8010
- 0x0030: 2000 37d0 0000 0101 080a 4ddc 9216 4ddc
- 0x0040: 9216
-23:57:35.939423 IP 127.0.0.1.55920 > 127.0.0.1.80: P 1:203(202) ack 1 win 8192 <nop,nop,timestamp 1306300951 1306300950>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500
- 0x0010: 00fe 1b6c 4000 4006 208c 7f00 0001 7f00
- 0x0020: 0001 da70 0050 3758 897f 377a 8df2 8018
- 0x0030: 2000 fef2 0000 0101 080a 4ddc 9217 4ddc
- 0x0040: 9216 4745 5420 2f20 4854 5450 2f31 2e31
- 0x0050: 0d0a 486f 7374 3a20 6c6f 6361 6c68 6f73
- 0x0060: 740d 0a55 7365 722d 4167 656e 743a 2045
- 0x0070: 4c69 6e6b 732f 302e 3130 2e34 2d37 2d64
- 0x0080: 6562 6961 6e20 2874 6578 746d 6f64 653b
- 0x0090: 204c 696e 7578 2032 2e36 2e31 312d 312d
- 0x00a0: 3638 362d 736d 7020 6936 3836 3b20 3133
- 0x00b0: 3278 3536 2d32 290d 0a41 6363 6570 743a
- 0x00c0: 202a 2f2a 0d0a 4163 6365 7074 2d45 6e63
- 0x00d0: 6f64 696e 673a 2067 7a69 700d 0a41 6363
- 0x00e0: 6570 742d 4c61 6e67 7561 6765 3a20 656e
- 0x00f0: 0d0a 436f 6e6e 6563 7469 6f6e 3a20 4b65
- 0x0100: 6570 2d41 6c69 7665 0d0a 0d0a
-23:57:35.940474 IP 127.0.0.1.80 > 127.0.0.1.55920: . ack 203 win 8192 <nop,nop,timestamp 1306300952 1306300951>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500
- 0x0010: 0034 1fe4 4000 4006 1cde 7f00 0001 7f00
- 0x0020: 0001 0050 da70 377a 8df2 3758 8a49 8010
- 0x0030: 2000 3703 0000 0101 080a 4ddc 9218 4ddc
- 0x0040: 9217
-23:57:35.941232 IP 127.0.0.1.80 > 127.0.0.1.55920: P 1:5560(5559) ack 203 win 8192 <nop,nop,timestamp 1306300953 1306300951>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500
- 0x0010: 15eb 1fe6 4000 4006 0725 7f00 0001 7f00
- 0x0020: 0001 0050 da70 377a 8df2 3758 8a49 8018
- 0x0030: 2000 13e0 0000 0101 080a 4ddc 9219 4ddc
- 0x0040: 9217 4854 5450 2f31 2e31 2032 3030 204f
- 0x0050: 4b0d 0a44 6174 653a 2057 6564 2c20 3036
- 0x0060: 204a 756c 2032 3030 3520 3033 3a35 373a
- 0x0070: 3335 2047 4d54 0d0a 5365 7276 6572 3a20
- 0x0080: 4170 6163 6865 2f31 2e33 2e33 330d 0a4c
- 0x0090: 6173 742d 4d6f 6469 6669 6564 3a20 5375
- 0x00a0: 6e2c 2031 3520 4175 6720 3230 3034 2030
- 0x00b0: 303a 3433 3a34 3120 474d 540d 0a45 5461
- 0x00c0: 673a 2022 3665 3830 6630 2d31 3438 612d
- 0x00d0: 3431 3165 6231 6264 220d 0a41 6363 6570
- 0x00e0: 742d 5261 6e67 6573 3a20 6279 7465 730d
- 0x00f0: 0a43 6f6e 7465 6e74 2d4c 656e 6774 683a
- 0x0100: 2035 3235 380d 0a4b 6565 702d 416c 6976
- 0x0110: 653a 2074 696d 656f 7574 3d31 352c 206d
- 0x0120: 6178 3d31 3030 0d0a 436f 6e6e 6563 7469
- 0x0130: 6f6e 3a20 4b65 6570 2d41 6c69 7665 0d0a
- 0x0140: 436f 6e74 656e 742d 5479 7065 3a20 7465
- 0x0150: 7874 2f68 746d 6c3b 2063 6861 7273 6574
- 0x0160: 3d69 736f 2d38 3835 392d 310d 0a0d 0a3c
- 0x0170: 2144 4f43 5459 5045 2048 544d 4c20 5055
- 0x0180: 424c 4943 2022 2d2f 2f57 3343 2f2f 4454
- 0x0190: 4420 4854 4d4c 2034 2e30 3120 5472 616e
- 0x01a0: 7369 7469 6f6e 616c 2f2f 454e 223e 0a3c
- 0x01b0: 4854 4d4c 3e0a 3c48 4541 443e 0a20 2020
- 0x01c0: 3c4d 4554 4120 4854 5450 2d45 5155 4956
- 0x01d0: 3d22 436f 6e74 656e 742d 5479 7065 2220
- 0x01e0: 434f 4e54 454e 543d 2274 6578 742f 6874
- 0x01f0: 6d6c 3b20 6368 6172 7365 743d 6973 6f2d
- 0x0200: 3838 3539 2d31 223e 0a20 2020 3c4d 4554
- 0x0210: 4120 4e41 4d45 3d22 4465 7363 7269 7074
- 0x0220: 696f 6e22 2043 4f4e 5445 4e54 3d22 5468
- 0x0230: 6520 696e 6974 6961 6c20 696e 7374 616c
- 0x0240: 6c61 7469 6f6e 206f 6620 4465 6269 616e
- 0x0250: 2061 7061 6368 652e 223e 0a20 2020 3c54
- 0x0260: 4954 4c45 3e50 6c61 6365 686f 6c64 6572
- 0x0270: 2070 6167 653c 2f54 4954 4c45 3e0a 3c2f
- 0x0280: 4845 4144 3e0a 3c42 4f44 5920 5445 5854
- 0x0290: 3d22 2330 3030 3030 3022 2042 4743 4f4c
- 0x02a0: 4f52 3d22 2346 4646 4646 4622 204c 494e
- 0x02b0: 4b3d 2223 3030 3030 4546 2220 564c 494e
- 0x02c0: 4b3d 2223 3535 3138 3841 2220 414c 494e
- 0x02d0: 4b3d 2223 4646 3030 3030 223e 0a0a 3c48
- 0x02e0: 313e 506c 6163 6568 6f6c 6465 7220 7061
- 0x02f0: 6765 3c2f 4831 3e0a 3c48 323e 4966 2079
- 0x0300: 6f75 2061 7265 206a 7573 7420 6272 6f77
- 0x0310: 7369 6e67 2074 6865 2077 6562 3c2f 6832
- 0x0320: 3e0a 0a3c 503e 5468 6520 6f77 6e65 7220
- 0x0330: 6f66 2074 6869 7320 7765 6220 7369 7465
- 0x0340: 2068 6173 206e 6f74 2070 7574 2075 7020
- 0x0350: 616e 7920 7765 6220 7061 6765 7320 7965
- 0x0360: 742e 0a50 6c65 6173 6520 636f 6d65 2062
- 0x0370: 6163 6b20 6c61 7465 722e 3c2f 503e 0a0a
- 0x0380: 3c50 3e3c 534d 414c 4c3e 3c43 4954 453e
- 0x0390: 4d6f 7665 2061 6c6f 6e67 2c20 6e6f 7468
- 0x03a0: 696e 6720 746f 2073 6565 2068 6572 652e
- 0x03b0: 2e2e 3c2f 4349 5445 3e20 3a2d 293c 2f53
- 0x03c0: 4d41 4c4c 3e3c 2f50 3e0a 0a3c 4832 3e49
- 0x03d0: 6620 796f 7520 6172 6520 7472 7969 6e67
- 0x03e0: 2074 6f20 6c6f 6361 7465 2074 6865 2061
- 0x03f0: 646d 696e 6973 7472 6174 6f72 206f 6620
- 0x0400: 7468 6973 206d 6163 6869 6e65 3c2f 4832
- 0x0410: 3e0a 0a3c 503e 4966 2079 6f75 2077 616e
- 0x0420: 7420 746f 2072 6570 6f72 7420 736f 6d65
- 0x0430: 7468 696e 6720 6162 6f75 7420 7468 6973
- 0x0440: 2068 6f73 7427 7320 6265 6861 7669 6f72
- 0x0450: 2c20 706c 6561 7365 0a63 6f6e 7461 6374
- 0x0460: 2074 6865 2049 6e74 6572 6e65 7420 5365
- 0x0470: 7276 6963 6520 5072 6f76 6964 6572 2028
- 0x0480: 4953 5029 2069 6e76 6f6c 7665 6420 6469
- 0x0490: 7265 6374 6c79 2e3c 2f50 3e0a 0a3c 503e
- 0x04a0: 5365 6520 7468 6520 3c41 2068 7265 663d
- 0x04b0: 2268 7474 703a 2f2f 7777 772e 6162 7573
- 0x04c0: 652e 6e65 742f 223e 4e65 7477 6f72 6b20
- 0x04d0: 4162 7573 650a 436c 6561 7269 6e67 686f
- 0x04e0: 7573 653c 2f41 3e20 666f 7220 686f 7720
- 0x04f0: 746f 2064 6f20 7468 6973 2e3c 2f50 3e0a
- 0x0500: 0a3c 4832 3e49 6620 796f 7520 6172 6520
- 0x0510: 7468 6520 6164 6d69 6e69 7374 7261 746f
- 0x0520: 7220 6f66 2074 6869 7320 6d61 6368 696e
- 0x0530: 653c 2f48 323e 0a0a 3c50 3e54 6865 2069
- 0x0540: 6e69 7469 616c 2069 6e73 7461 6c6c 6174
- 0x0550: 696f 6e20 6f66 203c 4120 6872 6566 3d22
- 0x0560: 6874 7470 3a2f 2f77 7777 2e64 6562 6961
- 0x0570: 6e2e 6f72 672f 223e 4465 6269 616e 2773
- 0x0580: 0a61 7061 6368 653c 2f41 3e20 7765 6220
- 0x0590: 7365 7276 6572 2070 6163 6b61 6765 2077
- 0x05a0: 6173 2073 7563 6365 7373 6675 6c2e 3c2f
- 0x05b0: 503e 0a0a 3c50 3e3c 5354 524f 4e47 3e59
- 0x05c0: 6f75 2073 686f 756c 6420 7265 706c 6163
- 0x05d0: 6520 7468 6973 2070 6167 6520 7769 7468
- 0x05e0: 2079 6f75 7220 6f77 6e20 7765 6220 7061
- 0x05f0: 6765 7320 6173 0a73 6f6f 6e20 6173 2070
- 0x0600: 6f73 7369 626c 652e 3c2f 5354 524f 4e47
- 0x0610: 3e3c 2f50 3e0a 0a3c 503e 556e 6c65 7373
- 0x0620: 2079 6f75 2063 6861 6e67 6564 2069 7473
- 0x0630: 2063 6f6e 6669 6775 7261 7469 6f6e 2c20
- 0x0640: 796f 7572 206e 6577 2073 6572 7665 7220
- 0x0650: 6973 2063 6f6e 6669 6775 7265 6420 6173
- 0x0660: 2066 6f6c 6c6f 7773 3a0a 3c55 4c3e 0a3c
- 0x0670: 4c49 3e0a 436f 6e66 6967 7572 6174 696f
- 0x0680: 6e20 6669 6c65 7320 6361 6e20 6265 2066
- 0x0690: 6f75 6e64 2069 6e20 3c54 543e 2f65 7463
- 0x06a0: 2f61 7061 6368 653c 2f54 543e 2e3c 2f4c
- 0x06b0: 493e 0a0a 3c4c 493e 0a54 6865 203c 5454
- 0x06c0: 3e44 6f63 756d 656e 7452 6f6f 743c 2f54
- 0x06d0: 543e 2c20 7768 6963 6820 6973 2074 6865
- 0x06e0: 2064 6972 6563 746f 7279 2075 6e64 6572
- 0x06f0: 2077 6869 6368 2061 6c6c 2079 6f75 720a
- 0x0700: 4854 4d4c 2066 696c 6573 2073 686f 756c
- 0x0710: 6420 6578 6973 742c 2069 7320 7365 7420
- 0x0720: 746f 203c 5454 3e2f 7661 722f 7777 773c
- 0x0730: 2f54 543e 2e3c 2f4c 493e 0a0a 3c4c 493e
- 0x0740: 0a43 4749 2073 6372 6970 7473 2061 7265
- 0x0750: 206c 6f6f 6b65 6420 666f 7220 696e 203c
- 0x0760: 5454 3e2f 7573 722f 6c69 622f 6367 692d
- 0x0770: 6269 6e3c 2f54 543e 2c20 7768 6963 6820
- 0x0780: 6973 2077 6865 7265 0a44 6562 6961 6e20
- 0x0790: 7061 636b 6167 6573 2077 696c 6c20 706c
- 0x07a0: 6163 6520 7468 6569 7220 7363 7269 7074
- 0x07b0: 732e 3c2f 4c49 3e0a 0a3c 4c49 3e0a 4c6f
- 0x07c0: 6720 6669 6c65 7320 6172 6520 706c 6163
- 0x07d0: 6564 2069 6e20 3c54 543e 2f76 6172 2f6c
- 0x07e0: 6f67 2f61 7061 6368 653c 2f54 543e 2c20
- 0x07f0: 616e 6420 7769 6c6c 2062 6520 726f 7461
- 0x0800: 7465 640a 7765 656b 6c79 2e20 2054 6865
- 0x0810: 2066 7265 7175 656e 6379 206f 6620 726f
- 0x0820: 7461 7469 6f6e 2063 616e 2062 6520 6561
- 0x0830: 7369 6c79 2063 6861 6e67 6564 2062 7920
- 0x0840: 6564 6974 696e 670a 3c54 543e 2f65 7463
- 0x0850: 2f6c 6f67 726f 7461 7465 2e64 2f61 7061
- 0x0860: 6368 653c 2f54 543e 2e3c 2f4c 493e 0a0a
- 0x0870: 3c4c 493e 0a54 6865 2064 6566 6175 6c74
- 0x0880: 2064 6972 6563 746f 7279 2069 6e64 6578
- 0x0890: 2069 7320 3c54 543e 696e 6465 782e 6874
- 0x08a0: 6d6c 3c2f 5454 3e2c 206d 6561 6e69 6e67
- 0x08b0: 2074 6861 7420 7265 7175 6573 7473 0a66
- 0x08c0: 6f72 2061 2064 6972 6563 746f 7279 203c
- 0x08d0: 5454 3e2f 666f 6f2f 6261 722f 3c2f 5454
- 0x08e0: 3e20 7769 6c6c 2067 6976 6520 7468 6520
- 0x08f0: 636f 6e74 656e 7473 206f 6620 7468 6520
- 0x0900: 6669 6c65 203c 5454 3e2f 7661 722f 7777
- 0x0910: 772f 666f 6f2f 6261 722f 696e 6465 782e
- 0x0920: 6874 6d6c 3c2f 5454 3e0a 6966 2069 7420
- 0x0930: 6578 6973 7473 2028 6173 7375 6d69 6e67
- 0x0940: 2074 6861 7420 3c54 543e 2f76 6172 2f77
- 0x0950: 7777 3c2f 5454 3e20 6973 2079 6f75 7220
- 0x0960: 3c54 543e 446f 6375 6d65 6e74 526f 6f74
- 0x0970: 3c2f 5454 3e29 2e3c 2f4c 493e 0a0a 3c4c
- 0x0980: 493e 0a55 7365 7220 6469 7265 6374 6f72
- 0x0990: 6965 7320 6172 6520 656e 6162 6c65 642c
- 0x09a0: 2061 6e64 2075 7365 7220 646f 6375 6d65
- 0x09b0: 6e74 7320 7769 6c6c 2062 6520 6c6f 6f6b
- 0x09c0: 6564 2066 6f72 0a69 6e20 7468 6520 3c54
- 0x09d0: 543e 7075 626c 6963 5f68 746d 6c3c 2f54
- 0x09e0: 543e 2064 6972 6563 746f 7279 206f 6620
- 0x09f0: 7468 6520 7573 6572 7327 2068 6f6d 6573
- 0x0a00: 2e20 2054 6865 7365 2064 6972 730a 7368
- 0x0a10: 6f75 6c64 2062 6520 756e 6465 7220 3c54
- 0x0a20: 543e 2f68 6f6d 653c 2f54 543e 2c20 616e
- 0x0a30: 6420 7573 6572 7320 7769 6c6c 206e 6f74
- 0x0a40: 2062 6520 6162 6c65 2074 6f20 7379 6d6c
- 0x0a50: 696e 6b0a 746f 2066 696c 6573 2074 6865
- 0x0a60: 7920 646f 6e27 7420 6f77 6e2e 3c2f 4c49
- 0x0a70: 3e0a 0a3c 2f55 4c3e 0a41 6c6c 2074 6865
- 0x0a80: 2073 7461 6e64 6172 6420 6170 6163 6865
- 0x0a90: 206d 6f64 756c 6573 2061 7265 2061 7661
- 0x0aa0: 696c 6162 6c65 2077 6974 6820 7468 6973
- 0x0ab0: 2072 656c 6561 7365 2061 6e64 2061 7265
- 0x0ac0: 0a6e 6f77 206d 616e 6167 6564 2077 6974
- 0x0ad0: 6820 6465 6263 6f6e 662e 2020 5479 7065
- 0x0ae0: 203c 5454 3e64 706b 672d 7265 636f 6e66
- 0x0af0: 6967 7572 6520 6170 6163 6865 3c2f 5454
- 0x0b00: 3e20 746f 0a73 656c 6563 7420 7768 6963
- 0x0b10: 6820 6d6f 6475 6c65 7320 796f 7520 7761
- 0x0b20: 6e74 2065 6e61 626c 6564 2e20 204d 616e
- 0x0b30: 7920 6f74 6865 7220 6d6f 6475 6c65 7320
- 0x0b40: 6172 6520 6176 6169 6c61 626c 650a 7468
- 0x0b50: 726f 7567 6820 7468 6520 4465 6269 616e
- 0x0b60: 2070 6163 6b61 6765 2073 7973 7465 6d20
- 0x0b70: 7769 7468 2074 6865 206e 616d 6573 203c
- 0x0b80: 5454 3e6c 6962 6170 6163 6865 2d6d 6f64
- 0x0b90: 2d2a 3c2f 5454 3e2e 0a49 6620 796f 7520
- 0x0ba0: 6e65 6564 2074 6f20 636f 6d70 696c 6520
- 0x0bb0: 6120 6d6f 6475 6c65 2079 6f75 7273 656c
- 0x0bc0: 662c 2079 6f75 2077 696c 6c20 6e65 6564
- 0x0bd0: 2074 6f20 696e 7374 616c 6c20 7468 650a
- 0x0be0: 3c54 543e 6170 6163 6865 2d64 6576 3c2f
- 0x0bf0: 5454 3e20 7061 636b 6167 652e 0a0a 3c50
- 0x0c00: 3e4d 6f72 6520 646f 6375 6d65 6e74 6174
- 0x0c10: 696f 6e20 6f6e 2041 7061 6368 6520 6361
- 0x0c20: 6e20 6265 2066 6f75 6e64 206f 6e3a 0a3c
- 0x0c30: 554c 3e0a 3c4c 493e 0a54 6865 203c 4120
- 0x0c40: 4852 4546 3d22 2f64 6f63 2f61 7061 6368
- 0x0c50: 652d 646f 632f 6d61 6e75 616c 2f22 3e41
- 0x0c60: 7061 6368 6520 646f 6375 6d65 6e74 6174
- 0x0c70: 696f 6e3c 2f41 3e20 7374 6f72 6564 206f
- 0x0c80: 6e20 796f 7572 2073 6572 7665 722e 3c2f
- 0x0c90: 4c49 3e0a 0a3c 4c49 3e0a 5468 6520 3c41
- 0x0ca0: 2048 5245 463d 2268 7474 703a 2f2f 7777
- 0x0cb0: 772e 6170 6163 6865 2e6f 7267 2f22 3e41
- 0x0cc0: 7061 6368 6520 5072 6f6a 6563 743c 2f41
- 0x0cd0: 3e20 686f 6d65 2073 6974 652e 3c2f 4c49
- 0x0ce0: 3e0a 0a3c 4c49 3e0a 5468 6520 3c41 2048
- 0x0cf0: 5245 463d 2268 7474 703a 2f2f 7777 772e
- 0x0d00: 6170 6163 6865 2d73 736c 2e6f 7267 2f22
- 0x0d10: 3e41 7061 6368 652d 5353 4c3c 2f41 3e20
- 0x0d20: 686f 6d65 2073 6974 652e 3c2f 4c49 3e0a
- 0x0d30: 0a3c 4c49 3e0a 5468 6520 3c41 2048 5245
- 0x0d40: 463d 2268 7474 703a 2f2f 7065 726c 2e61
- 0x0d50: 7061 6368 652e 6f72 672f 223e 6d6f 6420
- 0x0d60: 7065 726c 3c2f 413e 2068 6f6d 6520 7369
- 0x0d70: 7465 2e3c 2f4c 493e 0a0a 3c4c 493e 0a54
- 0x0d80: 6865 203c 4120 4852 4546 3d22 6874 7470
- 0x0d90: 3a2f 2f77 7777 2e61 7061 6368 6577 6565
- 0x0da0: 6b2e 636f 6d2f 223e 4170 6163 6865 5765
- 0x0db0: 656b 3c2f 413e 206e 6577 736c 6574 7465
- 0x0dc0: 722e 3c2f 4c49 3e0a 0a3c 4c49 3e0a 5468
- 0x0dd0: 6520 3c41 2048 5245 463d 2268 7474 703a
- 0x0de0: 2f2f 7777 772e 6465 6269 616e 2e6f 7267
- 0x0df0: 2f64 6f63 2f22 3e44 6562 6961 6e20 5072
- 0x0e00: 6f6a 6563 740a 446f 6375 6d65 6e74 6174
- 0x0e10: 696f 6e3c 2f41 3e20 7768 6963 6820 636f
- 0x0e20: 6e74 6169 6e73 2048 4f57 544f 732c 2046
- 0x0e30: 4151 732c 2061 6e64 2073 6f66 7477 6172
- 0x0e40: 6520 7570 6461 7465 732e 3c2f 4c49 3e0a
- 0x0e50: 3c2f 554c 3e0a 0a3c 503e 596f 7520 6361
- 0x0e60: 6e20 616c 736f 2063 6f6e 7375 6c74 2074
- 0x0e70: 6865 206c 6973 7420 6f66 203c 4120 4852
- 0x0e80: 4546 3d22 6874 7470 3a2f 2f77 7777 2e62
- 0x0e90: 6f75 7465 6c6c 2e63 6f6d 2f66 6171 2f22
- 0x0ea0: 3e57 6f72 6c64 0a57 6964 6520 5765 6220
- 0x0eb0: 4672 6571 7565 6e74 6c79 2041 736b 6564
- 0x0ec0: 2051 7565 7374 696f 6e73 3c2f 413e 2066
- 0x0ed0: 6f72 2069 6e66 6f72 6d61 7469 6f6e 2e0a
- 0x0ee0: 0a3c 4832 3e4c 6574 206f 7468 6572 2070
- 0x0ef0: 656f 706c 6520 6b6e 6f77 2061 626f 7574
- 0x0f00: 2074 6869 7320 7365 7276 6572 3c2f 4832
- 0x0f10: 3e0a 0a3c 4120 4852 4546 3d22 6874 7470
- 0x0f20: 3a2f 2f6e 6574 6372 6166 742e 636f 6d2f
- 0x0f30: 223e 4e65 7463 7261 6674 3c2f 413e 2070
- 0x0f40: 726f 7669 6465 7320 616e 2069 6e74 6572
- 0x0f50: 6573 7469 6e67 2066 7265 650a 7365 7276
- 0x0f60: 6963 6520 666f 7220 7765 6220 7369 7465
- 0x0f70: 206d 6f6e 6974 6f72 696e 6720 616e 6420
- 0x0f80: 7374 6174 6973 7469 6320 636f 6c6c 6563
- 0x0f90: 7469 6f6e 2e0a 596f 7520 6361 6e20 6c65
- 0x0fa0: 7420 7468 656d 206b 6e6f 7720 6162 6f75
- 0x0fb0: 7420 796f 7572 2073 6572 7665 7220 7573
- 0x0fc0: 696e 6720 7468 6569 720a 3c41 2048 5245
- 0x0fd0: 463d 2268 7474 703a 2f2f 7570 7469 6d65
- 0x0fe0: 2e6e 6574 6372 6166 742e 636f 6d2f 223e
- 0x0ff0: 696e 7465 7266 6163 653c 2f41 3e2e 0a45
- 0x1000: 6e61 626c 696e 6720 7468 6520 6d6f 6e69
- 0x1010: 746f 7269 6e67 206f 6620 796f 7572 2073
- 0x1020: 6572 7665 7220 7769 6c6c 2070 726f 7669
- 0x1030: 6465 2061 2062 6574 7465 7220 676c 6f62
- 0x1040: 616c 206f 7665 7276 6965 770a 6f66 2077
- 0x1050: 686f 2069 7320 7573 696e 6720 7768 6174
- 0x1060: 2061 6e64 2077 6865 7265 2c20 616e 6420
- 0x1070: 6974 2077 6f75 6c64 2067 6976 6520 4465
- 0x1080: 6269 616e 2061 2062 6574 7465 720a 6f76
- 0x1090: 6572 7669 6577 206f 6620 7468 6520 6170
- 0x10a0: 6163 6865 2070 6163 6b61 6765 2075 7361
- 0x10b0: 6765 2e0a 0a3c 4832 3e41 626f 7574 2074
- 0x10c0: 6869 7320 7061 6765 3c2f 4832 3e0a 0a3c
- 0x10d0: 494d 4720 414c 4947 4e3d 2272 6967 6874
- 0x10e0: 2220 414c 543d 2222 2048 4549 4748 543d
- 0x10f0: 2232 3437 2220 5749 4454 483d 2232 3738
- 0x1100: 2220 5352 433d 2269 636f 6e73 2f6a 6865
- 0x1110: 3036 312e 706e 6722 3e0a 0a3c 503e 5468
- 0x1120: 6973 2069 7320 6120 706c 6163 6568 6f6c
- 0x1130: 6465 7220 7061 6765 2069 6e73 7461 6c6c
- 0x1140: 6564 2062 7920 7468 6520 3c41 0a48 5245
- 0x1150: 463d 2268 7474 703a 2f2f 7777 772e 6465
- 0x1160: 6269 616e 2e6f 7267 2f22 3e44 6562 6961
- 0x1170: 6e3c 2f41 3e0a 7265 6c65 6173 6520 6f66
- 0x1180: 2074 6865 2061 7061 6368 6520 5765 6220
- 0x1190: 7365 7276 6572 2070 6163 6b61 6765 2e0a
- 0x11a0: 0a3c 503e 5468 6973 2063 6f6d 7075 7465
- 0x11b0: 7220 6861 7320 696e 7374 616c 6c65 6420
- 0x11c0: 7468 6520 4465 6269 616e 2047 4e55 2f4c
- 0x11d0: 696e 7578 206f 7065 7261 7469 6e67 2073
- 0x11e0: 7973 7465 6d2c 0a62 7574 2069 7420 6861
- 0x11f0: 7320 3c73 7472 6f6e 673e 6e6f 7468 696e
- 0x1200: 6720 746f 2064 6f20 7769 7468 2074 6865
- 0x1210: 2044 6562 6961 6e0a 5072 6f6a 6563 743c
- 0x1220: 2f73 7472 6f6e 673e 2e20 506c 6561 7365
- 0x1230: 2064 6f20 3c73 7472 6f6e 673e 6e6f 743c
- 0x1240: 2f73 7472 6f6e 673e 2063 6f6e 7461 6374
- 0x1250: 2074 6865 2044 6562 6961 6e0a 5072 6f6a
- 0x1260: 6563 7420 6162 6f75 7420 6974 2e3c 2f50
- 0x1270: 3e0a 0a3c 503e 4966 2079 6f75 2066 696e
- 0x1280: 6420 6120 6275 6720 696e 2074 6869 7320
- 0x1290: 6170 6163 6865 2070 6163 6b61 6765 2c20
- 0x12a0: 6f72 2069 6e20 4170 6163 6865 2069 7473
- 0x12b0: 656c 662c 0a70 6c65 6173 6520 6669 6c65
- 0x12c0: 2061 2062 7567 2072 6570 6f72 7420 6f6e
- 0x12d0: 2069 742e 2020 496e 7374 7275 6374 696f
- 0x12e0: 6e73 206f 6e20 646f 696e 6720 7468 6973
- 0x12f0: 2c20 616e 6420 7468 650a 6c69 7374 206f
- 0x1300: 6620 3c41 2048 5245 463d 2268 7474 703a
- 0x1310: 2f2f 6275 6773 2e64 6562 6961 6e2e 6f72
- 0x1320: 672f 7372 633a 6170 6163 6865 223e 6b6e
- 0x1330: 6f77 6e20 6275 6773 3c2f 413e 206f 6620
- 0x1340: 7468 6973 0a70 6163 6b61 6765 2c20 6361
- 0x1350: 6e20 6265 2066 6f75 6e64 2069 6e20 7468
- 0x1360: 6520 0a3c 4120 4852 4546 3d22 6874 7470
- 0x1370: 3a2f 2f77 7777 2e64 6562 6961 6e2e 6f72
- 0x1380: 672f 4275 6773 2f52 6570 6f72 7469 6e67
- 0x1390: 223e 4465 6269 616e 2042 7567 2054 7261
- 0x13a0: 636b 696e 6720 5379 7374 656d 3c2f 413e
- 0x13b0: 2e0a 0a3c 503e 5468 616e 6b73 2066 6f72
- 0x13c0: 2075 7369 6e67 2074 6869 7320 7061 636b
- 0x13d0: 6167 652c 2061 6e64 2063 6f6e 6772 6174
- 0x13e0: 756c 6174 696f 6e73 2066 6f72 2079 6f75
- 0x13f0: 7220 6368 6f69 6365 206f 660a 6120 4465
- 0x1400: 6269 616e 2073 7973 7465 6d21 3c2f 503e
- 0x1410: 0a0a 3c44 4956 2061 6c69 676e 3d22 6365
- 0x1420: 6e74 6572 223e 0a3c 6120 6872 6566 3d22
- 0x1430: 6874 7470 3a2f 2f77 7777 2e64 6562 6961
- 0x1440: 6e2e 6f72 672f 223e 0a3c 494d 4720 616c
- 0x1450: 6967 6e3d 226d 6964 646c 6522 2068 6569
- 0x1460: 6768 743d 2233 3022 2077 6964 7468 3d22
- 0x1470: 3235 2220 7372 633d 2269 636f 6e73 2f64
- 0x1480: 6562 6961 6e2f 6f70 656e 6c6f 676f 2d32
- 0x1490: 352e 6a70 6722 2061 6c74 3d22 4465 6269
- 0x14a0: 616e 223e 0a3c 2f61 3e0a 3c61 2068 7265
- 0x14b0: 663d 2268 7474 703a 2f2f 7777 772e 6170
- 0x14c0: 6163 6865 2e6f 7267 2f22 3e0a 3c49 4d47
- 0x14d0: 2061 6c69 676e 3d22 6d69 6464 6c65 2220
- 0x14e0: 6865 6967 6874 3d22 3332 2220 7769 6474
- 0x14f0: 683d 2232 3539 2220 7372 633d 2269 636f
- 0x1500: 6e73 2f61 7061 6368 655f 7062 2e70 6e67
- 0x1510: 2220 616c 743d 2241 7061 6368 6522 3e0a
- 0x1520: 3c2f 613e 0a3c 2f44 4956 3e0a 0a3c 212d
- 0x1530: 2d0a 2020 5468 6973 2070 6167 6520 7761
- 0x1540: 7320 696e 6974 6961 6c6c 7920 6372 6561
- 0x1550: 7465 6420 6279 204a 6f68 6e69 6520 496e
- 0x1560: 6772 616d 2028 6874 7470 3a2f 2f6e 6574
- 0x1570: 676f 642e 6e65 742f 290a 2020 4974 2077
- 0x1580: 6173 206c 6174 6572 2065 6469 7465 6420
- 0x1590: 6279 204d 6174 7468 6577 2057 696c 636f
- 0x15a0: 7820 616e 6420 4a6f 7369 7020 526f 6469
- 0x15b0: 6e2e 0a20 204c 6173 7420 6d6f 6469 6669
- 0x15c0: 6564 3a20 2444 6174 653a 2032 3030 342f
- 0x15d0: 3036 2f32 3020 3135 3a33 333a 3537 2024
- 0x15e0: 2e0a 2020 2d2d 3e0a 0a3c 2f42 4f44 593e
- 0x15f0: 0a3c 2f48 544d 4c3e 0a
-23:57:35.941260 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5560 win 12383 <nop,nop,timestamp 1306300953 1306300953>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500
- 0x0010: 0034 1b6e 4000 4006 2154 7f00 0001 7f00
- 0x0020: 0001 da70 0050 3758 8a49 377a a3a9 8010
- 0x0030: 305f 10ea 0000 0101 080a 4ddc 9219 4ddc
- 0x0040: 9219
-23:57:37.229575 IP 127.0.0.1.55920 > 127.0.0.1.80: F 203:203(0) ack 5560 win 12383 <nop,nop,timestamp 1306302241 1306300953>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500
- 0x0010: 0034 1b70 4000 4006 2152 7f00 0001 7f00
- 0x0020: 0001 da70 0050 3758 8a49 377a a3a9 8011
- 0x0030: 305f 0be1 0000 0101 080a 4ddc 9721 4ddc
- 0x0040: 9219
-23:57:37.230839 IP 127.0.0.1.80 > 127.0.0.1.55920: F 5560:5560(0) ack 204 win 8192 <nop,nop,timestamp 1306302243 1306302241>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500
- 0x0010: 0034 1fe8 4000 4006 1cda 7f00 0001 7f00
- 0x0020: 0001 0050 da70 377a a3a9 3758 8a4a 8011
- 0x0030: 2000 1735 0000 0101 080a 4ddc 9723 4ddc
- 0x0040: 9721
-23:57:37.230900 IP 127.0.0.1.55920 > 127.0.0.1.80: . ack 5561 win 12383 <nop,nop,timestamp 1306302243 1306302243>
- 0x0000: 0000 0000 0000 0000 0000 0000 0800 4500
- 0x0010: 0034 1b72 4000 4006 2150 7f00 0001 7f00
- 0x0020: 0001 da70 0050 3758 8a4a 377a a3aa 8010
- 0x0030: 305f 06d4 0000 0101 080a 4ddc 9723 4ddc
- 0x0040: 9723
diff --git a/contrib/tcpdump/tftp.h b/contrib/tcpdump/tftp.h
index 4408304..6285404 100644
--- a/contrib/tcpdump/tftp.h
+++ b/contrib/tcpdump/tftp.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/tftp.h,v 1.1.2.1 2007/09/14 01:03:12 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/tftp.h,v 1.1.4.1 2008-04-11 16:44:17 gianluca Exp $ (LBL) */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -49,7 +49,7 @@
#define WRQ 02 /* write request */
#define DATA 03 /* data packet */
#define ACK 04 /* acknowledgement */
-#define ERROR 05 /* error code */
+#define TFTP_ERROR 05 /* error code */
#define OACK 06 /* option acknowledgement */
struct tftphdr {
diff --git a/contrib/tcpdump/timed.h b/contrib/tcpdump/timed.h
index 0a5c5fe..15135e7 100644
--- a/contrib/tcpdump/timed.h
+++ b/contrib/tcpdump/timed.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/timed.h,v 1.5 2002/12/11 07:14:12 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/timed.h,v 1.5.6.1 2008-02-05 19:46:58 guy Exp $ (LBL) */
/*
* Copyright (c) 1983, 1993
* The Regents of the University of California. All rights reserved.
@@ -44,12 +44,17 @@
#define TSPVERSION 1
#define ANYADDR NULL
+struct tsp_timeval {
+ u_int32_t tv_sec;
+ u_int32_t tv_usec;
+};
+
struct tsp {
u_int8_t tsp_type;
u_int8_t tsp_vers;
u_int16_t tsp_seq;
union {
- struct timeval tspu_time;
+ struct tsp_timeval tspu_time;
int8_t tspu_hopcnt;
} tsp_u;
int8_t tsp_name[256];
diff --git a/contrib/tcpdump/token.h b/contrib/tcpdump/token.h
index e466c84..1525038 100644
--- a/contrib/tcpdump/token.h
+++ b/contrib/tcpdump/token.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/token.h,v 1.6 2002/12/11 07:14:12 guy Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/token.h,v 1.6 2002-12-11 07:14:12 guy Exp $ (LBL) */
/*
* Copyright (c) 1998, Larry Lile
* All rights reserved.
diff --git a/contrib/tcpdump/udp.h b/contrib/tcpdump/udp.h
index dedc9c1..fb45d68 100644
--- a/contrib/tcpdump/udp.h
+++ b/contrib/tcpdump/udp.h
@@ -1,4 +1,4 @@
-/* @(#) $Header: /tcpdump/master/tcpdump/udp.h,v 1.8.2.2 2007/03/28 07:45:46 hannes Exp $ (LBL) */
+/* @(#) $Header: /tcpdump/master/tcpdump/udp.h,v 1.13 2007-08-08 17:20:58 hannes Exp $ (LBL) */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
@@ -76,11 +76,15 @@ struct udphdr {
#define HSRP_PORT 1985 /*XXX*/
#define LMP_PORT 701 /* rfc4204 */
#define LWRES_PORT 921
+#define VQP_PORT 1589
#define ZEPHYR_SRV_PORT 2103
#define ZEPHYR_CLT_PORT 2104
#define MPLS_LSP_PING_PORT 3503 /* draft-ietf-mpls-lsp-ping-02.txt */
#define BFD_CONTROL_PORT 3784 /* draft-katz-ward-bfd-v4v6-1hop-00.txt */
#define BFD_ECHO_PORT 3785 /* draft-katz-ward-bfd-v4v6-1hop-00.txt */
+#define SFLOW_PORT 6343 /* http://www.sflow.org/developers/specifications.php */
+#define LWAPP_DATA_PORT 12222 /* draft-ohara-capwap-lwapp-04.txt */
+#define LWAPP_CONTROL_PORT 12223 /* draft-ohara-capwap-lwapp-04.txt */
#ifdef INET6
#define RIPNG_PORT 521 /*XXX*/
diff --git a/contrib/tcpdump/util.c b/contrib/tcpdump/util.c
index 912f6f3..6b723e5 100644
--- a/contrib/tcpdump/util.c
+++ b/contrib/tcpdump/util.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/util.c,v 1.95.2.6 2006/02/08 01:40:09 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/util.c,v 1.109 2007-01-29 09:59:42 hannes Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -44,6 +44,8 @@ static const char rcsid[] _U_ =
#include "interface.h"
+char * ts_format(register int, register int);
+
/*
* Print out a null-terminated filename (or other ascii string).
* If ep is NULL, assume no truncation check is needed.
@@ -139,6 +141,19 @@ fn_printzp(register const u_char *s, register u_int n,
}
/*
+ * Format the timestamp
+ */
+char *
+ts_format(register int sec, register int usec)
+{
+ static char buf[sizeof("00:00:00.000000")];
+ (void)snprintf(buf, sizeof(buf), "%02d:%02d:%02d.%06u",
+ sec / 3600, (sec % 3600) / 60, sec % 60, usec);
+
+ return buf;
+}
+
+/*
* Print the timestamp
*/
void
@@ -149,14 +164,14 @@ ts_print(register const struct timeval *tvp)
time_t Time;
static unsigned b_sec;
static unsigned b_usec;
+ int d_usec;
+ int d_sec;
switch (tflag) {
case 0: /* Default */
s = (tvp->tv_sec + thiszone) % 86400;
- (void)printf("%02d:%02d:%02d.%06u ",
- s / 3600, (s % 3600) / 60, s % 60,
- (unsigned)tvp->tv_usec);
+ (void)printf("%s ", ts_format(s, tvp->tv_usec));
break;
case 1: /* No time stamp */
@@ -169,22 +184,27 @@ ts_print(register const struct timeval *tvp)
break;
case 3: /* Microseconds since previous packet */
+ case 5: /* Microseconds since first packet */
if (b_sec == 0) {
- printf("000000 ");
- } else {
- int d_usec = tvp->tv_usec - b_usec;
- int d_sec = tvp->tv_sec - b_sec;
-
- while (d_usec < 0) {
- d_usec += 1000000;
- d_sec--;
- }
- if (d_sec)
- printf("%d. ", d_sec);
- printf("%06d ", d_usec);
- }
- b_sec = tvp->tv_sec;
- b_usec = tvp->tv_usec;
+ /* init timestamp for first packet */
+ b_usec = tvp->tv_usec;
+ b_sec = tvp->tv_sec;
+ }
+
+ d_usec = tvp->tv_usec - b_usec;
+ d_sec = tvp->tv_sec - b_sec;
+
+ while (d_usec < 0) {
+ d_usec += 1000000;
+ d_sec--;
+ }
+
+ (void)printf("%s ", ts_format(d_sec, d_usec));
+
+ if (tflag == 3) { /* set timestamp for last packet */
+ b_sec = tvp->tv_sec;
+ b_usec = tvp->tv_usec;
+ }
break;
case 4: /* Default + Date*/
@@ -194,10 +214,9 @@ ts_print(register const struct timeval *tvp)
if (!tm)
printf("Date fail ");
else
- printf("%04d-%02d-%02d ",
- tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday);
- printf("%02d:%02d:%02d.%06u ",
- s / 3600, (s % 3600) / 60, s % 60, (unsigned)tvp->tv_usec);
+ printf("%04d-%02d-%02d %s ",
+ tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
+ ts_format(s, tvp->tv_usec));
break;
}
}
@@ -297,11 +316,12 @@ tok2str(register const struct tok *lp, register const char *fmt,
/*
* Convert a bit token value to a string; use "fmt" if not found.
- * this is useful for parsing bitfields, the output strings are comma seperated
+ * this is useful for parsing bitfields, the output strings are seperated
+ * if the s field is positive.
*/
-char *
-bittok2str(register const struct tok *lp, register const char *fmt,
- register int v)
+static char *
+bittok2str_internal(register const struct tok *lp, register const char *fmt,
+ register int v, register int sep)
{
static char buf[256]; /* our stringbuffer */
int buflen=0;
@@ -318,7 +338,8 @@ bittok2str(register const struct tok *lp, register const char *fmt,
*/
if (tokval == (v&rotbit)) {
/* ok we have found something */
- buflen+=snprintf(buf+buflen, sizeof(buf)-buflen, "%s, ",lp->s);
+ buflen+=snprintf(buf+buflen, sizeof(buf)-buflen, "%s%s",
+ lp->s, sep ? ", " : "");
break;
}
rotbit=rotbit<<1; /* no match - lets shift and try again */
@@ -326,6 +347,11 @@ bittok2str(register const struct tok *lp, register const char *fmt,
lp++;
}
+ /* user didn't want string seperation - no need to cut off trailing seperators */
+ if (!sep) {
+ return (buf);
+ }
+
if (buflen != 0) { /* did we find anything */
/* yep, set the the trailing zero 2 bytes before to eliminate the last comma & whitespace */
buf[buflen-2] = '\0';
@@ -341,6 +367,28 @@ bittok2str(register const struct tok *lp, register const char *fmt,
}
/*
+ * Convert a bit token value to a string; use "fmt" if not found.
+ * this is useful for parsing bitfields, the output strings are not seperated.
+ */
+char *
+bittok2str_nosep(register const struct tok *lp, register const char *fmt,
+ register int v)
+{
+ return (bittok2str_internal(lp, fmt, v, 0));
+}
+
+/*
+ * Convert a bit token value to a string; use "fmt" if not found.
+ * this is useful for parsing bitfields, the output strings are comma seperated.
+ */
+char *
+bittok2str(register const struct tok *lp, register const char *fmt,
+ register int v)
+{
+ return (bittok2str_internal(lp, fmt, v, 1));
+}
+
+/*
* Convert a value to a string using an array; the macro
* tok2strary() in <interface.h> is the public interface to
* this function and ensures that the second argument is
@@ -509,7 +557,8 @@ read_infile(char *fname)
void
safeputs(const char *s, int maxlen)
{
- int idx = 0;
+ int idx = 0;
+
while (*s && idx < maxlen) {
safeputchar(*s);
idx++;
@@ -526,5 +575,5 @@ safeputchar(int c)
if (ch < 0x80 && isprint(ch))
printf("%c", ch);
else
- printf("\\%03o", ch);
+ printf("\\0x%02x", ch);
}
diff --git a/contrib/tcpdump/vfprintf.c b/contrib/tcpdump/vfprintf.c
index 354406c..6f8407a 100644
--- a/contrib/tcpdump/vfprintf.c
+++ b/contrib/tcpdump/vfprintf.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/vfprintf.c,v 1.6 2003/11/16 09:36:45 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/vfprintf.c,v 1.6 2003-11-16 09:36:45 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
OpenPOWER on IntegriCloud