Merge remote-tracking branch 'goog/master' into update_tcpdump

* goog/master:
  Get it to work on Android
  Merge remote-tracking branch 'goog/tcpdump'
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..6a39040
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,26 @@
+# manage core stuff for LF normalization
+core.autocrlf=true
+
+# Auto detect text files and perform LF normalization
+* text=auto
+
+# Custom for Visual Studio
+*.cs     diff=csharp
+*.sln    merge=union
+*.csproj merge=union
+*.vbproj merge=union
+*.fsproj merge=union
+*.dbproj merge=union
+
+# Standard to msysgit
+*.doc	 diff=astextplain
+*.DOC	 diff=astextplain
+*.docx diff=astextplain
+*.DOCX diff=astextplain
+*.dot  diff=astextplain
+*.DOT  diff=astextplain
+*.pdf  diff=astextplain
+*.PDF	 diff=astextplain
+*.rtf	 diff=astextplain
+*.RTF	 diff=astextplain
+#unix/linux stuff (tarballs)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1939ca6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,19 @@
+*.orig
+*.rej
+Makefile
+*~
+*.o
+config.h
+config.log
+config.cache
+config.status
+.devel
+os-proto.h
+stamp-h
+stamp-h.in
+tcpdump
+tcpdump.1
+tcpdump-*.tar.gz
+version.c
+failure-outputs.txt
+autom4te.cache/
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..fcad877
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,13 @@
+language: c
+
+env:
+  - BUILD_LIBPCAP=true
+
+before_script:
+  - sudo apt-get install libssl-dev libssl0.9.8 libssl1.0.0
+  - if [ $BUILD_LIBPCAP == "true" ]; then ( cd ../ && git clone git://github.com/the-tcpdump-group/libpcap.git && cd libpcap && ./configure && make ); else sudo apt-get install libpcap-dev; fi
+
+script:
+  - ./configure
+  - make
+  - make check
diff --git a/Android.mk b/Android.mk
index 932abc7..348d8b0 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,123 +1,40 @@
 LOCAL_PATH:= $(call my-dir)
 include $(CLEAR_VARS)
 
+tcpdump_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 in_cksum.c \
+	print-802_11.c print-802_15_4.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-bt.c print-calm-fast.c print-carp.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-forces.c print-fr.c \
+	print-geonet.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-ipnet.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-mptcp.c print-msdp.c \
+	print-msnlb.c print-nflog.c print-nfs.c print-ntp.c print-null.c \
+	print-olsr.c print-openflow.c print-openflow-1.0.c print-ospf.c \
+	print-pgm.c print-pim.c \
+	print-ppi.c print-ppp.c print-pppoe.c print-pptp.c \
+	print-radius.c print-raw.c print-rip.c print-rpki-rtr.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-tipc.c print-token.c print-udld.c print-udp.c \
+	print-usb.c print-vjc.c print-vqp.c print-vrrp.c print-vtp.c \
+	print-wb.c print-zephyr.c print-zeromq.c print-vxlan.c print-otv.c signature.c setsignal.c tcpdump.c util.c
+
+tcpdump_LIBNETDISSECT_SRC=print-isakmp.c
+tcpdump_LOCALSRC = print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c print-babel.c print-smb.c smbutil.c 
+tcpdump_GENSRC = version.c
+
 LOCAL_SRC_FILES:=\
-	addrtoname.c\
-	af.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-dhcp6.c\
-	print-decnet.c\
-	print-domain.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-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-nfs.c\
-	print-ntp.c\
-	print-null.c\
-	print-olsr.c\
-	print-ospf.c\
-	print-ospf6.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-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\
-	setsignal.c\
-	tcpdump.c\
-	util.c\
-	version.c\
-	print-smb.c\
-	smbutil.c\
-	missing/strlcat.c\
-	missing/strlcpy.c
+	$(tcpdump_CSRC) $(tcpdump_LIBNETDISSECT_SRC) $(tcpdump_LOCALSRC) $(tcpdump_GENSRC)
 
 LOCAL_CFLAGS := -O2 -g
 LOCAL_CFLAGS += -DHAVE_CONFIG_H -D_U_="__attribute__((unused))"
diff --git a/CHANGES b/CHANGES
index aa29e30..ee2efa4 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,20 +1,223 @@
-$Header: /tcpdump/master/tcpdump/CHANGES,v 1.87.2.17 2007/09/13 13:39:44 ken Exp $
+Wednesday Jan. 15, 2014 guy@alum.mit.edu
+  Summary for 4.5.2 tcpdump release
+	Man page fix
+	Fix crashes on SPARC
 
-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
+Monday Nov. 11, 2013 mcr@sandelman.ca
+  Summary for 4.5.1 tcpdump release
+	CREDITS file fixes
+
+Thursday Nov. 7, 2013  mcr@sandelman.ca and guy@alum.mit.edu.
+  Summary for 4.5.0 tcpdump release
+        some NFSv4 fixes for printing  
+        fix printing of unknown TCP options, and tcp fast-open
+        fixes for syslog parser
+        some gcc-version-specific flag tuning
+        adopt MacOS deprecation workarounds for openssl
+        improvements to babel printing
+        add OpenFlow 1.0 (no SSL) and test cases
+        GeoNet printer.
+        added STBC Rx support
+        improvements to DHCPv6 decoder
+        clarify which autoconf is needed
+	Point users to the the-tcpdump-group repository on GitHub rather
+	    than the mcr repository
+	Add MSDP printer.
+	Fixed IPv6 check on Solaris and other OSes requiring extra
+	    networking libraries.
+	Add support for VXLAN (draft-mahalingam-dutt-dcops-vxlan-03),
+	    and add "vxlan" as an option for -T.
+	Add support for OTV (draft-hasmit-otv-04).
+        fixes for DLT_IEEE802_11_RADIO datalink types
+        added MPTCP decoder
+
+Saturday April 6, 2013 guy@alum.mit.edu.
+  Summary for 4.4.0 tcpdump release
+	RPKI-RTR (RFC6810) is now official (TCP Port 323)
+	Fix detection of OpenSSL libcrypto.
+	Add DNSSL (RFC6106) support.
+	Add "radius" as an option for -T.
+	Update Action codes for handle_action function according to
+	    802.11s amendment.
+	Decode DHCPv6 AFTR-Name option (RFC6334).
+	Updates for Babel.
+	Fix printing of infinite lifetime in ICMPv6.
+	Added support for SPB, SPBM Service Identifier, and Unicast
+	    Address sub-TLV in ISIS.
+	Decode RIPv2 authentication up to RFC4822.
+	Fix RIP Request/full table decoding issues.
+	On Linux systems with cap-ng.h, drop root privileges
+	    using Linux Capabilities.
+	Add support for reading multiple files.
+	Add MS NLB heartbeat printer.
+	Separate multiple nexthops in BGP.
+
+Wednesday  November 28, 2012 guy@alum.mit.edu.
+  Summary for 4.3.1 tcpdump release
+	Print "LLDP, length N" for LLDP packets even when not in verbose
+	    mode, so something is printed even if only the timestamp is
+	    present
+	Document "-T carp"
+	Print NTP poll interval correctly (it's an exponent, so print
+	    both its raw value and 2^value)
+	Document that "-e" is used to get MAC addresses
+	More clearly document that you need to escape or quote
+	    backslashes in filter expressions on the command line
+	Fix some "the the" in the man page
+	Use the right maximum path length
+	Don't treat 192_1_2, when passed to -i, as an interface number
+
+Friday  April 3, 2012.  mcr@sandelman.ca.
+  Summary for 4.3.0 tcpdump release
+        fixes for forces: SPARSE data (per RFC 5810)
+        some more test cases added
+        updates to documentation on -l, -U and -w flags.
+        Fix printing of BGP optional headers.
+        Tried to include DLT_PFSYNC support, failed due to headers required.
+        added TIPC support.
+        Fix LLDP Network Policy bit definitions.
+        fixes for IGMPv3's Max Response Time: it is in units of 0.1 second.
+        SIGUSR1 can be used rather than SIGINFO for stats
+        permit -n flag to affect print-ip for protocol numbers
+        ND_OPT_ADVINTERVAL is in milliseconds, not seconds
+        Teach PPPoE parser about RFC 4638
+
+
+Friday  December 9, 2011.  guy@alum.mit.edu.
+  Summary for 4.2.1 tcpdump release
+	Only build the Babel printer if IPv6 is enabled.
+	Support Babel on port 6696 as well as 6697.
+	Include ppi.h in release tarball.
+	Include all the test files in the release tarball, and don't
+	 "include" test files that no longer exist.
+	Don't assume we have <rpc/rpc.h> - check for it.
+	Support "-T carp" as a way of dissecting IP protocol 112 as CARP
+	 rather than VRRP.
+	Support Hilscher NetAnalyzer link-layer header format.
+	Constify some pointers and fix compiler warnings.
+	Get rid of never-true test.
+	Fix an unintended fall-through in a case statement in the ARP
+	 printer.
+	Fix several cases where sizeof(sizeof(XXX)) was used when just
+	 sizeof(XXX) was intended.
+	Make stricter sanity checks in the ES-IS printer.
+	Get rid of some GCCisms that caused builds to fai with compilers
+	 that don't support them.
+	Fix typo in man page.
+	Added length checks to Babel printer.
+
+Sunday  July 24, 2011.  mcr@sandelman.ca.
+  Summary for 4.2.+
+	merged 802.15.4 decoder from Dmitry Eremin-Solenikov <dbaryshkov
+	  at gmail dot com>
+        updates to forces for new port numbers
+        Use "-H", not "-h", for the 802.11s option. (-h always help)
+        Better ICMPv6 checksum handling.
+        add support for the RPKI/Router Protocol, per -ietf-sidr-rpki-rtr-12
+        get rid of uuencoded pcap test files, git can do binary.
+        sFlow changes for 64-bit counters.
+        fixes for PPI packet header handling and printing.
+        Add DCB Exchange protocol (DCBX) version 1.01.
+        Babel dissector, from Juliusz Chroboczek and Grégoire Henry.
+        improvements to radiotap for rate values > 127.
+        Many improvements to ForCES decode, including fix SCTP TML port
+        updated RPL type code to RPL-17 draft
+        Improve printout of DHCPv6 options.
+        added support and test case for QinQ (802.1q VLAN) packets
+        Handle DLT_IEEE802_15_4_NOFCS like DLT_IEEE802_15_4.
+        Build fixes for Sparc and other machines with alignment restrictions.
+        Merged changes from Debian package.
+        PGM: Add ACK decoding and add PGMCC DATA and FEEDBACK options.
+        Build fixes for OSX (Snow Leopard and others)
+        Add support for IEEE 802.15.4 packets
+
+Tue.    July 20, 2010.  guy@alum.mit.edu.
+  Summary for 4.1.2 tcpdump release
+	If -U is specified, flush the file after creating it, so it's
+	  not zero-length
+	Fix TCP flags output description, and some typoes, in the man
+	  page
+	Add a -h flag, and only attempt to recognize 802.11s mesh
+	  headers if it's set
+	When printing the link-layer type list, send *all* output to
+	  stderr
+	Include the CFLAGS setting when configure was run in the
+	  compiler flags
+
+Thu.	April 1, 2010.  guy@alum.mit.edu.
+  Summary for 4.1.1 tcpdump release
+	Fix build on systems with PF, such as FreeBSD and OpenBSD.
+	Don't blow up if a zero-length link-layer address is passed to
+	  linkaddr_string(). 
+
+Thu.	March 11, 2010.  ken@netfunctional.ca/guy@alum.mit.edu.
+  Summary for 4.1.0 tcpdump release
+	Fix printing of MAC addresses for VLAN frames with a length
+	  field
+	Add some additional bounds checks and use the EXTRACT_ macros
+	  more
+	Add a -b flag to print the AS number in BGP packets in ASDOT
+	  notation rather than ASPLAIN notation
+	Add ICMPv6 RFC 5006 support
+	Decode the access flags in NFS access requests
+	Handle the new DLT_ for memory-mapped USB captures on Linux
+	Make the default snapshot (-s) the maximum
+	Print name of device (when -L is used)
+	Support for OpenSolaris (and SXCE build 125 and later)
+	Print new TCP flags
+	Add support for RPL DIO
+	Add support for TCP User Timeout (UTO)
+	Add support for non-standard Ethertypes used by 3com PPPoE gear
+	Add support for 802.11n and 802.11s
+	Add support for Transparent Ethernet Bridge ethertype in GRE
+	Add 4 byte AS support for BGP printer
+	Add support for the MDT SAFI 66 BG printer
+	Add basic IPv6 support to print-olsr
+	Add USB printer
+	Add printer for ForCES
+	Handle frames with an FCS
+	Handle 802.11n Control Wrapper, Block Acq Req and Block Ack frames
+	Fix TCP sequence number printing 
+	Report 802.2 packets as 802.2 instead of 802.3
+	Don't include -L/usr/lib in LDFLAGS
+	On x86_64 Linux, look in lib64 directory too
+	Lots of code clean ups
+	Autoconf clean ups
+	Update testcases to make output changes
+	Fix compiling with/out smi (--with{,out}-smi)
+	Fix compiling without IPv6 support (--disable-ipv6)
+
+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/CREDITS b/CREDITS
index d327880..2abe0fa 100644
--- a/CREDITS
+++ b/CREDITS
@@ -1,151 +1,223 @@
 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>
+    Denis Ovsienko                <infrastation at yandex dot ru>
+    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>
-	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>
-	Yen Yen Lim
-	Yoshifumi Nishida
+    Aaron Campbell                <aaron at arbor dot net>
+    A Costa                       <agcosta at gis dot net>
+    Albert Chin                   <china at thewrittenword dot com>
+    Alexandra Kossovsky           <alexandra1975 at sourceforge dot net>
+    Alfredo Andres                <aandres at s21sec 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 Nording                <andrew at nording dot ru>
+    Andrew Tridgell               <tridge at linuxcare dot com>
+    Andy Heffernan                <ahh at juniper dot net>
+    Anton Bernal                  <anton 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>
+    Atsushi Onoe                  <onoe at netbsd dot org>
+    Ben Byer                      <bushing at sourceforge dot net>
+    Ben Smithurst                 <ben at scientia dot demon dot co dot uk>
+    Bert Vermeulen                <bert at biot dot com>
+    Bjoern A. Zeeb                <bzeeb at Zabbadoz dot NeT>
+    Bram                          <tcpdump at mail dot wizbit dot be>
+    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>
+    Charles M. Hannum             <mycroft at netbsd dot org>
+    Charlie Lenahan               <clenahan at fortresstech dot com>
+    Chris Cogdon                  <chris at cogdon dot org>
+    Chris G. Demetriou            <cgd at netbsd dot org>
+    Chris Jepeway                 <jepeway at blasted-heath dot com>
+    Chris Larson                  <clarson at kergoth dot com>
+    Christian Sievers             <c_s at users dot sourceforge dot net>
+    Christophe Rhodes             <csr21 at cantab dot net>
+    Cliff Frey                    <cliff at meraki 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 Horn                    <dhorn2000 at gmail dot com>
+    David Smith                   <dsmith at redhat dot com>
+    David Young                   <dyoung at ojctech dot com>
+    Dmitrij Tejblum               <tejblum at yandex-team dot ru>
+    Dmitry Eremin-Solenikov       <dbaryshkov at gmail dot com>
+    Don Ebright                   <Don dot Ebright at compuware dot com>
+    Eddie Kohler                  <xexd at sourceforge dot net>
+    Elmar Kirchner                <elmar at juniper dot net>
+    Fang Wang                     <fangwang at sourceforge dot net>
+    Florent Drouin                <Florent dot Drouin at alcatel-lucent dot fr>
+    Florian Forster               <octo at verplant dot org>
+    fra                           <foo at bar dot baz>
+    Francesco Fondelli            <francesco dot fondelli at gmail dot com>
+    Francisco Matias Cuenca-Acuna <mcuenca at george dot rutgers dot edu>
+    Francis Dupont                <Francis dot Dupont at enst-bretagne dot fr>
+    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>
+    Gilbert Ramirez Jr.           <gram at xiexie dot org>
+    Gisle Vanem                   <gvanem at broadpark dot no>
+    Greg Minshall                 <minshall at acm dot org>
+    Grégoire Henry                <henry at pps dot jussieu dot fr>
+    Gregory Detal                 <gregory dot detal at uclouvain dot be>
+    Greg Stark                    <gsstark at mit dot edu>
+    Hank Leininger                <tcpdump-workers at progressive-comp dot com>
+    Hannes Viertel                <hviertel at juniper dot net>
+    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>
+    Ilpo Järvinen                 <ilpo dot jarvinen at helsinki dot fi>
+    Jacek Tobiasz                 <Jacek dot Tobiasz at atm dot com dot pl>
+    Jakob Schlyter                <jakob at openbsd dot org>
+    Jamal Hadi Salim              <hadi at cyberus dot ca>
+    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>
+    João Medeiros                 <ignotus21 at sourceforge dot net>
+    Joerg Mayer                   <jmayer at loplof dot de>
+    Jonathan Heusser              <jonny at drugphish dot ch>
+    Jorge Boncompte [DTI2]        <jorge at dti2 dot net>
+    Jørgen Thomsen                <jth at jth dot net>
+    Julian Cowley                 <julian at lava dot net>
+    Juliusz Chroboczek            <jch at pps dot jussieu dot fr>
+    Kaarthik Sivakumar            <kaarthik at torrentnet dot com>
+    Kaladhar Musunuru             <kaladharm at sourceforge dot net>
+    Karl Norby                    <karl-norby at sourceforge dot net>
+    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>
+    Kenichi Maehashi              <webmaster at kenichimaehashi dot com>
+    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>
+    Longinus00                    <Longinus00 at gmail dot com>
+    Loris Degioanni               <loris at netgroup-serv dot polito dot it>
+    Love Hörnquist-Åstrand        <lha at stacken dot kth dot se>
+    Lucas C. Villa Real           <lucasvr at us dot ibm dot com>
+    Luis MartinGarcia             <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 Abramowitz               <marc at marc-abramowitz dot com>
+    Marc A. Lehmann               <pcg at goof dot com>
+    Marc Binderberger             <mbind at sourceforge dot net>
+    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 Riepe                 <too-tired at sourceforge dot net>
+    Michael Shalayeff             <mickey at openbsd dot org>
+    Michael Shields               <shields at msrl dot com>
+    Michael T. Stolarchuk         <mts at off dot to>
+    Michal Sekletar               <msekleta at redhat dot com>
+    Michele "mydecay" Marchetto   <smarchetto1 at tin dot it>
+    Mike Frysinger                <vapier at gmail dot com>
+    Minto Jeyananth               <minto at juniper dot net>
+    Monroe Williams               <monroe at pobox dot com>
+    Motonori Shindo               <mshindo at mshindo dot net>
+    Nathaniel Couper-Noles        <Nathaniel at isi1 dot tccisi dot com>
+    Nathan J. Williams            <nathanw at MIT dot EDU>
+    Neil T. Spring                <bluehal at users dot sourceforge dot net>
+    Nickolai Zeldovich            <kolya at MIT dot EDU>
+    Nicolas Ferrero               <toorop at babylo dot net>
+    Niels Provos                  <provos at openbsd dot org>
+    Noritoshi Demizu              <demizu at users dot sourceforge dot net>
+    Olaf Kirch                    <okir at caldera dot de>
+    Ola Martin Lykkja             <ola dot lykkja at q-free dot com>
+    Oleksij Rempel                <linux at rempel-privat 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 Ferrell                  <pflarr at sourceforge 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>
+    Pawel Worach                  <pawel dot worach at gmail dot com>
+    Pekka Savola                  <pekkas at netcore dot fi>
+    Petar Alilovic                <petar dot alilovic at gmail dot com>
+    Peter Fales                   <peter at fales-lorenz dot net>
+    Peter Jeremy                  <peter dot jeremy at alcatel dot com dot au>
+    Peter Volkov                  <pva at gentoo dot org>
+                                  <pfhunt at users dot sourceforge dot net>
+    Phil Wood                     <cpw at lanl dot gov>
+    Rafal Maszkowski              <rzm at icm dot edu dot pl>
+    Randy Sofia                   <rsofia at users dot sourceforge dot net>
+    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>
+    Robert Edmonds                <stu-42 at sourceforge dot net>
+    Roderick Schertler            <roderick at argon dot org>
+    Romain Francoise              <rfrancoise at debian dot org>
+    Ruben Kerkhof                 <ruben at rubenkerkhof dot com>
+    Sagun Shakya                  <sagun dot shakya at sun dot com>
+    Sami Farin                    <safari at iki dot fi>
+    Scott Mcmillan                <scott dot a dot mcmillan at intel dot com>
+    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>
+    Simon Ruderich                <simon at ruderich dot org>
+    Steinar Haug                  <sthaug at nethelp dot no>
+    Stephane Bortzmeyer           <stephane+github at bortzmeyer dot org>
+    Swaminathan Chandrasekaran    <chander at juniper dot net>
+    Takashi Yamamoto              <yamt at mwd dot biglobe dot ne dot jp>
+    Tatuya Jinmei                 <jinmei at kame dot net>
+    Terry Kennedy                 <terry at tmk dot com>
+    Thomas Jacob                  <jacob at internet24 dot de>
+    Timo Koskiahde
+    Tony Li                       <tli at procket dot com>
+    Toshihiro Kanda               <candy at fct dot kgc dot co dot jp>
+    Udayakumar                    <udaya011 at gmail dot com>
+    Uns Lider                     <unslider at miranda dot org>
+    Victor Oppleman               <oppleman at users dot sourceforge dot net>
+    Weesan Lee                    <weesan at juniper dot net>
+    Wesley Griffin                <wgriffin at users dot sourceforge dot net>
+    Wesley Shields                <wxs at FreeBSD dot org>
+    Wilbert de Graaf              <wilbertdg at hetnet dot nl>
+    Will Drewry                   <will at alum dot bu dot edu>
+    William J. Hulley             <bill dot hulley at gmail dot com>
+    Wim Torfs                     <wtorfs at gmail dot com>
+    Yen Yen Lim
+    Yoshifumi Nishida
 
 The original LBL crew:
-	Steve McCanne
-	Craig Leres
-	Van Jacobson
+    Steve McCanne
+    Craig Leres
+    Van Jacobson
+
+Past maintainers:
+    Jun-ichiro itojun Hagino         <itojun at iijlab dot net>		Also see: http://www.wide.ad.jp/itojun-award/
diff --git a/FILES b/FILES
deleted file mode 100644
index 4e2afa2..0000000
--- a/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/INSTALL b/INSTALL.txt
similarity index 97%
rename from INSTALL
rename to INSTALL.txt
index 745997f..a03e2c0 100644
--- a/INSTALL
+++ b/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.2 2008-02-06 10:47:53 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 @@
 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-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-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
@@ -219,6 +221,7 @@
 print-timed.c	- BSD time daemon protocol printer routines
 print-token.c	- Token Ring printer routines
 print-udp.c	- UDP printer routines
+print-usb.c	- USB printer routines
 print-vjc.c	- PPP Van Jacobson compression (RFC1144) printer routines
 print-vrrp.c	- Virtual Router Redundancy Protocol
 print-wb.c	- White Board printer routines
diff --git a/Makefile-devel-adds b/Makefile-devel-adds
index 512a119..7bf6420 100644
--- a/Makefile-devel-adds
+++ b/Makefile-devel-adds
@@ -2,12 +2,12 @@
 # Auto-regenerate configure script or Makefile when things change.
 # From autoconf.info .  Works best with GNU Make.
 #
-${srcdir}/configure: configure.in
+${srcdir}/configure: configure.in aclocal.m4
 	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
+${srcdir}/stamp-h.in: configure.in aclocal.m4
 	cd ${srcdir} && autoheader
 	echo timestamp > ${srcdir}/stamp-h.in
 
diff --git a/Makefile.in b/Makefile.in
index dcc8f40..eb27a7a 100644
--- a/Makefile.in
+++ b/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.325 2008-11-21 23:17:26 guy Exp $ (LBL)
 
 #
 # Various configurable paths (remember to edit Makefile.in, not Makefile)
@@ -26,6 +26,7 @@
 # Top level hierarchy
 prefix = @prefix@
 exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
 # Pathname of directory to install the binary
 sbindir = @sbindir@
 # Pathname of directory to install the man page
@@ -40,13 +41,15 @@
 #
 
 CC = @CC@
+MKDEP = @MKDEP@
 PROG = tcpdump
 CCOPT = @V_CCOPT@
 INCLS = -I. @V_INCLS@
 DEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@
 
 # Standard CFLAGS
-CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
+CFLAGS = @CFLAGS@
+FULL_CFLAGS = $(CCOPT) $(DEFS) $(INCLS) $(CFLAGS)
 
 # Standard LDFLAGS
 LDFLAGS = @LDFLAGS@
@@ -57,53 +60,139 @@
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
+RANLIB = @RANLIB@
+
+DEPENDENCY_CFLAG = @DEPENDENCY_CFLAG@
 
 # 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
 # problem if you don't own the file but can write to the directory.
 .c.o:
 	@rm -f $@
-	$(CC) $(CFLAGS) -c $(srcdir)/$*.c
+	$(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
 
-CSRC =	addrtoname.c af.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 \
+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 in_cksum.c \
+	print-802_11.c print-802_15_4.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-bt.c print-calm-fast.c print-carp.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-dvmrp.c print-enc.c print-egp.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-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-esp.c print-ether.c print-fddi.c print-forces.c print-fr.c \
+	print-geonet.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-ipnet.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-mptcp.c print-msdp.c \
+	print-msnlb.c print-nflog.c print-nfs.c print-ntp.c print-null.c \
+	print-olsr.c print-openflow.c print-openflow-1.0.c print-ospf.c \
+	print-pgm.c print-pim.c \
+	print-ppi.c print-ppp.c print-pppoe.c print-pptp.c \
+	print-radius.c print-raw.c print-rip.c print-rpki-rtr.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-wb.c print-zephyr.c setsignal.c tcpdump.c util.c
+	print-timed.c print-tipc.c print-token.c print-udld.c print-udp.c \
+	print-usb.c print-vjc.c print-vqp.c print-vrrp.c print-vtp.c \
+	print-wb.c print-zephyr.c print-zeromq.c print-vxlan.c print-otv.c signature.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 = \
+	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 \
+	ipnet.h \
+	ipproto.h \
+	ipsec_doi.h \
+	ipx.h \
+	isakmp.h \
+	l2tp.h \
+	l2vpn.h \
+	lane.h \
+	llc.h \
+	machdep.h \
+	mib.h \
+	mpls.h \
+	mptcp.h \
+	nameser.h \
+	netbios.h \
+	netdissect.h \
+	nfs.h \
+	nfsfh.h \
+	nlpid.h \
+	ntp.h \
+	oakley.h \
+	openflow.h \
+	ospf.h \
+	ospf6.h \
+	oui.h \
+	pcap-missing.h \
+	pmap_prot.h \
+	ppi.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
+	signature.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,49 +209,131 @@
 
 CLEANFILES = $(PROG) $(OBJ) $(GENSRC)
 
+EXTRA_DIST = \
+	CHANGES \
+	CREDITS \
+	INSTALL.txt \
+	LICENSE \
+	Makefile.in \
+	Makefile-devel-adds \
+	README.md \
+	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/dlnames.c \
+	missing/datalinks.c \
+	missing/getnameinfo.c \
+	missing/inet_aton.c \
+	missing/inet_ntop.c \
+	missing/inet_pton.c \
+	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-babel.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.in \
+	vfprintf.c \
+	win32/Include/bittypes.h \
+	win32/Include/errno.h \
+	win32/Include/getopt.h \
+	win32/Include/w32_fzs.h \
+	win32/Src/getopt.c \
+	win32/prj/GNUmakefile \
+	win32/prj/WinDump.dsp \
+	win32/prj/WinDump.dsw
+
+TEST_DIST= `find tests \( -name 'DIFF' -prune \) -o \( -name NEW -prune \) -o -type f \! -name '.*' \! -name '*~' -print`
+
 all: $(PROG)
 
 $(PROG): $(OBJ) @V_PCAPDEP@
 	@rm -f $@
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
+	$(CC) $(FULL_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
+	$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
 dlnames.o: $(srcdir)/missing/dlnames.c
-	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
+	$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
 getnameinfo.o: $(srcdir)/missing/getnameinfo.c
-	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c
+	$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c
 getaddrinfo.o: $(srcdir)/missing/getaddrinfo.c
-	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c
+	$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c
 inet_pton.o: $(srcdir)/missing/inet_pton.c
-	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c
+	$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c
 inet_ntop.o: $(srcdir)/missing/inet_ntop.c
-	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c
+	$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c
 inet_aton.o: $(srcdir)/missing/inet_aton.c
-	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c
+	$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c
 snprintf.o: $(srcdir)/missing/snprintf.c
-	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
+	$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
 strlcat.o: $(srcdir)/missing/strlcat.c
-	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
+	$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
 strlcpy.o: $(srcdir)/missing/strlcpy.c
-	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
+	$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
 strsep.o: $(srcdir)/missing/strsep.c
-	$(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
+	$(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
 
 version.o: version.c
-	$(CC) $(CFLAGS) -c version.c
+	$(CC) $(FULL_CFLAGS) -c version.c
 
 version.c: $(srcdir)/VERSION
 	@rm -f $@
-	sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
+	if grep GIT ${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/.*/const 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
+	$(INSTALL_DATA) $(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
 
 uninstall:
 	rm -f $(DESTDIR)$(sbindir)/$(PROG)
@@ -174,19 +345,31 @@
 	    grep -v 'possible pointer alignment problem'
 
 clean:
-	rm -f $(CLEANFILES)
+	rm -f $(CLEANFILES) $(PROG)-`cat VERSION`.tar.gz
 
 distclean:
 	rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
-	    config.h gnuc.h os-proto.h stamp-h stamp-h.in
+	    config.h gnuc.h os-proto.h stamp-h stamp-h.in $(PROG).1
+	rm -rf autom4te.cache
+
+check: tcpdump
+	(cd tests && ./TESTrun.sh)
 
 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) $(TEST_DIST) | (cd $$name; tar xf -); \
+	   tar -c -z -f $$name.tar.gz $$name; \
+	   rm -rf $$name
+
+testlist:
+	echo $(TEST_DIST)
 
 depend: $(GENSRC)
-	${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
+	$(MKDEP) -c $(CC) -m $(DEPENDENCY_CFLAG) $(DEFS) $(INCLS) $(SRC)
diff --git a/NOTICE b/NOTICE
deleted file mode 100644
index dea5f7d..0000000
--- a/NOTICE
+++ /dev/null
@@ -1,19 +0,0 @@
-License: BSD
- 
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-  
-  1. Redistributions of source code must retain the above copyright
-     notice, this list of conditions and the following disclaimer.
-  2. Redistributions in binary form must reproduce the above copyright
-     notice, this list of conditions and the following disclaimer in
-     the documentation and/or other materials provided with the
-     distribution.
-  3. The names of the authors 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.
diff --git a/PLATFORMS b/PLATFORMS
index 2e1aedf..03bfed7 100644
--- a/PLATFORMS
+++ b/PLATFORMS
@@ -1,6 +1,6 @@
 == Tested platforms ==
-NetBSD 		1.5/i386	(mcr - 2002/1/1)	
-Debian Linux (woody/i386)	(mcr - 2002/1/1)
+NetBSD 		  5.1/i386	(mcr - 2012/4/1)	
+Debian Linux (squeeze/i386)	(mcr - 2012/4/1)
 
 ---
 RedHat Linux 	6.1/i386	(assar)
diff --git a/README b/README.md
similarity index 84%
rename from README
rename to README.md
index cb51d30..e9fd5a8 100644
--- a/README
+++ b/README.md
@@ -1,31 +1,35 @@
-@(#) $Header: /tcpdump/master/tcpdump/README,v 1.65.2.1 2007/09/14 01:03:12 guy Exp $ (LBL)
+# tcpdump
 
-TCPDUMP 3.9
-Now maintained by "The Tcpdump Group"
-See 		www.tcpdump.org
+[![Build
+Status](https://travis-ci.org/the-tcpdump-group/tcpdump.png)](https://travis-ci.org/the-tcpdump-group/tcpdump)
 
-Please send inquiries/comments/reports to 	tcpdump-workers@tcpdump.org
+TCPDUMP 4.x.y  
+Now maintained by "The Tcpdump Group"  
+See 		www.tcpdump.org  
 
-Anonymous CVS is available via:
-	cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master login
-	(password "anoncvs")
-	cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master checkout tcpdump
+Please send inquiries/comments/reports to:
 
-Version 3.9 of TCPDUMP can be retrieved with the CVS tag "tcpdump_3_9rel1":
-	cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master checkout -r tcpdump_3_9rel1 tcpdump
+* tcpdump-workers@lists.tcpdump.org
 
-Please submit patches against the master copy to the tcpdump project on
-sourceforge.net.
+Anonymous Git is available via:
 
-formerly from 	Lawrence Berkeley National Laboratory
-		Network Research Group <tcpdump@ee.lbl.gov>
-		ftp://ftp.ee.lbl.gov/tcpdump.tar.Z (3.4)
+	git clone git://bpf.tcpdump.org/tcpdump
+
+Please submit patches by forking the branch on GitHub at:
+
+*	http://github.com/the-tcpdump-group/tcpdump/tree/master
+
+and issuing a pull request.
+
+formerly from 	Lawrence Berkeley National Laboratory  
+		Network Research Group <tcpdump@ee.lbl.gov>  
+		ftp://ftp.ee.lbl.gov/old/tcpdump.tar.Z (3.4)
 
 This directory contains source code for tcpdump, a tool for network
 monitoring and data acquisition.  This software was originally
 developed by the Network Research Group at the Lawrence Berkeley
 National Laboratory.  The original distribution is available via
-anonymous ftp to ftp.ee.lbl.gov, in tcpdump.tar.Z.  More recent
+anonymous ftp to `ftp.ee.lbl.gov`, in `tcpdump.tar.Z`.  More recent
 development is performed at tcpdump.org, http://www.tcpdump.org/
 
 Tcpdump uses libpcap, a system-independent interface for user-level
@@ -34,7 +38,7 @@
 tcpdump.org; see http://www.tcpdump.org/ .
 
 Once libpcap is built (either install it or make sure it's in
-../libpcap), you can build tcpdump using the procedure in the INSTALL
+`../libpcap`), you can build tcpdump using the procedure in the `INSTALL.txt`
 file.
 
 The program is loosely based on SMI's "etherfind" although none of the
@@ -48,44 +52,47 @@
 
 Over the past few years, tcpdump has been steadily improved by the
 excellent contributions from the Internet community (just browse
-through the CHANGES file).  We are grateful for all the input.
+through the `CHANGES` file).  We are grateful for all the input.
 
 Richard Stevens gives an excellent treatment of the Internet protocols
-in his book ``TCP/IP Illustrated, Volume 1''. If you want to learn more
+in his book *"TCP/IP Illustrated, Volume 1"*. If you want to learn more
 about tcpdump and how to interpret its output, pick up this book.
 
 Some tools for viewing and analyzing tcpdump trace files are available
 from the Internet Traffic Archive:
 
-	http://www.acm.org/sigcomm/ITA/
+* http://www.acm.org/sigcomm/ITA/
 
 Another tool that tcpdump users might find useful is tcpslice:
 
-	ftp://ftp.ee.lbl.gov/tcpslice.tar.Z
+* https://github.com/the-tcpdump-group/tcpslice
 
 It is a program that can be used to extract portions of tcpdump binary
 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 GitHub issue
+tracker for tcpdump at:
 
-	http://sourceforge.net/projects/tcpdump/
+* https://github.com/the-tcpdump-group/tcpdump/issues
 
 Source code contributions, etc. should be sent to the email address
-"patches@tcpdump.org", or submitted as patches on the SourceForge site
-for tcpdump.
+above or submitted by forking the branch on GitHub at:
 
-Current versions can be found at www.tcpdump.org, or the SourceForge
-site for tcpdump.
+* http://github.com/the-tcpdump-group/tcpdump/tree/master
+
+and issuing a pull request.
+
+Current versions can be found at www.tcpdump.org.
 
  - The TCPdump team
 
 original text by: Steve McCanne, Craig Leres, Van Jacobson
 
 -------------------------------------
+```
 This directory also contains some short awk programs intended as
 examples of ways to reduce tcpdump data when you're tracking
 particular network problems:
@@ -233,3 +240,4 @@
   - Once a week, tell your funding agent that you're discovering
     wonderful things and you'll write up that research report
     "real soon now".
+```
diff --git a/Readme.Win32 b/Readme.Win32
new file mode 100644
index 0000000..fdf8b12
--- /dev/null
+++ b/Readme.Win32
@@ -0,0 +1,24 @@
+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/VERSION b/VERSION
index 26cb485..4404a17 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.9.8
+4.5.1
diff --git a/acconfig.h b/acconfig.h
deleted file mode 100644
index f28d52c..0000000
--- a/acconfig.h
+++ /dev/null
@@ -1,136 +0,0 @@
-/* "generated automatically" means DO NOT MAKE CHANGES TO config.h.in --
- * make them to acconfig.h and rerun autoheader */
-@TOP@
-
-/* Define if you have SSLeay 0.9.0b with the buggy cast128. */
-#undef HAVE_BUGGY_CAST128
-
-/* Define if you enable IPv6 support */
-#undef INET6
-
-/* Define if you enable support for the libsmi. */
-#undef LIBSMI
-
-/* Define if you have the <smi.h> header file.  */
-#undef HAVE_SMI_H
-
-/* define if you have struct __res_state_ext */
-#undef HAVE_RES_STATE_EXT
-
-/* define if your struct __res_state has the nsort member */
-#undef HAVE_NEW_RES_STATE
-
-/*
- * define if struct ether_header.ether_dhost is a struct with ether_addr_octet
- */
-#undef ETHER_HEADER_HAS_EA
-
-/* define if struct ether_arp contains arp_xsha */
-#undef ETHER_ARP_HAS_X
-
-/* define if you have the addrinfo function. */
-#undef HAVE_ADDRINFO
-
-/* define if you need to include missing/addrinfoh.h. */
-#undef NEED_ADDRINFO_H
-
-/* define ifyou have the h_errno variable. */
-#undef HAVE_H_ERRNO
-
-/* define if IN6ADDRSZ is defined (XXX not used!) */
-#undef HAVE_IN6ADDRSZ
-
-/* define if INADDRSZ is defined (XXX not used!) */
-#undef HAVE_INADDRSZ
-
-/* define if this is a development version, to use additional prototypes. */
-#undef HAVE_OS_PROTO_H
-
-/* define if <unistd.h> defines __P() */
-#undef HAVE_PORTABLE_PROTOTYPE
-
-/* define if RES_USE_INET6 is defined */
-#undef HAVE_RES_USE_INET6
-
-/* define if struct sockaddr has the sa_len member */
-#undef HAVE_SOCKADDR_SA_LEN
-
-/* define if you have struct sockaddr_storage */
-#undef HAVE_SOCKADDR_STORAGE
-
-/* define if you have both getipnodebyname() and getipnodebyaddr() */
-#undef USE_GETIPNODEBY
-
-/* define if you have ether_ntohost() and it works */
-#undef USE_ETHER_NTOHOST
-
-/* define if libpcap has pcap_version */
-#undef HAVE_PCAP_VERSION
-
-/* define if libpcap has pcap_debug */
-#undef HAVE_PCAP_DEBUG
-
-/* define if libpcap has yydebug */
-#undef HAVE_YYDEBUG
-
-/* define if libpcap has pcap_list_datalinks() */
-#undef HAVE_PCAP_LIST_DATALINKS
-
-/* define if libpcap has pcap_set_datalink() */
-#undef HAVE_PCAP_SET_DATALINK
-
-/* define if libpcap has pcap_datalink_name_to_val() */
-#undef HAVE_PCAP_DATALINK_NAME_TO_VAL
-
-/* define if libpcap has pcap_datalink_val_to_description() */
-#undef HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION
-
-/* define if libpcap has pcap_dump_ftell() */
-#undef HAVE_PCAP_DUMP_FTELL
-
-/* define if you have getrpcbynumber() */
-#undef HAVE_GETRPCBYNUMBER
-
-/* define if unaligned memory accesses fail */
-#undef LBL_ALIGN
-
-/* The successful return value from signal (?)XXX */
-#undef RETSIGVAL
-
-/* Define this on IRIX */
-#undef _BSD_SIGNALS
-
-/* For HP/UX ANSI compiler? */
-#undef _HPUX_SOURCE
-
-/* AIX hack. */
-#undef _SUN
-
-/* Workaround for missing 64-bit formats */
-#undef PRId64
-#undef PRIo64
-#undef PRIx64
-#undef PRIu64
-
-/* Whether or not to include the possibly-buggy SMB printer */
-#undef TCPDUMP_DO_SMB
-
-/* Long story short: aclocal.m4 depends on autoconf 2.13
- * implementation details wrt "const"; newer versions
- * have different implementation details so for now we
- * put "const" here.  This may cause duplicate definitions
- * in config.h but that should be OK since they're the same.
- */
-#undef const
-
-/* Define if you have the dnet_htoa function.  */
-#undef HAVE_DNET_HTOA
-
-/* Define if you have a dnet_htoa declaration in <netdnet/dnetdb.h>.  */
-#undef HAVE_NETDNET_DNETDB_H_DNET_HTOA
-
-/* define if should drop privileges by default */
-#undef WITH_USER
-
-/* define if should chroot when dropping privileges */
-#undef WITH_CHROOT
diff --git a/aclocal.m4 b/aclocal.m4
index 4b70105..59ddcfc 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,4 +1,4 @@
-dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.106.2.7 2005/11/08 03:00:52 guy Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.116 2008-09-25 21:45:50 guy Exp $ (LBL)
 dnl
 dnl Copyright (c) 1995, 1996, 1997, 1998
 dnl	The Regents of the University of California.  All rights reserved.
@@ -23,35 +23,30 @@
 dnl
 
 dnl
-dnl Determine which compiler we're using (cc or gcc)
-dnl If using gcc, determine the version number
-dnl If using cc, require that it support ansi prototypes
-dnl If using gcc, use -O2 (otherwise use -O)
-dnl If using cc, explicitly specify /usr/local/include
+dnl Do whatever AC_LBL_C_INIT work is necessary before using AC_PROG_CC.
 dnl
-dnl usage:
+dnl It appears that newer versions of autoconf (2.64 and later) will,
+dnl if you use AC_TRY_COMPILE in a macro, stick AC_PROG_CC at the
+dnl beginning of the macro, even if the macro itself calls AC_PROG_CC.
+dnl See the "Prerequisite Macros" and "Expanded Before Required" sections
+dnl in the Autoconf documentation.
 dnl
-dnl	AC_LBL_C_INIT(copt, incls)
+dnl This causes a steaming heap of fail in our case, as we were, in
+dnl AC_LBL_C_INIT, doing the tests we now do in AC_LBL_C_INIT_BEFORE_CC,
+dnl calling AC_PROG_CC, and then doing the tests we now do in
+dnl AC_LBL_C_INIT.  Now, we run AC_LBL_C_INIT_BEFORE_CC, AC_PROG_CC,
+dnl and AC_LBL_C_INIT at the top level.
 dnl
-dnl results:
-dnl
-dnl	$1 (copt set)
-dnl	$2 (incls set)
-dnl	CC
-dnl	LDFLAGS
-dnl	ac_cv_lbl_gcc_vers
-dnl	LBL_CFLAGS
-dnl
-AC_DEFUN(AC_LBL_C_INIT,
-    [AC_PREREQ(2.12)
+AC_DEFUN(AC_LBL_C_INIT_BEFORE_CC,
+[
+    AC_BEFORE([$0], [AC_LBL_C_INIT])
     AC_BEFORE([$0], [AC_PROG_CC])
     AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
     AC_BEFORE([$0], [AC_LBL_DEVEL])
     AC_ARG_WITH(gcc, [  --without-gcc           don't use gcc])
-    $1="-O"
-    $2=""
+    $1=""
     if test "${srcdir}" != "." ; then
-	    $2="-I\$(srcdir)"
+	    $1="-I$srcdir"
     fi
     if test "${CFLAGS+set}" = set; then
 	    LBL_CFLAGS="$CFLAGS"
@@ -72,71 +67,137 @@
 	    CC=cc
 	    export CC
     fi
-    AC_PROG_CC
+])
+
+dnl
+dnl Determine which compiler we're using (cc or gcc)
+dnl If using gcc, determine the version number
+dnl If using cc:
+dnl     require that it support ansi prototypes
+dnl     use -O (AC_PROG_CC will use -g -O2 on gcc, so we don't need to
+dnl     do that ourselves for gcc)
+dnl     add -g flags, as appropriate
+dnl     explicitly specify /usr/local/include
+dnl
+dnl NOTE WELL: with newer versions of autoconf, "gcc" means any compiler
+dnl that defines __GNUC__, which means clang, for example, counts as "gcc".
+dnl
+dnl usage:
+dnl
+dnl	AC_LBL_C_INIT(copt, incls)
+dnl
+dnl results:
+dnl
+dnl	$1 (copt set)
+dnl	$2 (incls set)
+dnl	CC
+dnl	LDFLAGS
+dnl	LBL_CFLAGS
+dnl
+AC_DEFUN(AC_LBL_C_INIT,
+[
+    AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
+    AC_BEFORE([$0], [AC_LBL_DEVEL])
+    AC_BEFORE([$0], [AC_LBL_SHLIBS_INIT])
     if test "$GCC" = yes ; then
-	    if test "$SHLICC2" = yes ; then
-		    ac_cv_lbl_gcc_vers=2
-		    $1="-O2"
-	    else
-		    AC_MSG_CHECKING(gcc version)
-		    AC_CACHE_VAL(ac_cv_lbl_gcc_vers,
-			ac_cv_lbl_gcc_vers=`$CC -v 2>&1 | \
-			    sed -e '/^gcc version /!d' \
-				-e 's/^gcc version //' \
-				-e 's/ .*//' -e 's/^[[[^0-9]]]*//' \
-				-e 's/\..*//'`)
-		    AC_MSG_RESULT($ac_cv_lbl_gcc_vers)
-		    if test $ac_cv_lbl_gcc_vers -gt 1 ; then
-			    $1="-O2"
-		    fi
-	    fi
+	    #
+	    # -Werror forces warnings to be errors.
+	    #
+	    ac_lbl_cc_force_warning_errors=-Werror
+
+	    #
+	    # Use -ffloat-store so that, on 32-bit x86, we don't
+	    # do 80-bit arithmetic with the FPU; that way we should
+	    # get the same results for floating-point calculations
+	    # on x86-32 and x86-64.
+	    #
+	    AC_LBL_CHECK_COMPILER_OPT($1, -ffloat-store)
     else
-	    AC_MSG_CHECKING(that $CC handles ansi prototypes)
-	    AC_CACHE_VAL(ac_cv_lbl_cc_ansi_prototypes,
-		AC_TRY_COMPILE(
-		    [#include <sys/types.h>],
-		    [int frob(int, char *)],
-		    ac_cv_lbl_cc_ansi_prototypes=yes,
-		    ac_cv_lbl_cc_ansi_prototypes=no))
-	    AC_MSG_RESULT($ac_cv_lbl_cc_ansi_prototypes)
-	    if test $ac_cv_lbl_cc_ansi_prototypes = no ; then
-		    case "$host_os" in
-
-		    hpux*)
-			    AC_MSG_CHECKING(for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE))
-			    savedcflags="$CFLAGS"
-			    CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
-			    AC_CACHE_VAL(ac_cv_lbl_cc_hpux_cc_aa,
-				AC_TRY_COMPILE(
-				    [#include <sys/types.h>],
-				    [int frob(int, char *)],
-				    ac_cv_lbl_cc_hpux_cc_aa=yes,
-				    ac_cv_lbl_cc_hpux_cc_aa=no))
-			    AC_MSG_RESULT($ac_cv_lbl_cc_hpux_cc_aa)
-			    if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then
-				    AC_MSG_ERROR(see the INSTALL doc for more info)
-			    fi
-			    CFLAGS="$savedcflags"
-			    V_CCOPT="-Aa $V_CCOPT"
-			    AC_DEFINE(_HPUX_SOURCE)
-			    ;;
-
-		    *)
-			    AC_MSG_ERROR(see the INSTALL doc for more info)
-			    ;;
-		    esac
-	    fi
 	    $2="$$2 -I/usr/local/include"
 	    LDFLAGS="$LDFLAGS -L/usr/local/lib"
 
 	    case "$host_os" in
 
+	    darwin*)
+		    #
+		    # This is assumed either to be GCC or clang, both
+		    # of which use -Werror to force warnings to be errors.
+		    #
+		    ac_lbl_cc_force_warning_errors=-Werror
+		    ;;
+
+	    hpux*)
+		    #
+		    # HP C, which is what we presume we're using, doesn't
+		    # exit with a non-zero exit status if we hand it an
+		    # invalid -W flag, can't be forced to do so even with
+		    # +We, and doesn't handle GCC-style -W flags, so we
+		    # don't want to try using GCC-style -W flags.
+		    #
+		    ac_lbl_cc_dont_try_gcc_dashW=yes
+		    ;;
+
 	    irix*)
-		    V_CCOPT="$V_CCOPT -xansi -signed -O"
+		    #
+		    # MIPS C, which is what we presume we're using, doesn't
+		    # necessarily exit with a non-zero exit status if we
+		    # hand it an invalid -W flag, can't be forced to do
+		    # so, and doesn't handle GCC-style -W flags, so we
+		    # don't want to try using GCC-style -W flags.
+		    #
+		    ac_lbl_cc_dont_try_gcc_dashW=yes
+		    #
+		    # It also, apparently, defaults to "char" being
+		    # unsigned, unlike most other C implementations;
+		    # I suppose we could say "signed char" whenever
+		    # we want to guarantee a signed "char", but let's
+		    # just force signed chars.
+		    #
+		    # -xansi is normally the default, but the
+		    # configure script was setting it; perhaps -cckr
+		    # was the default in the Old Days.  (Then again,
+		    # that would probably be for backwards compatibility
+		    # in the days when ANSI C was Shiny and New, i.e.
+		    # 1989 and the early '90's, so maybe we can just
+		    # drop support for those compilers.)
+		    #
+		    # -g is equivalent to -g2, which turns off
+		    # optimization; we choose -g3, which generates
+		    # debugging information but doesn't turn off
+		    # optimization (even if the optimization would
+		    # cause inaccuracies in debugging).
+		    #
+		    $1="$$1 -xansi -signed -g3"
 		    ;;
 
 	    osf*)
-		    V_CCOPT="$V_CCOPT -std1 -O"
+	    	    #
+		    # Presumed to be DEC OSF/1, Digital UNIX, or
+		    # Tru64 UNIX.
+		    #
+		    # The DEC C compiler, which is what we presume we're
+		    # using, doesn't exit with a non-zero exit status if we
+		    # hand it an invalid -W flag, can't be forced to do
+		    # so, and doesn't handle GCC-style -W flags, so we
+		    # don't want to try using GCC-style -W flags.
+		    #
+		    ac_lbl_cc_dont_try_gcc_dashW=yes
+		    #
+		    # -g is equivalent to -g2, which turns off
+		    # optimization; we choose -g3, which generates
+		    # debugging information but doesn't turn off
+		    # optimization (even if the optimization would
+		    # cause inaccuracies in debugging).
+		    #
+		    $1="$$1 -g3"
+		    ;;
+
+	    solaris*)
+		    #
+		    # Assumed to be Sun C, which requires -errwarn to force
+		    # warnings to be treated as errors.
+		    #
+		    ac_lbl_cc_force_warning_errors=-errwarn
 		    ;;
 
 	    ultrix*)
@@ -150,13 +211,152 @@
 			    ac_cv_lbl_cc_const_proto=no))
 		    AC_MSG_RESULT($ac_cv_lbl_cc_const_proto)
 		    if test $ac_cv_lbl_cc_const_proto = no ; then
-			    AC_DEFINE(const,)
+			    AC_DEFINE(const,[],
+			        [to handle Ultrix compilers that don't support const in prototypes])
 		    fi
 		    ;;
 	    esac
+	    $1="$$1 -O"
     fi
 ])
 
+dnl
+dnl Check whether the compiler option specified as the second argument
+dnl is supported by the compiler and, if so, add it to the macro
+dnl specified as the first argument
+dnl
+AC_DEFUN(AC_LBL_CHECK_COMPILER_OPT,
+    [
+	AC_MSG_CHECKING([whether the compiler supports the $2 option])
+	save_CFLAGS="$CFLAGS"
+	CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors $2"
+	AC_TRY_COMPILE(
+	    [],
+	    [return 0],
+	    [
+		AC_MSG_RESULT([yes])
+		CFLAGS="$save_CFLAGS"
+		$1="$$1 $2"
+	    ],
+	    [
+		AC_MSG_RESULT([no])
+		CFLAGS="$save_CFLAGS"
+	    ])
+    ])
+
+dnl
+dnl Check whether the compiler supports an option to generate
+dnl Makefile-style dependency lines
+dnl
+dnl GCC uses -M for this.  Non-GCC compilers that support this
+dnl use a variety of flags, including but not limited to -M.
+dnl
+dnl We test whether the flag in question is supported, as older
+dnl versions of compilers might not support it.
+dnl
+dnl We don't try all the possible flags, just in case some flag means
+dnl "generate dependencies" on one compiler but means something else
+dnl on another compiler.
+dnl
+dnl Most compilers that support this send the output to the standard
+dnl output by default.  IBM's XLC, however, supports -M but sends
+dnl the output to {sourcefile-basename}.u, and AIX has no /dev/stdout
+dnl to work around that, so we don't bother with XLC.
+dnl
+AC_DEFUN(AC_LBL_CHECK_DEPENDENCY_GENERATION_OPT,
+    [
+	AC_MSG_CHECKING([whether the compiler supports generating dependencies])
+	if test "$GCC" = yes ; then
+		#
+		# GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
+		# though it's not); we assume that, in this case, the flag
+		# would be -M.
+		#
+		ac_lbl_dependency_flag="-M"
+	else
+		#
+		# Not GCC or a compiler deemed to be GCC; what platform is
+		# this?  (We're assuming that if the compiler isn't GCC
+		# it's the compiler from the vendor of the OS; that won't
+		# necessarily be true for x86 platforms, where it might be
+		# the Intel C compiler.)
+		#
+		case "$host_os" in
+
+		irix*|osf*|darwin*)
+			#
+			# MIPS C for IRIX, DEC C, and clang all use -M.
+			#
+			ac_lbl_dependency_flag="-M"
+			;;
+
+		solaris*)
+			#
+			# Sun C uses -xM.
+			#
+			ac_lbl_dependency_flag="-xM"
+			;;
+
+		hpux*)
+			#
+			# HP's older C compilers don't support this.
+			# HP's newer C compilers support this with
+			# either +M or +Make; the older compilers
+			# interpret +M as something completely
+			# different, so we use +Make so we don't
+			# think it works with the older compilers.
+			#
+			ac_lbl_dependency_flag="+Make"
+			;;
+
+		*)
+			#
+			# Not one of the above; assume no support for
+			# generating dependencies.
+			#
+			ac_lbl_dependency_flag=""
+			;;
+		esac
+	fi
+
+	#
+	# Is ac_lbl_dependency_flag defined and, if so, does the compiler
+	# complain about it?
+	#
+	# Note: clang doesn't seem to exit with an error status when handed
+	# an unknown non-warning error, even if you pass it
+	# -Werror=unknown-warning-option.  However, it always supports
+	# -M, so the fact that this test always succeeds with clang
+	# isn't an issue.
+	#
+	if test ! -z "$ac_lbl_dependency_flag"; then
+		AC_LANG_CONFTEST(
+		    [AC_LANG_SOURCE([[int main(void) { return 0; }]])])
+		echo "$CC" $ac_lbl_dependency_flag conftest.c >&5
+		if "$CC" $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1; then
+			AC_MSG_RESULT([yes, with $ac_lbl_dependency_flag])
+			DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
+			MKDEP='${srcdir}/mkdep'
+		else
+			AC_MSG_RESULT([no])
+			#
+			# We can't run mkdep, so have "make depend" do
+			# nothing.
+			#
+			MKDEP=:
+		fi
+		rm -rf conftest*
+	else
+		AC_MSG_RESULT([no])
+		#
+		# We can't run mkdep, so have "make depend" do
+		# nothing.
+		#
+		MKDEP=:
+	fi
+	AC_SUBST(DEPENDENCY_CFLAG)
+	AC_SUBST(MKDEP)
+    ])
 
 #
 # Try compiling a sample of the type of code that appears in
@@ -167,8 +367,13 @@
 # at least some versions of HP's C compiler can inline that, but can't
 # inline a function that returns a struct pointer.
 #
+# Make sure we use the V_CCOPT flags, because some of those might
+# disable inlining.
+#
 AC_DEFUN(AC_LBL_C_INLINE,
     [AC_MSG_CHECKING(for inline)
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$V_CCOPT"
     AC_CACHE_VAL(ac_cv_lbl_inline, [
 	ac_cv_lbl_inline=""
 	ac_lbl_cc_inline=no
@@ -196,6 +401,7 @@
 	if test "$ac_lbl_cc_inline" = yes ; then
 	    ac_cv_lbl_inline=$ac_lbl_inline
 	fi])
+    CFLAGS="$save_CFLAGS"
     if test ! -z "$ac_cv_lbl_inline" ; then
 	AC_MSG_RESULT($ac_cv_lbl_inline)
     else
@@ -238,9 +444,10 @@
     libpcap=FAIL
     lastdir=FAIL
     places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
-	egrep '/libpcap-[[0-9]]*.[[0-9]]*(.[[0-9]]*)?([[ab]][[0-9]]*)?$'`
+	egrep '/libpcap-[[0-9]]+\.[[0-9]]+(\.[[0-9]]*)?([[ab]][[0-9]]*|-PRE-GIT)?$'`
     for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do
-	    basedir=`echo $dir | sed -e 's/[[ab]][[0-9]]*$//'`
+	    basedir=`echo $dir | sed -e 's/[[ab]][[0-9]]*$//' | \
+	        sed -e 's/-PRE-GIT$//' `
 	    if test $lastdir = $basedir ; then
 		    dnl skip alphas when an actual release is present
 		    continue;
@@ -254,39 +461,68 @@
     done
     if test $libpcap = FAIL ; then
 	    AC_MSG_RESULT(not found)
-	    AC_CHECK_LIB(pcap, main, libpcap="-lpcap")
-	    if test $libpcap = FAIL ; then
-		    AC_MSG_ERROR(see the INSTALL doc for more info)
-	    fi
-	    dnl
-	    dnl Good old Red Hat Linux puts "pcap.h" in
-	    dnl "/usr/include/pcap"; had the LBL folks done so,
-	    dnl that would have been a good idea, but for
-	    dnl the Red Hat folks to do so just breaks source
-	    dnl compatibility with other systems.
-	    dnl
-	    dnl We work around this by assuming that, as we didn't
-	    dnl find a local libpcap, libpcap is in /usr/lib or
-	    dnl /usr/local/lib and that the corresponding header
-	    dnl file is under one of those directories; if we don't
-	    dnl find it in either of those directories, we check to
-	    dnl see if it's in a "pcap" subdirectory of them and,
-	    dnl if so, add that subdirectory to the "-I" list.
-	    dnl
-	    AC_MSG_CHECKING(for extraneous pcap header directories)
-	    if test \( ! -r /usr/local/include/pcap.h \) -a \
-			\( ! -r /usr/include/pcap.h \); then
-		if test -r /usr/local/include/pcap/pcap.h; then
-		    d="/usr/local/include/pcap"
-		elif test -r /usr/include/pcap/pcap.h; then
-		    d="/usr/include/pcap"
-		fi
-	    fi
-	    if test -z "$d" ; then
-		AC_MSG_RESULT(not found)
+
+	    #
+	    # Look for pcap-config.
+	    #
+	    AC_PATH_TOOL(PCAP_CONFIG, pcap-config)
+	    if test -n "$PCAP_CONFIG" ; then
+		#
+		# Found - use it to get the include flags for
+		# libpcap and the flags to link with libpcap.
+		#
+		# Please read section 11.6 "Shell Substitutions"
+		# in the autoconf manual before doing anything
+		# to this that involves quoting.  Especially note
+		# the statement "There is just no portable way to use
+		# double-quoted strings inside double-quoted back-quoted
+		# expressions (pfew!)."
+		#
+		cflags=`"$PCAP_CONFIG" --cflags`
+		$2="$cflags $$2"
+		libpcap=`"$PCAP_CONFIG" --libs`
 	    else
-		$2="-I$d $$2"
-		AC_MSG_RESULT(found -- -I$d added)
+		#
+		# Not found; look for pcap.
+		#
+		AC_CHECK_LIB(pcap, main, libpcap="-lpcap")
+		if test $libpcap = FAIL ; then
+		    AC_MSG_ERROR(see the INSTALL doc for more info)
+		fi
+		dnl
+		dnl Some versions of Red Hat Linux put "pcap.h" in
+		dnl "/usr/include/pcap"; had the LBL folks done so,
+		dnl that would have been a good idea, but for
+		dnl the Red Hat folks to do so just breaks source
+		dnl compatibility with other systems.
+		dnl
+		dnl We work around this by assuming that, as we didn't
+		dnl find a local libpcap, libpcap is in /usr/lib or
+		dnl /usr/local/lib and that the corresponding header
+		dnl file is under one of those directories; if we don't
+		dnl find it in either of those directories, we check to
+		dnl see if it's in a "pcap" subdirectory of them and,
+		dnl if so, add that subdirectory to the "-I" list.
+		dnl
+		dnl (We now also put pcap.h in /usr/include/pcap, but we
+		dnl leave behind a /usr/include/pcap.h that includes it,
+		dnl so you can still just include <pcap.h>.)
+		dnl
+		AC_MSG_CHECKING(for extraneous pcap header directories)
+		if test \( ! -r /usr/local/include/pcap.h \) -a \
+			\( ! -r /usr/include/pcap.h \); then
+		    if test -r /usr/local/include/pcap/pcap.h; then
+			d="/usr/local/include/pcap"
+		    elif test -r /usr/include/pcap/pcap.h; then
+			d="/usr/include/pcap"
+		    fi
+		fi
+		if test -z "$d" ; then
+		    AC_MSG_RESULT(not found)
+		else
+		    $2="-I$d $$2"
+		    AC_MSG_RESULT(found -- -I$d added)
+		fi
 	    fi
     else
 	    $1=$libpcap
@@ -300,26 +536,80 @@
                     AC_MSG_ERROR(cannot find pcap.h, see INSTALL)
  	    fi
 	    AC_MSG_RESULT($libpcap)
+	    AC_PATH_PROG(PCAP_CONFIG, pcap-config,, $d)
+	    if test -n "$PCAP_CONFIG"; then
+		#
+		# The libpcap directory has a pcap-config script.
+		# Use it to get any additioal libraries needed
+		# to link with the libpcap archive library in
+		# that directory.
+		#
+		# Please read section 11.6 "Shell Substitutions"
+		# in the autoconf manual before doing anything
+		# to this that involves quoting.  Especially note
+		# the statement "There is just no portable way to use
+		# double-quoted strings inside double-quoted back-quoted
+		# expressions (pfew!)."
+		#
+		additional_libs=`"$PCAP_CONFIG" --additional-libs --static`
+		libpcap="$libpcap $additional_libs"
+	    fi
     fi
     LIBS="$libpcap $LIBS"
-    case "$host_os" in
+    if ! test -n "$PCAP_CONFIG" ; then
+	#
+	# We don't have pcap-config; find out any additional link flags
+	# we need.  (If we have pcap-config, we assume it tells us what
+	# we need.)
+	#
+	case "$host_os" in
 
-    aix*)
+	aix*)
+	    #
+	    # If libpcap is DLPI-based, we have to use /lib/pse.exp if
+	    # present, as we use the STREAMS routines.
+	    #
+	    # (XXX - true only if we're linking with a static libpcap?)
+	    #
 	    pseexe="/lib/pse.exp"
 	    AC_MSG_CHECKING(for $pseexe)
 	    if test -f $pseexe ; then
 		    AC_MSG_RESULT(yes)
 		    LIBS="$LIBS -I:$pseexe"
 	    fi
+
 	    #
-	    # We need "-lodm" and "-lcfg", as libpcap requires them on
-	    # AIX, and we just build a static libpcap.a and thus can't
-	    # arrange that when you link with libpcap you automatically
-	    # link with those libraries.
+	    # If libpcap is BPF-based, we need "-lodm" and "-lcfg", as
+	    # we use them to load the BPF module.
+	    #
+	    # (XXX - true only if we're linking with a static libpcap?)
 	    #
 	    LIBS="$LIBS -lodm -lcfg"
 	    ;;
-    esac
+	esac
+    fi
+
+    dnl
+    dnl Check for "pcap_loop()", to make sure we found a working
+    dnl libpcap and have all the right other libraries with which
+    dnl to link.  (Otherwise, the checks below will fail, not
+    dnl because the routines are missing from the library, but
+    dnl because we aren't linking properly with libpcap, and
+    dnl that will cause confusing errors at build time.)
+    dnl
+    AC_CHECK_FUNC(pcap_loop,,
+	[
+	    AC_MSG_ERROR(
+[Report this to tcpdump-workers@lists.tcpdump.org, and include the
+config.log file in your report.  If you have downloaded libpcap from
+tcpdump.org, and built it yourself, please also include the config.log
+file from the libpcap source directory, the Makefile from the libpcap
+source directory, and the output of the make process for libpcap, as
+this could be a problem with the libpcap that was built, and we will
+not be able to determine why this is happening, and thus will not be
+able to fix it, without that information, as we have not been able to
+reproduce this problem ourselves.])
+	])
 
     dnl
     dnl Check for "pcap_list_datalinks()", "pcap_set_datalink()",
@@ -327,17 +617,21 @@
     dnl if they're not present.
     dnl
     AC_CHECK_FUNC(pcap_list_datalinks,
-	AC_DEFINE(HAVE_PCAP_LIST_DATALINKS),
+	AC_DEFINE(HAVE_PCAP_LIST_DATALINKS, 1,
+	    [define if libpcap has pcap_list_datalinks()]),
 	[
 	    AC_LIBOBJ(datalinks)
 	])
     AC_CHECK_FUNC(pcap_set_datalink,
-	AC_DEFINE(HAVE_PCAP_SET_DATALINK))
+	AC_DEFINE(HAVE_PCAP_SET_DATALINK, 1,
+	    [define if libpcap has pcap_set_datalink()]))
     AC_CHECK_FUNC(pcap_datalink_name_to_val,
 	[
-	    AC_DEFINE(HAVE_PCAP_DATALINK_NAME_TO_VAL)
+	    AC_DEFINE(HAVE_PCAP_DATALINK_NAME_TO_VAL, 1,
+		[define if libpcap has pcap_datalink_name_to_val()])
 	    AC_CHECK_FUNC(pcap_datalink_val_to_description,
-		AC_DEFINE(HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION),
+		AC_DEFINE(HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION, 1,
+		    [define if libpcap has pcap_datalink_val_to_description()]),
 		[
 		    AC_LIBOBJ(dlnames)
 		])
@@ -357,7 +651,8 @@
     dnl Check for "pcap_dump_ftell()" and use a substitute version
     dnl if it's not present.
     AC_CHECK_FUNC(pcap_dump_ftell,
-	AC_DEFINE(HAVE_PCAP_DUMP_FTELL),
+	AC_DEFINE(HAVE_PCAP_DUMP_FTELL, 1,
+	    [define if libpcap has pcap_dump_ftell()]),
 	[
 	    AC_LIBOBJ(pcap_dump_ftell)
 	])
@@ -379,14 +674,14 @@
     [AC_BEFORE([$0], [AC_LBL_LIBPCAP])
     AC_TYPE_SIGNAL
     if test "$ac_cv_type_signal" = void ; then
-	    AC_DEFINE(RETSIGVAL,)
+	    AC_DEFINE(RETSIGVAL,[],[return value of signal handlers])
     else
-	    AC_DEFINE(RETSIGVAL,(0))
+	    AC_DEFINE(RETSIGVAL,(0),[return value of signal handlers])
     fi
     case "$host_os" in
 
     irix*)
-	    AC_DEFINE(_BSD_SIGNALS)
+	    AC_DEFINE(_BSD_SIGNALS,1,[get BSD semantics on Irix])
 	    ;;
 
     *)
@@ -435,65 +730,6 @@
     fi])
 
 dnl
-dnl Check for flex, default to lex
-dnl Require flex 2.4 or higher
-dnl Check for bison, default to yacc
-dnl Default to lex/yacc if both flex and bison are not available
-dnl Define the yy prefix string if using flex and bison
-dnl
-dnl usage:
-dnl
-dnl	AC_LBL_LEX_AND_YACC(lex, yacc, yyprefix)
-dnl
-dnl results:
-dnl
-dnl	$1 (lex set)
-dnl	$2 (yacc appended)
-dnl	$3 (optional flex and bison -P prefix)
-dnl
-AC_DEFUN(AC_LBL_LEX_AND_YACC,
-    [AC_ARG_WITH(flex, [  --without-flex          don't use flex])
-    AC_ARG_WITH(bison, [  --without-bison         don't use bison])
-    if test "$with_flex" = no ; then
-	    $1=lex
-    else
-	    AC_CHECK_PROGS($1, flex, lex)
-    fi
-    if test "$$1" = flex ; then
-	    # The -V flag was added in 2.4
-	    AC_MSG_CHECKING(for flex 2.4 or higher)
-	    AC_CACHE_VAL(ac_cv_lbl_flex_v24,
-		if flex -V >/dev/null 2>&1; then
-			ac_cv_lbl_flex_v24=yes
-		else
-			ac_cv_lbl_flex_v24=no
-		fi)
-	    AC_MSG_RESULT($ac_cv_lbl_flex_v24)
-	    if test $ac_cv_lbl_flex_v24 = no ; then
-		    s="2.4 or higher required"
-		    AC_MSG_WARN(ignoring obsolete flex executable ($s))
-		    $1=lex
-	    fi
-    fi
-    if test "$with_bison" = no ; then
-	    $2=yacc
-    else
-	    AC_CHECK_PROGS($2, bison, yacc)
-    fi
-    if test "$$2" = bison ; then
-	    $2="$$2 -y"
-    fi
-    if test "$$1" != lex -a "$$2" = yacc -o "$$1" = lex -a "$$2" != yacc ; then
-	    AC_MSG_WARN(don't have both flex and bison; reverting to lex/yacc)
-	    $1=lex
-	    $2=yacc
-    fi
-    if test "$$1" = flex -a -n "$3" ; then
-	    $1="$$1 -P$3"
-	    $2="$$2 -p $3"
-    fi])
-
-dnl
 dnl Checks to see if union wait is used with WEXITSTATUS()
 dnl
 dnl usage:
@@ -517,9 +753,9 @@
 	    ac_cv_lbl_union_wait=yes))
     AC_MSG_RESULT($ac_cv_lbl_union_wait)
     if test $ac_cv_lbl_union_wait = yes ; then
-	    AC_DEFINE(DECLWAITSTATUS,union wait)
+	    AC_DEFINE(DECLWAITSTATUS,union wait,[type for wait])
     else
-	    AC_DEFINE(DECLWAITSTATUS,int)
+	    AC_DEFINE(DECLWAITSTATUS,int,[type for wait])
     fi])
 
 dnl
@@ -534,7 +770,7 @@
 dnl	HAVE_SOCKADDR_SA_LEN (defined)
 dnl
 AC_DEFUN(AC_LBL_SOCKADDR_SA_LEN,
-    [AC_MSG_CHECKING(if sockaddr struct has sa_len member)
+    [AC_MSG_CHECKING(if sockaddr struct has the sa_len member)
     AC_CACHE_VAL(ac_cv_lbl_sockaddr_has_sa_len,
 	AC_TRY_COMPILE([
 #	include <sys/types.h>
@@ -544,7 +780,7 @@
 	ac_cv_lbl_sockaddr_has_sa_len=no))
     AC_MSG_RESULT($ac_cv_lbl_sockaddr_has_sa_len)
     if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
-	    AC_DEFINE(HAVE_SOCKADDR_SA_LEN)
+	    AC_DEFINE(HAVE_SOCKADDR_SA_LEN,1,[if struct sockaddr has the sa_len member])
     fi])
 
 dnl
@@ -568,7 +804,7 @@
 	else
 		ac_cv_lbl_have_run_path=no
 	fi
-	rm -f conftest*])
+	rm -f -r conftest*])
     AC_MSG_RESULT($ac_cv_lbl_have_run_path)
     ])
 
@@ -604,10 +840,10 @@
 	  ]])
       ],
       [
-	AC_DEFINE(PRId64, "$1d")
-	AC_DEFINE(PRIo64, "$1o")
-	AC_DEFINE(PRIx64, "$1x")
-	AC_DEFINE(PRIu64, "$1u")
+	AC_DEFINE(PRId64, "$1d", [define if the platform doesn't define PRId64])
+	AC_DEFINE(PRIo64, "$1o", [define if the platform doesn't define PRIo64])
+	AC_DEFINE(PRIx64, "$1x", [define if the platform doesn't define PRIu64])
+	AC_DEFINE(PRIu64, "$1u", [define if the platform doesn't define PRIx64])
 	AC_MSG_RESULT(yes)
       ],
       [
@@ -664,7 +900,7 @@
 	# 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
 		;;
 
@@ -708,19 +944,17 @@
 				ac_cv_lbl_unaligned_fail=no
 			fi
 		fi
-		rm -f conftest* core core.conftest
+		rm -f -r conftest* core core.conftest
 		;;
 	esac])
     AC_MSG_RESULT($ac_cv_lbl_unaligned_fail)
     if test $ac_cv_lbl_unaligned_fail = yes ; then
-	    AC_DEFINE(LBL_ALIGN)
+	    AC_DEFINE(LBL_ALIGN,1,[if unaligned access fails])
     fi])
 
 dnl
-dnl If using gcc and the file .devel exists:
-dnl	Compile with -g (if supported) and -Wall
-dnl	If using gcc 2 or later, do extra prototype checking and some other
-dnl	checks
+dnl If the file .devel exists:
+dnl	Add some warning flags if the compiler supports them
 dnl	If an os prototype include exists, symlink os-proto.h to it
 dnl
 dnl usage:
@@ -739,32 +973,32 @@
 	    $1="$$1 ${LBL_CFLAGS}"
     fi
     if test -f .devel ; then
-	    if test "$GCC" = yes ; then
-		    if test "${LBL_CFLAGS+set}" != set; then
-			    if test "$ac_cv_prog_cc_g" = yes ; then
-				    $1="-g $$1"
-			    fi
-			    $1="$$1 -Wall"
-			    if test $ac_cv_lbl_gcc_vers -gt 1 ; then
-				    $1="$$1 -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wpointer-arith -W"
-			    fi
-		    fi
-	    else
-		    case "$host_os" in
-
-		    irix6*)
-			    V_CCOPT="$V_CCOPT -n32"
-			    ;;
-
-		    *)
-			    ;;
-		    esac
+	    #
+	    # Skip all the warning option stuff on some compilers.
+	    #
+	    if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
+		    AC_LBL_CHECK_COMPILER_OPT($1, -Wall)
+		    AC_LBL_CHECK_COMPILER_OPT($1, -Wmissing-prototypes)
+		    AC_LBL_CHECK_COMPILER_OPT($1, -Wstrict-prototypes)
+		    AC_LBL_CHECK_COMPILER_OPT($1, -Wwrite-strings)
+		    AC_LBL_CHECK_COMPILER_OPT($1, -Wpointer-arith)
+		    AC_LBL_CHECK_COMPILER_OPT($1, -W)
 	    fi
+	    AC_LBL_CHECK_DEPENDENCY_GENERATION_OPT()
+	    #
+	    # We used to set -n32 for IRIX 6 when not using GCC (presumed
+	    # to mean that we're using MIPS C or MIPSpro C); it specified
+	    # the "new" faster 32-bit ABI, introduced in IRIX 6.2.  I'm
+	    # not sure why that would be something to do *only* with a
+	    # .devel file; why should the ABI for which we produce code
+	    # depend on .devel?
+	    #
 	    os=`echo $host_os | sed -e 's/\([[0-9]][[0-9]]*\)[[^0-9]].*$/\1/'`
 	    name="lbl/os-$os.h"
 	    if test -f $name ; then
 		    ln -s $name os-proto.h
-		    AC_DEFINE(HAVE_OS_PROTO_H)
+		    AC_DEFINE(HAVE_OS_PROTO_H, 1,
+			[if there's an os_proto.h for this platform, to use additional prototypes])
 	    else
 		    AC_MSG_WARN(can't find $name)
 	    fi
@@ -950,83 +1184,6 @@
 ])
 
 dnl
-dnl Checks for portable prototype declaration macro
-AC_DEFUN(AC_CHECK_PORTABLE_PROTO,  [
-	AC_MSG_CHECKING(for __P)
-	AC_CACHE_VAL($1,
-	AC_TRY_COMPILE([
-#		include <unistd.h>],
-		[int f __P(())],
-		$1=yes,
-		$1=no))
-	AC_MSG_RESULT($$1)
-	if test $$1 = yes; then
-		AC_DEFINE(HAVE_PORTABLE_PROTOTYPE)
-	fi
-])
-
-dnl checks for u_intXX_t
-AC_DEFUN(AC_CHECK_BITTYPES, [
-	$1=yes
-dnl check for u_int8_t
-	AC_MSG_CHECKING(for u_int8_t)
-	AC_CACHE_VAL(ac_cv_u_int8_t,
-	AC_TRY_COMPILE([
-#		include <sys/types.h>],
-		[u_int8_t i],
-		ac_cv_u_int8_t=yes,
-		ac_cv_u_int8_t=no))
-	AC_MSG_RESULT($ac_cv_u_int8_t)
-	if test $ac_cv_u_int8_t = yes; then
-		AC_DEFINE(HAVE_U_INT8_T)
-	else
-		$1=no
-	fi
-dnl check for u_int16_t
-	AC_MSG_CHECKING(for u_int16_t)
-	AC_CACHE_VAL(ac_cv_u_int16_t,
-	AC_TRY_COMPILE([
-#		include <sys/types.h>],
-		[u_int16_t i],
-		ac_cv_u_int16_t=yes,
-		ac_cv_u_int16_t=no))
-	AC_MSG_RESULT($ac_cv_u_int16_t)
-	if test $ac_cv_u_int16_t = yes; then
-		AC_DEFINE(HAVE_U_INT16_T)
-	else
-		$1=no
-	fi
-dnl check for u_int32_t
-	AC_MSG_CHECKING(for u_int32_t)
-	AC_CACHE_VAL(ac_cv_u_int32_t,
-	AC_TRY_COMPILE([
-#		include <sys/types.h>],
-		[u_int32_t i],
-		ac_cv_u_int32_t=yes,
-		ac_cv_u_int32_t=no))
-	AC_MSG_RESULT($ac_cv_u_int32_t)
-	if test $ac_cv_u_int32_t = yes; then
-		AC_DEFINE(HAVE_U_INT32_T)
-	else
-		$1=no
-	fi
-dnl check for u_int64_t
-	AC_MSG_CHECKING(for u_int64_t)
-	AC_CACHE_VAL(ac_cv_u_int64_t,
-	AC_TRY_COMPILE([
-#		include <sys/types.h>],
-		[u_int64_t i],
-		ac_cv_u_int64_t=yes,
-		ac_cv_u_int64_t=no))
-	AC_MSG_RESULT($ac_cv_u_int64_t)
-	if test $ac_cv_u_int64_t = yes; then
-		AC_DEFINE(HAVE_U_INT64_T)
-	else
-		$1=no
-	fi
-])
-
-dnl
 dnl Checks for addrinfo structure
 AC_DEFUN(AC_STRUCT_ADDRINFO, [
 	AC_MSG_CHECKING(for addrinfo)
@@ -1038,9 +1195,11 @@
 		$1=no))
 	AC_MSG_RESULT($$1)
 	if test $$1 = yes; then
-		AC_DEFINE(HAVE_ADDRINFO)
+		AC_DEFINE(HAVE_ADDRINFO, 1,
+		    [define if you have the addrinfo function])
 	else
-		AC_DEFINE(NEED_ADDRINFO_H)
+		AC_DEFINE(NEED_ADDRINFO_H, 1,
+		    [define if you need to include missing/addrinfo.h])
 	fi
 ])
 
@@ -1091,114 +1250,8 @@
 		$1=no))
 	AC_MSG_RESULT($$1)
 	if test $$1 = yes; then
-		AC_DEFINE(HAVE_SOCKADDR_STORAGE)
-	fi
-])
-
-dnl
-dnl Checks for macro of IP address size
-AC_DEFUN(AC_CHECK_ADDRSZ, [
-	$1=yes
-dnl check for INADDRSZ
-	AC_MSG_CHECKING(for INADDRSZ)
-	AC_CACHE_VAL(ac_cv_inaddrsz,
-	AC_TRY_COMPILE([
-#		include <arpa/nameser.h>],
-		[int a = INADDRSZ],
-		ac_cv_inaddrsz=yes,
-		ac_cv_inaddrsz=no))
-	AC_MSG_RESULT($ac_cv_inaddrsz)
-	if test $ac_cv_inaddrsz = yes; then
-		AC_DEFINE(HAVE_INADDRSZ)
-	else
-		$1=no
-	fi
-dnl check for IN6ADDRSZ
-	AC_MSG_CHECKING(for IN6ADDRSZ)
-	AC_CACHE_VAL(ac_cv_in6addrsz,
-	AC_TRY_COMPILE([
-#		include <arpa/nameser.h>],
-		[int a = IN6ADDRSZ],
-		ac_cv_in6addrsz=yes,
-		ac_cv_in6addrsz=no))
-	AC_MSG_RESULT($ac_cv_in6addrsz)
-	if test $ac_cv_in6addrsz = yes; then
-		AC_DEFINE(HAVE_IN6ADDRSZ)
-	else
-		$1=no
-	fi
-])
-
-dnl
-dnl check for RES_USE_INET6
-AC_DEFUN(AC_CHECK_RES_USE_INET6, [
-	AC_MSG_CHECKING(for RES_USE_INET6)
-	AC_CACHE_VAL($1,
-	AC_TRY_COMPILE([
-#		include <sys/types.h>
-#		include <netinet/in.h>
-#		include <resolv.h>],
-		[int a = RES_USE_INET6],
-		$1=yes,
-		$1=no))
-	AC_MSG_RESULT($$1)
-	if test $$1 = yes; then
-		AC_DEFINE(HAVE_RES_USE_INET6)
-	fi
-])
-
-dnl
-dnl check for AAAA
-AC_DEFUN(AC_CHECK_AAAA, [
-	AC_MSG_CHECKING(for AAAA)
-	AC_CACHE_VAL($1,
-	AC_TRY_COMPILE([
-#		include <sys/types.h>
-#		include <arpa/nameser.h>],
-		[int a = T_AAAA],
-		$1=yes,
-		$1=no))
-	AC_MSG_RESULT($$1)
-	if test $$1 = yes; then
-		AC_DEFINE(HAVE_AAAA)
-	fi
-])
-
-dnl
-dnl check for struct res_state_ext
-AC_DEFUN(AC_STRUCT_RES_STATE_EXT, [
-	AC_MSG_CHECKING(for res_state_ext)
-	AC_CACHE_VAL($1,
-	AC_TRY_COMPILE([
-#		include <sys/types.h>
-#		include <netinet/in.h>
-#		include <netinet6/in6.h>
-#		include <resolv.h>],
-		[struct __res_state_ext e],
-		$1=yes,
-		$1=no))
-	AC_MSG_RESULT($$1)
-	if test $$1 = yes; then
-		AC_DEFINE(HAVE_RES_STATE_EXT)
-	fi
-])
-
-dnl
-dnl check for struct res_state_ext
-AC_DEFUN(AC_STRUCT_RES_STATE, [
-	AC_MSG_CHECKING(for nsort in res_state)
-	AC_CACHE_VAL($1,
-	AC_TRY_COMPILE([
-#		include <sys/types.h>
-#		include <netinet/in.h>
-#		include <netinet6/in6.h>
-#		include <resolv.h>],
-		[struct __res_state e; e.nsort = 0],
-		$1=yes,
-		$1=no))
-	AC_MSG_RESULT($$1)
-	if test $$1 = yes; then
-		AC_DEFINE(HAVE_NEW_RES_STATE)
+		AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1,
+		    [define if you have struct sockaddr_storage])
 	fi
 ])
 
@@ -1215,7 +1268,8 @@
 		ac_cv_var_h_errno=no))
 	AC_MSG_RESULT($ac_cv_var_h_errno)
 	if test "$ac_cv_var_h_errno" = "yes"; then
-		AC_DEFINE(HAVE_H_ERRNO)
+		AC_DEFINE(HAVE_H_ERRNO, 1,
+		    [define if you have the h_errno variable])
 	fi
 ])
 
@@ -1226,7 +1280,7 @@
 AC_DEFUN(AC_C___ATTRIBUTE__, [
 AC_MSG_CHECKING(for __attribute__)
 AC_CACHE_VAL(ac_cv___attribute__, [
-AC_COMPILE_IFELSE(
+AC_COMPILE_IFELSE([
   AC_LANG_SOURCE([[
 #include <stdlib.h>
 
@@ -1243,14 +1297,177 @@
 {
   foo();
 }
-  ]]),
+  ]])],
 ac_cv___attribute__=yes,
 ac_cv___attribute__=no)])
 if test "$ac_cv___attribute__" = "yes"; then
   AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
+else
+  #
+  # We can't use __attribute__, so we can't use __attribute__((unused)),
+  # so we define _U_ to an empty string.
+  #
+  V_DEFS="$V_DEFS -D_U_=\"\""
+fi
+AC_MSG_RESULT($ac_cv___attribute__)
+])
+
+
+dnl
+dnl Test whether __attribute__((unused)) can be used without warnings
+dnl
+
+AC_DEFUN(AC_C___ATTRIBUTE___UNUSED, [
+AC_MSG_CHECKING([whether __attribute__((unused)) can be used without warnings])
+AC_CACHE_VAL(ac_cv___attribute___unused, [
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+AC_COMPILE_IFELSE([
+  AC_LANG_SOURCE([[
+#include <stdlib.h>
+#include <stdio.h>
+
+int
+main(int argc  __attribute((unused)), char **argv __attribute((unused)))
+{
+  printf("Hello, world!\n");
+  return 0;
+}
+  ]])],
+ac_cv___attribute___unused=yes,
+ac_cv___attribute___unused=no)])
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___unused" = "yes"; then
   V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
 else
   V_DEFS="$V_DEFS -D_U_=\"\""
 fi
-AC_MSG_RESULT($ac_cv___attribute__)
+AC_MSG_RESULT($ac_cv___attribute___unused)
+])
+
+dnl
+dnl Test whether __attribute__((format)) can be used without warnings
+dnl
+
+AC_DEFUN(AC_C___ATTRIBUTE___FORMAT, [
+AC_MSG_CHECKING([whether __attribute__((format)) can be used without warnings])
+AC_CACHE_VAL(ac_cv___attribute___format, [
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+AC_COMPILE_IFELSE([
+  AC_LANG_SOURCE([[
+#include <stdlib.h>
+
+extern int foo(const char *fmt, ...)
+		  __attribute__ ((format (printf, 1, 2)));
+
+int
+main(int argc, char **argv)
+{
+  foo("%s", "test");
+}
+  ]])],
+ac_cv___attribute___format=yes,
+ac_cv___attribute___format=no)])
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___format" = "yes"; then
+  AC_DEFINE(__ATTRIBUTE___FORMAT_OK, 1,
+    [define if your compiler allows __attribute__((format)) without a warning])
+fi
+AC_MSG_RESULT($ac_cv___attribute___format)
+])
+
+dnl
+dnl Test whether __attribute__((format)) can be applied to function
+dnl pointers
+dnl
+
+AC_DEFUN(AC_C___ATTRIBUTE___FORMAT_FUNCTION_POINTER, [
+AC_MSG_CHECKING([whether __attribute__((format)) can be applied to function pointers])
+AC_CACHE_VAL(ac_cv___attribute___format_function_pointer, [
+AC_COMPILE_IFELSE([
+  AC_LANG_SOURCE([[
+#include <stdlib.h>
+
+extern int (*foo)(const char *fmt, ...)
+		  __attribute__ ((format (printf, 1, 2)));
+
+int
+main(int argc, char **argv)
+{
+  (*foo)("%s", "test");
+}
+  ]])],
+ac_cv___attribute___format_function_pointer=yes,
+ac_cv___attribute___format_function_pointer=no)])
+if test "$ac_cv___attribute___format_function_pointer" = "yes"; then
+  AC_DEFINE(__ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS, 1,
+    [define if your compiler allows __attribute__((format)) to be applied to function pointers])
+fi
+AC_MSG_RESULT($ac_cv___attribute___format_function_pointer)
+])
+
+AC_DEFUN(AC_C___ATTRIBUTE___NORETURN_FUNCTION_POINTER, [
+AC_MSG_CHECKING([whether __attribute__((noreturn)) can be applied to function pointers without warnings])
+AC_CACHE_VAL(ac_cv___attribute___noreturn_function_pointer, [
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+AC_COMPILE_IFELSE([
+  AC_LANG_SOURCE([[
+#include <stdlib.h>
+
+extern int (*foo)(int i)
+		  __attribute__ ((noreturn));
+
+int
+main(int argc, char **argv)
+{
+  (*foo)(1);
+}
+  ]])],
+ac_cv___attribute___noreturn_function_pointer=yes,
+ac_cv___attribute___noreturn_function_pointer=no)])
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___noreturn_function_pointer" = "yes"; then
+  AC_DEFINE(__ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS, 1,
+    [define if your compiler allows __attribute__((noreturn)) to be applied to function pointers])
+fi
+AC_MSG_RESULT($ac_cv___attribute___noreturn_function_pointer)
+])
+
+AC_DEFUN(AC_LBL_SSLEAY,
+    [
+	#
+	# Find the last component of $libdir; it's not necessarily
+	# "lib" - it might be "lib64" on, for example, x86-64
+	# Linux systems.
+	#
+	# We assume the directory in which we're looking for
+	# libcrypto has a subdirectory with that as its name.
+	#
+	tmplib=`echo "$libdir" | sed 's,.*/,,'`
+
+	#
+	# 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 "$1/$tmplib" -a \( -f "$1/$tmplib/libcrypto.a" -o \
+		          	    -f "$1/$tmplib/libcrypto.so" -o \
+		          	    -f "$1/$tmplib/libcrypto.sl" -o \
+			  	    -f "$1/$tmplib/libcrypto.dylib" \); then
+		ac_cv_ssleay_path="$1"
+	fi
+
+	#
+	# Make sure we have the headers as well.
+	#
+	if test -d "$1/include/openssl" -a -f "$1/include/openssl/des.h"; then
+		incdir="-I$1/include"
+	fi
 ])
diff --git a/addrtoname.c b/addrtoname.c
index 53d615f..745ffe3 100644
--- a/addrtoname.c
+++ b/addrtoname.c
@@ -23,7 +23,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
@@ -79,7 +79,6 @@
  */
 
 #define HASHNAMESIZE 4096
-#define BUFSIZE 128
 
 struct hnamemem {
 	u_int32_t addr;
@@ -87,12 +86,12 @@
 	struct hnamemem *nxt;
 };
 
-struct hnamemem hnametable[HASHNAMESIZE];
-struct hnamemem tporttable[HASHNAMESIZE];
-struct hnamemem uporttable[HASHNAMESIZE];
-struct hnamemem eprototable[HASHNAMESIZE];
-struct hnamemem dnaddrtable[HASHNAMESIZE];
-struct hnamemem ipxsaptable[HASHNAMESIZE];
+static struct hnamemem hnametable[HASHNAMESIZE];
+static struct hnamemem tporttable[HASHNAMESIZE];
+static struct hnamemem uporttable[HASHNAMESIZE];
+static struct hnamemem eprototable[HASHNAMESIZE];
+static struct hnamemem dnaddrtable[HASHNAMESIZE];
+static struct hnamemem ipxsaptable[HASHNAMESIZE];
 
 #if defined(INET6) && defined(WIN32)
 /*
@@ -141,7 +140,7 @@
 	struct h6namemem *nxt;
 };
 
-struct h6namemem h6nametable[HASHNAMESIZE];
+static struct h6namemem h6nametable[HASHNAMESIZE];
 #endif /* INET6 */
 
 struct enamemem {
@@ -154,9 +153,9 @@
 	struct enamemem *e_nxt;
 };
 
-struct enamemem enametable[HASHNAMESIZE];
-struct enamemem nsaptable[HASHNAMESIZE];
-struct enamemem bytestringtable[HASHNAMESIZE];
+static struct enamemem enametable[HASHNAMESIZE];
+static struct enamemem nsaptable[HASHNAMESIZE];
+static struct enamemem bytestringtable[HASHNAMESIZE];
 
 struct protoidmem {
 	u_int32_t p_oui;
@@ -165,7 +164,7 @@
 	struct protoidmem *p_nxt;
 };
 
-struct protoidmem protoidtable[HASHNAMESIZE];
+static struct protoidmem protoidtable[HASHNAMESIZE];
 
 /*
  * A faster replacement for inet_ntoa().
@@ -274,18 +273,24 @@
 getname6(const u_char *ap)
 {
 	register struct hostent *hp;
-	struct in6_addr addr;
+	union {
+		struct in6_addr addr;
+		struct for_hash_addr {
+			char fill[14];
+			u_int16_t d;
+		} addra;
+	} addr;
 	static struct h6namemem *p;		/* static for longjmp() */
 	register const char *cp;
 	char ntop_buf[INET6_ADDRSTRLEN];
 
 	memcpy(&addr, ap, sizeof(addr));
-	p = &h6nametable[*(u_int16_t *)&addr.s6_addr[14] & (HASHNAMESIZE-1)];
+	p = &h6nametable[addr.addra.d & (HASHNAMESIZE-1)];
 	for (; p->nxt; p = p->nxt) {
 		if (memcmp(&p->addr, &addr, sizeof(addr)) == 0)
 			return (p->name);
 	}
-	p->addr = addr;
+	p->addr = addr.addr;
 	p->nxt = newh6namemem();
 
 	/*
@@ -312,7 +317,7 @@
 }
 #endif /* INET6 */
 
-static char hex[] = "0123456789abcdef";
+static const char hex[] = "0123456789abcdef";
 
 
 /* Find the hash node that corresponds the ether address 'ep' */
@@ -382,6 +387,9 @@
 	tp->e_addr2 = k;
 
 	tp->e_bs = (u_char *) calloc(1, nlen + 1);
+	if (tp->e_bs == NULL)
+		error("lookup_bytestring: calloc");
+
 	memcpy(tp->e_bs, bs, nlen);
 	tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp));
 	if (tp->e_nxt == NULL)
@@ -509,14 +517,48 @@
 }
 
 const char *
-linkaddr_string(const u_char *ep, const unsigned int len)
+le64addr_string(const u_char *ep)
+{
+	const unsigned int len = 8;
+	register u_int i;
+	register char *cp;
+	register struct enamemem *tp;
+	char buf[BUFSIZE];
+
+	tp = lookup_bytestring(ep, len);
+	if (tp->e_name)
+		return (tp->e_name);
+
+	cp = buf;
+	for (i = len; i > 0 ; --i) {
+		*cp++ = hex[*(ep + i - 1) >> 4];
+		*cp++ = hex[*(ep + i - 1) & 0xf];
+		*cp++ = ':';
+	}
+	cp --;
+
+	*cp = '\0';
+
+	tp->e_name = strdup(buf);
+
+	return (tp->e_name);
+}
+
+const char *
+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 (len == 0)
+		return ("<empty>");
+
+	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)
@@ -743,7 +785,7 @@
 	}
 }
 
-static struct protoidlist {
+static const struct protoidlist {
 	const u_char protoid[5];
 	const char *name;
 } protoidlist[] = {
@@ -764,7 +806,7 @@
 {
 	register int i;
 	register struct protoidmem *tp;
-	struct protoidlist *pl;
+	const struct protoidlist *pl;
 	u_char protoid[5];
 
 	protoid[0] = 0;
@@ -788,7 +830,7 @@
 	}
 }
 
-static struct etherlist {
+static const struct etherlist {
 	const u_char addr[6];
 	const char *name;
 } etherlist[] = {
@@ -813,7 +855,7 @@
 static void
 init_etherarray(void)
 {
-	register struct etherlist *el;
+	register const struct etherlist *el;
 	register struct enamemem *tp;
 #ifdef USE_ETHER_NTOHOST
 	char name[256];
@@ -857,7 +899,7 @@
 	}
 }
 
-static struct tok ipxsap_db[] = {
+static const struct tok ipxsap_db[] = {
 	{ 0x0000, "Unknown" },
 	{ 0x0001, "User" },
 	{ 0x0002, "User Group" },
diff --git a/addrtoname.h b/addrtoname.h
index 67ded6e..cd5c41f 100644
--- a/addrtoname.h
+++ b/addrtoname.h
@@ -18,13 +18,23 @@
  * 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 *le64addr_string(const u_char *);
 extern const char *etherproto_string(u_short);
 extern const char *tcpport_string(u_short);
 extern const char *udpport_string(u_short);
diff --git a/af.c b/af.c
index 76d6178..2c8a928 100644
--- a/af.c
+++ b/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
@@ -28,7 +28,7 @@
 #include "interface.h"
 #include "af.h"
 
-struct tok af_values[] = {
+const struct tok af_values[] = {
     { 0,                      "Reserved"},
     { AFNUM_INET,             "IPv4"},
     { AFNUM_INET6,            "IPv6"},
@@ -50,7 +50,7 @@
     { 0, NULL},
 };
 
-struct tok bsd_af_values[] = {
+const struct tok bsd_af_values[] = {
     { BSD_AFNUM_INET, "IPv4" },
     { BSD_AFNUM_NS, "NS" },
     { BSD_AFNUM_ISO, "ISO" },
diff --git a/af.h b/af.h
index 1ba7662..679cc8e 100644
--- a/af.h
+++ b/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
@@ -17,8 +17,8 @@
  * Original code by Hannes Gredler (hannes@juniper.net)
  */
 
-extern struct tok af_values[];
-extern struct tok bsd_af_values[];
+extern const struct tok af_values[];
+extern const struct tok bsd_af_values[];
 
 /* RFC1700 address family numbers */
 #define AFNUM_INET	1
diff --git a/aodv.h b/aodv.h
index 335c175..c2dec47 100644
--- a/aodv.h
+++ b/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.
@@ -181,8 +181,9 @@
 
 struct aodv_hello {
 	struct	aodv_ext	eh;		/* extension header */
-	u_int32_t		interval;	/* expect my next hello in
-						 * (n) ms */
+	u_int8_t		interval[4];	/* expect my next hello in
+						 * (n) ms
+						 * NOTE: this is not aligned */
 };
 
 #define	AODV_EXT_HELLO	1
diff --git a/appletalk.h b/appletalk.h
index 67e62ef..ff972f6 100644
--- a/appletalk.h
+++ b/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/arcnet.h b/arcnet.h
index 6e649f6..3b60956 100644
--- a/arcnet.h
+++ b/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/atm.h b/atm.h
index c6ac53e..65ac5c1 100644
--- a/atm.h
+++ b/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/atmuni31.h b/atmuni31.h
index 304859a..ab7a03d 100644
--- a/atmuni31.h
+++ b/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.3 2007-10-22 19:37:51 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/bgp.h b/bgp.h
old mode 100755
new mode 100644
index 06be3ea..5081596
--- a/bgp.h
+++ b/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/bootp.h b/bootp.h
index 7c63d0c..b1b81dc 100644
--- a/bootp.h
+++ b/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.19 2008-04-22 09:46:03 hannes Exp $ (LBL) */
 /*
  * Bootstrap Protocol (BOOTP).  RFC951 and RFC1048.
  *
@@ -27,7 +27,8 @@
 	u_int8_t	bp_hops;	/* gateway hops */
 	u_int32_t	bp_xid;		/* transaction ID */
 	u_int16_t	bp_secs;	/* seconds since boot began */
-	u_int16_t	bp_flags;	/* flags - see bootp_flag_values[] in print-bootp.c */
+	u_int16_t	bp_flags;	/* flags - see bootp_flag_values[]
+					   in print-bootp.c */
 	struct in_addr	bp_ciaddr;	/* client IP address */
 	struct in_addr	bp_yiaddr;	/* 'your' IP address */
 	struct in_addr	bp_siaddr;	/* server IP address */
@@ -36,7 +37,7 @@
 	u_int8_t	bp_sname[64];	/* server host name */
 	u_int8_t	bp_file[128];	/* boot file name */
 	u_int8_t	bp_vend[64];	/* vendor-specific area */
-};
+} UNALIGNED;
 
 /*
  * UDP port numbers, server and client.
@@ -216,7 +217,7 @@
 	struct in_addr	v_ins1, v_ins2; /* IEN-116 name servers */
 	struct in_addr	v_ts1, v_ts2;	/* Time servers */
 	u_int8_t	v_unused[24];	/* currently unused */
-};
+} UNALIGNED;
 
 
 /* v_flags values */
diff --git a/bpf_dump.c b/bpf_dump.c
index 0cad4d9..b50d7e7 100644
--- a/bpf_dump.c
+++ b/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.17 2008-02-14 20:53:49 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -35,7 +35,7 @@
 #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/chdlc.h b/chdlc.h
index 4fb6e1d..d117263 100644
--- a/chdlc.h
+++ b/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/checksum.c b/checksum.c
new file mode 100644
index 0000000..57c02bd
--- /dev/null
+++ b/checksum.c
@@ -0,0 +1,194 @@
+/*
+ * 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 <assert.h>
+
+#include "interface.h"
+
+/*
+ * CRC-10 table generated using the following Python snippet:
+
+import sys
+
+crc_table = []
+for i in range(256):
+	accum = i << 2
+	for j in range(8):
+		accum <<= 1
+		if accum & 0x400:
+			accum ^= 0x633
+	crc_table.append(accum)
+
+for i in range(len(crc_table)/8):
+	for j in range(8):
+		sys.stdout.write("0x%04x, " % crc_table[i*8+j])
+	sys.stdout.write("\n")
+
+ */
+static const u_int16_t crc10_table[256] =
+{
+	0x0000, 0x0233, 0x0255, 0x0066, 0x0299, 0x00aa, 0x00cc, 0x02ff,
+	0x0301, 0x0132, 0x0154, 0x0367, 0x0198, 0x03ab, 0x03cd, 0x01fe,
+	0x0031, 0x0202, 0x0264, 0x0057, 0x02a8, 0x009b, 0x00fd, 0x02ce,
+	0x0330, 0x0103, 0x0165, 0x0356, 0x01a9, 0x039a, 0x03fc, 0x01cf,
+	0x0062, 0x0251, 0x0237, 0x0004, 0x02fb, 0x00c8, 0x00ae, 0x029d,
+	0x0363, 0x0150, 0x0136, 0x0305, 0x01fa, 0x03c9, 0x03af, 0x019c,
+	0x0053, 0x0260, 0x0206, 0x0035, 0x02ca, 0x00f9, 0x009f, 0x02ac,
+	0x0352, 0x0161, 0x0107, 0x0334, 0x01cb, 0x03f8, 0x039e, 0x01ad,
+	0x00c4, 0x02f7, 0x0291, 0x00a2, 0x025d, 0x006e, 0x0008, 0x023b,
+	0x03c5, 0x01f6, 0x0190, 0x03a3, 0x015c, 0x036f, 0x0309, 0x013a,
+	0x00f5, 0x02c6, 0x02a0, 0x0093, 0x026c, 0x005f, 0x0039, 0x020a,
+	0x03f4, 0x01c7, 0x01a1, 0x0392, 0x016d, 0x035e, 0x0338, 0x010b,
+	0x00a6, 0x0295, 0x02f3, 0x00c0, 0x023f, 0x000c, 0x006a, 0x0259,
+	0x03a7, 0x0194, 0x01f2, 0x03c1, 0x013e, 0x030d, 0x036b, 0x0158,
+	0x0097, 0x02a4, 0x02c2, 0x00f1, 0x020e, 0x003d, 0x005b, 0x0268,
+	0x0396, 0x01a5, 0x01c3, 0x03f0, 0x010f, 0x033c, 0x035a, 0x0169,
+	0x0188, 0x03bb, 0x03dd, 0x01ee, 0x0311, 0x0122, 0x0144, 0x0377,
+	0x0289, 0x00ba, 0x00dc, 0x02ef, 0x0010, 0x0223, 0x0245, 0x0076,
+	0x01b9, 0x038a, 0x03ec, 0x01df, 0x0320, 0x0113, 0x0175, 0x0346,
+	0x02b8, 0x008b, 0x00ed, 0x02de, 0x0021, 0x0212, 0x0274, 0x0047,
+	0x01ea, 0x03d9, 0x03bf, 0x018c, 0x0373, 0x0140, 0x0126, 0x0315,
+	0x02eb, 0x00d8, 0x00be, 0x028d, 0x0072, 0x0241, 0x0227, 0x0014,
+	0x01db, 0x03e8, 0x038e, 0x01bd, 0x0342, 0x0171, 0x0117, 0x0324,
+	0x02da, 0x00e9, 0x008f, 0x02bc, 0x0043, 0x0270, 0x0216, 0x0025,
+	0x014c, 0x037f, 0x0319, 0x012a, 0x03d5, 0x01e6, 0x0180, 0x03b3,
+	0x024d, 0x007e, 0x0018, 0x022b, 0x00d4, 0x02e7, 0x0281, 0x00b2,
+	0x017d, 0x034e, 0x0328, 0x011b, 0x03e4, 0x01d7, 0x01b1, 0x0382,
+	0x027c, 0x004f, 0x0029, 0x021a, 0x00e5, 0x02d6, 0x02b0, 0x0083,
+	0x012e, 0x031d, 0x037b, 0x0148, 0x03b7, 0x0184, 0x01e2, 0x03d1,
+	0x022f, 0x001c, 0x007a, 0x0249, 0x00b6, 0x0285, 0x02e3, 0x00d0,
+	0x011f, 0x032c, 0x034a, 0x0179, 0x0386, 0x01b5, 0x01d3, 0x03e0,
+	0x021e, 0x002d, 0x004b, 0x0278, 0x0087, 0x02b4, 0x02d2, 0x00e1
+};
+
+static void
+init_crc10_table(void)
+{   
+#define CRC10_POLYNOMIAL 0x633
+    register int i, j;
+    register u_int16_t accum;
+    u_int16_t verify_crc10_table[256];
+    
+    for ( i = 0;  i < 256;  i++ )
+    {
+        accum = ((unsigned short) i << 2);
+        for ( j = 0;  j < 8;  j++ )
+        {
+            if ((accum <<= 1) & 0x400) accum ^= CRC10_POLYNOMIAL;
+        }
+        verify_crc10_table[i] = accum;
+    }
+    assert(memcmp(verify_crc10_table,
+				  crc10_table,
+				  sizeof(verify_crc10_table)) == 0);
+#undef CRC10_POLYNOMIAL
+}
+
+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;
+
+    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/config.guess b/config.guess
index 4c5bde8..c2246a4 100755
--- a/config.guess
+++ b/config.guess
@@ -1,9 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+#   Free Software Foundation, Inc.
 
-timestamp='2003-10-16'
+timestamp='2009-12-30'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -17,23 +18,25 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a ChangeLog
+# entry.
 #
 # This script attempts to guess a canonical system name similar to
 # config.sub.  If it succeeds, it prints the system name on stdout, and
 # exits with 0.  Otherwise, it exits with 1.
 #
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
 
 me=`echo "$0" | sed -e 's,.*/,,'`
 
@@ -53,8 +56,9 @@
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -66,11 +70,11 @@
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -104,7 +108,7 @@
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
 trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
 : ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -123,7 +127,7 @@
 	;;
  ,,*)   CC_FOR_BUILD=$CC ;;
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
+esac ; set_cc_for_build= ;'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi@noc.rutgers.edu 1994-08-24)
@@ -158,6 +162,7 @@
 	    arm*) machine=arm-unknown ;;
 	    sh3el) machine=shl-unknown ;;
 	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
 	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
 	esac
 	# The Operating System including object format, if it has switched
@@ -166,7 +171,7 @@
 	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
 		eval $set_cc_for_build
 		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
-			| grep __ELF__ >/dev/null
+			| grep -q __ELF__
 		then
 		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
 		    # Return netbsd for either.  FIX?
@@ -196,53 +201,32 @@
 	# contains redundant information, the shorter form:
 	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
 	echo "${machine}-${os}${release}"
-	exit 0 ;;
-    amiga:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    arc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    hp300:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mac68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    macppc:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme68k:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvme88k:OpenBSD:*:*)
-	echo m88k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    mvmeppc:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pegasos:OpenBSD:*:*)
-	echo powerpc-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    pmax:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sgi:OpenBSD:*:*)
-	echo mipseb-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    sun3:OpenBSD:*:*)
-	echo m68k-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
-    wgrisc:OpenBSD:*:*)
-	echo mipsel-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:OpenBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
-	exit 0 ;;
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
     alpha:OSF1:*:*)
-	if test $UNAME_RELEASE = "V4.0"; then
+	case $UNAME_RELEASE in
+	*4.0)
 		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-	fi
+		;;
+	*5.*)
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
 	# According to Compaq, /usr/sbin/psrinfo has been available on
 	# OSF/1 and Tru64 systems produced since 1995.  I hope that
 	# covers most systems running today.  This code pipes the CPU
@@ -280,45 +264,49 @@
 	    "EV7.9 (21364A)")
 		UNAME_MACHINE="alphaev79" ;;
 	esac
+	# A Pn.n version is a patched version.
 	# A Vn.n version is a released version.
 	# A Tn.n version is a released field test version.
 	# A Xn.n version is an unreleased experimental baselevel.
 	# 1.2 uses "1.2" for uname -r.
-	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-	exit 0 ;;
-    Alpha*:OpenVMS:*:*)
-	echo alpha-hp-vms
-	exit 0 ;;
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit ;;
     Alpha\ *:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# Should we change UNAME_MACHINE based on the output of uname instead
 	# of the specific Alpha model?
 	echo alpha-pc-interix
-	exit 0 ;;
+	exit ;;
     21064:Windows_NT:50:3)
 	echo alpha-dec-winnt3.5
-	exit 0 ;;
+	exit ;;
     Amiga*:UNIX_System_V:4.0:*)
 	echo m68k-unknown-sysv4
-	exit 0;;
+	exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-amigaos
-	exit 0 ;;
+	exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
 	echo ${UNAME_MACHINE}-unknown-morphos
-	exit 0 ;;
+	exit ;;
     *:OS/390:*:*)
 	echo i370-ibm-openedition
-	exit 0 ;;
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
     *:OS400:*:*)
         echo powerpc-ibm-os400
-	exit 0 ;;
+	exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
 	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
 	echo hppa1.1-hitachi-hiuxmpp
-	exit 0;;
+	exit ;;
     Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
 	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
 	if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -326,32 +314,51 @@
 	else
 		echo pyramid-pyramid-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     NILE*:*:*:dcosx)
 	echo pyramid-pyramid-svr4
-	exit 0 ;;
+	exit ;;
     DRS?6000:unix:4.0:6*)
 	echo sparc-icl-nx6
-	exit 0 ;;
-    DRS?6000:UNIX_SV:4.2*:7*)
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
 	case `/usr/bin/uname -p` in
-	    sparc) echo sparc-icl-nx7 && exit 0 ;;
+	    sparc) echo sparc-icl-nx7; exit ;;
 	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
     sun4H:SunOS:5.*:*)
 	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
 	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    i86pc:SunOS:5.*:*)
-	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
     sun4*:SunOS:6*:*)
 	# According to config.sub, this is the proper way to canonicalize
 	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
 	# it's likely to be more like Solaris than SunOS4.
 	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     sun4*:SunOS:*:*)
 	case "`/usr/bin/arch -k`" in
 	    Series*|S4*)
@@ -360,10 +367,10 @@
 	esac
 	# Japanese Language versions have a version number like `4.1.3-JL'.
 	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit 0 ;;
+	exit ;;
     sun3*:SunOS:*:*)
 	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sun*:*:4.2BSD:*)
 	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
 	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
@@ -375,10 +382,10 @@
 		echo sparc-sun-sunos${UNAME_RELEASE}
 		;;
 	esac
-	exit 0 ;;
+	exit ;;
     aushp:SunOS:*:*)
 	echo sparc-auspex-sunos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
     # "atarist" or "atariste" at least should have a processor
@@ -389,37 +396,40 @@
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
 	echo m68k-atari-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
         echo m68k-milan-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
         echo m68k-hades-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
     powerpc:machten:*:*)
 	echo powerpc-apple-machten${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RISC*:Mach:*:*)
 	echo mips-dec-mach_bsd4.3
-	exit 0 ;;
+	exit ;;
     RISC*:ULTRIX:*:*)
 	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     VAX*:ULTRIX*:*:*)
 	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
 	echo clipper-intergraph-clix${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -443,32 +453,33 @@
 	  exit (-1);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c \
-	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-	  && exit 0
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
 	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     Motorola:PowerMAX_OS:*:*)
 	echo powerpc-motorola-powermax
-	exit 0 ;;
+	exit ;;
     Motorola:*:4.3:PL8-*)
 	echo powerpc-harris-powermax
-	exit 0 ;;
+	exit ;;
     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
 	echo powerpc-harris-powermax
-	exit 0 ;;
+	exit ;;
     Night_Hawk:Power_UNIX:*:*)
 	echo powerpc-harris-powerunix
-	exit 0 ;;
+	exit ;;
     m88k:CX/UX:7*:*)
 	echo m88k-harris-cxux7
-	exit 0 ;;
+	exit ;;
     m88k:*:4*:R4*)
 	echo m88k-motorola-sysv4
-	exit 0 ;;
+	exit ;;
     m88k:*:3*:R3*)
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -484,29 +495,29 @@
 	else
 	    echo i586-dg-dgux${UNAME_RELEASE}
 	fi
- 	exit 0 ;;
+ 	exit ;;
     M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
 	echo m88k-dolphin-sysv3
-	exit 0 ;;
+	exit ;;
     M88*:*:R3*:*)
 	# Delta 88k system running SVR3
 	echo m88k-motorola-sysv3
-	exit 0 ;;
+	exit ;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
 	echo m88k-tektronix-sysv3
-	exit 0 ;;
+	exit ;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
 	echo m68k-tektronix-bsd
-	exit 0 ;;
+	exit ;;
     *:IRIX*:*:*)
 	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-	exit 0 ;;
+	exit ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
-	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
-	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
     i*86:AIX:*:*)
 	echo i386-ibm-aix
-	exit 0 ;;
+	exit ;;
     ia64:AIX:*:*)
 	if [ -x /usr/bin/oslevel ] ; then
 		IBM_REV=`/usr/bin/oslevel`
@@ -514,7 +525,7 @@
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:2:3)
 	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
 		eval $set_cc_for_build
@@ -529,15 +540,19 @@
 			exit(0);
 			}
 EOF
-		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
-		echo rs6000-ibm-aix3.2.5
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
 	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
 		echo rs6000-ibm-aix3.2.4
 	else
 		echo rs6000-ibm-aix3.2
 	fi
-	exit 0 ;;
-    *:AIX:*:[45])
+	exit ;;
+    *:AIX:*:[456])
 	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
 	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
 		IBM_ARCH=rs6000
@@ -550,28 +565,28 @@
 		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
 	fi
 	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
+	exit ;;
     *:AIX:*:*)
 	echo rs6000-ibm-aix
-	exit 0 ;;
+	exit ;;
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
 	echo romp-ibm-bsd4.4
-	exit 0 ;;
+	exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
 	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
-	exit 0 ;;                           # report: romp-ibm BSD 4.3
+	exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
 	echo rs6000-bull-bosx
-	exit 0 ;;
+	exit ;;
     DPX/2?00:B.O.S.:*:*)
 	echo m68k-bull-sysv3
-	exit 0 ;;
+	exit ;;
     9000/[34]??:4.3bsd:1.*:*)
 	echo m68k-hp-bsd
-	exit 0 ;;
+	exit ;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
 	echo m68k-hp-bsd4.4
-	exit 0 ;;
+	exit ;;
     9000/[34678]??:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	case "${UNAME_MACHINE}" in
@@ -633,9 +648,19 @@
 	esac
 	if [ ${HP_ARCH} = "hppa2.0w" ]
 	then
-	    # avoid double evaluation of $set_cc_for_build
-	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
-	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
 	    then
 		HP_ARCH="hppa2.0w"
 	    else
@@ -643,11 +668,11 @@
 	    fi
 	fi
 	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     ia64:HP-UX:*:*)
 	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
 	echo ia64-hp-hpux${HPUX_REV}
-	exit 0 ;;
+	exit ;;
     3050*:HI-UX:*:*)
 	eval $set_cc_for_build
 	sed 's/^	//' << EOF >$dummy.c
@@ -675,207 +700,164 @@
 	  exit (0);
 	}
 EOF
-	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
 	echo unknown-hitachi-hiuxwe2
-	exit 0 ;;
+	exit ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
 	echo hppa1.1-hp-bsd
-	exit 0 ;;
+	exit ;;
     9000/8??:4.3bsd:*:*)
 	echo hppa1.0-hp-bsd
-	exit 0 ;;
+	exit ;;
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
 	echo hppa1.0-hp-mpeix
-	exit 0 ;;
+	exit ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
 	echo hppa1.1-hp-osf
-	exit 0 ;;
+	exit ;;
     hp8??:OSF1:*:*)
 	echo hppa1.0-hp-osf
-	exit 0 ;;
+	exit ;;
     i*86:OSF1:*:*)
 	if [ -x /usr/sbin/sysversion ] ; then
 	    echo ${UNAME_MACHINE}-unknown-osf1mk
 	else
 	    echo ${UNAME_MACHINE}-unknown-osf1
 	fi
-	exit 0 ;;
+	exit ;;
     parisc*:Lites*:*:*)
 	echo hppa1.1-hp-lites
-	exit 0 ;;
+	exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
 	echo c1-convex-bsd
-        exit 0 ;;
+        exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-        exit 0 ;;
+        exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
 	echo c34-convex-bsd
-        exit 0 ;;
+        exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
 	echo c38-convex-bsd
-        exit 0 ;;
+        exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
 	echo c4-convex-bsd
-        exit 0 ;;
+        exit ;;
     CRAY*Y-MP:*:*:*)
 	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*[A-Z]90:*:*:*)
 	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
 	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
 	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
 	      -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*TS:*:*:*)
 	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*T3E:*:*:*)
 	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     CRAY*SV1:*:*:*)
 	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	exit ;;
     *:UNICOS/mp:*:*)
-	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-	exit 0 ;;
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
 	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit 0 ;;
+        exit ;;
     5000:UNIX_System_V:4.*:*)
         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
         FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
         echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-	exit 0 ;;
+	exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
 	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     sparc*:BSD/OS:*:*)
 	echo sparc-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:BSD/OS:*:*)
 	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:FreeBSD:*:*)
-	# Determine whether the default compiler uses glibc.
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#if __GLIBC__ >= 2
-	LIBC=gnu
-	#else
-	LIBC=
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	# GNU/KFreeBSD systems have a "k" prefix to indicate we are using
-	# FreeBSD's kernel, but not the complete OS.
-	case ${LIBC} in gnu) kernel_only='k' ;; esac
-	echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
-	exit 0 ;;
+	case ${UNAME_MACHINE} in
+	    pc98)
+		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
     i*:CYGWIN*:*)
 	echo ${UNAME_MACHINE}-pc-cygwin
-	exit 0 ;;
-    i*:MINGW*:*)
+	exit ;;
+    *:MINGW*:*)
 	echo ${UNAME_MACHINE}-pc-mingw32
-	exit 0 ;;
+	exit ;;
+    i*:windows32*:*)
+    	# uname -m includes "-pc" on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
     i*:PW*:*)
 	echo ${UNAME_MACHINE}-pc-pw32
-	exit 0 ;;
-    x86:Interix*:[34]*)
-	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
-	exit 0 ;;
+	exit ;;
+    *:Interix*:*)
+    	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    authenticamd | genuineintel | EM64T)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
 	echo i${UNAME_MACHINE}-pc-mks
-	exit 0 ;;
+	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
 	# How do we know it's Interix rather than the generic POSIX subsystem?
 	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
 	# UNAME_MACHINE based on the output of uname instead of i386?
 	echo i586-pc-interix
-	exit 0 ;;
+	exit ;;
     i*:UWIN*:*)
 	echo ${UNAME_MACHINE}-pc-uwin
-	exit 0 ;;
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
     p*:CYGWIN*:*)
 	echo powerpcle-unknown-cygwin
-	exit 0 ;;
+	exit ;;
     prep*:SunOS:5.*:*)
 	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
+	exit ;;
     *:GNU:*:*)
 	# the GNU system
 	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit 0 ;;
+	exit ;;
     *:GNU/*:*:*)
 	# other systems with GNU libc and userland
 	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
-	exit 0 ;;
+	exit ;;
     i*86:Minix:*:*)
 	echo ${UNAME_MACHINE}-pc-minix
-	exit 0 ;;
-    arm*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    cris:Linux:*:*)
-	echo cris-axis-linux-gnu
-	exit 0 ;;
-    ia64:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    m68*:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
-    mips:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips
-	#undef mipsel
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mipsel
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
-	;;
-    mips64:Linux:*:*)
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#undef CPU
-	#undef mips64
-	#undef mips64el
-	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
-	CPU=mips64el
-	#else
-	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
-	CPU=mips64
-	#else
-	CPU=
-	#endif
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
-	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
-	;;
-    ppc:Linux:*:*)
-	echo powerpc-unknown-linux-gnu
-	exit 0 ;;
-    ppc64:Linux:*:*)
-	echo powerpc64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     alpha:Linux:*:*)
 	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -886,10 +868,80 @@
 	  EV67)  UNAME_MACHINE=alphaev67 ;;
 	  EV68*) UNAME_MACHINE=alphaev68 ;;
         esac
-	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	objdump --private-headers /bin/sh | grep -q ld.so.1
 	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
 	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
-	exit 0 ;;
+	exit ;;
+    arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+	else
+	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	LIBC=gnu
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=${UNAME_MACHINE}el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=${UNAME_MACHINE}
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo or32-unknown-linux-gnu
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-unknown-linux-gnu
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
 	# Look for CPU level
 	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -897,87 +949,40 @@
 	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
 	  *)    echo hppa-unknown-linux-gnu ;;
 	esac
-	exit 0 ;;
-    parisc64:Linux:*:* | hppa64:Linux:*:*)
-	echo hppa64-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
 	echo ${UNAME_MACHINE}-ibm-linux
-	exit 0 ;;
+	exit ;;
     sh64*:Linux:*:*)
     	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     sh*:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
 	echo ${UNAME_MACHINE}-unknown-linux-gnu
-	exit 0 ;;
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
     x86_64:Linux:*:*)
 	echo x86_64-unknown-linux-gnu
-	exit 0 ;;
-    i*86:Linux:*:*)
-	# The BFD linker knows what the default object file format is, so
-	# first see if it will tell us. cd to the root directory to prevent
-	# problems with other programs or directories called `ld' in the path.
-	# Set LC_ALL=C to ensure ld outputs messages in English.
-	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
-			 | sed -ne '/supported targets:/!d
-				    s/[ 	][ 	]*/ /g
-				    s/.*supported targets: *//
-				    s/ .*//
-				    p'`
-        case "$ld_supported_targets" in
-	  elf32-i386)
-		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
-		;;
-	  a.out-i386-linux)
-		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-		exit 0 ;;
-	  coff-i386)
-		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-		exit 0 ;;
-	  "")
-		# Either a pre-BFD a.out linker (linux-gnuoldld) or
-		# one that does not give us useful --help.
-		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
-		exit 0 ;;
-	esac
-	# Determine whether the default compiler is a.out or elf
-	eval $set_cc_for_build
-	sed 's/^	//' << EOF >$dummy.c
-	#include <features.h>
-	#ifdef __ELF__
-	# ifdef __GLIBC__
-	#  if __GLIBC__ >= 2
-	LIBC=gnu
-	#  else
-	LIBC=gnulibc1
-	#  endif
-	# else
-	LIBC=gnulibc1
-	# endif
-	#else
-	#ifdef __INTEL_COMPILER
-	LIBC=gnu
-	#else
-	LIBC=gnuaout
-	#endif
-	#endif
-	#ifdef __dietlibc__
-	LIBC=dietlibc
-	#endif
-EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
-	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
-	;;
+	exit ;;
+    xtensa*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
     i*86:DYNIX/ptx:4*:*)
 	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
 	# earlier versions are messed up and put the nodename in both
 	# sysname and nodename.
 	echo i386-sequent-sysv4
-	exit 0 ;;
+	exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
         # Unixware is an offshoot of SVR4, but it has its own version
         # number series starting with 2...
@@ -985,24 +990,27 @@
 	# I just have to hope.  -- rms.
         # Use sysv4.2uw... so that sysv4* matches it.
 	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-	exit 0 ;;
+	exit ;;
     i*86:OS/2:*:*)
 	# If we were able to find `uname', then EMX Unix compatibility
 	# is probably installed.
 	echo ${UNAME_MACHINE}-pc-os2-emx
-	exit 0 ;;
+	exit ;;
     i*86:XTS-300:*:STOP)
 	echo ${UNAME_MACHINE}-unknown-stop
-	exit 0 ;;
+	exit ;;
     i*86:atheos:*:*)
 	echo ${UNAME_MACHINE}-unknown-atheos
-	exit 0 ;;
-    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
 	echo i386-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     i*86:*DOS:*:*)
 	echo ${UNAME_MACHINE}-pc-msdosdjgpp
-	exit 0 ;;
+	exit ;;
     i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
 	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
 	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -1010,15 +1018,16 @@
 	else
 		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
 	fi
-	exit 0 ;;
-    i*86:*:5:[78]*)
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
 	case `/bin/uname -X | grep "^Machine"` in
 	    *486*)	     UNAME_MACHINE=i486 ;;
 	    *Pentium)	     UNAME_MACHINE=i586 ;;
 	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
 	esac
 	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
-	exit 0 ;;
+	exit ;;
     i*86:*:3.2:*)
 	if test -f /usr/options/cb.name; then
 		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -1036,73 +1045,86 @@
 	else
 		echo ${UNAME_MACHINE}-pc-sysv32
 	fi
-	exit 0 ;;
+	exit ;;
     pc:*:*:*)
 	# Left here for compatibility:
         # uname -m prints for DJGPP always 'pc', but it prints nothing about
-        # the processor, so we play safe by assuming i386.
-	echo i386-pc-msdosdjgpp
-        exit 0 ;;
+        # the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
+        exit ;;
     Intel:Mach:3*:*)
 	echo i386-pc-mach3
-	exit 0 ;;
+	exit ;;
     paragon:*:*:*)
 	echo i860-intel-osf1
-	exit 0 ;;
+	exit ;;
     i860:*:4.*:*) # i860-SVR4
 	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
 	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
 	else # Add other i860-SVR4 vendors below as they are discovered.
 	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
 	fi
-	exit 0 ;;
+	exit ;;
     mini*:CTIX:SYS*5:*)
 	# "miniframe"
 	echo m68010-convergent-sysv
-	exit 0 ;;
+	exit ;;
     mc68k:UNIX:SYSTEM5:3.51m)
 	echo m68k-convergent-sysv
-	exit 0 ;;
+	exit ;;
     M680?0:D-NIX:5.3:*)
 	echo m68k-diab-dnix
-	exit 0 ;;
-    M68*:*:R3V[567]*:*)
-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
 	OS_REL=''
 	test -r /etc/.relid \
 	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
 	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
 	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
+          && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
 	echo m68k-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     mc68030:UNIX_System_V:4.*:*)
 	echo m68k-atari-sysv4
-	exit 0 ;;
+	exit ;;
     TSUNAMI:LynxOS:2.*:*)
 	echo sparc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     rs6000:LynxOS:2.*:*)
 	echo rs6000-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
 	echo powerpc-unknown-lynxos${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SM[BE]S:UNIX_SV:*:*)
 	echo mips-dde-sysv${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     RM*:ReliantUNIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     RM*:SINIX-*:*:*)
 	echo mips-sni-sysv4
-	exit 0 ;;
+	exit ;;
     *:SINIX-*:*:*)
 	if uname -p 2>/dev/null >/dev/null ; then
 		UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1110,68 +1132,94 @@
 	else
 		echo ns32k-sni-sysv
 	fi
-	exit 0 ;;
+	exit ;;
     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
                       # says <Richard.M.Bartel@ccMail.Census.GOV>
         echo i586-unisys-sysv4
-        exit 0 ;;
+        exit ;;
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes@openmarket.com>.
 	# How about differentiating between stratus architectures? -djm
 	echo hppa1.1-stratus-sysv4
-	exit 0 ;;
+	exit ;;
     *:*:*:FTX*)
 	# From seanf@swdc.stratus.com.
 	echo i860-stratus-sysv4
-	exit 0 ;;
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
     *:VOS:*:*)
 	# From Paul.Green@stratus.com.
 	echo hppa1.1-stratus-vos
-	exit 0 ;;
+	exit ;;
     mc68*:A/UX:*:*)
 	echo m68k-apple-aux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     news*:NEWS-OS:6*:*)
 	echo mips-sony-newsos6
-	exit 0 ;;
+	exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
 	if [ -d /usr/nec ]; then
 	        echo mips-nec-sysv${UNAME_RELEASE}
 	else
 	        echo mips-unknown-sysv${UNAME_RELEASE}
 	fi
-        exit 0 ;;
+        exit ;;
     BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
 	echo powerpc-be-beos
-	exit 0 ;;
+	exit ;;
     BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
 	echo powerpc-apple-beos
-	exit 0 ;;
+	exit ;;
     BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
 	echo i586-pc-beos
-	exit 0 ;;
+	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
     SX-4:SUPER-UX:*:*)
 	echo sx4-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SX-5:SUPER-UX:*:*)
 	echo sx5-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     SX-6:SUPER-UX:*:*)
 	echo sx6-nec-superux${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
     Power*:Rhapsody:*:*)
 	echo powerpc-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Rhapsody:*:*)
 	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Darwin:*:*)
-	case `uname -p` in
-	    *86) UNAME_PROCESSOR=i686 ;;
-	    powerpc) UNAME_PROCESSOR=powerpc ;;
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    i386)
+		eval $set_cc_for_build
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		      grep IS_64BIT_ARCH >/dev/null
+		  then
+		      UNAME_PROCESSOR="x86_64"
+		  fi
+		fi ;;
+	    unknown) UNAME_PROCESSOR=powerpc ;;
 	esac
 	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
 	UNAME_PROCESSOR=`uname -p`
 	if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1179,22 +1227,25 @@
 		UNAME_MACHINE=pc
 	fi
 	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:QNX:*:4*)
 	echo i386-pc-qnx
-	exit 0 ;;
-    NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*)
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
 	echo nsr-tandem-nsk${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:NonStop-UX:*:*)
 	echo mips-compaq-nonstopux
-	exit 0 ;;
+	exit ;;
     BS2000:POSIX*:*:*)
 	echo bs2000-siemens-sysv
-	exit 0 ;;
+	exit ;;
     DS/*:UNIX_System_V:*:*)
 	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
     *:Plan9:*:*)
 	# "uname -m" is not consistent, so use $cputype instead. 386
 	# is converted to i386 for consistency with other x86
@@ -1205,31 +1256,50 @@
 	    UNAME_MACHINE="$cputype"
 	fi
 	echo ${UNAME_MACHINE}-unknown-plan9
-	exit 0 ;;
+	exit ;;
     *:TOPS-10:*:*)
 	echo pdp10-unknown-tops10
-	exit 0 ;;
+	exit ;;
     *:TENEX:*:*)
 	echo pdp10-unknown-tenex
-	exit 0 ;;
+	exit ;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
 	echo pdp10-dec-tops20
-	exit 0 ;;
+	exit ;;
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
 	echo pdp10-xkl-tops20
-	exit 0 ;;
+	exit ;;
     *:TOPS-20:*:*)
 	echo pdp10-unknown-tops20
-	exit 0 ;;
+	exit ;;
     *:ITS:*:*)
 	echo pdp10-unknown-its
-	exit 0 ;;
+	exit ;;
     SEI:*:*:SEIUX)
         echo mips-sei-seiux${UNAME_RELEASE}
-	exit 0 ;;
-    *:DRAGONFLY:*:*)
-	echo ${UNAME_MACHINE}-unknown-dragonfly${UNAME_RELEASE}
-	exit 0 ;;
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1261,7 +1331,7 @@
 #endif
 
 #if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
+  printf ("arm-acorn-riscix\n"); exit (0);
 #endif
 
 #if defined (hp300) && !defined (hpux)
@@ -1350,11 +1420,12 @@
 }
 EOF
 
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
 
 # Apollos put the system type in the environment.
 
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
 
 # Convex versions that predate uname can use getsysinfo(1)
 
@@ -1363,22 +1434,22 @@
     case `getsysinfo -f cpu_type` in
     c1*)
 	echo c1-convex-bsd
-	exit 0 ;;
+	exit ;;
     c2*)
 	if getsysinfo -f scalar_acc
 	then echo c32-convex-bsd
 	else echo c2-convex-bsd
 	fi
-	exit 0 ;;
+	exit ;;
     c34*)
 	echo c34-convex-bsd
-	exit 0 ;;
+	exit ;;
     c38*)
 	echo c38-convex-bsd
-	exit 0 ;;
+	exit ;;
     c4*)
 	echo c4-convex-bsd
-	exit 0 ;;
+	exit ;;
     esac
 fi
 
@@ -1389,7 +1460,9 @@
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-    ftp://ftp.gnu.org/pub/gnu/config/
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
diff --git a/config.h b/config.h
index 6cc6d75..83ef815 100644
--- a/config.h
+++ b/config.h
@@ -1,141 +1,9 @@
 /* config.h.  Generated from config.h.in by configure.  */
 /* config.h.in.  Generated from configure.in by autoheader.  */
-/* "generated automatically" means DO NOT MAKE CHANGES TO config.h.in --
- * make them to acconfig.h and rerun autoheader */
 
-/* Define if you have SSLeay 0.9.0b with the buggy cast128. */
-/* #undef HAVE_BUGGY_CAST128 */
-
-/* Define if you enable IPv6 support */
-#define INET6 1
-
-/* Define if you enable support for the libsmi. */
-/* #undef LIBSMI */
-
-/* Define if you have the <smi.h> header file.  */
-/* #undef HAVE_SMI_H */
-
-/* define if you have struct __res_state_ext */
-/* #undef HAVE_RES_STATE_EXT */
-
-/* define if your struct __res_state has the nsort member */
-/* #undef HAVE_NEW_RES_STATE */
-
-/*
- * define if struct ether_header.ether_dhost is a struct with ether_addr_octet
- */
-/* #undef ETHER_HEADER_HAS_EA */
-
-/* define if struct ether_arp contains arp_xsha */
-/* #undef ETHER_ARP_HAS_X */
-
-/* define if you have the addrinfo function. */
+/* define if you have the addrinfo function */
 #define HAVE_ADDRINFO 1
 
-/* define if you need to include missing/addrinfoh.h. */
-/* #undef NEED_ADDRINFO_H */
-
-/* define ifyou have the h_errno variable. */
-#define HAVE_H_ERRNO 1
-
-/* define if IN6ADDRSZ is defined (XXX not used!) */
-#define HAVE_IN6ADDRSZ 1
-
-/* define if INADDRSZ is defined (XXX not used!) */
-#define HAVE_INADDRSZ 1
-
-/* define if this is a development version, to use additional prototypes. */
-/* #undef HAVE_OS_PROTO_H */
-
-/* define if <unistd.h> defines __P() */
-/* #undef HAVE_PORTABLE_PROTOTYPE */
-
-/* define if RES_USE_INET6 is defined */
-#define HAVE_RES_USE_INET6 1
-
-/* define if struct sockaddr has the sa_len member */
-/* #undef HAVE_SOCKADDR_SA_LEN */
-
-/* define if you have struct sockaddr_storage */
-#define HAVE_SOCKADDR_STORAGE 1
-
-/* define if you have both getipnodebyname() and getipnodebyaddr() */
-/* #undef USE_GETIPNODEBY */
-
-/* define if you have ether_ntohost() and it works */
-/* #undef USE_ETHER_NTOHOST */
-
-/* define if libpcap has pcap_version */
-/* #undef HAVE_PCAP_VERSION */
-
-/* define if libpcap has pcap_debug */
-/* #undef HAVE_PCAP_DEBUG */
-
-/* define if libpcap has yydebug */
-/* #undef HAVE_YYDEBUG */
-
-/* define if libpcap has pcap_list_datalinks() */
-#define HAVE_PCAP_LIST_DATALINKS 1
-
-/* define if libpcap has pcap_set_datalink() */
-#define HAVE_PCAP_SET_DATALINK 1
-
-/* define if libpcap has pcap_datalink_name_to_val() */
-#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
-
-/* define if libpcap has pcap_datalink_val_to_description() */
-#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1
-
-/* define if libpcap has pcap_dump_ftell() */
-#define HAVE_PCAP_DUMP_FTELL 1
-
-/* define if you have getrpcbynumber() */
-/* #undef HAVE_GETRPCBYNUMBER */
-
-/* define if unaligned memory accesses fail */
-#define LBL_ALIGN 1
-
-/* The successful return value from signal (?)XXX */
-#define RETSIGVAL 
-
-/* Define this on IRIX */
-/* #undef _BSD_SIGNALS */
-
-/* For HP/UX ANSI compiler? */
-/* #undef _HPUX_SOURCE */
-
-/* AIX hack. */
-/* #undef _SUN */
-
-/* Workaround for missing 64-bit formats */
-/* #undef PRId64 */
-/* #undef PRIo64 */
-/* #undef PRIx64 */
-/* #undef PRIu64 */
-
-/* Whether or not to include the possibly-buggy SMB printer */
-#define TCPDUMP_DO_SMB 1
-
-/* Long story short: aclocal.m4 depends on autoconf 2.13
- * implementation details wrt "const"; newer versions
- * have different implementation details so for now we
- * put "const" here.  This may cause duplicate definitions
- * in config.h but that should be OK since they're the same.
- */
-/* #undef const */
-
-/* Define if you have the dnet_htoa function.  */
-/* #undef HAVE_DNET_HTOA */
-
-/* Define if you have a dnet_htoa declaration in <netdnet/dnetdb.h>.  */
-/* #undef HAVE_NETDNET_DNETDB_H_DNET_HTOA */
-
-/* define if should drop privileges by default */
-#define WITH_USER "shell"
-
-/* define if should chroot when dropping privileges */
-/* #undef WITH_CHROOT */
-
 /* Define to 1 if you have the `alarm' function. */
 #define HAVE_ALARM 1
 
@@ -144,19 +12,28 @@
 
 /* Define to 1 if you have the declaration of `ether_ntohost', and to 0 if you
    don't. */
-#define HAVE_DECL_ETHER_NTOHOST 1
+/* #undef HAVE_DECL_ETHER_NTOHOST */
+
+/* define if you have the dnet_htoa function */
+/* #undef HAVE_DNET_HTOA */
 
 /* Define to 1 if you have the `ether_ntohost' function. */
-#define HAVE_ETHER_NTOHOST 1
+/* #undef HAVE_ETHER_NTOHOST */
 
 /* Define to 1 if you have the <fcntl.h> header file. */
 #define HAVE_FCNTL_H 1
 
-/* Define to 1 if you have the `getaddrinfo' function. */
-/* #undef HAVE_GETADDRINFO */
+/* Define to 1 if you have the `fork' function. */
+#define HAVE_FORK 1
 
 /* Define to 1 if you have the `getnameinfo' function. */
-/* #undef HAVE_GETNAMEINFO */
+#define HAVE_GETNAMEINFO 1
+
+/* define if you have getrpcbynumber() */
+/* #undef HAVE_GETRPCBYNUMBER */
+
+/* define if you have the h_errno variable */
+#define HAVE_H_ERRNO 1
 
 /* Define to 1 if you have the <inttypes.h> header file. */
 #define HAVE_INTTYPES_H 1
@@ -176,6 +53,9 @@
 /* Define to 1 if you have the <netdnet/dnetdb.h> header file. */
 /* #undef HAVE_NETDNET_DNETDB_H */
 
+/* define if you have a dnet_htoa declaration in <netdnet/dnetdb.h> */
+/* #undef HAVE_NETDNET_DNETDB_H_DNET_HTOA */
+
 /* Define to 1 if you have the <netinet/ether.h> header file. */
 #define HAVE_NETINET_ETHER_H 1
 
@@ -188,12 +68,33 @@
 /* Define to 1 if you have the <openssl/evp.h> header file. */
 #define HAVE_OPENSSL_EVP_H 1
 
+/* if there's an os_proto.h for this platform, to use additional prototypes */
+/* #undef HAVE_OS_PROTO_H */
+
+/* Define to 1 if you have the <pcap/bluetooth.h> header file. */
+#define HAVE_PCAP_BLUETOOTH_H 1
+
 /* Define to 1 if you have the `pcap_breakloop' function. */
 #define HAVE_PCAP_BREAKLOOP 1
 
+/* Define to 1 if you have the `pcap_create' function. */
+#define HAVE_PCAP_CREATE 1
+
+/* define if libpcap has pcap_datalink_name_to_val() */
+#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
+
+/* define if libpcap has pcap_datalink_val_to_description() */
+#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1
+
+/* define if libpcap has pcap_debug */
+/* #undef HAVE_PCAP_DEBUG */
+
 /* Define to 1 if you have the `pcap_dump_flush' function. */
 #define HAVE_PCAP_DUMP_FLUSH 1
 
+/* define if libpcap has pcap_dump_ftell() */
+#define HAVE_PCAP_DUMP_FTELL 1
+
 /* Define to 1 if you have the `pcap_findalldevs' function. */
 #define HAVE_PCAP_FINDALLDEVS 1
 
@@ -203,12 +104,36 @@
 /* Define to 1 if you have the `pcap_lib_version' function. */
 #define HAVE_PCAP_LIB_VERSION 1
 
+/* define if libpcap has pcap_list_datalinks() */
+#define HAVE_PCAP_LIST_DATALINKS 1
+
+/* Define to 1 if you have the <pcap/nflog.h> header file. */
+#define HAVE_PCAP_NFLOG_H 1
+
+/* Define to 1 if you have the `pcap_setdirection' function. */
+#define HAVE_PCAP_SETDIRECTION 1
+
+/* define if libpcap has pcap_set_datalink() */
+#define HAVE_PCAP_SET_DATALINK 1
+
+/* Define to 1 if you have the `pcap_set_tstamp_type' function. */
+#define HAVE_PCAP_SET_TSTAMP_TYPE 1
+
+/* Define to 1 if you have the <pcap/usb.h> header file. */
+#define HAVE_PCAP_USB_H 1
+
+/* define if libpcap has pcap_version */
+/* #undef HAVE_PCAP_VERSION */
+
 /* Define to 1 if you have the `pfopen' function. */
 /* #undef HAVE_PFOPEN */
 
 /* Define to 1 if you have the <rpc/rpcent.h> header file. */
 /* #undef HAVE_RPC_RPCENT_H */
 
+/* Define to 1 if you have the <rpc/rpc.h> header file. */
+#define HAVE_RPC_RPC_H 1
+
 /* Define to 1 if you have the `setlinebuf' function. */
 #define HAVE_SETLINEBUF 1
 
@@ -224,6 +149,12 @@
 /* Define to 1 if you have the `snprintf' function. */
 #define HAVE_SNPRINTF 1
 
+/* if struct sockaddr has the sa_len member */
+/* #undef HAVE_SOCKADDR_SA_LEN */
+
+/* define if you have struct sockaddr_storage */
+#define HAVE_SOCKADDR_STORAGE 1
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #define HAVE_STDINT_H 1
 
@@ -269,20 +200,38 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #define HAVE_UNISTD_H 1
 
+/* Define to 1 if you have the `vfork' function. */
+#define HAVE_VFORK 1
+
 /* Define to 1 if you have the `vfprintf' function. */
 #define HAVE_VFPRINTF 1
 
 /* Define to 1 if you have the `vsnprintf' function. */
 #define HAVE_VSNPRINTF 1
 
+/* define if libpcap has yydebug */
+/* #undef HAVE_YYDEBUG */
+
 /* define if your compiler has __attribute__ */
 #define HAVE___ATTRIBUTE__ 1
 
+/* Define if you enable IPv6 support */
+#define INET6 1
+
+/* if unaligned access fails */
+/* #undef LBL_ALIGN */
+
+/* Define if you enable support for libsmi */
+/* #undef LIBSMI */
+
+/* define if you need to include missing/addrinfo.h */
+/* #undef NEED_ADDRINFO_H */
+
 /* Define to 1 if netinet/ether.h declares `ether_ntohost' */
 /* #undef NETINET_ETHER_H_DECLARES_ETHER_NTOHOST */
 
 /* Define to 1 if netinet/if_ether.h declares `ether_ntohost' */
-/* #define NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST */
+/* #undef NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST */
 
 /* Define to the address where bug reports for this package should be sent. */
 #define PACKAGE_BUGREPORT ""
@@ -296,46 +245,100 @@
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME ""
 
+/* Define to the home page for this package. */
+#define PACKAGE_URL ""
+
 /* Define to the version of this package. */
 #define PACKAGE_VERSION ""
 
+/* define if the platform doesn't define PRId64 */
+/* #undef PRId64 */
+
+/* define if the platform doesn't define PRIo64 */
+/* #undef PRIo64 */
+
+/* define if the platform doesn't define PRIx64 */
+/* #undef PRIu64 */
+
+/* define if the platform doesn't define PRIu64 */
+/* #undef PRIx64 */
+
 /* Define as the return type of signal handlers (`int' or `void'). */
 #define RETSIGTYPE void
 
-/* The size of `char', as computed by sizeof. */
-#define SIZEOF_CHAR 1
-
-/* The size of `int', as computed by sizeof. */
-#define SIZEOF_INT 4
-
-/* The size of `long', as computed by sizeof. */
-#define SIZEOF_LONG 4
-
-/* The size of `long long', as computed by sizeof. */
-#define SIZEOF_LONG_LONG 8
-
-/* The size of `short', as computed by sizeof. */
-#define SIZEOF_SHORT 2
+/* return value of signal handlers */
+#define RETSIGVAL /**/
 
 /* Define to 1 if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
+/* define if you want to build the possibly-buggy SMB printer */
+#define TCPDUMP_DO_SMB 1
+
 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
 #define TIME_WITH_SYS_TIME 1
 
+/* define if you have ether_ntohost() and it works */
+/* #undef USE_ETHER_NTOHOST */
+
+/* define if should chroot when dropping privileges */
+/* #undef WITH_CHROOT */
+
+/* define if should drop privileges by default */
+/* #undef WITH_USER */
+
+/* get BSD semantics on Irix */
+/* #undef _BSD_SIGNALS */
+
+/* define on AIX to get certain functions */
+/* #undef _SUN */
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+/* #undef _UINT32_T */
+
+/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+/* #undef _UINT64_T */
+
+/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+/* #undef _UINT8_T */
+
+/* define if your compiler allows __attribute__((format)) without a warning */
+#define __ATTRIBUTE___FORMAT_OK 1
+
+/* define if your compiler allows __attribute__((format)) to be applied to
+   function pointers */
+#define __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS 1
+
+/* define if your compiler allows __attribute__((noreturn)) to be applied to
+   function pointers */
+#define __ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS 1
+
+/* to handle Ultrix compilers that don't support const in prototypes */
+/* #undef const */
+
 /* Define as token for inline if inlining supported */
 #define inline inline
 
-/* Define to `short' if int16_t not defined. */
+/* Define to the type of a signed integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
 /* #undef int16_t */
 
-/* Define to `int' if int32_t not defined. */
+/* Define to the type of a signed integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
 /* #undef int32_t */
 
-/* Define to `long long' if int64_t not defined. */
+/* Define to the type of a signed integer type of width exactly 64 bits if
+   such a type exists and the standard includes do not define it. */
 /* #undef int64_t */
 
-/* Define to `signed char' if int8_t not defined. */
+/* Define to the type of a signed integer type of width exactly 8 bits if such
+   a type exists and the standard includes do not define it. */
 /* #undef int8_t */
 
 /* Define to `unsigned short' if u_int16_t not defined. */
@@ -349,3 +352,19 @@
 
 /* Define to `unsigned char' if u_int8_t not defined. */
 /* #undef u_int8_t */
+
+/* Define to the type of an unsigned integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef uint16_t */
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef uint32_t */
+
+/* Define to the type of an unsigned integer type of width exactly 64 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef uint64_t */
+
+/* Define to the type of an unsigned integer type of width exactly 8 bits if
+   such a type exists and the standard includes do not define it. */
+/* #undef uint8_t */
diff --git a/config.h.in b/config.h.in
index 86ffe06..ee088c7 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,140 +1,8 @@
 /* config.h.in.  Generated from configure.in by autoheader.  */
-/* "generated automatically" means DO NOT MAKE CHANGES TO config.h.in --
- * make them to acconfig.h and rerun autoheader */
 
-/* Define if you have SSLeay 0.9.0b with the buggy cast128. */
-#undef HAVE_BUGGY_CAST128
-
-/* Define if you enable IPv6 support */
-#undef INET6
-
-/* Define if you enable support for the libsmi. */
-#undef LIBSMI
-
-/* Define if you have the <smi.h> header file.  */
-#undef HAVE_SMI_H
-
-/* define if you have struct __res_state_ext */
-#undef HAVE_RES_STATE_EXT
-
-/* define if your struct __res_state has the nsort member */
-#undef HAVE_NEW_RES_STATE
-
-/*
- * define if struct ether_header.ether_dhost is a struct with ether_addr_octet
- */
-#undef ETHER_HEADER_HAS_EA
-
-/* define if struct ether_arp contains arp_xsha */
-#undef ETHER_ARP_HAS_X
-
-/* define if you have the addrinfo function. */
+/* define if you have the addrinfo function */
 #undef HAVE_ADDRINFO
 
-/* define if you need to include missing/addrinfoh.h. */
-#undef NEED_ADDRINFO_H
-
-/* define ifyou have the h_errno variable. */
-#undef HAVE_H_ERRNO
-
-/* define if IN6ADDRSZ is defined (XXX not used!) */
-#undef HAVE_IN6ADDRSZ
-
-/* define if INADDRSZ is defined (XXX not used!) */
-#undef HAVE_INADDRSZ
-
-/* define if this is a development version, to use additional prototypes. */
-#undef HAVE_OS_PROTO_H
-
-/* define if <unistd.h> defines __P() */
-#undef HAVE_PORTABLE_PROTOTYPE
-
-/* define if RES_USE_INET6 is defined */
-#undef HAVE_RES_USE_INET6
-
-/* define if struct sockaddr has the sa_len member */
-#undef HAVE_SOCKADDR_SA_LEN
-
-/* define if you have struct sockaddr_storage */
-#undef HAVE_SOCKADDR_STORAGE
-
-/* define if you have both getipnodebyname() and getipnodebyaddr() */
-#undef USE_GETIPNODEBY
-
-/* define if you have ether_ntohost() and it works */
-#undef USE_ETHER_NTOHOST
-
-/* define if libpcap has pcap_version */
-#undef HAVE_PCAP_VERSION
-
-/* define if libpcap has pcap_debug */
-#undef HAVE_PCAP_DEBUG
-
-/* define if libpcap has yydebug */
-#undef HAVE_YYDEBUG
-
-/* define if libpcap has pcap_list_datalinks() */
-#undef HAVE_PCAP_LIST_DATALINKS
-
-/* define if libpcap has pcap_set_datalink() */
-#undef HAVE_PCAP_SET_DATALINK
-
-/* define if libpcap has pcap_datalink_name_to_val() */
-#undef HAVE_PCAP_DATALINK_NAME_TO_VAL
-
-/* define if libpcap has pcap_datalink_val_to_description() */
-#undef HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION
-
-/* define if libpcap has pcap_dump_ftell() */
-#undef HAVE_PCAP_DUMP_FTELL
-
-/* define if you have getrpcbynumber() */
-#undef HAVE_GETRPCBYNUMBER
-
-/* define if unaligned memory accesses fail */
-#undef LBL_ALIGN
-
-/* The successful return value from signal (?)XXX */
-#undef RETSIGVAL
-
-/* Define this on IRIX */
-#undef _BSD_SIGNALS
-
-/* For HP/UX ANSI compiler? */
-#undef _HPUX_SOURCE
-
-/* AIX hack. */
-#undef _SUN
-
-/* Workaround for missing 64-bit formats */
-#undef PRId64
-#undef PRIo64
-#undef PRIx64
-#undef PRIu64
-
-/* Whether or not to include the possibly-buggy SMB printer */
-#undef TCPDUMP_DO_SMB
-
-/* Long story short: aclocal.m4 depends on autoconf 2.13
- * implementation details wrt "const"; newer versions
- * have different implementation details so for now we
- * put "const" here.  This may cause duplicate definitions
- * in config.h but that should be OK since they're the same.
- */
-#undef const
-
-/* Define if you have the dnet_htoa function.  */
-#undef HAVE_DNET_HTOA
-
-/* Define if you have a dnet_htoa declaration in <netdnet/dnetdb.h>.  */
-#undef HAVE_NETDNET_DNETDB_H_DNET_HTOA
-
-/* define if should drop privileges by default */
-#undef WITH_USER
-
-/* define if should chroot when dropping privileges */
-#undef WITH_CHROOT
-
 /* Define to 1 if you have the `alarm' function. */
 #undef HAVE_ALARM
 
@@ -145,18 +13,27 @@
    don't. */
 #undef HAVE_DECL_ETHER_NTOHOST
 
+/* define if you have the dnet_htoa function */
+#undef HAVE_DNET_HTOA
+
 /* Define to 1 if you have the `ether_ntohost' function. */
 #undef HAVE_ETHER_NTOHOST
 
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
-/* Define to 1 if you have the `getaddrinfo' function. */
-#undef HAVE_GETADDRINFO
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
 
 /* Define to 1 if you have the `getnameinfo' function. */
 #undef HAVE_GETNAMEINFO
 
+/* define if you have getrpcbynumber() */
+#undef HAVE_GETRPCBYNUMBER
+
+/* define if you have the h_errno variable */
+#undef HAVE_H_ERRNO
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
@@ -175,6 +52,9 @@
 /* Define to 1 if you have the <netdnet/dnetdb.h> header file. */
 #undef HAVE_NETDNET_DNETDB_H
 
+/* define if you have a dnet_htoa declaration in <netdnet/dnetdb.h> */
+#undef HAVE_NETDNET_DNETDB_H_DNET_HTOA
+
 /* Define to 1 if you have the <netinet/ether.h> header file. */
 #undef HAVE_NETINET_ETHER_H
 
@@ -187,12 +67,33 @@
 /* Define to 1 if you have the <openssl/evp.h> header file. */
 #undef HAVE_OPENSSL_EVP_H
 
+/* if there's an os_proto.h for this platform, to use additional prototypes */
+#undef HAVE_OS_PROTO_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 if libpcap has pcap_datalink_name_to_val() */
+#undef HAVE_PCAP_DATALINK_NAME_TO_VAL
+
+/* define if libpcap has pcap_datalink_val_to_description() */
+#undef HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION
+
+/* define if libpcap has pcap_debug */
+#undef HAVE_PCAP_DEBUG
+
 /* Define to 1 if you have the `pcap_dump_flush' function. */
 #undef HAVE_PCAP_DUMP_FLUSH
 
+/* define if libpcap has pcap_dump_ftell() */
+#undef HAVE_PCAP_DUMP_FTELL
+
 /* Define to 1 if you have the `pcap_findalldevs' function. */
 #undef HAVE_PCAP_FINDALLDEVS
 
@@ -202,12 +103,36 @@
 /* Define to 1 if you have the `pcap_lib_version' function. */
 #undef HAVE_PCAP_LIB_VERSION
 
+/* define if libpcap has pcap_list_datalinks() */
+#undef HAVE_PCAP_LIST_DATALINKS
+
+/* Define to 1 if you have the <pcap/nflog.h> header file. */
+#undef HAVE_PCAP_NFLOG_H
+
+/* Define to 1 if you have the `pcap_setdirection' function. */
+#undef HAVE_PCAP_SETDIRECTION
+
+/* define if libpcap has pcap_set_datalink() */
+#undef HAVE_PCAP_SET_DATALINK
+
+/* Define to 1 if you have the `pcap_set_tstamp_type' function. */
+#undef HAVE_PCAP_SET_TSTAMP_TYPE
+
+/* Define to 1 if you have the <pcap/usb.h> header file. */
+#undef HAVE_PCAP_USB_H
+
+/* define if libpcap has pcap_version */
+#undef HAVE_PCAP_VERSION
+
 /* Define to 1 if you have the `pfopen' function. */
 #undef HAVE_PFOPEN
 
 /* Define to 1 if you have the <rpc/rpcent.h> header file. */
 #undef HAVE_RPC_RPCENT_H
 
+/* Define to 1 if you have the <rpc/rpc.h> header file. */
+#undef HAVE_RPC_RPC_H
+
 /* Define to 1 if you have the `setlinebuf' function. */
 #undef HAVE_SETLINEBUF
 
@@ -223,6 +148,12 @@
 /* Define to 1 if you have the `snprintf' function. */
 #undef HAVE_SNPRINTF
 
+/* if struct sockaddr has the sa_len member */
+#undef HAVE_SOCKADDR_SA_LEN
+
+/* define if you have struct sockaddr_storage */
+#undef HAVE_SOCKADDR_STORAGE
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
@@ -268,15 +199,33 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
+
 /* Define to 1 if you have the `vfprintf' function. */
 #undef HAVE_VFPRINTF
 
 /* Define to 1 if you have the `vsnprintf' function. */
 #undef HAVE_VSNPRINTF
 
+/* define if libpcap has yydebug */
+#undef HAVE_YYDEBUG
+
 /* define if your compiler has __attribute__ */
 #undef HAVE___ATTRIBUTE__
 
+/* Define if you enable IPv6 support */
+#undef INET6
+
+/* if unaligned access fails */
+#undef LBL_ALIGN
+
+/* Define if you enable support for libsmi */
+#undef LIBSMI
+
+/* define if you need to include missing/addrinfo.h */
+#undef NEED_ADDRINFO_H
+
 /* Define to 1 if netinet/ether.h declares `ether_ntohost' */
 #undef NETINET_ETHER_H_DECLARES_ETHER_NTOHOST
 
@@ -295,46 +244,100 @@
 /* Define to the one symbol short name of this package. */
 #undef PACKAGE_TARNAME
 
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
+/* define if the platform doesn't define PRId64 */
+#undef PRId64
+
+/* define if the platform doesn't define PRIo64 */
+#undef PRIo64
+
+/* define if the platform doesn't define PRIx64 */
+#undef PRIu64
+
+/* define if the platform doesn't define PRIu64 */
+#undef PRIx64
+
 /* Define as the return type of signal handlers (`int' or `void'). */
 #undef RETSIGTYPE
 
-/* The size of `char', as computed by sizeof. */
-#undef SIZEOF_CHAR
-
-/* The size of `int', as computed by sizeof. */
-#undef SIZEOF_INT
-
-/* The size of `long', as computed by sizeof. */
-#undef SIZEOF_LONG
-
-/* The size of `long long', as computed by sizeof. */
-#undef SIZEOF_LONG_LONG
-
-/* The size of `short', as computed by sizeof. */
-#undef SIZEOF_SHORT
+/* return value of signal handlers */
+#undef RETSIGVAL
 
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
+/* define if you want to build the possibly-buggy SMB printer */
+#undef TCPDUMP_DO_SMB
+
 /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
 #undef TIME_WITH_SYS_TIME
 
+/* define if you have ether_ntohost() and it works */
+#undef USE_ETHER_NTOHOST
+
+/* define if should chroot when dropping privileges */
+#undef WITH_CHROOT
+
+/* define if should drop privileges by default */
+#undef WITH_USER
+
+/* get BSD semantics on Irix */
+#undef _BSD_SIGNALS
+
+/* define on AIX to get certain functions */
+#undef _SUN
+
+/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT32_T
+
+/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT64_T
+
+/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
+   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
+   #define below would cause a syntax error. */
+#undef _UINT8_T
+
+/* define if your compiler allows __attribute__((format)) without a warning */
+#undef __ATTRIBUTE___FORMAT_OK
+
+/* define if your compiler allows __attribute__((format)) to be applied to
+   function pointers */
+#undef __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS
+
+/* define if your compiler allows __attribute__((noreturn)) to be applied to
+   function pointers */
+#undef __ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS
+
+/* to handle Ultrix compilers that don't support const in prototypes */
+#undef const
+
 /* Define as token for inline if inlining supported */
 #undef inline
 
-/* Define to `short' if int16_t not defined. */
+/* Define to the type of a signed integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
 #undef int16_t
 
-/* Define to `int' if int32_t not defined. */
+/* Define to the type of a signed integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
 #undef int32_t
 
-/* Define to `long long' if int64_t not defined. */
+/* Define to the type of a signed integer type of width exactly 64 bits if
+   such a type exists and the standard includes do not define it. */
 #undef int64_t
 
-/* Define to `signed char' if int8_t not defined. */
+/* Define to the type of a signed integer type of width exactly 8 bits if such
+   a type exists and the standard includes do not define it. */
 #undef int8_t
 
 /* Define to `unsigned short' if u_int16_t not defined. */
@@ -348,3 +351,19 @@
 
 /* Define to `unsigned char' if u_int8_t not defined. */
 #undef u_int8_t
+
+/* Define to the type of an unsigned integer type of width exactly 16 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint16_t
+
+/* Define to the type of an unsigned integer type of width exactly 32 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint32_t
+
+/* Define to the type of an unsigned integer type of width exactly 64 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint64_t
+
+/* Define to the type of an unsigned integer type of width exactly 8 bits if
+   such a type exists and the standard includes do not define it. */
+#undef uint8_t
diff --git a/config.sub b/config.sub
index 5698174..8518609 100755
--- a/config.sub
+++ b/config.sub
@@ -1,9 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+#   Free Software Foundation, Inc.
 
-timestamp='2003-11-03'
+timestamp='2009-12-31'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,22 +22,26 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+
 # Please send patches to <config-patches@gnu.org>.  Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU ChangeLog entry.
 #
 # Configuration subroutine to validate and canonicalize a configuration type.
 # Supply the specified configuration type as an argument.
 # If it is invalid, we print an error message on stderr and exit with code 1.
 # Otherwise, we print the canonical config type on stdout and succeed.
 
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
 # that are meaningful with *any* GNU software.
@@ -70,8 +75,9 @@
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -83,11 +89,11 @@
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit 0 ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit 0 ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit 0 ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )	# Use stdin as input.
@@ -99,7 +105,7 @@
     *local*)
        # First pass through any local machine types.
        echo $1
-       exit 0;;
+       exit ;;
 
     * )
        break ;;
@@ -118,8 +124,10 @@
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
-  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -145,10 +153,13 @@
 	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
 	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
 	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-	-apple | -axis)
+	-apple | -axis | -knuth | -cray | -microblaze)
 		os=
 		basic_machine=$1
 		;;
+        -bluegene*)
+	        os=-cnk
+		;;
 	-sim | -cisco | -oki | -wec | -winbond)
 		os=
 		basic_machine=$1
@@ -170,6 +181,10 @@
 	-hiux*)
 		os=-hiuxwe2
 		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-sco5)
 		os=-sco3.2v5
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -186,6 +201,10 @@
 		# Don't forget version if it is 3.2v4 or newer.
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
 		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
 	-sco*)
 		os=-sco3.2v2
 		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -230,22 +249,28 @@
 	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
 	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
 	| am33_2.0 \
-	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+	| bfin \
 	| c4x | clipper \
 	| d10v | d30v | dlx | dsp16xx \
-	| fr30 | frv \
+	| fido | fr30 | frv \
 	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
 	| i370 | i860 | i960 | ia64 \
 	| ip2k | iq2000 \
-	| m32r | m68000 | m68k | m88k | mcore \
+	| lm32 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | mcore | mep | metag \
 	| mips | mipsbe | mipseb | mipsel | mipsle \
 	| mips16 \
 	| mips64 | mips64el \
-	| mips64vr | mips64vrel \
+	| mips64octeon | mips64octeonel \
 	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
 	| mips64vr4100 | mips64vr4100el \
 	| mips64vr4300 | mips64vr4300el \
 	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
 	| mipsisa32 | mipsisa32el \
 	| mipsisa32r2 | mipsisa32r2el \
 	| mipsisa64 | mipsisa64el \
@@ -254,30 +279,40 @@
 	| mipsisa64sr71k | mipsisa64sr71kel \
 	| mipstx39 | mipstx39el \
 	| mn10200 | mn10300 \
+	| moxie \
+	| mt \
 	| msp430 \
+	| nios | nios2 \
 	| ns16k | ns32k \
-	| openrisc | or32 \
+	| or32 \
 	| pdp10 | pdp11 | pj | pjl \
 	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
 	| pyramid \
-	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| rx \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
 	| sh64 | sh64le \
-	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
-	| strongarm \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu | strongarm \
 	| tahoe | thumb | tic4x | tic80 | tron \
+	| ubicom32 \
 	| v850 | v850e \
 	| we32k \
-	| x86 | xscale | xstormy16 | xtensa \
-	| z8k)
+	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| z8k | z80)
 		basic_machine=$basic_machine-unknown
 		;;
-	m6811 | m68hc11 | m6812 | m68hc12)
+	m6811 | m68hc11 | m6812 | m68hc12 | picochip)
 		# Motorola 68HC11/12.
 		basic_machine=$basic_machine-unknown
 		os=-none
 		;;
 	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
 		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
 
 	# We use `pc' rather than `unknown'
 	# because (1) that's what they normally are, and
@@ -297,28 +332,32 @@
 	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
 	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
 	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-	| avr-* \
-	| bs2000-* \
+	| avr-* | avr32-* \
+	| bfin-* | bs2000-* \
 	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-	| clipper-* | cydra-* \
+	| clipper-* | craynv-* | cydra-* \
 	| d10v-* | d30v-* | dlx-* \
 	| elxsi-* \
-	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
 	| h8300-* | h8500-* \
 	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
 	| i*86-* | i860-* | i960-* | ia64-* \
 	| ip2k-* | iq2000-* \
-	| m32r-* \
+	| lm32-* \
+	| m32c-* | m32r-* | m32rle-* \
 	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-	| m88110-* | m88k-* | mcore-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
 	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
 	| mips16-* \
 	| mips64-* | mips64el-* \
-	| mips64vr-* | mips64vrel-* \
+	| mips64octeon-* | mips64octeonel-* \
 	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
 	| mips64vr4100-* | mips64vr4100el-* \
 	| mips64vr4300-* | mips64vr4300el-* \
 	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
 	| mipsisa32-* | mipsisa32el-* \
 	| mipsisa32r2-* | mipsisa32r2el-* \
 	| mipsisa64-* | mipsisa64el-* \
@@ -326,26 +365,35 @@
 	| mipsisa64sb1-* | mipsisa64sb1el-* \
 	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
 	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
 	| msp430-* \
-	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+	| nios-* | nios2-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
 	| orion-* \
 	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
 	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
 	| pyramid-* \
-	| romp-* | rs6000-* \
-	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| romp-* | rs6000-* | rx-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
 	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
-	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
 	| tahoe-* | thumb-* \
-	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
 	| tron-* \
+	| ubicom32-* \
 	| v850-* | v850e-* | vax-* \
 	| we32k-* \
-	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
-	| xtensa-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa*-* \
 	| ymp-* \
-	| z8k-*)
+	| z8k-* | z80-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
 		;;
 	# Recognize the various machine names and aliases which stand
 	# for a CPU type and a company and sometimes even an OS.
@@ -363,6 +411,9 @@
 		basic_machine=a29k-amd
 		os=-udi
 		;;
+    	abacus)
+		basic_machine=abacus-unknown
+		;;
 	adobe68k)
 		basic_machine=m68010-adobe
 		os=-scout
@@ -380,6 +431,9 @@
 	amd64)
 		basic_machine=x86_64-pc
 		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	amdahl)
 		basic_machine=580-amdahl
 		os=-sysv
@@ -403,6 +457,10 @@
 		basic_machine=m68k-apollo
 		os=-bsd
 		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
 	aux)
 		basic_machine=m68k-apple
 		os=-aux
@@ -411,10 +469,26 @@
 		basic_machine=ns32k-sequent
 		os=-dynix
 		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
 	c90)
 		basic_machine=c90-cray
 		os=-unicos
 		;;
+        cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
 	convex-c1)
 		basic_machine=c1-convex
 		os=-bsd
@@ -439,12 +513,27 @@
 		basic_machine=j90-cray
 		os=-unicos
 		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
 	crds | unos)
 		basic_machine=m68k-crds
 		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
 	cris | cris-* | etrax*)
 		basic_machine=cris-axis
 		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
 	da30 | da30-*)
 		basic_machine=m68k-da30
 		;;
@@ -467,6 +556,14 @@
 		basic_machine=m88k-motorola
 		os=-sysv3
 		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
 	dpx20 | dpx20-*)
 		basic_machine=rs6000-bull
 		os=-bosx
@@ -617,6 +714,14 @@
 		basic_machine=m68k-isi
 		os=-sysv
 		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	m88k-omron*)
 		basic_machine=m88k-omron
 		;;
@@ -628,10 +733,17 @@
 		basic_machine=ns32k-utek
 		os=-sysv
 		;;
+        microblaze)
+		basic_machine=microblaze-xilinx
+		;;
 	mingw32)
 		basic_machine=i386-pc
 		os=-mingw32
 		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
 	miniframe)
 		basic_machine=m68000-convergent
 		;;
@@ -645,10 +757,6 @@
 	mips3*)
 		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
 		;;
-	mmix*)
-		basic_machine=mmix-knuth
-		os=-mmixware
-		;;
 	monitor)
 		basic_machine=m68k-rom68k
 		os=-coff
@@ -661,6 +769,9 @@
 		basic_machine=i386-pc
 		os=-msdos
 		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
 	mvs)
 		basic_machine=i370-ibm
 		os=-mvs
@@ -729,10 +840,6 @@
 	np1)
 		basic_machine=np1-gould
 		;;
-	nv1)
-		basic_machine=nv1-cray
-		os=-unicosmp
-		;;
 	nsr-tandem)
 		basic_machine=nsr-tandem
 		;;
@@ -740,9 +847,8 @@
 		basic_machine=hppa1.1-oki
 		os=-proelf
 		;;
-	or32 | or32-*)
+	openrisc | openrisc-*)
 		basic_machine=or32-unknown
-		os=-coff
 		;;
 	os400)
 		basic_machine=powerpc-ibm
@@ -764,6 +870,14 @@
 		basic_machine=i860-intel
 		os=-osf
 		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
 	pbd)
 		basic_machine=sparc-tti
 		;;
@@ -773,6 +887,12 @@
 	pc532 | pc532-*)
 		basic_machine=ns32k-pc532
 		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
 	pentium | p5 | k5 | k6 | nexgen | viac3)
 		basic_machine=i586-pc
 		;;
@@ -829,6 +949,10 @@
 		basic_machine=i586-unknown
 		os=-pw32
 		;;
+	rdos)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
 	rom68k)
 		basic_machine=m68k-rom68k
 		os=-coff
@@ -855,6 +979,10 @@
 	sb1el)
 		basic_machine=mipsisa64sb1el-unknown
 		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
 	sei)
 		basic_machine=mips-sei
 		os=-seiux
@@ -866,6 +994,9 @@
 		basic_machine=sh-hitachi
 		os=-hms
 		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
 	sh64)
 		basic_machine=sh64-unknown
 		;;
@@ -955,6 +1086,10 @@
 		basic_machine=tic6x-unknown
 		os=-coff
 		;;
+	tile*)
+		basic_machine=tile-unknown
+		os=-linux-gnu
+		;;
 	tx39)
 		basic_machine=mipstx39-unknown
 		;;
@@ -1015,6 +1150,10 @@
 		basic_machine=hppa1.1-winbond
 		os=-proelf
 		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
 	xps | xps100)
 		basic_machine=xps100-honeywell
 		;;
@@ -1026,6 +1165,10 @@
 		basic_machine=z8k-unknown
 		os=-sim
 		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
 	none)
 		basic_machine=none-none
 		os=-none
@@ -1045,6 +1188,9 @@
 	romp)
 		basic_machine=romp-ibm
 		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
 	rs6000)
 		basic_machine=rs6000-ibm
 		;;
@@ -1061,13 +1207,10 @@
 	we32k)
 		basic_machine=we32k-att
 		;;
-	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
 		basic_machine=sh-unknown
 		;;
-	sh64)
-		basic_machine=sh64-unknown
-		;;
-	sparc | sparcv9 | sparcv9b)
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
 		basic_machine=sparc-sun
 		;;
 	cydra)
@@ -1114,6 +1257,9 @@
         # First match some system type aliases
         # that might get confused with valid system types.
 	# -solaris* is a basic system type, with this one exception.
+        -auroraux)
+	        os=-auroraux
+		;;
 	-solaris1 | -solaris1.*)
 		os=`echo $os | sed -e 's|solaris1|sunos4|'`
 		;;
@@ -1134,25 +1280,30 @@
 	# Each alternative MUST END IN A *, to match a version number.
 	# -sysv* is not here because it comes later, after sysvr4.
 	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* \
 	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-	      | -aos* \
+	      | -aos* | -aros* \
 	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
 	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
 	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-	      | -chorusos* | -chorusrdb* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
 	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-	      | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
 	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
 	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
 	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
-	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
@@ -1170,7 +1321,7 @@
 		os=`echo $os | sed -e 's|nto|nto-qnx|'`
 		;;
 	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
 	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
 		;;
 	-mac*)
@@ -1215,6 +1366,9 @@
 	-atheos*)
 		os=-atheos
 		;;
+	-syllable*)
+		os=-syllable
+		;;
 	-386bsd)
 		os=-bsd
 		;;
@@ -1276,6 +1430,14 @@
 	-kaos*)
 		os=-kaos
 		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-dicos*)
+		os=-dicos
+		;;
+        -nacl*)
+	        ;;
 	-none)
 		;;
 	*)
@@ -1298,6 +1460,12 @@
 # system, and we'll never get to this point.
 
 case $basic_machine in
+        score-*)
+		os=-elf
+		;;
+        spu-*)
+		os=-elf
+		;;
 	*-acorn)
 		os=-riscix1.2
 		;;
@@ -1307,9 +1475,9 @@
 	arm*-semi)
 		os=-aout
 		;;
-    c4x-* | tic4x-*)
-        os=-coff
-        ;;
+        c4x-* | tic4x-*)
+        	os=-coff
+		;;
 	# This must come before the *-dec entry.
 	pdp10-*)
 		os=-tops20
@@ -1335,6 +1503,9 @@
 	m68*-cisco)
 		os=-aout
 		;;
+        mep-*)
+		os=-elf
+		;;
 	mips*-cisco)
 		os=-elf
 		;;
@@ -1353,9 +1524,15 @@
 	*-be)
 		os=-beos
 		;;
+	*-haiku)
+		os=-haiku
+		;;
 	*-ibm)
 		os=-aix
 		;;
+    	*-knuth)
+		os=-mmixware
+		;;
 	*-wec)
 		os=-proelf
 		;;
@@ -1458,7 +1635,7 @@
 			-sunos*)
 				vendor=sun
 				;;
-			-aix*)
+			-cnk*|-aix*)
 				vendor=ibm
 				;;
 			-beos*)
@@ -1521,7 +1698,7 @@
 esac
 
 echo $basic_machine$os
-exit 0
+exit
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/configure b/configure
index 2494df5..be60aa5 100755
--- a/configure
+++ b/configure
@@ -1,61 +1,81 @@
 #! /bin/sh
-# From configure.in Revision: 1.188.2.8 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61.
+# Generated by GNU Autoconf 2.69.
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
 esac
-
 fi
 
 
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
 
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
 fi
 
 
@@ -64,20 +84,19 @@
 # there to prevent editors from complaining about space-tab.
 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
 # splitting by setting IFS to empty value.)
-as_nl='
-'
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
+as_myself=
+case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
 IFS=$as_save_IFS
 
      ;;
@@ -88,32 +107,315 @@
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
 fi
 
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
 PS1='$ '
 PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-  fi
-done
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
 
-# Required to use basename.
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+	   done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
+$0: including any error possibly output before this
+$0: message. Then install a modern shell, or manually run
+$0: the script under such a shell if you do have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -127,13 +429,17 @@
   as_basename=false
 fi
 
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
-# Name of the executable.
 as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
 	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
+$as_echo X/"$0" |
     sed '/^.*\/\([^/][^/]*\)\/*$/{
 	    s//\1/
 	    q
@@ -148,294 +454,19 @@
 	  }
 	  s/.*/./; q'`
 
-# CDPATH.
-$as_unset CDPATH
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 
-if test "x$CONFIG_SHELL" = x; then
-  if (eval ":") 2>/dev/null; then
-  as_have_required=yes
-else
-  as_have_required=no
-fi
-
-  if test $as_have_required = yes && 	 (eval ":
-(as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=\$LINENO
-  as_lineno_2=\$LINENO
-  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
-  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
-") 2> /dev/null; then
-  :
-else
-  as_candidate_shells=
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  case $as_dir in
-	 /*)
-	   for as_base in sh bash ksh sh5; do
-	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
-	   done;;
-       esac
-done
-IFS=$as_save_IFS
-
-
-      for as_shell in $as_candidate_shells $SHELL; do
-	 # Try only shells that exist, to save several forks.
-	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
-		{ ("$as_shell") 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-_ASEOF
-}; then
-  CONFIG_SHELL=$as_shell
-	       as_have_required=yes
-	       if { "$as_shell" 2> /dev/null <<\_ASEOF
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
-esac
-
-fi
-
-
-:
-(as_func_return () {
-  (exit $1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = "$1" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test $exitcode = 0) || { (exit 1); exit 1; }
-
-(
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
-
-_ASEOF
-}; then
-  break
-fi
-
-fi
-
-      done
-
-      if test "x$CONFIG_SHELL" != x; then
-  for as_var in BASH_ENV ENV
-        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-        done
-        export CONFIG_SHELL
-        exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
-
-    if test $as_have_required = no; then
-  echo This script requires a shell more modern than all the
-      echo shells that I found on your system.  Please install a
-      echo modern shell, or manually run the script under such a
-      echo shell if you do have one.
-      { (exit 1); exit 1; }
-fi
-
-
-fi
-
-fi
-
-
-
-(eval "as_func_return () {
-  (exit \$1)
-}
-as_func_success () {
-  as_func_return 0
-}
-as_func_failure () {
-  as_func_return 1
-}
-as_func_ret_success () {
-  return 0
-}
-as_func_ret_failure () {
-  return 1
-}
-
-exitcode=0
-if as_func_success; then
-  :
-else
-  exitcode=1
-  echo as_func_success failed.
-fi
-
-if as_func_failure; then
-  exitcode=1
-  echo as_func_failure succeeded.
-fi
-
-if as_func_ret_success; then
-  :
-else
-  exitcode=1
-  echo as_func_ret_success failed.
-fi
-
-if as_func_ret_failure; then
-  exitcode=1
-  echo as_func_ret_failure succeeded.
-fi
-
-if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
-  :
-else
-  exitcode=1
-  echo positional parameters were not saved.
-fi
-
-test \$exitcode = 0") || {
-  echo No shell found that supports shell functions.
-  echo Please tell autoconf@gnu.org about your system,
-  echo including any error possibly output before this
-  echo message
-}
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
   sed -n '
     p
     /[$]LINENO/=
@@ -452,9 +483,12 @@
       s/-\n.*//
     ' >$as_me.lineno &&
   chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
   # original and so on.  Autoconf is especially sensitive to this).
@@ -463,84 +497,55 @@
   exit
 }
 
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
-
 ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
+case `echo -n x` in #(((((
 -n*)
-  case `echo 'x\c'` in
+  case `echo 'xy\c'` in
   *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
   esac;;
 *)
   ECHO_N='-n';;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
   rm -f conf$$.dir/conf$$.file
 else
   rm -f conf$$.dir
-  mkdir conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
 fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
 
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
   test -d ./-p && rmdir ./-p
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-	case $1 in
-        -*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -549,11 +554,11 @@
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
 
 # Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
@@ -568,7 +573,6 @@
 subdirs=
 MFLAGS=
 MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
 
 # Identity of this package.
 PACKAGE_NAME=
@@ -576,6 +580,7 @@
 PACKAGE_VERSION=
 PACKAGE_STRING=
 PACKAGE_BUGREPORT=
+PACKAGE_URL=
 
 ac_unique_file="tcpdump.c"
 # Factoring default headers for most tests.
@@ -614,74 +619,92 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL
-PATH_SEPARATOR
-PACKAGE_NAME
-PACKAGE_TARNAME
-PACKAGE_VERSION
-PACKAGE_STRING
-PACKAGE_BUGREPORT
-exec_prefix
-prefix
-program_transform_name
-bindir
-sbindir
-libexecdir
-datarootdir
-datadir
-sysconfdir
-sharedstatedir
-localstatedir
-includedir
-oldincludedir
-docdir
-infodir
-htmldir
-dvidir
-pdfdir
-psdir
-libdir
-localedir
-mandir
-DEFS
-ECHO_C
-ECHO_N
-ECHO_T
-LIBS
-build_alias
-host_alias
-target_alias
-build
-build_cpu
-build_vendor
-build_os
-host
-host_cpu
-host_vendor
-host_os
-SHLICC2
-CC
-CFLAGS
-LDFLAGS
-CPPFLAGS
-ac_ct_CC
-EXEEXT
-OBJEXT
-CPP
-GREP
-EGREP
-LIBOBJS
-V_CCOPT
-V_DEFS
-V_GROUP
-V_INCLS
-V_PCAPDEP
-LOCALSRC
-INSTALL_PROGRAM
-INSTALL_SCRIPT
+ac_subst_vars='LTLIBOBJS
 INSTALL_DATA
-LTLIBOBJS'
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+MAN_MISC_INFO
+MAN_FILE_FORMATS
+LOCALSRC
+V_PCAPDEP
+V_INCLS
+V_GROUP
+V_DEFS
+V_CCOPT
+MKDEP
+DEPENDENCY_CFLAG
+RANLIB
+PCAP_CONFIG
+LIBOBJS
+EGREP
+GREP
+CPP
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+SHLICC2
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
 ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_gcc
+enable_universal
+with_smi
+enable_smb
+with_user
+with_chroot
+enable_ipv6
+with_crypto
+'
       ac_precious_vars='build_alias
 host_alias
 target_alias
@@ -696,6 +719,8 @@
 # Initialize some variables set by options.
 ac_init_help=
 ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
 # The variables have the same names as the options, with
 # dashes changed to underlines.
 cache_file=/dev/null
@@ -751,8 +776,9 @@
   fi
 
   case $ac_option in
-  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)	ac_optarg=yes ;;
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -794,13 +820,20 @@
     datarootdir=$ac_optarg ;;
 
   -disable-* | --disable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
-    eval enable_$ac_feature=no ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
 
   -docdir | --docdir | --docdi | --doc | --do)
     ac_prev=docdir ;;
@@ -813,13 +846,20 @@
     dvidir=$ac_optarg ;;
 
   -enable-* | --enable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
-   { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
-    eval enable_$ac_feature=\$ac_optarg ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -1010,22 +1050,36 @@
     ac_init_version=: ;;
 
   -with-* | --with-*)
-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
-    eval with_$ac_package=\$ac_optarg ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
 
   -without-* | --without-*)
-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
-   { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
-    eval with_$ac_package=no ;;
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -1045,26 +1099,26 @@
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) { echo "$as_me: error: unrecognized option: $ac_option
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; }
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
-   { (exit 1); exit 1; }; }
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
 
   *)
     # FIXME: should be removed in autoconf 3.0.
-    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
     ;;
 
   esac
@@ -1072,23 +1126,36 @@
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { echo "$as_me: error: missing argument to $ac_option" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "missing argument to $ac_option"
 fi
 
-# Be sure to have absolute directory names.
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
 		libdir localedir mandir
 do
   eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
   case $ac_val in
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1102,8 +1169,6 @@
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1118,23 +1183,21 @@
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  { echo "$as_me: error: Working directory cannot be determined" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  { echo "$as_me: error: pwd does not report name of working directory" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
   # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$0" ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$0" : 'X\(//\)[^/]' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$0" |
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -1161,13 +1224,11 @@
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
-   { (exit 1); exit 1; }; }
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
 	pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1207,7 +1268,7 @@
       --help=short        display options specific to this package
       --help=recursive    display the short help of all the included packages
   -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
+  -q, --quiet, --silent   do not print \`checking ...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -C, --config-cache      alias for \`--cache-file=config.cache'
   -n, --no-create         do not create output files
@@ -1215,9 +1276,9 @@
 
 Installation directories:
   --prefix=PREFIX         install architecture-independent files in PREFIX
-			  [$ac_default_prefix]
+                          [$ac_default_prefix]
   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-			  [PREFIX]
+                          [PREFIX]
 
 By default, \`make install' will install all the files in
 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
@@ -1227,25 +1288,25 @@
 For better control, use the options below.
 
 Fine tuning of the installation directories:
-  --bindir=DIR           user executables [EPREFIX/bin]
-  --sbindir=DIR          system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
-  --libdir=DIR           object code libraries [EPREFIX/lib]
-  --includedir=DIR       C header files [PREFIX/include]
-  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR          info documentation [DATAROOTDIR/info]
-  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR           man documentation [DATAROOTDIR/man]
-  --docdir=DIR           documentation root [DATAROOTDIR/doc/PACKAGE]
-  --htmldir=DIR          html documentation [DOCDIR]
-  --dvidir=DIR           dvi documentation [DOCDIR]
-  --pdfdir=DIR           pdf documentation [DOCDIR]
-  --psdir=DIR            ps documentation [DOCDIR]
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
 _ACEOF
 
   cat <<\_ACEOF
@@ -1261,8 +1322,10 @@
   cat <<\_ACEOF
 
 Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-universal     don't build universal on OS X
   --enable-smb            enable possibly-buggy SMB printer default=yes
   --disable-smb           disable possibly-buggy SMB printer
   --enable-ipv6           enable ipv6 (with ipv4) support
@@ -1272,9 +1335,11 @@
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --without-gcc           don't use gcc
+  --with-smi              link with libsmi (allows to load MIBs on the fly to decode SNMP packets. default=yes
+  --without-smi           don't link with libsmi
   --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           use OpenSSL libcrypto [default=yes, if available]
 
 Some influential environment variables:
   CC          C compiler command
@@ -1282,13 +1347,14 @@
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
   LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
               you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
+Report bugs to the package provider.
 _ACEOF
 ac_status=$?
 fi
@@ -1296,15 +1362,17 @@
 if test "$ac_init_help" = "recursive"; then
   # If there are subdirs, report their specific --help.
   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" || continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
     ac_builddir=.
 
 case "$ac_dir" in
 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
 *)
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
   # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
   case $ac_top_builddir_sub in
   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1340,7 +1408,7 @@
       echo &&
       $SHELL "$ac_srcdir/configure" --help=recursive
     else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
     fi || ac_status=$?
     cd "$ac_pwd" || { ac_status=$?; break; }
   done
@@ -1350,21 +1418,602 @@
 if $ac_init_version; then
   cat <<\_ACEOF
 configure
-generated by GNU Autoconf 2.61
+generated by GNU Autoconf 2.69
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
   exit
 fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 test -x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); 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 $2
+
+/* 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 $2 ();
+/* 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_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_decl
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+	 return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+	    return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_find_intX_t LINENO BITS VAR
+# -----------------------------------
+# Finds a signed integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_intX_t ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
+$as_echo_n "checking for int$2_t... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+     # Order is important - never check a type that is potentially smaller
+     # than half of the expected target width.
+     for ac_type in int$2_t 'int' 'long int' \
+	 'long long int' 'short int' 'signed char'; do
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+	     enum { N = $2 / 2 - 1 };
+int
+main ()
+{
+static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+	        enum { N = $2 / 2 - 1 };
+int
+main ()
+{
+static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
+		 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  case $ac_type in #(
+  int$2_t) :
+    eval "$3=yes" ;; #(
+  *) :
+    eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       if eval test \"x\$"$3"\" = x"no"; then :
+
+else
+  break
+fi
+     done
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_find_intX_t
+
+# ac_fn_c_find_uintX_t LINENO BITS VAR
+# ------------------------------------
+# Finds an unsigned integer type with width BITS, setting cache variable VAR
+# accordingly.
+ac_fn_c_find_uintX_t ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
+$as_echo_n "checking for uint$2_t... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+     # Order is important - never check a type that is potentially smaller
+     # than half of the expected target width.
+     for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
+	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  case $ac_type in #(
+  uint$2_t) :
+    eval "$3=yes" ;; #(
+  *) :
+    eval "$3=\$ac_type" ;;
+esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+       if eval test \"x\$"$3"\" = x"no"; then :
+
+else
+  break
+fi
+     done
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_find_uintX_t
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by $as_me, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
@@ -1400,8 +2049,8 @@
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
-done
+    $as_echo "PATH: $as_dir"
+  done
 IFS=$as_save_IFS
 
 } >&5
@@ -1435,12 +2084,12 @@
     | -silent | --silent | --silen | --sile | --sil)
       continue ;;
     *\'*)
-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
     case $ac_pass in
-    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
     2)
-      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      as_fn_append ac_configure_args1 " '$ac_arg'"
       if test $ac_must_keep_next = true; then
 	ac_must_keep_next=false # Got value, back to normal.
       else
@@ -1456,13 +2105,13 @@
 	  -* ) ac_must_keep_next=true ;;
 	esac
       fi
-      ac_configure_args="$ac_configure_args '$ac_arg'"
+      as_fn_append ac_configure_args " '$ac_arg'"
       ;;
     esac
   done
 done
-$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
-$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
 
 # When interrupted or exit'd, cleanup temporary files, and complete
 # config.log.  We remove comments because anyway the quotes in there
@@ -1474,11 +2123,9 @@
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -1487,12 +2134,13 @@
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
       case $ac_var in #(
       _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
       esac ;;
     esac
   done
@@ -1511,128 +2159,136 @@
 )
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
       eval ac_val=\$$ac_var
       case $ac_val in
-      *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
       esac
-      echo "$ac_var='\''$ac_val'\''"
+      $as_echo "$ac_var='\''$ac_val'\''"
     done | sort
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
+      $as_echo "## ------------------- ##
 ## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
 	eval ac_val=\$$ac_var
 	case $ac_val in
-	*\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
 	esac
-	echo "$ac_var='\''$ac_val'\''"
+	$as_echo "$ac_var='\''$ac_val'\''"
       done | sort
       echo
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
       cat confdefs.h
       echo
     fi
     test "$ac_signal" != 0 &&
-      echo "$as_me: caught signal $ac_signal"
-    echo "$as_me: exit $exit_status"
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
   } >&5
   rm -f core *.core core.conftest.* &&
     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
     exit $exit_status
 ' 0
 for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
 done
 ac_signal=0
 
 # confdefs.h avoids OS command line length limits that DEFS can exceed.
 rm -f -r conftest* confdefs.h
 
+$as_echo "/* confdefs.h */" > confdefs.h
+
 # Predefined preprocessor variables.
 
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_NAME "$PACKAGE_NAME"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_VERSION "$PACKAGE_VERSION"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_STRING "$PACKAGE_STRING"
 _ACEOF
 
-
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
 _ACEOF
 
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
 
 # Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  set x "$CONFIG_SITE"
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
 elif test "x$prefix" != xNONE; then
-  set x "$prefix/share/config.site" "$prefix/etc/config.site"
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
 else
-  set x "$ac_default_prefix/share/config.site" \
-	"$ac_default_prefix/etc/config.site"
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
 fi
-shift
-for ac_site_file
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
 do
-  if test -r "$ac_site_file"; then
-    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
 if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special
-  # files actually), so we avoid doing that.
-  if test -f "$cache_file"; then
-    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
       [\\/]* | ?:[\\/]* ) . "$cache_file";;
       *)                      . "./$cache_file";;
     esac
   fi
 else
-  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
 
@@ -1646,60 +2302,56 @@
   eval ac_new_val=\$ac_env_${ac_var}_value
   case $ac_old_set,$ac_new_set in
     set,)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,set)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,);;
     *)
       if test "x$ac_old_val" != "x$ac_new_val"; then
-	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
-echo "$as_me:   former value:  $ac_old_val" >&2;}
-	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
-echo "$as_me:   current value: $ac_new_val" >&2;}
-	ac_cache_corrupted=:
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
       fi;;
   esac
   # Pass precious variables to config.status.
   if test "$ac_new_set" = set; then
     case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
     *) ac_arg=$ac_var=$ac_new_val ;;
     esac
     case " $ac_configure_args " in
       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
     esac
   fi
 done
 if $ac_cache_corrupted; then
-  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
-   { (exit 1); exit 1; }; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -1726,9 +2378,7 @@
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
 fi
 
 # These three variables are undocumented and unsupported,
@@ -1742,35 +2392,27 @@
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
-echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
-{ echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
-if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_build_alias=$build_alias
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
-echo "$as_me: error: invalid value of canonical build" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -1786,28 +2428,24 @@
 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 
-{ echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
-if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test "x$host_alias" = x; then
   ac_cv_host=$ac_cv_build
 else
   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
-echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
 fi
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
 case $ac_cv_host in
 *-*-*) ;;
-*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
-echo "$as_me: error: invalid value of canonical host" >&2;}
-   { (exit 1); exit 1; }; };;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
 esac
 host=$ac_cv_host
 ac_save_IFS=$IFS; IFS='-'
@@ -1829,15 +2467,15 @@
 
 
 
+
 # Check whether --with-gcc was given.
-if test "${with_gcc+set}" = set; then
+if test "${with_gcc+set}" = set; then :
   withval=$with_gcc;
 fi
 
-    V_CCOPT="-O"
     V_INCLS=""
     if test "${srcdir}" != "." ; then
-	    V_INCLS="-I\$(srcdir)"
+	    V_INCLS="-I$srcdir"
     fi
     if test "${CFLAGS+set}" = set; then
 	    LBL_CFLAGS="$CFLAGS"
@@ -1848,10 +2486,10 @@
 	    bsdi*)
 		    # Extract the first word of "shlicc2", so it can be a program name with args.
 set dummy shlicc2; 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_SHLICC2+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_SHLICC2+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$SHLICC2"; then
   ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
@@ -1861,14 +2499,14 @@
 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_SHLICC2="yes"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
   test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
@@ -1876,11 +2514,11 @@
 fi
 SHLICC2=$ac_cv_prog_SHLICC2
 if test -n "$SHLICC2"; then
-  { echo "$as_me:$LINENO: result: $SHLICC2" >&5
-echo "${ECHO_T}$SHLICC2" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5
+$as_echo "$SHLICC2" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -1895,7 +2533,8 @@
 	    CC=cc
 	    export CC
     fi
-    ac_ext=c
+
+ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -1903,10 +2542,10 @@
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; 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_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1916,25 +2555,25 @@
 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -1943,10 +2582,10 @@
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; 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_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -1956,25 +2595,25 @@
 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
   if test "x$ac_ct_CC" = x; then
@@ -1982,12 +2621,8 @@
   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;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     CC=$ac_ct_CC
@@ -2000,10 +2635,10 @@
           if test -n "$ac_tool_prefix"; then
     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; 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_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2013,25 +2648,25 @@
 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -2040,10 +2675,10 @@
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; 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_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2054,18 +2689,18 @@
 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
      fi
     ac_cv_prog_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 if test $ac_prog_rejected = yes; then
@@ -2084,11 +2719,11 @@
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -2099,10 +2734,10 @@
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; 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_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2112,25 +2747,25 @@
 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  { echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -2143,10 +2778,10 @@
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; 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_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2156,25 +2791,25 @@
 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
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
-done
+  done
 IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
@@ -2186,12 +2821,8 @@
   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;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
 esac
     CC=$ac_ct_CC
@@ -2201,51 +2832,37 @@
 fi
 
 
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
 
 # Provide some information about the compiler.
-echo "$as_me:$LINENO: checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (ac_try="$ac_compiler --version >&5"
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
 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_compiler --version >&5") 2>&5
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -v >&5"
-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_compiler -v >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (ac_try="$ac_compiler -V >&5"
-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_compiler -V >&5") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
 
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2257,42 +2874,38 @@
 }
 _ACEOF
 ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
-{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-#
-# List of possible output files, starting from the most likely.
-# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
-# only as a last resort.  b.out is created by i960 compilers.
-ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
-#
-# The IRIX 6 linker writes into existing files which may not be
-# executable, retaining their permissions.  Remove them first so a
-# subsequent execution test works.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
 ac_rmfiles=
 for ac_file in $ac_files
 do
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
   esac
 done
 rm -f $ac_rmfiles
 
-if { (ac_try="$ac_link_default"
+if { { ac_try="$ac_link_default"
 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_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_link_default") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
@@ -2302,14 +2915,14 @@
 do
   test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
 	;;
     [ab].out )
 	# We found the default executable, but exeext='' is most
 	# certainly right.
 	break;;
     *.* )
-        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
 	then :; else
 	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
 	fi
@@ -2328,78 +2941,41 @@
 else
   ac_file=''
 fi
-
-{ echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6; }
-if test -z "$ac_file"; then
-  echo "$as_me: failed program was:" >&5
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 fi
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
 ac_exeext=$ac_cv_exeext
 
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
-# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
-  if { ac_try='./$ac_file'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-    fi
-  fi
-fi
-{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
 ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
-{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6; }
-
-{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
-if { (ac_try="$ac_link"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+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_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_link") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
   # If both `conftest.exe' and `conftest' are `present' (well, observable)
 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
 # work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -2407,37 +2983,90 @@
 for ac_file in conftest.exe conftest conftest.*; do
   test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
 	  break;;
     * ) break;;
   esac
 done
 else
-  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
 fi
-
-rm -f conftest$ac_cv_exeext
-{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6; }
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
 
 rm -f conftest.$ac_ext
 EXEEXT=$ac_cv_exeext
 ac_exeext=$EXEEXT
-{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
-if test "${ac_cv_objext+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2449,51 +3078,46 @@
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { (ac_try="$ac_compile"
+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_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
   (eval "$ac_compile") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
   for ac_file in conftest.o conftest.obj conftest.*; do
   test -f "$ac_file" || continue;
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
        break;;
   esac
 done
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
 fi
-
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2507,54 +3131,34 @@
   return 0;
 }
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_compiler_gnu=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_compiler_gnu=no
+  ac_compiler_gnu=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
-GCC=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
-{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_save_c_werror_flag=$ac_c_werror_flag
    ac_c_werror_flag=yes
    ac_cv_prog_cc_g=no
    CFLAGS="-g"
-   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2565,34 +3169,11 @@
   return 0;
 }
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_g=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	CFLAGS=""
-      cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2603,35 +3184,12 @@
   return 0;
 }
 _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
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_compile "$LINENO"; then :
 
-	ac_c_werror_flag=$ac_save_c_werror_flag
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
 	 CFLAGS="-g"
-	 cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -2642,42 +3200,18 @@
   return 0;
 }
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    ac_c_werror_flag=$ac_save_c_werror_flag
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
@@ -2693,23 +3227,18 @@
     CFLAGS=
   fi
 fi
-{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
-echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_cv_prog_cc_c89=no
 ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
 struct buf { int x; };
 FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -2761,31 +3290,9 @@
 	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
-  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
+  if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_prog_cc_c89=$ac_arg
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
 rm -f core conftest.err conftest.$ac_objext
   test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
@@ -2796,17 +3303,19 @@
 # AC_CACHE_VAL
 case "x$ac_cv_prog_cc_c89" in
   x)
-    { echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6; } ;;
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
   xno)
-    { echo "$as_me:$LINENO: result: unsupported" >&5
-echo "${ECHO_T}unsupported" >&6; } ;;
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
   *)
     CC="$CC $ac_cv_prog_cc_c89"
-    { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
 esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
 
+fi
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2814,181 +3323,150 @@
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
+
+
+
+
+
     if test "$GCC" = yes ; then
-	    if test "$SHLICC2" = yes ; then
-		    ac_cv_lbl_gcc_vers=2
-		    V_CCOPT="-O2"
-	    else
-		    { echo "$as_me:$LINENO: checking gcc version" >&5
-echo $ECHO_N "checking gcc version... $ECHO_C" >&6; }
-		    if test "${ac_cv_lbl_gcc_vers+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_lbl_gcc_vers=`$CC -v 2>&1 | \
-			    sed -e '/^gcc version /!d' \
-				-e 's/^gcc version //' \
-				-e 's/ .*//' -e 's/^[^0-9]*//' \
-				-e 's/\..*//'`
-fi
+	    #
+	    # -Werror forces warnings to be errors.
+	    #
+	    ac_lbl_cc_force_warning_errors=-Werror
 
-		    { echo "$as_me:$LINENO: result: $ac_cv_lbl_gcc_vers" >&5
-echo "${ECHO_T}$ac_cv_lbl_gcc_vers" >&6; }
-		    if test $ac_cv_lbl_gcc_vers -gt 1 ; then
-			    V_CCOPT="-O2"
-		    fi
-	    fi
+	    #
+	    # Use -ffloat-store so that, on 32-bit x86, we don't
+	    # do 80-bit arithmetic with the FPU; that way we should
+	    # get the same results for floating-point calculations
+	    # on x86-32 and x86-64.
+	    #
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -ffloat-store option" >&5
+$as_echo_n "checking whether the compiler supports the -ffloat-store option... " >&6; }
+	save_CFLAGS="$CFLAGS"
+	CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -ffloat-store"
+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+		CFLAGS="$save_CFLAGS"
+		V_CCOPT="$V_CCOPT -ffloat-store"
+
+else
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
     else
-	    { echo "$as_me:$LINENO: checking that $CC handles ansi prototypes" >&5
-echo $ECHO_N "checking that $CC handles ansi prototypes... $ECHO_C" >&6; }
-	    if test "${ac_cv_lbl_cc_ansi_prototypes+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.  */
-#include <sys/types.h>
-int
-main ()
-{
-int frob(int, char *)
-  ;
-  return 0;
-}
-_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_cv_lbl_cc_ansi_prototypes=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lbl_cc_ansi_prototypes=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-	    { echo "$as_me:$LINENO: result: $ac_cv_lbl_cc_ansi_prototypes" >&5
-echo "${ECHO_T}$ac_cv_lbl_cc_ansi_prototypes" >&6; }
-	    if test $ac_cv_lbl_cc_ansi_prototypes = no ; then
-		    case "$host_os" in
-
-		    hpux*)
-			    { echo "$as_me:$LINENO: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5
-echo $ECHO_N "checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)... $ECHO_C" >&6; }
-			    savedcflags="$CFLAGS"
-			    CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
-			    if test "${ac_cv_lbl_cc_hpux_cc_aa+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.  */
-#include <sys/types.h>
-int
-main ()
-{
-int frob(int, char *)
-  ;
-  return 0;
-}
-_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_cv_lbl_cc_hpux_cc_aa=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lbl_cc_hpux_cc_aa=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-			    { echo "$as_me:$LINENO: result: $ac_cv_lbl_cc_hpux_cc_aa" >&5
-echo "${ECHO_T}$ac_cv_lbl_cc_hpux_cc_aa" >&6; }
-			    if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then
-				    { { echo "$as_me:$LINENO: error: see the INSTALL doc for more info" >&5
-echo "$as_me: error: see the INSTALL doc for more info" >&2;}
-   { (exit 1); exit 1; }; }
-			    fi
-			    CFLAGS="$savedcflags"
-			    V_CCOPT="-Aa $V_CCOPT"
-			    cat >>confdefs.h <<\_ACEOF
-#define _HPUX_SOURCE 1
-_ACEOF
-
-			    ;;
-
-		    *)
-			    { { echo "$as_me:$LINENO: error: see the INSTALL doc for more info" >&5
-echo "$as_me: error: see the INSTALL doc for more info" >&2;}
-   { (exit 1); exit 1; }; }
-			    ;;
-		    esac
-	    fi
 	    V_INCLS="$V_INCLS -I/usr/local/include"
 	    LDFLAGS="$LDFLAGS -L/usr/local/lib"
 
 	    case "$host_os" in
 
+	    darwin*)
+		    #
+		    # This is assumed either to be GCC or clang, both
+		    # of which use -Werror to force warnings to be errors.
+		    #
+		    ac_lbl_cc_force_warning_errors=-Werror
+		    ;;
+
+	    hpux*)
+		    #
+		    # HP C, which is what we presume we're using, doesn't
+		    # exit with a non-zero exit status if we hand it an
+		    # invalid -W flag, can't be forced to do so even with
+		    # +We, and doesn't handle GCC-style -W flags, so we
+		    # don't want to try using GCC-style -W flags.
+		    #
+		    ac_lbl_cc_dont_try_gcc_dashW=yes
+		    ;;
+
 	    irix*)
-		    V_CCOPT="$V_CCOPT -xansi -signed -O"
+		    #
+		    # MIPS C, which is what we presume we're using, doesn't
+		    # necessarily exit with a non-zero exit status if we
+		    # hand it an invalid -W flag, can't be forced to do
+		    # so, and doesn't handle GCC-style -W flags, so we
+		    # don't want to try using GCC-style -W flags.
+		    #
+		    ac_lbl_cc_dont_try_gcc_dashW=yes
+		    #
+		    # It also, apparently, defaults to "char" being
+		    # unsigned, unlike most other C implementations;
+		    # I suppose we could say "signed char" whenever
+		    # we want to guarantee a signed "char", but let's
+		    # just force signed chars.
+		    #
+		    # -xansi is normally the default, but the
+		    # configure script was setting it; perhaps -cckr
+		    # was the default in the Old Days.  (Then again,
+		    # that would probably be for backwards compatibility
+		    # in the days when ANSI C was Shiny and New, i.e.
+		    # 1989 and the early '90's, so maybe we can just
+		    # drop support for those compilers.)
+		    #
+		    # -g is equivalent to -g2, which turns off
+		    # optimization; we choose -g3, which generates
+		    # debugging information but doesn't turn off
+		    # optimization (even if the optimization would
+		    # cause inaccuracies in debugging).
+		    #
+		    V_CCOPT="$V_CCOPT -xansi -signed -g3"
 		    ;;
 
 	    osf*)
-		    V_CCOPT="$V_CCOPT -std1 -O"
+	    	    #
+		    # Presumed to be DEC OSF/1, Digital UNIX, or
+		    # Tru64 UNIX.
+		    #
+		    # The DEC C compiler, which is what we presume we're
+		    # using, doesn't exit with a non-zero exit status if we
+		    # hand it an invalid -W flag, can't be forced to do
+		    # so, and doesn't handle GCC-style -W flags, so we
+		    # don't want to try using GCC-style -W flags.
+		    #
+		    ac_lbl_cc_dont_try_gcc_dashW=yes
+		    #
+		    # -g is equivalent to -g2, which turns off
+		    # optimization; we choose -g3, which generates
+		    # debugging information but doesn't turn off
+		    # optimization (even if the optimization would
+		    # cause inaccuracies in debugging).
+		    #
+		    V_CCOPT="$V_CCOPT -g3"
+		    ;;
+
+	    solaris*)
+		    #
+		    # Assumed to be Sun C, which requires -errwarn to force
+		    # warnings to be treated as errors.
+		    #
+		    ac_lbl_cc_force_warning_errors=-errwarn
 		    ;;
 
 	    ultrix*)
-		    { echo "$as_me:$LINENO: checking that Ultrix $CC hacks const in prototypes" >&5
-echo $ECHO_N "checking that Ultrix $CC hacks const in prototypes... $ECHO_C" >&6; }
-		    if test "${ac_cv_lbl_cc_const_proto+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
+$as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
+		    if ${ac_cv_lbl_cc_const_proto+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
 int
@@ -3000,61 +3478,39 @@
   return 0;
 }
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_lbl_cc_const_proto=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lbl_cc_const_proto=no
+  ac_cv_lbl_cc_const_proto=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-		    { echo "$as_me:$LINENO: result: $ac_cv_lbl_cc_const_proto" >&5
-echo "${ECHO_T}$ac_cv_lbl_cc_const_proto" >&6; }
+		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5
+$as_echo "$ac_cv_lbl_cc_const_proto" >&6; }
 		    if test $ac_cv_lbl_cc_const_proto = no ; then
-			    cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
+
+$as_echo "#define const /**/" >>confdefs.h
 
 		    fi
 		    ;;
 	    esac
+	    V_CCOPT="$V_CCOPT -O"
     fi
 
-{ echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
-    if test "${ac_cv_lbl_inline+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$V_CCOPT"
+    if ${ac_cv_lbl_inline+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
 	ac_cv_lbl_inline=""
 	ac_lbl_cc_inline=no
 	for ac_lbl_inline in inline __inline__ __inline
 	do
-	    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #define inline $ac_lbl_inline
 		static inline struct iltest *foo(void);
@@ -3078,31 +3534,9 @@
   return 0;
 }
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_lbl_cc_inline=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 	    if test "$ac_lbl_cc_inline" = yes ; then
 		break;
@@ -3113,12 +3547,13 @@
 	fi
 fi
 
+    CFLAGS="$save_CFLAGS"
     if test ! -z "$ac_cv_lbl_inline" ; then
-	{ echo "$as_me:$LINENO: result: $ac_cv_lbl_inline" >&5
-echo "${ECHO_T}$ac_cv_lbl_inline" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5
+$as_echo "$ac_cv_lbl_inline" >&6; }
     else
-	{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
     fi
 
 cat >>confdefs.h <<_ACEOF
@@ -3126,19 +3561,16 @@
 _ACEOF
 
 
-{ echo "$as_me:$LINENO: checking for __attribute__" >&5
-echo $ECHO_N "checking for __attribute__... $ECHO_C" >&6; }
-if test "${ac_cv___attribute__+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5
+$as_echo_n "checking for __attribute__... " >&6; }
+if ${ac_cv___attribute__+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+
 #include <stdlib.h>
 
 static void foo(void) __attribute__ ((noreturn));
@@ -3156,61 +3588,210 @@
 }
 
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv___attribute__=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv___attribute__=no
+  ac_cv___attribute__=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
 if test "$ac_cv___attribute__" = "yes"; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE___ATTRIBUTE__ 1
-_ACEOF
+$as_echo "#define HAVE___ATTRIBUTE__ 1" >>confdefs.h
 
+else
+  #
+  # We can't use __attribute__, so we can't use __attribute__((unused)),
+  # so we define _U_ to an empty string.
+  #
+  V_DEFS="$V_DEFS -D_U_=\"\""
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute__" >&5
+$as_echo "$ac_cv___attribute__" >&6; }
+
+if test "$ac_cv___attribute__" = "yes"; then
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) can be used without warnings" >&5
+$as_echo_n "checking whether __attribute__((unused)) can be used without warnings... " >&6; }
+if ${ac_cv___attribute___unused+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#include <stdlib.h>
+#include <stdio.h>
+
+int
+main(int argc  __attribute((unused)), char **argv __attribute((unused)))
+{
+  printf("Hello, world!\n");
+  return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv___attribute___unused=yes
+else
+  ac_cv___attribute___unused=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___unused" = "yes"; then
   V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
 else
   V_DEFS="$V_DEFS -D_U_=\"\""
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv___attribute__" >&5
-echo "${ECHO_T}$ac_cv___attribute__" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___unused" >&5
+$as_echo "$ac_cv___attribute___unused" >&6; }
 
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((noreturn)) can be applied to function pointers without warnings" >&5
+$as_echo_n "checking whether __attribute__((noreturn)) can be applied to function pointers without warnings... " >&6; }
+if ${ac_cv___attribute___noreturn_function_pointer+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#include <stdlib.h>
+
+extern int (*foo)(int i)
+		  __attribute__ ((noreturn));
+
+int
+main(int argc, char **argv)
+{
+  (*foo)(1);
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv___attribute___noreturn_function_pointer=yes
+else
+  ac_cv___attribute___noreturn_function_pointer=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___noreturn_function_pointer" = "yes"; then
+
+$as_echo "#define __ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___noreturn_function_pointer" >&5
+$as_echo "$ac_cv___attribute___noreturn_function_pointer" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((format)) can be used without warnings" >&5
+$as_echo_n "checking whether __attribute__((format)) can be used without warnings... " >&6; }
+if ${ac_cv___attribute___format+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+save_CFLAGS="$CFLAGS"
+CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#include <stdlib.h>
+
+extern int foo(const char *fmt, ...)
+		  __attribute__ ((format (printf, 1, 2)));
+
+int
+main(int argc, char **argv)
+{
+  foo("%s", "test");
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv___attribute___format=yes
+else
+  ac_cv___attribute___format=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+CFLAGS="$save_CFLAGS"
+if test "$ac_cv___attribute___format" = "yes"; then
+
+$as_echo "#define __ATTRIBUTE___FORMAT_OK 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___format" >&5
+$as_echo "$ac_cv___attribute___format" >&6; }
+
+	if test "$ac_cv___attribute___format" = "yes"; then
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((format)) can be applied to function pointers" >&5
+$as_echo_n "checking whether __attribute__((format)) can be applied to function pointers... " >&6; }
+if ${ac_cv___attribute___format_function_pointer+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#include <stdlib.h>
+
+extern int (*foo)(const char *fmt, ...)
+		  __attribute__ ((format (printf, 1, 2)));
+
+int
+main(int argc, char **argv)
+{
+  (*foo)("%s", "test");
+}
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv___attribute___format_function_pointer=yes
+else
+  ac_cv___attribute___format_function_pointer=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test "$ac_cv___attribute___format_function_pointer" = "yes"; then
+
+$as_echo "#define __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___format_function_pointer" >&5
+$as_echo "$ac_cv___attribute___format_function_pointer" >&6; }
+
+	fi
+fi
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
-  if test "${ac_cv_prog_CPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -3224,11 +3805,7 @@
   # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __STDC__
 # include <limits.h>
@@ -3237,76 +3814,34 @@
 #endif
 		     Syntax error
 _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
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
 
+else
   # Broken: fails on valid input.
 continue
 fi
-
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _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
+if ac_fn_c_try_cpp "$LINENO"; then :
   # Broken: success on invalid input.
 continue
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
   # Passes both tests.
 ac_preproc_ok=:
 break
 fi
-
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
   break
 fi
 
@@ -3318,8 +3853,8 @@
 else
   ac_cv_prog_CPP=$CPP
 fi
-{ echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
 do
@@ -3329,11 +3864,7 @@
   # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #ifdef __STDC__
 # include <limits.h>
@@ -3342,83 +3873,40 @@
 #endif
 		     Syntax error
 _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
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+if ac_fn_c_try_cpp "$LINENO"; then :
 
+else
   # Broken: fails on valid input.
 continue
 fi
-
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _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
+if ac_fn_c_try_cpp "$LINENO"; then :
   # Broken: success on invalid input.
 continue
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
   # Passes both tests.
 ac_preproc_ok=:
 break
 fi
-
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
 else
-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 ac_ext=c
@@ -3428,45 +3916,40 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
-echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  # Extract the first word of "grep ggrep" to use in msg output
-if test -z "$GREP"; then
-set dummy grep ggrep; ac_prog_name=$2
-if test "${ac_cv_path_GREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+  if test -z "$GREP"; then
   ac_path_GREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in grep ggrep; do
-  for ac_exec_ext in '' $ac_executable_extensions; do
-    ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
-    # Check for GNU ac_path_GREP and select it if it is found.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
 *GNU*)
   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
 *)
   ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  $as_echo_n 0123456789 >"conftest.in"
   while :
   do
     cat "conftest.in" "conftest.in" >"conftest.tmp"
     mv "conftest.tmp" "conftest.in"
     cp "conftest.in" "conftest.nl"
-    echo 'GREP' >> "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
     if test $ac_count -gt ${ac_path_GREP_max-0}; then
       # Best one so far, save it but keep looking for a better one
       ac_cv_path_GREP="$ac_path_GREP"
@@ -3478,77 +3961,61 @@
   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
 
-
-    $ac_path_GREP_found && break 3
+      $ac_path_GREP_found && break 3
+    done
   done
-done
-
-done
+  done
 IFS=$as_save_IFS
-
-
-fi
-
-GREP="$ac_cv_path_GREP"
-if test -z "$GREP"; then
-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
 else
   ac_cv_path_GREP=$GREP
 fi
 
-
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
-echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
  GREP="$ac_cv_path_GREP"
 
 
-{ echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
    then ac_cv_path_EGREP="$GREP -E"
    else
-     # Extract the first word of "egrep" to use in msg output
-if test -z "$EGREP"; then
-set dummy egrep; ac_prog_name=$2
-if test "${ac_cv_path_EGREP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+     if test -z "$EGREP"; then
   ac_path_EGREP_found=false
-# Loop through the user's path and test for each of PROGNAME-LIST
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for ac_prog in egrep; do
-  for ac_exec_ext in '' $ac_executable_extensions; do
-    ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-    { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
-    # Check for GNU ac_path_EGREP and select it if it is found.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
 *GNU*)
   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
 *)
   ac_count=0
-  echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+  $as_echo_n 0123456789 >"conftest.in"
   while :
   do
     cat "conftest.in" "conftest.in" >"conftest.tmp"
     mv "conftest.tmp" "conftest.in"
     cp "conftest.in" "conftest.nl"
-    echo 'EGREP' >> "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    ac_count=`expr $ac_count + 1`
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
       # Best one so far, save it but keep looking for a better one
       ac_cv_path_EGREP="$ac_path_EGREP"
@@ -3560,46 +4027,31 @@
   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
 
-
-    $ac_path_EGREP_found && break 3
+      $ac_path_EGREP_found && break 3
+    done
   done
-done
-
-done
+  done
 IFS=$as_save_IFS
-
-
-fi
-
-EGREP="$ac_cv_path_EGREP"
-if test -z "$EGREP"; then
-  { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
-echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
-   { (exit 1); exit 1; }; }
-fi
-
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
 else
   ac_cv_path_EGREP=$EGREP
 fi
 
-
    fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
-echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
  EGREP="$ac_cv_path_EGREP"
 
 
-{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdlib.h>
 #include <stdarg.h>
@@ -3614,47 +4066,23 @@
   return 0;
 }
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_header_stdc=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_stdc=no
+  ac_cv_header_stdc=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <string.h>
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
 else
   ac_cv_header_stdc=no
 fi
@@ -3664,18 +4092,14 @@
 
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdlib.h>
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
+  $EGREP "free" >/dev/null 2>&1; then :
+
 else
   ac_cv_header_stdc=no
 fi
@@ -3685,14 +4109,10 @@
 
 if test $ac_cv_header_stdc = yes; then
   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
+  if test "$cross_compiling" = yes; then :
   :
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <ctype.h>
 #include <stdlib.h>
@@ -3719,113 +4139,35 @@
   return 0;
 }
 _ACEOF
-rm -f 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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
+if ac_fn_c_try_run "$LINENO"; then :
+
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
+  ac_cv_header_stdc=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
 fi
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
 if test $ac_cv_header_stdc = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
 
 fi
 
 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
 		  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ 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
-  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
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -3833,264 +4175,45 @@
 done
 
 
-
-
-
-for ac_header in fcntl.h rpc/rpcent.h netdnet/dnetdb.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
+for ac_header in fcntl.h rpc/rpc.h rpc/rpcent.h netdnet/dnetdb.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 
 done
 
-
 for ac_header in net/pfvar.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ 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
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
+do :
+  ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "#include <sys/types.h>
 #include <sys/socket.h>
 #include <net/if.h>
-
-#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
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+"
+if test "x$ac_cv_header_net_pfvar_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_NET_PFVAR_H 1
 _ACEOF
 
 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
-
 for ac_header in netinet/if_ether.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ 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
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
+do :
+  ac_fn_c_check_header_compile "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "#include <sys/types.h>
 #include <sys/socket.h>
-
-#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
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+"
+if test "x$ac_cv_header_netinet_if_ether_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_NETINET_IF_ETHER_H 1
 _ACEOF
 
 fi
@@ -4105,66 +4228,21 @@
 	# treat the previous failure as a cached value and
 	# suppress the next test.
 	#
-	{ echo "$as_me:$LINENO: Rechecking with some additional includes" >&5
-echo "$as_me: Rechecking with some additional includes" >&6;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: Rechecking with some additional includes" >&5
+$as_echo "$as_me: Rechecking with some additional includes" >&6;}
 	unset ac_cv_header_netinet_if_ether_h
-
-for ac_header in netinet/if_ether.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-{ 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
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <sys/types.h>
+	for ac_header in netinet/if_ether.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 struct mbuf;
 struct rtentry;
 #include <net/if.h>
-
-#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
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	eval "$as_ac_Header=no"
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-ac_res=`eval echo '${'$as_ac_Header'}'`
-	       { echo "$as_me:$LINENO: result: $ac_res" >&5
-echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+"
+if test "x$ac_cv_header_netinet_if_ether_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_NETINET_IF_ETHER_H 1
 _ACEOF
 
 fi
@@ -4173,16 +4251,12 @@
 
 fi
 
-{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
-if test "${ac_cv_header_time+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if ${ac_cv_header_time+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
 #include <sys/time.h>
@@ -4197,76 +4271,80 @@
   return 0;
 }
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_header_time=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_header_time=no
+  ac_cv_header_time=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-echo "${ECHO_T}$ac_cv_header_time" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
 if test $ac_cv_header_time = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define TIME_WITH_SYS_TIME 1
-_ACEOF
+$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
 
 fi
 
 
 case "$host_os" in
 
+darwin*)
+	# Check whether --enable-universal was given.
+if test "${enable_universal+set}" = set; then :
+  enableval=$enable_universal;
+fi
+
+	if test "$enable_universal" != "no"; then
+		case "$host_os" in
+
+		darwin9.*)
+			#
+			# Leopard.  Build for x86 and 32-bit PowerPC, with
+			# x86 first.  (That's what Apple does.)
+			#
+			V_CCOPT="$V_CCOPT -arch i386 -arch ppc"
+			LDFLAGS="$LDFLAGS -arch i386 -arch ppc"
+			;;
+
+		darwin10.*)
+			#
+			# Snow Leopard.  Build for x86-64 and x86, with
+			# x86-64 first.  (That's what Apple does.)
+			#
+			V_CCOPT="$V_CCOPT -arch x86_64 -arch i386"
+			LDFLAGS="$LDFLAGS -arch x86_64 -arch i386"
+			;;
+		esac
+	fi
+	;;
+
 linux*)
-	{ echo "$as_me:$LINENO: checking Linux kernel version" >&5
-echo $ECHO_N "checking Linux kernel version... $ECHO_C" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Linux kernel version" >&5
+$as_echo_n "checking Linux kernel version... " >&6; }
  	if test "$cross_compiling" = yes; then
- 		if test "${ac_cv_linux_vers+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+ 		if ${ac_cv_linux_vers+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_cv_linux_vers=unknown
 fi
 
  	else
- 		if test "${ac_cv_linux_vers+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+ 		if ${ac_cv_linux_vers+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_cv_linux_vers=`uname -r 2>&1 | \
  			sed -n -e '$s/.* //' -e '$s/\..*//p'`
 fi
 
  	fi
-	{ echo "$as_me:$LINENO: result: $ac_cv_linux_vers" >&5
-echo "${ECHO_T}$ac_cv_linux_vers" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_linux_vers" >&5
+$as_echo "$ac_cv_linux_vers" >&6; }
  	if test $ac_cv_linux_vers = unknown ; then
- 		{ { echo "$as_me:$LINENO: error: cannot determine linux version when cross-compiling" >&5
-echo "$as_me: error: cannot determine linux version when cross-compiling" >&2;}
-   { (exit 1); exit 1; }; }
+ 		as_fn_error $? "cannot determine linux version when cross-compiling" "$LINENO" 5
  	fi
 	if test $ac_cv_linux_vers -lt 2 ; then
-		{ { echo "$as_me:$LINENO: error: version 2 or higher required; see the INSTALL doc for more info" >&5
-echo "$as_me: error: version 2 or higher required; see the INSTALL doc for more info" >&2;}
-   { (exit 1); exit 1; }; }
+		as_fn_error $? "version 2 or higher required; see the INSTALL doc for more info" "$LINENO" 5
 	fi
 	;;
 
@@ -4276,158 +4354,35 @@
 
 
 
+# Check whether --with-smi was given.
+if test "${with_smi+set}" = set; then :
+  withval=$with_smi;
+else
+  with_smi=yes
+fi
+
+
+if test "x$with_smi" != "xno" ; then
 for ac_header in smi.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
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "smi.h" "ac_cv_header_smi_h" "$ac_includes_default"
+if test "x$ac_cv_header_smi_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_SMI_H 1
 _ACEOF
 
 fi
 
 done
 
-
-{ echo "$as_me:$LINENO: checking for smiInit in -lsmi" >&5
-echo $ECHO_N "checking for smiInit in -lsmi... $ECHO_C" >&6; }
-if test "${ac_cv_lib_smi_smiInit+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for smiInit in -lsmi" >&5
+$as_echo_n "checking for smiInit in -lsmi... " >&6; }
+if ${ac_cv_lib_smi_smiInit+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lsmi  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -4445,39 +4400,18 @@
   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
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_smi_smiInit=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_smi_smiInit=no
+  ac_cv_lib_smi_smiInit=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_smi_smiInit" >&5
-echo "${ECHO_T}$ac_cv_lib_smi_smiInit" >&6; }
-if test $ac_cv_lib_smi_smiInit = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smi_smiInit" >&5
+$as_echo "$ac_cv_lib_smi_smiInit" >&6; }
+if test "x$ac_cv_lib_smi_smiInit" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBSMI 1
 _ACEOF
@@ -4488,19 +4422,15 @@
 
 if test "$ac_cv_header_smi_h" = yes -a "$ac_cv_lib_smi_smiInit" = yes
 then
-{ echo "$as_me:$LINENO: checking whether to enable libsmi" >&5
-echo $ECHO_N "checking whether to enable libsmi... $ECHO_C" >&6; }
-        if test "$cross_compiling" = yes; then
-   { echo "$as_me:$LINENO: result: not when cross-compiling" >&5
-echo "${ECHO_T}not when cross-compiling" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable libsmi" >&5
+$as_echo_n "checking whether to enable libsmi... " >&6; }
+        if test "$cross_compiling" = yes; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: not when cross-compiling" >&5
+$as_echo "not when cross-compiling" >&6; }
   libsmi=no
 
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
  /* libsmi available check */
 #include <smi.h>
@@ -4521,211 +4451,421 @@
 }
 
 _ACEOF
-rm -f 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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-  cat >>confdefs.h <<\_ACEOF
-#define LIBSMI 1
-_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define LIBSMI 1" >>confdefs.h
 
   libsmi=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
- case $? in
-  1) { echo "$as_me:$LINENO: result: no - smiInit failed" >&5
-echo "${ECHO_T}no - smiInit failed" >&6; } ;;
-  2) { echo "$as_me:$LINENO: result: no - header/library version mismatch" >&5
-echo "${ECHO_T}no - header/library version mismatch" >&6; } ;;
-  3) { echo "$as_me:$LINENO: result: no - can't determine library version" >&5
-echo "${ECHO_T}no - can't determine library version" >&6; } ;;
-  4) { echo "$as_me:$LINENO: result: no - too old" >&5
-echo "${ECHO_T}no - too old" >&6; } ;;
-  *) { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; } ;;
+   case $? in
+  1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - smiInit failed" >&5
+$as_echo "no - smiInit failed" >&6; } ;;
+  2) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - header/library version mismatch" >&5
+$as_echo "no - header/library version mismatch" >&6; } ;;
+  3) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - can't determine library version" >&5
+$as_echo "no - can't determine library version" >&6; } ;;
+  4) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - too old" >&5
+$as_echo "no - too old" >&6; } ;;
+  *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; } ;;
   esac
   libsmi=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
+fi
 fi
 
-{ echo "$as_me:$LINENO: checking whether to enable the possibly-buggy SMB printer" >&5
-echo $ECHO_N "checking whether to enable the possibly-buggy SMB printer... $ECHO_C" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the possibly-buggy SMB printer" >&5
+$as_echo_n "checking whether to enable the possibly-buggy SMB printer... " >&6; }
 # Check whether --enable-smb was given.
-if test "${enable_smb+set}" = set; then
+if test "${enable_smb+set}" = set; then :
   enableval=$enable_smb;
 else
   enableval=yes
 fi
 
 case "$enableval" in
-yes)	{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-	{ echo "$as_me:$LINENO: WARNING: The SMB printer may have exploitable buffer overflows!!!" >&5
-echo "$as_me: WARNING: The SMB printer may have exploitable buffer overflows!!!" >&2;}
-	cat >>confdefs.h <<\_ACEOF
-#define TCPDUMP_DO_SMB 1
-_ACEOF
+yes)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The SMB printer may have exploitable buffer overflows!!!" >&5
+$as_echo "$as_me: WARNING: The SMB printer may have exploitable buffer overflows!!!" >&2;}
+
+$as_echo "#define TCPDUMP_DO_SMB 1" >>confdefs.h
 
 	LOCALSRC="print-smb.c smbutil.c $LOCALSRC"
 	;;
-*)	{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+*)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	;;
 esac
 
 
 # Check whether --with-user was given.
-if test "${with_user+set}" = set; then
+if test "${with_user+set}" = set; then :
   withval=$with_user;
 fi
 
-{ echo "$as_me:$LINENO: checking whether to drop root privileges by default" >&5
-echo $ECHO_N "checking whether to drop root privileges by default... $ECHO_C" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to drop root privileges by default" >&5
+$as_echo_n "checking whether to drop root privileges by default... " >&6; }
 if test ! -z "$with_user" ; then
-        cat >>confdefs.h <<_ACEOF
+
+cat >>confdefs.h <<_ACEOF
 #define WITH_USER "$withval"
 _ACEOF
 
-       { echo "$as_me:$LINENO: result: to \"$withval\"" >&5
-echo "${ECHO_T}to \"$withval\"" >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: to \"$withval\"" >&5
+$as_echo "to \"$withval\"" >&6; }
 else
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
 # Check whether --with-chroot was given.
-if test "${with_chroot+set}" = set; then
+if test "${with_chroot+set}" = set; then :
   withval=$with_chroot;
 fi
 
-{ echo "$as_me:$LINENO: checking whether to chroot" >&5
-echo $ECHO_N "checking whether to chroot... $ECHO_C" >&6; }
-if test ! -z "$with_chroot" ; then
-        cat >>confdefs.h <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to chroot" >&5
+$as_echo_n "checking whether to chroot... " >&6; }
+if test ! -z "$with_chroot" && test "$with_chroot" != "no" ; then
+
+cat >>confdefs.h <<_ACEOF
 #define WITH_CHROOT "$withval"
 _ACEOF
 
-       { echo "$as_me:$LINENO: result: to \"$withval\"" >&5
-echo "${ECHO_T}to \"$withval\"" >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: to \"$withval\"" >&5
+$as_echo "to \"$withval\"" >&6; }
 else
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-{ echo "$as_me:$LINENO: checking whether to enable ipv6" >&5
-echo $ECHO_N "checking whether to enable ipv6... $ECHO_C" >&6; }
-# Check whether --enable-ipv6 was given.
-if test "${enable_ipv6+set}" = set; then
-  enableval=$enable_ipv6;  case "$enableval" in
-yes)   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-       LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC"
-       cat >>confdefs.h <<\_ACEOF
-#define INET6 1
+#
+# We must check this before checking whether to enable IPv6, because,
+# on some platforms (such as SunOS 5.x), the test program requires
+# the extra networking libraries.
+#
+
+    # Most operating systems have gethostbyname() in the default searched
+    # libraries (i.e. libc):
+    # Some OSes (eg. Solaris) place it in libnsl
+    # Some strange OSes (SINIX) have it in libsocket:
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
+$as_echo_n "checking for library containing gethostbyname... " >&6; }
+if ${ac_cv_search_gethostbyname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
 _ACEOF
+for ac_lib in '' nsl socket resolv; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_gethostbyname=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_gethostbyname+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_gethostbyname+:} false; then :
+
+else
+  ac_cv_search_gethostbyname=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
+$as_echo "$ac_cv_search_gethostbyname" >&6; }
+ac_res=$ac_cv_search_gethostbyname
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+    # Unfortunately libsocket sometimes depends on libnsl and
+    # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
+    if test "$ac_cv_search_gethostbyname" = "no"
+    then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5
+$as_echo_n "checking for gethostbyname in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_gethostbyname+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket -lnsl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_gethostbyname=yes
+else
+  ac_cv_lib_socket_gethostbyname=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname" >&5
+$as_echo "$ac_cv_lib_socket_gethostbyname" >&6; }
+if test "x$ac_cv_lib_socket_gethostbyname" = xyes; then :
+  LIBS="-lsocket -lnsl $LIBS"
+fi
+
+    fi
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
+$as_echo_n "checking for library containing socket... " >&6; }
+if ${ac_cv_search_socket+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 socket ();
+int
+main ()
+{
+return socket ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' socket; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_socket=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_socket+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_socket+:} false; then :
+
+else
+  ac_cv_search_socket=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
+$as_echo "$ac_cv_search_socket" >&6; }
+ac_res=$ac_cv_search_socket
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
+$as_echo_n "checking for socket in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_socket+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket -lnsl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 socket ();
+int
+main ()
+{
+return socket ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_socket_socket=yes
+else
+  ac_cv_lib_socket_socket=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
+$as_echo "$ac_cv_lib_socket_socket" >&6; }
+if test "x$ac_cv_lib_socket_socket" = xyes; then :
+  LIBS="-lsocket -lnsl $LIBS"
+fi
+
+fi
+
+    # DLPI needs putmsg under HPUX so test for -lstr while we're at it
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
+$as_echo_n "checking for library containing putmsg... " >&6; }
+if ${ac_cv_search_putmsg+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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 putmsg ();
+int
+main ()
+{
+return putmsg ();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' str; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_putmsg=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_putmsg+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_putmsg+:} false; then :
+
+else
+  ac_cv_search_putmsg=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
+$as_echo "$ac_cv_search_putmsg" >&6; }
+ac_res=$ac_cv_search_putmsg
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable ipv6" >&5
+$as_echo_n "checking whether to enable ipv6... " >&6; }
+# Check whether --enable-ipv6 was given.
+if test "${enable_ipv6+set}" = set; then :
+  enableval=$enable_ipv6;  case "$enableval" in
+yes)   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+       LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c print-babel.c $LOCALSRC"
+
+$as_echo "#define INET6 1" >>confdefs.h
 
        ipv6=yes
        ;;
 *)
-       { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
        ipv6=no
        ;;
   esac
 else
-  if test "$cross_compiling" = yes; then
-   { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-  ipv6=no
-
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
- /* AF_INET6 available check */
+
+      /* AF_INET6 available check */
 #include <sys/types.h>
 #include <sys/socket.h>
-main()
+#include <netinet/in.h>
+#ifdef AF_INET6
+void
+foo(struct in6_addr *addr)
 {
- if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
-   exit(1);
- else
-   exit(0);
+ memset(addr, 0, sizeof (struct in6_addr));
 }
+#else
+#error "AF_INET6 not defined"
+#endif
+
 
 _ACEOF
-rm -f 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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-   { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-  LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC"
-  cat >>confdefs.h <<\_ACEOF
-#define INET6 1
-_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c print-babel.c $LOCALSRC"
+
+$as_echo "#define INET6 1" >>confdefs.h
 
   ipv6=yes
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
- { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
   ipv6=no
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
 
@@ -4734,16 +4874,12 @@
 ipv6trylibc=no
 
 if test "$ipv6" = "yes"; then
-	{ echo "$as_me:$LINENO: checking ipv6 stack type" >&5
-echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
+$as_echo_n "checking ipv6 stack type... " >&6; }
 	for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
 		case $i in
 		inria)
-						cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+						cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <netinet/in.h>
 #ifdef IPV6_INRIA_VERSION
@@ -4751,7 +4887,7 @@
 #endif
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
+  $EGREP "yes" >/dev/null 2>&1; then :
   ipv6type=$i;
 				CFLAGS="-DINET6 $CFLAGS"
 fi
@@ -4759,11 +4895,7 @@
 
 			;;
 		kame)
-						cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+						cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <netinet/in.h>
 #ifdef __KAME__
@@ -4771,7 +4903,7 @@
 #endif
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
+  $EGREP "yes" >/dev/null 2>&1; then :
   ipv6type=$i;
 				ipv6lib=inet6;
 				ipv6libdir=/usr/local/v6/lib;
@@ -4782,11 +4914,7 @@
 
 			;;
 		linux-glibc)
-						cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+						cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <features.h>
 #if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
@@ -4794,7 +4922,7 @@
 #endif
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
+  $EGREP "yes" >/dev/null 2>&1; then :
   ipv6type=$i;
 				CFLAGS="-DINET6 $CFLAGS"
 fi
@@ -4811,11 +4939,7 @@
 			fi
 			;;
 		toshiba)
-			cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/param.h>
 #ifdef _TOSHIBA_INET6
@@ -4823,7 +4947,7 @@
 #endif
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
+  $EGREP "yes" >/dev/null 2>&1; then :
   ipv6type=$i;
 				ipv6lib=inet6;
 				ipv6libdir=/usr/local/v6/lib;
@@ -4833,11 +4957,7 @@
 
 			;;
 		v6d)
-			cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include </usr/local/v6/include/sys/v6config.h>
 #ifdef __V6D__
@@ -4845,7 +4965,7 @@
 #endif
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
+  $EGREP "yes" >/dev/null 2>&1; then :
   ipv6type=$i;
 				ipv6lib=v6;
 				ipv6libdir=/usr/local/v6/lib;
@@ -4855,11 +4975,7 @@
 
 			;;
 		zeta)
-			cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/param.h>
 #ifdef _ZETA_MINAMI_INET6
@@ -4867,7 +4983,7 @@
 #endif
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
+  $EGREP "yes" >/dev/null 2>&1; then :
   ipv6type=$i;
 				ipv6lib=inet6;
 				ipv6libdir=/usr/local/v6/lib;
@@ -4881,8 +4997,8 @@
 			break
 		fi
 	done
-	{ echo "$as_me:$LINENO: result: $ipv6type" >&5
-echo "${ECHO_T}$ipv6type" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
+$as_echo "$ipv6type" >&6; }
 fi
 
 if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
@@ -4916,17 +5032,13 @@
 	# script to become confused, and results in libpcap
 	# being unbuildable.
 	#
-	{ echo "$as_me:$LINENO: checking for library containing getaddrinfo" >&5
-echo $ECHO_N "checking for library containing getaddrinfo... $ECHO_C" >&6; }
-if test "${ac_cv_search_getaddrinfo+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5
+$as_echo_n "checking for library containing getaddrinfo... " >&6; }
+if ${ac_cv_search_getaddrinfo+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -4951,64 +5063,37 @@
     ac_res=-l$ac_lib
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
-  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
+  if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_search_getaddrinfo=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_getaddrinfo+set}" = set; then
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_getaddrinfo+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_getaddrinfo+set}" = set; then
-  :
+if ${ac_cv_search_getaddrinfo+:} false; then :
+
 else
   ac_cv_search_getaddrinfo=no
 fi
 rm conftest.$ac_ext
 LIBS=$ac_func_search_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_getaddrinfo" >&5
-echo "${ECHO_T}$ac_cv_search_getaddrinfo" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5
+$as_echo "$ac_cv_search_getaddrinfo" >&6; }
 ac_res=$ac_cv_search_getaddrinfo
-if test "$ac_res" != no; then
+if test "$ac_res" != no; then :
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  	{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
-echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
-	if test "${td_cv_buggygetaddrinfo+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
+$as_echo_n "checking getaddrinfo bug... " >&6; }
+	if ${td_cv_buggygetaddrinfo+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  if test "$cross_compiling" = yes; then
+  if test "$cross_compiling" = yes; then :
   td_cv_buggygetaddrinfo=yes
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #include <sys/types.h>
@@ -5106,47 +5191,23 @@
 }
 
 _ACEOF
-rm -f 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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+if ac_fn_c_try_run "$LINENO"; then :
   td_cv_buggygetaddrinfo=no
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-td_cv_buggygetaddrinfo=yes
+  td_cv_buggygetaddrinfo=yes
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
 fi
 
 	if test "$td_cv_buggygetaddrinfo" = no; then
-		{ echo "$as_me:$LINENO: result: good" >&5
-echo "${ECHO_T}good" >&6; }
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: good" >&5
+$as_echo "good" >&6; }
 	else
-		{ echo "$as_me:$LINENO: result: buggy" >&5
-echo "${ECHO_T}buggy" >&6; }
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5
+$as_echo "buggy" >&6; }
 	fi
 
 	if test "$td_cv_buggygetaddrinfo" = "yes"; then
@@ -5170,127 +5231,34 @@
 
 fi
 
-
-
-for ac_func in getaddrinfo getnameinfo
-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
+	ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
+if test "x$ac_cv_func_getnameinfo" = xyes; then :
+  $as_echo "#define HAVE_GETNAMEINFO 1" >>confdefs.h
 
 else
   case " $LIBOBJS " in
-  *" $ac_func.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+  *" getnameinfo.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS getnameinfo.$ac_objext"
  ;;
 esac
 
 fi
-done
 
 
 fi
 
-{ echo "$as_me:$LINENO: checking for dnet_htoa declaration in netdnet/dnetdb.h" >&5
-echo $ECHO_N "checking for dnet_htoa declaration in netdnet/dnetdb.h... $ECHO_C" >&6; }
-if test "${td_cv_decl_netdnet_dnetdb_h_dnet_htoa+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_htoa declaration in netdnet/dnetdb.h" >&5
+$as_echo_n "checking for dnet_htoa declaration in netdnet/dnetdb.h... " >&6; }
+if ${td_cv_decl_netdnet_dnetdb_h_dnet_htoa+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <netdnet/dnetdb.h>
 
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "dnet_htoa" >/dev/null 2>&1; then
+  $EGREP "dnet_htoa" >/dev/null 2>&1; then :
   td_cv_decl_netdnet_dnetdb_h_dnet_htoa=yes
 else
   td_cv_decl_netdnet_dnetdb_h_dnet_htoa=no
@@ -5298,2053 +5266,21 @@
 rm -f conftest*
 
 fi
-{ echo "$as_me:$LINENO: result: $td_cv_decl_netdnet_dnetdb_h_dnet_htoa" >&5
-echo "${ECHO_T}$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $td_cv_decl_netdnet_dnetdb_h_dnet_htoa" >&5
+$as_echo "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" >&6; }
 if test "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" = yes; then
-	cat >>confdefs.h <<\_ACEOF
-#define HAVE_NETDNET_DNETDB_H_DNET_HTOA 1
-_ACEOF
+
+$as_echo "#define HAVE_NETDNET_DNETDB_H_DNET_HTOA 1" >>confdefs.h
 
 fi
 
-{ echo "$as_me:$LINENO: checking for char" >&5
-echo $ECHO_N "checking for char... $ECHO_C" >&6; }
-if test "${ac_cv_type_char+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
+$as_echo_n "checking for addrinfo... " >&6; }
+	if ${ac_cv_addrinfo+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  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
-typedef char ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_char=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_char=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
-echo "${ECHO_T}$ac_cv_type_char" >&6; }
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ echo "$as_me:$LINENO: checking size of char" >&5
-echo $ECHO_N "checking size of char... $ECHO_C" >&6; }
-if test "${ac_cv_sizeof_char+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-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
-   typedef char ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_lo=0 ac_mid=0
-  while :; do
-    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
-   typedef char ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	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
-   typedef char ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=-1 ac_mid=-1
-  while :; do
-    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
-   typedef char ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo= ac_hi=
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  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
-   typedef char ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_char=$ac_lo;;
-'') if test "$ac_cv_type_char" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (char)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (char)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_char=0
-   fi ;;
-esac
-else
-  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
-   typedef char ac__type_sizeof_;
-static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
-static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-	return 1;
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-	return 1;
-      fprintf (f, "%lu\n", i);
-    }
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f 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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_char=`cat conftest.val`
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_char" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (char)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (char)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_char=0
-   fi
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
-echo "${ECHO_T}$ac_cv_sizeof_char" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_CHAR $ac_cv_sizeof_char
-_ACEOF
-
-
-{ echo "$as_me:$LINENO: checking for short" >&5
-echo $ECHO_N "checking for short... $ECHO_C" >&6; }
-if test "${ac_cv_type_short+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.  */
-$ac_includes_default
-typedef short ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_short=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_short=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
-echo "${ECHO_T}$ac_cv_type_short" >&6; }
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ echo "$as_me:$LINENO: checking size of short" >&5
-echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
-if test "${ac_cv_sizeof_short+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-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
-   typedef short ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_lo=0 ac_mid=0
-  while :; do
-    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
-   typedef short ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	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
-   typedef short ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=-1 ac_mid=-1
-  while :; do
-    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
-   typedef short ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo= ac_hi=
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  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
-   typedef short ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_short=$ac_lo;;
-'') if test "$ac_cv_type_short" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (short)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_short=0
-   fi ;;
-esac
-else
-  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
-   typedef short ac__type_sizeof_;
-static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
-static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-	return 1;
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-	return 1;
-      fprintf (f, "%lu\n", i);
-    }
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f 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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_short=`cat conftest.val`
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_short" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (short)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_short=0
-   fi
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
-echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
-_ACEOF
-
-
-{ echo "$as_me:$LINENO: checking for int" >&5
-echo $ECHO_N "checking for int... $ECHO_C" >&6; }
-if test "${ac_cv_type_int+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.  */
-$ac_includes_default
-typedef int ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_int=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_int=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
-echo "${ECHO_T}$ac_cv_type_int" >&6; }
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ echo "$as_me:$LINENO: checking size of int" >&5
-echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
-if test "${ac_cv_sizeof_int+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-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
-   typedef int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_lo=0 ac_mid=0
-  while :; do
-    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
-   typedef int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	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
-   typedef int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=-1 ac_mid=-1
-  while :; do
-    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
-   typedef int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo= ac_hi=
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  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
-   typedef int ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_int=$ac_lo;;
-'') if test "$ac_cv_type_int" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_int=0
-   fi ;;
-esac
-else
-  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
-   typedef int ac__type_sizeof_;
-static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
-static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-	return 1;
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-	return 1;
-      fprintf (f, "%lu\n", i);
-    }
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f 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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_int=`cat conftest.val`
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_int" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (int)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_int=0
-   fi
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
-echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-_ACEOF
-
-
-{ echo "$as_me:$LINENO: checking for long" >&5
-echo $ECHO_N "checking for long... $ECHO_C" >&6; }
-if test "${ac_cv_type_long+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.  */
-$ac_includes_default
-typedef long ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_long=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_long=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
-echo "${ECHO_T}$ac_cv_type_long" >&6; }
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ echo "$as_me:$LINENO: checking size of long" >&5
-echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-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
-   typedef long ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_lo=0 ac_mid=0
-  while :; do
-    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
-   typedef long ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	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
-   typedef long ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=-1 ac_mid=-1
-  while :; do
-    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
-   typedef long ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo= ac_hi=
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  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
-   typedef long ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_long=$ac_lo;;
-'') if test "$ac_cv_type_long" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_long=0
-   fi ;;
-esac
-else
-  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
-   typedef long ac__type_sizeof_;
-static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
-static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-	return 1;
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-	return 1;
-      fprintf (f, "%lu\n", i);
-    }
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f 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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_long=`cat conftest.val`
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_long" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_long=0
-   fi
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
-echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-{ echo "$as_me:$LINENO: checking for long long" >&5
-echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
-if test "${ac_cv_type_long_long+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.  */
-$ac_includes_default
-typedef long long ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_long_long=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_long_long=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
-echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
-
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ echo "$as_me:$LINENO: checking size of long long" >&5
-echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
-if test "${ac_cv_sizeof_long_long+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test "$cross_compiling" = yes; then
-  # Depending upon the size, compute the lo and hi bounds.
-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
-   typedef long long ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_lo=0 ac_mid=0
-  while :; do
-    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
-   typedef long long ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr $ac_mid + 1`
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	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
-   typedef long long ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=-1 ac_mid=-1
-  while :; do
-    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
-   typedef long long ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_lo=$ac_mid; break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_hi=`expr '(' $ac_mid ')' - 1`
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			ac_mid=`expr 2 '*' $ac_mid`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo= ac_hi=
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
-  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
-   typedef long long ac__type_sizeof_;
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
-test_array [0] = 0
-
-  ;
-  return 0;
-}
-_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_hi=$ac_mid
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lo=`expr '(' $ac_mid ')' + 1`
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_long_long=$ac_lo;;
-'') if test "$ac_cv_type_long_long" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long long)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_long_long=0
-   fi ;;
-esac
-else
-  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
-   typedef long long ac__type_sizeof_;
-static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
-static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
-    {
-      long int i = longval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-	return 1;
-      fprintf (f, "%ld\n", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ((long int) (sizeof (ac__type_sizeof_))))
-	return 1;
-      fprintf (f, "%lu\n", i);
-    }
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f 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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_sizeof_long_long=`cat conftest.val`
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_long_long" = yes; then
-     { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute sizeof (long long)
-See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
-   else
-     ac_cv_sizeof_long_long=0
-   fi
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
-echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
-_ACEOF
-
-
-
-
-
-	{ echo "$as_me:$LINENO: checking for addrinfo" >&5
-echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
-	if test "${ac_cv_addrinfo+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
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #		include <netdb.h>
@@ -7356,45 +5292,23 @@
   return 0;
 }
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_addrinfo=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_addrinfo=no
+  ac_cv_addrinfo=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-	{ echo "$as_me:$LINENO: result: $ac_cv_addrinfo" >&5
-echo "${ECHO_T}$ac_cv_addrinfo" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_addrinfo" >&5
+$as_echo "$ac_cv_addrinfo" >&6; }
 	if test $ac_cv_addrinfo = yes; then
-		cat >>confdefs.h <<\_ACEOF
-#define HAVE_ADDRINFO 1
-_ACEOF
+
+$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
 
 	else
-		cat >>confdefs.h <<\_ACEOF
-#define NEED_ADDRINFO_H 1
-_ACEOF
+
+$as_echo "#define NEED_ADDRINFO_H 1" >>confdefs.h
 
 	fi
 
@@ -7403,16 +5317,12 @@
 fi
 
 
-	{ echo "$as_me:$LINENO: checking for NI_MAXSERV" >&5
-echo $ECHO_N "checking for NI_MAXSERV... $ECHO_C" >&6; }
-	if test "${ac_cv_maxserv+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NI_MAXSERV" >&5
+$as_echo_n "checking for NI_MAXSERV... " >&6; }
+	if ${ac_cv_maxserv+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <netdb.h>
 #ifdef NI_MAXSERV
@@ -7420,7 +5330,7 @@
 #endif
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
+  $EGREP "yes" >/dev/null 2>&1; then :
   ac_cv_maxserv=yes
 else
   ac_cv_maxserv=no
@@ -7429,12 +5339,10 @@
 
 fi
 
-	{ echo "$as_me:$LINENO: result: $ac_cv_maxserv" >&5
-echo "${ECHO_T}$ac_cv_maxserv" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_maxserv" >&5
+$as_echo "$ac_cv_maxserv" >&6; }
 	if test $ac_cv_maxserv != yes; then
-		cat >>confdefs.h <<\_ACEOF
-#define NEED_ADDRINFO_H 1
-_ACEOF
+		$as_echo "#define NEED_ADDRINFO_H 1" >>confdefs.h
 
 	fi
 
@@ -7443,16 +5351,12 @@
 fi
 
 
-	{ echo "$as_me:$LINENO: checking for NI_NAMEREQD" >&5
-echo $ECHO_N "checking for NI_NAMEREQD... $ECHO_C" >&6; }
-	if test "${ac_cv_namereqd+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NI_NAMEREQD" >&5
+$as_echo_n "checking for NI_NAMEREQD... " >&6; }
+	if ${ac_cv_namereqd+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <netdb.h>
 #ifdef NI_NOFQDN
@@ -7460,7 +5364,7 @@
 #endif
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "yes" >/dev/null 2>&1; then
+  $EGREP "yes" >/dev/null 2>&1; then :
   ac_cv_namereqd=yes
 else
   ac_cv_namereqd=no
@@ -7469,12 +5373,10 @@
 
 fi
 
-	{ echo "$as_me:$LINENO: result: $ac_cv_namereqd" >&5
-echo "${ECHO_T}$ac_cv_namereqd" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_namereqd" >&5
+$as_echo "$ac_cv_namereqd" >&6; }
 	if test $ac_cv_namereqd != yes; then
-		cat >>confdefs.h <<\_ACEOF
-#define NEED_ADDRINFO_H 1
-_ACEOF
+		$as_echo "#define NEED_ADDRINFO_H 1" >>confdefs.h
 
 	fi
 
@@ -7483,16 +5385,12 @@
 fi
 
 
-	{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
-echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
-	if test "${ac_cv_sa_storage+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
+$as_echo_n "checking for sockaddr_storage... " >&6; }
+	if ${ac_cv_sa_storage+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #		include <sys/types.h>
@@ -7505,40 +5403,19 @@
   return 0;
 }
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_sa_storage=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_sa_storage=no
+  ac_cv_sa_storage=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-	{ echo "$as_me:$LINENO: result: $ac_cv_sa_storage" >&5
-echo "${ECHO_T}$ac_cv_sa_storage" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sa_storage" >&5
+$as_echo "$ac_cv_sa_storage" >&6; }
 	if test $ac_cv_sa_storage = yes; then
-		cat >>confdefs.h <<\_ACEOF
-#define HAVE_SOCKADDR_STORAGE 1
-_ACEOF
+
+$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
 
 	fi
 
@@ -7546,617 +5423,104 @@
 	missing_includes=yes
 fi
 
-
-	ac_cv_addrsz=yes
-	{ echo "$as_me:$LINENO: checking for INADDRSZ" >&5
-echo $ECHO_N "checking for INADDRSZ... $ECHO_C" >&6; }
-	if test "${ac_cv_inaddrsz+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.  */
-
-#		include <arpa/nameser.h>
-int
-main ()
-{
-int a = INADDRSZ
-  ;
-  return 0;
-}
-_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_cv_inaddrsz=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_inaddrsz=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-	{ echo "$as_me:$LINENO: result: $ac_cv_inaddrsz" >&5
-echo "${ECHO_T}$ac_cv_inaddrsz" >&6; }
-	if test $ac_cv_inaddrsz = yes; then
-		cat >>confdefs.h <<\_ACEOF
-#define HAVE_INADDRSZ 1
-_ACEOF
-
-	else
-		ac_cv_addrsz=no
-	fi
-	{ echo "$as_me:$LINENO: checking for IN6ADDRSZ" >&5
-echo $ECHO_N "checking for IN6ADDRSZ... $ECHO_C" >&6; }
-	if test "${ac_cv_in6addrsz+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.  */
-
-#		include <arpa/nameser.h>
-int
-main ()
-{
-int a = IN6ADDRSZ
-  ;
-  return 0;
-}
-_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_cv_in6addrsz=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_in6addrsz=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-	{ echo "$as_me:$LINENO: result: $ac_cv_in6addrsz" >&5
-echo "${ECHO_T}$ac_cv_in6addrsz" >&6; }
-	if test $ac_cv_in6addrsz = yes; then
-		cat >>confdefs.h <<\_ACEOF
-#define HAVE_IN6ADDRSZ 1
-_ACEOF
-
-	else
-		ac_cv_addrsz=no
-	fi
-
-if test "$ac_cv_addrsz" = no; then
-	missing_includes=yes
-fi
-
-
-	{ echo "$as_me:$LINENO: checking for RES_USE_INET6" >&5
-echo $ECHO_N "checking for RES_USE_INET6... $ECHO_C" >&6; }
-	if test "${ac_cv_res_inet6+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.  */
-
-#		include <sys/types.h>
-#		include <netinet/in.h>
-#		include <resolv.h>
-int
-main ()
-{
-int a = RES_USE_INET6
-  ;
-  return 0;
-}
-_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_cv_res_inet6=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_res_inet6=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-	{ echo "$as_me:$LINENO: result: $ac_cv_res_inet6" >&5
-echo "${ECHO_T}$ac_cv_res_inet6" >&6; }
-	if test $ac_cv_res_inet6 = yes; then
-		cat >>confdefs.h <<\_ACEOF
-#define HAVE_RES_USE_INET6 1
-_ACEOF
-
-	fi
-
-if test "$ac_cv_res_inet6" = no; then
-	missing_includes=yes
-fi
-
-
-	{ echo "$as_me:$LINENO: checking for res_state_ext" >&5
-echo $ECHO_N "checking for res_state_ext... $ECHO_C" >&6; }
-	if test "${ac_cv_res_state_ext+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.  */
-
-#		include <sys/types.h>
-#		include <netinet/in.h>
-#		include <netinet6/in6.h>
-#		include <resolv.h>
-int
-main ()
-{
-struct __res_state_ext e
-  ;
-  return 0;
-}
-_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_cv_res_state_ext=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_res_state_ext=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-	{ echo "$as_me:$LINENO: result: $ac_cv_res_state_ext" >&5
-echo "${ECHO_T}$ac_cv_res_state_ext" >&6; }
-	if test $ac_cv_res_state_ext = yes; then
-		cat >>confdefs.h <<\_ACEOF
-#define HAVE_RES_STATE_EXT 1
-_ACEOF
-
-	fi
-
-if test "$ac_cv_res_state_ext" = no; then
-	missing_includes=yes
-fi
-
-
-	{ echo "$as_me:$LINENO: checking for nsort in res_state" >&5
-echo $ECHO_N "checking for nsort in res_state... $ECHO_C" >&6; }
-	if test "${ac_cv_res_state+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.  */
-
-#		include <sys/types.h>
-#		include <netinet/in.h>
-#		include <netinet6/in6.h>
-#		include <resolv.h>
-int
-main ()
-{
-struct __res_state e; e.nsort = 0
-  ;
-  return 0;
-}
-_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_cv_res_state=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_res_state=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-
-	{ echo "$as_me:$LINENO: result: $ac_cv_res_state" >&5
-echo "${ECHO_T}$ac_cv_res_state" >&6; }
-	if test $ac_cv_res_state = yes; then
-		cat >>confdefs.h <<\_ACEOF
-#define HAVE_NEW_RES_STATE 1
-_ACEOF
-
-	fi
-
-
-
-
-
-
-
-
-
-for ac_func in vfprintf strcasecmp strlcat strlcpy strdup strsep
-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
+ac_fn_c_check_func "$LINENO" "vfprintf" "ac_cv_func_vfprintf"
+if test "x$ac_cv_func_vfprintf" = xyes; then :
+  $as_echo "#define HAVE_VFPRINTF 1" >>confdefs.h
 
 else
   case " $LIBOBJS " in
-  *" $ac_func.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+  *" vfprintf.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS vfprintf.$ac_objext"
  ;;
 esac
 
 fi
-done
 
+ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
+if test "x$ac_cv_func_strcasecmp" = xyes; then :
+  $as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h
 
-
-for ac_func in strftime
-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;;
+  case " $LIBOBJS " in
+  *" strcasecmp.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext"
+ ;;
 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"
+
+fi
+
+ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
+if test "x$ac_cv_func_strlcat" = xyes; then :
+  $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  case " $LIBOBJS " in
+  *" strlcat.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
+ ;;
+esac
 
-	eval "$as_ac_var=no"
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
+if test "x$ac_cv_func_strlcpy" = xyes; then :
+  $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" strlcpy.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
+ ;;
+esac
+
 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
+
+ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
+if test "x$ac_cv_func_strdup" = xyes; then :
+  $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" strdup.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
+ ;;
+esac
+
+fi
+
+ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
+if test "x$ac_cv_func_strsep" = xyes; then :
+  $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
+
+else
+  case " $LIBOBJS " in
+  *" strsep.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
+ ;;
+esac
+
+fi
+
+
+for ac_func in fork vfork strftime
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 done
 
-
-
 for ac_func in setlinebuf alarm
-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
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -8164,96 +5528,13 @@
 
 
 needsnprintf=no
-
-
 for ac_func in vsnprintf snprintf
-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
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 else
@@ -8271,16 +5552,12 @@
 fi
 
 
-    { echo "$as_me:$LINENO: checking return type of signal handlers" >&5
-echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
-if test "${ac_cv_type_signal+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
+$as_echo_n "checking return type of signal handlers... " >&6; }
+if ${ac_cv_type_signal+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
 #include <signal.h>
@@ -8293,35 +5570,15 @@
   return 0;
 }
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_type_signal=int
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_signal=void
+  ac_cv_type_signal=void
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
-echo "${ECHO_T}$ac_cv_type_signal" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
 
 cat >>confdefs.h <<_ACEOF
 #define RETSIGTYPE $ac_cv_type_signal
@@ -8329,210 +5586,41 @@
 
 
     if test "$ac_cv_type_signal" = void ; then
-	    cat >>confdefs.h <<\_ACEOF
-#define RETSIGVAL
-_ACEOF
+
+$as_echo "#define RETSIGVAL /**/" >>confdefs.h
 
     else
-	    cat >>confdefs.h <<\_ACEOF
-#define RETSIGVAL (0)
-_ACEOF
+
+$as_echo "#define RETSIGVAL (0)" >>confdefs.h
 
     fi
     case "$host_os" in
 
     irix*)
-	    cat >>confdefs.h <<\_ACEOF
-#define _BSD_SIGNALS 1
-_ACEOF
+
+$as_echo "#define _BSD_SIGNALS 1" >>confdefs.h
 
 	    ;;
 
     *)
-
-for ac_func in sigaction
-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
+	    	    for ac_func in sigaction
+do :
+  ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
+if test "x$ac_cv_func_sigaction" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_SIGACTION 1
 _ACEOF
 
 fi
 done
 
 	    if test $ac_cv_func_sigaction = no ; then
-
-for ac_func in sigset
-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
+		    for ac_func in sigset
+do :
+  ac_fn_c_check_func "$LINENO" "sigset" "ac_cv_func_sigset"
+if test "x$ac_cv_func_sigset" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_SIGSET 1
 _ACEOF
 
 fi
@@ -8542,17 +5630,13 @@
 	    ;;
     esac
 
-{ echo "$as_me:$LINENO: checking for library containing dnet_htoa" >&5
-echo $ECHO_N "checking for library containing dnet_htoa... $ECHO_C" >&6; }
-if test "${ac_cv_search_dnet_htoa+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dnet_htoa" >&5
+$as_echo_n "checking for library containing dnet_htoa... " >&6; }
+if ${ac_cv_search_dnet_htoa+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -8577,71 +5661,42 @@
     ac_res=-l$ac_lib
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
-  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
+  if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_search_dnet_htoa=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_dnet_htoa+set}" = set; then
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_dnet_htoa+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_dnet_htoa+set}" = set; then
-  :
+if ${ac_cv_search_dnet_htoa+:} false; then :
+
 else
   ac_cv_search_dnet_htoa=no
 fi
 rm conftest.$ac_ext
 LIBS=$ac_func_search_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_dnet_htoa" >&5
-echo "${ECHO_T}$ac_cv_search_dnet_htoa" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dnet_htoa" >&5
+$as_echo "$ac_cv_search_dnet_htoa" >&6; }
 ac_res=$ac_cv_search_dnet_htoa
-if test "$ac_res" != no; then
+if test "$ac_res" != no; then :
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_DNET_HTOA 1
-_ACEOF
+
+$as_echo "#define HAVE_DNET_HTOA 1" >>confdefs.h
 
 fi
 
 
-
-{ echo "$as_me:$LINENO: checking for main in -lrpc" >&5
-echo $ECHO_N "checking for main in -lrpc... $ECHO_C" >&6; }
-if test "${ac_cv_lib_rpc_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrpc" >&5
+$as_echo_n "checking for main in -lrpc... " >&6; }
+if ${ac_cv_lib_rpc_main+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lrpc  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
@@ -8653,39 +5708,18 @@
   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
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_rpc_main=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_rpc_main=no
+  ac_cv_lib_rpc_main=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_rpc_main" >&5
-echo "${ECHO_T}$ac_cv_lib_rpc_main" >&6; }
-if test $ac_cv_lib_rpc_main = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rpc_main" >&5
+$as_echo "$ac_cv_lib_rpc_main" >&6; }
+if test "x$ac_cv_lib_rpc_main" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBRPC 1
 _ACEOF
@@ -8694,17 +5728,13 @@
 
 fi
 
-{ echo "$as_me:$LINENO: checking for library containing getrpcbynumber" >&5
-echo $ECHO_N "checking for library containing getrpcbynumber... $ECHO_C" >&6; }
-if test "${ac_cv_search_getrpcbynumber+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getrpcbynumber" >&5
+$as_echo_n "checking for library containing getrpcbynumber... " >&6; }
+if ${ac_cv_search_getrpcbynumber+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_func_search_save_LIBS=$LIBS
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -8729,563 +5759,65 @@
     ac_res=-l$ac_lib
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
-  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
+  if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_search_getrpcbynumber=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_getrpcbynumber+set}" = set; then
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_getrpcbynumber+:} false; then :
   break
 fi
 done
-if test "${ac_cv_search_getrpcbynumber+set}" = set; then
-  :
+if ${ac_cv_search_getrpcbynumber+:} false; then :
+
 else
   ac_cv_search_getrpcbynumber=no
 fi
 rm conftest.$ac_ext
 LIBS=$ac_func_search_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_getrpcbynumber" >&5
-echo "${ECHO_T}$ac_cv_search_getrpcbynumber" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getrpcbynumber" >&5
+$as_echo "$ac_cv_search_getrpcbynumber" >&6; }
 ac_res=$ac_cv_search_getrpcbynumber
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETRPCBYNUMBER 1
-_ACEOF
-
-fi
-
-
-
-
-    # Most operating systems have gethostbyname() in the default searched
-    # libraries (i.e. libc):
-    # Some OSes (eg. Solaris) place it in libnsl
-    # Some strange OSes (SINIX) have it in libsocket:
-    { echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
-echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6; }
-if test "${ac_cv_search_gethostbyname+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$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 gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' nsl socket resolv; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  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_search_gethostbyname=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_gethostbyname+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_gethostbyname+set}" = set; then
-  :
-else
-  ac_cv_search_gethostbyname=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
-echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6; }
-ac_res=$ac_cv_search_gethostbyname
-if test "$ac_res" != no; then
+if test "$ac_res" != no; then :
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-fi
-
-    # Unfortunately libsocket sometimes depends on libnsl and
-    # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
-    if test "$ac_cv_search_gethostbyname" = "no"
-    then
-	{ echo "$as_me:$LINENO: checking for gethostbyname in -lsocket" >&5
-echo $ECHO_N "checking for gethostbyname in -lsocket... $ECHO_C" >&6; }
-if test "${ac_cv_lib_socket_gethostbyname+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket -lnsl $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 gethostbyname ();
-int
-main ()
-{
-return gethostbyname ();
-  ;
-  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_socket_gethostbyname=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_socket_gethostbyname=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_socket_gethostbyname" >&5
-echo "${ECHO_T}$ac_cv_lib_socket_gethostbyname" >&6; }
-if test $ac_cv_lib_socket_gethostbyname = yes; then
-  LIBS="-lsocket -lnsl $LIBS"
-fi
-
-    fi
-    { echo "$as_me:$LINENO: checking for library containing socket" >&5
-echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6; }
-if test "${ac_cv_search_socket+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$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 socket ();
-int
-main ()
-{
-return socket ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' socket; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  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_search_socket=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
+$as_echo "#define HAVE_GETRPCBYNUMBER 1" >>confdefs.h
 
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_socket+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_socket+set}" = set; then
-  :
-else
-  ac_cv_search_socket=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
-echo "${ECHO_T}$ac_cv_search_socket" >&6; }
-ac_res=$ac_cv_search_socket
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-else
-  { echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
-echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
-if test "${ac_cv_lib_socket_socket+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsocket -lnsl $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 socket ();
-int
-main ()
-{
-return socket ();
-  ;
-  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_socket_socket=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_socket_socket=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_socket_socket" >&5
-echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
-if test $ac_cv_lib_socket_socket = yes; then
-  LIBS="-lsocket -lnsl $LIBS"
-fi
-
-fi
-
-    # DLPI needs putmsg under HPUX so test for -lstr while we're at it
-    { echo "$as_me:$LINENO: checking for library containing putmsg" >&5
-echo $ECHO_N "checking for library containing putmsg... $ECHO_C" >&6; }
-if test "${ac_cv_search_putmsg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$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 putmsg ();
-int
-main ()
-{
-return putmsg ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' str; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  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_search_putmsg=$ac_res
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext
-  if test "${ac_cv_search_putmsg+set}" = set; then
-  break
-fi
-done
-if test "${ac_cv_search_putmsg+set}" = set; then
-  :
-else
-  ac_cv_search_putmsg=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_search_putmsg" >&5
-echo "${ECHO_T}$ac_cv_search_putmsg" >&6; }
-ac_res=$ac_cv_search_putmsg
-if test "$ac_res" != no; then
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
 
 
 
                 LBL_LIBS="$LIBS"
     pfopen=/usr/examples/packetfilter/pfopen.c
     if test -f $pfopen ; then
-
-for ac_func in pfopen
-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
+	    for ac_func in pfopen
+do :
+  ac_fn_c_check_func "$LINENO" "pfopen" "ac_cv_func_pfopen"
+if test "x$ac_cv_func_pfopen" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_PFOPEN 1
 _ACEOF
 
 fi
 done
 
 	    if test $ac_cv_func_pfopen = "no" ; then
-		    { echo "$as_me:$LINENO: result: Using $pfopen" >&5
-echo "${ECHO_T}Using $pfopen" >&6; }
+		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $pfopen" >&5
+$as_echo "Using $pfopen" >&6; }
 		    LIBS="$LIBS $pfopen"
 	    fi
     fi
-    { echo "$as_me:$LINENO: checking for local pcap library" >&5
-echo $ECHO_N "checking for local pcap library... $ECHO_C" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5
+$as_echo_n "checking for local pcap library... " >&6; }
     libpcap=FAIL
     lastdir=FAIL
     places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
-	egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
+	egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT)?$'`
     for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do
-	    basedir=`echo $dir | sed -e 's/[ab][0-9]*$//'`
+	    basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \
+	        sed -e 's/-PRE-GIT$//' `
 	    if test $lastdir = $basedir ; then
 		    		    continue;
 	    fi
@@ -9296,20 +5828,137 @@
 		    	    fi
     done
     if test $libpcap = FAIL ; then
-	    { echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6; }
-	    { echo "$as_me:$LINENO: checking for main in -lpcap" >&5
-echo $ECHO_N "checking for main in -lpcap... $ECHO_C" >&6; }
-if test "${ac_cv_lib_pcap_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+
+	    #
+	    # Look for pcap-config.
+	    #
+	    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pcap-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pcap-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PCAP_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PCAP_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PCAP_CONFIG="$PCAP_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PCAP_CONFIG=$ac_cv_path_PCAP_CONFIG
+if test -n "$PCAP_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCAP_CONFIG" >&5
+$as_echo "$PCAP_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PCAP_CONFIG"; then
+  ac_pt_PCAP_CONFIG=$PCAP_CONFIG
+  # Extract the first word of "pcap-config", so it can be a program name with args.
+set dummy pcap-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PCAP_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PCAP_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PCAP_CONFIG="$ac_pt_PCAP_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PCAP_CONFIG=$ac_cv_path_ac_pt_PCAP_CONFIG
+if test -n "$ac_pt_PCAP_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PCAP_CONFIG" >&5
+$as_echo "$ac_pt_PCAP_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PCAP_CONFIG" = x; then
+    PCAP_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PCAP_CONFIG=$ac_pt_PCAP_CONFIG
+  fi
+else
+  PCAP_CONFIG="$ac_cv_path_PCAP_CONFIG"
+fi
+
+	    if test -n "$PCAP_CONFIG" ; then
+		#
+		# Found - use it to get the include flags for
+		# libpcap and the flags to link with libpcap.
+		#
+		# Please read section 11.6 "Shell Substitutions"
+		# in the autoconf manual before doing anything
+		# to this that involves quoting.  Especially note
+		# the statement "There is just no portable way to use
+		# double-quoted strings inside double-quoted back-quoted
+		# expressions (pfew!)."
+		#
+		cflags=`"$PCAP_CONFIG" --cflags`
+		V_INCLS="$cflags $V_INCLS"
+		libpcap=`"$PCAP_CONFIG" --libs`
+	    else
+		#
+		# Not found; look for pcap.
+		#
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcap" >&5
+$as_echo_n "checking for main in -lpcap... " >&6; }
+if ${ac_cv_lib_pcap_main+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lpcap  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 
@@ -9321,64 +5970,42 @@
   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
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_pcap_main=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_pcap_main=no
+  ac_cv_lib_pcap_main=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_pcap_main" >&5
-echo "${ECHO_T}$ac_cv_lib_pcap_main" >&6; }
-if test $ac_cv_lib_pcap_main = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_main" >&5
+$as_echo "$ac_cv_lib_pcap_main" >&6; }
+if test "x$ac_cv_lib_pcap_main" = xyes; then :
   libpcap="-lpcap"
 fi
 
-	    if test $libpcap = FAIL ; then
-		    { { echo "$as_me:$LINENO: error: see the INSTALL doc for more info" >&5
-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 $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
-		if test -r /usr/local/include/pcap/pcap.h; then
-		    d="/usr/local/include/pcap"
-		elif test -r /usr/include/pcap/pcap.h; then
-		    d="/usr/include/pcap"
+		if test $libpcap = FAIL ; then
+		    as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5
 		fi
-	    fi
-	    if test -z "$d" ; then
-		{ echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6; }
-	    else
-		V_INCLS="-I$d $V_INCLS"
-		{ echo "$as_me:$LINENO: result: found -- -I$d added" >&5
-echo "${ECHO_T}found -- -I$d added" >&6; }
+																																								{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for extraneous pcap header directories" >&5
+$as_echo_n "checking for extraneous pcap header directories... " >&6; }
+		if test \( ! -r /usr/local/include/pcap.h \) -a \
+			\( ! -r /usr/include/pcap.h \); then
+		    if test -r /usr/local/include/pcap/pcap.h; then
+			d="/usr/local/include/pcap"
+		    elif test -r /usr/include/pcap/pcap.h; then
+			d="/usr/include/pcap"
+		    fi
+		fi
+		if test -z "$d" ; then
+		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
+$as_echo "not found" >&6; }
+		else
+		    V_INCLS="-I$d $V_INCLS"
+		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: found -- -I$d added" >&5
+$as_echo "found -- -I$d added" >&6; }
+		fi
 	    fi
     else
 	    V_PCAPDEP=$libpcap
@@ -9389,120 +6016,126 @@
 	    elif test -r $places/pcap.h; then
 		    V_INCLS="-I$places $V_INCLS"
 	    else
-                    { { echo "$as_me:$LINENO: error: cannot find pcap.h" >&5
-echo "$as_me: error: cannot find pcap.h" >&2;}
-   { (exit see INSTALL); exit see INSTALL; }; }
+                    as_fn_error see INSTALL "cannot find pcap.h" "$LINENO" 5
  	    fi
-	    { echo "$as_me:$LINENO: result: $libpcap" >&5
-echo "${ECHO_T}$libpcap" >&6; }
+	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5
+$as_echo "$libpcap" >&6; }
+	    # Extract the first word of "pcap-config", so it can be a program name with args.
+set dummy pcap-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PCAP_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PCAP_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PCAP_CONFIG="$PCAP_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $d
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PCAP_CONFIG=$ac_cv_path_PCAP_CONFIG
+if test -n "$PCAP_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCAP_CONFIG" >&5
+$as_echo "$PCAP_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+	    if test -n "$PCAP_CONFIG"; then
+		#
+		# The libpcap directory has a pcap-config script.
+		# Use it to get any additioal libraries needed
+		# to link with the libpcap archive library in
+		# that directory.
+		#
+		# Please read section 11.6 "Shell Substitutions"
+		# in the autoconf manual before doing anything
+		# to this that involves quoting.  Especially note
+		# the statement "There is just no portable way to use
+		# double-quoted strings inside double-quoted back-quoted
+		# expressions (pfew!)."
+		#
+		additional_libs=`"$PCAP_CONFIG" --additional-libs --static`
+		libpcap="$libpcap $additional_libs"
+	    fi
     fi
     LIBS="$libpcap $LIBS"
-    case "$host_os" in
+    if ! test -n "$PCAP_CONFIG" ; then
+	#
+	# We don't have pcap-config; find out any additional link flags
+	# we need.  (If we have pcap-config, we assume it tells us what
+	# we need.)
+	#
+	case "$host_os" in
 
-    aix*)
+	aix*)
+	    #
+	    # If libpcap is DLPI-based, we have to use /lib/pse.exp if
+	    # present, as we use the STREAMS routines.
+	    #
+	    # (XXX - true only if we're linking with a static libpcap?)
+	    #
 	    pseexe="/lib/pse.exp"
-	    { echo "$as_me:$LINENO: checking for $pseexe" >&5
-echo $ECHO_N "checking for $pseexe... $ECHO_C" >&6; }
+	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
+$as_echo_n "checking for $pseexe... " >&6; }
 	    if test -f $pseexe ; then
-		    { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 		    LIBS="$LIBS -I:$pseexe"
 	    fi
+
 	    #
-	    # We need "-lodm" and "-lcfg", as libpcap requires them on
-	    # AIX, and we just build a static libpcap.a and thus can't
-	    # arrange that when you link with libpcap you automatically
-	    # link with those libraries.
+	    # If libpcap is BPF-based, we need "-lodm" and "-lcfg", as
+	    # we use them to load the BPF module.
+	    #
+	    # (XXX - true only if we're linking with a static libpcap?)
 	    #
 	    LIBS="$LIBS -lodm -lcfg"
 	    ;;
-    esac
+	esac
+    fi
 
-                        { echo "$as_me:$LINENO: checking for pcap_list_datalinks" >&5
-echo $ECHO_N "checking for pcap_list_datalinks... $ECHO_C" >&6; }
-if test "${ac_cv_func_pcap_list_datalinks+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+                                    ac_fn_c_check_func "$LINENO" "pcap_loop" "ac_cv_func_pcap_loop"
+if test "x$ac_cv_func_pcap_loop" = xyes; then :
+
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define pcap_list_datalinks to an innocuous variant, in case <limits.h> declares pcap_list_datalinks.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define pcap_list_datalinks innocuous_pcap_list_datalinks
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char pcap_list_datalinks (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+	    as_fn_error $? "Report this to tcpdump-workers@lists.tcpdump.org, and include the
+config.log file in your report.  If you have downloaded libpcap from
+tcpdump.org, and built it yourself, please also include the config.log
+file from the libpcap source directory, the Makefile from the libpcap
+source directory, and the output of the make process for libpcap, as
+this could be a problem with the libpcap that was built, and we will
+not be able to determine why this is happening, and thus will not be
+able to fix it, without that information, as we have not been able to
+reproduce this problem ourselves." "$LINENO" 5
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef pcap_list_datalinks
-
-/* 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 pcap_list_datalinks ();
-/* 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_pcap_list_datalinks || defined __stub___pcap_list_datalinks
-choke me
-#endif
-
-int
-main ()
-{
-return pcap_list_datalinks ();
-  ;
-  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_func_pcap_list_datalinks=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_pcap_list_datalinks=no
 fi
 
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_pcap_list_datalinks" >&5
-echo "${ECHO_T}$ac_cv_func_pcap_list_datalinks" >&6; }
-if test $ac_cv_func_pcap_list_datalinks = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_PCAP_LIST_DATALINKS 1
-_ACEOF
+
+                        ac_fn_c_check_func "$LINENO" "pcap_list_datalinks" "ac_cv_func_pcap_list_datalinks"
+if test "x$ac_cv_func_pcap_list_datalinks" = xyes; then :
+
+$as_echo "#define HAVE_PCAP_LIST_DATALINKS 1" >>confdefs.h
 
 else
 
@@ -9515,266 +6148,23 @@
 
 fi
 
-    { echo "$as_me:$LINENO: checking for pcap_set_datalink" >&5
-echo $ECHO_N "checking for pcap_set_datalink... $ECHO_C" >&6; }
-if test "${ac_cv_func_pcap_set_datalink+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 pcap_set_datalink to an innocuous variant, in case <limits.h> declares pcap_set_datalink.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define pcap_set_datalink innocuous_pcap_set_datalink
+    ac_fn_c_check_func "$LINENO" "pcap_set_datalink" "ac_cv_func_pcap_set_datalink"
+if test "x$ac_cv_func_pcap_set_datalink" = xyes; then :
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char pcap_set_datalink (); 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 pcap_set_datalink
-
-/* 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 pcap_set_datalink ();
-/* 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_pcap_set_datalink || defined __stub___pcap_set_datalink
-choke me
-#endif
-
-int
-main ()
-{
-return pcap_set_datalink ();
-  ;
-  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_func_pcap_set_datalink=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_pcap_set_datalink=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_pcap_set_datalink" >&5
-echo "${ECHO_T}$ac_cv_func_pcap_set_datalink" >&6; }
-if test $ac_cv_func_pcap_set_datalink = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_PCAP_SET_DATALINK 1
-_ACEOF
+$as_echo "#define HAVE_PCAP_SET_DATALINK 1" >>confdefs.h
 
 fi
 
-    { echo "$as_me:$LINENO: checking for pcap_datalink_name_to_val" >&5
-echo $ECHO_N "checking for pcap_datalink_name_to_val... $ECHO_C" >&6; }
-if test "${ac_cv_func_pcap_datalink_name_to_val+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 pcap_datalink_name_to_val to an innocuous variant, in case <limits.h> declares pcap_datalink_name_to_val.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define pcap_datalink_name_to_val innocuous_pcap_datalink_name_to_val
+    ac_fn_c_check_func "$LINENO" "pcap_datalink_name_to_val" "ac_cv_func_pcap_datalink_name_to_val"
+if test "x$ac_cv_func_pcap_datalink_name_to_val" = xyes; then :
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char pcap_datalink_name_to_val (); 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
+$as_echo "#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1" >>confdefs.h
 
-#undef pcap_datalink_name_to_val
+	    ac_fn_c_check_func "$LINENO" "pcap_datalink_val_to_description" "ac_cv_func_pcap_datalink_val_to_description"
+if test "x$ac_cv_func_pcap_datalink_val_to_description" = xyes; then :
 
-/* 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 pcap_datalink_name_to_val ();
-/* 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_pcap_datalink_name_to_val || defined __stub___pcap_datalink_name_to_val
-choke me
-#endif
-
-int
-main ()
-{
-return pcap_datalink_name_to_val ();
-  ;
-  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_func_pcap_datalink_name_to_val=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_pcap_datalink_name_to_val=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_pcap_datalink_name_to_val" >&5
-echo "${ECHO_T}$ac_cv_func_pcap_datalink_name_to_val" >&6; }
-if test $ac_cv_func_pcap_datalink_name_to_val = yes; then
-
-	    cat >>confdefs.h <<\_ACEOF
-#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
-_ACEOF
-
-	    { echo "$as_me:$LINENO: checking for pcap_datalink_val_to_description" >&5
-echo $ECHO_N "checking for pcap_datalink_val_to_description... $ECHO_C" >&6; }
-if test "${ac_cv_func_pcap_datalink_val_to_description+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 pcap_datalink_val_to_description to an innocuous variant, in case <limits.h> declares pcap_datalink_val_to_description.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define pcap_datalink_val_to_description innocuous_pcap_datalink_val_to_description
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char pcap_datalink_val_to_description (); 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 pcap_datalink_val_to_description
-
-/* 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 pcap_datalink_val_to_description ();
-/* 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_pcap_datalink_val_to_description || defined __stub___pcap_datalink_val_to_description
-choke me
-#endif
-
-int
-main ()
-{
-return pcap_datalink_val_to_description ();
-  ;
-  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_func_pcap_datalink_val_to_description=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_pcap_datalink_val_to_description=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_pcap_datalink_val_to_description" >&5
-echo "${ECHO_T}$ac_cv_func_pcap_datalink_val_to_description" >&6; }
-if test $ac_cv_func_pcap_datalink_val_to_description = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1
-_ACEOF
+$as_echo "#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1" >>confdefs.h
 
 else
 
@@ -9800,186 +6190,22 @@
 fi
 
 
-
-for ac_func in pcap_breakloop
-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
+                        for ac_func in pcap_breakloop
+do :
+  ac_fn_c_check_func "$LINENO" "pcap_breakloop" "ac_cv_func_pcap_breakloop"
+if test "x$ac_cv_func_pcap_breakloop" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_PCAP_BREAKLOOP 1
 _ACEOF
 
 fi
 done
 
 
-                { echo "$as_me:$LINENO: checking for pcap_dump_ftell" >&5
-echo $ECHO_N "checking for pcap_dump_ftell... $ECHO_C" >&6; }
-if test "${ac_cv_func_pcap_dump_ftell+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 pcap_dump_ftell to an innocuous variant, in case <limits.h> declares pcap_dump_ftell.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define pcap_dump_ftell innocuous_pcap_dump_ftell
+                ac_fn_c_check_func "$LINENO" "pcap_dump_ftell" "ac_cv_func_pcap_dump_ftell"
+if test "x$ac_cv_func_pcap_dump_ftell" = xyes; then :
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char pcap_dump_ftell (); 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 pcap_dump_ftell
-
-/* 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 pcap_dump_ftell ();
-/* 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_pcap_dump_ftell || defined __stub___pcap_dump_ftell
-choke me
-#endif
-
-int
-main ()
-{
-return pcap_dump_ftell ();
-  ;
-  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_func_pcap_dump_ftell=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_func_pcap_dump_ftell=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_func_pcap_dump_ftell" >&5
-echo "${ECHO_T}$ac_cv_func_pcap_dump_ftell" >&6; }
-if test $ac_cv_func_pcap_dump_ftell = yes; then
-  cat >>confdefs.h <<\_ACEOF
-#define HAVE_PCAP_DUMP_FTELL 1
-_ACEOF
+$as_echo "#define HAVE_PCAP_DUMP_FTELL 1" >>confdefs.h
 
 else
 
@@ -10006,13 +6232,9 @@
 # "_inet_ntop()", and has a #define macro in one of the system headers
 # to rename it.
 #
-{ echo "$as_me:$LINENO: checking for inet_ntop" >&5
-echo $ECHO_N "checking for inet_ntop... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_ntop" >&5
+$as_echo_n "checking for inet_ntop... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -10027,32 +6249,12 @@
   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
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	case " $LIBOBJS " in
   *" inet_ntop.$ac_objext "* ) ;;
   *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext"
@@ -10060,16 +6262,11 @@
 esac
 
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-{ echo "$as_me:$LINENO: checking for inet_pton" >&5
-echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
+$as_echo_n "checking for inet_pton... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -10084,32 +6281,12 @@
   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
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	case " $LIBOBJS " in
   *" inet_pton.$ac_objext "* ) ;;
   *) LIBOBJS="$LIBOBJS inet_pton.$ac_objext"
@@ -10117,16 +6294,11 @@
 esac
 
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-{ echo "$as_me:$LINENO: checking for inet_aton" >&5
-echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
+$as_echo_n "checking for inet_aton... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
 #include <netinet/in.h>
@@ -10141,32 +6313,12 @@
   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
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+if ac_fn_c_try_link "$LINENO"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	case " $LIBOBJS " in
   *" inet_aton.$ac_objext "* ) ;;
   *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
@@ -10174,9 +6326,8 @@
 esac
 
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 
 #
 # Check for these after AC_LBL_LIBPCAP, for the same reason.
@@ -10191,111 +6342,24 @@
 #
 # Before you is a C compiler.
 #
-
 for ac_func in ether_ntohost
-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
+do :
+  ac_fn_c_check_func "$LINENO" "ether_ntohost" "ac_cv_func_ether_ntohost"
+if test "x$ac_cv_func_ether_ntohost" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_ETHER_NTOHOST 1
 _ACEOF
 
-    { echo "$as_me:$LINENO: checking for buggy ether_ntohost" >&5
-echo $ECHO_N "checking for buggy ether_ntohost... $ECHO_C" >&6; }
-if test "${ac_cv_buggy_ether_ntohost+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy ether_ntohost" >&5
+$as_echo_n "checking for buggy ether_ntohost... " >&6; }
+if ${ac_cv_buggy_ether_ntohost+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
 
-	if test "$cross_compiling" = yes; then
+	if test "$cross_compiling" = yes; then :
   ac_cv_buggy_ether_ntohost="not while cross-compiling"
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 		#include <netdb.h>
@@ -10314,46 +6378,21 @@
 		}
 
 _ACEOF
-rm -f 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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+if ac_fn_c_try_run "$LINENO"; then :
   ac_cv_buggy_ether_ntohost=no
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_buggy_ether_ntohost=yes
+  ac_cv_buggy_ether_ntohost=yes
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_buggy_ether_ntohost" >&5
-echo "${ECHO_T}$ac_cv_buggy_ether_ntohost" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_ether_ntohost" >&5
+$as_echo "$ac_cv_buggy_ether_ntohost" >&6; }
     if test "$ac_cv_buggy_ether_ntohost" = "no"; then
-	cat >>confdefs.h <<\_ACEOF
-#define USE_ETHER_NTOHOST 1
-_ACEOF
+
+$as_echo "#define USE_ETHER_NTOHOST 1" >>confdefs.h
 
     fi
 
@@ -10369,18 +6408,7 @@
 		#
 		# Yes.  Does it declare ether_ntohost()?
 		#
-		{ echo "$as_me:$LINENO: checking whether ether_ntohost is declared" >&5
-echo $ECHO_N "checking whether ether_ntohost is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_ether_ntohost+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.  */
-
+		ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -10390,53 +6418,11 @@
 #include <net/if.h>
 #include <netinet/if_ether.h>
 
-
-int
-main ()
-{
-#ifndef ether_ntohost
-  (void) ether_ntohost;
-#endif
-
-  ;
-  return 0;
-}
-_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_cv_have_decl_ether_ntohost=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_have_decl_ether_ntohost=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_ether_ntohost" >&5
-echo "${ECHO_T}$ac_cv_have_decl_ether_ntohost" >&6; }
-if test $ac_cv_have_decl_ether_ntohost = yes; then
+"
+if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
 
 
-cat >>confdefs.h <<\_ACEOF
-#define NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST
-_ACEOF
+$as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
 
 
 fi
@@ -10449,140 +6435,12 @@
 		#
 		# No, how about <netinet/ether.h>, as on Linux?
 		#
-
-for ac_header in netinet/ether.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
+		for ac_header in netinet/ether.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "netinet/ether.h" "ac_cv_header_netinet_ether_h" "$ac_includes_default"
+if test "x$ac_cv_header_netinet_ether_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_NETINET_ETHER_H 1
 _ACEOF
 
 fi
@@ -10597,67 +6455,14 @@
 			# suppress the next test.
 			#
 			unset ac_cv_have_decl_ether_ntohost
-			{ echo "$as_me:$LINENO: checking whether ether_ntohost is declared" >&5
-echo $ECHO_N "checking whether ether_ntohost is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_ether_ntohost+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.  */
-
+			ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
 #include <netinet/ether.h>
 
-
-int
-main ()
-{
-#ifndef ether_ntohost
-  (void) ether_ntohost;
-#endif
-
-  ;
-  return 0;
-}
-_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_cv_have_decl_ether_ntohost=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_have_decl_ether_ntohost=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_ether_ntohost" >&5
-echo "${ECHO_T}$ac_cv_have_decl_ether_ntohost" >&6; }
-if test $ac_cv_have_decl_ether_ntohost = yes; then
+"
+if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
 
 
-cat >>confdefs.h <<\_ACEOF
-#define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST
-_ACEOF
+$as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
 
 
 fi
@@ -10672,18 +6477,7 @@
 		# No, we'll have to declare it ourselves.
 		# Do we have "struct ether_addr"?
 		#
-		{ echo "$as_me:$LINENO: checking for struct ether_addr" >&5
-echo $ECHO_N "checking for struct ether_addr... $ECHO_C" >&6; }
-if test "${ac_cv_type_struct_ether_addr+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.  */
-
+		ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -10693,49 +6487,8 @@
 #include <net/if.h>
 #include <netinet/if_ether.h>
 
-
-typedef struct ether_addr ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_struct_ether_addr=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_struct_ether_addr=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_ether_addr" >&5
-echo "${ECHO_T}$ac_cv_type_struct_ether_addr" >&6; }
-if test $ac_cv_type_struct_ether_addr = yes; then
+"
+if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_ETHER_ADDR 1
@@ -10745,30 +6498,64 @@
 fi
 
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DECL_ETHER_NTOHOST 0
-_ACEOF
+$as_echo "#define HAVE_DECL_ETHER_NTOHOST 0" >>confdefs.h
 
 	else
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DECL_ETHER_NTOHOST 1
-_ACEOF
+$as_echo "#define HAVE_DECL_ETHER_NTOHOST 1" >>confdefs.h
 
 	fi
 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; }
-	if test "${ac_cv_sockaddr_has_sa_len+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# libdlpi is needed for Solaris 11 and later.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
+$as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
+if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldlpi -L/lib $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* 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
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_dlpi_dlpi_walk=yes
+else
+  ac_cv_lib_dlpi_dlpi_walk=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
+$as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
+if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
+  LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS"
+fi
+
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr struct has sa_len member" >&5
+$as_echo_n "checking if sockaddr struct has sa_len member... " >&6; }
+	if ${ac_cv_sockaddr_has_sa_len+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #		include <sys/types.h>
@@ -10781,40 +6568,18 @@
   return 0;
 }
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_sockaddr_has_sa_len=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_sockaddr_has_sa_len=no
+  ac_cv_sockaddr_has_sa_len=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-	{ echo "$as_me:$LINENO: result: $ac_cv_sockaddr_has_sa_len" >&5
-echo "${ECHO_T}$ac_cv_sockaddr_has_sa_len" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sockaddr_has_sa_len" >&5
+$as_echo "$ac_cv_sockaddr_has_sa_len" >&6; }
 		if test $ac_cv_sockaddr_has_sa_len = yes ; then
-			cat >>confdefs.h <<\_ACEOF
-#define HAVE_SOCKADDR_SA_LEN 1
-_ACEOF
+			$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
 
 	fi
 
@@ -10822,160 +6587,58 @@
 	missing_includes=yes
 fi
 
-
-
-
-for ac_func in pcap_findalldevs pcap_dump_flush pcap_lib_version
-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
+#
+# 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
+# introduced in libpcap 1.0.0.
+#
+for ac_func in pcap_create
+do :
+  ac_fn_c_check_func "$LINENO" "pcap_create" "ac_cv_func_pcap_create"
+if test "x$ac_cv_func_pcap_create" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+#define HAVE_PCAP_CREATE 1
+_ACEOF
+
+fi
+done
+
+if test $ac_cv_func_pcap_create = "yes" ; then
+	#
+	# OK, do we have pcap_set_tstamp_type?  If so, assume we have
+	# pcap_list_tstamp_types and pcap_free_tstamp_types as well.
+	#
+	for ac_func in pcap_set_tstamp_type
+do :
+  ac_fn_c_check_func "$LINENO" "pcap_set_tstamp_type" "ac_cv_func_pcap_set_tstamp_type"
+if test "x$ac_cv_func_pcap_set_tstamp_type" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_PCAP_SET_TSTAMP_TYPE 1
+_ACEOF
+
+fi
+done
+
+fi
+
+for ac_func in pcap_findalldevs pcap_dump_flush pcap_lib_version pcap_setdirection
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
 done
 
 if test $ac_cv_func_pcap_findalldevs = "yes" ; then
-    savedcflags="$CFLAGS"
-    CFLAGS="$CFLAGS $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
-  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.  */
-#include <pcap.h>
-
-typedef pcap_if_t ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_pcap_if_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_pcap_if_t=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_pcap_if_t" >&5
-echo "${ECHO_T}$ac_cv_type_pcap_if_t" >&6; }
-if test $ac_cv_type_pcap_if_t = yes; then
+    savedcppflags="$CPPFLAGS"
+    CPPFLAGS="$CPPFLAGS $V_INCLS"
+    ac_fn_c_check_type "$LINENO" "pcap_if_t" "ac_cv_type_pcap_if_t" "#include <pcap.h>
+"
+if test "x$ac_cv_type_pcap_if_t" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_PCAP_IF_T 1
@@ -10984,17 +6647,13 @@
 
 fi
 
-    CFLAGS="$savedcflags"
+    CPPFLAGS="$savedcppflags"
 fi
 
 if test $ac_cv_func_pcap_lib_version = "no" ; then
-    { echo "$as_me:$LINENO: checking whether pcap_version is defined by libpcap" >&5
-echo $ECHO_N "checking whether pcap_version is defined by libpcap... $ECHO_C" >&6; }
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pcap_version is defined by libpcap" >&5
+$as_echo_n "checking whether pcap_version is defined by libpcap... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -11009,53 +6668,27 @@
   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
+if ac_fn_c_try_link "$LINENO"; then :
   ac_lbl_cv_pcap_version_defined=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lbl_cv_pcap_version_defined=no
+  ac_lbl_cv_pcap_version_defined=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
     if test "$ac_lbl_cv_pcap_version_defined" = yes ; then
-    	{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-	cat >>confdefs.h <<\_ACEOF
-#define HAVE_PCAP_VERSION 1
-_ACEOF
+    	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_PCAP_VERSION 1" >>confdefs.h
 
     else
-	{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
     fi
 fi
-{ echo "$as_me:$LINENO: checking whether pcap_debug is defined by libpcap" >&5
-echo $ECHO_N "checking whether pcap_debug is defined by libpcap... $ECHO_C" >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pcap_debug is defined by libpcap" >&5
+$as_echo_n "checking whether pcap_debug is defined by libpcap... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -11070,54 +6703,28 @@
   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
+if ac_fn_c_try_link "$LINENO"; then :
   ac_lbl_cv_pcap_debug_defined=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lbl_cv_pcap_debug_defined=no
+  ac_lbl_cv_pcap_debug_defined=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then
-	{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-	cat >>confdefs.h <<\_ACEOF
-#define HAVE_PCAP_DEBUG 1
-_ACEOF
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_PCAP_DEBUG 1" >>confdefs.h
 
 else
-	{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	#
 	# OK, what about "yydebug"?
 	#
-	{ echo "$as_me:$LINENO: checking whether yydebug is defined by libpcap" >&5
-echo $ECHO_N "checking whether yydebug is defined by libpcap... $ECHO_C" >&6; }
-	cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yydebug is defined by libpcap" >&5
+$as_echo_n "checking whether yydebug is defined by libpcap... " >&6; }
+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 int
@@ -11132,171 +6739,92 @@
   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
+if ac_fn_c_try_link "$LINENO"; then :
   ac_lbl_cv_yydebug_defined=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_lbl_cv_yydebug_defined=no
+  ac_lbl_cv_yydebug_defined=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 	if test "$ac_lbl_cv_yydebug_defined" = yes ; then
-		{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-		cat >>confdefs.h <<\_ACEOF
-#define HAVE_YYDEBUG 1
-_ACEOF
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_YYDEBUG 1" >>confdefs.h
 
 	else
-		{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	fi
 fi
-
-for ac_func in bpf_dump
-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
+ac_fn_c_check_func "$LINENO" "bpf_dump" "ac_cv_func_bpf_dump"
+if test "x$ac_cv_func_bpf_dump" = xyes; then :
+  $as_echo "#define HAVE_BPF_DUMP 1" >>confdefs.h
 
 else
   case " $LIBOBJS " in
-  *" $ac_func.$ac_objext "* ) ;;
-  *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+  *" bpf_dump.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS bpf_dump.$ac_objext"
  ;;
 esac
 
 fi
-done
 
 
 V_GROUP=0
 if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
 	V_GROUP=wheel
 fi
+#
+# Assume V7/BSD convention for man pages (file formats in section 5,
+# miscellaneous info in section 7).
+#
+MAN_FILE_FORMATS=5
+MAN_MISC_INFO=7
 case "$host_os" in
 
 aix*)
-		cat >>confdefs.h <<\_ACEOF
-#define _SUN 1
-_ACEOF
 
+$as_echo "#define _SUN 1" >>confdefs.h
+
+	;;
+
+hpux*)
+	#
+	# Use System V conventions for man pages.
+	#
+	MAN_FILE_FORMATS=4
+	MAN_MISC_INFO=5
 	;;
 
 irix*)
 	V_GROUP=sys
+
+	#
+	# Use System V conventions for man pages.
+	#
+	MAN_FILE_FORMATS=4
+	MAN_MISC_INFO=5
 	;;
 
 osf*)
 	V_GROUP=system
+
+	#
+	# Use System V conventions for man pages.
+	#
+	MAN_FILE_FORMATS=4
+	MAN_MISC_INFO=5
 	;;
 
 solaris*)
 	V_GROUP=sys
+
+	#
+	# Use System V conventions for man pages.
+	#
+	MAN_FILE_FORMATS=4
+	MAN_MISC_INFO=5
 	;;
 esac
 
@@ -11304,140 +6832,120 @@
 	V_GROUP=bpf
 fi
 
+#
+# Make sure we have definitions for all the C99 specified-width types
+# (regardless of whether the environment is a C99 environment or not).
+ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t"
+case $ac_cv_c_int8_t in #(
+  no|yes) ;; #(
+  *)
 
+cat >>confdefs.h <<_ACEOF
+#define int8_t $ac_cv_c_int8_t
+_ACEOF
+;;
+esac
+
+ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t"
+case $ac_cv_c_int16_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<_ACEOF
+#define int16_t $ac_cv_c_int16_t
+_ACEOF
+;;
+esac
+
+ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
+case $ac_cv_c_int32_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<_ACEOF
+#define int32_t $ac_cv_c_int32_t
+_ACEOF
+;;
+esac
+
+ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
+case $ac_cv_c_int64_t in #(
+  no|yes) ;; #(
+  *)
+
+cat >>confdefs.h <<_ACEOF
+#define int64_t $ac_cv_c_int64_t
+_ACEOF
+;;
+esac
+
+ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t"
+case $ac_cv_c_uint8_t in #(
+  no|yes) ;; #(
+  *)
+
+$as_echo "#define _UINT8_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint8_t $ac_cv_c_uint8_t
+_ACEOF
+;;
+  esac
+
+ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t"
+case $ac_cv_c_uint16_t in #(
+  no|yes) ;; #(
+  *)
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint16_t $ac_cv_c_uint16_t
+_ACEOF
+;;
+  esac
+
+ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
+case $ac_cv_c_uint32_t in #(
+  no|yes) ;; #(
+  *)
+
+$as_echo "#define _UINT32_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint32_t $ac_cv_c_uint32_t
+_ACEOF
+;;
+  esac
+
+ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
+case $ac_cv_c_uint64_t in #(
+  no|yes) ;; #(
+  *)
+
+$as_echo "#define _UINT64_T 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define uint64_t $ac_cv_c_uint64_t
+_ACEOF
+;;
+  esac
+
+
+#
+# For now, we're using the old BSD-style u_intXX_t types, so check for
+# them.
+#
+# We should probably migrate to the standard C uintXX_t types.
+#
 for ac_header in sys/bitypes.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
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_bitypes_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_SYS_BITYPES_H 1
 _ACEOF
 
 fi
@@ -11445,680 +6953,80 @@
 done
 
 
-{ echo "$as_me:$LINENO: checking for int8_t" >&5
-echo $ECHO_N "checking for int8_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_int8_t+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.  */
-$ac_includes_default
-typedef int8_t ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_int8_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_int8_t=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_int8_t" >&5
-echo "${ECHO_T}$ac_cv_type_int8_t" >&6; }
-if test $ac_cv_type_int8_t = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define int8_t signed char
-_ACEOF
-
-fi
-
-{ echo "$as_me:$LINENO: checking for u_int8_t" >&5
-echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_u_int8_t+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.  */
-$ac_includes_default
+ac_fn_c_check_type "$LINENO" "u_int8_t" "ac_cv_type_u_int8_t" "$ac_includes_default
 #ifdef HAVE_SYS_BITYPES_H
 #include <sys/bitypes.h>
 #endif
+"
+if test "x$ac_cv_type_u_int8_t" = xyes; then :
 
-typedef u_int8_t ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_u_int8_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_u_int8_t=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_u_int8_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int8_t" >&6; }
-if test $ac_cv_type_u_int8_t = yes; then
-  :
 else
 
-cat >>confdefs.h <<\_ACEOF
-#define u_int8_t unsigned char
-_ACEOF
+$as_echo "#define u_int8_t unsigned char" >>confdefs.h
 
 fi
 
-{ echo "$as_me:$LINENO: checking for int16_t" >&5
-echo $ECHO_N "checking for int16_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_int16_t+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.  */
-$ac_includes_default
-typedef int16_t ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_int16_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_int16_t=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_int16_t" >&5
-echo "${ECHO_T}$ac_cv_type_int16_t" >&6; }
-if test $ac_cv_type_int16_t = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define int16_t short
-_ACEOF
-
-fi
-
-{ echo "$as_me:$LINENO: checking for u_int16_t" >&5
-echo $ECHO_N "checking for u_int16_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_u_int16_t+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.  */
-$ac_includes_default
+ac_fn_c_check_type "$LINENO" "u_int16_t" "ac_cv_type_u_int16_t" "$ac_includes_default
 #ifdef HAVE_SYS_BITYPES_H
 #include <sys/bitypes.h>
 #endif
+"
+if test "x$ac_cv_type_u_int16_t" = xyes; then :
 
-typedef u_int16_t ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_u_int16_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_u_int16_t=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_u_int16_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int16_t" >&6; }
-if test $ac_cv_type_u_int16_t = yes; then
-  :
 else
 
-cat >>confdefs.h <<\_ACEOF
-#define u_int16_t unsigned short
-_ACEOF
+$as_echo "#define u_int16_t unsigned short" >>confdefs.h
 
 fi
 
-{ echo "$as_me:$LINENO: checking for int32_t" >&5
-echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_int32_t+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.  */
-$ac_includes_default
-typedef int32_t ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_int32_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_int32_t=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_int32_t" >&5
-echo "${ECHO_T}$ac_cv_type_int32_t" >&6; }
-if test $ac_cv_type_int32_t = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define int32_t int
-_ACEOF
-
-fi
-
-{ echo "$as_me:$LINENO: checking for u_int32_t" >&5
-echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_u_int32_t+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.  */
-$ac_includes_default
+ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default
 #ifdef HAVE_SYS_BITYPES_H
 #include <sys/bitypes.h>
 #endif
+"
+if test "x$ac_cv_type_u_int32_t" = xyes; then :
 
-typedef u_int32_t ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_u_int32_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_u_int32_t=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_u_int32_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int32_t" >&6; }
-if test $ac_cv_type_u_int32_t = yes; then
-  :
 else
 
-cat >>confdefs.h <<\_ACEOF
-#define u_int32_t unsigned int
-_ACEOF
+$as_echo "#define u_int32_t unsigned int" >>confdefs.h
 
 fi
 
-{ echo "$as_me:$LINENO: checking for int64_t" >&5
-echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_int64_t+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.  */
-$ac_includes_default
-typedef int64_t ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_int64_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_int64_t=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_int64_t" >&5
-echo "${ECHO_T}$ac_cv_type_int64_t" >&6; }
-if test $ac_cv_type_int64_t = yes; then
-  :
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define int64_t long long
-_ACEOF
-
-fi
-
-{ echo "$as_me:$LINENO: checking for u_int64_t" >&5
-echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6; }
-if test "${ac_cv_type_u_int64_t+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.  */
-$ac_includes_default
+ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "$ac_includes_default
 #ifdef HAVE_SYS_BITYPES_H
 #include <sys/bitypes.h>
 #endif
+"
+if test "x$ac_cv_type_u_int64_t" = xyes; then :
 
-typedef u_int64_t ac__type_new_;
-int
-main ()
-{
-if ((ac__type_new_ *) 0)
-  return 0;
-if (sizeof (ac__type_new_))
-  return 0;
-  ;
-  return 0;
-}
-_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_cv_type_u_int64_t=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_type_u_int64_t=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5
-echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6; }
-if test $ac_cv_type_u_int64_t = yes; then
-  :
 else
 
-cat >>confdefs.h <<\_ACEOF
-#define u_int64_t unsigned long long
-_ACEOF
+$as_echo "#define u_int64_t unsigned long long" >>confdefs.h
 
 fi
 
 
 #
-# We can't just check for <inttypes.h> - some systems have one that
-# doesn't define all the PRI[doxu]64 macros.
+# Check for <inttypes.h>
 #
-
 for ac_header in inttypes.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
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_INTTYPES_H 1
 _ACEOF
 
     #
-    # OK, we have inttypes.h, but does it define those macros?
+    # OK, we have inttypes.h, but does it define all the PRI[doxu]64 macros?
+    # Some systems have an inttypes.h that doesn't define all of them.
     #
-    { echo "$as_me:$LINENO: checking whether inttypes.h defines the PRI[doxu]64 macros" >&5
-echo $ECHO_N "checking whether inttypes.h defines the PRI[doxu]64 macros... $ECHO_C" >&6; }
-    cat >conftest.$ac_ext <<_ACEOF
-
-	/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inttypes.h defines the PRI[doxu]64 macros" >&5
+$as_echo_n "checking whether inttypes.h defines the PRI[doxu]64 macros... " >&6; }
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+
 	    #include <inttypes.h>
 	    #include <stdio.h>
 	    #include <sys/types.h>
@@ -12136,39 +7044,19 @@
 
 
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
 
-	{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 	ac_lbl_inttypes_h_defines_formats=yes
 
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-
-	{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 	ac_lbl_inttypes_h_defines_formats=no
 
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 else
@@ -12185,23 +7073,18 @@
 
 if test "$ac_lbl_inttypes_h_defines_formats" = no; then
 
-    { echo "$as_me:$LINENO: checking whether %lx can be used to format 64-bit integers" >&5
-echo $ECHO_N "checking whether %lx can be used to format 64-bit integers... $ECHO_C" >&6; }
-    if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether %lx can be used to format 64-bit integers" >&5
+$as_echo_n "checking whether %lx can be used to format 64-bit integers... " >&6; }
+    if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
 else
-  cat >conftest.$ac_ext <<_ACEOF
-
-	/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+
 #	    ifdef HAVE_INTTYPES_H
 	    #include <inttypes.h>
 #	    endif
@@ -12224,74 +7107,41 @@
 
 
 _ACEOF
-rm -f 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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+if ac_fn_c_try_run "$LINENO"; then :
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRId64 "ld"
-_ACEOF
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRIo64 "lo"
-_ACEOF
+$as_echo "#define PRId64 \"ld\"" >>confdefs.h
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRIx64 "lx"
-_ACEOF
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRIu64 "lu"
-_ACEOF
+$as_echo "#define PRIo64 \"lo\"" >>confdefs.h
 
-	{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+
+$as_echo "#define PRIx64 \"lx\"" >>confdefs.h
+
+
+$as_echo "#define PRIu64 \"lu\"" >>confdefs.h
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-
-	{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
-    { echo "$as_me:$LINENO: checking whether %llx can be used to format 64-bit integers" >&5
-echo $ECHO_N "checking whether %llx can be used to format 64-bit integers... $ECHO_C" >&6; }
-    if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether %llx can be used to format 64-bit integers" >&5
+$as_echo_n "checking whether %llx can be used to format 64-bit integers... " >&6; }
+    if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
 else
-  cat >conftest.$ac_ext <<_ACEOF
-
-	/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+
 #	    ifdef HAVE_INTTYPES_H
 	    #include <inttypes.h>
 #	    endif
@@ -12314,74 +7164,41 @@
 
 
 _ACEOF
-rm -f 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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+if ac_fn_c_try_run "$LINENO"; then :
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRId64 "lld"
-_ACEOF
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRIo64 "llo"
-_ACEOF
+$as_echo "#define PRId64 \"lld\"" >>confdefs.h
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRIx64 "llx"
-_ACEOF
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRIu64 "llu"
-_ACEOF
+$as_echo "#define PRIo64 \"llo\"" >>confdefs.h
 
-	{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+
+$as_echo "#define PRIx64 \"llx\"" >>confdefs.h
+
+
+$as_echo "#define PRIu64 \"llu\"" >>confdefs.h
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-
-	{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
-    { echo "$as_me:$LINENO: checking whether %Lx can be used to format 64-bit integers" >&5
-echo $ECHO_N "checking whether %Lx can be used to format 64-bit integers... $ECHO_C" >&6; }
-    if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether %Lx can be used to format 64-bit integers" >&5
+$as_echo_n "checking whether %Lx can be used to format 64-bit integers... " >&6; }
+    if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
 else
-  cat >conftest.$ac_ext <<_ACEOF
-
-	/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+
 #	    ifdef HAVE_INTTYPES_H
 	    #include <inttypes.h>
 #	    endif
@@ -12404,74 +7221,41 @@
 
 
 _ACEOF
-rm -f 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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+if ac_fn_c_try_run "$LINENO"; then :
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRId64 "Ld"
-_ACEOF
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRIo64 "Lo"
-_ACEOF
+$as_echo "#define PRId64 \"Ld\"" >>confdefs.h
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRIx64 "Lx"
-_ACEOF
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRIu64 "Lu"
-_ACEOF
+$as_echo "#define PRIo64 \"Lo\"" >>confdefs.h
 
-	{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+
+$as_echo "#define PRIx64 \"Lx\"" >>confdefs.h
+
+
+$as_echo "#define PRIu64 \"Lu\"" >>confdefs.h
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
-
-	{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
-    { echo "$as_me:$LINENO: checking whether %qx can be used to format 64-bit integers" >&5
-echo $ECHO_N "checking whether %qx can be used to format 64-bit integers... $ECHO_C" >&6; }
-    if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether %qx can be used to format 64-bit integers" >&5
+$as_echo_n "checking whether %qx can be used to format 64-bit integers... " >&6; }
+    if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
 else
-  cat >conftest.$ac_ext <<_ACEOF
-
-	/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+
 #	    ifdef HAVE_INTTYPES_H
 	    #include <inttypes.h>
 #	    endif
@@ -12494,143 +7278,534 @@
 
 
 _ACEOF
-rm -f 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>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+if ac_fn_c_try_run "$LINENO"; then :
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRId64 "qd"
-_ACEOF
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRIo64 "qo"
-_ACEOF
+$as_echo "#define PRId64 \"qd\"" >>confdefs.h
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRIx64 "qx"
-_ACEOF
 
-	cat >>confdefs.h <<\_ACEOF
-#define PRIu64 "qu"
-_ACEOF
+$as_echo "#define PRIo64 \"qo\"" >>confdefs.h
 
-	{ echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+
+$as_echo "#define PRIx64 \"qx\"" >>confdefs.h
+
+
+$as_echo "#define PRIu64 \"qu\"" >>confdefs.h
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-( exit $ac_status )
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-	{ echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-
-	          { { echo "$as_me:$LINENO: error: neither %llx nor %Lx nor %qx worked on a 64-bit integer" >&5
-echo "$as_me: error: neither %llx nor %Lx nor %qx worked on a 64-bit integer" >&2;}
-   { (exit 1); exit 1; }; }
+	          as_fn_error $? "neither %llx nor %Lx nor %qx worked on a 64-bit integer" "$LINENO" 5
 
 
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
 
 
 
-
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
 
 
 
-
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
 
 
 
-
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
 
+fi
+
+#
+# Check for some headers introduced in later versions of libpcap
+# and used by some printers.
+#
+# Those headers use the {u_}intN_t types, so we must do this after
+# we check for what's needed to get them defined.
+#
+savedcppflags="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $V_INCLS"
+for ac_header in pcap/bluetooth.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "pcap/bluetooth.h" "ac_cv_header_pcap_bluetooth_h" "#include \"tcpdump-stdinc.h\"
+"
+if test "x$ac_cv_header_pcap_bluetooth_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_PCAP_BLUETOOTH_H 1
+_ACEOF
 
 fi
 
+done
+
+for ac_header in pcap/nflog.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "pcap/nflog.h" "ac_cv_header_pcap_nflog_h" "#include \"tcpdump-stdinc.h\"
+"
+if test "x$ac_cv_header_pcap_nflog_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_PCAP_NFLOG_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in pcap/usb.h
+do :
+  ac_fn_c_check_header_compile "$LINENO" "pcap/usb.h" "ac_cv_header_pcap_usb_h" "#include \"tcpdump-stdinc.h\"
+"
+if test "x$ac_cv_header_pcap_usb_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_PCAP_USB_H 1
+_ACEOF
+
+fi
+
+done
+
+CPPFLAGS="$savedcppflags"
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:${as_lineno-$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+  $as_echo_n "(cached) " >&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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:${as_lineno-$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
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&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}"
     fi
     if test -f .devel ; then
-	    if test "$GCC" = yes ; then
-		    if test "${LBL_CFLAGS+set}" != set; then
-			    if test "$ac_cv_prog_cc_g" = yes ; then
-				    V_CCOPT="-g $V_CCOPT"
-			    fi
-			    V_CCOPT="$V_CCOPT -Wall"
-			    if test $ac_cv_lbl_gcc_vers -gt 1 ; then
-				    V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wpointer-arith -W"
-			    fi
-		    fi
-	    else
-		    case "$host_os" in
+	    #
+	    # Skip all the warning option stuff on some compilers.
+	    #
+	    if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
 
-		    irix6*)
-			    V_CCOPT="$V_CCOPT -n32"
-			    ;;
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
+$as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
+	save_CFLAGS="$CFLAGS"
+	CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -Wall"
+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-		    *)
-			    ;;
-		    esac
+int
+main ()
+{
+return 0
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+		CFLAGS="$save_CFLAGS"
+		V_CCOPT="$V_CCOPT -Wall"
+
+else
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
+$as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
+	save_CFLAGS="$CFLAGS"
+	CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -Wmissing-prototypes"
+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+		CFLAGS="$save_CFLAGS"
+		V_CCOPT="$V_CCOPT -Wmissing-prototypes"
+
+else
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
+$as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
+	save_CFLAGS="$CFLAGS"
+	CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -Wstrict-prototypes"
+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+		CFLAGS="$save_CFLAGS"
+		V_CCOPT="$V_CCOPT -Wstrict-prototypes"
+
+else
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wwrite-strings option" >&5
+$as_echo_n "checking whether the compiler supports the -Wwrite-strings option... " >&6; }
+	save_CFLAGS="$CFLAGS"
+	CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -Wwrite-strings"
+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+		CFLAGS="$save_CFLAGS"
+		V_CCOPT="$V_CCOPT -Wwrite-strings"
+
+else
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
+$as_echo_n "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
+	save_CFLAGS="$CFLAGS"
+	CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -Wpointer-arith"
+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+		CFLAGS="$save_CFLAGS"
+		V_CCOPT="$V_CCOPT -Wpointer-arith"
+
+else
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
+$as_echo_n "checking whether the compiler supports the -W option... " >&6; }
+	save_CFLAGS="$CFLAGS"
+	CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors -W"
+	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+return 0
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+		CFLAGS="$save_CFLAGS"
+		V_CCOPT="$V_CCOPT -W"
+
+else
+
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		CFLAGS="$save_CFLAGS"
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 	    fi
+
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
+$as_echo_n "checking whether the compiler supports generating dependencies... " >&6; }
+	if test "$GCC" = yes ; then
+		#
+		# GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
+		# though it's not); we assume that, in this case, the flag
+		# would be -M.
+		#
+		ac_lbl_dependency_flag="-M"
+	else
+		#
+		# Not GCC or a compiler deemed to be GCC; what platform is
+		# this?  (We're assuming that if the compiler isn't GCC
+		# it's the compiler from the vendor of the OS; that won't
+		# necessarily be true for x86 platforms, where it might be
+		# the Intel C compiler.)
+		#
+		case "$host_os" in
+
+		irix*|osf*|darwin*)
+			#
+			# MIPS C for IRIX, DEC C, and clang all use -M.
+			#
+			ac_lbl_dependency_flag="-M"
+			;;
+
+		solaris*)
+			#
+			# Sun C uses -xM.
+			#
+			ac_lbl_dependency_flag="-xM"
+			;;
+
+		hpux*)
+			#
+			# HP's older C compilers don't support this.
+			# HP's newer C compilers support this with
+			# either +M or +Make; the older compilers
+			# interpret +M as something completely
+			# different, so we use +Make so we don't
+			# think it works with the older compilers.
+			#
+			ac_lbl_dependency_flag="+Make"
+			;;
+
+		*)
+			#
+			# Not one of the above; assume no support for
+			# generating dependencies.
+			#
+			ac_lbl_dependency_flag=""
+			;;
+		esac
+	fi
+
+	#
+	# Is ac_lbl_dependency_flag defined and, if so, does the compiler
+	# complain about it?
+	#
+	# Note: clang doesn't seem to exit with an error status when handed
+	# an unknown non-warning error, even if you pass it
+	# -Werror=unknown-warning-option.  However, it always supports
+	# -M, so the fact that this test always succeeds with clang
+	# isn't an issue.
+	#
+	if test ! -z "$ac_lbl_dependency_flag"; then
+		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int main(void) { return 0; }
+_ACEOF
+		echo "$CC" $ac_lbl_dependency_flag conftest.c >&5
+		if "$CC" $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1; then
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
+$as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
+			DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
+			MKDEP='${srcdir}/mkdep'
+		else
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+			#
+			# We can't run mkdep, so have "make depend" do
+			# nothing.
+			#
+			MKDEP=:
+		fi
+		rm -rf conftest*
+	else
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		#
+		# We can't run mkdep, so have "make depend" do
+		# nothing.
+		#
+		MKDEP=:
+	fi
+
+
+
+	    #
+	    # We used to set -n32 for IRIX 6 when not using GCC (presumed
+	    # to mean that we're using MIPS C or MIPSpro C); it specified
+	    # the "new" faster 32-bit ABI, introduced in IRIX 6.2.  I'm
+	    # not sure why that would be something to do *only* with a
+	    # .devel file; why should the ABI for which we produce code
+	    # depend on .devel?
+	    #
 	    os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
 	    name="lbl/os-$os.h"
 	    if test -f $name ; then
 		    ln -s $name os-proto.h
-		    cat >>confdefs.h <<\_ACEOF
-#define HAVE_OS_PROTO_H 1
-_ACEOF
+
+$as_echo "#define HAVE_OS_PROTO_H 1" >>confdefs.h
 
 	    else
-		    { echo "$as_me:$LINENO: WARNING: can't find $name" >&5
-echo "$as_me: WARNING: can't find $name" >&2;}
+		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5
+$as_echo "$as_me: WARNING: can't find $name" >&2;}
 	    fi
     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; }
-    if test "${ac_cv_lbl_sockaddr_has_sa_len+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr struct has the sa_len member" >&5
+$as_echo_n "checking if sockaddr struct has the sa_len member... " >&6; }
+    if ${ac_cv_lbl_sockaddr_has_sa_len+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #	include <sys/types.h>
@@ -12643,47 +7818,26 @@
   return 0;
 }
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_lbl_sockaddr_has_sa_len=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lbl_sockaddr_has_sa_len=no
+  ac_cv_lbl_sockaddr_has_sa_len=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-    { echo "$as_me:$LINENO: result: $ac_cv_lbl_sockaddr_has_sa_len" >&5
-echo "${ECHO_T}$ac_cv_lbl_sockaddr_has_sa_len" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_sockaddr_has_sa_len" >&5
+$as_echo "$ac_cv_lbl_sockaddr_has_sa_len" >&6; }
     if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
-	    cat >>confdefs.h <<\_ACEOF
-#define HAVE_SOCKADDR_SA_LEN 1
-_ACEOF
+
+$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
 
     fi
 
-{ echo "$as_me:$LINENO: checking if unaligned accesses fail" >&5
-echo $ECHO_N "checking if unaligned accesses fail... $ECHO_C" >&6; }
-    if test "${ac_cv_lbl_unaligned_fail+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if unaligned accesses fail" >&5
+$as_echo_n "checking if unaligned accesses fail... " >&6; }
+    if ${ac_cv_lbl_unaligned_fail+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   case "$host_cpu" in
 
@@ -12719,7 +7873,7 @@
 	# 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
 		;;
 
@@ -12762,31 +7916,26 @@
 				ac_cv_lbl_unaligned_fail=no
 			fi
 		fi
-		rm -f conftest* core core.conftest
+		rm -f -r conftest* core core.conftest
 		;;
 	esac
 fi
 
-    { echo "$as_me:$LINENO: result: $ac_cv_lbl_unaligned_fail" >&5
-echo "${ECHO_T}$ac_cv_lbl_unaligned_fail" >&6; }
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_unaligned_fail" >&5
+$as_echo "$ac_cv_lbl_unaligned_fail" >&6; }
     if test $ac_cv_lbl_unaligned_fail = yes ; then
-	    cat >>confdefs.h <<\_ACEOF
-#define LBL_ALIGN 1
-_ACEOF
+
+$as_echo "#define LBL_ALIGN 1" >>confdefs.h
 
     fi
 
 
-	{ echo "$as_me:$LINENO: checking for h_errno" >&5
-echo $ECHO_N "checking for h_errno... $ECHO_C" >&6; }
-	if test "${ac_cv_var_h_errno+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for h_errno" >&5
+$as_echo_n "checking for h_errno... " >&6; }
+	if ${ac_cv_var_h_errno+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #		include <sys/types.h>
@@ -12799,116 +7948,64 @@
   return 0;
 }
 _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
+if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_var_h_errno=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_var_h_errno=no
+  ac_cv_var_h_errno=no
 fi
-
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
-	{ echo "$as_me:$LINENO: result: $ac_cv_var_h_errno" >&5
-echo "${ECHO_T}$ac_cv_var_h_errno" >&6; }
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_h_errno" >&5
+$as_echo "$ac_cv_var_h_errno" >&6; }
 	if test "$ac_cv_var_h_errno" = "yes"; then
-		cat >>confdefs.h <<\_ACEOF
-#define HAVE_H_ERRNO 1
-_ACEOF
+
+$as_echo "#define HAVE_H_ERRNO 1" >>confdefs.h
 
 	fi
 
 
+# Check for OpenSSL libcrypto
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use OpenSSL libcrypto" >&5
+$as_echo_n "checking whether to use OpenSSL libcrypto... " >&6; }
+# Specify location for both includes and libraries.
+want_libcrypto=ifavailable
 
 # Check whether --with-crypto was given.
-if test "${with_crypto+set}" = set; then
+if test "${with_crypto+set}" = set; then :
   withval=$with_crypto;
+	if test $withval = no
+	then
+		want_libcrypto=no
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	elif test $withval = yes
+	then
+		want_libcrypto=yes
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	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
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, if available" >&5
+$as_echo "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
-	#
-	# 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 $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;
-	else
-		ac_cv_ssleay_path=no
-		incdir=no
-	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"
-	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; }
-if test "${ac_cv_lib_crypto_DES_cbc_encrypt+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test "$want_libcrypto" != "no"; then
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DES_cbc_encrypt in -lcrypto" >&5
+$as_echo_n "checking for DES_cbc_encrypt in -lcrypto... " >&6; }
+if ${ac_cv_lib_crypto_DES_cbc_encrypt+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lcrypto  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 /* Override any GCC internal prototype to avoid an error.
@@ -12926,39 +8023,18 @@
   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
+if ac_fn_c_try_link "$LINENO"; then :
   ac_cv_lib_crypto_DES_cbc_encrypt=yes
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_crypto_DES_cbc_encrypt=no
+  ac_cv_lib_crypto_DES_cbc_encrypt=no
 fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_DES_cbc_encrypt" >&5
-echo "${ECHO_T}$ac_cv_lib_crypto_DES_cbc_encrypt" >&6; }
-if test $ac_cv_lib_crypto_DES_cbc_encrypt = yes; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_DES_cbc_encrypt" >&5
+$as_echo "$ac_cv_lib_crypto_DES_cbc_encrypt" >&6; }
+if test "x$ac_cv_lib_crypto_DES_cbc_encrypt" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_LIBCRYPTO 1
 _ACEOF
@@ -12967,142 +8043,12 @@
 
 fi
 
-
-	CPPFLAGS="$CPPFLAGS $V_INCLS"
-
-for ac_header in openssl/evp.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
+	for ac_header in openssl/evp.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_evp_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_OPENSSL_EVP_H 1
 _ACEOF
 
 fi
@@ -13111,12 +8057,9 @@
 
 fi
 
-fi
-
-
 if test "$missing_includes" = "yes"; then
-	CPPFLAGS="$CPPFLAGS -I\$(srcdir)/missing"
-	V_INCLS="$V_INCLS -I\$(srcdir)/missing"
+	CPPFLAGS="$CPPFLAGS -I$srcdir/missing"
+	V_INCLS="$V_INCLS -I$srcdir/missing"
 fi
 
 
@@ -13126,6 +8069,8 @@
 
 
 
+
+
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
 # incompatible versions:
@@ -13139,22 +8084,23 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # OS/2's system install, which has a completely different semantic
 # ./install, which can be erroneously created by make from ./install.sh.
-{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if ${ac_cv_path_install+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
-  ./ | .// | /cC/* | \
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
-  ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
   /usr/ucb/* ) ;;
   *)
     # OSF1 and SCO ODT 3.0 have their own names for install.
@@ -13162,7 +8108,7 @@
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
 	  if test $ac_prog = install &&
 	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
@@ -13172,17 +8118,29 @@
 	    # program-specific install script used by HP pwplus--don't use.
 	    :
 	  else
-	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	    break 3
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
 	  fi
 	fi
       done
     done
     ;;
 esac
-done
+
+  done
 IFS=$as_save_IFS
 
+rm -rf conftest.one conftest.two conftest.dir
 
 fi
   if test "${ac_cv_path_install+set}" = set; then
@@ -13195,8 +8153,8 @@
     INSTALL=$ac_install_sh
   fi
 fi
-{ echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
@@ -13212,7 +8170,7 @@
 
 ac_config_commands="$ac_config_commands default-1"
 
-ac_config_files="$ac_config_files Makefile"
+ac_config_files="$ac_config_files Makefile tcpdump.1"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -13241,12 +8199,13 @@
     case $ac_val in #(
     *${as_nl}*)
       case $ac_var in #(
-      *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
-echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
       esac
       case $ac_var in #(
       _ | IFS | as_nl) ;; #(
-      *) $as_unset $ac_var ;;
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
       esac ;;
     esac
   done
@@ -13254,8 +8213,8 @@
   (set) 2>&1 |
     case $as_nl`(ac_space=' '; set) 2>&1` in #(
     *${as_nl}ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
       sed -n \
 	"s/'/'\\\\''/g;
 	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -13277,13 +8236,24 @@
      :end' >>confcache
 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
   if test -w "$cache_file"; then
-    test "x$cache_file" != "x/dev/null" &&
-      { echo "$as_me:$LINENO: updating cache $cache_file" >&5
-echo "$as_me: updating cache $cache_file" >&6;}
-    cat confcache >$cache_file
+    if test "x$cache_file" != "x/dev/null"; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+      if test ! -f "$cache_file" || test -h "$cache_file"; then
+	cat confcache >"$cache_file"
+      else
+        case $cache_file in #(
+        */* | ?:*)
+	  mv -f confcache "$cache_file"$$ &&
+	  mv -f "$cache_file"$$ "$cache_file" ;; #(
+        *)
+	  mv -f confcache "$cache_file" ;;
+	esac
+      fi
+    fi
   else
-    { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
-echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
   fi
 fi
 rm -f confcache
@@ -13296,14 +8266,15 @@
 
 ac_libobjs=
 ac_ltlibobjs=
+U=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
-  ac_i=`echo "$ac_i" | sed "$ac_script"`
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
   #    will be set to the directory where LIBOBJS objects are built.
-  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
 done
 LIBOBJS=$ac_libobjs
 
@@ -13311,12 +8282,14 @@
 
 
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
 #! $SHELL
 # Generated by $as_me.
 # Run this file to recreate the current configuration.
@@ -13326,59 +8299,79 @@
 debug=false
 ac_cs_recheck=false
 ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
 
 # Be more Bourne compatible
 DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
   NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
   setopt NO_GLOB_SUBST
 else
-  case `(set -o) 2>/dev/null` in
-  *posix*) set -o posix ;;
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
 esac
-
 fi
 
 
-
-
-# PATH needs CR
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
 
 # The user is always right.
 if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
 fi
 
 
@@ -13387,20 +8380,19 @@
 # there to prevent editors from complaining about space-tab.
 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
 # splitting by setting IFS to empty value.)
-as_nl='
-'
 IFS=" ""	$as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
-case $0 in
+as_myself=
+case $0 in #((
   *[\\/]* ) as_myself=$0 ;;
   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
 IFS=$as_save_IFS
 
      ;;
@@ -13411,32 +8403,111 @@
   as_myself=$0
 fi
 if test ! -f "$as_myself"; then
-  echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
-  { (exit 1); exit 1; }
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
 fi
 
-# Work around bugs in pre-3.0 UWIN ksh.
-for as_var in ENV MAIL MAILPATH
-do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
 done
 PS1='$ '
 PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
-  fi
-done
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
 
-# Required to use basename.
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
 if expr a : '\(a\)' >/dev/null 2>&1 &&
    test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
@@ -13450,13 +8521,17 @@
   as_basename=false
 fi
 
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
-# Name of the executable.
 as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
 	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
-echo X/"$0" |
+$as_echo X/"$0" |
     sed '/^.*\/\([^/][^/]*\)\/*$/{
 	    s//\1/
 	    q
@@ -13471,131 +8546,118 @@
 	  }
 	  s/.*/./; q'`
 
-# CDPATH.
-$as_unset CDPATH
-
-
-
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
-
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line after each line using $LINENO; the second 'sed'
-  # does the real work.  The second script uses 'N' to pair each
-  # line-number line with the line containing $LINENO, and appends
-  # trailing '-' during substitution so that $LINENO is not a special
-  # case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # scripts with optimization help from Paolo Bonzini.  Blame Lee
-  # E. McMahon (1931-1989) for sed's syntax.  :-)
-  sed -n '
-    p
-    /[$]LINENO/=
-  ' <$as_myself |
-    sed '
-      s/[$]LINENO.*/&-/
-      t lineno
-      b
-      :lineno
-      N
-      :loop
-      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
-      t loop
-      s/-\n.*//
-    ' >$as_me.lineno &&
-  chmod +x "$as_me.lineno" ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
-   { (exit 1); exit 1; }; }
-
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensitive to this).
-  . "./$as_me.lineno"
-  # Exit status is that of the last command.
-  exit
-}
-
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
-  as_dirname=dirname
-else
-  as_dirname=false
-fi
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
 
 ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in
+case `echo -n x` in #(((((
 -n*)
-  case `echo 'x\c'` in
+  case `echo 'xy\c'` in
   *c*) ECHO_T='	';;	# ECHO_T is single tab character.
-  *)   ECHO_C='\c';;
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
   esac;;
 *)
   ECHO_N='-n';;
 esac
 
-if expr a : '\(a\)' >/dev/null 2>&1 &&
-   test "X`expr 00001 : '.*\(...\)'`" = X001; then
-  as_expr=expr
-else
-  as_expr=false
-fi
-
 rm -f conf$$ conf$$.exe conf$$.file
 if test -d conf$$.dir; then
   rm -f conf$$.dir/conf$$.file
 else
   rm -f conf$$.dir
-  mkdir conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
 fi
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s='ln -s'
-  # ... but there are two gotchas:
-  # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
-  # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-  # In both cases, we have to default to `cp -p'.
-  ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-    as_ln_s='cp -p'
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
 
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
 if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
+  as_mkdir_p='mkdir -p "$as_dir"'
 else
   test -d ./-p && rmdir ./-p
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-        test -d "$1/.";
-      else
-	case $1 in
-        -*)set "./$1";;
-	esac;
-	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
-	???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -13605,13 +8667,19 @@
 
 
 exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
 
-# Save the log message, to keep $[0] and so on meaningful, and to
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
 This file was extended by $as_me, which was
-generated by GNU Autoconf 2.61.  Invocation command line was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -13624,7 +8692,16 @@
 
 _ACEOF
 
-cat >>$CONFIG_STATUS <<_ACEOF
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 # Files that config.status was made for.
 config_files="$ac_config_files"
 config_headers="$ac_config_headers"
@@ -13632,22 +8709,25 @@
 
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
 
-Usage: $0 [OPTIONS] [FILE]...
+Usage: $0 [OPTION]... [TAG]...
 
   -h, --help       print this help, then exit
   -V, --version    print version number and configuration settings, then exit
-  -q, --quiet      do not print progress messages
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
   -d, --debug      don't remove temporary files
       --recheck    update $as_me by reconfiguring in the same conditions
-  --file=FILE[:TEMPLATE]
-		   instantiate the configuration file FILE
-  --header=FILE[:TEMPLATE]
-		   instantiate the configuration header FILE
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
 
 Configuration files:
 $config_files
@@ -13658,36 +8738,42 @@
 Configuration commands:
 $config_commands
 
-Report bugs to <bug-autoconf@gnu.org>."
+Report bugs to the package provider."
 
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
 config.status
-configured by $0, generated by GNU Autoconf 2.61,
-  with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2006 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
 ac_pwd='$ac_pwd'
 srcdir='$srcdir'
 INSTALL='$INSTALL'
+test -n "\$AWK" || AWK=awk
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value.  By we need to know if files were specified by the user.
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
 ac_need_defaults=:
 while test $# != 0
 do
   case $1 in
-  --*=*)
+  --*=?*)
     ac_option=`expr "X$1" : 'X\([^=]*\)='`
     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     ac_shift=:
     ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
   *)
     ac_option=$1
     ac_optarg=$2
@@ -13700,34 +8786,41 @@
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
     ac_cs_recheck=: ;;
   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
-    echo "$ac_cs_version"; exit ;;
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
   --debug | --debu | --deb | --de | --d | -d )
     debug=: ;;
   --file | --fil | --fi | --f )
     $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
+    esac
+    as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
   --header | --heade | --head | --hea )
     $ac_shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
     ac_need_defaults=false;;
   --he | --h)
     # Conflict between --help and --header
-    { echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; };;
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
   --help | --hel | -h )
-    echo "$ac_cs_usage"; exit ;;
+    $as_echo "$ac_cs_usage"; exit ;;
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil | --si | --s)
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) { echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2
-   { (exit 1); exit 1; }; } ;;
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
 
-  *) ac_config_targets="$ac_config_targets $1"
+  *) as_fn_append ac_config_targets " $1"
      ac_need_defaults=false ;;
 
   esac
@@ -13742,27 +8835,29 @@
 fi
 
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
-  CONFIG_SHELL=$SHELL
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
   export CONFIG_SHELL
-  exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  exec "\$@"
 fi
 
 _ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 exec 5>>config.log
 {
   echo
   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
 ## Running $as_me. ##
 _ASBOX
-  echo "$ac_log"
+  $as_echo "$ac_log"
 } >&5
 
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 #
 # INIT-COMMANDS
 #
@@ -13770,7 +8865,7 @@
 
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 
 # Handling of arguments.
 for ac_config_target in $ac_config_targets
@@ -13779,10 +8874,9 @@
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "tcpdump.1") CONFIG_FILES="$CONFIG_FILES tcpdump.1" ;;
 
-  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -13805,178 +8899,302 @@
 # after its creation but before its name has been assigned to `$tmp'.
 $debug ||
 {
-  tmp=
+  tmp= ac_tmp=
   trap 'exit_status=$?
-  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+  : "${ac_tmp:=$tmp}"
+  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
 ' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
+  trap 'as_fn_exit 1' 1 2 13 15
 }
 # Create a (secure) tmp directory for tmp files.
 
 {
   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  test -d "$tmp"
 }  ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} ||
-{
-   echo "$me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
 
-#
-# Set up the sed scripts for CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
 if test -n "$CONFIG_FILES"; then
 
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
 _ACEOF
 
 
-
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
-  cat >conf$$subs.sed <<_ACEOF
-SHELL!$SHELL$ac_delim
-PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
-PACKAGE_NAME!$PACKAGE_NAME$ac_delim
-PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
-PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
-PACKAGE_STRING!$PACKAGE_STRING$ac_delim
-PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
-exec_prefix!$exec_prefix$ac_delim
-prefix!$prefix$ac_delim
-program_transform_name!$program_transform_name$ac_delim
-bindir!$bindir$ac_delim
-sbindir!$sbindir$ac_delim
-libexecdir!$libexecdir$ac_delim
-datarootdir!$datarootdir$ac_delim
-datadir!$datadir$ac_delim
-sysconfdir!$sysconfdir$ac_delim
-sharedstatedir!$sharedstatedir$ac_delim
-localstatedir!$localstatedir$ac_delim
-includedir!$includedir$ac_delim
-oldincludedir!$oldincludedir$ac_delim
-docdir!$docdir$ac_delim
-infodir!$infodir$ac_delim
-htmldir!$htmldir$ac_delim
-dvidir!$dvidir$ac_delim
-pdfdir!$pdfdir$ac_delim
-psdir!$psdir$ac_delim
-libdir!$libdir$ac_delim
-localedir!$localedir$ac_delim
-mandir!$mandir$ac_delim
-DEFS!$DEFS$ac_delim
-ECHO_C!$ECHO_C$ac_delim
-ECHO_N!$ECHO_N$ac_delim
-ECHO_T!$ECHO_T$ac_delim
-LIBS!$LIBS$ac_delim
-build_alias!$build_alias$ac_delim
-host_alias!$host_alias$ac_delim
-target_alias!$target_alias$ac_delim
-build!$build$ac_delim
-build_cpu!$build_cpu$ac_delim
-build_vendor!$build_vendor$ac_delim
-build_os!$build_os$ac_delim
-host!$host$ac_delim
-host_cpu!$host_cpu$ac_delim
-host_vendor!$host_vendor$ac_delim
-host_os!$host_os$ac_delim
-SHLICC2!$SHLICC2$ac_delim
-CC!$CC$ac_delim
-CFLAGS!$CFLAGS$ac_delim
-LDFLAGS!$LDFLAGS$ac_delim
-CPPFLAGS!$CPPFLAGS$ac_delim
-ac_ct_CC!$ac_ct_CC$ac_delim
-EXEEXT!$EXEEXT$ac_delim
-OBJEXT!$OBJEXT$ac_delim
-CPP!$CPP$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
-LIBOBJS!$LIBOBJS$ac_delim
-V_CCOPT!$V_CCOPT$ac_delim
-V_DEFS!$V_DEFS$ac_delim
-V_GROUP!$V_GROUP$ac_delim
-V_INCLS!$V_INCLS$ac_delim
-V_PCAPDEP!$V_PCAPDEP$ac_delim
-LOCALSRC!$LOCALSRC$ac_delim
-INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
-INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
-INSTALL_DATA!$INSTALL_DATA$ac_delim
-LTLIBOBJS!$LTLIBOBJS$ac_delim
-_ACEOF
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 67; then
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
     break
   elif $ac_last_try; then
-    { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
-echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
-   { (exit 1); exit 1; }; }
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_tt"; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
 done
 
-ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
-if test -n "$ac_eof"; then
-  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
-  ac_eof=`expr $ac_eof + 1`
-fi
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
 
-cat >>$CONFIG_STATUS <<_ACEOF
-cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
 _ACEOF
-sed '
-s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
-s/^/s,@/; s/!/@,|#_!!_#|/
-:n
-t n
-s/'"$ac_delim"'$/,g/; t
-s/$/\\/; p
-N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
-' >>$CONFIG_STATUS <conf$$subs.sed
-rm -f conf$$subs.sed
-cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
-CEOF$ac_eof
-_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
 
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[	 ]*\):*/\1/
-s/:*$//
-s/^[^=]*=[	 ]*$//
-}'
-fi
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-fi # test -n "$CONFIG_FILES"
-
-
-for ac_tag in  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
 do
   case $ac_tag in
   :[FHLC]) ac_mode=$ac_tag; continue;;
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
-echo "$as_me: error: Invalid tag $ac_tag." >&2;}
-   { (exit 1); exit 1; }; };;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -13995,7 +9213,7 @@
     for ac_f
     do
       case $ac_f in
-      -) ac_f="$tmp/stdin";;
+      -) ac_f="$ac_tmp/stdin";;
       *) # Look for the file first in the build tree, then in the source tree
 	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
 	 # because $ac_f cannot contain `:'.
@@ -14004,26 +9222,34 @@
 	   [\\/$]*) false;;
 	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
 	   esac ||
-	   { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
-echo "$as_me: error: cannot find input file: $ac_f" >&2;}
-   { (exit 1); exit 1; }; };;
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
-      ac_file_inputs="$ac_file_inputs $ac_f"
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
     done
 
     # Let's still pretend it is `configure' which instantiates (i.e., don't
     # use $as_me), people would be surprised to read:
     #    /* config.h.  Generated by config.status.  */
-    configure_input="Generated from "`IFS=:
-	  echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
     if test x"$ac_file" != x-; then
       configure_input="$ac_file.  $configure_input"
-      { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
     fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
 
     case $ac_tag in
-    *:-:* | *:-) cat >"$tmp/stdin";;
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -14033,7 +9259,7 @@
 	 X"$ac_file" : 'X\(//\)[^/]' \| \
 	 X"$ac_file" : 'X\(//\)$' \| \
 	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$ac_file" |
+$as_echo X"$ac_file" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
 	    s//\1/
 	    q
@@ -14051,55 +9277,15 @@
 	    q
 	  }
 	  s/.*/./; q'`
-  { as_dir="$ac_dir"
-  case $as_dir in #(
-  -*) as_dir=./$as_dir;;
-  esac
-  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
-    as_dirs=
-    while :; do
-      case $as_dir in #(
-      *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
-      *) as_qdir=$as_dir;;
-      esac
-      as_dirs="'$as_qdir' $as_dirs"
-      as_dir=`$as_dirname -- "$as_dir" ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-      test -d "$as_dir" && break
-    done
-    test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
-echo "$as_me: error: cannot create directory $as_dir" >&2;}
-   { (exit 1); exit 1; }; }; }
+  as_dir="$ac_dir"; as_fn_mkdir_p
   ac_builddir=.
 
 case "$ac_dir" in
 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
 *)
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
   # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
   case $ac_top_builddir_sub in
   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -14139,12 +9325,12 @@
   esac
 _ACEOF
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # If the template does not know about datarootdir, expand it.
 # FIXME: This hack should be removed a few years after 2.60.
 ac_datarootdir_hack=; ac_datarootdir_seen=
-
-case `sed -n '/datarootdir/ {
+ac_sed_dataroot='
+/datarootdir/ {
   p
   q
 }
@@ -14152,36 +9338,37 @@
 /@docdir@/p
 /@infodir@/p
 /@localedir@/p
-/@mandir@/p
-' $ac_file_inputs` in
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
 *datarootdir*) ac_datarootdir_seen=yes;;
 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
-  { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
-echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
 _ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
   ac_datarootdir_hack='
   s&@datadir@&$datadir&g
   s&@docdir@&$docdir&g
   s&@infodir@&$infodir&g
   s&@localedir@&$localedir&g
   s&@mandir@&$mandir&g
-    s&\\\${datarootdir}&$datarootdir&g' ;;
+  s&\\\${datarootdir}&$datarootdir&g' ;;
 esac
 _ACEOF
 
 # Neutralize VPATH when `$srcdir' = `.'.
 # Shell code in configure.ac might set extrasub.
 # FIXME: do we really want to maintain this feature?
-cat >>$CONFIG_STATUS <<_ACEOF
-  sed "$ac_vpsub
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
 $extrasub
 _ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 :t
 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s&@configure_input@&$configure_input&;t t
+s|@configure_input@|$ac_sed_conf_input|;t t
 s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
 s&@srcdir@&$ac_srcdir&;t t
 s&@abs_srcdir@&$ac_abs_srcdir&;t t
 s&@top_srcdir@&$ac_top_srcdir&;t t
@@ -14191,123 +9378,53 @@
 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
 s&@INSTALL@&$ac_INSTALL&;t t
 $ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
-  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
-  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
-  { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
-echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
+  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
+      "$ac_tmp/out"`; test -z "$ac_out"; } &&
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined" >&2;}
 
-  rm -f "$tmp/stdin"
+  rm -f "$ac_tmp/stdin"
   case $ac_file in
-  -) cat "$tmp/out"; rm -f "$tmp/out";;
-  *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
-  esac
+  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+  esac \
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
   :H)
   #
   # CONFIG_HEADER
   #
-_ACEOF
-
-# Transform confdefs.h into a sed script `conftest.defines', that
-# substitutes the proper values into config.h.in to produce config.h.
-rm -f conftest.defines conftest.tail
-# First, append a space to every undef/define line, to ease matching.
-echo 's/$/ /' >conftest.defines
-# Then, protect against being on the right side of a sed subst, or in
-# an unquoted here document, in config.status.  If some macros were
-# called several times there might be several #defines for the same
-# symbol, which is useless.  But do not sort them, since the last
-# AC_DEFINE must be honored.
-ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
-# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
-# NAME is the cpp macro being defined, VALUE is the value it is being given.
-# PARAMS is the parameter list in the macro definition--in most cases, it's
-# just an empty string.
-ac_dA='s,^\\([	 #]*\\)[^	 ]*\\([	 ]*'
-ac_dB='\\)[	 (].*,\\1define\\2'
-ac_dC=' '
-ac_dD=' ,'
-
-uniq confdefs.h |
-  sed -n '
-	t rset
-	:rset
-	s/^[	 ]*#[	 ]*define[	 ][	 ]*//
-	t ok
-	d
-	:ok
-	s/[\\&,]/\\&/g
-	s/^\('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
-	s/^\('"$ac_word_re"'\)[	 ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
-  ' >>conftest.defines
-
-# Remove the space that was appended to ease matching.
-# Then replace #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-# (The regexp can be short, since the line contains either #define or #undef.)
-echo 's/ $//
-s,^[	 #]*u.*,/* & */,' >>conftest.defines
-
-# Break up conftest.defines:
-ac_max_sed_lines=50
-
-# First sed command is:	 sed -f defines.sed $ac_file_inputs >"$tmp/out1"
-# Second one is:	 sed -f defines.sed "$tmp/out1" >"$tmp/out2"
-# Third one will be:	 sed -f defines.sed "$tmp/out2" >"$tmp/out1"
-# et cetera.
-ac_in='$ac_file_inputs'
-ac_out='"$tmp/out1"'
-ac_nxt='"$tmp/out2"'
-
-while :
-do
-  # Write a here document:
-    cat >>$CONFIG_STATUS <<_ACEOF
-    # First, check the format of the line:
-    cat >"\$tmp/defines.sed" <<\\CEOF
-/^[	 ]*#[	 ]*undef[	 ][	 ]*$ac_word_re[	 ]*\$/b def
-/^[	 ]*#[	 ]*define[	 ][	 ]*$ac_word_re[(	 ]/b def
-b
-:def
-_ACEOF
-  sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
-  echo 'CEOF
-    sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
-  ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
-  sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
-  grep . conftest.tail >/dev/null || break
-  rm -f conftest.defines
-  mv conftest.tail conftest.defines
-done
-rm -f conftest.defines conftest.tail
-
-echo "ac_result=$ac_in" >>$CONFIG_STATUS
-cat >>$CONFIG_STATUS <<\_ACEOF
   if test x"$ac_file" != x-; then
-    echo "/* $configure_input  */" >"$tmp/config.h"
-    cat "$ac_result" >>"$tmp/config.h"
-    if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
-      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+    } >"$ac_tmp/config.h" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
     else
-      rm -f $ac_file
-      mv "$tmp/config.h" $ac_file
+      rm -f "$ac_file"
+      mv "$ac_tmp/config.h" "$ac_file" \
+	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
     fi
   else
-    echo "/* $configure_input  */"
-    cat "$ac_result"
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
   fi
-  rm -f "$tmp/out12"
  ;;
 
-  :C)  { echo "$as_me:$LINENO: executing $ac_file commands" >&5
-echo "$as_me: executing $ac_file commands" >&6;}
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
  ;;
   esac
 
@@ -14323,11 +9440,13 @@
 done # for ac_tag
 
 
-{ (exit 0); exit 0; }
+as_fn_exit 0
 _ACEOF
-chmod +x $CONFIG_STATUS
 ac_clean_files=$ac_clean_files_save
 
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
 
 # configure is writing to config.log, and then calls config.status.
 # config.status does its own redirection, appending to config.log.
@@ -14347,7 +9466,11 @@
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || { (exit 1); exit 1; }
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
 exit 0
diff --git a/configure.in b/configure.in
index 5a010e7..51ba8fe 100644
--- a/configure.in
+++ b/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.204 2008-11-18 07:39:20 guy Exp $ (LBL)
 dnl
 dnl Copyright (c) 1994, 1995, 1996, 1997
 dnl	The Regents of the University of California.  All rights reserved.
@@ -6,20 +6,38 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl
 
-AC_REVISION($Revision: 1.188.2.8 $)
-AC_PREREQ(2.50)
+#
+# See
+#
+#	http://ftp.gnu.org/gnu/config/README
+#
+# for the URLs to use to fetch new versions of config.guess and
+# config.sub.
+#
+
+AC_PREREQ(2.61)
 AC_INIT(tcpdump.c)
 
 AC_CANONICAL_HOST
 
+AC_LBL_C_INIT_BEFORE_CC(V_INCLS)
+AC_PROG_CC
 AC_LBL_C_INIT(V_CCOPT, V_INCLS)
 AC_LBL_C_INLINE
 AC_C___ATTRIBUTE__
-AC_CHECK_HEADERS(fcntl.h rpc/rpcent.h netdnet/dnetdb.h)
+if test "$ac_cv___attribute__" = "yes"; then
+	AC_C___ATTRIBUTE___UNUSED
+	AC_C___ATTRIBUTE___NORETURN_FUNCTION_POINTER
+	AC_C___ATTRIBUTE___FORMAT
+	if test "$ac_cv___attribute___format" = "yes"; then
+		AC_C___ATTRIBUTE___FORMAT_FUNCTION_POINTER
+	fi
+fi
+AC_CHECK_HEADERS(fcntl.h rpc/rpc.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>
@@ -46,6 +64,33 @@
 
 case "$host_os" in
 
+darwin*)
+	AC_ARG_ENABLE(universal,
+	AC_HELP_STRING([--disable-universal],[don't build universal on OS X]))
+	if test "$enable_universal" != "no"; then
+		case "$host_os" in
+
+		darwin9.*)
+			#
+			# Leopard.  Build for x86 and 32-bit PowerPC, with
+			# x86 first.  (That's what Apple does.)
+			#
+			V_CCOPT="$V_CCOPT -arch i386 -arch ppc"
+			LDFLAGS="$LDFLAGS -arch i386 -arch ppc"
+			;;
+
+		darwin10.*)
+			#
+			# Snow Leopard.  Build for x86-64 and x86, with
+			# x86-64 first.  (That's what Apple does.)
+			#
+			V_CCOPT="$V_CCOPT -arch x86_64 -arch i386"
+			LDFLAGS="$LDFLAGS -arch x86_64 -arch i386"
+			;;
+		esac
+	fi
+	;;
+
 linux*)
 	AC_MSG_CHECKING(Linux kernel version)
  	if test "$cross_compiling" = yes; then
@@ -70,6 +115,12 @@
 esac
 
 
+AC_ARG_WITH(smi,
+[  --with-smi              link with libsmi (allows to load MIBs on the fly to decode SNMP packets. [default=yes]
+  --without-smi           don't link with libsmi],,
+   with_smi=yes)
+
+if test "x$with_smi" != "xno" ; then
 AC_CHECK_HEADERS(smi.h)
 AC_CHECK_LIB(smi, smiInit)
 if test "$ac_cv_header_smi_h" = yes -a "$ac_cv_lib_smi_smiInit" = yes
@@ -94,7 +145,7 @@
 }
 ],
 [ AC_MSG_RESULT(yes)
-  AC_DEFINE(LIBSMI)
+  AC_DEFINE(LIBSMI, 1, [Define if you enable support for libsmi])
   libsmi=yes],
 dnl autoconf documentation says that $? contains the exit value.
 dnl reality is that it does not.  We leave this in just in case
@@ -111,6 +162,7 @@
   libsmi=no]
 )
 fi
+fi
 
 AC_MSG_CHECKING([whether to enable the possibly-buggy SMB printer])
 AC_ARG_ENABLE(smb,
@@ -120,7 +172,8 @@
 case "$enableval" in
 yes)	AC_MSG_RESULT(yes)
 	AC_WARN([The SMB printer may have exploitable buffer overflows!!!])
-	AC_DEFINE(TCPDUMP_DO_SMB)
+	AC_DEFINE(TCPDUMP_DO_SMB, 1,
+	    [define if you want to build the possibly-buggy SMB printer])
 	LOCALSRC="print-smb.c smbutil.c $LOCALSRC"
 	;;
 *)	AC_MSG_RESULT(no)
@@ -130,7 +183,8 @@
 AC_ARG_WITH(user, [  --with-user=USERNAME    drop privileges by default to USERNAME])
 AC_MSG_CHECKING([whether to drop root privileges by default])
 if test ! -z "$with_user" ; then
-        AC_DEFINE_UNQUOTED(WITH_USER, "$withval")
+       AC_DEFINE_UNQUOTED(WITH_USER, "$withval",
+           [define if should drop privileges by default])
        AC_MSG_RESULT(to \"$withval\")
 else
        AC_MSG_RESULT(no)
@@ -138,21 +192,29 @@
 
 AC_ARG_WITH(chroot, [  --with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY])
 AC_MSG_CHECKING([whether to chroot])
-if test ! -z "$with_chroot" ; then
-        AC_DEFINE_UNQUOTED(WITH_CHROOT, "$withval")
+if test ! -z "$with_chroot" && test "$with_chroot" != "no" ; then
+       AC_DEFINE_UNQUOTED(WITH_CHROOT, "$withval",
+           [define if should chroot when dropping privileges])
        AC_MSG_RESULT(to \"$withval\")
 else
        AC_MSG_RESULT(no)
 fi
 
+#
+# We must check this before checking whether to enable IPv6, because,
+# on some platforms (such as SunOS 5.x), the test program requires
+# the extra networking libraries.
+#
+AC_LBL_LIBRARY_NET
+
 AC_MSG_CHECKING([whether to enable ipv6])
 AC_ARG_ENABLE(ipv6,
 [  --enable-ipv6           enable ipv6 (with ipv4) support
   --disable-ipv6          disable ipv6 support],
 [ case "$enableval" in
 yes)   AC_MSG_RESULT(yes)
-       LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC"
-       AC_DEFINE(INET6)
+       LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c print-babel.c $LOCALSRC"
+       AC_DEFINE(INET6, 1, [Define if you enable IPv6 support])
        ipv6=yes
        ;;
 *)
@@ -161,20 +223,27 @@
        ;;
   esac ],
 
-  AC_TRY_RUN([ /* AF_INET6 available check */
+  AC_COMPILE_IFELSE(
+    [
+      AC_LANG_SOURCE(
+	[[/* AF_INET6 available check */
 #include <sys/types.h>
 #include <sys/socket.h>
-main()
+#include <netinet/in.h>
+#ifdef AF_INET6
+void
+foo(struct in6_addr *addr)
 {
- if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
-   exit(1);
- else
-   exit(0);
+ memset(addr, 0, sizeof (struct in6_addr));
 }
-],
+#else
+#error "AF_INET6 not defined"
+#endif
+        ]])
+    ],
 [ AC_MSG_RESULT(yes)
-  LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC"
-  AC_DEFINE(INET6)
+  LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c print-babel.c $LOCALSRC"
+  AC_DEFINE(INET6, 1, [Define if you enable IPv6 support])
   ipv6=yes],
 [ AC_MSG_RESULT(no)
   ipv6=no],
@@ -434,7 +503,7 @@
 		fi
 	fi
 	])
-	AC_REPLACE_FUNCS(getaddrinfo getnameinfo)
+	AC_REPLACE_FUNCS(getnameinfo)
 fi
 
 AC_CACHE_CHECK([for dnet_htoa declaration in netdnet/dnetdb.h],
@@ -443,26 +512,11 @@
 	td_cv_decl_netdnet_dnetdb_h_dnet_htoa=yes,
 	td_cv_decl_netdnet_dnetdb_h_dnet_htoa=no)])
 if test "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" = yes; then
-	AC_DEFINE(HAVE_NETDNET_DNETDB_H_DNET_HTOA)
+	AC_DEFINE(HAVE_NETDNET_DNETDB_H_DNET_HTOA, 1,
+	    [define if you have a dnet_htoa declaration in <netdnet/dnetdb.h>])
 fi
 
 dnl
-dnl check sizeof basic types.
-dnl They're very likely to be wrong for cross-compiling.
-AC_CHECK_SIZEOF(char, 1)
-AC_CHECK_SIZEOF(short, 2)
-AC_CHECK_SIZEOF(int, 4)
-AC_CHECK_SIZEOF(long, 4)
-AC_CHECK_SIZEOF(long long, 8)
-
-dnl
-dnl Checks for u_intXX_t
-dnl AC_CHECK_BITTYPES(ac_cv_bittypes)
-dnl if test "$ac_cv_bittypes" = no; then
-dnl 	missing_includes=yes
-dnl fi
-
-dnl
 dnl Checks for addrinfo structure
 AC_STRUCT_ADDRINFO(ac_cv_addrinfo)
 if test "$ac_cv_addrinfo" = no; then
@@ -490,34 +544,8 @@
 	missing_includes=yes
 fi
 
-dnl
-dnl Checks for IN[6]ADDRSZ
-AC_CHECK_ADDRSZ(ac_cv_addrsz)
-if test "$ac_cv_addrsz" = no; then
-	missing_includes=yes
-fi
-
-dnl
-dnl Checks for RES_USE_INET6
-AC_CHECK_RES_USE_INET6(ac_cv_res_inet6)
-if test "$ac_cv_res_inet6" = no; then
-	missing_includes=yes
-fi
-
-dnl
-dnl Checks for res_state_ext structure
-AC_STRUCT_RES_STATE_EXT(ac_cv_res_state_ext)
-if test "$ac_cv_res_state_ext" = no; then
-	missing_includes=yes
-fi
-
-dnl
-dnl Checks if res_state structure has nsort member.
-AC_STRUCT_RES_STATE(ac_cv_res_state)
-
-
 AC_REPLACE_FUNCS(vfprintf strcasecmp strlcat strlcpy strdup strsep)
-AC_CHECK_FUNCS(strftime)
+AC_CHECK_FUNCS(fork vfork strftime)
 AC_CHECK_FUNCS(setlinebuf alarm)
 
 needsnprintf=no
@@ -529,12 +557,14 @@
 
 AC_LBL_TYPE_SIGNAL
 
-AC_SEARCH_LIBS(dnet_htoa, dnet, AC_DEFINE(HAVE_DNET_HTOA))
+AC_SEARCH_LIBS(dnet_htoa, dnet,
+    AC_DEFINE(HAVE_DNET_HTOA, 1, [define if you have the dnet_htoa function]))
 
 AC_CHECK_LIB(rpc, main)		dnl It's unclear why we might need -lrpc
 
 dnl Some platforms may need -lnsl for getrpcbynumber.
-AC_SEARCH_LIBS(getrpcbynumber, nsl, AC_DEFINE(HAVE_GETRPCBYNUMBER))
+AC_SEARCH_LIBS(getrpcbynumber, nsl,
+    AC_DEFINE(HAVE_GETRPCBYNUMBER, 1, [define if you have getrpcbynumber()]))
 
 dnl AC_CHECK_LIB(z, uncompress)
 dnl AC_CHECK_HEADERS(zlib.h)
@@ -613,7 +643,8 @@
 	   [ac_cv_buggy_ether_ntohost=yes],
 	   [ac_cv_buggy_ether_ntohost="not while cross-compiling"])])
     if test "$ac_cv_buggy_ether_ntohost" = "no"; then
-	AC_DEFINE(USE_ETHER_NTOHOST)
+	AC_DEFINE(USE_ETHER_NTOHOST, 1,
+	    [define if you have ether_ntohost() and it works])
     fi
 ])
 if test "$ac_cv_func_ether_ntohost" = yes -a \
@@ -696,6 +727,9 @@
 	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 +738,29 @@
 	missing_includes=yes
 fi
 
-AC_CHECK_FUNCS(pcap_findalldevs pcap_dump_flush pcap_lib_version)
+#
+# 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
+# introduced in libpcap 1.0.0.
+#
+AC_CHECK_FUNCS(pcap_create)
+if test $ac_cv_func_pcap_create = "yes" ; then
+	#
+	# OK, do we have pcap_set_tstamp_type?  If so, assume we have
+	# pcap_list_tstamp_types and pcap_free_tstamp_types as well.
+	#
+	AC_CHECK_FUNCS(pcap_set_tstamp_type)
+fi
+
+AC_CHECK_FUNCS(pcap_findalldevs pcap_dump_flush pcap_lib_version pcap_setdirection)
 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"
+    savedcppflags="$CPPFLAGS"
+    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
@@ -727,7 +775,7 @@
        ac_lbl_cv_pcap_version_defined=no)
     if test "$ac_lbl_cv_pcap_version_defined" = yes ; then
     	AC_MSG_RESULT(yes)
-	AC_DEFINE(HAVE_PCAP_VERSION)
+	AC_DEFINE(HAVE_PCAP_VERSION, 1, [define if libpcap has pcap_version])
     else
 	AC_MSG_RESULT(no)
     fi
@@ -743,7 +791,7 @@
    ac_lbl_cv_pcap_debug_defined=no)
 if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then
 	AC_MSG_RESULT(yes)
-	AC_DEFINE(HAVE_PCAP_DEBUG)
+	AC_DEFINE(HAVE_PCAP_DEBUG, 1, [define if libpcap has pcap_debug])
 else
 	AC_MSG_RESULT(no)
 	#
@@ -760,7 +808,7 @@
 	   ac_lbl_cv_yydebug_defined=no)
 	if test "$ac_lbl_cv_yydebug_defined" = yes ; then
 		AC_MSG_RESULT(yes)
-		AC_DEFINE(HAVE_YYDEBUG)
+		AC_DEFINE(HAVE_YYDEBUG, 1, [define if libpcap has yydebug])
 	else
 		AC_MSG_RESULT(no)
 	fi
@@ -771,23 +819,55 @@
 if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
 	V_GROUP=wheel
 fi
+#
+# Assume V7/BSD convention for man pages (file formats in section 5,
+# miscellaneous info in section 7).
+#
+MAN_FILE_FORMATS=5
+MAN_MISC_INFO=7
 case "$host_os" in
 
 aix*)
 	dnl Workaround to enable certain features
-	AC_DEFINE(_SUN)
+	AC_DEFINE(_SUN,1,[define on AIX to get certain functions])
+	;;
+
+hpux*)
+	#
+	# Use System V conventions for man pages.
+	#
+	MAN_FILE_FORMATS=4
+	MAN_MISC_INFO=5
 	;;
 
 irix*)
 	V_GROUP=sys
+
+	#
+	# Use System V conventions for man pages.
+	#
+	MAN_FILE_FORMATS=4
+	MAN_MISC_INFO=5
 	;;
 
 osf*)
 	V_GROUP=system
+
+	#
+	# Use System V conventions for man pages.
+	#
+	MAN_FILE_FORMATS=4
+	MAN_MISC_INFO=5
 	;;
 
 solaris*)
 	V_GROUP=sys
+
+	#
+	# Use System V conventions for man pages.
+	#
+	MAN_FILE_FORMATS=4
+	MAN_MISC_INFO=5
 	;;
 esac
 
@@ -795,11 +875,26 @@
 	V_GROUP=bpf
 fi
 
+#
+# Make sure we have definitions for all the C99 specified-width types
+# (regardless of whether the environment is a C99 environment or not).
+AC_TYPE_INT8_T
+AC_TYPE_INT16_T
+AC_TYPE_INT32_T
+AC_TYPE_INT64_T
+AC_TYPE_UINT8_T
+AC_TYPE_UINT16_T
+AC_TYPE_UINT32_T
+AC_TYPE_UINT64_T
+
+#
+# For now, we're using the old BSD-style u_intXX_t types, so check for
+# them.
+#
+# We should probably migrate to the standard C uintXX_t types.
+#
 AC_CHECK_HEADERS(sys/bitypes.h)
 
-AC_CHECK_TYPE([int8_t], ,
-	[AC_DEFINE([int8_t], [signed char],
-	[Define to `signed char' if int8_t not defined.])])
 AC_CHECK_TYPE([u_int8_t], ,
 	[AC_DEFINE([u_int8_t], [unsigned char],
 	[Define to `unsigned char' if u_int8_t not defined.])],
@@ -807,9 +902,6 @@
 #ifdef HAVE_SYS_BITYPES_H
 #include <sys/bitypes.h>
 #endif])
-AC_CHECK_TYPE([int16_t], ,
-	[AC_DEFINE([int16_t], [short],
-	[Define to `short' if int16_t not defined.])])
 AC_CHECK_TYPE([u_int16_t], ,
 	[AC_DEFINE([u_int16_t], [unsigned short],
 	[Define to `unsigned short' if u_int16_t not defined.])],
@@ -817,9 +909,6 @@
 #ifdef HAVE_SYS_BITYPES_H
 #include <sys/bitypes.h>
 #endif])
-AC_CHECK_TYPE([int32_t], ,
-	[AC_DEFINE([int32_t], [int],
-	[Define to `int' if int32_t not defined.])])
 AC_CHECK_TYPE([u_int32_t], ,
 	[AC_DEFINE([u_int32_t], [unsigned int],
 	[Define to `unsigned int' if u_int32_t not defined.])],
@@ -827,9 +916,6 @@
 #ifdef HAVE_SYS_BITYPES_H
 #include <sys/bitypes.h>
 #endif])
-AC_CHECK_TYPE([int64_t], ,
-	[AC_DEFINE([int64_t], [long long],
-	[Define to `long long' if int64_t not defined.])])
 AC_CHECK_TYPE([u_int64_t], ,
 	[AC_DEFINE([u_int64_t], [unsigned long long],
 	[Define to `unsigned long long' if u_int64_t not defined.])],
@@ -839,13 +925,13 @@
 #endif])
 
 #
-# We can't just check for <inttypes.h> - some systems have one that
-# doesn't define all the PRI[doxu]64 macros.
+# Check for <inttypes.h>
 #
 AC_CHECK_HEADERS(inttypes.h,
   [
     #
-    # OK, we have inttypes.h, but does it define those macros?
+    # OK, we have inttypes.h, but does it define all the PRI[doxu]64 macros?
+    # Some systems have an inttypes.h that doesn't define all of them.
     #
     AC_MSG_CHECKING([[whether inttypes.h defines the PRI[doxu]64 macros]])
     AC_COMPILE_IFELSE(
@@ -900,6 +986,22 @@
     ])
 fi
 
+#
+# Check for some headers introduced in later versions of libpcap
+# and used by some printers.
+#
+# Those headers use the {u_}intN_t types, so we must do this after
+# we check for what's needed to get them defined.
+#
+savedcppflags="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $V_INCLS"
+AC_CHECK_HEADERS(pcap/bluetooth.h,,,[#include "tcpdump-stdinc.h"])
+AC_CHECK_HEADERS(pcap/nflog.h,,,[#include "tcpdump-stdinc.h"])
+AC_CHECK_HEADERS(pcap/usb.h,,,[#include "tcpdump-stdinc.h"])
+CPPFLAGS="$savedcppflags"
+
+AC_PROG_RANLIB
+
 AC_LBL_DEVEL(V_CCOPT)
 
 AC_LBL_SOCKADDR_SA_LEN
@@ -908,71 +1010,40 @@
 
 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
+# Check for OpenSSL libcrypto
+AC_MSG_CHECKING(whether to use OpenSSL libcrypto)
+# Specify location for both includes and libraries.
+want_libcrypto=ifavailable
+AC_ARG_WITH(crypto,
+    AS_HELP_STRING([--with-crypto],
+		   [use OpenSSL libcrypto @<:@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)
+	fi
+],[
 	#
-	# 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?
+	# Use libcrypto if it's present, otherwise don't.
 	#
-	# 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
-	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;
-	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"
-	fi
+	want_libcrypto=ifavailable
+	AC_MSG_RESULT([yes, if available])
+])
+if test "$want_libcrypto" != "no"; then
 	AC_CHECK_LIB(crypto, DES_cbc_encrypt)
-
-	CPPFLAGS="$CPPFLAGS $V_INCLS"
 	AC_CHECK_HEADERS(openssl/evp.h)
 fi
-])
 
 dnl
 dnl set additional include path if necessary
 if test "$missing_includes" = "yes"; then
-	CPPFLAGS="$CPPFLAGS -I\$(srcdir)/missing"
-	V_INCLS="$V_INCLS -I\$(srcdir)/missing"
+	CPPFLAGS="$CPPFLAGS -I$srcdir/missing"
+	V_INCLS="$V_INCLS -I$srcdir/missing"
 fi
 
 AC_SUBST(V_CCOPT)
@@ -981,6 +1052,8 @@
 AC_SUBST(V_INCLS)
 AC_SUBST(V_PCAPDEP)
 AC_SUBST(LOCALSRC)
+AC_SUBST(MAN_FILE_FORMATS)
+AC_SUBST(MAN_MISC_INFO)
 
 AC_PROG_INSTALL
 
@@ -991,5 +1064,5 @@
 	cat Makefile-devel-adds >> Makefile
 	make depend
 fi])
-AC_OUTPUT(Makefile)
+AC_OUTPUT(Makefile tcpdump.1)
 exit 0
diff --git a/cpack.c b/cpack.c
index 14c0a9e..b863d8e 100644
--- a/cpack.c
+++ b/cpack.c
@@ -38,7 +38,7 @@
 #include "cpack.h"
 #include "extract.h"
 
-static u_int8_t *
+u_int8_t *
 cpack_next_boundary(u_int8_t *buf, u_int8_t *p, size_t alignment)
 {
 	size_t misalignment = (size_t)(p - buf) % alignment;
@@ -53,7 +53,7 @@
  * wordsize bytes remain in the buffer after the boundary.  Otherwise,
  * return a pointer to the boundary.
  */
-static u_int8_t *
+u_int8_t *
 cpack_align_and_reserve(struct cpack_state *cs, size_t wordsize)
 {
 	u_int8_t *next;
@@ -68,6 +68,17 @@
 	return next;
 }
 
+/* Advance by N bytes without returning them. */
+int
+cpack_advance(struct cpack_state *cs, const size_t toskip)
+{
+	/* No space left? */
+	if (cs->c_next - cs->c_buf + toskip > cs->c_len)
+		return -1;
+	cs->c_next += toskip;
+	return 0;
+}
+
 int
 cpack_init(struct cpack_state *cs, u_int8_t *buf, size_t buflen)
 {
diff --git a/cpack.h b/cpack.h
index 14ed376..383927f 100644
--- a/cpack.h
+++ b/cpack.h
@@ -43,9 +43,14 @@
 int cpack_uint32(struct cpack_state *, u_int32_t *);
 int cpack_uint64(struct cpack_state *, u_int64_t *);
 
+u_int8_t *cpack_next_boundary(u_int8_t *buf, u_int8_t *p, size_t alignment);
+u_int8_t *cpack_align_and_reserve(struct cpack_state *cs, size_t wordsize);
+
 #define cpack_int8(__s, __p)	cpack_uint8((__s),  (u_int8_t*)(__p))
 #define cpack_int16(__s, __p)	cpack_uint16((__s), (u_int16_t*)(__p))
 #define cpack_int32(__s, __p)	cpack_uint32((__s), (u_int32_t*)(__p))
 #define cpack_int64(__s, __p)	cpack_uint64((__s), (u_int64_t*)(__p))
 
+extern int cpack_advance(struct cpack_state *, const size_t);
+
 #endif /* _CPACK_H */
diff --git a/dccp.h b/dccp.h
index 1afa8c0..5c66e23 100644
--- a/dccp.h
+++ b/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 @@
 	}		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/decnet.h b/decnet.h
index 9a5c147..d25d157 100644
--- a/decnet.h
+++ b/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/decode_prefix.h b/decode_prefix.h
index b738471..8bb4a76 100644
--- a/decode_prefix.h
+++ b/decode_prefix.h
@@ -33,9 +33,9 @@
 #ifndef tcpdump_decode_prefix_h
 #define tcpdump_decode_prefix_h
 
-extern int decode_prefix4(const u_char *pptr, char *buf, u_int buflen);
+extern int decode_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen);
 #ifdef INET6
-extern int decode_prefix6(const u_char *pd, char *buf, u_int buflen);
+extern int decode_prefix6(const u_char *pd, u_int itemlen, char *buf, u_int buflen);
 #endif
 
 #endif
diff --git a/enc.h b/enc.h
index f54b4eb..2d57e2b 100644
--- a/enc.h
+++ b/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/ether.h b/ether.h
index 3d3f3be..e8b3a71 100644
--- a/ether.h
+++ b/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/ethertype.h b/ethertype.h
index 36dc8e2..a74c3a8 100644
--- a/ethertype.h
+++ b/ethertype.h
@@ -18,7 +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.30 2008-02-06 10:47:53 guy Exp $ (LBL)
  */
 
 /*
@@ -76,6 +76,9 @@
 #ifndef ETHERTYPE_SCA
 #define ETHERTYPE_SCA		0x6007
 #endif
+#ifndef ETHERTYPE_TEB
+#define ETHERTYPE_TEB		0x6558
+#endif
 #ifndef	ETHERTYPE_LANBRIDGE
 #define	ETHERTYPE_LANBRIDGE	0x8038
 #endif
@@ -97,9 +100,26 @@
 #ifndef ETHERTYPE_AARP
 #define ETHERTYPE_AARP		0x80f3
 #endif
+#ifndef	ETHERTYPE_TIPC
+#define	ETHERTYPE_TIPC		0x88ca
+#endif
 #ifndef	ETHERTYPE_8021Q
 #define	ETHERTYPE_8021Q		0x8100
 #endif
+
+/* see:
+        http://en.wikipedia.org/wiki/IEEE_802.1Q
+    and http://en.wikipedia.org/wiki/QinQ
+*/
+#ifndef	ETHERTYPE_8021Q9100
+#define	ETHERTYPE_8021Q9100	0x9100
+#endif
+#ifndef	ETHERTYPE_8021Q9200
+#define	ETHERTYPE_8021Q9200	0x9200
+#endif
+#ifndef	ETHERTYPE_8021QinQ
+#define	ETHERTYPE_8021QinQ      0x88a8
+#endif
 #ifndef ETHERTYPE_IPX
 #define ETHERTYPE_IPX		0x8137
 #endif
@@ -109,6 +129,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
@@ -124,20 +147,50 @@
 #ifndef ETHERTYPE_PPPOES
 #define ETHERTYPE_PPPOES	0x8864
 #endif
+#ifndef ETHERTYPE_PPPOED2
+#define ETHERTYPE_PPPOED2	0x3c12
+#endif
+#ifndef ETHERTYPE_PPPOES2
+#define ETHERTYPE_PPPOES2	0x3c13
+#endif
+#ifndef ETHERTYPE_MS_NLB_HB
+#define ETHERTYPE_MS_NLB_HB	0x886f /* MS Network Load Balancing Heartbeat */
+#endif
 #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
+#ifndef	ETHERTYPE_CALM_FAST
+#define	ETHERTYPE_CALM_FAST     0x1111  /* ISO CALM FAST */
+#endif
+#ifndef	ETHERTYPE_GEONET_OLD
+#define	ETHERTYPE_GEONET_OLD    0x0707  /* ETSI GeoNetworking (before Jan 2013) */
+#endif
+#ifndef	ETHERTYPE_GEONET
+#define	ETHERTYPE_GEONET        0x8947  /* ETSI GeoNetworking (Official IEEE registration from Jan 2013) */
+#endif
 
 extern const struct tok ethertype_values[];
diff --git a/extract.h b/extract.h
index f3db250..dd0a686 100644
--- a/extract.h
+++ b/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)
  */
 
 /*
@@ -28,20 +28,59 @@
 /*
  * The processor doesn't natively handle unaligned loads.
  */
-#ifdef HAVE___ATTRIBUTE__
+#if defined(__GNUC__) && defined(HAVE___ATTRIBUTE__) && \
+    (defined(__alpha) || defined(__alpha__) || \
+     defined(__mips) || defined(__mips__))
+
 /*
- * We have __attribute__; we assume that means we have __attribute__((packed)).
+ * This is a GCC-compatible compiler and we have __attribute__, which
+ * we assume that mean we have __attribute__((packed)), and this is
+ * MIPS or Alpha, which has instructions that can help when doing
+ * unaligned loads.
+ *
  * Declare packed structures containing a u_int16_t and a u_int32_t,
  * cast the pointer to point to one of those, and fetch through it;
  * the GCC manual doesn't appear to explicitly say that
  * __attribute__((packed)) causes the compiler to generate unaligned-safe
  * code, but it apppears to do so.
  *
- * We do this in case the compiler can generate, for this instruction set,
- * better code to do an unaligned load and pass stuff to "ntohs()" or
- * "ntohl()" than the code to fetch the bytes one at a time and
- * assemble them.  (That might not be the case on a little-endian platform,
- * where "ntohs()" and "ntohl()" might not be done inline.)
+ * We do this in case the compiler can generate code using those
+ * instructions to do an unaligned load and pass stuff to "ntohs()" or
+ * "ntohl()", which might be better than than the code to fetch the
+ * bytes one at a time and assemble them.  (That might not be the
+ * case on a little-endian platform, such as DEC's MIPS machines and
+ * Alpha machines, where "ntohs()" and "ntohl()" might not be done
+ * inline.)
+ *
+ * We do this only for specific architectures because, for example,
+ * at least some versions of GCC, when compiling for 64-bit SPARC,
+ * generate code that assumes alignment if we do this.
+ *
+ * XXX - add other architectures and compilers as possible and
+ * appropriate.
+ *
+ * HP's C compiler, indicated by __HP_cc being defined, supports
+ * "#pragma unaligned N" in version A.05.50 and later, where "N"
+ * specifies a number of bytes at which the typedef on the next
+ * line is aligned, e.g.
+ *
+ *	#pragma unalign 1
+ *	typedef u_int16_t unaligned_u_int16_t;
+ *
+ * to define unaligned_u_int16_t as a 16-bit unaligned data type.
+ * This could be presumably used, in sufficiently recent versions of
+ * the compiler, with macros similar to those below.  This would be
+ * useful only if that compiler could generate better code for PA-RISC
+ * or Itanium than would be generated by a bunch of shifts-and-ORs.
+ *
+ * DEC C, indicated by __DECC being defined, has, at least on Alpha,
+ * an __unaligned qualifier that can be applied to pointers to get the
+ * compiler to generate code that does unaligned loads and stores when
+ * dereferencing the pointer in question.
+ *
+ * XXX - what if the native C compiler doesn't support
+ * __attribute__((packed))?  How can we get it to generate unaligned
+ * accesses for *specific* items?
  */
 typedef struct {
 	u_int16_t	val;
@@ -51,17 +90,30 @@
 	u_int32_t	val;
 } __attribute__((packed)) unaligned_u_int32_t;
 
-#define EXTRACT_16BITS(p) \
-	((u_int16_t)ntohs(((const unaligned_u_int16_t *)(p))->val))
-#define EXTRACT_32BITS(p) \
-	((u_int32_t)ntohl(((const unaligned_u_int32_t *)(p))->val))
-#define EXTRACT_64BITS(p) \
-	((u_int64_t)(((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 0)->val)) << 32 | \
-		     ((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 1)->val)) << 0))
+static inline u_int16_t
+EXTRACT_16BITS(const void *p)
+{
+	return ((u_int16_t)ntohs(((const unaligned_u_int16_t *)(p))->val));
+}
 
-#else /* HAVE___ATTRIBUTE__ */
+static inline u_int32_t
+EXTRACT_32BITS(const void *p)
+{
+	return ((u_int32_t)ntohl(((const unaligned_u_int32_t *)(p))->val));
+}
+
+static inline u_int64_t
+EXTRACT_64BITS(const void *p)
+{
+	return ((u_int64_t)(((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 0)->val)) << 32 | \
+		((u_int64_t)ntohl(((const unaligned_u_int32_t *)(p) + 1)->val)) << 0));
+}
+
+#else /* have to do it a byte at a time */
 /*
- * We don't have __attribute__, so do unaligned loads of big-endian
+ * This isn't a GCC-compatible compiler, we don't have __attribute__,
+ * or we do but we don't know of any better way with this instruction
+ * set to do unaligned loads, so do unaligned loads of big-endian
  * quantities the hard way - fetch the bytes one at a time and
  * assemble them.
  */
@@ -82,19 +134,32 @@
 		     (u_int64_t)*((const u_int8_t *)(p) + 5) << 16 | \
 		     (u_int64_t)*((const u_int8_t *)(p) + 6) << 8 | \
 		     (u_int64_t)*((const u_int8_t *)(p) + 7)))
-#endif /* HAVE___ATTRIBUTE__ */
+#endif /* must special-case unaligned accesses */
 #else /* LBL_ALIGN */
 /*
  * The processor natively handles unaligned loads, so we can just
  * cast the pointer and fetch through it.
  */
-#define EXTRACT_16BITS(p) \
-	((u_int16_t)ntohs(*(const u_int16_t *)(p)))
-#define EXTRACT_32BITS(p) \
-	((u_int32_t)ntohl(*(const u_int32_t *)(p)))
-#define EXTRACT_64BITS(p) \
-	((u_int64_t)(((u_int64_t)ntohl(*((const u_int32_t *)(p) + 0))) << 32 | \
-		     ((u_int64_t)ntohl(*((const u_int32_t *)(p) + 1))) << 0))
+static inline u_int16_t
+EXTRACT_16BITS(const void *p)
+{
+	return ((u_int16_t)ntohs(*(const u_int16_t *)(p)));
+}
+
+static inline u_int32_t
+EXTRACT_32BITS(const void *p)
+{
+	return ((u_int32_t)ntohl(*(const u_int32_t *)(p)));
+}
+
+static inline u_int64_t
+EXTRACT_64BITS(const void *p)
+{
+	return ((u_int64_t)(((u_int64_t)ntohl(*((const u_int32_t *)(p) + 0))) << 32 | \
+		((u_int64_t)ntohl(*((const u_int32_t *)(p) + 1))) << 0));
+
+}
+
 #endif /* LBL_ALIGN */
 
 #define EXTRACT_24BITS(p) \
@@ -115,6 +180,10 @@
 		     (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/fddi.h b/fddi.h
index 690af48..df38c8e 100644
--- a/fddi.h
+++ b/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/gmpls.c b/gmpls.c
index 4d4b9ae..7391767 100644
--- a/gmpls.c
+++ b/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,9 +25,10 @@
 #include <tcpdump-stdinc.h>
 
 #include "interface.h"
+#include "gmpls.h"
 
 /* rfc3471 */
-struct tok gmpls_link_prot_values[] = {
+const struct tok gmpls_link_prot_values[] = {
     { 0x01, "Extra Traffic"},
     { 0x02, "Unprotected"},
     { 0x04, "Shared"},
@@ -40,20 +41,27 @@
 };
 
 /* 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"},
+const struct tok gmpls_switch_cap_values[] = {
+    { 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 */
+const struct tok gmpls_switch_cap_tsc_indication_values[] = {
+    { 0, "Standard SONET/SDH" },
+    { 1, "Arbitrary SONET/SDH" },
     { 0, NULL }
 };
 
 /* rfc3471 */
-struct tok gmpls_encoding_values[] = {
+const struct tok gmpls_encoding_values[] = {
     { 1,    "Packet"},
     { 2,    "Ethernet V2/DIX"},
     { 3,    "ANSI/ETSI PDH"},
@@ -69,7 +77,7 @@
 };
 
 /* rfc3471 */
-struct tok gmpls_payload_values[] = {
+const struct tok gmpls_payload_values[] = {
     {  0,   "Unknown"},
     {  1,   "Reserved"},
     {  2,   "Reserved"},
@@ -137,7 +145,7 @@
  * Link Type values used by LMP Service Discovery (specifically, the Client 
  * Port Service Attributes Object). See UNI 1.0 section 9.4.2 for details.
  */
-struct tok lmp_sd_service_config_cpsa_link_type_values[] = {
+const struct tok lmp_sd_service_config_cpsa_link_type_values[] = {
     { 5, "SDH ITU-T G.707"},
     { 6, "SONET ANSI T1.105"},
     { 0, NULL}
@@ -148,7 +156,7 @@
  * the Client Port Service Attributes Object). See UNI 1.0 section 9.4.2 for 
  * details.
  */
-struct tok lmp_sd_service_config_cpsa_signal_type_sdh_values[] = {
+const struct tok lmp_sd_service_config_cpsa_signal_type_sdh_values[] = {
     { 5,  "VC-3"},
     { 6,  "VC-4"},
     { 7,  "STM-0"},
@@ -165,7 +173,7 @@
  * the Client Port Service Attributes Object). See UNI 1.0 section 9.4.2 for 
  * details.
  */
-struct tok lmp_sd_service_config_cpsa_signal_type_sonet_values[] = {
+const struct tok lmp_sd_service_config_cpsa_signal_type_sonet_values[] = {
     { 5,  "STS-1 SPE"},
     { 6,  "STS-3c SPE"},
     { 7,  "STS-1"},
@@ -181,7 +189,7 @@
 #define DIFFSERV_BC_MODEL_MAM           1   /* draft-ietf-tewg-diff-te-proto-07 */ 
 #define DIFFSERV_BC_MODEL_EXTD_MAM      254 /* experimental */
 
-struct tok diffserv_te_bc_values[] = {
+const struct tok diffserv_te_bc_values[] = {
     {  DIFFSERV_BC_MODEL_RDM, "Russian dolls"},
     {  DIFFSERV_BC_MODEL_MAM, "Maximum allocation"},
     {  DIFFSERV_BC_MODEL_EXTD_MAM, "Maximum allocation with E-LSP support"},
diff --git a/gmpls.h b/gmpls.h
index 8c3f051..8db99de 100644
--- a/gmpls.h
+++ b/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,11 +14,21 @@
  * Original code by Hannes Gredler (hannes@juniper.net)
  */
 
-extern struct tok gmpls_link_prot_values[];
-extern struct tok gmpls_switch_cap_values[];
-extern struct tok gmpls_encoding_values[];
-extern struct tok gmpls_payload_values[];
-extern struct tok diffserv_te_bc_values[];
-extern struct tok lmp_sd_service_config_cpsa_link_type_values[];
-extern struct tok lmp_sd_service_config_cpsa_signal_type_sdh_values[];
-extern struct tok lmp_sd_service_config_cpsa_signal_type_sonet_values[];
+#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 const struct tok gmpls_link_prot_values[];
+extern const struct tok gmpls_switch_cap_values[];
+extern const struct tok gmpls_switch_cap_tsc_indication_values[];
+extern const struct tok gmpls_encoding_values[];
+extern const struct tok gmpls_payload_values[];
+extern const struct tok diffserv_te_bc_values[];
+extern const struct tok lmp_sd_service_config_cpsa_link_type_values[];
+extern const struct tok lmp_sd_service_config_cpsa_signal_type_sdh_values[];
+extern const struct tok lmp_sd_service_config_cpsa_signal_type_sonet_values[];
diff --git a/gmt2local.c b/gmt2local.c
index 926e86c..1fe0e8a 100644
--- a/gmt2local.c
+++ b/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/gmt2local.h b/gmt2local.h
index 81b0e96..f7b3841 100644
--- a/gmt2local.h
+++ b/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 1999-10-07 23:47:10 mcr Exp $ (LBL)
  */
 #ifndef gmt2local_h
 #define gmt2local_h
diff --git a/icmp6.h b/icmp6.h
index 20a51e3..c4d292e 100644
--- a/icmp6.h
+++ b/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 $	*/
 
 /*
@@ -276,7 +276,8 @@
 #define ND_OPT_ADVINTERVAL		7
 #define ND_OPT_HOMEAGENT_INFO		8
 #define ND_OPT_ROUTE_INFO		9	/* draft-ietf-ipngwg-router-preference, not officially assigned yet */
-
+#define ND_OPT_RDNSS			25
+#define ND_OPT_DNSSL			31
 
 struct nd_opt_prefix_info {	/* prefix information */
 	u_int8_t	nd_opt_pi_type;
@@ -308,6 +309,22 @@
 	u_int32_t	nd_opt_mtu_mtu;
 };
 
+struct nd_opt_rdnss {		/* RDNSS RFC 6106 5.1 */
+	u_int8_t	nd_opt_rdnss_type;
+	u_int8_t	nd_opt_rdnss_len;
+	u_int16_t	nd_opt_rdnss_reserved;
+	u_int32_t	nd_opt_rdnss_lifetime;
+	struct in6_addr nd_opt_rdnss_addr[1];	/* variable-length */
+};
+
+struct nd_opt_dnssl {		/* DNSSL RFC 6106 5.2 */
+	u_int8_t  nd_opt_dnssl_type;
+	u_int8_t  nd_opt_dnssl_len;
+	u_int16_t nd_opt_dnssl_reserved;
+	u_int32_t nd_opt_dnssl_lifetime;
+	/* followed by list of DNS search domains, variable-length */
+};
+
 struct nd_opt_advinterval {	/* Advertisement interval option */
 	u_int8_t	nd_opt_adv_type;
 	u_int8_t	nd_opt_adv_len;
diff --git a/ieee802_11.h b/ieee802_11.h
index f578a43..2aa1345 100644
--- a/ieee802_11.h
+++ b/ieee802_11.h
@@ -1,4 +1,4 @@
-/* @(#) $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
@@ -30,6 +30,7 @@
 #define	IEEE802_11_RA_LEN		6
 #define	IEEE802_11_TA_LEN		6
 #define	IEEE802_11_SEQ_LEN		2
+#define	IEEE802_11_CTL_LEN		2
 #define	IEEE802_11_IV_LEN		3
 #define	IEEE802_11_KID_LEN		1
 
@@ -67,11 +68,14 @@
 #define	ST_DISASSOC		0xA
 #define	ST_AUTH			0xB
 #define	ST_DEAUTH		0xC
-/* RESERVED 			0xD  */
+#define	ST_ACTION		0xD
 /* RESERVED 			0xE  */
 /* RESERVED 			0xF  */
 
 
+#define CTRL_CONTROL_WRAPPER	0x7
+#define	CTRL_BAR	0x8
+#define	CTRL_BA		0x9
 #define	CTRL_PS_POLL	0xA
 #define	CTRL_RTS	0xB
 #define	CTRL_CTS	0xC
@@ -140,12 +144,6 @@
 #define	CAPABILITY_CFP_REQ(cap)	((cap) & 0x0008)
 #define	CAPABILITY_PRIVACY(cap)	((cap) & 0x0010)
 
-typedef enum {
-	NOT_PRESENT,
-	PRESENT,
-	TRUNCATED
-} elem_status_t;
-
 struct ssid_t {
 	u_int8_t	element_id;
 	u_int8_t	length;
@@ -233,20 +231,20 @@
 	u_int16_t	reason_code;
 	u_int16_t	auth_alg;
 	u_int16_t	auth_trans_seq_num;
-	elem_status_t	challenge_status;
+	int		challenge_present;
 	struct challenge_t  challenge;
 	u_int16_t	capability_info;
-	elem_status_t	ssid_status;
+	int		ssid_present;
 	struct ssid_t	ssid;
-	elem_status_t	rates_status;
+	int		rates_present;
 	struct rates_t 	rates;
-	elem_status_t	ds_status;
+	int		ds_present;
 	struct ds_t	ds;
-	elem_status_t	cf_status;
+	int		cf_present;
 	struct cf_t	cf;
-	elem_status_t	fh_status;
+	int		fh_present;
 	struct fh_t	fh;
-	elem_status_t	tim_status;
+	int		tim_present;
 	struct tim_t	tim;
 };
 
@@ -312,6 +310,38 @@
 #define	CTRL_END_ACK_HDRLEN	(IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
 				 IEEE802_11_RA_LEN+IEEE802_11_BSSID_LEN)
 
+struct ctrl_ba_t {
+	u_int16_t	fc;
+	u_int16_t	duration;
+	u_int8_t	ra[6];
+	u_int8_t	fcs[4];
+};
+
+#define	CTRL_BA_HDRLEN	(IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN)
+
+struct ctrl_bar_t {
+	u_int16_t	fc;
+	u_int16_t	dur;
+	u_int8_t	ra[6];
+	u_int8_t	ta[6];
+	u_int16_t	ctl;
+	u_int16_t	seq;
+	u_int8_t	fcs[4];
+};
+
+#define	CTRL_BAR_HDRLEN		(IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\
+				 IEEE802_11_RA_LEN+IEEE802_11_TA_LEN+\
+				 IEEE802_11_CTL_LEN+IEEE802_11_SEQ_LEN)
+
+struct meshcntl_t {
+	u_int8_t	flags;
+	u_int8_t	ttl;
+	u_int8_t	seq[4];
+	u_int8_t	addr4[6];
+	u_int8_t	addr5[6];
+	u_int8_t	addr6[6];
+};
+
 #define	IV_IV(iv)	((iv) & 0xFFFFFF)
 #define	IV_PAD(iv)	(((iv) >> 24) & 0x3F)
 #define	IV_KEYID(iv)	(((iv) >> 30) & 0x03)
diff --git a/ieee802_11_radio.h b/ieee802_11_radio.h
index 142a35e..65c25df 100644
--- a/ieee802_11_radio.h
+++ b/ieee802_11_radio.h
@@ -1,6 +1,6 @@
 /* $FreeBSD: src/sys/net80211/ieee80211_radiotap.h,v 1.5 2005/01/22 20:12:05 sam Exp $ */
-/* $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 $ */
+/* 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.3 2007-08-29 02:31:44 mcr Exp $ */
 
 /*-
  * Copyright (c) 2003, 2004 David Young.  All rights reserved.
@@ -33,11 +33,11 @@
 #ifndef _NET_IF_IEEE80211RADIOTAP_H_
 #define _NET_IF_IEEE80211RADIOTAP_H_
 
-/* A generic radio capture format is desirable. There is one for
- * Linux, but it is neither rigidly defined (there were not even
- * units given for some fields) nor easily extensible.
+/* A generic radio capture format is desirable. It must be
+ * rigidly defined (e.g., units for fields should be given),
+ * and easily extensible.
  *
- * I suggest the following extensible radio capture format. It is
+ * The following is an extensible radio capture format. It is
  * based on a bitmap indicating which fields are present.
  *
  * I am trying to describe precisely what the application programmer
@@ -47,13 +47,12 @@
  * function of...") that I cannot set false expectations for lawyerly
  * readers.
  */
-#if defined(__KERNEL__) || defined(_KERNEL)
-#ifndef DLT_IEEE802_11_RADIO
-#define	DLT_IEEE802_11_RADIO	127	/* 802.11 plus WLAN header */
-#endif
-#endif /* defined(__KERNEL__) || defined(_KERNEL) */
 
-/* The radio capture header precedes the 802.11 header. */
+/*
+ * The radio capture header precedes the 802.11 header.
+ *
+ * Note well: all radiotap fields are little-endian.
+ */
 struct ieee80211_radiotap_header {
 	u_int8_t	it_version;	/* Version 0. Only increases
 					 * for drastic changes,
@@ -73,7 +72,7 @@
 					 * Additional extensions are made
 					 * by setting bit 31.
 					 */
-} __attribute__((__packed__));
+};
 
 /* Name                                 Data type       Units
  * ----                                 ---------       -----
@@ -87,15 +86,19 @@
  * IEEE80211_RADIOTAP_CHANNEL           2 x u_int16_t   MHz, bitmap
  *
  *      Tx/Rx frequency in MHz, followed by flags (see below).
+ *	Note that IEEE80211_RADIOTAP_XCHANNEL must be used to
+ *	represent an HT channel as there is not enough room in
+ *	the flags word.
  *
  * IEEE80211_RADIOTAP_FHSS              u_int16_t       see below
  *
  *      For frequency-hopping radios, the hop set (first byte)
  *      and pattern (second byte).
  *
- * IEEE80211_RADIOTAP_RATE              u_int8_t        500kb/s
+ * IEEE80211_RADIOTAP_RATE              u_int8_t        500kb/s or index
  *
- *      Tx/Rx data rate
+ *      Tx/Rx data rate.  If bit 0x80 is set then it represents an
+ *	an MCS index and not an IEEE rate.
  *
  * IEEE80211_RADIOTAP_DBM_ANTSIGNAL     int8_t          decibels from
  *                                                      one milliwatt (dBm)
@@ -155,9 +158,39 @@
  *      Unitless indication of the Rx/Tx antenna for this packet.
  *      The first antenna is antenna 0.
  *
- * IEEE80211_RADIOTAP_FCS           	u_int32_t       data
+ * IEEE80211_RADIOTAP_RX_FLAGS          u_int16_t       bitmap
  *
- *	FCS from frame in network byte order.
+ *     Properties of received frames. See flags defined below.
+ *
+ * IEEE80211_RADIOTAP_XCHANNEL          u_int32_t	bitmap
+ *					u_int16_t	MHz
+ *					u_int8_t	channel number
+ *					u_int8_t	.5 dBm
+ *
+ *	Extended channel specification: flags (see below) followed by
+ *	frequency in MHz, the corresponding IEEE channel number, and
+ *	finally the maximum regulatory transmit power cap in .5 dBm
+ *	units.  This property supersedes IEEE80211_RADIOTAP_CHANNEL
+ *	and only one of the two should be present.
+ *
+ * IEEE80211_RADIOTAP_MCS		u_int8_t	known
+ *					u_int8_t	flags
+ *					u_int8_t	mcs
+ *
+ *	Bitset indicating which fields have known values, followed
+ *	by bitset of flag values, followed by the MCS rate index as
+ *	in IEEE 802.11n.
+ *
+ * IEEE80211_RADIOTAP_VENDOR_NAMESPACE
+ *					u_int8_t  OUI[3]
+ *                                   u_int8_t  subspace
+ *                                   u_int16_t length
+ *
+ *     The Vendor Namespace Field contains three sub-fields. The first
+ *     sub-field is 3 bytes long. It contains the vendor's IEEE 802
+ *     Organizationally Unique Identifier (OUI). The fourth byte is a
+ *     vendor-specific "namespace selector."
+ *
  */
 enum ieee80211_radiotap_type {
 	IEEE80211_RADIOTAP_TSFT = 0,
@@ -174,20 +207,44 @@
 	IEEE80211_RADIOTAP_ANTENNA = 11,
 	IEEE80211_RADIOTAP_DB_ANTSIGNAL = 12,
 	IEEE80211_RADIOTAP_DB_ANTNOISE = 13,
+	IEEE80211_RADIOTAP_RX_FLAGS = 14,
+	/* NB: gap for netbsd definitions */
+	IEEE80211_RADIOTAP_XCHANNEL = 18,
+	IEEE80211_RADIOTAP_MCS = 19,
+	IEEE80211_RADIOTAP_NAMESPACE = 29,
+	IEEE80211_RADIOTAP_VENDOR_NAMESPACE = 30,
 	IEEE80211_RADIOTAP_EXT = 31
 };
 
-#ifndef _KERNEL
-/* Channel flags. */
-#define	IEEE80211_CHAN_TURBO	0x0010	/* Turbo channel */
-#define	IEEE80211_CHAN_CCK	0x0020	/* CCK channel */
-#define	IEEE80211_CHAN_OFDM	0x0040	/* OFDM channel */
-#define	IEEE80211_CHAN_2GHZ	0x0080	/* 2 GHz spectrum channel. */
-#define	IEEE80211_CHAN_5GHZ	0x0100	/* 5 GHz spectrum channel */
-#define	IEEE80211_CHAN_PASSIVE	0x0200	/* Only passive scan allowed */
-#define	IEEE80211_CHAN_DYN	0x0400	/* Dynamic CCK-OFDM channel */
-#define	IEEE80211_CHAN_GFSK	0x0800	/* GFSK channel (FHSS PHY) */
-#endif /* !_KERNEL */
+/* channel attributes */
+#define	IEEE80211_CHAN_TURBO	0x00010	/* Turbo channel */
+#define	IEEE80211_CHAN_CCK	0x00020	/* CCK channel */
+#define	IEEE80211_CHAN_OFDM	0x00040	/* OFDM channel */
+#define	IEEE80211_CHAN_2GHZ	0x00080	/* 2 GHz spectrum channel. */
+#define	IEEE80211_CHAN_5GHZ	0x00100	/* 5 GHz spectrum channel */
+#define	IEEE80211_CHAN_PASSIVE	0x00200	/* Only passive scan allowed */
+#define	IEEE80211_CHAN_DYN	0x00400	/* Dynamic CCK-OFDM channel */
+#define	IEEE80211_CHAN_GFSK	0x00800	/* GFSK channel (FHSS PHY) */
+#define	IEEE80211_CHAN_GSM	0x01000	/* 900 MHz spectrum channel */
+#define	IEEE80211_CHAN_STURBO	0x02000	/* 11a static turbo channel only */
+#define	IEEE80211_CHAN_HALF	0x04000	/* Half rate channel */
+#define	IEEE80211_CHAN_QUARTER	0x08000	/* Quarter rate channel */
+#define	IEEE80211_CHAN_HT20	0x10000	/* HT 20 channel */
+#define	IEEE80211_CHAN_HT40U	0x20000	/* HT 40 channel w/ ext above */
+#define	IEEE80211_CHAN_HT40D	0x40000	/* HT 40 channel w/ ext below */
+
+/* Useful combinations of channel characteristics, borrowed from Ethereal */
+#define IEEE80211_CHAN_A \
+        (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM)
+#define IEEE80211_CHAN_B \
+        (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_CCK)
+#define IEEE80211_CHAN_G \
+        (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN)
+#define IEEE80211_CHAN_TA \
+        (IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM | IEEE80211_CHAN_TURBO)
+#define IEEE80211_CHAN_TG \
+        (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN  | IEEE80211_CHAN_TURBO)
+
 
 /* For IEEE80211_RADIOTAP_FLAGS */
 #define	IEEE80211_RADIOTAP_F_CFP	0x01	/* sent/received
@@ -210,4 +267,31 @@
 						 */
 #define	IEEE80211_RADIOTAP_F_BADFCS	0x40	/* does not pass FCS check */
 
+/* For IEEE80211_RADIOTAP_RX_FLAGS */
+#define IEEE80211_RADIOTAP_F_RX_BADFCS	0x0001	/* frame failed crc check */
+#define IEEE80211_RADIOTAP_F_RX_PLCP_CRC	0x0002	/* frame failed PLCP CRC check */
+
+/* For IEEE80211_RADIOTAP_MCS known */
+#define IEEE80211_RADIOTAP_MCS_BANDWIDTH_KNOWN		0x01
+#define IEEE80211_RADIOTAP_MCS_MCS_INDEX_KNOWN		0x02	/* MCS index field */
+#define IEEE80211_RADIOTAP_MCS_GUARD_INTERVAL_KNOWN	0x04
+#define IEEE80211_RADIOTAP_MCS_HT_FORMAT_KNOWN		0x08
+#define IEEE80211_RADIOTAP_MCS_FEC_TYPE_KNOWN		0x10
+#define IEEE80211_RADIOTAP_MCS_STBC_KNOWN		0x20
+
+/* For IEEE80211_RADIOTAP_MCS flags */
+#define IEEE80211_RADIOTAP_MCS_BANDWIDTH_MASK	0x03
+#define IEEE80211_RADIOTAP_MCS_BANDWIDTH_20	0
+#define IEEE80211_RADIOTAP_MCS_BANDWIDTH_40	1
+#define IEEE80211_RADIOTAP_MCS_BANDWIDTH_20L	2
+#define IEEE80211_RADIOTAP_MCS_BANDWIDTH_20U	3
+#define IEEE80211_RADIOTAP_MCS_SHORT_GI		0x04 /* short guard interval */
+#define IEEE80211_RADIOTAP_MCS_HT_GREENFIELD	0x08
+#define IEEE80211_RADIOTAP_MCS_FEC_LDPC		0x10
+#define IEEE80211_RADIOTAP_MCS_STBC_MASK	0x60
+#define		IEEE80211_RADIOTAP_MCS_STBC_1	1
+#define		IEEE80211_RADIOTAP_MCS_STBC_2	2
+#define		IEEE80211_RADIOTAP_MCS_STBC_3	3
+#define IEEE80211_RADIOTAP_MCS_STBC_SHIFT	5
+
 #endif /* _NET_IF_IEEE80211RADIOTAP_H_ */
diff --git a/igrp.h b/igrp.h
index 78876d3..b5f133b 100644
--- a/igrp.h
+++ b/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/in_cksum.c b/in_cksum.c
new file mode 100644
index 0000000..93cdfc9
--- /dev/null
+++ b/in_cksum.c
@@ -0,0 +1,200 @@
+/* in_cksum.c
+ * 4.4-Lite-2 Internet checksum routine, modified to take a vector of
+ * pointers/lengths giving the pieces to be checksummed.  Also using
+ * Tahoe/CGI version of ADDCARRY(x) macro instead of from portable version.
+ */
+
+/*
+ * Copyright (c) 1988, 1992, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)in_cksum.c	8.1 (Berkeley) 6/10/93
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include "interface.h"
+
+/*
+ * Checksum routine for Internet Protocol family headers (Portable Version).
+ *
+ * This routine is very heavily used in the network
+ * code and should be modified for each CPU to be as fast as possible.
+ */
+
+#define ADDCARRY(x)  {if ((x) > 65535) (x) -= 65535;}
+#define REDUCE {l_util.l = sum; sum = l_util.s[0] + l_util.s[1]; ADDCARRY(sum);}
+
+u_int16_t
+in_cksum(const struct cksum_vec *vec, int veclen)
+{
+	register const u_int16_t *w;
+	register int sum = 0;
+	register int mlen = 0;
+	int byte_swapped = 0;
+
+	union {
+		u_int8_t	c[2];
+		u_int16_t	s;
+	} s_util;
+	union {
+		u_int16_t	s[2];
+		u_int32_t	l;
+	} l_util;
+
+	for (; veclen != 0; vec++, veclen--) {
+		if (vec->len == 0)
+			continue;
+		w = (const u_int16_t *)(void *)vec->ptr;
+		if (mlen == -1) {
+			/*
+			 * The first byte of this chunk is the continuation
+			 * of a word spanning between this chunk and the
+			 * last chunk.
+			 *
+			 * s_util.c[0] is already saved when scanning previous
+			 * chunk.
+			 */
+			s_util.c[1] = *(const u_int8_t *)w;
+			sum += s_util.s;
+			w = (const u_int16_t *)(void *)((const u_int8_t *)w + 1);
+			mlen = vec->len - 1;
+		} else
+			mlen = vec->len;
+		/*
+		 * Force to even boundary.
+		 */
+		if ((1 & (unsigned long) w) && (mlen > 0)) {
+			REDUCE;
+			sum <<= 8;
+			s_util.c[0] = *(const u_int8_t *)w;
+			w = (const u_int16_t *)(void *)((const u_int8_t *)w + 1);
+			mlen--;
+			byte_swapped = 1;
+		}
+		/*
+		 * Unroll the loop to make overhead from
+		 * branches &c small.
+		 */
+		while ((mlen -= 32) >= 0) {
+			sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3];
+			sum += w[4]; sum += w[5]; sum += w[6]; sum += w[7];
+			sum += w[8]; sum += w[9]; sum += w[10]; sum += w[11];
+			sum += w[12]; sum += w[13]; sum += w[14]; sum += w[15];
+			w += 16;
+		}
+		mlen += 32;
+		while ((mlen -= 8) >= 0) {
+			sum += w[0]; sum += w[1]; sum += w[2]; sum += w[3];
+			w += 4;
+		}
+		mlen += 8;
+		if (mlen == 0 && byte_swapped == 0)
+			continue;
+		REDUCE;
+		while ((mlen -= 2) >= 0) {
+			sum += *w++;
+		}
+		if (byte_swapped) {
+			REDUCE;
+			sum <<= 8;
+			byte_swapped = 0;
+			if (mlen == -1) {
+				s_util.c[1] = *(const u_int8_t *)w;
+				sum += s_util.s;
+				mlen = 0;
+			} else
+				mlen = -1;
+		} else if (mlen == -1)
+			s_util.c[0] = *(const u_int8_t *)w;
+	}
+	if (mlen == -1) {
+		/* The last mbuf has odd # of bytes. Follow the
+		   standard (the odd byte may be shifted left by 8 bits
+		   or not as determined by endian-ness of the machine) */
+		s_util.c[1] = 0;
+		sum += s_util.s;
+	}
+	REDUCE;
+	return (~sum & 0xffff);
+}
+
+/*
+ * Given the host-byte-order value of the checksum field in a packet
+ * header, and the network-byte-order computed checksum of the data
+ * that the checksum covers (including the checksum itself), compute
+ * what the checksum field *should* have been.
+ */
+u_int16_t
+in_cksum_shouldbe(u_int16_t sum, u_int16_t computed_sum)
+{
+	u_int32_t shouldbe;
+
+	/*
+	 * The value that should have gone into the checksum field
+	 * is the negative of the value gotten by summing up everything
+	 * *but* the checksum field.
+	 *
+	 * We can compute that by subtracting the value of the checksum
+	 * field from the sum of all the data in the packet, and then
+	 * computing the negative of that value.
+	 *
+	 * "sum" is the value of the checksum field, and "computed_sum"
+	 * is the negative of the sum of all the data in the packets,
+	 * so that's -(-computed_sum - sum), or (sum + computed_sum).
+	 *
+	 * All the arithmetic in question is one's complement, so the
+	 * addition must include an end-around carry; we do this by
+	 * doing the arithmetic in 32 bits (with no sign-extension),
+	 * and then adding the upper 16 bits of the sum, which contain
+	 * the carry, to the lower 16 bits of the sum, and then do it
+	 * again in case *that* sum produced a carry.
+	 *
+	 * As RFC 1071 notes, the checksum can be computed without
+	 * byte-swapping the 16-bit words; summing 16-bit words
+	 * on a big-endian machine gives a big-endian checksum, which
+	 * can be directly stuffed into the big-endian checksum fields
+	 * in protocol headers, and summing words on a little-endian
+	 * machine gives a little-endian checksum, which must be
+	 * byte-swapped before being stuffed into a big-endian checksum
+	 * field.
+	 *
+	 * "computed_sum" is a network-byte-order value, so we must put
+	 * it in host byte order before subtracting it from the
+	 * host-byte-order value from the header; the adjusted checksum
+	 * will be in host byte order, which is what we'll return.
+	 */
+	shouldbe = sum;
+	shouldbe += ntohs(computed_sum);
+	shouldbe = (shouldbe & 0xFFFF) + (shouldbe >> 16);
+	shouldbe = (shouldbe & 0xFFFF) + (shouldbe >> 16);
+	return shouldbe;
+}
diff --git a/interface.h b/interface.h
index 49ba87d..9732d39 100644
--- a/interface.h
+++ b/interface.h
@@ -18,7 +18,7 @@
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * @(#) $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.285 2008-08-16 11:36:20 hannes Exp $ (LBL)
  */
 
 #ifndef tcpdump_interface_h
@@ -28,10 +28,6 @@
 #include "os-proto.h"
 #endif
 
-#ifndef HAVE___ATTRIBUTE__
-#define __attribute__(x)
-#endif
-
 /* snprintf et al */
 
 #include <stdarg.h>
@@ -42,13 +38,19 @@
 
 #if !defined(HAVE_SNPRINTF)
 int snprintf(char *, size_t, const char *, ...)
-     __attribute__((format(printf, 3, 4)));
-#endif
+#ifdef __ATTRIBUTE___FORMAT_OK
+     __attribute__((format(printf, 3, 4)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+     ;
+#endif /* !defined(HAVE_SNPRINTF) */
 
 #if !defined(HAVE_VSNPRINTF)
 int vsnprintf(char *, size_t, const char *, va_list)
-     __attribute__((format(printf, 3, 0)));
-#endif
+#ifdef __ATTRIBUTE___FORMAT_OK
+     __attribute__((format(printf, 3, 0)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+     ;
+#endif /* !defined(HAVE_VSNPRINTF) */
 
 #ifndef HAVE_STRLCAT
 extern size_t strlcat(char *, const char *, size_t);
@@ -74,6 +76,13 @@
 #define PT_CNFP		7	/* Cisco NetFlow protocol */
 #define PT_TFTP		8	/* trivial file transfer protocol */
 #define PT_AODV		9	/* Ad-hoc On-demand Distance Vector Protocol */
+#define PT_CARP		10	/* Common Address Redundancy Protocol */
+#define PT_RADIUS	11	/* RADIUS authentication Protocol */
+#define PT_ZMTP1	12	/* ZeroMQ Message Transport Protocol 1.0 */
+#define PT_VXLAN	13	/* Virtual eXtensible Local Area Network */
+#define PT_PGM		14	/* [UDP-encapsulated] Pragmatic General Multicast */
+#define PT_PGM_ZMTP1	15	/* ZMTP/1.0 inside PGM (native or UDP-encapsulated) */
+#define PT_LMP		16	/* Link Management Protocol */
 
 #ifndef min
 #define min(a,b) ((a)>(b)?(b):(a))
@@ -82,21 +91,6 @@
 #define max(a,b) ((b)>(a)?(b):(a))
 #endif
 
-/*
- * The default snapshot length.  This value allows most printers to print
- * useful information while keeping the amount of unwanted data down.
- */
-#ifndef INET6
-#define DEFAULT_SNAPLEN 68	/* ether + IPv4 + TCP + 14 */
-#else
-#define DEFAULT_SNAPLEN 96	/* ether + IPv6 + TCP + 22 */
-#endif
-
-#ifndef BIG_ENDIAN
-#define BIG_ENDIAN 4321
-#define LITTLE_ENDIAN 1234
-#endif
-
 #define ESRC(ep) ((ep)->ether_shost)
 #define EDST(ep) ((ep)->ether_dhost)
 
@@ -149,8 +143,16 @@
 extern const char *dnaddr_string(u_short);
 
 extern void error(const char *, ...)
-    __attribute__((noreturn, format (printf, 1, 2)));
-extern void warning(const char *, ...) __attribute__ ((format (printf, 1, 2)));
+     __attribute__((noreturn))
+#ifdef __ATTRIBUTE___FORMAT_OK
+     __attribute__((format (printf, 1, 2)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+     ;
+extern void warning(const char *, ...)
+#ifdef __ATTRIBUTE___FORMAT_OK
+     __attribute__((format (printf, 1, 2)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+     ;
 
 extern char *read_infile(char *);
 extern char *copy_argv(char **);
@@ -164,6 +166,11 @@
 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>
@@ -176,10 +183,9 @@
 extern void hex_print_with_offset(const char *, const u_char *, u_int, u_int);
 extern void hex_print(const char *, const u_char *, u_int);
 extern void telnet_print(const u_char *, u_int);
-extern int ether_encap_print(u_short, const u_char *, u_int, u_int, u_short *);
 extern int llc_print(const u_char *, u_int, u_int, const u_char *,
 	const u_char *, u_short *);
-extern int snap_print(const u_char *, u_int, u_int, u_short *, u_int);
+extern int snap_print(const u_char *, u_int, u_int, u_int);
 extern void aarp_print(const u_char *, u_int);
 extern void aodv_print(const u_char *, u_int, int);
 extern void atalk_print(const u_char *, u_int);
@@ -199,8 +205,6 @@
 extern u_int pflog_if_print(const struct pcap_pkthdr *, const u_char *);
 extern u_int arcnet_if_print(const struct pcap_pkthdr *, const u_char *);
 extern u_int arcnet_linux_if_print(const struct pcap_pkthdr *, const u_char *);
-extern void ether_print(const u_char *, u_int, u_int);
-extern u_int ether_if_print(const struct pcap_pkthdr *, const u_char *);
 extern u_int token_print(const u_char *, u_int, u_int);
 extern u_int token_if_print(const struct pcap_pkthdr *, const u_char *);
 extern void fddi_print(const u_char *, u_int, u_int);
@@ -209,10 +213,13 @@
 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);
@@ -226,21 +233,29 @@
 extern u_int ltalk_if_print(const struct pcap_pkthdr *, const u_char *);
 extern void msdp_print(const unsigned char *, u_int);
 extern void nfsreply_print(const u_char *, u_int, const u_char *);
+extern void nfsreply_print_noaddr(const u_char *, u_int, const u_char *);
 extern void nfsreq_print(const u_char *, u_int, const u_char *);
+extern void nfsreq_print_noaddr(const u_char *, u_int, const u_char *);
 extern void ns_print(const u_char *, u_int, int);
+extern const u_char * ns_nprint (register const u_char *, register const u_char *);
 extern void ntp_print(const u_char *, u_int);
 extern u_int null_if_print(const struct pcap_pkthdr *, const u_char *);
+extern void openflow_print(const u_char *, u_int);
 extern void ospf_print(const u_char *, u_int, const u_char *);
-extern void olsr_print (const u_char *, u_int);
+extern void olsr_print (const u_char *, u_int, int);
 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 rpki_rtr_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);
+extern void pim_print(const u_char *, u_int, u_int);
 extern u_int pppoe_print(const u_char *, u_int);
 extern u_int ppp_print(register const u_char *, u_int);
 extern u_int ppp_if_print(const struct pcap_pkthdr *, const u_char *);
@@ -250,6 +265,7 @@
 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 *);
@@ -281,7 +297,9 @@
 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 *);
@@ -291,48 +309,69 @@
 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 carp_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);
 extern void pptp_print(const u_char *);
 extern void dccp_print(const u_char *, const u_char *, u_int);
 extern void sctp_print(const u_char *, const u_char *, u_int);
+extern void forces_print(const u_char *, u_int);
 extern void mpls_print(const u_char *, u_int);
 extern void mpls_lsp_ping_print(const u_char *, u_int);
 extern void zephyr_print(const u_char *, int);
+extern void zmtp1_print(const u_char *, u_int);
+extern void zmtp1_print_datagram(const u_char *, u_int);
 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 int mptcp_print(const u_char *, u_int, u_char);
+extern u_int bt_if_print(const struct pcap_pkthdr *, const u_char *);
+extern u_int usb_linux_48_byte_print(const struct pcap_pkthdr *, const u_char *);
+extern u_int usb_linux_64_byte_print(const struct pcap_pkthdr *, const u_char *);
+extern void vxlan_print(const u_char *, u_int);
+extern void otv_print(const u_char *, u_int);
+
 
 #ifdef INET6
-extern void ip6_print(const u_char *, u_int);
 extern void ip6_opt_print(const u_char *, int);
 extern int hbhopt_print(const u_char *);
 extern int dstopt_print(const u_char *);
 extern int frag6_print(const u_char *, const u_char *);
 extern int mobility_print(const u_char *, const u_char *);
-extern void icmp6_print(const u_char *, u_int, const u_char *, int);
 extern void ripng_print(const u_char *, unsigned int);
 extern int rt6_print(const u_char *, const u_char *);
 extern void ospf6_print(const u_char *, u_int);
 extern void dhcp6_print(const u_char *, u_int);
+extern void babel_print(const u_char *, u_int);
+extern int mask62plen(const u_char *);
 #endif /*INET6*/
-extern u_short in_cksum(const u_short *, register u_int, int);
+
+struct cksum_vec {
+	const u_int8_t	*ptr;
+	int		len;
+};
+extern u_int16_t in_cksum(const struct cksum_vec *, int);
 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
 
@@ -340,10 +379,14 @@
 
 /* forward compatibility */
 
+#ifndef NETDISSECT_REWORKED
 extern netdissect_options *gndo;
 
+#define bflag gndo->ndo_bflag 
 #define eflag gndo->ndo_eflag 
 #define fflag gndo->ndo_fflag 
+#define jflag gndo->ndo_jflag
+#define Kflag gndo->ndo_Kflag 
 #define nflag gndo->ndo_nflag 
 #define Nflag gndo->ndo_Nflag 
 #define Oflag gndo->ndo_Oflag 
@@ -359,13 +402,20 @@
 #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 sigsecret gndo->ndo_sigsecret
 #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 Hflag gndo->ndo_Hflag
 #define snaplen     gndo->ndo_snaplen
 #define snapend     gndo->ndo_snapend
 
+#endif
diff --git a/ip.h b/ip.h
index e232ae0..8a97632 100644
--- a/ip.h
+++ b/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.
@@ -62,7 +62,7 @@
 	u_int8_t	ip_p;		/* protocol */
 	u_int16_t	ip_sum;		/* checksum */
 	struct	in_addr ip_src,ip_dst;	/* source and dest address */
-};
+} UNALIGNED;
 
 #define	IP_MAXPACKET	65535		/* maximum packet size */
 
@@ -134,7 +134,7 @@
 			u_int32_t ipt_time;
 		} ipt_ta[1];
 	} ipt_timestamp;
-};
+} UNALIGNED;
 
 /* flag bits for ipt_flg */
 #define	IPOPT_TS_TSONLY		0		/* timestamps only */
@@ -161,4 +161,4 @@
 #define	IP_MSS		576		/* default maximum segment size */
 
 /* in print-ip.c */
-extern u_int32_t ip_finddst(const struct ip *);
+extern int nextproto4_cksum(const struct ip *, const u_int8_t *, u_int, u_int);
diff --git a/ip6.h b/ip6.h
index acf465c..12c87ad 100644
--- a/ip6.h
+++ b/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 $	*/
 
 /*
@@ -86,7 +86,7 @@
 	} ip6_ctlun;
 	struct in6_addr ip6_src;	/* source address */
 	struct in6_addr ip6_dst;	/* destination address */
-};
+} UNALIGNED;
 
 #define ip6_vfc		ip6_ctlun.ip6_un2_vfc
 #define ip6_flow	ip6_ctlun.ip6_un1.ip6_un1_flow
@@ -109,25 +109,23 @@
  */
 
 struct	ip6_ext {
-	u_char	ip6e_nxt;
-	u_char	ip6e_len;
-};
+	u_int8_t ip6e_nxt;
+	u_int8_t ip6e_len;
+} UNALIGNED;
 
 /* Hop-by-Hop options header */
-/* XXX should we pad it to force alignment on an 8-byte boundary? */
 struct ip6_hbh {
 	u_int8_t ip6h_nxt;	/* next header */
 	u_int8_t ip6h_len;	/* length in units of 8 octets */
 	/* followed by options */
-};
+} UNALIGNED;
 
 /* Destination options header */
-/* XXX should we pad it to force alignment on an 8-byte boundary? */
 struct ip6_dest {
 	u_int8_t ip6d_nxt;	/* next header */
 	u_int8_t ip6d_len;	/* length in units of 8 octets */
 	/* followed by options */
-};
+} UNALIGNED;
 
 /* Option types and related macros */
 #define IP6OPT_PAD1		0x00	/* 00 0 00000 */
@@ -163,7 +161,7 @@
 	u_int8_t  ip6r_type;	/* routing type */
 	u_int8_t  ip6r_segleft;	/* segments left */
 	/* followed by routing type specific data */
-};
+} UNALIGNED;
 
 /* Type 0 Routing header */
 struct ip6_rthdr0 {
@@ -174,7 +172,7 @@
 	u_int8_t  ip6r0_reserved;	/* reserved field */
 	u_int8_t  ip6r0_slmap[3];	/* strict/loose bit map */
 	struct in6_addr ip6r0_addr[1];	/* up to 23 addresses */
-};
+} UNALIGNED;
 
 /* Fragment header */
 struct ip6_frag {
@@ -182,10 +180,13 @@
 	u_int8_t  ip6f_reserved;	/* reserved field */
 	u_int16_t ip6f_offlg;		/* offset, reserved, and flag */
 	u_int32_t ip6f_ident;		/* identification */
-};
+} UNALIGNED;
 
 #define IP6F_OFF_MASK		0xfff8	/* mask out offset from ip6f_offlg */
 #define IP6F_RESERVED_MASK	0x0006	/* reserved bits in ip6f_offlg */
 #define IP6F_MORE_FRAG		0x0001	/* more-fragments flag */
 
+/* in print-ip6.c */
+extern int nextproto6_cksum(const struct ip6_hdr *, const u_int8_t *, u_int, u_int);
+
 #endif /* not _NETINET_IP6_H_ */
diff --git a/ipfc.h b/ipfc.h
index f822d4a..438d115 100644
--- a/ipfc.h
+++ b/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/ipnet.h b/ipnet.h
new file mode 100644
index 0000000..ae69284
--- /dev/null
+++ b/ipnet.h
@@ -0,0 +1,13 @@
+typedef struct ipnet_hdr {
+	uint8_t		iph_version;
+	uint8_t		iph_family;
+	uint16_t	iph_htype;
+	uint32_t	iph_pktlen;
+	uint32_t	iph_ifindex;
+	uint32_t	iph_grifindex;
+	uint32_t	iph_zsrc;
+	uint32_t	iph_zdst;
+} ipnet_hdr_t;
+
+#define	IPH_AF_INET	2		/* Matches Solaris's AF_INET */
+#define	IPH_AF_INET6	26		/* Matches Solaris's AF_INET6 */
diff --git a/ipproto.c b/ipproto.c
old mode 100755
new mode 100644
index 66ea356..cbb9bf3
--- a/ipproto.c
+++ b/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
@@ -27,7 +27,7 @@
 #include "interface.h"
 #include "ipproto.h"
 
-struct tok ipproto_values[] = {
+const struct tok ipproto_values[] = {
     { IPPROTO_HOPOPTS, "Options" },
     { IPPROTO_ICMP, "ICMP" },
     { IPPROTO_IGMP, "IGMP" },
@@ -55,6 +55,7 @@
     { IPPROTO_PGM, "PGM" },
     { IPPROTO_SCTP, "SCTP" },
     { IPPROTO_MOBILITY, "Mobility" },
+    { IPPROTO_CARP, "CARP" },
     { 0, NULL }
 };
 
diff --git a/ipproto.h b/ipproto.h
index 7e0f785..c9801a6 100644
--- a/ipproto.h
+++ b/ipproto.h
@@ -30,14 +30,14 @@
  * 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: src/sys/netinet/in.h,v 1.38.2.3 1999/08/29 16:29:34 peter Exp $
  */
 
-extern struct tok ipproto_values[];
+extern const struct tok ipproto_values[];
 
 #ifndef IPPROTO_IP
 #define	IPPROTO_IP		0		/* dummy for IP */
@@ -133,6 +133,9 @@
 #ifndef IPPROTO_VRRP
 #define IPPROTO_VRRP		112
 #endif
+#ifndef IPPROTO_CARP
+#define IPPROTO_CARP		112
+#endif
 #ifndef IPPROTO_PGM
 #define IPPROTO_PGM             113
 #endif
diff --git a/ipsec_doi.h b/ipsec_doi.h
index 83d05ea..554a258 100644
--- a/ipsec_doi.h
+++ b/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/ipx.h b/ipx.h
index a8c1cd5..bfc3019 100644
--- a/ipx.h
+++ b/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/isakmp.h b/isakmp.h
index 94fac40..d628f7a 100644
--- a/isakmp.h
+++ b/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.12 2007-11-24 18:13:33 mcr Exp $ */
 
 /* refer to RFC 2408 */
 
@@ -81,7 +81,7 @@
 #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                            !
@@ -127,9 +127,13 @@
 #define ISAKMP_NPTYPE_N     11 /* Notification */
 #define ISAKMP_NPTYPE_D     12 /* Delete */
 #define ISAKMP_NPTYPE_VID   13 /* Vendor ID */
+#define ISAKMP_NPTYPE_v2E   46 /* v2 Encrypted payload */
 
-#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 +146,13 @@
 /* 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 +162,7 @@
 */
 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 +199,7 @@
 	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 +213,7 @@
 	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 +229,7 @@
 	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 +238,14 @@
 };
 
 /* 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 +255,7 @@
 };
 
 /* 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 +279,7 @@
 #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 +294,27 @@
 
 /* 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 +358,7 @@
 #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 +368,15 @@
 };
 
 
-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 +386,116 @@
 #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.5.  Identification Payloads */
+enum ikev2_id_type {
+	ID_IPV4_ADDR=1,
+	ID_FQDN=2,
+	ID_RFC822_ADDR=3,
+	ID_IPV6_ADDR=5,
+	ID_DER_ASN1_DN=9,
+	ID_DER_ASN1_GN=10,
+	ID_KEY_ID=11,
+};
+struct ikev2_id {
+	struct isakmp_gen h;
+	u_int8_t  type;        /* ID type */
+	u_int8_t  res1;
+	u_int16_t res2;
+	/* SPI */
+	/* Notification 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 */
+};
+
+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/l2tp.h b/l2tp.h
index 1568883..5be24b9 100644
--- a/l2tp.h
+++ b/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/l2vpn.c b/l2vpn.c
old mode 100755
new mode 100644
index d98e69a..021e7f0
--- a/l2vpn.c
+++ b/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
@@ -27,7 +27,7 @@
 #include "l2vpn.h"
 
 /* draft-ietf-pwe3-iana-allocation-04 */
-struct tok l2vpn_encaps_values[] = {
+const struct tok l2vpn_encaps_values[] = {
     { 0x00, "Reserved"},
     { 0x01, "Frame Relay"},
     { 0x02, "ATM AAL5 VCC transport"},
diff --git a/l2vpn.h b/l2vpn.h
old mode 100755
new mode 100644
index 64eb024..871eca0
--- a/l2vpn.h
+++ b/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
@@ -14,4 +14,4 @@
  * Original code by Hannes Gredler (hannes@juniper.net)
  */
 
-extern struct tok l2vpn_encaps_values[];
+extern const struct tok l2vpn_encaps_values[];
diff --git a/lane.h b/lane.h
index 51b6e19..76cc020 100644
--- a/lane.h
+++ b/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/lbl/os-osf4.h b/lbl/os-osf4.h
index 62866ed..5682b7e 100644
--- a/lbl/os-osf4.h
+++ b/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/lbl/os-solaris2.h b/lbl/os-solaris2.h
index de481c2..5c01b87 100644
--- a/lbl/os-solaris2.h
+++ b/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/lbl/os-sunos4.h b/lbl/os-sunos4.h
index 2e0f25f..ab0a12c 100644
--- a/lbl/os-sunos4.h
+++ b/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 1999-10-07 23:47:13 mcr Exp $ (LBL)
  */
 
 /* Prototypes missing in SunOS 4 */
diff --git a/lbl/os-ultrix4.h b/lbl/os-ultrix4.h
index 676b3bd..347485e 100644
--- a/lbl/os-ultrix4.h
+++ b/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 1999-10-07 23:47:13 mcr Exp $ (LBL)
  */
 
 /* Prototypes missing in Ultrix 4 */
diff --git a/llc.h b/llc.h
index fc04c67..6604669 100644
--- a/llc.h
+++ b/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,9 @@
 #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+ */
+#define	PID_CISCO_VLANBRIDGE	0x010c	/* "VLAN Bridge", according to Wireshark */
 
 /*
  * PIDs for use with OUI_RFC2684.
diff --git a/machdep.c b/machdep.c
index 5b04503..6b3d473 100644
--- a/machdep.c
+++ b/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
@@ -46,7 +46,10 @@
 
 #if !defined(HAVE_SNPRINTF)
 int snprintf(char *, size_t, const char *, ...)
-     __attribute__((format(printf, 3, 4)));
+#ifdef __ATTRIBUTE___FORMAT_OK
+     __attribute__((format(printf, 3, 4)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+     ;
 #endif /* !defined(HAVE_SNPRINTF) */
 #endif /* __osf__ */
 
diff --git a/machdep.h b/machdep.h
index 8d49a7a..6328c82 100644
--- a/machdep.h
+++ b/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/makemib b/makemib
index 2c80bef..b59e2f1 100755
--- a/makemib
+++ b/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/missing/addrinfo.h b/missing/addrinfo.h
index 09f6a42..d3d63cd 100644
--- a/missing/addrinfo.h
+++ b/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
 
@@ -81,9 +81,6 @@
 
 extern void freeaddrinfo (struct addrinfo *);
 extern void freehostent (struct hostent *);
-extern char *gai_strerror (int);
-extern int getaddrinfo (const char *, const char *,
-			    const struct addrinfo *, struct addrinfo **);
 extern int getnameinfo (const struct sockaddr *, size_t, char *,
 			    size_t, char *, size_t, int);
 extern struct hostent *getipnodebyaddr (const void *, size_t, int, int *);
diff --git a/missing/addrsize.h b/missing/addrsize.h
deleted file mode 100644
index 13db4da..0000000
--- a/missing/addrsize.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#ifndef INADDRSZ
-#define INADDRSZ 4		/* IPv4 T_A */
-#endif
-
-#ifndef IN6ADDRSZ
-#define IN6ADDRSZ	16	/* IPv6 T_AAAA */
-#endif
-
diff --git a/missing/datalinks.c b/missing/datalinks.c
index 2cc1267..1bd8644 100644
--- a/missing/datalinks.c
+++ b/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/missing/dlnames.c b/missing/dlnames.c
index f4f583e..32072b7 100644
--- a/missing/dlnames.c
+++ b/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/missing/getaddrinfo.c b/missing/getaddrinfo.c
deleted file mode 100644
index 8830322..0000000
--- a/missing/getaddrinfo.c
+++ /dev/null
@@ -1,1115 +0,0 @@
-/*
- * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * "#ifdef FAITH" part is local hack for supporting IPv4-v6 translator.
- *
- * Issues to be discussed:
- * - Thread safe-ness must be checked.
- * - Return values.  There are nonstandard return values defined and used
- *   in the source code.  This is because RFC2553 is silent about which error
- *   code must be returned for which situation.
- * Note:
- * - We use getipnodebyname() just for thread-safeness.  There's no intent
- *   to let it do PF_UNSPEC (actually we never pass PF_UNSPEC to
- *   getipnodebyname().
- * - The code filters out AFs that are not supported by the kernel,
- *   when globbing NULL hostname (to loopback, or wildcard).  Is it the right
- *   thing to do?  What is the relationship with post-RFC2553 AI_ADDRCONFIG
- *   in ai_flags?
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#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 $";
-#endif
-
-#include <sys/types.h>
-#include <sys/param.h>
-#if 0
-#include <sys/sysctl.h>
-#endif
-#include <sys/socket.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <arpa/nameser.h>
-#include <netdb.h>
-#include <resolv.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-
-#ifndef HAVE_U_INT32_T
-#include "bittypes.h"
-#endif
-
-#ifndef HAVE_SOCKADDR_STORAGE
-#include "sockstorage.h"
-#endif
-
-#ifdef NEED_ADDRINFO_H
-#include "addrinfo.h"
-#endif
-
-#if defined(__KAME__) && defined(INET6)
-# define FAITH
-#endif
-
-#define SUCCESS 0
-#define ANY 0
-#define YES 1
-#define NO  0
-
-#ifdef FAITH
-static int translate = NO;
-static struct in6_addr faith_prefix = IN6ADDR_ANY_INIT;
-#endif
-
-static const char in_addrany[] = { 0, 0, 0, 0 };
-static const char in6_addrany[] = {
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-static const char in_loopback[] = { 127, 0, 0, 1 };
-static const char in6_loopback[] = {
-	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
-};
-
-struct sockinet {
-	u_char	si_len;
-	u_char	si_family;
-	u_short	si_port;
-	u_int32_t si_scope_id;
-};
-
-static const struct afd {
-	int a_af;
-	int a_addrlen;
-	int a_socklen;
-	int a_off;
-	const char *a_addrany;
-	const char *a_loopback;
-	int a_scoped;
-} afdl [] = {
-#ifdef INET6
-	{PF_INET6, sizeof(struct in6_addr),
-	 sizeof(struct sockaddr_in6),
-	 offsetof(struct sockaddr_in6, sin6_addr),
-	 in6_addrany, in6_loopback, 1},
-#endif
-	{PF_INET, sizeof(struct in_addr),
-	 sizeof(struct sockaddr_in),
-	 offsetof(struct sockaddr_in, sin_addr),
-	 in_addrany, in_loopback, 0},
-	{0, 0, 0, 0, NULL, NULL, 0},
-};
-
-struct explore {
-	int e_af;
-	int e_socktype;
-	int e_protocol;
-	const char *e_protostr;
-	int e_wild;
-#define WILD_AF(ex)		((ex)->e_wild & 0x01)
-#define WILD_SOCKTYPE(ex)	((ex)->e_wild & 0x02)
-#define WILD_PROTOCOL(ex)	((ex)->e_wild & 0x04)
-};
-
-static const struct explore explore[] = {
-#if 0
-	{ PF_LOCAL, 0, ANY, ANY, NULL, 0x01 },
-#endif
-#ifdef INET6
-	{ PF_INET6, SOCK_DGRAM, IPPROTO_UDP, "udp", 0x07 },
-	{ PF_INET6, SOCK_STREAM, IPPROTO_TCP, "tcp", 0x07 },
-	{ PF_INET6, SOCK_RAW, ANY, NULL, 0x05 },
-#endif
-	{ PF_INET, SOCK_DGRAM, IPPROTO_UDP, "udp", 0x07 },
-	{ PF_INET, SOCK_STREAM, IPPROTO_TCP, "tcp", 0x07 },
-	{ PF_INET, SOCK_RAW, ANY, NULL, 0x05 },
-	{ -1, 0, 0, NULL, 0 },
-};
-
-#ifdef INET6
-#define PTON_MAX	16
-#else
-#define PTON_MAX	4
-#endif
-
-
-static int str_isnumber (const char *);
-static int explore_fqdn (const struct addrinfo *, const char *,
-	const char *, struct addrinfo **);
-static int explore_null (const struct addrinfo *, const char *,
-	const char *, struct addrinfo **);
-static int explore_numeric (const struct addrinfo *, const char *,
-	const char *, struct addrinfo **);
-static int explore_numeric_scope (const struct addrinfo *, const char *,
-	const char *, struct addrinfo **);
-static int get_name (const char *, const struct afd *, struct addrinfo **,
-	char *, const struct addrinfo *, const char *);
-static int get_canonname (const struct addrinfo *,
-	struct addrinfo *, const char *);
-static struct addrinfo *get_ai (const struct addrinfo *,
-	const struct afd *, const char *);
-static int get_portmatch (const struct addrinfo *, const char *);
-static int get_port (struct addrinfo *, const char *, int);
-static const struct afd *find_afd (int);
-
-static char *ai_errlist[] = {
-	"Success",
-	"Address family for hostname not supported",	/* EAI_ADDRFAMILY */
-	"Temporary failure in name resolution",		/* EAI_AGAIN      */
-	"Invalid value for ai_flags",		       	/* EAI_BADFLAGS   */
-	"Non-recoverable failure in name resolution", 	/* EAI_FAIL       */
-	"ai_family not supported",			/* EAI_FAMILY     */
-	"Memory allocation failure", 			/* EAI_MEMORY     */
-	"No address associated with hostname", 		/* EAI_NODATA     */
-	"hostname nor servname provided, or not known",	/* EAI_NONAME     */
-	"servname not supported for ai_socktype",	/* EAI_SERVICE    */
-	"ai_socktype not supported", 			/* EAI_SOCKTYPE   */
-	"System error returned in errno", 		/* EAI_SYSTEM     */
-	"Invalid value for hints",			/* EAI_BADHINTS	  */
-	"Resolved protocol is unknown",			/* EAI_PROTOCOL   */
-	"Unknown error", 				/* EAI_MAX        */
-};
-
-/* XXX macros that make external reference is BAD. */
-
-#define GET_AI(ai, afd, addr) \
-do { \
-	/* external reference: pai, error, and label free */ \
-	(ai) = get_ai(pai, (afd), (addr)); \
-	if ((ai) == NULL) { \
-		error = EAI_MEMORY; \
-		goto free; \
-	} \
-} while (0)
-
-#define GET_PORT(ai, serv) \
-do { \
-	/* external reference: error and label free */ \
-	error = get_port((ai), (serv), 0); \
-	if (error != 0) \
-		goto free; \
-} while (0)
-
-#define GET_CANONNAME(ai, str) \
-do { \
-	/* external reference: pai, error and label free */ \
-	error = get_canonname(pai, (ai), (str)); \
-	if (error != 0) \
-		goto free; \
-} while (0)
-
-#define ERR(err) \
-do { \
-	/* external reference: error, and label bad */ \
-	error = (err); \
-	goto bad; \
-} while (0)
-
-#define MATCH_FAMILY(x, y, w) \
-	((x) == (y) || ((w) && ((x) == PF_UNSPEC || (y) == PF_UNSPEC)))
-#define MATCH(x, y, w) \
-	((x) == (y) || ((w) && ((x) == ANY || (y) == ANY)))
-
-char *
-gai_strerror(ecode)
-	int ecode;
-{
-	if (ecode < 0 || ecode > EAI_MAX)
-		ecode = EAI_MAX;
-	return ai_errlist[ecode];
-}
-
-void
-freeaddrinfo(ai)
-	struct addrinfo *ai;
-{
-	struct addrinfo *next;
-
-	do {
-		next = ai->ai_next;
-		if (ai->ai_canonname)
-			free(ai->ai_canonname);
-		/* no need to free(ai->ai_addr) */
-		free(ai);
-	} while ((ai = next) != NULL);
-}
-
-static int
-str_isnumber(p)
-	const char *p;
-{
-	char *q = (char *)p;
-	while (*q) {
-		if (! isdigit(*q))
-			return NO;
-		q++;
-	}
-	return YES;
-}
-
-int
-getaddrinfo(hostname, servname, hints, res)
-	const char *hostname, *servname;
-	const struct addrinfo *hints;
-	struct addrinfo **res;
-{
-	struct addrinfo sentinel;
-	struct addrinfo *cur;
-	int error = 0;
-	struct addrinfo ai;
-	struct addrinfo ai0;
-	struct addrinfo *pai;
-	const struct afd *afd;
-	const struct explore *ex;
-
-#ifdef FAITH
-	static int firsttime = 1;
-
-	if (firsttime) {
-		/* translator hack */
-		char *q = getenv("GAI");
-		if (q && inet_pton(AF_INET6, q, &faith_prefix) == 1)
-			translate = YES;
-		firsttime = 0;
-	}
-#endif
-
-	sentinel.ai_next = NULL;
-	cur = &sentinel;
-	pai = &ai;
-	pai->ai_flags = 0;
-	pai->ai_family = PF_UNSPEC;
-	pai->ai_socktype = ANY;
-	pai->ai_protocol = ANY;
-	pai->ai_addrlen = 0;
-	pai->ai_canonname = NULL;
-	pai->ai_addr = NULL;
-	pai->ai_next = NULL;
-
-	if (hostname == NULL && servname == NULL)
-		return EAI_NONAME;
-	if (hints) {
-		/* error check for hints */
-		if (hints->ai_addrlen || hints->ai_canonname ||
-		    hints->ai_addr || hints->ai_next)
-			ERR(EAI_BADHINTS); /* xxx */
-		if (hints->ai_flags & ~AI_MASK)
-			ERR(EAI_BADFLAGS);
-		switch (hints->ai_family) {
-		case PF_UNSPEC:
-		case PF_INET:
-#ifdef INET6
-		case PF_INET6:
-#endif
-			break;
-		default:
-			ERR(EAI_FAMILY);
-		}
-		memcpy(pai, hints, sizeof(*pai));
-
-		/*
-		 * if both socktype/protocol are specified, check if they
-		 * are meaningful combination.
-		 */
-		if (pai->ai_socktype != ANY && pai->ai_protocol != ANY) {
-			for (ex = explore; ex->e_af >= 0; ex++) {
-				if (pai->ai_family != ex->e_af)
-					continue;
-				if (ex->e_socktype == ANY)
-					continue;
-				if (ex->e_protocol == ANY)
-					continue;
-				if (pai->ai_socktype == ex->e_socktype
-				 && pai->ai_protocol != ex->e_protocol) {
-					ERR(EAI_BADHINTS);
-				}
-			}
-		}
-	}
-
-	/*
-	 * check for special cases.  (1) numeric servname is disallowed if
-	 * socktype/protocol are left unspecified. (2) servname is disallowed
-	 * for raw and other inet{,6} sockets.
-	 */
-	if (MATCH_FAMILY(pai->ai_family, PF_INET, 1)
-#ifdef PF_INET6
-	 || MATCH_FAMILY(pai->ai_family, PF_INET6, 1)
-#endif
-	    ) {
-		ai0 = *pai;
-
-		if (pai->ai_family == PF_UNSPEC) {
-#ifdef PF_INET6
-			pai->ai_family = PF_INET6;
-#else
-			pai->ai_family = PF_INET;
-#endif
-		}
-		error = get_portmatch(pai, servname);
-		if (error)
-			ERR(error);
-
-		*pai = ai0;
-	}
-
-	ai0 = *pai;
-
-	/* NULL hostname, or numeric hostname */
-	for (ex = explore; ex->e_af >= 0; ex++) {
-		*pai = ai0;
-
-		if (!MATCH_FAMILY(pai->ai_family, ex->e_af, WILD_AF(ex)))
-			continue;
-		if (!MATCH(pai->ai_socktype, ex->e_socktype, WILD_SOCKTYPE(ex)))
-			continue;
-		if (!MATCH(pai->ai_protocol, ex->e_protocol, WILD_PROTOCOL(ex)))
-			continue;
-
-		if (pai->ai_family == PF_UNSPEC)
-			pai->ai_family = ex->e_af;
-		if (pai->ai_socktype == ANY && ex->e_socktype != ANY)
-			pai->ai_socktype = ex->e_socktype;
-		if (pai->ai_protocol == ANY && ex->e_protocol != ANY)
-			pai->ai_protocol = ex->e_protocol;
-
-		if (hostname == NULL)
-			error = explore_null(pai, hostname, servname, &cur->ai_next);
-		else
-			error = explore_numeric_scope(pai, hostname, servname, &cur->ai_next);
-
-		if (error)
-			goto free;
-
-		while (cur && cur->ai_next)
-			cur = cur->ai_next;
-	}
-
-	/*
-	 * XXX
-	 * If numreic representation of AF1 can be interpreted as FQDN
-	 * representation of AF2, we need to think again about the code below.
-	 */
-	if (sentinel.ai_next)
-		goto good;
-
-	if (pai->ai_flags & AI_NUMERICHOST)
-		ERR(EAI_NONAME);
-	if (hostname == NULL)
-		ERR(EAI_NONAME);
-
-	/*
-	 * hostname as alphabetical name.
-	 * we would like to prefer AF_INET6 than AF_INET, so we'll make a
-	 * outer loop by AFs.
-	 */
-	for (afd = afdl; afd->a_af; afd++) {
-		*pai = ai0;
-
-		if (!MATCH_FAMILY(pai->ai_family, afd->a_af, 1))
-			continue;
-
-		for (ex = explore; ex->e_af >= 0; ex++) {
-			*pai = ai0;
-
-			if (pai->ai_family == PF_UNSPEC)
-				pai->ai_family = afd->a_af;
-
-			if (!MATCH_FAMILY(pai->ai_family, ex->e_af, WILD_AF(ex)))
-				continue;
-			if (!MATCH(pai->ai_socktype, ex->e_socktype,
-					WILD_SOCKTYPE(ex))) {
-				continue;
-			}
-			if (!MATCH(pai->ai_protocol, ex->e_protocol,
-					WILD_PROTOCOL(ex))) {
-				continue;
-			}
-
-			if (pai->ai_family == PF_UNSPEC)
-				pai->ai_family = ex->e_af;
-			if (pai->ai_socktype == ANY && ex->e_socktype != ANY)
-				pai->ai_socktype = ex->e_socktype;
-			if (pai->ai_protocol == ANY && ex->e_protocol != ANY)
-				pai->ai_protocol = ex->e_protocol;
-
-			error = explore_fqdn(pai, hostname, servname,
-				&cur->ai_next);
-
-			while (cur && cur->ai_next)
-				cur = cur->ai_next;
-		}
-	}
-
-	/* XXX */
-	if (sentinel.ai_next)
-		error = 0;
-
-	if (error)
-		goto free;
-	if (error == 0) {
-		if (sentinel.ai_next) {
- good:
-			*res = sentinel.ai_next;
-			return SUCCESS;
-		} else
-			error = EAI_FAIL;
-	}
- free:
- bad:
-	if (sentinel.ai_next)
-		freeaddrinfo(sentinel.ai_next);
-	*res = NULL;
-	return error;
-}
-
-/*
- * FQDN hostname, DNS lookup
- */
-static int
-explore_fqdn(pai, hostname, servname, res)
-	const struct addrinfo *pai;
-	const char *hostname;
-	const char *servname;
-	struct addrinfo **res;
-{
-	struct hostent *hp;
-	int h_error;
-	int af;
-	char **aplist = NULL, *apbuf = NULL;
-	char *ap;
-	struct addrinfo sentinel, *cur;
-	int i;
-#ifndef USE_GETIPNODEBY
-	int naddrs;
-#endif
-	const struct afd *afd;
-	int error;
-
-	*res = NULL;
-	sentinel.ai_next = NULL;
-	cur = &sentinel;
-
-	/*
-	 * Do not filter unsupported AFs here.  We need to honor content of
-	 * databases (/etc/hosts, DNS and others).  Otherwise we cannot
-	 * replace gethostbyname() by getaddrinfo().
-	 */
-
-	/*
-	 * if the servname does not match socktype/protocol, ignore it.
-	 */
-	if (get_portmatch(pai, servname) != 0)
-		return 0;
-
-	afd = find_afd(pai->ai_family);
-
-	/*
-	 * post-RFC2553: should look at (pai->ai_flags & AI_ADDRCONFIG)
-	 * rather than hardcoding it.  we may need to add AI_ADDRCONFIG
-	 * handling code by ourselves in case we don't have getipnodebyname().
-	 */
-#ifdef USE_GETIPNODEBY
-	hp = getipnodebyname(hostname, pai->ai_family, AI_ADDRCONFIG, &h_error);
-#else
-#ifdef HAVE_GETHOSTBYNAME2
-	hp = gethostbyname2(hostname, pai->ai_family);
-#else
-	if (pai->ai_family != AF_INET)
-		return 0;
-	hp = gethostbyname(hostname);
-#ifdef HAVE_H_ERRNO
-	h_error = h_errno;
-#else
-	h_error = EINVAL;
-#endif
-#endif /*HAVE_GETHOSTBYNAME2*/
-#endif /*USE_GETIPNODEBY*/
-
-	if (hp == NULL) {
-		switch (h_error) {
-		case HOST_NOT_FOUND:
-		case NO_DATA:
-			error = EAI_NODATA;
-			break;
-		case TRY_AGAIN:
-			error = EAI_AGAIN;
-			break;
-		case NO_RECOVERY:
-		case NETDB_INTERNAL:
-		default:
-			error = EAI_FAIL;
-			break;
-		}
-	} else if ((hp->h_name == NULL) || (hp->h_name[0] == 0)
-			|| (hp->h_addr_list[0] == NULL)) {
-#ifdef USE_GETIPNODEBY
-		freehostent(hp);
-#endif
-		hp = NULL;
-		error = EAI_FAIL;
-	}
-
-	if (hp == NULL)
-		goto free;
-
-#ifdef USE_GETIPNODEBY
-	aplist = hp->h_addr_list;
-#else
-	/*
-	 * hp will be overwritten if we use gethostbyname2().
-	 * always deep copy for simplification.
-	 */
-	for (naddrs = 0; hp->h_addr_list[naddrs] != NULL; naddrs++)
-		;
-	naddrs++;
-	aplist = (char **)malloc(sizeof(aplist[0]) * naddrs);
-	apbuf = (char *)malloc(hp->h_length * naddrs);
-	if (aplist == NULL || apbuf == NULL) {
-		error = EAI_MEMORY;
-		goto free;
-	}
-	memset(aplist, 0, sizeof(aplist[0]) * naddrs);
-	for (i = 0; i < naddrs; i++) {
-		if (hp->h_addr_list[i] == NULL) {
-			aplist[i] = NULL;
-			continue;
-		}
-		memcpy(&apbuf[i * hp->h_length], hp->h_addr_list[i],
-			hp->h_length);
-		aplist[i] = &apbuf[i * hp->h_length];
-	}
-#endif
-
-	for (i = 0; aplist[i] != NULL; i++) {
-		af = hp->h_addrtype;
-		ap = aplist[i];
-#ifdef AF_INET6
-		if (af == AF_INET6
-		 && IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ap)) {
-			af = AF_INET;
-			ap = ap + sizeof(struct in6_addr)
-				- sizeof(struct in_addr);
-		}
-#endif
-
-		if (af != pai->ai_family)
-			continue;
-
-		if ((pai->ai_flags & AI_CANONNAME) == 0) {
-			GET_AI(cur->ai_next, afd, ap);
-			GET_PORT(cur->ai_next, servname);
-		} else {
-			/*
-			 * if AI_CANONNAME and if reverse lookup
-			 * fail, return ai anyway to pacify
-			 * calling application.
-			 *
-			 * XXX getaddrinfo() is a name->address
-			 * translation function, and it looks
-			 * strange that we do addr->name
-			 * translation here.
-			 */
-			get_name(ap, afd, &cur->ai_next,
-				ap, pai, servname);
-		}
-
-		while (cur && cur->ai_next)
-			cur = cur->ai_next;
-	}
-
-	*res = sentinel.ai_next;
-	return 0;
-
-free:
-#ifdef USE_GETIPNODEBY
-	if (hp)
-		freehostent(hp);
-#endif
-	if (aplist)
-		free(aplist);
-	if (apbuf)
-		free(apbuf);
-	if (sentinel.ai_next)
-		freeaddrinfo(sentinel.ai_next);
-	return error;
-}
-
-/*
- * hostname == NULL.
- * passive socket -> anyaddr (0.0.0.0 or ::)
- * non-passive socket -> localhost (127.0.0.1 or ::1)
- */
-static int
-explore_null(pai, hostname, servname, res)
-	const struct addrinfo *pai;
-	const char *hostname;
-	const char *servname;
-	struct addrinfo **res;
-{
-	int s;
-	const struct afd *afd;
-	struct addrinfo *cur;
-	struct addrinfo sentinel;
-	int error;
-
-	*res = NULL;
-	sentinel.ai_next = NULL;
-	cur = &sentinel;
-
-	/*
-	 * filter out AFs that are not supported by the kernel
-	 * XXX errno?
-	 */
-	s = socket(pai->ai_family, SOCK_DGRAM, 0);
-	if (s < 0) {
-		if (errno != EMFILE)
-			return 0;
-	} else
-		close(s);
-
-	/*
-	 * if the servname does not match socktype/protocol, ignore it.
-	 */
-	if (get_portmatch(pai, servname) != 0)
-		return 0;
-
-	afd = find_afd(pai->ai_family);
-
-	if (pai->ai_flags & AI_PASSIVE) {
-		GET_AI(cur->ai_next, afd, afd->a_addrany);
-		/* xxx meaningless?
-		 * GET_CANONNAME(cur->ai_next, "anyaddr");
-		 */
-		GET_PORT(cur->ai_next, servname);
-	} else {
-		GET_AI(cur->ai_next, afd, afd->a_loopback);
-		/* xxx meaningless?
-		 * GET_CANONNAME(cur->ai_next, "localhost");
-		 */
-		GET_PORT(cur->ai_next, servname);
-	}
-	cur = cur->ai_next;
-
-	*res = sentinel.ai_next;
-	return 0;
-
-free:
-	if (sentinel.ai_next)
-		freeaddrinfo(sentinel.ai_next);
-	return error;
-}
-
-/*
- * numeric hostname
- */
-static int
-explore_numeric(pai, hostname, servname, res)
-	const struct addrinfo *pai;
-	const char *hostname;
-	const char *servname;
-	struct addrinfo **res;
-{
-	const struct afd *afd;
-	struct addrinfo *cur;
-	struct addrinfo sentinel;
-	int error;
-	char pton[PTON_MAX];
-	int flags;
-
-	*res = NULL;
-	sentinel.ai_next = NULL;
-	cur = &sentinel;
-
-	/*
-	 * if the servname does not match socktype/protocol, ignore it.
-	 */
-	if (get_portmatch(pai, servname) != 0)
-		return 0;
-
-	afd = find_afd(pai->ai_family);
-	flags = pai->ai_flags;
-
-	if (inet_pton(afd->a_af, hostname, pton) == 1) {
-		u_int32_t v4a;
-#ifdef INET6
-		u_char pfx;
-#endif
-
-		switch (afd->a_af) {
-		case AF_INET:
-			v4a = (u_int32_t)ntohl(((struct in_addr *)pton)->s_addr);
-			if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
-				flags &= ~AI_CANONNAME;
-			v4a >>= IN_CLASSA_NSHIFT;
-			if (v4a == 0 || v4a == IN_LOOPBACKNET)
-				flags &= ~AI_CANONNAME;
-			break;
-#ifdef INET6
-		case AF_INET6:
-			pfx = ((struct in6_addr *)pton)->s6_addr[0];
-			if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
-				flags &= ~AI_CANONNAME;
-			break;
-#endif
-		}
-
-		if (pai->ai_family == afd->a_af ||
-		    pai->ai_family == PF_UNSPEC /*?*/) {
-			if ((flags & AI_CANONNAME) == 0) {
-				GET_AI(cur->ai_next, afd, pton);
-				GET_PORT(cur->ai_next, servname);
-			} else {
-				/*
-				 * if AI_CANONNAME and if reverse lookup
-				 * fail, return ai anyway to pacify
-				 * calling application.
-				 *
-				 * XXX getaddrinfo() is a name->address
-				 * translation function, and it looks
-				 * strange that we do addr->name
-				 * translation here.
-				 */
-				get_name(pton, afd, &cur->ai_next,
-					pton, pai, servname);
-			}
-			while (cur && cur->ai_next)
-				cur = cur->ai_next;
-		} else
-			ERR(EAI_FAMILY);	/*xxx*/
-	}
-
-	*res = sentinel.ai_next;
-	return 0;
-
-free:
-bad:
-	if (sentinel.ai_next)
-		freeaddrinfo(sentinel.ai_next);
-	return error;
-}
-
-/*
- * numeric hostname with scope
- */
-static int
-explore_numeric_scope(pai, hostname, servname, res)
-	const struct addrinfo *pai;
-	const char *hostname;
-	const char *servname;
-	struct addrinfo **res;
-{
-#ifndef SCOPE_DELIMITER
-	return explore_numeric(pai, hostname, servname, res);
-#else
-	const struct afd *afd;
-	struct addrinfo *cur;
-	int error;
-	char *cp, *hostname2 = NULL;
-	int scope;
-	struct sockaddr_in6 *sin6;
-
-	/*
-	 * if the servname does not match socktype/protocol, ignore it.
-	 */
-	if (get_portmatch(pai, servname) != 0)
-		return 0;
-
-	afd = find_afd(pai->ai_family);
-	if (!afd->a_scoped)
-		return explore_numeric(pai, hostname, servname, res);
-
-	cp = strchr(hostname, SCOPE_DELIMITER);
-	if (cp == NULL)
-		return explore_numeric(pai, hostname, servname, res);
-
-	/*
-	 * Handle special case of <scoped_address><delimiter><scope id>
-	 */
-	hostname2 = strdup(hostname);
-	if (hostname2 == NULL)
-		return EAI_MEMORY;
-	/* terminate at the delimiter */
-	hostname2[cp - hostname] = '\0';
-
-	cp++;
-	switch (pai->ai_family) {
-#ifdef INET6
-	case AF_INET6:
-		scope = if_nametoindex(cp);
-		if (scope == 0) {
-			free(hostname2);
-			return (EAI_NONAME);
-		}
-		break;
-#endif
-	}
-
-	error = explore_numeric(pai, hostname2, servname, res);
-	if (error == 0) {
-		for (cur = *res; cur; cur = cur->ai_next) {
-			if (cur->ai_family != AF_INET6)
-				continue;
-			sin6 = (struct sockaddr_in6 *)cur->ai_addr;
-			if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) ||
-			    IN6_IS_ADDR_MC_LINKLOCAL(&sin6->sin6_addr))
-				sin6->sin6_scope_id = scope;
-		}
-	}
-
-	free(hostname2);
-
-	return error;
-#endif
-}
-
-static int
-get_name(addr, afd, res, numaddr, pai, servname)
-	const char *addr;
-	const struct afd *afd;
-	struct addrinfo **res;
-	char *numaddr;
-	const struct addrinfo *pai;
-	const char *servname;
-{
-	struct hostent *hp = NULL;
-	struct addrinfo *cur = NULL;
-	int error = 0;
-	char *ap = NULL, *cn = NULL;
-#ifdef USE_GETIPNODEBY
-	int h_error;
-
-	hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
-#else
-	hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af);
-#endif
-	if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
-#ifdef USE_GETIPNODEBY
-		GET_AI(cur, afd, hp->h_addr_list[0]);
-		GET_PORT(cur, servname);
-		GET_CANONNAME(cur, hp->h_name);
-#else
-		/* hp will be damaged if we use gethostbyaddr() */
-		if ((ap = (char *)malloc(hp->h_length)) == NULL) {
-			error = EAI_MEMORY;
-			goto free;
-		}
-		memcpy(ap, hp->h_addr_list[0], hp->h_length);
-		if ((cn = strdup(hp->h_name)) == NULL) {
-			error = EAI_MEMORY;
-			goto free;
-		}
-
-		GET_AI(cur, afd, ap);
-		GET_PORT(cur, servname);
-		GET_CANONNAME(cur, cn);
-		free(ap); ap = NULL;
-		free(cn); cn = NULL;
-#endif
-	} else {
-		GET_AI(cur, afd, numaddr);
-		GET_PORT(cur, servname);
-	}
-
-#ifdef USE_GETIPNODEBY
-	if (hp)
-		freehostent(hp);
-#endif
-	*res = cur;
-	return SUCCESS;
- free:
-	if (cur)
-		freeaddrinfo(cur);
-	if (ap)
-		free(ap);
-	if (cn)
-		free(cn);
-#ifdef USE_GETIPNODEBY
-	if (hp)
-		freehostent(hp);
-#endif
-	*res = NULL;
-	return error;
-}
-
-static int
-get_canonname(pai, ai, str)
-	const struct addrinfo *pai;
-	struct addrinfo *ai;
-	const char *str;
-{
-	if ((pai->ai_flags & AI_CANONNAME) != 0) {
-		ai->ai_canonname = (char *)malloc(strlen(str) + 1);
-		if (ai->ai_canonname == NULL)
-			return EAI_MEMORY;
-		strcpy(ai->ai_canonname, str);
-	}
-	return 0;
-}
-
-static struct addrinfo *
-get_ai(pai, afd, addr)
-	const struct addrinfo *pai;
-	const struct afd *afd;
-	const char *addr;
-{
-	char *p;
-	struct addrinfo *ai;
-
-	ai = (struct addrinfo *)malloc(sizeof(struct addrinfo)
-		+ (afd->a_socklen));
-	if (ai == NULL)
-		return NULL;
-
-	memcpy(ai, pai, sizeof(struct addrinfo));
-	ai->ai_addr = (struct sockaddr *)(ai + 1);
-	memset(ai->ai_addr, 0, afd->a_socklen);
-#ifdef HAVE_SOCKADDR_SA_LEN
-	ai->ai_addr->sa_len = afd->a_socklen;
-#endif
-	ai->ai_addrlen = afd->a_socklen;
-	ai->ai_addr->sa_family = ai->ai_family = afd->a_af;
-	p = (char *)(ai->ai_addr);
-	memcpy(p + afd->a_off, addr, afd->a_addrlen);
-	return ai;
-}
-
-static int
-get_portmatch(ai, servname)
-	const struct addrinfo *ai;
-	const char *servname;
-{
-
-	/* get_port does not touch first argument. when matchonly == 1. */
-	return get_port((struct addrinfo *)ai, servname, 1);
-}
-
-static int
-get_port(ai, servname, matchonly)
-	struct addrinfo *ai;
-	const char *servname;
-	int matchonly;
-{
-	const char *proto;
-	struct servent *sp;
-	int port;
-	int allownumeric;
-
-	if (servname == NULL)
-		return 0;
-	switch (ai->ai_family) {
-	case AF_INET:
-#ifdef AF_INET6
-	case AF_INET6:
-#endif
-		break;
-	default:
-		return 0;
-	}
-
-	switch (ai->ai_socktype) {
-	case SOCK_RAW:
-		return EAI_SERVICE;
-	case SOCK_DGRAM:
-	case SOCK_STREAM:
-		allownumeric = 1;
-		break;
-	case ANY:
-		allownumeric = 0;
-		break;
-	default:
-		return EAI_SOCKTYPE;
-	}
-
-	if (str_isnumber(servname)) {
-		if (!allownumeric)
-			return EAI_SERVICE;
-		port = htons(atoi(servname));
-		if (port < 0 || port > 65535)
-			return EAI_SERVICE;
-	} else {
-		switch (ai->ai_socktype) {
-		case SOCK_DGRAM:
-			proto = "udp";
-			break;
-		case SOCK_STREAM:
-			proto = "tcp";
-			break;
-		default:
-			proto = NULL;
-			break;
-		}
-
-		if ((sp = getservbyname(servname, proto)) == NULL)
-			return EAI_SERVICE;
-		port = sp->s_port;
-	}
-
-	if (!matchonly) {
-		switch (ai->ai_family) {
-		case AF_INET:
-			((struct sockaddr_in *)ai->ai_addr)->sin_port = port;
-			break;
-#ifdef INET6
-		case AF_INET6:
-			((struct sockaddr_in6 *)ai->ai_addr)->sin6_port = port;
-			break;
-#endif
-		}
-	}
-
-	return 0;
-}
-
-static const struct afd *
-find_afd(af)
-	int af;
-{
-	const struct afd *afd;
-
-	if (af == PF_UNSPEC)
-		return NULL;
-	for (afd = afdl; afd->a_af; afd++) {
-		if (afd->a_af == af)
-			return afd;
-	}
-	return NULL;
-}
diff --git a/missing/getnameinfo.c b/missing/getnameinfo.c
index 6bd5b47..c287221 100644
--- a/missing/getnameinfo.c
+++ b/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/missing/inet_aton.c b/missing/inet_aton.c
index a4b2eeb..bc1461a 100644
--- a/missing/inet_aton.c
+++ b/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/missing/inet_ntop.c b/missing/inet_ntop.c
index 8bbbad6..d17d592 100644
--- a/missing/inet_ntop.c
+++ b/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/missing/inet_pton.c b/missing/inet_pton.c
index 1b8abd2..83f67e1 100644
--- a/missing/inet_pton.c
+++ b/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/missing/resolv_ext.h b/missing/resolv_ext.h
deleted file mode 100644
index 92c531d..0000000
--- a/missing/resolv_ext.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 1999 WIDE Project.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project 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 BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef MAXRESOLVSORT		/* XXX */
-#define	MAXRESOLVSORT		10	/* number of net to sort on */
-#endif
-
-#ifndef HAVE_RES_STATE_EXT
-struct __res_state_ext {
-	struct sockaddr_storage nsaddr_list[MAXNS];
-	struct {
-		int af;		/* address family for addr, mask */
-		union {
-			struct in_addr ina;
-#ifdef INET6
-			struct in6_addr in6a;
-#endif
-		} addr, mask;
-	} sort_list[MAXRESOLVSORT];
-};
-#endif
-
-extern struct __res_state_ext _res_ext;
diff --git a/missing/snprintf.c b/missing/snprintf.c
index 4f2bb32..7932997 100644
--- a/missing/snprintf.c
+++ b/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/missing/strdup.c b/missing/strdup.c
index 103c3b2..079a8ff 100644
--- a/missing/strdup.c
+++ b/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/missing/strlcat.c b/missing/strlcat.c
index fca2e8a..a3d3fac 100644
--- a/missing/strlcat.c
+++ b/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/missing/strlcpy.c b/missing/strlcpy.c
index 3f1809a..a92e4d1 100644
--- a/missing/strlcpy.c
+++ b/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/missing/strsep.c b/missing/strsep.c
index 19fb6b2..0362d1f 100644
--- a/missing/strsep.c
+++ b/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/mkdep b/mkdep
index 2a9c221..3062e64 100755
--- a/mkdep
+++ b/mkdep
@@ -18,6 +18,7 @@
 
 MAKE=Makefile			# default makefile name is "Makefile"
 CC=cc				# default C compiler is "cc"
+DEPENDENCY_CFLAG=-M		# default dependency-generation flag is -M
 
 while :
 	do case "$1" in
@@ -31,6 +32,11 @@
 			MAKE=$2
 			shift; shift ;;
 
+		# -m allows you to specify the dependency-generation flag
+		-m)
+			DEPENDENCY_CFLAG=$2
+			shift; shift ;;
+
 		# the -p flag produces "program: program.c" style dependencies
 		# so .o's don't get produced
 		-p)
@@ -42,7 +48,7 @@
 done
 
 if [ $# = 0 ] ; then
-	echo 'usage: mkdep [-p] [-c cc] [-f makefile] [flags] file ...'
+	echo 'usage: mkdep [-p] [-c cc] [-f makefile] [-m dependency-cflag] [flags] file ...'
 	exit 1
 fi
 
@@ -74,7 +80,7 @@
 # sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' -e 's/\.c/.o/' |
 
 # XXX this doesn't work with things like "-DDECLWAITSTATUS=union\ wait"
-$CC -M $* |
+$CC $DEPENDENCY_CFLAG $* |
 sed "
 	s; \./; ;g
 	$SED" |
diff --git a/mpls.h b/mpls.h
index 69fc9c9..ae1c97e 100644
--- a/mpls.h
+++ b/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/mptcp.h b/mptcp.h
new file mode 100644
index 0000000..4ff552e
--- /dev/null
+++ b/mptcp.h
@@ -0,0 +1,151 @@
+/**
+ * Copyright (c) 2012
+ *
+ * Gregory Detal <gregory.detal@uclouvain.be>
+ * Christoph Paasch <christoph.paasch@uclouvain.be>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the University nor of the Laboratory may be used
+ *    to endorse or promote products derived from this software without
+ *    specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#define MPTCP_SUB_CAPABLE       0x0
+#define MPTCP_SUB_JOIN          0x1
+#define MPTCP_SUB_DSS           0x2
+#define MPTCP_SUB_ADD_ADDR      0x3
+#define MPTCP_SUB_REMOVE_ADDR   0x4
+#define MPTCP_SUB_PRIO          0x5
+#define MPTCP_SUB_FAIL          0x6
+#define MPTCP_SUB_FCLOSE        0x7
+
+
+struct mptcp_option {
+        u_int8_t        kind;
+        u_int8_t        len;
+        u_int8_t        sub_etc;        /* subtype upper 4 bits, other stuff lower 4 bits */
+};
+
+#define MPTCP_OPT_SUBTYPE(sub_etc)      (((sub_etc) >> 4) & 0xF)
+
+struct mp_capable {
+        u_int8_t        kind;
+        u_int8_t        len;
+        u_int8_t        sub_ver;
+        u_int8_t        flags;
+        u_int8_t        sender_key[8];
+        u_int8_t        receiver_key[8];
+};
+
+#define MP_CAPABLE_OPT_VERSION(sub_ver) (((sub_ver) >> 0) & 0xF)
+#define MP_CAPABLE_C                    0x80
+#define MP_CAPABLE_S                    0x01
+
+struct mp_join {
+        u_int8_t        kind;
+        u_int8_t        len;
+        u_int8_t        sub_b;
+        u_int8_t        addr_id;
+        union {
+                struct {
+                        u_int8_t         token[4];
+                        u_int8_t         nonce[4];
+                } syn;
+                struct {
+                        u_int8_t         mac[8];
+                        u_int8_t         nonce[4];
+                } synack;
+                struct {
+                        u_int8_t        mac[20];
+                } ack;
+        } u;
+};
+
+#define MP_JOIN_B                       0x01
+
+struct mp_dss {
+        u_int8_t        kind;
+        u_int8_t        len;
+        u_int8_t        sub;
+        u_int8_t        flags;
+};
+
+#define MP_DSS_F                        0x10
+#define MP_DSS_m                        0x08
+#define MP_DSS_M                        0x04
+#define MP_DSS_a                        0x02
+#define MP_DSS_A                        0x01
+
+struct mp_add_addr {
+        u_int8_t        kind;
+        u_int8_t        len;
+        u_int8_t        sub_ipver;
+        u_int8_t        addr_id;
+        union {
+                struct {
+                        u_int8_t         addr[4];
+                        u_int8_t         port[2];
+                } v4;
+                struct {
+                        u_int8_t         addr[16];
+                        u_int8_t         port[2];
+                } v6;
+        } u;
+};
+
+#define MP_ADD_ADDR_IPVER(sub_ipver)    (((sub_ipver) >> 0) & 0xF)
+
+struct mp_remove_addr {
+        u_int8_t        kind;
+        u_int8_t        len;
+        u_int8_t        sub;
+        /* list of addr_id */
+        u_int8_t        addrs_id;
+};
+
+struct mp_fail {
+        u_int8_t        kind;
+        u_int8_t        len;
+        u_int8_t        sub;
+        u_int8_t        resv;
+        u_int8_t        data_seq[8];
+};
+
+struct mp_close {
+        u_int8_t        kind;
+        u_int8_t        len;
+        u_int8_t        sub;
+        u_int8_t        rsv;
+        u_int8_t        key[8];
+};
+
+struct mp_prio {
+        u_int8_t        kind;
+        u_int8_t        len;
+        u_int8_t        sub_b;
+        u_int8_t        addr_id;
+};
+
+#define MP_PRIO_B                       0x01
diff --git a/nameser.h b/nameser.h
index e6391f4..f441f3e 100644
--- a/nameser.h
+++ b/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/netbios.h b/netbios.h
index 34abeba..d3e2725 100644
--- a/netbios.h
+++ b/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/netdissect.h b/netdissect.h
index 3609455..5f31cfa 100644
--- a/netdissect.h
+++ b/netdissect.h
@@ -2,7 +2,7 @@
  * Copyright (c) 1988-1997
  *	The Regents of the University of California.  All rights reserved.
  *
- * Copyright (c) 1998-2004  Michael Richardson <mcr@tcpdump.org>
+ * Copyright (c) 1998-2012  Michael Richardson <mcr@tcpdump.org>
  *      The TCPDUMP project
  *
  * Redistribution and use in source and binary forms, with or without
@@ -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.27 2008-08-16 11:36:20 hannes Exp $ (LBL)
  */
 
 #ifndef netdissect_h
@@ -42,13 +42,19 @@
 
 #if !defined(HAVE_SNPRINTF)
 int snprintf (char *str, size_t sz, const char *format, ...)
-     __attribute__ ((format (printf, 3, 4)));
-#endif
+#ifdef __ATTRIBUTE___FORMAT_OK
+     __attribute__((format (printf, 3, 4)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+     ;
+#endif /* !defined(HAVE_SNPRINTF) */
 
 #if !defined(HAVE_VSNPRINTF)
 int vsnprintf (char *str, size_t sz, const char *format, va_list ap)
-     __attribute__((format (printf, 3, 0)));
-#endif
+#ifdef __ATTRIBUTE___FORMAT_OK
+     __attribute__((format (printf, 3, 0)))
+#endif /* __ATTRIBUTE___FORMAT_OK */
+     ;
+#endif /* !defined(HAVE_SNPRINTF) */
 
 #ifndef HAVE_STRLCAT
 extern size_t strlcat (char *, const char *, size_t);
@@ -77,14 +83,17 @@
 /* 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;
 
 struct netdissect_options {
   int ndo_aflag;		/* translate network and broadcast addresses */
+  int ndo_bflag;		/* print 4 byte ASes in ASDOT notation */
   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,14 +109,21 @@
   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_jflag;                /* packet time stamp source */
   int ndo_pflag;                /* don't go promiscuous */
 
-  int ndo_Cflag;                /* rotate dump files after this many bytes */ 
+  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_Hflag;		/* dissect 802.11s draft mesh standard */
   int ndo_suppress_default_print; /* don't use default_print() for unknown packet types */
   const char *ndo_dltname;
 
@@ -115,7 +131,7 @@
   struct sa_list *ndo_sa_list_head;  /* used by print-esp.c */
   struct sa_list *ndo_sa_default;
 
-  char *ndo_tcpmd5secret;     	/* TCP-MD5 secret key */
+  char *ndo_sigsecret;     	/* Signature verification secret key */
 
   struct esp_algorithm *ndo_espsecret_xform;   /* cache of decoded  */
   char                 *ndo_espsecret_key;
@@ -141,11 +157,26 @@
   void (*ndo_info)(netdissect_options *, int verbose);
 
   int  (*ndo_printf)(netdissect_options *,
-		     const char *fmt, ...);
+		     const char *fmt, ...)
+#ifdef __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS
+		     __attribute__ ((format (printf, 2, 3)))
+#endif
+		     ;
   void (*ndo_error)(netdissect_options *,
-		    const char *fmt, ...);
+		    const char *fmt, ...)
+#ifdef __ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS
+		     __attribute__ ((noreturn))
+#endif /* __ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS */
+#ifdef __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS
+		     __attribute__ ((format (printf, 2, 3)))
+#endif /* __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS */
+		     ;
   void (*ndo_warning)(netdissect_options *,
-		      const char *fmt, ...);
+		      const char *fmt, ...)
+#ifdef __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS
+		     __attribute__ ((format (printf, 2, 3)))
+#endif
+		     ;
 };
 
 #define PT_VAT		1	/* Visual Audio Tool */
@@ -155,6 +186,15 @@
 #define PT_RTCP		5	/* Real-Time Applications control protocol */
 #define PT_SNMP		6	/* Simple Network Management Protocol */
 #define PT_CNFP		7	/* Cisco NetFlow protocol */
+#define PT_TFTP		8	/* trivial file transfer protocol */
+#define PT_AODV		9	/* Ad-hoc On-demand Distance Vector Protocol */
+#define PT_CARP		10	/* Common Address Redundancy Protocol */
+#define PT_RADIUS	11	/* RADIUS authentication Protocol */
+#define PT_ZMTP1	12	/* ZeroMQ Message Transport Protocol 1.0 */
+#define PT_VXLAN	13	/* Virtual eXtensible Local Area Network */
+#define PT_PGM		14	/* [UDP-encapsulated] Pragmatic General Multicast */
+#define PT_PGM_ZMTP1	15	/* ZMTP/1.0 inside PGM (native or UDP-encapsulated) */
+#define PT_LMP		16	/* Link Management Protocol */
 
 #ifndef min
 #define min(a,b) ((a)>(b)?(b):(a))
@@ -163,22 +203,21 @@
 #define max(a,b) ((b)>(a)?(b):(a))
 #endif
 
-#ifndef INET6
 /*
- * The default snapshot length.  This value allows most printers to print
- * useful information while keeping the amount of unwanted data down.
- * In particular, it allows for an ethernet header, tcp/ip header, and
- * 14 bytes of data (assuming no ip options).
+ * Maximum snapshot length.  This should be enough to capture the full
+ * packet on most network interfaces.
+ *
+ * XXX - could it be larger?  If so, should it?  Some applications might
+ * use the snapshot length in a savefile header to control the size of
+ * the buffer they allocate, so a size of, say, 2^31-1 might not work
+ * well.
  */
-#define DEFAULT_SNAPLEN 68
-#else
-#define DEFAULT_SNAPLEN 96
-#endif
+#define MAXIMUM_SNAPLEN	65535
 
-#ifndef BIG_ENDIAN
-#define BIG_ENDIAN 4321
-#define LITTLE_ENDIAN 1234
-#endif
+/*
+ * The default snapshot length is the maximum.
+ */
+#define DEFAULT_SNAPLEN	MAXIMUM_SNAPLEN
 
 #define ESRC(ep) ((ep)->ether_shost)
 #define EDST(ep) ((ep)->ether_dhost)
@@ -213,7 +252,7 @@
 #define ND_PRINT(STUFF) (*ndo->ndo_printf)STUFF
 #define ND_DEFAULTPRINT(ap, length) (*ndo->ndo_default_print)(ndo, ap, length)
 
-#if 0	
+#if 0
 extern void ts_print(netdissect_options *ipdo,
 		     const struct timeval *);
 extern void relts_print(int);
@@ -230,9 +269,48 @@
 extern char *copy_argv(netdissect_options *, char **);
 #endif
 
+/*
+ * Locale-independent macros for testing character properties and
+ * stripping the 8th bit from characters.  Assumed to be handed
+ * a value between 0 and 255, i.e. don't hand them a char, as
+ * those might be in the range -128 to 127.
+ */
+#define ND_ISASCII(c)	(!((c) & 0x80))	/* value is an ASCII code point */
+#define ND_ISPRINT(c)	((c) >= 0x20 && (c) <= 0x7E)
+#define ND_ISGRAPH(c)	((c) > 0x20 && (c) <= 0x7E)
+#define ND_TOASCII(c)	((c) & 0x7F)
+
 extern void safeputchar(int);
 extern void safeputs(const char *, int);
 
+#ifdef LBL_ALIGN
+/*
+ * The processor doesn't natively handle unaligned loads,
+ * and the compiler might "helpfully" optimize memcpy()
+ * and memcmp(), when handed pointers that would normally
+ * be properly aligned, into sequences that assume proper
+ * alignment.
+ *
+ * Do copies and compares of possibly-unaligned data by
+ * calling routines that wrap memcpy() and memcmp(), to
+ * prevent that optimization.
+ */
+extern void unaligned_memcpy(void *, const void *, size_t);
+extern int unaligned_memcmp(const void *, const void *, size_t);
+#define UNALIGNED_MEMCPY(p, q, l)	unaligned_memcpy((p), (q), (l))
+#define UNALIGNED_MEMCMP(p, q, l)	unaligned_memcmp((p), (q), (l))
+#else
+/*
+ * The procesor natively handles unaligned loads, so just use memcpy()
+ * and memcmp(), to enable those optimizations.
+ */
+#define UNALIGNED_MEMCPY(p, q, l)	memcpy((p), (q), (l))
+#define UNALIGNED_MEMCMP(p, q, l)	memcmp((p), (q), (l))
+#endif
+
+#define PLURAL_SUFFIX(n) \
+	(((n) != 1) ? "s" : "")
+
 #if 0
 extern const char *isonsap_string(netdissect_options *, const u_char *);
 extern const char *protoid_string(netdissect_options *, const u_char *);
@@ -244,12 +322,22 @@
 
 #include <pcap.h>
 
+typedef u_int (*if_ndo_printer)(struct netdissect_options *ndo,
+				const struct pcap_pkthdr *, const u_char *);
+typedef u_int (*if_printer)(const struct pcap_pkthdr *, const u_char *);
 
-extern void eap_print(netdissect_options *,const u_char *, u_int);    
+extern if_ndo_printer lookup_ndo_printer(int);
+extern if_printer lookup_printer(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);
 extern void arp_print(netdissect_options *,const u_char *, u_int, u_int);
+extern void tipc_print(netdissect_options *, const u_char *, u_int, u_int);
+extern void msnlb_print(netdissect_options *, const u_char *);
+extern void icmp6_print(netdissect_options *ndo, const u_char *,
+                        u_int, const u_char *, int);
 extern void isakmp_print(netdissect_options *,const u_char *,
 			 u_int, const u_char *);
 extern void isakmp_rfc3948_print(netdissect_options *,const u_char *,
@@ -258,6 +346,23 @@
 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);
+
+extern void ether_print(netdissect_options *,
+                        const u_char *, u_int, u_int,
+                        void (*)(netdissect_options *, const u_char *),
+                        const u_char *);
+
+extern u_int ether_if_print(netdissect_options *,
+                            const struct pcap_pkthdr *,const u_char *);
+extern u_int netanalyzer_if_print(netdissect_options *,
+                                  const struct pcap_pkthdr *,const u_char *);
+extern u_int netanalyzer_transparent_if_print(netdissect_options *,
+                                              const struct pcap_pkthdr *,
+                                              const u_char *);
+
+extern int ethertype_print(netdissect_options *,u_short, const u_char *,
+			     u_int, u_int);
 
 /* stuff that has not yet been rototiled */
 #if 0
@@ -269,8 +374,6 @@
 				  u_int, u_int);
 extern void hex_print(netdissect_options *,const char *, u_int);
 extern void telnet_print(netdissect_options *,const u_char *, u_int);
-extern int ether_encap_print(netdissect_options *,u_short, const u_char *,
-			     u_int, u_int, u_short *);
 extern int llc_print(netdissect_options *,
 		     const u_char *, u_int, u_int, const u_char *,
 		     const u_char *, u_short *);
@@ -297,7 +400,6 @@
 		      const u_char *);
 
 extern void arcnet_if_print(u_char*,const struct pcap_pkthdr *,const u_char *);
-extern void ether_if_print(u_char *,const struct pcap_pkthdr *,const u_char *);
 extern void token_if_print(u_char *,const struct pcap_pkthdr *,const u_char *);
 extern void fddi_if_print(u_char *,const struct pcap_pkthdr *, const u_char *);
 
@@ -311,6 +413,7 @@
 		       register const u_char *, u_int);
 extern void igrp_print(netdissect_options *,const u_char *, u_int,
 		       const u_char *);
+extern int nextproto4_cksum(const struct ip *, const u_int8_t *, u_int, u_int);
 extern void ipN_print(netdissect_options *,const u_char *, u_int);
 extern void ipx_print(netdissect_options *,const u_char *, u_int);
 extern void isoclns_print(netdissect_options *,const u_char *,
@@ -337,7 +440,7 @@
 		       u_int, const u_char *);
 extern void pimv1_print(netdissect_options *,const u_char *, u_int);
 extern void mobile_print(netdissect_options *,const u_char *, u_int);
-extern void pim_print(netdissect_options *,const u_char *, u_int);
+extern void pim_print(netdissect_options *,const u_char *, u_int, u_int);
 extern void pppoe_if_print(u_char *,const struct pcap_pkthdr *, const u_char *);
 extern void pppoe_print(netdissect_options *,const u_char *, u_int);
 extern void ppp_print(netdissect_options *,
@@ -356,9 +459,10 @@
 			 const struct pcap_pkthdr *, const u_char *);
 
 extern void rip_print(netdissect_options *,const u_char *, u_int);
+extern void rpki_rtr_print(netdissect_options *,const u_char *, u_int);
 
 extern void sctp_print(netdissect_options *ndo,
-		       const u_char *bp, const u_char *bp2,       
+		       const u_char *bp, const u_char *bp2,
 		       u_int sctpPacketLength);
 
 extern void sl_if_print(u_char *,const struct pcap_pkthdr *, const u_char *);
@@ -402,16 +506,26 @@
 extern void lcp_print(netdissect_options *,const u_char *, u_int);
 extern void vrrp_print(netdissect_options *,const u_char *bp,
 		       u_int len, int ttl);
+extern void carp_print(netdissect_options *,const u_char *bp,
+		       u_int len, int ttl);
 extern void cdp_print(netdissect_options *,const u_char *,
 		      u_int, u_int, const u_char *, const u_char *);
 extern void stp_print(netdissect_options *,const u_char *p, u_int length);
 extern void radius_print(netdissect_options *,const u_char *, u_int);
 extern void lwres_print(netdissect_options *,const u_char *, u_int);
 extern void pptp_print(netdissect_options *,const u_char *, u_int);
+#endif
+
+extern u_int ipnet_if_print(netdissect_options *,const struct pcap_pkthdr *, const u_char *);
+extern u_int ppi_if_print(netdissect_options *,const struct pcap_pkthdr *, const u_char *);
+extern u_int nflog_if_print(netdissect_options *,const struct pcap_pkthdr *, const u_char *);
+extern u_int ieee802_15_4_if_print(netdissect_options *,const struct pcap_pkthdr *, const u_char *);
 
 #ifdef INET6
 extern void ip6_print(netdissect_options *,const u_char *, u_int);
+#if 0
 extern void ip6_opt_print(netdissect_options *,const u_char *, int);
+extern int nextproto6_cksum(const struct ip6_hdr *, const u_int8_t *, u_int, u_int);
 extern int hbhopt_print(netdissect_options *,const u_char *);
 extern int dstopt_print(netdissect_options *,const u_char *);
 extern int frag6_print(netdissect_options *,const u_char *,
@@ -426,11 +540,27 @@
 
 extern void zephyr_print(netdissect_options * ndo,
 			 const u_char *cp, int length);
+#endif /* 0 */
 
 #endif /*INET6*/
-extern u_short in_cksum(const u_short *,
-			register u_int, int);
 
+#if 0
+struct cksum_vec {
+	const u_int8_t	*ptr;
+	int		len;
+};
+extern u_int16_t in_cksum(const struct cksum_vec *, int);
+extern u_int16_t in_cksum_shouldbe(u_int16_t, u_int16_t);
 #endif
 
+extern void esp_print_decodesecret(netdissect_options *ndo);
+extern int esp_print_decrypt_buffer_by_ikev2(netdissect_options *ndo,
+					     int initiator,
+					     u_char spii[8], u_char spir[8],
+					     u_char *buf, u_char *end);
+
+
+extern void geonet_print(netdissect_options *ndo,const u_char *eth_hdr,const u_char *geo_pck, u_int len);
+extern void calm_fast_print(netdissect_options *ndo,const u_char *eth_hdr,const u_char *calm_pck, u_int len);
+
 #endif  /* netdissect_h */
diff --git a/nfs.h b/nfs.h
index 3d47c7d..a5b5025 100644
--- a/nfs.h
+++ b/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.9 2007-11-18 03:24:38 guy Exp $ (LBL) */
+/*	NetBSD: nfs.h,v 1.1 1996/05/23 22:49:53 fvdl Exp 	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -215,6 +215,7 @@
 #define NFSV3ACCESS_EXTEND		0x08
 #define NFSV3ACCESS_DELETE		0x10
 #define NFSV3ACCESS_EXECUTE		0x20
+#define NFSV3ACCESS_FULL		0x3f
 
 #define NFSV3WRITE_UNSTABLE		0
 #define NFSV3WRITE_DATASYNC		1
@@ -286,21 +287,6 @@
 };
 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/nfsfh.h b/nfsfh.h
index b8a82e4..1d96f13 100644
--- a/nfsfh.h
+++ b/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,
@@ -65,4 +65,4 @@
 #define	fsid_eq(a,b)	((a.fsid_code == b.fsid_code) &&\
 			 dev_eq(a.Fsid_dev, b.Fsid_dev))
 
-extern void Parse_fh(const unsigned char *, int, my_fsid *, ino_t *, const char **, const char **, int);
+extern void Parse_fh(const unsigned char *, int, my_fsid *, u_int32_t *, const char **, const char **, int);
diff --git a/nlpid.c b/nlpid.c
old mode 100755
new mode 100644
index 7dfd6a6..9579ba3
--- a/nlpid.c
+++ b/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
@@ -26,7 +26,7 @@
 #include "interface.h"
 #include "nlpid.h"
 
-struct tok nlpid_values[] = {
+const struct tok nlpid_values[] = {
     { NLPID_NULLNS, "NULL" },
     { NLPID_Q933, "Q.933" },
     { NLPID_LMI, "LMI" },
@@ -36,6 +36,7 @@
     { NLPID_ISIS, "IS-IS" },
     { NLPID_CONS, "CONS" },
     { NLPID_IDRP, "IDRP" },
+    { NLPID_SPB, "ISIS_SPB" },
     { NLPID_MFR, "FRF.15" },
     { NLPID_IP, "IPv4" },
     { NLPID_PPP, "PPP" },
diff --git a/nlpid.h b/nlpid.h
index fdca446..1546fc6 100644
--- a/nlpid.h
+++ b/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
@@ -14,18 +14,19 @@
  * Original code by Hannes Gredler (hannes@juniper.net)
  */
 
-extern struct tok nlpid_values[];
+extern const struct tok nlpid_values[];
 
-#define	NLPID_NULLNS	0x00
+#define	NLPID_NULLNS	  0x00
 #define NLPID_Q933      0x08 /* ANSI T1.617 Annex D or ITU-T Q.933 Annex A */
 #define NLPID_LMI       0x09 /* The original, aka Cisco, aka Gang of Four */
 #define NLPID_SNAP      0x80
-#define	NLPID_CLNP	0x81 /* iso9577 */
-#define	NLPID_ESIS	0x82 /* iso9577 */
-#define	NLPID_ISIS	0x83 /* iso9577 */
+#define	NLPID_CLNP	    0x81 /* iso9577 */
+#define	NLPID_ESIS	    0x82 /* iso9577 */
+#define	NLPID_ISIS	    0x83 /* iso9577 */
 #define NLPID_CONS      0x84
 #define NLPID_IDRP      0x85
 #define NLPID_MFR       0xb1 /* FRF.15 */
+#define NLPID_SPB       0xc1 /* IEEE 802.1aq/D4.5 */
 #define NLPID_IP        0xcc
 #define NLPID_PPP       0xcf
 #define NLPID_X25_ESIS  0x8a
diff --git a/ntp.h b/ntp.h
index df85669..0614f73 100644
--- a/ntp.h
+++ b/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/oakley.h b/oakley.h
index f40d607..ad32817 100644
--- a/oakley.h
+++ b/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/openflow.h b/openflow.h
new file mode 100644
index 0000000..07ba685
--- /dev/null
+++ b/openflow.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2013 The TCPDUMP project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* OpenFlow: protocol between controller and datapath. */
+
+#define OF_HEADER_LEN 8
+
+/*
+ * Routines to print packets for various versions of OpenFlow.
+ */
+extern const u_char *of10_header_body_print(const u_char *, const u_char *,
+	const uint8_t, const uint16_t, const uint32_t);
diff --git a/ospf.h b/ospf.h
index 91a904f..b86458b 100644
--- a/ospf.h
+++ b/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 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 @@
     } 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 @@
 
 	/* 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 @@
 #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(const u_int8_t *, u_int);
+extern int ospf_print_grace_lsa(const u_int8_t *, u_int);
diff --git a/ospf6.h b/ospf6.h
index b8298ea..e2eabee 100644
--- a/ospf6.h
+++ b/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 @@
     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 @@
 	    } 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 @@
 	/* 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 @@
 #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 @@
 	    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 @@
 	    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 @@
 	/* 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/oui.c b/oui.c
index 7cdcd40..1067aa1 100644
--- a/oui.c
+++ b/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.9 2008-01-09 09:40:47 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -28,7 +28,7 @@
 
 /* FIXME complete OUI list using a script */
 
-struct tok oui_values[] = {
+const struct tok oui_values[] = {
     { OUI_ENCAP_ETHER, "Ethernet" },
     { OUI_CISCO, "Cisco" },
     { OUI_NORTEL, "Nortel Networks SONMP" },
@@ -39,6 +39,10 @@
     { 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"},
+    { OUI_DCBX, "DCBX"},
     { 0, NULL }
 };
 
@@ -52,7 +56,7 @@
  *
  * List taken from Ethereal's epan/sminmpec.c.
  */
-struct tok smi_values[] = {
+const struct tok smi_values[] = {
     { SMI_IETF,                 "IETF (reserved)"},
     { SMI_ACC,                  "ACC"},
     { SMI_CISCO,                "Cisco"},
diff --git a/oui.h b/oui.h
index 4d79e19..d39cb6c 100644
--- a/oui.h
+++ b/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.8 2008-01-09 09:40:47 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,8 @@
  * Original code by Hannes Gredler (hannes@juniper.net)
  */
 
-extern struct tok oui_values[];
-extern struct tok smi_values[];
+extern const struct tok oui_values[];
+extern const struct tok smi_values[];
 
 #define OUI_ENCAP_ETHER 0x000000        /* encapsulated Ethernet */
 #define OUI_CISCO       0x00000c        /* Cisco protocols */
@@ -27,6 +27,10 @@
 #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 */
+#define OUI_DCBX        0x001B21        /* DCBX */
 
 /*
  * These are SMI Network Management Private Enterprise Codes for
diff --git a/parsenfsfh.c b/parsenfsfh.c
index ef1e0ba..86938e3 100644
--- a/parsenfsfh.c
+++ b/parsenfsfh.c
@@ -42,7 +42,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
@@ -114,7 +114,7 @@
 register const unsigned char *fh;
 int len _U_;
 my_fsid *fsidp;
-ino_t *inop;
+u_int32_t *inop;
 const char **osnamep;		/* if non-NULL, return OS name here */
 const char **fsnamep;		/* if non-NULL, return server fs name here (for VMS) */
 int ourself;		/* true if file handle was generated on this host */
@@ -264,8 +264,7 @@
 	    fsidp->Fsid_dev.Major = fhp[6];
 	    fsidp->fsid_code = 0;
 
-	    temp = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
-	    *inop = temp;
+	    *inop = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
 
 	    if (osnamep)
 		*osnamep = "Auspex";
@@ -276,8 +275,7 @@
 	    fsidp->Fsid_dev.Major = fhp[1];
 	    fsidp->fsid_code = 0;
 
-	    temp = make_uint32(fhp[15], fhp[14], fhp[13], fhp[12]);
-	    *inop = temp;
+	    *inop = make_uint32(fhp[15], fhp[14], fhp[13], fhp[12]);
 
 	    if (osnamep)
 		*osnamep = "BSD 4.4";
@@ -291,8 +289,7 @@
 	    fsidp->Fsid_dev.Minor = temp & 0xFFFFF;
 	    fsidp->Fsid_dev.Major = (temp>>20) & 0xFFF;
 
-	    temp = make_uint32(fhp[15], fhp[14], fhp[13], fhp[12]);
-	    *inop = temp;
+	    *inop = make_uint32(fhp[15], fhp[14], fhp[13], fhp[12]);
 	    if (osnamep)
 		*osnamep = "OSF";
 	    break;
@@ -302,8 +299,7 @@
 	    fsidp->Fsid_dev.Major = fhp[2];
 	    fsidp->fsid_code = 0;
 
-	    temp = make_uint32(fhp[8], fhp[9], fhp[10], fhp[11]);
-	    *inop = temp;
+	    *inop = make_uint32(fhp[8], fhp[9], fhp[10], fhp[11]);
 
 	    if (osnamep)
 		*osnamep = "IRIX4";
@@ -314,8 +310,7 @@
 	    fsidp->Fsid_dev.Major = make_uint16(fhp[0], fhp[1]);
 	    fsidp->fsid_code = make_uint32(fhp[4], fhp[5], fhp[6], fhp[7]);
 
-	    temp = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
-	    *inop = temp;
+	    *inop = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
 
 	    if (osnamep)
 		*osnamep = "IRIX5";
@@ -337,8 +332,7 @@
 	    fsidp->Fsid_dev.Major = fhp[2];
 	    fsidp->fsid_code = make_uint32(fhp[4], fhp[5], fhp[6], fhp[7]);
 
-	    temp = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
-	    *inop = temp;
+	    *inop = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
 
 	    if (osnamep)
 		*osnamep = "SUNOS4";
@@ -351,8 +345,7 @@
 	    fsidp->Fsid_dev.Minor = temp & 0x3FFFF;
 	    fsidp->fsid_code = make_uint32(fhp[4], fhp[5], fhp[6], fhp[7]);
 
-	    temp = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
-	    *inop = temp;
+	    *inop = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
 
 	    if (osnamep)
 		*osnamep = "SUNOS5";
@@ -403,8 +396,7 @@
 	    fsidp->Fsid_dev.Major = make_uint16(fhp[0], fhp[1]);
 	    fsidp->fsid_code = make_uint32(fhp[4], fhp[5], fhp[6], fhp[7]);
 
-	    temp = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
-	    *inop = temp;
+	    *inop = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
 
 	    if (osnamep)
 		*osnamep = "AIX32";
@@ -416,8 +408,7 @@
 	    fsidp->Fsid_dev.Minor = temp;
 	    fsidp->fsid_code = make_uint32(fhp[4], fhp[5], fhp[6], fhp[7]);
 
-	    temp = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
-	    *inop = temp;
+	    *inop = make_uint32(fhp[12], fhp[13], fhp[14], fhp[15]);
 
 	    if (osnamep)
 		*osnamep = "HPUX9";
@@ -466,7 +457,7 @@
 	int seen_null = 0;
 
 	for (i = 1; i < 14; i++) {
-	    if (isprint(fhp[i])) {
+	    if (ND_ISPRINT(fhp[i])) {
 		if (seen_null)
 		   return(0);
 		else
diff --git a/pcap-missing.h b/pcap-missing.h
index 1f2fcb4..5c0ece2 100644
--- a/pcap-missing.h
+++ b/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/pcap_dump_ftell.c b/pcap_dump_ftell.c
index 438cd29..6eb3a4a 100644
--- a/pcap_dump_ftell.c
+++ b/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/pmap_prot.h b/pmap_prot.h
index f93e841..67ad626 100644
--- a/pmap_prot.h
+++ b/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
diff --git a/ppi.h b/ppi.h
new file mode 100644
index 0000000..733eb95
--- /dev/null
+++ b/ppi.h
@@ -0,0 +1,9 @@
+typedef struct ppi_header {
+	uint8_t		ppi_ver;
+	uint8_t		ppi_flags;
+	uint16_t	ppi_len;
+	uint32_t	ppi_dlt;
+} ppi_header_t;
+
+#define	PPI_HDRLEN	8
+
diff --git a/ppp.h b/ppp.h
index 71621ca..ba7aea7 100644
--- a/ppp.h
+++ b/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
  *
@@ -67,5 +67,3 @@
 #define PPP_MPCP		0xc03d	/* Multi-Link */
 #define PPP_SPAP_OLD    0xc123
 #define PPP_EAP         0xc227
-
-extern struct tok ppptype2str[];
diff --git a/print-802_11.c b/print-802_11.c
index 21e316d..8a9a1a6 100644
--- a/print-802_11.c
+++ b/print-802_11.c
@@ -22,7 +22,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.49 2007-12-29 23:25:02 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -46,94 +46,593 @@
 #include "ieee802_11.h"
 #include "ieee802_11_radio.h"
 
+/* Radiotap state */
+/*  This is used to save state when parsing/processing parameters */
+struct radiotap_state
+{
+	u_int32_t	present;
+
+	u_int8_t	rate;
+};
+
 #define PRINT_SSID(p) \
-	switch (p.ssid_status) { \
-	case TRUNCATED: \
-		return 0; \
-	case PRESENT: \
+	if (p.ssid_present) { \
 		printf(" ("); \
 		fn_print(p.ssid.ssid, NULL); \
 		printf(")"); \
-		break; \
-	case NOT_PRESENT: \
-		break; \
 	}
 
 #define PRINT_RATE(_sep, _r, _suf) \
 	printf("%s%2.1f%s", _sep, (.5 * ((_r) & 0x7f)), _suf)
 #define PRINT_RATES(p) \
-	switch (p.rates_status) { \
-	case TRUNCATED: \
-		return 0; \
-	case PRESENT: \
-		do { \
-			int z; \
-			const char *sep = " ["; \
-			for (z = 0; z < p.rates.length ; z++) { \
-				PRINT_RATE(sep, p.rates.rate[z], \
-					(p.rates.rate[z] & 0x80 ? "*" : "")); \
-				sep = " "; \
-			} \
-			if (p.rates.length != 0) \
-				printf(" Mbit]"); \
-		} while (0); \
-		break; \
-	case NOT_PRESENT: \
-		break; \
+	if (p.rates_present) { \
+		int z; \
+		const char *sep = " ["; \
+		for (z = 0; z < p.rates.length ; z++) { \
+			PRINT_RATE(sep, p.rates.rate[z], \
+				(p.rates.rate[z] & 0x80 ? "*" : "")); \
+			sep = " "; \
+		} \
+		if (p.rates.length != 0) \
+			printf(" Mbit]"); \
 	}
 
 #define PRINT_DS_CHANNEL(p) \
-	switch (p.ds_status) { \
-	case TRUNCATED: \
-		return 0; \
-	case PRESENT: \
+	if (p.ds_present) \
 		printf(" CH: %u", p.ds.channel); \
-		break; \
-	case NOT_PRESENT: \
-		break; \
-	} \
 	printf("%s", \
 	    CAPABILITY_PRIVACY(p.capability_info) ? ", PRIVACY" : "" );
 
+#define MAX_MCS_INDEX	76
+
+/*
+ * Indices are:
+ *
+ *	the MCS index (0-76);
+ *
+ *	0 for 20 MHz, 1 for 40 MHz;
+ *
+ *	0 for a long guard interval, 1 for a short guard interval.
+ */
+static const float ieee80211_float_htrates[MAX_MCS_INDEX+1][2][2] = {
+	/* MCS  0  */
+	{	/* 20 Mhz */ {    6.5,		/* SGI */    7.2, },
+		/* 40 Mhz */ {   13.5,		/* SGI */   15.0, },
+	},
+
+	/* MCS  1  */
+	{	/* 20 Mhz */ {   13.0,		/* SGI */   14.4, },
+		/* 40 Mhz */ {   27.0,		/* SGI */   30.0, },
+	},
+
+	/* MCS  2  */
+	{	/* 20 Mhz */ {   19.5,		/* SGI */   21.7, },
+		/* 40 Mhz */ {   40.5,		/* SGI */   45.0, },
+	},
+
+	/* MCS  3  */
+	{	/* 20 Mhz */ {   26.0,		/* SGI */   28.9, },
+		/* 40 Mhz */ {   54.0,		/* SGI */   60.0, },
+	},
+
+	/* MCS  4  */
+	{	/* 20 Mhz */ {   39.0,		/* SGI */   43.3, },
+		/* 40 Mhz */ {   81.0,		/* SGI */   90.0, },
+	},
+
+	/* MCS  5  */
+	{	/* 20 Mhz */ {   52.0,		/* SGI */   57.8, },
+		/* 40 Mhz */ {  108.0,		/* SGI */  120.0, },
+	},
+
+	/* MCS  6  */
+	{	/* 20 Mhz */ {   58.5,		/* SGI */   65.0, },
+		/* 40 Mhz */ {  121.5,		/* SGI */  135.0, },
+	},
+
+	/* MCS  7  */
+	{	/* 20 Mhz */ {   65.0,		/* SGI */   72.2, },
+		/* 40 Mhz */ {   135.0,		/* SGI */  150.0, },
+	},
+
+	/* MCS  8  */
+	{	/* 20 Mhz */ {   13.0,		/* SGI */   14.4, },
+		/* 40 Mhz */ {   27.0,		/* SGI */   30.0, },
+	},
+
+	/* MCS  9  */
+	{	/* 20 Mhz */ {   26.0,		/* SGI */   28.9, },
+		/* 40 Mhz */ {   54.0,		/* SGI */   60.0, },
+	},
+
+	/* MCS 10  */
+	{	/* 20 Mhz */ {   39.0,		/* SGI */   43.3, },
+		/* 40 Mhz */ {   81.0,		/* SGI */   90.0, },
+	},
+
+	/* MCS 11  */
+	{	/* 20 Mhz */ {   52.0,		/* SGI */   57.8, },
+		/* 40 Mhz */ {  108.0,		/* SGI */  120.0, },
+	},
+
+	/* MCS 12  */
+	{	/* 20 Mhz */ {   78.0,		/* SGI */   86.7, },
+		/* 40 Mhz */ {  162.0,		/* SGI */  180.0, },
+	},
+
+	/* MCS 13  */
+	{	/* 20 Mhz */ {  104.0,		/* SGI */  115.6, },
+		/* 40 Mhz */ {  216.0,		/* SGI */  240.0, },
+	},
+
+	/* MCS 14  */
+	{	/* 20 Mhz */ {  117.0,		/* SGI */  130.0, },
+		/* 40 Mhz */ {  243.0,		/* SGI */  270.0, },
+	},
+
+	/* MCS 15  */
+	{	/* 20 Mhz */ {  130.0,		/* SGI */  144.4, },
+		/* 40 Mhz */ {  270.0,		/* SGI */  300.0, },
+	},
+
+	/* MCS 16  */
+	{	/* 20 Mhz */ {   19.5,		/* SGI */   21.7, },
+		/* 40 Mhz */ {   40.5,		/* SGI */   45.0, },
+	},
+
+	/* MCS 17  */
+	{	/* 20 Mhz */ {   39.0,		/* SGI */   43.3, },
+		/* 40 Mhz */ {   81.0,		/* SGI */   90.0, },
+	},
+
+	/* MCS 18  */
+	{	/* 20 Mhz */ {   58.5,		/* SGI */   65.0, },
+		/* 40 Mhz */ {  121.5,		/* SGI */  135.0, },
+	},
+
+	/* MCS 19  */
+	{	/* 20 Mhz */ {   78.0,		/* SGI */   86.7, },
+		/* 40 Mhz */ {  162.0,		/* SGI */  180.0, },
+	},
+
+	/* MCS 20  */
+	{	/* 20 Mhz */ {  117.0,		/* SGI */  130.0, },
+		/* 40 Mhz */ {  243.0,		/* SGI */  270.0, },
+	},
+
+	/* MCS 21  */
+	{	/* 20 Mhz */ {  156.0,		/* SGI */  173.3, },
+		/* 40 Mhz */ {  324.0,		/* SGI */  360.0, },
+	},
+
+	/* MCS 22  */
+	{	/* 20 Mhz */ {  175.5,		/* SGI */  195.0, },
+		/* 40 Mhz */ {  364.5,		/* SGI */  405.0, },
+	},
+
+	/* MCS 23  */
+	{	/* 20 Mhz */ {  195.0,		/* SGI */  216.7, },
+		/* 40 Mhz */ {  405.0,		/* SGI */  450.0, },
+	},
+
+	/* MCS 24  */
+	{	/* 20 Mhz */ {   26.0,		/* SGI */   28.9, },
+		/* 40 Mhz */ {   54.0,		/* SGI */   60.0, },
+	},
+
+	/* MCS 25  */
+	{	/* 20 Mhz */ {   52.0,		/* SGI */   57.8, },
+		/* 40 Mhz */ {  108.0,		/* SGI */  120.0, },
+	},
+
+	/* MCS 26  */
+	{	/* 20 Mhz */ {   78.0,		/* SGI */   86.7, },
+		/* 40 Mhz */ {  162.0,		/* SGI */  180.0, },
+	},
+
+	/* MCS 27  */
+	{	/* 20 Mhz */ {  104.0,		/* SGI */  115.6, },
+		/* 40 Mhz */ {  216.0,		/* SGI */  240.0, },
+	},
+
+	/* MCS 28  */
+	{	/* 20 Mhz */ {  156.0,		/* SGI */  173.3, },
+		/* 40 Mhz */ {  324.0,		/* SGI */  360.0, },
+	},
+
+	/* MCS 29  */
+	{	/* 20 Mhz */ {  208.0,		/* SGI */  231.1, },
+		/* 40 Mhz */ {  432.0,		/* SGI */  480.0, },
+	},
+
+	/* MCS 30  */
+	{	/* 20 Mhz */ {  234.0,		/* SGI */  260.0, },
+		/* 40 Mhz */ {  486.0,		/* SGI */  540.0, },
+	},
+
+	/* MCS 31  */
+	{	/* 20 Mhz */ {  260.0,		/* SGI */  288.9, },
+		/* 40 Mhz */ {  540.0,		/* SGI */  600.0, },
+	},
+
+	/* MCS 32  */
+	{	/* 20 Mhz */ {    0.0,		/* SGI */    0.0, }, /* not valid */
+		/* 40 Mhz */ {    6.0,		/* SGI */    6.7, },
+	},
+
+	/* MCS 33  */
+	{	/* 20 Mhz */ {   39.0,		/* SGI */   43.3, },
+		/* 40 Mhz */ {   81.0,		/* SGI */   90.0, },
+	},
+
+	/* MCS 34  */
+	{	/* 20 Mhz */ {   52.0,		/* SGI */   57.8, },
+		/* 40 Mhz */ {  108.0,		/* SGI */  120.0, },
+	},
+
+	/* MCS 35  */
+	{	/* 20 Mhz */ {   65.0,		/* SGI */   72.2, },
+		/* 40 Mhz */ {  135.0,		/* SGI */  150.0, },
+	},
+
+	/* MCS 36  */
+	{	/* 20 Mhz */ {   58.5,		/* SGI */   65.0, },
+		/* 40 Mhz */ {  121.5,		/* SGI */  135.0, },
+	},
+
+	/* MCS 37  */
+	{	/* 20 Mhz */ {   78.0,		/* SGI */   86.7, },
+		/* 40 Mhz */ {  162.0,		/* SGI */  180.0, },
+	},
+
+	/* MCS 38  */
+	{	/* 20 Mhz */ {   97.5,		/* SGI */  108.3, },
+		/* 40 Mhz */ {  202.5,		/* SGI */  225.0, },
+	},
+
+	/* MCS 39  */
+	{	/* 20 Mhz */ {   52.0,		/* SGI */   57.8, },
+		/* 40 Mhz */ {  108.0,		/* SGI */  120.0, },
+	},
+
+	/* MCS 40  */
+	{	/* 20 Mhz */ {   65.0,		/* SGI */   72.2, },
+		/* 40 Mhz */ {  135.0,		/* SGI */  150.0, },
+	},
+
+	/* MCS 41  */
+	{	/* 20 Mhz */ {   65.0,		/* SGI */   72.2, },
+		/* 40 Mhz */ {  135.0,		/* SGI */  150.0, },
+	},
+
+	/* MCS 42  */
+	{	/* 20 Mhz */ {   78.0,		/* SGI */   86.7, },
+		/* 40 Mhz */ {  162.0,		/* SGI */  180.0, },
+	},
+
+	/* MCS 43  */
+	{	/* 20 Mhz */ {   91.0,		/* SGI */  101.1, },
+		/* 40 Mhz */ {  189.0,		/* SGI */  210.0, },
+	},
+
+	/* MCS 44  */
+	{	/* 20 Mhz */ {   91.0,		/* SGI */  101.1, },
+		/* 40 Mhz */ {  189.0,		/* SGI */  210.0, },
+	},
+
+	/* MCS 45  */
+	{	/* 20 Mhz */ {  104.0,		/* SGI */  115.6, },
+		/* 40 Mhz */ {  216.0,		/* SGI */  240.0, },
+	},
+
+	/* MCS 46  */
+	{	/* 20 Mhz */ {   78.0,		/* SGI */   86.7, },
+		/* 40 Mhz */ {  162.0,		/* SGI */  180.0, },
+	},
+
+	/* MCS 47  */
+	{	/* 20 Mhz */ {   97.5,		/* SGI */  108.3, },
+		/* 40 Mhz */ {  202.5,		/* SGI */  225.0, },
+	},
+
+	/* MCS 48  */
+	{	/* 20 Mhz */ {   97.5,		/* SGI */  108.3, },
+		/* 40 Mhz */ {  202.5,		/* SGI */  225.0, },
+	},
+
+	/* MCS 49  */
+	{	/* 20 Mhz */ {  117.0,		/* SGI */  130.0, },
+		/* 40 Mhz */ {  243.0,		/* SGI */  270.0, },
+	},
+
+	/* MCS 50  */
+	{	/* 20 Mhz */ {  136.5,		/* SGI */  151.7, },
+		/* 40 Mhz */ {  283.5,		/* SGI */  315.0, },
+	},
+
+	/* MCS 51  */
+	{	/* 20 Mhz */ {  136.5,		/* SGI */  151.7, },
+		/* 40 Mhz */ {  283.5,		/* SGI */  315.0, },
+	},
+
+	/* MCS 52  */
+	{	/* 20 Mhz */ {  156.0,		/* SGI */  173.3, },
+		/* 40 Mhz */ {  324.0,		/* SGI */  360.0, },
+	},
+
+	/* MCS 53  */
+	{	/* 20 Mhz */ {   65.0,		/* SGI */   72.2, },
+		/* 40 Mhz */ {  135.0,		/* SGI */  150.0, },
+	},
+
+	/* MCS 54  */
+	{	/* 20 Mhz */ {   78.0,		/* SGI */   86.7, },
+		/* 40 Mhz */ {  162.0,		/* SGI */  180.0, },
+	},
+
+	/* MCS 55  */
+	{	/* 20 Mhz */ {   91.0,		/* SGI */  101.1, },
+		/* 40 Mhz */ {  189.0,		/* SGI */  210.0, },
+	},
+
+	/* MCS 56  */
+	{	/* 20 Mhz */ {   78.0,		/* SGI */   86.7, },
+		/* 40 Mhz */ {  162.0,		/* SGI */  180.0, },
+	},
+
+	/* MCS 57  */
+	{	/* 20 Mhz */ {   91.0,		/* SGI */  101.1, },
+		/* 40 Mhz */ {  189.0,		/* SGI */  210.0, },
+	},
+
+	/* MCS 58  */
+	{	/* 20 Mhz */ {  104.0,		/* SGI */  115.6, },
+		/* 40 Mhz */ {  216.0,		/* SGI */  240.0, },
+	},
+
+	/* MCS 59  */
+	{	/* 20 Mhz */ {  117.0,		/* SGI */  130.0, },
+		/* 40 Mhz */ {  243.0,		/* SGI */  270.0, },
+	},
+
+	/* MCS 60  */
+	{	/* 20 Mhz */ {  104.0,		/* SGI */  115.6, },
+		/* 40 Mhz */ {  216.0,		/* SGI */  240.0, },
+	},
+
+	/* MCS 61  */
+	{	/* 20 Mhz */ {  117.0,		/* SGI */  130.0, },
+		/* 40 Mhz */ {  243.0,		/* SGI */  270.0, },
+	},
+
+	/* MCS 62  */
+	{	/* 20 Mhz */ {  130.0,		/* SGI */  144.4, },
+		/* 40 Mhz */ {  270.0,		/* SGI */  300.0, },
+	},
+
+	/* MCS 63  */
+	{	/* 20 Mhz */ {  130.0,		/* SGI */  144.4, },
+		/* 40 Mhz */ {  270.0,		/* SGI */  300.0, },
+	},
+
+	/* MCS 64  */
+	{	/* 20 Mhz */ {  143.0,		/* SGI */  158.9, },
+		/* 40 Mhz */ {  297.0,		/* SGI */  330.0, },
+	},
+
+	/* MCS 65  */
+	{	/* 20 Mhz */ {   97.5,		/* SGI */  108.3, },
+		/* 40 Mhz */ {  202.5,		/* SGI */  225.0, },
+	},
+
+	/* MCS 66  */
+	{	/* 20 Mhz */ {  117.0,		/* SGI */  130.0, },
+		/* 40 Mhz */ {  243.0,		/* SGI */  270.0, },
+	},
+
+	/* MCS 67  */
+	{	/* 20 Mhz */ {  136.5,		/* SGI */  151.7, },
+		/* 40 Mhz */ {  283.5,		/* SGI */  315.0, },
+	},
+
+	/* MCS 68  */
+	{	/* 20 Mhz */ {  117.0,		/* SGI */  130.0, },
+		/* 40 Mhz */ {  243.0,		/* SGI */  270.0, },
+	},
+
+	/* MCS 69  */
+	{	/* 20 Mhz */ {  136.5,		/* SGI */  151.7, },
+		/* 40 Mhz */ {  283.5,		/* SGI */  315.0, },
+	},
+
+	/* MCS 70  */
+	{	/* 20 Mhz */ {  156.0,		/* SGI */  173.3, },
+		/* 40 Mhz */ {  324.0,		/* SGI */  360.0, },
+	},
+
+	/* MCS 71  */
+	{	/* 20 Mhz */ {  175.5,		/* SGI */  195.0, },
+		/* 40 Mhz */ {  364.5,		/* SGI */  405.0, },
+	},
+
+	/* MCS 72  */
+	{	/* 20 Mhz */ {  156.0,		/* SGI */  173.3, },
+		/* 40 Mhz */ {  324.0,		/* SGI */  360.0, },
+	},
+
+	/* MCS 73  */
+	{	/* 20 Mhz */ {  175.5,		/* SGI */  195.0, },
+		/* 40 Mhz */ {  364.5,		/* SGI */  405.0, },
+	},
+
+	/* MCS 74  */
+	{	/* 20 Mhz */ {  195.0,		/* SGI */  216.7, },
+		/* 40 Mhz */ {  405.0,		/* SGI */  450.0, },
+	},
+
+	/* MCS 75  */
+	{	/* 20 Mhz */ {  195.0,		/* SGI */  216.7, },
+		/* 40 Mhz */ {  405.0,		/* SGI */  450.0, },
+	},
+
+	/* MCS 76  */
+	{	/* 20 Mhz */ {  214.5,		/* SGI */  238.3, },
+		/* 40 Mhz */ {  445.5,		/* SGI */  495.0, },
+	},
+};
+
 static const char *auth_alg_text[]={"Open System","Shared Key","EAP"};
 #define NUM_AUTH_ALGS	(sizeof auth_alg_text / sizeof auth_alg_text[0])
 
 static const char *status_text[] = {
-	"Succesful",  /*  0  */
-	"Unspecified failure",  /*  1  */
-	"Reserved",	  /*  2  */
-	"Reserved",	  /*  3  */
-	"Reserved",	  /*  4  */
-	"Reserved",	  /*  5  */
-	"Reserved",	  /*  6  */
-	"Reserved",	  /*  7  */
-	"Reserved",	  /*  8  */
-	"Reserved",	  /*  9  */
-	"Cannot Support all requested capabilities in the Capability Information field",	  /*  10  */
-	"Reassociation denied due to inability to confirm that association exists",	  /*  11  */
-	"Association denied due to reason outside the scope of the standard",	  /*  12  */
-	"Responding station does not support the specified authentication algorithm ",	  /*  13  */
-	"Received an Authentication frame with authentication transaction " \
-		"sequence number out of expected sequence",	  /*  14  */
-	"Authentication rejected because of challenge failure",	  /*  15 */
-	"Authentication rejected due to timeout waiting for next frame in sequence",	  /*  16 */
-	"Association denied because AP is unable to handle additional associated stations",	  /*  17 */
-	"Association denied due to requesting station not supporting all of the " \
-		"data rates in BSSBasicRateSet parameter",	  /*  18 */
+	"Successful",						/*  0 */
+	"Unspecified failure",					/*  1 */
+	"Reserved",						/*  2 */
+	"Reserved",						/*  3 */
+	"Reserved",						/*  4 */
+	"Reserved",						/*  5 */
+	"Reserved",						/*  6 */
+	"Reserved",						/*  7 */
+	"Reserved",						/*  8 */
+	"Reserved",						/*  9 */
+	"Cannot Support all requested capabilities in the Capability "
+	  "Information field",	  				/* 10 */
+	"Reassociation denied due to inability to confirm that association "
+	  "exists",						/* 11 */
+	"Association denied due to reason outside the scope of the "
+	  "standard",						/* 12 */
+	"Responding station does not support the specified authentication "
+	  "algorithm ",						/* 13 */
+	"Received an Authentication frame with authentication transaction "
+	  "sequence number out of expected sequence",		/* 14 */
+	"Authentication rejected because of challenge failure",	/* 15 */
+	"Authentication rejected due to timeout waiting for next frame in "
+	  "sequence",	  					/* 16 */
+	"Association denied because AP is unable to handle additional"
+	  "associated stations",	  			/* 17 */
+	"Association denied due to requesting station not supporting all of "
+	  "the data rates in BSSBasicRateSet parameter",	/* 18 */
+	"Association denied due to requesting station not supporting "
+	  "short preamble operation",				/* 19 */
+	"Association denied due to requesting station not supporting "
+	  "PBCC encoding",					/* 20 */
+	"Association denied due to requesting station not supporting "
+	  "channel agility",					/* 21 */
+	"Association request rejected because Spectrum Management "
+	  "capability is required",				/* 22 */
+	"Association request rejected because the information in the "
+	  "Power Capability element is unacceptable",		/* 23 */
+	"Association request rejected because the information in the "
+	  "Supported Channels element is unacceptable",		/* 24 */
+	"Association denied due to requesting station not supporting "
+	  "short slot operation",				/* 25 */
+	"Association denied due to requesting station not supporting "
+	  "DSSS-OFDM operation",				/* 26 */
+	"Association denied because the requested STA does not support HT "
+	  "features",						/* 27 */
+	"Reserved",						/* 28 */
+	"Association denied because the requested STA does not support "
+	  "the PCO transition time required by the AP",		/* 29 */
+	"Reserved",						/* 30 */
+	"Reserved",						/* 31 */
+	"Unspecified, QoS-related failure",			/* 32 */
+	"Association denied due to QAP having insufficient bandwidth "
+	  "to handle another QSTA",				/* 33 */
+	"Association denied due to excessive frame loss rates and/or "
+	  "poor conditions on current operating channel",	/* 34 */
+	"Association (with QBSS) denied due to requesting station not "
+	  "supporting the QoS facility",			/* 35 */
+	"Association denied due to requesting station not supporting "
+	  "Block Ack",						/* 36 */
+	"The request has been declined",			/* 37 */
+	"The request has not been successful as one or more parameters "
+	  "have invalid values",				/* 38 */
+	"The TS has not been created because the request cannot be honored. "
+	  "However, a suggested TSPEC is provided so that the initiating QSTA"
+	  "may attempt to set another TS with the suggested changes to the "
+	  "TSPEC",						/* 39 */
+	"Invalid Information Element",				/* 40 */
+	"Group Cipher is not valid",				/* 41 */
+	"Pairwise Cipher is not valid",				/* 42 */
+	"AKMP is not valid",					/* 43 */
+	"Unsupported RSN IE version",				/* 44 */
+	"Invalid RSN IE Capabilities",				/* 45 */
+	"Cipher suite is rejected per security policy",		/* 46 */
+	"The TS has not been created. However, the HC may be capable of "
+	  "creating a TS, in response to a request, after the time indicated "
+	  "in the TS Delay element",				/* 47 */
+	"Direct Link is not allowed in the BSS by policy",	/* 48 */
+	"Destination STA is not present within this QBSS.",	/* 49 */
+	"The Destination STA is not a QSTA.",			/* 50 */
+
 };
 #define NUM_STATUSES	(sizeof status_text / sizeof status_text[0])
 
 static const char *reason_text[] = {
-	"Reserved", /* 0 */
-	"Unspecified reason", /* 1 */
-	"Previous authentication no longer valid",  /* 2 */
-	"Deauthenticated because sending station is leaving (or has left) IBSS or ESS", /* 3 */
-	"Disassociated due to inactivity", /* 4 */
-	"Disassociated because AP is unable to handle all currently associated stations", /* 5 */
+	"Reserved",						/* 0 */
+	"Unspecified reason",					/* 1 */
+	"Previous authentication no longer valid",  		/* 2 */
+	"Deauthenticated because sending station is leaving (or has left) "
+	  "IBSS or ESS",					/* 3 */
+	"Disassociated due to inactivity",			/* 4 */
+	"Disassociated because AP is unable to handle all currently "
+	  " associated stations",				/* 5 */
 	"Class 2 frame received from nonauthenticated station", /* 6 */
-	"Class 3 frame received from nonassociated station", /* 7 */
-	"Disassociated because sending station is leaving (or has left) BSS", /* 8 */
-	"Station requesting (re)association is not authenticated with responding station", /* 9 */
+	"Class 3 frame received from nonassociated station",	/* 7 */
+	"Disassociated because sending station is leaving "
+	  "(or has left) BSS",					/* 8 */
+	"Station requesting (re)association is not authenticated with "
+	  "responding station",					/* 9 */
+	"Disassociated because the information in the Power Capability "
+	  "element is unacceptable",				/* 10 */
+	"Disassociated because the information in the SupportedChannels "
+	  "element is unacceptable",				/* 11 */
+	"Invalid Information Element",				/* 12 */
+	"Reserved",						/* 13 */
+	"Michael MIC failure",					/* 14 */
+	"4-Way Handshake timeout",				/* 15 */
+	"Group key update timeout",				/* 16 */
+	"Information element in 4-Way Handshake different from (Re)Association"
+	  "Request/Probe Response/Beacon",			/* 17 */
+	"Group Cipher is not valid",				/* 18 */
+	"AKMP is not valid",					/* 20 */
+	"Unsupported RSN IE version",				/* 21 */
+	"Invalid RSN IE Capabilities",				/* 22 */
+	"IEEE 802.1X Authentication failed",			/* 23 */
+	"Cipher suite is rejected per security policy",		/* 24 */
+	"Reserved",						/* 25 */
+	"Reserved",						/* 26 */
+	"Reserved",						/* 27 */
+	"Reserved",						/* 28 */
+	"Reserved",						/* 29 */
+	"Reserved",						/* 30 */
+	"TS deleted because QoS AP lacks sufficient bandwidth for this "
+	  "QoS STA due to a change in BSS service characteristics or "
+	  "operational mode (e.g. an HT BSS change from 40 MHz channel "
+	  "to 20 MHz channel)",					/* 31 */
+	"Disassociated for unspecified, QoS-related reason",	/* 32 */
+	"Disassociated because QoS AP lacks sufficient bandwidth for this "
+	  "QoS STA",						/* 33 */
+	"Disassociated because of excessive number of frames that need to be "
+          "acknowledged, but are not acknowledged for AP transmissions "
+	  "and/or poor channel conditions",			/* 34 */
+	"Disassociated because STA is transmitting outside the limits "
+	  "of its TXOPs",					/* 35 */
+	"Requested from peer STA as the STA is leaving the BSS "
+	  "(or resetting)",					/* 36 */
+	"Requested from peer STA as it does not want to use the "
+	  "mechanism",						/* 37 */
+	"Requested from peer STA as the STA received frames using the "
+	  "mechanism for which a set up is required",		/* 38 */
+	"Requested from peer STA due to time out",		/* 39 */
+	"Reserved",						/* 40 */
+	"Reserved",						/* 41 */
+	"Reserved",						/* 42 */
+	"Reserved",						/* 43 */
+	"Reserved",						/* 44 */
+	"Peer STA does not support the requested cipher suite",	/* 45 */
+	"Association denied due to requesting STA not supporting HT "
+	  "features",						/* 46 */
 };
 #define NUM_REASONS	(sizeof reason_text / sizeof reason_text[0])
 
@@ -152,141 +651,242 @@
 	return 1;
 }
 
-static void
-parse_elements(struct mgmt_body_t *pbody, const u_char *p, int offset)
+static int
+parse_elements(struct mgmt_body_t *pbody, const u_char *p, int offset,
+    u_int length)
 {
+	u_int elementlen;
+	struct ssid_t ssid;
+	struct challenge_t challenge;
+	struct rates_t rates;
+	struct ds_t ds;
+	struct cf_t cf;
+	struct tim_t tim;
+
 	/*
 	 * We haven't seen any elements yet.
 	 */
-	pbody->challenge_status = NOT_PRESENT;
-	pbody->ssid_status = NOT_PRESENT;
-	pbody->rates_status = NOT_PRESENT;
-	pbody->ds_status = NOT_PRESENT;
-	pbody->cf_status = NOT_PRESENT;
-	pbody->tim_status = NOT_PRESENT;
+	pbody->challenge_present = 0;
+	pbody->ssid_present = 0;
+	pbody->rates_present = 0;
+	pbody->ds_present = 0;
+	pbody->cf_present = 0;
+	pbody->tim_present = 0;
 
-	for (;;) {
+	while (length != 0) {
 		if (!TTEST2(*(p + offset), 1))
-			return;
+			return 0;
+		if (length < 1)
+			return 0;
 		switch (*(p + offset)) {
 		case E_SSID:
-			/* Present, possibly truncated */
-			pbody->ssid_status = TRUNCATED;
 			if (!TTEST2(*(p + offset), 2))
-				return;
-			memcpy(&pbody->ssid, p + offset, 2);
+				return 0;
+			if (length < 2)
+				return 0;
+			memcpy(&ssid, p + offset, 2);
 			offset += 2;
-			if (pbody->ssid.length != 0) {
-				if (pbody->ssid.length >
-				    sizeof(pbody->ssid.ssid) - 1)
-					return;
-				if (!TTEST2(*(p + offset), pbody->ssid.length))
-					return;
-				memcpy(&pbody->ssid.ssid, p + offset,
-				    pbody->ssid.length);
-				offset += pbody->ssid.length;
+			length -= 2;
+			if (ssid.length != 0) {
+				if (ssid.length > sizeof(ssid.ssid) - 1)
+					return 0;
+				if (!TTEST2(*(p + offset), ssid.length))
+					return 0;
+				if (length < ssid.length)
+					return 0;
+				memcpy(&ssid.ssid, p + offset, ssid.length);
+				offset += ssid.length;
+				length -= ssid.length;
 			}
-			pbody->ssid.ssid[pbody->ssid.length] = '\0';
-			/* Present and not truncated */
-			pbody->ssid_status = PRESENT;
+			ssid.ssid[ssid.length] = '\0';
+			/*
+			 * Present and not truncated.
+			 *
+			 * If we haven't already seen an SSID IE,
+			 * copy this one, otherwise ignore this one,
+			 * so we later report the first one we saw.
+			 */
+			if (!pbody->ssid_present) {
+				pbody->ssid = ssid;
+				pbody->ssid_present = 1;
+			}
 			break;
 		case E_CHALLENGE:
-			/* Present, possibly truncated */
-			pbody->challenge_status = TRUNCATED;
 			if (!TTEST2(*(p + offset), 2))
-				return;
-			memcpy(&pbody->challenge, p + offset, 2);
+				return 0;
+			if (length < 2)
+				return 0;
+			memcpy(&challenge, p + offset, 2);
 			offset += 2;
-			if (pbody->challenge.length != 0) {
-				if (pbody->challenge.length >
-				    sizeof(pbody->challenge.text) - 1)
-					return;
-				if (!TTEST2(*(p + offset), pbody->challenge.length))
-					return;
-				memcpy(&pbody->challenge.text, p + offset,
-				    pbody->challenge.length);
-				offset += pbody->challenge.length;
+			length -= 2;
+			if (challenge.length != 0) {
+				if (challenge.length >
+				    sizeof(challenge.text) - 1)
+					return 0;
+				if (!TTEST2(*(p + offset), challenge.length))
+					return 0;
+				if (length < challenge.length)
+					return 0;
+				memcpy(&challenge.text, p + offset,
+				    challenge.length);
+				offset += challenge.length;
+				length -= challenge.length;
 			}
-			pbody->challenge.text[pbody->challenge.length] = '\0';
-			/* Present and not truncated */
-			pbody->challenge_status = PRESENT;
+			challenge.text[challenge.length] = '\0';
+			/*
+			 * Present and not truncated.
+			 *
+			 * If we haven't already seen a challenge IE,
+			 * copy this one, otherwise ignore this one,
+			 * so we later report the first one we saw.
+			 */
+			if (!pbody->challenge_present) {
+				pbody->challenge = challenge;
+				pbody->challenge_present = 1;
+			}
 			break;
 		case E_RATES:
-			/* Present, possibly truncated */
-			pbody->rates_status = TRUNCATED;
 			if (!TTEST2(*(p + offset), 2))
-				return;
-			memcpy(&(pbody->rates), p + offset, 2);
+				return 0;
+			if (length < 2)
+				return 0;
+			memcpy(&rates, p + offset, 2);
 			offset += 2;
-			if (pbody->rates.length != 0) {
-				if (pbody->rates.length > sizeof pbody->rates.rate)
-					return;
-				if (!TTEST2(*(p + offset), pbody->rates.length))
-					return;
-				memcpy(&pbody->rates.rate, p + offset,
-				    pbody->rates.length);
-				offset += pbody->rates.length;
+			length -= 2;
+			if (rates.length != 0) {
+				if (rates.length > sizeof rates.rate)
+					return 0;
+				if (!TTEST2(*(p + offset), rates.length))
+					return 0;
+				if (length < rates.length)
+					return 0;
+				memcpy(&rates.rate, p + offset, rates.length);
+				offset += rates.length;
+				length -= rates.length;
 			}
-			/* Present and not truncated */
-			pbody->rates_status = PRESENT;
+			/*
+			 * Present and not truncated.
+			 *
+			 * If we haven't already seen a rates IE,
+			 * copy this one if it's not zero-length,
+			 * otherwise ignore this one, so we later
+			 * report the first one we saw.
+			 *
+			 * We ignore zero-length rates IEs as some
+			 * devices seem to put a zero-length rates
+			 * IE, followed by an SSID IE, followed by
+			 * a non-zero-length rates IE into frames,
+			 * even though IEEE Std 802.11-2007 doesn't
+			 * seem to indicate that a zero-length rates
+			 * IE is valid.
+			 */
+			if (!pbody->rates_present && rates.length != 0) {
+				pbody->rates = rates;
+				pbody->rates_present = 1;
+			}
 			break;
 		case E_DS:
-			/* Present, possibly truncated */
-			pbody->ds_status = TRUNCATED;
 			if (!TTEST2(*(p + offset), 3))
-				return;
-			memcpy(&pbody->ds, p + offset, 3);
+				return 0;
+			if (length < 3)
+				return 0;
+			memcpy(&ds, p + offset, 3);
 			offset += 3;
-			/* Present and not truncated */
-			pbody->ds_status = PRESENT;
+			length -= 3;
+			/*
+			 * Present and not truncated.
+			 *
+			 * If we haven't already seen a DS IE,
+			 * copy this one, otherwise ignore this one,
+			 * so we later report the first one we saw.
+			 */
+			if (!pbody->ds_present) {
+				pbody->ds = ds;
+				pbody->ds_present = 1;
+			}
 			break;
 		case E_CF:
-			/* Present, possibly truncated */
-			pbody->cf_status = TRUNCATED;
 			if (!TTEST2(*(p + offset), 8))
-				return;
-			memcpy(&pbody->cf, p + offset, 8);
+				return 0;
+			if (length < 8)
+				return 0;
+			memcpy(&cf, p + offset, 8);
 			offset += 8;
-			/* Present and not truncated */
-			pbody->cf_status = PRESENT;
+			length -= 8;
+			/*
+			 * Present and not truncated.
+			 *
+			 * If we haven't already seen a CF IE,
+			 * copy this one, otherwise ignore this one,
+			 * so we later report the first one we saw.
+			 */
+			if (!pbody->cf_present) {
+				pbody->cf = cf;
+				pbody->cf_present = 1;
+			}
 			break;
 		case E_TIM:
-			/* Present, possibly truncated */
-			pbody->tim_status = TRUNCATED;
 			if (!TTEST2(*(p + offset), 2))
-				return;
-			memcpy(&pbody->tim, p + offset, 2);
+				return 0;
+			if (length < 2)
+				return 0;
+			memcpy(&tim, p + offset, 2);
 			offset += 2;
+			length -= 2;
 			if (!TTEST2(*(p + offset), 3))
-				return;
-			memcpy(&pbody->tim.count, p + offset, 3);
+				return 0;
+			if (length < 3)
+				return 0;
+			memcpy(&tim.count, p + offset, 3);
 			offset += 3;
+			length -= 3;
 
-			if (pbody->tim.length <= 3)
+			if (tim.length <= 3)
 				break;
-			if (pbody->tim.length - 3 > sizeof pbody->tim.bitmap)
-				return;
-			if (!TTEST2(*(p + offset), pbody->tim.length - 3))
-				return;
-			memcpy(pbody->tim.bitmap, p + (pbody->tim.length - 3),
-			    (pbody->tim.length - 3));
-			offset += pbody->tim.length - 3;
-			/* Present and not truncated */
-			pbody->tim_status = PRESENT;
+			if (tim.length - 3 > (int)sizeof tim.bitmap)
+				return 0;
+			if (!TTEST2(*(p + offset), tim.length - 3))
+				return 0;
+			if (length < (u_int)(tim.length - 3))
+				return 0;
+			memcpy(tim.bitmap, p + (tim.length - 3),
+			    (tim.length - 3));
+			offset += tim.length - 3;
+			length -= tim.length - 3;
+			/*
+			 * Present and not truncated.
+			 *
+			 * If we haven't already seen a TIM IE,
+			 * copy this one, otherwise ignore this one,
+			 * so we later report the first one we saw.
+			 */
+			if (!pbody->tim_present) {
+				pbody->tim = tim;
+				pbody->tim_present = 1;
+			}
 			break;
 		default:
 #if 0
 			printf("(1) unhandled element_id (%d)  ",
-			    *(p + offset) );
+			    *(p + offset));
 #endif
 			if (!TTEST2(*(p + offset), 2))
-				return;
-			if (!TTEST2(*(p + offset + 2), *(p + offset + 1)))
-				return;
-			offset += *(p + offset + 1) + 2;
+				return 0;
+			if (length < 2)
+				return 0;
+			elementlen = *(p + offset + 1);
+			if (!TTEST2(*(p + offset + 2), elementlen))
+				return 0;
+			if (length < elementlen + 2)
+				return 0;
+			offset += elementlen + 2;
+			length -= elementlen + 2;
 			break;
 		}
 	}
+
+	/* No problems found. */
+	return 1;
 }
 
 /*********************************************************************************
@@ -294,24 +894,31 @@
  *********************************************************************************/
 
 static int
-handle_beacon(const u_char *p)
+handle_beacon(const u_char *p, u_int length)
 {
 	struct mgmt_body_t pbody;
 	int offset = 0;
+	int ret;
 
 	memset(&pbody, 0, sizeof(pbody));
 
 	if (!TTEST2(*p, IEEE802_11_TSTAMP_LEN + IEEE802_11_BCNINT_LEN +
 	    IEEE802_11_CAPINFO_LEN))
 		return 0;
+	if (length < IEEE802_11_TSTAMP_LEN + IEEE802_11_BCNINT_LEN +
+	    IEEE802_11_CAPINFO_LEN)
+		return 0;
 	memcpy(&pbody.timestamp, p, IEEE802_11_TSTAMP_LEN);
 	offset += IEEE802_11_TSTAMP_LEN;
+	length -= IEEE802_11_TSTAMP_LEN;
 	pbody.beacon_interval = EXTRACT_LE_16BITS(p+offset);
 	offset += IEEE802_11_BCNINT_LEN;
+	length -= IEEE802_11_BCNINT_LEN;
 	pbody.capability_info = EXTRACT_LE_16BITS(p+offset);
 	offset += IEEE802_11_CAPINFO_LEN;
+	length -= IEEE802_11_CAPINFO_LEN;
 
-	parse_elements(&pbody, p, offset);
+	ret = parse_elements(&pbody, p, offset, length);
 
 	PRINT_SSID(pbody);
 	PRINT_RATES(pbody);
@@ -319,50 +926,62 @@
 	    CAPABILITY_ESS(pbody.capability_info) ? "ESS" : "IBSS");
 	PRINT_DS_CHANNEL(pbody);
 
-	return 1;
+	return ret;
 }
 
 static int
-handle_assoc_request(const u_char *p)
+handle_assoc_request(const u_char *p, u_int length)
 {
 	struct mgmt_body_t pbody;
 	int offset = 0;
+	int ret;
 
 	memset(&pbody, 0, sizeof(pbody));
 
 	if (!TTEST2(*p, IEEE802_11_CAPINFO_LEN + IEEE802_11_LISTENINT_LEN))
 		return 0;
+	if (length < IEEE802_11_CAPINFO_LEN + IEEE802_11_LISTENINT_LEN)
+		return 0;
 	pbody.capability_info = EXTRACT_LE_16BITS(p);
 	offset += IEEE802_11_CAPINFO_LEN;
+	length -= IEEE802_11_CAPINFO_LEN;
 	pbody.listen_interval = EXTRACT_LE_16BITS(p+offset);
 	offset += IEEE802_11_LISTENINT_LEN;
+	length -= IEEE802_11_LISTENINT_LEN;
 
-	parse_elements(&pbody, p, offset);
+	ret = parse_elements(&pbody, p, offset, length);
 
 	PRINT_SSID(pbody);
 	PRINT_RATES(pbody);
-	return 1;
+	return ret;
 }
 
 static int
-handle_assoc_response(const u_char *p)
+handle_assoc_response(const u_char *p, u_int length)
 {
 	struct mgmt_body_t pbody;
 	int offset = 0;
+	int ret;
 
 	memset(&pbody, 0, sizeof(pbody));
 
 	if (!TTEST2(*p, IEEE802_11_CAPINFO_LEN + IEEE802_11_STATUS_LEN +
 	    IEEE802_11_AID_LEN))
 		return 0;
+	if (length < IEEE802_11_CAPINFO_LEN + IEEE802_11_STATUS_LEN +
+	    IEEE802_11_AID_LEN)
+		return 0;
 	pbody.capability_info = EXTRACT_LE_16BITS(p);
 	offset += IEEE802_11_CAPINFO_LEN;
+	length -= IEEE802_11_CAPINFO_LEN;
 	pbody.status_code = EXTRACT_LE_16BITS(p+offset);
 	offset += IEEE802_11_STATUS_LEN;
+	length -= IEEE802_11_STATUS_LEN;
 	pbody.aid = EXTRACT_LE_16BITS(p+offset);
 	offset += IEEE802_11_AID_LEN;
+	length -= IEEE802_11_AID_LEN;
 
-	parse_elements(&pbody, p, offset);
+	ret = parse_elements(&pbody, p, offset, length);
 
 	printf(" AID(%x) :%s: %s", ((u_int16_t)(pbody.aid << 2 )) >> 2 ,
 	    CAPABILITY_PRIVACY(pbody.capability_info) ? " PRIVACY " : "",
@@ -370,84 +989,98 @@
 		? status_text[pbody.status_code]
 		: "n/a"));
 
-	return 1;
+	return ret;
 }
 
 static int
-handle_reassoc_request(const u_char *p)
+handle_reassoc_request(const u_char *p, u_int length)
 {
 	struct mgmt_body_t pbody;
 	int offset = 0;
+	int ret;
 
 	memset(&pbody, 0, sizeof(pbody));
 
 	if (!TTEST2(*p, IEEE802_11_CAPINFO_LEN + IEEE802_11_LISTENINT_LEN +
 	    IEEE802_11_AP_LEN))
 		return 0;
+	if (length < IEEE802_11_CAPINFO_LEN + IEEE802_11_LISTENINT_LEN +
+	    IEEE802_11_AP_LEN)
+		return 0;
 	pbody.capability_info = EXTRACT_LE_16BITS(p);
 	offset += IEEE802_11_CAPINFO_LEN;
+	length -= IEEE802_11_CAPINFO_LEN;
 	pbody.listen_interval = EXTRACT_LE_16BITS(p+offset);
 	offset += IEEE802_11_LISTENINT_LEN;
+	length -= IEEE802_11_LISTENINT_LEN;
 	memcpy(&pbody.ap, p+offset, IEEE802_11_AP_LEN);
 	offset += IEEE802_11_AP_LEN;
+	length -= IEEE802_11_AP_LEN;
 
-	parse_elements(&pbody, p, offset);
+	ret = parse_elements(&pbody, p, offset, length);
 
 	PRINT_SSID(pbody);
 	printf(" AP : %s", etheraddr_string( pbody.ap ));
 
-	return 1;
+	return ret;
 }
 
 static int
-handle_reassoc_response(const u_char *p)
+handle_reassoc_response(const u_char *p, u_int length)
 {
 	/* Same as a Association Reponse */
-	return handle_assoc_response(p);
+	return handle_assoc_response(p, length);
 }
 
 static int
-handle_probe_request(const u_char *p)
+handle_probe_request(const u_char *p, u_int length)
 {
 	struct mgmt_body_t  pbody;
 	int offset = 0;
+	int ret;
 
 	memset(&pbody, 0, sizeof(pbody));
 
-	parse_elements(&pbody, p, offset);
+	ret = parse_elements(&pbody, p, offset, length);
 
 	PRINT_SSID(pbody);
 	PRINT_RATES(pbody);
 
-	return 1;
+	return ret;
 }
 
 static int
-handle_probe_response(const u_char *p)
+handle_probe_response(const u_char *p, u_int length)
 {
 	struct mgmt_body_t  pbody;
 	int offset = 0;
+	int ret;
 
 	memset(&pbody, 0, sizeof(pbody));
 
 	if (!TTEST2(*p, IEEE802_11_TSTAMP_LEN + IEEE802_11_BCNINT_LEN +
 	    IEEE802_11_CAPINFO_LEN))
 		return 0;
-
+	if (length < IEEE802_11_TSTAMP_LEN + IEEE802_11_BCNINT_LEN +
+	    IEEE802_11_CAPINFO_LEN)
+		return 0;
 	memcpy(&pbody.timestamp, p, IEEE802_11_TSTAMP_LEN);
 	offset += IEEE802_11_TSTAMP_LEN;
+	length -= IEEE802_11_TSTAMP_LEN;
 	pbody.beacon_interval = EXTRACT_LE_16BITS(p+offset);
 	offset += IEEE802_11_BCNINT_LEN;
+	length -= IEEE802_11_BCNINT_LEN;
 	pbody.capability_info = EXTRACT_LE_16BITS(p+offset);
 	offset += IEEE802_11_CAPINFO_LEN;
+	length -= IEEE802_11_CAPINFO_LEN;
 
-	parse_elements(&pbody, p, offset);
+	ret = parse_elements(&pbody, p, offset, length);
 
 	PRINT_SSID(pbody);
 	PRINT_RATES(pbody);
 	PRINT_DS_CHANNEL(pbody);
 
-	return 1;
+	return ret;
 }
 
 static int
@@ -458,7 +1091,7 @@
 }
 
 static int
-handle_disassoc(const u_char *p)
+handle_disassoc(const u_char *p, u_int length)
 {
 	struct mgmt_body_t  pbody;
 
@@ -466,6 +1099,8 @@
 
 	if (!TTEST2(*p, IEEE802_11_REASON_LEN))
 		return 0;
+	if (length < IEEE802_11_REASON_LEN)
+		return 0;
 	pbody.reason_code = EXTRACT_LE_16BITS(p);
 
 	printf(": %s",
@@ -477,23 +1112,29 @@
 }
 
 static int
-handle_auth(const u_char *p)
+handle_auth(const u_char *p, u_int length)
 {
 	struct mgmt_body_t  pbody;
 	int offset = 0;
+	int ret;
 
 	memset(&pbody, 0, sizeof(pbody));
 
 	if (!TTEST2(*p, 6))
 		return 0;
+	if (length < 6)
+		return 0;
 	pbody.auth_alg = EXTRACT_LE_16BITS(p);
 	offset += 2;
+	length -= 2;
 	pbody.auth_trans_seq_num = EXTRACT_LE_16BITS(p + offset);
 	offset += 2;
+	length -= 2;
 	pbody.status_code = EXTRACT_LE_16BITS(p + offset);
 	offset += 2;
+	length -= 2;
 
-	parse_elements(&pbody, p, offset);
+	ret = parse_elements(&pbody, p, offset, length);
 
 	if ((pbody.auth_alg == 1) &&
 	    ((pbody.auth_trans_seq_num == 2) ||
@@ -507,7 +1148,7 @@
 		        ? ((pbody.status_code < NUM_STATUSES)
 			       ? status_text[pbody.status_code]
 			       : "n/a") : ""));
-		return 1;
+		return ret;
 	}
 	printf(" (%s)-%x: %s",
 	    (pbody.auth_alg < NUM_AUTH_ALGS)
@@ -520,11 +1161,11 @@
 	            : "n/a")
 	        : "");
 
-	return 1;
+	return ret;
 }
 
 static int
-handle_deauth(const struct mgmt_header_t *pmh, const u_char *p)
+handle_deauth(const struct mgmt_header_t *pmh, const u_char *p, u_int length)
 {
 	struct mgmt_body_t  pbody;
 	int offset = 0;
@@ -534,8 +1175,11 @@
 
 	if (!TTEST2(*p, IEEE802_11_REASON_LEN))
 		return 0;
+	if (length < IEEE802_11_REASON_LEN)
+		return 0;
 	pbody.reason_code = EXTRACT_LE_16BITS(p);
 	offset += IEEE802_11_REASON_LEN;
+	length -= IEEE802_11_REASON_LEN;
 
 	reason = (pbody.reason_code < NUM_REASONS)
 			? reason_text[pbody.reason_code]
@@ -549,6 +1193,97 @@
 	return 1;
 }
 
+#define	PRINT_HT_ACTION(v) (\
+	(v) == 0 ? printf("TxChWidth") : \
+	(v) == 1 ? printf("MIMOPwrSave") : \
+		   printf("Act#%d", (v)) \
+)
+#define	PRINT_BA_ACTION(v) (\
+	(v) == 0 ? printf("ADDBA Request") : \
+	(v) == 1 ? printf("ADDBA Response") : \
+	(v) == 2 ? printf("DELBA") : \
+		   printf("Act#%d", (v)) \
+)
+#define	PRINT_MESHLINK_ACTION(v) (\
+	(v) == 0 ? printf("Request") : \
+	(v) == 1 ? printf("Report") : \
+		   printf("Act#%d", (v)) \
+)
+#define	PRINT_MESHPEERING_ACTION(v) (\
+	(v) == 0 ? printf("Open") : \
+	(v) == 1 ? printf("Confirm") : \
+	(v) == 2 ? printf("Close") : \
+		   printf("Act#%d", (v)) \
+)
+#define	PRINT_MESHPATH_ACTION(v) (\
+	(v) == 0 ? printf("Request") : \
+	(v) == 1 ? printf("Report") : \
+	(v) == 2 ? printf("Error") : \
+	(v) == 3 ? printf("RootAnnouncement") : \
+		   printf("Act#%d", (v)) \
+)
+
+#define PRINT_MESH_ACTION(v) (\
+	(v) == 0 ? printf("MeshLink") : \
+	(v) == 1 ? printf("HWMP") : \
+	(v) == 2 ? printf("Gate Announcement") : \
+	(v) == 3 ? printf("Congestion Control") : \
+	(v) == 4 ? printf("MCCA Setup Request") : \
+	(v) == 5 ? printf("MCCA Setup Reply") : \
+	(v) == 6 ? printf("MCCA Advertisement Request") : \
+	(v) == 7 ? printf("MCCA Advertisement") : \
+	(v) == 8 ? printf("MCCA Teardown") : \
+	(v) == 9 ? printf("TBTT Adjustment Request") : \
+	(v) == 10 ? printf("TBTT Adjustment Response") : \
+		   printf("Act#%d", (v)) \
+)
+#define PRINT_MULTIHOP_ACTION(v) (\
+	(v) == 0 ? printf("Proxy Update") : \
+	(v) == 1 ? printf("Proxy Update Confirmation") : \
+		   printf("Act#%d", (v)) \
+)
+#define PRINT_SELFPROT_ACTION(v) (\
+	(v) == 1 ? printf("Peering Open") : \
+	(v) == 2 ? printf("Peering Confirm") : \
+	(v) == 3 ? printf("Peering Close") : \
+	(v) == 4 ? printf("Group Key Inform") : \
+	(v) == 5 ? printf("Group Key Acknowledge") : \
+		   printf("Act#%d", (v)) \
+)
+
+static int
+handle_action(const struct mgmt_header_t *pmh, const u_char *p, u_int length)
+{
+	if (!TTEST2(*p, 2))
+		return 0;
+	if (length < 2)
+		return 0;
+	if (eflag) {
+		printf(": ");
+	} else {
+		printf(" (%s): ", etheraddr_string(pmh->sa));
+	}
+	switch (p[0]) {
+	case 0: printf("Spectrum Management Act#%d", p[1]); break;
+	case 1: printf("QoS Act#%d", p[1]); break;
+	case 2: printf("DLS Act#%d", p[1]); break;
+	case 3: printf("BA "); PRINT_BA_ACTION(p[1]); break;
+	case 7: printf("HT "); PRINT_HT_ACTION(p[1]); break;
+	case 13: printf("MeshAction "); PRINT_MESH_ACTION(p[1]); break;
+	case 14:
+		printf("MultiohopAction ");
+		PRINT_MULTIHOP_ACTION(p[1]); break;
+	case 15:
+		printf("SelfprotectAction ");
+		PRINT_SELFPROT_ACTION(p[1]); break;
+	case 127: printf("Vendor Act#%d", p[1]); break;
+	default:
+		printf("Reserved(%d) Act#%d", p[0], p[1]);
+		break;
+	}
+	return 1;
+}
+
 
 /*********************************************************************************
  * Print Body funcs
@@ -557,36 +1292,36 @@
 
 static int
 mgmt_body_print(u_int16_t fc, const struct mgmt_header_t *pmh,
-    const u_char *p)
+    const u_char *p, u_int length)
 {
 	switch (FC_SUBTYPE(fc)) {
 	case ST_ASSOC_REQUEST:
 		printf("Assoc Request");
-		return handle_assoc_request(p);
+		return handle_assoc_request(p, length);
 	case ST_ASSOC_RESPONSE:
 		printf("Assoc Response");
-		return handle_assoc_response(p);
+		return handle_assoc_response(p, length);
 	case ST_REASSOC_REQUEST:
 		printf("ReAssoc Request");
-		return handle_reassoc_request(p);
+		return handle_reassoc_request(p, length);
 	case ST_REASSOC_RESPONSE:
 		printf("ReAssoc Response");
-		return handle_reassoc_response(p);
+		return handle_reassoc_response(p, length);
 	case ST_PROBE_REQUEST:
 		printf("Probe Request");
-		return handle_probe_request(p);
+		return handle_probe_request(p, length);
 	case ST_PROBE_RESPONSE:
 		printf("Probe Response");
-		return handle_probe_response(p);
+		return handle_probe_response(p, length);
 	case ST_BEACON:
 		printf("Beacon");
-		return handle_beacon(p);
+		return handle_beacon(p, length);
 	case ST_ATIM:
 		printf("ATIM");
 		return handle_atim();
 	case ST_DISASSOC:
 		printf("Disassociation");
-		return handle_disassoc(p);
+		return handle_disassoc(p, length);
 	case ST_AUTH:
 		printf("Authentication");
 		if (!TTEST2(*p, 3))
@@ -595,10 +1330,14 @@
 			printf("Authentication (Shared-Key)-3 ");
 			return wep_print(p);
 		}
-		return handle_auth(p);
+		return handle_auth(p, length);
 	case ST_DEAUTH:
 		printf("DeAuthentication");
-		return handle_deauth(pmh, p);
+		return handle_deauth(pmh, p, length);
+		break;
+	case ST_ACTION:
+		printf("Action");
+		return handle_action(pmh, p, length);
 		break;
 	default:
 		printf("Unhandled Management subtype(%x)",
@@ -616,6 +1355,29 @@
 ctrl_body_print(u_int16_t fc, const u_char *p)
 {
 	switch (FC_SUBTYPE(fc)) {
+	case CTRL_CONTROL_WRAPPER:
+		printf("Control Wrapper");
+		/* XXX - requires special handling */
+		break;
+	case CTRL_BAR:
+		printf("BAR");
+		if (!TTEST2(*p, CTRL_BAR_HDRLEN))
+			return 0;
+		if (!eflag)
+			printf(" RA:%s TA:%s CTL(%x) SEQ(%u) ",
+			    etheraddr_string(((const struct ctrl_bar_t *)p)->ra),
+			    etheraddr_string(((const struct ctrl_bar_t *)p)->ta),
+			    EXTRACT_LE_16BITS(&(((const struct ctrl_bar_t *)p)->ctl)),
+			    EXTRACT_LE_16BITS(&(((const struct ctrl_bar_t *)p)->seq)));
+		break;
+	case CTRL_BA:
+		printf("BA");
+		if (!TTEST2(*p, CTRL_BA_HDRLEN))
+			return 0;
+		if (!eflag)
+			printf(" RA:%s ",
+			    etheraddr_string(((const struct ctrl_ba_t *)p)->ra));
+		break;
 	case CTRL_PS_POLL:
 		printf("Power Save-Poll");
 		if (!TTEST2(*p, CTRL_PS_POLL_HDRLEN))
@@ -789,6 +1551,17 @@
 		return;
 
 	switch (FC_SUBTYPE(fc)) {
+	case CTRL_BAR:
+		printf(" RA:%s TA:%s CTL(%x) SEQ(%u) ",
+		    etheraddr_string(((const struct ctrl_bar_t *)p)->ra),
+		    etheraddr_string(((const struct ctrl_bar_t *)p)->ta),
+		    EXTRACT_LE_16BITS(&(((const struct ctrl_bar_t *)p)->ctl)),
+		    EXTRACT_LE_16BITS(&(((const struct ctrl_bar_t *)p)->seq)));
+		break;
+	case CTRL_BA:
+		printf("RA:%s ",
+		    etheraddr_string(((const struct ctrl_ba_t *)p)->ra));
+		break;
 	case CTRL_PS_POLL:
 		printf("BSSID:%s TA:%s ",
 		    etheraddr_string(((const struct ctrl_ps_poll_t *)p)->bssid),
@@ -833,6 +1606,8 @@
 		return MGMT_HDRLEN;
 	case T_CTRL:
 		switch (FC_SUBTYPE(fc)) {
+		case CTRL_BAR:
+			return CTRL_BAR_HDRLEN;
 		case CTRL_PS_POLL:
 			return CTRL_PS_POLL_HDRLEN;
 		case CTRL_RTS:
@@ -859,14 +1634,20 @@
 	}
 }
 
+static int
+extract_mesh_header_length(const u_char *p)
+{
+	return (p[0] &~ 3) ? 0 : 6*(1 + (p[0] & 3));
+}
+
 /*
  * Print the 802.11 MAC header if eflag is set, and set "*srcp" and "*dstp"
  * to point to the source and destination MAC addresses in any case if
  * "srcp" and "dstp" aren't null.
  */
-static inline void
-ieee_802_11_hdr_print(u_int16_t fc, const u_char *p, const u_int8_t **srcp,
-    const u_int8_t **dstp)
+static void
+ieee_802_11_hdr_print(u_int16_t fc, const u_char *p, u_int hdrlen,
+    u_int meshdrlen, const u_int8_t **srcp, const u_int8_t **dstp)
 {
 	if (vflag) {
 		if (FC_MORE_DATA(fc))
@@ -886,6 +1667,21 @@
 			    EXTRACT_LE_16BITS(
 			        &((const struct mgmt_header_t *)p)->duration));
 	}
+	if (meshdrlen != 0) {
+		const struct meshcntl_t *mc =
+		    (const struct meshcntl_t *)&p[hdrlen - meshdrlen];
+		int ae = mc->flags & 3;
+
+		printf("MeshData (AE %d TTL %u seq %u", ae, mc->ttl,
+		    EXTRACT_LE_32BITS(mc->seq));
+		if (ae > 0)
+			printf(" A4:%s", etheraddr_string(mc->addr4));
+		if (ae > 1)
+			printf(" A5:%s", etheraddr_string(mc->addr5));
+		if (ae > 2)
+			printf(" A6:%s", etheraddr_string(mc->addr6));
+		printf(") ");
+	}
 
 	switch (FC_TYPE(fc)) {
 	case T_MGMT:
@@ -911,29 +1707,51 @@
 #endif
 
 static u_int
-ieee802_11_print(const u_char *p, u_int length, u_int caplen, int pad)
+ieee802_11_print(const u_char *p, u_int length, u_int orig_caplen, int pad,
+    u_int fcslen)
 {
 	u_int16_t fc;
-	u_int hdrlen;
+	u_int caplen, hdrlen, meshdrlen;
 	const u_int8_t *src, *dst;
 	u_short extracted_ethertype;
 
-	if (caplen < IEEE802_11_FC_LEN) {
+	caplen = orig_caplen;
+	/* Remove FCS, if present */
+	if (length < fcslen) {
 		printf("[|802.11]");
 		return caplen;
 	}
+	length -= fcslen;
+	if (caplen > length) {
+		/* Amount of FCS in actual packet data, if any */
+		fcslen = caplen - length;
+		caplen -= fcslen;
+		snapend -= fcslen;
+	}
+
+	if (caplen < IEEE802_11_FC_LEN) {
+		printf("[|802.11]");
+		return orig_caplen;
+	}
 
 	fc = EXTRACT_LE_16BITS(p);
 	hdrlen = extract_header_length(fc);
 	if (pad)
 		hdrlen = roundup2(hdrlen, 4);
+	if (Hflag && FC_TYPE(fc) == T_DATA &&
+	    DATA_FRAME_IS_QOS(FC_SUBTYPE(fc))) {
+		meshdrlen = extract_mesh_header_length(p+hdrlen);
+		hdrlen += meshdrlen;
+	} else
+		meshdrlen = 0;
+
 
 	if (caplen < hdrlen) {
 		printf("[|802.11]");
 		return hdrlen;
 	}
 
-	ieee_802_11_hdr_print(fc, p, &src, &dst);
+	ieee_802_11_hdr_print(fc, p, hdrlen, meshdrlen, &src, &dst);
 
 	/*
 	 * Go past the 802.11 header.
@@ -945,7 +1763,7 @@
 	switch (FC_TYPE(fc)) {
 	case T_MGMT:
 		if (!mgmt_body_print(fc,
-		    (const struct mgmt_header_t *)(p - hdrlen), p)) {
+		    (const struct mgmt_header_t *)(p - hdrlen), p, length)) {
 			printf("[|802.11]");
 			return hdrlen;
 		}
@@ -972,8 +1790,8 @@
 			 * handle intelligently
 			 */
 			if (!eflag)
-				ieee_802_11_hdr_print(fc, p - hdrlen, NULL,
-				    NULL);
+				ieee_802_11_hdr_print(fc, p - hdrlen, hdrlen,
+				    meshdrlen, NULL, NULL);
 			if (extracted_ethertype)
 				printf("(LLC %s) ",
 				    etherproto_string(
@@ -999,11 +1817,70 @@
 u_int
 ieee802_11_if_print(const struct pcap_pkthdr *h, const u_char *p)
 {
-	return ieee802_11_print(p, h->len, h->caplen, 0);
+	return ieee802_11_print(p, h->len, h->caplen, 0, 0);
+}
+
+#define	IEEE80211_CHAN_FHSS \
+	(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_GFSK)
+#define	IEEE80211_CHAN_A \
+	(IEEE80211_CHAN_5GHZ | IEEE80211_CHAN_OFDM)
+#define	IEEE80211_CHAN_B \
+	(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_CCK)
+#define	IEEE80211_CHAN_PUREG \
+	(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_OFDM)
+#define	IEEE80211_CHAN_G \
+	(IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_DYN)
+
+#define	IS_CHAN_FHSS(flags) \
+	((flags & IEEE80211_CHAN_FHSS) == IEEE80211_CHAN_FHSS)
+#define	IS_CHAN_A(flags) \
+	((flags & IEEE80211_CHAN_A) == IEEE80211_CHAN_A)
+#define	IS_CHAN_B(flags) \
+	((flags & IEEE80211_CHAN_B) == IEEE80211_CHAN_B)
+#define	IS_CHAN_PUREG(flags) \
+	((flags & IEEE80211_CHAN_PUREG) == IEEE80211_CHAN_PUREG)
+#define	IS_CHAN_G(flags) \
+	((flags & IEEE80211_CHAN_G) == IEEE80211_CHAN_G)
+#define	IS_CHAN_ANYG(flags) \
+	(IS_CHAN_PUREG(flags) || IS_CHAN_G(flags))
+
+static void
+print_chaninfo(int freq, int flags)
+{
+	printf("%u MHz", freq);
+	if (IS_CHAN_FHSS(flags))
+		printf(" FHSS");
+	if (IS_CHAN_A(flags)) {
+		if (flags & IEEE80211_CHAN_HALF)
+			printf(" 11a/10Mhz");
+		else if (flags & IEEE80211_CHAN_QUARTER)
+			printf(" 11a/5Mhz");
+		else
+			printf(" 11a");
+	}
+	if (IS_CHAN_ANYG(flags)) {
+		if (flags & IEEE80211_CHAN_HALF)
+			printf(" 11g/10Mhz");
+		else if (flags & IEEE80211_CHAN_QUARTER)
+			printf(" 11g/5Mhz");
+		else
+			printf(" 11g");
+	} else if (IS_CHAN_B(flags))
+		printf(" 11b");
+	if (flags & IEEE80211_CHAN_TURBO)
+		printf(" Turbo");
+	if (flags & IEEE80211_CHAN_HT20)
+		printf(" ht/20");
+	else if (flags & IEEE80211_CHAN_HT40D)
+		printf(" ht/40-");
+	else if (flags & IEEE80211_CHAN_HT40U)
+		printf(" ht/40+");
+	printf(" ");
 }
 
 static int
-print_radiotap_field(struct cpack_state *s, u_int32_t bit, int *pad)
+print_radiotap_field(struct cpack_state *s, u_int32_t bit, u_int8_t *flags,
+						struct radiotap_state *state, u_int32_t presentflags)
 {
 	union {
 		int8_t		i8;
@@ -1012,16 +1889,24 @@
 		u_int16_t	u16;
 		u_int32_t	u32;
 		u_int64_t	u64;
-	} u, u2;
+	} u, u2, u3, u4;
 	int rc;
 
 	switch (bit) {
 	case IEEE80211_RADIOTAP_FLAGS:
 		rc = cpack_uint8(s, &u.u8);
-		if (u.u8 & IEEE80211_RADIOTAP_F_DATAPAD)
-			*pad = 1;
+		if (rc != 0)
+			break;
+		*flags = u.u8;
 		break;
 	case IEEE80211_RADIOTAP_RATE:
+		rc = cpack_uint8(s, &u.u8);
+		if (rc != 0)
+			break;
+
+		/* Save state rate */
+		state->rate = u.u8;
+		break;
 	case IEEE80211_RADIOTAP_DB_ANTSIGNAL:
 	case IEEE80211_RADIOTAP_DB_ANTNOISE:
 	case IEEE80211_RADIOTAP_ANTENNA:
@@ -1040,6 +1925,7 @@
 	case IEEE80211_RADIOTAP_FHSS:
 	case IEEE80211_RADIOTAP_LOCK_QUALITY:
 	case IEEE80211_RADIOTAP_TX_ATTENUATION:
+	case IEEE80211_RADIOTAP_RX_FLAGS:
 		rc = cpack_uint16(s, &u.u16);
 		break;
 	case IEEE80211_RADIOTAP_DB_TX_ATTENUATION:
@@ -1051,12 +1937,63 @@
 	case IEEE80211_RADIOTAP_TSFT:
 		rc = cpack_uint64(s, &u.u64);
 		break;
+	case IEEE80211_RADIOTAP_XCHANNEL:
+		rc = cpack_uint32(s, &u.u32);
+		if (rc != 0)
+			break;
+		rc = cpack_uint16(s, &u2.u16);
+		if (rc != 0)
+			break;
+		rc = cpack_uint8(s, &u3.u8);
+		if (rc != 0)
+			break;
+		rc = cpack_uint8(s, &u4.u8);
+		break;
+	case IEEE80211_RADIOTAP_MCS:
+		rc = cpack_uint8(s, &u.u8);
+		if (rc != 0)
+			break;
+		rc = cpack_uint8(s, &u2.u8);
+		if (rc != 0)
+			break;
+		rc = cpack_uint8(s, &u3.u8);
+		break;
+	case IEEE80211_RADIOTAP_VENDOR_NAMESPACE: {
+		u_int8_t vns[3];
+		u_int16_t length;
+		u_int8_t subspace;
+
+		if ((cpack_align_and_reserve(s, 2)) == NULL) {
+			rc = -1;
+			break;
+		}
+
+		rc = cpack_uint8(s, &vns[0]);
+		if (rc != 0)
+			break;
+		rc = cpack_uint8(s, &vns[1]);
+		if (rc != 0)
+			break;
+		rc = cpack_uint8(s, &vns[2]);
+		if (rc != 0)
+			break;
+		rc = cpack_uint8(s, &subspace);
+		if (rc != 0)
+			break;
+		rc = cpack_uint16(s, &length);
+		if (rc != 0)
+			break;
+
+		/* Skip up to length */
+		s->c_next += length;
+		break;
+	}
 	default:
 		/* this bit indicates a field whose
 		 * size we do not know, so we cannot
-		 * proceed.
+		 * proceed.  Just print the bit number.
 		 */
-		printf("[0x%08x] ", bit);
+		printf("[bit %u] ", bit);
 		return -1;
 	}
 
@@ -1065,17 +2002,64 @@
 		return rc;
 	}
 
+	/* Preserve the state present flags */
+	state->present = presentflags;
+
 	switch (bit) {
 	case IEEE80211_RADIOTAP_CHANNEL:
-		printf("%u MHz ", u.u16);
-		if (u2.u16 != 0)
-			printf("(0x%04x) ", u2.u16);
+		/*
+		 * If CHANNEL and XCHANNEL are both present, skip
+		 * CHANNEL.
+		 */
+		if (presentflags & (1 << IEEE80211_RADIOTAP_XCHANNEL))
+			break;
+		print_chaninfo(u.u16, u2.u16);
 		break;
 	case IEEE80211_RADIOTAP_FHSS:
 		printf("fhset %d fhpat %d ", u.u16 & 0xff, (u.u16 >> 8) & 0xff);
 		break;
 	case IEEE80211_RADIOTAP_RATE:
-		PRINT_RATE("", u.u8, " Mb/s ");
+		/*
+		 * XXX On FreeBSD rate & 0x80 means we have an MCS. On
+		 * Linux and AirPcap it does not.  (What about
+		 * Mac OS X, NetBSD, OpenBSD, and DragonFly BSD?)
+		 *
+		 * This is an issue either for proprietary extensions
+		 * to 11a or 11g, which do exist, or for 11n
+		 * implementations that stuff a rate value into
+		 * this field, which also appear to exist.
+		 *
+		 * We currently handle that by assuming that
+		 * if the 0x80 bit is set *and* the remaining
+		 * bits have a value between 0 and 15 it's
+		 * an MCS value, otherwise it's a rate.  If
+		 * there are cases where systems that use
+		 * "0x80 + MCS index" for MCS indices > 15,
+		 * or stuff a rate value here between 64 and
+		 * 71.5 Mb/s in here, we'll need a preference
+		 * setting.  Such rates do exist, e.g. 11n
+		 * MCS 7 at 20 MHz with a long guard interval.
+		 */
+		if (u.u8 >= 0x80 && u.u8 <= 0x8f) {
+			/*
+			 * XXX - we don't know the channel width
+			 * or guard interval length, so we can't
+			 * convert this to a data rate.
+			 *
+			 * If you want us to show a data rate,
+			 * use the MCS field, not the Rate field;
+			 * the MCS field includes not only the
+			 * MCS index, it also includes bandwidth
+			 * and guard interval information.
+			 *
+			 * XXX - can we get the channel width
+			 * from XChannel and the guard interval
+			 * information from Flags, at least on
+			 * FreeBSD?
+			 */
+			printf("MCS %u ", u.u8 & 0x7f);
+		} else
+			printf("%2.1f Mb/s ", .5*u.u8);
 		break;
 	case IEEE80211_RADIOTAP_DBM_ANTSIGNAL:
 		printf("%ddB signal ", u.i8);
@@ -1119,6 +2103,94 @@
 	case IEEE80211_RADIOTAP_TSFT:
 		printf("%" PRIu64 "us tsft ", u.u64);
 		break;
+	case IEEE80211_RADIOTAP_RX_FLAGS:
+		/* Do nothing for now */
+		break;
+	case IEEE80211_RADIOTAP_XCHANNEL:
+		print_chaninfo(u2.u16, u.u32);
+		break;
+	case IEEE80211_RADIOTAP_MCS: {
+		static const char *bandwidth[4] = {
+			"20 MHz",
+			"40 MHz",
+			"20 MHz (L)",
+			"20 MHz (U)"
+		};
+		float htrate;
+
+		if (u.u8 & IEEE80211_RADIOTAP_MCS_MCS_INDEX_KNOWN) {
+			/*
+			 * We know the MCS index.
+			 */
+			if (u3.u8 <= MAX_MCS_INDEX) {
+				/*
+				 * And it's in-range.
+				 */
+				if (u.u8 & (IEEE80211_RADIOTAP_MCS_BANDWIDTH_KNOWN|IEEE80211_RADIOTAP_MCS_GUARD_INTERVAL_KNOWN)) {
+					/*
+					 * And we know both the bandwidth and
+					 * the guard interval, so we can look
+					 * up the rate.
+					 */
+					htrate = 
+						ieee80211_float_htrates \
+							[u3.u8] \
+							[((u2.u8 & IEEE80211_RADIOTAP_MCS_BANDWIDTH_MASK) == IEEE80211_RADIOTAP_MCS_BANDWIDTH_40 ? 1 : 0)] \
+							[((u2.u8 & IEEE80211_RADIOTAP_MCS_SHORT_GI) ? 1 : 0)];
+				} else {
+					/*
+					 * We don't know both the bandwidth
+					 * and the guard interval, so we can
+					 * only report the MCS index.
+					 */
+					htrate = 0.0;
+				}
+			} else {
+				/*
+				 * The MCS value is out of range.
+				 */
+				htrate = 0.0;
+			}
+			if (htrate != 0.0) {
+				/*
+				 * We have the rate.
+				 * Print it.
+				 */
+				printf("%.1f Mb/s MCS %u ", htrate, u3.u8);
+			} else {
+				/*
+				 * We at least have the MCS index.
+				 * Print it.
+				 */
+				printf("MCS %u ", u3.u8);
+			}
+		}
+		if (u.u8 & IEEE80211_RADIOTAP_MCS_BANDWIDTH_KNOWN) {
+			printf("%s ",
+				bandwidth[u2.u8 & IEEE80211_RADIOTAP_MCS_BANDWIDTH_MASK]);
+		}
+		if (u.u8 & IEEE80211_RADIOTAP_MCS_GUARD_INTERVAL_KNOWN) {
+			printf("%s GI ",
+				(u2.u8 & IEEE80211_RADIOTAP_MCS_SHORT_GI) ?
+				"short" : "lon");
+		}
+		if (u.u8 & IEEE80211_RADIOTAP_MCS_HT_FORMAT_KNOWN) {
+			printf("%s ",
+				(u2.u8 & IEEE80211_RADIOTAP_MCS_HT_GREENFIELD) ?
+				"greenfield" : "mixed");
+		}
+		if (u.u8 & IEEE80211_RADIOTAP_MCS_FEC_TYPE_KNOWN) {
+			printf("%s FEC ",
+				(u2.u8 & IEEE80211_RADIOTAP_MCS_FEC_LDPC) ?
+				"LDPC" : "BCC");
+		}
+		if (u.u8 & IEEE80211_RADIOTAP_MCS_STBC_KNOWN) {
+			printf("RX-STBC%u ",
+				(u2.u8 & IEEE80211_RADIOTAP_MCS_STBC_MASK) >> IEEE80211_RADIOTAP_MCS_STBC_SHIFT);
+		}
+
+		break;
+		}
 	}
 	return 0;
 }
@@ -1131,19 +2203,22 @@
 #define	BITNO_8(x) (((x) >> 4) ? 4 + BITNO_4((x) >> 4) : BITNO_4((x)))
 #define	BITNO_4(x) (((x) >> 2) ? 2 + BITNO_2((x) >> 2) : BITNO_2((x)))
 #define	BITNO_2(x) (((x) & 2) ? 1 : 0)
-#define	BIT(n)	(1 << n)
+#define	BIT(n)	(1U << n)
 #define	IS_EXTENDED(__p)	\
 	    (EXTRACT_LE_32BITS(__p) & BIT(IEEE80211_RADIOTAP_EXT)) != 0
 
 	struct cpack_state cpacker;
 	struct ieee80211_radiotap_header *hdr;
 	u_int32_t present, next_present;
+	u_int32_t presentflags = 0;
 	u_int32_t *presentp, *last_presentp;
 	enum ieee80211_radiotap_type bit;
 	int bit0;
-	const u_char *iter;
 	u_int len;
+	u_int8_t flags;
 	int pad;
+	u_int fcslen;
+	struct radiotap_state state;
 
 	if (caplen < sizeof(*hdr)) {
 		printf("[|802.11]");
@@ -1158,10 +2233,13 @@
 		printf("[|802.11]");
 		return caplen;
 	}
+	cpack_init(&cpacker, (u_int8_t *)hdr, len); /* align against header start */
+	cpack_advance(&cpacker, sizeof(*hdr)); /* includes the 1st bitmap */
 	for (last_presentp = &hdr->it_present;
 	     IS_EXTENDED(last_presentp) &&
 	     (u_char*)(last_presentp + 1) <= p + len;
-	     last_presentp++);
+	     last_presentp++)
+	  cpack_advance(&cpacker, sizeof(hdr->it_present)); /* more bitmaps */
 
 	/* are there more bitmap extensions than bytes in header? */
 	if (IS_EXTENDED(last_presentp)) {
@@ -1169,18 +2247,19 @@
 		return caplen;
 	}
 
-	iter = (u_char*)(last_presentp + 1);
-
-	if (cpack_init(&cpacker, (u_int8_t*)iter, len - (iter - p)) != 0) {
-		/* XXX */
-		printf("[|802.11]");
-		return caplen;
-	}
-
+	/* Assume no flags */
+	flags = 0;
 	/* Assume no Atheros padding between 802.11 header and body */
 	pad = 0;
+	/* Assume no FCS at end of frame */
+	fcslen = 0;
 	for (bit0 = 0, presentp = &hdr->it_present; presentp <= last_presentp;
 	     presentp++, bit0 += 32) {
+		presentflags = EXTRACT_LE_32BITS(presentp);
+
+		/* Clear state. */
+		memset(&state, 0, sizeof(state));
+
 		for (present = EXTRACT_LE_32BITS(presentp); present;
 		     present = next_present) {
 			/* clear the least significant bit that is set */
@@ -1190,12 +2269,18 @@
 			bit = (enum ieee80211_radiotap_type)
 			    (bit0 + BITNO_32(present ^ next_present));
 
-			if (print_radiotap_field(&cpacker, bit, &pad) != 0)
+			if (print_radiotap_field(&cpacker, bit, &flags, &state, presentflags) != 0)
 				goto out;
 		}
 	}
+
 out:
-	return len + ieee802_11_print(p + len, length - len, caplen - len, pad);
+	if (flags & IEEE80211_RADIOTAP_F_DATAPAD)
+		pad = 1;	/* Atheros padding */
+	if (flags & IEEE80211_RADIOTAP_F_FCS)
+		fcslen = 4;	/* FCS at end of packet */
+	return len + ieee802_11_print(p + len, length - len, caplen - len, pad,
+	    fcslen);
 #undef BITNO_32
 #undef BITNO_16
 #undef BITNO_8
@@ -1209,6 +2294,11 @@
 {
 	u_int32_t caphdr_len;
 
+	if (caplen < 8) {
+		printf("[|802.11]");
+		return caplen;
+	}
+
 	caphdr_len = EXTRACT_32BITS(p + 4);
 	if (caphdr_len < 8) {
 		/*
@@ -1226,37 +2316,43 @@
 	}
 
 	return caphdr_len + ieee802_11_print(p + caphdr_len,
-	    length - caphdr_len, caplen - caphdr_len, 0);
+	    length - caphdr_len, caplen - caphdr_len, 0, 0);
 }
 
 #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) {
@@ -1265,24 +2361,26 @@
 	}
 
 	return PRISM_HDR_LEN + ieee802_11_print(p + PRISM_HDR_LEN,
-	    length - PRISM_HDR_LEN, caplen - PRISM_HDR_LEN, 0);
+	    length - PRISM_HDR_LEN, caplen - PRISM_HDR_LEN, 0, 0);
 }
 
 /*
  * 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;
+	return ieee802_11_radio_print(p, h->len, h->caplen);
+}
 
-	if (caplen < 8) {
-		printf("[|802.11]");
-		return 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/print-802_15_4.c b/print-802_15_4.c
new file mode 100644
index 0000000..2016552
--- /dev/null
+++ b/print-802_15_4.c
@@ -0,0 +1,183 @@
+/*
+ * Copyright (c) 2009
+ * 	Siemens AG, All rights reserved.
+ * 	Dmitry Eremin-Solenikov (dbaryshkov@gmail.com)
+ *
+ * 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <pcap.h>
+#include <string.h>
+
+#include "interface.h"
+#include "addrtoname.h"
+
+#include "extract.h"
+
+static const char *ftypes[] = {
+	"Beacon",			/* 0 */
+	"Data",				/* 1 */
+	"ACK",				/* 2 */
+	"Command",			/* 3 */
+	"Reserved",			/* 4 */
+	"Reserved",			/* 5 */
+	"Reserved",			/* 6 */
+	"Reserved",			/* 7 */
+};
+
+static int
+extract_header_length(u_int16_t fc)
+{
+	int len = 0;
+
+	switch ((fc >> 10) & 0x3) {
+	case 0x00:
+		if (fc & (1 << 6)) /* intra-PAN with none dest addr */
+			return -1;
+		break;
+	case 0x01:
+		return -1;
+	case 0x02:
+		len += 4;
+		break;
+	case 0x03:
+		len += 10;
+		break;
+	}
+
+	switch ((fc >> 14) & 0x3) {
+	case 0x00:
+		break;
+	case 0x01:
+		return -1;
+	case 0x02:
+		len += 4;
+		break;
+	case 0x03:
+		len += 10;
+		break;
+	}
+
+	if (fc & (1 << 6)) {
+		if (len < 2)
+			return -1;
+		len -= 2;
+	}
+
+	return len;
+}
+
+
+u_int
+ieee802_15_4_if_print(struct netdissect_options *ndo,
+                      const struct pcap_pkthdr *h, const u_char *p)
+{
+	u_int caplen = h->caplen;
+	int hdrlen;
+	u_int16_t fc;
+	u_int8_t seq;
+
+	if (caplen < 3) {
+		ND_PRINT((ndo, "[|802.15.4] %x", caplen));
+		return caplen;
+	}
+
+	fc = EXTRACT_LE_16BITS(p);
+	hdrlen = extract_header_length(fc);
+
+	seq = EXTRACT_LE_8BITS(p + 2);
+
+	p += 3;
+	caplen -= 3;
+
+	ND_PRINT((ndo,"IEEE 802.15.4 %s packet ", ftypes[fc & 0x7]));
+	if (vflag)
+		ND_PRINT((ndo,"seq %02x ", seq));
+	if (hdrlen == -1) {
+		ND_PRINT((ndo,"malformed! "));
+		return caplen;
+	}
+
+
+	if (!vflag) {
+		p+= hdrlen;
+		caplen -= hdrlen;
+	} else {
+		u_int16_t panid = 0;
+
+		switch ((fc >> 10) & 0x3) {
+		case 0x00:
+			ND_PRINT((ndo,"none "));
+			break;
+		case 0x01:
+			ND_PRINT((ndo,"reserved destination addressing mode"));
+			return 0;
+		case 0x02:
+			panid = EXTRACT_LE_16BITS(p);
+			p += 2;
+			ND_PRINT((ndo,"%04x:%04x ", panid, EXTRACT_LE_16BITS(p)));
+			p += 2;
+			break;
+		case 0x03:
+			panid = EXTRACT_LE_16BITS(p);
+			p += 2;
+			ND_PRINT((ndo,"%04x:%s ", panid, le64addr_string(p)));
+			p += 8;
+			break;
+		}
+		ND_PRINT((ndo,"< ");
+
+		switch ((fc >> 14) & 0x3) {
+		case 0x00:
+			ND_PRINT((ndo,"none "));
+			break;
+		case 0x01:
+			ND_PRINT((ndo,"reserved source addressing mode"));
+			return 0;
+		case 0x02:
+			if (!(fc & (1 << 6))) {
+				panid = EXTRACT_LE_16BITS(p);
+				p += 2;
+			}
+			ND_PRINT((ndo,"%04x:%04x ", panid, EXTRACT_LE_16BITS(p)));
+			p += 2;
+			break;
+		case 0x03:
+			if (!(fc & (1 << 6))) {
+				panid = EXTRACT_LE_16BITS(p);
+				p += 2;
+			}
+                        ND_PRINT((ndo,"%04x:%s ", panid, le64addr_string(p))));
+			p += 8;
+			break;
+		}
+
+		caplen -= hdrlen;
+	}
+
+	if (!suppress_default_print)
+		(ndo->ndo_default_print)(ndo, p, caplen);
+
+	return 0;
+}
diff --git a/print-ah.c b/print-ah.c
index 92ed909..ecd106b 100644
--- a/print-ah.c
+++ b/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/print-aodv.c b/print-aodv.c
index 80a547d..c5f6622 100644
--- a/print-aodv.c
+++ b/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/print-ap1394.c b/print-ap1394.c
index a01ce34..ab0713b 100644
--- a/print-ap1394.c
+++ b/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
@@ -33,6 +33,7 @@
 #include <pcap.h>
 
 #include "interface.h"
+#include "extract.h"
 #include "addrtoname.h"
 #include "ethertype.h"
 
@@ -57,18 +58,21 @@
 ap1394_hdr_print(register const u_char *bp, u_int length)
 {
 	register const struct firewire_header *fp;
+	u_int16_t firewire_type;
+
 	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));
 
+	firewire_type = EXTRACT_16BITS(&fp->firewire_type);
 	if (!qflag) {
 		(void)printf(", ethertype %s (0x%04x)",
-			       tok2str(ethertype_values,"Unknown", ntohs(fp->firewire_type)),
-                               ntohs(fp->firewire_type));	      
+			       tok2str(ethertype_values,"Unknown", firewire_type),
+                               firewire_type);
         } else {
-                (void)printf(", %s", tok2str(ethertype_values,"Unknown Ethertype (0x%04x)", ntohs(fp->firewire_type)));  
+                (void)printf(", %s", tok2str(ethertype_values,"Unknown Ethertype (0x%04x)", firewire_type));
         }
 
 	(void)printf(", length %u: ", length);
@@ -87,7 +91,6 @@
 	u_int caplen = h->caplen;
 	struct firewire_header *fp;
 	u_short ether_type;
-	u_short extracted_ether_type;
 
 	if (caplen < FIREWIRE_HDRLEN) {
 		printf("[|ap1394]");
@@ -102,11 +105,8 @@
 	fp = (struct firewire_header *)p;
 	p += FIREWIRE_HDRLEN;
 
-	ether_type = ntohs(fp->firewire_type);
-
-	extracted_ether_type = 0;
-	if (ether_encap_print(ether_type, p, length, caplen,
-	    &extracted_ether_type) == 0) {
+	ether_type = EXTRACT_16BITS(&fp->firewire_type);
+	if (ethertype_print(gndo, ether_type, p, length, caplen) == 0) {
 		/* ether_type not known, print raw packet */
 		if (!eflag)
 			ap1394_hdr_print((u_char *)fp, length + FIREWIRE_HDRLEN);
diff --git a/print-arcnet.c b/print-arcnet.c
index 63f9c21..2d60537 100644
--- a/print-arcnet.c
+++ b/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
@@ -35,12 +35,13 @@
 #include <pcap.h>
 
 #include "interface.h"
+#include "extract.h"
 #include "arcnet.h"
 
 static int arcnet_encap_print(u_char arctype, const u_char *p,
     u_int length, u_int caplen);
 
-struct tok arctypemap[] = {
+static const struct tok arctypemap[] = {
 	{ ARCTYPE_IP_OLD,	"oldip" },
 	{ ARCTYPE_ARP_OLD,	"oldarp" },
 	{ ARCTYPE_IP,		"ip" },
@@ -151,11 +152,11 @@
 				return (caplen);
 			}
 			flag = ap->arc_flag2;
-			seqid = ntohs(ap->arc_seqid2);
+			seqid = EXTRACT_16BITS(&ap->arc_seqid2);
 			archdrlen = ARC_HDRNEWLEN_EXC;
 		} else {
 			flag = ap->arc_flag;
-			seqid = ntohs(ap->arc_seqid);
+			seqid = EXTRACT_16BITS(&ap->arc_seqid);
 			archdrlen = ARC_HDRNEWLEN;
 		}
 	}
@@ -264,14 +265,14 @@
 
 #ifdef INET6
 	case ARCTYPE_INET6:
-		ip6_print(p, length);
+		ip6_print(gndo, p, length);
 		return (1);
 #endif /*INET6*/
 
 	case ARCTYPE_ARP_OLD:
 	case ARCTYPE_ARP:
 	case ARCTYPE_REVARP:
-	  arp_print(gndo, p, length, caplen);
+		arp_print(gndo, p, length, caplen);
 		return (1);
 
 	case ARCTYPE_ATALK:	/* XXX was this ever used? */
diff --git a/print-arp.c b/print-arp.c
index 68e9dc6..b5047a0 100644
--- a/print-arp.c
+++ b/print-arp.c
@@ -21,7 +21,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
@@ -49,24 +49,27 @@
  * 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.
@@ -86,8 +89,8 @@
 #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))
@@ -95,6 +98,29 @@
 #define THA(ap) (ar_tha(ap))
 #define TPA(ap) (ar_tpa(ap))
 
+
+static const 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 }
+};
+
+static const 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.
  *
@@ -104,20 +130,18 @@
  * 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.
@@ -132,19 +156,19 @@
 #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))
 };
 
@@ -165,10 +189,10 @@
 	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)));
 	}
 }
 
@@ -186,69 +210,86 @@
 	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
@@ -256,81 +297,116 @@
 	  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;
+            break;
+        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/print-ascii.c b/print-ascii.c
index cd48edd..f09aa98 100644
--- a/print-ascii.c
+++ b/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>
@@ -65,11 +65,25 @@
 	while (length > 0) {
 		s = *cp++;
 		length--;
-		if (!isgraph(s) &&
-		    (s != '\t' && s != ' ' && s != '\n' && s != '\r'))
-			putchar('.');
-		else
-			putchar(s);
+		if (s == '\r') {
+			/*
+			 * Don't print CRs at the end of the line; they
+			 * don't belong at the ends of lines on UN*X,
+			 * and the standard I/O library will give us one
+			 * on Windows so we don't need to print one
+			 * ourselves.
+			 *
+			 * In the middle of a line, just print a '.'.
+			 */
+			if (length > 1 && *cp != '\n')
+				putchar('.');
+		} else {
+			if (!ND_ISGRAPH(s) &&
+			    (s != '\t' && s != ' ' && s != '\n'))
+				putchar('.');
+			else
+				putchar(s);
+		}
 	}
 }
 
@@ -92,8 +106,8 @@
 		(void)snprintf(hsp, sizeof(hexstuff) - (hsp - hexstuff),
 		    " %02x%02x", s1, s2);
 		hsp += HEXDUMP_HEXSTUFF_PER_SHORT;
-		*(asp++) = (isgraph(s1) ? s1 : '.');
-		*(asp++) = (isgraph(s2) ? s2 : '.');
+		*(asp++) = (ND_ISGRAPH(s1) ? s1 : '.');
+		*(asp++) = (ND_ISGRAPH(s2) ? s2 : '.');
 		i++;
 		if (i >= HEXDUMP_SHORTS_PER_LINE) {
 			*hsp = *asp = '\0';
@@ -109,7 +123,7 @@
 		(void)snprintf(hsp, sizeof(hexstuff) - (hsp - hexstuff),
 		    " %02x", s1);
 		hsp += 3;
-		*(asp++) = (isgraph(s1) ? s1 : '.');
+		*(asp++) = (ND_ISGRAPH(s1) ? s1 : '.');
 		++i;
 	}
 	if (i > 0) {
diff --git a/print-atalk.c b/print-atalk.c
index f1f45a3..be1c154 100644
--- a/print-atalk.c
+++ b/print-atalk.c
@@ -23,7 +23,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
@@ -43,7 +43,7 @@
 #include "extract.h"			/* must come after interface.h */
 #include "appletalk.h"
 
-static struct tok type2str[] = {
+static const struct tok type2str[] = {
 	{ ddpRTMP,		"rtmp" },
 	{ ddpRTMPrequest,	"rtmpReq" },
 	{ ddpECHO,		"echo" },
@@ -99,14 +99,10 @@
 	u_short snet;
 	u_int hdrlen;
 
-	/*
-	 * Our packet is on a 4-byte boundary, as we're either called
-	 * directly from a top-level link-layer printer (ltalk_if_print)
-	 * or from the UDP printer.  The LLAP+DDP header is a multiple
-	 * of 4 bytes in length, so the DDP payload is also on a 4-byte
-	 * boundary, and we don't need to align it before calling
-	 * "ddp_print()".
-	 */
+	if (length < sizeof(*lp)) {
+		(void)printf(" [|llap %u]", length);
+		return (length);
+	}
 	lp = (const struct LAP *)bp;
 	bp += sizeof(*lp);
 	length -= sizeof(*lp);
@@ -115,7 +111,7 @@
 
 	case lapShortDDP:
 		if (length < ddpSSize) {
-			(void)printf(" [|sddp %d]", length);
+			(void)printf(" [|sddp %u]", length);
 			return (length);
 		}
 		sdp = (const struct atShortDDP *)bp;
@@ -131,7 +127,7 @@
 
 	case lapDDP:
 		if (length < ddpSize) {
-			(void)printf(" [|ddp %d]", length);
+			(void)printf(" [|ddp %u]", length);
 			return (length);
 		}
 		dp = (const struct atDDP *)bp;
@@ -154,7 +150,7 @@
 #endif
 
 	default:
-		printf("%d > %d at-lap#%d %d",
+		printf("%d > %d at-lap#%d %u",
 		    lp->src, lp->dst, lp->type, length);
 		break;
 	}
@@ -176,7 +172,7 @@
             printf("AT ");
 
 	if (length < ddpSize) {
-		(void)printf(" [|ddp %d]", length);
+		(void)printf(" [|ddp %u]", length);
 		return;
 	}
 	dp = (const struct atDDP *)bp;
@@ -213,7 +209,7 @@
 
 		case 2:				/* response */
 			(void)printf("reply %s is-at %s",
-			    AT(pdaddr), etheraddr_string(ap->hdaddr));
+			    AT(psaddr), etheraddr_string(ap->hsaddr));
 			return;
 
 		case 3:				/* probe (oy!) */
@@ -265,6 +261,10 @@
 		fputs(tstr, stdout);
 		return;
 	}
+	if (length < sizeof(*ap)) {
+		(void)printf(" [|atp %u]", length);
+		return;
+	}
 	length -= sizeof(*ap);
 	switch (ap->control & 0xc0) {
 
@@ -276,7 +276,7 @@
 		atp_bitmap_print(ap->bitmap);
 
 		if (length != 0)
-			(void)printf(" [len=%d]", length);
+			(void)printf(" [len=%u]", length);
 
 		switch (ap->control & (atpEOM|atpSTS)) {
 		case atpEOM:
@@ -292,7 +292,7 @@
 		break;
 
 	case atpRspCode:
-		(void)printf(" atp-resp%s%d:%d (%d)",
+		(void)printf(" atp-resp%s%d:%d (%u)",
 			     ap->control & atpEOM? "*" : " ",
 			     EXTRACT_16BITS(&ap->transID), ap->bitmap, length);
 		switch (ap->control & (atpXO|atpSTS)) {
@@ -315,7 +315,7 @@
 
 		/* length should be zero */
 		if (length)
-			(void)printf(" [len=%d]", length);
+			(void)printf(" [len=%u]", length);
 
 		/* there shouldn't be any control flags */
 		if (ap->control & (atpXO|atpEOM|atpSTS)) {
@@ -337,7 +337,7 @@
 		break;
 
 	default:
-		(void)printf(" atp-0x%x  %d (%d)", ap->control,
+		(void)printf(" atp-0x%x  %d (%u)", ap->control,
 			     EXTRACT_16BITS(&ap->transID), length);
 		break;
 	}
@@ -387,14 +387,14 @@
 	const u_char *ep;
 
 	if (length < nbpHeaderSize) {
-		(void)printf(" truncated-nbp %d", length);
+		(void)printf(" truncated-nbp %u", length);
 		return;
 	}
 
 	length -= nbpHeaderSize;
 	if (length < 8) {
 		/* must be room for at least one tuple */
-		(void)printf(" truncated-nbp %d", length + nbpHeaderSize);
+		(void)printf(" truncated-nbp %u", length + nbpHeaderSize);
 		return;
 	}
 	/* ep points to end of available data */
@@ -439,7 +439,7 @@
 		break;
 
 	default:
-		(void)printf(" nbp-0x%x  %d (%d)", np->control, np->id,
+		(void)printf(" nbp-0x%x  %d (%u)", np->control, np->id,
 				length);
 		break;
 	}
@@ -540,7 +540,7 @@
 {
 	register struct hnamemem *tp, *tp2;
 	register int i = (atnet << 8) | athost;
-	char nambuf[MAXHOSTNAMELEN + 20];
+	char nambuf[256+1];
 	static int first = 1;
 	FILE *fp;
 
@@ -551,26 +551,24 @@
 	if (first && (first = 0, !nflag)
 	    && (fp = fopen("/etc/atalk.names", "r"))) {
 		char line[256];
-		int i1, i2, i3;
+		int i1, i2;
 
 		while (fgets(line, sizeof(line), fp)) {
 			if (line[0] == '\n' || line[0] == 0 || line[0] == '#')
 				continue;
-			if (sscanf(line, "%d.%d.%d %256s", &i1, &i2, &i3,
-				     nambuf) == 4)
+			if (sscanf(line, "%d.%d %256s", &i1, &i2, nambuf) == 3)
 				/* got a hostname. */
-				i3 |= ((i1 << 8) | i2) << 8;
-			else if (sscanf(line, "%d.%d %256s", &i1, &i2,
-					nambuf) == 3)
+				i2 |= (i1 << 8);
+			else if (sscanf(line, "%d %256s", &i1, nambuf) == 2)
 				/* got a net name */
-				i3 = (((i1 << 8) | i2) << 8) | 255;
+				i2 = (i1 << 8) | 255;
 			else
 				continue;
 
-			for (tp = &hnametable[i3 & (HASHNAMESIZE-1)];
+			for (tp = &hnametable[i2 & (HASHNAMESIZE-1)];
 			     tp->nxt; tp = tp->nxt)
 				;
-			tp->addr = i3;
+			tp->addr = i2;
 			tp->nxt = newhnamemem();
 			tp->name = strdup(nambuf);
 		}
@@ -596,17 +594,15 @@
 	tp->addr = (atnet << 8) | athost;
 	tp->nxt = newhnamemem();
 	if (athost != 255)
-		(void)snprintf(nambuf, sizeof(nambuf), "%d.%d.%d",
-		    atnet >> 8, atnet & 0xff, athost);
+		(void)snprintf(nambuf, sizeof(nambuf), "%d.%d", atnet, athost);
 	else
-		(void)snprintf(nambuf, sizeof(nambuf), "%d.%d", atnet >> 8,
-		    atnet & 0xff);
+		(void)snprintf(nambuf, sizeof(nambuf), "%d", atnet);
 	tp->name = strdup(nambuf);
 
 	return (tp->name);
 }
 
-static struct tok skt2str[] = {
+static const struct tok skt2str[] = {
 	{ rtmpSkt,	"rtmp" },	/* routing table maintenance */
 	{ nbpSkt,	"nis" },	/* name info socket */
 	{ echoSkt,	"echo" },	/* AppleTalk echo protocol */
diff --git a/print-atm.c b/print-atm.c
index d664d6e..b132a6d 100644
--- a/print-atm.c
+++ b/print-atm.c
@@ -20,7 +20,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.49 2007-10-22 19:37:51 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -43,41 +43,75 @@
 
 #include "ether.h"
 
-struct tok oam_f_values[] = {
-    { OAMF4SC, "OAM F4 (segment)" },
-    { OAMF4EC, "OAM F4 (end)" },
+#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
+
+static const struct tok oam_f_values[] = {
+    { VCI_OAMF4SC, "OAM F4 (segment)" },
+    { VCI_OAMF4EC, "OAM F4 (end)" },
     { 0, NULL }
 };
 
-struct tok oam_celltype_values[] = {
-    { 0x1, "Fault Management" },
-    { 0x2, "Performance Management" },
-    { 0x8, "activate/deactivate" },
-    { 0xf, "System Management" },
+static const 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 }
 };
 
-struct tok oam_fm_functype_values[] = {
-    { 0x0, "AIS" },
-    { 0x1, "RDI" },
-    { 0x4, "Continuity Check" },
-    { 0x8, "Loopback" },
+#define OAM_CELLTYPE_FM 0x1
+#define OAM_CELLTYPE_PM 0x2
+#define OAM_CELLTYPE_AD 0x8
+#define OAM_CELLTYPE_SM 0xf
+
+static const struct tok oam_celltype_values[] = {
+    { OAM_CELLTYPE_FM, "Fault Management" },
+    { OAM_CELLTYPE_PM, "Performance Management" },
+    { OAM_CELLTYPE_AD, "activate/deactivate" },
+    { OAM_CELLTYPE_SM, "System Management" },
     { 0, NULL }
 };
 
-struct tok oam_pm_functype_values[] = {
+#define OAM_FM_FUNCTYPE_AIS       0x0
+#define OAM_FM_FUNCTYPE_RDI       0x1
+#define OAM_FM_FUNCTYPE_CONTCHECK 0x4
+#define OAM_FM_FUNCTYPE_LOOPBACK  0x8
+
+static const struct tok oam_fm_functype_values[] = {
+    { OAM_FM_FUNCTYPE_AIS, "AIS" },
+    { OAM_FM_FUNCTYPE_RDI, "RDI" },
+    { OAM_FM_FUNCTYPE_CONTCHECK, "Continuity Check" },
+    { OAM_FM_FUNCTYPE_LOOPBACK, "Loopback" },
+    { 0, NULL }
+};
+
+static const struct tok oam_pm_functype_values[] = {
     { 0x0, "Forward Monitoring" },
     { 0x1, "Backward Reporting" },
     { 0x2, "Monitoring and Reporting" },
     { 0, NULL }
 };
 
-struct tok oam_ad_functype_values[] = {
+static const struct tok oam_ad_functype_values[] = {
     { 0x0, "Performance Monitoring" },
     { 0x1, "Continuity Check" },
     { 0, NULL }
 };
 
+#define OAM_FM_LOOPBACK_INDICATOR_MASK 0x1
+
+static const 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 */
@@ -195,7 +229,7 @@
 /*
  * ATM signalling.
  */
-static struct tok msgtype2str[] = {
+static const struct tok msgtype2str[] = {
 	{ CALL_PROCEED,		"Call_proceeding" },
 	{ CONNECT,		"Connect" },
 	{ CONNECT_ACK,		"Connect_ack" },
@@ -236,10 +270,12 @@
 		printf(":%s ",
 		    tok2str(msgtype2str, "msgtype#%d", p[MSG_TYPE_POS]));
 
-		if (caplen < CALL_REF_POS+3) {
-			printf("[|atm]");
-			return;
-		}
+		/*
+		 * The call reference comes before the message type,
+		 * so if we know we have the message type, which we
+		 * do from the caplen test above, we also know we have
+		 * the call reference.
+		 */
 		call_ref = EXTRACT_24BITS(&p[CALL_REF_POS]);
 		printf("CALL_REF:0x%06x", call_ref);
 	} else {
@@ -261,24 +297,24 @@
 	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;
@@ -301,26 +337,53 @@
 	}
 }
 
+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);
 
-    printf("cell-type %s (%u)",
+    if (!vflag) {
+        return 1;
+    }
+
+    printf("\n\tcell-type %s (%u)",
            tok2str(oam_celltype_values, "unknown", cell_type),
            cell_type);
 
@@ -328,9 +391,61 @@
         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/print-babel.c b/print-babel.c
new file mode 100644
index 0000000..4c77a0c
--- /dev/null
+++ b/print-babel.c
@@ -0,0 +1,556 @@
+/*
+ * Copyright (c) 2007-2011 Grégoire Henry, Juliusz Chroboczek
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project 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 BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "addrtoname.h"
+#include "interface.h"
+#include "extract.h"
+
+static void babel_print_v2(const u_char *cp, u_int length);
+
+void
+babel_print(const u_char *cp, u_int length) {
+    printf("babel");
+
+    TCHECK2(*cp, 4);
+
+    if(cp[0] != 42) {
+        printf(" malformed header");
+        return;
+    } else {
+        printf(" %d", cp[1]);
+    }
+
+    switch(cp[1]) {
+    case 2:
+        babel_print_v2(cp,length);
+        break;
+    default:
+        printf(" unknown version");
+        break;
+    }
+
+    return;
+
+ trunc:
+    printf(" [|babel]");
+    return;
+}
+
+/* TLVs */
+#define MESSAGE_PAD1 0
+#define MESSAGE_PADN 1
+#define MESSAGE_ACK_REQ 2
+#define MESSAGE_ACK 3
+#define MESSAGE_HELLO 4
+#define MESSAGE_IHU 5
+#define MESSAGE_ROUTER_ID 6
+#define MESSAGE_NH 7
+#define MESSAGE_UPDATE 8
+#define MESSAGE_REQUEST 9
+#define MESSAGE_MH_REQUEST 10
+#define MESSAGE_TSPC 11
+#define MESSAGE_HMAC 12
+
+/* sub-TLVs */
+#define MESSAGE_SUB_PAD1 0
+#define MESSAGE_SUB_PADN 1
+#define MESSAGE_SUB_DIVERSITY 2
+
+/* Diversity sub-TLV channel codes */
+static const struct tok diversity_str[] = {
+    { 0,   "reserved" },
+    { 255, "all"      },
+    { 0, NULL }
+};
+
+static const char *
+format_id(const u_char *id)
+{
+    static char buf[25];
+    snprintf(buf, 25, "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",
+             id[0], id[1], id[2], id[3], id[4], id[5], id[6], id[7]);
+    buf[24] = '\0';
+    return buf;
+}
+
+static const unsigned char v4prefix[16] =
+    {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0, 0, 0, 0 };
+
+static const char *
+format_prefix(const u_char *prefix, unsigned char plen)
+{
+    static char buf[50];
+    if(plen >= 96 && memcmp(prefix, v4prefix, 12) == 0)
+        snprintf(buf, 50, "%s/%u", ipaddr_string(prefix + 12), plen - 96);
+    else
+#ifdef INET6
+        snprintf(buf, 50, "%s/%u", ip6addr_string(prefix), plen);
+#else
+        snprintf(buf, 50, "IPv6 addresses not supported");
+#endif
+    buf[49] = '\0';
+    return buf;
+}
+
+static const char *
+format_address(const u_char *prefix)
+{
+    if(memcmp(prefix, v4prefix, 12) == 0)
+        return ipaddr_string(prefix + 12);
+    else
+#ifdef INET6
+        return ip6addr_string(prefix);
+#else
+        return "IPv6 addresses not supported";
+#endif
+}
+
+static const char *
+format_interval(const u_int16_t i)
+{
+    static char buf[sizeof("0000.0s")];
+
+    if (i == 0)
+        return "0.0s (bogus)";
+    snprintf(buf, sizeof(buf), "%u.%us", i / 10, i % 10);
+    return buf;
+}
+
+static const char *
+format_interval_update(const u_int16_t i)
+{
+    return i == 0xFFFF ? "infinity" : format_interval(i);
+}
+
+/* Return number of octets consumed from the input buffer (not the prefix length
+ * in bytes), or -1 for encoding error. */
+static int
+network_prefix(int ae, int plen, unsigned int omitted,
+               const unsigned char *p, const unsigned char *dp,
+               unsigned int len, unsigned char *p_r)
+{
+    unsigned pb;
+    unsigned char prefix[16];
+    int consumed = 0;
+
+    if(plen >= 0)
+        pb = (plen + 7) / 8;
+    else if(ae == 1)
+        pb = 4;
+    else
+        pb = 16;
+
+    if(pb > 16)
+        return -1;
+
+    memset(prefix, 0, 16);
+
+    switch(ae) {
+    case 0: break;
+    case 1:
+        if(omitted > 4 || pb > 4 || (pb > omitted && len < pb - omitted))
+            return -1;
+        memcpy(prefix, v4prefix, 12);
+        if(omitted) {
+            if (dp == NULL) return -1;
+            memcpy(prefix, dp, 12 + omitted);
+        }
+        if(pb > omitted) {
+            memcpy(prefix + 12 + omitted, p, pb - omitted);
+            consumed = pb - omitted;
+        }
+        break;
+    case 2:
+        if(omitted > 16 || (pb > omitted && len < pb - omitted))
+            return -1;
+        if(omitted) {
+            if (dp == NULL) return -1;
+            memcpy(prefix, dp, omitted);
+        }
+        if(pb > omitted) {
+            memcpy(prefix + omitted, p, pb - omitted);
+            consumed = pb - omitted;
+        }
+        break;
+    case 3:
+        if(pb > 8 && len < pb - 8) return -1;
+        prefix[0] = 0xfe;
+        prefix[1] = 0x80;
+        if(pb > 8) {
+            memcpy(prefix + 8, p, pb - 8);
+            consumed = pb - 8;
+        }
+        break;
+    default:
+        return -1;
+    }
+
+    memcpy(p_r, prefix, 16);
+    return consumed;
+}
+
+static int
+network_address(int ae, const unsigned char *a, unsigned int len,
+                unsigned char *a_r)
+{
+    return network_prefix(ae, -1, 0, a, NULL, len, a_r);
+}
+
+/*
+ * Sub-TLVs consume the "extra data" of Babel TLVs (see Section 4.3 of RFC6126),
+ * their encoding is similar to the encoding of TLVs, but the type namespace is
+ * different:
+ *
+ * o Type 0 stands for Pad1 sub-TLV with the same encoding as the Pad1 TLV.
+ * o Type 1 stands for PadN sub-TLV with the same encoding as the PadN TLV.
+ * o Type 2 stands for Diversity sub-TLV, which propagates diversity routing
+ *   data. Its body is a variable-length sequence of 8-bit unsigned integers,
+ *   each representing per-hop number of interferring radio channel for the
+ *   prefix. Channel 0 is invalid and must not be used in the sub-TLV, channel
+ *   255 interferes with any other channel.
+ *
+ * Sub-TLV types 0 and 1 are valid for any TLV type, whether sub-TLV type 2 is
+ * only valid for TLV type 8 (Update). Note that within an Update TLV a missing
+ * Diversity sub-TLV is not the same as a Diversity sub-TLV with an empty body.
+ * The former would mean a lack of any claims about the interference, and the
+ * latter would state that interference is definitely absent. */
+static void
+subtlvs_print(const u_char *cp, const u_char *ep, const uint8_t tlv_type) {
+    uint8_t subtype, sublen;
+    const char *sep;
+
+    while (cp < ep) {
+        subtype = *cp++;
+        if(subtype == MESSAGE_SUB_PAD1) {
+            printf(" sub-pad1");
+            continue;
+        }
+        if(cp == ep)
+            goto corrupt;
+        sublen = *cp++;
+        if(cp + sublen > ep)
+            goto corrupt;
+
+        switch(subtype) {
+        case MESSAGE_SUB_PADN:
+            printf(" sub-padn");
+            cp += sublen;
+            break;
+        case MESSAGE_SUB_DIVERSITY:
+            printf(" sub-diversity");
+            if (sublen == 0) {
+                printf(" empty");
+                break;
+            }
+            sep = " ";
+            while(sublen--) {
+                printf("%s%s", sep, tok2str(diversity_str, "%u", *cp++));
+                sep = "-";
+            }
+            if(tlv_type != MESSAGE_UPDATE)
+                printf(" (bogus)");
+            break;
+        default:
+            printf(" sub-unknown-0x%02x", subtype);
+            cp += sublen;
+        } /* switch */
+    } /* while */
+    return;
+
+ corrupt:
+    printf(" (corrupt)");
+}
+
+#define ICHECK(i, l) \
+	if ((i) + (l) > bodylen || (i) + (l) > length) goto corrupt;
+
+static void
+babel_print_v2(const u_char *cp, u_int length) {
+    u_int i;
+    u_short bodylen;
+    u_char v4_prefix[16] =
+        {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF, 0, 0, 0, 0 };
+    u_char v6_prefix[16] = {0};
+
+    TCHECK2(*cp, 4);
+    if (length < 4)
+        goto corrupt;
+    bodylen = EXTRACT_16BITS(cp + 2);
+    printf(" (%u)", bodylen);
+
+    /* Process the TLVs in the body */
+    i = 0;
+    while(i < bodylen) {
+        const u_char *message;
+        u_int type, len;
+
+        message = cp + 4 + i;
+
+        TCHECK2(*message, 1);
+        if((type = message[0]) == MESSAGE_PAD1) {
+            printf(vflag ? "\n\tPad 1" : " pad1");
+            i += 1;
+            continue;
+        }
+
+        TCHECK2(*message, 2);
+        ICHECK(i, 2);
+        len = message[1];
+
+        TCHECK2(*message, 2 + len);
+        ICHECK(i, 2 + len);
+
+        switch(type) {
+        case MESSAGE_PADN: {
+            if(!vflag)
+                printf(" padN");
+            else
+                printf("\n\tPad %d", len + 2);
+        }
+            break;
+
+        case MESSAGE_ACK_REQ: {
+            u_short nonce, interval;
+            if(!vflag)
+                printf(" ack-req");
+            else {
+                printf("\n\tAcknowledgment Request ");
+                if(len < 6) goto corrupt;
+                nonce = EXTRACT_16BITS(message + 4);
+                interval = EXTRACT_16BITS(message + 6);
+                printf("%04x %s", nonce, format_interval(interval));
+            }
+        }
+            break;
+
+        case MESSAGE_ACK: {
+            u_short nonce;
+            if(!vflag)
+                printf(" ack");
+            else {
+                printf("\n\tAcknowledgment ");
+                if(len < 2) goto corrupt;
+                nonce = EXTRACT_16BITS(message + 2);
+                printf("%04x", nonce);
+            }
+        }
+            break;
+
+        case MESSAGE_HELLO:  {
+            u_short seqno, interval;
+            if(!vflag)
+                printf(" hello");
+            else {
+                printf("\n\tHello ");
+                if(len < 6) goto corrupt;
+                seqno = EXTRACT_16BITS(message + 4);
+                interval = EXTRACT_16BITS(message + 6);
+                printf("seqno %u interval %s", seqno, format_interval(interval));
+            }
+        }
+            break;
+
+        case MESSAGE_IHU: {
+            unsigned short txcost, interval;
+            if(!vflag)
+                printf(" ihu");
+            else {
+                u_char address[16];
+                int rc;
+                printf("\n\tIHU ");
+                if(len < 6) goto corrupt;
+                txcost = EXTRACT_16BITS(message + 4);
+                interval = EXTRACT_16BITS(message + 6);
+                rc = network_address(message[2], message + 8, len - 6, address);
+                if(rc < 0) { printf("[|babel]"); break; }
+                printf("%s txcost %u interval %s",
+                       format_address(address), txcost, format_interval(interval));
+            }
+        }
+            break;
+
+        case MESSAGE_ROUTER_ID: {
+            if(!vflag)
+                printf(" router-id");
+            else {
+                printf("\n\tRouter Id");
+                if(len < 10) goto corrupt;
+                printf(" %s", format_id(message + 4));
+            }
+        }
+            break;
+
+        case MESSAGE_NH: {
+            if(!vflag)
+                printf(" nh");
+            else {
+                int rc;
+                u_char nh[16];
+                printf("\n\tNext Hop");
+                if(len < 2) goto corrupt;
+                rc = network_address(message[2], message + 4, len - 2, nh);
+                if(rc < 0) goto corrupt;
+                printf(" %s", format_address(nh));
+            }
+        }
+            break;
+
+        case MESSAGE_UPDATE: {
+            if(!vflag) {
+                printf(" update");
+                if(len < 1)
+                    printf("/truncated");
+                else
+                    printf("%s%s%s",
+                           (message[3] & 0x80) ? "/prefix": "",
+                           (message[3] & 0x40) ? "/id" : "",
+                           (message[3] & 0x3f) ? "/unknown" : "");
+            } else {
+                u_short interval, seqno, metric;
+                u_char plen;
+                int rc;
+                u_char prefix[16];
+                printf("\n\tUpdate");
+                if(len < 10) goto corrupt;
+                plen = message[4] + (message[2] == 1 ? 96 : 0);
+                rc = network_prefix(message[2], message[4], message[5],
+                                    message + 12,
+                                    message[2] == 1 ? v4_prefix : v6_prefix,
+                                    len - 10, prefix);
+                if(rc < 0) goto corrupt;
+                interval = EXTRACT_16BITS(message + 6);
+                seqno = EXTRACT_16BITS(message + 8);
+                metric = EXTRACT_16BITS(message + 10);
+                printf("%s%s%s %s metric %u seqno %u interval %s",
+                       (message[3] & 0x80) ? "/prefix": "",
+                       (message[3] & 0x40) ? "/id" : "",
+                       (message[3] & 0x3f) ? "/unknown" : "",
+                       format_prefix(prefix, plen),
+                       metric, seqno, format_interval_update(interval));
+                if(message[3] & 0x80) {
+                    if(message[2] == 1)
+                        memcpy(v4_prefix, prefix, 16);
+                    else
+                        memcpy(v6_prefix, prefix, 16);
+                }
+                /* extra data? */
+                if((u_int)rc < len - 10)
+                    subtlvs_print(message + 12 + rc, message + 2 + len, type);
+            }
+        }
+            break;
+
+        case MESSAGE_REQUEST: {
+            if(!vflag)
+                printf(" request");
+            else {
+                int rc;
+                u_char prefix[16], plen;
+                printf("\n\tRequest ");
+                if(len < 2) goto corrupt;
+                plen = message[3] + (message[2] == 1 ? 96 : 0);
+                rc = network_prefix(message[2], message[3], 0,
+                                    message + 4, NULL, len - 2, prefix);
+                if(rc < 0) goto corrupt;
+                plen = message[3] + (message[2] == 1 ? 96 : 0);
+                printf("for %s",
+                       message[2] == 0 ? "any" : format_prefix(prefix, plen));
+            }
+        }
+            break;
+
+        case MESSAGE_MH_REQUEST : {
+            if(!vflag)
+                printf(" mh-request");
+            else {
+                int rc;
+                u_short seqno;
+                u_char prefix[16], plen;
+                printf("\n\tMH-Request ");
+                if(len < 14) goto corrupt;
+                seqno = EXTRACT_16BITS(message + 4);
+                rc = network_prefix(message[2], message[3], 0,
+                                    message + 16, NULL, len - 14, prefix);
+                if(rc < 0) goto corrupt;
+                plen = message[3] + (message[2] == 1 ? 96 : 0);
+                printf("(%u hops) for %s seqno %u id %s",
+                       message[6], format_prefix(prefix, plen),
+                       seqno, format_id(message + 8));
+            }
+        }
+            break;
+        case MESSAGE_TSPC :
+            if(!vflag)
+                printf(" tspc");
+            else {
+                printf("\n\tTS/PC ");
+                if(len < 6) goto corrupt;
+                printf("timestamp %u packetcounter %u", EXTRACT_32BITS (message + 4),
+                       EXTRACT_16BITS(message + 2));
+            }
+            break;
+        case MESSAGE_HMAC : {
+            if(!vflag)
+                printf(" hmac");
+            else {
+                unsigned j;
+                printf("\n\tHMAC ");
+                if(len < 18) goto corrupt;
+                printf("key-id %u digest-%u ", EXTRACT_16BITS(message + 2), len - 2);
+                for (j = 0; j < len - 2; j++)
+                    printf ("%02X", message[4 + j]);
+            }
+        }
+            break;
+        default:
+            if(!vflag)
+                printf(" unknown");
+            else
+                printf("\n\tUnknown message type %d", type);
+        }
+        i += len + 2;
+    }
+    return;
+
+ trunc:
+    printf(" [|babel]");
+    return;
+
+ corrupt:
+    printf(" (corrupt)");
+    return;
+}
diff --git a/print-beep.c b/print-beep.c
index db40d61..b476dbf 100644
--- a/print-beep.c
+++ b/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/print-bfd.c b/print-bfd.c
index 03e59dc..f157684 100644
--- a/print-bfd.c
+++ b/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
@@ -171,13 +171,17 @@
 {
         const struct bfd_header_t *bfd_header;
         const struct bfd_auth_header_t *bfd_auth_header;
-        u_int8_t version;
+        u_int8_t version = 0;
 
         bfd_header = (const struct bfd_header_t *)pptr;
-        TCHECK(*bfd_header);
-        version = BFD_EXTRACT_VERSION(bfd_header->version_diag);
-
-        switch (port << 8 | version) {
+        if (port == BFD_CONTROL_PORT) {
+            TCHECK(*bfd_header);
+            version = BFD_EXTRACT_VERSION(bfd_header->version_diag);
+        } else if (port == BFD_ECHO_PORT) {
+            /* Echo is BFD v1 only */
+            version = 1;
+        }
+        switch ((port << 8) | version) {
 
             /* BFDv0 */
         case (BFD_CONTROL_PORT << 8):
diff --git a/print-bgp.c b/print-bgp.c
index 34aa798..2ad7cbc 100644
--- a/print-bgp.c
+++ b/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.118 2007-12-07 15:54:52 hannes Exp $";
 #endif
 
 #include <tcpdump-stdinc.h>
@@ -49,8 +49,8 @@
 #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];
@@ -65,7 +65,7 @@
 #define BGP_KEEPALIVE		4
 #define BGP_ROUTE_REFRESH       5
 
-static struct tok bgp_msg_values[] = {
+static const struct tok bgp_msg_values[] = {
     { BGP_OPEN,                 "Open"},
     { BGP_UPDATE,               "Update"},
     { BGP_NOTIFICATION,         "Notification"},
@@ -93,8 +93,7 @@
 	/* variable length */
 };
 #define BGP_OPT_SIZE		2	/* some compilers may pad to 4 bytes */
-
-#define BGP_UPDATE_MINSIZE      23
+#define BGP_CAP_HEADER_SIZE	2	/* some compilers may pad to 4 bytes */
 
 struct bgp_notification {
 	u_int8_t bgpn_marker[16];
@@ -115,19 +114,10 @@
 };                    /* EXTRACT_16BITS(&bgp_route_refresh->afi) (sigh)      */ 
 #define BGP_ROUTE_REFRESH_SIZE          23
 
-struct bgp_attr {
-	u_int8_t bgpa_flags;
-	u_int8_t bgpa_type;
-	union {
-		u_int8_t len;
-		u_int16_t elen;
-	} bgpa_len;
-#define bgp_attr_len(p) \
-	(((p)->bgpa_flags & 0x10) ? \
-		EXTRACT_16BITS(&(p)->bgpa_len.elen) : (p)->bgpa_len.len)
-#define bgp_attr_off(p) \
-	(((p)->bgpa_flags & 0x10) ? 4 : 3)
-};
+#define bgp_attr_lenlen(flags, p) \
+	(((flags) & 0x10) ? 2 : 1)
+#define bgp_attr_len(flags, p) \
+	(((flags) & 0x10) ? EXTRACT_16BITS(p) : *(p))
 
 #define BGPTYPE_ORIGIN			1
 #define BGPTYPE_AS_PATH			2
@@ -145,18 +135,23 @@
 #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 */
 
-static struct tok bgp_attr_values[] = {
+static const 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 +161,7 @@
     { 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,7 +172,10 @@
 #define BGP_CONFED_AS_SEQUENCE 3 /* draft-ietf-idr-rfc3065bis-01 */
 #define BGP_CONFED_AS_SET      4 /* draft-ietf-idr-rfc3065bis-01  */
 
-static struct tok bgp_as_path_segment_open_values[] = {
+#define BGP_AS_SEG_TYPE_MIN    BGP_AS_SET
+#define BGP_AS_SEG_TYPE_MAX    BGP_CONFED_AS_SET
+
+static const struct tok bgp_as_path_segment_open_values[] = {
     { BGP_AS_SEQUENCE,         ""},
     { BGP_AS_SET,              "{ "},
     { BGP_CONFED_AS_SEQUENCE,  "( "},
@@ -184,7 +183,7 @@
     { 0, NULL}
 };
 
-static struct tok bgp_as_path_segment_close_values[] = {
+static const struct tok bgp_as_path_segment_close_values[] = {
     { BGP_AS_SEQUENCE,         ""},
     { BGP_AS_SET,              "}"},
     { BGP_CONFED_AS_SEQUENCE,  ")"},
@@ -196,7 +195,7 @@
 #define BGP_OPT_CAP                     2
 
 
-static struct tok bgp_opt_values[] = {
+static const struct tok bgp_opt_values[] = {
     { BGP_OPT_AUTH,             "Authentication Information"},
     { BGP_OPT_CAP,              "Capabilities Advertisement"},
     { 0, NULL}
@@ -210,7 +209,7 @@
 #define BGP_CAPCODE_DYN_CAP            67 /* XXX */
 #define BGP_CAPCODE_RR_CISCO          128
 
-static struct tok bgp_capcode_values[] = {
+static const struct tok bgp_capcode_values[] = {
     { BGP_CAPCODE_MP,           "Multiprotocol Extensions"},
     { BGP_CAPCODE_RR,           "Route Refresh"},
     { BGP_CAPCODE_ORF,          "Cooperative Route Filtering"},
@@ -229,7 +228,7 @@
 #define BGP_NOTIFY_MAJOR_CEASE          6
 #define BGP_NOTIFY_MAJOR_CAP            7
 
-static struct tok bgp_notify_major_values[] = {
+static const struct tok bgp_notify_major_values[] = {
     { BGP_NOTIFY_MAJOR_MSG,     "Message Header Error"},
     { BGP_NOTIFY_MAJOR_OPEN,    "OPEN Message Error"},
     { BGP_NOTIFY_MAJOR_UPDATE,  "UPDATE Message Error"},
@@ -242,7 +241,7 @@
 
 /* draft-ietf-idr-cease-subcode-02 */
 #define BGP_NOTIFY_MINOR_CEASE_MAXPRFX  1
-static struct tok bgp_notify_minor_cease_values[] = {
+static const struct tok bgp_notify_minor_cease_values[] = {
     { BGP_NOTIFY_MINOR_CEASE_MAXPRFX, "Maximum Number of Prefixes Reached"},
     { 2,                        "Administratively Shutdown"},
     { 3,                        "Peer Unconfigured"},
@@ -253,24 +252,25 @@
     { 0, NULL}
 };
 
-static struct tok bgp_notify_minor_msg_values[] = {
+static const struct tok bgp_notify_minor_msg_values[] = {
     { 1,                        "Connection Not Synchronized"},
     { 2,                        "Bad Message Length"},
     { 3,                        "Bad Message Type"},
     { 0, NULL}
 };
 
-static struct tok bgp_notify_minor_open_values[] = {
+static const struct tok bgp_notify_minor_open_values[] = {
     { 1,                        "Unsupported Version Number"},
     { 2,                        "Bad Peer AS"},
     { 3,                        "Bad BGP Identifier"},
     { 4,                        "Unsupported Optional Parameter"},
     { 5,                        "Authentication Failure"},
     { 6,                        "Unacceptable Hold Time"},
+    { 7,                        "Capability Message Error"},
     { 0, NULL}
 };
 
-static struct tok bgp_notify_minor_update_values[] = {
+static const struct tok bgp_notify_minor_update_values[] = {
     { 1,                        "Malformed Attribute List"},
     { 2,                        "Unrecognized Well-known Attribute"},
     { 3,                        "Missing Well-known Attribute"},
@@ -285,7 +285,7 @@
     { 0, NULL}
 };
 
-static struct tok bgp_notify_minor_cap_values[] = {
+static const struct tok bgp_notify_minor_cap_values[] = {
     { 1,                        "Invalid Action Value" },
     { 2,                        "Invalid Capability Length" },
     { 3,                        "Malformed Capability Value" },
@@ -293,13 +293,38 @@
     { 0, NULL }
 };
 
-static struct tok bgp_origin_values[] = {
+static const struct tok bgp_origin_values[] = {
     { 0,                        "IGP"},
     { 1,                        "EGP"},
     { 2,                        "Incomplete"},
     { 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 const 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 const 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,9 +332,12 @@
 #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 */
+/* draft-nalawade-idr-mdt-safi-03 */
+#define SAFNUM_MDT                      66
 /* Section 4.3.4 of draft-rosen-rfc2547bis-03.txt  */
 #define SAFNUM_VPNUNICAST               128
 #define SAFNUM_VPNMULTICAST             129
@@ -319,7 +347,7 @@
 
 #define BGP_VPN_RD_LEN                  8
 
-static struct tok bgp_safi_values[] = {
+static const struct tok bgp_safi_values[] = {
     { SAFNUM_RES,               "Reserved"},
     { SAFNUM_UNICAST,           "Unicast"},
     { SAFNUM_MULTICAST,         "Multicast"},
@@ -331,7 +359,8 @@
     { 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 +378,6 @@
 #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 +391,12 @@
 
 #define BGP_EXT_COM_L2INFO      0x800a  /* draft-kompella-ppvpn-l2vpn */
 
+#define BGP_EXT_COM_SOURCE_AS   0x0009  /* RFC-ietf-l3vpn-2547bis-mcast-bgp-08.txt */
+#define BGP_EXT_COM_VRF_RT_IMP  0x010b  /* RFC-ietf-l3vpn-2547bis-mcast-bgp-08.txt */
+#define BGP_EXT_COM_L2VPN_RT_0  0x000a  /* L2VPN Identifier,Format AS(2bytes):AN(4bytes) */
+#define BGP_EXT_COM_L2VPN_RT_1  0xF10a  /* L2VPN Identifier,Format IP address:AN(2bytes) */
+
+
 /* 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
@@ -372,13 +405,13 @@
 #define BGP_EXT_COM_EIGRP_EXT_REMAS_REMID  0x8804
 #define BGP_EXT_COM_EIGRP_EXT_REMPROTO_REMMETRIC 0x8805
 
-static struct tok bgp_extd_comm_flag_values[] = {
+static const struct tok bgp_extd_comm_flag_values[] = {
     { 0x8000,                  "vendor-specific"},
     { 0x4000,                  "non-transitive"},
     { 0, NULL},
 };
 
-static struct tok bgp_extd_comm_subtype_values[] = {
+static const struct tok bgp_extd_comm_subtype_values[] = {
     { BGP_EXT_COM_RT_0,        "target"},
     { BGP_EXT_COM_RT_1,        "target"},
     { BGP_EXT_COM_RT_2,        "target"},
@@ -386,7 +419,6 @@
     { 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 +434,10 @@
     { 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"},
+    { BGP_EXT_COM_L2VPN_RT_0, "l2vpn-id"},
+    { BGP_EXT_COM_L2VPN_RT_1, "l2vpn-id"},
     { 0, NULL},
 };
 
@@ -414,7 +450,7 @@
 #define BGP_OSPF_RTYPE_SHAM     129 /* OSPF-MPLS-VPN Sham link */
 #define BGP_OSPF_RTYPE_METRIC_TYPE 0x1 /* LSB of RTYPE Options Field */
 
-static struct tok bgp_extd_comm_ospf_rtype_values[] = {
+static const struct tok bgp_extd_comm_ospf_rtype_values[] = {
   { BGP_OSPF_RTYPE_RTR, "Router" },  
   { BGP_OSPF_RTYPE_NET, "Network" },  
   { BGP_OSPF_RTYPE_SUM, "Summary" },  
@@ -424,38 +460,72 @@
   { 0, NULL },
 };
 
+#define TOKBUFSIZE 128
+static char astostr[20];
+
+/*
+ * as_printf
+ *
+ * Convert an AS number into a string and return string pointer.
+ *
+ * Bepending on bflag is set or not, AS number is converted into ASDOT notation
+ * or plain number notation.
+ *
+ */
+static char *
+as_printf (char *str, int size, u_int asnum)
+{
+	if (!bflag || asnum <= 0xFFFF) {
+		snprintf(str, size, "%u", asnum);
+	} else {
+		snprintf(str, size, "%u.%u", asnum >> 16, asnum & 0xFFFF);
+	}
+	return str;
+}
+
+#define ITEMCHECK(minlen) if (itemlen < minlen) goto badtlv;
+
 int
-decode_prefix4(const u_char *pptr, char *buf, u_int buflen)
+decode_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen)
 {
 	struct in_addr addr;
-	u_int plen;
+	u_int plen, plenbytes;
 
 	TCHECK(pptr[0]);
+	ITEMCHECK(1);
 	plen = pptr[0];
 	if (32 < plen)
 		return -1;
+	itemlen -= 1;
 
 	memset(&addr, 0, sizeof(addr));
-	TCHECK2(pptr[1], (plen + 7) / 8);
-	memcpy(&addr, &pptr[1], (plen + 7) / 8);
+	plenbytes = (plen + 7) / 8;
+	TCHECK2(pptr[1], plenbytes);
+	ITEMCHECK(plenbytes);
+	memcpy(&addr, &pptr[1], plenbytes);
 	if (plen % 8) {
-		((u_char *)&addr)[(plen + 7) / 8 - 1] &=
+		((u_char *)&addr)[plenbytes - 1] &=
 			((0xff00 >> (plen % 8)) & 0xff);
 	}
 	snprintf(buf, buflen, "%s/%d", getname((u_char *)&addr), plen);
-	return 1 + (plen + 7) / 8;
+	return 1 + plenbytes;
 
 trunc:
 	return -2;
+
+badtlv:
+	return -3;
 }
 
 static int
-decode_labeled_prefix4(const u_char *pptr, char *buf, u_int buflen)
+decode_labeled_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen)
 {
 	struct in_addr addr;
-	u_int plen;
+	u_int plen, plenbytes;
 
-	TCHECK(pptr[0]);
+	/* prefix length and label = 4 bytes */
+	TCHECK2(pptr[0], 4);
+	ITEMCHECK(4);
 	plen = pptr[0];   /* get prefix length */
 
         /* this is one of the weirdnesses of rfc3107
@@ -473,12 +543,15 @@
 
 	if (32 < plen)
 		return -1;
+	itemlen -= 4;
 
 	memset(&addr, 0, sizeof(addr));
-	TCHECK2(pptr[4], (plen + 7) / 8);
-	memcpy(&addr, &pptr[4], (plen + 7) / 8);
+	plenbytes = (plen + 7) / 8;
+	TCHECK2(pptr[4], plenbytes);
+	ITEMCHECK(plenbytes);
+	memcpy(&addr, &pptr[4], plenbytes);
 	if (plen % 8) {
-		((u_char *)&addr)[(plen + 7) / 8 - 1] &=
+		((u_char *)&addr)[plenbytes - 1] &=
 			((0xff00 >> (plen % 8)) & 0xff);
 	}
         /* the label may get offsetted by 4 bits so lets shift it right */
@@ -488,12 +561,108 @@
                  EXTRACT_24BITS(pptr+1)>>4,
                  ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" );
 
-	return 4 + (plen + 7) / 8;
+	return 4 + plenbytes;
 
 trunc:
 	return -2;
+
+badtlv:
+	return -3;
 }
 
+/*
+ * 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 +676,12 @@
     /* 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*/
 
@@ -521,9 +692,10 @@
 
         /* 4-byte-AS:number fmt*/
     case 2:
-        snprintf(pos, sizeof(rd) - (pos - rd), "%u:%u (%u.%u.%u.%u:%u)",
-            EXTRACT_32BITS(pptr+2), EXTRACT_16BITS(pptr+6),
-            *(pptr+2), *(pptr+3), *(pptr+4), *(pptr+5), EXTRACT_16BITS(pptr+6));
+	snprintf(pos, sizeof(rd) - (pos - rd), "%s:%u (%u.%u.%u.%u:%u)",
+	    as_printf(astostr, sizeof(astostr), EXTRACT_32BITS(pptr+2)),
+	    EXTRACT_16BITS(pptr+6), *(pptr+2), *(pptr+3), *(pptr+4),
+	    *(pptr+5), EXTRACT_16BITS(pptr+6));
         break;
     default:
         snprintf(pos, sizeof(rd) - (pos - rd), "unknown RD format");
@@ -561,9 +733,9 @@
 		((u_char *)&route_target)[(plen + 7) / 8 - 1] &=
 			((0xff00 >> (plen % 8)) & 0xff);
 	}
-	snprintf(buf, buflen, "origin AS: %u, route target %s",
-                 EXTRACT_32BITS(pptr+1),
-                 bgp_vpn_rd_print((u_char *)&route_target));
+	snprintf(buf, buflen, "origin AS: %s, route target %s",
+	    as_printf(astostr, sizeof(astostr), EXTRACT_32BITS(pptr+1)),
+	    bgp_vpn_rd_print((u_char *)&route_target));
 
 	return 5 + (plen + 7) / 8;
 
@@ -610,6 +782,159 @@
 }
 
 /*
+ * +-------------------------------+
+ * |                               |
+ * |  RD:IPv4-address (12 octets)  |
+ * |                               |
+ * +-------------------------------+
+ * |  MDT Group-address (4 octets) |
+ * +-------------------------------+
+ */
+
+#define MDT_VPN_NLRI_LEN 16
+
+static int
+decode_mdt_vpn_nlri(const u_char *pptr, char *buf, u_int buflen)
+{
+
+    const u_char *rd;
+    const u_char *vpn_ip;
+    
+    TCHECK(pptr[0]);
+
+    /* if the NLRI is not predefined length, quit.*/
+    if (*pptr != MDT_VPN_NLRI_LEN * NBBY)
+	return -1;
+    pptr++;
+
+    /* RD */
+    TCHECK2(pptr[0], 8);
+    rd = pptr;
+    pptr+=8;
+
+    /* IPv4 address */
+    TCHECK2(pptr[0], sizeof(struct in_addr));
+    vpn_ip = pptr;
+    pptr+=sizeof(struct in_addr);
+
+    /* MDT Group Address */
+    TCHECK2(pptr[0], sizeof(struct in_addr));
+
+    snprintf(buf, buflen, "RD: %s, VPN IP Address: %s, MC Group Address: %s",
+	     bgp_vpn_rd_print(rd), ipaddr_string(vpn_ip), ipaddr_string(pptr));
+       
+    return MDT_VPN_NLRI_LEN + 1;
+
+ 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 const 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 %s",
+		bgp_vpn_rd_print(pptr),
+		as_printf(astostr, sizeof(astostr),
+		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 %s",
+		bgp_vpn_rd_print(pptr),
+		as_printf(astostr, sizeof(astostr),
+		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
  * value is negative, set buflen to 0, to indicate that we've filled
@@ -638,57 +963,84 @@
         plen=EXTRACT_16BITS(pptr);
         tlen=plen;
         pptr+=2;
-	TCHECK2(pptr[0],15);
-	buf[0]='\0';
-        strlen=snprintf(buf, buflen, "RD: %s, CE-ID: %u, Label-Block Offset: %u, Label Base %u",
-                        bgp_vpn_rd_print(pptr),
-                        EXTRACT_16BITS(pptr+8),
-                        EXTRACT_16BITS(pptr+10),
-                        EXTRACT_24BITS(pptr+12)>>4); /* the label is offsetted by 4 bits so lets shift it right */
-        UPDATE_BUF_BUFLEN(buf, buflen, strlen);
-        pptr+=15;
-        tlen-=15;
+	/* Old and new L2VPN NLRI share AFI/SAFI
+         *   -> Assume a 12 Byte-length NLRI is auto-discovery-only
+         *      and > 17 as old format. Complain for the middle case
+         */
+        if (plen==12) { 
+	    /* assume AD-only with RD, BGPNH */
+	    TCHECK2(pptr[0],12);
+	    buf[0]='\0';
+	    strlen=snprintf(buf, buflen, "RD: %s, BGPNH: %s",
+			    bgp_vpn_rd_print(pptr), 
+			    /* need something like getname() here */
+			    getname(pptr+8)
+			    );
+	    UPDATE_BUF_BUFLEN(buf, buflen, strlen);
+	    pptr+=12;
+	    tlen-=12;
+	    return plen;
+        } else if (plen>17) { 
+	    /* assume old format */
+	    /* RD, ID, LBLKOFF, LBLBASE */
 
-        /* ok now the variable part - lets read out TLVs*/
-        while (tlen>0) {
-            if (tlen < 3)
-                return -1;
-            TCHECK2(pptr[0], 3);
-            tlv_type=*pptr++;
-            tlv_len=EXTRACT_16BITS(pptr);
-            ttlv_len=tlv_len;
-            pptr+=2;
+	    TCHECK2(pptr[0],15);
+	    buf[0]='\0';
+	    strlen=snprintf(buf, buflen, "RD: %s, CE-ID: %u, Label-Block Offset: %u, Label Base %u",
+			    bgp_vpn_rd_print(pptr),
+			    EXTRACT_16BITS(pptr+8),
+			    EXTRACT_16BITS(pptr+10),
+			    EXTRACT_24BITS(pptr+12)>>4); /* the label is offsetted by 4 bits so lets shift it right */
+	    UPDATE_BUF_BUFLEN(buf, buflen, strlen);
+	    pptr+=15;
+	    tlen-=15;
 
-            switch(tlv_type) {
-            case 1:
-                if (buflen!=0) {
-                    strlen=snprintf(buf,buflen, "\n\t\tcircuit status vector (%u) length: %u: 0x",
-                                    tlv_type,
-                                    tlv_len);
-                    UPDATE_BUF_BUFLEN(buf, buflen, strlen);
-                }
-                ttlv_len=ttlv_len/8+1; /* how many bytes do we need to read ? */
-                while (ttlv_len>0) {
-                    TCHECK(pptr[0]);
-                    if (buflen!=0) {
-                        strlen=snprintf(buf,buflen, "%02x",*pptr++);
-                        UPDATE_BUF_BUFLEN(buf, buflen, strlen);
-                    }
-                    ttlv_len--;
-                }
-                break;
-            default:
-                if (buflen!=0) {
-                    strlen=snprintf(buf,buflen, "\n\t\tunknown TLV #%u, length: %u",
-                                    tlv_type,
-                                    tlv_len);
-                    UPDATE_BUF_BUFLEN(buf, buflen, strlen);
-                }
-                break;
-            }
-            tlen-=(tlv_len<<3); /* the tlv-length is expressed in bits so lets shift it right */
+	    /* ok now the variable part - lets read out TLVs*/
+	    while (tlen>0) {
+		if (tlen < 3)
+		    return -1;
+		TCHECK2(pptr[0], 3);
+		tlv_type=*pptr++;
+		tlv_len=EXTRACT_16BITS(pptr);
+		ttlv_len=tlv_len;
+		pptr+=2;
+
+		switch(tlv_type) {
+		case 1:
+		    if (buflen!=0) {
+			strlen=snprintf(buf,buflen, "\n\t\tcircuit status vector (%u) length: %u: 0x",
+					tlv_type,
+					tlv_len);
+			UPDATE_BUF_BUFLEN(buf, buflen, strlen);
+		    }
+		    ttlv_len=ttlv_len/8+1; /* how many bytes do we need to read ? */
+		    while (ttlv_len>0) {
+			TCHECK(pptr[0]);
+			if (buflen!=0) {
+			    strlen=snprintf(buf,buflen, "%02x",*pptr++);
+			    UPDATE_BUF_BUFLEN(buf, buflen, strlen);
+			}
+			ttlv_len--;
+		    }
+		    break;
+		default:
+		    if (buflen!=0) {
+			strlen=snprintf(buf,buflen, "\n\t\tunknown TLV #%u, length: %u",
+					tlv_type,
+					tlv_len);
+			UPDATE_BUF_BUFLEN(buf, buflen, strlen);
+		    }
+		    break;
+		}
+		tlen-=(tlv_len<<3); /* the tlv-length is expressed in bits so lets shift it right */
+	    }
+	    return plen+2;
+	    
+        } else {
+	    /* complain bitterly ? */
+	    /* fall through */
+            goto trunc;
         }
-        return plen+2;
 
 trunc:
         return -2;
@@ -696,37 +1048,46 @@
 
 #ifdef INET6
 int
-decode_prefix6(const u_char *pd, char *buf, u_int buflen)
+decode_prefix6(const u_char *pd, u_int itemlen, char *buf, u_int buflen)
 {
 	struct in6_addr addr;
-	u_int plen;
+	u_int plen, plenbytes;
 
 	TCHECK(pd[0]);
+	ITEMCHECK(1);
 	plen = pd[0];
 	if (128 < plen)
 		return -1;
+	itemlen -= 1;
 
 	memset(&addr, 0, sizeof(addr));
-	TCHECK2(pd[1], (plen + 7) / 8);
-	memcpy(&addr, &pd[1], (plen + 7) / 8);
+	plenbytes = (plen + 7) / 8;
+	TCHECK2(pd[1], plenbytes);
+	ITEMCHECK(plenbytes);
+	memcpy(&addr, &pd[1], plenbytes);
 	if (plen % 8) {
-		addr.s6_addr[(plen + 7) / 8 - 1] &=
+		addr.s6_addr[plenbytes - 1] &=
 			((0xff00 >> (plen % 8)) & 0xff);
 	}
 	snprintf(buf, buflen, "%s/%d", getname6((u_char *)&addr), plen);
-	return 1 + (plen + 7) / 8;
+	return 1 + plenbytes;
 
 trunc:
 	return -2;
+
+badtlv:
+	return -3;
 }
 
 static int
-decode_labeled_prefix6(const u_char *pptr, char *buf, u_int buflen)
+decode_labeled_prefix6(const u_char *pptr, u_int itemlen, char *buf, u_int buflen)
 {
 	struct in6_addr addr;
-	u_int plen;
+	u_int plen, plenbytes;
 
-	TCHECK(pptr[0]);
+	/* prefix length and label = 4 bytes */
+	TCHECK2(pptr[0], 4);
+	ITEMCHECK(4);
 	plen = pptr[0]; /* get prefix length */
 
 	if (24 > plen)
@@ -736,12 +1097,14 @@
 
 	if (128 < plen)
 		return -1;
+	itemlen -= 4;
 
 	memset(&addr, 0, sizeof(addr));
-	TCHECK2(pptr[4], (plen + 7) / 8);
-	memcpy(&addr, &pptr[4], (plen + 7) / 8);
+	plenbytes = (plen + 7) / 8;
+	TCHECK2(pptr[4], plenbytes);
+	memcpy(&addr, &pptr[4], plenbytes);
 	if (plen % 8) {
-		addr.s6_addr[(plen + 7) / 8 - 1] &=
+		addr.s6_addr[plenbytes - 1] &=
 			((0xff00 >> (plen % 8)) & 0xff);
 	}
         /* the label may get offsetted by 4 bits so lets shift it right */
@@ -751,10 +1114,13 @@
                  EXTRACT_24BITS(pptr+1)>>4,
                  ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" );
 
-	return 4 + (plen + 7) / 8;
+	return 4 + plenbytes;
 
 trunc:
 	return -2;
+
+badtlv:
+	return -3;
 }
 
 static int
@@ -863,8 +1229,65 @@
 	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_print(const struct bgp_attr *attr, const u_char *pptr, int len)
+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(u_int atype, const u_char *pptr, u_int len)
 {
 	int i;
 	u_int16_t af;
@@ -874,15 +1297,16 @@
             u_int32_t i;
         } bw;
 	int advance;
-	int tlen;
+	u_int tlen;
 	const u_char *tptr;
 	char buf[MAXHOSTNAMELEN + 100];
 	char tokbuf[TOKBUFSIZE];
+        int  as_size;
 
         tptr = pptr;
         tlen=len;
 
-	switch (attr->bgpa_type) {
+	switch (atype) {
 	case BGPTYPE_ORIGIN:
 		if (len != 1)
 			printf("invalid len");
@@ -895,6 +1319,11 @@
 		}
 		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 +1334,35 @@
 			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(atype, 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("%s ",
+				as_printf(astostr, sizeof(astostr),
+				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:
@@ -943,14 +1386,36 @@
 		if (len != 0)
 			printf("invalid len");
 		break;
-	case BGPTYPE_AGGREGATOR:
-		if (len != 6) {
+        case BGPTYPE_AGGREGATOR:
+
+                /*
+                 * Depending on the AS encoded is of 2 bytes or of 4 bytes,
+                 * the length of this PA can be either 6 bytes or 8 bytes.
+                 */
+                if (len != 6 && len != 8) {
+                    printf("invalid len");
+                    break;
+                }
+                TCHECK2(tptr[0], len);
+                if (len == 6) {
+		    printf(" AS #%s, origin %s",
+			as_printf(astostr, sizeof(astostr), EXTRACT_16BITS(tptr)),
+			getname(tptr + 2));
+                } else {
+		    printf(" AS #%s, origin %s",
+			as_printf(astostr, sizeof(astostr),
+			EXTRACT_32BITS(tptr)), getname(tptr + 4));
+                }
+                break;
+	case BGPTYPE_AGGREGATOR4:
+		if (len != 8) {
 			printf("invalid len");
 			break;
 		}
-		TCHECK2(tptr[0], 6);
-		printf(" AS #%u, origin %s", EXTRACT_16BITS(tptr),
-			getname(tptr + 2));
+		TCHECK2(tptr[0], 8);
+		printf(" AS #%s, origin %s",
+	   	    as_printf(astostr, sizeof(astostr), EXTRACT_32BITS(tptr)),
+		    getname(tptr + 4));
 		break;
 	case BGPTYPE_COMMUNITIES:
 		if (len % 4) {
@@ -1027,12 +1492,13 @@
                 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):
+		case (AFNUM_INET<<8 | SAFNUM_MDT): 
 #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):
@@ -1065,15 +1531,21 @@
                 tptr++;
 
 		if (tlen) {
+                    int nnh = 0;
                     printf("\n\t    nexthop: ");
                     while (tlen > 0) {
+                        if ( nnh++ > 0 ) {
+                            printf( ", " );
+                        }
                         switch(af<<8 | safi) {
                         case (AFNUM_INET<<8 | SAFNUM_UNICAST):
                         case (AFNUM_INET<<8 | SAFNUM_MULTICAST):
                         case (AFNUM_INET<<8 | SAFNUM_UNIMULTICAST):
                         case (AFNUM_INET<<8 | SAFNUM_LABUNICAST):
                         case (AFNUM_INET<<8 | SAFNUM_RT_ROUTING_INFO):
-                            if (tlen < (int)sizeof(struct in_addr)) {
+                        case (AFNUM_INET<<8 | SAFNUM_MULTICAST_VPN):
+                        case (AFNUM_INET<<8 | SAFNUM_MDT):  
+			    if (tlen < (int)sizeof(struct in_addr)) {
                                 printf("invalid len");
                                 tlen = 0;
                             } else {
@@ -1103,7 +1575,6 @@
                         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;
@@ -1211,20 +1682,24 @@
                     case (AFNUM_INET<<8 | SAFNUM_UNICAST):
                     case (AFNUM_INET<<8 | SAFNUM_MULTICAST):
                     case (AFNUM_INET<<8 | SAFNUM_UNIMULTICAST):
-                        advance = decode_prefix4(tptr, buf, sizeof(buf));
+                        advance = decode_prefix4(tptr, len, buf, sizeof(buf));
                         if (advance == -1)
                             printf("\n\t    (illegal prefix length)");
                         else if (advance == -2)
                             goto trunc;
+                        else if (advance == -3)
+                            break; /* bytes left, but not enough */
                         else
                             printf("\n\t      %s", buf);
                         break;
                     case (AFNUM_INET<<8 | SAFNUM_LABUNICAST):
-                        advance = decode_labeled_prefix4(tptr, buf, sizeof(buf));
+                        advance = decode_labeled_prefix4(tptr, len, buf, sizeof(buf));
                         if (advance == -1)
                             printf("\n\t    (illegal prefix length)");
                         else if (advance == -2)
                             goto trunc;
+                        else if (advance == -3)
+                            break; /* bytes left, but not enough */
                         else
                             printf("\n\t      %s", buf);
                         break;
@@ -1248,11 +1723,9 @@
                         else
                             printf("\n\t      %s", buf);
                         break;
-#ifdef INET6
-                    case (AFNUM_INET6<<8 | SAFNUM_UNICAST):
-                    case (AFNUM_INET6<<8 | SAFNUM_MULTICAST):
-                    case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST):
-                        advance = decode_prefix6(tptr, buf, sizeof(buf));
+                    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)
@@ -1260,12 +1733,38 @@
                         else
                             printf("\n\t      %s", buf);
                         break;
-                    case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST):
-                        advance = decode_labeled_prefix6(tptr, buf, sizeof(buf));
+
+		    case (AFNUM_INET<<8 | SAFNUM_MDT):
+		      advance = decode_mdt_vpn_nlri(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):
+                    case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST):
+                        advance = decode_prefix6(tptr, len, buf, sizeof(buf));
                         if (advance == -1)
                             printf("\n\t    (illegal prefix length)");
                         else if (advance == -2)
                             goto trunc;
+                        else if (advance == -3)
+                            break; /* bytes left, but not enough */
+                        else
+                            printf("\n\t      %s", buf);
+                        break;
+                    case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST):
+                        advance = decode_labeled_prefix6(tptr, len, buf, sizeof(buf));
+                        if (advance == -1)
+                            printf("\n\t    (illegal prefix length)");
+                        else if (advance == -2)
+                            goto trunc;
+                        else if (advance == -3)
+                            break; /* bytes left, but not enough */
                         else
                             printf("\n\t      %s", buf);
                         break;
@@ -1280,15 +1779,6 @@
                         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):
@@ -1364,20 +1854,24 @@
                     case (AFNUM_INET<<8 | SAFNUM_UNICAST):
                     case (AFNUM_INET<<8 | SAFNUM_MULTICAST):
                     case (AFNUM_INET<<8 | SAFNUM_UNIMULTICAST):
-                        advance = decode_prefix4(tptr, buf, sizeof(buf));
+                        advance = decode_prefix4(tptr, len, buf, sizeof(buf));
                         if (advance == -1)
                             printf("\n\t    (illegal prefix length)");
                         else if (advance == -2)
                             goto trunc;
+                        else if (advance == -3)
+                            break; /* bytes left, but not enough */
                         else
                             printf("\n\t      %s", buf);
                         break;
                     case (AFNUM_INET<<8 | SAFNUM_LABUNICAST):
-                        advance = decode_labeled_prefix4(tptr, buf, sizeof(buf));
+                        advance = decode_labeled_prefix4(tptr, len, buf, sizeof(buf));
                         if (advance == -1)
                             printf("\n\t    (illegal prefix length)");
                         else if (advance == -2)
                             goto trunc;
+                        else if (advance == -3)
+                            break; /* bytes left, but not enough */
                         else
                             printf("\n\t      %s", buf);
                         break;
@@ -1396,20 +1890,24 @@
                     case (AFNUM_INET6<<8 | SAFNUM_UNICAST):
                     case (AFNUM_INET6<<8 | SAFNUM_MULTICAST):
                     case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST):
-                        advance = decode_prefix6(tptr, buf, sizeof(buf));
+                        advance = decode_prefix6(tptr, len, buf, sizeof(buf));
                         if (advance == -1)
                             printf("\n\t    (illegal prefix length)");
                         else if (advance == -2)
                             goto trunc;
+                        else if (advance == -3)
+                            break; /* bytes left, but not enough */
                         else
                             printf("\n\t      %s", buf);
                         break;
                     case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST):
-                        advance = decode_labeled_prefix6(tptr, buf, sizeof(buf));
+                        advance = decode_labeled_prefix6(tptr, len, buf, sizeof(buf));
                         if (advance == -1)
                             printf("\n\t    (illegal prefix length)");
                         else if (advance == -2)
                             goto trunc;
+                        else if (advance == -3)
+                            break; /* bytes left, but not enough */
                         else
                             printf("\n\t      %s", buf);
                         break;
@@ -1459,6 +1957,25 @@
                         else
                             printf("\n\t      %s", buf);
                         break;                                   
+		    case (AFNUM_INET<<8 | SAFNUM_MDT):
+		      advance = decode_mdt_vpn_nlri(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;
+                    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,32 +2012,31 @@
                     switch(extd_comm) {
                     case BGP_EXT_COM_RT_0:
                     case BGP_EXT_COM_RO_0:
-                        printf(": %u:%s",
+                    case BGP_EXT_COM_L2VPN_RT_0:
+                        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_L2VPN_RT_1:
+                    case BGP_EXT_COM_VRF_RT_IMP:
                         printf(": %s:%u",
                                getname(tptr+2),
                                EXTRACT_16BITS(tptr+6));
                         break;
                     case BGP_EXT_COM_RT_2:
                     case BGP_EXT_COM_RO_2:
-                        printf(": %u:%u",
-                               EXTRACT_32BITS(tptr+2),
-                               EXTRACT_16BITS(tptr+6));
-                        break;
+			printf(": %s:%u",
+			    as_printf(astostr, sizeof(astostr),
+			    EXTRACT_32BITS(tptr+2)), EXTRACT_16BITS(tptr+6));
+			break;
                     case BGP_EXT_COM_LINKBAND:
 		        bw.i = EXTRACT_32BITS(tptr+2);
                         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 +2065,9 @@
                                        *(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,41 +2078,110 @@
                 }
                 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));
-                tptr+=4;
+                if (len < 4)
+                	goto trunc;
+		printf("\n\t    Origin AS: %s",
+		    as_printf(astostr, sizeof(astostr), EXTRACT_32BITS(tptr)));
+		tptr+=4;
                 len -=4;
 
-                while (len >= 2 ) {
-                    int alen;
-                    struct bgp_attr bgpa;
+                while (len) {
+                    u_int aflags, atype, alenlen, alen;
                     
-                    TCHECK2(tptr[0], sizeof(bgpa));
-                    memcpy(&bgpa, tptr, sizeof(bgpa));
-                    alen = bgp_attr_len(&bgpa);
-                    tptr += bgp_attr_off(&bgpa);
-                    len -= bgp_attr_off(&bgpa);
+                    TCHECK2(tptr[0], 2);
+                    if (len < 2)
+                        goto trunc;
+                    aflags = *tptr;
+                    atype = *(tptr + 1);
+                    tptr += 2;
+                    len -= 2;
+                    alenlen = bgp_attr_lenlen(aflags, tptr);
+                    TCHECK2(tptr[0], alenlen);
+                    if (len < alenlen)
+                        goto trunc;
+                    alen = bgp_attr_len(aflags, tptr);
+                    tptr += alenlen;
+                    len -= alenlen;
                     
                     printf("\n\t      %s (%u), length: %u",
                            tok2strbuf(bgp_attr_values,
-				      "Unknown Attribute", bgpa.bgpa_type,
-				      tokbuf, sizeof(tokbuf)),
-                           bgpa.bgpa_type,
+                                      "Unknown Attribute", atype,
+                                      tokbuf, sizeof(tokbuf)),
+                           atype,
                            alen);
                     
-                    if (bgpa.bgpa_flags) {
+                    if (aflags) {
                         printf(", Flags [%s%s%s%s",
-                               bgpa.bgpa_flags & 0x80 ? "O" : "",
-                               bgpa.bgpa_flags & 0x40 ? "T" : "",
-                               bgpa.bgpa_flags & 0x20 ? "P" : "",
-                               bgpa.bgpa_flags & 0x10 ? "E" : "");
-                        if (bgpa.bgpa_flags & 0xf)
-                            printf("+%x", bgpa.bgpa_flags & 0xf);
+                               aflags & 0x80 ? "O" : "",
+                               aflags & 0x40 ? "T" : "",
+                               aflags & 0x20 ? "P" : "",
+                               aflags & 0x10 ? "E" : "");
+                        if (aflags & 0xf)
+                            printf("+%x", aflags & 0xf);
                         printf("]: ");
                     }
                     /* FIXME check for recursion */
-                    if (!bgp_attr_print(&bgpa, tptr, alen))
+                    if (!bgp_attr_print(atype, tptr, alen))
                         return 0;
                     tptr += alen;
                     len -= alen;
@@ -1603,7 +2191,7 @@
 
 	default:
 	    TCHECK2(*pptr,len);
-            printf("\n\t    no Attribute %u decoder",attr->bgpa_type); /* we have no decoder for the attribute */
+            printf("\n\t    no Attribute %u decoder",atype); /* we have no decoder for the attribute */
             if (vflag <= 1)
                 print_unknown_data(pptr,"\n\t    ",len);
             break;
@@ -1619,20 +2207,104 @@
 }
 
 static void
+bgp_capabilities_print(const u_char *opt, int caps_len)
+{
+	char tokbuf[TOKBUFSIZE];
+	char tokbuf2[TOKBUFSIZE];
+	int cap_type, cap_len, tcap_len, cap_offset;
+        int i = 0;
+
+        while (i < caps_len) {
+                TCHECK2(opt[i], BGP_CAP_HEADER_SIZE);
+                cap_type=opt[i];
+                cap_len=opt[i+1];
+                tcap_len=cap_len;
+                printf("\n\t      %s (%u), length: %u",
+                       tok2strbuf(bgp_capcode_values, "Unknown",
+                                  cap_type, tokbuf, sizeof(tokbuf)),
+                       cap_type,
+                       cap_len);
+                TCHECK2(opt[i+2], cap_len);
+                switch (cap_type) {
+                case BGP_CAPCODE_MP:
+                    printf("\n\t\tAFI %s (%u), SAFI %s (%u)",
+                           tok2strbuf(af_values, "Unknown",
+                                      EXTRACT_16BITS(opt+i+2),
+                                      tokbuf, sizeof(tokbuf)),
+                           EXTRACT_16BITS(opt+i+2),
+                           tok2strbuf(bgp_safi_values, "Unknown",
+                                      opt[i+5],
+                                      tokbuf, sizeof(tokbuf)),
+                           opt[i+5]);
+                    break;
+                case BGP_CAPCODE_RESTART:
+                    printf("\n\t\tRestart Flags: [%s], Restart Time %us",
+                           ((opt[i+2])&0x80) ? "R" : "none",
+                           EXTRACT_16BITS(opt+i+2)&0xfff);
+                    tcap_len-=2;
+                    cap_offset=4;
+                    while(tcap_len>=4) {
+                        printf("\n\t\t  AFI %s (%u), SAFI %s (%u), Forwarding state preserved: %s",
+                               tok2strbuf(af_values,"Unknown",
+                                          EXTRACT_16BITS(opt+i+cap_offset),
+                                          tokbuf, sizeof(tokbuf)),
+                               EXTRACT_16BITS(opt+i+cap_offset),
+                               tok2strbuf(bgp_safi_values,"Unknown",
+                                          opt[i+cap_offset+2],
+                                          tokbuf2, sizeof(tokbuf2)),
+                               opt[i+cap_offset+2],
+                               ((opt[i+cap_offset+3])&0x80) ? "yes" : "no" );
+                        tcap_len-=4;
+                        cap_offset+=4;
+                    }
+                    break;
+                case BGP_CAPCODE_RR:
+                case BGP_CAPCODE_RR_CISCO:
+                    break;
+                case BGP_CAPCODE_AS_NEW:
+
+                    /*
+                     * Extract the 4 byte AS number encoded.
+                     */
+                    if (cap_len == 4) {
+                        printf("\n\t\t 4 Byte AS %s",
+                            as_printf(astostr, sizeof(astostr),
+                            EXTRACT_32BITS(opt + i + 2)));
+                    }
+                    break;
+                default:
+                    printf("\n\t\tno decoder for Capability %u",
+                           cap_type);
+                    if (vflag <= 1)
+                        print_unknown_data(&opt[i+2],"\n\t\t",cap_len);
+                    break;
+                }
+                if (vflag > 1 && cap_len > 0) {
+                    print_unknown_data(&opt[i+2],"\n\t\t",cap_len);
+                }
+                i += BGP_CAP_HEADER_SIZE + cap_len;
+        }
+        return;
+
+trunc:
+	printf("[|BGP]");
+}
+
+static void
 bgp_open_print(const u_char *dat, int length)
 {
 	struct bgp_open bgpo;
 	struct bgp_opt bgpopt;
 	const u_char *opt;
-	int i,cap_type,cap_len,tcap_len,cap_offset;
+	int i;
 	char tokbuf[TOKBUFSIZE];
-	char tokbuf2[TOKBUFSIZE];
 
 	TCHECK2(dat[0], BGP_OPEN_SIZE);
 	memcpy(&bgpo, dat, BGP_OPEN_SIZE);
 
 	printf("\n\t  Version %d, ", bgpo.bgpo_version);
-	printf("my AS %u, ", ntohs(bgpo.bgpo_myas));
+	printf("my AS %s, ",
+	    as_printf(astostr, sizeof(astostr), ntohs(bgpo.bgpo_myas)));
 	printf("Holdtime %us, ", ntohs(bgpo.bgpo_holdtime));
 	printf("ID %s", getname((u_char *)&bgpo.bgpo_id));
 	printf("\n\t  Optional parameters, length: %u", bgpo.bgpo_optlen);
@@ -1650,84 +2322,31 @@
 		TCHECK2(opt[i], BGP_OPT_SIZE);
 		memcpy(&bgpopt, &opt[i], BGP_OPT_SIZE);
 		if (i + 2 + bgpopt.bgpopt_len > bgpo.bgpo_optlen) {
-                        printf("\n\t     Option %d, length: %u", bgpopt.bgpopt_type, bgpopt.bgpopt_len);
+			printf("\n\t     Option %d, length: %u", bgpopt.bgpopt_type, bgpopt.bgpopt_len);
 			break;
 		}
 
 		printf("\n\t    Option %s (%u), length: %u",
-                       tok2strbuf(bgp_opt_values,"Unknown",
+		       tok2strbuf(bgp_opt_values,"Unknown",
 				  bgpopt.bgpopt_type,
 				  tokbuf, sizeof(tokbuf)),
-                       bgpopt.bgpopt_type,
-                       bgpopt.bgpopt_len);
+		       bgpopt.bgpopt_type,
+		       bgpopt.bgpopt_len);
 
-                /* now lets decode the options we know*/
-                switch(bgpopt.bgpopt_type) {
-                case BGP_OPT_CAP:
-                    cap_type=opt[i+BGP_OPT_SIZE];
-                    cap_len=opt[i+BGP_OPT_SIZE+1];
-                    tcap_len=cap_len;
-                    printf("\n\t      %s (%u), length: %u",
-                           tok2strbuf(bgp_capcode_values, "Unknown",
-				      cap_type, tokbuf, sizeof(tokbuf)),
-                           cap_type,
-                           cap_len);
-                    switch(cap_type) {
-                    case BGP_CAPCODE_MP:
-                        printf("\n\t\tAFI %s (%u), SAFI %s (%u)",
-                               tok2strbuf(af_values, "Unknown",
-					  EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2),
-					  tokbuf, sizeof(tokbuf)),
-                               EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2),
-                               tok2strbuf(bgp_safi_values, "Unknown",
-					  opt[i+BGP_OPT_SIZE+5],
-					  tokbuf, sizeof(tokbuf)),
-                               opt[i+BGP_OPT_SIZE+5]);
-                        break;
-                    case BGP_CAPCODE_RESTART:
-                        printf("\n\t\tRestart Flags: [%s], Restart Time %us",
-                               ((opt[i+BGP_OPT_SIZE+2])&0x80) ? "R" : "none",
-                               EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2)&0xfff);
-                        tcap_len-=2;
-                        cap_offset=4;
-                        while(tcap_len>=4) {
-                            printf("\n\t\t  AFI %s (%u), SAFI %s (%u), Forwarding state preserved: %s",
-                                   tok2strbuf(af_values,"Unknown",
-					      EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+cap_offset),
-					      tokbuf, sizeof(tokbuf)),
-                                   EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+cap_offset),
-                                   tok2strbuf(bgp_safi_values,"Unknown",
-					      opt[i+BGP_OPT_SIZE+cap_offset+2],
-					      tokbuf2, sizeof(tokbuf2)),
-                                   opt[i+BGP_OPT_SIZE+cap_offset+2],
-                                   ((opt[i+BGP_OPT_SIZE+cap_offset+3])&0x80) ? "yes" : "no" );
-                            tcap_len-=4;
-                            cap_offset+=4;
-                        }
-                        break;
-                    case BGP_CAPCODE_RR:
-                    case BGP_CAPCODE_RR_CISCO:
-                        break;
-                    default:
-                        TCHECK2(opt[i+BGP_OPT_SIZE+2],cap_len);
-                        printf("\n\t\tno decoder for Capability %u",
-                               cap_type);
-                        if (vflag <= 1)
-                            print_unknown_data(&opt[i+BGP_OPT_SIZE+2],"\n\t\t",cap_len);
-                        break;
-                    }
-                    if (vflag > 1) {
-                        TCHECK2(opt[i+BGP_OPT_SIZE+2],cap_len);
-                        print_unknown_data(&opt[i+BGP_OPT_SIZE+2],"\n\t\t",cap_len);
-                    }
-                    break;
-                case BGP_OPT_AUTH:
-                default:
-                       printf("\n\t      no decoder for option %u",
-                           bgpopt.bgpopt_type);
-                       break;
-                }
+		/* now let's decode the options we know*/
+		switch(bgpopt.bgpopt_type) {
 
+		case BGP_OPT_CAP:
+			bgp_capabilities_print(&opt[i+BGP_OPT_SIZE],
+			    bgpopt.bgpopt_len);
+			break;
+
+		case BGP_OPT_AUTH:
+		default:
+		       printf("\n\t      no decoder for option %u",
+			   bgpopt.bgpopt_type);
+		       break;
+		}
 		i += BGP_OPT_SIZE + bgpopt.bgpopt_len;
 	}
 	return;
@@ -1739,107 +2358,163 @@
 bgp_update_print(const u_char *dat, int length)
 {
 	struct bgp bgp;
-	struct bgp_attr bgpa;
 	const u_char *p;
+	int withdrawn_routes_len;
 	int len;
 	int i;
 	char tokbuf[TOKBUFSIZE];
+#ifndef INET6
+	char buf[MAXHOSTNAMELEN + 100];
+	int wpfx;
+#endif
 
 	TCHECK2(dat[0], BGP_SIZE);
+	if (length < BGP_SIZE)
+		goto trunc;
 	memcpy(&bgp, dat, BGP_SIZE);
 	p = dat + BGP_SIZE;	/*XXX*/
+	length -= BGP_SIZE;
 
 	/* Unfeasible routes */
-	len = EXTRACT_16BITS(p);
-	if (len) {
+	TCHECK2(p[0], 2);
+	if (length < 2)
+		goto trunc;
+	withdrawn_routes_len = EXTRACT_16BITS(p);
+	p += 2;
+	length -= 2;
+	if (withdrawn_routes_len) {
 		/*
 		 * Without keeping state from the original NLRI message,
 		 * it's not possible to tell if this a v4 or v6 route,
 		 * so only try to decode it if we're not v6 enabled.
 	         */
+		TCHECK2(p[0], withdrawn_routes_len);
+		if (length < withdrawn_routes_len)
+			goto trunc;
 #ifdef INET6
-		printf("\n\t  Withdrawn routes: %d bytes", len);
+		printf("\n\t  Withdrawn routes: %d bytes", withdrawn_routes_len);
+		p += withdrawn_routes_len;
+		length -= withdrawn_routes_len;
 #else
-		char buf[MAXHOSTNAMELEN + 100];
-		int wpfx;
+		if (withdrawn_routes_len < 2)
+			goto trunc;
+		length -= 2;
+		withdrawn_routes_len -= 2;
 
-		TCHECK2(p[2], len);
-		i = 2;
 
 		printf("\n\t  Withdrawn routes:");
 
-		while(i < 2 + len) {
-			wpfx = decode_prefix4(&p[i], buf, sizeof(buf));
+		while(withdrawn_routes_len > 0) {
+			wpfx = decode_prefix4(p, withdrawn_routes_len, buf, sizeof(buf));
 			if (wpfx == -1) {
 				printf("\n\t    (illegal prefix length)");
 				break;
 			} else if (wpfx == -2)
 				goto trunc;
+			else if (wpfx == -3)
+				goto trunc; /* bytes left, but not enough */
 			else {
-				i += wpfx;
 				printf("\n\t    %s", buf);
+				p += wpfx;
+				length -= wpfx;
+				withdrawn_routes_len -= wpfx;
 			}
 		}
 #endif
 	}
-	p += 2 + len;
 
 	TCHECK2(p[0], 2);
+	if (length < 2)
+		goto trunc;
 	len = EXTRACT_16BITS(p);
+	p += 2;
+	length -= 2;
 
-        if (len == 0 && length == BGP_UPDATE_MINSIZE) {
+        if (withdrawn_routes_len == 0 && len == 0 && length == 0) {
+            /* No withdrawn routes, no path attributes, no NLRI */
             printf("\n\t  End-of-Rib Marker (empty NLRI)");
             return;
         }
 
 	if (len) {
 		/* do something more useful!*/
-		i = 2;
-		while (i < 2 + len) {
-			int alen, aoff;
+		while (len) {
+			int aflags, atype, alenlen, alen;
 
-			TCHECK2(p[i], sizeof(bgpa));
-			memcpy(&bgpa, &p[i], sizeof(bgpa));
-			alen = bgp_attr_len(&bgpa);
-			aoff = bgp_attr_off(&bgpa);
+			TCHECK2(p[0], 2);
+			if (len < 2)
+			    goto trunc;
+			if (length < 2)
+			    goto trunc;
+			aflags = *p;
+			atype = *(p + 1);
+			p += 2;
+			len -= 2;
+			length -= 2;
+			alenlen = bgp_attr_lenlen(aflags, p);
+			TCHECK2(p[0], alenlen);
+			if (len < alenlen)
+			    goto trunc;
+			if (length < alenlen)
+			    goto trunc;
+			alen = bgp_attr_len(aflags, p);
+			p += alenlen;
+			len -= alenlen;
+			length -= alenlen;
 
-		       printf("\n\t  %s (%u), length: %u",
+			printf("\n\t  %s (%u), length: %u",
                               tok2strbuf(bgp_attr_values, "Unknown Attribute",
-					 bgpa.bgpa_type,
+					 atype,
 					 tokbuf, sizeof(tokbuf)),
-                              bgpa.bgpa_type,
+                              atype,
                               alen);
 
-			if (bgpa.bgpa_flags) {
+			if (aflags) {
 				printf(", Flags [%s%s%s%s",
-					bgpa.bgpa_flags & 0x80 ? "O" : "",
-					bgpa.bgpa_flags & 0x40 ? "T" : "",
-					bgpa.bgpa_flags & 0x20 ? "P" : "",
-					bgpa.bgpa_flags & 0x10 ? "E" : "");
-				if (bgpa.bgpa_flags & 0xf)
-					printf("+%x", bgpa.bgpa_flags & 0xf);
+					aflags & 0x80 ? "O" : "",
+					aflags & 0x40 ? "T" : "",
+					aflags & 0x20 ? "P" : "",
+					aflags & 0x10 ? "E" : "");
+				if (aflags & 0xf)
+					printf("+%x", aflags & 0xf);
 				printf("]: ");
 			}
-			if (!bgp_attr_print(&bgpa, &p[i + aoff], alen))
+			if (len < alen)
 				goto trunc;
-			i += aoff + alen;
+			if (length < alen)
+				goto trunc;
+			if (!bgp_attr_print(atype, p, alen))
+				goto trunc;
+			p += alen;
+			len -= alen;
+			length -= alen;
 		}
 	} 
-	p += 2 + len;
 
-	if (dat + length > p) {
+	if (length) {
+		/*
+		 * XXX - what if they're using the "Advertisement of
+		 * Multiple Paths in BGP" feature:
+		 *
+		 * https://datatracker.ietf.org/doc/draft-ietf-idr-add-paths/
+		 *
+		 * http://tools.ietf.org/html/draft-ietf-idr-add-paths-06
+		 */
 		printf("\n\t  Updated routes:");
-		while (dat + length > p) {
+		while (length) {
 			char buf[MAXHOSTNAMELEN + 100];
-			i = decode_prefix4(p, buf, sizeof(buf));
+			i = decode_prefix4(p, length, buf, sizeof(buf));
 			if (i == -1) {
 				printf("\n\t    (illegal prefix length)");
 				break;
 			} else if (i == -2)
 				goto trunc;
+			else if (i == -3)
+				goto trunc; /* bytes left, but not enough */
 			else {
 				printf("\n\t    %s", buf);
 				p += i;
+				length -= i;
 			}
 		}
 	}
@@ -2077,3 +2752,10 @@
 trunc:
 	printf(" [|BGP]");
 }
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/print-bootp.c b/print-bootp.c
index e2086e4..5e73815 100644
--- a/print-bootp.c
+++ b/print-bootp.c
@@ -22,7 +22,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.89 2008-04-22 09:45:08 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -96,9 +96,9 @@
 	/* Only print interesting fields */
 	if (bp->bp_hops)
 		printf(", hops %d", bp->bp_hops);
-	if (bp->bp_xid)
+	if (EXTRACT_32BITS(&bp->bp_xid))
 		printf(", xid 0x%x", EXTRACT_32BITS(&bp->bp_xid));
-	if (bp->bp_secs)
+	if (EXTRACT_16BITS(&bp->bp_secs))
 		printf(", secs %d", EXTRACT_16BITS(&bp->bp_secs));
 
 	printf(", Flags [%s]",
@@ -108,22 +108,22 @@
 
 	/* Client's ip address */
 	TCHECK(bp->bp_ciaddr);
-	if (bp->bp_ciaddr.s_addr)
+	if (EXTRACT_32BITS(&bp->bp_ciaddr.s_addr))
 		printf("\n\t  Client-IP %s", ipaddr_string(&bp->bp_ciaddr));
 
 	/* 'your' ip address (bootp client) */
 	TCHECK(bp->bp_yiaddr);
-	if (bp->bp_yiaddr.s_addr)
+	if (EXTRACT_32BITS(&bp->bp_yiaddr.s_addr))
 		printf("\n\t  Your-IP %s", ipaddr_string(&bp->bp_yiaddr));
 
 	/* Server's ip address */
 	TCHECK(bp->bp_siaddr);
-	if (bp->bp_siaddr.s_addr)
+	if (EXTRACT_32BITS(&bp->bp_siaddr.s_addr))
 		printf("\n\t  Server-IP %s", ipaddr_string(&bp->bp_siaddr));
 
 	/* Gateway's ip address */
 	TCHECK(bp->bp_giaddr);
-	if (bp->bp_giaddr.s_addr)
+	if (EXTRACT_32BITS(&bp->bp_giaddr.s_addr))
 		printf("\n\t  Gateway-IP %s", ipaddr_string(&bp->bp_giaddr));
 
 	/* Client's Ethernet address */
@@ -187,7 +187,7 @@
  *     B - on/off (8 bits)
  *     $ - special (explicit code to handle)
  */
-static struct tok tag2str[] = {
+static const struct tok tag2str[] = {
 /* RFC1048 tags */
 	{ TAG_PAD,		" PAD" },
 	{ TAG_SUBNET_MASK,	"iSubnet-Mask" },	/* subnet mask (RFC950) */
@@ -308,12 +308,12 @@
 	{ 0,			NULL }
 };
 /* 2-byte extended tags */
-static struct tok xtag2str[] = {
+static const struct tok xtag2str[] = {
 	{ 0,			NULL }
 };
 
 /* DHCP "options overload" types */
-static struct tok oo2str[] = {
+static const struct tok oo2str[] = {
 	{ 1,			"file" },
 	{ 2,			"sname" },
 	{ 3,			"file+sname" },
@@ -321,7 +321,7 @@
 };
 
 /* NETBIOS over TCP/IP node type options */
-static struct tok nbo2str[] = {
+static const struct tok nbo2str[] = {
 	{ 0x1,			"b-node" },
 	{ 0x2,			"p-node" },
 	{ 0x4,			"m-node" },
@@ -330,7 +330,7 @@
 };
 
 /* ARP Hardware types, for Client-ID option */
-static struct tok arp2str[] = {
+static const struct tok arp2str[] = {
 	{ 0x1,			"ether" },
 	{ 0x6,			"ieee802" },
 	{ 0x7,			"arcnet" },
@@ -340,7 +340,7 @@
 	{ 0,			NULL }
 };
 
-static struct tok dhcp_msg_values[] = {
+static const struct tok dhcp_msg_values[] = {
         { DHCPDISCOVER, "Discover" },
         { DHCPOFFER, "Offer" },
         { DHCPREQUEST, "Request" },
@@ -352,9 +352,13 @@
         { 0,			NULL }
 };
 
-#define AGENT_SUBOPTION_CIRCUIT_ID 1
-static struct tok agent_suboption_values[] = {
+#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 const 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 }
 };
 
@@ -581,8 +585,6 @@
 				if (len < 1)  {
 					printf("ERROR: option %u len %u < 1 bytes",
 					    TAG_NETBIOS_NODE, len);
-					bp += len;
-					len = 0;
 					break;
 				}
 				tag = *bp++;
@@ -595,8 +597,6 @@
 				if (len < 1)  {
 					printf("ERROR: option %u len %u < 1 bytes",
 					    TAG_OPT_OVERLOAD, len);
-					bp += len;
-					len = 0;
 					break;
 				}
 				tag = *bp++;
@@ -636,8 +636,6 @@
 				if (len < 1)  {
 					printf("ERROR: option %u len %u < 1 bytes",
 					    TAG_CLIENT_ID, len);
-					bp += len;
-					len = 0;
 					break;
 				}
 				type = *bp++;
@@ -686,9 +684,11 @@
 					   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/print-bt.c b/print-bt.c
new file mode 100644
index 0000000..259f3e5
--- /dev/null
+++ b/print-bt.c
@@ -0,0 +1,79 @@
+/*
+ * 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.2 2008-09-25 21:45:50 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 "extract.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, (EXTRACT_32BITS(&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/print-calm-fast.c b/print-calm-fast.c
new file mode 100644
index 0000000..9824072
--- /dev/null
+++ b/print-calm-fast.c
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2013 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.
+ *
+ * Original code by Ola Martin Lykkja (ola.lykkja@q-free.com)
+ */
+
+#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 "extract.h"
+#include "addrtoname.h"
+
+/*
+   ISO 29281:2009
+   Intelligent Transport Systems . Communications access for land mobiles (CALM)
+   CALM non-IP networking
+*/
+
+/*
+ * This is the top level routine of the printer.  'bp' points
+ * to the calm header of the packet.
+ */
+void
+calm_fast_print(netdissect_options *ndo, const u_char *eth, const u_char *bp, u_int length)
+{
+	int srcNwref = bp[0];
+	int dstNwref = bp[1];
+	length -= 2;
+	bp += 2;
+
+	printf("CALM FAST src:%s; ", etheraddr_string(eth+6));
+	printf("SrcNwref:%d; ", srcNwref);
+	printf("DstNwref:%d; ", dstNwref);
+
+	if (ndo->ndo_vflag)
+		default_print(bp, length);
+}
+
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 8
+ * End:
+ */
diff --git a/print-carp.c b/print-carp.c
new file mode 100644
index 0000000..75f5774
--- /dev/null
+++ b/print-carp.c
@@ -0,0 +1,85 @@
+/*	$OpenBSD: print-carp.c,v 1.6 2009/10/27 23:59:55 deraadt Exp $	*/
+
+/*
+ * Copyright (c) 2000 William C. Fenner.
+ *                All rights reserved.
+ *
+ * Kevin Steves <ks@hp.se> July 2000
+ * Modified to:
+ * - print version, type string and packet length
+ * - print IP address count if > 1 (-v)
+ * - verify checksum (-v)
+ * - print authentication string (-v)
+ *
+ * Copyright (c) 2011 Advanced Computing Technologies
+ * George V. Neille-Neil
+ *
+ * Modified to:
+ * - work correctly with CARP
+ * - compile into the latest tcpdump
+ * - print out the counter
+ *
+ * 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.
+ * The name of William C. Fenner 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.
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "interface.h"
+#include "extract.h"
+#include "addrtoname.h"
+
+void
+carp_print(register const u_char *bp, register u_int len, int ttl)
+{
+	int version, type;
+	const char *type_s;
+
+	TCHECK(bp[0]);
+	version = (bp[0] & 0xf0) >> 4;
+	type = bp[0] & 0x0f;
+	if (type == 1)
+		type_s = "advertise";
+	else
+		type_s = "unknown";
+	printf("CARPv%d-%s %d: ", version, type_s, len);
+	if (ttl != 255)
+		printf("[ttl=%d!] ", ttl);
+	if (version != 2 || type != 1)
+		return;
+	TCHECK(bp[2]);
+	TCHECK(bp[5]);
+	printf("vhid=%d advbase=%d advskew=%d authlen=%d ",
+	    bp[1], bp[5], bp[2], bp[3]);
+	if (vflag) {
+		struct cksum_vec vec[1];
+		vec[0].ptr = (const u_int8_t *)bp;
+		vec[0].len = len;
+		if (TTEST2(bp[0], len) && in_cksum(vec, 1))
+			printf(" (bad carp cksum %x!)",
+				EXTRACT_16BITS(&bp[6]));
+	}
+	printf("counter=%" PRIu64, EXTRACT_64BITS(&bp[8]));
+
+	return;
+trunc:
+	printf("[|carp]");
+}
diff --git a/print-cdp.c b/print-cdp.c
index 4398fbe..152b2f9 100644
--- a/print-cdp.c
+++ b/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
@@ -45,7 +45,7 @@
 
 #define CDP_HEADER_LEN  4
 
-static struct tok cdp_tlv_values[] = {
+static const struct tok cdp_tlv_values[] = {
     { 0x01,             "Device-ID"},
     { 0x02,             "Address"},
     { 0x03,             "Port-ID"},
@@ -70,7 +70,7 @@
     { 0, NULL}
 };
 
-static struct tok cdp_capability_values[] = {
+static const struct tok cdp_capability_values[] = {
     { 0x01,             "Router" },
     { 0x02,             "Transparent Bridge" },
     { 0x04,             "Source Route Bridge" },
@@ -124,22 +124,25 @@
                                tok2str(cdp_tlv_values,"unknown field type", type),
                                type,
                                len,
-                               len>1 ? "s" : ""); /* plural */
+                               PLURAL_SUFFIX(len)); /* plural */
 
                     switch (type) {
 
                     case 0x01: /* Device-ID */
                         if (!vflag)
-                            printf(", Device-ID '%.*s'", len, tptr);
-                        else
-                            printf("'%.*s'", len, tptr);
+                            printf(", Device-ID ");
+                        printf("'");
+                        fn_printn(tptr, len, NULL);
+                        printf("'");
 			break;
                     case 0x02: /* Address */
                         if (cdp_print_addr(tptr, len) < 0)
                             goto trunc;
 			break;
                     case 0x03: /* Port-ID */
-			printf("'%.*s'", len, tptr);
+                        printf("'");
+                        fn_printn(tptr, len, NULL);
+                        printf("'");
 			break;
                     case 0x04: /* Capabilities */
 			printf("(0x%08x): %s",
@@ -156,7 +159,9 @@
                         }
 			break;
                     case 0x06: /* Platform */
-			printf("'%.*s'", len, tptr);
+                        printf("'");
+                        fn_printn(tptr, len, NULL);
+                        printf("'");
 			break;
                     case 0x07: /* Prefixes */
 			if (cdp_print_prefixes(tptr, len) < 0)
@@ -165,7 +170,9 @@
                     case 0x08: /* Protocol Hello Option - not documented */
 			break;
                     case 0x09: /* VTP Mgmt Domain  - not documented */
-			printf("'%.*s'", len,tptr);
+                        printf("'");
+                        fn_printn(tptr, len, NULL);
+                        printf("'");
 			break;
                     case 0x0a: /* Native VLAN ID - not documented */
 			printf("%d",EXTRACT_16BITS(tptr));
@@ -195,14 +202,20 @@
 			printf("0x%02x", *(tptr));
 			break;
                     case 0x14: /* System Name - not documented */
-			printf("'%.*s'", len, tptr);
+                        printf("'");
+                        fn_printn(tptr, len, NULL);
+                        printf("'");
 			break;
                     case 0x16: /* System Object ID - not documented */
 			if (cdp_print_addr(tptr, len) < 0)
 				goto trunc;
 			break;
                     case 0x17: /* Physical Location - not documented */
-			printf("0x%02x/%.*s", *(tptr), len - 1, tptr + 1 );
+			printf("0x%02x", *(tptr));
+			if (len > 1) {
+				printf("/");
+	                        fn_printn(tptr + 1, len - 1, NULL);
+	                }
 			break;
                     default:
                         print_unknown_data(tptr,"\n\t  ",len);
diff --git a/print-cfm.c b/print-cfm.c
new file mode 100644
index 0000000..5df498c
--- /dev/null
+++ b/print-cfm.c
@@ -0,0 +1,645 @@
+/*
+ * 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 0x%4x-%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:
+        msg_ptr.cfm_ltm = (const struct cfm_ltm_t *)tptr;
+
+        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:
+        msg_ptr.cfm_ltr = (const struct cfm_ltr_t *)tptr;
+
+        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/print-chdlc.c b/print-chdlc.c
index b7654f5..36db69d 100644
--- a/print-chdlc.c
+++ b/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
@@ -42,7 +42,7 @@
 
 static void chdlc_slarp_print(const u_char *, u_int);
 
-const struct tok chdlc_cast_values[] = { 
+static const struct tok chdlc_cast_values[] = { 
     { CHDLC_UNICAST, "unicast" },
     { CHDLC_BCAST, "bcast" },
     { 0, NULL}
@@ -85,7 +85,7 @@
 		break;
 #ifdef INET6
 	case ETHERTYPE_IPV6:
-		ip6_print(p, length);
+		ip6_print(gndo, p, length);
 		break;
 #endif
 	case CHDLC_TYPE_SLARP:
diff --git a/print-cip.c b/print-cip.c
index 774b700..e9d672f 100644
--- a/print-cip.c
+++ b/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/print-cnfp.c b/print-cnfp.c
index 9fdfbd4..86d7128 100644
--- a/print-cnfp.c
+++ b/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/print-dccp.c b/print-dccp.c
index e6bfca6..79ea5f7 100644
--- a/print-dccp.c
+++ b/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.8 2007-11-09 00:44:09 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -60,76 +60,28 @@
 	"check data checksum",
 };
 
+static inline u_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)
 {
-	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.mbz = 0;
-	phu.ph.len = htons(len);
-	phu.ph.proto = IPPROTO_DCCP;
-	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 *)dh, len, sp[0]+sp[1]+sp[2]+sp[3]+sp[4]+sp[5]);
+	return nextproto4_cksum(ip, (const u_int8_t *)(void *)dh,
+	    dccp_csum_coverage(dh, len), IPPROTO_DCCP);
 }
 
 #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;
-	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_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 nextproto6_cksum(ip6, (const u_int8_t *)(void *)dh,
+	    dccp_csum_coverage(dh, len), IPPROTO_DCCP);
 }
 #endif
 
@@ -279,32 +231,21 @@
 	}
 
 	/* checksum calculation */
+	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
-	if (ip6) {
-		if (ip6->ip6_plen && vflag) {
-			u_int16_t sum, dccp_sum;
-
+		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)) {
@@ -407,9 +348,6 @@
 static int dccp_print_option(const u_char *option)
 {	
 	u_int8_t optlen, i;
-	u_int32_t *ts;
-	u_int16_t *var16;
-	u_int32_t *var32;
 
 	TCHECK(*option);
 
@@ -483,22 +421,17 @@
 		for (i = 0; i < optlen -2; i ++) printf("%02x", *(option +2 + i));	
 		break;
 	case 41:
-		ts = (u_int32_t *)(option + 2);
-		printf("timestamp %u", (u_int32_t)ntohl(*ts));
+		printf("timestamp %u", EXTRACT_32BITS(option + 2));
 		break;
 	case 42:
-		ts = (u_int32_t *)(option + 2);
-		printf("timestamp_echo %u", (u_int32_t)ntohl(*ts));
+		printf("timestamp_echo %u", EXTRACT_32BITS(option + 2));
 		break;
 	case 43:
 		printf("elapsed_time ");
-		if (optlen == 6){
-			ts = (u_int32_t *)(option + 2);
-			printf("%u", (u_int32_t)ntohl(*ts));
-		} else {
-			var16 = (u_int16_t *)(option + 2);
-			printf("%u", ntohs(*var16));
-		}	
+		if (optlen == 6)
+			printf("%u", EXTRACT_32BITS(option + 2));
+		else
+			printf("%u", EXTRACT_16BITS(option + 2));
 		break;
 	case 44:
 		printf("data_checksum ");
@@ -509,12 +442,10 @@
 			printf("CCID option %d",*option);
 			switch (optlen) {
 				case 4:
-					var16 = (u_int16_t *)(option + 2);
-					printf(" %u",ntohs(*var16));
+					printf(" %u", EXTRACT_16BITS(option + 2));
 					break;
 				case 6:
-					var32 = (u_int32_t *)(option + 2);
-					printf(" %u",(u_int32_t)ntohl(*var32));
+					printf(" %u", EXTRACT_32BITS(option + 2));
 					break;
 				default:
 					break;
diff --git a/print-decnet.c b/print-decnet.c
index ae7ba5c..5b9dcfb 100644
--- a/print-decnet.c
+++ b/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
@@ -819,7 +819,7 @@
 	return (0);
 }
 
-static struct tok reason2str[] = {
+static const struct tok reason2str[] = {
 	{ UC_OBJREJECT,		"object rejected connect" },
 	{ UC_RESOURCES,		"insufficient resources" },
 	{ UC_NOSUCHNODE,	"unrecognized node name" },
diff --git a/print-dhcp6.c b/print-dhcp6.c
index 9f4999d..255f24a 100644
--- a/print-dhcp6.c
+++ b/print-dhcp6.c
@@ -29,18 +29,20 @@
 /*
  * RFC3315: DHCPv6
  * supported DHCPv6 options: 
- *  RFC3319,
- *  RFC3633,
- *  RFC3646,
- *  RFC3898,
- *  RFC4075,
- *  RFC4242,
- *  RFC4280,
+ *  RFC3319: Session Initiation Protocol (SIP) Servers options,
+ *  RFC3633: IPv6 Prefix options,
+ *  RFC3646: DNS Configuration options,
+ *  RFC3898: Network Information Service (NIS) Configuration options,
+ *  RFC4075: Simple Network Time Protocol (SNTP) Configuration option,
+ *  RFC4242: Information Refresh Time option,
+ *  RFC4280: Broadcast and Multicast Control Servers options,
+ *  RFC5908: Network Time Protocol (NTP) Server Option for DHCPv6
+ *  RFC6334: Dual-Stack Lite option,
  */
 
 #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.37 2008-02-06 10:26:09 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -80,6 +82,8 @@
 #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 +134,10 @@
 #  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
@@ -139,15 +147,15 @@
 #define DH6OPT_RECONF_ACCEPT 20
 #define DH6OPT_SIP_SERVER_D 21
 #define DH6OPT_SIP_SERVER_A 22
-#define DH6OPT_DNS 23
-#define DH6OPT_DNSNAME 24
+#define DH6OPT_DNS_SERVERS 23
+#define DH6OPT_DOMAIN_LIST 24
 #define DH6OPT_IA_PD 25
 #define DH6OPT_IA_PD_PREFIX 26
 #define DH6OPT_NIS_SERVERS 27
 #define DH6OPT_NISP_SERVERS 28
 #define DH6OPT_NIS_NAME 29
 #define DH6OPT_NISP_NAME 30
-#define DH6OPT_NTP_SERVERS 31
+#define DH6OPT_SNTP_SERVERS 31
 #define DH6OPT_LIFETIME 32
 #define DH6OPT_BCMCS_SERVER_D 33
 #define DH6OPT_BCMCS_SERVER_A 34
@@ -155,6 +163,20 @@
 #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
+#define DH6OPT_NTP_SERVER 56
+#  define DH6OPT_NTP_SUBOPTION_SRV_ADDR 1
+#  define DH6OPT_NTP_SUBOPTION_MC_ADDR 2
+#  define DH6OPT_NTP_SUBOPTION_SRV_FQDN 3
+#define DH6OPT_AFTR_NAME 64
 
 struct dhcp6opt {
 	u_int16_t dh6opt_type;
@@ -162,54 +184,19 @@
 	/* type-dependent data follows */
 };
 
-struct dhcp6_ia {
-	u_int16_t dh6opt_ia_type;
-	u_int16_t dh6opt_ia_len;
-	u_int32_t dh6opt_ia_iaid;
-	u_int32_t dh6opt_ia_t1;
-	u_int32_t dh6opt_ia_t2;
-};
-
-struct dhcp6_ia_addr {
-	u_int16_t dh6opt_ia_addr_type;
-	u_int16_t dh6opt_ia_addr_len;
-	struct in6_addr dh6opt_ia_addr_addr;
-	u_int32_t dh6opt_ia_addr_pltime;
-	u_int32_t dh6opt_ia_addr_vltime;
-}  __attribute__ ((__packed__));
-
-struct dhcp6_ia_prefix {
-	u_int16_t dh6opt_ia_prefix_type;
-	u_int16_t dh6opt_ia_prefix_len;
-	u_int32_t dh6opt_ia_prefix_pltime;
-	u_int32_t dh6opt_ia_prefix_vltime;
-	u_int8_t dh6opt_ia_prefix_plen;
-	struct in6_addr dh6opt_ia_prefix_addr;
-}  __attribute__ ((__packed__));
-
-struct dhcp6_auth {
-	u_int16_t dh6opt_auth_type;
-	u_int16_t dh6opt_auth_len;
-	u_int8_t dh6opt_auth_proto;
-	u_int8_t dh6opt_auth_alg;
-	u_int8_t dh6opt_auth_rdm;
-	u_int8_t dh6opt_auth_rdinfo[8];
-	/* authentication information follows */
-} __attribute__ ((__packed__));
-
 static const char *
 dhcp6opt_name(int type)
 {
 	static char genstr[sizeof("opt_65535") + 1]; /* XXX thread unsafe */
 
 	if (type > 65535)
-		return "INVALID option";
+		return "INVALID-option";
 
 	switch(type) {
 	case DH6OPT_CLIENTID:
-		return "client ID";
+		return "client-ID";
 	case DH6OPT_SERVERID:
-		return "server ID";
+		return "server-ID";
 	case DH6OPT_IA_NA:
 		return "IA_NA";
 	case DH6OPT_IA_TA:
@@ -217,69 +204,91 @@
 	case DH6OPT_IA_ADDR:
 		return "IA_ADDR";
 	case DH6OPT_ORO:
-		return "option request";
+		return "option-request";
 	case DH6OPT_PREFERENCE:
 		return "preference";
 	case DH6OPT_ELAPSED_TIME:
-		return "elapsed time";
+		return "elapsed-time";
 	case DH6OPT_RELAY_MSG:
-		return "relay message";
+		return "relay-message";
 	case DH6OPT_AUTH:
 		return "authentication";
 	case DH6OPT_UNICAST:
-		return "server unicast";
+		return "server-unicast";
 	case DH6OPT_STATUS_CODE:
-		return "status code";
+		return "status-code";
 	case DH6OPT_RAPID_COMMIT:
-		return "rapid commit";
+		return "rapid-commit";
 	case DH6OPT_USER_CLASS:
-		return "user class";
+		return "user-class";
 	case DH6OPT_VENDOR_CLASS:
-		return "vendor class";
+		return "vendor-class";
 	case DH6OPT_VENDOR_OPTS:
-		return "vendor-specific info";
+		return "vendor-specific-info";
 	case DH6OPT_INTERFACE_ID:
-		return "interface ID";
+		return "interface-ID";
 	case DH6OPT_RECONF_MSG:
-		return "reconfigure message";
+		return "reconfigure-message";
 	case DH6OPT_RECONF_ACCEPT:
-		return "reconfigure accept";
+		return "reconfigure-accept";
 	case DH6OPT_SIP_SERVER_D:
-		return "SIP servers domain";
+		return "SIP-servers-domain";
 	case DH6OPT_SIP_SERVER_A:
-		return "SIP servers address";
-	case DH6OPT_DNS:
-		return "DNS";
-	case DH6OPT_DNSNAME:
-		return "DNS name";
+		return "SIP-servers-address";
+	case DH6OPT_DNS_SERVERS:
+		return "DNS-server";
+	case DH6OPT_DOMAIN_LIST:
+		return "DNS-search-list";
 	case DH6OPT_IA_PD:
 		return "IA_PD";
 	case DH6OPT_IA_PD_PREFIX:
-		return "IA_PD prefix";
-	case DH6OPT_NTP_SERVERS:
-		return "NTP Server";
+		return "IA_PD-prefix";
+	case DH6OPT_SNTP_SERVERS:
+		return "SNTP-servers";
 	case DH6OPT_LIFETIME:
 		return "lifetime";
 	case DH6OPT_NIS_SERVERS:
-		return "NIS server";
+		return "NIS-server";
 	case DH6OPT_NISP_SERVERS:
-		return "NIS+ server";
+		return "NIS+-server";
 	case DH6OPT_NIS_NAME:
-		return "NIS domain name";
+		return "NIS-domain-name";
 	case DH6OPT_NISP_NAME:
-		return "NIS+ domain name";
+		return "NIS+-domain-name";
 	case DH6OPT_BCMCS_SERVER_D:
-		return "BCMCS domain name";
+		return "BCMCS-domain-name";
 	case DH6OPT_BCMCS_SERVER_A:
-		return "BCMCS server";
+		return "BCMCS-server";
 	case DH6OPT_GEOCONF_CIVIC:
-		return "Geoconf Civic";
+		return "Geoconf-Civic";
 	case DH6OPT_REMOTE_ID:
-		return "Remote ID";
+		return "Remote-ID";
 	case DH6OPT_SUBSCRIBER_ID:
-		return "Subscriber ID";
+		return "Subscriber-ID";
 	case DH6OPT_CLIENT_FQDN:
-		return "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";
+	case DH6OPT_NTP_SERVER:
+		return "NTP-server";
+	case DH6OPT_AFTR_NAME:
+		return "AFTR-Name";
 	default:
 		snprintf(genstr, sizeof(genstr), "opt_%d", type);
 		return(genstr);
@@ -309,6 +318,14 @@
 		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);
@@ -318,18 +335,17 @@
 static void
 dhcp6opt_print(const u_char *cp, const u_char *ep)
 {
-	struct dhcp6opt *dh6o;
-	u_char *tp;
+	const struct dhcp6opt *dh6o;
+	const u_char *tp;
 	size_t i;
 	u_int16_t opttype;
 	size_t optlen;
-	u_int16_t val16;
-	u_int32_t val32;
-	struct dhcp6_ia ia;
-	struct dhcp6_ia_prefix ia_prefix;
-	struct dhcp6_ia_addr ia_addr;
-	struct dhcp6_auth authopt;
+	u_int8_t auth_proto;
 	u_int authinfolen, authrealmlen;
+	int remain_len;  /* Length of remaining options */
+	int label_len;   /* Label length */
+	u_int16_t subopt_code;
+	u_int16_t subopt_len;
 
 	if (cp == ep)
 		return;
@@ -337,6 +353,7 @@
 		if (ep < cp + sizeof(*dh6o))
 			goto trunc;
 		dh6o = (struct dhcp6opt *)cp;
+		TCHECK(*dh6o);
 		optlen = EXTRACT_16BITS(&dh6o->dh6opt_len);
 		if (ep < cp + sizeof(*dh6o) + optlen)
 			goto trunc;
@@ -397,39 +414,32 @@
 			}
 			break;
 		case DH6OPT_IA_ADDR:
-			if (optlen < sizeof(ia_addr) - 4) {
+			if (optlen < 24) {
+				/*(*/
 				printf(" ?)");
 				break;
 			}
-			memcpy(&ia_addr, (u_char *)dh6o, sizeof(ia_addr));
-			printf(" %s",
-			    ip6addr_string(&ia_addr.dh6opt_ia_addr_addr));
-			ia_addr.dh6opt_ia_addr_pltime =
-			    ntohl(ia_addr.dh6opt_ia_addr_pltime);
-			ia_addr.dh6opt_ia_addr_vltime =
-			    ntohl(ia_addr.dh6opt_ia_addr_vltime);
-			printf(" pltime:%lu vltime:%lu",
-			    (unsigned long)ia_addr.dh6opt_ia_addr_pltime,
-			    (unsigned long)ia_addr.dh6opt_ia_addr_vltime);
-			if (optlen > sizeof(ia_addr) - 4) {
+			tp = (u_char *)(dh6o + 1);
+			printf(" %s", ip6addr_string(&tp[0]));
+			printf(" pltime:%u vltime:%u",
+			    EXTRACT_32BITS(&tp[16]),
+			    EXTRACT_32BITS(&tp[20]));
+			if (optlen > 24) {
 				/* there are sub-options */
-				dhcp6opt_print((u_char *)dh6o +
-				    sizeof(ia_addr),
-				    (u_char *)(dh6o + 1) + optlen);
+				dhcp6opt_print(tp + 24, tp + optlen);
 			}
 			printf(")");
 			break;
 		case DH6OPT_ORO:
+		case DH6OPT_ERO:
 			if (optlen % 2) {
 				printf(" ?)");
 				break;
 			}
 			tp = (u_char *)(dh6o + 1);
 			for (i = 0; i < optlen; i += 2) {
-				u_int16_t opt;
-
-				memcpy(&opt, &tp[i], sizeof(opt));
-				printf(" %s", dhcp6opt_name(ntohs(opt)));
+				printf(" %s",
+				    dhcp6opt_name(EXTRACT_16BITS(&tp[i])));
 			}
 			printf(")");
 			break;
@@ -438,29 +448,31 @@
 				printf(" ?)");
 				break;
 			}
-			printf(" %d)", *((u_char *)(dh6o + 1) + 1));
+			tp = (u_char *)(dh6o + 1);
+			printf(" %d)", *tp);
 			break;
 		case DH6OPT_ELAPSED_TIME:
 			if (optlen != 2) {
 				printf(" ?)");
 				break;
 			}
-			memcpy(&val16, dh6o + 1, sizeof(val16));
-			val16 = ntohs(val16);
-			printf(" %d)", (int)val16);
+			tp = (u_char *)(dh6o + 1);
+			printf(" %d)", EXTRACT_16BITS(tp));
 			break;
 		case DH6OPT_RELAY_MSG:
 			printf(" (");
-			dhcp6_print((const u_char *)(dh6o + 1), optlen);
+			tp = (u_char *)(dh6o + 1);
+			dhcp6_print(tp, optlen);
 			printf(")");
 			break;
 		case DH6OPT_AUTH:
-			if (optlen < sizeof(authopt) - sizeof(*dh6o)) {
+			if (optlen < 11) {
 				printf(" ?)");
 				break;
 			}
-			memcpy(&authopt, dh6o, sizeof(authopt));
-			switch (authopt.dh6opt_auth_proto) {
+			tp = (u_char *)(dh6o + 1);
+			auth_proto = *tp;
+			switch (auth_proto) {
 			case DH6OPT_AUTHPROTO_DELAYED:
 				printf(" proto: delayed");
 				break;
@@ -468,37 +480,36 @@
 				printf(" proto: reconfigure");
 				break;
 			default:
-				printf(" proto: %d",
-				    authopt.dh6opt_auth_proto);
+				printf(" proto: %d", auth_proto);
 				break;
 			}
-			switch (authopt.dh6opt_auth_alg) {
+			tp++;
+			switch (*tp) {
 			case DH6OPT_AUTHALG_HMACMD5:
 				/* XXX: may depend on the protocol */
 				printf(", alg: HMAC-MD5");
 				break;
 			default:
-				printf(", alg: %d", authopt.dh6opt_auth_alg);
+				printf(", alg: %d", *tp);
 				break;
 			}
-			switch (authopt.dh6opt_auth_rdm) {
+			tp++;
+			switch (*tp) {
 			case DH6OPT_AUTHRDM_MONOCOUNTER:
 				printf(", RDM: mono");
 				break;
 			default:
-				printf(", RDM: %d", authopt.dh6opt_auth_rdm);
+				printf(", RDM: %d", *tp);
 				break;
 			}
-			tp = (u_char *)&authopt.dh6opt_auth_rdinfo;
+			tp++;
 			printf(", RD:");
-			for (i = 0; i < 4; i++, tp += sizeof(val16))
+			for (i = 0; i < 4; i++, tp += 2)
 				printf(" %04x", EXTRACT_16BITS(tp));
 
 			/* protocol dependent part */
-			tp = (u_char *)dh6o + sizeof(authopt);
-			authinfolen =
-			    optlen + sizeof(*dh6o) - sizeof(authopt); 
-			switch (authopt.dh6opt_auth_proto) {
+			authinfolen = optlen - 11;
+			switch (auth_proto) {
 			case DH6OPT_AUTHPROTO_DELAYED:
 				if (authinfolen == 0)
 					break;
@@ -549,12 +560,16 @@
 			printf(")");
 			break;
 		case DH6OPT_INTERFACE_ID:
+		case DH6OPT_SUBSCRIBER_ID:
 			/*
 			 * Since we cannot predict the encoding, print hex dump
 			 * at most 10 characters.
 			 */
+			tp = (u_char *)(dh6o + 1);
+			printf(" ");
 			for (i = 0; i < optlen && i < 10; i++)
-				printf("%02x", ((u_char *)(dh6o + 1))[i]);
+				printf("%02x", tp[i]);
+			printf("...)");
 			break;
 		case DH6OPT_RECONF_MSG:
 			tp = (u_char *)(dh6o + 1);
@@ -574,11 +589,13 @@
 			printf(")");
 			break;
 		case DH6OPT_SIP_SERVER_A:
-		case DH6OPT_DNS:
-		case DH6OPT_NTP_SERVERS:
+		case DH6OPT_DNS_SERVERS:
+		case DH6OPT_SNTP_SERVERS:
 		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;
@@ -588,68 +605,197 @@
 				printf(" %s", ip6addr_string(&tp[i]));
 			printf(")");
 			break;
+		case DH6OPT_SIP_SERVER_D:
+		case DH6OPT_DOMAIN_LIST:
+			tp = (u_char *)(dh6o + 1);
+			while (tp < cp + sizeof(*dh6o) + optlen) {
+				putchar(' ');
+				if ((tp = ns_nprint(tp, cp + sizeof(*dh6o) + optlen)) == NULL)
+					goto trunc;
+			}
+			printf(")");
+			break;
 		case DH6OPT_STATUS_CODE:
 			if (optlen < 2) {
 				printf(" ?)");
 				break;
 			}
-			memcpy(&val16, (u_char *)(dh6o + 1), sizeof(val16));
-			val16 = ntohs(val16);
-			printf(" %s)", dhcp6stcode(val16));
+			tp = (u_char *)(dh6o + 1);
+			printf(" %s)", dhcp6stcode(EXTRACT_16BITS(&tp[0])));
 			break;
 		case DH6OPT_IA_NA:
 		case DH6OPT_IA_PD:
-			if (optlen < sizeof(ia) - 4) {
+			if (optlen < 12) {
 				printf(" ?)");
 				break;
 			}
-			memcpy(&ia, (u_char *)dh6o, sizeof(ia));
-			ia.dh6opt_ia_iaid = ntohl(ia.dh6opt_ia_iaid);
-			ia.dh6opt_ia_t1 = ntohl(ia.dh6opt_ia_t1);
-			ia.dh6opt_ia_t2 = ntohl(ia.dh6opt_ia_t2);
-			printf(" IAID:%lu T1:%lu T2:%lu",
-			    (unsigned long)ia.dh6opt_ia_iaid,
-			    (unsigned long)ia.dh6opt_ia_t1,
-			    (unsigned long)ia.dh6opt_ia_t2);
-			if (optlen > sizeof(ia) - 4) {
+			tp = (u_char *)(dh6o + 1);
+			printf(" IAID:%u T1:%u T2:%u",
+			    EXTRACT_32BITS(&tp[0]),
+			    EXTRACT_32BITS(&tp[4]),
+			    EXTRACT_32BITS(&tp[8]));
+			if (optlen > 12) {
 				/* there are sub-options */
-				dhcp6opt_print((u_char *)dh6o + sizeof(ia),
-				    (u_char *)(dh6o + 1) + optlen);
+				dhcp6opt_print(tp + 12, tp + optlen);
+			}
+			printf(")");
+			break;
+		case DH6OPT_IA_TA:
+			if (optlen < 4) {
+				printf(" ?)");
+				break;
+			}
+			tp = (u_char *)(dh6o + 1);
+			printf(" IAID:%u", EXTRACT_32BITS(tp));
+			if (optlen > 4) {
+				/* there are sub-options */
+				dhcp6opt_print(tp + 4, tp + optlen);
 			}
 			printf(")");
 			break;
 		case DH6OPT_IA_PD_PREFIX:
-			if (optlen < sizeof(ia_prefix) - 4) {
+			if (optlen < 25) {
 				printf(" ?)");
 				break;
 			}
-			memcpy(&ia_prefix, (u_char *)dh6o, sizeof(ia_prefix));
-			printf(" %s/%d",
-			    ip6addr_string(&ia_prefix.dh6opt_ia_prefix_addr),
-			    ia_prefix.dh6opt_ia_prefix_plen);
-			ia_prefix.dh6opt_ia_prefix_pltime =
-			    ntohl(ia_prefix.dh6opt_ia_prefix_pltime);
-			ia_prefix.dh6opt_ia_prefix_vltime =
-			    ntohl(ia_prefix.dh6opt_ia_prefix_vltime);
-			printf(" pltime:%lu vltime:%lu",
-			    (unsigned long)ia_prefix.dh6opt_ia_prefix_pltime,
-			    (unsigned long)ia_prefix.dh6opt_ia_prefix_vltime);
-			if (optlen > sizeof(ia_prefix) - 4) {
+			tp = (u_char *)(dh6o + 1);
+			printf(" %s/%d", ip6addr_string(&tp[9]), tp[8]);
+			printf(" pltime:%u vltime:%u",
+			    EXTRACT_32BITS(&tp[0]),
+			    EXTRACT_32BITS(&tp[4]));
+			if (optlen > 25) {
 				/* there are sub-options */
-				dhcp6opt_print((u_char *)dh6o +
-				    sizeof(ia_prefix),
-				    (u_char *)(dh6o + 1) + optlen);
+				dhcp6opt_print(tp + 25, tp + optlen);
 			}
 			printf(")");
 			break;
 		case DH6OPT_LIFETIME:
+		case DH6OPT_CLT_TIME:
 			if (optlen != 4) {
 				printf(" ?)");
 				break;
 			}
-			memcpy(&val32, dh6o + 1, sizeof(val32));
-			val32 = ntohl(val32);
-			printf(" %d)", (int)val32);
+			tp = (u_char *)(dh6o + 1);
+			printf(" %d)", EXTRACT_32BITS(tp));
+			break;
+		case DH6OPT_REMOTE_ID:
+			if (optlen < 4) {
+				printf(" ?)");
+				break;
+			}
+			tp = (u_char *)(dh6o + 1);
+			printf(" %d ", EXTRACT_32BITS(tp));
+			/*
+			 * 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:
+			tp = (u_char *)(dh6o + 1);
+			if (optlen > 0) {
+				/* there are encapsulated options */
+				dhcp6opt_print(tp, tp + 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;
+		case DH6OPT_NTP_SERVER:
+			if (optlen < 4) {
+				printf(" ?)");
+				break;
+			}
+			tp = (u_char *)(dh6o + 1);
+			while (tp < cp + sizeof(*dh6o) + optlen - 4) {
+				subopt_code = EXTRACT_16BITS(tp);
+				tp += 2;
+				subopt_len = EXTRACT_16BITS(tp);
+				tp += 2;
+				if (tp + subopt_len > cp + sizeof(*dh6o) + optlen)
+					goto trunc;
+				printf(" subopt:%d", subopt_code);
+				switch (subopt_code) {
+				case DH6OPT_NTP_SUBOPTION_SRV_ADDR:
+				case DH6OPT_NTP_SUBOPTION_MC_ADDR:
+					if (subopt_len != 16) {
+						printf(" ?");
+						break;
+					}
+					printf(" %s", ip6addr_string(&tp[0]));
+					break;
+				case DH6OPT_NTP_SUBOPTION_SRV_FQDN:
+					putchar(' ');
+					if (ns_nprint(tp, tp + subopt_len) == NULL)
+						goto trunc;
+					break;
+				default:
+					printf(" ?");
+					break;
+				}
+				tp += subopt_len;
+			}
+			printf(")");
+			break;
+		case DH6OPT_AFTR_NAME:
+			if (optlen < 3) {
+				printf(" ?)");
+				break;
+			}
+			tp = (u_char *)(dh6o + 1);
+			remain_len = optlen;
+			printf(" ");
+			/* Encoding is described in section 3.1 of RFC 1035 */
+			while (remain_len && *tp) {
+				label_len =  *tp++;
+				if (label_len < remain_len - 1) {
+					printf("%.*s", label_len, tp);
+					tp += label_len;
+					remain_len -= (label_len + 1);
+					if(*tp) printf(".");
+				} else {
+					printf(" ?");
+					break;
+				}
+			}
+			printf(")");
 			break;
 		default:
 			printf(")");
@@ -725,6 +871,12 @@
 	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/print-domain.c b/print-domain.c
index d4a35d8..80e8ce9 100644
--- a/print-domain.c
+++ b/print-domain.c
@@ -21,7 +21,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.98 2007-12-09 01:40:32 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -144,7 +144,7 @@
 		return(i);
 }
 
-static const u_char *
+const u_char *
 ns_nprint(register const u_char *cp, register const u_char *bp)
 {
 	register u_int i, l;
@@ -242,7 +242,7 @@
 }
 
 /* http://www.iana.org/assignments/dns-parameters */
-struct tok ns_type2str[] = {
+const struct tok ns_type2str[] = {
 	{ T_A,		"A" },			/* RFC 1035 */
 	{ T_NS,		"NS" },			/* RFC 1035 */
 	{ T_MD,		"MD" },			/* RFC 1035 */
@@ -307,7 +307,7 @@
 	{ 0,		NULL }
 };
 
-struct tok ns_class2str[] = {
+const struct tok ns_class2str[] = {
 	{ C_IN,		"IN" },		/* Not used */
 	{ C_CHAOS,	"CHAOS" },
 	{ C_HS,		"HS" },
@@ -387,13 +387,22 @@
 			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;
@@ -408,7 +417,7 @@
 	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:
@@ -475,15 +484,24 @@
 
 #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);
@@ -497,7 +515,8 @@
 				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/print-dtp.c b/print-dtp.c
new file mode 100644
index 0000000..14ac691
--- /dev/null
+++ b/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 const 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/print-dvmrp.c b/print-dvmrp.c
index 2c159bf..437e716 100644
--- a/print-dvmrp.c
+++ b/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/print-eap.c b/print-eap.c
index fb39e76..9fb333a 100644
--- a/print-eap.c
+++ b/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 @@
 #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);
 
-	eap = (const struct eap_packet_t *)cp;
-	ND_TCHECK(eap->data);
+    /* 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));
 
-        ND_PRINT((ndo, "EAP code=%u id=%u length=%u ", 
-		  eap->code, eap->id, (eap->length[0]<<8) + eap->length[1]));
+    tptr += sizeof(const struct eap_frame_t);
+    tlen -= sizeof(const struct eap_frame_t);
 
-        if (!ndo->ndo_vflag)
-            return;
+    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);
 
-trunc:
-	;
+        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;
+
+                /*
+                 * 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;
+
+            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 (EAP_TLS_EXTRACT_BIT_L(*(tptr+5))) {
+		    printf(" len %u", EXTRACT_32BITS(tptr+6));
+                }
+                break;
+
+            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/print-egp.c b/print-egp.c
index e5a811d..4a1d046 100644
--- a/print-egp.c
+++ b/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 @@
 		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/print-eigrp.c b/print-eigrp.c
index 3168b3c..4f941d9 100644
--- a/print-eigrp.c
+++ b/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
@@ -280,7 +280,7 @@
 
         if (eigrp_tlv_len < sizeof(struct eigrp_tlv_header) ||
             eigrp_tlv_len > tlen) {
-            print_unknown_data(tptr+sizeof(sizeof(struct eigrp_tlv_header)),"\n\t    ",tlen);
+            print_unknown_data(tptr+sizeof(struct eigrp_tlv_header),"\n\t    ",tlen);
             return;
         }
 
@@ -468,7 +468,7 @@
         }
         /* do we want to see an additionally hexdump ? */
         if (vflag > 1)
-            print_unknown_data(tptr+sizeof(sizeof(struct eigrp_tlv_header)),"\n\t    ",
+            print_unknown_data(tptr+sizeof(struct eigrp_tlv_header),"\n\t    ",
                                eigrp_tlv_len-sizeof(struct eigrp_tlv_header));
 
         tptr+=eigrp_tlv_len;
diff --git a/print-enc.c b/print-enc.c
index f9b871b..5c01f3e 100644
--- a/print-enc.c
+++ b/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.6 2008-11-18 07:35:32 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -35,6 +35,7 @@
 #include <pcap.h>
 
 #include "interface.h"
+#include "extract.h"
 #include "addrtoname.h"
 
 #include "enc.h"
@@ -67,11 +68,22 @@
 	ENC_PRINT_TYPE(flags, M_AUTH, "authentic");
 	ENC_PRINT_TYPE(flags, M_CONF, "confidential");
 	/* ENC_PRINT_TYPE(flags, M_TUNNEL, "tunnel"); */
-	printf("SPI 0x%08x: ", (u_int32_t)ntohl(hdr->spi));
+	printf("SPI 0x%08x: ", EXTRACT_32BITS(&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;
+#ifdef INET6
+	case AF_INET6:
+		ip6_print(gndo, p, length);
+		break;
+#endif /*INET6*/
+	}
 
 out:
 	return (ENC_HDRLEN);
diff --git a/print-esp.c b/print-esp.c
index 3ccc899..e01f967 100644
--- a/print-esp.c
+++ b/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.58 2007-12-07 00:03:07 mcr Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -36,9 +36,15 @@
 
 #include <stdlib.h>
 
+/* Any code in this file that depends on HAVE_LIBCRYPTO depends on
+ * HAVE_OPENSSL_EVP_H too. Undefining the former when the latter isn't defined
+ * is the simplest way of handling the dependency.
+ */
 #ifdef HAVE_LIBCRYPTO
 #ifdef HAVE_OPENSSL_EVP_H
 #include <openssl/evp.h>
+#else
+#undef HAVE_LIBCRYPTO
 #endif
 #endif
 
@@ -71,14 +77,74 @@
 struct sa_list {
 	struct sa_list	*next;
 	struct sockaddr_storage daddr;
-	u_int32_t	spi;
+	u_int32_t	spi;          /* if == 0, then IKEv2 */
+	int             initiator;
+	u_char          spii[8];      /* for IKEv2 */
+	u_char          spir[8];
 	const EVP_CIPHER *evp;
 	int		ivlen;
 	int		authlen;
+	u_char          authsecret[256];
+	int             authsecret_len;
 	u_char		secret[256];  /* is that big enough for all secrets? */
 	int		secretlen;
 };
 
+/*
+ * this will adjust ndo_packetp and ndo_snapend to new buffer!
+ */
+USES_APPLE_DEPRECATED_API
+int esp_print_decrypt_buffer_by_ikev2(netdissect_options *ndo,
+				      int initiator,
+				      u_char spii[8], u_char spir[8],
+				      u_char *buf, u_char *end)
+{
+	struct sa_list *sa;
+	u_char *iv;
+	int len;
+	EVP_CIPHER_CTX ctx;
+
+	/* initiator arg is any non-zero value */
+	if(initiator) initiator=1;
+				       
+	/* see if we can find the SA, and if so, decode it */
+	for (sa = ndo->ndo_sa_list_head; sa != NULL; sa = sa->next) {
+		if (sa->spi == 0
+		    && initiator == sa->initiator
+		    && memcmp(spii, sa->spii, 8) == 0
+		    && memcmp(spir, sa->spir, 8) == 0)
+			break;
+	}
+
+	if(sa == NULL) return 0;
+	if(sa->evp == NULL) return 0;
+
+	/*
+	 * remove authenticator, and see if we still have something to
+	 * work with
+	 */
+	end = end - sa->authlen;
+	iv  = buf;
+	buf = buf + sa->ivlen;
+	len = end-buf;
+
+	if(end <= buf) return 0;
+
+	memset(&ctx, 0, sizeof(ctx));
+	if (EVP_CipherInit(&ctx, sa->evp, sa->secret, NULL, 0) < 0)
+		(*ndo->ndo_warning)(ndo, "espkey init failed");
+	EVP_CipherInit(&ctx, NULL, NULL, iv, 0);
+	EVP_Cipher(&ctx, buf, buf, len);
+	EVP_CIPHER_CTX_cleanup(&ctx);
+
+	ndo->ndo_packetp = buf;
+	ndo->ndo_snapend = end;
+
+	return 1;
+	
+}
+USES_APPLE_RST
+
 static void esp_print_addsa(netdissect_options *ndo,
 			    struct sa_list *sa, int sa_def)
 {
@@ -123,13 +189,193 @@
 }
 
 /*
+ * returns size of binary, 0 on failure.
+ */
+static
+int espprint_decode_hex(netdissect_options *ndo,
+			u_char *binbuf, unsigned int binbuf_len,
+			char *hex)
+{
+	unsigned int len;
+	int i;
+
+	len = strlen(hex) / 2;
+		
+	if (len > binbuf_len) {
+		(*ndo->ndo_warning)(ndo, "secret is too big: %d\n", len);
+		return 0;
+	}
+		
+	i = 0;
+	while (hex[0] != '\0' && hex[1]!='\0') {
+		binbuf[i] = hex2byte(ndo, hex);
+		hex += 2;
+		i++;
+	}
+
+	return i;
+}
+
+/*
  * decode the form:    SPINUM@IP <tab> ALGONAME:0xsecret
+ */
+
+USES_APPLE_DEPRECATED_API
+static int
+espprint_decode_encalgo(netdissect_options *ndo,
+			char *decode, struct sa_list *sa)
+{
+	size_t i;
+	const EVP_CIPHER *evp;
+	int authlen = 0;
+	char *colon, *p;
+	
+	colon = strchr(decode, ':');
+	if (colon == NULL) {
+		(*ndo->ndo_warning)(ndo, "failed to decode espsecret: %s\n", decode);
+		return 0;
+	}
+	*colon = '\0';
+	
+	if (strlen(decode) > strlen("-hmac96") &&
+	    !strcmp(decode + strlen(decode) - strlen("-hmac96"),
+		    "-hmac96")) {
+		p = strstr(decode, "-hmac96");
+		*p = '\0';
+		authlen = 12;
+	}
+	if (strlen(decode) > strlen("-cbc") &&
+	    !strcmp(decode + strlen(decode) - strlen("-cbc"), "-cbc")) {
+		p = strstr(decode, "-cbc");
+		*p = '\0';
+	}
+	evp = EVP_get_cipherbyname(decode);
+
+	if (!evp) {
+		(*ndo->ndo_warning)(ndo, "failed to find cipher algo %s\n", decode);
+		sa->evp = NULL;
+		sa->authlen = 0;
+		sa->ivlen = 0;
+		return 0;
+	}
+	
+	sa->evp = evp;
+	sa->authlen = authlen;
+	sa->ivlen = EVP_CIPHER_iv_length(evp);
+	
+	colon++;
+	if (colon[0] == '0' && colon[1] == 'x') {
+		/* decode some hex! */
+
+		colon += 2;
+		sa->secretlen = espprint_decode_hex(ndo, sa->secret, sizeof(sa->secret), colon);
+		if(sa->secretlen == 0) return 0;
+	} else {
+		i = strlen(colon);
+		
+		if (i < sizeof(sa->secret)) {
+			memcpy(sa->secret, colon, i);
+			sa->secretlen = i;
+		} else {
+			memcpy(sa->secret, colon, sizeof(sa->secret));
+			sa->secretlen = sizeof(sa->secret);
+		}
+	}
+
+	return 1;
+}
+USES_APPLE_RST
+
+/*
+ * for the moment, ignore the auth algorith, just hard code the authenticator
+ * length. Need to research how openssl looks up HMAC stuff.
+ */
+static int
+espprint_decode_authalgo(netdissect_options *ndo,
+			 char *decode, struct sa_list *sa)
+{
+	char *colon;
+
+	colon = strchr(decode, ':');
+	if (colon == NULL) {
+		(*ndo->ndo_warning)(ndo, "failed to decode espsecret: %s\n", decode);
+		return 0;
+	}
+	*colon = '\0';
+	
+	if(strcasecmp(colon,"sha1") == 0 ||
+	   strcasecmp(colon,"md5") == 0) {
+		sa->authlen = 12;
+	}
+	return 1;
+}
+
+static void esp_print_decode_ikeline(netdissect_options *ndo, char *line,
+				     const char *file, int lineno)
+{
+	/* it's an IKEv2 secret, store it instead */
+	struct sa_list sa1;
+
+	char *init;
+	char *icookie, *rcookie;
+	int   ilen, rlen;
+	char *authkey;
+	char *enckey;
+	
+	init = strsep(&line, " \t");
+	icookie = strsep(&line, " \t");
+	rcookie = strsep(&line, " \t");
+	authkey = strsep(&line, " \t");
+	enckey  = strsep(&line, " \t");
+	
+	/* if any fields are missing */
+	if(!init || !icookie || !rcookie || !authkey || !enckey) {
+		(*ndo->ndo_warning)(ndo, "print_esp: failed to find all fields for ikev2 at %s:%u",
+				    file, lineno);
+		
+		return;
+	}
+	
+	ilen = strlen(icookie);
+	rlen = strlen(rcookie);
+
+	if((init[0]!='I' && init[0]!='R')
+	   || icookie[0]!='0' || icookie[1]!='x'
+	   || rcookie[0]!='0' || rcookie[1]!='x'
+	   || ilen!=18
+	   || rlen!=18) {
+		(*ndo->ndo_warning)(ndo, "print_esp: line %s:%u improperly formatted.",
+				    file, lineno);
+
+		(*ndo->ndo_warning)(ndo, "init=%s icookie=%s(%u) rcookie=%s(%u)",
+				    init, icookie, ilen, rcookie, rlen);
+		
+		return;
+	}
+
+	sa1.spi = 0;
+	sa1.initiator = (init[0] == 'I');
+	if(espprint_decode_hex(ndo, sa1.spii, sizeof(sa1.spii), icookie+2)!=8)
+		return;
+
+	if(espprint_decode_hex(ndo, sa1.spir, sizeof(sa1.spir), rcookie+2)!=8)
+		return;
+
+	if(!espprint_decode_encalgo(ndo, enckey, &sa1)) return;
+
+	if(!espprint_decode_authalgo(ndo, authkey, &sa1)) return;
+	
+	esp_print_addsa(ndo, &sa1, FALSE);
+}
+
+/*
  *
  * special form: file /name
  * causes us to go read from this file instead.
  *
  */
-static void esp_print_decode_onesecret(netdissect_options *ndo, char *line)
+static void esp_print_decode_onesecret(netdissect_options *ndo, char *line,
+				       const char *file, int lineno)
 {
 	struct sa_list sa1;
 	int sa_def;
@@ -155,15 +401,18 @@
 		/* open file and read it */
 		FILE *secretfile;
 		char  fileline[1024];
+		int   lineno=0;
 		char  *nl;
+		char *filename = line;
 
-		secretfile = fopen(line, FOPEN_READ_TXT);
+		secretfile = fopen(filename, FOPEN_READ_TXT);
 		if (secretfile == NULL) {
-			perror(line);
+			perror(filename);
 			exit(3);
 		}
 
 		while (fgets(fileline, sizeof(fileline)-1, secretfile) != NULL) {
+			lineno++;
 			/* remove newline from the line */
 			nl = strchr(fileline, '\n');
 			if (nl)
@@ -171,31 +420,37 @@
 			if (fileline[0] == '#') continue;
 			if (fileline[0] == '\0') continue;
 
-			esp_print_decode_onesecret(ndo, fileline);
+			esp_print_decode_onesecret(ndo, fileline, filename, lineno);
 		}
 		fclose(secretfile);
 
 		return;
 	}
 
+	if (spikey && strcasecmp(spikey, "ikev2") == 0) {
+		esp_print_decode_ikeline(ndo, line, file, lineno);
+		return;
+	} 
+
 	if (spikey) {
+		
 		char *spistr, *foo;
 		u_int32_t spino;
 		struct sockaddr_in *sin;
 #ifdef INET6
 		struct sockaddr_in6 *sin6;
 #endif
-
+		
 		spistr = strsep(&spikey, "@");
-
+		
 		spino = strtoul(spistr, &foo, 0);
 		if (spistr == foo || !spikey) {
 			(*ndo->ndo_warning)(ndo, "print_esp: failed to decode spi# %s\n", foo);
 			return;
 		}
-
+		
 		sa1.spi = spino;
-
+		
 		sin = (struct sockaddr_in *)&sa1.daddr;
 #ifdef INET6
 		sin6 = (struct sockaddr_in6 *)&sa1.daddr;
@@ -206,124 +461,70 @@
 			sin6->sin6_family = AF_INET6;
 		} else
 #endif
-		if (inet_pton(AF_INET, spikey, &sin->sin_addr) == 1) {
+			if (inet_pton(AF_INET, spikey, &sin->sin_addr) == 1) {
 #ifdef HAVE_SOCKADDR_SA_LEN
-			sin->sin_len = sizeof(struct sockaddr_in);
+				sin->sin_len = sizeof(struct sockaddr_in);
 #endif
-			sin->sin_family = AF_INET;
-		} else {
-			(*ndo->ndo_warning)(ndo, "print_esp: can not decode IP# %s\n", spikey);
-			return;
-		}
+				sin->sin_family = AF_INET;
+			} else {
+				(*ndo->ndo_warning)(ndo, "print_esp: can not decode IP# %s\n", spikey);
+				return;
+			}
 	}
 
 	if (decode) {
-		char *colon, *p;
-		u_char espsecret_key[256];
-		int len;
-		size_t i;
-		const EVP_CIPHER *evp;
-		int authlen = 0;
-
 		/* skip any blank spaces */
 		while (isspace((unsigned char)*decode))
 			decode++;
-
-		colon = strchr(decode, ':');
-		if (colon == NULL) {
-			(*ndo->ndo_warning)(ndo, "failed to decode espsecret: %s\n", decode);
+		
+		if(!espprint_decode_encalgo(ndo, decode, &sa1)) {
 			return;
 		}
-		*colon = '\0';
-
-		len = colon - decode;
-		if (strlen(decode) > strlen("-hmac96") &&
-		    !strcmp(decode + strlen(decode) - strlen("-hmac96"),
-		    "-hmac96")) {
-			p = strstr(decode, "-hmac96");
-			*p = '\0';
-			authlen = 12;
-		}
-		if (strlen(decode) > strlen("-cbc") &&
-		    !strcmp(decode + strlen(decode) - strlen("-cbc"), "-cbc")) {
-			p = strstr(decode, "-cbc");
-			*p = '\0';
-		}
-		evp = EVP_get_cipherbyname(decode);
-		if (!evp) {
-			(*ndo->ndo_warning)(ndo, "failed to find cipher algo %s\n", decode);
-			sa1.evp = NULL;
-			sa1.authlen = 0;
-			sa1.ivlen = 0;
-			return;
-		}
-
-		sa1.evp = evp;
-		sa1.authlen = authlen;
-		sa1.ivlen = EVP_CIPHER_iv_length(evp);
-
-		colon++;
-		if (colon[0] == '0' && colon[1] == 'x') {
-			/* decode some hex! */
-			colon += 2;
-			len = strlen(colon) / 2;
-
-			if (len > 256) {
-				(*ndo->ndo_warning)(ndo, "secret is too big: %d\n", len);
-				return;
-			}
-
-			i = 0;
-			while (colon[0] != '\0' && colon[1]!='\0') {
-				espsecret_key[i] = hex2byte(ndo, colon);
-				colon += 2;
-				i++;
-			}
-
-			memcpy(sa1.secret, espsecret_key, i);
-			sa1.secretlen = i;
-		} else {
-			i = strlen(colon);
-
-			if (i < sizeof(sa1.secret)) {
-				memcpy(sa1.secret, colon, i);
-				sa1.secretlen = i;
-			} else {
-				memcpy(sa1.secret, colon, sizeof(sa1.secret));
-				sa1.secretlen = sizeof(sa1.secret);
-			}
-		}
 	}
 
 	esp_print_addsa(ndo, &sa1, sa_def);
 }
 
-static void esp_print_decodesecret(netdissect_options *ndo)
-{
-	char *line;
-	char *p;
-
-	p = ndo->ndo_espsecret;
-
-	while (ndo->ndo_espsecret && ndo->ndo_espsecret[0] != '\0') {
-		/* pick out the first line or first thing until a comma */
-		if ((line = strsep(&ndo->ndo_espsecret, "\n,")) == NULL) {
-			line = ndo->ndo_espsecret;
-			ndo->ndo_espsecret = NULL;
-		}
-
-		esp_print_decode_onesecret(ndo, line);
-	}
-}
-
+USES_APPLE_DEPRECATED_API
 static void esp_init(netdissect_options *ndo _U_)
 {
 
 	OpenSSL_add_all_algorithms();
 	EVP_add_cipher_alias(SN_des_ede3_cbc, "3des");
 }
+USES_APPLE_RST
+
+void esp_print_decodesecret(netdissect_options *ndo)
+{
+	char *line;
+	char *p;
+	static int initialized = 0;
+
+	if (!initialized) {
+		esp_init(ndo);
+		initialized = 1;
+	}
+
+	p = ndo->ndo_espsecret;
+
+	while (p && p[0] != '\0') {
+		/* pick out the first line or first thing until a comma */
+		if ((line = strsep(&p, "\n,")) == NULL) {
+			line = p;
+			p = NULL;
+		}
+
+		esp_print_decode_onesecret(ndo, line, "cmdline", 0);
+	}
+
+	ndo->ndo_espsecret = NULL;
+}
+
 #endif
 
+#ifdef HAVE_LIBCRYPTO
+USES_APPLE_DEPRECATED_API
+#endif
 int
 esp_print(netdissect_options *ndo,
 	  const u_char *bp, const int length, const u_char *bp2
@@ -347,7 +548,6 @@
 #ifdef HAVE_LIBCRYPTO
 	struct ip *ip;
 	struct sa_list *sa = NULL;
-	int espsecret_keylen;
 #ifdef INET6
 	struct ip6_hdr *ip6 = NULL;
 #endif
@@ -358,8 +558,6 @@
 	u_char *ivoff;
 	u_char *p;
 	EVP_CIPHER_CTX ctx;
-	int blocksz;
-	static int initialized = 0;
 #endif
 
 	esp = (struct newesp *)bp;
@@ -367,11 +565,6 @@
 #ifdef HAVE_LIBCRYPTO
 	secret = NULL;
 	advance = 0;
-
-	if (!initialized) {
-		esp_init(ndo);
-		initialized = 1;
-	}
 #endif
 
 #if 0
@@ -418,9 +611,9 @@
 		/* see if we can find the SA, and if so, decode it */
 		for (sa = ndo->ndo_sa_list_head; sa != NULL; sa = sa->next) {
 			struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)&sa->daddr;
-			if (sa->spi == ntohl(esp->esp_spi) &&
+			if (sa->spi == EXTRACT_32BITS(&esp->esp_spi) &&
 			    sin6->sin6_family == AF_INET6 &&
-			    memcmp(&sin6->sin6_addr, &ip6->ip6_dst,
+			    UNALIGNED_MEMCMP(&sin6->sin6_addr, &ip6->ip6_dst,
 				   sizeof(struct in6_addr)) == 0) {
 				break;
 			}
@@ -436,9 +629,10 @@
 		/* see if we can find the SA, and if so, decode it */
 		for (sa = ndo->ndo_sa_list_head; sa != NULL; sa = sa->next) {
 			struct sockaddr_in *sin = (struct sockaddr_in *)&sa->daddr;
-			if (sa->spi == ntohl(esp->esp_spi) &&
+			if (sa->spi == EXTRACT_32BITS(&esp->esp_spi) &&
 			    sin->sin_family == AF_INET &&
-			    sin->sin_addr.s_addr == ip->ip_dst.s_addr) {
+			    UNALIGNED_MEMCMP(&sin->sin_addr, &ip->ip_dst,
+				   sizeof(struct in_addr)) == 0) {
 				break;
 			}
 		}
@@ -468,7 +662,6 @@
 	ivoff = (u_char *)(esp + 1) + 0;
 	ivlen = sa->ivlen;
 	secret = sa->secret;
-	espsecret_keylen = sa->secretlen;
 	ep = ep - sa->authlen;
 
 	if (sa->evp) {
@@ -476,11 +669,10 @@
 		if (EVP_CipherInit(&ctx, sa->evp, secret, NULL, 0) < 0)
 			(*ndo->ndo_warning)(ndo, "espkey init failed");
 
-		blocksz = EVP_CIPHER_CTX_block_size(&ctx);
-
 		p = ivoff;
 		EVP_CipherInit(&ctx, NULL, NULL, p, 0);
 		EVP_Cipher(&ctx, p + ivlen, p + ivlen, ep - (p + ivlen));
+		EVP_CIPHER_CTX_cleanup(&ctx);
 		advance = ivoff - (u_char *)esp + ivlen;
 	} else
 		advance = sizeof(struct newesp);
@@ -502,6 +694,9 @@
 fail:
 	return -1;
 }
+#ifdef HAVE_LIBCRYPTO
+USES_APPLE_RST
+#endif
 
 /*
  * Local Variables:
diff --git a/print-ether.c b/print-ether.c
index f71a7cc..4bc8ad3 100644
--- a/print-ether.c
+++ b/print-ether.c
@@ -20,9 +20,10 @@
  */
 #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.106 2008-02-06 10:47:53 guy Exp $ (LBL)";
 #endif
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -33,9 +34,9 @@
 #include <pcap.h>
 
 #include "interface.h"
+#include "extract.h"
 #include "addrtoname.h"
 #include "ethertype.h"
-
 #include "ether.h"
 
 const struct tok ethertype_values[] = { 
@@ -44,6 +45,9 @@
     { ETHERTYPE_MPLS_MULTI,	"MPLS multicast" },
     { ETHERTYPE_IPV6,		"IPv6" },
     { ETHERTYPE_8021Q,		"802.1Q" },
+    { ETHERTYPE_8021Q9100,	"802.1Q-9100" },
+    { ETHERTYPE_8021QinQ,	"802.1Q-QinQ" },
+    { ETHERTYPE_8021Q9200,	"802.1Q-9200" },
     { ETHERTYPE_VMAN,		"VMAN" },
     { ETHERTYPE_PUP,            "PUP" },
     { ETHERTYPE_ARP,            "ARP"},
@@ -56,6 +60,7 @@
     { ETHERTYPE_DN,             "DN" },
     { ETHERTYPE_LAT,            "LAT" },
     { ETHERTYPE_SCA,            "SCA" },
+    { ETHERTYPE_TEB,            "TEB" },
     { ETHERTYPE_LANBRIDGE,      "Lanbridge" },
     { ETHERTYPE_DECDNS,         "DEC DNS" },
     { ETHERTYPE_DECDTS,         "DEC DTS" },
@@ -65,66 +70,94 @@
     { 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_MS_NLB_HB,      "MS NLB heartbeat" },
     { 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" },
+    { ETHERTYPE_TIPC,           "TIPC"},    	
+    { ETHERTYPE_GEONET_OLD,     "GeoNet (old)"},
+    { ETHERTYPE_GEONET,         "GeoNet"},
+    { ETHERTYPE_CALM_FAST,      "CALM FAST"},
     { 0, NULL}
 };
 
 static inline void
-ether_hdr_print(register const u_char *bp, u_int length)
+ether_hdr_print(netdissect_options *ndo,
+                const u_char *bp, u_int length)
 {
 	register const struct ether_header *ep;
+	u_int16_t ether_type;
+
 	ep = (const struct ether_header *)bp;
 
-	(void)printf("%s > %s",
+	(void)ND_PRINT((ndo, "%s > %s",
 		     etheraddr_string(ESRC(ep)),
-		     etheraddr_string(EDST(ep)));
+		     etheraddr_string(EDST(ep))));
 
-	if (!qflag) {
-	        if (ntohs(ep->ether_type) <= ETHERMTU)
-		          (void)printf(", 802.3");
+	ether_type = EXTRACT_16BITS(&ep->ether_type);
+	if (!ndo->ndo_qflag) {
+	        if (ether_type <= ETHERMTU)
+		          (void)ND_PRINT((ndo, ", 802.3"));
                 else 
-		          (void)printf(", ethertype %s (0x%04x)",
-				       tok2str(ethertype_values,"Unknown", ntohs(ep->ether_type)),
-                                       ntohs(ep->ether_type));	      
+		          (void)ND_PRINT((ndo, ", ethertype %s (0x%04x)",
+				       tok2str(ethertype_values,"Unknown", ether_type),
+                                       ether_type));
         } else {
-                if (ntohs(ep->ether_type) <= ETHERMTU)
-                          (void)printf(", 802.3");
+                if (ether_type <= ETHERMTU)
+                          (void)ND_PRINT((ndo, ", 802.3"));
                 else 
-                          (void)printf(", %s", tok2str(ethertype_values,"Unknown Ethertype (0x%04x)", ntohs(ep->ether_type)));  
+                          (void)ND_PRINT((ndo, ", %s", tok2str(ethertype_values,"Unknown Ethertype (0x%04x)", ether_type)));
         }
 
-	(void)printf(", length %u: ", length);
+	(void)ND_PRINT((ndo, ", length %u: ", length));
 }
 
+/*
+ * Print an Ethernet frame.
+ * This might be encapsulated within another frame; we might be passed
+ * a pointer to a function that can print header information for that
+ * frame's protocol, and an argument to pass to that function.
+ */
 void
-ether_print(const u_char *p, u_int length, u_int caplen)
+ether_print(netdissect_options *ndo,
+            const u_char *p, u_int length, u_int caplen,
+            void (*print_encap_header)(netdissect_options *ndo, const u_char *), const u_char *encap_header_arg)
 {
 	struct ether_header *ep;
+	u_int orig_length;
 	u_short ether_type;
 	u_short extracted_ether_type;
 
-	if (caplen < ETHER_HDRLEN) {
-		printf("[|ether]");
+	if (caplen < ETHER_HDRLEN || length < ETHER_HDRLEN) {
+		ND_PRINT((ndo, "[|ether]"));
 		return;
 	}
 
-	if (eflag)
-		ether_hdr_print(p, length);
+	if (ndo->ndo_eflag) {
+		if (print_encap_header != NULL)
+			(*print_encap_header)(ndo, encap_header_arg);
+		ether_hdr_print(ndo, p, length);
+	}
+	orig_length = length;
 
 	length -= ETHER_HDRLEN;
 	caplen -= ETHER_HDRLEN;
 	ep = (struct ether_header *)p;
 	p += ETHER_HDRLEN;
 
-	ether_type = ntohs(ep->ether_type);
+	ether_type = EXTRACT_16BITS(&ep->ether_type);
 
+recurse:
 	/*
 	 * Is it (gag) an 802.3 encapsulation?
 	 */
@@ -133,21 +166,79 @@
 		if (llc_print(p, length, caplen, ESRC(ep), EDST(ep),
 		    &extracted_ether_type) == 0) {
 			/* ether_type not known, print raw packet */
-			if (!eflag)
-				ether_hdr_print((u_char *)ep, length + ETHER_HDRLEN);
+			if (!ndo->ndo_eflag) {
+				if (print_encap_header != NULL)
+					(*print_encap_header)(ndo, encap_header_arg);
+				ether_hdr_print(ndo, (u_char *)ep, orig_length);
+			}
 
-			if (!suppress_default_print)
-				default_print(p, caplen);
+			if (!ndo->ndo_suppress_default_print)
+				ndo->ndo_default_print(ndo, p, caplen);
 		}
-	} else if (ether_encap_print(ether_type, p, length, caplen,
-	    &extracted_ether_type) == 0) {
-		/* ether_type not known, print raw packet */
-		if (!eflag)
-			ether_hdr_print((u_char *)ep, length + ETHER_HDRLEN);
+	} else if (ether_type == ETHERTYPE_8021Q  ||
+                ether_type == ETHERTYPE_8021Q9100 ||
+                ether_type == ETHERTYPE_8021Q9200 ||
+                ether_type == ETHERTYPE_8021QinQ) {
+		/*
+		 * Print VLAN information, and then go back and process
+		 * the enclosed type field.
+		 */
+		if (caplen < 4 || length < 4) {
+			ND_PRINT((ndo, "[|vlan]"));
+			return;
+		}
+	        if (ndo->ndo_eflag) {
+	        	u_int16_t tag = EXTRACT_16BITS(p);
 
-		if (!suppress_default_print)
-			default_print(p, caplen);
-	} 
+			ND_PRINT((ndo, "vlan %u, p %u%s, ",
+			    tag & 0xfff,
+			    tag >> 13,
+			    (tag & 0x1000) ? ", CFI" : ""));
+		}
+
+		ether_type = EXTRACT_16BITS(p + 2);
+		if (ndo->ndo_eflag && ether_type > ETHERMTU)
+			ND_PRINT((ndo, "ethertype %s, ", tok2str(ethertype_values,"0x%04x", ether_type)));
+		p += 4;
+		length -= 4;
+		caplen -= 4;
+		goto recurse;
+	} else if (ether_type == ETHERTYPE_JUMBO) {
+		/*
+		 * Alteon jumbo frames.
+		 * See
+		 *
+		 *	http://tools.ietf.org/html/draft-ietf-isis-ext-eth-01
+		 *
+		 * which indicates that, following the type field,
+		 * there's an LLC header and payload.
+		 */
+		/* Try to print the LLC-layer header & higher layers */
+		if (llc_print(p, length, caplen, ESRC(ep), EDST(ep),
+		    &extracted_ether_type) == 0) {
+			/* ether_type not known, print raw packet */
+			if (!ndo->ndo_eflag) {
+				if (print_encap_header != NULL)
+					(*print_encap_header)(ndo, encap_header_arg);
+				ether_hdr_print(ndo, (u_char *)ep, orig_length);
+			}
+
+			if (!ndo->ndo_suppress_default_print)
+				ndo->ndo_default_print(ndo, p, caplen);
+		}
+	} else {
+		if (ethertype_print(ndo, ether_type, p, length, caplen) == 0) {
+			/* ether_type not known, print raw packet */
+			if (!ndo->ndo_eflag) {
+				if (print_encap_header != NULL)
+					(*print_encap_header)(ndo, encap_header_arg);
+				ether_hdr_print(ndo, (u_char *)ep, orig_length);
+			}
+
+			if (!ndo->ndo_suppress_default_print)
+				ndo->ndo_default_print(ndo, p, caplen);
+		}
+	}
 }
 
 /*
@@ -157,149 +248,160 @@
  * is the number of bytes actually captured.
  */
 u_int
-ether_if_print(const struct pcap_pkthdr *h, const u_char *p)
+ether_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
+               const u_char *p)
 {
-	ether_print(p, h->len, h->caplen);
+	ether_print(ndo, p, h->len, h->caplen, NULL, NULL);
 
 	return (ETHER_HDRLEN);
 }
 
 /*
- * Prints the packet encapsulated in an Ethernet data segment
- * (or an equivalent encapsulation), given the Ethernet type code.
+ * This is the top level routine of the printer.  'p' points
+ * to the ether 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.
+ *
+ * This is for DLT_NETANALYZER, which has a 4-byte pseudo-header
+ * before the Ethernet header.
+ */
+u_int
+netanalyzer_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
+                     const u_char *p)
+{
+	/*
+	 * Fail if we don't have enough data for the Hilscher pseudo-header.
+	 */
+	if (h->len < 4 || h->caplen < 4) {
+		printf("[|netanalyzer]");
+		return (h->caplen);
+	}
+
+	/* Skip the pseudo-header. */
+	ether_print(ndo, p + 4, h->len - 4, h->caplen - 4, NULL, NULL);
+
+	return (4 + ETHER_HDRLEN);
+}
+
+/*
+ * This is the top level routine of the printer.  'p' points
+ * to the ether 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.
+ *
+ * This is for DLT_NETANALYZER_TRANSPARENT, which has a 4-byte
+ * pseudo-header, a 7-byte Ethernet preamble, and a 1-byte Ethernet SOF
+ * before the Ethernet header.
+ */
+u_int
+netanalyzer_transparent_if_print(netdissect_options *ndo,
+                                 const struct pcap_pkthdr *h,
+                                 const u_char *p)
+{
+	/*
+	 * Fail if we don't have enough data for the Hilscher pseudo-header,
+	 * preamble, and SOF.
+	 */
+	if (h->len < 12 || h->caplen < 12) {
+		printf("[|netanalyzer-transparent]");
+		return (h->caplen);
+	}
+
+	/* Skip the pseudo-header, preamble, and SOF. */
+	ether_print(ndo, p + 12, h->len - 12, h->caplen - 12, NULL, NULL);
+
+	return (12 + ETHER_HDRLEN);
+}
+
+/*
+ * Prints the packet payload, given an Ethernet type code for the payload's
+ * protocol.
  *
  * Returns non-zero if it can do so, zero if the ethertype is unknown.
- *
- * The Ethernet type code is passed through a pointer; if it was
- * ETHERTYPE_8021Q, it gets updated to be the Ethernet type of
- * the 802.1Q payload, for the benefit of lower layers that might
- * want to know what it is.
  */
 
 int
-ether_encap_print(u_short ether_type, const u_char *p,
-    u_int length, u_int caplen, u_short *extracted_ether_type)
+ethertype_print(netdissect_options *ndo,
+                u_short ether_type, const u_char *p,
+                u_int length, u_int caplen)
 {
- recurse:
-	*extracted_ether_type = ether_type;
-
 	switch (ether_type) {
 
 	case ETHERTYPE_IP:
-	        ip_print(gndo, p, length);
+	        ip_print(ndo, p, length);
 		return (1);
 
 #ifdef INET6
 	case ETHERTYPE_IPV6:
-		ip6_print(p, length);
+		ip6_print(ndo, p, length);
 		return (1);
 #endif /*INET6*/
 
 	case ETHERTYPE_ARP:
 	case ETHERTYPE_REVARP:
-  	        arp_print(gndo, p, length, caplen);
+  	        arp_print(ndo, p, length, caplen);
 		return (1);
 
 	case ETHERTYPE_DN:
-		decnet_print(p, length, caplen);
+		decnet_print(/*ndo,*/p, length, caplen);
 		return (1);
 
 	case ETHERTYPE_ATALK:
-		if (vflag)
+		if (ndo->ndo_vflag)
 			fputs("et1 ", stdout);
-		atalk_print(p, length);
+		atalk_print(/*ndo,*/p, length);
 		return (1);
 
 	case ETHERTYPE_AARP:
-		aarp_print(p, length);
+		aarp_print(/*ndo,*/p, length);
 		return (1);
 
 	case ETHERTYPE_IPX:
-		printf("(NOV-ETHII) ");
-		ipx_print(p, length);
+		ND_PRINT((ndo, "(NOV-ETHII) "));
+		ipx_print(/*ndo,*/p, length);
 		return (1);
 
-	case ETHERTYPE_8021Q:
-	        if (eflag)
-		    printf("vlan %u, p %u%s, ",
-			   ntohs(*(u_int16_t *)p) & 0xfff,
-			   ntohs(*(u_int16_t *)p) >> 13,
-			   (ntohs(*(u_int16_t *)p) & 0x1000) ? ", CFI" : "");
-
-		ether_type = ntohs(*(u_int16_t *)(p + 2));
-		p += 4;
-		length -= 4;
-		caplen -= 4;
-
-		if (ether_type > ETHERMTU) {
-		        if (eflag)
-			        printf("ethertype %s, ",
-				       tok2str(ethertype_values,"0x%04x", ether_type));
-			goto recurse;
-		}
-
-		*extracted_ether_type = 0;
-
-		if (llc_print(p, length, caplen, p - 18, p - 12,
-		    extracted_ether_type) == 0) {
-                        ether_hdr_print(p - 18, length + 4);
-
-                        if (!suppress_default_print) {
-                                default_print(p - 18, caplen + 4);
-                        }
-		}
-
-
-		return (1);
-
-        case ETHERTYPE_JUMBO:
-                ether_type = ntohs(*(u_int16_t *)(p));
-                p += 2;
-                length -= 2;      
-                caplen -= 2;
-
-                if (ether_type > ETHERMTU) {
-                    if (eflag)
-                        printf("ethertype %s, ",
-                               tok2str(ethertype_values,"0x%04x", ether_type));
-                    goto recurse;
-                }
-
-                *extracted_ether_type = 0;
-
-                if (llc_print(p, length, caplen, p - 16, p - 10,
-                              extracted_ether_type) == 0) {
-                    ether_hdr_print(p - 16, length + 2);
-
-                    if (!suppress_default_print) {
-                            default_print(p - 16, caplen + 2);
-                    }
-                }
-
-                return (1);
-
         case ETHERTYPE_ISO:
-                isoclns_print(p+1, length-1, length-1);
+                isoclns_print(/*ndo,*/p+1, length-1, length-1);
                 return(1);
 
 	case ETHERTYPE_PPPOED:
 	case ETHERTYPE_PPPOES:
-		pppoe_print(p, length);
+	case ETHERTYPE_PPPOED2:
+	case ETHERTYPE_PPPOES2:
+		pppoe_print(/*ndo,*/p, length);
 		return (1);
 
 	case ETHERTYPE_EAPOL:
-	        eap_print(gndo, p, length);
+	        eap_print(ndo, p, length);
+		return (1);
+
+	case ETHERTYPE_RRCP:
+	        rrcp_print(ndo, p - 14 , length + 14);
 		return (1);
 
 	case ETHERTYPE_PPP:
 		if (length) {
 			printf(": ");
-			ppp_print(p, length);
+			ppp_print(/*ndo,*/p, length);
 		}
 		return (1);
 
+	case ETHERTYPE_MPCP:
+	        mpcp_print(/*ndo,*/p, length);
+		return (1);
+
 	case ETHERTYPE_SLOW:
-	        slow_print(p, length);
+	        slow_print(/*ndo,*/p, length);
+		return (1);
+
+	case ETHERTYPE_CFM:
+	case ETHERTYPE_CFM_OLD:
+	        cfm_print(/*ndo,*/p, length);
+		return (1);
+
+	case ETHERTYPE_LLDP:
+	        lldp_print(/*ndo,*/p, length);
 		return (1);
 
         case ETHERTYPE_LOOPBACK:
@@ -307,9 +409,26 @@
 
 	case ETHERTYPE_MPLS:
 	case ETHERTYPE_MPLS_MULTI:
-		mpls_print(p, length);
+		mpls_print(/*ndo,*/p, length);
 		return (1);
 
+	case ETHERTYPE_TIPC:
+		tipc_print(ndo, p, length, caplen);
+		return (1);
+
+	case ETHERTYPE_MS_NLB_HB:
+		msnlb_print(ndo, p);
+		return (1);
+
+        case ETHERTYPE_GEONET_OLD:
+        case ETHERTYPE_GEONET:
+                geonet_print(ndo, p-14, p, length);
+                return (1);
+
+        case ETHERTYPE_CALM_FAST:
+                calm_fast_print(ndo, p-14, p, length);
+                return (1);
+
 	case ETHERTYPE_LAT:
 	case ETHERTYPE_SCA:
 	case ETHERTYPE_MOPRC:
diff --git a/print-fddi.c b/print-fddi.c
index eeb7191..1e7d554 100644
--- a/print-fddi.c
+++ b/print-fddi.c
@@ -21,7 +21,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/print-forces.c b/print-forces.c
new file mode 100644
index 0000000..7391209
--- /dev/null
+++ b/print-forces.c
@@ -0,0 +1,1756 @@
+/*
+ * 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.
+ *
+ * Copyright (c) 2009 Mojatatu Networks, Inc
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "interface.h"
+#include "extract.h"
+
+
+/*
+ * Per draft-ietf-forces-protocol-22
+*/
+#define	ForCES_VERS	1
+#define	ForCES_HDRL	24
+#define	ForCES_ALNL	4U
+#define TLV_HDRL	4
+#define ILV_HDRL	8
+
+#define TOM_RSVD 	0x0
+#define TOM_ASSNSETUP 	0x1
+#define TOM_ASSNTEARD 	0x2
+#define TOM_CONFIG 	0x3
+#define TOM_QUERY 	0x4
+#define TOM_EVENTNOT 	0x5
+#define TOM_PKTREDIR 	0x6
+#define TOM_HEARTBT 	0x0F
+#define TOM_ASSNSETREP 	0x11
+#define TOM_CONFIGREP 	0x13
+#define TOM_QUERYREP 	0x14
+
+/*
+ * tom_h Flags: resv1(8b):maxtlvs(4b):resv2(2b):mintlv(2b)
+*/
+#define ZERO_TTLV	0x01
+#define ZERO_MORE_TTLV	0x02
+#define ONE_MORE_TTLV	0x04
+#define ZERO_TLV	0x00
+#define ONE_TLV		0x10
+#define TWO_TLV		0x20
+#define MAX_TLV		0xF0
+
+#define TTLV_T1		(ONE_MORE_TTLV|ONE_TLV)
+#define TTLV_T2		(ONE_MORE_TTLV|MAX_TLV)
+
+struct tom_h {
+	u_int32_t v;
+	u_int16_t flags;
+	u_int16_t op_msk;
+	const char *s;
+	int (*print) (register const u_char * pptr, register u_int len,
+		      u_int16_t op_msk, int indent);
+};
+
+enum {
+	TOM_RSV_I,
+	TOM_ASS_I,
+	TOM_AST_I,
+	TOM_CFG_I,
+	TOM_QRY_I,
+	TOM_EVN_I,
+	TOM_RED_I,
+	TOM_HBT_I,
+	TOM_ASR_I,
+	TOM_CNR_I,
+	TOM_QRR_I,
+	_TOM_RSV_MAX
+};
+#define TOM_MAX_IND (_TOM_RSV_MAX - 1)
+
+static inline int tom_valid(u_int8_t tom)
+{
+	if (tom > 0) {
+		if (tom >= 0x7 && tom <= 0xe)
+			return 0;
+		if (tom == 0x10)
+			return 0;
+		if (tom > 0x14)
+			return 0;
+		return 1;
+	} else
+		return 0;
+}
+
+static inline const char *ForCES_node(u_int32_t node)
+{
+	if (node <= 0x3FFFFFFF)
+		return "FE";
+	if (node >= 0x40000000 && node <= 0x7FFFFFFF)
+		return "CE";
+	if (node >= 0xC0000000 && node <= 0xFFFFFFEF)
+		return "AllMulticast";
+	if (node == 0xFFFFFFFD)
+		return "AllCEsBroadcast";
+	if (node == 0xFFFFFFFE)
+		return "AllFEsBroadcast";
+	if (node == 0xFFFFFFFF)
+		return "AllBroadcast";
+
+	return "ForCESreserved";
+
+}
+
+static inline const char *ForCES_ACKp(u_int32_t flg)
+{
+	if (flg == 0x0)
+		return "NoACK";
+	if (flg == 0x1)
+		return "SuccessACK";
+	if (flg == 0x2)
+		return "FailureACK";
+	if (flg == 0x3)
+		return "AlwaysACK";
+	return "ACKUnknown";
+}
+
+static inline const char *ForCES_EMp(u_int32_t flg)
+{
+	if (flg == 0x0)
+		return "EMReserved";
+	if (flg == 0x1)
+		return "execute-all-or-none";
+	if (flg == 0x2)
+		return "execute-until-failure";
+	if (flg == 0x3)
+		return "continue-execute-on-failure";
+	return "EMUnknown";
+}
+
+static inline const char *ForCES_ATp(u_int32_t flg)
+{
+	if (flg == 0x0)
+		return "Standalone";
+	if (flg == 0x1)
+		return "2PCtransaction";
+	return "ATUnknown";
+}
+
+static inline const char *ForCES_TPp(u_int32_t flg)
+{
+	if (flg == 0x0)
+		return "StartofTransaction";
+	if (flg == 0x1)
+		return "MiddleofTransaction";
+	if (flg == 0x2)
+		return "EndofTransaction";
+	if (flg == 0x3)
+		return "abort";
+	return "TPUnknown";
+}
+
+/*
+ * Structure of forces header, naked of TLVs.
+ */
+struct forcesh {
+	u_int8_t fm_vrsvd;	/* version and reserved */
+#define ForCES_V(forcesh)	((forcesh)->fm_vrsvd >> 4)
+	u_int8_t fm_tom;	/* type of message */
+	u_int16_t fm_len;	/* total length * 4 bytes */
+#define ForCES_BLN(forcesh)	((u_int32_t)(EXTRACT_16BITS(&(forcesh)->fm_len) << 2))
+	u_int32_t fm_sid;	/* Source ID */
+#define ForCES_SID(forcesh)	EXTRACT_32BITS(&(forcesh)->fm_sid)
+	u_int32_t fm_did;	/* Destination ID */
+#define ForCES_DID(forcesh)	EXTRACT_32BITS(&(forcesh)->fm_did)
+	u_int8_t fm_cor[8];	/* correlator */
+	u_int32_t fm_flags;	/* flags */
+#define ForCES_ACK(forcesh)	((EXTRACT_32BITS(&(forcesh)->fm_flags)&0xC0000000) >> 30)
+#define ForCES_PRI(forcesh)	((EXTRACT_32BITS(&(forcesh)->fm_flags)&0x38000000) >> 27)
+#define ForCES_RS1(forcesh)	((EXTRACT_32BITS(&(forcesh)->fm_flags)&0x07000000) >> 24)
+#define ForCES_EM(forcesh)	((EXTRACT_32BITS(&(forcesh)->fm_flags)&0x00C00000) >> 22)
+#define ForCES_AT(forcesh)	((EXTRACT_32BITS(&(forcesh)->fm_flags)&0x00200000) >> 21)
+#define ForCES_TP(forcesh)	((EXTRACT_32BITS(&(forcesh)->fm_flags)&0x00180000) >> 19)
+#define ForCES_RS2(forcesh)	((EXTRACT_32BITS(&(forcesh)->fm_flags)&0x0007FFFF) >> 0)
+};
+
+#define ForCES_HLN_VALID(fhl,tlen) ((tlen) >= ForCES_HDRL && \
+				   (fhl) >= ForCES_HDRL && \
+				   (fhl) == (tlen))
+
+#define F_LFB_RSVD 0x0
+#define F_LFB_FEO 0x1
+#define F_LFB_FEPO 0x2
+static const struct tok ForCES_LFBs[] = {
+	{F_LFB_RSVD, "Invalid TLV"},
+	{F_LFB_FEO, "FEObj LFB"},
+	{F_LFB_FEPO, "FEProtoObj LFB"},
+	{0, NULL}
+};
+
+enum {
+	F_OP_RSV,
+	F_OP_SET,
+	F_OP_SETPROP,
+	F_OP_SETRESP,
+	F_OP_SETPRESP,
+	F_OP_DEL,
+	F_OP_DELRESP,
+	F_OP_GET,
+	F_OP_GETPROP,
+	F_OP_GETRESP,
+	F_OP_GETPRESP,
+	F_OP_REPORT,
+	F_OP_COMMIT,
+	F_OP_RCOMMIT,
+	F_OP_RTRCOMP,
+	_F_OP_MAX
+};
+
+#define F_OP_MAX	(_F_OP_MAX - 1)
+enum {
+	B_OP_SET = 1 << (F_OP_SET - 1),
+	B_OP_SETPROP = 1 << (F_OP_SETPROP - 1),
+	B_OP_SETRESP = 1 << (F_OP_SETRESP - 1),
+	B_OP_SETPRESP = 1 << (F_OP_SETPRESP - 1),
+	B_OP_DEL = 1 << (F_OP_DEL - 1),
+	B_OP_DELRESP = 1 << (F_OP_DELRESP - 1),
+	B_OP_GET = 1 << (F_OP_GET - 1),
+	B_OP_GETPROP = 1 << (F_OP_GETPROP - 1),
+	B_OP_GETRESP = 1 << (F_OP_GETRESP - 1),
+	B_OP_GETPRESP = 1 << (F_OP_GETPRESP - 1),
+	B_OP_REPORT = 1 << (F_OP_REPORT - 1),
+	B_OP_COMMIT = 1 << (F_OP_COMMIT - 1),
+	B_OP_RCOMMIT = 1 << (F_OP_RCOMMIT - 1),
+	B_OP_RTRCOMP = 1 << (F_OP_RTRCOMP - 1),
+};
+
+struct optlv_h {
+	u_int16_t flags;
+	u_int16_t op_msk;
+	const char *s;
+	int (*print) (register const u_char * pptr, register u_int len,
+		      u_int16_t op_msk, int indent);
+};
+
+static int genoptlv_print(register const u_char * pptr, register u_int len,
+			 u_int16_t op_msk, int indent);
+static int recpdoptlv_print(register const u_char * pptr, register u_int len,
+			    u_int16_t op_msk, int indent);
+static int invoptlv_print(register const u_char * pptr, register u_int len,
+			  u_int16_t op_msk, int indent);
+
+#define OP_MIN_SIZ 8
+struct pathdata_h {
+	u_int16_t pflags;
+	u_int16_t pIDcnt;
+};
+
+#define	B_FULLD		0x1
+#define	B_SPARD 	0x2
+#define B_RESTV		0x4
+#define B_KEYIN		0x8
+#define B_APPND		0x10
+#define B_TRNG		0x20
+
+static const struct optlv_h OPTLV_msg[F_OP_MAX + 1] = {
+	/* F_OP_RSV */ {ZERO_TTLV, 0, "Invalid OPTLV", invoptlv_print},
+	/* F_OP_SET */ {TTLV_T2, B_FULLD | B_SPARD, " Set", recpdoptlv_print},
+	/* F_OP_SETPROP */
+	    {TTLV_T2, B_FULLD | B_SPARD, " SetProp", recpdoptlv_print},
+	/* F_OP_SETRESP */ {TTLV_T2, B_RESTV, " SetResp", recpdoptlv_print},
+	/* F_OP_SETPRESP */ {TTLV_T2, B_RESTV, " SetPropResp", recpdoptlv_print},
+	/* F_OP_DEL */ {ZERO_TTLV, 0, " Del", recpdoptlv_print},
+	/* F_OP_DELRESP */ {TTLV_T2, B_RESTV, " DelResp", recpdoptlv_print},
+	/* F_OP_GET */ {ZERO_TTLV, 0, " Get", recpdoptlv_print},
+	/* F_OP_GETPROP */ {ZERO_TTLV, 0, " GetProp", recpdoptlv_print},
+	/* F_OP_GETRESP */
+	    {TTLV_T2, B_FULLD | B_SPARD | B_RESTV, " GetResp", recpdoptlv_print},
+	/* F_OP_GETPRESP */
+	    {TTLV_T2, B_FULLD | B_RESTV, " GetPropResp", recpdoptlv_print},
+	/* F_OP_REPORT */
+	    {TTLV_T2, B_FULLD | B_SPARD, " Report", recpdoptlv_print},
+	/* F_OP_COMMIT */ {ZERO_TTLV, 0, " Commit", NULL},
+	/* F_OP_RCOMMIT */ {TTLV_T1, B_RESTV, " RCommit", genoptlv_print},
+	/* F_OP_RTRCOMP */ {ZERO_TTLV, 0, " RTRCOMP", NULL},
+};
+
+static inline const struct optlv_h *get_forces_optlv_h(u_int16_t opt)
+{
+	if (opt > F_OP_MAX || opt <= F_OP_RSV)
+		return &OPTLV_msg[F_OP_RSV];
+
+	return &OPTLV_msg[opt];
+}
+
+#define IND_SIZE 256
+#define IND_CHR ' '
+#define IND_PREF '\n'
+#define IND_SUF 0x0
+char ind_buf[IND_SIZE];
+
+static inline char *indent_pr(int indent, int nlpref)
+{
+	int i = 0;
+	char *r = ind_buf;
+
+	if (indent > (IND_SIZE - 1))
+		indent = IND_SIZE - 1;
+
+	if (nlpref) {
+		r[i] = IND_PREF;
+		i++;
+		indent--;
+	}
+
+	while (--indent >= 0)
+		r[i++] = IND_CHR;
+
+	r[i] = IND_SUF;
+	return r;
+}
+
+static inline int op_valid(u_int16_t op, u_int16_t mask)
+{
+	int opb = 1 << (op - 1);
+
+	if (op == 0)
+		return 0;
+	if (opb & mask)
+		return 1;
+	/* I guess we should allow vendor operations? */
+	if (op >= 0x8000)
+		return 1;
+	return 0;
+}
+
+#define F_TLV_RSVD	0x0000
+#define F_TLV_REDR	0x0001
+#define F_TLV_ASRS	0x0010
+#define F_TLV_ASRT	0x0011
+#define F_TLV_LFBS	0x1000
+#define F_TLV_PDAT	0x0110
+#define F_TLV_KEYI	0x0111
+#define F_TLV_FULD	0x0112
+#define F_TLV_SPAD	0x0113
+#define F_TLV_REST	0x0114
+#define F_TLV_METD	0x0115
+#define F_TLV_REDD	0x0116
+#define F_TLV_TRNG	0x0117
+
+
+#define F_TLV_VNST	0x8000
+
+static const struct tok ForCES_TLV[] = {
+	{F_TLV_RSVD, "Invalid TLV"},
+	{F_TLV_REDR, "REDIRECT TLV"},
+	{F_TLV_ASRS, "ASResult TLV"},
+	{F_TLV_ASRT, "ASTreason TLV"},
+	{F_TLV_LFBS, "LFBselect TLV"},
+	{F_TLV_PDAT, "PATH-DATA TLV"},
+	{F_TLV_KEYI, "KEYINFO TLV"},
+	{F_TLV_FULD, "FULLDATA TLV"},
+	{F_TLV_SPAD, "SPARSEDATA TLV"},
+	{F_TLV_REST, "RESULT TLV"},
+	{F_TLV_METD, "METADATA TLV"},
+	{F_TLV_REDD, "REDIRECTDATA TLV"},
+	{0, NULL}
+};
+
+#define TLV_HLN	4
+static inline int ttlv_valid(u_int16_t ttlv)
+{
+	if (ttlv > 0) {
+		if (ttlv == 1 || ttlv == 0x1000)
+			return 1;
+		if (ttlv >= 0x10 && ttlv <= 0x11)
+			return 1;
+		if (ttlv >= 0x110 && ttlv <= 0x116)
+			return 1;
+		if (ttlv >= 0x8000)
+			return 0;	/* XXX: */
+	}
+
+	return 0;
+}
+
+struct forces_ilv {
+	u_int32_t type;
+	u_int32_t length;
+};
+
+struct forces_tlv {
+	u_int16_t type;
+	u_int16_t length;
+};
+
+#define F_ALN_LEN(len) ( ((len)+ForCES_ALNL-1) & ~(ForCES_ALNL-1) )
+#define	GET_TOP_TLV(fhdr) ((struct forces_tlv *)((fhdr) + sizeof (struct forcesh)))
+#define TLV_SET_LEN(len)  (F_ALN_LEN(TLV_HDRL) + (len))
+#define TLV_ALN_LEN(len)  F_ALN_LEN(TLV_SET_LEN(len))
+#define TLV_RDAT_LEN(tlv) ((int)(EXTRACT_16BITS(&(tlv)->length) - TLV_SET_LEN(0))
+#define TLV_DATA(tlvp)   ((void*)(((char*)(tlvp)) + TLV_SET_LEN(0)))
+#define GO_NXT_TLV(tlv,rlen) ((rlen) -= F_ALN_LEN(EXTRACT_16BITS(&(tlv)->length)), \
+		              (struct forces_tlv*)(((char*)(tlv)) \
+				      + F_ALN_LEN(EXTRACT_16BITS(&(tlv)->length))))
+#define ILV_SET_LEN(len)  (F_ALN_LEN(ILV_HDRL) + (len))
+#define ILV_ALN_LEN(len)  F_ALN_LEN(ILV_SET_LEN(len))
+#define ILV_RDAT_LEN(ilv) ((int)(EXTRACT_32BITS(&(ilv)->length)) - ILV_SET_LEN(0))
+#define ILV_DATA(ilvp)   ((void*)(((char*)(ilvp)) + ILV_SET_LEN(0)))
+#define GO_NXT_ILV(ilv,rlen) ((rlen) -= F_ALN_LEN(EXTRACT_32BITS(&(ilv)->length)), \
+		              (struct forces_ilv *)(((char*)(ilv)) \
+				      + F_ALN_LEN(EXTRACT_32BITS(&(ilv)->length))))
+#define INVALID_RLEN -1
+#define INVALID_STLN -2
+#define INVALID_LTLN -3
+#define INVALID_ALEN -4
+
+static const struct tok ForCES_TLV_err[] = {
+	{INVALID_RLEN, "Invalid total length"},
+	{INVALID_STLN, "xLV too short"},
+	{INVALID_LTLN, "xLV too long"},
+	{INVALID_ALEN, "data padding missing"},
+	{0, NULL}
+};
+
+static inline int tlv_valid(const struct forces_tlv *tlv, u_int rlen)
+{
+	if (rlen < TLV_HDRL)
+		return INVALID_RLEN;
+	if (EXTRACT_16BITS(&tlv->length) < TLV_HDRL)
+		return INVALID_STLN;
+	if (EXTRACT_16BITS(&tlv->length) > rlen)
+		return INVALID_LTLN;
+	if (rlen < F_ALN_LEN(EXTRACT_16BITS(&tlv->length)))
+		return INVALID_ALEN;
+
+	return 0;
+}
+
+static inline int ilv_valid(const struct forces_ilv *ilv, u_int rlen)
+{
+	if (rlen < ILV_HDRL)
+		return INVALID_RLEN;
+	if (EXTRACT_32BITS(&ilv->length) < ILV_HDRL)
+		return INVALID_STLN;
+	if (EXTRACT_32BITS(&ilv->length) > rlen)
+		return INVALID_LTLN;
+	if (rlen < F_ALN_LEN(EXTRACT_32BITS(&ilv->length)))
+		return INVALID_ALEN;
+
+	return 0;
+}
+
+static int lfbselect_print(register const u_char * pptr, register u_int len,
+			   u_int16_t op_msk, int indent);
+static int redirect_print(register const u_char * pptr, register u_int len,
+			  u_int16_t op_msk, int indent);
+static int asrtlv_print(register const u_char * pptr, register u_int len,
+			u_int16_t op_msk, int indent);
+static int asttlv_print(register const u_char * pptr, register u_int len,
+			u_int16_t op_msk, int indent);
+
+struct forces_lfbsh {
+	u_int32_t class;
+	u_int32_t instance;
+};
+
+#define ASSNS_OPS (B_OP_REPORT)
+#define CFG_OPS	(B_OP_SET|B_OP_SETPROP|B_OP_DEL|B_OP_COMMIT|B_OP_RTRCOMP)
+#define CFG_ROPS (B_OP_SETRESP|B_OP_SETPRESP|B_OP_DELRESP|B_OP_RCOMMIT)
+#define CFG_QY (B_OP_GET|B_OP_GETPROP)
+#define CFG_QYR (B_OP_GETRESP|B_OP_GETPRESP)
+#define CFG_EVN (B_OP_REPORT)
+
+static const struct tom_h ForCES_msg[TOM_MAX_IND + 1] = {
+	/* TOM_RSV_I */ {TOM_RSVD, ZERO_TTLV, 0, "Invalid message", NULL},
+	/* TOM_ASS_I */ {TOM_ASSNSETUP, ZERO_MORE_TTLV | TWO_TLV, ASSNS_OPS,
+		       "Association Setup", lfbselect_print},
+	/* TOM_AST_I */
+	    {TOM_ASSNTEARD, TTLV_T1, 0, "Association TearDown", asttlv_print},
+	/* TOM_CFG_I */ {TOM_CONFIG, TTLV_T2, CFG_OPS, "Config", lfbselect_print},
+	/* TOM_QRY_I */ {TOM_QUERY, TTLV_T2, CFG_QY, "Query", lfbselect_print},
+	/* TOM_EVN_I */ {TOM_EVENTNOT, TTLV_T1, CFG_EVN, "Event Notification",
+		       lfbselect_print},
+	/* TOM_RED_I */
+	    {TOM_PKTREDIR, TTLV_T2, 0, "Packet Redirect", redirect_print},
+	/* TOM_HBT_I */ {TOM_HEARTBT, ZERO_TTLV, 0, "HeartBeat", NULL},
+	/* TOM_ASR_I */
+	    {TOM_ASSNSETREP, TTLV_T1, 0, "Association Response", asrtlv_print},
+	/* TOM_CNR_I */ {TOM_CONFIGREP, TTLV_T2, CFG_ROPS, "Config Response",
+		       lfbselect_print},
+	/* TOM_QRR_I */
+	    {TOM_QUERYREP, TTLV_T2, CFG_QYR, "Query Response", lfbselect_print},
+};
+
+static inline const struct tom_h *get_forces_tom(u_int8_t tom)
+{
+	int i;
+	for (i = TOM_RSV_I; i <= TOM_MAX_IND; i++) {
+		const struct tom_h *th = &ForCES_msg[i];
+		if (th->v == tom)
+			return th;
+	}
+	return &ForCES_msg[TOM_RSV_I];
+}
+
+struct pdata_ops {
+	u_int32_t v;
+	u_int16_t flags;
+	u_int16_t op_msk;
+	const char *s;
+	int (*print) (register const u_char * pptr, register u_int len,
+		      u_int16_t op_msk, int indent);
+};
+
+enum {
+	PD_RSV_I,
+	PD_SEL_I,
+	PD_FDT_I,
+	PD_SDT_I,
+	PD_RES_I,
+	PD_PDT_I,
+	_PD_RSV_MAX
+};
+#define PD_MAX_IND (_TOM_RSV_MAX - 1)
+
+static inline int pd_valid(u_int16_t pd)
+{
+	if (pd >= F_TLV_PDAT && pd <= F_TLV_REST)
+		return 1;
+	return 0;
+}
+
+static inline void chk_op_type(u_int16_t type, u_int16_t msk, u_int16_t omsk)
+{
+	if (type != F_TLV_PDAT) {
+		if (msk & B_KEYIN) {
+			if (type != F_TLV_KEYI) {
+				printf
+				    ("Based on flags expected KEYINFO TLV!\n");
+			}
+		} else {
+			if (!(msk & omsk)) {
+				printf
+				    ("Illegal DATA encoding for type 0x%x programmed %x got %x \n",
+				     type, omsk, msk);
+			}
+		}
+	}
+
+}
+
+#define F_SELKEY 1
+#define F_SELTABRANGE 2
+#define F_TABAPPEND 4
+
+struct res_val {
+	u_int8_t result;
+	u_int8_t resv1;
+	u_int16_t resv2;
+};
+
+static int prestlv_print(register const u_char * pptr, register u_int len,
+			 u_int16_t op_msk, int indent);
+static int pkeyitlv_print(register const u_char * pptr, register u_int len,
+			  u_int16_t op_msk, int indent);
+static int fdatatlv_print(register const u_char * pptr, register u_int len,
+			  u_int16_t op_msk, int indent);
+static int sdatatlv_print(register const u_char * pptr, register u_int len,
+			  u_int16_t op_msk, int indent);
+
+static const struct pdata_ops ForCES_pdata[PD_MAX_IND + 1] = {
+	/* PD_RSV_I */ {0, 0, 0, "Invalid message", NULL},
+	/* PD_SEL_I */ {F_TLV_KEYI, 0, 0, "KEYINFO TLV", pkeyitlv_print},
+	/* PD_FDT_I */ {F_TLV_FULD, 0, B_FULLD, "FULLDATA TLV", fdatatlv_print},
+	/* PD_SDT_I */ {F_TLV_SPAD, 0, B_SPARD, "SPARSEDATA TLV", sdatatlv_print},
+	/* PD_RES_I */ {F_TLV_REST, 0, B_RESTV, "RESULT TLV", prestlv_print},
+	/* PD_PDT_I */
+	    {F_TLV_PDAT, 0, 0, "Inner PATH-DATA TLV", recpdoptlv_print},
+};
+
+static inline const struct pdata_ops *get_forces_pd(u_int16_t pd)
+{
+	int i;
+	for (i = PD_RSV_I + 1; i <= PD_MAX_IND; i++) {
+		const struct pdata_ops *pdo = &ForCES_pdata[i];
+		if (pdo->v == pd)
+			return pdo;
+	}
+	return &ForCES_pdata[TOM_RSV_I];
+}
+
+enum {
+	E_SUCCESS,
+	E_INVALID_HEADER,
+	E_LENGTH_MISMATCH,
+	E_VERSION_MISMATCH,
+	E_INVALID_DESTINATION_PID,
+	E_LFB_UNKNOWN,
+	E_LFB_NOT_FOUND,
+	E_LFB_INSTANCE_ID_NOT_FOUND,
+	E_INVALID_PATH,
+	E_COMPONENT_DOES_NOT_EXIST,
+	E_EXISTS,
+	E_NOT_FOUND,
+	E_READ_ONLY,
+	E_INVALID_ARRAY_CREATION,
+	E_VALUE_OUT_OF_RANGE,
+	E_CONTENTS_TOO_LONG,
+	E_INVALID_PARAMETERS,
+	E_INVALID_MESSAGE_TYPE,
+	E_INVALID_FLAGS,
+	E_INVALID_TLV,
+	E_EVENT_ERROR,
+	E_NOT_SUPPORTED,
+	E_MEMORY_ERROR,
+	E_INTERNAL_ERROR,
+	/* 0x18-0xFE are reserved .. */
+	E_UNSPECIFIED_ERROR = 0XFF
+};
+
+static const struct tok ForCES_errs[] = {
+	{E_SUCCESS, "SUCCESS"},
+	{E_INVALID_HEADER, "INVALID HEADER"},
+	{E_LENGTH_MISMATCH, "LENGTH MISMATCH"},
+	{E_VERSION_MISMATCH, "VERSION MISMATCH"},
+	{E_INVALID_DESTINATION_PID, "INVALID DESTINATION PID"},
+	{E_LFB_UNKNOWN, "LFB UNKNOWN"},
+	{E_LFB_NOT_FOUND, "LFB NOT FOUND"},
+	{E_LFB_INSTANCE_ID_NOT_FOUND, "LFB INSTANCE ID NOT FOUND"},
+	{E_INVALID_PATH, "INVALID PATH"},
+	{E_COMPONENT_DOES_NOT_EXIST, "COMPONENT DOES NOT EXIST"},
+	{E_EXISTS, "EXISTS ALREADY"},
+	{E_NOT_FOUND, "NOT FOUND"},
+	{E_READ_ONLY, "READ ONLY"},
+	{E_INVALID_ARRAY_CREATION, "INVALID ARRAY CREATION"},
+	{E_VALUE_OUT_OF_RANGE, "VALUE OUT OF RANGE"},
+	{E_CONTENTS_TOO_LONG, "CONTENTS TOO LONG"},
+	{E_INVALID_PARAMETERS, "INVALID PARAMETERS"},
+	{E_INVALID_MESSAGE_TYPE, "INVALID MESSAGE TYPE"},
+	{E_INVALID_FLAGS, "INVALID FLAGS"},
+	{E_INVALID_TLV, "INVALID TLV"},
+	{E_EVENT_ERROR, "EVENT ERROR"},
+	{E_NOT_SUPPORTED, "NOT SUPPORTED"},
+	{E_MEMORY_ERROR, "MEMORY ERROR"},
+	{E_INTERNAL_ERROR, "INTERNAL ERROR"},
+	{E_UNSPECIFIED_ERROR, "UNSPECIFIED ERROR"},
+	{0, NULL}
+};
+
+#define RESLEN	4
+
+static int
+prestlv_print(register const u_char * pptr, register u_int len,
+	      u_int16_t op_msk _U_, int indent)
+{
+	const struct forces_tlv *tlv = (struct forces_tlv *)pptr;
+	register const u_char *tdp = (u_char *) TLV_DATA(tlv);
+	struct res_val *r = (struct res_val *)tdp;
+	u_int dlen;
+
+	/*
+	 * pdatacnt_print() has ensured that len (the TLV length)
+	 * >= TLV_HDRL.
+	 */
+	dlen = len - TLV_HDRL;
+	if (dlen != RESLEN) {
+		printf("illegal RESULT-TLV: %d bytes!\n", dlen);
+		return -1;
+	}
+
+	TCHECK(*r);
+	if (r->result >= 0x18 && r->result <= 0xFE) {
+		printf("illegal reserved result code: 0x%x!\n", r->result);
+		return -1;
+	}
+
+	if (vflag >= 3) {
+		char *ib = indent_pr(indent, 0);
+		printf("%s  Result: %s (code 0x%x)\n", ib,
+		       tok2str(ForCES_errs, NULL, r->result), r->result);
+	}
+	return 0;
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+static int
+fdatatlv_print(register const u_char * pptr, register u_int len,
+	       u_int16_t op_msk _U_, int indent)
+{
+	const struct forces_tlv *tlv = (struct forces_tlv *)pptr;
+	u_int rlen;
+	register const u_char *tdp = (u_char *) TLV_DATA(tlv);
+	u_int16_t type;
+
+	/*
+	 * pdatacnt_print() or pkeyitlv_print() has ensured that len
+	 * (the TLV length) >= TLV_HDRL.
+	 */
+	rlen = len - TLV_HDRL;
+	TCHECK(*tlv);
+	type = EXTRACT_16BITS(&tlv->type);
+	if (type != F_TLV_FULD) {
+		printf("Error: expecting FULLDATA!\n");
+		return -1;
+	}
+
+	if (vflag >= 3) {
+		char *ib = indent_pr(indent + 2, 1);
+		printf("%s[", &ib[1]);
+		hex_print_with_offset(ib, tdp, rlen, 0);
+		printf("\n%s]\n", &ib[1]);
+	}
+	return 0;
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+static int
+sdatailv_print(register const u_char * pptr, register u_int len,
+	       u_int16_t op_msk _U_, int indent)
+{
+	u_int rlen;
+	const struct forces_ilv *ilv = (struct forces_ilv *)pptr;
+	int invilv;
+
+	if (len < ILV_HDRL) {
+		printf("Error: BAD SPARSEDATA-TLV!\n");
+		return -1;
+	}
+	rlen = len;
+	indent += 1;
+	while (rlen != 0) {
+#if 0
+		printf("Jamal - outstanding length <%d>\n", rlen);
+#endif
+		char *ib = indent_pr(indent, 1);
+		register const u_char *tdp = (u_char *) ILV_DATA(ilv);
+		TCHECK(*ilv);
+		invilv = ilv_valid(ilv, rlen);
+		if (invilv) {
+			printf("%s[", &ib[1]);
+			hex_print_with_offset(ib, tdp, rlen, 0);
+			printf("\n%s]\n", &ib[1]);
+			return -1;
+		}
+		if (vflag >= 3) {
+			int ilvl = EXTRACT_32BITS(&ilv->length);
+			printf("\n%s ILV: type %x length %d\n", &ib[1],
+			       EXTRACT_32BITS(&ilv->type), ilvl);
+			hex_print_with_offset("\t\t[", tdp, ilvl-ILV_HDRL, 0);
+		}
+
+		ilv = GO_NXT_ILV(ilv, rlen);
+	}
+
+	return 0;
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+static int
+sdatatlv_print(register const u_char * pptr, register u_int len,
+	       u_int16_t op_msk, int indent)
+{
+	const struct forces_tlv *tlv = (struct forces_tlv *)pptr;
+	u_int rlen;
+	register const u_char *tdp = (u_char *) TLV_DATA(tlv);
+	u_int16_t type;
+
+	/*
+	 * pdatacnt_print() has ensured that len (the TLV length)
+	 * >= TLV_HDRL.
+	 */
+	rlen = len - TLV_HDRL;
+	TCHECK(*tlv);
+	type = EXTRACT_16BITS(&tlv->type);
+	if (type != F_TLV_SPAD) {
+		printf("Error: expecting SPARSEDATA!\n");
+		return -1;
+	}
+
+	return sdatailv_print(tdp, rlen, op_msk, indent);
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+static int
+pkeyitlv_print(register const u_char * pptr, register u_int len,
+	       u_int16_t op_msk, int indent)
+{
+	const struct forces_tlv *tlv = (struct forces_tlv *)pptr;
+	register const u_char *tdp = (u_char *) TLV_DATA(tlv);
+	register const u_char *dp = tdp + 4;
+	const struct forces_tlv *kdtlv = (struct forces_tlv *)dp;
+	u_int32_t id;
+	char *ib = indent_pr(indent, 0);
+	u_int16_t type, tll;
+	int invtlv;
+
+	TCHECK(*tdp);
+	id = EXTRACT_32BITS(tdp);
+	printf("%sKeyinfo: Key 0x%x\n", ib, id);
+	TCHECK(*kdtlv);
+	type = EXTRACT_16BITS(&kdtlv->type);
+	invtlv = tlv_valid(kdtlv, len);
+
+	if (invtlv) {
+		printf("%s TLV type 0x%x len %d\n",
+		       tok2str(ForCES_TLV_err, NULL, invtlv), type,
+		       EXTRACT_16BITS(&kdtlv->length));
+		return -1;
+	}
+	/*
+	 * At this point, tlv_valid() has ensured that the TLV
+	 * length is large enough but not too large (it doesn't
+	 * go past the end of the containing TLV).
+	 */
+	tll = EXTRACT_16BITS(&kdtlv->length);
+	dp = (u_char *) TLV_DATA(kdtlv);
+	return fdatatlv_print(dp, tll, op_msk, indent);
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+#define PTH_DESC_SIZE 12
+
+static int
+pdatacnt_print(register const u_char * pptr, register u_int len,
+	       u_int16_t IDcnt, u_int16_t op_msk, int indent)
+{
+	u_int i;
+	u_int32_t id;
+	char *ib = indent_pr(indent, 0);
+
+	if ((op_msk & B_APPND) && vflag >= 3) {
+		printf("%sTABLE APPEND\n", ib);
+	}
+	for (i = 0; i < IDcnt; i++) {
+		TCHECK2(*pptr, 4);
+		if (len < 4)
+			goto trunc;
+		id = EXTRACT_32BITS(pptr);
+		if (vflag >= 3)
+			printf("%sID#%02u: %d\n", ib, i + 1, id);
+		len -= 4;
+		pptr += 4;
+	}
+
+	if ((op_msk & B_TRNG) || (op_msk & B_KEYIN)) {
+		if (op_msk & B_TRNG) {
+			u_int32_t starti, endi;
+
+			if (len < PTH_DESC_SIZE) {
+				printf("pathlength %d with key/range too short %d\n",
+				       len, PTH_DESC_SIZE);
+				return -1;
+			}
+
+			pptr += sizeof(struct forces_tlv);
+			len -= sizeof(struct forces_tlv);
+
+			starti = EXTRACT_32BITS(pptr);
+			pptr += 4;
+			len -= 4;
+
+			endi = EXTRACT_32BITS(pptr);
+			pptr += 4;
+			len -= 4;
+
+			if (vflag >= 3)
+				printf("%sTable range: [%d,%d]\n", ib, starti, endi);
+		}
+
+		if (op_msk & B_KEYIN) {
+			struct forces_tlv *keytlv;
+			u_int16_t tll;
+
+			if (len < PTH_DESC_SIZE) {
+				printf("pathlength %d with key/range too short %d\n",
+				       len, PTH_DESC_SIZE);
+				return -1;
+			}
+
+			/* skip keyid */
+			pptr += 4;
+			len -= 4;
+			keytlv = (struct forces_tlv *)pptr;
+			/* skip header */
+			pptr += sizeof(struct forces_tlv);
+			len -= sizeof(struct forces_tlv);
+			/* skip key content */
+			tll = EXTRACT_16BITS(&keytlv->length);
+			if (tll < TLV_HDRL) {
+				printf("key content length %u < %u\n",
+					tll, TLV_HDRL);
+				return -1;
+			}
+			tll -= TLV_HDRL;
+			if (len < tll) {
+				printf("key content too short\n");
+				return -1;
+			}
+			pptr += tll;
+			len -= tll;
+		}
+
+	}
+
+	if (len) {
+		const struct forces_tlv *pdtlv = (struct forces_tlv *)pptr;
+		u_int16_t type;
+		u_int16_t tll;
+		int pad = 0;
+		u_int aln;
+		int invtlv;
+
+		TCHECK(*pdtlv);
+		type = EXTRACT_16BITS(&pdtlv->type);
+		invtlv = tlv_valid(pdtlv, len);
+		if (invtlv) {
+			printf
+			    ("%s Outstanding bytes %d for TLV type 0x%x TLV len %d\n",
+			     tok2str(ForCES_TLV_err, NULL, invtlv), len, type,
+			     EXTRACT_16BITS(&pdtlv->length));
+			goto pd_err;
+		}
+		/*
+		 * At this point, tlv_valid() has ensured that the TLV
+		 * length is large enough but not too large (it doesn't
+		 * go past the end of the containing TLV).
+		 */
+		tll = EXTRACT_16BITS(&pdtlv->length) - TLV_HDRL;
+		aln = F_ALN_LEN(EXTRACT_16BITS(&pdtlv->length));
+		if (aln > EXTRACT_16BITS(&pdtlv->length)) {
+			if (aln > len) {
+				printf
+				    ("Invalid padded pathdata TLV type 0x%x len %d missing %d pad bytes\n",
+				     type, EXTRACT_16BITS(&pdtlv->length), aln - len);
+			} else {
+				pad = aln - EXTRACT_16BITS(&pdtlv->length);
+			}
+		}
+		if (pd_valid(type)) {
+			const struct pdata_ops *ops = get_forces_pd(type);
+
+			if (vflag >= 3 && ops->v != F_TLV_PDAT) {
+				if (pad)
+					printf
+					    ("%s  %s (Length %d DataLen %d pad %d Bytes)\n",
+					     ib, ops->s, EXTRACT_16BITS(&pdtlv->length),
+					     tll, pad);
+				else
+					printf
+					    ("%s  %s (Length %d DataLen %d Bytes)\n",
+					     ib, ops->s, EXTRACT_16BITS(&pdtlv->length),
+					     tll);
+			}
+
+			chk_op_type(type, op_msk, ops->op_msk);
+
+			if (ops->print((const u_char *)pdtlv,
+					tll + pad + TLV_HDRL, op_msk,
+					indent + 2) == -1)
+				return -1;
+			len -= (TLV_HDRL + pad + tll);
+		} else {
+			printf("Invalid path data content type 0x%x len %d\n",
+			       type, EXTRACT_16BITS(&pdtlv->length));
+pd_err:
+			if (EXTRACT_16BITS(&pdtlv->length)) {
+				hex_print_with_offset("Bad Data val\n\t  [",
+						      pptr, len, 0);
+				printf("]\n");
+
+				return -1;
+			}
+		}
+	}
+	return len;
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+static int
+pdata_print(register const u_char * pptr, register u_int len,
+	    u_int16_t op_msk, int indent)
+{
+	const struct pathdata_h *pdh = (struct pathdata_h *)pptr;
+	char *ib = indent_pr(indent, 0);
+	u_int minsize = 0;
+	int more_pd = 0;
+	u_int16_t idcnt = 0;
+
+	TCHECK(*pdh);
+	if (len < sizeof(struct pathdata_h))
+		goto trunc;
+	if (vflag >= 3) {
+		printf("\n%sPathdata: Flags 0x%x ID count %d\n",
+		       ib, EXTRACT_16BITS(&pdh->pflags), EXTRACT_16BITS(&pdh->pIDcnt));
+	}
+
+	if (EXTRACT_16BITS(&pdh->pflags) & F_SELKEY) {
+		op_msk |= B_KEYIN;
+	}
+
+	/* Table GET Range operation */
+	if (EXTRACT_16BITS(&pdh->pflags) & F_SELTABRANGE) {
+		op_msk |= B_TRNG;
+	}
+	/* Table SET append operation */
+	if (EXTRACT_16BITS(&pdh->pflags) & F_TABAPPEND) {
+		op_msk |= B_APPND;
+	}
+
+	pptr += sizeof(struct pathdata_h);
+	len -= sizeof(struct pathdata_h);
+	idcnt = EXTRACT_16BITS(&pdh->pIDcnt);
+	minsize = idcnt * 4;
+	if (len < minsize) {
+		printf("\t\t\ttruncated IDs expected %uB got %uB\n", minsize,
+		       len);
+		hex_print_with_offset("\t\t\tID Data[", pptr, len, 0);
+		printf("]\n");
+		return -1;
+	}
+
+	if ((op_msk & B_TRNG) && (op_msk & B_KEYIN)) {
+		printf("\t\t\tIllegal to have both Table ranges and keys\n");
+		return -1;
+	}
+
+	more_pd = pdatacnt_print(pptr, len, idcnt, op_msk, indent);
+	if (more_pd > 0) {
+		int consumed = len - more_pd;
+		pptr += consumed;
+		len = more_pd; 
+		/* XXX: Argh, recurse some more */
+		return recpdoptlv_print(pptr, len, op_msk, indent+1);
+	} else
+		return 0;
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+static int
+genoptlv_print(register const u_char * pptr, register u_int len,
+	       u_int16_t op_msk, int indent)
+{
+	const struct forces_tlv *pdtlv = (struct forces_tlv *)pptr;
+	u_int16_t type;
+	int tll;
+	int invtlv;
+	char *ib = indent_pr(indent, 0);
+
+	TCHECK(*pdtlv);
+	type = EXTRACT_16BITS(&pdtlv->type);
+	tll = EXTRACT_16BITS(&pdtlv->length) - TLV_HDRL;
+	invtlv = tlv_valid(pdtlv, len);
+	printf("genoptlvprint - %s TLV type 0x%x len %d\n",
+	       tok2str(ForCES_TLV, NULL, type), type, EXTRACT_16BITS(&pdtlv->length));
+	if (!invtlv) {
+		/*
+		 * At this point, tlv_valid() has ensured that the TLV
+		 * length is large enough but not too large (it doesn't
+		 * go past the end of the containing TLV).
+		 */
+		register const u_char *dp = (u_char *) TLV_DATA(pdtlv);
+		if (!ttlv_valid(type)) {
+			printf("%s TLV type 0x%x len %d\n",
+			       tok2str(ForCES_TLV_err, NULL, invtlv), type,
+			       EXTRACT_16BITS(&pdtlv->length));
+			return -1;
+		}
+		if (vflag >= 3)
+			printf("%s%s, length %d (data length %d Bytes)",
+			       ib, tok2str(ForCES_TLV, NULL, type),
+			       EXTRACT_16BITS(&pdtlv->length), tll);
+
+		return pdata_print(dp, tll, op_msk, indent + 1);
+	} else {
+		printf("\t\t\tInvalid ForCES TLV type=%x", type);
+		return -1;
+	}
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+static int
+recpdoptlv_print(register const u_char * pptr, register u_int len,
+		 u_int16_t op_msk, int indent)
+{
+	const struct forces_tlv *pdtlv = (struct forces_tlv *)pptr;
+	int tll;
+	int invtlv;
+	u_int16_t type;
+	register const u_char *dp;
+	char *ib;
+
+	while (len != 0) {
+		TCHECK(*pdtlv);
+		invtlv = tlv_valid(pdtlv, len);
+		if (invtlv) {
+			break;
+		}
+
+		/*
+		 * At this point, tlv_valid() has ensured that the TLV
+		 * length is large enough but not too large (it doesn't
+		 * go past the end of the containing TLV).
+		 */
+		ib = indent_pr(indent, 0);
+		type = EXTRACT_16BITS(&pdtlv->type);
+		dp = (u_char *) TLV_DATA(pdtlv);
+		tll = EXTRACT_16BITS(&pdtlv->length) - TLV_HDRL;
+
+		if (vflag >= 3)
+			printf
+			    ("%s%s, length %d (data encapsulated %d Bytes)",
+			     ib, tok2str(ForCES_TLV, NULL, type),
+			     EXTRACT_16BITS(&pdtlv->length),
+			     EXTRACT_16BITS(&pdtlv->length) - TLV_HDRL);
+
+		if (pdata_print(dp, tll, op_msk, indent + 1) == -1)
+			return -1;
+		pdtlv = GO_NXT_TLV(pdtlv, len);
+	}
+
+	if (len) {
+		printf
+		    ("\n\t\tMessy PATHDATA TLV header, type (0x%x)\n\t\texcess of %d Bytes ",
+		     EXTRACT_16BITS(&pdtlv->type), len - EXTRACT_16BITS(&pdtlv->length));
+		return -1;
+	}
+
+	return 0;
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+static int
+invoptlv_print(register const u_char * pptr, register u_int len,
+	       u_int16_t op_msk _U_, int indent)
+{
+	char *ib = indent_pr(indent, 1);
+
+	if (vflag >= 3) {
+		printf("%sData[", &ib[1]);
+		hex_print_with_offset(ib, pptr, len, 0);
+		printf("%s]\n", ib);
+	}
+	return -1;
+}
+
+static int
+otlv_print(const struct forces_tlv *otlv, u_int16_t op_msk _U_, int indent)
+{
+	int rc = 0;
+	register const u_char *dp = (u_char *) TLV_DATA(otlv);
+	u_int16_t type;
+	int tll;
+	char *ib = indent_pr(indent, 0);
+	const struct optlv_h *ops;
+
+	/*
+	 * lfbselect_print() has ensured that EXTRACT_16BITS(&otlv->length)
+	 * >= TLV_HDRL.
+	 */
+	TCHECK(*otlv);
+	type = EXTRACT_16BITS(&otlv->type);
+	tll = EXTRACT_16BITS(&otlv->length) - TLV_HDRL;
+	ops = get_forces_optlv_h(type);
+	if (vflag >= 3) {
+		printf("%sOper TLV %s(0x%x) length %d\n", ib, ops->s, type,
+		       EXTRACT_16BITS(&otlv->length));
+	}
+	/* empty TLVs like COMMIT and TRCOMMIT are empty, we stop here .. */
+	if (!ops->flags & ZERO_TTLV) {
+		if (tll != 0)	/* instead of "if (tll)" - for readability .. */
+			printf("%s: Illegal - MUST be empty\n", ops->s);
+		return rc;
+	}
+	/* rest of ops must at least have 12B {pathinfo} */
+	if (tll < OP_MIN_SIZ) {
+		printf("\t\tOper TLV %s(0x%x) length %d\n", ops->s, type,
+		       EXTRACT_16BITS(&otlv->length));
+		printf("\t\tTruncated data size %d minimum required %d\n", tll,
+		       OP_MIN_SIZ);
+		return invoptlv_print(dp, tll, ops->op_msk, indent);
+
+	}
+
+	rc = ops->print(dp, tll, ops->op_msk, indent + 1);
+	return rc;
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+#define ASTDLN	4
+#define ASTMCD	255
+static int
+asttlv_print(register const u_char * pptr, register u_int len,
+	     u_int16_t op_msk _U_, int indent)
+{
+	u_int32_t rescode;
+	u_int dlen;
+	char *ib = indent_pr(indent, 0);
+
+	/*
+	 * forces_type_print() has ensured that len (the TLV length)
+	 * >= TLV_HDRL.
+	 */
+	dlen = len - TLV_HDRL;
+	if (dlen != ASTDLN) {
+		printf("illegal ASTresult-TLV: %d bytes!\n", dlen);
+		return -1;
+	}
+	TCHECK2(*pptr, 4);
+	rescode = EXTRACT_32BITS(pptr);
+	if (rescode > ASTMCD) {
+		printf("illegal ASTresult result code: %d!\n", rescode);
+		return -1;
+	}
+
+	if (vflag >= 3) {
+		printf("Teardown reason:\n%s", ib);
+		switch (rescode) {
+		case 0:
+			printf("Normal Teardown");
+			break;
+		case 1:
+			printf("Loss of Heartbeats");
+			break;
+		case 2:
+			printf("Out of bandwidth");
+			break;
+		case 3:
+			printf("Out of Memory");
+			break;
+		case 4:
+			printf("Application Crash");
+			break;
+		default:
+			printf("Unknown Teardown reason");
+			break;
+		}
+		printf("(%x)\n%s", rescode, ib);
+	}
+	return 0;
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+#define ASRDLN	4
+#define ASRMCD	3
+static int
+asrtlv_print(register const u_char * pptr, register u_int len,
+	     u_int16_t op_msk _U_, int indent)
+{
+	u_int32_t rescode;
+	u_int dlen;
+	char *ib = indent_pr(indent, 0);
+
+	/*
+	 * forces_type_print() has ensured that len (the TLV length)
+	 * >= TLV_HDRL.
+	 */
+	dlen = len - TLV_HDRL;
+	if (dlen != ASRDLN) {	/* id, instance, oper tlv */
+		printf("illegal ASRresult-TLV: %d bytes!\n", dlen);
+		return -1;
+	}
+	TCHECK2(*pptr, 4);
+	rescode = EXTRACT_32BITS(pptr);
+
+	if (rescode > ASRMCD) {
+		printf("illegal ASRresult result code: %d!\n", rescode);
+		return -1;
+	}
+
+	if (vflag >= 3) {
+		printf("\n%s", ib);
+		switch (rescode) {
+		case 0:
+			printf("Success ");
+			break;
+		case 1:
+			printf("FE ID invalid ");
+			break;
+		case 2:
+			printf("permission denied ");
+			break;
+		default:
+			printf("Unknown ");
+			break;
+		}
+		printf("(%x)\n%s", rescode, ib);
+	}
+	return 0;
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+#if 0
+/*
+ * XXX - not used.
+ */
+static int
+gentltlv_print(register const u_char * pptr _U_, register u_int len,
+	       u_int16_t op_msk _U_, int indent _U_)
+{
+	u_int dlen = len - TLV_HDRL;
+
+	if (dlen < 4) {		/* at least 32 bits must exist */
+		printf("truncated TLV: %d bytes missing! ", 4 - dlen);
+		return -1;
+	}
+	return 0;
+}
+#endif
+
+#define RD_MIN 8
+
+static int
+print_metailv(register const u_char * pptr, register u_int len,
+	      u_int16_t op_msk _U_, int indent)
+{
+	u_int rlen;
+	u_int plen;
+	char *ib = indent_pr(indent, 0);
+	/* XXX: check header length */
+	const struct forces_ilv *ilv = (struct forces_ilv *)pptr;
+
+	/*
+	 * print_metatlv() has ensured that len (what remains in the
+	 * ILV) >= ILV_HDRL.
+	 */
+	rlen = EXTRACT_32BITS(&ilv->length) - ILV_HDRL;
+	TCHECK(*ilv);
+	printf("%sMetaID 0x%x length %d\n", ib, EXTRACT_32BITS(&ilv->type),
+	       EXTRACT_32BITS(&ilv->length));
+	if (vflag >= 3) {
+		hex_print_with_offset("\t\t[", ILV_DATA(ilv), rlen, 0);
+		printf(" ]\n");
+	}
+	return 0;
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+static int
+print_metatlv(register const u_char * pptr, register u_int len,
+	      u_int16_t op_msk _U_, int indent)
+{
+	u_int dlen;
+	char *ib = indent_pr(indent, 0);
+	u_int rlen;
+	const struct forces_ilv *ilv = (struct forces_ilv *)pptr;
+	int invilv;
+
+	/*
+	 * redirect_print() has ensured that len (what remains in the
+	 * TLV) >= TLV_HDRL.
+	 */
+	dlen = len - TLV_HDRL;
+	rlen = dlen;
+	printf("\n%s METADATA length %d \n", ib, rlen);
+	while (rlen != 0) {
+		TCHECK(*ilv);
+		invilv = ilv_valid(ilv, rlen);
+		if (invilv) {
+			break;
+		}
+
+		/*
+		 * At this point, ilv_valid() has ensured that the ILV
+		 * length is large enough but not too large (it doesn't
+		 * go past the end of the containing TLV).
+		 */
+		print_metailv((u_char *) ilv, rlen, 0, indent + 1);
+		ilv = GO_NXT_ILV(ilv, rlen);
+	}
+
+	return 0;
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+
+static int
+print_reddata(register const u_char * pptr, register u_int len,
+	      u_int16_t op_msk _U_, int indent _U_)
+{
+	u_int dlen;
+	char *ib = indent_pr(indent, 0);
+	u_int rlen;
+
+	dlen = len - TLV_HDRL;
+	rlen = dlen;
+	printf("\n%s Redirect Data length %d \n", ib, rlen);
+
+	if (vflag >= 3) {
+		printf("\t\t[");
+		hex_print_with_offset("\n\t\t", pptr, rlen, 0);
+		printf("\n\t\t]");
+	}
+
+	return 0;
+}
+
+static int
+redirect_print(register const u_char * pptr, register u_int len,
+	       u_int16_t op_msk _U_, int indent)
+{
+	const struct forces_tlv *tlv = (struct forces_tlv *)pptr;
+	u_int dlen;
+	u_int rlen;
+	int invtlv;
+
+	/*
+	 * forces_type_print() has ensured that len (the TLV length)
+	 * >= TLV_HDRL.
+	 */
+	dlen = len - TLV_HDRL;
+	if (dlen <= RD_MIN) {
+		printf("\n\t\ttruncated Redirect TLV: %d bytes missing! ",
+		       RD_MIN - dlen);
+		return -1;
+	}
+
+	rlen = dlen;
+	indent += 1;
+	while (rlen != 0) {
+		TCHECK(*tlv);
+		invtlv = tlv_valid(tlv, rlen);
+		if (invtlv) {
+			printf("Bad Redirect data\n");
+			break;
+		}
+
+		/*
+		 * At this point, tlv_valid() has ensured that the TLV
+		 * length is large enough but not too large (it doesn't
+		 * go past the end of the containing TLV).
+		 */
+		if (EXTRACT_16BITS(&tlv->type) == F_TLV_METD) {
+			print_metatlv((u_char *) TLV_DATA(tlv),
+				      EXTRACT_16BITS(&tlv->length), 0, indent);
+		} else if ((EXTRACT_16BITS(&tlv->type) == F_TLV_REDD)) {
+			print_reddata((u_char *) TLV_DATA(tlv),
+				      EXTRACT_16BITS(&tlv->length), 0, indent);
+		} else {
+			printf("Unknown REDIRECT TLV 0x%x len %d\n",
+			       EXTRACT_16BITS(&tlv->type),
+			       EXTRACT_16BITS(&tlv->length));
+		}
+
+		tlv = GO_NXT_TLV(tlv, rlen);
+	}
+
+	if (rlen) {
+		printf
+		    ("\n\t\tMessy Redirect TLV header, type (0x%x)\n\t\texcess of %d Bytes ",
+		     EXTRACT_16BITS(&tlv->type),
+		     rlen - EXTRACT_16BITS(&tlv->length));
+		return -1;
+	}
+
+	return 0;
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+#define OP_OFF 8
+#define OP_MIN 12
+
+static int
+lfbselect_print(register const u_char * pptr, register u_int len,
+		u_int16_t op_msk, int indent)
+{
+	const struct forces_lfbsh *lfbs;
+	const struct forces_tlv *otlv;
+	char *ib = indent_pr(indent, 0);
+	u_int dlen;
+	u_int rlen;
+	int invtlv;
+
+	/*
+	 * forces_type_print() has ensured that len (the TLV length)
+	 * >= TLV_HDRL.
+	 */
+	dlen = len - TLV_HDRL;
+	if (dlen <= OP_MIN) {	/* id, instance, oper tlv header .. */
+		printf("\n\t\ttruncated lfb selector: %d bytes missing! ",
+		       OP_MIN - dlen);
+		return -1;
+	}
+
+	/*
+	 * At this point, we know that dlen > OP_MIN; OP_OFF < OP_MIN, so
+	 * we also know that it's > OP_OFF.
+	 */
+	rlen = dlen - OP_OFF;
+
+	lfbs = (const struct forces_lfbsh *)pptr;
+	TCHECK(*lfbs);
+	if (vflag >= 3) {
+		printf("\n%s%s(Classid %x) instance %x\n",
+		       ib, tok2str(ForCES_LFBs, NULL, EXTRACT_32BITS(&lfbs->class)),
+		       EXTRACT_32BITS(&lfbs->class),
+		       EXTRACT_32BITS(&lfbs->instance));
+	}
+
+	otlv = (struct forces_tlv *)(lfbs + 1);
+
+	indent += 1;
+	while (rlen != 0) {
+		TCHECK(*otlv);
+		invtlv = tlv_valid(otlv, rlen);
+		if (invtlv)
+			break;
+
+		/*
+		 * At this point, tlv_valid() has ensured that the TLV
+		 * length is large enough but not too large (it doesn't
+		 * go past the end of the containing TLV).
+		 */
+		if (op_valid(EXTRACT_16BITS(&otlv->type), op_msk)) {
+			otlv_print(otlv, 0, indent);
+		} else {
+			if (vflag < 3)
+				printf("\n");
+			printf
+			    ("\t\tINValid oper-TLV type 0x%x length %d for this ForCES message\n",
+			     EXTRACT_16BITS(&otlv->type), EXTRACT_16BITS(&otlv->length));
+			invoptlv_print((u_char *)otlv, rlen, 0, indent);
+		}
+		otlv = GO_NXT_TLV(otlv, rlen);
+	}
+
+	if (rlen) {
+		printf
+		    ("\n\t\tMessy oper TLV header, type (0x%x)\n\t\texcess of %d Bytes ",
+		     EXTRACT_16BITS(&otlv->type), rlen - EXTRACT_16BITS(&otlv->length));
+		return -1;
+	}
+
+	return 0;
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+static int
+forces_type_print(register const u_char * pptr, const struct forcesh *fhdr _U_,
+		  register u_int mlen, const struct tom_h *tops)
+{
+	const struct forces_tlv *tltlv;
+	u_int rlen;
+	int invtlv;
+	int rc = 0;
+	int ttlv = 0;
+
+	/*
+	 * forces_print() has already checked that mlen >= ForCES_HDRL
+	 * by calling ForCES_HLN_VALID().
+	 */
+	rlen = mlen - ForCES_HDRL;
+
+	if (rlen > TLV_HLN) {
+		if (tops->flags & ZERO_TTLV) {
+			printf("<0x%x>Illegal Top level TLV!\n", tops->flags);
+			return -1;
+		}
+	} else {
+		if (tops->flags & ZERO_MORE_TTLV)
+			return 0;
+		if (tops->flags & ONE_MORE_TTLV) {
+			printf("\tTop level TLV Data missing!\n");
+			return -1;
+		}
+	}
+
+	if (tops->flags & ZERO_TTLV) {
+		return 0;
+	}
+
+	ttlv = tops->flags >> 4;
+	tltlv = GET_TOP_TLV(pptr);
+
+	/*XXX: 15 top level tlvs will probably be fine
+	   You are nuts if you send more ;-> */
+	while (rlen != 0) {
+		TCHECK(*tltlv);
+		invtlv = tlv_valid(tltlv, rlen);
+		if (invtlv)
+			break;
+
+		/*
+		 * At this point, tlv_valid() has ensured that the TLV
+		 * length is large enough but not too large (it doesn't
+		 * go past the end of the packet).
+		 */
+		if (!ttlv_valid(EXTRACT_16BITS(&tltlv->type))) {
+			printf("\n\tInvalid ForCES Top TLV type=0x%x",
+			       EXTRACT_16BITS(&tltlv->type));
+			return -1;
+		}
+
+		if (vflag >= 3)
+			printf("\t%s, length %d (data length %d Bytes)",
+			       tok2str(ForCES_TLV, NULL, EXTRACT_16BITS(&tltlv->type)),
+			       EXTRACT_16BITS(&tltlv->length),
+			       EXTRACT_16BITS(&tltlv->length) - TLV_HDRL);
+
+		rc = tops->print((u_char *) TLV_DATA(tltlv),
+				 EXTRACT_16BITS(&tltlv->length), tops->op_msk, 9);
+		if (rc < 0) {
+			return -1;
+		}
+		tltlv = GO_NXT_TLV(tltlv, rlen);
+		ttlv--;
+		if (ttlv <= 0)
+			break;
+	}
+	/*
+	 * XXX - if ttlv != 0, does that mean that the packet was too
+	 * short, and didn't have *enough* TLVs in it?
+	 */
+	if (rlen) {
+		printf("\tMess TopTLV header: min %u, total %d advertised %d ",
+		       TLV_HDRL, rlen, EXTRACT_16BITS(&tltlv->length));
+		return -1;
+	}
+
+	return 0;
+
+trunc:
+	fputs("[|forces]", stdout);
+	return -1;
+}
+
+void
+forces_print(register const u_char * pptr, register u_int len)
+{
+	const struct forcesh *fhdr;
+	u_int mlen;
+	u_int32_t flg_raw;
+	const struct tom_h *tops;
+	int rc = 0;
+
+	fhdr = (const struct forcesh *)pptr;
+	TCHECK(*fhdr);
+	if (!tom_valid(fhdr->fm_tom)) {
+		printf("Invalid ForCES message type %d\n", fhdr->fm_tom);
+		goto error;
+	}
+
+	mlen = ForCES_BLN(fhdr);
+
+	tops = get_forces_tom(fhdr->fm_tom);
+	if (tops->v == TOM_RSVD) {
+		printf("\n\tUnknown ForCES message type=0x%x", fhdr->fm_tom);
+		goto error;
+	}
+
+	printf("\n\tForCES %s ", tops->s);
+	if (!ForCES_HLN_VALID(mlen, len)) {
+		printf
+		    ("Illegal ForCES pkt len - min %u, total recvd %d, advertised %d ",
+		     ForCES_HDRL, len, ForCES_BLN(fhdr));
+		goto error;
+	}
+
+	TCHECK2(*(pptr + 20), 4);
+	flg_raw = EXTRACT_32BITS(pptr + 20);
+	if (vflag >= 1) {
+		printf("\n\tForCES Version %d len %uB flags 0x%08x ",
+		       ForCES_V(fhdr), mlen, flg_raw);
+		printf("\n\tSrcID 0x%x(%s) DstID 0x%x(%s) Correlator 0x%" PRIx64,
+		       ForCES_SID(fhdr), ForCES_node(ForCES_SID(fhdr)),
+		       ForCES_DID(fhdr), ForCES_node(ForCES_DID(fhdr)),
+		       EXTRACT_64BITS(fhdr->fm_cor));
+
+	}
+	if (vflag >= 2) {
+		printf
+		    ("\n\tForCES flags:\n\t  %s(0x%x), prio=%d, %s(0x%x),\n\t  %s(0x%x), %s(0x%x)\n",
+		     ForCES_ACKp(ForCES_ACK(fhdr)), ForCES_ACK(fhdr),
+		     ForCES_PRI(fhdr),
+		     ForCES_EMp(ForCES_EM(fhdr)), ForCES_EM(fhdr),
+		     ForCES_ATp(ForCES_AT(fhdr)), ForCES_AT(fhdr),
+		     ForCES_TPp(ForCES_TP(fhdr)), ForCES_TP(fhdr));
+		printf
+		    ("\t  Extra flags: rsv(b5-7) 0x%x rsv(b13-31) 0x%x\n",
+		     ForCES_RS1(fhdr), ForCES_RS2(fhdr));
+	}
+	rc = forces_type_print(pptr, fhdr, mlen, tops);
+	if (rc < 0) {
+error:
+		hex_print_with_offset("\n\t[", pptr, len, 0);
+		printf("\n\t]");
+		return;
+	}
+
+	if (vflag >= 4) {
+		printf("\n\t  Raw ForCES message\n\t [");
+		hex_print_with_offset("\n\t ", pptr, len, 0);
+		printf("\n\t ]");
+	}
+	printf("\n");
+	return;
+
+trunc:
+	fputs("[|forces]", stdout);
+}
diff --git a/print-fr.c b/print-fr.c
index b53a88b..9fb763c 100644
--- a/print-fr.c
+++ b/print-fr.c
@@ -21,7 +21,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
@@ -73,7 +73,7 @@
 #define FR_SDLC_BIT	0x00000002
 
 
-struct tok fr_header_flag_values[] = {
+static const struct tok fr_header_flag_values[] = {
     { FR_CR_BIT, "C!" },
     { FR_DE_BIT, "DE" },
     { FR_BECN_BIT, "BECN" },
@@ -90,7 +90,7 @@
 #define MFR_CTRL_FRAME  (MFR_B_BIT | MFR_E_BIT | MFR_C_BIT)
 #define MFR_FRAG_FRAME  (MFR_B_BIT | MFR_E_BIT )
 
-struct tok frf_flag_values[] = {
+static const struct tok frf_flag_values[] = {
     { MFR_B_BIT, "Begin" },
     { MFR_E_BIT, "End" },
     { MFR_C_BIT, "Control" },
@@ -100,7 +100,7 @@
 /* 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))
@@ -130,14 +130,26 @@
 
         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
 
                   +---------------------------+
@@ -222,13 +234,12 @@
 {
 	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;
 	}
@@ -245,11 +256,10 @@
                 if (eflag)
                     fr_hdr_print(length, addr_len, dlci, flags, extracted_ethertype);
 
-                if (ether_encap_print(extracted_ethertype,
+                if (ethertype_print(gndo, extracted_ethertype,
                                       p+addr_len+ETHERTYPE_LEN,
                                       length-addr_len-ETHERTYPE_LEN,
-                                      length-addr_len-ETHERTYPE_LEN,
-                                      &extracted_ethertype) == 0)
+                                      length-addr_len-ETHERTYPE_LEN) == 0)
                     /* ether_type not known, probably it wasn't one */
                     printf("UI %02x! ", p[addr_len]);
                 else
@@ -276,7 +286,7 @@
 
 #ifdef INET6
 	case NLPID_IP6:
-		ip6_print(p, length);
+		ip6_print(gndo, p, length);
 		break;
 #endif
 	case NLPID_CLNP:
@@ -286,7 +296,7 @@
 		break;
 
 	case NLPID_SNAP:
-		if (snap_print(p, length, length, &extracted_ethertype, 0) == 0) {
+		if (snap_print(p, length, length, 0) == 0) {
 			/* ether_type not known, print raw packet */
                         if (!eflag)
                             fr_hdr_print(length + hdr_len, hdr_len,
@@ -350,7 +360,7 @@
 #define MFR_CTRL_MSG_REMOVE_LINK     6
 #define MFR_CTRL_MSG_REMOVE_LINK_ACK 7
 
-struct tok mfr_ctrl_msg_values[] = {
+static const struct tok mfr_ctrl_msg_values[] = {
     { MFR_CTRL_MSG_ADD_LINK, "Add Link" },
     { MFR_CTRL_MSG_ADD_LINK_ACK, "Add Link ACK" },
     { MFR_CTRL_MSG_ADD_LINK_REJ, "Add Link Reject" },
@@ -368,7 +378,7 @@
 #define MFR_CTRL_IE_VENDOR_EXT 6
 #define MFR_CTRL_IE_CAUSE      7
 
-struct tok mfr_ctrl_ie_values[] = {
+static const struct tok mfr_ctrl_ie_values[] = {
     { MFR_CTRL_IE_BUNDLE_ID, "Bundle ID"},
     { MFR_CTRL_IE_LINK_ID, "Link ID"},
     { MFR_CTRL_IE_MAGIC_NUM, "Magic Number"},
@@ -616,7 +626,7 @@
 #define MSG_TYPE_STATUS           0x7D
 #define MSG_TYPE_STATUS_ENQ       0x75
 
-struct tok fr_q933_msg_values[] = {
+static const struct tok fr_q933_msg_values[] = {
     { MSG_TYPE_ESC_TO_NATIONAL, "ESC to National" },
     { MSG_TYPE_ALERT, "Alert" },
     { MSG_TYPE_CALL_PROCEEDING, "Call proceeding" },
@@ -645,7 +655,7 @@
 #define FR_LMI_CCITT_LINK_VERIFY_IE	0x53
 #define FR_LMI_CCITT_PVC_STATUS_IE	0x57
 
-struct tok fr_q933_ie_values_codeset5[] = {
+static const struct tok fr_q933_ie_values_codeset5[] = {
     { FR_LMI_ANSI_REPORT_TYPE_IE, "ANSI Report Type" },
     { FR_LMI_ANSI_LINK_VERIFY_IE_91, "ANSI Link Verify" },
     { FR_LMI_ANSI_LINK_VERIFY_IE, "ANSI Link Verify" },
@@ -660,7 +670,7 @@
 #define FR_LMI_REPORT_TYPE_IE_LINK_VERIFY 1
 #define FR_LMI_REPORT_TYPE_IE_ASYNC_PVC   2
 
-struct tok fr_lmi_report_type_ie_values[] = {
+static const struct tok fr_lmi_report_type_ie_values[] = {
     { FR_LMI_REPORT_TYPE_IE_FULL_STATUS, "Full Status" },
     { FR_LMI_REPORT_TYPE_IE_LINK_VERIFY, "Link verify" },
     { FR_LMI_REPORT_TYPE_IE_ASYNC_PVC, "Async PVC Status" },
@@ -668,7 +678,7 @@
 };
 
 /* array of 16 codepages - currently we only support codepage 1,5 */
-static struct tok *fr_q933_ie_codesets[] = {
+static const struct tok *fr_q933_ie_codesets[] = {
     NULL,
     fr_q933_ie_values_codeset5,
     NULL,
@@ -730,25 +740,29 @@
 
         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 */
 
@@ -756,49 +770,57 @@
 		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)
-                    return;
+		}
 
-                if (fr_q933_print_ie_codeset[codeset] != NULL)
+                /* sanity check */
+                if (ie_p->ie_type == 0 || ie_p->ie_len == 0) {
+                    return;
+		}
+
+                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
@@ -810,24 +832,27 @@
 
         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) ||
@@ -836,14 +861,17 @@
                 ((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/print-frag6.c b/print-frag6.c
index 2c7788b..e125bd3 100644
--- a/print-frag6.c
+++ b/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/print-geonet.c b/print-geonet.c
new file mode 100644
index 0000000..c268e85
--- /dev/null
+++ b/print-geonet.c
@@ -0,0 +1,251 @@
+/*
+ * Copyright (c) 2013 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.
+ *
+ * Original code by Ola Martin Lykkja (ola.lykkja@q-free.com)
+ */
+
+#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 "extract.h"
+#include "addrtoname.h"
+
+
+/*
+   ETSI TS 102 636-5-1 V1.1.1 (2011-02)
+   Intelligent Transport Systems (ITS); Vehicular Communications; GeoNetworking;
+   Part 5: Transport Protocols; Sub-part 1: Basic Transport Protocol
+
+   ETSI TS 102 636-4-1 V1.1.1 (2011-06)
+   Intelligent Transport Systems (ITS); Vehicular communications; GeoNetworking;
+   Part 4: Geographical addressing and forwarding for point-to-point and point-to-multipoint communications;
+   Sub-part 1: Media-Independent Functionality
+*/
+
+static const struct tok msg_type_values[] = {
+	{   0, "CAM" },
+	{   1, "DENM" },
+	{ 101, "TPEGM" },
+	{ 102, "TSPDM" },
+	{ 103, "VPM" },
+	{ 104, "SRM" },
+	{ 105, "SLAM" },
+	{ 106, "ecoCAM" },
+	{ 107, "ITM" },
+	{ 150, "SA" },
+	{   0, NULL }
+};
+
+static void
+print_btp_body(const u_char *bp, u_int length)
+{
+	int version;
+	int msg_type;
+	const char *msg_type_str;
+
+	if (length <= 2) {
+		return;
+	}
+
+	/* Assuming ItsDpuHeader */
+	version = bp[0];
+	msg_type = bp[1];
+	msg_type_str = tok2str(msg_type_values, "unknown (%u)", msg_type);
+
+	printf("; ItsPduHeader v:%d t:%d-%s", version, msg_type, msg_type_str);
+}
+
+static void
+print_btp(const u_char *bp)
+{
+	u_int16_t dest = EXTRACT_16BITS(bp+0);
+	u_int16_t src = EXTRACT_16BITS(bp+2);
+	printf("; BTP Dst:%u Src:%u", dest, src);
+}
+
+static void
+print_long_pos_vector(const u_char *bp)
+{
+	int i;
+	u_int32_t lat, lon;
+
+	printf("GN_ADDR:");
+	for (i=0; i<8; i++) {
+		if (i) printf(":");
+		printf("%02x", bp[i]);
+	}
+	printf(" ");
+
+	lat = EXTRACT_32BITS(bp+12);
+	printf("lat:%d ", lat);
+	lon = EXTRACT_32BITS(bp+16);
+	printf("lon:%d", lon);
+}
+
+
+/*
+ * This is the top level routine of the printer.  'p' points
+ * to the geonet header of the packet.
+ */
+void
+geonet_print(netdissect_options *ndo, const u_char *eth, const u_char *bp, u_int length)
+{
+	printf("GeoNet src:%s; ", etheraddr_string(eth+6));
+
+	if (length >= 36) {
+		/* Process Common Header */
+		int version = bp[0] >> 4;
+		int next_hdr = bp[0] & 0x0f;
+		int hdr_type = bp[1] >> 4;
+		int hdr_subtype = bp[1] & 0x0f;
+		u_int16_t payload_length = EXTRACT_16BITS(bp+4);
+		int hop_limit = bp[7];
+		const char *next_hdr_txt = "Unknown";
+		const char *hdr_type_txt = "Unknown";
+		int hdr_size = -1;
+
+		switch (next_hdr) {
+			case 0: next_hdr_txt = "Any"; break;
+			case 1: next_hdr_txt = "BTP-A"; break;
+			case 2: next_hdr_txt = "BTP-B"; break;
+			case 3: next_hdr_txt = "IPv6"; break;
+		}
+
+		switch (hdr_type) {
+			case 0: hdr_type_txt = "Any"; break;
+			case 1: hdr_type_txt = "Beacon"; break;
+			case 2: hdr_type_txt = "GeoUnicast"; break;
+			case 3: switch (hdr_subtype) {
+					case 0: hdr_type_txt = "GeoAnycastCircle"; break;
+					case 1: hdr_type_txt = "GeoAnycastRect"; break;
+					case 2: hdr_type_txt = "GeoAnycastElipse"; break;
+				}
+				break;
+			case 4: switch (hdr_subtype) {
+					case 0: hdr_type_txt = "GeoBroadcastCircle"; break;
+					case 1: hdr_type_txt = "GeoBroadcastRect"; break;
+					case 2: hdr_type_txt = "GeoBroadcastElipse"; break;
+				}
+				break;
+			case 5: switch (hdr_subtype) {
+					case 0: hdr_type_txt = "TopoScopeBcast-SH"; break;
+					case 1: hdr_type_txt = "TopoScopeBcast-MH"; break;
+				}
+				break;
+			case 6: switch (hdr_subtype) {
+					case 0: hdr_type_txt = "LocService-Request"; break;
+					case 1: hdr_type_txt = "LocService-Reply"; break;
+				}
+				break;
+		}
+
+		printf("v:%d ", version);
+		printf("NH:%d-%s ", next_hdr, next_hdr_txt);
+		printf("HT:%d-%d-%s ", hdr_type, hdr_subtype, hdr_type_txt);
+		printf("HopLim:%d ", hop_limit);
+		printf("Payload:%d ", payload_length);
+        	print_long_pos_vector(bp + 8);
+
+		/* Skip Common Header */
+		length -= 36;
+		bp += 36;
+
+		/* Process Extended Headers */
+		switch (hdr_type) {
+			case 0: /* Any */
+				hdr_size = 0;
+				break;
+			case 1: /* Beacon */
+				hdr_size = 0;
+				break;
+			case 2: /* GeoUnicast */
+				break;
+			case 3: switch (hdr_subtype) {
+					case 0: /* GeoAnycastCircle */
+						break;
+					case 1: /* GeoAnycastRect */
+						break;
+					case 2: /* GeoAnycastElipse */
+						break;
+				}
+				break;
+			case 4: switch (hdr_subtype) {
+					case 0: /* GeoBroadcastCircle */
+						break;
+					case 1: /* GeoBroadcastRect */
+						break;
+					case 2: /* GeoBroadcastElipse */
+						break;
+				}
+				break;
+			case 5: switch (hdr_subtype) {
+					case 0: /* TopoScopeBcast-SH */
+						hdr_size = 0;
+						break;
+					case 1: /* TopoScopeBcast-MH */
+						hdr_size = 68 - 36;
+						break;
+				}
+				break;
+			case 6: switch (hdr_subtype) {
+					case 0: /* LocService-Request */
+						break;
+					case 1: /* LocService-Reply */
+						break;
+				}
+				break;
+		}
+
+		/* Skip Extended headers */
+		if (hdr_size >= 0) {
+			length -= hdr_size;
+			bp += hdr_size;
+			switch (next_hdr) {
+				case 0: /* Any */
+					break;
+				case 1:
+				case 2: /* BTP A/B */
+					print_btp(bp);
+					length -= 4;
+					bp += 4;
+					print_btp_body(bp, length);
+					break;
+				case 3: /* IPv6 */
+					break;
+			}
+		}
+	} else {
+		printf("Malformed (small) ");
+	}
+
+	/* Print user data part */
+	if (ndo->ndo_vflag)
+		default_print(bp, length);
+}
+
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 8
+ * End:
+ */
diff --git a/print-gre.c b/print-gre.c
index d739356..b4ad09a 100644
--- a/print-gre.c
+++ b/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
@@ -65,7 +65,7 @@
 #define	GRE_RECRS	0x0700		/* recursion count */
 #define	GRE_AP		0x0080		/* acknowledgment# present */
 
-struct tok gre_flag_values[] = {
+static const struct tok gre_flag_values[] = {
     { GRE_CP, "checksum present"},
     { GRE_RP, "routing present"}, 
     { GRE_KP, "key present"}, 
@@ -210,7 +210,7 @@
 		break;
 #ifdef INET6
 	case ETHERTYPE_IPV6:
-		ip6_print(bp, len);
+		ip6_print(gndo, bp, len);
 		break;
 #endif
 	case ETHERTYPE_MPLS:
@@ -225,6 +225,9 @@
 	case ETHERTYPE_GRE_ISO:
 		isoclns_print(bp, len, len);
 		break;
+	case ETHERTYPE_TEB:
+		ether_print(gndo, bp, len, len, NULL, NULL);
+		break;
 	default:
 		printf("gre-proto-0x%x", prot);
 	}
diff --git a/print-hsrp.c b/print-hsrp.c
index 1d22247..9f0f40c 100644
--- a/print-hsrp.c
+++ b/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
@@ -53,7 +53,7 @@
 };
 
 /* HSRP states and associated names. */
-static struct tok states[] = {
+static const struct tok states[] = {
 	{  0, "initial" },
 	{  1, "learn" },
 	{  2, "listen" },
diff --git a/print-icmp.c b/print-icmp.c
index e9e8459..9892594 100644
--- a/print-icmp.c
+++ b/print-icmp.c
@@ -21,7 +21,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
@@ -194,7 +194,7 @@
 #endif
 
 /* Most of the icmp types */
-static struct tok icmp2str[] = {
+static const struct tok icmp2str[] = {
 	{ ICMP_ECHOREPLY,		"echo reply" },
 	{ ICMP_SOURCEQUENCH,		"source quench" },
 	{ ICMP_ECHO,			"echo request" },
@@ -208,7 +208,7 @@
 };
 
 /* Formats for most of the ICMP_UNREACH codes */
-static struct tok unreach2str[] = {
+static const struct tok unreach2str[] = {
 	{ ICMP_UNREACH_NET,		"net %s unreachable" },
 	{ ICMP_UNREACH_HOST,		"host %s unreachable" },
 	{ ICMP_UNREACH_SRCFAIL,
@@ -235,7 +235,7 @@
 };
 
 /* Formats for the ICMP_REDIRECT codes */
-static struct tok type2str[] = {
+static const struct tok type2str[] = {
 	{ ICMP_REDIRECT_NET,		"redirect %s to net %s" },
 	{ ICMP_REDIRECT_HOST,		"redirect %s to host %s" },
 	{ ICMP_REDIRECT_TOSNET,		"redirect-tos %s to net %s" },
@@ -346,6 +346,7 @@
 	const struct icmp_mpls_ext_object_header_t *icmp_mpls_ext_object_header;
 	u_int hlen, dport, mtu, obj_tlen, obj_class_num, obj_ctype;
 	char buf[MAXHOSTNAMELEN + 100];
+	struct cksum_vec vec[1];
 
 	dp = (struct icmp *)bp;
         ext_dp = (struct icmp_ext_t *)bp;
@@ -412,7 +413,7 @@
 		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),
@@ -560,8 +561,11 @@
 	(void)printf("ICMP %s, length %u", str, plen);
 	if (vflag && !fragmented) { /* don't attempt checksumming if this is a frag */
 		u_int16_t sum, icmp_sum;
+		struct cksum_vec vec[1];
 		if (TTEST2(*bp, plen)) {
-			sum = in_cksum((u_short*)dp, plen, 0);
+			vec[0].ptr = (const u_int8_t *)(void *)dp;
+			vec[0].len = plen;
+			sum = in_cksum(vec, 1);
 			if (sum != 0) {
 				icmp_sum = EXTRACT_16BITS(&dp->icmp_cksum);
 				(void)printf(" (wrong icmp cksum %x (->%x)!)",
@@ -598,10 +602,12 @@
              * to check if an extension header is present. This is expedient,
              * however not all implementations set the length field proper.
              */
-            if (!ext_dp->icmp_length &&
-                in_cksum((const u_short *)&ext_dp->icmp_ext_version_res,
-                         plen - ICMP_EXTD_MINLEN, 0)) {
-                return;
+            if (!ext_dp->icmp_length) {
+                vec[0].ptr = (const u_int8_t *)(void *)&ext_dp->icmp_ext_version_res;
+                vec[0].len = plen - ICMP_EXTD_MINLEN;
+                if (in_cksum(vec, 1)) {
+                    return;
+                }
             }
 
             printf("\n\tMPLS extension v%u",
@@ -617,10 +623,11 @@
             }
 
             hlen = plen - ICMP_EXTD_MINLEN;
+            vec[0].ptr = (const u_int8_t *)(void *)&ext_dp->icmp_ext_version_res;
+            vec[0].len = hlen;
             printf(", checksum 0x%04x (%scorrect), length %u",
                    EXTRACT_16BITS(ext_dp->icmp_ext_checksum),
-                   in_cksum((const u_short *)&ext_dp->icmp_ext_version_res,
-                            plen - ICMP_EXTD_MINLEN, 0) ? "in" : "",
+                   in_cksum(vec, 1) ? "in" : "",
                    hlen);
 
             hlen -= 4; /* subtract common header size */
diff --git a/print-icmp6.c b/print-icmp6.c
index c503924..811e5a0 100644
--- a/print-icmp6.c
+++ b/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.86 2008-02-05 19:36:13 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -62,7 +62,10 @@
 #define abs(a)	((0 < (a)) ? (a) : -(a))
 #endif
 
-static struct tok icmp6_type_values[] = {
+/* inline the various RPL definitions */
+#define ND_RPL_MESSAGE 0x9B
+
+static const struct tok icmp6_type_values[] = {
     { ICMP6_DST_UNREACH, "destination unreachable"},
     { ICMP6_PACKET_TOO_BIG, "packet too big"},
     { ICMP6_TIME_EXCEEDED, "time exceeded in-transit"},
@@ -91,10 +94,11 @@
     { ICMP6_NI_REPLY, "node information reply"},
     { MLD6_MTRACE, "mtrace message"},
     { MLD6_MTRACE_RESP, "mtrace response"},
+    { ND_RPL_MESSAGE,   "RPL"},
     { 0,	NULL }
 };
 
-static struct tok icmp6_dst_unreach_code_values[] = {
+static const struct tok icmp6_dst_unreach_code_values[] = {
     { ICMP6_DST_UNREACH_NOROUTE, "unreachable route" },
     { ICMP6_DST_UNREACH_ADMIN, " unreachable prohibited"},
     { ICMP6_DST_UNREACH_BEYONDSCOPE, "beyond scope"},
@@ -103,21 +107,21 @@
     { 0,	NULL }
 };
 
-static struct tok icmp6_opt_pi_flag_values[] = {
+static const struct tok icmp6_opt_pi_flag_values[] = {
     { ND_OPT_PI_FLAG_ONLINK, "onlink" },
     { ND_OPT_PI_FLAG_AUTO, "auto" },
     { ND_OPT_PI_FLAG_ROUTER, "router" },
     { 0,	NULL }
 };
 
-static struct tok icmp6_opt_ra_flag_values[] = {
+static const struct tok icmp6_opt_ra_flag_values[] = {
     { ND_RA_FLAG_MANAGED, "managed" },
     { ND_RA_FLAG_OTHER, "other stateful"},
     { ND_RA_FLAG_HOME_AGENT, "home agent"},
     { 0,	NULL }
 };
 
-static struct tok icmp6_nd_na_flag_values[] = {
+static const struct tok icmp6_nd_na_flag_values[] = {
     { ND_NA_FLAG_ROUTER, "router" },
     { ND_NA_FLAG_SOLICITED, "solicited" },
     { ND_NA_FLAG_OVERRIDE, "override" },
@@ -125,12 +129,14 @@
 };
 
 
-static struct tok icmp6_opt_values[] = {
+static const struct tok icmp6_opt_values[] = {
    { ND_OPT_SOURCE_LINKADDR, "source link-address"},
    { ND_OPT_TARGET_LINKADDR, "destination link-address"},
    { ND_OPT_PREFIX_INFORMATION, "prefix info"},
    { ND_OPT_REDIRECTED_HEADER, "redirected header"},
    { ND_OPT_MTU, "mtu"},
+   { ND_OPT_RDNSS, "rdnss"},
+   { ND_OPT_DNSSL, "dnssl"},
    { ND_OPT_ADVINTERVAL, "advertisement interval"},
    { ND_OPT_HOMEAGENT_INFO, "homeagent information"},
    { ND_OPT_ROUTE_INFO, "route info"},
@@ -138,7 +144,7 @@
 };
 
 /* mldv2 report types */
-static struct tok mldv2report2str[] = {
+static const struct tok mldv2report2str[] = {
 	{ 1,	"is_in" },
 	{ 2,	"is_ex" },
 	{ 3,	"to_in" },
@@ -169,7 +175,7 @@
 	if (v == (u_int32_t)~0UL)
 		return "infinity";
 	else {
-		snprintf(buf, sizeof(buf), "%u", v);
+		snprintf(buf, sizeof(buf), "%us", v);
 		return buf;
 	}
 }
@@ -192,48 +198,110 @@
 static int icmp6_cksum(const struct ip6_hdr *ip6, const struct icmp6_hdr *icp,
 	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_ICMPV6;
-
-	sum = 0;
-	for (i = 0; i < sizeof(phu.pa) / sizeof(phu.pa[0]); i++)
-		sum += phu.pa[i];
-
-	sp = (const u_int16_t *)icp;
-
-	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 (nextproto6_cksum(ip6, (const u_int8_t *)(void *)icp, len,
+	    IPPROTO_ICMPV6));
 }
 
+enum ND_RPL_CODE {
+        ND_RPL_DIS   =0x00,
+        ND_RPL_DIO   =0x01,
+        ND_RPL_DAO   =0x02,
+        ND_RPL_DAO_ACK=0x03,
+        ND_RPL_SDIS  =0x80,
+        ND_RPL_SDIO  =0x81,
+        ND_RPL_SDAO  =0x82,
+        ND_RPL_SDAO_ACK=0x83,
+        ND_RPL_SCC   =0x8A,
+};
+
+enum ND_RPL_DIO_FLAGS {
+        ND_RPL_DIO_GROUNDED = 0x80,
+        ND_RPL_DIO_DATRIG   = 0x40,
+        ND_RPL_DIO_DASUPPORT= 0x20,
+        ND_RPL_DIO_RES4     = 0x10,
+        ND_RPL_DIO_RES3     = 0x08,
+        ND_RPL_DIO_PRF_MASK = 0x07,  /* 3-bit preference */
+};
+
+struct nd_rpl_dio {
+        u_int8_t rpl_flags;
+        u_int8_t rpl_seq;
+        u_int8_t rpl_instanceid;
+        u_int8_t rpl_dagrank;
+        u_int8_t rpl_dagid[16];
+};
+
+static void
+rpl_print(netdissect_options *ndo,
+          const struct icmp6_hdr *hdr,
+          const u_char *bp, u_int length _U_)
+{
+        struct nd_rpl_dio *dio = (struct nd_rpl_dio *)bp;
+        int secured = hdr->icmp6_code & 0x80;
+        int basecode= hdr->icmp6_code & 0x7f;
+
+        ND_TCHECK(dio->rpl_dagid);
+
+        if(secured) {
+                ND_PRINT((ndo, ", (SEC)"));
+        } else {
+                ND_PRINT((ndo, ", (CLR)"));
+        }
+                
+        switch(basecode) {
+        case ND_RPL_DIS:
+                ND_PRINT((ndo, "DODAG Information Solicitation"));
+                if(ndo->ndo_vflag) {
+                }
+                break;
+        case ND_RPL_DIO:
+                ND_PRINT((ndo, "DODAG Information Object"));
+                if(ndo->ndo_vflag) {
+                        char dagid[65];
+                        char *d = dagid;
+                        int  i;
+                        for(i=0;i<16;i++) {
+                                if(isprint(dio->rpl_dagid[i])) {
+                                        *d++ = dio->rpl_dagid[i];
+                                } else {
+                                        int cnt=snprintf(d,4,"0x%02x",
+                                                         dio->rpl_dagid[i]);
+                                        d += cnt;
+                                }
+                        }
+                        *d++ = '\0';
+                        ND_PRINT((ndo, " [seq:%u,instance:%u,rank:%u,dagid:%s]",
+                                  dio->rpl_seq,
+                                  dio->rpl_instanceid,
+                                  dio->rpl_dagrank,
+                                  dagid));
+                }
+                break;
+        case ND_RPL_DAO:
+                ND_PRINT((ndo, "Destination Advertisement Object"));
+                if(ndo->ndo_vflag) {
+                }
+                break;
+        case ND_RPL_DAO_ACK:
+                ND_PRINT((ndo, "Destination Advertisement Object Ack"));
+                if(ndo->ndo_vflag) {
+                }
+                break;
+        default:
+                ND_PRINT((ndo, "RPL message, unknown code %u",hdr->icmp6_code));
+                break;
+        }
+	return;
+trunc:
+	ND_PRINT((ndo," [|truncated]"));
+	return;
+        
+}
+
+
 void
-icmp6_print(const u_char *bp, u_int length, const u_char *bp2, int fragmented)
+icmp6_print(netdissect_options *ndo,
+            const u_char *bp, u_int length, const u_char *bp2, int fragmented)
 {
 	const struct icmp6_hdr *dp;
 	const struct ip6_hdr *ip;
@@ -252,12 +320,15 @@
 	TCHECK(dp->icmp6_cksum);
 
 	if (vflag && !fragmented) {
-		int sum = dp->icmp6_cksum;
+		u_int16_t sum, udp_sum;
 
 		if (TTEST2(bp[0], length)) {
+			udp_sum = EXTRACT_16BITS(&dp->icmp6_cksum);
 			sum = icmp6_cksum(ip, dp, length);
 			if (sum != 0)
-				(void)printf("[bad icmp6 cksum %x!] ", sum);
+				(void)printf("[bad icmp6 cksum 0x%04x -> 0x%04x!] ",
+				    udp_sum,
+				    in_cksum_shouldbe(udp_sum, sum));
 			else
 				(void)printf("[icmp6 sum ok] ");
 		}
@@ -266,14 +337,13 @@
         printf("ICMP6, %s", tok2str(icmp6_type_values,"unknown icmp6 type (%u)",dp->icmp6_type));
 
         /* display cosmetics: print the packet length for printer that use the vflag now */
-        if (vflag && (dp->icmp6_type ==
-                      ND_ROUTER_SOLICIT ||
-                      ND_ROUTER_ADVERT ||
-                      ND_NEIGHBOR_ADVERT ||
-                      ND_NEIGHBOR_SOLICIT ||
-                      ND_REDIRECT ||
-                      ICMP6_HADISCOV_REPLY ||
-                      ICMP6_MOBILEPREFIX_ADVERT ))
+        if (vflag && (dp->icmp6_type == ND_ROUTER_SOLICIT ||
+                      dp->icmp6_type == ND_ROUTER_ADVERT ||
+                      dp->icmp6_type == ND_NEIGHBOR_ADVERT ||
+                      dp->icmp6_type == ND_NEIGHBOR_SOLICIT ||
+                      dp->icmp6_type == ND_REDIRECT ||
+                      dp->icmp6_type == ICMP6_HADISCOV_REPLY ||
+                      dp->icmp6_type == ICMP6_MOBILEPREFIX_ADVERT ))
             printf(", length %u", length);
                       
 	switch (dp->icmp6_type) {
@@ -347,7 +417,7 @@
 		TCHECK(oip->ip6_dst);
 		switch (dp->icmp6_code) {
 		case ICMP6_PARAMPROB_HEADER:
-			printf(", errorneous - octet %u", EXTRACT_32BITS(&dp->icmp6_pptr));
+			printf(", erroneous - octet %u", EXTRACT_32BITS(&dp->icmp6_pptr));
 			break;
 		case ICMP6_PARAMPROB_NEXTHEADER:
 			printf(", next header - octet %u", EXTRACT_32BITS(&dp->icmp6_pptr));
@@ -370,7 +440,7 @@
 		if (length == MLD_MINLEN) {
 			mld6_print((const u_char *)dp);
 		} else if (length >= MLDV2_MINLEN) {
-			printf("v2 ");
+			printf(" v2");
 			mldv2_query_print((const u_char *)dp, length);
 		} else {
 			printf(" unknown-version (len %u) ", length);
@@ -505,6 +575,9 @@
 					length - MPADVLEN);
 		}
 		break;
+        case ND_RPL_MESSAGE:
+                rpl_print(ndo, dp, &dp->icmp6_data8[0], length);
+                break;
 	default:
                 printf(", length %u", length);
                 if (vflag <= 1)
@@ -596,16 +669,17 @@
 icmp6_opt_print(const u_char *bp, int resid)
 {
 	const struct nd_opt_hdr *op;
-	const struct nd_opt_hdr *opl;	/* why there's no struct? */
 	const struct nd_opt_prefix_info *opp;
-	const struct icmp6_opts_redirect *opr;
 	const struct nd_opt_mtu *opm;
+	const struct nd_opt_rdnss *oprd;
+	const struct nd_opt_dnssl *opds;
 	const struct nd_opt_advinterval *opa;
 	const struct nd_opt_homeagent_info *oph;
 	const struct nd_opt_route_info *opri;
-	const u_char *cp, *ep;
+	const u_char *cp, *ep, *domp;
 	struct in6_addr in6, *in6p;
 	size_t l;
+	u_int i;
 
 #define ECHECK(var) if ((u_char *)&(var) > ep - sizeof(var)) return
 
@@ -632,28 +706,25 @@
 
 		switch (op->nd_opt_type) {
 		case ND_OPT_SOURCE_LINKADDR:
-			opl = (struct nd_opt_hdr *)op;
 			l = (op->nd_opt_len << 3) - 2;
 			print_lladdr(cp + 2, l);
 			break;
 		case ND_OPT_TARGET_LINKADDR:
-			opl = (struct nd_opt_hdr *)op;
 			l = (op->nd_opt_len << 3) - 2;
 			print_lladdr(cp + 2, l);
 			break;
 		case ND_OPT_PREFIX_INFORMATION:
 			opp = (struct nd_opt_prefix_info *)op;
 			TCHECK(opp->nd_opt_pi_prefix);
-                        printf("%s/%u%s, Flags [%s], valid time %ss",
+                        printf("%s/%u%s, Flags [%s], valid time %s",
                                ip6addr_string(&opp->nd_opt_pi_prefix),
                                opp->nd_opt_pi_prefix_len,
                                (op->nd_opt_len != 4) ? "badlen" : "",
                                bittok2str(icmp6_opt_pi_flag_values, "none", opp->nd_opt_pi_flags_reserved),
                                get_lifetime(EXTRACT_32BITS(&opp->nd_opt_pi_valid_time)));
-                        printf(", pref. time %ss", get_lifetime(EXTRACT_32BITS(&opp->nd_opt_pi_preferred_time)));
+                        printf(", pref. time %s", get_lifetime(EXTRACT_32BITS(&opp->nd_opt_pi_preferred_time)));
 			break;
 		case ND_OPT_REDIRECTED_HEADER:
-			opr = (struct icmp6_opts_redirect *)op;
                         print_unknown_data(bp,"\n\t    ",op->nd_opt_len<<3);
 			/* xxx */
 			break;
@@ -664,10 +735,33 @@
                                EXTRACT_32BITS(&opm->nd_opt_mtu_mtu),
                                (op->nd_opt_len != 1) ? "bad option length" : "" );
                         break;
+		case ND_OPT_RDNSS:
+			oprd = (struct nd_opt_rdnss *)op;
+			l = (op->nd_opt_len - 1) / 2;
+			printf(" lifetime %us,", 
+				EXTRACT_32BITS(&oprd->nd_opt_rdnss_lifetime)); 
+			for (i = 0; i < l; i++) {
+				TCHECK(oprd->nd_opt_rdnss_addr[i]);
+				printf(" addr: %s", 
+				    ip6addr_string(&oprd->nd_opt_rdnss_addr[i]));
+			}
+			break;
+		case ND_OPT_DNSSL:
+			opds = (struct nd_opt_dnssl *)op;
+			printf(" lifetime %us, domain(s):",
+				EXTRACT_32BITS(&opds->nd_opt_dnssl_lifetime));
+			domp = cp + 8; /* domain names, variable-sized, RFC1035-encoded */
+			while (domp < cp + (op->nd_opt_len << 3) && *domp != '\0')
+			{
+				printf (" ");
+				if ((domp = ns_nprint (domp, bp)) == NULL)
+					goto trunc;
+			}
+			break;
 		case ND_OPT_ADVINTERVAL:
 			opa = (struct nd_opt_advinterval *)op;
 			TCHECK(opa->nd_opt_adv_interval);
-			printf(" %us", EXTRACT_32BITS(&opa->nd_opt_adv_interval));
+			printf(" %ums", EXTRACT_32BITS(&opa->nd_opt_adv_interval));
 			break;
 		case ND_OPT_HOMEAGENT_INFO:
 			oph = (struct nd_opt_homeagent_info *)op;
@@ -753,7 +847,7 @@
     }
 
     TCHECK(icp->icmp6_data16[1]);
-    ngroups = ntohs(icp->icmp6_data16[1]);
+    ngroups = EXTRACT_16BITS(&icp->icmp6_data16[1]);
     printf(", %d group record(s)", ngroups);
     if (vflag > 0) {
 	/* Print the group records */
@@ -812,7 +906,7 @@
 	return;
     }
     TCHECK(icp->icmp6_data16[0]);
-    mrc = ntohs(icp->icmp6_data16[0]);
+    mrc = EXTRACT_16BITS(&icp->icmp6_data16[0]);
     if (mrc < 32768) {
 	mrt = mrc;
     } else {
@@ -841,7 +935,7 @@
     }
 
     TCHECK2(bp[26], 2);
-    nsrcs = ntohs(*(u_short *)&bp[26]);
+    nsrcs = EXTRACT_16BITS(&bp[26]);
     if (nsrcs > 0) {
 	if (len < 28 + nsrcs * sizeof(struct in6_addr))
 	    printf(" [invalid number of sources]");
@@ -863,7 +957,7 @@
     return;
 }
 
-void
+static void
 dnsname_print(const u_char *cp, const u_char *ep)
 {
 	int i;
@@ -1192,9 +1286,9 @@
 			    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/print-igmp.c b/print-igmp.c
index c310d55..bc43102 100644
--- a/print-igmp.c
+++ b/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
@@ -96,7 +96,7 @@
 #define TR_PROTO_CBT    4
 
 /* igmpv3 report types */
-static struct tok igmpv3report2str[] = {
+static const struct tok igmpv3report2str[] = {
 	{ 1,	"is_in" },
 	{ 2,	"is_ex" },
 	{ 3,	"to_in" },
@@ -227,7 +227,11 @@
     }
     if (mrc != 100) {
 	(void)printf(" [max resp time ");
-	relts_print(mrt);
+        if (mrt < 600) {
+            (void)printf("%.1fs", mrt * 0.1);
+        } else {
+            relts_print(mrt / 10);
+        }
 	(void)printf("]");
     }
     TCHECK2(bp[4], 4);
@@ -259,6 +263,8 @@
 void
 igmp_print(register const u_char *bp, register u_int len)
 {
+    struct cksum_vec vec[1];
+
     if (qflag) {
         (void)printf("igmp");
         return;
@@ -327,7 +333,9 @@
 
     if (vflag && TTEST2(bp[0], len)) {
         /* Check the IGMP checksum */
-        if (in_cksum((const u_short*)bp, len, 0))
+        vec[0].ptr = bp;
+        vec[0].len = len;
+        if (in_cksum(vec, 1))
             printf(" bad igmp cksum %x!", EXTRACT_16BITS(&bp[2]));
     }
     return;
diff --git a/print-igrp.c b/print-igrp.c
index 898471d..90694b3 100644
--- a/print-igrp.c
+++ b/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
@@ -70,7 +70,7 @@
 	    mtu, igr->igr_hct);
 }
 
-static struct tok op2str[] = {
+static const struct tok op2str[] = {
 	{ IGRP_UPDATE,		"update" },
 	{ IGRP_REQUEST,		"request" },
 	{ 0,			NULL }
diff --git a/print-ip.c b/print-ip.c
index 07238f5..c0fc56b 100644
--- a/print-ip.c
+++ b/print-ip.c
@@ -21,7 +21,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
@@ -41,7 +41,7 @@
 #include "ip.h"
 #include "ipproto.h"
 
-struct tok ip_option_values[] = {
+static const struct tok ip_option_values[] = {
     { IPOPT_EOL, "EOL" },
     { IPOPT_NOP, "NOP" },
     { IPOPT_TS, "timestamp" },
@@ -87,7 +87,7 @@
  * This is used for UDP and TCP pseudo-header in the checksum
  * calculation.
  */
-u_int32_t
+static u_int32_t
 ip_finddst(const struct ip *ip)
 {
 	int length;
@@ -120,15 +120,48 @@
 		case IPOPT_LSRR:
 			if (len < 7)
 				break;
-			memcpy(&retval, cp + len - 4, 4);
+			UNALIGNED_MEMCPY(&retval, cp + len - 4, 4);
 			return retval;
 		}
 	}
 trunc:
-	memcpy(&retval, &ip->ip_dst.s_addr, sizeof(u_int32_t));
+	UNALIGNED_MEMCPY(&retval, &ip->ip_dst.s_addr, sizeof(u_int32_t));
 	return retval;
 }
 
+/*
+ * Compute a V4-style checksum by building a pseudoheader.
+ */
+int
+nextproto4_cksum(const struct ip *ip, const u_int8_t *data,
+		 u_int len, u_int next_proto)
+{
+	struct phdr {
+		u_int32_t src;
+		u_int32_t dst;
+		u_char mbz;
+		u_char proto;
+		u_int16_t len;
+	} ph;
+	struct cksum_vec vec[2];
+
+	/* pseudo-header.. */
+	ph.len = htons((u_int16_t)len);
+	ph.mbz = 0;
+	ph.proto = next_proto;
+	UNALIGNED_MEMCPY(&ph.src, &ip->ip_src.s_addr, sizeof(u_int32_t));
+	if (IP_HL(ip) == 5)
+		UNALIGNED_MEMCPY(&ph.dst, &ip->ip_dst.s_addr, sizeof(u_int32_t));
+	else
+		ph.dst = ip_finddst(ip);
+
+	vec[0].ptr = (const u_int8_t *)(void *)&ph;
+	vec[0].len = sizeof(ph);
+	vec[1].ptr = data;
+	vec[1].len = len;
+	return (in_cksum(vec, 2));
+}
+
 static void
 ip_printts(register const u_char *cp, u_int length)
 {
@@ -268,95 +301,9 @@
 	printf("[|ip]");
 }
 
-/*
- * compute an IP header checksum.
- * don't modifiy the packet.
- */
-u_short
-in_cksum(const u_short *addr, register u_int len, int csum)
-{
-	int nleft = len;
-	const u_short *w = addr;
-	u_short answer;
-	int sum = csum;
-
-	/*
-	 *  Our algorithm is simple, using a 32 bit accumulator (sum),
-	 *  we add sequential 16 bit words to it, and at the end, fold
-	 *  back all the carry bits from the top 16 bits into the lower
-	 *  16 bits.
-	 */
-	while (nleft > 1)  {
-		sum += *w++;
-		nleft -= 2;
-	}
-	if (nleft == 1)
-		sum += htons(*(u_char *)w<<8);
-
-	/*
-	 * add back carry outs from top 16 bits to low 16 bits
-	 */
-	sum = (sum >> 16) + (sum & 0xffff);	/* add hi 16 to low 16 */
-	sum += (sum >> 16);			/* add carry */
-	answer = ~sum;				/* truncate to 16 bits */
-	return (answer);
-}
-
-/*
- * Given the host-byte-order value of the checksum field in a packet
- * header, and the network-byte-order computed checksum of the data
- * that the checksum covers (including the checksum itself), compute
- * what the checksum field *should* have been.
- */
-u_int16_t
-in_cksum_shouldbe(u_int16_t sum, u_int16_t computed_sum)
-{
-	u_int32_t shouldbe;
-
-	/*
-	 * The value that should have gone into the checksum field
-	 * is the negative of the value gotten by summing up everything
-	 * *but* the checksum field.
-	 *
-	 * We can compute that by subtracting the value of the checksum
-	 * field from the sum of all the data in the packet, and then
-	 * computing the negative of that value.
-	 *
-	 * "sum" is the value of the checksum field, and "computed_sum"
-	 * is the negative of the sum of all the data in the packets,
-	 * so that's -(-computed_sum - sum), or (sum + computed_sum).
-	 *
-	 * All the arithmetic in question is one's complement, so the
-	 * addition must include an end-around carry; we do this by
-	 * doing the arithmetic in 32 bits (with no sign-extension),
-	 * and then adding the upper 16 bits of the sum, which contain
-	 * the carry, to the lower 16 bits of the sum, and then do it
-	 * again in case *that* sum produced a carry.
-	 *
-	 * As RFC 1071 notes, the checksum can be computed without
-	 * byte-swapping the 16-bit words; summing 16-bit words
-	 * on a big-endian machine gives a big-endian checksum, which
-	 * can be directly stuffed into the big-endian checksum fields
-	 * in protocol headers, and summing words on a little-endian
-	 * machine gives a little-endian checksum, which must be
-	 * byte-swapped before being stuffed into a big-endian checksum
-	 * field.
-	 *
-	 * "computed_sum" is a network-byte-order value, so we must put
-	 * it in host byte order before subtracting it from the
-	 * host-byte-order value from the header; the adjusted checksum
-	 * will be in host byte order, which is what we'll return.
-	 */
-	shouldbe = sum;
-	shouldbe += ntohs(computed_sum);
-	shouldbe = (shouldbe & 0xFFFF) + (shouldbe >> 16);
-	shouldbe = (shouldbe & 0xFFFF) + (shouldbe >> 16);
-	return shouldbe;
-}
-
 #define IP_RES 0x8000
 
-static struct tok ip_frag_values[] = {
+static const struct tok ip_frag_values[] = {
         { IP_MF,        "+" },
         { IP_DF,        "DF" },
 	{ IP_RES,       "rsvd" }, /* The RFC3514 evil ;-) bit */
@@ -376,6 +323,7 @@
 	       struct ip_print_demux_state *ipds)
 {
 	struct protoent *proto;
+	struct cksum_vec vec[1];
 
 again:
 	switch (ipds->nh) {
@@ -402,7 +350,7 @@
 		ipds->nh = enh & 0xff;
 		goto again;
 	}
-	
+
 	case IPPROTO_IPCOMP:
 	{
 		int enh;
@@ -422,25 +370,25 @@
 	case IPPROTO_DCCP:
 		dccp_print(ipds->cp, (const u_char *)ipds->ip, ipds->len);
 		break;
-		
+
 	case IPPROTO_TCP:
 		/* pass on the MF bit plus the offset to detect fragments */
 		tcp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip,
 			  ipds->off & (IP_MF|IP_OFFMASK));
 		break;
-		
+
 	case IPPROTO_UDP:
 		/* pass on the MF bit plus the offset to detect fragments */
 		udp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip,
 			  ipds->off & (IP_MF|IP_OFFMASK));
 		break;
-		
+
 	case IPPROTO_ICMP:
 		/* pass on the MF bit plus the offset to detect fragments */
 		icmp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip,
 			   ipds->off & (IP_MF|IP_OFFMASK));
 		break;
-		
+
 	case IPPROTO_PIGP:
 		/*
 		 * XXX - the current IANA protocol number assignments
@@ -457,11 +405,11 @@
 		 */
 		igrp_print(ipds->cp, ipds->len, (const u_char *)ipds->ip);
 		break;
-		
+
 	case IPPROTO_EIGRP:
 		eigrp_print(ipds->cp, ipds->len);
 		break;
-		
+
 	case IPPROTO_ND:
 		ND_PRINT((ndo, " nd %d", ipds->len));
 		break;
@@ -480,17 +428,17 @@
 
 	case IPPROTO_IPV4:
 		/* DVMRP multicast tunnel (ip-in-ip encapsulation) */
-		ip_print(gndo, ipds->cp, ipds->len);
+		ip_print(ndo, ipds->cp, ipds->len);
 		if (! vflag) {
 			ND_PRINT((ndo, " (ipip-proto-4)"));
 			return;
 		}
 		break;
-		
+
 #ifdef INET6
 	case IPPROTO_IPV6:
 		/* ip6-in-ip encapsulation */
-		ip6_print(ipds->cp, ipds->len);
+		ip6_print(ndo, ipds->cp, ipds->len);
 		break;
 #endif /*INET6*/
 
@@ -508,11 +456,25 @@
 		break;
 
 	case IPPROTO_PIM:
-		pim_print(ipds->cp,  ipds->len);
+		vec[0].ptr = ipds->cp;
+		vec[0].len = ipds->len;
+		pim_print(ipds->cp, ipds->len, in_cksum(vec, 1));
 		break;
 
 	case IPPROTO_VRRP:
-		vrrp_print(ipds->cp, ipds->len, ipds->ip->ip_ttl);
+		if (packettype == PT_CARP) {
+			if (vflag)
+				(void)printf("carp %s > %s: ",
+					     ipaddr_string(&ipds->ip->ip_src),
+					     ipaddr_string(&ipds->ip->ip_dst));
+			carp_print(ipds->cp, ipds->len, ipds->ip->ip_ttl);
+		} else {
+			if (vflag)
+				(void)printf("vrrp %s > %s: ",
+					     ipaddr_string(&ipds->ip->ip_src),
+					     ipaddr_string(&ipds->ip->ip_dst));
+			vrrp_print(ipds->cp, ipds->len, ipds->ip->ip_ttl);
+		}
 		break;
 
 	case IPPROTO_PGM:
@@ -520,7 +482,7 @@
 		break;
 
 	default:
-		if ((proto = getprotobynumber(ipds->nh)) != NULL)
+		if (ndo->ndo_nflag==0 && (proto = getprotobynumber(ipds->nh)) != NULL)
 			ND_PRINT((ndo, " %s", proto->p_name));
 		else
 			ND_PRINT((ndo, " ip-proto-%d", ipds->nh));
@@ -528,7 +490,7 @@
 		break;
 	}
 }
-	       
+
 void
 ip_print_inner(netdissect_options *ndo,
 	       const u_char *bp,
@@ -560,6 +522,7 @@
 	struct ip_print_demux_state *ipds=&ipd;
 	const u_char *ipend;
 	u_int hlen;
+	struct cksum_vec vec[1];
 	u_int16_t sum, ip_sum;
 	struct protoent *proto;
 
@@ -572,7 +535,7 @@
         else if (!eflag)
 	    printf("IP ");
 
-	if ((u_char *)(ipds->ip + 1) > snapend) {
+	if ((u_char *)(ipds->ip + 1) > ndo->ndo_snapend) {
 		printf("[|ip]");
 		return;
 	}
@@ -610,8 +573,8 @@
 	 * Cut off the snapshot length to the end of the IP payload.
 	 */
 	ipend = bp + ipds->len;
-	if (ipend < snapend)
-		snapend = ipend;
+	if (ipend < ndo->ndo_snapend)
+		ndo->ndo_snapend = ipend;
 
 	ipds->len -= hlen;
 
@@ -634,7 +597,7 @@
             }
 
             if (ipds->ip->ip_ttl >= 1)
-                (void)printf(", ttl %u", ipds->ip->ip_ttl);    
+                (void)printf(", ttl %u", ipds->ip->ip_ttl);
 
 	    /*
 	     * for the firewall guys, print id, offset.
@@ -657,8 +620,10 @@
                 printf(")");
             }
 
-	    if ((u_char *)ipds->ip + hlen <= snapend) {
-	        sum = in_cksum((const u_short *)ipds->ip, hlen, 0);
+	    if (!Kflag && (u_char *)ipds->ip + hlen <= ndo->ndo_snapend) {
+	        vec[0].ptr = (const u_int8_t *)(void *)ipds->ip;
+	        vec[0].len = hlen;
+	        sum = in_cksum(vec, 1);
 		if (sum != 0) {
 		    ip_sum = EXTRACT_16BITS(&ipds->ip->ip_sum);
 		    (void)printf(", bad cksum %x (->%x)!", ip_sum,
@@ -666,7 +631,7 @@
 		}
 	    }
 
-            printf(") ");
+            printf(")\n    ");
 	}
 
 	/*
@@ -696,32 +661,31 @@
 	    if (ipds->off & 0x1fff) {
 	        (void)printf("%s > %s:", ipaddr_string(&ipds->ip->ip_src),
 			     ipaddr_string(&ipds->ip->ip_dst));
-		if ((proto = getprotobynumber(ipds->ip->ip_p)) != NULL)
+		if (!ndo->ndo_nflag && (proto = getprotobynumber(ipds->ip->ip_p)) != NULL)
 		    (void)printf(" %s", proto->p_name);
 		else
 		    (void)printf(" ip-proto-%d", ipds->ip->ip_p);
-	    } 
+	    }
 	}
 }
 
 void
 ipN_print(register const u_char *bp, register u_int length)
 {
-	struct ip *ip, hdr;
+	struct ip hdr;
 
-	ip = (struct ip *)bp;
 	if (length < 4) {
 		(void)printf("truncated-ip %d", length);
 		return;
 	}
-	memcpy (&hdr, (char *)ip, 4);
+	memcpy (&hdr, bp, 4);
 	switch (IP_V(&hdr)) {
 	case 4:
 		ip_print (gndo, bp, length);
 		return;
 #ifdef INET6
 	case 6:
-		ip6_print (bp, length);
+		ip6_print (gndo, bp, length);
 		return;
 #endif
 	default:
diff --git a/print-ip6.c b/print-ip6.c
index 29e5988..3e8db27 100644
--- a/print-ip6.c
+++ b/print-ip6.c
@@ -21,7 +21,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
@@ -36,6 +36,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "netdissect.h"
 #include "interface.h"
 #include "addrtoname.h"
 #include "extract.h"
@@ -44,10 +45,41 @@
 #include "ipproto.h"
 
 /*
+ * Compute a V6-style checksum by building a pseudoheader.
+ */
+int
+nextproto6_cksum(const struct ip6_hdr *ip6, const u_int8_t *data,
+		 u_int len, u_int next_proto)
+{
+        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;
+        struct cksum_vec vec[2];
+
+        /* pseudo-header */
+        memset(&ph, 0, sizeof(ph));
+        UNALIGNED_MEMCPY(&ph.ph_src, &ip6->ip6_src, sizeof (struct in6_addr));
+        UNALIGNED_MEMCPY(&ph.ph_dst, &ip6->ip6_dst, sizeof (struct in6_addr));
+        ph.ph_len = htonl(len);
+        ph.ph_nxt = next_proto;
+
+        vec[0].ptr = (const u_int8_t *)(void *)&ph;
+        vec[0].len = sizeof(ph);
+        vec[1].ptr = data;
+        vec[1].len = len;
+
+        return in_cksum(vec, 2);
+}
+
+/*
  * print an IP6 datagram.
  */
 void
-ip6_print(register const u_char *bp, register u_int length)
+ip6_print(netdissect_options *ndo, const u_char *bp, u_int length)
 {
 	register const struct ip6_hdr *ip6;
 	register int advance;
@@ -63,62 +95,62 @@
 
 	TCHECK(*ip6);
 	if (length < sizeof (struct ip6_hdr)) {
-		(void)printf("truncated-ip6 %u", length);
+		(void)ND_PRINT((ndo, "truncated-ip6 %u", length));
 		return;
 	}
 
-        if (!eflag)
-            printf("IP6 ");
+        if (!ndo->ndo_eflag)
+            ND_PRINT((ndo, "IP6 "));
 
 	payload_len = EXTRACT_16BITS(&ip6->ip6_plen);
 	len = payload_len + sizeof(struct ip6_hdr);
 	if (length < len)
-		(void)printf("truncated-ip6 - %u bytes missing!",
-			len - length);
+		(void)ND_PRINT((ndo, "truncated-ip6 - %u bytes missing!",
+			len - length));
 
-        if (vflag) {
+        if (ndo->ndo_vflag) {
             flow = EXTRACT_32BITS(&ip6->ip6_flow);
-            printf("(");
+            ND_PRINT((ndo, "("));
 #if 0
             /* rfc1883 */
             if (flow & 0x0f000000)
-		(void)printf("pri 0x%02x, ", (flow & 0x0f000000) >> 24);
+		(void)ND_PRINT((ndo, "pri 0x%02x, ", (flow & 0x0f000000) >> 24));
             if (flow & 0x00ffffff)
-		(void)printf("flowlabel 0x%06x, ", flow & 0x00ffffff);
+		(void)ND_PRINT((ndo, "flowlabel 0x%06x, ", flow & 0x00ffffff));
 #else
             /* RFC 2460 */
             if (flow & 0x0ff00000)
-		(void)printf("class 0x%02x, ", (flow & 0x0ff00000) >> 20);
+		(void)ND_PRINT((ndo, "class 0x%02x, ", (flow & 0x0ff00000) >> 20));
             if (flow & 0x000fffff)
-		(void)printf("flowlabel 0x%05x, ", flow & 0x000fffff);
+		(void)ND_PRINT((ndo, "flowlabel 0x%05x, ", flow & 0x000fffff));
 #endif
 
-            (void)printf("hlim %u, next-header %s (%u) payload length: %u) ",
+            (void)ND_PRINT((ndo, "hlim %u, next-header %s (%u) payload length: %u) ",
                          ip6->ip6_hlim,
                          tok2str(ipproto_values,"unknown",ip6->ip6_nxt),
                          ip6->ip6_nxt,
-                         payload_len);
+                         payload_len));
         }
 
 	/*
 	 * Cut off the snapshot length to the end of the IP payload.
 	 */
 	ipend = bp + len;
-	if (ipend < snapend)
-		snapend = ipend;
+	if (ipend < ndo->ndo_snapend)
+		ndo->ndo_snapend = ipend;
 
 	cp = (const u_char *)ip6;
 	advance = sizeof(struct ip6_hdr);
 	nh = ip6->ip6_nxt;
-	while (cp < snapend && advance > 0) {
+	while (cp < ndo->ndo_snapend && advance > 0) {
 		cp += advance;
 		len -= advance;
 
 		if (cp == (const u_char *)(ip6 + 1) &&
 		    nh != IPPROTO_TCP && nh != IPPROTO_UDP &&
 		    nh != IPPROTO_DCCP && nh != IPPROTO_SCTP) {
-			(void)printf("%s > %s: ", ip6addr_string(&ip6->ip6_src),
-				     ip6addr_string(&ip6->ip6_dst));
+			(void)ND_PRINT((ndo, "%s > %s: ", ip6addr_string(&ip6->ip6_src),
+				     ip6addr_string(&ip6->ip6_dst)));
 		}
 
 		switch (nh) {
@@ -132,7 +164,7 @@
 			break;
 		case IPPROTO_FRAGMENT:
 			advance = frag6_print(cp, (const u_char *)ip6);
-			if (snapend <= cp + advance)
+			if (ndo->ndo_snapend <= cp + advance)
 				return;
 			nh = *cp;
 			fragmented = 1;
@@ -170,7 +202,7 @@
 			udp_print(cp, len, (const u_char *)ip6, fragmented);
 			return;
 		case IPPROTO_ICMPV6:
-			icmp6_print(cp, len, (const u_char *)ip6, fragmented);
+			icmp6_print(ndo, cp, len, (const u_char *)ip6, fragmented);
 			return;
 		case IPPROTO_AH:
 			advance = ah_print(cp);
@@ -179,7 +211,7 @@
 		case IPPROTO_ESP:
 		    {
 			int enh, padlen;
-			advance = esp_print(gndo, cp, len, (const u_char *)ip6, &enh, &padlen);
+			advance = esp_print(ndo, cp, len, (const u_char *)ip6, &enh, &padlen);
 			nh = enh & 0xff;
 			len -= padlen;
 			break;
@@ -193,7 +225,8 @@
 		    }
 
 		case IPPROTO_PIM:
-			pim_print(cp, len);
+			pim_print(cp, len, nextproto6_cksum(ip6, cp, len,
+							    IPPROTO_PIM));
 			return;
 
 		case IPPROTO_OSPF:
@@ -201,11 +234,11 @@
 			return;
 
 		case IPPROTO_IPV6:
-			ip6_print(cp, len);
+			ip6_print(ndo, cp, len);
 			return;
 
 		case IPPROTO_IPV4:
-		        ip_print(gndo, cp, len);
+		        ip_print(ndo, cp, len);
 			return;
 
                 case IPPROTO_PGM:
@@ -221,18 +254,18 @@
 			return;
 
 		case IPPROTO_NONE:
-			(void)printf("no next header");
+			(void)ND_PRINT((ndo, "no next header"));
 			return;
 
 		default:
-			(void)printf("ip-proto-%d %d", nh, len);
+			(void)ND_PRINT((ndo, "ip-proto-%d %d", nh, len));
 			return;
 		}
 	}
 
 	return;
 trunc:
-	(void)printf("[|ip6]");
+	(void)ND_PRINT((ndo, "[|ip6]"));
 }
 
 #endif /* INET6 */
diff --git a/print-ip6opts.c b/print-ip6opts.c
index 82163a2..2121b46 100644
--- a/print-ip6opts.c
+++ b/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
@@ -141,6 +141,8 @@
     int i;
     int optlen = 0;
 
+    if (len == 0)
+        return;
     for (i = 0; i < len; i += optlen) {
 	if (bp[i] == IP6OPT_PAD1)
 	    optlen = 1;
@@ -271,10 +273,11 @@
 		printf("(type %d: trunc)", bp[i]);
 		goto trunc;
 	    }
-	    printf("(opt_type 0x%02x: len=%d) ", bp[i], bp[i + 1]);
+	    printf("(opt_type 0x%02x: len=%d)", bp[i], bp[i + 1]);
 	    break;
 	}
     }
+    printf(" ");
 
 #if 0
 end:
diff --git a/print-ipcomp.c b/print-ipcomp.c
index 099e5ad..89130a3 100644
--- a/print-ipcomp.c
+++ b/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/print-ipfc.c b/print-ipfc.c
index 6712e5f..c980765 100644
--- a/print-ipfc.c
+++ b/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/print-ipnet.c b/print-ipnet.c
new file mode 100644
index 0000000..e8ed94d
--- /dev/null
+++ b/print-ipnet.c
@@ -0,0 +1,109 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <pcap.h>
+
+#include "netdissect.h"
+#include "interface.h"
+#include "addrtoname.h"
+#include "ipnet.h"
+
+#ifdef DLT_IPNET
+
+static const struct tok ipnet_values[] = {
+	{ IPH_AF_INET,		"IPv4" },
+	{ IPH_AF_INET6,		"IPv6" },
+	{ 0,			NULL }
+};
+
+static inline void
+ipnet_hdr_print(struct netdissect_options *ndo, const u_char *bp, u_int length)
+{
+	const ipnet_hdr_t *hdr;
+	hdr = (const ipnet_hdr_t *)bp;
+
+	ND_PRINT((ndo, "%d > %d", hdr->iph_zsrc, hdr->iph_zdst));
+
+	if (!ndo->ndo_qflag) {
+		ND_PRINT((ndo,", family %s (%d)",
+                          tok2str(ipnet_values, "Unknown",
+                                  hdr->iph_family),
+                          hdr->iph_family));
+        } else {
+		ND_PRINT((ndo,", %s",
+                          tok2str(ipnet_values,
+                                  "Unknown Ethertype (0x%04x)",
+                                  hdr->iph_family)));
+        }
+
+	ND_PRINT((ndo, ", length %u: ", length));
+}
+
+static void
+ipnet_print(struct netdissect_options *ndo, const u_char *p, u_int length, u_int caplen)
+{
+	ipnet_hdr_t *hdr;
+
+	if (caplen < sizeof(ipnet_hdr_t)) {
+		ND_PRINT((ndo, "[|ipnet]"));
+		return;
+	}
+
+	if (ndo->ndo_eflag)
+		ipnet_hdr_print(ndo, p, length);
+
+	length -= sizeof(ipnet_hdr_t);
+	caplen -= sizeof(ipnet_hdr_t);
+	hdr = (ipnet_hdr_t *)p;
+	p += sizeof(ipnet_hdr_t);
+
+	switch (hdr->iph_family) {
+
+	case IPH_AF_INET:
+	        ip_print(ndo, p, length);
+		break;
+
+#ifdef INET6
+	case IPH_AF_INET6:
+		ip6_print(ndo, p, length);
+		break;
+#endif /*INET6*/
+
+	default:
+		if (!ndo->ndo_eflag)
+			ipnet_hdr_print(ndo, (u_char *)hdr,
+					length + sizeof(ipnet_hdr_t));
+
+		if (!ndo->ndo_suppress_default_print)
+			ndo->ndo_default_print(ndo, p, caplen);
+		break;
+	}
+}
+
+/*
+ * This is the top level routine of the printer.  'p' points
+ * to the ether 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
+ipnet_if_print(struct netdissect_options *ndo,
+               const struct pcap_pkthdr *h, const u_char *p)
+{
+	ipnet_print(ndo, p, h->len, h->caplen);
+
+	return (sizeof(ipnet_hdr_t));
+}
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 8
+ * End:
+ */
+
+#endif /* DLT_IPNET */
diff --git a/print-ipx.c b/print-ipx.c
index 5309aa4..c9bde23 100644
--- a/print-ipx.c
+++ b/print-ipx.c
@@ -24,7 +24,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
@@ -196,7 +196,7 @@
 	(void)printf("ipx-rip-req");
 	if (length > 0) {
 	    TCHECK(ipx[3]);
-	    (void)printf(" %u/%d.%d", EXTRACT_32BITS(&ipx[0]),
+	    (void)printf(" %08x/%d.%d", EXTRACT_32BITS(&ipx[0]),
 			 EXTRACT_16BITS(&ipx[2]), EXTRACT_16BITS(&ipx[3]));
 	}
 	break;
@@ -204,7 +204,7 @@
 	(void)printf("ipx-rip-resp");
 	for (i = 0; i < 50 && length > 0; i++) {
 	    TCHECK(ipx[3]);
-	    (void)printf(" %u/%d.%d", EXTRACT_32BITS(&ipx[0]),
+	    (void)printf(" %08x/%d.%d", EXTRACT_32BITS(&ipx[0]),
 			 EXTRACT_16BITS(&ipx[2]), EXTRACT_16BITS(&ipx[3]));
 
 	    ipx += 4;
diff --git a/print-isakmp.c b/print-isakmp.c
index 4b48d32..2b352e5 100644
--- a/print-isakmp.c
+++ b/print-isakmp.c
@@ -30,13 +30,21 @@
 
 #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.61 2008-02-05 19:34:25 guy Exp $ (LBL)";
 #endif
 
+#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+/* The functions from print-esp.c used in this file are only defined when both
+ * OpenSSL and evp.h are detected. Employ the same preprocessor device here.
+ */
+#ifndef HAVE_OPENSSL_EVP_H
+#undef HAVE_LIBCRYPTO
+#endif
+
 #include <tcpdump-stdinc.h>
 
 #include <string.h>
@@ -59,38 +67,73 @@
 #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_cp);
+DECLARE_PRINTER(v2_eap);
+
+static const u_char *ikev2_e_print(netdissect_options *ndo,
+				   struct isakmp *base,
+				   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);
+
+
+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,
+				     struct isakmp *base,
+				     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;
@@ -107,36 +150,73 @@
 
 /* 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 */
+	NULL, /* ikev2_e_print,*/       /* 46 - special */
+	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 +225,13 @@
 #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)
@@ -204,13 +291,13 @@
 		sin->sin_len = sizeof(struct sockaddr_in);
 #endif
 		sin->sin_family = AF_INET;
-		memcpy(&sin->sin_addr, &ip->ip_src, sizeof(ip->ip_src));
+		UNALIGNED_MEMCPY(&sin->sin_addr, &ip->ip_src, sizeof(ip->ip_src));
 		sin = (struct sockaddr_in *)&cookiecache[ninitiator].raddr;
 #ifdef HAVE_SOCKADDR_SA_LEN
 		sin->sin_len = sizeof(struct sockaddr_in);
 #endif
 		sin->sin_family = AF_INET;
-		memcpy(&sin->sin_addr, &ip->ip_dst, sizeof(ip->ip_dst));
+		UNALIGNED_MEMCPY(&sin->sin_addr, &ip->ip_dst, sizeof(ip->ip_dst));
 		break;
 #ifdef INET6
 	case 6:
@@ -225,19 +312,19 @@
 		sin6->sin6_len = sizeof(struct sockaddr_in6);
 #endif
 		sin6->sin6_family = AF_INET6;
-		memcpy(&sin6->sin6_addr, &ip6->ip6_src, sizeof(ip6->ip6_src));
+		UNALIGNED_MEMCPY(&sin6->sin6_addr, &ip6->ip6_src, sizeof(ip6->ip6_src));
 		sin6 = (struct sockaddr_in6 *)&cookiecache[ninitiator].raddr;
 #ifdef HAVE_SOCKADDR_SA_LEN
 		sin6->sin6_len = sizeof(struct sockaddr_in6);
 #endif
 		sin6->sin6_family = AF_INET6;
-		memcpy(&sin6->sin6_addr, &ip6->ip6_dst, sizeof(ip6->ip6_dst));
+		UNALIGNED_MEMCPY(&sin6->sin6_addr, &ip6->ip6_dst, sizeof(ip6->ip6_dst));
 		break;
 #endif
 	default:
 		return;
 	}
-	memcpy(&cookiecache[ninitiator].initiator, in, sizeof(*in));
+	UNALIGNED_MEMCPY(&cookiecache[ninitiator].initiator, in, sizeof(*in));
 	ninitiator = (ninitiator + 1) % MAXINITIATORS;
 }
 
@@ -265,7 +352,7 @@
 		sin->sin_len = sizeof(struct sockaddr_in);
 #endif
 		sin->sin_family = AF_INET;
-		memcpy(&sin->sin_addr, &ip->ip_src, sizeof(ip->ip_src));
+		UNALIGNED_MEMCPY(&sin->sin_addr, &ip->ip_src, sizeof(ip->ip_src));
 		break;
 #ifdef INET6
 	case 6:
@@ -275,7 +362,7 @@
 		sin6->sin6_len = sizeof(struct sockaddr_in6);
 #endif
 		sin6->sin6_family = AF_INET6;
-		memcpy(&sin6->sin6_addr, &ip6->ip6_src, sizeof(ip6->ip6_src));
+		UNALIGNED_MEMCPY(&sin6->sin6_addr, &ip6->ip6_src, sizeof(ip6->ip6_src));
 		break;
 #endif
 	default:
@@ -321,22 +408,62 @@
 	return 0;
 }
 
-static int
-rawprint(caddr_t loc, size_t len)
+static void
+hexprint(netdissect_options *ndo, caddr_t loc, size_t len)
 {
-	static u_char *p;
+	u_char *p;
 	size_t i;
 
-	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));
+}
+
+static int
+rawprint(netdissect_options *ndo, caddr_t loc, size_t len)
+{
+	ND_TCHECK2(*loc, len);
+
+	hexprint(ndo, loc, len);
 	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,180 +471,212 @@
 };
 
 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;
 	u_int32_t t, v;
 
-	q = (u_int16_t *)p;
 	if (p[0] & 0x80)
 		totlen = 4;
 	else
-		totlen = 4 + EXTRACT_16BITS(&q[1]);
+		totlen = 4 + EXTRACT_16BITS(&p[2]);
 	if (ep < p + totlen) {
-		printf("[|attr]");
+		ND_PRINT((ndo,"[|attr]"));
 		return ep + 1;
 	}
 
-	printf("(");
-	t = EXTRACT_16BITS(&q[0]) & 0x7fff;
+	ND_PRINT((ndo,"("));
+	t = EXTRACT_16BITS(&p[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=");
-		v = EXTRACT_16BITS(&q[1]);
+		ND_PRINT((ndo,"value="));
+		v = EXTRACT_16BITS(&p[2]);
 		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)&p[2], 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(&p[2])));
+		rawprint(ndo, (caddr_t)&p[4], EXTRACT_16BITS(&p[2]));
 	}
-	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;
 	u_int32_t t;
 
-	q = (u_int16_t *)p;
 	if (p[0] & 0x80)
 		totlen = 4;
 	else
-		totlen = 4 + EXTRACT_16BITS(&q[1]);
+		totlen = 4 + EXTRACT_16BITS(&p[2]);
 	if (ep < p + totlen) {
-		printf("[|attr]");
+		ND_PRINT((ndo,"[|attr]"));
 		return ep + 1;
 	}
 
-	printf("(");
-	t = EXTRACT_16BITS(&q[0]) & 0x7fff;
-	printf("type=#%d ", t);
+	ND_PRINT((ndo,"("));
+	t = EXTRACT_16BITS(&p[0]) & 0x7fff;
+	ND_PRINT((ndo,"type=#%d ", t));
 	if (p[0] & 0x80) {
-		printf("value=");
-		t = q[1];
-		rawprint((caddr_t)&q[1], 2);
+		ND_PRINT((ndo,"value="));
+		t = p[2];
+		rawprint(ndo, (caddr_t)&p[2], 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(&p[2])));
+		rawprint(ndo, (caddr_t)&p[4], EXTRACT_16BITS(&p[2]));
 	}
-	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 u_int32_t *q;
+	const struct ikev1_pl_sa *p;
+	struct ikev1_pl_sa sa;
 	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);
-	safememcpy(&sa, ext, sizeof(sa));
+	p = (struct ikev1_pl_sa *)ext;
+	ND_TCHECK(*p);
+	UNALIGNED_MEMCPY(&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");
-	q = (u_int32_t *)&sa.sit;
-	printf(" situation=");
+	ND_PRINT((ndo," doi=ipsec"));
+	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));
-		safememcpy(&ident, ext + 1, sizeof(ident));
-		printf(" ident=%u", (u_int32_t)ntohl(ident));
+		ND_TCHECK2(*(ext + 1), sizeof(ident));
+		UNALIGNED_MEMCPY(&ident, ext + 1, sizeof(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);
-	safememcpy(&prop, ext, sizeof(prop));
-	printf(" #%d protoid=%s transform=%d",
-		prop.p_no, PROTOIDSTR(prop.prot_id), prop.num_t);
+	p = (struct ikev1_pl_p *)ext;
+	ND_TCHECK(*p);
+	UNALIGNED_MEMCPY(&prop, ext, sizeof(prop));
+	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 +690,21 @@
 	{ 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 +713,17 @@
 	{ "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 +732,21 @@
 			  "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 +762,28 @@
 };
 
 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);
-	safememcpy(&t, ext, sizeof(t));
+	p = (struct ikev1_pl_t *)ext;
+	ND_TCHECK(*p);
+	UNALIGNED_MEMCPY(&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 +810,59 @@
 	}
 
 	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);
-	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_TCHECK(*ext);
+	UNALIGNED_MEMCPY(&e, ext, sizeof(e));
+	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,11 +874,11 @@
 	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);
-	safememcpy(&id, ext, sizeof(id));
+	p = (struct ikev1_pl_id *)ext;
+	ND_TCHECK(*p);
+	UNALIGNED_MEMCPY(&id, ext, sizeof(id));
 	if (sizeof(*p) < item_len) {
 		data = (u_char *)(p + 1);
 		len = item_len - sizeof(*p);
@@ -689,16 +888,16 @@
 	}
 
 #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,44 +910,42 @@
 		struct protoent *pe;
 
 		p = (struct ipsecdoi_id *)ext;
-		TCHECK(*p);
-		safememcpy(&id, ext, sizeof(id));
-		printf(" idtype=%s", STR_OR_ID(id.type, ipsecidtypestr));
+		ND_TCHECK(*p);
+		UNALIGNED_MEMCPY(&id, ext, sizeof(id));
+		ND_PRINT((ndo," idtype=%s", STR_OR_ID(id.type, ipsecidtypestr)));
 		if (id.proto_id) {
 #ifndef WIN32
-                        // not supported on android
-			//setprotoent(1);
+			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
-                        // not supported on android
-			//endprotoent();
+			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;
@@ -758,12 +955,12 @@
 		    {
 			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;
@@ -771,22 +968,25 @@
 #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;
+			const u_char *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));
+				mask = (u_char *)(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%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", len,
+					  ip6addr_string(data),
+					  mask[0], mask[1], mask[2], mask[3],
+					  mask[4], mask[5], mask[6], mask[7],
+					  mask[8], mask[9], mask[10], mask[11],
+					  mask[12], mask[13], mask[14], mask[15]));
 			}
 			len = 0;
 			break;
@@ -794,22 +994,22 @@
 #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;
@@ -823,159 +1023,169 @@
 	    }
 	}
 	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);
-	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))
+	p = (struct ikev1_pl_cert *)ext;
+	ND_TCHECK(*p);
+	UNALIGNED_MEMCPY(&cert, ext, sizeof(cert));
+	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);
-	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))
+	p = (struct ikev1_pl_cert *)ext;
+	ND_TCHECK(*p);
+	UNALIGNED_MEMCPY(&cert, ext, sizeof(cert));
+	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_)
-{
-	struct isakmp_gen e;
-
-	printf("%s:", NPSTR(ISAKMP_NPTYPE_HASH));
-
-	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))
-			goto trunc;
-	}
-	return (u_char *)ext + ntohs(e.len);
-trunc:
-	printf(" [|%s]", NPSTR(ISAKMP_NPTYPE_HASH));
-	return NULL;
-}
-
-static const u_char *
-isakmp_sig_print(const struct isakmp_gen *ext, u_int item_len _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_SIG));
+	ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_HASH)));
 
-	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_TCHECK(*ext);
+	UNALIGNED_MEMCPY(&e, ext, sizeof(e));
+	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_HASH)));
 	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_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_NONCE));
+	ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_SIG)));
 
-	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_TCHECK(*ext);
+	UNALIGNED_MEMCPY(&e, ext, sizeof(e));
+	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_NONCE));
+	ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_SIG)));
 	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_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_pl_n *p, n;
+	struct isakmp_gen e;
+
+	ND_PRINT((ndo,"%s:", NPSTR(ISAKMP_NPTYPE_NONCE)));
+
+	ND_TCHECK(*ext);
+	UNALIGNED_MEMCPY(&e, ext, sizeof(e));
+	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:
+	ND_PRINT((ndo," [|%s]", NPSTR(ISAKMP_NPTYPE_NONCE)));
+	return NULL;
+}
+
+static const u_char *
+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 ikev1_pl_n *p, n;
 	const u_char *cp;
 	u_char *ep2;
 	u_int32_t doi;
@@ -1026,47 +1236,47 @@
 #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);
-	safememcpy(&n, ext, sizeof(n));
+	p = (struct ikev1_pl_n *)ext;
+	ND_TCHECK(*p);
+	UNALIGNED_MEMCPY(&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;
 	}
 
@@ -1074,120 +1284,849 @@
 	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",
+				  EXTRACT_32BITS(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);
-	safememcpy(&d, ext, sizeof(d));
+	p = (struct ikev1_pl_d *)ext;
+	ND_TCHECK(*p);
+	UNALIGNED_MEMCPY(&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);
-	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_TCHECK(*ext);
+	UNALIGNED_MEMCPY(&e, ext, sizeof(e));
+	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 *
+ikev2_gen_print(netdissect_options *ndo, u_char tpay,
+		const struct isakmp_gen *ext)
+{
+	struct isakmp_gen e;
+
+	ND_TCHECK(*ext);
+	UNALIGNED_MEMCPY(&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 *
-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_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);
+	UNALIGNED_MEMCPY(&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);
+	UNALIGNED_MEMCPY(&prop, ext, sizeof(prop));
+	ikev2_pay_print(ndo, NPSTR(ISAKMP_NPTYPE_P), prop.h.critical);
+
+	ND_PRINT((ndo," #%u protoid=%s transform=%d len=%u",
+		  prop.p_no,  PROTOIDSTR(prop.prot_id),
+		  prop.num_t, ntohs(prop.h.len)));
+	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, NULL, 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_length, sa_length;
+
+	ND_TCHECK(*ext1);
+	UNALIGNED_MEMCPY(&e, ext1, sizeof(e));
+	ikev2_pay_print(ndo, "sa", e.critical);
+
+	osa_length= ntohs(e.len);
+	sa_length = osa_length - 4;
+	ND_PRINT((ndo," len=%d", sa_length));
+
+	ikev2_sub_print(ndo, NULL, ISAKMP_NPTYPE_P,
+			ext1+1, ep,
+			0, 0, 0, depth);
+
+	return (u_char *)ext1 + osa_length;
+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);
+	UNALIGNED_MEMCPY(&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_)
+{
+	struct ikev2_id id;
+	int id_len, idtype_len, i;
+	unsigned int dumpascii, dumphex;
+	unsigned char *typedata;
+
+	ND_TCHECK(*ext);
+	UNALIGNED_MEMCPY(&id, ext, sizeof(id));
+	ikev2_pay_print(ndo, NPSTR(tpay), id.h.critical);
+
+	id_len = ntohs(id.h.len);
+
+	ND_PRINT((ndo," len=%d", id_len - 4));
+	if (2 < ndo->ndo_vflag && 4 < id_len) {
+		ND_PRINT((ndo," "));
+		if (!rawprint(ndo, (caddr_t)(ext + 1), id_len - 4))
+			goto trunc;
+	}
+
+	idtype_len =id_len - sizeof(struct ikev2_id);
+	dumpascii = 0;
+	dumphex   = 0;
+	typedata  = (unsigned char *)(ext)+sizeof(struct ikev2_id);
+
+	switch(id.type) {
+	case ID_IPV4_ADDR:
+		ND_PRINT((ndo, " ipv4:"));
+		dumphex=1;
+		break;
+	case ID_FQDN:
+		ND_PRINT((ndo, " fqdn:"));
+		dumpascii=1;
+		break;
+	case ID_RFC822_ADDR:
+		ND_PRINT((ndo, " rfc822:"));
+		dumpascii=1;
+		break;
+	case ID_IPV6_ADDR:
+		ND_PRINT((ndo, " ipv6:"));
+		dumphex=1;
+		break;
+	case ID_DER_ASN1_DN:
+		ND_PRINT((ndo, " dn:"));
+		dumphex=1;
+		break;
+	case ID_DER_ASN1_GN:
+		ND_PRINT((ndo, " gn:"));
+		dumphex=1;
+		break;
+	case ID_KEY_ID:
+		ND_PRINT((ndo, " keyid:"));
+		dumphex=1;
+		break;
+	}
+
+	if(dumpascii) {
+		ND_TCHECK2(*typedata, idtype_len);
+		for(i=0; i<idtype_len; i++) {
+			if(ND_ISPRINT(typedata[i])) {
+				ND_PRINT((ndo, "%c", typedata[i]));
+			} else {
+				ND_PRINT((ndo, "."));
+			}
+		}
+	}
+	if(dumphex) {
+		if (!rawprint(ndo, (caddr_t)typedata, idtype_len))
+			goto trunc;
+	}
+
+	return (u_char *)ext + id_len;
+trunc:
+	ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
+	return NULL;
+}
+
+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 a;
+	const char *v2_auth[]={ "invalid", "rsasig",
+				"shared-secret", "dsssig" };
+	u_char *authdata = (u_char*)ext + sizeof(a);
+	unsigned int len;
+
+	ND_TCHECK(*ext);
+	UNALIGNED_MEMCPY(&a, ext, sizeof(a));
+	ikev2_pay_print(ndo, NPSTR(tpay), a.h.critical);
+	len = ntohs(a.h.len);
+
+	ND_PRINT((ndo," len=%d method=%s", len-4, 
+		  STR_OR_ID(a.auth_method, v2_auth)));
+
+	if (1 < ndo->ndo_vflag && 4 < len) {
+		ND_PRINT((ndo," authdata=("));
+		if (!rawprint(ndo, (caddr_t)authdata, len - sizeof(a)))
+			goto trunc;
+		ND_PRINT((ndo,") "));
+	} else if(ndo->ndo_vflag && 4 < len) {
+		if(!ike_show_somedata(ndo, authdata, ep)) goto trunc;
+	}
+
+	return (u_char *)ext + 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);
+	UNALIGNED_MEMCPY(&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 showspi, showdata, showsomedata;
+	const char *notify_name;
+	u_int32_t type;
+
+	p = (struct ikev2_n *)ext;
+	ND_TCHECK(*p);
+	UNALIGNED_MEMCPY(&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;
+
+	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);
+	UNALIGNED_MEMCPY(&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(ND_ISPRINT(vid[i])) ND_PRINT((ndo, "%c", vid[i]));
+		else ND_PRINT((ndo, "."));
+	}
+	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,
+#ifndef HAVE_LIBCRYPTO
+	      _U_
+#endif
+	      struct isakmp *base,
+	      u_char tpay, 
+	      const struct isakmp_gen *ext,
+	      u_int item_len _U_, const u_char *ep _U_,
+#ifndef HAVE_LIBCRYPTO
+	      _U_
+#endif
+	      u_int32_t phase,
+#ifndef HAVE_LIBCRYPTO
+	      _U_
+#endif
+	      u_int32_t doi,
+#ifndef HAVE_LIBCRYPTO
+	      _U_
+#endif
+	      u_int32_t proto,
+#ifndef HAVE_LIBCRYPTO
+	      _U_
+#endif
+	      int depth)
+{
+	struct isakmp_gen e;
+	u_char *dat;
+	volatile int dlen;
+
+	ND_TCHECK(*ext);
+	UNALIGNED_MEMCPY(&e, ext, sizeof(e));
+	ikev2_pay_print(ndo, NPSTR(tpay), e.critical);
+
+	dlen = ntohs(e.len)-4;
+
+	ND_PRINT((ndo," len=%d", dlen));
+	if (2 < ndo->ndo_vflag && 4 < dlen) {
+		ND_PRINT((ndo," "));
+		if (!rawprint(ndo, (caddr_t)(ext + 1), dlen))
+			goto trunc;
+	}
+
+	dat = (u_char *)(ext+1);
+	ND_TCHECK2(*dat, dlen);
+	
+#ifdef HAVE_LIBCRYPTO
+	/* try to decypt it! */
+	if(esp_print_decrypt_buffer_by_ikev2(ndo,
+					     base->flags & ISAKMP_FLAG_I,
+					     base->i_ck, base->r_ck,
+					     dat, dat+dlen)) {
+		
+		ext = (const struct isakmp_gen *)ndo->ndo_packetp;
+
+		/* got it decrypted, print stuff inside. */
+		ikev2_sub_print(ndo, base, e.np, ext, ndo->ndo_snapend,
+				phase, doi, proto, depth+1);
+	}
+#endif
+	
+
+	/* always return NULL, because E must be at end, and NP refers
+	 * to what was inside.
+	 */
+	return NULL;
+trunc:
+	ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
+	return NULL;
+}
+
+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);
-	safememcpy(&e, ext, sizeof(e));
+	ND_TCHECK(*ext);
+	UNALIGNED_MEMCPY(&e, ext, sizeof(e));
 
 	/*
 	 * Since we can't have a payload length of less than 4 bytes,
@@ -1204,21 +2143,22 @@
 		 * 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;
@@ -1227,19 +2167,19 @@
 	cp = (const u_char *)ext;
 
 	while (np) {
-		TCHECK(*ext);
-		
-		safememcpy(&e, ext, sizeof(e));
+		ND_TCHECK(*ext);
 
-		TCHECK2(*ext, ntohs(e.len));
+		UNALIGNED_MEMCPY(&e, ext, sizeof(e));
+
+		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) {
@@ -1252,7 +2192,7 @@
 	}
 	return cp;
 trunc:
-	printf(" [|%s]", NPSTR(np));
+	ND_PRINT((ndo," [|%s]", NPSTR(np)));
 	return NULL;
 }
 
@@ -1264,15 +2204,232 @@
 	return buf;
 }
 
-/*
- * some compiler tries to optimize memcpy(), using the alignment constraint
- * on the argument pointer type.  by using this function, we try to avoid the
- * optimization.
- */
 static void
-safememcpy(void *p, const void *q, size_t l)
+ikev1_print(netdissect_options *ndo,
+	    const u_char *bp,  u_int length,
+	    const u_char *bp2, struct isakmp *base)
 {
-	memcpy(p, q, l);
+	const struct isakmp *p;
+	const u_char *ep;
+	u_char np;
+	int i;
+	int phase;
+	
+	p = (const struct isakmp *)bp;
+	ep = ndo->ndo_snapend;
+	
+	phase = (EXTRACT_32BITS(base->msgid) == 0) ? 1 : 2;
+	if (phase == 1)
+		ND_PRINT((ndo," phase %d", phase));
+	else
+		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))) {
+			/* the first packet */
+			ND_PRINT((ndo," I"));
+			if (bp2)
+				cookie_record(&base->i_ck, bp2);
+		} else
+			ND_PRINT((ndo," ?"));
+	} else {
+		if (bp2 && cookie_isinitiator(i, bp2))
+			ND_PRINT((ndo," I"));
+		else if (bp2 && cookie_isresponder(i, bp2))
+			ND_PRINT((ndo," R"));
+		else
+			ND_PRINT((ndo," ?"));
+	}
+	
+	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 (ndo->ndo_vflag) {
+		const struct isakmp_gen *ext;
+		
+		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;
+		}
+		
+		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));
+		}
+	}
+}
+
+static const u_char *
+ikev2_sub0_print(netdissect_options *ndo, struct isakmp *base,
+		 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);
+	UNALIGNED_MEMCPY(&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(np == ISAKMP_NPTYPE_v2E) {
+		cp = ikev2_e_print(ndo, base, np, 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,
+		struct isakmp *base,
+		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);
+
+		UNALIGNED_MEMCPY(&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, base, np, pcount,
+				      ext, ep, phase, doi, proto, depth);
+		ND_PRINT((ndo,")"));
+		depth--;
+
+		if (cp == NULL) {
+			/* Zero-length subitem */
+			return NULL;
+		}
+
+		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 = (EXTRACT_32BITS(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%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;
+
+		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;
+		}
+
+		CHECKLEN(p + 1, base->np)
+
+		np = base->np;
+		ext = (struct isakmp_gen *)(p + 1);
+		ikev2_sub_print(ndo, base, 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));
+		}
+	}
 }
 
 void
@@ -1283,109 +2440,57 @@
 	const struct isakmp *p;
 	struct isakmp base;
 	const u_char *ep;
-	u_char np;
-	int i;
-	int phase;
 	int major, minor;
 
+#ifdef HAVE_LIBCRYPTO
+	/* initialize SAs */
+	if (ndo->ndo_sa_list_head == NULL) {
+		if (ndo->ndo_espsecret)
+			esp_print_decodesecret(ndo);
+	}
+#endif
+
 	p = (const struct isakmp *)bp;
 	ep = ndo->ndo_snapend;
 
 	if ((struct isakmp *)ep < p + 1) {
-		printf("[|isakmp]");
+		ND_PRINT((ndo,"[|isakmp]"));
 		return;
 	}
 
-	safememcpy(&base, p, sizeof(base));
+	UNALIGNED_MEMCPY(&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);
+	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 (vflag) {
-		printf(" msgid ");
-		rawprint((caddr_t)&base.msgid, sizeof(base.msgid));
+	if (ndo->ndo_vflag) {
+		ND_PRINT((ndo," msgid "));
+		hexprint(ndo, (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));
+	if (1 < ndo->ndo_vflag) {
+		ND_PRINT((ndo," cookie "));
+		hexprint(ndo, (caddr_t)&base.i_ck, sizeof(base.i_ck));
+		ND_PRINT((ndo,"->"));
+		hexprint(ndo, (caddr_t)&base.r_ck, sizeof(base.r_ck));
 	}
-	printf(":");
+	ND_PRINT((ndo,":"));
 
-	phase = (*(u_int32_t *)base.msgid == 0) ? 1 : 2;
-	if (phase == 1)
-		printf(" phase %d", phase);
-	else
-		printf(" phase %d/others", phase);
+	switch(major) {
+	case IKEv1_MAJOR_VERSION:
+		ikev1_print(ndo, bp, length, bp2, &base);
+		break;
 
-	i = cookie_find(&base.i_ck);
-	if (i < 0) {
-		if (iszero((u_char *)&base.r_ck, sizeof(base.r_ck))) {
-			/* the first packet */
-			printf(" I");
-			if (bp2)
-				cookie_record(&base.i_ck, bp2);
-		} else
-			printf(" ?");
-	} else {
-		if (bp2 && cookie_isinitiator(i, bp2))
-			printf(" I");
-		else if (bp2 && cookie_isresponder(i, bp2))
-			printf(" R");
-		else
-			printf(" ?");
-	}
-
-	printf(" %s", ETYPESTR(base.etype));
-	if (base.flags) {
-		printf("[%s%s]", base.flags & ISAKMP_FLAG_E ? "E" : "",
-			base.flags & ISAKMP_FLAG_C ? "C" : "");
-	}
-
-	if (vflag) {
-		const struct isakmp_gen *ext;
-		int nparen;
-
-#define CHECKLEN(p, np) \
-		if (ep < (u_char *)(p)) {				\
-			printf(" [|%s]", NPSTR(np));			\
-			goto done;					\
-		}
-
-		printf(":");
-
-		/* 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...
-			 */
-			printf(" [encrypted %s]", NPSTR(base.np));
-			goto done;
-		}
-
-		nparen = 0;
-		CHECKLEN(p + 1, base.np)
-
-		np = base.np;
-		ext = (struct isakmp_gen *)(p + 1);
-		isakmp_sub_print(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);
-		}
+	case IKEv2_MAJOR_VERSION:
+		ikev2_print(ndo, bp, length, bp2, &base);
+		break;
 	}
 }
 
@@ -1394,8 +2499,6 @@
 		     const u_char *bp, u_int length,
 		     const u_char *bp2)
 {
-	const u_char *ep;
-	ep = ndo->ndo_snapend;
 
 	if(length == 1 && bp[0]==0xff) {
 		ND_PRINT((ndo, "isakmp-nat-keep-alive"));
@@ -1405,7 +2508,7 @@
 	if(length < 4) {
 		goto trunc;
 	}
-
+	
 	/*
 	 * see if this is an IKE packet
 	 */
@@ -1435,7 +2538,7 @@
 	}
 
 trunc:
-	printf("[|isakmp]");
+	ND_PRINT((ndo,"[|isakmp]"));
 	return;
 }
 
@@ -1445,3 +2548,7 @@
  * c-basic-offset: 8
  * End:
  */
+
+
+  
+
diff --git a/print-isoclns.c b/print-isoclns.c
index d3935fc..97dcc7f 100644
--- a/print-isoclns.c
+++ b/print-isoclns.c
@@ -26,7 +26,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.165 2008-08-16 13:38:15 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -46,9 +46,7 @@
 #include "extract.h"
 #include "gmpls.h"
 #include "oui.h"
-
-#define IPV4            1       /* AFI value */
-#define IPV6            2       /* AFI value */
+#include "signature.h"
 
 /*
  * IS-IS is defined in ISO 10589.  Look there for protocol definitions.
@@ -78,7 +76,7 @@
 #define ISIS_PDU_L1_PSNP        26
 #define ISIS_PDU_L2_PSNP        27
 
-static struct tok isis_pdu_values[] = {
+static const struct tok isis_pdu_values[] = {
     { ISIS_PDU_L1_LAN_IIH,       "L1 Lan IIH"},
     { ISIS_PDU_L2_LAN_IIH,       "L2 Lan IIH"},
     { ISIS_PDU_PTP_IIH,          "p2p IIH"},
@@ -128,6 +126,8 @@
 #define ISIS_TLV_EXTD_IP_REACH       135 /* draft-ietf-isis-traffic-05 */
 #define ISIS_TLV_HOSTNAME            137 /* rfc2763 */
 #define ISIS_TLV_SHARED_RISK_GROUP   138 /* draft-ietf-isis-gmpls-extensions */
+#define ISIS_TLV_MT_PORT_CAP         143 /* rfc6165 */
+#define ISIS_TLV_MT_CAPABILITY       144 /* rfc6329 */
 #define ISIS_TLV_NORTEL_PRIVATE1     176
 #define ISIS_TLV_NORTEL_PRIVATE2     177
 #define ISIS_TLV_RESTART_SIGNALING   211 /* rfc3847 */
@@ -146,7 +146,7 @@
 #define ISIS_TLV_VENDOR_PRIVATE      250 /* draft-ietf-isis-experimental-tlv-01 */
 #define ISIS_TLV_VENDOR_PRIVATE_MINLEN 3
 
-static struct tok isis_tlv_values[] = {
+static const struct tok isis_tlv_values[] = {
     { ISIS_TLV_AREA_ADDR,	   "Area address(es)"},
     { ISIS_TLV_IS_REACH,           "IS Reachability"},
     { ISIS_TLV_ESNEIGH,            "ES Neighbor(s)"},
@@ -172,6 +172,8 @@
     { ISIS_TLV_TE_ROUTER_ID,       "Traffic Engineering Router ID"},
     { ISIS_TLV_EXTD_IP_REACH,      "Extended IPv4 Reachability"},
     { ISIS_TLV_SHARED_RISK_GROUP,  "Shared Risk Link Group"},
+    { ISIS_TLV_MT_PORT_CAP,        "Multi-Topology-Aware Port Capability"},
+    { ISIS_TLV_MT_CAPABILITY,      "Multi-Topology Capability"},
     { ISIS_TLV_NORTEL_PRIVATE1,    "Nortel Proprietary"},
     { ISIS_TLV_NORTEL_PRIVATE2,    "Nortel Proprietary"},
     { ISIS_TLV_HOSTNAME,           "Hostname"},
@@ -196,7 +198,7 @@
 #define ESIS_OPTION_ADDRESS_MASK     225 /* iso9542 */
 #define ESIS_OPTION_SNPA_MASK        226 /* iso9542 */
 
-static struct tok esis_option_values[] = {
+static const struct tok esis_option_values[] = {
     { ESIS_OPTION_PROTOCOLS,       "Protocols supported"},
     { ESIS_OPTION_QOS_MAINTENANCE, "QoS Maintenance" },
     { ESIS_OPTION_SECURITY,        "Security" },
@@ -215,7 +217,7 @@
 #define CLNP_OPTION_PADDING          204 /* iso8473 */
 #define CLNP_OPTION_PRIORITY         205 /* iso8473 */
 
-static struct tok clnp_option_values[] = {
+static const struct tok clnp_option_values[] = {
     { CLNP_OPTION_DISCARD_REASON,  "Discard Reason"},
     { CLNP_OPTION_PRIORITY,        "Priority"},
     { CLNP_OPTION_QOS_MAINTENANCE, "QoS Maintenance"},
@@ -226,7 +228,7 @@
     { 0, NULL }
 };
 
-static struct tok clnp_option_rfd_class_values[] = {
+static const struct tok clnp_option_rfd_class_values[] = {
     { 0x0, "General"},
     { 0x8, "Address"},
     { 0x9, "Source Routeing"},
@@ -236,7 +238,7 @@
     { 0, NULL }
 };
 
-static struct tok clnp_option_rfd_general_values[] = {
+static const struct tok clnp_option_rfd_general_values[] = {
     { 0x0, "Reason not specified"},
     { 0x1, "Protocol procedure error"},
     { 0x2, "Incorrect checksum"},
@@ -248,13 +250,13 @@
     { 0, NULL }
 };
 
-static struct tok clnp_option_rfd_address_values[] = {
+static const struct tok clnp_option_rfd_address_values[] = {
     { 0x0, "Destination address unreachable"},
     { 0x1, "Destination address unknown"},
     { 0, NULL }
 };
 
-static struct tok clnp_option_rfd_source_routeing_values[] = {
+static const struct tok clnp_option_rfd_source_routeing_values[] = {
     { 0x0, "Unspecified source routeing error"},
     { 0x1, "Syntax error in source routeing field"},
     { 0x2, "Unknown address in source routeing field"},
@@ -262,13 +264,13 @@
     { 0, NULL }
 };
 
-static struct tok clnp_option_rfd_lifetime_values[] = {
+static const struct tok clnp_option_rfd_lifetime_values[] = {
     { 0x0, "Lifetime expired while data unit in transit"},
     { 0x1, "Lifetime expired during reassembly"},
     { 0, NULL }
 };
 
-static struct tok clnp_option_rfd_pdu_discard_values[] = {
+static const struct tok clnp_option_rfd_pdu_discard_values[] = {
     { 0x0, "Unsupported option not specified"},
     { 0x1, "Unsupported protocol version"},
     { 0x2, "Unsupported security option"},
@@ -277,13 +279,13 @@
     { 0, NULL }
 };
 
-static struct tok clnp_option_rfd_reassembly_values[] = {
+static const struct tok clnp_option_rfd_reassembly_values[] = {
     { 0x0, "Reassembly interference"},
     { 0, NULL }
 };
 
 /* array of 16 error-classes */
-static struct tok *clnp_option_rfd_error_class[] = {
+static const struct tok *clnp_option_rfd_error_class[] = {
     clnp_option_rfd_general_values,
     NULL,
     NULL,
@@ -308,26 +310,26 @@
 #define CLNP_OPTION_SCOPE_DA_SPEC   0x80
 #define CLNP_OPTION_SCOPE_GLOBAL    0xc0
 
-static struct tok clnp_option_scope_values[] = {
+static const struct tok clnp_option_scope_values[] = {
     { CLNP_OPTION_SCOPE_SA_SPEC, "Source Address Specific"},
     { CLNP_OPTION_SCOPE_DA_SPEC, "Destination Address Specific"},
     { CLNP_OPTION_SCOPE_GLOBAL, "Globally unique"},
     { 0, NULL }
 };
 
-static struct tok clnp_option_sr_rr_values[] = {
+static const struct tok clnp_option_sr_rr_values[] = {
     { 0x0, "partial"},
     { 0x1, "complete"},
     { 0, NULL }
 };
 
-static struct tok clnp_option_sr_rr_string_values[] = {
+static const struct tok clnp_option_sr_rr_string_values[] = {
     { CLNP_OPTION_SOURCE_ROUTING, "source routing"},
     { CLNP_OPTION_ROUTE_RECORDING, "recording of route in progress"},
     { 0, NULL }
 };
 
-static struct tok clnp_option_qos_global_values[] = {
+static const struct tok clnp_option_qos_global_values[] = {
     { 0x20, "reserved"},
     { 0x10, "sequencing vs. delay"},
     { 0x08, "congested"},
@@ -338,7 +340,7 @@
 };
 
 #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 */
@@ -347,11 +349,14 @@
 #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[] = {
+#define ISIS_SUBTLV_SPB_METRIC                        29 /* rfc6329 */
+
+static const struct tok isis_ext_is_reach_subtlv_values[] = {
     { ISIS_SUBTLV_EXT_IS_REACH_ADMIN_GROUP,            "Administrative groups" },
     { ISIS_SUBTLV_EXT_IS_REACH_LINK_LOCAL_REMOTE_ID,   "Link Local/Remote Identifier" },
     { ISIS_SUBTLV_EXT_IS_REACH_LINK_REMOTE_ID,         "Link Remote Identifier" },
@@ -361,10 +366,12 @@
     { 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)" },
     { ISIS_SUBTLV_EXT_IS_REACH_BW_CONSTRAINTS,         "Bandwidth Constraints" },
+    { ISIS_SUBTLV_SPB_METRIC,                          "SPB Metric" },
     { 250,                                             "Reserved for cisco specific extensions" },
     { 251,                                             "Reserved for cisco specific extensions" },
     { 252,                                             "Reserved for cisco specific extensions" },
@@ -378,20 +385,29 @@
 #define ISIS_SUBTLV_EXTD_IP_REACH_ADMIN_TAG64          2 /* draft-ietf-isis-admin-tags-01 */
 #define ISIS_SUBTLV_EXTD_IP_REACH_MGMT_PREFIX_COLOR  117 /* draft-ietf-isis-wg-multi-topology-05 */
 
-static struct tok isis_ext_ip_reach_subtlv_values[] = {
+static const struct tok isis_ext_ip_reach_subtlv_values[] = {
     { ISIS_SUBTLV_EXTD_IP_REACH_ADMIN_TAG32,           "32-Bit Administrative tag" },
     { ISIS_SUBTLV_EXTD_IP_REACH_ADMIN_TAG64,           "64-Bit Administrative tag" },
     { ISIS_SUBTLV_EXTD_IP_REACH_MGMT_PREFIX_COLOR,     "Management Prefix Color" },
     { 0, NULL }
 };
 
+static const 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_GENERIC       3 /* rfc 5310 */
 #define ISIS_SUBTLV_AUTH_MD5          54
 #define ISIS_SUBTLV_AUTH_MD5_LEN      16
 #define ISIS_SUBTLV_AUTH_PRIVATE     255
 
-static struct tok isis_subtlv_auth_values[] = {
+static const struct tok isis_subtlv_auth_values[] = {
     { ISIS_SUBTLV_AUTH_SIMPLE,	"simple text password"},
+    { ISIS_SUBTLV_AUTH_GENERIC, "Generic Crypto key-id"},
     { ISIS_SUBTLV_AUTH_MD5,	"HMAC-MD5 password"},
     { ISIS_SUBTLV_AUTH_PRIVATE,	"Routing Domain private password"},
     { 0, NULL }
@@ -401,18 +417,65 @@
 #define ISIS_SUBTLV_IDRP_LOCAL         1
 #define ISIS_SUBTLV_IDRP_ASN           2
 
-static struct tok isis_subtlv_idrp_values[] = {
+static const struct tok isis_subtlv_idrp_values[] = {
     { ISIS_SUBTLV_IDRP_RES,         "Reserved"},
     { ISIS_SUBTLV_IDRP_LOCAL,       "Routing-Domain Specific"},
     { ISIS_SUBTLV_IDRP_ASN,         "AS Number Tag"},
     { 0, NULL}
 };
 
+#define ISIS_SUBTLV_SPB_MCID          4
+#define ISIS_SUBTLV_SPB_DIGEST        5
+#define ISIS_SUBTLV_SPB_BVID          6
+
+#define ISIS_SUBTLV_SPB_INSTANCE      1
+#define ISIS_SUBTLV_SPBM_SI           3
+
+#define ISIS_SPB_MCID_LEN                         51
+#define ISIS_SUBTLV_SPB_MCID_MIN_LEN              102
+#define ISIS_SUBTLV_SPB_DIGEST_MIN_LEN            33
+#define ISIS_SUBTLV_SPB_BVID_MIN_LEN              6
+#define ISIS_SUBTLV_SPB_INSTANCE_MIN_LEN          19
+#define ISIS_SUBTLV_SPB_INSTANCE_VLAN_TUPLE_LEN   8
+
+static const struct tok isis_mt_port_cap_subtlv_values[] = {
+    { ISIS_SUBTLV_SPB_MCID,           "SPB MCID" },
+    { ISIS_SUBTLV_SPB_DIGEST,         "SPB Digest" },
+    { ISIS_SUBTLV_SPB_BVID,           "SPB BVID" },
+    { 0, NULL }
+};
+
+static const struct tok isis_mt_capability_subtlv_values[] = {
+    { ISIS_SUBTLV_SPB_INSTANCE,      "SPB Instance" },
+    { ISIS_SUBTLV_SPBM_SI,      "SPBM Service Identifier and Unicast Address" },
+    { 0, NULL }
+};
+
+struct isis_spb_mcid {
+  u_int8_t  format_id;    
+  u_int8_t  name[32];  
+  u_int8_t  revision_lvl[2];
+  u_int8_t  digest[16]; 
+};
+
+struct isis_subtlv_spb_mcid {
+  struct isis_spb_mcid mcid;
+  struct isis_spb_mcid aux_mcid;
+};
+
+struct isis_subtlv_spb_instance {
+  u_int8_t cist_root_id[8];
+  u_int8_t cist_external_root_path_cost[4];
+  u_int8_t bridge_priority[2];
+  u_int8_t spsourceid[4];
+  u_int8_t no_of_trees;  
+};
+
 #define CLNP_SEGMENT_PART  0x80
 #define CLNP_MORE_SEGMENTS 0x40
 #define CLNP_REQUEST_ER    0x20
 
-static struct tok clnp_flag_values[] = {
+static const struct tok clnp_flag_values[] = {
     { CLNP_SEGMENT_PART, "Segmentation permitted"},
     { CLNP_MORE_SEGMENTS, "more Segments"},
     { CLNP_REQUEST_ER, "request Error Report"},
@@ -431,9 +494,9 @@
 #define ISIS_MASK_MTID(x)                  ((x)&0x0fff)
 #define ISIS_MASK_MTFLAGS(x)               ((x)&0xf000)
 
-static struct tok isis_mt_flag_values[] = {
-    { 0x4000,                  "sub-TLVs present"},
-    { 0x8000,                  "ATT bit set"},
+static const struct tok isis_mt_flag_values[] = {
+    { 0x4000,                  "ATT bit set"},
+    { 0x8000,                  "Overload bit set"},
     { 0, NULL}
 };
 
@@ -450,7 +513,7 @@
 
 #define ISIS_MASK_TLV_SHARED_RISK_GROUP(x) ((x)&0x1)
 
-static struct tok isis_mt_values[] = {
+static const struct tok isis_mt_values[] = {
     { 0,    "IPv4 unicast"},
     { 1,    "In-Band Management"},
     { 2,    "IPv6 unicast"},
@@ -459,7 +522,7 @@
     { 0, NULL }
 };
 
-static struct tok isis_iih_circuit_type_values[] = {
+static const struct tok isis_iih_circuit_type_values[] = {
     { 1,    "Level 1 only"},
     { 2,    "Level 2 only"},
     { 3,    "Level 1, Level 2"},
@@ -471,7 +534,7 @@
 #define ISIS_LSP_TYPE_UNUSED2   2
 #define ISIS_LSP_TYPE_LEVEL_2   3
 
-static struct tok isis_lsp_istype_values[] = {
+static const struct tok isis_lsp_istype_values[] = {
     { ISIS_LSP_TYPE_UNUSED0,	"Unused 0x0 (invalid)"},
     { ISIS_LSP_TYPE_LEVEL_1,	"L1 IS"},
     { ISIS_LSP_TYPE_UNUSED2,	"Unused 0x2 (invalid)"},
@@ -488,7 +551,7 @@
 #define ISIS_PTP_ADJ_INIT 1
 #define ISIS_PTP_ADJ_DOWN 2
 
-static struct tok isis_ptp_adjancey_values[] = {
+static const struct tok isis_ptp_adjancey_values[] = {
     { ISIS_PTP_ADJ_UP,    "Up" },
     { ISIS_PTP_ADJ_INIT,  "Initializing" },
     { ISIS_PTP_ADJ_DOWN,  "Down" },
@@ -502,7 +565,8 @@
     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);
@@ -530,13 +594,13 @@
     u_int8_t mask[4];
 };
 
-static struct tok isis_is_reach_virtual_values[] = {
+static const struct tok isis_is_reach_virtual_values[] = {
     { 0,    "IsNotVirtual"},
     { 1,    "IsVirtual"},
     { 0, NULL }
 };
 
-static struct tok isis_restart_flag_values[] = {
+static const struct tok isis_restart_flag_values[] = {
     { 0x1,  "Restart Request"},
     { 0x2,  "Restart Acknowledgement"},
     { 0x4,  "Suppress adjacency advertisement"},
@@ -608,10 +672,6 @@
 
 void isoclns_print(const u_int8_t *p, u_int length, u_int caplen)
 {
-	const struct isis_common_header *header;
-
-	header = (const struct isis_common_header *)p;
-
         if (caplen <= 1) { /* enough bytes on the wire ? */
             printf("|OSI");
             return;
@@ -654,7 +714,7 @@
 
 #ifdef INET6
         case NLPID_IP6:
-                ip6_print(p+1, length-1);
+                ip6_print(gndo, p+1, length-1);
                 break;
 #endif
 
@@ -680,7 +740,7 @@
 #define	CLNP_PDU_ERQ	30
 #define	CLNP_PDU_ERP	31
 
-static struct tok clnp_pdu_values[] = {
+static const struct tok clnp_pdu_values[] = {
     { CLNP_PDU_ER,  "Error Report"},
     { CLNP_PDU_MD,  "MD"},
     { CLNP_PDU_DT,  "Data"},
@@ -765,7 +825,7 @@
         }
         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,
@@ -774,10 +834,8 @@
                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));
@@ -949,7 +1007,7 @@
 #define	ESIS_PDU_ESH	        2
 #define	ESIS_PDU_ISH	        4
 
-static struct tok esis_pdu_values[] = {
+static const struct tok esis_pdu_values[] = {
     { ESIS_PDU_REDIRECT, "redirect"},
     { ESIS_PDU_ESH,      "ESH"},
     { ESIS_PDU_ISH,      "ISH"},
@@ -1031,12 +1089,9 @@
                    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);
 
@@ -1174,15 +1229,15 @@
 	}
 
         /* now walk the options */
-        while (li >= 2) {
+        while (li != 0) {
             u_int op, opli;
             const u_int8_t *tptr;
             
-            TCHECK2(*pptr, 2);
             if (li < 2) {
                 printf(", bad opts/li");
                 return;
             }
+            TCHECK2(*pptr, 2);
             op = *pptr++;
             opli = *pptr++;
             li -= 2;
@@ -1201,8 +1256,11 @@
             switch (op) {
 
             case ESIS_OPTION_ES_CONF_TIME:
-                TCHECK2(*pptr, 2);
-                printf("%us", EXTRACT_16BITS(tptr));
+                if (opli == 2) {
+                    TCHECK2(*pptr, 2);
+                    printf("%us", EXTRACT_16BITS(tptr));
+                } else
+                    printf("(bad length)");
                 break;
 
             case ESIS_OPTION_PROTOCOLS:
@@ -1243,6 +1301,258 @@
 	return;
 }   
 
+
+static void
+isis_print_mcid (const struct isis_spb_mcid *mcid)
+{
+  int i;
+
+  printf( "ID: %d, Name: ", mcid->format_id);
+
+  for(i=0; i<32; i++) 
+  { 
+    printf("%c", mcid->name[i]);
+    if(mcid->name[i] == '\0')
+        break;
+  }
+
+  printf("\n\t              Lvl: %d", 
+          EXTRACT_16BITS(mcid->revision_lvl));
+
+  printf( ", Digest: ");
+
+  for(i=0;i<16;i++) 
+    printf("%.2x ",mcid->digest[i]);
+}
+
+static int
+isis_print_mt_port_cap_subtlv (const u_int8_t *tptr, int len)
+{
+  int stlv_type, stlv_len;
+  const struct isis_subtlv_spb_mcid *subtlv_spb_mcid;
+  int i;
+
+  while (len > 0)
+  {
+    stlv_type = *(tptr++);
+    stlv_len  = *(tptr++);
+
+    /* first lets see if we know the subTLVs name*/
+    printf("\n\t       %s subTLV #%u, length: %u",
+               tok2str(isis_mt_port_cap_subtlv_values, "unknown", stlv_type),
+               stlv_type,
+               stlv_len);
+
+    /*len -= TLV_TYPE_LEN_OFFSET;*/
+    len = len -2;
+
+    switch (stlv_type)
+    {
+      case ISIS_SUBTLV_SPB_MCID:
+      {
+        if (!TTEST2(*(tptr), ISIS_SUBTLV_SPB_MCID_MIN_LEN))
+          goto trunctlv;
+
+        subtlv_spb_mcid = (struct isis_subtlv_spb_mcid *)tptr;
+
+        printf( "\n\t         MCID: ");
+        isis_print_mcid (&(subtlv_spb_mcid->mcid));
+
+          /*tptr += SPB_MCID_MIN_LEN;
+            len -= SPB_MCID_MIN_LEN; */
+
+        printf( "\n\t         AUX-MCID: ");
+        isis_print_mcid (&(subtlv_spb_mcid->aux_mcid));
+
+          /*tptr += SPB_MCID_MIN_LEN;
+            len -= SPB_MCID_MIN_LEN; */
+        tptr = tptr + sizeof(struct isis_subtlv_spb_mcid);
+        len = len - sizeof(struct isis_subtlv_spb_mcid);
+
+        break;
+      }
+
+      case ISIS_SUBTLV_SPB_DIGEST:
+      {
+        if (!TTEST2(*(tptr), ISIS_SUBTLV_SPB_DIGEST_MIN_LEN))
+          goto trunctlv;
+
+        printf ("\n\t        RES: %d V: %d A: %d D: %d",
+                        (*(tptr) >> 5), (((*tptr)>> 4) & 0x01),
+                        ((*(tptr) >> 2) & 0x03), ((*tptr) & 0x03));
+
+        tptr++;
+
+        printf( "\n\t         Digest: ");
+          
+        for(i=1;i<=8; i++)
+        {
+            printf("%08x ", EXTRACT_32BITS(tptr));
+            if (i%4 == 0 && i != 8)
+              printf("\n\t                 ");
+            tptr = tptr + 4;
+        }
+
+        len = len - ISIS_SUBTLV_SPB_DIGEST_MIN_LEN;
+
+        break;
+      }
+
+      case ISIS_SUBTLV_SPB_BVID:
+      {
+        if (!TTEST2(*(tptr), stlv_len))
+          goto trunctlv;
+
+        while (len)
+        {
+          if (!TTEST2(*(tptr), ISIS_SUBTLV_SPB_BVID_MIN_LEN))
+            goto trunctlv;
+
+          printf("\n\t           ECT: %08x", 
+                      EXTRACT_32BITS(tptr));
+
+          tptr = tptr+4;
+
+          printf(" BVID: %d, U:%01x M:%01x ",
+                     (EXTRACT_16BITS (tptr) >> 4) ,
+                     (EXTRACT_16BITS (tptr) >> 3) & 0x01,
+                     (EXTRACT_16BITS (tptr) >> 2) & 0x01);
+
+          tptr = tptr + 2;
+          len = len - ISIS_SUBTLV_SPB_BVID_MIN_LEN;
+        }
+
+        break;
+      }
+      
+      default:
+          break;
+    }
+  }
+
+  return 0;
+
+  trunctlv:
+    printf("\n\t\t packet exceeded snapshot");
+    return(1); 
+}
+
+static int
+isis_print_mt_capability_subtlv (const u_int8_t *tptr, int len)
+{
+  int stlv_type, stlv_len, tmp;
+
+  while (len > 0) 
+  {   
+    stlv_type = *(tptr++);
+    stlv_len  = *(tptr++);
+
+    /* first lets see if we know the subTLVs name*/
+    printf("\n\t      %s subTLV #%u, length: %u",
+               tok2str(isis_mt_capability_subtlv_values, "unknown", stlv_type),
+               stlv_type,
+               stlv_len);
+ 
+    len = len - 2;
+
+    switch (stlv_type)
+    {    
+      case ISIS_SUBTLV_SPB_INSTANCE:
+
+          if (!TTEST2(*(tptr), ISIS_SUBTLV_SPB_INSTANCE_MIN_LEN)) 
+            goto trunctlv;
+
+          printf("\n\t        CIST Root-ID: %08x", EXTRACT_32BITS(tptr));
+          tptr = tptr+4;
+          printf(" %08x", EXTRACT_32BITS(tptr));
+          tptr = tptr+4;
+          printf(", Path Cost: %08x", EXTRACT_32BITS(tptr));
+          tptr = tptr+4;
+          printf(", Prio: %d", EXTRACT_16BITS(tptr));
+          tptr = tptr + 2; 
+          printf("\n\t        RES: %d", 
+                    EXTRACT_16BITS(tptr) >> 5);
+          printf(", V: %d", 
+                    (EXTRACT_16BITS(tptr) >> 4) & 0x0001);
+          printf(", SPSource-ID: %d", 
+                    (EXTRACT_32BITS(tptr) & 0x000fffff));
+          tptr = tptr+4;
+          printf(", No of Trees: %x", *(tptr));
+
+          tmp = *(tptr++);
+
+          len = len - ISIS_SUBTLV_SPB_INSTANCE_MIN_LEN;
+
+          while (tmp)
+          {
+            if (!TTEST2(*(tptr), ISIS_SUBTLV_SPB_INSTANCE_VLAN_TUPLE_LEN))
+              goto trunctlv;
+
+            printf ("\n\t         U:%d, M:%d, A:%d, RES:%d",
+                      *(tptr) >> 7, (*(tptr) >> 6) & 0x01,
+                      (*(tptr) >> 5) & 0x01, (*(tptr) & 0x1f));
+            
+            tptr++;
+    
+            printf (", ECT: %08x", EXTRACT_32BITS(tptr));
+
+            tptr = tptr + 4;
+
+            printf (", BVID: %d, SPVID: %d",
+                      (EXTRACT_24BITS(tptr) >> 12) & 0x000fff,
+                      EXTRACT_24BITS(tptr) & 0x000fff);
+
+            tptr = tptr + 3;
+            len = len - ISIS_SUBTLV_SPB_INSTANCE_VLAN_TUPLE_LEN;
+            tmp--;             
+          }
+
+          break;
+
+      case ISIS_SUBTLV_SPBM_SI:
+
+          if (!TTEST2(*(tptr), 6)) 
+            goto trunctlv;
+
+          printf("\n\t        BMAC: %08x", EXTRACT_32BITS(tptr));
+          tptr = tptr+4;
+          printf("%04x", EXTRACT_16BITS(tptr));
+          tptr = tptr+2;
+
+          printf (", RES: %d, VID: %d", EXTRACT_16BITS(tptr) >> 12,
+                    (EXTRACT_16BITS(tptr)) & 0x0fff);
+
+          tptr = tptr+2;
+          len = len - 8;
+          stlv_len = stlv_len - 8;
+
+          while (stlv_len)
+          {
+            printf("\n\t        T: %d, R: %d, RES: %d, ISID: %d",
+                    (EXTRACT_32BITS(tptr) >> 31),
+                    (EXTRACT_32BITS(tptr) >> 30) & 0x01,
+                    (EXTRACT_32BITS(tptr) >> 24) & 0x03f,
+                    (EXTRACT_32BITS(tptr)) & 0x0ffffff);
+
+            tptr = tptr + 4;
+            len = len - 4;
+            stlv_len = stlv_len - 4;
+          }
+
+        break;
+
+      default:
+        break;
+    }
+  }
+  return 0;
+
+  trunctlv:
+    printf("\n\t\t packet exceeded snapshot");
+    return(1);
+}
+
+
 /* shared routine for printing system, node and lsp-ids */
 static char *
 isis_print_id(const u_int8_t *cp, int id_len)
@@ -1411,7 +1721,7 @@
 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;
@@ -1435,7 +1745,7 @@
         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;
@@ -1484,6 +1794,15 @@
             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",
@@ -1491,11 +1810,21 @@
                    *(tptr+1));
             }
             break;
+        case ISIS_SUBTLV_SPB_METRIC:
+            if (subl >= 6) {
+              printf (", LM: %u", EXTRACT_24BITS(tptr));
+              tptr=tptr+3;
+              printf (", P: %u", *(tptr));
+              tptr++;
+              printf (", P-ID: %u", EXTRACT_16BITS(tptr));
+            }
+            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;
@@ -1509,12 +1838,29 @@
 		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;
@@ -1629,7 +1975,7 @@
     processed=4;
     tptr+=4;
     
-    if (afi == IPV4) {
+    if (afi == AF_INET) {
         if (!TTEST2(*tptr, 1)) /* fetch status byte */
             return (0);
         status_byte=*(tptr++);
@@ -1642,7 +1988,7 @@
         }
         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++);
@@ -1667,13 +2013,13 @@
     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),
@@ -1684,17 +2030,20 @@
            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
@@ -1732,7 +2081,7 @@
 
     const struct isis_iih_lan_header *header_iih_lan;
     const struct isis_iih_ptp_header *header_iih_ptp;
-    const struct isis_lsp_header *header_lsp;
+    struct isis_lsp_header *header_lsp;
     const struct isis_csnp_header *header_csnp;
     const struct isis_psnp_header *header_psnp;
 
@@ -1744,18 +2093,20 @@
     u_int8_t pdu_type, max_area, id_length, tlv_type, tlv_len, tmp, alen, lan_alen, prefix_len;
     u_int8_t ext_is_len, ext_ip_len, mt_len;
     const u_int8_t *optr, *pptr, *tptr;
-    u_short packet_len,pdu_len;
+    u_short packet_len,pdu_len, key_id;
     u_int i,vendor_id;
+    int sigcheck;
 
     packet_len=length;
     optr = p; /* initialize the _o_riginal pointer to the packet start -
-                 need it for parsing the checksum TLV */
+                 need it for parsing the checksum TLV and authentication
+                 TLV verification */
     isis_header = (const struct isis_common_header *)p;
     TCHECK(*isis_header);
     pptr = p+(ISIS_COMMON_HEADER_SIZE);
     header_iih_lan = (const struct isis_iih_lan_header *)pptr;
     header_iih_ptp = (const struct isis_iih_ptp_header *)pptr;
-    header_lsp = (const struct isis_lsp_header *)pptr;
+    header_lsp = (struct isis_lsp_header *)pptr;
     header_csnp = (const struct isis_csnp_header *)pptr;
     header_psnp = (const struct isis_psnp_header *)pptr;
 
@@ -1977,15 +2328,18 @@
                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);
+
+        /*
+         * Clear checksum and lifetime prior to signature verification.
+         */
+        header_lsp->checksum[0] = 0;
+        header_lsp->checksum[1] = 0;
+        header_lsp->remaining_lifetime[0] = 0;
+        header_lsp->remaining_lifetime[1] = 0;
+        
 
 	printf(", PDU length: %u, Flags: [ %s",
                pdu_len,
@@ -2162,13 +2516,12 @@
 	    break;
 
         case ISIS_TLV_MT_IS_REACH:
+            mt_len = isis_print_mtid(tptr, "\n\t      ");
+            if (mt_len == 0) /* did something go wrong ? */
+                goto trunctlv;
+            tptr+=mt_len;
+            tmp-=mt_len;
             while (tmp >= 2+NODE_ID_LEN+3+1) {
-                mt_len = isis_print_mtid(tptr, "\n\t      ");
-                if (mt_len == 0) /* did something go wrong ? */
-                    goto trunctlv;
-                tptr+=mt_len;
-                tmp-=mt_len;
-
                 ext_is_len = isis_print_ext_is_reach(tptr,"\n\t      ",tlv_type);
                 if (ext_is_len == 0) /* did something go wrong ? */
                     goto trunctlv;
@@ -2238,7 +2591,7 @@
 
 	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;
@@ -2255,7 +2608,7 @@
             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;
@@ -2266,7 +2619,7 @@
 #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;
@@ -2283,7 +2636,7 @@
             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;
@@ -2329,7 +2682,25 @@
 		}
 		if (tlv_len != ISIS_SUBTLV_AUTH_MD5_LEN+1)
                     printf(", (malformed subTLV) ");
+
+#ifdef HAVE_LIBCRYPTO
+                sigcheck = signature_verify(optr, length,
+                                            (unsigned char *)tptr + 1);
+#else
+                sigcheck = CANT_CHECK_SIGNATURE;
+#endif
+                printf(" (%s)", tok2str(signature_check_values, "Unknown", sigcheck));
+
 		break;
+            case ISIS_SUBTLV_AUTH_GENERIC:
+                key_id = EXTRACT_16BITS((tptr+1));
+                printf("%u, password: ", key_id); 
+                for(i=1 + sizeof(u_int16_t);i<tlv_len;i++) {
+                    if (!TTEST2(*(tptr+i), 1))
+                        goto trunctlv;
+                    printf("%02x",*(tptr+i));
+                }
+                break;
 	    case ISIS_SUBTLV_AUTH_PRIVATE:
 	    default:
 		if(!print_unknown_data(tptr+1,"\n\t\t  ",tlv_len-1))
@@ -2389,6 +2760,42 @@
 	    }
 	    break;
 
+    case ISIS_TLV_MT_PORT_CAP:
+    {
+      if (!TTEST2(*(tptr), 2))
+        goto trunctlv;
+
+      printf("\n\t       RES: %d, MTID(s): %d",
+              (EXTRACT_16BITS (tptr) >> 12),    
+              (EXTRACT_16BITS (tptr) & 0x0fff));
+
+      tmp = tmp-2;
+      tptr = tptr+2;
+
+      if (tmp)
+        isis_print_mt_port_cap_subtlv (tptr, tmp);
+
+      break;
+    }
+
+    case ISIS_TLV_MT_CAPABILITY:
+
+      if (!TTEST2(*(tptr), 2))
+        goto trunctlv;
+
+      printf("\n\t      O: %d, RES: %d, MTID(s): %d",
+                (EXTRACT_16BITS(tptr) >> 15) & 0x01,
+                (EXTRACT_16BITS(tptr) >> 12) & 0x07,
+                EXTRACT_16BITS(tptr) & 0x0fff);
+
+      tmp = tmp-2;
+      tptr = tptr+2;
+
+      if (tmp)
+        isis_print_mt_capability_subtlv (tptr, tmp);
+
+      break;
+
 	case ISIS_TLV_TE_ROUTER_ID:
 	    if (!TTEST2(*pptr, sizeof(struct in_addr)))
 		goto trunctlv;
@@ -2488,9 +2895,7 @@
              * 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:
@@ -2682,25 +3087,25 @@
     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/print-juniper.c b/print-juniper.c
index b5837e3..1789fb5 100644
--- a/print-juniper.c
+++ b/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 @@
 #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" */
 
@@ -59,7 +65,7 @@
 #define JUNIPER_IPSEC_O_AH_AUTHENTICATION_TYPE 4
 #define JUNIPER_IPSEC_O_ESP_ENCRYPTION_TYPE 5
 
-static struct tok juniper_ipsec_type_values[] = {
+static const struct tok juniper_ipsec_type_values[] = {
     { JUNIPER_IPSEC_O_ESP_ENCRYPT_ESP_AUTHEN_TYPE, "ESP ENCR-AUTH" },
     { JUNIPER_IPSEC_O_ESP_ENCRYPT_AH_AUTHEN_TYPE, "ESP ENCR-AH AUTH" },
     { JUNIPER_IPSEC_O_ESP_AUTHENTICATION_TYPE, "ESP AUTH" },
@@ -68,12 +74,297 @@
     { 0, NULL}
 };
 
-static struct tok juniper_direction_values[] = {
+static const struct tok juniper_direction_values[] = {
     { JUNIPER_BPF_IN,  "In"},
     { JUNIPER_BPF_OUT, "Out"},
     { 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
+
+static const 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 }
+};
+
+static const 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
+
+static const 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
+
+static const 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 @@
     u_int8_t cookie[8];
     u_int8_t bundle;
     u_int16_t proto;
+    u_int8_t flags;
 };
 
 #define LS_COOKIE_ID            0x54
@@ -147,7 +439,7 @@
 
 #define MFR_BE_MASK 0xc0
 
-static struct tok juniper_protocol_values[] = {
+static const struct tok juniper_protocol_values[] = {
     { JUNIPER_PROTO_NULL, "Null" },
     { JUNIPER_PROTO_IPV4, "IPv4" },
     { JUNIPER_PROTO_IPV6, "IPv6" },
@@ -156,6 +448,7 @@
 
 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 @@
             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:
@@ -192,7 +486,7 @@
             break;
 #ifdef INET6
         case JUNIPER_PROTO_IPV6:
-            ip6_print(p, l2info.length);
+            ip6_print(gndo, p, l2info.length);
             break;
 #endif /* INET6 */
         default:
@@ -256,8 +550,8 @@
                        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", 
@@ -353,7 +647,7 @@
 
         p+=l2info.header_len;
         /* this DLT contains nothing but raw ethernet frames */
-        ether_print(p, l2info.length, l2info.caplen);
+        ether_print(gndo, p, l2info.length, l2info.caplen, NULL, NULL);
         return l2info.header_len;
 }
 #endif
@@ -370,7 +664,7 @@
 
         p+=l2info.header_len;
         /* this DLT contains nothing but raw Ethernet frames */
-        ether_print(p, l2info.length, l2info.caplen);
+        ether_print(gndo, p, l2info.length, l2info.caplen, NULL, NULL);
         return l2info.header_len;
 }
 #endif
@@ -442,11 +736,10 @@
         extracted_ethertype = EXTRACT_16BITS(p);
         /* this DLT contains nothing but raw PPPoE frames,
          * prepended with a type field*/
-        if (ether_encap_print(extracted_ethertype,
+        if (ethertype_print(gndo, extracted_ethertype,
                               p+ETHERTYPE_LEN,
                               l2info.length-ETHERTYPE_LEN,
-                              l2info.caplen-ETHERTYPE_LEN,
-                              &extracted_ethertype) == 0)
+                              l2info.caplen-ETHERTYPE_LEN) == 0)
             /* ether_type not known, probably it wasn't one */
             printf("unknown ethertype 0x%04x", extracted_ethertype);
         
@@ -486,7 +779,7 @@
             return l2info.header_len;
 #ifdef INET6
         case JUNIPER_LSQ_L3_PROTO_IPV6:
-            ip6_print(p,l2info.length);
+            ip6_print(gndo, p,l2info.length);
             return l2info.header_len;
 #endif
         case JUNIPER_LSQ_L3_PROTO_MPLS:
@@ -541,7 +834,7 @@
                 return l2info.header_len;
 #ifdef INET6
             case JUNIPER_LSQ_L3_PROTO_IPV6:
-                ip6_print(p,l2info.length);
+                ip6_print(gndo, p,l2info.length);
                 return l2info.header_len;
 #endif
             case JUNIPER_LSQ_L3_PROTO_MPLS:
@@ -694,7 +987,7 @@
 
         if (l2info.direction != JUNIPER_BPF_PKT_IN && /* ether-over-1483 encaps ? */
             (EXTRACT_32BITS(l2info.cookie) & ATM2_GAP_COUNT_MASK)) {
-            ether_print(p, l2info.length, l2info.caplen);
+            ether_print(gndo, p, l2info.length, l2info.caplen, NULL, NULL);
             return l2info.header_len;
         }
 
@@ -780,7 +1073,7 @@
     case 0x6d:
     case 0x6e:
     case 0x6f:
-        ip6_print(p, length);
+        ip6_print(gndo, p, length);
         break;
 #endif
     default:
@@ -790,14 +1083,63 @@
     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 +1148,10 @@
 
     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 +1160,92 @@
     if (eflag) /* print direction */
         printf("%3s ",tok2str(juniper_direction_values,"---",l2info->direction));
 
-    /* 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;
+    /* magic number + flags */
+    jnx_header_len = 4;
 
-    if ((p[3] & JUNIPER_BPF_NO_L2 ) == JUNIPER_BPF_NO_L2 ) {            
+    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 ((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 +1253,15 @@
          * 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 +1408,10 @@
         }
         break;
 #endif
+#ifdef DLT_JUNIPER_GGSN
+    case DLT_JUNIPER_GGSN:
+        break;
+#endif
 #ifdef DLT_JUNIPER_ATM1
     case DLT_JUNIPER_ATM1:
         break;
diff --git a/print-krb.c b/print-krb.c
index d6c8e14..af70875 100644
--- a/print-krb.c
+++ b/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
@@ -71,7 +71,7 @@
 
 static char tstr[] = " [|kerberos]";
 
-static struct tok type2str[] = {
+static const struct tok type2str[] = {
 	{ AUTH_MSG_KDC_REQUEST,		"KDC_REQUEST" },
 	{ AUTH_MSG_KDC_REPLY,		"KDC_REPLY" },
 	{ AUTH_MSG_APPL_REQUEST,	"APPL_REQUEST" },
@@ -84,7 +84,7 @@
 	{ 0,				NULL }
 };
 
-static struct tok kerr2str[] = {
+static const struct tok kerr2str[] = {
 	{ KERB_ERR_OK,			"OK" },
 	{ KERB_ERR_NAME_EXP,		"NAME_EXP" },
 	{ KERB_ERR_SERVICE_EXP,		"SERVICE_EXP" },
@@ -112,12 +112,12 @@
 			flag = 0;
 			break;
 		}
-		if (!isascii(c)) {
-			c = toascii(c);
+		if (!ND_ISASCII(c)) {
+			c = ND_TOASCII(c);
 			putchar('M');
 			putchar('-');
 		}
-		if (!isprint(c)) {
+		if (!ND_ISPRINT(c)) {
 			c ^= 0x40;	/* DEL to ?, others to alpha */
 			putchar('^');
 		}
diff --git a/print-l2tp.c b/print-l2tp.c
index 6ceab43..840239c 100644
--- a/print-l2tp.c
+++ b/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
@@ -55,7 +55,7 @@
 #define	L2TP_MSGTYPE_WEN	15 /* WAN-Error-Notify */
 #define	L2TP_MSGTYPE_SLI	16 /* Set-Link-Info */
 
-static struct tok l2tp_msgtype2str[] = {
+static const struct tok l2tp_msgtype2str[] = {
 	{ L2TP_MSGTYPE_SCCRQ, 	"SCCRQ" },
 	{ L2TP_MSGTYPE_SCCRP,	"SCCRP" },
 	{ L2TP_MSGTYPE_SCCCN,	"SCCCN" },
@@ -115,7 +115,7 @@
 #define L2TP_AVP_SEQ_REQUIRED 		39 /* Sequencing Required */
 #define L2TP_AVP_PPP_DISCON_CC		46 /* PPP Disconnect Cause Code */
 
-static struct tok l2tp_avp2str[] = {
+static const struct tok l2tp_avp2str[] = {
 	{ L2TP_AVP_MSGTYPE,		"MSGTYPE" },
 	{ L2TP_AVP_RESULT_CODE,		"RESULT_CODE" },
 	{ L2TP_AVP_PROTO_VER,		"PROTO_VER" },
@@ -160,7 +160,7 @@
 	{ 0,				NULL }
 };
 
-static struct tok l2tp_authentype2str[] = {
+static const struct tok l2tp_authentype2str[] = {
 	{ L2TP_AUTHEN_TYPE_RESERVED,	"Reserved" },
 	{ L2TP_AUTHEN_TYPE_TEXTUAL,	"Textual" },
 	{ L2TP_AUTHEN_TYPE_CHAP,	"CHAP" },
@@ -174,7 +174,7 @@
 #define L2TP_PPP_DISCON_CC_DIRECTION_AT_PEER	1
 #define L2TP_PPP_DISCON_CC_DIRECTION_AT_LOCAL	2
 
-static struct tok l2tp_cc_direction2str[] = {
+static const struct tok l2tp_cc_direction2str[] = {
 	{ L2TP_PPP_DISCON_CC_DIRECTION_GLOBAL,	"global error" },
 	{ L2TP_PPP_DISCON_CC_DIRECTION_AT_PEER,	"at peer" },
 	{ L2TP_PPP_DISCON_CC_DIRECTION_AT_LOCAL,"at local" },
@@ -606,7 +606,7 @@
 void
 l2tp_print(const u_char *dat, u_int length)
 {
-	const u_int16_t *ptr = (u_int16_t *)dat;
+	const u_char *ptr = dat;
 	u_int cnt = 0;			/* total octets consumed */
 	u_int16_t pad;
 	int flag_t, flag_l, flag_s, flag_o;
@@ -614,7 +614,7 @@
 
 	flag_t = flag_l = flag_s = flag_o = FALSE;
 
-	TCHECK(*ptr);	/* Flags & Version */
+	TCHECK2(*ptr, 2);	/* Flags & Version */
 	if ((EXTRACT_16BITS(ptr) & L2TP_VERSION_MASK) == L2TP_VERSION_L2TP) {
 		printf(" l2tp:");
 	} else if ((EXTRACT_16BITS(ptr) & L2TP_VERSION_MASK) == L2TP_VERSION_L2F) {
@@ -646,37 +646,42 @@
 		printf("P");
 	printf("]");
 
-	ptr++;
+	ptr += 2;
 	cnt += 2;
 
 	if (flag_l) {
-		TCHECK(*ptr);	/* Length */
-		l2tp_len = EXTRACT_16BITS(ptr); ptr++;
+		TCHECK2(*ptr, 2);	/* Length */
+		l2tp_len = EXTRACT_16BITS(ptr);
+		ptr += 2;
 		cnt += 2;
 	} else {
 		l2tp_len = 0;
 	}
 
-	TCHECK(*ptr);		/* Tunnel ID */
-	printf("(%u/", EXTRACT_16BITS(ptr)); ptr++;
+	TCHECK2(*ptr, 2);		/* Tunnel ID */
+	printf("(%u/", EXTRACT_16BITS(ptr));
+	ptr += 2;
 	cnt += 2;
-	TCHECK(*ptr);		/* Session ID */
-	printf("%u)",  EXTRACT_16BITS(ptr)); ptr++;
+	TCHECK2(*ptr, 2);		/* Session ID */
+	printf("%u)",  EXTRACT_16BITS(ptr));
+	ptr += 2;
 	cnt += 2;
 
 	if (flag_s) {
-		TCHECK(*ptr);	/* Ns */
-		printf("Ns=%u,", EXTRACT_16BITS(ptr)); ptr++;
+		TCHECK2(*ptr, 2);	/* Ns */
+		printf("Ns=%u,", EXTRACT_16BITS(ptr));
+		ptr += 2;
 		cnt += 2;
-		TCHECK(*ptr);	/* Nr */
-		printf("Nr=%u",  EXTRACT_16BITS(ptr)); ptr++;
+		TCHECK2(*ptr, 2);	/* Nr */
+		printf("Nr=%u",  EXTRACT_16BITS(ptr));
+		ptr += 2;
 		cnt += 2;
 	}
 
 	if (flag_o) {
-		TCHECK(*ptr);	/* Offset Size */
-		pad =  EXTRACT_16BITS(ptr); ptr++;
-		ptr += pad / sizeof(*ptr);
+		TCHECK2(*ptr, 2);	/* Offset Size */
+		pad =  EXTRACT_16BITS(ptr);
+		ptr += (2 + pad);
 		cnt += (2 + pad);
 	}
 
@@ -699,11 +704,11 @@
 		if (length - cnt == 0) {
 			printf(" ZLB");
 		} else {
-			l2tp_avp_print((u_char *)ptr, length - cnt);
+			l2tp_avp_print(ptr, length - cnt);
 		}
 	} else {
 		printf(" {");
-		ppp_print((u_char *)ptr, length - cnt);
+		ppp_print(ptr, length - cnt);
 		printf("}");
 	}
 
diff --git a/print-lane.c b/print-lane.c
index 1c3c2c2..aa79311 100644
--- a/print-lane.c
+++ b/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
@@ -60,25 +60,10 @@
 	{ 0,		NULL }
 };
 
-static inline void
-lane_hdr_print(register const u_char *bp, int length)
+static void
+lane_hdr_print(netdissect_options *ndo, const u_char *bp)
 {
-	register const struct lecdatahdr_8023 *ep;
-
-	ep = (const struct lecdatahdr_8023 *)bp;
-	if (qflag)
-		(void)printf("lecid:%x %s %s %d: ",
-			     EXTRACT_16BITS(&ep->le_header),
-			     etheraddr_string(ep->h_source),
-			     etheraddr_string(ep->h_dest),
-			     length);
-	else
-		(void)printf("lecid:%x %s %s %s %d: ",
-			     EXTRACT_16BITS(&ep->le_header),
-			     etheraddr_string(ep->h_source),
-			     etheraddr_string(ep->h_dest),
-			     etherproto_string(ep->h_type),
-			     length);
+	(void)ND_PRINT((ndo, "lecid:%x ", EXTRACT_16BITS(bp)));
 }
 
 /*
@@ -93,9 +78,6 @@
 lane_print(const u_char *p, u_int length, u_int caplen)
 {
 	struct lane_controlhdr *lec;
-	struct lecdatahdr_8023 *ep;
-	u_short ether_type;
-	u_short extracted_ethertype;
 
 	if (caplen < sizeof(struct lane_controlhdr)) {
 		printf("[|lane]");
@@ -113,49 +95,18 @@
 		return;
 	}
 
-	if (caplen < sizeof(struct lecdatahdr_8023)) {
-		printf("[|lane]");
-		return;
-	}
-
-	if (eflag)
-		lane_hdr_print(p, length);
+	/*
+	 * Go past the LE header.
+	 */
+	length -= 2;
+	caplen -= 2;
+	p += 2;
 
 	/*
-	 * Go past the LANE header.
+	 * Now print the encapsulated frame, under the assumption
+	 * that it's an Ethernet frame.
 	 */
-	length -= sizeof(struct lecdatahdr_8023);
-	caplen -= sizeof(struct lecdatahdr_8023);
-	ep = (struct lecdatahdr_8023 *)p;
-	p += sizeof(struct lecdatahdr_8023);
-
-	ether_type = EXTRACT_16BITS(&ep->h_type);
-
-	/*
-	 * Is it (gag) an 802.3 encapsulation?
-	 */
-	if (ether_type <= ETHERMTU) {
-		/* Try to print the LLC-layer header & higher layers */
-		if (llc_print(p, length, caplen, ep->h_source, ep->h_dest,
-		    &extracted_ethertype) == 0) {
-			/* ether_type not known, print raw packet */
-			if (!eflag)
-				lane_hdr_print((u_char *)ep, length + sizeof(*ep));
-			if (extracted_ethertype) {
-				printf("(LLC %s) ",
-			       etherproto_string(htons(extracted_ethertype)));
-			}
-			if (!suppress_default_print)
-				default_print(p, caplen);
-		}
-	} else if (ether_encap_print(ether_type, p, length, caplen,
-	    &extracted_ethertype) == 0) {
-		/* ether_type not known, print raw packet */
-		if (!eflag)
-			lane_hdr_print((u_char *)ep, length + sizeof(*ep));
-		if (!suppress_default_print)
-			default_print(p, caplen);
-	}
+	ether_print(gndo, p, length, caplen, lane_hdr_print, p - 2);
 }
 
 u_int
diff --git a/print-ldp.c b/print-ldp.c
index 3280d8c..262c9bd 100644
--- a/print-ldp.c
+++ b/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 @@
 #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 @@
 
 #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 @@
 #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,13 +173,14 @@
     { 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}
 };
 
 #define LDP_FEC_WILDCARD	0x01
 #define LDP_FEC_PREFIX		0x02
 #define LDP_FEC_HOSTADDRESS	0x03
-/* From draft-martini-l2circuit-trans-mpls-13.txt */
+/* From RFC 4906; should probably be updated to RFC 4447 (e.g., VC -> PW) */
 #define LDP_FEC_MARTINI_VC	0x80
 
 static const struct tok ldp_fec_values[] = {
@@ -215,8 +218,6 @@
     { 0, NULL}
 };
 
-#define AFNUM_LEN       2 
-
 int ldp_msg_print(register const u_char *);
 int ldp_tlv_print(register const u_char *);
    
@@ -237,6 +238,9 @@
  * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  */
 
+#define TLV_TCHECK(minlen) \
+    TCHECK2(*tptr, minlen); if (tlv_tlen < minlen) goto badtlv;
+
 int
 ldp_tlv_print(register const u_char *tptr) {
 
@@ -272,6 +276,7 @@
     switch(tlv_type) {
 
     case LDP_TLV_COMMON_HELLO:
+        TLV_TCHECK(4);
         printf("\n\t      Hold Time: %us, Flags: [%s Hello%s]",
                EXTRACT_16BITS(tptr),
                (EXTRACT_16BITS(tptr+2)&0x8000) ? "Targeted" : "Link",
@@ -279,43 +284,54 @@
         break;
 
     case LDP_TLV_IPV4_TRANSPORT_ADDR:
+        TLV_TCHECK(4);
         printf("\n\t      IPv4 Transport Address: %s", ipaddr_string(tptr));
         break;
 #ifdef INET6
     case LDP_TLV_IPV6_TRANSPORT_ADDR:
+        TLV_TCHECK(16);
         printf("\n\t      IPv6 Transport Address: %s", ip6addr_string(tptr));
         break;
 #endif
     case LDP_TLV_CONFIG_SEQ_NUMBER:
+        TLV_TCHECK(4);
         printf("\n\t      Sequence Number: %u", EXTRACT_32BITS(tptr));
         break;
 
     case LDP_TLV_ADDRESS_LIST:
+        TLV_TCHECK(LDP_TLV_ADDRESS_LIST_AFNUM_LEN);
 	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)) {
+		TCHECK2(*tptr, 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)) {
+		TCHECK2(*tptr, 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:
+	TLV_TCHECK(8);
 	printf("\n\t      Version: %u, Keepalive: %us, Flags: [Downstream %s, Loop Detection %s]",
 	       EXTRACT_16BITS(tptr), EXTRACT_16BITS(tptr+2),
 	       (EXTRACT_16BITS(tptr+6)&0x8000) ? "On Demand" : "Unsolicited",
@@ -324,50 +340,86 @@
 	break;
 
     case LDP_TLV_FEC:
+        TLV_TCHECK(1);
         fec_type = *tptr;
 	printf("\n\t      %s FEC (0x%02x)",
 	       tok2str(ldp_fec_values, "Unknown", fec_type),
 	       fec_type);
 
 	tptr+=1;
+	tlv_tlen-=1;
 	switch(fec_type) {
 
 	case LDP_FEC_WILDCARD:
 	    break;
 	case LDP_FEC_PREFIX:
+	    TLV_TCHECK(2);
 	    af = EXTRACT_16BITS(tptr);
-	    tptr+=2;
+	    tptr+=LDP_TLV_ADDRESS_LIST_AFNUM_LEN;
+	    tlv_tlen-=LDP_TLV_ADDRESS_LIST_AFNUM_LEN;
 	    if (af == AFNUM_INET) {
-		i=decode_prefix4(tptr,buf,sizeof(buf));
-		printf(": IPv4 prefix %s",buf);
+		i=decode_prefix4(tptr,tlv_tlen,buf,sizeof(buf));
+		if (i == -2)
+		    goto trunc;
+		if (i == -3)
+		    printf(": IPv4 prefix (goes past end of TLV)");
+		else if (i == -1)
+		    printf(": IPv4 prefix (invalid length)");
+		else
+		    printf(": IPv4 prefix %s",buf);
 	    }
 #ifdef INET6
 	    else if (af == AFNUM_INET6) {
-		i=decode_prefix6(tptr,buf,sizeof(buf));
-		printf(": IPv6 prefix %s",buf);
+		i=decode_prefix6(tptr,tlv_tlen,buf,sizeof(buf));
+		if (i == -2)
+		    goto trunc;
+		if (i == -3)
+		    printf(": IPv4 prefix (goes past end of TLV)");
+		else if (i == -1)
+		    printf(": IPv6 prefix (invalid length)");
+		else
+		    printf(": IPv6 prefix %s",buf);
 	    }
 #endif
+	    else
+		printf(": Address family %u prefix", af);
 	    break;
 	case LDP_FEC_HOSTADDRESS:
 	    break;
 	case LDP_FEC_MARTINI_VC:
-            if (!TTEST2(*tptr, 11))
-                goto trunc;
+            /*
+	     * According to RFC 4908, the VC info Length field can be zero,
+	     * in which case not only are there no interface parameters,
+	     * there's no VC ID.
+	     */
+            TLV_TCHECK(7);
             vc_info_len = *(tptr+2);
 
+            if (vc_info_len == 0) {
+                printf(": %s, %scontrol word, group-ID %u, VC-info-length: %u",
+                       tok2str(l2vpn_encaps_values, "Unknown", EXTRACT_16BITS(tptr)&0x7fff),
+                       EXTRACT_16BITS(tptr)&0x8000 ? "" : "no ",
+                       EXTRACT_32BITS(tptr+3),
+                       vc_info_len);
+                break;
+            }
+
+            /* Make sure we have the VC ID as well */
+            TLV_TCHECK(11);
 	    printf(": %s, %scontrol word, group-ID %u, VC-ID %u, VC-info-length: %u",
 		   tok2str(l2vpn_encaps_values, "Unknown", EXTRACT_16BITS(tptr)&0x7fff),
 		   EXTRACT_16BITS(tptr)&0x8000 ? "" : "no ",
                    EXTRACT_32BITS(tptr+3),
 		   EXTRACT_32BITS(tptr+7),
                    vc_info_len);
+            if (vc_info_len < 4)
+                goto trunc; /* minimum 4, for the VC ID */
+            vc_info_len -= 4; /* subtract out the VC ID, giving the length of the interface parameters */
 
-            if (vc_info_len == 0) /* infinite loop protection */
-                break;
-
+            /* Skip past the fixed information and the VC ID */
             tptr+=11;
-            if (!TTEST2(*tptr, vc_info_len))
-                goto trunc;
+            tlv_tlen-=11;
+            TLV_TCHECK(vc_info_len);
 
             while (vc_info_len > 2) {
                 vc_info_tlv_type = *tptr;
@@ -416,10 +468,12 @@
 	break;
 
     case LDP_TLV_GENERIC_LABEL:
+	TLV_TCHECK(4);
 	printf("\n\t      Label: %u", EXTRACT_32BITS(tptr) & 0xfffff);
 	break;
 
     case LDP_TLV_STATUS:
+	TLV_TCHECK(8);
 	ui = EXTRACT_32BITS(tptr);
 	tptr+=4;
 	printf("\n\t      Status: 0x%02x, Flags: [%s and %s forward]",
@@ -433,6 +487,7 @@
 	break;
 
     case LDP_TLV_FT_SESSION:
+	TLV_TCHECK(8);
 	ft_flags = EXTRACT_16BITS(tptr);
 	printf("\n\t      Flags: [%sReconnect, %sSave State, %sAll-Label Protection, %s Checkpoint, %sRe-Learn State]",
 	       ft_flags&0x8000 ? "" : "No ",
@@ -450,6 +505,11 @@
 	    printf(", Recovery Time: %ums", ui);
 	break;
 
+    case LDP_TLV_MTU:
+	TLV_TCHECK(2);
+	printf("\n\t      MTU: %u", EXTRACT_16BITS(tptr));
+	break;
+
 
     /*
      *  FIXME those are the defined TLVs that lack a decoder
@@ -477,6 +537,10 @@
 trunc:
     printf("\n\t\t packet exceeded snapshot");
     return 0;
+
+badtlv:
+    printf("\n\t\t TLV contents go past end of TLV");
+    return(tlv_len+4); /* Type & Length fields not included */
 }
 
 void
@@ -537,8 +601,7 @@
 
     while(tlen>0) {
         /* did we capture enough for fully decoding the msg header ? */
-        if (!TTEST2(*tptr, sizeof(struct ldp_msg_header)))
-            goto trunc;
+        TCHECK2(*tptr, sizeof(struct ldp_msg_header));
 
         ldp_msg_header = (const struct ldp_msg_header *)tptr;
         msg_len=EXTRACT_16BITS(ldp_msg_header->length);
@@ -561,8 +624,7 @@
         msg_tlen=msg_len-sizeof(struct ldp_msg_header)+4; /* Type & Length fields not included */
 
         /* did we capture enough for fully decoding the message ? */
-        if (!TTEST2(*tptr, msg_len))
-            goto trunc;
+        TCHECK2(*tptr, msg_len);
         hexdump=FALSE;
 
         switch(msg_type) {
@@ -600,7 +662,7 @@
         }
         /* do we want to see an additionally hexdump ? */
         if (vflag > 1 || hexdump==TRUE)
-            print_unknown_data(tptr+sizeof(sizeof(struct ldp_msg_header)),"\n\t  ",
+            print_unknown_data(tptr+sizeof(struct ldp_msg_header),"\n\t  ",
                                msg_len);
 
         tptr += msg_len+4;
diff --git a/print-llc.c b/print-llc.c
index bc41985..356e313 100644
--- a/print-llc.c
+++ b/print-llc.c
@@ -24,7 +24,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
@@ -44,7 +44,7 @@
 #include "ethertype.h"
 #include "oui.h"
 
-static struct tok llc_values[] = {
+static const struct tok llc_values[] = {
         { LLCSAP_NULL,     "Null" },
         { LLCSAP_GLOBAL,   "Global" },
         { LLCSAP_8021B_I,  "802.1B I" },
@@ -63,7 +63,7 @@
         { 0,               NULL },
 };
 
-static struct tok llc_cmd_values[] = {
+static const struct tok llc_cmd_values[] = {
 	{ LLC_UI,	"ui" },
 	{ LLC_TEST,	"test" },
 	{ LLC_XID,	"xid" },
@@ -105,6 +105,9 @@
 	{ PID_CISCO_CDP, "CDP" },
 	{ PID_CISCO_VTP, "VTP" },
 	{ PID_CISCO_DTP, "DTP" },
+	{ PID_CISCO_UDLD, "UDLD" },
+	{ PID_CISCO_PVST, "PVST" },
+	{ PID_CISCO_VLANBRIDGE, "VLAN Bridge" },
 	{ 0,             NULL }
 };
 
@@ -307,8 +310,7 @@
 		 * Does anybody ever bridge one form of LAN traffic
 		 * over a networking type that uses 802.2 LLC?
 		 */
-		ret = snap_print(p+3, length-3, caplen-3, extracted_ethertype,
-		    2);
+		ret = snap_print(p+3, length-3, caplen-3, 2);
 		if (ret)
 			return (ret);
 	}
@@ -376,8 +378,7 @@
 }
 
 int
-snap_print(const u_char *p, u_int length, u_int caplen,
-    u_short *extracted_ethertype, u_int bridge_pad)
+snap_print(const u_char *p, u_int length, u_int caplen, u_int bridge_pad)
 {
 	u_int32_t orgcode;
 	register u_short et;
@@ -417,8 +418,7 @@
 		 * Cisco hardware; the protocol ID is
 		 * an Ethernet protocol type.
 		 */
-		ret = ether_encap_print(et, p, length, caplen,
-		    extracted_ethertype);
+		ret = ethertype_print(gndo, et, p, length, caplen);
 		if (ret)
 			return (ret);
 		break;
@@ -433,19 +433,33 @@
 			 * but used 0x000000 and an Ethernet
 			 * packet type for AARP packets.
 			 */
-			ret = ether_encap_print(et, p, length, caplen,
-			    extracted_ethertype);
+			ret = ethertype_print(gndo, et, p, length, caplen);
 			if (ret)
 				return (ret);
 		}
 		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:
+                case PID_CISCO_VLANBRIDGE:
+                        stp_print(p, length);
+                        return (1);
+                default:
+                        break;
+                }
 
 	case OUI_RFC2684:
 		switch (et) {
@@ -467,7 +481,7 @@
 			/*
 			 * What remains is an Ethernet packet.
 			 */
-			ether_print(p, length, caplen);
+			ether_print(gndo, p, length, caplen, NULL, NULL);
 			return (1);
 
 		case PID_RFC2684_802_5_FCS:
diff --git a/print-lldp.c b/print-lldp.c
new file mode 100644
index 0000000..04591ab
--- /dev/null
+++ b/print-lldp.c
@@ -0,0 +1,1605 @@
+/*
+ * 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>
+ * DCBX extensions by Kaladhar Musunuru <kaladharm@sourceforge.net>
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+"@(#) $Header: /tcpdump/master/tcpdump/print-lldp.c,v 1.10 2008-03-20 09:30:56 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
+#define LLDP_PRIVATE_8021_SUBTYPE_CONGESTION_NOTIFICATION 8
+#define LLDP_PRIVATE_8021_SUBTYPE_ETS_CONFIGURATION       9
+#define LLDP_PRIVATE_8021_SUBTYPE_ETS_RECOMMENDATION     10
+#define LLDP_PRIVATE_8021_SUBTYPE_PFC_CONFIGURATION      11
+#define LLDP_PRIVATE_8021_SUBTYPE_APPLICATION_PRIORITY   12
+#define LLDP_PRIVATE_8021_SUBTYPE_EVB                    13
+#define LLDP_PRIVATE_8021_SUBTYPE_CDCP 			 14
+
+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"},
+    { LLDP_PRIVATE_8021_SUBTYPE_CONGESTION_NOTIFICATION, "Congestion Notification"},
+    { LLDP_PRIVATE_8021_SUBTYPE_ETS_CONFIGURATION, "ETS Configuration"},
+    { LLDP_PRIVATE_8021_SUBTYPE_ETS_RECOMMENDATION, "ETS Recommendation"},
+    { LLDP_PRIVATE_8021_SUBTYPE_PFC_CONFIGURATION, "Priority Flow Control Configuration"},
+    { LLDP_PRIVATE_8021_SUBTYPE_APPLICATION_PRIORITY, "Application Priority"},
+    { LLDP_PRIVATE_8021_SUBTYPE_EVB, "EVB"},
+    { LLDP_PRIVATE_8021_SUBTYPE_CDCP,"CDCP"},
+    { 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_X_BIT           (1 << 5)
+#define LLDP_TIA_NETWORK_POLICY_T_BIT           (1 << 6)
+#define LLDP_TIA_NETWORK_POLICY_U_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}
+};
+
+/*
+ * DCBX protocol subtypes.
+ */
+#define LLDP_DCBX_SUBTYPE_1                1
+#define LLDP_DCBX_SUBTYPE_2                2
+
+static const struct tok lldp_dcbx_subtype_values[] = {
+    { LLDP_DCBX_SUBTYPE_1, "DCB Capability Exchange Protocol Rev 1" },
+    { LLDP_DCBX_SUBTYPE_2, "DCB Capability Exchange Protocol Rev 1.01" },
+    { 0, NULL}
+};
+
+#define LLDP_DCBX_CONTROL_TLV                1
+#define LLDP_DCBX_PRIORITY_GROUPS_TLV        2
+#define LLDP_DCBX_PRIORITY_FLOW_CONTROL_TLV  3
+#define LLDP_DCBX_APPLICATION_TLV            4
+
+/*
+ * 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
+
+#define LLDP_EVB_MODE_NOT_SUPPORTED	0
+#define LLDP_EVB_MODE_EVB_BRIDGE	1
+#define LLDP_EVB_MODE_EVB_STATION	2
+#define LLDP_EVB_MODE_RESERVED		3
+
+static const struct tok lldp_evb_mode_values[]={
+    { LLDP_EVB_MODE_NOT_SUPPORTED, "Not Supported"},
+    { LLDP_EVB_MODE_EVB_BRIDGE, "EVB Bridge"},
+    { LLDP_EVB_MODE_EVB_STATION, "EVB Staion"},
+    { LLDP_EVB_MODE_RESERVED, "Reserved for future Standardization"},
+};
+
+#define NO_OF_BITS 8
+#define LLDP_PRIVATE_8021_SUBTYPE_CONGESTION_NOTIFICATION_LENGTH  6
+#define LLDP_PRIVATE_8021_SUBTYPE_ETS_CONFIGURATION_LENGTH       25
+#define LLDP_PRIVATE_8021_SUBTYPE_ETS_RECOMMENDATION_LENGTH      25
+#define LLDP_PRIVATE_8021_SUBTYPE_PFC_CONFIGURATION_LENGTH        6
+#define LLDP_PRIVATE_8021_SUBTYPE_APPLICATION_PRIORITY_MIN_LENGTH 5
+#define LLDP_PRIVATE_8021_SUBTYPE_EVB_LENGTH                      9
+#define LLDP_PRIVATE_8021_SUBTYPE_CDCP_MIN_LENGTH                 8
+
+static void print_ets_priority_assignment_table(const u_char *ptr)
+{
+    printf("\n\t    Priority Assignment Table");
+    printf("\n\t     Priority : 0   1   2   3   4   5   6   7");
+    printf("\n\t     Value    : %-3d %-3d %-3d %-3d %-3d %-3d %-3d %-3d",
+            ptr[0]>>4,ptr[0]&0x0f,ptr[1]>>4,ptr[1]&0x0f,ptr[2]>>4,
+            ptr[2]&0x0f,ptr[3]>>4,ptr[3]&0x0f);
+}
+
+static void print_tc_bandwidth_table(const u_char *ptr)
+{
+    printf("\n\t    TC Bandwidth Table");
+    printf("\n\t     TC%%   : 0   1   2   3   4   5   6   7");
+    printf("\n\t     Value : %-3d %-3d %-3d %-3d %-3d %-3d %-3d %-3d",
+             ptr[0],ptr[1],ptr[2],ptr[3],ptr[4],ptr[5],ptr[6],ptr[7]);
+}
+
+static void print_tsa_assignment_table(const u_char *ptr)
+{
+    printf("\n\t    TSA Assignment Table");
+    printf("\n\t     Traffic Class: 0   1   2   3   4   5   6   7");
+    printf("\n\t     Value        : %-3d %-3d %-3d %-3d %-3d %-3d %-3d %-3d", 
+             ptr[0],ptr[1],ptr[2],ptr[3],ptr[4],ptr[5],ptr[6],ptr[7]);
+}
+
+/*
+ * Print IEEE 802.1 private extensions. (802.1AB annex E)
+ */
+static int
+lldp_private_8021_print(const u_char *tptr, u_int tlv_len)
+{
+    int subtype, hexdump = FALSE;
+    u_int sublen;
+    u_int tval;
+    u_int8_t i;
+
+    if (tlv_len < 4) {
+        return hexdump;
+    }
+    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:
+        if (tlv_len < 6) {
+            return hexdump;
+        }
+        printf("\n\t    port vlan id (PVID): %u",
+               EXTRACT_16BITS(tptr+4));
+        break;
+    case LLDP_PRIVATE_8021_SUBTYPE_PROTOCOL_VLAN_ID:
+        if (tlv_len < 7) {
+            return hexdump;
+        }
+        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:
+        if (tlv_len < 6) {
+            return hexdump;
+        }
+        printf("\n\t    vlan id (VID): %u",
+               EXTRACT_16BITS(tptr+4));
+        if (tlv_len < 7) {
+            return hexdump;
+        }
+        sublen = *(tptr+6);
+        if (tlv_len < 7+sublen) {
+            return hexdump;
+        }
+        printf("\n\t    vlan name: ");
+        safeputs((const char *)tptr+7, sublen);
+        break;
+    case LLDP_PRIVATE_8021_SUBTYPE_PROTOCOL_IDENTITY:
+        if (tlv_len < 5) {
+            return hexdump;
+        }
+        sublen = *(tptr+4);
+        if (tlv_len < 5+sublen) {
+            return hexdump;
+        }
+        printf("\n\t    protocol identity: ");
+        safeputs((const char *)tptr+5, sublen);
+        break;
+    case LLDP_PRIVATE_8021_SUBTYPE_CONGESTION_NOTIFICATION:
+        if(tlv_len<LLDP_PRIVATE_8021_SUBTYPE_CONGESTION_NOTIFICATION_LENGTH){
+        	return hexdump;
+        }
+        tval=*(tptr+4);
+        printf("\n\t    Pre-Priority CNPV Indicator");
+        printf("\n\t     Priority : 0  1  2  3  4  5  6  7");        
+        printf("\n\t     Value    : ");
+        for(i=0;i<NO_OF_BITS;i++)
+            printf("%-2d ",(tval>>i)&0x01);
+        tval=*(tptr+5);
+        printf("\n\t    Pre-Priority Ready Indicator");
+        printf("\n\t     Priority : 0  1  2  3  4  5  6  7");
+        printf("\n\t     Value    : ");
+        for(i=0;i<NO_OF_BITS;i++)
+            printf("%-2d ",(tval>>i)&0x01);
+        break;
+
+    case LLDP_PRIVATE_8021_SUBTYPE_ETS_CONFIGURATION: 
+        if(tlv_len<LLDP_PRIVATE_8021_SUBTYPE_ETS_CONFIGURATION_LENGTH) {
+            return hexdump;
+        }
+        tval=*(tptr+4);
+        printf("\n\t    Willing:%d, CBS:%d, RES:%d, Max TCs:%d",
+        	tval>>7, (tval>>6) & 0x02, (tval>>3) & 0x07, tval & 0x07);
+		
+        /*Print Priority Assignment Table*/
+        print_ets_priority_assignment_table(tptr+5);
+	
+        /*Print TC Bandwidth Table*/
+        print_tc_bandwidth_table(tptr+9);
+		
+        /* Print TSA Assignment Table */
+        print_tsa_assignment_table(tptr+17);
+		
+        break;
+
+    case LLDP_PRIVATE_8021_SUBTYPE_ETS_RECOMMENDATION:
+        if(tlv_len<LLDP_PRIVATE_8021_SUBTYPE_ETS_RECOMMENDATION_LENGTH) {
+        	return hexdump;
+        }       
+        printf("\n\t    RES: %d",*(tptr+4));
+        /*Print Priority Assignment Table */ 
+        print_ets_priority_assignment_table(tptr+5);
+        /*Print TC Bandwidth Table */
+        print_tc_bandwidth_table(tptr+9);
+        /* Print TSA Assignment Table */
+        print_tsa_assignment_table(tptr+17);
+        break;
+
+    case LLDP_PRIVATE_8021_SUBTYPE_PFC_CONFIGURATION:
+        if(tlv_len<LLDP_PRIVATE_8021_SUBTYPE_PFC_CONFIGURATION_LENGTH) {
+            return hexdump;
+        }
+        tval=*(tptr+4);
+        printf("\n\t    Willing: %d, MBC: %d, RES: %d, PFC cap:%d ",
+        	tval>>7, (tval>>6)&0x01, (tval>>4)&0x03, (tval & 0x0f));
+        printf("\n\t    PFC Enable");
+        tval=*(tptr+5);
+        printf("\n\t     Priority : 0  1  2  3  4  5  6  7");
+        printf("\n\t     Value    : ");
+        for(i=0;i<NO_OF_BITS;i++)
+            printf("%-2d ",(tval>>i)&0x01);
+        break;
+
+    case LLDP_PRIVATE_8021_SUBTYPE_APPLICATION_PRIORITY:
+        if(tlv_len<LLDP_PRIVATE_8021_SUBTYPE_APPLICATION_PRIORITY_MIN_LENGTH) {
+            return hexdump;
+        }
+        printf("\n\t    RES: %d",*(tptr+4));
+        if(tlv_len<=LLDP_PRIVATE_8021_SUBTYPE_APPLICATION_PRIORITY_MIN_LENGTH){
+        	return hexdump;
+        }
+        /*  Length of Application Priority Table */
+        sublen=tlv_len-5; 
+        if(sublen%3!=0){
+        	return hexdump;
+        }
+        i=0;
+        printf("\n\t    Application Priority Table");
+        while(i<sublen) {
+        	tval=*(tptr+i+5);
+        	printf("\n\t      Priority: %d, RES: %d, Sel: %d",
+        		 tval>>5, (tval>>3)&0x03, (tval & 0x07));
+        	printf("Protocol ID: %d",EXTRACT_16BITS(tptr+i+5));
+        	i=i+3;
+        }
+        break;
+    case LLDP_PRIVATE_8021_SUBTYPE_EVB:
+        if(tlv_len<LLDP_PRIVATE_8021_SUBTYPE_EVB_LENGTH){
+        	return hexdump;
+        }
+        printf("\n\t    EVB Bridge Status");
+        tval=*(tptr+4);
+        printf("\n\t      RES: %d, BGID: %d, RRCAP: %d, RRCTR: %d",
+        	tval>>3, (tval>>2)&0x01, (tval>>1)&0x01,tval&0x01);
+        printf("\n\t    EVB Station Status");
+        tval=*(tptr+5);
+        printf("\n\t      RES: %d, SGID: %d, RRREQ: %d,RRSTAT: %d",
+        	tval>>4, (tval>>3)&0x01, (tval>>2)&0x01, tval&0x03);
+        tval=*(tptr+6);
+        printf("\n\t    R: %d, RTE: %d, ",tval>>5, tval&0x1f);
+        tval=*(tptr+7);
+        printf("EVB Mode: %s [%d]",
+        	tok2str(lldp_evb_mode_values,"unknown",tval>>6),tval>>6);
+        printf("\n\t    ROL: %d, RWD: %d, ", (tval>>5)&0x01,tval&0x1f);
+        tval=*(tptr+8);
+        printf("RES: %d, ROL: %d, RKA: %d", tval>>6,(tval>>5)&0x01, tval&0x1f);
+        break;
+
+    case LLDP_PRIVATE_8021_SUBTYPE_CDCP:
+        if(tlv_len<LLDP_PRIVATE_8021_SUBTYPE_CDCP_MIN_LENGTH){
+        	return hexdump;
+        }
+        tval=*(tptr+4);
+        printf("\n\t    Role: %d, RES: %d, Scomp: %d ",
+        	tval>>7, (tval>>4)&0x07,(tval>>3)&0x01);
+        printf("ChnCap: %d",EXTRACT_16BITS(tptr+6)&0x0fff);
+        sublen=tlv_len-8;
+        if(sublen%3!=0) {
+        	return hexdump;
+        }	
+        i=0;
+        while(i<sublen) {
+        	tval=EXTRACT_24BITS(tptr+i+8);
+        	printf("\n\t    SCID: %d, SVID: %d",
+        		tval>>12, tval&0x000fff);
+        	i=i+3;
+        }
+        break;
+
+    default:
+        hexdump = TRUE;
+        break;
+    }
+
+    return hexdump;
+}
+
+/*
+ * Print IEEE 802.3 private extensions. (802.3bc)
+ */
+static int
+lldp_private_8023_print(const u_char *tptr, u_int tlv_len)
+{
+    int subtype, hexdump = FALSE;
+
+    if (tlv_len < 4) {
+        return hexdump;
+    }
+    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:
+        if (tlv_len < 9) {
+            return hexdump;
+        }
+        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:
+        if (tlv_len < 7) {
+            return hexdump;
+        }
+        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:
+        if (tlv_len < 9) {
+            return hexdump;
+        }
+        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_int lci_len;
+    u_int8_t ca_type, ca_len;
+
+    if (tlv_len < 4) {
+        return hexdump;
+    }
+    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:
+        if (tlv_len < 7) {
+            return hexdump;
+        }
+        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:
+        if (tlv_len < 8) {
+            return hexdump;
+        }
+        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:
+        if (tlv_len < 5) {
+            return hexdump;
+        }
+        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:
+            if (tlv_len < 21) {
+                return hexdump;
+            }
+            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:
+            if (tlv_len < 6) {
+                return hexdump;
+            }
+            lci_len = *(tptr+5);
+            if (lci_len < 3) {
+                return hexdump;
+            }
+            if (tlv_len < 7+lci_len) {
+                return hexdump;
+            }
+            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) {
+                if (lci_len < 2) {
+                    return hexdump;
+                }
+		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;
+		}
+		if (lci_len < ca_len) {
+		    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:
+        if (tlv_len < 7) {
+            return hexdump;
+        }
+        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;
+}
+
+/*
+ * Print DCBX Protocol fields (V 1.01).
+ */
+static int
+lldp_private_dcbx_print(const u_char *pptr, u_int len)
+{
+    int subtype, hexdump = FALSE;
+    u_int8_t tval;
+    u_int16_t tlv;
+    u_int32_t i, pgval, uval;
+    u_int tlen, tlv_type, tlv_len;
+    const u_char *tptr, *mptr;
+
+    if (len < 4) {
+        return hexdump;
+    }
+    subtype = *(pptr+3);
+
+    printf("\n\t  %s Subtype (%u)",
+           tok2str(lldp_dcbx_subtype_values, "unknown", subtype),
+           subtype);
+
+    /* by passing old version */
+    if (subtype == LLDP_DCBX_SUBTYPE_1)
+	return TRUE;
+
+    tptr = pptr + 4;
+    tlen = len - 4;
+
+    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);
+
+        /* loop check */
+        if (!tlv_type || !tlv_len) {
+            break;
+        }
+
+        TCHECK2(*tptr, tlv_len);
+        if (tlen < tlv_len) {
+            goto trunc;
+        }
+
+	/* decode every tlv */
+        switch (tlv_type) {
+        case LLDP_DCBX_CONTROL_TLV:
+            if (tlv_len < 10) {
+                goto trunc;
+            }
+	    printf("\n\t    Control - Protocol Control (type 0x%x, length %d)",
+		LLDP_DCBX_CONTROL_TLV, tlv_len);
+	    printf("\n\t      Oper_Version: %d", *tptr);
+	    printf("\n\t      Max_Version: %d", *(tptr+1));
+	    printf("\n\t      Sequence Number: %d", EXTRACT_32BITS(tptr+2));
+	    printf("\n\t      Acknowledgement Number: %d",
+					EXTRACT_32BITS(tptr+6));
+	    break;
+        case LLDP_DCBX_PRIORITY_GROUPS_TLV:
+            if (tlv_len < 17) {
+                goto trunc;
+            }
+	    printf("\n\t    Feature - Priority Group (type 0x%x, length %d)",
+		LLDP_DCBX_PRIORITY_GROUPS_TLV, tlv_len);
+	    printf("\n\t      Oper_Version: %d", *tptr);
+	    printf("\n\t      Max_Version: %d", *(tptr+1));
+	    printf("\n\t      Info block(0x%02X): ", *(tptr+2));
+	    tval = *(tptr+2);
+	    printf("Enable bit: %d, Willing bit: %d, Error Bit: %d",
+		(tval &  0x80) ? 1 : 0, (tval &  0x40) ? 1 : 0,
+		(tval &  0x20) ? 1 : 0);
+	    printf("\n\t      SubType: %d", *(tptr+3));
+	    printf("\n\t      Priority Allocation");
+
+	    pgval = EXTRACT_32BITS(tptr+4);
+	    for (i = 0; i <= 7; i++) {
+		tval = *(tptr+4+(i/2));
+		printf("\n\t          PgId_%d: %d",
+			i, (pgval >> (28-4*i)) & 0xF);
+	    }
+	    printf("\n\t      Priority Group Allocation");
+	    for (i = 0; i <= 7; i++)
+		printf("\n\t          Pg percentage[%d]: %d", i, *(tptr+8+i));
+	    printf("\n\t      NumTCsSupported: %d", *(tptr+8+8));
+	    break;
+        case LLDP_DCBX_PRIORITY_FLOW_CONTROL_TLV:
+            if (tlv_len < 6) {
+                goto trunc;
+            }
+	    printf("\n\t    Feature - Priority Flow Control");
+	    printf(" (type 0x%x, length %d)",
+		LLDP_DCBX_PRIORITY_FLOW_CONTROL_TLV, tlv_len);
+	    printf("\n\t      Oper_Version: %d", *tptr);
+	    printf("\n\t      Max_Version: %d", *(tptr+1));
+	    printf("\n\t      Info block(0x%02X): ", *(tptr+2));
+	    tval = *(tptr+2);
+	    printf("Enable bit: %d, Willing bit: %d, Error Bit: %d",
+		(tval &  0x80) ? 1 : 0, (tval &  0x40) ? 1 : 0,
+		(tval &  0x20) ? 1 : 0);
+	    printf("\n\t      SubType: %d", *(tptr+3));
+	    tval = *(tptr+4);
+	    printf("\n\t      PFC Config (0x%02X)", *(tptr+4));
+	    for (i = 0; i <= 7; i++)
+		printf("\n\t          Priority Bit %d: %s",
+		    i, (tval & (1 << i)) ? "Enabled" : "Disabled");
+	    printf("\n\t      NumTCPFCSupported: %d", *(tptr+5));
+	    break;
+        case LLDP_DCBX_APPLICATION_TLV:
+            if (tlv_len < 4) {
+                goto trunc;
+            }
+	    printf("\n\t    Feature - Application (type 0x%x, length %d)",
+		LLDP_DCBX_APPLICATION_TLV, tlv_len);
+	    printf("\n\t      Oper_Version: %d", *tptr);
+	    printf("\n\t      Max_Version: %d", *(tptr+1));
+	    printf("\n\t      Info block(0x%02X): ", *(tptr+2));
+	    tval = *(tptr+2);
+	    printf("Enable bit: %d, Willing bit: %d, Error Bit: %d",
+		(tval &  0x80) ? 1 : 0, (tval &  0x40) ? 1 : 0,
+		(tval &  0x20) ? 1 : 0);
+	    printf("\n\t      SubType: %d", *(tptr+3));
+	    tval = tlv_len - 4;
+	    mptr = tptr + 4;
+	    while (tval >= 6) {
+		printf("\n\t      Application Value");
+		printf("\n\t          Application Protocol ID: 0x%04x",
+			EXTRACT_16BITS(mptr));
+		uval = EXTRACT_24BITS(mptr+2);
+		printf("\n\t          SF (0x%x) Application Protocol ID is %s",
+			(uval >> 22),
+			(uval >> 22) ? "Socket Number" : "L2 EtherType");
+		printf("\n\t          OUI: 0x%06x", uval & 0x3fffff);
+		printf("\n\t          User Priority Map: 0x%02x", *(mptr+5));
+		tval = tval - 6;
+		mptr = mptr + 6;
+	    }
+	    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;
+    }
+
+ trunc:
+    return hexdump;
+}
+
+static char *
+lldp_network_addr_print(const u_char *tptr, u_int len) {
+
+    u_int8_t af;
+    static char buf[BUFSIZE];
+    const char * (*pfunc)(const u_char *);
+
+    if (len < 1)
+      return NULL;
+    len--;
+    af = *tptr;
+    switch (af) {
+    case AFNUM_INET:
+        if (len < 4)
+          return NULL;
+        pfunc = getname; 
+        break;
+#ifdef INET6
+    case AFNUM_INET6:
+        if (len < 16)
+          return NULL;
+        pfunc = getname6;
+        break;
+#endif
+    case AFNUM_802:
+        if (len < 6)
+          return NULL;
+        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;
+    char *mgmt_addr;
+    
+    tlen = len;
+    tptr = pptr;
+
+    if (tlen < 1) {
+        return 0;
+    }
+    mgmt_addr_len = *tptr++;
+    tlen--;
+
+    if (tlen < mgmt_addr_len) {
+        return 0;
+    }
+
+    mgmt_addr = lldp_network_addr_print(tptr, mgmt_addr_len);
+    if (mgmt_addr == NULL) {
+        return 0;
+    }
+    printf("\n\t  Management Address length %u, %s",
+           mgmt_addr_len, mgmt_addr);
+    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 (tlen < oid_len) {
+            return 0;
+        }
+        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;
+    char *network_addr;
+    
+    tptr = pptr;
+    tlen = len;
+
+    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);
+        if (tlen < tlv_len) {
+            goto trunc;
+        }
+
+        switch (tlv_type) {
+
+        case LLDP_CHASSIS_ID_TLV:
+            if (vflag) {
+                if (tlv_len < 2) {
+                    goto trunc;
+                }
+                subtype = *tptr;
+                printf("\n\t  Subtype %s (%u): ",
+                       tok2str(lldp_chassis_subtype_values, "Unknown", subtype),
+                       subtype);
+
+                switch (subtype) {
+                case LLDP_CHASSIS_MAC_ADDR_SUBTYPE:
+                    if (tlv_len < 1+6) {
+                        goto trunc;
+                    }
+                    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:
+                    network_addr = lldp_network_addr_print(tptr+1, tlv_len-1);
+                    if (network_addr == NULL) {
+                        goto trunc;
+                    }
+                    printf("%s", network_addr);
+                    break;
+
+                default:
+                    hexdump = TRUE;
+                    break;
+                }
+            }
+            break;
+
+        case LLDP_PORT_ID_TLV:
+            if (vflag) {
+                if (tlv_len < 2) {
+                    goto trunc;
+                }
+                subtype = *tptr;
+                printf("\n\t  Subtype %s (%u): ",
+                       tok2str(lldp_port_subtype_values, "Unknown", subtype),
+                       subtype);
+
+                switch (subtype) {
+                case LLDP_PORT_MAC_ADDR_SUBTYPE:
+                    if (tlv_len < 1+6) {
+                        goto trunc;
+                    }
+                    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:
+                    network_addr = lldp_network_addr_print(tptr+1, tlv_len-1);
+                    if (network_addr == NULL) {
+                        goto trunc;
+                    }
+                    printf("%s", network_addr);
+                    break;
+
+                default:
+                    hexdump = TRUE;
+                    break;
+                }
+            }
+            break;
+
+        case LLDP_TTL_TLV:
+            if (vflag) {
+                if (tlv_len < 2) {
+                    goto trunc;
+                }
+                printf(": TTL %us", EXTRACT_16BITS(tptr));
+            }
+            break;
+
+        case LLDP_PORT_DESCR_TLV:
+            if (vflag) {
+                printf(": ");
+                safeputs((const char *)tptr, tlv_len);
+            }
+            break;
+
+        case LLDP_SYSTEM_NAME_TLV:
+            /*
+             * The system name is also print in non-verbose mode
+             * similar to the CDP printer.
+             */
+            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_SYSTEM_CAP_TLV:
+            if (vflag) {
+                /*
+                 * XXX - IEEE Std 802.1AB-2009 says the first octet
+                 * if a chassis ID subtype, with the system
+                 * capabilities and enabled capabilities following
+                 * it.
+                 */
+                if (tlv_len < 4) {
+                    goto trunc;
+                }
+                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, tlv_len)) {
+                    goto trunc;
+                }
+            }
+            break;
+
+        case LLDP_PRIVATE_TLV:
+            if (vflag) {
+                if (tlv_len < 3) {
+                    goto trunc;
+                }
+                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, tlv_len);
+                    break;
+                case OUI_IEEE_8023_PRIVATE:
+                    hexdump = lldp_private_8023_print(tptr, tlv_len);
+                    break;
+                case OUI_TIA:
+                    hexdump = lldp_private_tia_print(tptr, tlv_len);
+                    break;
+                case OUI_DCBX:
+                    hexdump = lldp_private_dcbx_print(tptr, tlv_len);
+                    break;
+                default:
+                    hexdump = TRUE;
+                    break;
+                }
+            }
+            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/print-lmp.c b/print-lmp.c
index 84d166f..c03e12e 100644
--- a/print-lmp.c
+++ b/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_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 @@
         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;
@@ -550,8 +552,8 @@
             
 	    switch(lmp_obj_ctype) {
 	    case LMP_CTYPE_IPV4:
-		printf("\n\t    Local Link-ID: %s (0x%08x) \
-			\n\t    Remote Link-ID: %s (0x%08x)",
+		printf("\n\t    Local Link-ID: %s (0x%08x)"
+		       "\n\t    Remote Link-ID: %s (0x%08x)",
                        ipaddr_string(obj_tptr+4),
                        EXTRACT_32BITS(obj_tptr+4),
                        ipaddr_string(obj_tptr+8),
@@ -576,8 +578,8 @@
 	    switch(lmp_obj_ctype) {
 	    case LMP_CTYPE_IPV4:
 	    case LMP_CTYPE_UNMD:
-                printf("\n\t    Local Interface ID: %s (0x%08x) \
-			\n\t    Remote Interface ID: %s (0x%08x)",
+                printf("\n\t    Local Interface ID: %s (0x%08x)"
+                       "\n\t    Remote Interface ID: %s (0x%08x)",
                        ipaddr_string(obj_tptr+4),
                        EXTRACT_32BITS(obj_tptr+4),
                        ipaddr_string(obj_tptr+8),
@@ -648,10 +650,10 @@
 			EXTRACT_32BITS(obj_tptr+4));
                 printf("\n\t    Encoding type: %s",
 			tok2str(gmpls_encoding_values, "Unknown", *(obj_tptr+8)));
-                printf("\n\t    Verify Tranport Mechanism: %u (0x%x) %s",
+                printf("\n\t    Verify Transport Mechanism: %u (0x%x)%s",
 			EXTRACT_16BITS(obj_tptr+10),
 			EXTRACT_16BITS(obj_tptr+10),
-			EXTRACT_16BITS(obj_tptr+10)&8000 ? "(Payload test messages capable)" : "");
+			EXTRACT_16BITS(obj_tptr+10)&8000 ? " (Payload test messages capable)" : "");
                 bw.i = EXTRACT_32BITS(obj_tptr+12);
 		printf("\n\t    Transmission Rate: %.3f Mbps",bw.f*8/1000000);
 		printf("\n\t    Wavelength: %u",
@@ -666,8 +668,8 @@
         case LMP_OBJ_VERIFY_BEGIN_ACK:
 	    switch(lmp_obj_ctype) {
             case LMP_CTYPE_1:
-                printf("\n\t    Verify Dead Interval: %u 	\
-			\n\t    Verify Transport Response: %u",
+                printf("\n\t    Verify Dead Interval: %u"
+                       "\n\t    Verify Transport Response: %u",
                        EXTRACT_16BITS(obj_tptr),
                        EXTRACT_16BITS(obj_tptr+2));
                 break;
@@ -869,7 +871,7 @@
         }
         /* do we want to see an additionally hexdump ? */
         if (vflag > 1 || hexdump==TRUE)
-            print_unknown_data(tptr+sizeof(sizeof(struct lmp_object_header)),"\n\t    ",
+            print_unknown_data(tptr+sizeof(struct lmp_object_header),"\n\t    ",
                                lmp_obj_len-sizeof(struct lmp_object_header));
 
         tptr+=lmp_obj_len;
diff --git a/print-lspping.c b/print-lspping.c
index a80cdc6..2ca57fb 100644
--- a/print-lspping.c
+++ b/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.20 2008-01-28 14:20:43 hannes Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -34,6 +34,7 @@
 
 #include "bgp.h"
 #include "l2vpn.h"
+#include "oui.h"
 
 /*
  * LSPPING common header
@@ -134,7 +135,11 @@
 #define	LSPPING_TLV_TARGET_FEC_STACK      1
 #define	LSPPING_TLV_DOWNSTREAM_MAPPING    2
 #define	LSPPING_TLV_PAD                   3
-#define	LSPPING_TLV_ERROR_CODE            4
+#define LSPPING_TLV_VENDOR_ENTERPRISE     5
+#define LSPPING_TLV_VENDOR_ENTERPRISE_LEN 4
+#define LSPPING_TLV_INTERFACE_LABEL_STACK 7
+#define	LSPPING_TLV_ERROR_CODE            9
+#define LSPPING_TLV_REPLY_TOS_BYTE        10
 #define	LSPPING_TLV_BFD_DISCRIMINATOR     15 /* draft-ietf-bfd-mpls-02 */
 #define LSPPING_TLV_BFD_DISCRIMINATOR_LEN 4
 #define	LSPPING_TLV_VENDOR_PRIVATE        0xfc00
@@ -144,8 +149,11 @@
     { LSPPING_TLV_DOWNSTREAM_MAPPING, "Downstream Mapping" },
     { LSPPING_TLV_PAD, "Pad" },
     { LSPPING_TLV_ERROR_CODE, "Error Code" },
+    { LSPPING_TLV_VENDOR_ENTERPRISE, "Vendor Enterprise Code" },
+    { LSPPING_TLV_INTERFACE_LABEL_STACK, "Interface Label Stack" },
+    { LSPPING_TLV_REPLY_TOS_BYTE, "Reply TOS Byte" },
     { LSPPING_TLV_BFD_DISCRIMINATOR, "BFD Discriminator" },
-    { LSPPING_TLV_VENDOR_PRIVATE, "Vendor Enterprise Code" },
+    { LSPPING_TLV_VENDOR_PRIVATE, "Vendor Private Code" },
     { 0, NULL}
 };
 
@@ -566,6 +574,7 @@
     tlen-=sizeof(const struct lspping_common_header);
 
     while(tlen>(int)sizeof(struct lspping_tlv_header)) {
+
         /* did we capture enough for fully decoding the tlv header ? */
         if (!TTEST2(*tptr, sizeof(struct lspping_tlv_header)))
             goto trunc;
@@ -574,10 +583,11 @@
         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;
         }
@@ -839,11 +849,24 @@
                 goto trunc;
             printf("\n\t    BFD Discriminator 0x%08x", EXTRACT_32BITS(tptr));
             break;
+
+        case  LSPPING_TLV_VENDOR_ENTERPRISE:
+        {
+            u_int32_t vendor_id;
+
+            if (!TTEST2(*tptr, LSPPING_TLV_VENDOR_ENTERPRISE_LEN))
+                goto trunc;
+            vendor_id = EXTRACT_32BITS(tlv_tptr);
+            printf("\n\t    Vendor: %s (0x%04x)",
+                   tok2str(smi_values, "Unknown", vendor_id),
+                   vendor_id);
+        }
+            break;
+
             /*
              *  FIXME those are the defined TLVs that lack a decoder
              *  you are welcome to contribute code ;-)
              */
-
         case LSPPING_TLV_PAD:
         case LSPPING_TLV_ERROR_CODE:
         case LSPPING_TLV_VENDOR_PRIVATE:
@@ -855,9 +878,15 @@
         }
         /* do we want to see an additionally tlv hexdump ? */
         if (vflag > 1 || tlv_hexdump==TRUE)
-            print_unknown_data(tptr+sizeof(sizeof(struct lspping_tlv_header)),"\n\t    ",
+            print_unknown_data(tptr+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/print-lwapp.c b/print-lwapp.c
new file mode 100644
index 0000000..154876f
--- /dev/null
+++ b/print-lwapp.c
@@ -0,0 +1,359 @@
+/*
+ * 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  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;
+
+	/* 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/print-lwres.c b/print-lwres.c
index d0d6fe1..60acc5b 100644
--- a/print-lwres.c
+++ b/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
@@ -175,7 +175,7 @@
 #define LWRES_MAX_ALIASES		16		/* max # of aliases */
 #define LWRES_MAX_ADDRS			64		/* max # of addrs */
 
-struct tok opcode[] = {
+static const struct tok opcode[] = {
 	{ LWRES_OPCODE_NOOP,		"noop", },
 	{ LWRES_OPCODE_GETADDRSBYNAME,	"getaddrsbyname", },
 	{ LWRES_OPCODE_GETNAMEBYADDR,	"getnamebyaddr", },
@@ -184,8 +184,8 @@
 };
 
 /* print-domain.c */
-extern struct tok ns_type2str[];
-extern struct tok ns_class2str[];
+extern const struct tok ns_type2str[];
+extern const struct tok ns_class2str[];
 
 static int lwres_printname(size_t, const char *);
 static int lwres_printnamelen(const char *);
diff --git a/print-mobile.c b/print-mobile.c
index fe6f013..de4eab1 100644
--- a/print-mobile.c
+++ b/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>
@@ -72,6 +72,7 @@
 {
 	const u_char *cp = bp +8 ;
 	const struct mobile_ip *mob;
+	struct cksum_vec vec[1];
 	u_short proto,crc;
 	u_char osp =0;			/* old source address present */
 
@@ -101,7 +102,9 @@
 		(void)printf("> %s ",ipaddr_string(&mob->odst));
 		(void)printf("(oproto=%d)",proto>>8);
 	}
-	if (in_cksum((u_short *)mob, osp ? 12 : 8, 0)!=0) {
+	vec[0].ptr = (const u_int8_t *)(void *)mob;
+	vec[0].len = osp ? 12 : 8;
+	if (in_cksum(vec, 1)!=0) {
 		(void)printf(" (bad checksum %d)",crc);
 	}
 
diff --git a/print-mobility.c b/print-mobility.c
index 8f9cbee..1490b72 100644
--- a/print-mobility.c
+++ b/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/print-mpcp.c b/print-mpcp.c
new file mode 100644
index 0000000..244f280
--- /dev/null
+++ b/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/print-mpls.c b/print-mpls.c
index 9d54567..d97cce5 100644
--- a/print-mpls.c
+++ b/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
@@ -54,6 +54,13 @@
 /*15*/	"rsvd",
 };
 
+enum mpls_packet_type {
+	PT_UNKNOWN,
+	PT_IPV4,
+	PT_IPV6,
+	PT_OSI
+};
+
 /*
  * RFC3032: MPLS label stack encoding
  */
@@ -62,7 +69,8 @@
 {
 	const u_char *p;
 	u_int32_t label_entry;
-        u_int16_t label_stack_depth = 0;
+	u_int16_t label_stack_depth = 0;
+	enum mpls_packet_type pt = PT_UNKNOWN;
 
 	p = bp;
 	printf("MPLS");
@@ -70,9 +78,9 @@
 		TCHECK2(*p, sizeof(label_entry));
 		label_entry = EXTRACT_32BITS(p);
 		printf("%s(label %u",
-                       label_stack_depth ? "\n\t" : " ",
-                       MPLS_LABEL(label_entry));
-                label_stack_depth++;
+		       (label_stack_depth && vflag) ? "\n\t" : " ",
+       		       MPLS_LABEL(label_entry));
+		label_stack_depth++;
 		if (vflag &&
 		    MPLS_LABEL(label_entry) < sizeof(mpls_labelname) / sizeof(mpls_labelname[0]))
 			printf(" (%s)", mpls_labelname[MPLS_LABEL(label_entry)]);
@@ -84,98 +92,128 @@
 		p += sizeof(label_entry);
 	} while (!MPLS_STACK(label_entry));
 
+	/*
+	 * Try to figure out the packet type.
+	 */
 	switch (MPLS_LABEL(label_entry)) {
+
 	case 0:	/* IPv4 explicit NULL label */
-        case 3:	/* IPv4 implicit NULL label */
-                if (vflag>0) {
-                        printf("\n\t");
-                        ip_print(gndo, p, length - (p - bp));
-                }
-                else printf(", IP, length: %u",length);
+	case 3:	/* IPv4 implicit NULL label */
+		pt = PT_IPV4;
 		break;
-#ifdef INET6
+
 	case 2:	/* IPv6 explicit NULL label */
-                if (vflag>0) {
-                        printf("\n\t");
-                        ip6_print(p, length - (p - bp));
-                }
-                else printf(", IPv6, length: %u",length);
+		pt = PT_IPV6;
 		break;
-#endif
+
 	default:
 		/*
 		 * Generally there's no indication of protocol in MPLS label
-		 * encoding, however draft-hsmit-isis-aal5mux-00.txt describes
-                 * a technique that looks at the first payload byte if the BOS (bottom of stack)
-                 * bit is set and tries to determine the network layer protocol
-                 * 0x45-0x4f is IPv4
-                 * 0x60-0x6f is IPv6
-                 * 0x81-0x83 is OSI (CLNP,ES-IS,IS-IS)
-                 * this technique is sometimes known as NULL encapsulation
-                 * and decoding is particularly useful for control-plane traffic [BGP]
-                 * which cisco by default sends MPLS encapsulated
+		 * encoding.
+		 *
+		 * However, draft-hsmit-isis-aal5mux-00.txt describes a
+		 * technique for encapsulating IS-IS and IP traffic on the
+		 * same ATM virtual circuit; you look at the first payload
+		 * byte to determine the network layer protocol, based on
+		 * the fact that
+		 *
+		 *	1) the first byte of an IP header is 0x45-0x4f
+		 *	   for IPv4 and 0x60-0x6f for IPv6;
+		 *
+		 *	2) the first byte of an OSI CLNP packet is 0x81,
+		 *	   the first byte of an OSI ES-IS packet is 0x82,
+		 *	   and the first byte of an OSI IS-IS packet is
+		 *	   0x83;
+		 *
+		 * so the network layer protocol can be inferred from the
+		 * first byte of the packet, if the protocol is one of the
+		 * ones listed above.
+		 *
+		 * Cisco sends control-plane traffic MPLS-encapsulated in
+		 * this fashion.
 		 */
+		switch(*p) {
 
-                if (MPLS_STACK(label_entry)) { /* only do this if the stack bit is set */
-                    switch(*p) {
-                    case 0x45:
-                    case 0x46:
-                    case 0x47:
-                    case 0x48:
-                    case 0x49:
-                    case 0x4a:
-                    case 0x4b:
-                    case 0x4c:
-                    case 0x4d:
-                    case 0x4e:
-                    case 0x4f:
-		        if (vflag>0) {
-                            printf("\n\t");
-                            ip_print(gndo, p, length - (p - bp));
-			    }
-                        else printf(", IP, length: %u",length);
-                        break;
-#ifdef INET6
-                    case 0x60:
-                    case 0x61:
-                    case 0x62:
-                    case 0x63:
-                    case 0x64:
-                    case 0x65:
-                    case 0x66:
-                    case 0x67:
-                    case 0x68:
-                    case 0x69:
-                    case 0x6a:
-                    case 0x6b:
-                    case 0x6c:
-                    case 0x6d:
-                    case 0x6e:
-                    case 0x6f:
-		        if (vflag>0) {
-                            printf("\n\t");
-                            ip6_print(p, length - (p - bp));
-                            }
-			else printf(", IPv6, length: %u",length);
-                        break;
-#endif
-                    case 0x81:
-                    case 0x82:
-                    case 0x83:
-		        if (vflag>0) {
-                            printf("\n\t");
-                            isoclns_print(p, length - (p - bp), length - (p - bp));
-			    }
-			else printf(", OSI, length: %u",length);
-                        break;
-                    default:
-                        /* ok bail out - we did not figure out what it is*/
-                        break;
-                    }
-                }
-                return;
+		case 0x45:
+		case 0x46:
+		case 0x47:
+		case 0x48:
+		case 0x49:
+		case 0x4a:
+		case 0x4b:
+		case 0x4c:
+		case 0x4d:
+		case 0x4e:
+		case 0x4f:
+			pt = PT_IPV4;
+			break;
+				
+		case 0x60:
+		case 0x61:
+		case 0x62:
+		case 0x63:
+		case 0x64:
+		case 0x65:
+		case 0x66:
+		case 0x67:
+		case 0x68:
+		case 0x69:
+		case 0x6a:
+		case 0x6b:
+		case 0x6c:
+		case 0x6d:
+		case 0x6e:
+		case 0x6f:
+			pt = PT_IPV6;
+			break;
+
+		case 0x81:
+		case 0x82:
+		case 0x83:
+			pt = PT_OSI;
+			break;
+
+		default:
+			/* ok bail out - we did not figure out what it is*/
+			break;
+		}
 	}
 
+	/*
+	 * Print the payload.
+	 */
+	if (pt == PT_UNKNOWN) {
+		if (!suppress_default_print)
+			default_print(p, length - (p - bp));
+		return;
+	}
+	if (vflag)
+		printf("\n\t");
+	else
+		printf(" ");
+	switch (pt) {
+
+	case PT_IPV4:
+		ip_print(gndo, p, length - (p - bp));
+		break;
+
+	case PT_IPV6:
+#ifdef INET6
+		ip6_print(gndo, p, length - (p - bp));
+#else
+		printf("IPv6, length: %u", length);
+#endif
+		break;
+
+	case PT_OSI:
+		isoclns_print(p, length - (p - bp), length - (p - bp));
+		break;
+
+	default:
+		break;
+	}
+	return;
+
 trunc:
 	printf("[|MPLS]");
 }
diff --git a/print-mptcp.c b/print-mptcp.c
new file mode 100644
index 0000000..17be82f
--- /dev/null
+++ b/print-mptcp.c
@@ -0,0 +1,296 @@
+/**
+ * Copyright (c) 2012
+ *
+ * Gregory Detal <gregory.detal@uclouvain.be>
+ * Christoph Paasch <christoph.paasch@uclouvain.be>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the University nor of the Laboratory may be used
+ *    to endorse or promote products derived from this software without
+ *    specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "interface.h"
+#include "extract.h"
+#include "addrtoname.h"
+
+#include "ipproto.h"
+#include "mptcp.h"
+#include "tcp.h"
+
+static int dummy_print(const u_char *opt _U_, u_int opt_len _U_, u_char flags _U_)
+{
+        return 1;
+}
+
+static int mp_capable_print(const u_char *opt, u_int opt_len, u_char flags)
+{
+        struct mp_capable *mpc = (struct mp_capable *) opt;
+
+        if (!(opt_len == 12 && flags & TH_SYN) &&
+            !(opt_len == 20 && (flags & (TH_SYN | TH_ACK)) == TH_ACK))
+                return 0;
+
+        if (MP_CAPABLE_OPT_VERSION(mpc->sub_ver) != 0) {
+                printf(" Unknown Version (%d)", MP_CAPABLE_OPT_VERSION(mpc->sub_ver));
+                return 1;
+        }
+
+        if (mpc->flags & MP_CAPABLE_C)
+                printf(" csum");
+        printf(" {0x%" PRIx64, EXTRACT_64BITS(mpc->sender_key));
+        if (opt_len == 20) /* ACK */
+                printf(",0x%" PRIx64, EXTRACT_64BITS(mpc->receiver_key));
+        printf("}");
+        return 1;
+}
+
+static int mp_join_print(const u_char *opt, u_int opt_len, u_char flags)
+{
+        struct mp_join *mpj = (struct mp_join *) opt;
+
+        if (!(opt_len == 12 && flags & TH_SYN) &&
+            !(opt_len == 16 && (flags & (TH_SYN | TH_ACK)) == (TH_SYN | TH_ACK)) &&
+            !(opt_len == 24 && flags & TH_ACK))
+                return 0;
+
+        if (opt_len != 24) {
+                if (mpj->sub_b & MP_JOIN_B)
+                        printf(" backup");
+                printf(" id %u", mpj->addr_id);
+        }
+
+        switch (opt_len) {
+        case 12: /* SYN */
+                printf(" token 0x%x" " nonce 0x%x",
+                        EXTRACT_32BITS(mpj->u.syn.token),
+                        EXTRACT_32BITS(mpj->u.syn.nonce));
+                break;
+        case 16: /* SYN/ACK */
+                printf(" hmac 0x%" PRIx64 " nonce 0x%x",
+                        EXTRACT_64BITS(mpj->u.synack.mac),
+                        EXTRACT_32BITS(mpj->u.synack.nonce));
+                break;
+        case 24: {/* ACK */
+                size_t i;
+                printf(" hmac 0x");
+                for (i = 0; i < sizeof(mpj->u.ack.mac); ++i)
+                        printf("%02x", mpj->u.ack.mac[i]);
+        }
+        default:
+                break;
+        }
+        return 1;
+}
+
+static u_int mp_dss_len(struct mp_dss *m, int csum)
+{
+        u_int len;
+
+        len = 4;
+        if (m->flags & MP_DSS_A) {
+                /* Ack present - 4 or 8 octets */
+                len += (m->flags & MP_DSS_a) ? 8 : 4;
+        }
+        if (m->flags & MP_DSS_M) {
+                /*
+                 * Data Sequence Number (DSN), Subflow Sequence Number (SSN),
+                 * Data-Level Length present, and Checksum possibly present.
+                 * All but the Checksum are 10 bytes if the m flag is
+                 * clear (4-byte DSN) and 14 bytes if the m flag is set
+                 * (8-byte DSN).
+                 */
+                len += (m->flags & MP_DSS_m) ? 14 : 10;
+
+                /*
+                 * The Checksum is present only if negotiated.
+                 */
+                if (csum)
+                        len += 2;
+	}
+	return len;
+}
+
+static int mp_dss_print(const u_char *opt, u_int opt_len, u_char flags)
+{
+        struct mp_dss *mdss = (struct mp_dss *) opt;
+
+        if ((opt_len != mp_dss_len(mdss, 1) &&
+             opt_len != mp_dss_len(mdss, 0)) || flags & TH_SYN)
+                return 0;
+
+        if (mdss->flags & MP_DSS_F)
+                printf(" fin");
+
+        opt += 4;
+        if (mdss->flags & MP_DSS_A) {
+                printf(" ack ");
+                if (mdss->flags & MP_DSS_a) {
+                        printf("%" PRIu64, EXTRACT_64BITS(opt));
+                        opt += 8;
+                } else {
+                        printf("%u", EXTRACT_32BITS(opt));
+                        opt += 4;
+                }
+        }
+
+        if (mdss->flags & MP_DSS_M) {
+                printf(" seq ");
+                if (mdss->flags & MP_DSS_m) {
+                        printf("%" PRIu64, EXTRACT_64BITS(opt));
+                        opt += 8;
+                } else {
+                        printf("%u", EXTRACT_32BITS(opt));
+                        opt += 4;
+                }
+                printf(" subseq %u", EXTRACT_32BITS(opt));
+                opt += 4;
+                printf(" len %u", EXTRACT_16BITS(opt));
+                opt += 2;
+
+                if (opt_len == mp_dss_len(mdss, 1))
+                        printf(" csum 0x%x", EXTRACT_16BITS(opt));
+        }
+        return 1;
+}
+
+static int add_addr_print(const u_char *opt, u_int opt_len, u_char flags _U_)
+{
+        struct mp_add_addr *add_addr = (struct mp_add_addr *) opt;
+        u_int ipver = MP_ADD_ADDR_IPVER(add_addr->sub_ipver);
+
+        if (!((opt_len == 8 || opt_len == 10) && ipver == 4) &&
+            !((opt_len == 20 || opt_len == 22) && ipver == 6))
+                return 0;
+
+        printf(" id %u", add_addr->addr_id);
+        switch (ipver) {
+        case 4:
+                printf(" %s", ipaddr_string(add_addr->u.v4.addr));
+                if (opt_len == 10)
+                        printf(":%u", EXTRACT_16BITS(add_addr->u.v4.port));
+                break;
+        case 6:
+#ifdef INET6
+                printf(" %s", ip6addr_string(add_addr->u.v6.addr));
+#endif
+                if (opt_len == 22)
+                        printf(":%u", EXTRACT_16BITS(add_addr->u.v6.port));
+                break;
+        default:
+                return 0;
+        }
+
+        return 1;
+}
+
+static int remove_addr_print(const u_char *opt, u_int opt_len, u_char flags _U_)
+{
+        struct mp_remove_addr *remove_addr = (struct mp_remove_addr *) opt;
+        u_int8_t *addr_id = &remove_addr->addrs_id;
+
+        if (opt_len < 4)
+                return 0;
+
+        opt_len -= 3;
+        printf(" id");
+        while (opt_len--)
+                printf(" %u", *addr_id++);
+        return 1;
+}
+
+static int mp_prio_print(const u_char *opt, u_int opt_len, u_char flags _U_)
+{
+        struct mp_prio *mpp = (struct mp_prio *) opt;
+
+        if (opt_len != 3 && opt_len != 4)
+                return 0;
+
+        if (mpp->sub_b & MP_PRIO_B)
+                printf(" backup");
+        else
+                printf(" non-backup");
+        if (opt_len == 4)
+                printf(" id %u", mpp->addr_id);
+
+        return 1;
+}
+
+static int mp_fail_print(const u_char *opt, u_int opt_len, u_char flags _U_)
+{
+        if (opt_len != 12)
+                return 0;
+
+        printf(" seq %" PRIu64, EXTRACT_64BITS(opt + 4));
+        return 1;
+}
+
+static int mp_fast_close_print(const u_char *opt, u_int opt_len, u_char flags _U_)
+{
+        if (opt_len != 12)
+                return 0;
+
+        printf(" key 0x%" PRIx64, EXTRACT_64BITS(opt + 4));
+        return 1;
+}
+
+static struct {
+        const char *name;
+        int (*print)(const u_char *, u_int, u_char);
+} mptcp_options[] = {
+        { "capable", mp_capable_print},
+        { "join",       mp_join_print },
+        { "dss",        mp_dss_print },
+        { "add-addr",   add_addr_print },
+        { "rem-addr",   remove_addr_print },
+        { "prio",       mp_prio_print },
+        { "fail",       mp_fail_print },
+        { "fast-close", mp_fast_close_print },
+        { "unknown",    dummy_print },
+};
+
+int mptcp_print(const u_char *cp, u_int len, u_char flags)
+{
+        struct mptcp_option *opt;
+        u_int subtype;
+
+        if (len < 3)
+                return 0;
+
+        opt = (struct mptcp_option *) cp;
+        subtype = min(MPTCP_OPT_SUBTYPE(opt->sub_etc), MPTCP_SUB_FCLOSE + 1);
+
+        printf(" %s", mptcp_options[subtype].name);
+        return mptcp_options[subtype].print(cp, len, flags);
+}
diff --git a/print-msdp.c b/print-msdp.c
index 3f79b68..a228ab7 100644
--- a/print-msdp.c
+++ b/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/missing/resolv6.h b/print-msnlb.c
similarity index 61%
rename from missing/resolv6.h
rename to print-msnlb.c
index ccee03e..b300498 100644
--- a/missing/resolv6.h
+++ b/print-msnlb.c
@@ -1,6 +1,5 @@
 /*
- * Copyright (C) 1999 WIDE Project.
- * All rights reserved.
+ * Copyright (c) 2013 Romain Francoise <romain@orebokech.com>
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -27,10 +26,41 @@
  * SUCH DAMAGE.
  */
 
-/*
- * Resolver options for IPv6.
- * XXX: this should be in an offical include file. There may be conflicts...
- */
-#ifndef HAVE_RES_USE_INET6
-#define	RES_USE_INET6	0x80000000	/* use/map IPv6 in gethostbyname() */
+#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"
+
+struct msnlb_heartbeat_pkt {
+	u_int32_t unknown1;
+	u_int32_t unknown2;
+	u_int32_t host_prio;	/* little-endian */
+	u_int32_t virtual_ip;
+	u_int32_t host_ip;
+	/* the protocol is undocumented so we ignore the rest */
+};
+
+void
+msnlb_print(netdissect_options *ndo, const u_char *bp)
+{
+	const struct msnlb_heartbeat_pkt *hb;
+
+	hb = (struct msnlb_heartbeat_pkt *)bp;
+	ND_TCHECK(*hb);
+
+	ND_PRINT((ndo, "MS NLB heartbeat, host priority: %u,",
+		EXTRACT_LE_32BITS(&(hb->host_prio))));
+	ND_PRINT((ndo, " cluster IP: %s,", ipaddr_string(&(hb->virtual_ip))));
+	ND_PRINT((ndo, " host IP: %s", ipaddr_string(&(hb->host_ip))));
+	return;
+trunc:
+	ND_PRINT((ndo, "[|MS NLB]"));
+}
diff --git a/print-netbios.c b/print-netbios.c
index 419953c..c92eb9e 100644
--- a/print-netbios.c
+++ b/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/print-nflog.c b/print-nflog.c
new file mode 100644
index 0000000..94dee18
--- /dev/null
+++ b/print-nflog.c
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2013, Petar Alilovic,
+ * Faculty of Electrical Engineering and Computing, University of Zagreb
+ * All rights reserved
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ *	 this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ *	 notice, this list of conditions and the following disclaimer in the
+ *	 documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <pcap.h>
+
+#include "netdissect.h"
+#include "interface.h"
+
+#if defined(DLT_NFLOG) && defined(HAVE_PCAP_NFLOG_H)
+#include <pcap/nflog.h>
+
+static const struct tok nflog_values[] = {
+	{ AF_INET,		"IPv4" },
+	{ AF_INET6,		"IPv6" },
+	{ 0,				NULL }
+};
+
+static inline void
+nflog_hdr_print(struct netdissect_options *ndo, const nflog_hdr_t *hdr, u_int length)
+{
+	ND_PRINT((ndo, "version %d, resource ID %d", hdr->nflog_version, ntohs(hdr->nflog_rid)));
+
+	if (!ndo->ndo_qflag) {
+		ND_PRINT((ndo,", family %s (%d)",
+						  tok2str(nflog_values, "Unknown",
+								  hdr->nflog_family),
+						  hdr->nflog_family));
+		} else {
+		ND_PRINT((ndo,", %s",
+						  tok2str(nflog_values,
+								  "Unknown NFLOG (0x%02x)",
+								  hdr->nflog_family)));
+		}
+
+	ND_PRINT((ndo, ", length %u: ", length));
+}
+
+u_int
+nflog_if_print(struct netdissect_options *ndo,
+			   const struct pcap_pkthdr *h, const u_char *p)
+{
+	const nflog_hdr_t *hdr = (const nflog_hdr_t *)p;
+	const nflog_tlv_t *tlv;
+	u_int16_t size;
+	u_int16_t h_size = sizeof(nflog_hdr_t);
+	u_int caplen = h->caplen;
+	u_int length = h->len;
+
+	if (caplen < (int) sizeof(nflog_hdr_t) || length < (int) sizeof(nflog_hdr_t)) {
+		ND_PRINT((ndo, "[|nflog]"));
+		return h_size;
+	}
+
+	if (!(hdr->nflog_version) == 0) {
+		ND_PRINT((ndo, "version %u (unknown)", hdr->nflog_version));
+		return h_size;
+	}
+
+	if (ndo->ndo_eflag)
+		nflog_hdr_print(ndo, hdr, length);
+
+	p += sizeof(nflog_hdr_t);
+	length -= sizeof(nflog_hdr_t);
+	caplen -= sizeof(nflog_hdr_t);
+
+	while (length > 0) {
+		/* We have some data.  Do we have enough for the TLV header? */
+		if (caplen < sizeof(nflog_tlv_t) || length < sizeof(nflog_tlv_t)) {
+			/* No. */
+			ND_PRINT((ndo, "[|nflog]"));
+			return h_size;
+		}
+
+		tlv = (const nflog_tlv_t *) p;
+		size = tlv->tlv_length;
+		if (size % 4 != 0)
+			size += 4 - size % 4;
+
+		/* Is the TLV's length less than the minimum? */
+		if (size < sizeof(nflog_tlv_t)) {
+			/* Yes. Give up now. */
+			ND_PRINT((ndo, "[|nflog]"));
+			return h_size;
+		}
+
+		/* Do we have enough data for the full TLV? */
+		if (caplen < size || length < size) {
+			/* No. */
+			ND_PRINT((ndo, "[|nflog]"));
+			return h_size;
+		}
+
+		if (tlv->tlv_type == NFULA_PAYLOAD) {
+			/*
+			 * This TLV's data is the packet payload.
+			 * Skip past the TLV header, and break out
+			 * of the loop so we print the packet data.
+			 */
+			p += sizeof(nflog_tlv_t);
+			h_size += sizeof(nflog_tlv_t);
+			length -= sizeof(nflog_tlv_t);
+			caplen -= sizeof(nflog_tlv_t);
+			break;
+		}
+
+		p += size;
+		h_size += size;
+		length -= size;
+		caplen -= size;
+	}
+
+	switch (hdr->nflog_family) {
+
+	case AF_INET:
+		ip_print(ndo, p, length);
+		break;
+
+#ifdef INET6
+	case AF_INET6:
+		ip6_print(ndo, p, length);
+		break;
+#endif /*INET6*/
+
+	default:
+		if (!ndo->ndo_eflag)
+			nflog_hdr_print(ndo, hdr,
+				length + sizeof(nflog_hdr_t));
+
+		if (!ndo->ndo_suppress_default_print)
+			ndo->ndo_default_print(ndo, p, caplen);
+		break;
+	}
+
+	return h_size;
+}
+
+#endif /* defined(DLT_NFLOG) && defined(HAVE_PCAP_NFLOG_H) */
diff --git a/print-nfs.c b/print-nfs.c
index 45e8869..526e543 100644
--- a/print-nfs.c
+++ b/print-nfs.c
@@ -21,7 +21,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.111 2007-12-22 03:08:04 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -49,8 +49,8 @@
 #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 int32_t xid_map_find(const struct sunrpc_msg *, const u_char *,
+static int xid_map_enter(const struct sunrpc_msg *, const u_char *);
+static int 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);
 static const u_int32_t *parse_post_op_attr(const u_int32_t *, int);
@@ -100,7 +100,7 @@
  * the first NFS server was the SunOS 2.0 one, and until 5.0 SunOS
  * was primarily BSD-derived.
  */
-static struct tok status2str[] = {
+static const struct tok status2str[] = {
 	{ 1,     "Operation not permitted" },	/* EPERM */
 	{ 2,     "No such file or directory" },	/* ENOENT */
 	{ 5,     "Input/output error" },	/* EIO */
@@ -138,14 +138,14 @@
 	{ 0,     NULL }
 };
 
-static struct tok nfsv3_writemodes[] = {
+static const struct tok nfsv3_writemodes[] = {
 	{ 0,		"unstable" },
 	{ 1,		"datasync" },
 	{ 2,		"filesync" },
 	{ 0,		NULL }
 };
 
-static struct tok type2str[] = {
+static const struct tok type2str[] = {
 	{ NFNON,	"NON" },
 	{ NFREG,	"REG" },
 	{ NFDIR,	"DIR" },
@@ -287,16 +287,12 @@
 	       register const u_char *bp2)
 {
 	register const struct sunrpc_msg *rp;
-	u_int32_t proc, vers, reply_stat;
 	char srcid[20], dstid[20];	/*fits 32bit*/
-	enum sunrpc_reject_stat rstat;
-	u_int32_t rlow;
-	u_int32_t rhigh;
-	enum sunrpc_auth_stat rwhy;
 
 	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",
@@ -307,6 +303,30 @@
 		    EXTRACT_32BITS(&rp->rm_xid));
 	}
 	print_nfsaddr(bp2, srcid, dstid);
+
+	nfsreply_print_noaddr(bp, length, bp2);
+	return;
+
+trunc:
+	if (!nfserr)
+		fputs(" [|nfs]", stdout);
+}
+
+void
+nfsreply_print_noaddr(register const u_char *bp, u_int length,
+	       register const u_char *bp2)
+{
+	register const struct sunrpc_msg *rp;
+	u_int32_t proc, vers, reply_stat;
+	enum sunrpc_reject_stat rstat;
+	u_int32_t rlow;
+	u_int32_t rhigh;
+	enum sunrpc_auth_stat rwhy;
+
+	nfserr = 0;		/* assume no error */
+	rp = (const struct sunrpc_msg *)bp;
+
+	TCHECK(rp->rm_reply.rp_stat);
 	reply_stat = EXTRACT_32BITS(&rp->rm_reply.rp_stat);
 	switch (reply_stat) {
 
@@ -318,10 +338,12 @@
 
 	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)",
@@ -329,6 +351,7 @@
 			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) {
@@ -384,6 +407,11 @@
 		    reply_stat, length);
 		break;
 	}
+	return;
+
+trunc:
+	if (!nfserr)
+		fputs(" [|nfs]", stdout);
 }
 
 /*
@@ -494,15 +522,12 @@
     register const u_char *bp2)
 {
 	register const struct sunrpc_msg *rp;
-	register const u_int32_t *dp;
-	nfs_type type;
-	int v3;
-	u_int32_t proc;
-	struct nfsv3_sattr sa3;
 	char srcid[20], dstid[20];	/*fits 32bit*/
 
 	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));
@@ -515,7 +540,31 @@
 	print_nfsaddr(bp2, srcid, dstid);
 	(void)printf("%d", length);
 
-	xid_map_enter(rp, bp2);	/* record proc number for later on */
+	nfsreq_print_noaddr(bp, length, bp2);
+	return;
+
+trunc:
+	if (!nfserr)
+		fputs(" [|nfs]", stdout);
+}
+
+void
+nfsreq_print_noaddr(register const u_char *bp, u_int length,
+    register const u_char *bp2)
+{
+	register const struct sunrpc_msg *rp;
+	register const u_int32_t *dp;
+	nfs_type type;
+	int v3;
+	u_int32_t proc;
+	u_int32_t access_flags;
+	struct nfsv3_sattr sa3;
+
+	nfserr = 0;		/* assume no error */
+	rp = (const struct sunrpc_msg *)bp;
+
+	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);
@@ -557,7 +606,37 @@
 		if ((dp = parsereq(rp, length)) != NULL &&
 		    (dp = parsefh(dp, v3)) != NULL) {
 			TCHECK(dp[0]);
-			printf(" %04x", EXTRACT_32BITS(&dp[0]));
+			access_flags = EXTRACT_32BITS(&dp[0]);
+			if (access_flags & ~NFSV3ACCESS_FULL) {
+				/* NFSV3ACCESS definitions aren't up to date */
+				printf(" %04x", access_flags);
+			} else if ((access_flags & NFSV3ACCESS_FULL) == NFSV3ACCESS_FULL) {
+				printf(" NFS_ACCESS_FULL");
+			} else {
+				char separator = ' ';
+				if (access_flags & NFSV3ACCESS_READ) {
+					printf(" NFS_ACCESS_READ");
+					separator = '|';
+				}
+				if (access_flags & NFSV3ACCESS_LOOKUP) {
+					printf("%cNFS_ACCESS_LOOKUP", separator);
+					separator = '|';
+				}
+				if (access_flags & NFSV3ACCESS_MODIFY) {
+					printf("%cNFS_ACCESS_MODIFY", separator);
+					separator = '|';
+				}
+				if (access_flags & NFSV3ACCESS_EXTEND) {
+					printf("%cNFS_ACCESS_EXTEND", separator);
+					separator = '|';
+				}
+				if (access_flags & NFSV3ACCESS_DELETE) {
+					printf("%cNFS_ACCESS_DELETE", separator);
+					separator = '|';
+				}
+				if (access_flags & NFSV3ACCESS_EXECUTE)
+					printf("%cNFS_ACCESS_EXECUTE", separator);
+			}
 			return;
 		}
 		break;
@@ -809,7 +888,7 @@
 nfs_printfh(register const u_int32_t *dp, const u_int len)
 {
 	my_fsid fsid;
-	ino_t ino;
+	u_int32_t ino;
 	const char *sfsname = NULL;
 	char *spacep;
 
@@ -886,7 +965,7 @@
 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;
@@ -895,6 +974,8 @@
 #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;
@@ -905,7 +986,7 @@
 		break;
 #endif
 	default:
-		return;
+		return (1);
 	}
 
 	xmep = &xid_map[xid_map_next];
@@ -916,18 +997,19 @@
 	xmep->xid = rp->rm_xid;
 	if (ip) {
 		xmep->ipver = 4;
-		memcpy(&xmep->client, &ip->ip_src, sizeof(ip->ip_src));
-		memcpy(&xmep->server, &ip->ip_dst, sizeof(ip->ip_dst));
+		UNALIGNED_MEMCPY(&xmep->client, &ip->ip_src, sizeof(ip->ip_src));
+		UNALIGNED_MEMCPY(&xmep->server, &ip->ip_dst, sizeof(ip->ip_dst));
 	}
 #ifdef INET6
 	else if (ip6) {
 		xmep->ipver = 6;
-		memcpy(&xmep->client, &ip6->ip6_src, sizeof(ip6->ip6_src));
-		memcpy(&xmep->server, &ip6->ip6_dst, sizeof(ip6->ip6_dst));
+		UNALIGNED_MEMCPY(&xmep->client, &ip6->ip6_src, sizeof(ip6->ip6_src));
+		UNALIGNED_MEMCPY(&xmep->server, &ip6->ip6_dst, sizeof(ip6->ip6_dst));
 	}
 #endif
 	xmep->proc = EXTRACT_32BITS(&rp->rm_call.cb_proc);
 	xmep->vers = EXTRACT_32BITS(&rp->rm_call.cb_vers);
+	return (1);
 }
 
 /*
@@ -956,18 +1038,18 @@
 			goto nextitem;
 		switch (xmep->ipver) {
 		case 4:
-			if (memcmp(&ip->ip_src, &xmep->server,
+			if (UNALIGNED_MEMCMP(&ip->ip_src, &xmep->server,
 				   sizeof(ip->ip_src)) != 0 ||
-			    memcmp(&ip->ip_dst, &xmep->client,
+			    UNALIGNED_MEMCMP(&ip->ip_dst, &xmep->client,
 				   sizeof(ip->ip_dst)) != 0) {
 				cmp = 0;
 			}
 			break;
 #ifdef INET6
 		case 6:
-			if (memcmp(&ip6->ip6_src, &xmep->server,
+			if (UNALIGNED_MEMCMP(&ip6->ip6_src, &xmep->server,
 				   sizeof(ip6->ip6_src)) != 0 ||
-			    memcmp(&ip6->ip6_dst, &xmep->client,
+			    UNALIGNED_MEMCMP(&ip6->ip6_dst, &xmep->client,
 				   sizeof(ip6->ip6_dst)) != 0) {
 				cmp = 0;
 			}
diff --git a/print-ntp.c b/print-ntp.c
index 606a654..28c8619 100644
--- a/print-ntp.c
+++ b/print-ntp.c
@@ -25,7 +25,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.43 2007-11-30 13:45:10 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -52,7 +52,7 @@
 static void p_ntp_time(const struct l_fixedpt *);
 static void p_ntp_delta(const struct l_fixedpt *, const struct l_fixedpt *);
 
-static struct tok ntp_mode_values[] = {
+static const struct tok ntp_mode_values[] = {
     { MODE_UNSPEC,    "unspecified" },
     { MODE_SYM_ACT,   "symmetric active" },
     { MODE_SYM_PAS,   "symmetric passive" },
@@ -64,7 +64,7 @@
     { 0, NULL }
 };
 
-static struct tok ntp_leapind_values[] = {
+static const struct tok ntp_leapind_values[] = {
     { NO_WARNING,     "" },
     { PLUS_SEC,       "+1s" },
     { MINUS_SEC,      "-1s" },
@@ -72,6 +72,12 @@
     { 0, NULL }
 };
 
+static const struct tok ntp_stratum_values[] = {
+	{ UNSPECIFIED,	"unspecified" },
+	{ PRIM_REF, 	"primary reference" },
+	{ 0, NULL }
+};
+
 /*
  * Print ntp requests
  */
@@ -106,10 +112,12 @@
                 leapind);
 
 	TCHECK(bp->stratum);
-	printf(", Stratum %u", bp->stratum);
+	printf(", Stratum %u (%s)", 	
+		bp->stratum,
+		tok2str(ntp_stratum_values, (bp->stratum >=2 && bp->stratum<=15) ? "secondary reference" : "reserved", bp->stratum));
 
 	TCHECK(bp->ppoll);
-	printf(", poll %us", bp->ppoll);
+	printf(", poll %u (%us)", bp->ppoll, 1 << bp->ppoll);
 
 	/* Can't TCHECK bp->precision bitfield so bp->distance + 0 instead */
 	TCHECK2(bp->root_delay, 0);
@@ -174,8 +182,19 @@
 	fputs("\n\t    Originator - Transmit Timestamp: ", stdout);
 	p_ntp_delta(&(bp->org_timestamp), &(bp->xmt_timestamp));
 
-        /* FIXME key-id, authentication */
-
+	if ( (sizeof(struct ntpdata) - length) == 16) { 	/* Optional: key-id */
+		TCHECK(bp->key_id);
+		printf("\n\tKey id: %u", bp->key_id);
+	} else if ( (sizeof(struct ntpdata) - length) == 0) { 	/* Optional: key-id + authentication */
+		TCHECK(bp->key_id);
+		printf("\n\tKey id: %u", bp->key_id);
+		TCHECK2(bp->message_digest, sizeof (bp->message_digest));
+                printf("\n\tAuthentication: %08x%08x%08x%08x",
+        		       EXTRACT_32BITS(bp->message_digest),
+		               EXTRACT_32BITS(bp->message_digest + 4),
+		               EXTRACT_32BITS(bp->message_digest + 8),
+		               EXTRACT_32BITS(bp->message_digest + 12));
+        }
 	return;
 
 trunc:
diff --git a/print-null.c b/print-null.c
index 3d203da..8eabe5d 100644
--- a/print-null.c
+++ b/print-null.c
@@ -21,7 +21,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
@@ -36,12 +36,12 @@
 
 #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
@@ -55,7 +55,6 @@
  */
 #define	NULL_HDRLEN 4
 
-
 /*
  * Byte-swap a 32-bit number.
  * ("htonl()" or "ntohl()" won't work - we want to byte-swap even on
@@ -126,7 +125,7 @@
 	case BSD_AFNUM_INET6_BSD:
 	case BSD_AFNUM_INET6_FREEBSD:
 	case BSD_AFNUM_INET6_DARWIN:
-		ip6_print(p, length);
+		ip6_print(gndo, p, length);
 		break;
 #endif
 
diff --git a/print-olsr.c b/print-olsr.c
index 174a51e..2713c09 100644
--- a/print-olsr.c
+++ b/print-olsr.c
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 1998-2007 The TCPDUMP project
+ * Copyright (c) 2009  Florian Forster
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that: (1) source code
@@ -15,6 +16,7 @@
  * Optimized Link State Protocl (OLSR) as per rfc3626
  *
  * Original code by Hannes Gredler <hannes@juniper.net>
+ * IPv6 additions by Florian Forster <octo at verplant.org>
  */
 
 #ifdef HAVE_CONFIG_H
@@ -28,7 +30,7 @@
 
 #include "interface.h"
 #include "addrtoname.h"
-#include "extract.h"		
+#include "extract.h"
 #include "ip.h"
 
 /*
@@ -76,7 +78,7 @@
 #define OLSR_HELLO_LQ_MSG    201 /* LQ extensions olsr.org */
 #define OLSR_TC_LQ_MSG       202 /* LQ extensions olsr.org */
 
-static struct tok olsr_msg_values[] = {
+static const struct tok olsr_msg_values[] = {
     { OLSR_HELLO_MSG, "Hello" },
     { OLSR_TC_MSG, "TC" },
     { OLSR_MID_MSG, "MID" },
@@ -88,7 +90,7 @@
     { 0, NULL}
 };
 
-struct olsr_msg {
+struct olsr_msg4 {
     u_int8_t msg_type;
     u_int8_t vtime;
     u_int8_t msg_len[2];
@@ -98,6 +100,16 @@
     u_int8_t msg_seq[2];
 };
 
+struct olsr_msg6 {
+    u_int8_t msg_type;
+    u_int8_t vtime;
+    u_int8_t msg_len[2];
+    u_int8_t originator[16];
+    u_int8_t ttl;
+    u_int8_t hopcount;
+    u_int8_t msg_seq[2];
+};
+
 struct olsr_hello {
     u_int8_t res[2];
     u_int8_t htime;
@@ -115,16 +127,21 @@
     u_int8_t res[2];
 };
 
-struct olsr_hna {
+struct olsr_hna4 {
     u_int8_t network[4];
     u_int8_t mask[4];
 };
 
+struct olsr_hna6 {
+    u_int8_t network[16];
+    u_int8_t mask[16];
+};
+
 
 #define OLSR_EXTRACT_LINK_TYPE(link_code) (link_code & 0x3)
 #define OLSR_EXTRACT_NEIGHBOR_TYPE(link_code) (link_code >> 2)
 
-static struct tok olsr_link_type_values[] = {
+static const struct tok olsr_link_type_values[] = {
     { 0, "Unspecified" },
     { 1, "Asymmetric" },
     { 2, "Symmetric" },
@@ -132,20 +149,27 @@
     { 0, NULL}
 };
 
-static struct tok olsr_neighbor_type_values[] = {
+static const struct tok olsr_neighbor_type_values[] = {
     { 0, "Not-Neighbor" },
     { 1, "Symmetric" },
     { 2, "Symmetric-MPR" },
     { 0, NULL}
 };
 
-struct olsr_lq_neighbor {
+struct olsr_lq_neighbor4 {
     u_int8_t neighbor[4];
     u_int8_t link_quality;
     u_int8_t neighbor_link_quality;
     u_int8_t res[2];
 };
 
+struct olsr_lq_neighbor6 {
+    u_int8_t neighbor[16];
+    u_int8_t link_quality;
+    u_int8_t neighbor_link_quality;
+    u_int8_t res[2];
+};
+
 /*
  * macro to convert the 8-bit mantissa/exponent to a double float
  * taken from olsr.org.
@@ -158,13 +182,13 @@
  * print a neighbor list with LQ extensions.
  */
 static void
-olsr_print_lq_neighbor (const u_char *msg_data, u_int hello_len)
+olsr_print_lq_neighbor4 (const u_char *msg_data, u_int hello_len)
 {
-    struct olsr_lq_neighbor *lq_neighbor;
+    struct olsr_lq_neighbor4 *lq_neighbor;
 
-    while (hello_len >= sizeof(struct olsr_lq_neighbor)) {
+    while (hello_len >= sizeof(struct olsr_lq_neighbor4)) {
 
-        lq_neighbor = (struct olsr_lq_neighbor *)msg_data;
+        lq_neighbor = (struct olsr_lq_neighbor4 *)msg_data;
 
         printf("\n\t      neighbor %s, link-quality %.2lf%%"
                ", neighbor-link-quality %.2lf%%",
@@ -172,11 +196,33 @@
                ((double)lq_neighbor->link_quality/2.55),
                ((double)lq_neighbor->neighbor_link_quality/2.55));
 
-        msg_data += sizeof(struct olsr_lq_neighbor);
-        hello_len -= sizeof(struct olsr_lq_neighbor);
+        msg_data += sizeof(struct olsr_lq_neighbor4);
+        hello_len -= sizeof(struct olsr_lq_neighbor4);
     }
 }
 
+#if INET6
+static void
+olsr_print_lq_neighbor6 (const u_char *msg_data, u_int hello_len)
+{
+    struct olsr_lq_neighbor6 *lq_neighbor;
+
+    while (hello_len >= sizeof(struct olsr_lq_neighbor6)) {
+
+        lq_neighbor = (struct olsr_lq_neighbor6 *)msg_data;
+
+        printf("\n\t      neighbor %s, link-quality %.2lf%%"
+               ", neighbor-link-quality %.2lf%%",
+               ip6addr_string(lq_neighbor->neighbor),
+               ((double)lq_neighbor->link_quality/2.55),
+               ((double)lq_neighbor->neighbor_link_quality/2.55));
+
+        msg_data += sizeof(struct olsr_lq_neighbor6);
+        hello_len -= sizeof(struct olsr_lq_neighbor6);
+    }
+}
+#endif /* INET6 */
+
 /*
  * print a neighbor list.
  */
@@ -202,38 +248,41 @@
 
 
 void
-olsr_print (const u_char *pptr, u_int length)
+olsr_print (const u_char *pptr, u_int length, int is_ipv6)
 {
     union {
         const struct olsr_common *common;
-        const struct olsr_msg *msg;
+        const struct olsr_msg4 *msg4;
+        const struct olsr_msg6 *msg6;
         const struct olsr_hello *hello;
         const struct olsr_hello_link *hello_link;
-        const struct olsr_lq_neighbor *lq_neighbor;
         const struct olsr_tc *tc;
-        const struct olsr_hna *hna;
+        const struct olsr_hna4 *hna;
     } ptr;
 
-    u_int msg_type, msg_len, msg_tlen, hello_len, prefix;
+    u_int msg_type, msg_len, msg_tlen, hello_len;
+    u_int16_t name_entry_type, name_entry_len;
+    u_int name_entry_padding;
     u_int8_t link_type, neighbor_type;
     const u_char *tptr, *msg_data;
 
-    tptr = pptr; 
+    tptr = pptr;
 
     if (length < sizeof(struct olsr_common)) {
         goto trunc;
     }
 
     if (!TTEST2(*tptr, sizeof(struct olsr_common))) {
-	goto trunc;
+        goto trunc;
     }
 
     ptr.common = (struct olsr_common *)tptr;
     length = MIN(length, EXTRACT_16BITS(ptr.common->packet_len));
 
-    printf("OLSR, seq 0x%04x, length %u",
-           EXTRACT_16BITS(ptr.common->packet_seq),
-           length);
+    printf("OLSRv%i, seq 0x%04x, length %u",
+            (is_ipv6 == 0) ? 4 : 6,
+            EXTRACT_16BITS(ptr.common->packet_seq),
+            length);
 
     tptr += sizeof(struct olsr_common);
 
@@ -241,41 +290,81 @@
      * In non-verbose mode, just print version.
      */
     if (vflag < 1) {
-	return;
+        return;
     }
 
     while (tptr < (pptr+length)) {
+        union
+        {
+            struct olsr_msg4 *v4;
+            struct olsr_msg6 *v6;
+        } msgptr;
+        int msg_len_valid = 0;
 
-        if (!TTEST2(*tptr, sizeof(struct olsr_msg)))	
+        if (!TTEST2(*tptr, sizeof(struct olsr_msg4)))
             goto trunc;
 
-        ptr.msg = (struct olsr_msg *)tptr;
+#if INET6
+        if (is_ipv6)
+        {
+            msgptr.v6 = (struct olsr_msg6 *) tptr;
+            msg_type = msgptr.v6->msg_type;
+            msg_len = EXTRACT_16BITS(msgptr.v6->msg_len);
+            if ((msg_len >= sizeof (struct olsr_msg6))
+                    && (msg_len <= length))
+                msg_len_valid = 1;
 
-        msg_type = ptr.msg->msg_type;
-        msg_len = EXTRACT_16BITS(ptr.msg->msg_len);
+            /* infinite loop check */
+            if (msg_type == 0 || msg_len == 0) {
+                return;
+            }
 
-        /* infinite loop check */
-        if (msg_type == 0 || msg_len == 0) {
-            return;
+            printf("\n\t%s Message (%#04x), originator %s, ttl %u, hop %u"
+                    "\n\t  vtime %.3lfs, msg-seq 0x%04x, length %u%s",
+                    tok2str(olsr_msg_values, "Unknown", msg_type),
+                    msg_type, ip6addr_string(msgptr.v6->originator),
+                    msgptr.v6->ttl,
+                    msgptr.v6->hopcount,
+                    ME_TO_DOUBLE(msgptr.v6->vtime),
+                    EXTRACT_16BITS(msgptr.v6->msg_seq),
+                    msg_len, (msg_len_valid == 0) ? " (invalid)" : "");
+
+            msg_tlen = msg_len - sizeof(struct olsr_msg6);
+            msg_data = tptr + sizeof(struct olsr_msg6);
         }
+        else /* (!is_ipv6) */
+#endif /* INET6 */
+        {
+            msgptr.v4 = (struct olsr_msg4 *) tptr;
+            msg_type = msgptr.v4->msg_type;
+            msg_len = EXTRACT_16BITS(msgptr.v4->msg_len);
+            if ((msg_len >= sizeof (struct olsr_msg4))
+                    && (msg_len <= length))
+                msg_len_valid = 1;
 
-        printf("\n\t%s Message (%u), originator %s, ttl %u, hop %u"
-               "\n\t  vtime %.3lfs, msg-seq 0x%04x, length %u",
-               tok2str(olsr_msg_values, "Unknown", msg_type),
-               msg_type, ipaddr_string(ptr.msg->originator),
-               ptr.msg->ttl,
-               ptr.msg->hopcount,
-               ME_TO_DOUBLE(ptr.msg->vtime),
-               EXTRACT_16BITS(ptr.msg->msg_seq),
-               msg_len);
+            /* infinite loop check */
+            if (msg_type == 0 || msg_len == 0) {
+                return;
+            }
 
-        msg_tlen = msg_len - sizeof(struct olsr_msg);
-        msg_data = tptr + sizeof(struct olsr_msg);
+            printf("\n\t%s Message (%#04x), originator %s, ttl %u, hop %u"
+                    "\n\t  vtime %.3lfs, msg-seq 0x%04x, length %u%s",
+                    tok2str(olsr_msg_values, "Unknown", msg_type),
+                    msg_type, ipaddr_string(msgptr.v4->originator),
+                    msgptr.v4->ttl,
+                    msgptr.v4->hopcount,
+                    ME_TO_DOUBLE(msgptr.v4->vtime),
+                    EXTRACT_16BITS(msgptr.v4->msg_seq),
+                    msg_len, (msg_len_valid == 0) ? " (invalid)" : "");
+
+            msg_tlen = msg_len - sizeof(struct olsr_msg4);
+            msg_data = tptr + sizeof(struct olsr_msg4);
+        }
 
         switch (msg_type) {
         case OLSR_HELLO_MSG:
         case OLSR_HELLO_LQ_MSG:
-            if (!TTEST2(*msg_data, sizeof(struct olsr_hello)))	
+            if (!TTEST2(*msg_data, sizeof(struct olsr_hello)))
                 goto trunc;
 
             ptr.hello = (struct olsr_hello *)msg_data;
@@ -285,11 +374,12 @@
             msg_tlen -= sizeof(struct olsr_hello);
 
             while (msg_tlen >= sizeof(struct olsr_hello_link)) {
+                int hello_len_valid = 0;
 
                 /*
                  * link-type.
                  */
-                if (!TTEST2(*msg_data, sizeof(struct olsr_hello_link)))	
+                if (!TTEST2(*msg_data, sizeof(struct olsr_hello_link)))
                     goto trunc;
 
                 ptr.hello_link = (struct olsr_hello_link *)msg_data;
@@ -298,10 +388,18 @@
                 link_type = OLSR_EXTRACT_LINK_TYPE(ptr.hello_link->link_code);
                 neighbor_type = OLSR_EXTRACT_NEIGHBOR_TYPE(ptr.hello_link->link_code);
 
-                printf("\n\t    link-type %s, neighbor-type %s, len %u",
+                if ((hello_len <= msg_tlen)
+                        && (hello_len >= sizeof(struct olsr_hello_link)))
+                    hello_len_valid = 1;
+
+                printf("\n\t    link-type %s, neighbor-type %s, len %u%s",
                        tok2str(olsr_link_type_values, "Unknown", link_type),
                        tok2str(olsr_neighbor_type_values, "Unknown", neighbor_type),
-                       hello_len);
+                       hello_len,
+                       (hello_len_valid == 0) ? " (invalid)" : "");
+
+                if (hello_len_valid == 0)
+                    break;
 
                 msg_data += sizeof(struct olsr_hello_link);
                 msg_tlen -= sizeof(struct olsr_hello_link);
@@ -310,7 +408,12 @@
                 if (msg_type == OLSR_HELLO_MSG) {
                     olsr_print_neighbor(msg_data, hello_len);
                 } else {
-                    olsr_print_lq_neighbor(msg_data, hello_len);
+#if INET6
+                    if (is_ipv6)
+                        olsr_print_lq_neighbor6(msg_data, hello_len);
+                    else
+#endif
+                        olsr_print_lq_neighbor4(msg_data, hello_len);
                 }
 
                 msg_data += hello_len;
@@ -320,7 +423,7 @@
 
         case OLSR_TC_MSG:
         case OLSR_TC_LQ_MSG:
-            if (!TTEST2(*msg_data, sizeof(struct olsr_tc)))	
+            if (!TTEST2(*msg_data, sizeof(struct olsr_tc)))
                 goto trunc;
 
             ptr.tc = (struct olsr_tc *)msg_data;
@@ -332,56 +435,182 @@
             if (msg_type == OLSR_TC_MSG) {
                 olsr_print_neighbor(msg_data, msg_tlen);
             } else {
-                olsr_print_lq_neighbor(msg_data, msg_tlen);
+#if INET6
+                if (is_ipv6)
+                    olsr_print_lq_neighbor6(msg_data, msg_tlen);
+                else
+#endif
+                    olsr_print_lq_neighbor4(msg_data, msg_tlen);
             }
             break;
 
         case OLSR_MID_MSG:
-            if (!TTEST2(*msg_data, sizeof(struct in_addr)))	
-                goto trunc;
+        {
+            size_t addr_size = sizeof(struct in_addr);
 
-            while (msg_tlen >= sizeof(struct in_addr)) {
-                printf("\n\t  interface address %s", ipaddr_string(msg_data));
-                msg_data += sizeof(struct in_addr);
-                msg_tlen -= sizeof(struct in_addr);
-            }
-            break;
+#if INET6
+            if (is_ipv6)
+                addr_size = sizeof(struct in6_addr);
+#endif
 
-        case OLSR_HNA_MSG:
-            prefix = 1;
-            printf("\n\t  advertised networks\n\t    ");
-            while (msg_tlen >= sizeof(struct olsr_hna)) {
-                if (!TTEST2(*msg_data, sizeof(struct olsr_hna)))	
+            while (msg_tlen >= addr_size) {
+                if (!TTEST2(*msg_data, addr_size))
                     goto trunc;
 
-                ptr.hna = (struct olsr_hna *)msg_data;
-
-                /* print 4 prefixes per line */
-
-                printf("%s/%u%s",
-                       ipaddr_string(ptr.hna->network),
-                       mask2plen(EXTRACT_32BITS(ptr.hna->mask)),                       
-                       prefix % 4 == 0 ? "\n\t    " : " ");
-
-                msg_data += sizeof(struct olsr_hna);
-                msg_tlen -= sizeof(struct olsr_hna);
-                prefix ++;
+                printf("\n\t  interface address %s",
+#if INET6
+                        is_ipv6 ? ip6addr_string(msg_data) :
+#endif
+                        ipaddr_string(msg_data));
+                msg_data += addr_size;
+                msg_tlen -= addr_size;
             }
             break;
+        }
+
+        case OLSR_HNA_MSG:
+            printf("\n\t  Advertised networks (total %u)",
+                    (unsigned int) (msg_tlen / sizeof(struct olsr_hna6)));
+#if INET6
+            if (is_ipv6)
+            {
+                int i = 0;
+                while (msg_tlen >= sizeof(struct olsr_hna6)) {
+                    struct olsr_hna6 *hna6;
+
+                    if (!TTEST2(*msg_data, sizeof(struct olsr_hna6)))
+                        goto trunc;
+
+                    hna6 = (struct olsr_hna6 *)msg_data;
+
+                    printf("\n\t    #%i: %s/%u",
+                            i, ip6addr_string(hna6->network),
+                            mask62plen (hna6->mask));
+
+                    msg_data += sizeof(struct olsr_hna6);
+                    msg_tlen -= sizeof(struct olsr_hna6);
+                }
+            }
+            else
+#endif
+            {
+                int col = 0;
+                while (msg_tlen >= sizeof(struct olsr_hna4)) {
+                    if (!TTEST2(*msg_data, sizeof(struct olsr_hna4)))
+                        goto trunc;
+
+                    ptr.hna = (struct olsr_hna4 *)msg_data;
+
+                    /* print 4 prefixes per line */
+                    if (col == 0)
+                        printf ("\n\t    ");
+                    else
+                        printf (", ");
+
+                    printf("%s/%u",
+                            ipaddr_string(ptr.hna->network),
+                            mask2plen(EXTRACT_32BITS(ptr.hna->mask)));
+
+                    msg_data += sizeof(struct olsr_hna4);
+                    msg_tlen -= sizeof(struct olsr_hna4);
+
+                    col = (col + 1) % 4;
+                }
+            }
+            break;
+
+        case OLSR_NAMESERVICE_MSG:
+        {
+            u_int name_entries = EXTRACT_16BITS(msg_data+2);
+            u_int addr_size = 4;
+            int name_entries_valid = 0;
+            u_int i;
+
+            if (is_ipv6)
+                addr_size = 16;
+
+            if ((name_entries > 0)
+                    && ((name_entries * (4 + addr_size)) <= msg_tlen))
+                name_entries_valid = 1;
+
+            if (msg_tlen < 4)
+                goto trunc;
+            if (!TTEST2(*msg_data, 4))
+                goto trunc;
+
+            printf("\n\t  Version %u, Entries %u%s",
+                   EXTRACT_16BITS(msg_data),
+                   name_entries, (name_entries_valid == 0) ? " (invalid)" : "");
+
+            if (name_entries_valid == 0)
+                break;
+
+            msg_data += 4;
+            msg_tlen -= 4;
+
+            for (i = 0; i < name_entries; i++) {
+                int name_entry_len_valid = 0;
+
+                if (msg_tlen < 4)
+                    break;
+                if (!TTEST2(*msg_data, 4))
+                    goto trunc;
+
+                name_entry_type = EXTRACT_16BITS(msg_data);
+                name_entry_len = EXTRACT_16BITS(msg_data+2);
+
+                msg_data += 4;
+                msg_tlen -= 4;
+
+                if ((name_entry_len > 0) && ((addr_size + name_entry_len) <= msg_tlen))
+                    name_entry_len_valid = 1;
+
+                printf("\n\t    #%u: type %#06x, length %u%s",
+                        (unsigned int) i, name_entry_type,
+                        name_entry_len, (name_entry_len_valid == 0) ? " (invalid)" : "");
+
+                if (name_entry_len_valid == 0)
+                    break;
+
+                /* 32-bit alignment */
+                name_entry_padding = 0;
+                if (name_entry_len%4 != 0)
+                    name_entry_padding = 4-(name_entry_len%4);
+
+                if (msg_tlen < addr_size + name_entry_len + name_entry_padding)
+                    goto trunc;
+
+                if (!TTEST2(*msg_data, addr_size + name_entry_len + name_entry_padding))
+                    goto trunc;
+
+#if INET6
+                if (is_ipv6)
+                    printf(", address %s, name \"",
+                            ip6addr_string(msg_data));
+                else
+#endif
+                    printf(", address %s, name \"",
+                            ipaddr_string(msg_data));
+                fn_printn(msg_data + addr_size, name_entry_len, NULL);
+                printf("\"");
+
+                msg_data += addr_size + name_entry_len + name_entry_padding;
+                msg_tlen -= addr_size + name_entry_len + name_entry_padding;
+            } /* for (i = 0; i < name_entries; i++) */
+            break;
+        } /* case OLSR_NAMESERVICE_MSG */
 
             /*
              * FIXME those are the defined messages that lack a decoder
              * you are welcome to contribute code ;-)
              */
-
         case OLSR_POWERINFO_MSG:
-        case OLSR_NAMESERVICE_MSG:
         default:
-	    print_unknown_data(msg_data, "\n\t    ", msg_tlen);
+            print_unknown_data(msg_data, "\n\t    ", msg_tlen);
             break;
-        }	
+        } /* switch (msg_type) */
         tptr += msg_len;
-    }
+    } /* while (tptr < (pptr+length)) */
 
     return;
 
diff --git a/print-openflow-1.0.c b/print-openflow-1.0.c
new file mode 100644
index 0000000..95a93a9
--- /dev/null
+++ b/print-openflow-1.0.c
@@ -0,0 +1,2049 @@
+/*
+ * This module implements decoding of OpenFlow protocol version 1.0 (wire
+ * protocol 0x01). The decoder implements terse (default), detailed (-v) and
+ * full (-vv) output formats and, as much as each format implies, detects and
+ * tries to work around sizing anomalies inside the messages. The decoder marks
+ * up bogus values of selected message fields and decodes partially captured
+ * messages up to the snapshot end. It is based on the specification below:
+ *
+ * [OF10] http://www.openflow.org/documents/openflow-spec-v1.0.0.pdf
+ *
+ * Decoding of Ethernet frames nested in OFPT_PACKET_IN and OFPT_PACKET_OUT
+ * messages is done only when the verbosity level set by command-line argument
+ * is "-vvv" or higher. In that case the verbosity level is temporarily
+ * decremented by 3 during the nested frame decoding. For example, running
+ * tcpdump with "-vvvv" will do full decoding of OpenFlow and "-v" decoding of
+ * the nested frames.
+ *
+ *
+ * Copyright (c) 2013 The TCPDUMP project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include "interface.h"
+#include "extract.h"
+#include "addrtoname.h"
+#include "ethertype.h"
+#include "ipproto.h"
+#include "openflow.h"
+
+#define OFPT_HELLO                    0x00
+#define OFPT_ERROR                    0x01
+#define OFPT_ECHO_REQUEST             0x02
+#define OFPT_ECHO_REPLY               0x03
+#define OFPT_VENDOR                   0x04
+#define OFPT_FEATURES_REQUEST         0x05
+#define OFPT_FEATURES_REPLY           0x06
+#define OFPT_GET_CONFIG_REQUEST       0x07
+#define OFPT_GET_CONFIG_REPLY         0x08
+#define OFPT_SET_CONFIG               0x09
+#define OFPT_PACKET_IN                0x0a
+#define OFPT_FLOW_REMOVED             0x0b
+#define OFPT_PORT_STATUS              0x0c
+#define OFPT_PACKET_OUT               0x0d
+#define OFPT_FLOW_MOD                 0x0e
+#define OFPT_PORT_MOD                 0x0f
+#define OFPT_STATS_REQUEST            0x10
+#define OFPT_STATS_REPLY              0x11
+#define OFPT_BARRIER_REQUEST          0x12
+#define OFPT_BARRIER_REPLY            0x13
+#define OFPT_QUEUE_GET_CONFIG_REQUEST 0x14
+#define OFPT_QUEUE_GET_CONFIG_REPLY   0x15
+static const struct tok ofpt_str[] = {
+	{ OFPT_HELLO,                    "HELLO"                    },
+	{ OFPT_ERROR,                    "ERROR"                    },
+	{ OFPT_ECHO_REQUEST,             "ECHO_REQUEST"             },
+	{ OFPT_ECHO_REPLY,               "ECHO_REPLY"               },
+	{ OFPT_VENDOR,                   "VENDOR"                   },
+	{ OFPT_FEATURES_REQUEST,         "FEATURES_REQUEST"         },
+	{ OFPT_FEATURES_REPLY,           "FEATURES_REPLY"           },
+	{ OFPT_GET_CONFIG_REQUEST,       "GET_CONFIG_REQUEST"       },
+	{ OFPT_GET_CONFIG_REPLY,         "GET_CONFIG_REPLY"         },
+	{ OFPT_SET_CONFIG,               "SET_CONFIG"               },
+	{ OFPT_PACKET_IN,                "PACKET_IN"                },
+	{ OFPT_FLOW_REMOVED,             "FLOW_REMOVED"             },
+	{ OFPT_PORT_STATUS,              "PORT_STATUS"              },
+	{ OFPT_PACKET_OUT,               "PACKET_OUT"               },
+	{ OFPT_FLOW_MOD,                 "FLOW_MOD"                 },
+	{ OFPT_PORT_MOD,                 "PORT_MOD"                 },
+	{ OFPT_STATS_REQUEST,            "STATS_REQUEST"            },
+	{ OFPT_STATS_REPLY,              "STATS_REPLY"              },
+	{ OFPT_BARRIER_REQUEST,          "BARRIER_REQUEST"          },
+	{ OFPT_BARRIER_REPLY,            "BARRIER_REPLY"            },
+	{ OFPT_QUEUE_GET_CONFIG_REQUEST, "QUEUE_GET_CONFIG_REQUEST" },
+	{ OFPT_QUEUE_GET_CONFIG_REPLY,   "QUEUE_GET_CONFIG_REPLY"   },
+	{ 0, NULL }
+};
+
+#define OFPPC_PORT_DOWN    (1 << 0)
+#define OFPPC_NO_STP       (1 << 1)
+#define OFPPC_NO_RECV      (1 << 2)
+#define OFPPC_NO_RECV_STP  (1 << 3)
+#define OFPPC_NO_FLOOD     (1 << 4)
+#define OFPPC_NO_FWD       (1 << 5)
+#define OFPPC_NO_PACKET_IN (1 << 6)
+static const struct tok ofppc_bm[] = {
+	{ OFPPC_PORT_DOWN,    "PORT_DOWN"    },
+	{ OFPPC_NO_STP,       "NO_STP"       },
+	{ OFPPC_NO_RECV,      "NO_RECV"      },
+	{ OFPPC_NO_RECV_STP,  "NO_RECV_STP"  },
+	{ OFPPC_NO_FLOOD,     "NO_FLOOD"     },
+	{ OFPPC_NO_FWD,       "NO_FWD"       },
+	{ OFPPC_NO_PACKET_IN, "NO_PACKET_IN" },
+	{ 0, NULL }
+};
+#define OFPPC_U (~(OFPPC_PORT_DOWN | OFPPC_NO_STP | OFPPC_NO_RECV | \
+                   OFPPC_NO_RECV_STP | OFPPC_NO_FLOOD | OFPPC_NO_FWD | \
+                   OFPPC_NO_PACKET_IN))
+
+#define OFPPS_LINK_DOWN   (1 << 0)
+#define OFPPS_STP_LISTEN  (0 << 8)
+#define OFPPS_STP_LEARN   (1 << 8)
+#define OFPPS_STP_FORWARD (2 << 8)
+#define OFPPS_STP_BLOCK   (3 << 8)
+#define OFPPS_STP_MASK    (3 << 8)
+static const struct tok ofpps_bm[] = {
+	{ OFPPS_LINK_DOWN,   "LINK_DOWN"   },
+	{ OFPPS_STP_LISTEN,  "STP_LISTEN"  },
+	{ OFPPS_STP_LEARN,   "STP_LEARN"   },
+	{ OFPPS_STP_FORWARD, "STP_FORWARD" },
+	{ OFPPS_STP_BLOCK,   "STP_BLOCK"   },
+	{ 0, NULL }
+};
+#define OFPPS_U (~(OFPPS_LINK_DOWN | OFPPS_STP_LISTEN | OFPPS_STP_LEARN | \
+                   OFPPS_STP_FORWARD | OFPPS_STP_BLOCK))
+
+#define OFPP_MAX        0xff00
+#define OFPP_IN_PORT    0xfff8
+#define OFPP_TABLE      0xfff9
+#define OFPP_NORMAL     0xfffa
+#define OFPP_FLOOD      0xfffb
+#define OFPP_ALL        0xfffc
+#define OFPP_CONTROLLER 0xfffd
+#define OFPP_LOCAL      0xfffe
+#define OFPP_NONE       0xffff
+static const struct tok ofpp_str[] = {
+	{ OFPP_MAX,        "MAX"        },
+	{ OFPP_IN_PORT,    "IN_PORT"    },
+	{ OFPP_TABLE,      "TABLE"      },
+	{ OFPP_NORMAL,     "NORMAL"     },
+	{ OFPP_FLOOD,      "FLOOD"      },
+	{ OFPP_ALL,        "ALL"        },
+	{ OFPP_CONTROLLER, "CONTROLLER" },
+	{ OFPP_LOCAL,      "LOCAL"      },
+	{ OFPP_NONE,       "NONE"       },
+	{ 0, NULL }
+};
+
+#define OFPPF_10MB_HD    (1 <<  0)
+#define OFPPF_10MB_FD    (1 <<  1)
+#define OFPPF_100MB_HD   (1 <<  2)
+#define OFPPF_100MB_FD   (1 <<  3)
+#define OFPPF_1GB_HD     (1 <<  4)
+#define OFPPF_1GB_FD     (1 <<  5)
+#define OFPPF_10GB_FD    (1 <<  6)
+#define OFPPF_COPPER     (1 <<  7)
+#define OFPPF_FIBER      (1 <<  8)
+#define OFPPF_AUTONEG    (1 <<  9)
+#define OFPPF_PAUSE      (1 << 10)
+#define OFPPF_PAUSE_ASYM (1 << 11)
+static const struct tok ofppf_bm[] = {
+	{ OFPPF_10MB_HD,    "10MB_HD"    },
+	{ OFPPF_10MB_FD,    "10MB_FD"    },
+	{ OFPPF_100MB_HD,   "100MB_HD"   },
+	{ OFPPF_100MB_FD,   "100MB_FD"   },
+	{ OFPPF_1GB_HD,     "1GB_HD"     },
+	{ OFPPF_1GB_FD,     "1GB_FD"     },
+	{ OFPPF_10GB_FD,    "10GB_FD"    },
+	{ OFPPF_COPPER,     "COPPER"     },
+	{ OFPPF_FIBER,      "FIBER"      },
+	{ OFPPF_AUTONEG,    "AUTONEG"    },
+	{ OFPPF_PAUSE,      "PAUSE"      },
+	{ OFPPF_PAUSE_ASYM, "PAUSE_ASYM" },
+	{ 0, NULL }
+};
+#define OFPPF_U (~(OFPPF_10MB_HD | OFPPF_10MB_FD | OFPPF_100MB_HD | \
+                   OFPPF_100MB_FD | OFPPF_1GB_HD | OFPPF_1GB_FD | \
+                   OFPPF_10GB_FD | OFPPF_COPPER | OFPPF_FIBER | \
+                   OFPPF_AUTONEG | OFPPF_PAUSE | OFPPF_PAUSE_ASYM))
+
+#define OFPQT_NONE     0x0000
+#define OFPQT_MIN_RATE 0x0001
+static const struct tok ofpqt_str[] = {
+	{ OFPQT_NONE,     "NONE"     },
+	{ OFPQT_MIN_RATE, "MIN_RATE" },
+	{ 0, NULL }
+};
+
+#define OFPFW_IN_PORT      (1 << 0)
+#define OFPFW_DL_VLAN      (1 << 1)
+#define OFPFW_DL_SRC       (1 << 2)
+#define OFPFW_DL_DST       (1 << 3)
+#define OFPFW_DL_TYPE      (1 << 4)
+#define OFPFW_NW_PROTO     (1 << 5)
+#define OFPFW_TP_SRC       (1 << 6)
+#define OFPFW_TP_DST       (1 << 7)
+#define OFPFW_NW_SRC_SHIFT 8
+#define OFPFW_NW_SRC_BITS  6
+#define OFPFW_NW_SRC_MASK  (((1 << OFPFW_NW_SRC_BITS) - 1) << OFPFW_NW_SRC_SHIFT)
+#define OFPFW_NW_DST_SHIFT 14
+#define OFPFW_NW_DST_BITS  6
+#define OFPFW_NW_DST_MASK  (((1 << OFPFW_NW_DST_BITS) - 1) << OFPFW_NW_DST_SHIFT)
+#define OFPFW_DL_VLAN_PCP  (1 << 20)
+#define OFPFW_NW_TOS       (1 << 21)
+#define OFPFW_ALL          ((1 << 22) - 1)
+static const struct tok ofpfw_bm[] = {
+	{ OFPFW_IN_PORT,     "IN_PORT"     },
+	{ OFPFW_DL_VLAN,     "DL_VLAN"     },
+	{ OFPFW_DL_SRC,      "DL_SRC"      },
+	{ OFPFW_DL_DST,      "DL_DST"      },
+	{ OFPFW_DL_TYPE,     "DL_TYPE"     },
+	{ OFPFW_NW_PROTO,    "NW_PROTO"    },
+	{ OFPFW_TP_SRC,      "TP_SRC"      },
+	{ OFPFW_TP_DST,      "TP_DST"      },
+	{ OFPFW_DL_VLAN_PCP, "DL_VLAN_PCP" },
+	{ OFPFW_NW_TOS,      "NW_TOS"      },
+	{ 0, NULL }
+};
+/* The above array does not include bits 8~13 (OFPFW_NW_SRC_*) and 14~19
+ * (OFPFW_NW_DST_*), which are not a part of the bitmap and require decoding
+ * other than that of tok2str(). The macro below includes these bits such that
+ * they are not reported as bogus in the decoding. */
+#define OFPFW_U (~(OFPFW_ALL))
+
+#define OFPAT_OUTPUT       0x0000
+#define OFPAT_SET_VLAN_VID 0x0001
+#define OFPAT_SET_VLAN_PCP 0x0002
+#define OFPAT_STRIP_VLAN   0x0003
+#define OFPAT_SET_DL_SRC   0x0004
+#define OFPAT_SET_DL_DST   0x0005
+#define OFPAT_SET_NW_SRC   0x0006
+#define OFPAT_SET_NW_DST   0x0007
+#define OFPAT_SET_NW_TOS   0x0008
+#define OFPAT_SET_TP_SRC   0x0009
+#define OFPAT_SET_TP_DST   0x000a
+#define OFPAT_ENQUEUE      0x000b
+#define OFPAT_VENDOR       0xffff
+static const struct tok ofpat_str[] = {
+	{ OFPAT_OUTPUT,       "OUTPUT"       },
+	{ OFPAT_SET_VLAN_VID, "SET_VLAN_VID" },
+	{ OFPAT_SET_VLAN_PCP, "SET_VLAN_PCP" },
+	{ OFPAT_STRIP_VLAN,   "STRIP_VLAN"   },
+	{ OFPAT_SET_DL_SRC,   "SET_DL_SRC"   },
+	{ OFPAT_SET_DL_DST,   "SET_DL_DST"   },
+	{ OFPAT_SET_NW_SRC,   "SET_NW_SRC"   },
+	{ OFPAT_SET_NW_DST,   "SET_NW_DST"   },
+	{ OFPAT_SET_NW_TOS,   "SET_NW_TOS"   },
+	{ OFPAT_SET_TP_SRC,   "SET_TP_SRC"   },
+	{ OFPAT_SET_TP_DST,   "SET_TP_DST"   },
+	{ OFPAT_ENQUEUE,      "ENQUEUE"      },
+	{ OFPAT_VENDOR,       "VENDOR"       },
+	{ 0, NULL }
+};
+
+/* bit-shifted, w/o vendor action */
+static const struct tok ofpat_bm[] = {
+	{ 1 << OFPAT_OUTPUT,       "OUTPUT"       },
+	{ 1 << OFPAT_SET_VLAN_VID, "SET_VLAN_VID" },
+	{ 1 << OFPAT_SET_VLAN_PCP, "SET_VLAN_PCP" },
+	{ 1 << OFPAT_STRIP_VLAN,   "STRIP_VLAN"   },
+	{ 1 << OFPAT_SET_DL_SRC,   "SET_DL_SRC"   },
+	{ 1 << OFPAT_SET_DL_DST,   "SET_DL_DST"   },
+	{ 1 << OFPAT_SET_NW_SRC,   "SET_NW_SRC"   },
+	{ 1 << OFPAT_SET_NW_DST,   "SET_NW_DST"   },
+	{ 1 << OFPAT_SET_NW_TOS,   "SET_NW_TOS"   },
+	{ 1 << OFPAT_SET_TP_SRC,   "SET_TP_SRC"   },
+	{ 1 << OFPAT_SET_TP_DST,   "SET_TP_DST"   },
+	{ 1 << OFPAT_ENQUEUE,      "ENQUEUE"      },
+	{ 0, NULL }
+};
+#define OFPAT_U (~(1 << OFPAT_OUTPUT | 1 << OFPAT_SET_VLAN_VID | \
+                   1 << OFPAT_SET_VLAN_PCP | 1 << OFPAT_STRIP_VLAN | \
+                   1 << OFPAT_SET_DL_SRC | 1 << OFPAT_SET_DL_DST | \
+                   1 << OFPAT_SET_NW_SRC | 1 << OFPAT_SET_NW_DST | \
+                   1 << OFPAT_SET_NW_TOS | 1 << OFPAT_SET_TP_SRC | \
+                   1 << OFPAT_SET_TP_DST | 1 << OFPAT_ENQUEUE))
+
+#define OFPC_FLOW_STATS   (1 << 0)
+#define OFPC_TABLE_STATS  (1 << 1)
+#define OFPC_PORT_STATS   (1 << 2)
+#define OFPC_STP          (1 << 3)
+#define OFPC_RESERVED     (1 << 4)
+#define OFPC_IP_REASM     (1 << 5)
+#define OFPC_QUEUE_STATS  (1 << 6)
+#define OFPC_ARP_MATCH_IP (1 << 7)
+static const struct tok ofp_capabilities_bm[] = {
+	{ OFPC_FLOW_STATS,   "FLOW_STATS"   },
+	{ OFPC_TABLE_STATS,  "TABLE_STATS"  },
+	{ OFPC_PORT_STATS,   "PORT_STATS"   },
+	{ OFPC_STP,          "STP"          },
+	{ OFPC_RESERVED,     "RESERVED"     }, /* not in the mask below */
+	{ OFPC_IP_REASM,     "IP_REASM"     },
+	{ OFPC_QUEUE_STATS,  "QUEUE_STATS"  },
+	{ OFPC_ARP_MATCH_IP, "ARP_MATCH_IP" },
+	{ 0, NULL }
+};
+#define OFPCAP_U (~(OFPC_FLOW_STATS | OFPC_TABLE_STATS | OFPC_PORT_STATS | \
+                    OFPC_STP | OFPC_IP_REASM | OFPC_QUEUE_STATS | \
+                    OFPC_ARP_MATCH_IP))
+
+#define OFPC_FRAG_NORMAL 0x0000
+#define OFPC_FRAG_DROP   0x0001
+#define OFPC_FRAG_REASM  0x0002
+#define OFPC_FRAG_MASK   0x0003
+static const struct tok ofp_config_str[] = {
+	{ OFPC_FRAG_NORMAL, "FRAG_NORMAL" },
+	{ OFPC_FRAG_DROP,   "FRAG_DROP"   },
+	{ OFPC_FRAG_REASM,  "FRAG_REASM"  },
+	{ 0, NULL }
+};
+
+#define OFPFC_ADD           0x0000
+#define OFPFC_MODIFY        0x0001
+#define OFPFC_MODIFY_STRICT 0x0002
+#define OFPFC_DELETE        0x0003
+#define OFPFC_DELETE_STRICT 0x0004
+static const struct tok ofpfc_str[] = {
+	{ OFPFC_ADD,           "ADD"           },
+	{ OFPFC_MODIFY,        "MODIFY"        },
+	{ OFPFC_MODIFY_STRICT, "MODIFY_STRICT" },
+	{ OFPFC_DELETE,        "DELETE"        },
+	{ OFPFC_DELETE_STRICT, "DELETE_STRICT" },
+	{ 0, NULL }
+};
+
+static const struct tok bufferid_str[] = {
+	{ 0xffffffff, "NONE" },
+	{ 0, NULL }
+};
+
+#define OFPFF_SEND_FLOW_REM (1 << 0)
+#define OFPFF_CHECK_OVERLAP (1 << 1)
+#define OFPFF_EMERG         (1 << 2)
+static const struct tok ofpff_bm[] = {
+	{ OFPFF_SEND_FLOW_REM, "SEND_FLOW_REM" },
+	{ OFPFF_CHECK_OVERLAP, "CHECK_OVERLAP" },
+	{ OFPFF_EMERG,         "EMERG"         },
+	{ 0, NULL }
+};
+#define OFPFF_U (~(OFPFF_SEND_FLOW_REM | OFPFF_CHECK_OVERLAP | OFPFF_EMERG))
+
+#define OFPST_DESC      0x0000
+#define OFPST_FLOW      0x0001
+#define OFPST_AGGREGATE 0x0002
+#define OFPST_TABLE     0x0003
+#define OFPST_PORT      0x0004
+#define OFPST_QUEUE     0x0005
+#define OFPST_VENDOR    0xffff
+static const struct tok ofpst_str[] = {
+	{ OFPST_DESC,      "DESC"      },
+	{ OFPST_FLOW,      "FLOW"      },
+	{ OFPST_AGGREGATE, "AGGREGATE" },
+	{ OFPST_TABLE,     "TABLE"     },
+	{ OFPST_PORT,      "PORT"      },
+	{ OFPST_QUEUE,     "QUEUE"     },
+	{ OFPST_VENDOR,    "VENDOR"    },
+	{ 0, NULL }
+};
+
+static const struct tok tableid_str[] = {
+	{ 0xfe, "EMERG" },
+	{ 0xff, "ALL"   },
+	{ 0, NULL }
+};
+
+#define OFPQ_ALL      0xffffffff
+static const struct tok ofpq_str[] = {
+	{ OFPQ_ALL, "ALL" },
+	{ 0, NULL }
+};
+
+#define OFPSF_REPLY_MORE 0x0001
+static const struct tok ofpsf_reply_bm[] = {
+	{ OFPSF_REPLY_MORE, "MORE" },
+	{ 0, NULL }
+};
+#define OFPSF_REPLY_U (~(OFPSF_REPLY_MORE))
+
+#define OFPR_NO_MATCH 0x00
+#define OFPR_ACTION   0x01
+static const struct tok ofpr_str[] = {
+	{ OFPR_NO_MATCH, "NO_MATCH" },
+	{ OFPR_ACTION,   "ACTION"   },
+	{ 0, NULL }
+};
+
+#define OFPRR_IDLE_TIMEOUT 0x00
+#define OFPRR_HARD_TIMEOUT 0x01
+#define OFPRR_DELETE       0x02
+static const struct tok ofprr_str[] = {
+	{ OFPRR_IDLE_TIMEOUT, "IDLE_TIMEOUT" },
+	{ OFPRR_HARD_TIMEOUT, "HARD_TIMEOUT" },
+	{ OFPRR_DELETE,       "DELETE"       },
+	{ 0, NULL }
+};
+
+#define OFPPR_ADD    0x00
+#define OFPPR_DELETE 0x01
+#define OFPPR_MODIFY 0x02
+static const struct tok ofppr_str[] = {
+	{ OFPPR_ADD,    "ADD"    },
+	{ OFPPR_DELETE, "DELETE" },
+	{ OFPPR_MODIFY, "MODIFY" },
+	{ 0, NULL }
+};
+
+#define OFPET_HELLO_FAILED    0x0000
+#define OFPET_BAD_REQUEST     0x0001
+#define OFPET_BAD_ACTION      0x0002
+#define OFPET_FLOW_MOD_FAILED 0x0003
+#define OFPET_PORT_MOD_FAILED 0x0004
+#define OFPET_QUEUE_OP_FAILED 0x0005
+static const struct tok ofpet_str[] = {
+	{ OFPET_HELLO_FAILED,    "HELLO_FAILED"    },
+	{ OFPET_BAD_REQUEST,     "BAD_REQUEST"     },
+	{ OFPET_BAD_ACTION,      "BAD_ACTION"      },
+	{ OFPET_FLOW_MOD_FAILED, "FLOW_MOD_FAILED" },
+	{ OFPET_PORT_MOD_FAILED, "PORT_MOD_FAILED" },
+	{ OFPET_QUEUE_OP_FAILED, "QUEUE_OP_FAILED" },
+	{ 0, NULL }
+};
+
+#define OFPHFC_INCOMPATIBLE 0x0000
+#define OFPHFC_EPERM        0x0001
+static const struct tok ofphfc_str[] = {
+	{ OFPHFC_INCOMPATIBLE, "INCOMPATIBLE" },
+	{ OFPHFC_EPERM,        "EPERM"        },
+	{ 0, NULL }
+};
+
+#define OFPBRC_BAD_VERSION    0x0000
+#define OFPBRC_BAD_TYPE       0x0001
+#define OFPBRC_BAD_STAT       0x0002
+#define OFPBRC_BAD_VENDOR     0x0003
+#define OFPBRC_BAD_SUBTYPE    0x0004
+#define OFPBRC_EPERM          0x0005
+#define OFPBRC_BAD_LEN        0x0006
+#define OFPBRC_BUFFER_EMPTY   0x0007
+#define OFPBRC_BUFFER_UNKNOWN 0x0008
+static const struct tok ofpbrc_str[] = {
+	{ OFPBRC_BAD_VERSION,    "BAD_VERSION"    },
+	{ OFPBRC_BAD_TYPE,       "BAD_TYPE"       },
+	{ OFPBRC_BAD_STAT,       "BAD_STAT"       },
+	{ OFPBRC_BAD_VENDOR,     "BAD_VENDOR"     },
+	{ OFPBRC_BAD_SUBTYPE,    "BAD_SUBTYPE"    },
+	{ OFPBRC_EPERM,          "EPERM"          },
+	{ OFPBRC_BAD_LEN,        "BAD_LEN"        },
+	{ OFPBRC_BUFFER_EMPTY,   "BUFFER_EMPTY"   },
+	{ OFPBRC_BUFFER_UNKNOWN, "BUFFER_UNKNOWN" },
+	{ 0, NULL }
+};
+
+#define OFPBAC_BAD_TYPE        0x0000
+#define OFPBAC_BAD_LEN         0x0001
+#define OFPBAC_BAD_VENDOR      0x0002
+#define OFPBAC_BAD_VENDOR_TYPE 0x0003
+#define OFPBAC_BAD_OUT_PORT    0x0004
+#define OFPBAC_BAD_ARGUMENT    0x0005
+#define OFPBAC_EPERM           0x0006
+#define OFPBAC_TOO_MANY        0x0007
+#define OFPBAC_BAD_QUEUE       0x0008
+static const struct tok ofpbac_str[] = {
+	{ OFPBAC_BAD_TYPE,        "BAD_TYPE"        },
+	{ OFPBAC_BAD_LEN,         "BAD_LEN"         },
+	{ OFPBAC_BAD_VENDOR,      "BAD_VENDOR"      },
+	{ OFPBAC_BAD_VENDOR_TYPE, "BAD_VENDOR_TYPE" },
+	{ OFPBAC_BAD_OUT_PORT,    "BAD_OUT_PORT"    },
+	{ OFPBAC_BAD_ARGUMENT,    "BAD_ARGUMENT"    },
+	{ OFPBAC_EPERM,           "EPERM"           },
+	{ OFPBAC_TOO_MANY,        "TOO_MANY"        },
+	{ OFPBAC_BAD_QUEUE,       "BAD_QUEUE"       },
+	{ 0, NULL }
+};
+
+#define OFPFMFC_ALL_TABLES_FULL   0x0000
+#define OFPFMFC_OVERLAP           0x0001
+#define OFPFMFC_EPERM             0x0002
+#define OFPFMFC_BAD_EMERG_TIMEOUT 0x0003
+#define OFPFMFC_BAD_COMMAND       0x0004
+#define OFPFMFC_UNSUPPORTED       0x0005
+static const struct tok ofpfmfc_str[] = {
+	{ OFPFMFC_ALL_TABLES_FULL,   "ALL_TABLES_FULL"   },
+	{ OFPFMFC_OVERLAP,           "OVERLAP"           },
+	{ OFPFMFC_EPERM,             "EPERM"             },
+	{ OFPFMFC_BAD_EMERG_TIMEOUT, "BAD_EMERG_TIMEOUT" },
+	{ OFPFMFC_BAD_COMMAND,       "BAD_COMMAND"       },
+	{ OFPFMFC_UNSUPPORTED,       "UNSUPPORTED"       },
+	{ 0, NULL }
+};
+
+#define OFPPMFC_BAD_PORT    0x0000
+#define OFPPMFC_BAD_HW_ADDR 0x0001
+static const struct tok ofppmfc_str[] = {
+	{ OFPPMFC_BAD_PORT,    "BAD_PORT"    },
+	{ OFPPMFC_BAD_HW_ADDR, "BAD_HW_ADDR" },
+	{ 0, NULL }
+};
+
+#define OFPQOFC_BAD_PORT  0x0000
+#define OFPQOFC_BAD_QUEUE 0x0001
+#define OFPQOFC_EPERM     0x0002
+static const struct tok ofpqofc_str[] = {
+	{ OFPQOFC_BAD_PORT,  "BAD_PORT"  },
+	{ OFPQOFC_BAD_QUEUE, "BAD_QUEUE" },
+	{ OFPQOFC_EPERM,     "EPERM"     },
+	{ 0, NULL }
+};
+
+static const struct tok empty_str[] = {
+	{ 0, NULL }
+};
+
+/* lengths (fixed or minimal) of particular protocol structures */
+#define OF_SWITCH_CONFIG_LEN              12
+#define OF_PHY_PORT_LEN                   48
+#define OF_SWITCH_FEATURES_LEN            32
+#define OF_PORT_STATUS_LEN                64
+#define OF_PORT_MOD_LEN                   32
+#define OF_PACKET_IN_LEN                  20
+#define OF_ACTION_OUTPUT_LEN               8
+#define OF_ACTION_VLAN_VID_LEN             8
+#define OF_ACTION_VLAN_PCP_LEN             8
+#define OF_ACTION_DL_ADDR_LEN             16
+#define OF_ACTION_NW_ADDR_LEN              8
+#define OF_ACTION_TP_PORT_LEN              8
+#define OF_ACTION_NW_TOS_LEN               8
+#define OF_ACTION_VENDOR_HEADER_LEN        8
+#define OF_ACTION_HEADER_LEN               8
+#define OF_PACKET_OUT_LEN                 16
+#define OF_MATCH_LEN                      40
+#define OF_FLOW_MOD_LEN                   72
+#define OF_FLOW_REMOVED_LEN               88
+#define OF_ERROR_MSG_LEN                  12
+#define OF_STATS_REQUEST_LEN              12
+#define OF_STATS_REPLY_LEN                12
+#define OF_DESC_STATS_LEN               1056
+#define OF_FLOW_STATS_REQUEST_LEN         44
+#define OF_FLOW_STATS_LEN                 88
+#define OF_AGGREGATE_STATS_REQUEST_LEN    44
+#define OF_AGGREGATE_STATS_REPLY_LEN      24
+#define OF_TABLE_STATS_LEN                64
+#define OF_PORT_STATS_REQUEST_LEN          8
+#define OF_PORT_STATS_LEN                104
+#define OF_VENDOR_HEADER_LEN              12
+#define OF_QUEUE_PROP_HEADER_LEN           8
+#define OF_QUEUE_PROP_MIN_RATE_LEN        16
+#define OF_PACKET_QUEUE_LEN                8
+#define OF_QUEUE_GET_CONFIG_REQUEST_LEN   12
+#define OF_QUEUE_GET_CONFIG_REPLY_LEN     16
+#define OF_ACTION_ENQUEUE_LEN             16
+#define OF_QUEUE_STATS_REQUEST_LEN         8
+#define OF_QUEUE_STATS_LEN                32
+
+/* miscellaneous constants from [OF10] */
+#define OFP_MAX_TABLE_NAME_LEN     32
+#define OFP_MAX_PORT_NAME_LEN      16
+#define DESC_STR_LEN              256
+#define SERIAL_NUM_LEN             32
+#define OFP_ETH_ALEN                6
+#define OFP_VLAN_NONE          0xffff
+
+static const char *
+vlan_str(const uint16_t vid) {
+	static char buf[sizeof("65535 (bogus)")];
+	const char *fmt;
+
+	if (vid == OFP_VLAN_NONE)
+		return "NONE";
+	fmt = (vid > 0 && vid < 0x0fff) ? "%u" : "%u (bogus)";
+	snprintf(buf, sizeof(buf), fmt, vid);
+	return buf;
+}
+
+static const char *
+pcp_str(const uint8_t pcp) {
+	static char buf[sizeof("255 (bogus)")];
+	snprintf(buf, sizeof(buf), pcp <= 7 ? "%u" : "%u (bogus)", pcp);
+	return buf;
+}
+
+static void
+of10_bitmap_print(const struct tok *t, const uint32_t v, const uint32_t u) {
+	const char *sep = " (";
+
+	if (v == 0)
+		return;
+	/* assigned bits */
+	for (; t->s != NULL; t++)
+		if (v & t->v) {
+			printf("%s%s", sep, t->s);
+			sep = ", ";
+		}
+	/* unassigned bits? */
+	printf(v & u ? ") (bogus)" : ")");
+}
+
+static const u_char *
+of10_data_print(const u_char *cp, const u_char *ep, const u_int len) {
+	if (len == 0)
+		return cp;
+	/* data */
+	printf("\n\t data (%u octets)", len);
+	TCHECK2(*cp, len);
+	if (vflag >= 2)
+		hex_and_ascii_print("\n\t  ", cp, len);
+	return cp + len;
+
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* Vendor ID is mandatory, data is optional. */
+static const u_char *
+of10_vendor_data_print(const u_char *cp, const u_char *ep, const u_int len) {
+	if (len < 4)
+		goto corrupt;
+	/* vendor */
+	TCHECK2(*cp, 4);
+	printf(", vendor 0x%08x", EXTRACT_32BITS(cp));
+	cp += 4;
+	/* data */
+	return of10_data_print(cp, ep, len - 4);
+
+corrupt: /* skip the undersized data */
+	printf(" (corrupt)");
+	TCHECK2(*cp, len);
+	return cp + len;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+static const u_char *
+of10_packet_data_print(const u_char *cp, const u_char *ep, const u_int len) {
+	if (len == 0)
+		return cp;
+	/* data */
+	printf("\n\t data (%u octets)", len);
+	if (vflag < 3)
+		return cp + len;
+	TCHECK2(*cp, len);
+	vflag -= 3;
+	printf(", frame decoding below\n");
+	ether_print(gndo, cp, len, snapend - cp, NULL, NULL);
+	vflag += 3;
+	return cp + len;
+
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* [OF10] Section 5.2.1 */
+static const u_char *
+of10_phy_ports_print(const u_char *cp, const u_char *ep, u_int len) {
+	const u_char *cp0 = cp;
+	const u_int len0 = len;
+
+	while (len) {
+		if (len < OF_PHY_PORT_LEN)
+			goto corrupt;
+		/* port_no */
+		TCHECK2(*cp, 2);
+		printf("\n\t  port_no %s", tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp)));
+		cp += 2;
+		/* hw_addr */
+		TCHECK2(*cp, OFP_ETH_ALEN);
+		printf(", hw_addr %s", etheraddr_string(cp));
+		cp += OFP_ETH_ALEN;
+		/* name */
+		TCHECK2(*cp, OFP_MAX_PORT_NAME_LEN);
+		printf(", name '");
+		fn_print(cp, cp + OFP_MAX_PORT_NAME_LEN);
+		printf("'");
+		cp += OFP_MAX_PORT_NAME_LEN;
+
+		if (vflag < 2) {
+			TCHECK2(*cp, 24);
+			cp += 24;
+			goto next_port;
+		}
+		/* config */
+		TCHECK2(*cp, 4);
+		printf("\n\t   config 0x%08x", EXTRACT_32BITS(cp));
+		of10_bitmap_print(ofppc_bm, EXTRACT_32BITS(cp), OFPPC_U);
+		cp += 4;
+		/* state */
+		TCHECK2(*cp, 4);
+		printf("\n\t   state 0x%08x", EXTRACT_32BITS(cp));
+		of10_bitmap_print(ofpps_bm, EXTRACT_32BITS(cp), OFPPS_U);
+		cp += 4;
+		/* curr */
+		TCHECK2(*cp, 4);
+		printf("\n\t   curr 0x%08x", EXTRACT_32BITS(cp));
+		of10_bitmap_print(ofppf_bm, EXTRACT_32BITS(cp), OFPPF_U);
+		cp += 4;
+		/* advertised */
+		TCHECK2(*cp, 4);
+		printf("\n\t   advertised 0x%08x", EXTRACT_32BITS(cp));
+		of10_bitmap_print(ofppf_bm, EXTRACT_32BITS(cp), OFPPF_U);
+		cp += 4;
+		/* supported */
+		TCHECK2(*cp, 4);
+		printf("\n\t   supported 0x%08x", EXTRACT_32BITS(cp));
+		of10_bitmap_print(ofppf_bm, EXTRACT_32BITS(cp), OFPPF_U);
+		cp += 4;
+		/* peer */
+		TCHECK2(*cp, 4);
+		printf("\n\t   peer 0x%08x", EXTRACT_32BITS(cp));
+		of10_bitmap_print(ofppf_bm, EXTRACT_32BITS(cp), OFPPF_U);
+		cp += 4;
+next_port:
+		len -= OF_PHY_PORT_LEN;
+	} /* while */
+	return cp;
+
+corrupt: /* skip the undersized trailing data */
+	printf(" (corrupt)");
+	TCHECK2(*cp0, len0);
+	return cp0 + len0;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* [OF10] Section 5.2.2 */
+static const u_char *
+of10_queue_props_print(const u_char *cp, const u_char *ep, u_int len) {
+	const u_char *cp0 = cp;
+	const u_int len0 = len;
+	uint16_t property, plen, rate;
+
+	while (len) {
+		u_char plen_bogus = 0, skip = 0;
+
+		if (len < OF_QUEUE_PROP_HEADER_LEN)
+			goto corrupt;
+		/* property */
+		TCHECK2(*cp, 2);
+		property = EXTRACT_16BITS(cp);
+		cp += 2;
+		printf("\n\t   property %s", tok2str(ofpqt_str, "invalid (0x%04x)", property));
+		/* len */
+		TCHECK2(*cp, 2);
+		plen = EXTRACT_16BITS(cp);
+		cp += 2;
+		printf(", len %u", plen);
+		if (plen < OF_QUEUE_PROP_HEADER_LEN || plen > len)
+			goto corrupt;
+		/* pad */
+		TCHECK2(*cp, 4);
+		cp += 4;
+		/* property-specific constraints and decoding */
+		switch (property) {
+		case OFPQT_NONE:
+			plen_bogus = plen != OF_QUEUE_PROP_HEADER_LEN;
+			break;
+		case OFPQT_MIN_RATE:
+			plen_bogus = plen != OF_QUEUE_PROP_MIN_RATE_LEN;
+			break;
+		default:
+			skip = 1;
+		}
+		if (plen_bogus) {
+			printf(" (bogus)");
+			skip = 1;
+		}
+		if (skip) {
+			TCHECK2(*cp, plen - 4);
+			cp += plen - 4;
+			goto next_property;
+		}
+		if (property == OFPQT_MIN_RATE) { /* the only case of property decoding */
+			/* rate */
+			TCHECK2(*cp, 2);
+			rate = EXTRACT_16BITS(cp);
+			cp += 2;
+			if (rate > 1000)
+				printf(", rate disabled");
+			else
+				printf(", rate %u.%u%%", rate / 10, rate % 10);
+			/* pad */
+			TCHECK2(*cp, 6);
+			cp += 6;
+		}
+next_property:
+		len -= plen;
+	} /* while */
+	return cp;
+
+corrupt: /* skip the rest of queue properties */
+	printf(" (corrupt)");
+	TCHECK2(*cp0, len0);
+	return cp0 + len0;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* ibid */
+static const u_char *
+of10_queues_print(const u_char *cp, const u_char *ep, u_int len) {
+	const u_char *cp0 = cp;
+	const u_int len0 = len;
+	uint16_t desclen;
+
+	while (len) {
+		if (len < OF_PACKET_QUEUE_LEN)
+			goto corrupt;
+		/* queue_id */
+		TCHECK2(*cp, 4);
+		printf("\n\t  queue_id %u", EXTRACT_32BITS(cp));
+		cp += 4;
+		/* len */
+		TCHECK2(*cp, 2);
+		desclen = EXTRACT_16BITS(cp);
+		cp += 2;
+		printf(", len %u", desclen);
+		if (desclen < OF_PACKET_QUEUE_LEN || desclen > len)
+			goto corrupt;
+		/* pad */
+		TCHECK2(*cp, 2);
+		cp += 2;
+		/* properties */
+		if (vflag < 2) {
+			TCHECK2(*cp, desclen - OF_PACKET_QUEUE_LEN);
+			cp += desclen - OF_PACKET_QUEUE_LEN;
+			goto next_queue;
+		}
+		if (ep == (cp = of10_queue_props_print(cp, ep, desclen - OF_PACKET_QUEUE_LEN)))
+			return ep; /* end of snapshot */
+next_queue:
+		len -= desclen;
+	} /* while */
+	return cp;
+
+corrupt: /* skip the rest of queues */
+	printf(" (corrupt)");
+	TCHECK2(*cp0, len0);
+	return cp0 + len0;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* [OF10] Section 5.2.3 */
+static const u_char *
+of10_match_print(const char *pfx, const u_char *cp, const u_char *ep) {
+	uint32_t wildcards;
+	uint16_t dl_type;
+	uint8_t nw_proto;
+	u_char nw_bits;
+	const char *field_name;
+
+	/* wildcards */
+	TCHECK2(*cp, 4);
+	wildcards = EXTRACT_32BITS(cp);
+	if (wildcards & OFPFW_U)
+		printf("%swildcards 0x%08x (bogus)", pfx, wildcards);
+	cp += 4;
+	/* in_port */
+	TCHECK2(*cp, 2);
+	if (! (wildcards & OFPFW_IN_PORT))
+		printf("%smatch in_port %s", pfx, tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp)));
+	cp += 2;
+	/* dl_src */
+	TCHECK2(*cp, OFP_ETH_ALEN);
+	if (! (wildcards & OFPFW_DL_SRC))
+		printf("%smatch dl_src %s", pfx, etheraddr_string(cp));
+	cp += OFP_ETH_ALEN;
+	/* dl_dst */
+	TCHECK2(*cp, OFP_ETH_ALEN);
+	if (! (wildcards & OFPFW_DL_DST))
+		printf("%smatch dl_dst %s", pfx, etheraddr_string(cp));
+	cp += OFP_ETH_ALEN;
+	/* dl_vlan */
+	TCHECK2(*cp, 2);
+	if (! (wildcards & OFPFW_DL_VLAN))
+		printf("%smatch dl_vlan %s", pfx, vlan_str(EXTRACT_16BITS(cp)));
+	cp += 2;
+	/* dl_vlan_pcp */
+	TCHECK2(*cp, 1);
+	if (! (wildcards & OFPFW_DL_VLAN_PCP))
+		printf("%smatch dl_vlan_pcp %s", pfx, pcp_str(*cp));
+	cp += 1;
+	/* pad1 */
+	TCHECK2(*cp, 1);
+	cp += 1;
+	/* dl_type */
+	TCHECK2(*cp, 2);
+	dl_type = EXTRACT_16BITS(cp);
+	cp += 2;
+	if (! (wildcards & OFPFW_DL_TYPE))
+		printf("%smatch dl_type 0x%04x", pfx, dl_type);
+	/* nw_tos */
+	TCHECK2(*cp, 1);
+	if (! (wildcards & OFPFW_NW_TOS))
+		printf("%smatch nw_tos 0x%02x", pfx, *cp);
+	cp += 1;
+	/* nw_proto */
+	TCHECK2(*cp, 1);
+	nw_proto = *cp;
+	cp += 1;
+	if (! (wildcards & OFPFW_NW_PROTO)) {
+		field_name = ! (wildcards & OFPFW_DL_TYPE) && dl_type == ETHERTYPE_ARP
+		  ? "arp_opcode" : "nw_proto";
+		printf("%smatch %s %u", pfx, field_name, nw_proto);
+	}
+	/* pad2 */
+	TCHECK2(*cp, 2);
+	cp += 2;
+	/* nw_src */
+	TCHECK2(*cp, 4);
+	nw_bits = (wildcards & OFPFW_NW_SRC_MASK) >> OFPFW_NW_SRC_SHIFT;
+	if (nw_bits < 32)
+		printf("%smatch nw_src %s/%u", pfx, ipaddr_string(cp), 32 - nw_bits);
+	cp += 4;
+	/* nw_dst */
+	TCHECK2(*cp, 4);
+	nw_bits = (wildcards & OFPFW_NW_DST_MASK) >> OFPFW_NW_DST_SHIFT;
+	if (nw_bits < 32)
+		printf("%smatch nw_dst %s/%u", pfx, ipaddr_string(cp), 32 - nw_bits);
+	cp += 4;
+	/* tp_src */
+	TCHECK2(*cp, 2);
+	if (! (wildcards & OFPFW_TP_SRC)) {
+		field_name = ! (wildcards & OFPFW_DL_TYPE) && dl_type == ETHERTYPE_IP
+		  && ! (wildcards & OFPFW_NW_PROTO) && nw_proto == IPPROTO_ICMP
+		  ? "icmp_type" : "tp_src";
+		printf("%smatch %s %u", pfx, field_name, EXTRACT_16BITS(cp));
+	}
+	cp += 2;
+	/* tp_dst */
+	TCHECK2(*cp, 2);
+	if (! (wildcards & OFPFW_TP_DST)) {
+		field_name = ! (wildcards & OFPFW_DL_TYPE) && dl_type == ETHERTYPE_IP
+		  && ! (wildcards & OFPFW_NW_PROTO) && nw_proto == IPPROTO_ICMP
+		  ? "icmp_code" : "tp_dst";
+		printf("%smatch %s %u", pfx, field_name, EXTRACT_16BITS(cp));
+	}
+	return cp + 2;
+
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* [OF10] Section 5.2.4 */
+static const u_char *
+of10_actions_print(const char *pfx, const u_char *cp, const u_char *ep,
+                   u_int len) {
+	const u_char *cp0 = cp;
+	const u_int len0 = len;
+	uint16_t type, alen, output_port;
+
+	while (len) {
+		u_char alen_bogus = 0, skip = 0;
+
+		if (len < OF_ACTION_HEADER_LEN)
+			goto corrupt;
+		/* type */
+		TCHECK2(*cp, 2);
+		type = EXTRACT_16BITS(cp);
+		cp += 2;
+		printf("%saction type %s", pfx, tok2str(ofpat_str, "invalid (0x%04x)", type));
+		/* length */
+		TCHECK2(*cp, 2);
+		alen = EXTRACT_16BITS(cp);
+		cp += 2;
+		printf(", len %u", alen);
+		/* On action size underrun/overrun skip the rest of the action list. */
+		if (alen < OF_ACTION_HEADER_LEN || alen > len)
+			goto corrupt;
+		/* On action size inappropriate for the given type or invalid type just skip
+		 * the current action, as the basic length constraint has been met. */
+		switch (type) {
+		case OFPAT_OUTPUT:
+		case OFPAT_SET_VLAN_VID:
+		case OFPAT_SET_VLAN_PCP:
+		case OFPAT_STRIP_VLAN:
+		case OFPAT_SET_NW_SRC:
+		case OFPAT_SET_NW_DST:
+		case OFPAT_SET_NW_TOS:
+		case OFPAT_SET_TP_SRC:
+		case OFPAT_SET_TP_DST:
+			alen_bogus = alen != 8;
+			break;
+		case OFPAT_SET_DL_SRC:
+		case OFPAT_SET_DL_DST:
+		case OFPAT_ENQUEUE:
+			alen_bogus = alen != 16;
+			break;
+		case OFPAT_VENDOR:
+			alen_bogus = alen % 8 != 0; /* already >= 8 so far */
+			break;
+		default:
+			skip = 1;
+		}
+		if (alen_bogus) {
+			printf(" (bogus)");
+			skip = 1;
+		}
+		if (skip) {
+			TCHECK2(*cp, alen - 4);
+			cp += alen - 4;
+			goto next_action;
+		}
+		/* OK to decode the rest of the action structure */
+		switch (type) {
+		case OFPAT_OUTPUT:
+			/* port */
+			TCHECK2(*cp, 2);
+			output_port = EXTRACT_16BITS(cp);
+			cp += 2;
+			printf(", port %s", tok2str(ofpp_str, "%u", output_port));
+			/* max_len */
+			TCHECK2(*cp, 2);
+			if (output_port == OFPP_CONTROLLER)
+				printf(", max_len %u", EXTRACT_16BITS(cp));
+			cp += 2;
+			break;
+		case OFPAT_SET_VLAN_VID:
+			/* vlan_vid */
+			TCHECK2(*cp, 2);
+			printf(", vlan_vid %s", vlan_str(EXTRACT_16BITS(cp)));
+			cp += 2;
+			/* pad */
+			TCHECK2(*cp, 2);
+			cp += 2;
+			break;
+		case OFPAT_SET_VLAN_PCP:
+			/* vlan_pcp */
+			TCHECK2(*cp, 1);
+			printf(", vlan_pcp %s", pcp_str(*cp));
+			cp += 1;
+			/* pad */
+			TCHECK2(*cp, 3);
+			cp += 3;
+			break;
+		case OFPAT_SET_DL_SRC:
+		case OFPAT_SET_DL_DST:
+			/* dl_addr */
+			TCHECK2(*cp, OFP_ETH_ALEN);
+			printf(", dl_addr %s", etheraddr_string(cp));
+			cp += OFP_ETH_ALEN;
+			/* pad */
+			TCHECK2(*cp, 6);
+			cp += 6;
+			break;
+		case OFPAT_SET_NW_SRC:
+		case OFPAT_SET_NW_DST:
+			/* nw_addr */
+			TCHECK2(*cp, 4);
+			printf(", nw_addr %s", ipaddr_string(cp));
+			cp += 4;
+			break;
+		case OFPAT_SET_NW_TOS:
+			/* nw_tos */
+			TCHECK2(*cp, 1);
+			printf(", nw_tos 0x%02x", *cp);
+			cp += 1;
+			/* pad */
+			TCHECK2(*cp, 3);
+			cp += 3;
+			break;
+		case OFPAT_SET_TP_SRC:
+		case OFPAT_SET_TP_DST:
+			/* nw_tos */
+			TCHECK2(*cp, 2);
+			printf(", tp_port %u", EXTRACT_16BITS(cp));
+			cp += 2;
+			/* pad */
+			TCHECK2(*cp, 2);
+			cp += 2;
+			break;
+		case OFPAT_ENQUEUE:
+			/* port */
+			TCHECK2(*cp, 2);
+			printf(", port %s", tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp)));
+			cp += 2;
+			/* pad */
+			TCHECK2(*cp, 6);
+			cp += 6;
+			/* queue_id */
+			TCHECK2(*cp, 4);
+			printf(", queue_id %s", tok2str(ofpq_str, "%u", EXTRACT_32BITS(cp)));
+			cp += 4;
+			break;
+		case OFPAT_VENDOR:
+			if (ep == (cp = of10_vendor_data_print(cp, ep, alen - 4)))
+				return ep; /* end of snapshot */
+			break;
+		case OFPAT_STRIP_VLAN:
+			/* pad */
+			TCHECK2(*cp, 4);
+			cp += 4;
+			break;
+		} /* switch */
+next_action:
+		len -= alen;
+	} /* while */
+	return cp;
+
+corrupt: /* skip the rest of actions */
+	printf(" (corrupt)");
+	TCHECK2(*cp0, len0);
+	return cp0 + len0;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* [OF10] Section 5.3.1 */
+static const u_char *
+of10_features_reply_print(const u_char *cp, const u_char *ep, const u_int len) {
+	/* datapath_id */
+	TCHECK2(*cp, 8);
+	printf("\n\t dpid 0x%016" PRIx64, EXTRACT_64BITS(cp));
+	cp += 8;
+	/* n_buffers */
+	TCHECK2(*cp, 4);
+	printf(", n_buffers %u", EXTRACT_32BITS(cp));
+	cp += 4;
+	/* n_tables */
+	TCHECK2(*cp, 1);
+	printf(", n_tables %u", *cp);
+	cp += 1;
+	/* pad */
+	TCHECK2(*cp, 3);
+	cp += 3;
+	/* capabilities */
+	TCHECK2(*cp, 4);
+	printf("\n\t capabilities 0x%08x", EXTRACT_32BITS(cp));
+	of10_bitmap_print(ofp_capabilities_bm, EXTRACT_32BITS(cp), OFPCAP_U);
+	cp += 4;
+	/* actions */
+	TCHECK2(*cp, 4);
+	printf("\n\t actions 0x%08x", EXTRACT_32BITS(cp));
+	of10_bitmap_print(ofpat_bm, EXTRACT_32BITS(cp), OFPAT_U);
+	cp += 4;
+	/* ports */
+	return of10_phy_ports_print(cp, ep, len - OF_SWITCH_FEATURES_LEN);
+
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* [OF10] Section 5.3.3 */
+static const u_char *
+of10_flow_mod_print(const u_char *cp, const u_char *ep, const u_int len) {
+	uint16_t command;
+
+	/* match */
+	if (ep == (cp = of10_match_print("\n\t ", cp, ep)))
+		return ep; /* end of snapshot */
+	/* cookie */
+	TCHECK2(*cp, 8);
+	printf("\n\t cookie 0x%016" PRIx64, EXTRACT_64BITS(cp));
+	cp += 8;
+	/* command */
+	TCHECK2(*cp, 2);
+	command = EXTRACT_16BITS(cp);
+	printf(", command %s", tok2str(ofpfc_str, "invalid (0x%04x)", command));
+	cp += 2;
+	/* idle_timeout */
+	TCHECK2(*cp, 2);
+	if (EXTRACT_16BITS(cp))
+		printf(", idle_timeout %u", EXTRACT_16BITS(cp));
+	cp += 2;
+	/* hard_timeout */
+	TCHECK2(*cp, 2);
+	if (EXTRACT_16BITS(cp))
+		printf(", hard_timeout %u", EXTRACT_16BITS(cp));
+	cp += 2;
+	/* priority */
+	TCHECK2(*cp, 2);
+	if (EXTRACT_16BITS(cp))
+		printf(", priority %u", EXTRACT_16BITS(cp));
+	cp += 2;
+	/* buffer_id */
+	TCHECK2(*cp, 4);
+	if (command == OFPFC_ADD || command == OFPFC_MODIFY ||
+	    command == OFPFC_MODIFY_STRICT)
+		printf(", buffer_id %s", tok2str(bufferid_str, "0x%08x", EXTRACT_32BITS(cp)));
+	cp += 4;
+	/* out_port */
+	TCHECK2(*cp, 2);
+	if (command == OFPFC_DELETE || command == OFPFC_DELETE_STRICT)
+		printf(", out_port %s", tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp)));
+	cp += 2;
+	/* flags */
+	TCHECK2(*cp, 2);
+	printf(", flags 0x%04x", EXTRACT_16BITS(cp));
+	of10_bitmap_print(ofpff_bm, EXTRACT_16BITS(cp), OFPFF_U);
+	cp += 2;
+	/* actions */
+	return of10_actions_print("\n\t ", cp, ep, len - OF_FLOW_MOD_LEN);
+
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* ibid */
+static const u_char *
+of10_port_mod_print(const u_char *cp, const u_char *ep) {
+	/* port_no */
+	TCHECK2(*cp, 2);
+	printf("\n\t port_no %s", tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp)));
+	cp += 2;
+	/* hw_addr */
+	TCHECK2(*cp, OFP_ETH_ALEN);
+	printf(", hw_addr %s", etheraddr_string(cp));
+	cp += OFP_ETH_ALEN;
+	/* config */
+	TCHECK2(*cp, 4);
+	printf("\n\t config 0x%08x", EXTRACT_32BITS(cp));
+	of10_bitmap_print(ofppc_bm, EXTRACT_32BITS(cp), OFPPC_U);
+	cp += 4;
+	/* mask */
+	TCHECK2(*cp, 4);
+	printf("\n\t mask 0x%08x", EXTRACT_32BITS(cp));
+	of10_bitmap_print(ofppc_bm, EXTRACT_32BITS(cp), OFPPC_U);
+	cp += 4;
+	/* advertise */
+	TCHECK2(*cp, 4);
+	printf("\n\t advertise 0x%08x", EXTRACT_32BITS(cp));
+	of10_bitmap_print(ofppf_bm, EXTRACT_32BITS(cp), OFPPF_U);
+	cp += 4;
+	/* pad */
+	TCHECK2(*cp, 4);
+	return cp + 4;
+
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* [OF10] Section 5.3.5 */
+static const u_char *
+of10_stats_request_print(const u_char *cp, const u_char *ep, u_int len) {
+	const u_char *cp0 = cp;
+	const u_int len0 = len;
+	uint16_t type;
+
+	/* type */
+	TCHECK2(*cp, 2);
+	type = EXTRACT_16BITS(cp);
+	cp += 2;
+	printf("\n\t type %s", tok2str(ofpst_str, "invalid (0x%04x)", type));
+	/* flags */
+	TCHECK2(*cp, 2);
+	printf(", flags 0x%04x", EXTRACT_16BITS(cp));
+	if (EXTRACT_16BITS(cp))
+		printf(" (bogus)");
+	cp += 2;
+	/* type-specific body of one of fixed lengths */
+	len -= OF_STATS_REQUEST_LEN;
+	switch(type) {
+	case OFPST_DESC:
+	case OFPST_TABLE:
+		if (len)
+			goto corrupt;
+		return cp;
+	case OFPST_FLOW:
+	case OFPST_AGGREGATE:
+		if (len != OF_FLOW_STATS_REQUEST_LEN)
+			goto corrupt;
+		/* match */
+		if (ep == (cp = of10_match_print("\n\t ", cp, ep)))
+			return ep; /* end of snapshot */
+		/* table_id */
+		TCHECK2(*cp, 1);
+		printf("\n\t table_id %s", tok2str(tableid_str, "%u", *cp));
+		cp += 1;
+		/* pad */
+		TCHECK2(*cp, 1);
+		cp += 1;
+		/* out_port */
+		TCHECK2(*cp, 2);
+		printf(", out_port %s", tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp)));
+		return cp + 2;
+	case OFPST_PORT:
+		if (len != OF_PORT_STATS_REQUEST_LEN)
+			goto corrupt;
+		/* port_no */
+		TCHECK2(*cp, 2);
+		printf("\n\t port_no %s", tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp)));
+		cp += 2;
+		/* pad */
+		TCHECK2(*cp, 6);
+		return cp + 6;
+	case OFPST_QUEUE:
+		if (len != OF_QUEUE_STATS_REQUEST_LEN)
+			goto corrupt;
+		/* port_no */
+		TCHECK2(*cp, 2);
+		printf("\n\t port_no %s", tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp)));
+		cp += 2;
+		/* pad */
+		TCHECK2(*cp, 2);
+		cp += 2;
+		/* queue_id */
+		TCHECK2(*cp, 4);
+		printf(", queue_id %s", tok2str(ofpq_str, "%u", EXTRACT_32BITS(cp)));
+		return cp + 4;
+	case OFPST_VENDOR:
+		return of10_vendor_data_print(cp, ep, len);
+	}
+	return cp;
+
+corrupt: /* skip the message body */
+	printf(" (corrupt)");
+	TCHECK2(*cp0, len0);
+	return cp0 + len0;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* ibid */
+static const u_char *
+of10_desc_stats_reply_print(const u_char *cp, const u_char *ep, const u_int len) {
+	if (len != OF_DESC_STATS_LEN)
+		goto corrupt;
+	/* mfr_desc */
+	TCHECK2(*cp, DESC_STR_LEN);
+	printf("\n\t  mfr_desc '");
+	fn_print(cp, cp + DESC_STR_LEN);
+	printf("'");
+	cp += DESC_STR_LEN;
+	/* hw_desc */
+	TCHECK2(*cp, DESC_STR_LEN);
+	printf("\n\t  hw_desc '");
+	fn_print(cp, cp + DESC_STR_LEN);
+	printf("'");
+	cp += DESC_STR_LEN;
+	/* sw_desc */
+	TCHECK2(*cp, DESC_STR_LEN);
+	printf("\n\t  sw_desc '");
+	fn_print(cp, cp + DESC_STR_LEN);
+	printf("'");
+	cp += DESC_STR_LEN;
+	/* serial_num */
+	TCHECK2(*cp, SERIAL_NUM_LEN);
+	printf("\n\t  serial_num '");
+	fn_print(cp, cp + SERIAL_NUM_LEN);
+	printf("'");
+	cp += SERIAL_NUM_LEN;
+	/* dp_desc */
+	TCHECK2(*cp, DESC_STR_LEN);
+	printf("\n\t  dp_desc '");
+	fn_print(cp, cp + DESC_STR_LEN);
+	printf("'");
+	return cp + DESC_STR_LEN;
+
+corrupt: /* skip the message body */
+	printf(" (corrupt)");
+	TCHECK2(*cp, len);
+	return cp + len;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* ibid */
+static const u_char *
+of10_flow_stats_reply_print(const u_char *cp, const u_char *ep, u_int len) {
+	const u_char *cp0 = cp;
+	const u_int len0 = len;
+	uint16_t entry_len;
+
+	while (len) {
+		if (len < OF_FLOW_STATS_LEN)
+			goto corrupt;
+		/* length */
+		TCHECK2(*cp, 2);
+		entry_len = EXTRACT_16BITS(cp);
+		printf("\n\t length %u", entry_len);
+		if (entry_len < OF_FLOW_STATS_LEN || entry_len > len)
+			goto corrupt;
+		cp += 2;
+		/* table_id */
+		TCHECK2(*cp, 1);
+		printf(", table_id %s", tok2str(tableid_str, "%u", *cp));
+		cp += 1;
+		/* pad */
+		TCHECK2(*cp, 1);
+		cp += 1;
+		/* match */
+		if (ep == (cp = of10_match_print("\n\t  ", cp, ep)))
+			return ep; /* end of snapshot */
+		/* duration_sec */
+		TCHECK2(*cp, 4);
+		printf("\n\t  duration_sec %u", EXTRACT_32BITS(cp));
+		cp += 4;
+		/* duration_nsec */
+		TCHECK2(*cp, 4);
+		printf(", duration_nsec %u", EXTRACT_32BITS(cp));
+		cp += 4;
+		/* priority */
+		TCHECK2(*cp, 2);
+		printf(", priority %u", EXTRACT_16BITS(cp));
+		cp += 2;
+		/* idle_timeout */
+		TCHECK2(*cp, 2);
+		printf(", idle_timeout %u", EXTRACT_16BITS(cp));
+		cp += 2;
+		/* hard_timeout */
+		TCHECK2(*cp, 2);
+		printf(", hard_timeout %u", EXTRACT_16BITS(cp));
+		cp += 2;
+		/* pad2 */
+		TCHECK2(*cp, 6);
+		cp += 6;
+		/* cookie */
+		TCHECK2(*cp, 8);
+		printf(", cookie 0x%016" PRIx64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* packet_count */
+		TCHECK2(*cp, 8);
+		printf(", packet_count %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* byte_count */
+		TCHECK2(*cp, 8);
+		printf(", byte_count %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* actions */
+		if (ep == (cp = of10_actions_print("\n\t  ", cp, ep, entry_len - OF_FLOW_STATS_LEN)))
+			return ep; /* end of snapshot */
+
+		len -= entry_len;
+	} /* while */
+	return cp;
+
+corrupt: /* skip the rest of flow statistics entries */
+	printf(" (corrupt)");
+	TCHECK2(*cp0, len0);
+	return cp0 + len0;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* ibid */
+static const u_char *
+of10_aggregate_stats_reply_print(const u_char *cp, const u_char *ep,
+                                 const u_int len) {
+	if (len != OF_AGGREGATE_STATS_REPLY_LEN)
+		goto corrupt;
+	/* packet_count */
+	TCHECK2(*cp, 8);
+	printf("\n\t packet_count %" PRIu64, EXTRACT_64BITS(cp));
+	cp += 8;
+	/* byte_count */
+	TCHECK2(*cp, 8);
+	printf(", byte_count %" PRIu64, EXTRACT_64BITS(cp));
+	cp += 8;
+	/* flow_count */
+	TCHECK2(*cp, 4);
+	printf(", flow_count %u", EXTRACT_32BITS(cp));
+	cp += 4;
+	/* pad */
+	TCHECK2(*cp, 4);
+	return cp + 4;
+
+corrupt: /* skip the message body */
+	printf(" (corrupt)");
+	TCHECK2(*cp, len);
+	return cp + len;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* ibid */
+static const u_char *
+of10_table_stats_reply_print(const u_char *cp, const u_char *ep, u_int len) {
+	const u_char *cp0 = cp;
+	const u_int len0 = len;
+
+	while (len) {
+		if (len < OF_TABLE_STATS_LEN)
+			goto corrupt;
+		/* table_id */
+		TCHECK2(*cp, 1);
+		printf("\n\t table_id %s", tok2str(tableid_str, "%u", *cp));
+		cp += 1;
+		/* pad */
+		TCHECK2(*cp, 3);
+		cp += 3;
+		/* name */
+		TCHECK2(*cp, OFP_MAX_TABLE_NAME_LEN);
+		printf(", name '");
+		fn_print(cp, cp + OFP_MAX_TABLE_NAME_LEN);
+		printf("'");
+		cp += OFP_MAX_TABLE_NAME_LEN;
+		/* wildcards */
+		TCHECK2(*cp, 4);
+		printf("\n\t  wildcards 0x%08x", EXTRACT_32BITS(cp));
+		of10_bitmap_print(ofpfw_bm, EXTRACT_32BITS(cp), OFPFW_U);
+		cp += 4;
+		/* max_entries */
+		TCHECK2(*cp, 4);
+		printf("\n\t  max_entries %u", EXTRACT_32BITS(cp));
+		cp += 4;
+		/* active_count */
+		TCHECK2(*cp, 4);
+		printf(", active_count %u", EXTRACT_32BITS(cp));
+		cp += 4;
+		/* lookup_count */
+		TCHECK2(*cp, 8);
+		printf(", lookup_count %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* matched_count */
+		TCHECK2(*cp, 8);
+		printf(", matched_count %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+
+		len -= OF_TABLE_STATS_LEN;
+	} /* while */
+	return cp;
+
+corrupt: /* skip the undersized trailing data */
+	printf(" (corrupt)");
+	TCHECK2(*cp0, len0);
+	return cp0 + len0;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* ibid */
+static const u_char *
+of10_port_stats_reply_print(const u_char *cp, const u_char *ep, u_int len) {
+	const u_char *cp0 = cp;
+	const u_int len0 = len;
+
+	while (len) {
+		if (len < OF_PORT_STATS_LEN)
+			goto corrupt;
+		/* port_no */
+		TCHECK2(*cp, 2);
+		printf("\n\t  port_no %s", tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp)));
+		cp += 2;
+		if (vflag < 2) {
+			TCHECK2(*cp, OF_PORT_STATS_LEN - 2);
+			cp += OF_PORT_STATS_LEN - 2;
+			goto next_port;
+		}
+		/* pad */
+		TCHECK2(*cp, 6);
+		cp += 6;
+		/* rx_packets */
+		TCHECK2(*cp, 8);
+		printf(", rx_packets %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* tx_packets */
+		TCHECK2(*cp, 8);
+		printf(", tx_packets %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* rx_bytes */
+		TCHECK2(*cp, 8);
+		printf(", rx_bytes %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* tx_bytes */
+		TCHECK2(*cp, 8);
+		printf(", tx_bytes %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* rx_dropped */
+		TCHECK2(*cp, 8);
+		printf(", rx_dropped %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* tx_dropped */
+		TCHECK2(*cp, 8);
+		printf(", tx_dropped %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* rx_errors */
+		TCHECK2(*cp, 8);
+		printf(", rx_errors %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* tx_errors */
+		TCHECK2(*cp, 8);
+		printf(", tx_errors %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* rx_frame_err */
+		TCHECK2(*cp, 8);
+		printf(", rx_frame_err %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* rx_over_err */
+		TCHECK2(*cp, 8);
+		printf(", rx_over_err %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* rx_crc_err */
+		TCHECK2(*cp, 8);
+		printf(", rx_crc_err %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* collisions */
+		TCHECK2(*cp, 8);
+		printf(", collisions %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+next_port:
+		len -= OF_PORT_STATS_LEN;
+	} /* while */
+	return cp;
+
+corrupt: /* skip the undersized trailing data */
+	printf(" (corrupt)");
+	TCHECK2(*cp0, len0);
+	return cp0 + len0;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* ibid */
+static const u_char *
+of10_queue_stats_reply_print(const u_char *cp, const u_char *ep, u_int len) {
+	const u_char *cp0 = cp;
+	const u_int len0 = len;
+
+	while (len) {
+		if (len < OF_QUEUE_STATS_LEN)
+			goto corrupt;
+		/* port_no */
+		TCHECK2(*cp, 2);
+		printf("\n\t  port_no %s", tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp)));
+		cp += 2;
+		/* pad */
+		TCHECK2(*cp, 2);
+		cp += 2;
+		/* queue_id */
+		TCHECK2(*cp, 4);
+		printf(", queue_id %u", EXTRACT_32BITS(cp));
+		cp += 4;
+		/* tx_bytes */
+		TCHECK2(*cp, 8);
+		printf(", tx_bytes %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* tx_packets */
+		TCHECK2(*cp, 8);
+		printf(", tx_packets %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+		/* tx_errors */
+		TCHECK2(*cp, 8);
+		printf(", tx_errors %" PRIu64, EXTRACT_64BITS(cp));
+		cp += 8;
+
+		len -= OF_QUEUE_STATS_LEN;
+	} /* while */
+	return cp;
+
+corrupt: /* skip the undersized trailing data */
+	printf(" (corrupt)");
+	TCHECK2(*cp0, len0);
+	return cp0 + len0;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* ibid */
+static const u_char *
+of10_stats_reply_print(const u_char *cp, const u_char *ep, const u_int len) {
+	const u_char *cp0 = cp;
+	uint16_t type;
+
+	/* type */
+	TCHECK2(*cp, 2);
+	type = EXTRACT_16BITS(cp);
+	printf("\n\t type %s", tok2str(ofpst_str, "invalid (0x%04x)", type));
+	cp += 2;
+	/* flags */
+	TCHECK2(*cp, 2);
+	printf(", flags 0x%04x", EXTRACT_16BITS(cp));
+	of10_bitmap_print(ofpsf_reply_bm, EXTRACT_16BITS(cp), OFPSF_REPLY_U);
+	cp += 2;
+
+	if (vflag > 0) {
+		const u_char *(*decoder)(const u_char *, const u_char *, u_int) =
+			type == OFPST_DESC      ? of10_desc_stats_reply_print      :
+			type == OFPST_FLOW      ? of10_flow_stats_reply_print      :
+			type == OFPST_AGGREGATE ? of10_aggregate_stats_reply_print :
+			type == OFPST_TABLE     ? of10_table_stats_reply_print     :
+			type == OFPST_PORT      ? of10_port_stats_reply_print      :
+			type == OFPST_QUEUE     ? of10_queue_stats_reply_print     :
+			type == OFPST_VENDOR    ? of10_vendor_data_print           :
+			NULL;
+		if (decoder != NULL)
+			return decoder(cp, ep, len - OF_STATS_REPLY_LEN);
+	}
+	TCHECK2(*cp0, len);
+	return cp0 + len;
+
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* [OF10] Section 5.3.6 */
+static const u_char *
+of10_packet_out_print(const u_char *cp, const u_char *ep, const u_int len) {
+	const u_char *cp0 = cp;
+	const u_int len0 = len;
+	uint16_t actions_len;
+
+	/* buffer_id */
+	TCHECK2(*cp, 4);
+	printf("\n\t buffer_id 0x%08x", EXTRACT_32BITS(cp));
+	cp += 4;
+	/* in_port */
+	TCHECK2(*cp, 2);
+	printf(", in_port %s", tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp)));
+	cp += 2;
+	/* actions_len */
+	TCHECK2(*cp, 2);
+	actions_len = EXTRACT_16BITS(cp);
+	cp += 2;
+	if (actions_len > len - OF_PACKET_OUT_LEN)
+		goto corrupt;
+	/* actions */
+	if (ep == (cp = of10_actions_print("\n\t ", cp, ep, actions_len)))
+		return ep; /* end of snapshot */
+	/* data */
+	return of10_packet_data_print(cp, ep, len - OF_PACKET_OUT_LEN - actions_len);
+
+corrupt: /* skip the rest of the message body */
+	printf(" (corrupt)");
+	TCHECK2(*cp0, len0);
+	return cp0 + len0;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* [OF10] Section 5.4.1 */
+static const u_char *
+of10_packet_in_print(const u_char *cp, const u_char *ep, const u_int len) {
+	/* buffer_id */
+	TCHECK2(*cp, 4);
+	printf("\n\t buffer_id %s", tok2str(bufferid_str, "0x%08x", EXTRACT_32BITS(cp)));
+	cp += 4;
+	/* total_len */
+	TCHECK2(*cp, 2);
+	printf(", total_len %u", EXTRACT_16BITS(cp));
+	cp += 2;
+	/* in_port */
+	TCHECK2(*cp, 2);
+	printf(", in_port %s", tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp)));
+	cp += 2;
+	/* reason */
+	TCHECK2(*cp, 1);
+	printf(", reason %s", tok2str(ofpr_str, "invalid (0x%02x)", *cp));
+	cp += 1;
+	/* pad */
+	TCHECK2(*cp, 1);
+	cp += 1;
+	/* data */
+	/* 2 mock octets count in OF_PACKET_IN_LEN but not in len */
+	return of10_packet_data_print(cp, ep, len - (OF_PACKET_IN_LEN - 2));
+
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* [OF10] Section 5.4.2 */
+static const u_char *
+of10_flow_removed_print(const u_char *cp, const u_char *ep) {
+	/* match */
+	if (ep == (cp = of10_match_print("\n\t ", cp, ep)))
+		return ep; /* end of snapshot */
+	/* cookie */
+	TCHECK2(*cp, 8);
+	printf("\n\t cookie 0x%016" PRIx64, EXTRACT_64BITS(cp));
+	cp += 8;
+	/* priority */
+	TCHECK2(*cp, 2);
+	if (EXTRACT_16BITS(cp))
+		printf(", priority %u", EXTRACT_16BITS(cp));
+	cp += 2;
+	/* reason */
+	TCHECK2(*cp, 1);
+	printf(", reason %s", tok2str(ofprr_str, "unknown (0x%02x)", *cp));
+	cp += 1;
+	/* pad */
+	TCHECK2(*cp, 1);
+	cp += 1;
+	/* duration_sec */
+	TCHECK2(*cp, 4);
+	printf(", duration_sec %u", EXTRACT_32BITS(cp));
+	cp += 4;
+	/* duration_nsec */
+	TCHECK2(*cp, 4);
+	printf(", duration_nsec %u", EXTRACT_32BITS(cp));
+	cp += 4;
+	/* idle_timeout */
+	TCHECK2(*cp, 2);
+	if (EXTRACT_16BITS(cp))
+		printf(", idle_timeout %u", EXTRACT_16BITS(cp));
+	cp += 2;
+	/* pad2 */
+	TCHECK2(*cp, 2);
+	cp += 2;
+	/* packet_count */
+	TCHECK2(*cp, 8);
+	printf(", packet_count %" PRIu64, EXTRACT_64BITS(cp));
+	cp += 8;
+	/* byte_count */
+	TCHECK2(*cp, 8);
+	printf(", byte_count %" PRIu64, EXTRACT_64BITS(cp));
+	return cp + 8;
+
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* [OF10] Section 5.4.4 */
+static const u_char *
+of10_error_print(const u_char *cp, const u_char *ep, const u_int len) {
+	uint16_t type;
+	const struct tok *code_str;
+
+	/* type */
+	TCHECK2(*cp, 2);
+	type = EXTRACT_16BITS(cp);
+	cp += 2;
+	printf("\n\t type %s", tok2str(ofpet_str, "invalid (0x%04x)", type));
+	/* code */
+	TCHECK2(*cp, 2);
+	code_str =
+		type == OFPET_HELLO_FAILED    ? ofphfc_str  :
+		type == OFPET_BAD_REQUEST     ? ofpbrc_str  :
+		type == OFPET_BAD_ACTION      ? ofpbac_str  :
+		type == OFPET_FLOW_MOD_FAILED ? ofpfmfc_str :
+		type == OFPET_PORT_MOD_FAILED ? ofppmfc_str :
+		type == OFPET_QUEUE_OP_FAILED ? ofpqofc_str :
+		empty_str;
+	printf(", code %s", tok2str(code_str, "invalid (0x%04x)", EXTRACT_16BITS(cp)));
+	cp += 2;
+	/* data */
+	return of10_data_print(cp, ep, len - OF_ERROR_MSG_LEN);
+
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+const u_char *
+of10_header_body_print(const u_char *cp, const u_char *ep, const uint8_t type,
+                       const uint16_t len, const uint32_t xid) {
+	const u_char *cp0 = cp;
+	const u_int len0 = len;
+	/* Thus far message length is not less than the basic header size, but most
+	 * message types have additional assorted constraints on the length. Wherever
+	 * possible, check that message length meets the constraint, in remaining
+	 * cases check that the length is OK to begin decoding and leave any final
+	 * verification up to a lower-layer function. When the current message is
+	 * corrupt, proceed to the next message. */
+
+	/* [OF10] Section 5.1 */
+	printf("\n\tversion 1.0, type %s, length %u, xid 0x%08x",
+	       tok2str(ofpt_str, "invalid (0x%02x)", type), len, xid);
+	switch (type) {
+	/* OpenFlow header only. */
+	case OFPT_FEATURES_REQUEST: /* [OF10] Section 5.3.1 */
+	case OFPT_GET_CONFIG_REQUEST: /* [OF10] Section 5.3.2 */
+	case OFPT_BARRIER_REQUEST: /* [OF10] Section 5.3.7 */
+	case OFPT_BARRIER_REPLY: /* ibid */
+		if (len != OF_HEADER_LEN)
+			goto corrupt;
+		break;
+
+	/* OpenFlow header and fixed-size message body. */
+	case OFPT_SET_CONFIG: /* [OF10] Section 5.3.2 */
+	case OFPT_GET_CONFIG_REPLY: /* ibid */
+		if (len != OF_SWITCH_CONFIG_LEN)
+			goto corrupt;
+		if (vflag < 1)
+			goto next_message;
+		/* flags */
+		TCHECK2(*cp, 2);
+		printf("\n\t flags %s", tok2str(ofp_config_str, "invalid (0x%04x)", EXTRACT_16BITS(cp)));
+		cp += 2;
+		/* miss_send_len */
+		TCHECK2(*cp, 2);
+		printf(", miss_send_len %u", EXTRACT_16BITS(cp));
+		return cp + 2;
+	case OFPT_PORT_MOD:
+		if (len != OF_PORT_MOD_LEN)
+			goto corrupt;
+		if (vflag < 1)
+			goto next_message;
+		return of10_port_mod_print(cp, ep);
+	case OFPT_QUEUE_GET_CONFIG_REQUEST: /* [OF10] Section 5.3.4 */
+		if (len != OF_QUEUE_GET_CONFIG_REQUEST_LEN)
+			goto corrupt;
+		if (vflag < 1)
+			goto next_message;
+		/* port */
+		TCHECK2(*cp, 2);
+		printf("\n\t port_no %s", tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp)));
+		cp += 2;
+		/* pad */
+		TCHECK2(*cp, 2);
+		return cp + 2;
+	case OFPT_FLOW_REMOVED:
+		if (len != OF_FLOW_REMOVED_LEN)
+			goto corrupt;
+		if (vflag < 1)
+			goto next_message;
+		return of10_flow_removed_print(cp, ep);
+	case OFPT_PORT_STATUS: /* [OF10] Section 5.4.3 */
+		if (len != OF_PORT_STATUS_LEN)
+			goto corrupt;
+		if (vflag < 1)
+			goto next_message;
+		/* reason */
+		TCHECK2(*cp, 1);
+		printf("\n\t reason %s", tok2str(ofppr_str, "invalid (0x%02x)", *cp));
+		cp += 1;
+		/* pad */
+		TCHECK2(*cp, 7);
+		cp += 7;
+		/* desc */
+		return of10_phy_ports_print(cp, ep, OF_PHY_PORT_LEN);
+
+	/* OpenFlow header, fixed-size message body and n * fixed-size data units. */
+	case OFPT_FEATURES_REPLY:
+		if (len < OF_SWITCH_FEATURES_LEN)
+			goto corrupt;
+		if (vflag < 1)
+			goto next_message;
+		return of10_features_reply_print(cp, ep, len);
+
+	/* OpenFlow header and variable-size data. */
+	case OFPT_HELLO: /* [OF10] Section 5.5.1 */
+	case OFPT_ECHO_REQUEST: /* [OF10] Section 5.5.2 */
+	case OFPT_ECHO_REPLY: /* [OF10] Section 5.5.3 */
+		if (vflag < 1)
+			goto next_message;
+		return of10_data_print(cp, ep, len - OF_HEADER_LEN);
+
+	/* OpenFlow header, fixed-size message body and variable-size data. */
+	case OFPT_ERROR:
+		if (len < OF_ERROR_MSG_LEN)
+			goto corrupt;
+		if (vflag < 1)
+			goto next_message;
+		return of10_error_print(cp, ep, len);
+	case OFPT_VENDOR:
+	  /* [OF10] Section 5.5.4 */
+		if (len < OF_VENDOR_HEADER_LEN)
+			goto corrupt;
+		if (vflag < 1)
+			goto next_message;
+		return of10_vendor_data_print(cp, ep, len - OF_HEADER_LEN);
+	case OFPT_PACKET_IN:
+		/* 2 mock octets count in OF_PACKET_IN_LEN but not in len */
+		if (len < OF_PACKET_IN_LEN - 2)
+			goto corrupt;
+		if (vflag < 1)
+			goto next_message;
+		return of10_packet_in_print(cp, ep, len);
+
+	/* a. OpenFlow header. */
+	/* b. OpenFlow header and one of the fixed-size message bodies. */
+	/* c. OpenFlow header, fixed-size message body and variable-size data. */
+	case OFPT_STATS_REQUEST:
+		if (len < OF_STATS_REQUEST_LEN)
+			goto corrupt;
+		if (vflag < 1)
+			goto next_message;
+		return of10_stats_request_print(cp, ep, len);
+
+	/* a. OpenFlow header and fixed-size message body. */
+	/* b. OpenFlow header and n * fixed-size data units. */
+	/* c. OpenFlow header and n * variable-size data units. */
+	/* d. OpenFlow header, fixed-size message body and variable-size data. */
+	case OFPT_STATS_REPLY:
+		if (len < OF_STATS_REPLY_LEN)
+			goto corrupt;
+		if (vflag < 1)
+			goto next_message;
+		return of10_stats_reply_print(cp, ep, len);
+
+	/* OpenFlow header and n * variable-size data units and variable-size data. */
+	case OFPT_PACKET_OUT:
+		if (len < OF_PACKET_OUT_LEN)
+			goto corrupt;
+		if (vflag < 1)
+			goto next_message;
+		return of10_packet_out_print(cp, ep, len);
+
+	/* OpenFlow header, fixed-size message body and n * variable-size data units. */
+	case OFPT_FLOW_MOD:
+		if (len < OF_FLOW_MOD_LEN)
+			goto corrupt;
+		if (vflag < 1)
+			goto next_message;
+		return of10_flow_mod_print(cp, ep, len);
+
+	/* OpenFlow header, fixed-size message body and n * variable-size data units. */
+	case OFPT_QUEUE_GET_CONFIG_REPLY: /* [OF10] Section 5.3.4 */
+		if (len < OF_QUEUE_GET_CONFIG_REPLY_LEN)
+			goto corrupt;
+		if (vflag < 1)
+			goto next_message;
+		/* port */
+		TCHECK2(*cp, 2);
+		printf("\n\t port_no %s", tok2str(ofpp_str, "%u", EXTRACT_16BITS(cp)));
+		cp += 2;
+		/* pad */
+		TCHECK2(*cp, 6);
+		cp += 6;
+		/* queues */
+		return of10_queues_print(cp, ep, len - OF_QUEUE_GET_CONFIG_REPLY_LEN);
+	} /* switch (type) */
+	goto next_message;
+
+corrupt: /* skip the message body */
+	printf(" (corrupt)");
+next_message:
+	TCHECK2(*cp0, len0 - OF_HEADER_LEN);
+	return cp0 + len0 - OF_HEADER_LEN;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
diff --git a/print-openflow.c b/print-openflow.c
new file mode 100644
index 0000000..5dbefac
--- /dev/null
+++ b/print-openflow.c
@@ -0,0 +1,115 @@
+/*
+ * This module implements printing of the very basic (version-independent)
+ * OpenFlow header and iteration over OpenFlow messages. It is intended for
+ * dispatching of version-specific OpenFlow message decoding.
+ *
+ *
+ * Copyright (c) 2013 The TCPDUMP project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include "interface.h"
+#include "extract.h"
+#include "openflow.h"
+
+#define OF_VER_1_0    0x01
+
+static void
+of_header_print(const uint8_t version, const uint8_t type,
+                      const uint16_t length, const uint32_t xid) {
+	printf("\n\tversion unknown (0x%02x), type 0x%02x, length %u, xid 0x%08x",
+	       version, type, length, xid);
+}
+
+/* Print a single OpenFlow message. */
+static const u_char *
+of_header_body_print(const u_char *cp, const u_char *ep) {
+	uint8_t version, type;
+	uint16_t length;
+	uint32_t xid;
+
+	if (ep < cp + OF_HEADER_LEN)
+		goto corrupt;
+	/* version */
+	TCHECK2(*cp, 1);
+	version = *cp;
+	cp += 1;
+	/* type */
+	TCHECK2(*cp, 1);
+	type = *cp;
+	cp += 1;
+	/* length */
+	TCHECK2(*cp, 2);
+	length = EXTRACT_16BITS(cp);
+	cp += 2;
+	/* xid */
+	TCHECK2(*cp, 4);
+	xid = EXTRACT_32BITS(cp);
+	cp += 4;
+	/* Message length includes the header length and a message always includes
+	 * the basic header. A message length underrun fails decoding of the rest of
+	 * the current packet. At the same time, try decoding as much of the current
+	 * message as possible even when it does not end within the current TCP
+	 * segment. */
+	if (length < OF_HEADER_LEN) {
+		of_header_print(version, type, length, xid);
+		goto corrupt;
+	}
+	/* Decode known protocol versions further without printing the header (the
+	 * type decoding is version-specific. */
+	switch (version) {
+	case OF_VER_1_0:
+		return of10_header_body_print(cp, ep, type, length, xid);
+	default:
+		of_header_print(version, type, length, xid);
+		TCHECK2(*cp, length - OF_HEADER_LEN);
+		return cp + length - OF_HEADER_LEN; /* done with current message */
+	}
+
+corrupt: /* fail current packet */
+	printf(" (corrupt)");
+	TCHECK2(*cp, ep - cp);
+	return ep;
+trunc:
+	printf(" [|openflow]");
+	return ep;
+}
+
+/* Print a TCP segment worth of OpenFlow messages presuming the segment begins
+ * on a message boundary. */
+void
+openflow_print(const u_char *cp, const u_int len) {
+	const u_char *ep = cp + len;
+
+	printf(": OpenFlow");
+	while (cp < ep)
+		cp = of_header_body_print(cp, ep);
+}
diff --git a/print-ospf.c b/print-ospf.c
index fd8f111..9533cb6 100644
--- a/print-ospf.c
+++ b/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
@@ -43,26 +43,26 @@
 
 #include "ip.h"
 
-static struct tok ospf_option_values[] = {
-	{ OSPF_OPTION_T,	"TOS" },
+static const struct tok ospf_option_values[] = {
+        { 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" },
 	{ 0,			NULL }
 };
 
-static struct tok ospf_authtype_values[] = {
+static const struct tok ospf_authtype_values[] = {
 	{ OSPF_AUTH_NONE,	"none" },
 	{ OSPF_AUTH_SIMPLE,	"simple" },
 	{ OSPF_AUTH_MD5,	"MD5" },
 	{ 0,			NULL }
 };
 
-static struct tok ospf_rla_flag_values[] = {
+static const struct tok ospf_rla_flag_values[] = {
 	{ RLA_FLAG_B,		"ABR" },
 	{ RLA_FLAG_E,		"ASBR" },
 	{ RLA_FLAG_W1,		"Virtual" },
@@ -70,7 +70,7 @@
 	{ 0,			NULL }
 };
 
-static struct tok type2str[] = {
+static const struct tok type2str[] = {
 	{ OSPF_TYPE_UMD,	"UMD" },
 	{ OSPF_TYPE_HELLO,	"Hello" },
 	{ OSPF_TYPE_DD,		"Database Description" },
@@ -80,7 +80,7 @@
 	{ 0,			NULL }
 };
 
-static struct tok lsa_values[] = {
+static const struct tok lsa_values[] = {
 	{ LS_TYPE_ROUTER,       "Router" },
 	{ LS_TYPE_NETWORK,      "Network" },
 	{ LS_TYPE_SUM_IP,       "Summary" },
@@ -94,27 +94,28 @@
 	{ 0,			NULL }
 };
 
-static struct tok ospf_dd_flag_values[] = {
+static const struct tok ospf_dd_flag_values[] = {
 	{ OSPF_DB_INIT,	        "Init" },
 	{ OSPF_DB_MORE,	        "More" },
 	{ OSPF_DB_MASTER,	"Master" },
+    { OSPF_DB_RESYNC,	"OOBResync" },
 	{ 0,			NULL }
 };
 
-static struct tok lsa_opaque_values[] = {
+static const struct tok lsa_opaque_values[] = {
 	{ LS_OPAQUE_TYPE_TE,    "Traffic Engineering" },
 	{ LS_OPAQUE_TYPE_GRACE, "Graceful restart" },
 	{ LS_OPAQUE_TYPE_RI,    "Router Information" },
 	{ 0,			NULL }
 };
 
-static struct tok lsa_opaque_te_tlv_values[] = {
+static const struct tok lsa_opaque_te_tlv_values[] = {
 	{ LS_OPAQUE_TE_TLV_ROUTER, "Router Address" },
 	{ LS_OPAQUE_TE_TLV_LINK,   "Link" },
 	{ 0,			NULL }
 };
 
-static struct tok lsa_opaque_te_link_tlv_subtlv_values[] = {
+static const struct tok lsa_opaque_te_link_tlv_subtlv_values[] = {
 	{ LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE,            "Link Type" },
 	{ LS_OPAQUE_TE_LINK_SUBTLV_LINK_ID,              "Link ID" },
 	{ LS_OPAQUE_TE_LINK_SUBTLV_LOCAL_IP,             "Local Interface IP address" },
@@ -132,14 +133,14 @@
 	{ 0,			NULL }
 };
 
-static struct tok lsa_opaque_grace_tlv_values[] = {
+static const struct tok lsa_opaque_grace_tlv_values[] = {
 	{ LS_OPAQUE_GRACE_TLV_PERIOD,             "Grace Period" },
 	{ LS_OPAQUE_GRACE_TLV_REASON,             "Graceful restart Reason" },
 	{ LS_OPAQUE_GRACE_TLV_INT_ADDRESS,        "IPv4 interface address" },
 	{ 0,		        NULL }
 };
 
-static struct tok lsa_opaque_grace_tlv_reason_values[] = {
+static const struct tok lsa_opaque_grace_tlv_reason_values[] = {
 	{ LS_OPAQUE_GRACE_TLV_REASON_UNKNOWN,     "Unknown" },
 	{ LS_OPAQUE_GRACE_TLV_REASON_SW_RESTART,  "Software Restart" },
 	{ LS_OPAQUE_GRACE_TLV_REASON_SW_UPGRADE,  "Software Reload/Upgrade" },
@@ -147,18 +148,18 @@
 	{ 0,		        NULL }
 };
 
-static struct tok lsa_opaque_te_tlv_link_type_sub_tlv_values[] = {
+static const struct tok lsa_opaque_te_tlv_link_type_sub_tlv_values[] = {
 	{ LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE_PTP, "Point-to-point" },
 	{ LS_OPAQUE_TE_LINK_SUBTLV_LINK_TYPE_MA,  "Multi-Access" },
 	{ 0,			NULL }
 };
 
-static struct tok lsa_opaque_ri_tlv_values[] = {
+static const struct tok lsa_opaque_ri_tlv_values[] = {
 	{ LS_OPAQUE_RI_TLV_CAP, "Router Capabilities" },
 	{ 0,		        NULL }
 };
 
-static struct tok lsa_opaque_ri_tlv_cap_values[] = {
+static const struct tok lsa_opaque_ri_tlv_cap_values[] = {
 	{ 1, "Reserved" },
 	{ 2, "Reserved" },
 	{ 4, "Reserved" },
@@ -172,15 +173,291 @@
 	{ 0,		        NULL }
 };
 
-static char tstr[] = " [|ospf]";
+static const struct tok ospf_lls_tlv_values[] = {
+	{ OSPF_LLS_EO,	"Extended Options" },
+	{ OSPF_LLS_MD5,	"MD5 Authentication" },
+	{ 0,	NULL }
+};
 
-#ifdef WIN32
-#define inline __inline
-#endif /* WIN32 */
+static const struct tok ospf_lls_eo_options[] = {
+	{ OSPF_LLS_EO_LR,	"LSDB resync" },
+	{ OSPF_LLS_EO_RS,	"Restart" },
+	{ 0,	NULL }
+};
+
+static char tstr[] = " [|ospf2]";
 
 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 (const 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 (const 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 +467,13 @@
         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 +485,7 @@
         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 +515,41 @@
 	return (-1);
 }
 
+/* draft-ietf-ospf-mt-09 */
+static const 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 +560,13 @@
 {
 	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 +587,7 @@
 		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 +615,14 @@
 
 			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 +644,16 @@
 		    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 +661,16 @@
 	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 +688,11 @@
 
 			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 +767,6 @@
                             ls_length);
                         return(ls_end);
                     }
-                    ls_length-=tlv_length;
                     TCHECK2(*tptr, tlv_length);
                     switch(tlv_type) {
 
@@ -492,245 +787,32 @@
 
                     }
                     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;
-                }
-
-                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);
-
-                    if (tlv_length > ls_length) {
-                        printf("\n\t    Bogus length %u > %u", tlv_length,
-                            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))
+                if (ospf_print_grace_lsa((u_int8_t *)(&lsap->lsa_un.un_grace_tlv.type),
+                                         ls_length) == -1) {
                     return(ls_end);
-            } 
-            break;
+                }
+                break;
+
+	    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;
+
+            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 +828,98 @@
 }
 
 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 +939,11 @@
 		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 +971,23 @@
 
 	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", EXTRACT_16BITS(&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:
@@ -846,7 +1024,7 @@
                 lsap = op->ospf_lsu.lsu_lsa;
                 TCHECK(op->ospf_lsu.lsu_count);
                 lsa_count_max = EXTRACT_32BITS(&op->ospf_lsu.lsu_count);
-                printf(", %d LSA%s",lsa_count_max, lsa_count_max > 1 ? "s" : "");
+                printf(", %d LSA%s",lsa_count_max, PLURAL_SUFFIX(lsa_count_max));
                 for (lsa_count=1;lsa_count <= lsa_count_max;lsa_count++) {
                     printf("\n\t  LSA #%u",lsa_count);
                         lsap = (const struct lsa *)ospf_print_lsa(lsap);
@@ -863,7 +1041,6 @@
                 break;
 
 	default:
-		printf("v2 type (%d)", op->ospf_type);
 		break;
 	}
 	return (0);
@@ -892,25 +1069,30 @@
 	/* 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 +1115,7 @@
 
 		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 +1136,10 @@
 		/* 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/print-ospf6.c b/print-ospf6.c
index 6325a21..b0a6f27 100644
--- a/print-ospf6.c
+++ b/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,116 @@
 #include "addrtoname.h"
 #include "extract.h"
 
+#include "ospf.h"
 #include "ospf6.h"
 
-struct bits {
-	u_int32_t bit;
-	const char *str;
-};
-
-static const struct bits ospf6_option_bits[] = {
+static const struct tok ospf6_option_values[] = {
 	{ OSPF6_OPTION_V6,	"V6" },
-	{ OSPF6_OPTION_E,	"E" },
-	{ OSPF6_OPTION_MC,	"MC" },
-	{ OSPF6_OPTION_N,	"N" },
-	{ OSPF6_OPTION_R,	"R" },
-	{ OSPF6_OPTION_DC,	"DC" },
+	{ 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_rla_flag_bits[] = {
-	{ RLA_FLAG_B,		"B" },
-	{ RLA_FLAG_E,		"E" },
-	{ RLA_FLAG_V,		"V" },
-	{ RLA_FLAG_W,		"W" },
+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_asla_flag_bits[] = {
-	{ ASLA_FLAG_EXTERNAL,	"E" },
-	{ ASLA_FLAG_FWDADDR,	"F" },
-	{ ASLA_FLAG_ROUTETAG,	"T" },
+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 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 const 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 char tstr[] = " [|ospf]";
+static const 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 }
+};
 
-#ifdef WIN32
-#define inline __inline
-#endif /* WIN32 */
+static const struct tok ospf6_ls_scope_values[] = {
+	{ LS_SCOPE_LINKLOCAL,   "Link Local" },
+	{ LS_SCOPE_AREA,        "Area Local" },
+	{ LS_SCOPE_AS,          "Domain Wide" },
+	{ 0,			NULL }
+};
+
+static const struct tok ospf6_dd_flag_values[] = {
+	{ OSPF6_DB_INIT,	"Init" },
+	{ OSPF6_DB_MORE,	"More" },
+	{ OSPF6_DB_MASTER,	"Master" },
+	{ 0,			NULL }
+};
+
+static const 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]";
 
 /* 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 +156,36 @@
 }
 
 static int
-ospf6_print_lsaprefix(register const struct lsa_prefix *lsapp)
+ospf6_print_lsaprefix(const u_int8_t *tptr, u_int lsa_length)
 {
-	u_int k;
+	const struct lsa6_prefix *lsapp = (struct lsa6_prefix *)tptr;
+	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);
+	if (lsa_length < sizeof (*lsapp) - 4)
+		goto trunc;
+	lsa_length -= sizeof (*lsapp) - 4;
+	TCHECK2(*lsapp, sizeof (*lsapp) - 4);
+	wordlen = (lsapp->lsa_p_len + 31) / 32;
+	if (wordlen * 4 > sizeof(struct in6_addr)) {
+		printf(" bogus prefixlen /%d", lsapp->lsa_p_len);
 		goto trunc;
 	}
+	if (lsa_length < wordlen * 4)
+		goto trunc;
+	lsa_length -= wordlen * 4;
+	TCHECK2(lsapp->lsa_p_prefix, wordlen * 4);
 	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 +196,9 @@
  * 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,223 +208,262 @@
 	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;
+	register u_int length, lsa_length;
 	u_int32_t flags32;
+	const 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);
+
+	/*
+	 * The LSA length includes the length of the header;
+	 * it must have a value that's at least that length.
+	 * If it does, find the length of what follows the
+	 * header.
+	 */
+        if (length < sizeof(struct lsa6_hdr))
+        	return (1);
+        lsa_length = length - sizeof(struct lsa6_hdr);
+        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);
+		if (lsa_length < sizeof (lsap->lsa_un.un_rla.rla_options))
+			return (1);
+		lsa_length -= sizeof (lsap->lsa_un.un_rla.rla_options);
 		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)));
+                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 (lsa_length != 0) {
+			if (lsa_length < sizeof (*rlp))
+				return (1);
+			lsa_length -= sizeof (*rlp);
 			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:
+		if (lsa_length < sizeof (lsap->lsa_un.un_nla.nla_options))
+			return (1);
+		lsa_length -= sizeof (lsap->lsa_un.un_nla.nla_options);
 		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) {
+		while (lsa_length != 0) {
+			if (lsa_length < sizeof (*ap))
+				return (1);
+			lsa_length -= sizeof (*ap);
 			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:
+		if (lsa_length < sizeof (lsap->lsa_un.un_inter_ap.inter_ap_metric))
+			return (1);
+		lsa_length -= sizeof (lsap->lsa_un.un_inter_ap.inter_ap_metric);
 		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)
+
+		tptr = (u_int8_t *)lsap->lsa_un.un_inter_ap.inter_ap_prefix;
+		while (lsa_length != 0) {
+			bytelen = ospf6_print_lsaprefix(tptr, lsa_length);
+			if (bytelen < 0)
 				goto trunc;
-			lsapp = (struct lsa_prefix *)(((u_char *)lsapp) + k);
+			lsa_length -= bytelen;
+			tptr += bytelen;
 		}
 		break;
-	case LS_SCOPE_AS | LS_TYPE_ASE:
+
+	case LS_TYPE_ASE | LS_SCOPE_AS:
+		if (lsa_length < sizeof (lsap->lsa_un.un_asla.asla_metric))
+			return (1);
+		lsa_length -= sizeof (lsap->lsa_un.un_asla.asla_metric);
 		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)
+
+		tptr = (u_int8_t *)lsap->lsa_un.un_asla.asla_prefix;
+		lsapp = (struct lsa6_prefix *)tptr;
+		bytelen = ospf6_print_lsaprefix(tptr, lsa_length);
+		if (bytelen < 0)
 			goto trunc;
-		if ((ls_opt = (u_char *)(((u_char *)lsapp) + k)) < ls_end) {
+		lsa_length -= bytelen;
+		tptr += bytelen;
+
+		if ((flags32 & ASLA_FLAG_FWDADDR) != 0) {
 			struct in6_addr *fwdaddr6;
 
-			if ((flags32 & ASLA_FLAG_FWDADDR) != 0) {
-				fwdaddr6 = (struct in6_addr *)ls_opt;
-				TCHECK(*fwdaddr6);
-				printf(" forward %s",
-				       ip6addr_string(fwdaddr6));
+			fwdaddr6 = (struct in6_addr *)tptr;
+			if (lsa_length < sizeof (*fwdaddr6))
+				return (1);
+			lsa_length -= sizeof (*fwdaddr6);
+			TCHECK(*fwdaddr6);
+			printf(" forward %s",
+			       ip6addr_string(fwdaddr6));
+			tptr += sizeof(*fwdaddr6);
+		}
 
-				ls_opt += sizeof(struct in6_addr);
-			}
+		if ((flags32 & ASLA_FLAG_ROUTETAG) != 0) {
+			if (lsa_length < sizeof (u_int32_t))
+				return (1);
+			lsa_length -= sizeof (u_int32_t);
+			TCHECK(*(u_int32_t *)tptr);
+			printf(" tag %s",
+			       ipaddr_string((u_int32_t *)tptr));
+			tptr += sizeof(u_int32_t);
+		}
 
-			if ((flags32 & ASLA_FLAG_ROUTETAG) != 0) {
-				TCHECK(*(u_int32_t *)ls_opt);
-				printf(" tag %s",
-				       ipaddr_string((u_int32_t *)ls_opt));
-
-				ls_opt += sizeof(u_int32_t);
-			}
-
-			if (lsapp->lsa_p_mbz) {
-				TCHECK(*(u_int32_t *)ls_opt);
-				printf(" RefLSID: %s",
-				       ipaddr_string((u_int32_t *)ls_opt));
-
-				ls_opt += sizeof(u_int32_t);
-			}
+		if (lsapp->lsa_p_metric) {
+			if (lsa_length < sizeof (u_int32_t))
+				return (1);
+			lsa_length -= sizeof (u_int32_t);
+			TCHECK(*(u_int32_t *)tptr);
+			printf(" RefLSID: %s",
+			       ipaddr_string((u_int32_t *)tptr));
+			tptr += sizeof(u_int32_t);
 		}
 		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));
-		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)
+		if (lsa_length < sizeof (llsap->llsa_priandopt))
+			return (1);
+		lsa_length -= sizeof (llsap->llsa_priandopt);
+		TCHECK(llsap->llsa_priandopt);
+                printf("\n\t      Options [%s]",
+                       bittok2str(ospf6_option_values, "none",
+                                  EXTRACT_32BITS(&llsap->llsa_options)));
+
+		if (lsa_length < sizeof (llsap->llsa_lladdr) + sizeof (llsap->llsa_nprefix))
+			return (1);
+		lsa_length -= sizeof (llsap->llsa_lladdr) + sizeof (llsap->llsa_nprefix);
+                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) {
+			bytelen = ospf6_print_lsaprefix(tptr, lsa_length);
+			if (bytelen < 0)
 				goto trunc;
-			lsapp = (struct lsa_prefix *)(((u_char *)lsapp) + k);
+			prefixes--;
+			lsa_length -= bytelen;
+			tptr += bytelen;
 		}
 		break;
 
 	case LS_TYPE_INTRA_AP | LS_SCOPE_AREA:
 		/* Intra-Area-Prefix LSA */
+		if (lsa_length < sizeof (lsap->lsa_un.un_intra_ap.intra_ap_rtid))
+			return (1);
+		lsa_length -= sizeof (lsap->lsa_un.un_intra_ap.intra_ap_rtid);
 		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");
-		TCHECK(lsap->lsa_un.un_intra_ap.intra_ap_nprefix);
-		printf(" npref %d",
-			EXTRACT_16BITS(&lsap->lsa_un.un_intra_ap.intra_ap_nprefix));
+			&lsap->lsa_un.un_intra_ap.intra_ap_lsid);
 
-		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)
+		if (lsa_length < sizeof (lsap->lsa_un.un_intra_ap.intra_ap_nprefix))
+			return (1);
+		lsa_length -= sizeof (lsap->lsa_un.un_intra_ap.intra_ap_nprefix);
+		TCHECK(lsap->lsa_un.un_intra_ap.intra_ap_nprefix);
+                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) {
+			bytelen = ospf6_print_lsaprefix(tptr, lsa_length);
+			if (bytelen < 0)
 				goto trunc;
-			lsapp = (struct lsa_prefix *)(((u_char *)lsapp) + k);
+			prefixes--;
+			lsa_length -= bytelen;
+			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);
+                }
+                break;
 	}
 
-								/* { (ctags) */
-	fputs(" }", stdout);
 	return (0);
 trunc:
-	fputs(" }", stdout);
 	return (1);
 }
 
@@ -496,103 +472,80 @@
     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 = '/';
-		}
+                printf(", DD Flags [%s]",
+                       bittok2str(ospf6_dd_flag_values,"none",op->ospf6_db.db_flags));
+
 		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));
+		printf(", MTU %u, DD-Sequence 0x%08x",
+                       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;
-
-			while (!ospf6_print_lshdr(lshp)) {
-							/* { (ctags) */
-				printf(" }");
-				++lshp;
-			}
-		}
+                /* 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 +553,24 @@
 			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 +590,15 @@
 	/* 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 +609,16 @@
 
 	/* 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/print-otv.c b/print-otv.c
new file mode 100644
index 0000000..cd53957
--- /dev/null
+++ b/print-otv.c
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ *
+ * Original code by Francesco Fondelli (francesco dot fondelli, gmail dot com)
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "interface.h"
+#include "extract.h"
+#include "addrtoname.h"
+
+#include "udp.h"
+
+/*
+ * OTV header, draft-hasmit-otv-04
+ *
+ *     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
+ *     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *     |R|R|R|R|I|R|R|R|           Overlay ID                          |
+ *     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *     |          Instance ID                          | Reserved      |
+ *     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+
+void
+otv_print(const u_char *bp, u_int len)
+{
+    u_int8_t flags;
+    u_int32_t overlay_id;
+    u_int32_t instance_id;
+    
+    if (len < 8) {
+        printf("[|OTV]");
+        return;
+    }
+
+    flags = *bp;
+    bp += 1;
+
+    overlay_id = EXTRACT_24BITS(bp);
+    bp += 3;
+
+    instance_id = EXTRACT_24BITS(bp);
+    bp += 4;
+
+    printf("OTV, ");
+
+    fputs("flags [", stdout);
+    if (flags & 0x08)
+        fputs("I", stdout);
+    else
+        fputs(".", stdout);
+    fputs("] ", stdout);
+
+    printf("(0x%02x), ", flags);
+    printf("overlay %u, ", overlay_id);
+    printf("instance %u\n", instance_id);
+
+    ether_print(gndo, bp, len - 8, len - 8, NULL, NULL);
+    return;
+}
diff --git a/print-pflog.c b/print-pflog.c
index dd9ba49..8a3b66a 100644
--- a/print-pflog.c
+++ b/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,26 +31,22 @@
 #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>
 #include <pcap.h>
 
+#include "extract.h"
 #include "interface.h"
 #include "addrtoname.h"
 
-static struct tok pf_reasons[] = {
+static const struct tok pf_reasons[] = {
 	{ 0,	"0(match)" },
 	{ 1,	"1(bad-offset)" },
 	{ 2,	"2(fragment)" },
@@ -69,7 +65,7 @@
 	{ 0,	NULL }
 };
 
-static struct tok pf_actions[] = {
+static const struct tok pf_actions[] = {
 	{ PF_PASS,		"pass" },
 	{ PF_DROP,		"block" },
 	{ PF_SCRUB,		"scrub" },
@@ -83,7 +79,7 @@
 	{ 0,			NULL }
 };
 
-static struct tok pf_directions[] = {
+static const struct tok pf_directions[] = {
 	{ PF_INOUT,	"in/out" },
 	{ PF_IN,	"in" },
 	{ PF_OUT,	"out" },
@@ -99,8 +95,8 @@
 {
 	u_int32_t rulenr, subrulenr;
 
-	rulenr = ntohl(hdr->rulenr);
-	subrulenr = ntohl(hdr->subrulenr);
+	rulenr = EXTRACT_32BITS(&hdr->rulenr);
+	subrulenr = EXTRACT_32BITS(&hdr->subrulenr);
 	if (subrulenr == (u_int32_t)-1)
 		printf("rule %u/", rulenr);
 	else
@@ -166,7 +162,7 @@
 #if OPENBSD_AF_INET6 != AF_INET6
 		case OPENBSD_AF_INET6:		/* XXX: read pcap files */
 #endif
-			ip6_print(p, length);
+			ip6_print(gndo, p, length);
 			break;
 #endif
 
diff --git a/print-pgm.c b/print-pgm.c
index edaf933..b6138c6 100644
--- a/print-pgm.c
+++ b/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
@@ -72,6 +72,12 @@
     /* ... options */
 };
 
+struct pgm_ack {
+    u_int32_t	pgma_rx_max_seq;
+    u_int32_t	pgma_bitmap;
+    /* ... options */
+};
+
 struct pgm_poll {
     u_int32_t	pgmp_seq;
     u_int16_t	pgmp_round;
@@ -133,6 +139,9 @@
 #define PGM_OPT_RST             0x0F
 #define PGM_OPT_CR		0x10
 #define PGM_OPT_CRQST		0x11
+
+#define PGM_OPT_PGMCC_DATA	0x12
+#define PGM_OPT_PGMCC_FEEDBACK	0x13
      
 #define PGM_OPT_MASK		0x7f
 
@@ -162,7 +171,7 @@
 #else
 	char nla_buf[INET_ADDRSTRLEN];
 #endif
-	u_int8_t opt_type, opt_len, flags1, flags2;
+	u_int8_t opt_type, opt_len;
 	u_int32_t seq, opts_len, len, offset;
 
 	pgm = (struct pgm_header *)bp;
@@ -228,14 +237,11 @@
 
 	TCHECK(*pgm);
 
-        (void)printf("PGM, length %u", pgm->pgm_length);
+        (void)printf("PGM, length %u", EXTRACT_16BITS(&pgm->pgm_length));
 
         if (!vflag)
             return;
 
-        if (length > pgm->pgm_length)
-            length = pgm->pgm_length;
-
 	(void)printf(" 0x%02x%02x%02x%02x%02x%02x ",
 		     pgm->pgm_gsid[0],
                      pgm->pgm_gsid[1],
@@ -446,12 +452,23 @@
 	    break;
 	}
 
+	case PGM_ACK: {
+	    struct pgm_ack *ack;
+
+	    ack = (struct pgm_ack *)(pgm + 1);
+	    TCHECK(*ack);
+	    (void)printf("ACK seq %u",
+			 EXTRACT_32BITS(&ack->pgma_rx_max_seq));
+	    bp = (u_char *) (ack + 1);
+	    break;
+	}
+
 	case PGM_SPMR:
 	    (void)printf("SPMR");
 	    break;
 
 	default:
-	    (void)printf("UNKNOWN type %0x02x", pgm->pgm_type);
+	    (void)printf("UNKNOWN type 0x%02x", pgm->pgm_type);
 	    break;
 
 	}
@@ -525,8 +542,7 @@
 			(void)printf("[Bad OPT_FRAGMENT option, length %u != 16]", opt_len);
 			return;
 		    }
-		    flags1 = *bp++;
-		    flags2 = *bp++;
+		    bp += 2;
 		    seq = EXTRACT_32BITS(bp);
 		    bp += sizeof(u_int32_t);
 		    offset = EXTRACT_32BITS(bp);
@@ -538,8 +554,7 @@
 		    break;
 
 		case PGM_OPT_NAK_LIST:
-		    flags1 = *bp++;
-		    flags2 = *bp++;
+		    bp += 2;
 		    opt_len -= sizeof(u_int32_t);	/* option header */
 		    (void)printf(" NAK LIST");
 		    while (opt_len) {
@@ -560,8 +575,7 @@
 			(void)printf("[Bad OPT_JOIN option, length %u != 8]", opt_len);
 			return;
 		    }
-		    flags1 = *bp++;
-		    flags2 = *bp++;
+		    bp += 2;
 		    seq = EXTRACT_32BITS(bp);
 		    bp += sizeof(u_int32_t);
 		    (void)printf(" JOIN %u", seq);
@@ -573,8 +587,7 @@
 			(void)printf("[Bad OPT_NAK_BO_IVL option, length %u != 12]", opt_len);
 			return;
 		    }
-		    flags1 = *bp++;
-		    flags2 = *bp++;
+		    bp += 2;
 		    offset = EXTRACT_32BITS(bp);
 		    bp += sizeof(u_int32_t);
 		    seq = EXTRACT_32BITS(bp);
@@ -588,8 +601,7 @@
 			(void)printf("[Bad OPT_NAK_BO_RNG option, length %u != 12]", opt_len);
 			return;
 		    }
-		    flags1 = *bp++;
-		    flags2 = *bp++;
+		    bp += 2;
 		    offset = EXTRACT_32BITS(bp);
 		    bp += sizeof(u_int32_t);
 		    seq = EXTRACT_32BITS(bp);
@@ -599,8 +611,7 @@
 		    break;
 
 		case PGM_OPT_REDIRECT:
-		    flags1 = *bp++;
-		    flags2 = *bp++;
+		    bp += 2;
 		    switch (EXTRACT_16BITS(bp)) {
 		    case AFI_IP:
 			addr_size = sizeof(struct in_addr);
@@ -635,8 +646,7 @@
 			(void)printf("[Bad OPT_PARITY_PRM option, length %u != 8]", opt_len);
 			return;
 		    }
-		    flags1 = *bp++;
-		    flags2 = *bp++;
+		    bp += 2;
 		    len = EXTRACT_32BITS(bp);
 		    bp += sizeof(u_int32_t);
 		    (void)printf(" PARITY MAXTGS %u", len);
@@ -648,8 +658,7 @@
 			(void)printf("[Bad OPT_PARITY_GRP option, length %u != 8]", opt_len);
 			return;
 		    }
-		    flags1 = *bp++;
-		    flags2 = *bp++;
+		    bp += 2;
 		    seq = EXTRACT_32BITS(bp);
 		    bp += sizeof(u_int32_t);
 		    (void)printf(" PARITY GROUP %u", seq);
@@ -661,8 +670,7 @@
 			(void)printf("[Bad OPT_CURR_TGSIZE option, length %u != 8]", opt_len);
 			return;
 		    }
-		    flags1 = *bp++;
-		    flags2 = *bp++;
+		    bp += 2;
 		    len = EXTRACT_32BITS(bp);
 		    bp += sizeof(u_int32_t);
 		    (void)printf(" PARITY ATGS %u", len);
@@ -674,8 +682,7 @@
 			(void)printf("[Bad OPT_NBR_UNREACH option, length %u != 4]", opt_len);
 			return;
 		    }
-		    flags1 = *bp++;
-		    flags2 = *bp++;
+		    bp += 2;
 		    (void)printf(" NBR_UNREACH");
 		    opts_len -= 4;
 		    break;
@@ -691,8 +698,7 @@
 			(void)printf("[Bad OPT_SYN option, length %u != 4]", opt_len);
 			return;
 		    }
-		    flags1 = *bp++;
-		    flags2 = *bp++;
+		    bp += 2;
 		    (void)printf(" SYN");
 		    opts_len -= 4;
 		    break;
@@ -702,8 +708,7 @@
 			(void)printf("[Bad OPT_FIN option, length %u != 4]", opt_len);
 			return;
 		    }
-		    flags1 = *bp++;
-		    flags2 = *bp++;
+		    bp += 2;
 		    (void)printf(" FIN");
 		    opts_len -= 4;
 		    break;
@@ -713,8 +718,7 @@
 			(void)printf("[Bad OPT_RST option, length %u != 4]", opt_len);
 			return;
 		    }
-		    flags1 = *bp++;
-		    flags2 = *bp++;
+		    bp += 2;
 		    (void)printf(" RST");
 		    opts_len -= 4;
 		    break;
@@ -730,12 +734,77 @@
 			(void)printf("[Bad OPT_CRQST option, length %u != 4]", opt_len);
 			return;
 		    }
-		    flags1 = *bp++;
-		    flags2 = *bp++;
+		    bp += 2;
 		    (void)printf(" CRQST");
 		    opts_len -= 4;
 		    break;
 
+		case PGM_OPT_PGMCC_DATA:
+		    bp += 2;
+		    offset = EXTRACT_32BITS(bp);
+		    bp += sizeof(u_int32_t);
+		    switch (EXTRACT_16BITS(bp)) {
+		    case AFI_IP:
+			addr_size = sizeof(struct in_addr);
+			nla_af = AF_INET;
+			break;
+#ifdef INET6
+		    case AFI_IP6:
+			addr_size = sizeof(struct in6_addr);
+			nla_af = AF_INET6;
+			break;
+#endif
+		    default:
+			goto trunc;
+			break;
+		    }
+		    bp += (2 * sizeof(u_int16_t));
+		    if (opt_len != 12 + addr_size) {
+			(void)printf("[Bad OPT_PGMCC_DATA option, length %u != 12 + address size]", opt_len);
+			return;
+		    }
+		    TCHECK2(*bp, addr_size);
+		    nla = bp;
+		    bp += addr_size;
+
+		    inet_ntop(nla_af, nla, nla_buf, sizeof(nla_buf));
+		    (void)printf(" PGMCC DATA %u %s", offset, (char*)nla);
+		    opts_len -= 16;
+		    break;
+
+		case PGM_OPT_PGMCC_FEEDBACK:
+		    bp += 2;
+		    offset = EXTRACT_32BITS(bp);
+		    bp += sizeof(u_int32_t);
+		    switch (EXTRACT_16BITS(bp)) {
+		    case AFI_IP:
+			addr_size = sizeof(struct in_addr);
+			nla_af = AF_INET;
+			break;
+#ifdef INET6
+		    case AFI_IP6:
+			addr_size = sizeof(struct in6_addr);
+			nla_af = AF_INET6;
+			break;
+#endif
+		    default:
+			goto trunc;
+			break;
+		    }
+		    bp += (2 * sizeof(u_int16_t));
+		    if (opt_len != 12 + addr_size) {
+			(void)printf("[Bad OPT_PGMCC_FEEDBACK option, length %u != 12 + address size]", opt_len);
+			return;
+		    }
+		    TCHECK2(*bp, addr_size);
+		    nla = bp;
+		    bp += addr_size;
+
+		    inet_ntop(nla_af, nla, nla_buf, sizeof(nla_buf));
+		    (void)printf(" PGMCC FEEDBACK %u %s", offset, (char*)nla);
+		    opts_len -= 16;
+		    break;
+
 		default:
 		    (void)printf(" OPT_%02X [%d] ", opt_type, opt_len);
 		    bp += opt_len;
@@ -748,7 +817,10 @@
 	     }
 	}
 
-	(void)printf(" [%u]", EXTRACT_16BITS(&pgm->pgm_length));
+	(void)printf(" [%u]", length);
+	if (packettype == PT_PGM_ZMTP1 &&
+	    (pgm->pgm_type == PGM_ODATA || pgm->pgm_type == PGM_RDATA))
+		zmtp1_print_datagram(bp, EXTRACT_16BITS(&pgm->pgm_length));
 
 	return;
 
diff --git a/print-pim.c b/print-pim.c
index 39c4e4d..7136083 100644
--- a/print-pim.c
+++ b/print-pim.c
@@ -21,7 +21,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
@@ -29,7 +29,15 @@
 #endif
 
 #include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
 #include "interface.h"
+#include "addrtoname.h"
+#include "extract.h"
+
+#include "ip.h"
 
 #define PIMV2_TYPE_HELLO         0
 #define PIMV2_TYPE_REGISTER      1
@@ -42,7 +50,7 @@
 #define PIMV2_TYPE_CANDIDATE_RP  8
 #define PIMV2_TYPE_PRUNE_REFRESH 9
 
-static struct tok pimv2_type_values[] = {
+static const struct tok pimv2_type_values[] = {
     { PIMV2_TYPE_HELLO,         "Hello" },
     { PIMV2_TYPE_REGISTER,      "Register" },
     { PIMV2_TYPE_REGISTER_STOP, "Register Stop" },
@@ -66,7 +74,7 @@
 #define PIMV2_HELLO_OPTION_ADDRESS_LIST        24
 #define PIMV2_HELLO_OPTION_ADDRESS_LIST_OLD 65001
 
-static struct tok pimv2_hello_option_values[] = {
+static const struct tok pimv2_hello_option_values[] = {
     { PIMV2_HELLO_OPTION_HOLDTIME,         "Hold Time" },
     { PIMV2_HELLO_OPTION_LANPRUNEDELAY,    "LAN Prune Delay" },
     { PIMV2_HELLO_OPTION_DR_PRIORITY_OLD,  "DR Priority (Old)" },
@@ -83,7 +91,7 @@
 #define PIMV2_REGISTER_FLAG_BORDER 0x80000000
 #define PIMV2_REGISTER_FLAG_NULL   0x40000000
 
-static struct tok pimv2_register_flag_values[] = {
+static const struct tok pimv2_register_flag_values[] = {
     { PIMV2_REGISTER_FLAG_BORDER, "Border" },
     { PIMV2_REGISTER_FLAG_NULL, "Null" },
     { 0, NULL}
@@ -108,22 +116,12 @@
 	u_short	pim_cksum;	/* IP style check sum */
 };
 
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "interface.h"
-#include "addrtoname.h"
-#include "extract.h"
-
-#include "ip.h"
-
-static void pimv2_print(register const u_char *bp, register u_int len);
+static void pimv2_print(register const u_char *bp, register u_int len, u_int cksum);
 
 static void
 pimv1_join_prune_print(register const u_char *bp, register u_int len)
 {
-	int maddrlen, addrlen, ngroups, njoin, nprune;
+	int ngroups, njoin, nprune;
 	int njp;
 
 	/* If it's a single group and a single source, use 1-line output. */
@@ -164,8 +162,6 @@
 	len -= 8;
 
 	TCHECK2(bp[0], 4);
-	maddrlen = bp[1];
-	addrlen = bp[2];
 	ngroups = bp[3];
 	bp += 4;
 	len -= 4;
@@ -399,8 +395,12 @@
 			TCHECK2(bp[0], 6);
 			(void)printf("%c%s%s/%d", s, bp[0] & 1 ? "!" : "",
 			    ipaddr_string(&bp[2]), bp[1]);
-			if (bp[0] & 0xfe)
-				(void)printf("[rsvd=0x%02x]", bp[0] & 0xfe);
+			if (bp[0] & 0x02) {
+			    (void)printf(" bidir");
+			}
+			if (bp[0] & 0xfc) {
+			    (void)printf("[rsvd=0x%02x]", bp[0] & 0xfc);
+			}
 			s = ',';
 			bp += 6; len -= 6;
 		}
@@ -413,7 +413,7 @@
 }
 
 void
-pim_print(register const u_char *bp, register u_int len)
+pim_print(register const u_char *bp, register u_int len, u_int cksum)
 {
 	register const u_char *ep;
 	register struct pim *pim = (struct pim *)bp;
@@ -438,7 +438,7 @@
                        PIM_VER(pim->pim_typever),
                        len,
                        tok2str(pimv2_type_values,"Unknown Type",PIM_TYPE(pim->pim_typever)));
-                pimv2_print(bp, len);
+                pimv2_print(bp, len, cksum);
             }
             break;
 	default:
@@ -618,7 +618,7 @@
 }
 
 static void
-pimv2_print(register const u_char *bp, register u_int len)
+pimv2_print(register const u_char *bp, register u_int len, u_int cksum)
 {
 	register const u_char *ep;
 	register struct pim *pim = (struct pim *)bp;
@@ -638,9 +638,7 @@
         if (EXTRACT_16BITS(&pim->pim_cksum) == 0) {
                 printf("(unverified)");
         } else {
-                printf("(%scorrect)",
-                       TTEST2(bp[0], len) &&
-                       in_cksum((const u_short*)bp, len, 0) ? "in" : "" );
+                printf("(%scorrect)", TTEST2(bp[0], len) && cksum ? "in" : "" );
         }
 
 	switch (PIM_TYPE(pim->pim_typever)) {
@@ -667,7 +665,7 @@
 
 			case PIMV2_HELLO_OPTION_LANPRUNEDELAY:
 				if (olen != 4) {
-					(void)printf("ERROR: Option Lenght != 4 Bytes (%u)", olen);
+					(void)printf("ERROR: Option Length != 4 Bytes (%u)", olen);
 				} else {
 					char t_bit;
 					u_int16_t lan_delay, override_interval;
@@ -690,7 +688,7 @@
                                     printf("%u", EXTRACT_32BITS(bp));
                                     break;
                                 default:
-                                    printf("ERROR: Option Lenght != 4 Bytes (%u)", olen);
+                                    printf("ERROR: Option Length != 4 Bytes (%u)", olen);
                                     break;
                                 }
                                 break;
@@ -770,7 +768,7 @@
 			break;
 #ifdef INET6
 		case 6:	/* IPv6 */
-			ip6_print(bp, len);
+			ip6_print(gndo, bp, len);
 			break;
 #endif
                 default:
diff --git a/print-ppi.c b/print-ppi.c
new file mode 100644
index 0000000..38873c8
--- /dev/null
+++ b/print-ppi.c
@@ -0,0 +1,104 @@
+/*
+ * Oracle
+ */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <pcap.h>
+
+#include "netdissect.h"
+#include "interface.h"
+#include "extract.h"
+#include "ppi.h"
+
+#ifdef DLT_PPI
+
+static inline void
+ppi_header_print(struct netdissect_options *ndo, const u_char *bp, u_int length)
+{
+	const ppi_header_t *hdr;
+	u_int32_t dlt;
+	u_int16_t len;
+
+	hdr = (const ppi_header_t *)bp;
+
+	len = EXTRACT_16BITS(&hdr->ppi_len);
+	dlt = EXTRACT_32BITS(&hdr->ppi_dlt);
+
+	if (!ndo->ndo_qflag) {
+		ND_PRINT((ndo,", V.%d DLT %s (%d) len %d", hdr->ppi_ver,
+			  pcap_datalink_val_to_name(dlt), dlt,
+                          len));
+        } else {
+		ND_PRINT((ndo,", %s", pcap_datalink_val_to_name(dlt)));
+        }
+
+	ND_PRINT((ndo, ", length %u: ", length));
+}
+
+static void
+ppi_print(struct netdissect_options *ndo,
+               const struct pcap_pkthdr *h, const u_char *p)
+{
+	if_ndo_printer ndo_printer;
+        if_printer printer;
+	ppi_header_t *hdr;
+	u_int caplen = h->caplen;
+	u_int length = h->len;
+	u_int32_t dlt;
+
+	if (caplen < sizeof(ppi_header_t)) {
+		ND_PRINT((ndo, "[|ppi]"));
+		return;
+	}
+	hdr = (ppi_header_t *)p;
+	dlt = EXTRACT_32BITS(&hdr->ppi_dlt);
+
+	if (ndo->ndo_eflag)
+		ppi_header_print(ndo, p, length);
+
+	length -= sizeof(ppi_header_t);
+	caplen -= sizeof(ppi_header_t);
+	p += sizeof(ppi_header_t);
+
+	if ((printer = lookup_printer(dlt)) != NULL) {
+		printer(h, p);
+	} else if ((ndo_printer = lookup_ndo_printer(dlt)) != NULL) {
+		ndo_printer(ndo, h, p);
+	} else {
+		if (!ndo->ndo_eflag)
+			ppi_header_print(ndo, (u_char *)hdr,
+					length + sizeof(ppi_header_t));
+
+		if (!ndo->ndo_suppress_default_print)
+			ndo->ndo_default_print(ndo, p, caplen);
+	}
+}
+
+/*
+ * This is the top level routine of the printer.  'p' points
+ * to the ether 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
+ppi_if_print(struct netdissect_options *ndo,
+               const struct pcap_pkthdr *h, const u_char *p)
+{
+	ppi_print(ndo, h, p);
+
+	return (sizeof(ppi_header_t));
+}
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 8
+ * End:
+ */
+
+#endif /* DLT_PPI */
diff --git a/print-ppp.c b/print-ppp.c
index 1e99c15..0ae8811 100644
--- a/print-ppp.c
+++ b/print-ppp.c
@@ -31,7 +31,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
@@ -65,7 +65,7 @@
 
 /* Protocol Codes defined in ppp.h */
 
-struct tok ppptype2str[] = {
+static const struct tok ppptype2str[] = {
         { PPP_IP,	  "IP" },
         { PPP_OSI,	  "OSI" },
         { PPP_NS,	  "NS" },
@@ -129,7 +129,7 @@
 #define CPCODES_RESET_REQ	14	/* Reset-Request (CCP only) RFC1962 */
 #define CPCODES_RESET_REP	15	/* Reset-Reply (CCP only) */
 
-struct tok cpcodes[] = {
+static const struct tok cpcodes[] = {
 	{CPCODES_VEXT,      "Vendor-Extension"}, /* RFC2153 */
 	{CPCODES_CONF_REQ,  "Conf-Request"},
         {CPCODES_CONF_ACK,  "Conf-Ack"},
@@ -243,7 +243,7 @@
 /* 27-254 unassigned */
 #define CCPOPT_RESV	255	/* RFC1962 */
 
-const struct tok ccpconfopts_values[] = {
+static const struct tok ccpconfopts_values[] = {
         { CCPOPT_OUI, "OUI" },
         { CCPOPT_PRED1, "Pred-1" },
         { CCPOPT_PRED2, "Pred-2" },
@@ -266,7 +266,7 @@
 
 #define BACPOPT_FPEER	1	/* RFC2125 */
 
-const struct tok bacconfopts_values[] = {
+static const struct tok bacconfopts_values[] = {
         { BACPOPT_FPEER, "Favored-Peer" },
         {0,                 NULL}
 };
@@ -284,7 +284,7 @@
 #define IPCPOPT_SECDNS	131	/* RFC1877 */
 #define IPCPOPT_SECNBNS	132	/* RFC1877 */
 
-struct tok ipcpopt_values[] = {
+static const struct tok ipcpopt_values[] = {
         { IPCPOPT_2ADDR, "IP-Addrs" },
         { IPCPOPT_IPCOMP, "IP-Comp" },
         { IPCPOPT_ADDR, "IP-Addr" },
@@ -299,13 +299,13 @@
 #define IPCPOPT_IPCOMP_HDRCOMP 0x61  /* rfc3544 */
 #define IPCPOPT_IPCOMP_MINLEN    14
 
-struct tok ipcpopt_compproto_values[] = {
+static const struct tok ipcpopt_compproto_values[] = {
         { PPP_VJC, "VJ-Comp" },
         { IPCPOPT_IPCOMP_HDRCOMP, "IP Header Compression" },
 	{ 0,		  NULL }
 };
 
-struct tok ipcpopt_compproto_subopt_values[] = {
+static const struct tok ipcpopt_compproto_subopt_values[] = {
         { 1, "RTP-Compression" },
         { 2, "Enhanced RTP-Compression" },
 	{ 0,		  NULL }
@@ -314,7 +314,7 @@
 /* IP6CP Config Options */
 #define IP6CP_IFID      1
 
-struct tok ip6cpopt_values[] = {
+static const struct tok ip6cpopt_values[] = {
         { IP6CP_IFID, "Interface-ID" },
 	{ 0,		  NULL }
 };
@@ -333,7 +333,7 @@
 #define AUTHALG_MSCHAP1	128	/* RFC2433 */
 #define AUTHALG_MSCHAP2	129	/* RFC2795 */
 
-struct tok authalg_values[] = {
+static const struct tok authalg_values[] = {
         { AUTHALG_CHAPMD5, "MD5" },
         { AUTHALG_MSCHAP1, "MS-CHAPv1" },
         { AUTHALG_MSCHAP2, "MS-CHAPv2" },
@@ -358,7 +358,7 @@
 #define CALLBACK_X500	4	/* X.500 distinguished name */
 #define CALLBACK_CBCP	6	/* Location is determined during CBCP nego */
 
-struct tok ppp_callback_values[] = {
+static const struct tok ppp_callback_values[] = {
         { CALLBACK_AUTH, "UserAuth" },
         { CALLBACK_DSTR, "DialString" },
         { CALLBACK_LID, "LocalID" },
@@ -375,7 +375,7 @@
 #define CHAP_SUCC	3
 #define CHAP_FAIL	4
 
-struct tok chapcode_values[] = {
+static const struct tok chapcode_values[] = {
 	{ CHAP_CHAL, "Challenge" },
 	{ CHAP_RESP, "Response" },
 	{ CHAP_SUCC, "Success" },
@@ -389,7 +389,7 @@
 #define PAP_AACK	2
 #define PAP_ANAK	3
 
-struct tok papcode_values[] = {
+static const struct tok papcode_values[] = {
         { PAP_AREQ, "Auth-Req" },
         { PAP_AACK, "Auth-ACK" },
         { PAP_ANAK, "Auth-NACK" },
@@ -773,7 +773,7 @@
 }
 
 /* ML-PPP*/
-struct tok ppp_ml_flag_values[] = {
+static const struct tok ppp_ml_flag_values[] = {
     { 0x80, "begin" },
     { 0x40, "end" },
     { 0, NULL }
@@ -1303,11 +1303,11 @@
 		goto cleanup;
 #ifdef INET6
         case PPP_IPV6:
-            ip6_print(b+1, t - b - 1);
-            goto cleanup;
+		ip6_print(gndo, b+1, t - b - 1);
+		goto cleanup;
 #endif
         default: /* no luck - try next guess */
-            break;
+		break;
         }
 
         proto = EXTRACT_16BITS(b); /* next guess - load two octets */
@@ -1368,7 +1368,7 @@
 #ifdef INET6
 	case ETHERTYPE_IPV6:	/*XXX*/
 	case PPP_IPV6:
-		ip6_print(p, length);
+		ip6_print(gndo, p, length);
 		break;
 #endif
 	case ETHERTYPE_IPX:	/*XXX*/
@@ -1629,7 +1629,7 @@
 		hdrlength += 1;
 	} else {
 		/* Un-compressed protocol field */
-		ptype = ntohs(*(u_int16_t *)p);
+		ptype = EXTRACT_16BITS(p);
 		if (eflag)
 			printf("%04x ", ptype);
 		p += 2;
@@ -1649,7 +1649,7 @@
 		 && ph->phdr_ctl == PPP_CONTROL) {
 			if (eflag)
 				printf("%02x %02x ", q[0], q[1]);
-			ptype = ntohs(ph->phdr_type);
+			ptype = EXTRACT_16BITS(&ph->phdr_type);
 			if (eflag && (ptype == PPP_VJC || ptype == PPP_VJNC)) {
 				printf("%s ", tok2str(ppptype2str,
 						"proto-#%d", ptype));
@@ -1675,11 +1675,11 @@
 			p += hdrlength;
 			switch (ptype) {
 			case PPP_IP:
-				ip_print(p, length);
+				ip_print(gndo, p, length);
 				break;
 #ifdef INET6
 			case PPP_IPV6:
-				ip6_print(p, length);
+				ip6_print(gndo, p, length);
 				break;
 #endif
 			case PPP_MPLS_UCAST:
@@ -1694,11 +1694,11 @@
 			p += hdrlength;
 			switch (ptype) {
 			case PPP_IP:
-				ip_print(p, length);
+				ip_print(gndo, p, length);
 				break;
 #ifdef INET6
 			case PPP_IPV6:
-				ip6_print(p, length);
+				ip6_print(gndo, p, length);
 				break;
 #endif
 			case PPP_MPLS_UCAST:
@@ -1730,12 +1730,12 @@
 		break;
 #ifdef INET6
 	case PPP_IPV6:
-		ip6_print(p, length);
+		ip6_print(gndo, p, length);
 		break;
 #endif
         case PPP_MPLS_UCAST:
         case PPP_MPLS_MCAST:
-                mpls_print(p, length);
+                mpls_print(gndo, p, length);
                 break;
 	default:
 		printf("%s ", tok2str(ppptype2str, "unknown PPP protocol (0x%04x)", ptype));
diff --git a/print-pppoe.c b/print-pppoe.c
index 229b5ee..f8c9008 100644
--- a/print-pppoe.c
+++ b/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
@@ -51,7 +51,7 @@
 	PPPOE_PADT = 0xa7
 };
 
-static struct tok pppoecode2str[] = {
+static const struct tok pppoecode2str[] = {
 	{ PPPOE_PADI, "PADI" },
 	{ PPPOE_PADO, "PADO" },
 	{ PPPOE_PADR, "PADR" },
@@ -70,12 +70,13 @@
 	PPPOE_AC_COOKIE = 0x0104,
 	PPPOE_VENDOR = 0x0105,
 	PPPOE_RELAY_SID = 0x0110,
+	PPPOE_MAX_PAYLOAD = 0x0120,
 	PPPOE_SERVICE_NAME_ERROR = 0x0201,
 	PPPOE_AC_SYSTEM_ERROR = 0x0202,
 	PPPOE_GENERIC_ERROR = 0x0203
 };
 
-static struct tok pppoetag2str[] = {
+static const struct tok pppoetag2str[] = {
 	{ PPPOE_EOL, "EOL" },
 	{ PPPOE_SERVICE_NAME, "Service-Name" },
 	{ PPPOE_AC_NAME, "AC-Name" },
@@ -83,6 +84,7 @@
 	{ PPPOE_AC_COOKIE, "AC-Cookie" },
 	{ PPPOE_VENDOR, "Vendor-Specific" },
 	{ PPPOE_RELAY_SID, "Relay-Session-ID" },
+	{ PPPOE_MAX_PAYLOAD, "PPP-Max-Payload" },
 	{ PPPOE_SERVICE_NAME_ERROR, "Service-Name-Error" },
 	{ PPPOE_AC_SYSTEM_ERROR, "AC-System-Error" },
 	{ PPPOE_GENERIC_ERROR, "Generic-Error" },
@@ -157,7 +159,7 @@
 
 			if (tag_len) {
 				unsigned isascii = 0, isgarbage = 0;
-				const u_char *v = p;
+				const u_char *v;
 				char tag_str[MAXTAGPRINT];
 				unsigned tag_str_len = 0;
 
diff --git a/print-pptp.c b/print-pptp.c
index d400589..2fbba62 100644
--- a/print-pptp.c
+++ b/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/print-radius.c b/print-radius.c
index 203c50b..74fd72d 100644
--- a/print-radius.c
+++ b/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
@@ -84,7 +84,7 @@
 #define RADCMD_STATUS_CLI  13 /* Status-Client       */
 #define RADCMD_RESERVED   255 /* Reserved            */
 
-static struct tok radius_command_values[] = {
+static const struct tok radius_command_values[] = {
     { RADCMD_ACCESS_REQ, "Access Request" },
     { RADCMD_ACCESS_ACC, "Access Accept" },
     { RADCMD_ACCESS_REJ, "Access Reject" },
diff --git a/print-raw.c b/print-raw.c
index 0fe6dd1..8e376ce 100644
--- a/print-raw.c
+++ b/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/print-rip.c b/print-rip.c
index 772a2e0..c753a92 100644
--- a/print-rip.c
+++ b/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 @@
 #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 @@
 
 	/* RFC 1058 */
 	family = EXTRACT_16BITS(&ni->rip_family);
-	if (family != AF_INET) {
-		printf("\n\t AFI: %u:", family);
+	if (family != BSD_AFNUM_INET && family != 0) {
+		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,40 +113,55 @@
 		/* MBZ fields not zero */
                 print_unknown_data((u_int8_t *)&ni->rip_family,"\n\t  ",RIP_ROUTELEN);
 		return;
-	} /* AF_INET */
+	}
+	if (family == 0) {
+		printf("\n\t  AFI 0, %s, metric: %u",
+			ipaddr_string(&ni->rip_dest),
+			EXTRACT_32BITS(&ni->rip_metric));
+		return;
+	} /* BSD_AFNUM_INET */
 	printf("\n\t  %s, metric: %u",
                ipaddr_string(&ni->rip_dest),
 	       EXTRACT_32BITS(&ni->rip_metric));
 }
 
-static void
-rip_entry_print_v2(register const struct rip_netinfo *ni)
+static unsigned
+rip_entry_print_v2(register const struct rip_netinfo *ni, const unsigned remaining)
 {
-	register u_char *p;
 	register u_short family;
-	u_char buf[RIP_AUTHLEN];
 
 	family = EXTRACT_16BITS(&ni->rip_family);
-	if (family == 0xFFFF) { /* 16 bytes authentication ? */
-                if (EXTRACT_16BITS(&ni->rip_tag) == 2) { /* simple text authentication ? */
-			memcpy(buf, &ni->rip_dest, sizeof(buf));
-			buf[sizeof(buf)-1] = '\0';
-			for (p = buf; *p; p++) {
-				if (!isprint(*p))
-					break;
-			}
-                        printf("\n\t  Simple Text Authentication data: %s", buf);
+	if (family == 0xFFFF) { /* variable-sized authentication structures */
+		u_int16_t auth_type = EXTRACT_16BITS(&ni->rip_tag);
+		if (auth_type == 2) {
+			register u_char *p = (u_char *)&ni->rip_dest;
+			u_int i = 0;
+			printf("\n\t  Simple Text Authentication data: ");
+			for (; i < RIP_AUTHLEN; p++, i++)
+				putchar (ND_ISPRINT(*p) ? *p : '.');
+		} else if (auth_type == 3) {
+			printf("\n\t  Auth header:");
+			printf(" Packet Len %u,", EXTRACT_16BITS((u_int8_t *)ni + 4));
+			printf(" Key-ID %u,", *((u_int8_t *)ni + 6));
+			printf(" Auth Data Len %u,", *((u_int8_t *)ni + 7));
+			printf(" SeqNo %u,", EXTRACT_32BITS(&ni->rip_dest_mask));
+			printf(" MBZ %u,", EXTRACT_32BITS(&ni->rip_router));
+			printf(" MBZ %u", EXTRACT_32BITS(&ni->rip_metric));
+		} else if (auth_type == 1) {
+			printf("\n\t  Auth trailer:");
+			print_unknown_data((u_int8_t *)&ni->rip_dest,"\n\t  ",remaining);
+			return remaining; /* AT spans till the packet end */
                 } else {
 			printf("\n\t  Unknown (%u) Authentication data:",
 			       EXTRACT_16BITS(&ni->rip_tag));
-                        print_unknown_data((u_int8_t *)&ni->rip_dest,"\n\t  ",RIP_AUTHLEN);
+			print_unknown_data((u_int8_t *)&ni->rip_dest,"\n\t  ",remaining);
 		}
-	} else if (family != AF_INET) {
-		printf("\n\t  AFI: %u", family);
+	} else if (family != BSD_AFNUM_INET && family != 0) {
+		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 or AFI 0 */
+		printf("\n\t  AFI %s, %15s/%-2d, tag 0x%04x, metric: %u, next-hop: ",
+                       tok2str(bsd_af_values, "%u", family),
                        ipaddr_string(&ni->rip_dest),
 		       mask2plen(EXTRACT_32BITS(&ni->rip_dest_mask)),
                        EXTRACT_16BITS(&ni->rip_tag),
@@ -154,6 +171,7 @@
                 else
                     printf("self");
 	}
+	return sizeof (*ni);
 }
 
 void
@@ -162,7 +180,6 @@
 	register const struct rip *rp;
 	register const struct rip_netinfo *ni;
 	register u_int i, j;
-	register int trunc;
 
 	if (snapend < dat) {
 		printf(" [|rip]");
@@ -210,25 +227,26 @@
                     return;
 
 		switch (rp->rip_cmd) {
+		case RIPCMD_REQUEST:
 		case RIPCMD_RESPONSE:
 			j = length / sizeof(*ni);
-                        printf(", routes: %u",j);
-			trunc = (i / sizeof(*ni)) != j;
+                        printf(", routes: %u%s", j, rp->rip_vers == 2 ? " or less" : "");
 			ni = (struct rip_netinfo *)(rp + 1);
 			for (; i >= sizeof(*ni); ++ni) {
 				if (rp->rip_vers == 1)
+				{
 					rip_entry_print_v1(ni);
+					i -= sizeof(*ni);
+				}
 				else if (rp->rip_vers == 2)
-					rip_entry_print_v2(ni);
+					i -= rip_entry_print_v2(ni, i);
                                 else
                                     break;
-				i -= sizeof(*ni);
 			}
-			if (trunc)
+			if (i)
 				printf("[|rip]");
 			break;
 
-		case RIPCMD_REQUEST:
 		case RIPCMD_TRACEOFF:
 		case RIPCMD_POLL:
 		case RIPCMD_POLLENTRY:
diff --git a/print-ripng.c b/print-ripng.c
index 5e7a02e..cef39da 100644
--- a/print-ripng.c
+++ b/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/print-rpki-rtr.c b/print-rpki-rtr.c
new file mode 100644
index 0000000..c705c05
--- /dev/null
+++ b/print-rpki-rtr.c
@@ -0,0 +1,368 @@
+/*
+ * Copyright (c) 1998-2011 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 The RPKI/Router Protocol as RFC6810
+ *
+ * Original code by Hannes Gredler (hannes@juniper.net)
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+"@(#) $Header: /tcpdump/master/tcpdump/print-rpki_rtr.c,v 1.10 2008-03-20 09:30:56 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"
+
+/*
+ * RPKI/Router PDU header
+ *
+ * Here's what the PDU header looks like.
+ * The length does include the version and length fields.
+ */
+typedef struct rpki_rtr_pdu_ {
+    u_char version;		/* Version number */
+    u_char pdu_type;		/* PDU type */
+    union {
+	u_char session_id[2];	/* Session id */
+	u_char error_code[2];	/* Error code */
+    } u;
+    u_char length[4];
+} rpki_rtr_pdu;
+#define RPKI_RTR_PDU_OVERHEAD (offsetof(rpki_rtr_pdu, rpki_rtr_pdu_msg))
+
+/*
+ * IPv4 Prefix PDU.
+ */
+typedef struct rpki_rtr_pdu_ipv4_prefix_ {
+    rpki_rtr_pdu pdu_header;
+    u_char flags;
+    u_char prefix_length;
+    u_char max_length;
+    u_char zero;
+    u_char prefix[4];
+    u_char as[4];
+} rpki_rtr_pdu_ipv4_prefix;
+
+/*
+ * IPv6 Prefix PDU.
+ */
+typedef struct rpki_rtr_pdu_ipv6_prefix_ {
+    rpki_rtr_pdu pdu_header;
+    u_char flags;
+    u_char prefix_length;
+    u_char max_length;
+    u_char zero;
+    u_char prefix[16];
+    u_char as[4];
+} rpki_rtr_pdu_ipv6_prefix;
+
+/*
+ * Error report PDU.
+ */
+typedef struct rpki_rtr_pdu_error_report_ {
+    rpki_rtr_pdu pdu_header;
+    u_char encapsulated_pdu_length[4]; /* Encapsulated PDU length */
+} rpki_rtr_pdu_error_report;
+
+/*
+ * PDU type codes
+ */
+#define RPKI_RTR_SERIAL_NOTIFY_PDU	0
+#define RPKI_RTR_SERIAL_QUERY_PDU	1
+#define RPKI_RTR_RESET_QUERY_PDU	2
+#define RPKI_RTR_CACHE_RESPONSE_PDU	3
+#define RPKI_RTR_IPV4_PREFIX_PDU	4
+#define RPKI_RTR_IPV6_PREFIX_PDU	6
+#define RPKI_RTR_END_OF_DATA_PDU	7
+#define RPKI_RTR_CACHE_RESET_PDU	8
+#define RPKI_RTR_ERROR_REPORT_PDU	10
+
+static const struct tok rpki_rtr_pdu_values[] = {
+    { RPKI_RTR_SERIAL_NOTIFY_PDU, "Serial Notify" },
+    { RPKI_RTR_SERIAL_QUERY_PDU, "Serial Query" },
+    { RPKI_RTR_RESET_QUERY_PDU, "Reset Query" },
+    { RPKI_RTR_CACHE_RESPONSE_PDU, "Cache Response" },
+    { RPKI_RTR_IPV4_PREFIX_PDU, "IPV4 Prefix" },
+    { RPKI_RTR_IPV6_PREFIX_PDU, "IPV6 Prefix" },
+    { RPKI_RTR_END_OF_DATA_PDU, "End of Data" },
+    { RPKI_RTR_CACHE_RESET_PDU, "Cache Reset" },
+    { RPKI_RTR_ERROR_REPORT_PDU, "Error Report" },
+    { 0, NULL}
+};
+
+static const struct tok rpki_rtr_error_codes[] = {
+    { 0, "Corrupt Data" },
+    { 1, "Internal Error" },
+    { 2, "No Data Available" },
+    { 3, "Invalid Request" },
+    { 4, "Unsupported Protocol Version" },
+    { 5, "Unsupported PDU Type" },
+    { 6, "Withdrawal of Unknown Record" },
+    { 7, "Duplicate Announcement Received" },
+    { 0, NULL}
+};
+
+/*
+ * Build a identation string for a given identation level.
+ * XXX this should be really in util.c
+ */
+static char *
+indent_string (u_int indent)
+{
+    static char buf[20];
+    u_int idx;
+
+    idx = 0;
+    buf[idx] = '\0';
+
+    /*
+     * Does the static buffer fit ?
+     */
+    if (sizeof(buf) < ((indent/8) + (indent %8) + 2)) {
+	return buf;
+    }
+
+    /*
+     * Heading newline.
+     */
+    buf[idx] = '\n';
+    idx++;
+
+    while (indent >= 8) {
+	buf[idx] = '\t';
+	idx++;
+	indent -= 8;
+    }
+
+    while (indent > 0) {
+	buf[idx] = ' ';
+	idx++;
+	indent--;
+    }
+
+    /*
+     * Trailing zero.
+     */
+    buf[idx] = '\0';
+
+    return buf;
+}
+
+/*
+ * Print a single PDU.
+ */
+static void
+rpki_rtr_pdu_print (const u_char *tptr, u_int indent)
+{
+    const rpki_rtr_pdu *pdu_header;
+    u_int pdu_type, pdu_len, hexdump;
+    const u_char *msg;
+
+    pdu_header = (rpki_rtr_pdu *)tptr;
+    pdu_type = pdu_header->pdu_type;
+    pdu_len = EXTRACT_32BITS(pdu_header->length);
+    hexdump = FALSE;
+
+    printf("%sRPKI-RTRv%u, %s PDU (%u), length: %u",
+	   indent_string(8),
+	   pdu_header->version,
+	   tok2str(rpki_rtr_pdu_values, "Unknown", pdu_type),
+	   pdu_type, pdu_len);
+
+    switch (pdu_type) {
+
+	/*
+	 * The following PDUs share the message format.
+	 */
+    case RPKI_RTR_SERIAL_NOTIFY_PDU:
+    case RPKI_RTR_SERIAL_QUERY_PDU:
+    case RPKI_RTR_END_OF_DATA_PDU:
+        msg = (const u_char *)(pdu_header + 1);
+	printf("%sSession ID: 0x%04x, Serial: %u",
+	       indent_string(indent+2),
+	       EXTRACT_16BITS(pdu_header->u.session_id),
+	       EXTRACT_32BITS(msg));
+	break;
+
+	/*
+	 * The following PDUs share the message format.
+	 */
+    case RPKI_RTR_RESET_QUERY_PDU:
+    case RPKI_RTR_CACHE_RESET_PDU:
+
+	/*
+	 * Zero payload PDUs.
+	 */
+	break;
+
+    case RPKI_RTR_CACHE_RESPONSE_PDU:
+	printf("%sSession ID: 0x%04x",
+	       indent_string(indent+2),
+	       EXTRACT_16BITS(pdu_header->u.session_id));
+	break;
+
+    case RPKI_RTR_IPV4_PREFIX_PDU:
+	{
+	    rpki_rtr_pdu_ipv4_prefix *pdu;
+
+	    pdu = (rpki_rtr_pdu_ipv4_prefix *)tptr;
+	    printf("%sIPv4 Prefix %s/%u-%u, origin-as %u, flags 0x%02x",
+		   indent_string(indent+2),
+		   ipaddr_string(pdu->prefix),
+		   pdu->prefix_length, pdu->max_length,
+		   EXTRACT_32BITS(pdu->as), pdu->flags);
+	}
+	break;
+
+#ifdef INET6
+    case RPKI_RTR_IPV6_PREFIX_PDU:
+	{
+	    rpki_rtr_pdu_ipv6_prefix *pdu;
+
+	    pdu = (rpki_rtr_pdu_ipv6_prefix *)tptr;
+	    printf("%sIPv6 Prefix %s/%u-%u, origin-as %u, flags 0x%02x",
+		   indent_string(indent+2),
+		   ip6addr_string(pdu->prefix),
+		   pdu->prefix_length, pdu->max_length,
+		   EXTRACT_32BITS(pdu->as), pdu->flags);
+	}
+	break;
+#endif
+
+    case RPKI_RTR_ERROR_REPORT_PDU:
+	{
+	    rpki_rtr_pdu_error_report *pdu;
+	    u_int encapsulated_pdu_length, text_length, tlen, error_code;
+	    u_char buf[80];
+
+	    pdu = (rpki_rtr_pdu_error_report *)tptr;
+	    encapsulated_pdu_length = EXTRACT_32BITS(pdu->encapsulated_pdu_length);
+	    tlen = pdu_len;
+
+	    error_code = EXTRACT_16BITS(pdu->pdu_header.u.error_code);
+	    printf("%sError code: %s (%u), Encapsulated PDU length: %u",
+		   indent_string(indent+2),
+		   tok2str(rpki_rtr_error_codes, "Unknown", error_code),
+		   error_code, encapsulated_pdu_length);
+
+	    tptr += sizeof(*pdu);
+	    tlen -= sizeof(*pdu);
+
+	    /*
+	     * Recurse if there is an encapsulated PDU.
+	     */
+	    if (encapsulated_pdu_length &&
+		(encapsulated_pdu_length <= tlen)) {
+		printf("%s-----encapsulated PDU-----", indent_string(indent+4));
+		rpki_rtr_pdu_print(tptr, indent+2);
+	    }
+
+	    tptr += encapsulated_pdu_length;
+	    tlen -= encapsulated_pdu_length;
+
+	    /*
+	     * Extract, trail-zero and print the Error message.
+	     */ 
+	    text_length = 0;
+	    if (tlen > 4) {
+		text_length = EXTRACT_32BITS(tptr);
+		tptr += 4;
+		tlen -= 4;
+	    }
+	    if (text_length && (text_length <= tlen )) {
+		memcpy(buf, tptr, MIN(sizeof(buf)-1, text_length));
+		buf[text_length] = '\0';
+		printf("%sError text: %s", indent_string(indent+2), buf);
+	    }
+	}
+	break;
+
+    default:
+
+	/*
+	 * Unknown data, please hexdump.
+	 */ 
+	hexdump = TRUE;
+    }
+
+    /* do we also want to see a hex dump ? */
+    if (vflag > 1 || (vflag && hexdump)) {
+	print_unknown_data(tptr,"\n\t  ", pdu_len);
+    }
+}
+
+void
+rpki_rtr_print(register const u_char *pptr, register u_int len) {
+
+    u_int tlen, pdu_type, pdu_len;
+    const u_char *tptr;
+    const rpki_rtr_pdu *pdu_header;
+
+    tptr = pptr;
+    tlen = len;
+
+    if (!vflag) {
+	printf(", RPKI-RTR");
+	return;
+    }
+
+    while (tlen >= sizeof(rpki_rtr_pdu)) {
+
+        TCHECK2(*tptr, sizeof(rpki_rtr_pdu));
+
+	pdu_header = (rpki_rtr_pdu *)tptr;
+        pdu_type = pdu_header->pdu_type;
+        pdu_len = EXTRACT_32BITS(pdu_header->length);
+
+        /* infinite loop check */
+        if (!pdu_type || !pdu_len) {
+            break;
+        }
+
+        TCHECK2(*tptr, pdu_len);
+        if (tlen < pdu_len) {
+            goto trunc;
+        }
+
+	/*
+	 * Print the PDU.
+	 */
+	rpki_rtr_pdu_print(tptr, 8);
+
+        tlen -= pdu_len;
+        tptr += pdu_len;
+    }
+    return;
+ trunc:
+    printf("\n\t[|RPKI-RTR]");
+}
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/print-rrcp.c b/print-rrcp.c
new file mode 100644
index 0000000..c5b1fdd
--- /dev/null
+++ b/print-rrcp.c
@@ -0,0 +1,143 @@
+/*
+ * 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.2 2008-04-11 17:21:34 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
+
+#define RRCP_OPCODE_MASK	0x7F	/* 0x00 = hello, 0x01 = get, 0x02 = set */
+#define RRCP_ISREPLY		0x80	/* 0 = request to switch, 0x80 = reply from switch */
+
+#define RRCP_PROTO_OFFSET		0	/* proto - 1 byte, must be 1 */
+#define RRCP_OPCODE_ISREPLY_OFFSET	1	/* opcode and isreply flag - 1 byte */
+#define RRCP_AUTHKEY_OFFSET		2	/* authorization key - 2 bytes, 0x2379 by default */
+
+/* most packets */
+#define RRCP_REG_ADDR_OFFSET		4	/* register address - 2 bytes */
+#define RRCP_REG_DATA_OFFSET		6	/* register data - 4 bytes */
+#define RRCP_COOKIE1_OFFSET		10	/* 4 bytes */
+#define RRCP_COOKIE2_OFFSET		14	/* 4 bytes */
+
+/* hello reply packets */
+#define RRCP_DOWNLINK_PORT_OFFSET	4	/* 1 byte */
+#define RRCP_UPLINK_PORT_OFFSET		5	/* 1 byte */
+#define RRCP_UPLINK_MAC_OFFSET		6	/* 6 byte MAC address */
+#define RRCP_CHIP_ID_OFFSET		12	/* 2 bytes */
+#define RRCP_VENDOR_ID_OFFSET		14	/* 4 bytes */
+
+static const struct tok proto_values[] = {
+	{ 1, "RRCP" },
+	{ 2, "RRCP-REP" },
+	{ 0, NULL }
+};
+
+static const struct tok opcode_values[] = {
+	{ 0, "hello" },
+	{ 1, "get" },
+	{ 2, "set" },
+	{ 0, NULL }
+};
+
+/*
+ * Print RRCP requests
+ */
+void
+rrcp_print(netdissect_options *ndo,
+	  register const u_char *cp,
+	  u_int length _U_)
+{
+	const u_char *rrcp;
+	u_int8_t rrcp_proto;
+	u_int8_t rrcp_opcode;
+	register const struct ether_header *ep;
+	char proto_str[16];
+	char opcode_str[32];
+
+	ep = (const struct ether_header *)cp;
+	rrcp = cp + ETHER_HDRLEN;
+
+	ND_TCHECK(*(rrcp + RRCP_PROTO_OFFSET));
+	rrcp_proto = *(rrcp + RRCP_PROTO_OFFSET);
+	ND_TCHECK(*(rrcp + RRCP_OPCODE_ISREPLY_OFFSET));
+	rrcp_opcode = (*(rrcp + RRCP_OPCODE_ISREPLY_OFFSET)) & RRCP_OPCODE_MASK;
+        ND_PRINT((ndo, "%s > %s, %s %s",
+		etheraddr_string(ESRC(ep)),
+		etheraddr_string(EDST(ep)),
+		tok2strbuf(proto_values,"RRCP-0x%02x",rrcp_proto,proto_str,sizeof(proto_str)),
+		((*(rrcp + RRCP_OPCODE_ISREPLY_OFFSET)) & RRCP_ISREPLY) ? "reply" : "query"));
+	if (rrcp_proto==1){
+    	    ND_PRINT((ndo, ": %s",
+		     tok2strbuf(opcode_values,"unknown opcode (0x%02x)",rrcp_opcode,opcode_str,sizeof(opcode_str))));
+	}
+	if (rrcp_opcode==1 || rrcp_opcode==2){
+	    ND_TCHECK2(*(rrcp + RRCP_REG_ADDR_OFFSET), 6);
+    	    ND_PRINT((ndo, " addr=0x%04x, data=0x%08x",
+                     EXTRACT_LE_16BITS(rrcp + RRCP_REG_ADDR_OFFSET),
+                     EXTRACT_LE_32BITS(rrcp + RRCP_REG_DATA_OFFSET)));
+	}
+	if (rrcp_proto==1){
+	    ND_TCHECK2(*(rrcp + RRCP_AUTHKEY_OFFSET), 2);
+    	    ND_PRINT((ndo, ", auth=0x%04x",
+		  EXTRACT_16BITS(rrcp + RRCP_AUTHKEY_OFFSET)));
+	}
+	if (rrcp_proto==1 && rrcp_opcode==0 &&
+	     ((*(rrcp + RRCP_OPCODE_ISREPLY_OFFSET)) & RRCP_ISREPLY)){
+	    ND_TCHECK2(*(rrcp + RRCP_VENDOR_ID_OFFSET), 4);
+	    ND_PRINT((ndo, " downlink_port=%d, uplink_port=%d, uplink_mac=%s, vendor_id=%08x ,chip_id=%04x ",
+		     *(rrcp + RRCP_DOWNLINK_PORT_OFFSET),
+		     *(rrcp + RRCP_UPLINK_PORT_OFFSET),
+		     etheraddr_string(rrcp + RRCP_UPLINK_MAC_OFFSET),
+		     EXTRACT_32BITS(rrcp + RRCP_VENDOR_ID_OFFSET),
+		     EXTRACT_16BITS(rrcp + RRCP_CHIP_ID_OFFSET)));
+	}else if (rrcp_opcode==1 || rrcp_opcode==2 || rrcp_proto==2){
+	    ND_TCHECK2(*(rrcp + RRCP_COOKIE2_OFFSET), 4);
+	    ND_PRINT((ndo, ", cookie=0x%08x%08x ",
+		    EXTRACT_32BITS(rrcp + RRCP_COOKIE2_OFFSET),
+		    EXTRACT_32BITS(rrcp + RRCP_COOKIE1_OFFSET)));
+	}
+        if (!ndo->ndo_vflag)
+            return;
+	return;
+
+trunc:
+	ND_PRINT((ndo, "[|rrcp]"));
+}
diff --git a/print-rsvp.c b/print-rsvp.c
index ad51930..2d54a3e 100644
--- a/print-rsvp.c
+++ b/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.50 2008-08-16 11:36:20 hannes Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -36,6 +36,7 @@
 #include "ethertype.h"
 #include "gmpls.h"
 #include "af.h"
+#include "signature.h"
 
 /*
  * RFC 2205 common header
@@ -142,6 +143,7 @@
 #define	RSVP_OBJ_UPSTREAM_LABEL     35  /* rfc3473 */
 #define	RSVP_OBJ_LABEL_SET          36  /* rfc3473 */
 #define	RSVP_OBJ_PROTECTION         37  /* rfc3473 */
+#define RSVP_OBJ_S2L                50  /* rfc4875 */
 #define	RSVP_OBJ_DETOUR             63  /* draft-ietf-mpls-rsvp-lsp-fastreroute-07 */
 #define	RSVP_OBJ_CLASSTYPE          66  /* rfc4124 */
 #define RSVP_OBJ_CLASSTYPE_OLD      125 /* draft-ietf-tewg-diff-te-proto-07 */
@@ -198,6 +200,7 @@
     { RSVP_OBJ_NOTIFY_REQ,         "Notify Request" },
     { RSVP_OBJ_PROTECTION,         "Protection" },
     { RSVP_OBJ_ADMIN_STATUS,       "Administrative Status" },
+    { RSVP_OBJ_S2L,                "Sub-LSP to LSP" },
     { 0, NULL}
 };
 
@@ -210,6 +213,9 @@
 #define RSVP_CTYPE_2           2
 #define RSVP_CTYPE_3           3
 #define RSVP_CTYPE_4           4
+#define RSVP_CTYPE_12         12
+#define RSVP_CTYPE_13         13
+#define RSVP_CTYPE_14         14
 
 /*
  * the ctypes are not globally unique so for
@@ -235,13 +241,19 @@
     { 256*RSVP_OBJ_FILTERSPEC+RSVP_CTYPE_IPV6,	             "IPv6" },
     { 256*RSVP_OBJ_FILTERSPEC+RSVP_CTYPE_3,	             "IPv6 Flow-label" },
     { 256*RSVP_OBJ_FILTERSPEC+RSVP_CTYPE_TUNNEL_IPV4,	     "Tunnel IPv4" },
+    { 256*RSVP_OBJ_FILTERSPEC+RSVP_CTYPE_12,                 "IPv4 P2MP LSP Tunnel" },
+    { 256*RSVP_OBJ_FILTERSPEC+RSVP_CTYPE_13,                 "IPv6 P2MP LSP Tunnel" },
     { 256*RSVP_OBJ_SESSION+RSVP_CTYPE_IPV4,	             "IPv4" },
     { 256*RSVP_OBJ_SESSION+RSVP_CTYPE_IPV6,	             "IPv6" },
     { 256*RSVP_OBJ_SESSION+RSVP_CTYPE_TUNNEL_IPV4,           "Tunnel IPv4" },
     { 256*RSVP_OBJ_SESSION+RSVP_CTYPE_UNI_IPV4,              "UNI IPv4" },
+    { 256*RSVP_OBJ_SESSION+RSVP_CTYPE_13,                    "IPv4 P2MP LSP Tunnel" },
+    { 256*RSVP_OBJ_SESSION+RSVP_CTYPE_14,                    "IPv6 P2MP LSP Tunnel" },
     { 256*RSVP_OBJ_SENDER_TEMPLATE+RSVP_CTYPE_IPV4,          "IPv4" },
     { 256*RSVP_OBJ_SENDER_TEMPLATE+RSVP_CTYPE_IPV6,          "IPv6" },
     { 256*RSVP_OBJ_SENDER_TEMPLATE+RSVP_CTYPE_TUNNEL_IPV4,   "Tunnel IPv4" },
+    { 256*RSVP_OBJ_SENDER_TEMPLATE+RSVP_CTYPE_12,            "IPv4 P2MP LSP Tunnel" },
+    { 256*RSVP_OBJ_SENDER_TEMPLATE+RSVP_CTYPE_13,            "IPv6 P2MP LSP Tunnel" },
     { 256*RSVP_OBJ_MESSAGE_ID+RSVP_CTYPE_1,                  "1" },
     { 256*RSVP_OBJ_MESSAGE_ID_ACK+RSVP_CTYPE_1,              "Message id ack" },
     { 256*RSVP_OBJ_MESSAGE_ID_ACK+RSVP_CTYPE_2,              "Message id nack" },
@@ -282,6 +294,8 @@
     { 256*RSVP_OBJ_CLASSTYPE_OLD+RSVP_CTYPE_1,               "1" },
     { 256*RSVP_OBJ_LABEL_SET+RSVP_CTYPE_1,                   "1" },
     { 256*RSVP_OBJ_GENERALIZED_UNI+RSVP_CTYPE_1,             "1" },
+    { 256*RSVP_OBJ_S2L+RSVP_CTYPE_IPV4,                      "IPv4 sub-LSP" },
+    { 256*RSVP_OBJ_S2L+RSVP_CTYPE_IPV6,                      "IPv6 sub-LSP" },
     { 0, NULL}
 };
 
@@ -316,6 +330,7 @@
 #define	RSVP_OBJ_XRO_RES       0
 #define	RSVP_OBJ_XRO_IPV4      1
 #define	RSVP_OBJ_XRO_IPV6      2
+#define	RSVP_OBJ_XRO_LABEL     3
 #define	RSVP_OBJ_XRO_ASN       32
 #define	RSVP_OBJ_XRO_MPLS      64
 
@@ -323,6 +338,7 @@
     { RSVP_OBJ_XRO_RES,	      "Reserved" },
     { RSVP_OBJ_XRO_IPV4,      "IPv4 prefix" },
     { RSVP_OBJ_XRO_IPV6,      "IPv6 prefix" },
+    { RSVP_OBJ_XRO_LABEL,     "Label" },
     { RSVP_OBJ_XRO_ASN,       "Autonomous system number" },
     { RSVP_OBJ_XRO_MPLS,      "MPLS label switched path termination" },
     { 0, NULL}
@@ -337,6 +353,12 @@
     { 0, NULL}
 };
 
+/* RFC3209 */
+static const struct tok rsvp_obj_rro_label_flag_values[] = {
+    { 0x01,                   "Global" },
+    { 0, NULL}
+};
+
 static const struct tok rsvp_resstyle_values[] = {
     { 17,	              "Wildcard Filter" },
     { 10,                     "Fixed Filter" },
@@ -368,16 +390,16 @@
     { 0, NULL}
 };
 
-static struct tok rsvp_session_attribute_flag_values[] = {
-    { 0x01,	              "Local Protection desired" },
-    { 0x02,                   "Label Recording desired" },
-    { 0x04,                   "SE Style desired" },
-    { 0x08,                   "Bandwidth protection desired" }, /* draft-ietf-mpls-rsvp-lsp-fastreroute-02.txt */
-    { 0x10,                   "Node protection desired" },      /* draft-ietf-mpls-rsvp-lsp-fastreroute-02.txt */
+static const struct tok rsvp_session_attribute_flag_values[] = {
+    { 0x01,	              "Local Protection" },
+    { 0x02,                   "Label Recording" },
+    { 0x04,                   "SE Style" },
+    { 0x08,                   "Bandwidth protection" }, /* RFC4090 */
+    { 0x10,                   "Node protection" },      /* RFC4090 */
     { 0, NULL}
 };
 
-static struct tok rsvp_obj_prop_tlv_values[] = {
+static const struct tok rsvp_obj_prop_tlv_values[] = {
     { 0x01,                   "Cos" },
     { 0x02,                   "Metric 1" },
     { 0x04,                   "Metric 2" },
@@ -391,7 +413,7 @@
 #define RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE 28
 #define RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE_OLD 125
 
-static struct tok rsvp_obj_error_code_values[] = {
+static const struct tok rsvp_obj_error_code_values[] = {
     { RSVP_OBJ_ERROR_SPEC_CODE_ROUTING, "Routing Problem" },
     { RSVP_OBJ_ERROR_SPEC_CODE_NOTIFY,  "Notify Error" },
     { RSVP_OBJ_ERROR_SPEC_CODE_DIFFSERV_TE, "Diffserv TE Error" },
@@ -399,7 +421,7 @@
     { 0, NULL}
 };
 
-static struct tok rsvp_obj_error_code_routing_values[] = {
+static const struct tok rsvp_obj_error_code_routing_values[] = {
     { 1,                      "Bad EXPLICIT_ROUTE object" },
     { 2,                      "Bad strict node" },
     { 3,                      "Bad loose node" },
@@ -413,7 +435,7 @@
     { 0, NULL}
 };
 
-static struct tok rsvp_obj_error_code_diffserv_te_values[] = {
+static const struct tok rsvp_obj_error_code_diffserv_te_values[] = {
     { 1,                      "Unexpected CT object" },
     { 2,                      "Unsupported CT" },
     { 3,                      "Invalid CT value" },
@@ -614,7 +636,16 @@
 }
 
 static int
-rsvp_obj_print (const u_char *tptr, const char *ident, u_int tlen) {
+rsvp_obj_print (const u_char *pptr
+#ifndef HAVE_LIBCRYPTO
+_U_
+#endif
+, u_int plen
+#ifndef HAVE_LIBCRYPTO
+_U_
+#endif
+, const u_char *tptr,
+                const char *ident, u_int tlen) {
 
     const struct rsvp_object_header *rsvp_obj_header;
     const u_char *obj_tptr;
@@ -624,7 +655,7 @@
     } obj_ptr;
 
     u_short rsvp_obj_len,rsvp_obj_ctype,obj_tlen,intserv_serv_tlen;
-    int hexdump,processed,padbytes,error_code,error_value,i;
+    int hexdump,processed,padbytes,error_code,error_value,i,sigcheck;
     union {
 	float f;
 	u_int32_t i;
@@ -728,7 +759,30 @@
                 obj_tlen-=36;
                 obj_tptr+=36;                
                 break;
+
+            case RSVP_CTYPE_14: /* IPv6 p2mp LSP Tunnel */
+                if (obj_tlen < 26)
+                    return -1;
+                printf("%s  IPv6 P2MP LSP ID: 0x%08x, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
+                       ident,
+                       EXTRACT_32BITS(obj_tptr),
+                       EXTRACT_16BITS(obj_tptr+6),
+                       ip6addr_string(obj_tptr+8));
+                obj_tlen-=26;
+                obj_tptr+=26;                
+                break;
 #endif
+            case RSVP_CTYPE_13: /* IPv4 p2mp LSP Tunnel */
+                if (obj_tlen < 12)
+                    return -1;
+                printf("%s  IPv4 P2MP LSP ID: %s, Tunnel ID: 0x%04x, Extended Tunnel ID: %s",
+                       ident,
+                       ipaddr_string(obj_tptr),
+                       EXTRACT_16BITS(obj_tptr+6),
+                       ipaddr_string(obj_tptr+8));
+                obj_tlen-=12;
+                obj_tptr+=12;                
+                break;
             case RSVP_CTYPE_TUNNEL_IPV4:
             case RSVP_CTYPE_UNI_IPV4:
                 if (obj_tlen < 12)
@@ -880,6 +934,20 @@
                 obj_tlen-=20;
                 obj_tptr+=20;
                 break;
+            case RSVP_CTYPE_13: /* IPv6 p2mp LSP tunnel */
+                if (obj_tlen < 40)
+                    return-1;
+                printf("%s  IPv6 Tunnel Sender Address: %s, LSP ID: 0x%04x"
+                       "%s  Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
+                       ident,
+                       ip6addr_string(obj_tptr),
+                       EXTRACT_16BITS(obj_tptr+18),
+                       ident,
+                       ip6addr_string(obj_tptr+20),
+                       EXTRACT_16BITS(obj_tptr+38));
+                obj_tlen-=40;
+                obj_tptr+=40;
+                break;
 #endif
             case RSVP_CTYPE_TUNNEL_IPV4:
                 if (obj_tlen < 8)
@@ -891,6 +959,20 @@
                 obj_tlen-=8;
                 obj_tptr+=8;
                 break;
+            case RSVP_CTYPE_12: /* IPv4 p2mp LSP tunnel */
+                if (obj_tlen < 16)
+                    return-1;
+                printf("%s  IPv4 Tunnel Sender Address: %s, LSP ID: 0x%04x"
+                       "%s  Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
+                       ident,
+                       ipaddr_string(obj_tptr),
+                       EXTRACT_16BITS(obj_tptr+6),
+                       ident,
+                       ipaddr_string(obj_tptr+8),
+                       EXTRACT_16BITS(obj_tptr+12));
+                obj_tlen-=16;
+                obj_tptr+=16;
+                break;
             default:
                 hexdump=TRUE;
             }
@@ -999,6 +1081,18 @@
                                bittok2str(rsvp_obj_rro_flag_values,
                                    "none",
                                    *(obj_tptr+7))); /* rfc3209 says that this field is rsvd. */
+                    break;
+                    case RSVP_OBJ_XRO_LABEL:
+                        printf(", Flags: [%s] (%#x), Class-Type: %s (%u), %u",
+                               bittok2str(rsvp_obj_rro_label_flag_values,
+                                   "none",
+                                   *(obj_tptr+2)),
+                               *(obj_tptr+2),
+                               tok2str(rsvp_ctype_values,
+                                       "Unknown",
+                                       *(obj_tptr+3) + 256*RSVP_OBJ_RRO),
+                               *(obj_tptr+3),
+                               EXTRACT_32BITS(obj_tptr+4));
                     }
                     obj_tlen-=*(obj_tptr+1);
                     obj_tptr+=*(obj_tptr+1);
@@ -1055,14 +1149,14 @@
                 printf("%s  Session Name: ", ident);
                 for (i = 0; i < namelen; i++)
                     safeputchar(*(obj_tptr+4+i));
-                printf("%s  Setup Priority: %u, Holding Priority: %u, Flags: [%s]",
+                printf("%s  Setup Priority: %u, Holding Priority: %u, Flags: [%s] (%#x)",
                        ident,
                        (int)*obj_tptr,
                        (int)*(obj_tptr+1),
-                       tok2str(rsvp_session_attribute_flag_values,
+                       bittok2str(rsvp_session_attribute_flag_values,
                                   "none",
-                                  *(obj_tptr+2)));
-
+                                  *(obj_tptr+2)),
+                       *(obj_tptr+2));
                 obj_tlen-=4+*(obj_tptr+3);
                 obj_tptr+=4+*(obj_tptr+3);
                 break;
@@ -1306,6 +1400,20 @@
                 obj_tlen-=20;
                 obj_tptr+=20;
                 break;
+            case RSVP_CTYPE_13: /* IPv6 p2mp LSP tunnel */
+                if (obj_tlen < 40)
+                    return-1;
+                printf("%s  IPv6 Tunnel Sender Address: %s, LSP ID: 0x%04x"
+                       "%s  Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
+                       ident,
+                       ip6addr_string(obj_tptr),
+                       EXTRACT_16BITS(obj_tptr+18),
+                       ident,
+                       ip6addr_string(obj_tptr+20),
+                       EXTRACT_16BITS(obj_tptr+38));
+                obj_tlen-=40;
+                obj_tptr+=40;
+                break;
 #endif
             case RSVP_CTYPE_TUNNEL_IPV4:
                 if (obj_tlen < 8)
@@ -1317,6 +1425,20 @@
                 obj_tlen-=8;
                 obj_tptr+=8;
                 break;
+            case RSVP_CTYPE_12: /* IPv4 p2mp LSP tunnel */
+                if (obj_tlen < 16)
+                    return-1;
+                printf("%s  IPv4 Tunnel Sender Address: %s, LSP ID: 0x%04x"
+                       "%s  Sub-Group Originator ID: %s, Sub-Group ID: 0x%04x",
+                       ident,
+                       ipaddr_string(obj_tptr),
+                       EXTRACT_16BITS(obj_tptr+6),
+                       ident,
+                       ipaddr_string(obj_tptr+8),
+                       EXTRACT_16BITS(obj_tptr+12));
+                obj_tlen-=16;
+                obj_tptr+=16;
+                break;
             default:
                 hexdump=TRUE;
             }
@@ -1544,12 +1666,21 @@
                        bittok2str(rsvp_obj_integrity_flag_values,
                                   "none",
                                   obj_ptr.rsvp_obj_integrity->flags));
-                printf("%s  MD5-sum 0x%08x%08x%08x%08x (unverified)",
+                printf("%s  MD5-sum 0x%08x%08x%08x%08x ",
                        ident,
                        EXTRACT_32BITS(obj_ptr.rsvp_obj_integrity->digest),
                        EXTRACT_32BITS(obj_ptr.rsvp_obj_integrity->digest+4),
                        EXTRACT_32BITS(obj_ptr.rsvp_obj_integrity->digest+8),
                        EXTRACT_32BITS(obj_ptr.rsvp_obj_integrity->digest+12));
+
+#ifdef HAVE_LIBCRYPTO
+                sigcheck = signature_verify(pptr, plen, (unsigned char *)obj_ptr.\
+                                             rsvp_obj_integrity->digest);
+#else
+                sigcheck = CANT_CHECK_SIGNATURE;
+#endif
+                printf(" (%s)", tok2str(signature_check_values, "Unknown", sigcheck));
+
                 obj_tlen+=sizeof(struct rsvp_obj_integrity_t);
                 obj_tptr+=sizeof(struct rsvp_obj_integrity_t);
                 break;
@@ -1613,7 +1744,32 @@
                     break;
                 }
                 break;
+            default:
+                hexdump=TRUE;
+            }
 
+        case RSVP_OBJ_S2L:
+            switch (rsvp_obj_ctype) {
+            case RSVP_CTYPE_IPV4: 
+                if (obj_tlen < 4)
+                    return-1;
+                printf("%s  Sub-LSP destination address: %s",
+                       ident, ipaddr_string(obj_tptr));
+
+                obj_tlen-=4;
+                obj_tptr+=4;
+                break;
+#ifdef INET6
+            case RSVP_CTYPE_IPV6: 
+                if (obj_tlen < 16)
+                    return-1;
+                printf("%s  Sub-LSP destination address: %s",
+                       ident, ip6addr_string(obj_tptr));
+
+                obj_tlen-=16;
+                obj_tptr+=16;
+                break;
+#endif
             default:
                 hexdump=TRUE;
             }
@@ -1634,7 +1790,7 @@
         }
         /* do we also want to see a hex dump ? */
         if (vflag > 1 || hexdump==TRUE)
-            print_unknown_data(tptr+sizeof(sizeof(struct rsvp_object_header)),"\n\t    ", /* FIXME indentation */
+            print_unknown_data(tptr+sizeof(struct rsvp_object_header),"\n\t    ", /* FIXME indentation */
                                rsvp_obj_len-sizeof(struct rsvp_object_header));
 
         tptr+=rsvp_obj_len;
@@ -1650,13 +1806,13 @@
 void
 rsvp_print(register const u_char *pptr, register u_int len) {
 
-    const struct rsvp_common_header *rsvp_com_header;
+    struct rsvp_common_header *rsvp_com_header;
     const u_char *tptr,*subtptr;
-    u_short tlen,subtlen;
+    u_short plen, tlen, subtlen;
 
     tptr=pptr;
 
-    rsvp_com_header = (const struct rsvp_common_header *)pptr;
+    rsvp_com_header = (struct rsvp_common_header *)pptr;
     TCHECK(*rsvp_com_header);
 
     /*
@@ -1679,7 +1835,7 @@
 
     /* ok they seem to want to know everything - lets fully decode it */
 
-    tlen=EXTRACT_16BITS(rsvp_com_header->length);
+    plen = tlen = EXTRACT_16BITS(rsvp_com_header->length);
 
     printf("\n\tRSVPv%u %s Message (%u), Flags: [%s], length: %u, ttl: %u, checksum: 0x%04x",
            RSVP_EXTRACT_VERSION(rsvp_com_header->version_flags),
@@ -1690,6 +1846,12 @@
            rsvp_com_header->ttl,
            EXTRACT_16BITS(rsvp_com_header->checksum));
 
+    /*
+     * Clear checksum prior to signature verification.
+     */
+    rsvp_com_header->checksum[0] = 0;
+    rsvp_com_header->checksum[1] = 0;
+
     if (tlen < sizeof(const struct rsvp_common_header)) {
         printf("ERROR: common header too short %u < %lu", tlen,
                (unsigned long)sizeof(const struct rsvp_common_header));
@@ -1704,7 +1866,7 @@
     case RSVP_MSGTYPE_AGGREGATE:
         while(tlen > 0) {
             subtptr=tptr;
-            rsvp_com_header = (const struct rsvp_common_header *)subtptr;
+            rsvp_com_header = (struct rsvp_common_header *)subtptr;
             TCHECK(*rsvp_com_header);
 
             /*
@@ -1725,6 +1887,12 @@
                    subtlen,
                    rsvp_com_header->ttl,
                    EXTRACT_16BITS(rsvp_com_header->checksum));
+
+            /*
+             * Clear checksum prior to signature verification.
+             */
+            rsvp_com_header->checksum[0] = 0;
+            rsvp_com_header->checksum[1] = 0;
             
             if (subtlen < sizeof(const struct rsvp_common_header)) {
                 printf("ERROR: common header too short %u < %lu", subtlen,
@@ -1741,7 +1909,7 @@
             subtptr+=sizeof(const struct rsvp_common_header);
             subtlen-=sizeof(const struct rsvp_common_header);
 
-            if (rsvp_obj_print(subtptr,"\n\t    ", subtlen) == -1)
+            if (rsvp_obj_print(pptr, plen, subtptr,"\n\t    ", subtlen) == -1)
                 return;
 
             tptr+=subtlen+sizeof(const struct rsvp_common_header);
@@ -1761,7 +1929,7 @@
     case RSVP_MSGTYPE_HELLO:
     case RSVP_MSGTYPE_ACK:
     case RSVP_MSGTYPE_SREFRESH:
-        if (rsvp_obj_print(tptr,"\n\t  ", tlen) == -1)
+        if (rsvp_obj_print(pptr, plen, tptr,"\n\t  ", tlen) == -1)
             return;
         break;
 
diff --git a/print-rt6.c b/print-rt6.c
index 39e22ae..dc196b4 100644
--- a/print-rt6.c
+++ b/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/print-rx.c b/print-rx.c
index d991066..1b4f949 100644
--- a/print-rx.c
+++ b/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.42 2008-07-01 07:44:50 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -54,7 +54,7 @@
 
 #include "ip.h"
 
-static struct tok rx_types[] = {
+static const struct tok rx_types[] = {
 	{ RX_PACKET_TYPE_DATA,		"data" },
 	{ RX_PACKET_TYPE_ACK,		"ack" },
 	{ RX_PACKET_TYPE_BUSY,		"busy" },
@@ -82,7 +82,7 @@
 	{ RX_JUMBO_PACKET,	RX_PACKET_TYPE_DATA,	"jumbogram" }
 };
 
-static struct tok fs_req[] = {
+static const struct tok fs_req[] = {
 	{ 130,		"fetch-data" },
 	{ 131,		"fetch-acl" },
 	{ 132,		"fetch-status" },
@@ -118,10 +118,16 @@
 	{ 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 },
 };
 
-static struct tok cb_req[] = {
+static const struct tok cb_req[] = {
 	{ 204,		"callback" },
 	{ 205,		"initcb" },
 	{ 206,		"probe" },
@@ -137,10 +143,13 @@
 	{ 216,		"getcellservdb" },
 	{ 217,		"getlocalcell" },
 	{ 218,		"getcacheconf" },
+	{ 65536,        "getce64" },
+	{ 65537,        "getcellbynum" },
+	{ 65538,        "tellmeaboutyourself" },
 	{ 0,		NULL },
 };
 
-static struct tok pt_req[] = {
+static const struct tok pt_req[] = {
 	{ 500,		"new-user" },
 	{ 501,		"where-is-it" },
 	{ 502,		"dump-entry" },
@@ -163,10 +172,11 @@
 	{ 519,		"get-host-cps" },
 	{ 520,		"update-entry" },
 	{ 521,		"list-entries" },
+	{ 530,		"list-super-groups" },
 	{ 0,		NULL },
 };
 
-static struct tok vldb_req[] = {
+static const struct tok vldb_req[] = {
 	{ 501,		"create-entry" },
 	{ 502,		"delete-entry" },
 	{ 503,		"get-entry-by-id" },
@@ -204,7 +214,7 @@
 	{ 0,		NULL },
 };
 
-static struct tok kauth_req[] = {
+static const struct tok kauth_req[] = {
 	{ 1,		"auth-old" },
 	{ 21,		"authenticate" },
 	{ 22,		"authenticate-v2" },
@@ -226,7 +236,7 @@
 	{ 0,		NULL },
 };
 
-static struct tok vol_req[] = {
+static const struct tok vol_req[] = {
 	{ 100,		"create-volume" },
 	{ 101,		"delete-volume" },
 	{ 102,		"restore" },
@@ -256,10 +266,13 @@
 	{ 126,		"set-info" },
 	{ 127,		"x-list-partitions" },
 	{ 128,		"forward-multiple" },
+	{ 65536,	"convert-ro" },
+	{ 65537,	"get-size" },
+	{ 65538,	"dump-v2" },
 	{ 0,		NULL },
 };
 
-static struct tok bos_req[] = {
+static const struct tok bos_req[] = {
 	{ 80,		"create-bnode" },
 	{ 81,		"delete-bnode" },
 	{ 82,		"set-status" },
@@ -300,13 +313,15 @@
 	{ 0,		NULL },
 };
 
-static struct tok ubik_req[] = {
+static const struct tok ubik_req[] = {
 	{ 10000,	"vote-beacon" },
 	{ 10001,	"vote-debug-old" },
 	{ 10002,	"vote-sdebug-old" },
 	{ 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,18 +340,18 @@
 };
 
 #define VOTE_LOW	10000
-#define VOTE_HIGH	10005
+#define VOTE_HIGH	10007
 #define DISK_LOW	20000
 #define DISK_HIGH	20013
 
-static struct tok cb_types[] = {
+static const struct tok cb_types[] = {
 	{ 1,		"exclusive" },
 	{ 2,		"shared" },
 	{ 3,		"dropped" },
 	{ 0,		NULL },
 };
 
-static struct tok ubik_lock_types[] = {
+static const struct tok ubik_lock_types[] = {
 	{ 1,		"read" },
 	{ 2,		"write" },
 	{ 3,		"wait" },
@@ -345,7 +360,7 @@
 
 static const char *voltype[] = { "read-write", "read-only", "backup" };
 
-static struct tok afs_fs_errors[] = {
+static const struct tok afs_fs_errors[] = {
 	{ 101,		"salvage volume" },
 	{ 102, 		"no such vnode" },
 	{ 103, 		"no such volume" },
@@ -366,7 +381,7 @@
  * Reasons for acknowledging a packet
  */
 
-static struct tok rx_ack_reasons[] = {
+static const struct tok rx_ack_reasons[] = {
 	{ 1,		"ack requested" },
 	{ 2,		"duplicate packet" },
 	{ 3,		"out of sequence" },
@@ -638,7 +653,7 @@
 			*opcode = rxent->opcode;
 			return(1);
 		}
-		if (++i > RX_CACHE_SIZE)
+		if (++i >= RX_CACHE_SIZE)
 			i = 0;
 	} while (i != rx_cache_hint);
 
@@ -688,6 +703,13 @@
 			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 @@
 			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 @@
 			STROUT(AFSNAMEMAX);
 			break;
 		case 155:	/* Bulk stat */
+		case 65536:     /* Inline bulk stat */
 		{
 			unsigned long j;
 			TCHECK2(bp[0], 4);
@@ -904,6 +938,26 @@
 			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 @@
 		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 @@
 
 	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 @@
 	 * 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/print-sctp.c b/print-sctp.c
index 7a18978..5a4b1e9 100644
--- a/print-sctp.c
+++ b/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
@@ -59,6 +59,29 @@
 #include "ip6.h"
 #endif
 
+#define CHAN_HP 6704
+#define CHAN_MP 6705
+#define CHAN_LP 6706
+
+static const struct tok ForCES_channels[] = {
+	{ CHAN_HP, "ForCES HP" },
+	{ CHAN_MP, "ForCES MP" },
+	{ CHAN_LP, "ForCES LP" },
+	{ 0, NULL }
+};
+
+static inline int isForCES_port(u_short Port)
+{
+	if (Port == CHAN_HP)
+		return 1;
+	if (Port == CHAN_MP)
+		return 1;
+	if (Port == CHAN_LP)
+		return 1;
+
+	return 0;
+}
+
 void sctp_print(const u_char *bp,        /* beginning of sctp packet */
 		const u_char *bp2,       /* beginning of enclosing */
 		u_int sctpPacketLength)  /* ip packet */
@@ -74,6 +97,8 @@
   const struct sctpChunkDesc *chunkDescPtr;
   const void *nextChunk;
   const char *sep;
+  int isforces = 0;
+
 
   sctpPktHdr = (const struct sctpHeader*) bp;
   endPacketPtr = (const u_char*)sctpPktHdr+sctpPacketLength;
@@ -120,6 +145,15 @@
   }
   fflush(stdout);
 
+  if (isForCES_port(sourcePort)) {
+         printf("[%s]", tok2str(ForCES_channels, NULL, sourcePort));
+         isforces = 1;
+  }
+  if (isForCES_port(destPort)) {
+         printf("[%s]", tok2str(ForCES_channels, NULL, destPort));
+         isforces = 1;
+  }
+
   if (vflag >= 2)
     sep = "\n\t";
   else
@@ -193,9 +227,23 @@
 	    printf("[SSEQ %u] ", EXTRACT_16BITS(&dataHdrPtr->sequence));
 	    printf("[PPID 0x%x] ", EXTRACT_32BITS(&dataHdrPtr->payloadtype));
 	    fflush(stdout);
+	    if (isforces) {
+		const u_char *payloadPtr;
+		u_int chunksize = sizeof(struct sctpDataPart)+
+			          sizeof(struct sctpChunkDesc);
+		payloadPtr = (const u_char *) (dataHdrPtr + 1);
+		if (EXTRACT_16BITS(&chunkDescPtr->chunkLength) <
+			sizeof(struct sctpDataPart)+
+			sizeof(struct sctpChunkDesc)+1) {
+		/* Less than 1 byte of chunk payload */
+			printf("bogus ForCES chunk length %u]",
+			    EXTRACT_16BITS(&chunkDescPtr->chunkLength));
+			return;
+		}
 
-	    if (vflag >= 2)	   /* if verbose output is specified */
-	      {		           /* at the command line */
+		forces_print(payloadPtr, EXTRACT_16BITS(&chunkDescPtr->chunkLength)- chunksize);
+	   } else if (vflag >= 2) {	/* if verbose output is specified */
+					/* at the command line */
 		const u_char *payloadPtr;
 
 		printf("[Payload");
@@ -203,16 +251,16 @@
 		if (!suppress_default_print) {
 			payloadPtr = (const u_char *) (++dataHdrPtr);
 			printf(":");
-			if (htons(chunkDescPtr->chunkLength) <
+			if (EXTRACT_16BITS(&chunkDescPtr->chunkLength) <
 			    sizeof(struct sctpDataPart)+
 			    sizeof(struct sctpChunkDesc)+1) {
 				/* Less than 1 byte of chunk payload */
 				printf("bogus chunk length %u]",
-				    htons(chunkDescPtr->chunkLength));
+				    EXTRACT_16BITS(&chunkDescPtr->chunkLength));
 				return;
 			}
 			default_print(payloadPtr,
-			      htons(chunkDescPtr->chunkLength) -
+			      EXTRACT_16BITS(&chunkDescPtr->chunkLength) -
 			      (sizeof(struct sctpDataPart)+
 			      sizeof(struct sctpChunkDesc)));
 		} else
@@ -295,15 +343,8 @@
 	    break;
 	  }
 	case SCTP_HEARTBEAT_REQUEST :
-	  {
-	    const struct sctpHBsender *hb;
-
-	    hb=(const struct sctpHBsender*)chunkDescPtr;
-
-	    printf("[HB REQ] ");
-
-	    break;
-	  }
+	  printf("[HB REQ] ");
+	  break;
 	case SCTP_HEARTBEAT_ACK :
 	  printf("[HB ACK] ");
 	  break;
diff --git a/print-sflow.c b/print-sflow.c
new file mode 100644
index 0000000..1a23d49
--- /dev/null
+++ b/print-sflow.c
@@ -0,0 +1,934 @@
+/*
+ * 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>
+ *
+ * Expansion and refactoring by Rick Jones <rick.jones2@hp.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_flow_sample_t {
+    u_int8_t    seqnum[4];
+    u_int8_t    typesource[4];
+    u_int8_t    rate[4];
+    u_int8_t    pool[4];
+    u_int8_t    drops[4];
+    u_int8_t    in_interface[4];
+    u_int8_t    out_interface[4];
+    u_int8_t    records[4];
+
+};
+
+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_ethernet_frame_t {
+    u_int8_t length[4];
+    u_int8_t src_mac[8];
+    u_int8_t dst_mac[8];
+    u_int8_t type[4];
+};
+
+struct sflow_extended_switch_data_t {
+    u_int8_t src_vlan[4];
+    u_int8_t src_pri[4];
+    u_int8_t dst_vlan[4];
+    u_int8_t dst_pri[4];
+};
+
+struct sflow_counter_record_t {
+    u_int8_t    format[4];
+    u_int8_t    length[4];
+};
+
+struct sflow_flow_record_t {
+    u_int8_t    format[4];
+    u_int8_t    length[4];
+};
+
+struct sflow_counter_sample_t {
+    u_int8_t    seqnum[4];
+    u_int8_t    typesource[4];
+    u_int8_t    records[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];
+};
+
+static int
+print_sflow_counter_generic(const u_char *pointer, u_int len) {
+
+    const struct sflow_generic_counter_t *sflow_gen_counter;
+
+    if (len < sizeof(struct sflow_generic_counter_t))
+	return 1;
+
+
+    sflow_gen_counter = (const struct sflow_generic_counter_t *)pointer;
+    printf("\n\t      ifindex %u, iftype %u, ifspeed %" PRIu64 ", ifdirection %u (%s)",
+	   EXTRACT_32BITS(sflow_gen_counter->ifindex),
+	   EXTRACT_32BITS(sflow_gen_counter->iftype),
+	   EXTRACT_64BITS(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));
+
+    return 0;
+}
+
+static int
+print_sflow_counter_ethernet(const u_char *pointer, u_int len){
+
+    const struct sflow_ethernet_counter_t *sflow_eth_counter;
+
+    if (len < sizeof(struct sflow_ethernet_counter_t))
+	return 1;
+
+    sflow_eth_counter = (const struct sflow_ethernet_counter_t *)pointer;
+    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));
+
+    return 0;
+}
+
+static int
+print_sflow_counter_token_ring(const u_char *pointer _U_, u_int len _U_) {
+
+    return 0;
+}
+
+static int
+print_sflow_counter_basevg(const u_char *pointer, u_int len) {
+
+    const struct sflow_100basevg_counter_t *sflow_100basevg_counter;
+
+    if (len < sizeof(struct sflow_100basevg_counter_t))
+	return 1;
+
+    sflow_100basevg_counter = (const struct sflow_100basevg_counter_t *)pointer;
+    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));
+
+    return 0;
+}
+
+static int
+print_sflow_counter_vlan(const u_char *pointer, u_int len) {
+
+    const struct sflow_vlan_counter_t *sflow_vlan_counter;
+    
+    if (len < sizeof(struct sflow_vlan_counter_t))
+	return 1;
+
+    sflow_vlan_counter = (const struct sflow_vlan_counter_t *)pointer;
+    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));
+
+    return 0;
+}
+
+struct sflow_processor_counter_t {
+    u_int8_t five_sec_util[4];
+    u_int8_t one_min_util[4];
+    u_int8_t five_min_util[4];
+    u_int8_t total_memory[8];
+    u_int8_t free_memory[8];
+};
+
+static int
+print_sflow_counter_processor(const u_char *pointer, u_int len) {
+
+    const struct sflow_processor_counter_t *sflow_processor_counter;
+
+    if (len < sizeof(struct sflow_processor_counter_t))
+	return 1;
+
+    sflow_processor_counter = (const struct sflow_processor_counter_t *)pointer;
+    printf("\n\t      5sec %u, 1min %u, 5min %u, total_mem %" PRIu64
+	   ", total_mem %" PRIu64,
+	   EXTRACT_32BITS(sflow_processor_counter->five_sec_util),
+	   EXTRACT_32BITS(sflow_processor_counter->one_min_util),
+	   EXTRACT_32BITS(sflow_processor_counter->five_min_util),
+	   EXTRACT_64BITS(sflow_processor_counter->total_memory),
+	   EXTRACT_64BITS(sflow_processor_counter->free_memory));
+
+    return 0;
+}
+
+static int
+sflow_print_counter_records(const u_char *pointer, u_int len, u_int records) {
+
+    u_int nrecords;
+    const u_char *tptr;
+    u_int tlen;
+    u_int counter_type;
+    u_int counter_len;
+    u_int enterprise;
+    const struct sflow_counter_record_t *sflow_counter_record;
+
+    nrecords = records;
+    tptr = pointer;
+    tlen = len;
+
+    while (nrecords > 0) {
+	/* do we have the "header?" */
+	if (tlen < sizeof(struct sflow_counter_record_t))
+	    return 1;
+	sflow_counter_record = (const struct sflow_counter_record_t *)tptr;
+
+	enterprise = EXTRACT_32BITS(sflow_counter_record->format);
+	counter_type = enterprise & 0x0FFF;
+	enterprise = enterprise >> 20;
+	counter_len  = EXTRACT_32BITS(sflow_counter_record->length);
+	printf("\n\t    enterprise %u, %s (%u) length %u",
+	       enterprise,
+	       (enterprise == 0) ? tok2str(sflow_counter_type_values,"Unknown",counter_type) : "Unknown",
+	       counter_type,
+	       counter_len);
+
+	tptr += sizeof(struct sflow_counter_record_t);
+	tlen -= sizeof(struct sflow_counter_record_t);
+
+	if (tlen < counter_len)
+	    return 1;
+	if (enterprise == 0) {
+	    switch (counter_type) {
+	    case SFLOW_COUNTER_GENERIC:
+		if (print_sflow_counter_generic(tptr,tlen))
+		    return 1;
+		break;
+	    case SFLOW_COUNTER_ETHERNET:
+		if (print_sflow_counter_ethernet(tptr,tlen))
+		    return 1;
+		break;
+	    case SFLOW_COUNTER_TOKEN_RING:
+		if (print_sflow_counter_token_ring(tptr,tlen))
+		    return 1;
+		break;
+	    case SFLOW_COUNTER_BASEVG:
+		if (print_sflow_counter_basevg(tptr,tlen))
+		    return 1;
+		break;
+	    case SFLOW_COUNTER_VLAN:
+		if (print_sflow_counter_vlan(tptr,tlen))
+		    return 1;
+		break;
+	    case SFLOW_COUNTER_PROCESSOR:
+		if (print_sflow_counter_processor(tptr,tlen))
+		    return 1;
+		break;
+	    default:
+		if (vflag <= 1)
+		    print_unknown_data(tptr, "\n\t\t", counter_len);
+		break;
+	    }
+	}
+	tptr += counter_len;
+	tlen -= counter_len;
+	nrecords--;
+	
+    }
+
+    return 0;
+}
+
+
+static int
+sflow_print_counter_sample(const u_char *pointer, u_int len) {
+
+    const struct sflow_counter_sample_t *sflow_counter_sample;
+    u_int           nrecords;
+    u_int           typesource;
+    u_int           type;
+    u_int           index;
+
+
+    if (len < sizeof(struct sflow_counter_sample_t))
+	return 1;
+
+    sflow_counter_sample = (const struct sflow_counter_sample_t *)pointer;
+
+    typesource = EXTRACT_32BITS(sflow_counter_sample->typesource);
+    nrecords   = EXTRACT_32BITS(sflow_counter_sample->records);
+    type = typesource >> 24;
+    index = typesource & 0x0FFF;
+    
+    printf(" seqnum %u, type %u, idx %u, records %u",
+	   EXTRACT_32BITS(sflow_counter_sample->seqnum),
+	   type,
+	   index,
+	   nrecords);
+
+    return sflow_print_counter_records(pointer + sizeof(struct sflow_counter_sample_t),
+				       len - sizeof(struct sflow_counter_sample_t),
+				       nrecords);
+
+}
+
+static int
+sflow_print_expanded_counter_sample(const u_char *pointer, u_int len) {
+
+    const struct sflow_expanded_counter_sample_t *sflow_expanded_counter_sample;
+    u_int           nrecords;
+
+
+    if (len < sizeof(struct sflow_expanded_counter_sample_t))
+	return 1;
+
+    sflow_expanded_counter_sample = (const struct sflow_expanded_counter_sample_t *)pointer;
+
+    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);
+    
+    return sflow_print_counter_records(pointer + sizeof(struct sflow_expanded_counter_sample_t),
+				       len - sizeof(struct sflow_expanded_counter_sample_t),
+				       nrecords);
+
+}
+
+static int
+print_sflow_raw_packet(const u_char *pointer, u_int len) {
+
+    const struct sflow_expanded_flow_raw_t *sflow_flow_raw;
+
+    if (len < sizeof(struct sflow_expanded_flow_raw_t))
+	return 1;
+
+    sflow_flow_raw = (const struct sflow_expanded_flow_raw_t *)pointer;
+    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));
+
+    /* QUESTION - should we attempt to print the raw header itself?
+       assuming of course there is wnough data present to do so... */
+
+    return 0;
+}
+
+static int
+print_sflow_ethernet_frame(const u_char *pointer, u_int len) {
+
+    const struct sflow_ethernet_frame_t *sflow_ethernet_frame;
+
+    if (len < sizeof(struct sflow_ethernet_frame_t))
+	return 1;
+
+    sflow_ethernet_frame = (const struct sflow_ethernet_frame_t *)pointer;
+
+    printf("\n\t      frame len %u, type %u",
+	   EXTRACT_32BITS(sflow_ethernet_frame->length),
+	   EXTRACT_32BITS(sflow_ethernet_frame->type));
+
+    return 0;
+}
+
+static int
+print_sflow_extended_switch_data(const u_char *pointer, u_int len) {
+
+    const struct sflow_extended_switch_data_t *sflow_extended_sw_data;
+
+    if (len < sizeof(struct sflow_extended_switch_data_t))
+	return 1;
+
+    sflow_extended_sw_data = (const struct sflow_extended_switch_data_t *)pointer;
+    printf("\n\t      src vlan %u, src pri %u, dst vlan %u, dst pri %u",
+	   EXTRACT_32BITS(sflow_extended_sw_data->src_vlan),
+	   EXTRACT_32BITS(sflow_extended_sw_data->src_pri),
+	   EXTRACT_32BITS(sflow_extended_sw_data->dst_vlan),
+	   EXTRACT_32BITS(sflow_extended_sw_data->dst_pri));
+
+    return 0;
+}
+
+static int
+sflow_print_flow_records(const u_char *pointer, u_int len, u_int records) {
+
+    u_int nrecords;
+    const u_char *tptr;
+    u_int tlen;
+    u_int flow_type;
+    u_int enterprise;
+    u_int flow_len;
+    const struct sflow_flow_record_t *sflow_flow_record;
+
+    nrecords = records;
+    tptr = pointer;
+    tlen = len;
+
+    while (nrecords > 0) {
+	/* do we have the "header?" */
+	if (tlen < sizeof(struct sflow_flow_record_t))
+	    return 1;
+
+	sflow_flow_record = (const struct sflow_flow_record_t *)tptr;
+
+	/* so, the funky encoding means we cannot blythly mask-off
+	   bits, we must also check the enterprise. */
+	
+	enterprise = EXTRACT_32BITS(sflow_flow_record->format);
+	flow_type = enterprise & 0x0FFF;
+	enterprise = enterprise >> 12;
+	flow_len  = EXTRACT_32BITS(sflow_flow_record->length);
+	printf("\n\t    enterprise %u %s (%u) length %u",
+	       enterprise,
+	       (enterprise == 0) ? tok2str(sflow_flow_type_values,"Unknown",flow_type) : "Unknown",
+	       flow_type,
+	       flow_len);
+
+	tptr += sizeof(struct sflow_flow_record_t);
+	tlen -= sizeof(struct sflow_flow_record_t);
+
+	if (tlen < flow_len)
+	    return 1;
+
+	if (enterprise == 0) {
+	    switch (flow_type) {
+	    case SFLOW_FLOW_RAW_PACKET:
+		if (print_sflow_raw_packet(tptr,tlen))
+		    return 1;
+		break;
+	    case SFLOW_FLOW_EXTENDED_SWITCH_DATA:
+		if (print_sflow_extended_switch_data(tptr,tlen))
+		    return 1;
+		break;
+	    case SFLOW_FLOW_ETHERNET_FRAME:
+		if (print_sflow_ethernet_frame(tptr,tlen))
+		    return 1;
+		break;
+		/* FIXME these need a decoder */
+	    case SFLOW_FLOW_IPV4_DATA:
+	    case SFLOW_FLOW_IPV6_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\t", flow_len);
+		break;
+	    }
+	}
+	tptr += flow_len;
+	tlen -= flow_len;
+	nrecords--;
+
+    }
+
+    return 0;
+}
+
+static int
+sflow_print_flow_sample(const u_char *pointer, u_int len) {
+
+    const struct sflow_flow_sample_t *sflow_flow_sample;
+    u_int          nrecords;
+    u_int          typesource;
+    u_int          type;
+    u_int          index;
+
+    if (len < sizeof(struct sflow_flow_sample_t))
+	return 1;
+
+    sflow_flow_sample = (struct sflow_flow_sample_t *)pointer;
+
+    typesource = EXTRACT_32BITS(sflow_flow_sample->typesource);
+    nrecords = EXTRACT_32BITS(sflow_flow_sample->records);
+    type = typesource >> 24;
+    index = typesource & 0x0FFF;
+
+    printf(" seqnum %u, type %u, idx %u, rate %u, pool %u, drops %u, input %u output %u records %u",
+	   EXTRACT_32BITS(sflow_flow_sample->seqnum),
+	   type,
+	   index,
+	   EXTRACT_32BITS(sflow_flow_sample->rate),
+	   EXTRACT_32BITS(sflow_flow_sample->pool),
+	   EXTRACT_32BITS(sflow_flow_sample->drops),
+	   EXTRACT_32BITS(sflow_flow_sample->in_interface),
+	   EXTRACT_32BITS(sflow_flow_sample->out_interface),
+	   nrecords);
+
+    return sflow_print_flow_records(pointer + sizeof(struct sflow_flow_sample_t),
+				    len - sizeof(struct sflow_flow_sample_t),
+				    nrecords);
+
+}
+
+static int
+sflow_print_expanded_flow_sample(const u_char *pointer, u_int len) {
+
+    const struct sflow_expanded_flow_sample_t *sflow_expanded_flow_sample;
+    u_int nrecords;
+
+    if (len < sizeof(struct sflow_expanded_flow_sample_t))
+	return 1;
+
+    sflow_expanded_flow_sample = (const struct sflow_expanded_flow_sample_t *)pointer;
+
+    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));
+    
+    return sflow_print_flow_records(pointer + sizeof(struct sflow_expanded_flow_sample_t),
+				    len - sizeof(struct sflow_expanded_flow_sample_t),
+				    nrecords);
+
+}
+
+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 u_char *tptr;
+    u_int tlen;
+    u_int32_t sflow_sample_type, sflow_sample_len;
+    u_int32_t nsamples;
+
+
+    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->agent_id),
+               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;
+        TCHECK(*sflow_sample);
+
+        sflow_sample_type = (EXTRACT_32BITS(sflow_sample->format)&0x0FFF);
+        sflow_sample_len = EXTRACT_32BITS(sflow_sample->len);
+
+	if (tlen < sizeof(struct sflow_sample_header))
+	    goto trunc;
+
+        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;
+        }
+
+	if (tlen < sflow_sample_len)
+	    goto trunc;
+
+        /* did we capture enough for fully decoding the sample ? */
+        TCHECK2(*tptr, sflow_sample_len);
+
+	switch(sflow_sample_type) {
+        case SFLOW_FLOW_SAMPLE:
+	    if (sflow_print_flow_sample(tptr,tlen))
+		goto trunc;
+            break;
+
+        case SFLOW_COUNTER_SAMPLE:
+	    if (sflow_print_counter_sample(tptr,tlen))
+		goto trunc;
+            break;
+
+        case SFLOW_EXPANDED_FLOW_SAMPLE:
+	    if (sflow_print_expanded_flow_sample(tptr,tlen))
+		goto trunc;
+	    break;
+
+        case SFLOW_EXPANDED_COUNTER_SAMPLE:
+	    if (sflow_print_expanded_counter_sample(tptr,tlen))
+		goto trunc;
+	    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/print-sip.c b/print-sip.c
index b4d13b1..c5bc853 100644
--- a/print-sip.c
+++ b/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
@@ -44,6 +44,7 @@
         return;
 
     for (idx = 0; idx < len; idx++) {
+        TCHECK2(*(pptr+idx), 2);
         if (EXTRACT_16BITS(pptr+idx) != 0x0d0a) { /* linefeed ? */
             safeputchar(*(pptr+idx));
         } else {
@@ -57,4 +58,7 @@
         print_unknown_data(pptr,"\n\t",len);
 
     return;
+
+trunc:
+    printf("[|sip]");
 }
diff --git a/print-sl.c b/print-sl.c
index f28a21a..91dbaad 100644
--- a/print-sl.c
+++ b/print-sl.c
@@ -21,7 +21,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
@@ -73,7 +73,7 @@
 		break;
 #ifdef INET6
 	case 6:
-		ip6_print((u_char *)ip, length);
+		ip6_print(gndo, (u_char *)ip, length);
 		break;
 #endif
 	default:
diff --git a/print-sll.c b/print-sll.c
index 1735f65..062398e 100644
--- a/print-sll.c
+++ b/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
@@ -41,7 +41,7 @@
 #include "ether.h"
 #include "sll.h"
 
-const struct tok sll_pkttype_values[] = {
+static const struct tok sll_pkttype_values[] = {
     { LINUX_SLL_HOST, "In" },
     { LINUX_SLL_BROADCAST, "B" },
     { LINUX_SLL_MULTICAST, "M" },
@@ -85,7 +85,7 @@
 				/*
 				 * 802.2.
 				 */
-				(void)printf("802.3");
+				(void)printf("802.2");
 				break;
 
 			default:
@@ -142,8 +142,9 @@
 	caplen -= SLL_HDR_LEN;
 	p += SLL_HDR_LEN;
 
-	ether_type = ntohs(sllp->sll_protocol);
+	ether_type = EXTRACT_16BITS(&sllp->sll_protocol);
 
+recurse:
 	/*
 	 * Is it (gag) an 802.3 encapsulation, or some non-Ethernet
 	 * packet type?
@@ -187,13 +188,43 @@
 				default_print(p, caplen);
 			break;
 		}
-	} else if (ether_encap_print(ether_type, p, length, caplen,
-	    &extracted_ethertype) == 0) {
-		/* ether_type not known, print raw packet */
-		if (!eflag)
-			sll_print(sllp, length + SLL_HDR_LEN);
-		if (!suppress_default_print)
-			default_print(p, caplen);
+	} else if (ether_type == ETHERTYPE_8021Q) {
+		/*
+		 * Print VLAN information, and then go back and process
+		 * the enclosed type field.
+		 */
+		if (caplen < 4 || length < 4) {
+			printf("[|vlan]");
+			return (SLL_HDR_LEN);
+		}
+	        if (eflag) {
+	        	u_int16_t tag = EXTRACT_16BITS(p);
+
+			printf("vlan %u, p %u%s, ",
+			    tag & 0xfff,
+			    tag >> 13,
+			    (tag & 0x1000) ? ", CFI" : "");
+		}
+
+		ether_type = EXTRACT_16BITS(p + 2);
+		if (ether_type <= ETHERMTU)
+			ether_type = LINUX_SLL_P_802_2;
+		if (!qflag) {
+			(void)printf("ethertype %s, ",
+			    tok2str(ethertype_values, "Unknown", ether_type));
+		}
+		p += 4;
+		length -= 4;
+		caplen -= 4;
+		goto recurse;
+	} else {
+		if (ethertype_print(gndo, ether_type, p, length, caplen) == 0) {
+			/* ether_type not known, print raw packet */
+			if (!eflag)
+				sll_print(sllp, length + SLL_HDR_LEN);
+			if (!suppress_default_print)
+				default_print(p, caplen);
+		}
 	}
 
 	return (SLL_HDR_LEN);
diff --git a/print-slow.c b/print-slow.c
index 9609922..fdfefcc 100644
--- a/print-slow.c
+++ b/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 @@
 #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 @@
 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,13 +250,98 @@
     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;
+    int print_version;
+
+    slow_com_header = (const struct slow_common_header_t *)pptr;
+    TCHECK(*slow_com_header);
+
+    /*
+     * Sanity checking of the header.
+     */
+    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 (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);
+    }
+
+    /* unrecognized subtype */
+    if (print_version == -1) {
+        print_unknown_data(pptr, "\n\t", len);
+        return;
+    }
+
+    if (!vflag)
+        return;
+
+    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 *tptr,*tlv_tptr;
-    u_int tlv_len,tlen,tlv_tlen;
+    const u_char *tlv_tptr;
+    u_int tlv_len, tlv_tlen;
 
     union {
         const struct lacp_marker_tlv_terminator_t *lacp_marker_tlv_terminator;
@@ -130,44 +349,14 @@
         const struct lacp_tlv_collector_info_t *lacp_tlv_collector_info;
         const struct marker_tlv_marker_info_t *marker_tlv_marker_info;
     } tlv_ptr;
-
-    tptr=pptr;
-    slow_com_header = (const struct slow_common_header *)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;
-    }
-    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;
-    }
-
-    printf("%sv%u, length: %u",
-           tok2str(slow_proto_values, "unknown (%u)",slow_com_header->proto_subtype),
-           slow_com_header->version,
-           len);
-
-    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);
-
+    
     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),
@@ -179,7 +368,7 @@
             tlv_header->type != LACP_TLV_TERMINATOR &&
             tlv_header->type != MARKER_TLV_TERMINATOR) {
             printf("\n\t-----trailing data-----");
-            print_unknown_data(tptr+sizeof(sizeof(struct tlv_header_t)),"\n\t  ",tlen);
+            print_unknown_data(tptr+sizeof(struct tlv_header_t),"\n\t  ",tlen);
             return;
         }
 
@@ -250,10 +439,11 @@
                 print_unknown_data(tlv_tptr,"\n\t  ",tlv_tlen);
             break;
         }
-        /* do we want to see an additionally hexdump ? */
-        if (vflag > 1)
-            print_unknown_data(tptr+sizeof(sizeof(struct tlv_header_t)),"\n\t  ",
+        /* do we want to see an additional hexdump ? */
+        if (vflag > 1) {
+            print_unknown_data(tptr+sizeof(struct tlv_header_t),"\n\t  ",
                                tlv_len-sizeof(struct tlv_header_t));
+        }
 
         tptr+=tlv_len;
         tlen-=tlv_len;
@@ -262,3 +452,210 @@
 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/print-smb.c b/print-smb.c
index 5b963de..68c7365 100644
--- a/print-smb.c
+++ b/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.47 2007-12-09 00:30:47 guy Exp $";
 #endif
 
 #include <tcpdump-stdinc.h>
@@ -1244,7 +1244,47 @@
     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 @@
 	    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/print-snmp.c b/print-snmp.c
index 0686b62..27ab0c4 100644
--- a/print-snmp.c
+++ b/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
@@ -782,7 +782,7 @@
 		const u_char *p = elem->data.str;
 		TCHECK2(*p, asnlen);
 		for (i = asnlen; printable && i-- > 0; p++)
-			printable = isprint(*p) || isspace(*p);
+			printable = ND_ISPRINT(*p);
 		p = elem->data.str;
 		if (printable) {
 			putchar('"');
diff --git a/print-stp.c b/print-stp.c
index 4308ae0..5c9b12d 100644
--- a/print-stp.c
+++ b/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
@@ -52,11 +52,13 @@
 #define STP_PROTO_REGULAR 0x00
 #define STP_PROTO_RAPID   0x02
 #define STP_PROTO_MSTP    0x03
+#define STP_PROTO_SPB     0x04
 
-struct tok stp_proto_values[] = {
+static const struct tok stp_proto_values[] = {
     { STP_PROTO_REGULAR, "802.1d" },
     { STP_PROTO_RAPID, "802.1w" },
     { STP_PROTO_MSTP, "802.1s" },
+    { STP_PROTO_SPB, "802.1aq" },
     { 0, NULL}
 };
 
@@ -64,7 +66,7 @@
 #define STP_BPDU_TYPE_RSTP        0x02
 #define STP_BPDU_TYPE_TOPO_CHANGE 0x80
 
-struct tok stp_bpdu_flag_values[] = {
+static const struct tok stp_bpdu_flag_values[] = {
     { 0x01, "Topology change" },
     { 0x02, "Proposal" },
     { 0x10, "Learn" },
@@ -74,14 +76,14 @@
     { 0, NULL}
 };
 
-struct tok stp_bpdu_type_values[] = {
+static const struct tok stp_bpdu_type_values[] = {
     { STP_BPDU_TYPE_CONFIG, "Config" },
     { STP_BPDU_TYPE_RSTP, "Rapid STP" },
     { STP_BPDU_TYPE_TOPO_CHANGE, "Topology Change" },
     { 0, NULL}
 };
 
-struct tok rstp_obj_port_role_values[] = {
+static const struct tok rstp_obj_port_role_values[] = {
     { 0x00, "Unknown" },
     { 0x01, "Alternate" },
     { 0x02, "Root" },
@@ -164,6 +166,30 @@
  * 1 -  byte  CIST Remaining Hops
  * 16 - bytes MSTI information [Max 64 MSTI, each 16 bytes]
  *
+ *
+ * SPB BPDU
+ * Ref. IEEE 802.1aq. Section 14
+ *
+ * 2 -  bytes Version 4 length
+ * 1 -  byte  Aux Config Identifier  
+ * 32 - bytes Aux Config Name
+ * 2 -  bytes Aux Revision level
+ * 16 - bytes Aux Config Digest [MD5]
+ * 1 -  byte  (1 - 2) Agreement Number 
+ *            (3 - 4) Discarded Agreement Number
+ *            (5) Agreement Valid Flag
+ *            (6) Restricted Role Flag
+ *            (7 - 8) Unused sent zero
+ * 1 -  byte Unused
+ * 1 -  byte (1 - 4) Agreement Digest Format Identifier
+ *           (5 - 8) Agreement Digest Format Capabilities
+ * 1 -  byte (1 - 4) Agreement Digest Convention Identifier
+ *           (5 - 8) Agreement Digest Convention Capabilities
+ * 2 -  bytes Agreement Digest Edge Count
+ * 8 -  byte Reserved Set
+ * 20 - bytes Computed Topology Digest
+ *
+ *
  * MSTI Payload
  *
  * 1 - byte  MSTI flag
@@ -172,6 +198,7 @@
  * 1 - byte  MSTI Bridge Priority
  * 1 - byte  MSTI Port Priority
  * 1 - byte  MSTI Remaining Hops
+ *
  */
 
 #define MST_BPDU_MSTI_LENGTH		    16
@@ -192,31 +219,52 @@
 #define MST_BPDU_MSTI_PORT_PRIO_OFFSET	    14
 #define MST_BPDU_MSTI_REMAIN_HOPS_OFFSET    15
 
+#define SPB_BPDU_MIN_LEN                  87
+#define SPB_BPDU_CONFIG_NAME_OFFSET       3
+#define SPB_BPDU_CONFIG_REV_OFFSET        SPB_BPDU_CONFIG_NAME_OFFSET + 32
+#define SPB_BPDU_CONFIG_DIGEST_OFFSET     SPB_BPDU_CONFIG_REV_OFFSET + 2
+#define SPB_BPDU_AGREEMENT_OFFSET         SPB_BPDU_CONFIG_DIGEST_OFFSET + 16
+#define SPB_BPDU_AGREEMENT_UNUSED_OFFSET  SPB_BPDU_AGREEMENT_OFFSET + 1
+#define SPB_BPDU_AGREEMENT_FORMAT_OFFSET  SPB_BPDU_AGREEMENT_UNUSED_OFFSET + 1
+#define SPB_BPDU_AGREEMENT_CON_OFFSET     SPB_BPDU_AGREEMENT_FORMAT_OFFSET + 1
+#define SPB_BPDU_AGREEMENT_EDGE_OFFSET    SPB_BPDU_AGREEMENT_CON_OFFSET + 1
+#define SPB_BPDU_AGREEMENT_RES1_OFFSET    SPB_BPDU_AGREEMENT_EDGE_OFFSET + 2
+#define SPB_BPDU_AGREEMENT_RES2_OFFSET    SPB_BPDU_AGREEMENT_RES1_OFFSET + 4
+#define SPB_BPDU_AGREEMENT_DIGEST_OFFSET  SPB_BPDU_AGREEMENT_RES2_OFFSET + 4
+
+
 static void
 stp_print_mstp_bpdu(const struct stp_bpdu_ *stp_bpdu, u_int length)
 {
-    const u_char    *ptr;
+    const u_char *ptr;
     u_int16_t	    v3len;
     u_int16_t	    len;
     u_int16_t	    msti;
-    u_int16_t	    offset;
+    u_int	    offset;
 
     ptr = (const u_char *)stp_bpdu;
-    printf(", CIST Flags [%s]",
-           bittok2str(stp_bpdu_flag_values, "none", stp_bpdu->flags));
+    printf(", CIST Flags [%s], length %u",
+           bittok2str(stp_bpdu_flag_values, "none", stp_bpdu->flags), length);
 
     /*
-     * in non-verbose mode just print the flags. We dont read that much
-     * of the packet (DEFAULT_SNAPLEN) to print out cist bridge-id
+     * in non-verbose mode just print the flags.
      */
     if (!vflag) {
         return;
     }
 
-    printf(", CIST bridge-id %s.%04x, length %u",
-           stp_print_bridge_id(ptr + MST_BPDU_CIST_BRIDGE_ID_OFFSET),
-           EXTRACT_16BITS(&stp_bpdu->port_id), length);
+    printf("\n\tport-role %s, ",
+           tok2str(rstp_obj_port_role_values, "Unknown",
+                   RSTP_EXTRACT_PORT_ROLE(stp_bpdu->flags)));
 
+    printf("CIST root-id %s, CIST ext-pathcost %u ",
+           stp_print_bridge_id((const u_char *)&stp_bpdu->root_id),
+           EXTRACT_32BITS(&stp_bpdu->root_path_cost));
+
+    printf("\n\tCIST regional-root-id %s, ",
+           stp_print_bridge_id((const u_char *)&stp_bpdu->bridge_id));
+
+    printf("CIST port-id %04x, ", EXTRACT_16BITS(&stp_bpdu->port_id));
 
     printf("\n\tmessage-age %.2fs, max-age %.2fs"
            ", hello-time %.2fs, forwarding-delay %.2fs",
@@ -225,27 +273,23 @@
            (float)EXTRACT_16BITS(&stp_bpdu->hello_time) / STP_TIME_BASE,
            (float)EXTRACT_16BITS(&stp_bpdu->forward_delay) / STP_TIME_BASE);
 
-    printf("\n\tCIST root-id %s, ext-pathcost %u int-pathcost %u",
-           stp_print_bridge_id((const u_char *)&stp_bpdu->root_id),
-           EXTRACT_32BITS(&stp_bpdu->root_path_cost),
-           EXTRACT_32BITS(ptr + MST_BPDU_CIST_INT_PATH_COST_OFFSET));
+    printf ("\n\tv3len %d, ", EXTRACT_16BITS(ptr + MST_BPDU_VER3_LEN_OFFSET));
+    printf("MCID Name %s, rev %u, "
+            "\n\t\tdigest %08x%08x%08x%08x, ",
+            ptr + MST_BPDU_CONFIG_NAME_OFFSET,
+	          EXTRACT_16BITS(ptr + MST_BPDU_CONFIG_NAME_OFFSET + 32),
+      	    EXTRACT_32BITS(ptr + MST_BPDU_CONFIG_DIGEST_OFFSET),
+        	  EXTRACT_32BITS(ptr + MST_BPDU_CONFIG_DIGEST_OFFSET + 4),
+	          EXTRACT_32BITS(ptr + MST_BPDU_CONFIG_DIGEST_OFFSET + 8),
+	          EXTRACT_32BITS(ptr + MST_BPDU_CONFIG_DIGEST_OFFSET + 12));
 
-    printf(", port-role %s",
-           tok2str(rstp_obj_port_role_values, "Unknown",
-                   RSTP_EXTRACT_PORT_ROLE(stp_bpdu->flags)));
+    printf ("CIST int-root-pathcost %u, ", 
+            EXTRACT_32BITS(ptr + MST_BPDU_CIST_INT_PATH_COST_OFFSET));  
 
-    printf("\n\tCIST regional-root-id %s",
-           stp_print_bridge_id((const u_char *)&stp_bpdu->bridge_id));
+    printf("\n\tCIST bridge-id %s, ",
+           stp_print_bridge_id(ptr + MST_BPDU_CIST_BRIDGE_ID_OFFSET));
 
-    printf("\n\tMSTP Configuration Name %s, revision %u, digest %08x%08x%08x%08x",
-           ptr + MST_BPDU_CONFIG_NAME_OFFSET,
-	   EXTRACT_16BITS(ptr + MST_BPDU_CONFIG_NAME_OFFSET + 32),
-	   EXTRACT_32BITS(ptr + MST_BPDU_CONFIG_DIGEST_OFFSET),
-	   EXTRACT_32BITS(ptr + MST_BPDU_CONFIG_DIGEST_OFFSET + 4),
-	   EXTRACT_32BITS(ptr + MST_BPDU_CONFIG_DIGEST_OFFSET + 8),
-	   EXTRACT_32BITS(ptr + MST_BPDU_CONFIG_DIGEST_OFFSET + 12));
-
-    printf("\n\tCIST remaining-hops %d", ptr[MST_BPDU_CIST_REMAIN_HOPS_OFFSET]);
+    printf("CIST remaining-hops %d", ptr[MST_BPDU_CIST_REMAIN_HOPS_OFFSET]);
 
     /* Dump all MSTI's */
     v3len = EXTRACT_16BITS(ptr + MST_BPDU_VER3_LEN_OFFSET);
@@ -277,14 +321,57 @@
     }
 }
 
+static void
+stp_print_spb_bpdu(const struct stp_bpdu_ *stp_bpdu, u_int offset)
+{
+    const u_char *ptr;
+
+    /*
+     * in non-verbose mode don't print anything.
+     */
+    if (!vflag) {
+        return;
+    }
+
+    ptr = (const u_char *)stp_bpdu;
+    printf("\n\tv4len %d AUXMCID Name %s, Rev %u, \n\t\tdigest %08x%08x%08x%08x",
+            EXTRACT_16BITS (ptr + offset),
+            ptr + offset + SPB_BPDU_CONFIG_NAME_OFFSET,
+            EXTRACT_16BITS(ptr + offset + SPB_BPDU_CONFIG_REV_OFFSET),
+            EXTRACT_32BITS(ptr + offset + SPB_BPDU_CONFIG_DIGEST_OFFSET),
+            EXTRACT_32BITS(ptr + offset + SPB_BPDU_CONFIG_DIGEST_OFFSET + 4),
+            EXTRACT_32BITS(ptr + offset + SPB_BPDU_CONFIG_DIGEST_OFFSET + 8),
+            EXTRACT_32BITS(ptr + offset + SPB_BPDU_CONFIG_DIGEST_OFFSET + 12));
+     
+    printf("\n\tAgreement num %d, Discarded Agreement num %d, Agreement valid-"
+            "flag %d, \n\tRestricted role-flag: %d, Format id %d cap %d, "
+            "Convention id %d cap %d, \n\tEdge count %d, "
+            "Agreement digest %08x%08x%08x%08x%08x\n",
+            ptr[offset + SPB_BPDU_AGREEMENT_OFFSET]>>6, 
+            ptr[offset + SPB_BPDU_AGREEMENT_OFFSET]>>4 & 0x3,
+            ptr[offset + SPB_BPDU_AGREEMENT_OFFSET]>>3 & 0x1,
+            ptr[offset + SPB_BPDU_AGREEMENT_OFFSET]>>2 & 0x1,
+            ptr[offset + SPB_BPDU_AGREEMENT_FORMAT_OFFSET]>>4,
+            ptr[offset + SPB_BPDU_AGREEMENT_FORMAT_OFFSET]&0x00ff,
+            ptr[offset + SPB_BPDU_AGREEMENT_CON_OFFSET]>>4,
+            ptr[offset + SPB_BPDU_AGREEMENT_CON_OFFSET]&0x00ff,
+            EXTRACT_16BITS(ptr + offset + SPB_BPDU_AGREEMENT_EDGE_OFFSET),
+            EXTRACT_32BITS(ptr + offset + SPB_BPDU_AGREEMENT_DIGEST_OFFSET),
+            EXTRACT_32BITS(ptr + offset + SPB_BPDU_AGREEMENT_DIGEST_OFFSET)+4,
+            EXTRACT_32BITS(ptr + offset + SPB_BPDU_AGREEMENT_DIGEST_OFFSET)+8,
+            EXTRACT_32BITS(ptr + offset + SPB_BPDU_AGREEMENT_DIGEST_OFFSET)+12,
+            EXTRACT_32BITS(ptr + offset + SPB_BPDU_AGREEMENT_DIGEST_OFFSET)+16);
+}
+
 /*
- * Print 802.1d / 802.1w / 802.1q (mstp) packets.
+ * Print 802.1d / 802.1w / 802.1q (mstp) / 802.1aq (spb) packets.
  */
 void
 stp_print(const u_char *p, u_int length)
 {
     const struct stp_bpdu_ *stp_bpdu;
-    u_int16_t              mstp_len;
+    u_int                  mstp_len;
+    u_int                  spb_len;
     
     stp_bpdu = (struct stp_bpdu_*)p;
 
@@ -304,6 +391,7 @@
     case STP_PROTO_REGULAR:
     case STP_PROTO_RAPID:
     case STP_PROTO_MSTP:
+    case STP_PROTO_SPB:
         break;
     default:
         return;
@@ -326,14 +414,17 @@
                 goto trunc;
             }
             stp_print_config_bpdu(stp_bpdu, length);
-        } else if (stp_bpdu->protocol_version == STP_PROTO_MSTP) {
+        } else if (stp_bpdu->protocol_version == STP_PROTO_MSTP ||
+                   stp_bpdu->protocol_version == STP_PROTO_SPB) {
             if (length < STP_BPDU_MSTP_MIN_LEN) {
                 goto trunc;
             }
+
             if (stp_bpdu->v1_length != 0) {
                 /* FIX ME: Emit a message here ? */
                 goto trunc;
             }
+
             /* Validate v3 length */
             mstp_len = EXTRACT_16BITS(p + MST_BPDU_VER3_LEN_OFFSET);
             mstp_len += 2;  /* length encoding itself is 2 bytes */
@@ -341,6 +432,18 @@
                 goto trunc;
             }
             stp_print_mstp_bpdu(stp_bpdu, length);
+
+            if (stp_bpdu->protocol_version == STP_PROTO_SPB)
+            {
+              /* Validate v4 length */
+              spb_len = EXTRACT_16BITS (p + MST_BPDU_VER3_LEN_OFFSET + mstp_len);
+              spb_len += 2;
+              if (length < (sizeof(struct stp_bpdu_) + mstp_len + spb_len) ||
+                  spb_len < SPB_BPDU_MIN_LEN) {
+                goto trunc;
+              }
+              stp_print_spb_bpdu(stp_bpdu, (sizeof(struct stp_bpdu_) + mstp_len));
+            }
         }
         break;
 
diff --git a/print-sunatm.c b/print-sunatm.c
index acd38bf..e6f19e8 100644
--- a/print-sunatm.c
+++ b/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/print-sunrpc.c b/print-sunrpc.c
index 03e28a4..195825d 100644
--- a/print-sunrpc.c
+++ b/print-sunrpc.c
@@ -21,21 +21,36 @@
 
 #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
 #include "config.h"
 #endif
 
+/*
+ * At least on HP-UX:
+ *
+ *	1) getrpcbynumber() is declared in <netdb.h>, not any of the RPC
+ *	   header files
+ *
+ * and
+ *
+ *	2) if _XOPEN_SOURCE_EXTENDED is defined, <netdb.h> doesn't declare
+ *	   it
+ *
+ * so we undefine it.
+ */
+#undef _XOPEN_SOURCE_EXTENDED
+
 #include <tcpdump-stdinc.h>
 
-#ifdef HAVE_GETRPCBYNUMBER
+#if defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H)
 #include <rpc/rpc.h>
 #ifdef HAVE_RPC_RPCENT_H
 #include <rpc/rpcent.h>
 #endif /* HAVE_RPC_RPCENT_H */
-#endif /* HAVE_GETRPCBYNUMBER */
+#endif /* defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H) */
 
 #include <stdio.h>
 #include <string.h>
@@ -53,7 +68,7 @@
 #include "rpc_msg.h"
 #include "pmap_prot.h"
 
-static struct tok proc2str[] = {
+static const struct tok proc2str[] = {
 	{ SUNRPC_PMAPPROC_NULL,		"null" },
 	{ SUNRPC_PMAPPROC_SET,		"set" },
 	{ SUNRPC_PMAPPROC_UNSET,	"unset" },
@@ -136,7 +151,7 @@
 progstr(prog)
 	u_int32_t prog;
 {
-#ifdef HAVE_GETRPCBYNUMBER
+#if defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H)
 	register struct rpcent *rp;
 #endif
 	static char buf[32];
@@ -144,12 +159,12 @@
 
 	if (lastprog != 0 && prog == lastprog)
 		return (buf);
-#ifdef HAVE_GETRPCBYNUMBER
+#if defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H)
 	rp = getrpcbynumber(prog);
 	if (rp == NULL)
 #endif
 		(void) snprintf(buf, sizeof(buf), "#%u", prog);
-#ifdef HAVE_GETRPCBYNUMBER
+#if defined(HAVE_GETRPCBYNUMBER) && defined(HAVE_RPC_RPC_H)
 	else
 		strlcpy(buf, rp->r_name, sizeof(buf));
 #endif
diff --git a/print-symantec.c b/print-symantec.c
index eb72180..8b4ee38 100644
--- a/print-symantec.c
+++ b/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
@@ -33,6 +33,7 @@
 #include <pcap.h>
 
 #include "interface.h"
+#include "extract.h"
 #include "addrtoname.h"
 #include "ethertype.h"
 
@@ -52,7 +53,7 @@
 
 	sp = (const struct symantec_header *)bp;
 
-	etype = ntohs(sp->ether_type);
+	etype = EXTRACT_16BITS(&sp->ether_type);
 	if (!qflag) {
 	        if (etype <= ETHERMTU)
 		          (void)printf("invalid ethertype %u", etype);
@@ -83,7 +84,6 @@
 	u_int caplen = h->caplen;
 	struct symantec_header *sp;
 	u_short ether_type;
-	u_short extracted_ether_type;
 
 	if (caplen < sizeof (struct symantec_header)) {
 		printf("[|symantec]");
@@ -98,7 +98,7 @@
 	sp = (struct symantec_header *)p;
 	p += sizeof (struct symantec_header);
 
-	ether_type = ntohs(sp->ether_type);
+	ether_type = EXTRACT_16BITS(&sp->ether_type);
 
 	if (ether_type <= ETHERMTU) {
 		/* ether_type not known, print raw packet */
@@ -107,8 +107,7 @@
 
 		if (!suppress_default_print)
 			default_print(p, caplen);
-	} else if (ether_encap_print(ether_type, p, length, caplen,
-	    &extracted_ether_type) == 0) {
+	} else if (ethertype_print(gndo, ether_type, p, length, caplen) == 0) {
 		/* ether_type not known, print raw packet */
 		if (!eflag)
 			symantec_hdr_print((u_char *)sp, length + sizeof (struct symantec_header));
diff --git a/print-syslog.c b/print-syslog.c
old mode 100755
new mode 100644
index 099d027..f213cf2
--- a/print-syslog.c
+++ b/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
@@ -30,9 +30,8 @@
 
 #include "interface.h"
 #include "extract.h"
-#include "addrtoname.h"
 
-/* 
+/*
  * tokenlists and #defines taken from Ethereal - Network traffic analyzer
  * by Gerald Combs <gerald@ethereal.com>
  */
@@ -94,31 +93,22 @@
      * severity and facility values
      */
 
-    if (!TTEST2(*pptr, 1))
-        goto trunc;
-
+    TCHECK2(*pptr, 1);
     if (*(pptr+msg_off) == '<') {
         msg_off++;
-
-        if (!TTEST2(*(pptr+msg_off), 1))
-            goto trunc;
-
+        TCHECK2(*(pptr+msg_off), 1);
         while ( *(pptr+msg_off) >= '0' &&
                 *(pptr+msg_off) <= '9' &&
                 msg_off <= SYSLOG_MAX_DIGITS) {
-
-            if (!TTEST2(*(pptr+msg_off), 1))
-                goto trunc;
-
             pri = pri * 10 + (*(pptr+msg_off) - '0');
             msg_off++;
-
-            if (!TTEST2(*(pptr+msg_off), 1))
-                goto trunc;
-
-        if (*(pptr+msg_off) == '>')
-            msg_off++;
+            TCHECK2(*(pptr+msg_off), 1);
         }
+        if (*(pptr+msg_off) != '>') {
+            printf("[|syslog]");
+            return;
+        }
+        msg_off++;
     } else {
         printf("[|syslog]");
         return;
@@ -127,7 +117,6 @@
     facility = (pri & SYSLOG_FACILITY_MASK) >> 3;
     severity = pri & SYSLOG_SEVERITY_MASK;
 
-    
     if (vflag < 1 )
     {
         printf("SYSLOG %s.%s, length: %u",
@@ -136,7 +125,7 @@
                len);
         return;
     }
-       
+
     printf("SYSLOG, length: %u\n\tFacility %s (%u), Severity %s (%u)\n\tMsg: ",
            len,
            tok2str(syslog_facility_values, "unknown (%u)", facility),
@@ -146,16 +135,13 @@
 
     /* print the syslog text in verbose mode */
     for (; msg_off < len; msg_off++) {
-        if (!TTEST2(*(pptr+msg_off), 1))
-            goto trunc;
-        safeputchar(*(pptr+msg_off));        
+        TCHECK2(*(pptr+msg_off), 1);
+        safeputchar(*(pptr+msg_off));
     }
 
-    if (vflag > 1) {
-        if(!print_unknown_data(pptr,"\n\t",len))
-            return;
-    }
-    
+    if (vflag > 1)
+        print_unknown_data(pptr,"\n\t",len);
+
     return;
 
 trunc:
diff --git a/print-tcp.c b/print-tcp.c
index 11bd6b7..4b807c9 100644
--- a/print-tcp.c
+++ b/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.135 2008-11-09 23:35:03 mcr Exp $ (LBL)";
+#else
+__RCSID("$NetBSD: print-tcp.c,v 1.8 2007/07/24 11:53:48 drochner Exp $");
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -54,13 +58,10 @@
 
 #ifdef HAVE_LIBCRYPTO
 #include <openssl/md5.h>
-
-#define SIGNATURE_VALID		0
-#define SIGNATURE_INVALID	1
-#define CANT_CHECK_SIGNATURE	2
+#include <signature.h>
 
 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);
@@ -69,629 +70,680 @@
 
 
 struct tha {
-#ifndef INET6
-	struct in_addr src;
-	struct in_addr dst;
-#else
-	struct in6_addr src;
-	struct in6_addr dst;
-#endif /*INET6*/
-	u_int port;
+        struct in_addr src;
+        struct in_addr dst;
+        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;
 };
 
+#ifdef INET6
+struct tha6 {
+        struct in6_addr src;
+        struct in6_addr dst;
+        u_int port;
+};
+
+struct tcp_seq_hash6 {
+        struct tcp_seq_hash6 *nxt;
+        struct tha6 addr;
+        tcp_seq seq;
+        tcp_seq ack;
+};
+#endif
+
 #define TSEQ_HASHSIZE 919
 
 /* These tcp optinos do not have the size octet */
 #define ZEROLENOPT(o) ((o) == TCPOPT_EOL || (o) == TCPOPT_NOP)
 
-static struct tcp_seq_hash tcp_seq_hash[TSEQ_HASHSIZE];
+static struct tcp_seq_hash tcp_seq_hash4[TSEQ_HASHSIZE];
+#ifdef INET6
+static struct tcp_seq_hash6 tcp_seq_hash6[TSEQ_HASHSIZE];
+#endif
 
+static const 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
+static const 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" },
+        { TCPOPT_UTO, "uto" },
+        { TCPOPT_MPTCP, "mptcp" },
+        { TCPOPT_EXPERIMENT2, "exp" },
+        { 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]);
+	return (nextproto4_cksum(ip, (const u_int8_t *)tp, len,
+	    IPPROTO_TCP));
 }
 
-#ifdef INET6
-static int tcp6_cksum(const struct ip6_hdr *ip6, const struct tcphdr *tp,
-	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);
-}
-#endif
-
 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;
+        u_int utoval;
+        u_int16_t magic;
+        register int rev;
 #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;
-		}
-	}
 #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 (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;
-	}
+        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);
+        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);
+        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 (qflag) {
+                (void)printf("tcp %d", length - hlen);
+                if (hlen > length) {
+                        (void)printf(" [bad hdr length %u - too long, > %u]",
+                                     hlen, length);
+                }
+                return;
+        }
 
-	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).
-		 */
+        flags = tp->th_flags;
+        printf("Flags [%s]", bittok2str_nosep(tcp_flag_values, "none", flags));
+
+        if (!Sflag && (flags & TH_ACK)) {
+                /*
+                 * 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).
+                 */
+                rev = 0;
 #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;
-			}
-		}
-#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;
-		}
-#endif
+                if (ip6) {
+                        register struct tcp_seq_hash6 *th;
+                        struct tcp_seq_hash6 *tcp_seq_hash;
+                        const struct in6_addr *src, *dst;
+                        struct tha6 tha;
 
-		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;
+                        tcp_seq_hash = tcp_seq_hash6;
+                        src = &ip6->ip6_src;
+                        dst = &ip6->ip6_dst;
+                        if (sport > dport)
+                                rev = 1;
+                        else if (sport == dport) {
+                                if (UNALIGNED_MEMCMP(src, dst, sizeof ip6->ip6_dst) > 0)
+                                        rev = 1;
+                        }
+                        if (rev) {
+                                UNALIGNED_MEMCPY(&tha.src, dst, sizeof ip6->ip6_dst);
+                                UNALIGNED_MEMCPY(&tha.dst, src, sizeof ip6->ip6_src);
+                                tha.port = dport << 16 | sport;
+                        } else {
+                                UNALIGNED_MEMCPY(&tha.dst, dst, sizeof ip6->ip6_dst);
+                                UNALIGNED_MEMCPY(&tha.src, src, sizeof ip6->ip6_src);
+                                tha.port = sport << 16 | dport;
+                        }
 
-		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;
-		}
+                        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;
 
-		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 (!th->nxt || (flags & TH_SYN)) {
+                                /* didn't find it or new conversation */
+                                if (th->nxt == NULL) {
+                                        th->nxt = (struct tcp_seq_hash6 *)
+                                                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;
+                        }
 
-	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);
+                        thseq = th->seq;
+                        thack = th->ack;
+                } else {
+#else  /*INET6*/
+                {
+#endif /*INET6*/
+                        register struct tcp_seq_hash *th;
+                        struct tcp_seq_hash *tcp_seq_hash;
+                        const struct in_addr *src, *dst;
+                        struct tha tha;
 
-                        (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),");
-		}
-	}
+                        tcp_seq_hash = tcp_seq_hash4;
+                        src = &ip->ip_src;
+                        dst = &ip->ip_dst;
+                        if (sport > dport)
+                                rev = 1;
+                        else if (sport == dport) {
+                                if (UNALIGNED_MEMCMP(src, dst, sizeof ip->ip_dst) > 0)
+                                        rev = 1;
+                        }
+                        if (rev) {
+                                UNALIGNED_MEMCPY(&tha.src, dst, sizeof ip->ip_dst);
+                                UNALIGNED_MEMCPY(&tha.dst, src, sizeof ip->ip_src);
+                                tha.port = dport << 16 | sport;
+                        } else {
+                                UNALIGNED_MEMCPY(&tha.dst, dst, sizeof ip->ip_dst);
+                                UNALIGNED_MEMCPY(&tha.src, src, sizeof ip->ip_src);
+                                tha.port = sport << 16 | dport;
+                        }
+
+                        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 = rev = 0;
+        }
+        if (hlen > length) {
+                (void)printf(" [bad hdr length %u - too long, > %u]",
+                             hlen, length);
+                return;
+        }
+
+        if (vflag && !Kflag && !fragmented) {
+                /* Check the checksum, if possible. */
+                u_int16_t sum, tcp_sum;
+
+                if (IP_V(ip) == 4) {
+                        if (TTEST2(tp->th_sport, length)) {
+                                sum = tcp_cksum(ip, tp, length);
+                                tcp_sum = EXTRACT_16BITS(&tp->th_sum);
+
+                                (void)printf(", cksum 0x%04x", tcp_sum);
+                                if (sum != 0)
+                                        (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);
-                        (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),");
+                else if (IP_V(ip) == 6 && ip6->ip6_plen) {
+                        if (TTEST2(tp->th_sport, length)) {
+                                sum = nextproto6_cksum(ip6, (const u_int8_t *)tp, length, IPPROTO_TCP);
+                                tcp_sum = EXTRACT_16BITS(&tp->th_sum);
 
-		}
-	}
+                                (void)printf(", cksum 0x%04x", tcp_sum);
+                                if (sum != 0)
+                                        (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);
+        length -= hlen;
+        if (vflag > 1 || length > 0 || flags & (TH_SYN | TH_FIN | TH_RST)) {
+                (void)printf(", seq %u", seq);
 
-	(void)printf(" win %d", win);
+                if (length > 0) {
+                        (void)printf(":%u", seq + length);
+                }
+        }
 
-	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;
+        if (flags & TH_ACK) {
+                (void)printf(", ack %u", ack);
+        }
 
-		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;
+        (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));
+                        printf("%s", tok2str(tcp_option_values, "unknown-%u", opt));
 
-				break;
+                        switch (opt) {
 
-			case TCPOPT_EOL:
-				(void)printf("eol");
-				break;
+                        case TCPOPT_MAXSEG:
+                                datalen = 2;
+                                LENCHECK(datalen);
+                                (void)printf(" %u", EXTRACT_16BITS(cp));
+                                break;
 
-			case TCPOPT_NOP:
-				(void)printf("nop");
-				break;
+                        case TCPOPT_WSCALE:
+                                datalen = 1;
+                                LENCHECK(datalen);
+                                (void)printf(" %u", *cp);
+                                break;
 
-			case TCPOPT_WSCALE:
-				(void)printf("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;
 
-			case TCPOPT_SACKOK:
-				(void)printf("sackOK");
-				break;
+                                        (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 (rev) {
+                                                        s -= thseq;
+                                                        e -= thseq;
+                                                } else {
+                                                        s -= thack;
+                                                        e -= thack;
+                                                }
+                                                (void)printf("{%u:%u}", s, e);
+                                        }
+                                }
+                                break;
 
-			case TCPOPT_SACK:
-				datalen = len - 2;
-				if (datalen % 8 != 0) {
-					(void)printf("malformed sack");
-				} else {
-					u_int32_t s, e;
+                        case TCPOPT_CC:
+                        case TCPOPT_CCNEW:
+                        case TCPOPT_CCECHO:
+                        case TCPOPT_ECHO:
+                        case TCPOPT_ECHOREPLY:
 
-					(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;
+                                /*
+                                 * those options share their semantics.
+                                 * fall through
+                                 */
+                                datalen = 4;
+                                LENCHECK(datalen);
+                                (void)printf(" %u", EXTRACT_32BITS(cp));
+                                break;
 
-			case TCPOPT_ECHO:
-				(void)printf("echo");
-				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_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);
+                        case TCPOPT_SIGNATURE:
+                                datalen = TCP_SIGLEN;
+                                LENCHECK(datalen);
 #ifdef HAVE_LIBCRYPTO
-				switch (tcp_verify_signature(ip, tp,
-				    bp + TH_OFF(tp) * 4, length, cp)) {
+                                switch (tcp_verify_signature(ip, tp,
+                                                             bp + TH_OFF(tp) * 4, length, cp)) {
 
-				case SIGNATURE_VALID:
-					(void)printf("valid");
-					break;
+                                case SIGNATURE_VALID:
+                                        (void)printf("valid");
+                                        break;
 
-				case SIGNATURE_INVALID:
-					(void)printf("invalid");
-					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;
-				}
+                                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;
+                                break;
 
-			default:
-				(void)printf("opt-%u:", opt);
-				datalen = len - 2;
-				for (i = 0; i < datalen; ++i) {
-					LENCHECK(i);
-					(void)printf("%02x", cp[i]);
-				}
-				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;
 
-			/* 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('>');
-	}
+                        case TCPOPT_EOL:
+                        case TCPOPT_NOP:
+                        case TCPOPT_SACKOK:
+                                /*
+                                 * Nothing interesting.
+                                 * fall through
+                                 */
+                                break;
 
-	if (length <= 0)
-		return;
+                        case TCPOPT_UTO:
+                                datalen = 2;
+                                LENCHECK(datalen);
+                                utoval = EXTRACT_16BITS(cp);
+                                (void)printf("0x%x", utoval);
+                                if (utoval & 0x0001)
+                                        utoval = (utoval >> 1) * 60;
+                                else
+                                        utoval >>= 1;
+                                (void)printf(" %u", utoval);
+                                break;
 
-	/*
-	 * 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);
+                        case TCPOPT_MPTCP:
+                                datalen = len - 2;
+                                LENCHECK(datalen);
+                                if (!mptcp_print(cp-2, len, flags))
+                                        goto bad;
+                                break;
+
+                        case TCPOPT_EXPERIMENT2:
+                                datalen = len - 2;
+                                LENCHECK(datalen);
+                                if (datalen < 2)
+                                        goto bad;
+                                /* RFC6994 */
+                                magic = EXTRACT_16BITS(cp);
+                                (void)printf("-");
+
+                                switch(magic) {
+
+                                case 0xf989:
+                                        /* TCP Fast Open: draft-ietf-tcpm-fastopen-04 */
+                                        if (datalen == 2) {
+                                                /* Fast Open Cookie Request */
+                                                (void)printf("tfo cookiereq");
+                                        } else {
+                                                /* Fast Open Cookie */
+                                                if (datalen % 2 != 0 || datalen < 6 || datalen > 18) {
+                                                        (void)printf("tfo malformed");
+                                                } else {
+                                                        (void)printf("tfo cookie ");
+                                                        for (i = 2; i < datalen; ++i)
+                                                                (void)printf("%02x", cp[i]);
+                                                }
+                                        }
+                                        break;
+
+                                default:
+                                        /* Unknown magic number */
+                                        (void)printf("%04x", magic);
+                                        break;
+                                }
+                                break;
+
+                        default:
+                                datalen = len - 2;
+                                if (datalen)
+                                        printf(" 0x");
+                                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 (packettype) {
+                switch (packettype) {
+                case PT_ZMTP1:
+                        zmtp1_print(bp, length);
+                        break;
+                }
+                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 (sport == OPENFLOW_PORT || dport == OPENFLOW_PORT)
+                openflow_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 (sport == RPKI_RTR_PORT || dport == RPKI_RTR_PORT) {
+                rpki_rtr_print(bp, length);
+        }
+        else if (length > 0 && (sport == LDP_PORT || dport == LDP_PORT)) {
+                ldp_print(bp, length);
+        }
+        else if ((sport == NFS_PORT || dport == NFS_PORT) &&
+                 length >= 4 && TTEST2(*bp, 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.
+                 */
+                u_int32_t fraglen;
+                register struct sunrpc_msg *rp;
+                enum sunrpc_msg_type direction;
+
+                fraglen = EXTRACT_32BITS(bp) & 0x7FFFFFFF;
+                if (fraglen > (length) - 4)
+                        fraglen = (length) - 4;
+                rp = (struct sunrpc_msg *)(bp + 4);
+                if (TTEST(rp->rm_direction)) {
+                        direction = (enum sunrpc_msg_type)EXTRACT_32BITS(&rp->rm_direction);
+                        if (dport == NFS_PORT && direction == SUNRPC_CALL) {
+                                (void)printf(": NFS request xid %u ", EXTRACT_32BITS(&rp->rm_xid));
+                                nfsreq_print_noaddr((u_char *)rp, fraglen, (u_char *)ip);
+                                return;
+                        }
+                        if (sport == NFS_PORT && direction == SUNRPC_REPLY) {
+                                (void)printf(": NFS reply xid %u ", EXTRACT_32BITS(&rp->rm_xid));
+                                nfsreply_print_noaddr((u_char *)rp, fraglen, (u_char *)ip);
+                                return;
+                        }
+                }
+        }
+
+        return;
+ bad:
+        fputs("[bad opt]", stdout);
+        if (ch != '\0')
+                putchar('>');
+        return;
+ trunc:
+        fputs("[|tcp]", stdout);
+        if (ch != '\0')
+                putchar('>');
 }
 
 /*
@@ -712,96 +764,118 @@
 static void
 print_tcp_rst_data(register const u_char *sp, u_int length)
 {
-	int c;
+        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(']');
+        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
+USES_APPLE_DEPRECATED_API
 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)
+	if (data + length > snapend) {
+		printf("snaplen too short, ");
 		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 (sigsecret == NULL) {
+		printf("shared secret not supplied with -M, ");
+                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(EXTRACT_16BITS(&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);
+        } else {
+#ifdef INET6
+		printf("IP version not 4 or 6, ");
+#else
+		printf("IP version not 4, ");
+#endif
+                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);
+        /*
+         * 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, sigsecret, strlen(sigsecret));
+        MD5_Final(sig, &ctx);
 
-	if (memcmp(rcvsig, sig, TCP_SIGLEN) == 0)
-		return (SIGNATURE_VALID);
-	else
-		return (SIGNATURE_INVALID);
+        if (memcmp(rcvsig, sig, TCP_SIGLEN) == 0)
+                return (SIGNATURE_VALID);
+        else
+                return (SIGNATURE_INVALID);
 }
+USES_APPLE_RST
 #endif /* HAVE_LIBCRYPTO */
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 8
+ * End:
+ */
diff --git a/print-telnet.c b/print-telnet.c
index 7888727..4911e5c 100644
--- a/print-telnet.c
+++ b/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/print-tftp.c b/print-tftp.c
index b517898..62e2c99 100644
--- a/print-tftp.c
+++ b/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.39 2008-04-11 16:47:38 gianluca Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -45,18 +45,18 @@
 #include "tftp.h"
 
 /* op code to string mapping */
-static struct tok op2str[] = {
+static const struct tok op2str[] = {
 	{ RRQ,		"RRQ" },	/* read request */
 	{ 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 }
 };
 
 /* error code to string mapping */
-static struct tok err2str[] = {
+static const struct tok err2str[] = {
 	{ EUNDEF,	"EUNDEF" },	/* not defined */
 	{ ENOTFOUND,	"ENOTFOUND" },	/* file not found */
 	{ EACCESS,	"EACCESS" },	/* access violation */
@@ -99,15 +99,7 @@
 	case RRQ:
 	case WRQ:
 	case OACK:
-		/*
-		 * XXX Not all arpa/tftp.h's specify th_stuff as any
-		 * array; use address of th_block instead
-		 */
-#ifdef notdef
 		p = (u_char *)tp->th_stuff;
-#else
-		p = (u_char *)&tp->th_block;
-#endif
 		putchar(' ');
 		/* Print filename or first option */
 		if (opcode != OACK)
@@ -137,7 +129,7 @@
 		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/print-timed.c b/print-timed.c
index 3df2241..55fbb39 100644
--- a/print-timed.c
+++ b/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/print-tipc.c b/print-tipc.c
new file mode 100644
index 0000000..8f2f769
--- /dev/null
+++ b/print-tipc.c
@@ -0,0 +1,392 @@
+/*
+ * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
+ *	The Regents of the University of California.  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 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.
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+    "@(#) $Header: /tcpdump/master/tcpdump/print-arp.c,v 1.66 2006-03-03 22:53:21 hannes Exp $ (LBL)";
+#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 "ether.h"
+#include "ethertype.h"
+#include "extract.h"			/* must come after interface.h */
+
+/*
+ * Transparent Inter-Process Communication (TIPC) protocol.
+ *
+ *	http://tipc.sourceforge.net/doc/draft-spec-tipc-07.html
+ *	http://tipc.sourceforge.net/doc/tipc_message_formats.html
+ */
+
+#define TIPC_USER_LOW_IMPORTANCE	0
+#define TIPC_USER_MEDIUM_IMPORTANCE	1
+#define TIPC_USER_HIGH_IMPORTANCE	2
+#define TIPC_USER_CRITICAL_IMPORTANCE	3
+#define TIPC_USER_BCAST_PROTOCOL	5
+#define TIPC_USER_MSG_BUNDLER		6
+#define TIPC_USER_LINK_PROTOCOL		7
+#define TIPC_USER_CONN_MANAGER		8
+#define TIPC_USER_CHANGEOVER_PROTOCOL	10
+#define TIPC_USER_NAME_DISTRIBUTOR	11
+#define TIPC_USER_MSG_FRAGMENTER	12
+#define TIPC_USER_LINK_CONFIG		13
+
+#define TIPC_CONN_MSG			0
+#define TIPC_DIRECT_MSG			1
+#define TIPC_NAMED_MSG			2
+#define TIPC_MCAST_MSG			3
+
+#define TIPC_ZONE(addr)		(((addr) >> 24) & 0xFF)
+#define TIPC_CLUSTER(addr)	(((addr) >> 12) & 0xFFF)
+#define TIPC_NODE(addr)		(((addr) >> 0) & 0xFFF)
+
+struct tipc_pkthdr {
+	u_int32_t w0;
+	u_int32_t w1;
+};
+
+#define TIPC_VER(w0)		(((w0) >> 29) & 0x07)
+#define TIPC_USER(w0)		(((w0) >> 25) & 0x0F)
+#define TIPC_HSIZE(w0)		(((w0) >> 21) & 0x0F)
+#define TIPC_MSIZE(w0)		(((w0) >> 0) & 0xFFFF)
+#define TIPC_MTYPE(w1)		(((w1) >> 29) & 0x07)
+#define TIPC_BROADCAST_ACK(w1)	(((w1) >> 0) & 0xFFFF)
+#define TIPC_LINK_ACK(w2)	(((w2) >> 16) & 0xFFFF)
+#define TIPC_LINK_SEQ(w2)	(((w2) >> 0) & 0xFFFF)
+
+static const struct tok tipcuser_values[] = {
+    { TIPC_USER_LOW_IMPORTANCE,      "Low Importance Data payload" },
+    { TIPC_USER_MEDIUM_IMPORTANCE,   "Medium Importance Data payload" },
+    { TIPC_USER_HIGH_IMPORTANCE,     "High Importance Data payload" },
+    { TIPC_USER_CRITICAL_IMPORTANCE, "Critical Importance Data payload" },
+    { TIPC_USER_BCAST_PROTOCOL,      "Broadcast Link Protocol internal" },
+    { TIPC_USER_MSG_BUNDLER,         "Message Bundler Protocol internal" },
+    { TIPC_USER_LINK_PROTOCOL,       "Link State Protocol internal" },
+    { TIPC_USER_CONN_MANAGER,        "Connection Manager internal" },
+    { TIPC_USER_CHANGEOVER_PROTOCOL, "Link Changeover Protocol internal" },
+    { TIPC_USER_NAME_DISTRIBUTOR,    "Name Table Update Protocol internal" },
+    { TIPC_USER_MSG_FRAGMENTER,      "Message Fragmentation Protocol internal" },
+    { TIPC_USER_LINK_CONFIG,         "Neighbor Detection Protocol internal" },
+    { 0, NULL }
+};
+
+static const struct tok tipcmtype_values[] = {
+    { TIPC_CONN_MSG,   "CONN_MSG" },
+    { TIPC_DIRECT_MSG, "MCAST_MSG" },
+    { TIPC_NAMED_MSG,  "NAMED_MSG" },
+    { TIPC_MCAST_MSG,  "DIRECT_MSG" },
+    { 0, NULL }
+};
+
+static const struct tok tipc_linkconf_mtype_values[] = {
+    { 0,   "Link request" },
+    { 1,   "Link response" },
+    { 0, NULL }
+};
+
+struct payload_tipc_pkthdr {
+	u_int32_t w0;
+	u_int32_t w1;
+	u_int32_t w2;
+	u_int32_t prev_node;
+	u_int32_t orig_port;
+	u_int32_t dest_port;
+	u_int32_t orig_node;
+	u_int32_t dest_node;
+	u_int32_t name_type;
+	u_int32_t w9;
+	u_int32_t wA;
+};
+
+struct  internal_tipc_pkthdr {
+	u_int32_t w0;
+	u_int32_t w1;
+	u_int32_t w2;
+	u_int32_t prev_node;
+	u_int32_t w4;
+	u_int32_t w5;
+	u_int32_t orig_node;
+	u_int32_t dest_node;
+	u_int32_t trans_seq;
+	u_int32_t w9;
+};
+
+#define TIPC_SEQ_GAP(w1)	(((w1) >> 16) & 0x1FFF)
+#define TIPC_BC_GAP_AFTER(w2)	(((w2) >> 16) & 0xFFFF)
+#define TIPC_BC_GAP_TO(w2)	(((w2) >> 0) & 0xFFFF)
+#define TIPC_LAST_SENT_FRAG(w4)	(((w4) >> 16) & 0xFFFF)
+#define TIPC_NEXT_SENT_FRAG(w4)	(((w4) >> 0) & 0xFFFF)
+#define TIPC_SESS_NO(w5)	(((w5) >> 16) & 0xFFFF)
+#define TIPC_MSG_CNT(w9)	(((w9) >> 16) & 0xFFFF)
+#define TIPC_LINK_TOL(w9)	(((w9) >> 0) & 0xFFFF)
+
+struct link_conf_tipc_pkthdr {
+	u_int32_t w0;
+	u_int32_t w1;
+	u_int32_t dest_domain;
+	u_int32_t prev_node;
+	u_int32_t ntwrk_id;
+	u_int32_t w5;
+	u_int8_t media_address[16];
+};
+
+#define TIPC_NODE_SIG(w1)	(((w1) >> 0) & 0xFFFF)
+#define TIPC_MEDIA_ID(w5)	(((w5) >> 0) & 0xFF)
+
+static void
+print_payload(netdissect_options *ndo, const struct payload_tipc_pkthdr *ap)
+{
+	u_int32_t w0, w1, w2;
+	u_int user;
+	u_int hsize;
+	u_int msize;
+	u_int mtype;
+	u_int broadcast_ack;
+	u_int link_ack;
+	u_int link_seq;
+	u_int prev_node;
+	u_int orig_port;
+	u_int dest_port;
+	u_int orig_node;
+	u_int dest_node;
+
+	ND_TCHECK(ap->dest_port);
+	w0 = EXTRACT_32BITS(&ap->w0);
+	user = TIPC_USER(w0);
+	hsize = TIPC_HSIZE(w0);
+	msize = TIPC_MSIZE(w0);
+	w1 = EXTRACT_32BITS(&ap->w1);
+	mtype = TIPC_MTYPE(w1);
+	prev_node = EXTRACT_32BITS(&ap->prev_node);
+	orig_port = EXTRACT_32BITS(&ap->orig_port);
+	dest_port = EXTRACT_32BITS(&ap->dest_port);
+	if (hsize <= 6) {
+		ND_PRINT((ndo, "TIPC v%u.0 %u.%u.%u:%u > %u, headerlength %u bytes, MessageSize %u bytes, %s, messageType %s",
+		    TIPC_VER(w0),
+		    TIPC_ZONE(prev_node), TIPC_CLUSTER(prev_node), TIPC_NODE(prev_node),
+		    orig_port, dest_port,
+		    hsize*4, msize,
+		    tok2str(tipcuser_values, "unknown", user),
+		    tok2str(tipcmtype_values, "Unknown", mtype)));
+	} else {
+		ND_TCHECK(ap->dest_node);
+		orig_node = EXTRACT_32BITS(&ap->orig_node);
+		dest_node = EXTRACT_32BITS(&ap->dest_node);
+		ND_PRINT((ndo, "TIPC v%u.0 %u.%u.%u:%u > %u.%u.%u:%u, headerlength %u bytes, MessageSize %u bytes, %s, messageType %s",
+		    TIPC_VER(w0),
+		    TIPC_ZONE(orig_node), TIPC_CLUSTER(orig_node), TIPC_NODE(orig_node),
+		    orig_port,
+		    TIPC_ZONE(dest_node), TIPC_CLUSTER(dest_node), TIPC_NODE(dest_node),
+		    dest_port,
+		    hsize*4, msize,
+		    tok2str(tipcuser_values, "unknown", user),
+		    tok2str(tipcmtype_values, "Unknown", mtype)));
+
+		if (ndo->ndo_vflag) {
+			broadcast_ack = TIPC_BROADCAST_ACK(w1);
+			w2 = EXTRACT_32BITS(&ap->w2);
+			link_ack = TIPC_LINK_ACK(w2);
+			link_seq = TIPC_LINK_SEQ(w2);
+			ND_PRINT((ndo, "\n\tPrevious Node %u.%u.%u, Broadcast Ack %u, Link Ack %u, Link Sequence %u",
+			    TIPC_ZONE(prev_node), TIPC_CLUSTER(prev_node), TIPC_NODE(prev_node),
+			    broadcast_ack, link_ack, link_seq));
+		}
+	}
+	return;
+
+trunc:
+	ND_PRINT((ndo, "[|TIPC]"));
+}
+	 
+static void
+print_internal(netdissect_options *ndo, const struct internal_tipc_pkthdr *ap)
+{
+	u_int32_t w0, w1, w2, w4, w5, w9;
+	u_int user;
+	u_int hsize;
+	u_int msize;
+	u_int mtype;
+	u_int seq_gap;
+	u_int broadcast_ack;
+	u_int bc_gap_after;
+	u_int bc_gap_to;
+	u_int prev_node;
+	u_int last_sent_frag;
+	u_int next_sent_frag;
+	u_int sess_no;
+	u_int orig_node;
+	u_int dest_node;
+	u_int trans_seq;
+	u_int msg_cnt;
+	u_int link_tol;
+
+	ND_TCHECK(ap->dest_node);
+	w0 = EXTRACT_32BITS(&ap->w0);
+	user = TIPC_USER(w0);
+	hsize = TIPC_HSIZE(w0);
+	msize = TIPC_MSIZE(w0);
+	w1 = EXTRACT_32BITS(&ap->w1);
+	mtype = TIPC_MTYPE(w1);
+	orig_node = EXTRACT_32BITS(&ap->orig_node);
+	dest_node = EXTRACT_32BITS(&ap->dest_node);
+	ND_PRINT((ndo, "TIPC v%u.0 %u.%u.%u > %u.%u.%u, headerlength %u bytes, MessageSize %u bytes, %s, messageType %s (0x%08x)",
+	    TIPC_VER(w0),
+	    TIPC_ZONE(orig_node), TIPC_CLUSTER(orig_node), TIPC_NODE(orig_node),
+	    TIPC_ZONE(dest_node), TIPC_CLUSTER(dest_node), TIPC_NODE(dest_node),
+	    hsize*4, msize,
+	    tok2str(tipcuser_values, "unknown", user),
+	    tok2str(tipcmtype_values, "Unknown", mtype), w1));
+
+	if (ndo->ndo_vflag) {
+		ND_TCHECK(*ap);
+		seq_gap = TIPC_SEQ_GAP(w1);
+		broadcast_ack = TIPC_BROADCAST_ACK(w1);
+		w2 = EXTRACT_32BITS(&ap->w2);
+		bc_gap_after = TIPC_BC_GAP_AFTER(w2);
+		bc_gap_to = TIPC_BC_GAP_TO(w2);
+		prev_node = EXTRACT_32BITS(&ap->prev_node);
+		w4 = EXTRACT_32BITS(&ap->w4);
+		last_sent_frag = TIPC_LAST_SENT_FRAG(w4);
+		next_sent_frag = TIPC_NEXT_SENT_FRAG(w4);
+		w5 = EXTRACT_32BITS(&ap->w5);
+		sess_no = TIPC_SESS_NO(w5);
+		trans_seq = EXTRACT_32BITS(&ap->trans_seq);
+		w9 = EXTRACT_32BITS(&ap->w9);
+		msg_cnt = TIPC_MSG_CNT(w9);
+		link_tol = TIPC_LINK_TOL(w9);
+		ND_PRINT((ndo, "\n\tPrevious Node %u.%u.%u, Session No. %u, Broadcast Ack %u, Sequence Gap %u,  Broadcast Gap After %u, Broadcast Gap To %u, Last Sent Packet No. %u, Next sent Packet No. %u, Transport Sequence %u, msg_count %u, Link Tolerance %u",
+		    TIPC_ZONE(prev_node), TIPC_CLUSTER(prev_node), TIPC_NODE(prev_node),
+		    sess_no, broadcast_ack, seq_gap, bc_gap_after, bc_gap_to,
+		    last_sent_frag, next_sent_frag, trans_seq, msg_cnt,
+		    link_tol));
+	}
+	return;
+
+trunc:
+	ND_PRINT((ndo, "[|TIPC]"));
+}
+
+static void
+print_link_conf(netdissect_options *ndo, const struct link_conf_tipc_pkthdr *ap)
+{
+	u_int32_t w0, w1, w5;
+	u_int user;
+	u_int hsize;
+	u_int msize;
+	u_int mtype;
+	u_int node_sig;
+	u_int prev_node;
+	u_int dest_domain;
+	u_int ntwrk_id;
+	u_int media_id;
+
+	ND_TCHECK(ap->prev_node);
+	w0 = EXTRACT_32BITS(&ap->w0);
+	user = TIPC_USER(w0);
+	hsize = TIPC_HSIZE(w0);
+	msize = TIPC_MSIZE(w0);
+	w1 = EXTRACT_32BITS(&ap->w1);
+	mtype = TIPC_MTYPE(w1);
+	prev_node = EXTRACT_32BITS(&ap->prev_node);
+	dest_domain = EXTRACT_32BITS(&ap->dest_domain);
+	prev_node = EXTRACT_32BITS(&ap->prev_node);
+
+	ND_PRINT((ndo, "TIPC v%u.0 %u.%u.%u > %u.%u.%u, headerlength %u bytes, MessageSize %u bytes, %s, messageType %s",
+	    TIPC_VER(w0),
+	    TIPC_ZONE(prev_node), TIPC_CLUSTER(prev_node), TIPC_NODE(prev_node),
+	    TIPC_ZONE(dest_domain), TIPC_CLUSTER(dest_domain), TIPC_NODE(dest_domain),
+	    hsize*4, msize,
+	    tok2str(tipcuser_values, "unknown", user),
+	    tok2str(tipc_linkconf_mtype_values, "Unknown", mtype)));
+	if (ndo->ndo_vflag) {
+		ND_TCHECK(ap->w5);
+		node_sig = TIPC_NODE_SIG(w1);
+		ntwrk_id = EXTRACT_32BITS(&ap->ntwrk_id);
+		w5 = EXTRACT_32BITS(&ap->w5);
+		media_id = TIPC_MEDIA_ID(w5);
+		ND_PRINT((ndo, "\n\tNodeSignature %u, network_id %u, media_id %u",
+		    node_sig, ntwrk_id, media_id));
+	}
+	return;
+
+trunc:
+	ND_PRINT((ndo, "[|TIPC]"));
+}
+
+void
+tipc_print(netdissect_options *ndo, const u_char *bp, u_int length _U_,
+    u_int caplen _U_)
+{
+	const struct tipc_pkthdr *ap;
+	u_int32_t w0;
+	u_int user;
+
+	ap = (struct tipc_pkthdr *)bp;
+	ND_TCHECK(ap->w0);
+	w0 = EXTRACT_32BITS(&ap->w0);
+	user = TIPC_USER(w0);
+
+	switch (user)
+	{
+		case TIPC_USER_LOW_IMPORTANCE:
+		case TIPC_USER_MEDIUM_IMPORTANCE:
+		case TIPC_USER_HIGH_IMPORTANCE:
+		case TIPC_USER_CRITICAL_IMPORTANCE:
+		case TIPC_USER_NAME_DISTRIBUTOR:
+		case TIPC_USER_CONN_MANAGER:
+			print_payload(ndo, (struct payload_tipc_pkthdr *)bp);
+			break;			 
+
+		case TIPC_USER_LINK_CONFIG:
+			print_link_conf(ndo, (struct link_conf_tipc_pkthdr *)bp);
+			break;
+
+		case TIPC_USER_BCAST_PROTOCOL:
+		case TIPC_USER_MSG_BUNDLER:
+		case TIPC_USER_LINK_PROTOCOL:
+		case TIPC_USER_CHANGEOVER_PROTOCOL:
+		case TIPC_USER_MSG_FRAGMENTER:
+			print_internal(ndo, (struct internal_tipc_pkthdr *)bp);
+			break;
+
+	}
+	return;
+
+trunc:
+	ND_PRINT((ndo, "[|TIPC]"));
+}
+
+/*
+ * Local Variables:
+ * c-style: bsd
+ * End:
+ */
+
diff --git a/print-token.c b/print-token.c
index 47fcca6..4f8422b 100644
--- a/print-token.c
+++ b/print-token.c
@@ -25,7 +25,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
@@ -39,6 +39,7 @@
 #include <string.h>
 
 #include "interface.h"
+#include "extract.h"
 #include "addrtoname.h"
 #include "ethertype.h"
 
@@ -126,7 +127,16 @@
 		if (eflag)
 			token_hdr_print(trp, length, ESRC(&ehdr), EDST(&ehdr));
 
+		if (caplen < TOKEN_HDRLEN + 2) {
+			printf("[|token-ring]");
+			return hdr_len;
+		}
 		route_len = RIF_LENGTH(trp);
+		hdr_len += route_len;
+		if (caplen < hdr_len) {
+			printf("[|token-ring]");
+			return hdr_len;
+		}
 		if (vflag) {
 			printf("%s ", broadcast_indicator[BROADCAST(trp)]);
 			printf("%s", direction[DIRECTION(trp)]);
@@ -135,10 +145,10 @@
 				printf(" [%d:%d]", RING_NUMBER(trp, seg),
 				    BRIDGE_NUMBER(trp, seg));
 		} else {
-			printf("rt = %x", ntohs(trp->token_rcf));
+			printf("rt = %x", EXTRACT_16BITS(&trp->token_rcf));
 
 			for (seg = 0; seg < SEGMENT_COUNT(trp); seg++)
-				printf(":%x", ntohs(trp->token_rseg[seg]));
+				printf(":%x", EXTRACT_16BITS(&trp->token_rseg[seg]));
 		}
 		printf(" (%s) ", largest_frame[LARGEST_FRAME(trp)]);
 	} else {
@@ -147,7 +157,6 @@
 	}
 
 	/* Skip over token ring MAC header and routing information */
-	hdr_len += route_len;
 	length -= hdr_len;
 	p += hdr_len;
 	caplen -= hdr_len;
diff --git a/print-udld.c b/print-udld.c
new file mode 100644
index 0000000..e8395d0
--- /dev/null
+++ b/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 const 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 const struct tok udld_code_values[] = {
+    { 0x00, "Reserved"},
+    { 0x01, "Probe message"},
+    { 0x02, "Echo message"},
+    { 0x03, "Flush message"},
+    { 0, NULL}
+};
+
+static const 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/print-udp.c b/print-udp.c
index d2983b6..8148023 100644
--- a/print-udp.c
+++ b/print-udp.c
@@ -21,7 +21,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
@@ -33,8 +33,6 @@
 #ifdef SEGSIZE
 #undef SEGSIZE
 #endif
-//#include <arpa/tftp.h>
-#include "tftp.h"
 
 #include <stdio.h>
 #include <string.h>
@@ -288,75 +286,16 @@
 		     register const struct udphdr *up,
 		     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;
-	register const u_int16_t *sp;
-
-	/* pseudo-header.. */
-	phu.ph.len = htons((u_int16_t)len);
-	phu.ph.mbz = 0;
-	phu.ph.proto = IPPROTO_UDP;
-	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 *)up, len,
-			sp[0]+sp[1]+sp[2]+sp[3]+sp[4]+sp[5]);
+	return (nextproto4_cksum(ip, (const u_int8_t *)(void *)up, len,
+	    IPPROTO_UDP));
 }
 
 #ifdef INET6
 static int udp6_cksum(const struct ip6_hdr *ip6, const struct udphdr *up,
 	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_UDP;
-
-	sum = 0;
-	for (i = 0; i < sizeof(phu.pa) / sizeof(phu.pa[0]); i++)
-		sum += phu.pa[i];
-
-	sp = (const u_int16_t *)up;
-
-	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 (nextproto6_cksum(ip6, (const u_int8_t *)(void *)up, len,
+	    IPPROTO_UDP));
 }
 #endif
 
@@ -530,6 +469,26 @@
 			    0);
 #endif
 			break;
+
+		case PT_RADIUS:
+			udpipaddr_print(ip, sport, dport);
+			radius_print(cp, length);
+			break;
+
+		case PT_VXLAN:
+			udpipaddr_print(ip, sport, dport);
+			vxlan_print((const u_char *)(up + 1), length);
+			break;
+
+		case PT_PGM:
+		case PT_PGM_ZMTP1:
+			udpipaddr_print(ip, sport, dport);
+			pgm_print(cp, length, bp2);
+			break;
+		case PT_LMP:
+			udpipaddr_print(ip, sport, dport);
+			lmp_print(cp, length);
+			break;
 		}
 		return;
 	}
@@ -569,31 +528,46 @@
 	}
 	udpipaddr_print(ip, sport, dport);
 
-	if (IP_V(ip) == 4 && (vflag > 1) && !fragmented) {
-		int sum = up->uh_sum;
-		if (sum == 0) {
-			(void)printf("[no cksum] ");
-		} else if (TTEST2(cp[0], length)) {
-			sum = udp_cksum(ip, up, length + sizeof(struct udphdr));
-			if (sum != 0)
-				(void)printf("[bad udp cksum %x!] ", sum);
-			else
-				(void)printf("[udp sum ok] ");
+	if (vflag && !Kflag && !fragmented) {
+                /* Check the checksum, if possible. */
+                u_int16_t sum, udp_sum;
+
+		/*
+		 * XXX - do this even if vflag == 1?
+		 * TCP does, and we do so for UDP-over-IPv6.
+		 */
+	        if (IP_V(ip) == 4 && (vflag > 1)) {
+			udp_sum = EXTRACT_16BITS(&up->uh_sum);
+			if (udp_sum == 0) {
+				(void)printf("[no cksum] ");
+			} else if (TTEST2(cp[0], length)) {
+				sum = udp_cksum(ip, up, length + sizeof(struct udphdr));
+
+	                        if (sum != 0) {
+        	                        (void)printf("[bad udp cksum 0x%04x -> 0x%04x!] ",
+					    udp_sum,
+					    in_cksum_shouldbe(udp_sum, sum));
+				} else
+					(void)printf("[udp sum ok] ");
+			}
 		}
-	}
 #ifdef INET6
-	if (IP_V(ip) == 6 && ip6->ip6_plen && vflag && !fragmented) {
-		int sum = up->uh_sum;
-		/* for IPv6, UDP checksum is mandatory */
-		if (TTEST2(cp[0], length)) {
-			sum = udp6_cksum(ip6, up, length + sizeof(struct udphdr));
-			if (sum != 0)
-				(void)printf("[bad udp cksum %x!] ", sum);
-			else
-				(void)printf("[udp sum ok] ");
+		else if (IP_V(ip) == 6 && ip6->ip6_plen) {
+			/* for IPv6, UDP checksum is mandatory */
+			if (TTEST2(cp[0], length)) {
+				sum = udp6_cksum(ip6, up, length + sizeof(struct udphdr));
+				udp_sum = EXTRACT_16BITS(&up->uh_sum);
+
+	                        if (sum != 0) {
+        	                        (void)printf("[bad udp cksum 0x%04x -> 0x%04x!] ",
+					    udp_sum,
+					    in_cksum_shouldbe(udp_sum, sum));
+				} else
+					(void)printf("[udp sum ok] ");
+			}
 		}
-	}
 #endif
+	}
 
 	if (!qflag) {
 #define ISPORT(p) (dport == (p) || sport == (p))
@@ -638,7 +612,7 @@
 		else if (ISPORT(NETBIOS_DGRAM_PORT))
 			nbt_udp138_print((const u_char *)(up + 1), length);
 #endif
-		else if (dport == 3456)
+		else if (dport == VAT_PORT)
 			vat_print((const void *)(up + 1), up);
 		else if (ISPORT(ZEPHYR_SRV_PORT) || ISPORT(ZEPHYR_CLT_PORT))
 			zephyr_print((const void *)(up + 1), length);
@@ -653,14 +627,15 @@
 #ifdef INET6
 		else if (ISPORT(RIPNG_PORT))
 			ripng_print((const u_char *)(up + 1), length);
-		else if (ISPORT(DHCP6_SERV_PORT) || ISPORT(DHCP6_CLI_PORT)) {
+		else if (ISPORT(DHCP6_SERV_PORT) || ISPORT(DHCP6_CLI_PORT))
 			dhcp6_print((const u_char *)(up + 1), length);
-		}
+		else if (ISPORT(BABEL_PORT) || ISPORT(BABEL_PORT_OLD))
+			babel_print((const u_char *)(up + 1), length);
 #endif /*INET6*/
 		/*
 		 * Kludge in test for whiteboard packets.
 		 */
-		else if (dport == 4567)
+		else if (dport == WB_PORT)
 			wb_print((const void *)(up + 1), length);
 		else if (ISPORT(CISCO_AUTORP_PORT))
 			cisco_autorp_print((const void *)(up + 1), length);
@@ -673,21 +648,40 @@
 			hsrp_print((const u_char *)(up + 1), length);
 		else if (ISPORT(LWRES_PORT))
 			lwres_print((const u_char *)(up + 1), length);
-                else if (ISPORT(LDP_PORT))
+		else if (ISPORT(LDP_PORT))
 			ldp_print((const u_char *)(up + 1), length);
-                else if (ISPORT(OLSR_PORT))
-			olsr_print((const u_char *)(up + 1), length);
-                else if (ISPORT(MPLS_LSP_PING_PORT))
+		else if (ISPORT(OLSR_PORT))
+			olsr_print((const u_char *)(up + 1), length,
+#if INET6
+					(IP_V(ip) == 6) ? 1 : 0);
+#else
+					0);
+#endif
+		else if (ISPORT(MPLS_LSP_PING_PORT))
 			lspping_print((const u_char *)(up + 1), length);
 		else if (dport == BFD_CONTROL_PORT ||
 			 dport == BFD_ECHO_PORT )
 			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))
 			syslog_print((const u_char *)(up + 1), length);
+                else if (ISPORT(OTV_PORT))
+			otv_print((const u_char *)(up + 1), length);
+                else if (ISPORT(VXLAN_PORT))
+			vxlan_print((const u_char *)(up + 1), length);
 		else
 			(void)printf("UDP, length %u",
 			    (u_int32_t)(ulen - sizeof(*up)));
@@ -703,3 +697,4 @@
  * c-basic-offset: 8
  * End:
  */
+
diff --git a/print-usb.c b/print-usb.c
new file mode 100644
index 0000000..8e15e7b
--- /dev/null
+++ b/print-usb.c
@@ -0,0 +1,174 @@
+/*
+ * Copyright 2009 Bert Vermeulen <bert@biot.com>
+ *
+ * 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.
+ *
+ * Support for USB packets
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <pcap.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "interface.h"
+
+
+#if defined(HAVE_PCAP_USB_H) && defined(DLT_USB_LINUX)
+#include <pcap/usb.h>
+
+/* returns direction: 1=inbound 2=outbound -1=invalid */
+static int
+get_direction(int transfer_type, int event_type)
+{
+	int direction;
+
+	direction = -1;
+	switch(transfer_type){
+	case URB_BULK:
+	case URB_CONTROL:
+	case URB_ISOCHRONOUS:
+		switch(event_type)
+		{
+		case URB_SUBMIT:
+			direction = 2;
+			break;
+		case URB_COMPLETE:
+		case URB_ERROR:
+			direction = 1;
+			break;
+		default:
+			direction = -1;
+		}
+		break;
+	case URB_INTERRUPT:
+		switch(event_type)
+		{
+		case URB_SUBMIT:
+			direction = 1;
+			break;
+		case URB_COMPLETE:
+		case URB_ERROR:
+			direction = 2;
+			break;
+		default:
+			direction = -1;
+		}
+		break;
+	 default:
+		direction = -1;
+	}
+
+	return direction;
+}
+
+static void
+usb_header_print(const pcap_usb_header *uh)
+{
+	int direction;
+
+	switch(uh->transfer_type)
+	{
+		case URB_ISOCHRONOUS:
+			printf("ISOCHRONOUS");
+			break;
+		case URB_INTERRUPT:
+			printf("INTERRUPT");
+			break;
+		case URB_CONTROL:
+			printf("CONTROL");
+			break;
+		case URB_BULK:
+			printf("BULK");
+			break;
+		default:
+			printf(" ?");
+	}
+
+	switch(uh->event_type)
+	{
+		case URB_SUBMIT:
+			printf(" SUBMIT");
+			break;
+		case URB_COMPLETE:
+			printf(" COMPLETE");
+			break;
+		case URB_ERROR:
+			printf(" ERROR");
+			break;
+		default:
+			printf(" ?");
+	}
+
+	direction = get_direction(uh->transfer_type, uh->event_type);
+	if(direction == 1)
+		printf(" from");
+	else if(direction == 2)
+		printf(" to");
+	printf(" %d:%d:%d", uh->bus_id, uh->device_address, uh->endpoint_number & 0x7f);
+}
+
+/*
+ * This is the top level routine of the printer for captures with a
+ * 48-byte header.
+ *
+ * 'p' points to the 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
+usb_linux_48_byte_print(const struct pcap_pkthdr *h, register const u_char *p)
+{
+	if (h->caplen < sizeof(pcap_usb_header)) {
+		printf("[|usb]");
+		return(sizeof(pcap_usb_header));
+	}
+
+	usb_header_print((const pcap_usb_header *) p);
+
+	return(sizeof(pcap_usb_header));
+}
+
+#ifdef DLT_USB_LINUX_MMAPPED
+/*
+ * This is the top level routine of the printer for captures with a
+ * 64-byte header.
+ *
+ * 'p' points to the 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
+usb_linux_64_byte_print(const struct pcap_pkthdr *h, register const u_char *p)
+{
+	if (h->caplen < sizeof(pcap_usb_header_mmapped)) {
+		printf("[|usb]");
+		return(sizeof(pcap_usb_header_mmapped));
+	}
+
+	usb_header_print((const pcap_usb_header *) p);
+
+	return(sizeof(pcap_usb_header_mmapped));
+}
+#endif /* DLT_USB_LINUX_MMAPPED */
+
+#endif /* defined(HAVE_PCAP_USB_H) && defined(DLT_USB_LINUX) */
+
diff --git a/print-vjc.c b/print-vjc.c
index 55b7d08..2dc89aa 100644
--- a/print-vjc.c
+++ b/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/print-vqp.c b/print-vqp.c
new file mode 100644
index 0000000..2d9e8e1
--- /dev/null
+++ b/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/print-vrrp.c b/print-vrrp.c
index 1e87a50..8b733d2 100644
--- a/print-vrrp.c
+++ b/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
@@ -110,9 +110,15 @@
 		int i;
 		char c;
 
-		if (TTEST2(bp[0], len) && in_cksum((const u_short*)bp, len, 0))
-			printf(", (bad vrrp cksum %x)",
-				EXTRACT_16BITS(&bp[6]));
+		if (TTEST2(bp[0], len)) {
+			struct cksum_vec vec[1];
+
+			vec[0].ptr = bp;
+			vec[0].len = len;
+			if (in_cksum(vec, 1))
+				printf(", (bad vrrp cksum %x)",
+					EXTRACT_16BITS(&bp[6]));
+		}
 		printf(", addrs");
 		if (naddrs > 1)
 			printf("(%d)", naddrs);
diff --git a/print-vtp.c b/print-vtp.c
new file mode 100644
index 0000000..04ae24c
--- /dev/null
+++ b/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 const 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 const 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 const struct tok vtp_vlan_type_values[] = {
+    { 0x01, "Ethernet"},
+    { 0x02, "FDDI"},
+    { 0x03, "TrCRF"},
+    { 0x04, "FDDI-net"},
+    { 0x05, "TrBRF"},
+    { 0, NULL }
+};
+
+static const 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 const 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 const 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/print-vxlan.c b/print-vxlan.c
new file mode 100644
index 0000000..8034463
--- /dev/null
+++ b/print-vxlan.c
@@ -0,0 +1,74 @@
+/*
+ * 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.
+ *
+ * Original code by Francesco Fondelli (francesco dot fondelli, gmail dot com)
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "interface.h"
+#include "extract.h"
+#include "addrtoname.h"
+
+#include "udp.h"
+
+/*
+ * VXLAN header, draft-mahalingam-dutt-dcops-vxlan-03
+ *
+ *     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
+ *    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *    |R|R|R|R|I|R|R|R|            Reserved                           |
+ *    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ *    |                VXLAN Network Identifier (VNI) |   Reserved    |
+ *    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
+ */
+
+void
+vxlan_print(const u_char *bp, u_int len)
+{
+    u_int8_t flags;
+    u_int32_t vni;
+    
+    if (len < 8) {
+        printf("[|VXLAN]");
+        return;
+    }
+
+    flags = *bp;
+    bp += 4;
+
+    vni = EXTRACT_24BITS(bp);
+    bp += 4;
+
+    printf("VXLAN, ");
+
+    fputs("flags [", stdout);
+    if (flags & 0x08)
+        fputs("I", stdout);
+    else
+        fputs(".", stdout);
+    fputs("] ", stdout);
+
+    printf("(0x%02x), ", flags);
+    printf("vni %u\n", vni);
+
+    ether_print(gndo, bp, len - 8, len - 8, NULL, NULL);
+    return;
+}
diff --git a/print-wb.c b/print-wb.c
index e28697a..3ae604f 100644
--- a/print-wb.c
+++ b/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/print-zephyr.c b/print-zephyr.c
index 698faa2..d8252cc 100644
--- a/print-zephyr.c
+++ b/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
@@ -70,7 +70,7 @@
     Z_PACKET_STAT
 };
 
-static struct tok z_types[] = {
+static const struct tok z_types[] = {
     { Z_PACKET_UNSAFE,		"unsafe" },
     { Z_PACKET_UNACKED,		"unacked" },
     { Z_PACKET_ACKED,		"acked" },
@@ -140,6 +140,15 @@
     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/print-zeromq.c b/print-zeromq.c
new file mode 100644
index 0000000..b957b9b
--- /dev/null
+++ b/print-zeromq.c
@@ -0,0 +1,214 @@
+/*
+ * This file implements decoding of ZeroMQ network protocol(s).
+ *
+ *
+ * Copyright (c) 2013 The TCPDUMP project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <stdio.h>
+
+#include "interface.h"
+#include "extract.h"
+
+/* Maximum number of ZMTP/1.0 frame body bytes (without the flags) to dump in
+ * hex and ASCII under a single "-v" flag.
+ */
+#define VBYTES 128
+
+/*
+ * Below is an excerpt from the "13/ZMTP" specification:
+ *
+ * A ZMTP message consists of 1 or more frames.
+ *
+ * A ZMTP frame consists of a length, followed by a flags field and a frame
+ * body of (length - 1) octets. Note: the length includes the flags field, so
+ * an empty frame has a length of 1.
+ *
+ * For frames with a length of 1 to 254 octets, the length SHOULD BE encoded
+ * as a single octet. The minimum valid length of a frame is 1 octet, thus a
+ * length of 0 is invalid and such frames SHOULD be discarded silently.
+ *
+ * For frames with lengths of 255 and greater, the length SHALL BE encoded as
+ * a single octet with the value 255, followed by the length encoded as a
+ * 64-bit unsigned integer in network byte order. For frames with lengths of
+ * 1 to 254 octets this encoding MAY be also used.
+ *
+ * The flags field consists of a single octet containing various control
+ * flags. Bit 0 is the least significant bit.
+ *
+ * - Bit 0 (MORE): More frames to follow. A value of 0 indicates that there
+ *   are no more frames to follow. A value of 1 indicates that more frames
+ *   will follow. On messages consisting of a single frame the MORE flag MUST
+ *   be 0.
+ *
+ * - Bits 1-7: Reserved. Bits 1-7 are reserved for future use and SHOULD be
+ *   zero.
+ */
+
+static const u_char *
+zmtp1_print_frame(const u_char *cp, const u_char *ep) {
+	u_int64_t body_len_declared, body_len_captured, header_len;
+	u_int8_t flags;
+
+	printf("\n\t");
+	TCHECK2(*cp, 1); /* length/0xFF */
+
+	if (cp[0] != 0xFF) {
+		header_len = 1; /* length */
+		body_len_declared = cp[0];
+		if (body_len_declared == 0)
+			return cp + header_len; /* skip to next frame */
+		printf(" frame flags+body  (8-bit) length %u", cp[0]);
+		TCHECK2(*cp, header_len + 1); /* length, flags */
+		flags = cp[1];
+	} else {
+		header_len = 1 + 8; /* 0xFF, length */
+		printf(" frame flags+body (64-bit) length");
+		TCHECK2(*cp, header_len); /* 0xFF, length */
+		body_len_declared = EXTRACT_64BITS(cp + 1);
+		if (body_len_declared == 0)
+			return cp + header_len; /* skip to next frame */
+		printf(" %" PRIu64, body_len_declared);
+		TCHECK2(*cp, header_len + 1); /* 0xFF, length, flags */
+		flags = cp[9];
+	}
+
+	body_len_captured = ep - cp - header_len;
+	if (body_len_declared > body_len_captured)
+		printf(" (%" PRIu64 " captured)", body_len_captured);
+	printf(", flags 0x%02x", flags);
+
+	if (vflag) {
+		u_int64_t body_len_printed = MIN(body_len_captured, body_len_declared);
+
+		printf(" (%s|%s|%s|%s|%s|%s|%s|%s)",
+			flags & 0x80 ? "MBZ" : "-",
+			flags & 0x40 ? "MBZ" : "-",
+			flags & 0x20 ? "MBZ" : "-",
+			flags & 0x10 ? "MBZ" : "-",
+			flags & 0x08 ? "MBZ" : "-",
+			flags & 0x04 ? "MBZ" : "-",
+			flags & 0x02 ? "MBZ" : "-",
+			flags & 0x01 ? "MORE" : "-");
+
+		if (vflag == 1)
+			body_len_printed = MIN(VBYTES + 1, body_len_printed);
+		if (body_len_printed > 1) {
+			printf(", first %" PRIu64 " byte(s) of body:", body_len_printed - 1);
+			hex_and_ascii_print("\n\t ", cp + header_len + 1, body_len_printed - 1);
+			printf("\n");
+		}
+	}
+
+	TCHECK2(*cp, header_len + body_len_declared); /* Next frame within the buffer ? */
+	return cp + header_len + body_len_declared;
+
+trunc:
+	printf(" [|zmtp1]");
+	return ep;
+}
+
+void
+zmtp1_print(const u_char *cp, u_int len) {
+	const u_char *ep = MIN(snapend, cp + len);
+
+	printf(": ZMTP/1.0");
+	while (cp < ep)
+		cp = zmtp1_print_frame(cp, ep);
+}
+
+/* The functions below decode a ZeroMQ datagram, supposedly stored in the "Data"
+ * field of an ODATA/RDATA [E]PGM packet. An excerpt from zmq_pgm(7) man page
+ * follows.
+ *
+ * In order for late joining consumers to be able to identify message
+ * boundaries, each PGM datagram payload starts with a 16-bit unsigned integer
+ * in network byte order specifying either the offset of the first message frame
+ * in the datagram or containing the value 0xFFFF if the datagram contains
+ * solely an intermediate part of a larger message.
+ *
+ * Note that offset specifies where the first message begins rather than the
+ * first message part. Thus, if there are trailing message parts at the
+ * beginning of the packet the offset ignores them and points to first initial
+ * message part in the packet.
+ */
+
+static const u_char *
+zmtp1_print_intermediate_part(const u_char *cp, const u_int len) {
+	u_int frame_offset;
+	u_int64_t remaining_len;
+
+	TCHECK2(*cp, 2);
+	frame_offset = EXTRACT_16BITS(cp);
+	printf("\n\t frame offset 0x%04x", frame_offset);
+	cp += 2;
+	remaining_len = snapend - cp; /* without the frame length */
+
+	if (frame_offset == 0xFFFF)
+		frame_offset = len - 2; /* always within the declared length */
+	else if (2 + frame_offset > len) {
+		printf(" (exceeds datagram declared length)");
+		goto trunc;
+	}
+
+	/* offset within declared length of the datagram */
+	if (frame_offset) {
+		printf("\n\t frame intermediate part, %u bytes", frame_offset);
+		if (frame_offset > remaining_len)
+			printf(" (%"PRIu64" captured)", remaining_len);
+		if (vflag) {
+			u_int64_t len_printed = MIN(frame_offset, remaining_len);
+
+			if (vflag == 1)
+				len_printed = MIN(VBYTES, len_printed);
+			if (len_printed > 1) {
+				printf(", first %"PRIu64" byte(s):", len_printed);
+				hex_and_ascii_print("\n\t ", cp, len_printed);
+				printf("\n");
+			}
+		}
+	}
+	return cp + frame_offset;
+
+trunc:
+	printf(" [|zmtp1]");
+	return cp + len;
+}
+
+void
+zmtp1_print_datagram(const u_char *cp, const u_int len) {
+	const u_char *ep = MIN(snapend, cp + len);
+
+	cp = zmtp1_print_intermediate_part(cp, len);
+	while (cp < ep)
+		cp = zmtp1_print_frame(cp, ep);
+}
diff --git a/route6d.h b/route6d.h
index ee00331..53953fd 100644
--- a/route6d.h
+++ b/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/rpc_auth.h b/rpc_auth.h
index aed427e..fe9a40b 100644
--- a/rpc_auth.h
+++ b/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
diff --git a/rpc_msg.h b/rpc_msg.h
index 1ff3c42..3e79ac7 100644
--- a/rpc_msg.h
+++ b/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
diff --git a/rx.h b/rx.h
index 1912e51..b79dd30 100644
--- a/rx.h
+++ b/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/sctpConstants.h b/sctpConstants.h
index f70226b..ac28a15 100644
--- a/sctpConstants.h
+++ b/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/sctpHeader.h b/sctpHeader.h
index 3b26094..63f30b5 100644
--- a/sctpHeader.h
+++ b/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/setsignal.c b/setsignal.c
index dbb8678..6032835 100644
--- a/setsignal.c
+++ b/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
@@ -78,6 +78,8 @@
 
 	memset(&new, 0, sizeof(new));
 	new.sa_handler = func;
+	if (sig == SIGCHLD)
+		new.sa_flags = SA_RESTART;
 	if (sigaction(sig, &new, &old) < 0)
 		return (SIG_ERR);
 	return (old.sa_handler);
diff --git a/setsignal.h b/setsignal.h
index a7fb2a7..984c340 100644
--- a/setsignal.h
+++ b/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 1999-10-07 23:47:13 mcr Exp $ (LBL)
  */
 #ifndef setsignal_h
 #define setsignal_h
diff --git a/signature.c b/signature.c
new file mode 100644
index 0000000..b2a7084
--- /dev/null
+++ b/signature.c
@@ -0,0 +1,161 @@
+/* 
+ * 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.
+ *
+ * Functions for signature and digest verification.
+ * 
+ * Original code by Hannes Gredler (hannes@juniper.net)
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+    "@(#) $Header: /tcpdump/master/tcpdump/signature.c,v 1.2 2008-09-22 20:22:10 guy Exp $ (LBL)";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <string.h>
+
+#include "interface.h"
+#include "signature.h"
+
+#ifdef HAVE_LIBCRYPTO
+#include <openssl/md5.h>
+#endif
+
+const struct tok signature_check_values[] = {
+    { SIGNATURE_VALID, "valid"},
+    { SIGNATURE_INVALID, "invalid"},
+    { CANT_CHECK_SIGNATURE, "unchecked"},
+    { 0, NULL }
+};
+
+
+#ifdef HAVE_LIBCRYPTO
+/*
+ * Compute a HMAC MD5 sum.
+ * Taken from rfc2104, Appendix.
+ */
+USES_APPLE_DEPRECATED_API
+static void
+signature_compute_hmac_md5(const u_int8_t *text, int text_len, unsigned char *key,
+                           unsigned int key_len, u_int8_t *digest)
+{
+    MD5_CTX context;
+    unsigned char k_ipad[65];    /* inner padding - key XORd with ipad */
+    unsigned char k_opad[65];    /* outer padding - key XORd with opad */
+    unsigned char tk[16];
+    int i;
+
+    /* if key is longer than 64 bytes reset it to key=MD5(key) */
+    if (key_len > 64) {
+
+        MD5_CTX tctx;
+
+        MD5_Init(&tctx);
+        MD5_Update(&tctx, key, key_len);
+        MD5_Final(tk, &tctx);
+
+        key = tk;
+        key_len = 16;
+    }
+
+    /*
+     * the HMAC_MD5 transform looks like:
+     *
+     * MD5(K XOR opad, MD5(K XOR ipad, text))
+     *
+     * where K is an n byte key
+     * ipad is the byte 0x36 repeated 64 times
+     * opad is the byte 0x5c repeated 64 times
+     * and text is the data being protected
+     */
+
+    /* start out by storing key in pads */
+    memset(k_ipad, 0, sizeof k_ipad);
+    memset(k_opad, 0, sizeof k_opad);
+    memcpy(k_ipad, key, key_len);
+    memcpy(k_opad, key, key_len);
+
+    /* XOR key with ipad and opad values */
+    for (i=0; i<64; i++) {
+        k_ipad[i] ^= 0x36;
+        k_opad[i] ^= 0x5c;
+    }
+
+    /*
+     * perform inner MD5
+     */
+    MD5_Init(&context);                   /* init context for 1st pass */
+    MD5_Update(&context, k_ipad, 64);     /* start with inner pad */
+    MD5_Update(&context, text, text_len); /* then text of datagram */
+    MD5_Final(digest, &context);          /* finish up 1st pass */
+
+    /*
+     * perform outer MD5
+     */
+    MD5_Init(&context);                   /* init context for 2nd pass */
+    MD5_Update(&context, k_opad, 64);     /* start with outer pad */
+    MD5_Update(&context, digest, 16);     /* then results of 1st hash */
+    MD5_Final(digest, &context);          /* finish up 2nd pass */
+}
+USES_APPLE_RST
+#endif
+
+#ifdef HAVE_LIBCRYPTO
+/*
+ * Verify a cryptographic signature of the packet.
+ * Currently only MD5 is supported.
+ */
+int
+signature_verify (const u_char *pptr, u_int plen, u_char *sig_ptr)
+{
+    u_int8_t rcvsig[16];
+    u_int8_t sig[16];
+    unsigned int i;
+
+    /*
+     * Save the signature before clearing it.
+     */
+    memcpy(rcvsig, sig_ptr, sizeof(rcvsig));
+    memset(sig_ptr, 0, sizeof(rcvsig));
+
+    if (!sigsecret) {
+        return (CANT_CHECK_SIGNATURE);
+    }
+
+    signature_compute_hmac_md5(pptr, plen, (unsigned char *)sigsecret,
+                               strlen(sigsecret), sig);
+
+    if (memcmp(rcvsig, sig, sizeof(sig)) == 0) {
+        return (SIGNATURE_VALID);
+
+    } else {
+
+        for (i = 0; i < sizeof(sig); ++i) {
+            (void)printf("%02x", sig[i]);
+        }
+
+        return (SIGNATURE_INVALID);
+    }
+}
+#endif
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 4
+ * End:
+ */
diff --git a/signature.h b/signature.h
new file mode 100644
index 0000000..e48b722
--- /dev/null
+++ b/signature.h
@@ -0,0 +1,26 @@
+/* 
+ * 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.
+ *
+ * Functions for signature and digest verification.
+ *
+ * Original code by Hannes Gredler (hannes@juniper.net)
+ */
+
+/* @(#) $Header: /tcpdump/master/tcpdump/signature.h,v 1.1 2008-08-16 11:36:20 hannes Exp $ (LBL) */
+
+/* signature checking result codes */
+#define SIGNATURE_VALID		0
+#define SIGNATURE_INVALID	1
+#define CANT_CHECK_SIGNATURE	2
+
+extern const struct tok signature_check_values[];
+extern int signature_verify (const u_char *, u_int, u_char *);
diff --git a/slcompress.h b/slcompress.h
index d8a596c..d10243a 100644
--- a/slcompress.h
+++ b/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/slip.h b/slip.h
index e64f301..aa6402c 100644
--- a/slip.h
+++ b/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/sll.h b/sll.h
index 693f05e..0a34963 100644
--- a/sll.h
+++ b/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.8 2008-05-30 01:37:41 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/smb.h b/smb.h
index bb05227..8eeb303 100644
--- a/smb.h
+++ b/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/smbutil.c b/smbutil.c
index 86bcb4c..b69788f 100644
--- a/smbutil.c
+++ b/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>
@@ -334,7 +334,7 @@
     }
 }
 
-/* convert a UCS2 string into iso-8859-1 string */
+/* convert a UCS-2 string into an ASCII string */
 #define MAX_UNISTR_SIZE	1000
 static const char *
 unistr(const u_char *s, u_int32_t *len, int use_unicode)
@@ -389,7 +389,7 @@
     	    TCHECK(s[0]);
 	    if (l >= MAX_UNISTR_SIZE)
 		break;
-	    if (isprint(s[0]))
+	    if (ND_ISPRINT(s[0]))
 		buf[l] = s[0];
 	    else {
 		if (s[0] == 0)
@@ -405,7 +405,7 @@
 	    TCHECK2(s[0], 2);
 	    if (l >= MAX_UNISTR_SIZE)
 		break;
-	    if (s[1] == 0 && isprint(s[0])) {
+	    if (s[1] == 0 && ND_ISPRINT(s[0])) {
 		/* It's a printable ASCII character */
 		buf[l] = s[0];
 	    } else {
@@ -900,7 +900,7 @@
  };
 
 /* Server Error Messages */
-err_code_struct server_msgs[] = {
+static const err_code_struct server_msgs[] = {
     { "ERRerror", 1, "Non-specific error code." },
     { "ERRbadpw", 2, "Bad password - name/password pair in a Tree Connect or Session Setup are invalid." },
     { "ERRbadtype", 3, "reserved." },
@@ -937,7 +937,7 @@
 };
 
 /* Hard Error Messages */
-err_code_struct hard_msgs[] = {
+static const err_code_struct hard_msgs[] = {
     { "ERRnowrite", 19, "Attempt to write on write-protected diskette." },
     { "ERRbadunit", 20, "Unknown unit." },
     { "ERRnotready", 21, "Drive not ready." },
diff --git a/strcasecmp.c b/strcasecmp.c
index aa6d007..5504e0a 100644
--- a/strcasecmp.c
+++ b/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>
@@ -28,7 +28,7 @@
  * together for a case independent comparison.  The mappings are
  * based upon ascii character sequences.
  */
-static u_char charmap[] = {
+static const u_char charmap[] = {
 	'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
 	'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
 	'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
@@ -67,7 +67,7 @@
 strcasecmp(s1, s2)
 	const char *s1, *s2;
 {
-	register u_char	*cm = charmap,
+	register const u_char *cm = charmap,
 			*us1 = (u_char *)s1,
 			*us2 = (u_char *)s2;
 
@@ -82,7 +82,7 @@
 	const char *s1, *s2;
 	register int n;
 {
-	register u_char	*cm = charmap,
+	register const u_char *cm = charmap,
 			*us1 = (u_char *)s1,
 			*us2 = (u_char *)s2;
 
diff --git a/tcp.h b/tcp.h
index 5934cd6..777118f 100644
--- a/tcp.h
+++ b/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.14 2007-12-09 00:30:47 guy Exp $ (LBL) */
 /*
  * Copyright (c) 1982, 1986, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -45,20 +45,24 @@
 	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 */
-};
+} UNALIGNED;
+
+#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
@@ -79,6 +83,34 @@
 #define    TCPOLEN_SIGNATURE		18
 #define TCP_SIGLEN 16			/* length of an option 19 digest */
 #define TCPOPT_AUTH             20      /* Enhanced AUTH option */
+#define	TCPOPT_UTO		28	/* tcp user timeout (rfc5482) */
+#define	   TCPOLEN_UTO			4
+#define	TCPOPT_MPTCP		30	/* MPTCP options */
+#define TCPOPT_EXPERIMENT2	254	/* experimental headers (rfc4727) */
 
 #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 OPENFLOW_PORT
+#define OPENFLOW_PORT           6633
+#endif
+#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 RPKI_RTR_PORT	        323
+#define LDP_PORT                646
+#ifndef SMB_PORT
+#define SMB_PORT                445
+#endif
diff --git a/tcpdump-stdinc.h b/tcpdump-stdinc.h
index cd04d09..4866b59 100644
--- a/tcpdump-stdinc.h
+++ b/tcpdump-stdinc.h
@@ -29,7 +29,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  *
- * @(#) $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.18 2007-11-24 18:13:33 mcr Exp $ (LBL)
  */
 
 /*
@@ -55,18 +55,17 @@
 #include <sys/types.h>
 #include <net/netdb.h>  /* in wpcap's Win32/include */
 
+#ifndef NBBY
+#define NBBY	8
+#endif
+
 #if !defined(__MINGW32__) && !defined(__WATCOMC__)
-#undef toascii
-#define isascii __isascii
-#define toascii __toascii
 #define stat _stat
 #define open _open
 #define fstat _fstat
 #define read _read
 #define close _close
 #define O_RDONLY _O_RDONLY
-
-typedef short ino_t;
 #endif /* __MINGW32__ */
 
 #ifdef __MINGW32__
@@ -80,12 +79,15 @@
 extern int inet_pton (int, const char *, void *);
 extern int inet_aton (const char *cp, struct in_addr *addr);
 
-#ifndef INET6_ADDRSTRLEN
-#define INET6_ADDRSTRLEN 46
+/*
+ * With MSVC, for C, __inline is used to make a function an inline.
+ */
+#ifdef _MSC_VER
+#define inline __inline
 #endif
 
-#ifndef toascii
-#define toascii(c) ((c) & 0x7f)
+#ifndef INET6_ADDRSTRLEN
+#define INET6_ADDRSTRLEN 46
 #endif
 
 #ifndef caddr_t
@@ -125,10 +127,55 @@
 
 #include <arpa/inet.h>
 
+#ifndef NBBY
+#define NBBY	8
+#endif
+
+/* Doesn't exist on Android. */
+#define setprotoent(...)
+#define endprotoent(...)
+
 #endif /* WIN32 */
 
-#ifdef INET6
-#include "ip6.h"
+#ifndef HAVE___ATTRIBUTE__
+#define __attribute__(x)
+#endif
+
+/*
+ * Used to declare a structure unaligned, so that the C compiler,
+ * if necessary, generates code that doesn't assume alignment.
+ * This is required because there is no guarantee that the packet
+ * data we get from libpcap/WinPcap is properly aligned.
+ *
+ * This assumes that, for all compilers that support __attribute__:
+ *
+ *	1) they support __attribute__((packed));
+ *
+ *	2) for all instruction set architectures requiring strict
+ *	   alignment, declaring a structure with that attribute
+ *	   causes the compiler to generate code that handles
+ *	   misaligned 2-byte, 4-byte, and 8-byte integral
+ *	   quantities.
+ *
+ * It does not (yet) handle compilers where you can get the compiler
+ * to generate code of that sort by some other means.
+ *
+ * This is required in order to, for example, keep the compiler from
+ * generating, for
+ *
+ *	if (bp->bp_htype == 1 && bp->bp_hlen == 6 && bp->bp_op == BOOTPREQUEST) {
+ *
+ * in print-bootp.c, code that loads the first 4-byte word of a
+ * "struct bootp", masking out the bp_hops field, and comparing the result
+ * against 0x01010600.
+ *
+ * Note: this also requires that padding be put into the structure,
+ * at least for compilers where it's implemented as __attribute__((packed)).
+ */
+#if defined(_MSC_VER) && defined(UNALIGNED)
+/* MSVC may have its own macro defined with the same name and purpose. */
+#else
+#define UNALIGNED	__attribute__((packed))
 #endif
 
 #if defined(WIN32) || defined(MSDOS)
@@ -143,21 +190,21 @@
   #define FOPEN_WRITE_BIN  FOPEN_WRITE_TXT
 #endif
 
-#if defined(__GNUC__) && defined(__i386__) && !defined(__ntohl)
+#if defined(__GNUC__) && defined(__i386__) && !defined(__APPLE__) && !defined(__ntohl) 
   #undef ntohl
   #undef ntohs
   #undef htonl
   #undef htons
 
-  extern __inline__ unsigned long __ntohl (unsigned long x);
-  extern __inline__ unsigned short __ntohs (unsigned short x);
+  static __inline__ unsigned long __ntohl (unsigned long x);
+  static __inline__ unsigned short __ntohs (unsigned short x);
 
   #define ntohl(x)  __ntohl(x)
   #define ntohs(x)  __ntohs(x)
   #define htonl(x)  __ntohl(x)
   #define htons(x)  __ntohs(x)
 
-  extern __inline__ unsigned long __ntohl (unsigned long x)
+  static __inline__ unsigned long __ntohl (unsigned long x)
   {
     __asm__ ("xchgb %b0, %h0\n\t"   /* swap lower bytes  */
              "rorl  $16, %0\n\t"    /* swap words        */
@@ -166,7 +213,7 @@
     return (x);
   }
 
-  extern __inline__ unsigned short __ntohs (unsigned short x)
+  static __inline__ unsigned short __ntohs (unsigned short x)
   {
     __asm__ ("xchgb %b0, %h0"       /* swap bytes */
             : "=q" (x) : "0" (x));
@@ -186,4 +233,50 @@
 #define FALSE 0
 #endif
 
+/*
+ * The Apple deprecation workaround macros below were adopted from the
+ * FreeRADIUS server code under permission of Alan DeKok and Arran Cudbard-Bell.
+ */
+
+#define XSTRINGIFY(x) #x
+
+/*
+ *	Macros for controlling warnings in GCC >= 4.2 and clang >= 2.8
+ */
+#define DIAG_JOINSTR(x,y) XSTRINGIFY(x ## y)
+#define DIAG_DO_PRAGMA(x) _Pragma (#x)
+
+#if defined(__GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__) >= 402
+#  define DIAG_PRAGMA(x) DIAG_DO_PRAGMA(GCC diagnostic x)
+#  if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406
+#    define DIAG_OFF(x) DIAG_PRAGMA(push) DIAG_PRAGMA(ignored DIAG_JOINSTR(-W,x))
+#    define DIAG_ON(x) DIAG_PRAGMA(pop)
+#  else
+#    define DIAG_OFF(x) DIAG_PRAGMA(ignored DIAG_JOINSTR(-W,x))
+#    define DIAG_ON(x)  DIAG_PRAGMA(warning DIAG_JOINSTR(-W,x))
+#  endif
+#elif defined(__clang__) && ((__clang_major__ * 100) + __clang_minor__ >= 208)
+#  define DIAG_PRAGMA(x) DIAG_DO_PRAGMA(clang diagnostic x)
+#  define DIAG_OFF(x) DIAG_PRAGMA(push) DIAG_PRAGMA(ignored DIAG_JOINSTR(-W,x))
+#  define DIAG_ON(x) DIAG_PRAGMA(pop)
+#else
+#  define DIAG_OFF(x)
+#  define DIAG_ON(x)
+#endif
+
+/*
+ *	For dealing with APIs which are only deprecated in OSX (like the OpenSSL API)
+ */
+#ifdef __APPLE__
+#  define USES_APPLE_DEPRECATED_API DIAG_OFF(deprecated-declarations)
+#  define USES_APPLE_RST DIAG_ON(deprecated-declarations)
+#else
+#  define USES_APPLE_DEPRECATED_API
+#  define USES_APPLE_RST
+#endif
+
+/*
+ * end of Apple deprecation workaround macros
+ */
+
 #endif /* tcpdump_stdinc_h */
diff --git a/tcpdump.1 b/tcpdump.1.in
similarity index 62%
rename from tcpdump.1
rename to tcpdump.1.in
index d13b4de..be807c5 100644
--- a/tcpdump.1
+++ b/tcpdump.1.in
@@ -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.in,v 1.2 2008-11-09 23:35:03 mcr Exp $ (LBL)
 .\"
 .\"	$NetBSD: tcpdump.8,v 1.9 2003/03/31 00:18:17 perry Exp $
 .\"
@@ -22,14 +22,17 @@
 .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
-.TH TCPDUMP 1  "18 April 2005"
+.TH TCPDUMP 1  "3 February 2014"
 .SH NAME
 tcpdump \- dump traffic on a network
 .SH SYNOPSIS
 .na
 .B tcpdump
 [
-.B \-AdDeflLnNOpqRStuUvxX
+.B \-AbdDefhHIJKlLnNOpqRStuUvxX
+] [
+.B \-B
+.I buffer_size
 ] [
 .B \-c
 .I count
@@ -40,6 +43,9 @@
 .B \-C
 .I file_size
 ] [
+.B \-G
+.I rotate_seconds
+] [
 .B \-F
 .I file
 ]
@@ -50,6 +56,10 @@
 .I interface
 ]
 [
+.B \-j
+.I tstamp_type
+]
+[
 .B \-m
 .I module
 ]
@@ -60,10 +70,19 @@
 .br
 .ti +8
 [
+.B \-Q
+.I in|out|inout
+]
+.ti +8
+[
 .B \-r
 .I file
 ]
 [
+.B \-V
+.I file
+]
+[
 .B \-s
 .I snaplen
 ]
@@ -94,6 +113,10 @@
 .I datalinktype
 ]
 [
+.B \-z
+.I postrotate-command
+]
+[
 .B \-Z
 .I user
 ]
@@ -113,8 +136,10 @@
 analysis, and/or with the
 .B \-r
 flag, which causes it to read from a saved packet file rather than to
-read packets from a network interface.  In all cases, only packets that
-match
+read packets from a network interface.  It can also be run with the
+.B \-V
+flag, which causes it to read a list of saved packet files. In all cases,
+only packets that match
 .I expression
 will be processed by
 .IR tcpdump .
@@ -171,87 +196,24 @@
 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
+Print the AS number in BGP packets in ASDOT notation rather than ASPLAIN
+notation.
+.TP
+.B \-B
+Set the operating system capture buffer size to \fIbuffer_size\fP, in
+units of KiB (1024 bytes).
+.TP
 .B \-c
 Exit after receiving \fIcount\fP packets.
 .TP
@@ -305,12 +267,14 @@
 function.
 .TP
 .B \-e
-Print the link-level header on each dump line.
+Print the link-level header on each dump line.  This can be used, for
+example, to print MAC layer addresses for protocols such as Ethernet and
+IEEE 802.11.
 .TP
 .B \-E
 Use \fIspi@ipaddr algo:secret\fP for decrypting IPsec ESP packets that
 are addressed to \fIaddr\fP and contain Security Parameter Index value
-\fIspi\fP. This combination may be repeated with comma or newline seperation.
+\fIspi\fP. This combination may be repeated with comma or newline separation.
 .IP
 Note that setting the secret for IPv4 ESP packets is supported at this time.
 .IP
@@ -325,8 +289,8 @@
 The ability to decrypt packets is only present if \fItcpdump\fP was compiled
 with cryptography enabled.
 .IP
-\fIsecret\fP is the ASCII text for ESP secret key. 
-If preceeded by 0x, then a hex value will be read.
+\fIsecret\fP is the ASCII text for ESP secret key.
+If preceded by 0x, then a hex value will be read.
 .IP
 The option assumes RFC2406 ESP, not RFC1827 ESP.
 The option is only for debugging purposes, and
@@ -337,7 +301,7 @@
 and other occasions.
 .IP
 In addition to the above syntax, the syntax \fIfile name\fP may be used
-to have tcpdump read the provided file in. The file is opened upon 
+to have tcpdump read the provided file in. The file is opened upon
 receiving the first ESP packet, so any special permissions that tcpdump
 may have been given should already have been given up.
 .TP
@@ -359,11 +323,32 @@
 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 \-h
+Print the tcpdump and libpcap version strings, print a usage message,
+and exit.
+.TP
+.B \-H
+Attempt to detect 802.11s draft mesh headers.
+.TP
 .B \-i
 Listen on \fIinterface\fP.
 If unspecified, \fItcpdump\fP searches the system interface list for the
-lowest numbered, configured up interface (excluding loopback).
-Ties are broken by choosing the earliest match.
+lowest numbered, configured up interface (excluding loopback), which may turn
+out to be, for example, ``eth0''.
 .IP
 On Linux systems with 2.2 or later kernels, an
 .I interface
@@ -378,17 +363,91 @@
 .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.
+.IP
+This flag will affect the output of the
+.B \-L
+flag.  If
+.B \-I
+isn't specified, only those link-layer types available when not in
+monitor mode will be shown; if
+.B \-I
+is specified, only those link-layer types available when in monitor mode
+will be shown.
+.TP
+.B \-j
+Set the time stamp type for the capture to \fItstamp_type\fP.  The names
+to use for the time stamp types are given in
+.BR pcap-tstamp (@MAN_MISC_INFO@);
+not all the types listed there will necessarily be valid for any given
+interface.
+.TP
+.B \-J
+List the supported time stamp types for the interface and exit.  If the
+time stamp type cannot be set for the interface, no time stamp types are
+listed.
+.TP
+.B \-K
+Don't attempt to verify IP, TCP, or UDP checksums.  This is useful for
+interfaces that perform some or all of those 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
 while capturing it.
 E.g.,
-.br
-``tcpdump\ \ \-l\ \ |\ \ tee dat'' or
-``tcpdump\ \ \-l \ \ > dat\ \ &\ \ tail\ \ \-f\ \ dat''.
+.IP
+.RS
+.RS
+.nf
+\fBtcpdump \-l | tee dat\fP
+.fi
+.RE
+.RE
+.IP
+or
+.IP
+.RS
+.RS
+.nf
+\fBtcpdump \-l > dat & tail \-f dat\fP
+.fi
+.RE
+.RE
+.IP
+Note that on Windows,``line buffered'' means ``unbuffered'', so that
+WinDump will write each character individually if
+.B \-l
+is specified.
+.IP
+.B \-U
+is similar to
+.B \-l
+in its behavior, but it will cause output to be ``packet-buffered'', so
+that the output is written to stdout at the end of each packet rather
+than at the end of each line; this is buffered on all platforms,
+including Windows.
 .TP
 .B \-L
-List the known data link types for the interface and exit.
+List the known data link types for the interface, in the specified mode,
+and exit.  The list of known data link types may be dependent on the
+specified mode; for example, on some platforms, a Wi-Fi interface might
+support one set of data link types when not in monitor mode (for
+example, it might support only fake Ethernet headers, or might support
+802.11 headers but not support 802.11 headers with radio information)
+and another set of data link types when in monitor mode (for example, it
+might support 802.11 headers, or 802.11 headers with radio information,
+only in monitor mode).
 .TP
 .B \-m
 Load SMI MIB module definitions from file \fImodule\fR.
@@ -420,6 +479,11 @@
 mode for some other reason; hence, `-p' cannot be used as an abbreviation for
 `ether host {local-hw-addr} or ether broadcast'.
 .TP
+.B \-Q
+Choose send/receive direction \fIdirection\fR for which packets should be
+captured. Possible values are `in', `out' and `inout'. Not available
+on all platforms.
+.TP
 .B \-q
 Quick (quiet?) output.
 Print less protocol information so output
@@ -442,10 +506,7 @@
 .TP
 .B \-s
 Snarf \fIsnaplen\fP bytes of data from each packet rather than the
-default of 68 (with SunOS's NIT, the minimum is actually 96).
-68 bytes is adequate for IP, ICMP, TCP
-and UDP but may truncate protocol information from name server and NFS
-packets (see below).
+default of 65535 bytes.
 Packets truncated because of a limited snapshot
 are indicated in the output with ``[|\fIproto\fP]'', where \fIproto\fP
 is the name of the protocol level at which the truncation has occurred.
@@ -457,22 +518,41 @@
 You should limit \fIsnaplen\fP to the smallest number that will
 capture the protocol information you're interested in.
 Setting
-\fIsnaplen\fP to 0 means use the required length to catch whole packets.
+\fIsnaplen\fP to 0 sets it to the default of 65535,
+for backwards compatibility with recent older versions of
+.IR tcpdump .
 .TP
 .B \-T
 Force packets selected by "\fIexpression\fP" to be interpreted the
 specified \fItype\fR.
 Currently known types are
 \fBaodv\fR (Ad-hoc On-demand Distance Vector protocol),
+\fBcarp\fR (Common Address Redundancy Protocol),
 \fBcnfp\fR (Cisco NetFlow protocol),
+\fBlmp\fR (Link Management Protocol),
+\fBpgm\fR (Pragmatic General Multicast),
+\fBpgm_zmtp1\fR (ZMTP/1.0 inside PGM/EPGM),
+\fBradius\fR (RADIUS),
 \fBrpc\fR (Remote Procedure Call),
 \fBrtp\fR (Real-Time Applications protocol),
 \fBrtcp\fR (Real-Time Applications control protocol),
 \fBsnmp\fR (Simple Network Management Protocol),
 \fBtftp\fR (Trivial File Transfer Protocol),
 \fBvat\fR (Visual Audio Tool),
+\fBwb\fR (distributed White Board),
+\fBzmtp1\fR (ZeroMQ Message Transport Protocol 1.0)
 and
-\fBwb\fR (distributed White Board).
+\fBvxlan\fR (Virtual eXtensible Local Area Network).
+.IP
+Note that the \fBpgm\fR type above affects UDP interpretation only, the native
+PGM is always recognised as IP protocol 113 regardless. UDP-encapsulated PGM is
+often called "EPGM" or "PGM/UDP".
+.IP
+Note that the \fBpgm_zmtp1\fR type above affects interpretation of both native
+PGM and UDP at once. During the native PGM decoding the application data of an
+ODATA/RDATA packet would be decoded as a ZeroMQ datagram with ZMTP/1.0 frames.
+During the UDP decoding in addition to that any UDP packet would be treated as
+an encapsulated PGM packet.
 .TP
 .B \-t
 \fIDon't\fP print a timestamp on each dump line.
@@ -481,21 +561,34 @@
 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
 .B \-U
-Make output saved via the
+If the
 .B \-w
-option ``packet-buffered''; i.e., as each packet is saved, it will be
-written to the output file, rather than being written only when the
-output buffer fills.
+option is not specified, make the printed packet output
+``packet-buffered''; i.e., as the description of the contents of each
+packet is printed, it will be written to the standard output, rather
+than, when not writing to a terminal, being written only when the output
+buffer fills.
+.IP
+If the
+.B \-w
+option is specified, make the saved raw packet output
+``packet-buffered''; i.e., as each packet is saved, it will be written
+to the output file, rather than being written only when the output
+buffer fills.
 .IP
 The
 .B \-U
@@ -532,26 +625,56 @@
 .B \-X
 Telnet options are printed in hex as well.
 .TP
+.B \-V
+Read a list of filenames from \fIfile\fR. Standard input is used
+if \fIfile\fR is ``-''.
+.TP
 .B \-w
 Write the raw packets to \fIfile\fR rather than parsing and printing
 them out.
 They can later be printed with the \-r option.
 Standard output is used if \fIfile\fR is ``-''.
+.IP
+This output will be buffered if written to a file or pipe, so a program
+reading from the file or pipe may not see packets for an arbitrary
+amount of time after they are received.  Use the
+.B \-U
+flag to cause packets to be written as soon as they are received.
+.IP
+The MIME type \fIapplication/vnd.tcpdump.pcap\fP has been registered
+with IANA for \fIpcap\fP files. The filename extension \fI.pcap\fP
+appears to be the most commonly used along with \fI.cap\fP and
+\fI.dmp\fP. \fITcpdump\fP itself doesn't check the extension when
+reading capture files and doesn't add an extension when writing them
+(it uses magic numbers in the file header instead). However, many
+operating systems and applications will use the extension if it is
+present and adding one (e.g. .pcap) is recommended.
+.IP
+See
+.BR pcap-savefile (@MAN_FILE_FORMATS@)
+for a description of the file format.
 .TP
 .B \-W
-Used in conjunction with the 
-.B \-C 
+Used in conjunction with the
+.B \-C
 option, this will limit the number
 of files created to the specified number, and begin overwriting files
-from the beginning, thus creating a 'rotating' buffer. 
+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,
 in addition to printing the headers of each packet, print the data of
-each packet (minus its link level header) in hex. 
+each packet (minus its link level header) in hex.
 The smaller of the entire packet or
 .I snaplen
 bytes will be printed.  Note that this is the entire link-layer
@@ -582,8 +705,36 @@
 .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
+If
+.I tcpdump
+is running as root, after opening the capture device or input savefile,
+but before opening any savefiles for output, change the user ID to
 .I user
 and the group ID to the primary group of
 .IR user .
@@ -597,683 +748,15 @@
 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 ,
-.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'.
+For the \fIexpression\fP syntax, see
+.BR pcap-filter (@MAN_MISC_INFO@).
 .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
-.LP
-Expression arguments can be passed to \fItcpdump\fP as either a single
-argument or as multiple arguments, whichever is more convenient.
-Generally, if the expression contains Shell metacharacters, it is
-easier to pass it as a single, quoted argument.
+The \fIexpression\fP argument can be passed to \fItcpdump\fP as either a single
+Shell argument, or as multiple Shell arguments, whichever is more convenient.
+Generally, if the expression contains Shell metacharacters, such as
+backslashes used to escape protocol names, it is easier to pass it as
+a single, quoted argument rather than to escape the Shell
+metacharacters.
 Multiple arguments are concatenated with spaces before being parsed.
 .SH EXAMPLES
 .LP
@@ -1509,8 +992,8 @@
 \fISrc\fP and \fIdst\fP are the source and destination IP
 addresses and ports.
 \fIFlags\fP are some combination of S (SYN),
-F (FIN), P (PUSH), R (RST), W (ECN CWR) or E (ECN-Echo), or a single
-`.' (no flags).
+F (FIN), P (PUSH), R (RST), U (URG), W (ECN CWR), E (ECN-Echo) or
+`.' (ACK), or `none' if no flags are set.
 \fIData-seqno\fP describes the portion of sequence space covered
 by the data in this packet (see example below).
 \fIAck\fP is sequence number of the next data expected the other
@@ -1557,8 +1040,7 @@
 Csam replies with a similar packet except it includes a piggy-backed
 ack for rtsg's SYN.
 Rtsg then acks csam's SYN.
-The `.' means no
-flags were set.
+The `.' means the ACK flag was set.
 The packet contained no data so there is no data sequence number.
 Note that the ack sequence
 number is a small integer (1).
@@ -1785,6 +1267,18 @@
      tcpdump -i xl0 'tcp[13] & 2 == 2'
 .RE
 .PP
+Some offsets and field values may be expressed as names
+rather than as numeric values. For example tcp[13] may
+be replaced with tcp[tcpflags]. The following TCP flag
+field values are also available: tcp-fin, tcp-syn, tcp-rst,
+tcp-push, tcp-act, tcp-urg.
+.PP
+This can be demonstrated as:
+.RS
+.B
+     tcpdump -i xl0 'tcp[tcpflags] & tcp-push != 0'
+.RE
+.PP
 Note that you should use single quotes or a backslash
 in the expression to hide the AND ('&') special character
 from the shell.
@@ -1892,15 +1386,6 @@
 If the
 `question' section doesn't contain exactly one entry, `[\fIn\fPq]'
 is printed.
-.LP
-Note that name server requests and responses tend to be large and the
-default \fIsnaplen\fP of 68 bytes may not capture enough of the packet
-to print.
-Use the \fB\-s\fP flag to increase the snaplen if you
-need to seriously investigate name server traffic.
-`\fB\-s 128\fP'
-has worked well for me.
-
 .HD
 SMB/CIFS decoding
 .LP
@@ -1908,19 +1393,18 @@
 on UDP/137, UDP/138 and TCP/139.
 Some primitive decoding of IPX and
 NetBEUI SMB data is also done.
-
+.LP
 By default a fairly minimal decode is done, with a much more detailed
 decode done if -v is used.
 Be warned that with -v a single SMB packet
 may take up a page or more, so only use -v if you really want all the
 gory details.
-
-For information on SMB packet formats and what all te fields mean see
+.LP
+For information on SMB packet formats and what all the fields mean see
 www.cifs.org or the pub/samba/specs/ directory on your favorite
 samba.org mirror site.
 The SMB patches were written by Andrew Tridgell
 (tridge@samba.org).
-
 .HD
 NFS Requests and Replies
 .LP
@@ -2046,11 +1530,11 @@
 AFS and RX.
 .LP
 If the -v (verbose) flag is given twice, acknowledgement packets and
-additional header information is printed, such as the the RX call ID,
+additional header information is printed, such as the RX call ID,
 call number, sequence number, serial number, and the RX packet flags.
 .LP
 If the -v flag is given twice, additional information is printed,
-such as the the RX call ID, serial number, and the RX packet flags.
+such as the RX call ID, serial number, and the RX packet flags.
 The MTU negotiation information is also printed from RX ack packets.
 .LP
 If the -v flag is given three times, the security index and service id
@@ -2272,7 +1756,13 @@
 Ethernet interface removed the packet from the wire and when the kernel
 serviced the `new packet' interrupt.
 .SH "SEE ALSO"
-stty(1), pcap(3), bpf(4), nit(4P), pfconfig(8)
+stty(1), pcap(3PCAP), bpf(4), nit(4P), pcap-savefile(@MAN_FILE_FORMATS@),
+pcap-filter(@MAN_MISC_INFO@), pcap-tstamp(@MAN_MISC_INFO@)
+.LP
+.RS
+.I http://www.iana.org/assignments/media-types/application/vnd.tcpdump.pcap
+.RE
+.LP
 .SH AUTHORS
 The original authors are:
 .LP
@@ -2292,22 +1782,17 @@
 The original distribution is available via anonymous ftp:
 .LP
 .RS
-.I ftp://ftp.ee.lbl.gov/tcpdump.tar.Z
+.I ftp://ftp.ee.lbl.gov/old/tcpdump.tar.Z
 .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:
+Please send problems, bugs, questions, desirable enhancements, patches
+etc. to:
 .LP
 .RS
-tcpdump-workers@tcpdump.org
-.RE
-.LP
-Please send source code contributions, 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/tcpdump.c b/tcpdump.c
index 2524d54..a92bfe0 100644
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -30,7 +30,7 @@
     "@(#) 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.283 2008-09-25 21:45:50 guy Exp $ (LBL)";
 #endif
 
 /*
@@ -65,12 +65,20 @@
 #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 */
 
+/* capabilities convinience library */
+#ifdef HAVE_CAP_NG_H
+#include <cap-ng.h>
+#endif /* HAVE_CAP_NG_H */
+
 #include "netdissect.h"
 #include "interface.h"
 #include "addrtoname.h"
@@ -79,19 +87,28 @@
 #include "gmt2local.h"
 #include "pcap-missing.h"
 
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
+#ifdef SIGINFO
+#define SIGNAL_REQ_INFO SIGINFO
+#elif SIGUSR1
+#define SIGNAL_REQ_INFO SIGUSR1
+#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 */
+static int dflag;			/* print filter code */
+static int Lflag;			/* list available data link types and exit */
+#ifdef HAVE_PCAP_SET_TSTAMP_TYPE
+static int Jflag;			/* list available time stamp types */
+#endif
+#ifdef HAVE_PCAP_SETDIRECTION
+int Pflag = -1;	/* Restrict captured packet by sent/receive direction */
+#endif
+static char *zflag = NULL;		/* compress each savefile using a specified command (like gzip or bzip2) */
 
 static int infodelay;
 static int infoprint;
@@ -102,18 +119,20 @@
 
 /* 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));
+static void show_dlts_and_exit(const char *device, pcap_t *pd) __attribute__((noreturn));
 
 static void print_packet(u_char *, const struct pcap_pkthdr *, const u_char *);
 static void ndo_default_print(netdissect_options *, const u_char *, u_int);
 static void dump_packet_and_trunc(u_char *, const struct pcap_pkthdr *, const u_char *);
 static void dump_packet(u_char *, const struct pcap_pkthdr *, const u_char *);
 static void droproot(const char *, const char *);
-static void ndo_error(netdissect_options *ndo, const char *fmt, ...);
+static void ndo_error(netdissect_options *ndo, const char *fmt, ...)
+     __attribute__ ((noreturn, format (printf, 2, 3)));
 static void ndo_warning(netdissect_options *ndo, const char *fmt, ...);
 
-#ifdef SIGINFO
+#ifdef SIGNAL_REQ_INFO
 RETSIGTYPE requestinfo(int);
 #endif
 
@@ -128,19 +147,23 @@
 static void info(int);
 static u_int packets_captured;
 
-typedef u_int (*if_printer)(const struct pcap_pkthdr *, const u_char *);
-
 struct printer {
-	if_printer f;
+        if_printer f;
 	int type;
 };
 
+
+struct ndo_printer {
+        if_ndo_printer f;
+	int type;
+};
+
+
 static struct printer printers[] = {
 	{ arcnet_if_print,	DLT_ARCNET },
 #ifdef DLT_ARCNET_LINUX
 	{ arcnet_linux_if_print, DLT_ARCNET_LINUX },
 #endif
-	{ ether_if_print,	DLT_EN10MB },
 	{ token_if_print,	DLT_IEEE802 },
 #ifdef DLT_LANE8023
 	{ lane_if_print,        DLT_LANE8023 },
@@ -149,7 +172,7 @@
 	{ cip_if_print,         DLT_CIP },
 #endif
 #ifdef DLT_ATM_CLIP
-	{ cip_if_print,         DLT_ATM_CLIP },
+	{ cip_if_print,		DLT_ATM_CLIP },
 #endif
 	{ sl_if_print,		DLT_SLIP },
 #ifdef DLT_SLIP_BSDOS
@@ -176,7 +199,7 @@
 	{ chdlc_if_print,	DLT_HDLC },
 #endif
 #ifdef DLT_PPP_SERIAL
-	{ ppp_hdlc_if_print,    DLT_PPP_SERIAL },
+	{ ppp_hdlc_if_print,	DLT_PPP_SERIAL },
 #endif
 #ifdef DLT_PPP_ETHER
 	{ pppoe_if_print,	DLT_PPP_ETHER },
@@ -191,7 +214,7 @@
 	{ ltalk_if_print,	DLT_LTALK },
 #endif
 #if defined(DLT_PFLOG) && defined(HAVE_NET_PFVAR_H)
-	{ pflog_if_print, 	DLT_PFLOG },
+	{ pflog_if_print,	DLT_PFLOG },
 #endif
 #ifdef DLT_FR
 	{ fr_if_print,		DLT_FR },
@@ -212,14 +235,17 @@
 	{ ieee802_11_radio_if_print,	DLT_IEEE802_11_RADIO },
 #endif
 #ifdef DLT_ENC
-	{ enc_if_print, 	DLT_ENC },
+	{ enc_if_print,		DLT_ENC },
 #endif
 #ifdef DLT_SYMANTEC_FIREWALL
-	{ symantec_if_print, 	DLT_SYMANTEC_FIREWALL },
+	{ symantec_if_print,	DLT_SYMANTEC_FIREWALL },
 #endif
 #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
@@ -254,24 +280,67 @@
 	{ juniper_services_print, DLT_JUNIPER_SERVICES },
 #endif
 #ifdef DLT_JUNIPER_ETHER
-	{ juniper_ether_print, DLT_JUNIPER_ETHER },
+	{ juniper_ether_print,	DLT_JUNIPER_ETHER },
 #endif
 #ifdef DLT_JUNIPER_PPP
-	{ juniper_ppp_print, DLT_JUNIPER_PPP },
+	{ juniper_ppp_print,	DLT_JUNIPER_PPP },
 #endif
 #ifdef DLT_JUNIPER_FRELAY
-	{ juniper_frelay_print, DLT_JUNIPER_FRELAY },
+	{ juniper_frelay_print,	DLT_JUNIPER_FRELAY },
 #endif
 #ifdef DLT_JUNIPER_CHDLC
-	{ juniper_chdlc_print, DLT_JUNIPER_CHDLC },
+	{ juniper_chdlc_print,	DLT_JUNIPER_CHDLC },
 #endif
 #ifdef DLT_MFR
-	{ mfr_if_print, 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
+#ifdef HAVE_PCAP_USB_H
+#ifdef DLT_USB_LINUX
+	{ usb_linux_48_byte_print, DLT_USB_LINUX},
+#endif /* DLT_USB_LINUX */
+#ifdef DLT_USB_LINUX_MMAPPED
+	{ usb_linux_64_byte_print, DLT_USB_LINUX_MMAPPED},
+#endif /* DLT_USB_LINUX_MMAPPED */
+#endif /* HAVE_PCAP_USB_H */
+#ifdef DLT_IPV4
+	{ raw_if_print,		DLT_IPV4 },
+#endif
+#ifdef DLT_IPV6
+	{ raw_if_print,		DLT_IPV6 },
 #endif
 	{ NULL,			0 },
 };
 
-static if_printer
+static struct ndo_printer ndo_printers[] = {
+	{ ether_if_print,	DLT_EN10MB },
+#ifdef DLT_IPNET
+	{ ipnet_if_print,	DLT_IPNET },
+#endif
+#ifdef DLT_IEEE802_15_4
+	{ ieee802_15_4_if_print, DLT_IEEE802_15_4 },
+#endif
+#ifdef DLT_IEEE802_15_4_NOFCS
+	{ ieee802_15_4_if_print, DLT_IEEE802_15_4_NOFCS },
+#endif
+#ifdef DLT_PPI
+	{ ppi_if_print,		DLT_PPI },
+#endif
+#ifdef DLT_NETANALYZER
+	{ netanalyzer_if_print, DLT_NETANALYZER },
+#endif
+#ifdef DLT_NETANALYZER_TRANSPARENT
+	{ netanalyzer_transparent_if_print, DLT_NETANALYZER_TRANSPARENT },
+#endif
+#if defined(DLT_NFLOG) && defined(HAVE_PCAP_NFLOG_H)
+	{ nflog_if_print,	DLT_NFLOG},
+#endif
+	{ NULL,			0 },
+};
+
+if_printer
 lookup_printer(int type)
 {
 	struct printer *p;
@@ -284,24 +353,79 @@
 	/* NOTREACHED */
 }
 
+if_ndo_printer
+lookup_ndo_printer(int type)
+{
+	struct ndo_printer *p;
+
+	for (p = ndo_printers; p->f; ++p)
+		if (type == p->type)
+			return p->f;
+
+	return NULL;
+	/* NOTREACHED */
+}
+
 static pcap_t *pd;
 
+static int supports_monitor_mode;
+
 extern int optind;
 extern int opterr;
 extern char *optarg;
 
 struct print_info {
-	if_printer printer;
+        netdissect_options *ndo;
+        union {
+                if_printer     printer;
+                if_ndo_printer ndo_printer;
+        } p;
+        int ndo_type;
 };
 
 struct dump_info {
 	char	*WFileName;
+	char	*CurrentFileName;
 	pcap_t	*pd;
 	pcap_dumper_t *p;
 };
 
+#ifdef HAVE_PCAP_SET_TSTAMP_TYPE
 static void
-show_dlts_and_exit(pcap_t *pd)
+show_tstamp_types_and_exit(const char *device, pcap_t *pd)
+{
+	int n_tstamp_types;
+	int *tstamp_types = 0;
+	const char *tstamp_type_name;
+	int i;
+
+	n_tstamp_types = pcap_list_tstamp_types(pd, &tstamp_types);
+	if (n_tstamp_types < 0)
+		error("%s", pcap_geterr(pd));
+
+	if (n_tstamp_types == 0) {
+		fprintf(stderr, "Time stamp type cannot be set for %s\n",
+		    device);
+		exit(0);
+	}
+	fprintf(stderr, "Time stamp types for %s (use option -j to set):\n",
+	    device);
+	for (i = 0; i < n_tstamp_types; i++) {
+		tstamp_type_name = pcap_tstamp_type_val_to_name(tstamp_types[i]);
+		if (tstamp_type_name != NULL) {
+			(void) fprintf(stderr, "  %s (%s)\n", tstamp_type_name,
+			    pcap_tstamp_type_val_to_description(tstamp_types[i]));
+		} else {
+			(void) fprintf(stderr, "  %d\n", tstamp_types[i]);
+		}
+	}
+	pcap_free_tstamp_types(tstamp_types);
+	exit(0);
+}
+#endif
+
+static void
+show_dlts_and_exit(const char *device, pcap_t *pd)
 {
 	int n_dlts;
 	int *dlts = 0;
@@ -313,7 +437,21 @@
 	else if (n_dlts == 0 || !dlts)
 		error("No data link types.");
 
-	(void) fprintf(stderr, "Data link types (use option -y to set):\n");
+	/*
+	 * If the interface is known to support monitor mode, indicate
+	 * whether these are the data link types available when not in
+	 * monitor mode, if -I wasn't specified, or when in monitor mode,
+	 * when -I was specified (the link-layer types available in
+	 * monitor mode might be different from the ones available when
+	 * not in monitor mode).
+	 */
+	if (supports_monitor_mode)
+		(void) fprintf(stderr, "Data link types for %s %s (use option -y to set):\n",
+		    device,
+		    Iflag ? "when in monitor mode" : "when not in monitor mode");
+	else
+		(void) fprintf(stderr, "Data link types for %s (use option -y to set):\n",
+		    device);
 
 	while (--n_dlts >= 0) {
 		dlt_name = pcap_datalink_val_to_name(dlts[n_dlts]);
@@ -324,15 +462,18 @@
 			/*
 			 * OK, does tcpdump handle that type?
 			 */
-			if (lookup_printer(dlts[n_dlts]) == NULL)
-				(void) fprintf(stderr, " (not supported)");
-			putchar('\n');
+			if (lookup_printer(dlts[n_dlts]) == NULL
+                            && lookup_ndo_printer(dlts[n_dlts]) == NULL)
+				(void) fprintf(stderr, " (printing not supported)");
+			fprintf(stderr, "\n");
 		} else {
-			(void) fprintf(stderr, "  DLT %d (not supported)\n",
+			(void) fprintf(stderr, "  DLT %d (printing not supported)\n",
 			    dlts[n_dlts]);
 		}
 	}
-	free(dlts);
+#ifdef HAVE_PCAP_FREE_DATALINKS
+	pcap_free_datalinks(dlts);
+#endif
 	exit(0);
 }
 
@@ -340,13 +481,29 @@
  * 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_SET_TSTAMP_TYPE
+#define j_FLAG		"j:"
+#define j_FLAG_USAGE	" [ -j tstamptype ]"
+#define J_FLAG		"J"
+#else /* PCAP_ERROR_TSTAMP_TYPE_NOTSUP */
+#define j_FLAG
+#define j_FLAG_USAGE
+#define J_FLAG
+#endif /* PCAP_ERROR_TSTAMP_TYPE_NOTSUP */
 
 #ifdef HAVE_PCAP_FINDALLDEVS
 #ifndef HAVE_PCAP_IF_T
@@ -366,9 +523,15 @@
 #define U_FLAG
 #endif
 
+#ifdef HAVE_PCAP_SETDIRECTION
+#define P_FLAG "P:"
+#define Q_FLAG "Q:"
+#else
+#define P_FLAG
+#define Q_FLAG
+#endif
+
 #ifndef WIN32
-// not supported on android
-int initgroups(const char *user, gid_t group) {return 0;}
 /* Drop root privileges and chroot if necessary */
 static void
 droproot(const char *username, const char *chroot_dir)
@@ -389,6 +552,19 @@
 				exit(1);
 			}
 		}
+#ifdef HAVE_CAP_NG_H
+		int ret = capng_change_id(pw->pw_uid, pw->pw_gid, CAPNG_NO_FLAG);
+		if (ret < 0) {
+			printf("error : ret %d\n", ret);
+		}
+		/* We don't need CAP_SETUID and CAP_SETGID */
+		capng_update(CAPNG_DROP, CAPNG_EFFECTIVE, CAP_SETUID);
+		capng_update(CAPNG_DROP, CAPNG_EFFECTIVE, CAP_SETUID);
+		capng_update(CAPNG_DROP, CAPNG_PERMITTED, CAP_SETUID);
+		capng_update(CAPNG_DROP, CAPNG_PERMITTED, CAP_SETUID);
+		capng_apply(CAPNG_SELECT_BOTH);
+
+#else
 		if (initgroups(pw->pw_name, pw->pw_gid) != 0 ||
 		    setgid(pw->pw_gid) != 0 || setuid(pw->pw_uid) != 0) {
 			fprintf(stderr, "tcpdump: Couldn't change to '%.32s' uid=%lu gid=%lu: %s\n",
@@ -398,6 +574,7 @@
 			    pcap_strerror(errno));
 			exit(1);
 		}
+#endif /* HAVE_CAP_NG_H */
 	}
 	else {
 		fprintf(stderr, "tcpdump: Couldn't find user '%.32s'\n",
@@ -425,10 +602,34 @@
 static void
 MakeFilename(char *buffer, char *orig_name, int cnt, int max_chars)
 {
+        char *filename = malloc(PATH_MAX + 1);
+        if (filename == NULL)
+            error("Makefilename: malloc");
+
+        /* 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, PATH_MAX, orig_name, local_tm);
+        } else {
+          strncpy(filename, orig_name, PATH_MAX);
+        }
+
 	if (cnt == 0 && max_chars == 0)
-		strcpy(buffer, orig_name);
+		strncpy(buffer, filename, PATH_MAX + 1);
 	else
-		sprintf(buffer, "%s%0*d", orig_name, max_chars, cnt);
+		if (snprintf(buffer, PATH_MAX + 1, "%s%0*d", filename, max_chars, cnt) > PATH_MAX)
+                  /* Report an error if the filename is too large */
+                  error("too many output files or filename is too long (> %d)", PATH_MAX);
+        free(filename);
 }
 
 static int tcpdump_printf(netdissect_options *ndo _U_,
@@ -445,14 +646,55 @@
   return ret;
 }
 
+static struct print_info
+get_print_info(int type)
+{
+	struct print_info printinfo;
+
+	printinfo.ndo_type = 1;
+	printinfo.ndo = gndo;
+	printinfo.p.ndo_printer = lookup_ndo_printer(type);
+	if (printinfo.p.ndo_printer == NULL) {
+		printinfo.p.printer = lookup_printer(type);
+		printinfo.ndo_type = 0;
+		if (printinfo.p.printer == NULL) {
+			gndo->ndo_dltname = pcap_datalink_val_to_name(type);
+			if (gndo->ndo_dltname != NULL)
+				error("packet printing is not supported for link type %s: use -w",
+				      gndo->ndo_dltname);
+			else
+				error("packet printing is not supported for link type %d: use -w", type);
+		}
+	}
+	return (printinfo);
+}
+
+static char *
+get_next_file(FILE *VFile, char *ptr)
+{
+	char *ret;
+
+	ret = fgets(ptr, PATH_MAX, VFile);
+	if (!ret)
+		return NULL;
+
+	if (ptr[strlen(ptr) - 1] == '\n')
+		ptr[strlen(ptr) - 1] = '\0';
+
+	return ret;
+}
+
 int
 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, *VFileName, *WFileName;
 	pcap_handler callback;
 	int type;
+	int dlt;
+	int new_dlt;
+	const char *dlt_name;
 	struct bpf_program fcode;
 #ifndef WIN32
 	RETSIGTYPE (*oldhandler)(int);
@@ -461,18 +703,22 @@
 	struct dump_info dumpinfo;
 	u_char *pcap_userdata;
 	char ebuf[PCAP_ERRBUF_SIZE];
+	char VFileLine[PATH_MAX + 1];
 	char *username = NULL;
 	char *chroot_dir = NULL;
+	char *ret = NULL;
+	char *end;
 #ifdef HAVE_PCAP_FINDALLDEVS
 	pcap_if_t *devpointer;
 	int devnum;
 #endif
 	int status;
+	FILE *VFile;
 #ifdef WIN32
-	u_int UserBufferSize = 1000000;
 	if(wsockinit() != 0) return 1;
 #endif /* WIN32 */
 
+	jflag=-1;	/* not set */
         gndo->ndo_Oflag=1;
 	gndo->ndo_Rflag=1;
 	gndo->ndo_dlt=-1;
@@ -486,7 +732,10 @@
 	device = NULL;
 	infile = NULL;
 	RFileName = NULL;
+	VFileName = NULL;
+	VFile = NULL;
 	WFileName = NULL;
+	dlt = -1;
 	if ((cp = strrchr(argv[0], '/')) != NULL)
 		program_name = cp + 1;
 	else
@@ -499,9 +748,8 @@
 	smiInit("tcpdump");
 #endif
 
-	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, "aAb" B_FLAG "c:C:d" D_FLAG "eE:fF:G:hHi:" I_FLAG j_FLAG J_FLAG "KlLm:M:nNOp" P_FLAG "q" Q_FLAG "r:Rs:StT:u" U_FLAG "vV:w:W:xXy:Yz:Z:")) != -1)
 		switch (op) {
 
 		case 'a':
@@ -512,13 +760,17 @@
 			++Aflag;
 			break;
 
-#ifdef WIN32
+		case 'b':
+			++bflag;
+			break;
+
+#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 +827,29 @@
 			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 'h':
+			usage();
+			break;
+
+		case 'H':
+			++Hflag;
+			break;
+
 		case 'i':
 			if (optarg[0] == '0' && optarg[1] == 0)
 				error("Invalid adapter index");
@@ -590,18 +865,25 @@
 			 * It can be useful on Windows, where more than
 			 * one interface can have the same name.
 			 */
-			if ((devnum = atoi(optarg)) != 0) {
+			devnum = strtol(optarg, &end, 10);
+			if (optarg != end && *end == '\0') {
 				if (devnum < 0)
 					error("Invalid adapter index");
 
 				if (pcap_findalldevs(&devpointer, ebuf) < 0)
 					error("%s", ebuf);
 				else {
-					for (i = 0; i < devnum-1; i++){
-						devpointer = devpointer->next;
-						if (devpointer == NULL)
-							error("Invalid adapter index");
-					}
+					/*
+					 * Look for the devnum-th entry
+					 * in the list of devices
+					 * (1-based).
+					 */
+					for (i = 0;
+					    i < devnum-1 && devpointer != NULL;
+					    i++, devpointer = devpointer->next)
+						;
+					if (devpointer == NULL)
+						error("Invalid adapter index");
 				}
 				device = devpointer->name;
 				break;
@@ -610,6 +892,24 @@
 			device = optarg;
 			break;
 
+#ifdef HAVE_PCAP_CREATE
+		case 'I':
+			++Iflag;
+			break;
+#endif /* HAVE_PCAP_CREATE */
+
+#ifdef HAVE_PCAP_SET_TSTAMP_TYPE
+		case 'j':
+			jflag = pcap_tstamp_type_name_to_val(optarg);
+			if (jflag < 0)
+				error("invalid time stamp type %s", optarg);
+			break;
+
+		case 'J':
+			Jflag++;
+			break;
+#endif
+
 		case 'l':
 #ifdef WIN32
 			/*
@@ -631,19 +931,15 @@
 #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' ",
@@ -657,7 +953,15 @@
 #ifndef HAVE_LIBCRYPTO
 			warning("crypto code not compiled in");
 #endif
-			tcpmd5secret = optarg;
+			sigsecret = optarg;
+			break;
+
+		case 'n':
+			++nflag;
+			break;
+
+		case 'N':
+			++Nflag;
 			break;
 
 		case 'O':
@@ -667,7 +971,22 @@
 		case 'p':
 			++pflag;
 			break;
+#ifdef HAVE_PCAP_SETDIRECTION
+		case 'P':
+			warning("don't use -P, use -Q; -P will be used for pcap-ng output in the future");
+			/* FALLTHROUGH */
 
+		case 'Q':
+			if (strcasecmp(optarg, "in") == 0)
+				Pflag = PCAP_D_IN;
+			else if (strcasecmp(optarg, "out") == 0)
+				Pflag = PCAP_D_OUT;
+			else if (strcasecmp(optarg, "inout") == 0)
+				Pflag = PCAP_D_INOUT;
+			else
+				error("unknown capture direction `%s'", optarg);
+			break;
+#endif /* HAVE_PCAP_SETDIRECTION */
 		case 'q':
 			++qflag;
 			++suppress_default_print;
@@ -681,17 +1000,14 @@
 			Rflag = 0;
 			break;
 
-		case 's': {
-			char *end;
-
+		case 's':
 			snaplen = strtol(optarg, &end, 0);
 			if (optarg == end || *end != '\0'
-			    || snaplen < 0 || snaplen > 65535)
+			    || snaplen < 0 || snaplen > MAXIMUM_SNAPLEN)
 				error("invalid snaplen %s", optarg);
 			else if (snaplen == 0)
-				snaplen = 65535;
+				snaplen = MAXIMUM_SNAPLEN;
 			break;
-		}
 
 		case 'S':
 			++Sflag;
@@ -720,6 +1036,20 @@
 				packettype = PT_TFTP;
 			else if (strcasecmp(optarg, "aodv") == 0)
 				packettype = PT_AODV;
+			else if (strcasecmp(optarg, "carp") == 0)
+				packettype = PT_CARP;
+			else if (strcasecmp(optarg, "radius") == 0)
+				packettype = PT_RADIUS;
+			else if (strcasecmp(optarg, "zmtp1") == 0)
+				packettype = PT_ZMTP1;
+			else if (strcasecmp(optarg, "vxlan") == 0)
+				packettype = PT_VXLAN;
+			else if (strcasecmp(optarg, "pgm") == 0)
+				packettype = PT_PGM;
+			else if (strcasecmp(optarg, "pgm_zmtp1") == 0)
+				packettype = PT_PGM_ZMTP1;
+			else if (strcasecmp(optarg, "lmp") == 0)
+				packettype = PT_LMP;
 			else
 				error("unknown packet type `%s'", optarg);
 			break;
@@ -738,6 +1068,10 @@
 			++vflag;
 			break;
 
+		case 'V':
+			VFileName = optarg;
+			break;
+
 		case 'w':
 			WFileName = optarg;
 			break;
@@ -781,6 +1115,15 @@
 			}
 			break;
 #endif
+		case 'z':
+			if (optarg) {
+				zflag = strdup(optarg);
+			} else {
+				usage();
+				/* NOTREACHED */
+			}
+			break;
+
 		case 'Z':
 			if (optarg) {
 				username = strdup(optarg);
@@ -806,13 +1149,20 @@
 	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;
 	}
 
+	if (fflag != 0 && (VFileName != NULL || RFileName != NULL))
+		error("-f can not be used with -V or -r");
+
+	if (VFileName != NULL && RFileName != NULL)
+		error("-V and -r are mutually exclusive.");
+
 #ifdef WITH_CHROOT
 	/* if run as root, prepare for chrooting */
 	if (getuid() == 0 || geteuid() == 0) {
@@ -831,10 +1181,16 @@
 	}
 #endif
 
-	if (RFileName != NULL) {
-		int dlt;
-		const char *dlt_name;
-
+	if (RFileName != NULL || VFileName != NULL) {
+		/*
+		 * If RFileName is non-null, it's the pathname of a
+		 * savefile to read.  If VFileName is non-null, it's
+		 * the pathname of a file containing a list of pathnames
+		 * (one per line) of savefiles to read.
+		 *
+		 * In either case, we're reading a savefile, not doing
+		 * a live capture.
+		 */
 #ifndef WIN32
 		/*
 		 * We don't need network access, so relinquish any set-UID
@@ -848,6 +1204,21 @@
 		if (setgid(getgid()) != 0 || setuid(getuid()) != 0 )
 			fprintf(stderr, "Warning: setgid/setuid failed !\n");
 #endif /* WIN32 */
+		if (VFileName != NULL) {
+			if (VFileName[0] == '-' && VFileName[1] == '\0')
+				VFile = stdin;
+			else
+				VFile = fopen(VFileName, "r");
+
+			if (VFile == NULL)
+				error("Unable to open file: %s\n", strerror(errno));
+
+			ret = get_next_file(VFile, VFileLine);
+			if (!ret)
+				error("Nothing in %s\n", VFileName);
+			RFileName = VFileLine;
+		}
+
 		pd = pcap_open_offline(RFileName, ebuf);
 		if (pd == NULL)
 			error("%s", ebuf);
@@ -864,17 +1235,22 @@
 		}
 		localnet = 0;
 		netmask = 0;
-		if (fflag != 0)
-			error("-f and -r options are incompatible");
 	} else {
+		/*
+		 * We're doing a live capture.
+		 */
 		if (device == NULL) {
 			device = pcap_lookupdev(ebuf);
 			if (device == NULL)
 				error("%s", ebuf);
 		}
 #ifdef WIN32
-		if(strlen(device) == 1)	//we assume that an ASCII string is always longer than 1 char
-		{						//a Unicode string has a \0 as second byte (so strlen() is 1)
+		/*
+		 * Print a message to the standard error on Windows.
+		 * XXX - why do it here, with a different message?
+		 */
+		if(strlen(device) == 1)	/* we assume that an ASCII string is always longer than 1 char */
+		{						/* a Unicode string has a \0 as second byte (so strlen() is 1) */
 			fprintf(stderr, "%s: listening on %ws\n", program_name, device);
 		}
 		else
@@ -884,12 +1260,101 @@
 
 		fflush(stderr);	
 #endif /* WIN32 */
+#ifdef HAVE_PCAP_CREATE
+		pd = pcap_create(device, ebuf);
+		if (pd == NULL)
+			error("%s", ebuf);
+#ifdef HAVE_PCAP_SET_TSTAMP_TYPE
+		if (Jflag)
+			show_tstamp_types_and_exit(device, pd);
+#endif
+		/*
+		 * Is this an interface that supports monitor mode?
+		 */
+		if (pcap_can_set_rfmon(pd) == 1)
+			supports_monitor_mode = 1;
+		else
+			supports_monitor_mode = 0;
+		status = pcap_set_snaplen(pd, snaplen);
+		if (status != 0)
+			error("%s: Can't set snapshot length: %s",
+			    device, pcap_statustostr(status));
+		status = pcap_set_promisc(pd, !pflag);
+		if (status != 0)
+			error("%s: Can't set promiscuous mode: %s",
+			    device, pcap_statustostr(status));
+		if (Iflag) {
+			status = pcap_set_rfmon(pd, 1);
+			if (status != 0)
+				error("%s: Can't set monitor mode: %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: Can't set buffer size: %s",
+				    device, pcap_statustostr(status));
+		}
+#ifdef HAVE_PCAP_SET_TSTAMP_TYPE
+                if (jflag != -1) {
+			status = pcap_set_tstamp_type(pd, jflag);
+			if (status < 0)
+				error("%s: Can't set time stamp type: %s",
+			    	    device, pcap_statustostr(status));
+		}
+#endif
+		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));
+		}
+#ifdef HAVE_PCAP_SETDIRECTION
+		if (Pflag != -1) {
+			status = pcap_setdirection(pd, Pflag);
+			if (status != 0)
+				error("%s: pcap_setdirection() failed: %s",
+				      device,  pcap_geterr(pd));
+		}
+#endif
+#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,14 +1362,14 @@
 		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);
+			show_dlts_and_exit(device, pd);
 		if (gndo->ndo_dlt >= 0) {
 #ifdef HAVE_PCAP_SET_DATALINK
 			if (pcap_set_datalink(pd, gndo->ndo_dlt) < 0)
@@ -921,7 +1386,7 @@
 			}
 #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);
@@ -945,34 +1410,96 @@
 	if (dflag) {
 		bpf_dump(&fcode, dflag);
 		pcap_close(pd);
+		free(cmdbuf);
 		exit(0);
 	}
 	init_addrtoname(localnet, netmask);
+        init_checksum();
 
 #ifndef WIN32	
 	(void)setsignal(SIGPIPE, cleanup);
-#endif /* WIN32 */
 	(void)setsignal(SIGTERM, cleanup);
 	(void)setsignal(SIGINT, cleanup);
+#endif /* WIN32 */
+#if defined(HAVE_FORK) || defined(HAVE_VFORK)
+	(void)setsignal(SIGCHLD, child_cleanup);
+#endif
 	/* Cooperate with nohup(1) */
 #ifndef WIN32	
 	if ((oldhandler = setsignal(SIGHUP, cleanup)) != SIG_DFL)
 		(void)setsignal(SIGHUP, oldhandler);
 #endif /* WIN32 */
 
+#ifndef WIN32
+	/*
+	 * If a user name was specified with "-Z", attempt to switch to
+	 * that user's UID.  This would probably be used with sudo,
+	 * to allow tcpdump to be run in a special restricted
+	 * account (if you just want to allow users to open capture
+	 * devices, and can't just give users that permission,
+	 * you'd make tcpdump set-UID or set-GID).
+	 *
+	 * Tcpdump doesn't necessarily write only to one savefile;
+	 * the general only way to allow a -Z instance to write to
+	 * savefiles as the user under whose UID it's run, rather
+	 * than as the user specified with -Z, would thus be to switch
+	 * to the original user ID before opening a capture file and
+	 * then switch back to the -Z user ID after opening the savefile.
+	 * Switching to the -Z user ID only after opening the first
+	 * savefile doesn't handle the general case.
+	 */
+
+#ifdef HAVE_CAP_NG_H
+	/* We are running as root and we will be writing to savefile */
+	if ((getuid() == 0 || geteuid() == 0) && WFileName) {
+		if (username) {
+			/* Drop all capabilities from effective set */
+			capng_clear(CAPNG_EFFECTIVE);
+			/* Add capabilities we will need*/
+			capng_update(CAPNG_ADD, CAPNG_PERMITTED, CAP_SETUID);
+			capng_update(CAPNG_ADD, CAPNG_PERMITTED, CAP_SETGID);
+			capng_update(CAPNG_ADD, CAPNG_PERMITTED, CAP_DAC_OVERRIDE);
+
+			capng_update(CAPNG_ADD, CAPNG_EFFECTIVE, CAP_SETUID);
+			capng_update(CAPNG_ADD, CAPNG_EFFECTIVE, CAP_SETGID);
+			capng_update(CAPNG_ADD, CAPNG_EFFECTIVE, CAP_DAC_OVERRIDE);
+
+			capng_apply(CAPNG_SELECT_BOTH);
+		}
+	}
+#endif /* HAVE_CAP_NG_H */
+
+	if (getuid() == 0 || geteuid() == 0) {
+		if (username || chroot_dir)
+			droproot(username, chroot_dir);
+
+	}
+#endif /* WIN32 */
+
 	if (pcap_setfilter(pd, &fcode) < 0)
 		error("%s", pcap_geterr(pd));
 	if (WFileName) {
 		pcap_dumper_t *p;
+		/* Do not exceed the default PATH_MAX for files. */
+		dumpinfo.CurrentFileName = (char *)malloc(PATH_MAX + 1);
 
-		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);
+		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);
+
+		p = pcap_dump_open(pd, dumpinfo.CurrentFileName);
+#ifdef HAVE_CAP_NG_H
+        /* Give up capabilities, clear Effective set */
+        capng_clear(CAPNG_EFFECTIVE);
+#endif
 		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;
@@ -982,32 +1509,24 @@
 			callback = dump_packet;
 			pcap_userdata = (u_char *)p;
 		}
+#ifdef HAVE_PCAP_DUMP_FLUSH
+		if (Uflag)
+			pcap_dump_flush(p);
+#endif
 	} else {
 		type = pcap_datalink(pd);
-		printinfo.printer = lookup_printer(type);
-		if (printinfo.printer == NULL) {
-			gndo->ndo_dltname = pcap_datalink_val_to_name(type);
-			if (gndo->ndo_dltname != NULL)
-				error("unsupported data link type %s",
-				      gndo->ndo_dltname);
-			else
-				error("unsupported data link type %d", type);
-		}
+		printinfo = get_print_info(type);
 		callback = print_packet;
 		pcap_userdata = (u_char *)&printinfo;
 	}
-#ifndef WIN32
+
+#ifdef SIGNAL_REQ_INFO
 	/*
-	 * We cannot do this earlier, because we want to be able to open
-	 * the file (if done) for writing before giving up permissions.
+	 * We can't get statistics when reading from a file rather
+	 * than capturing from a device.
 	 */
-	if (getuid() == 0 || geteuid() == 0) {
-		if (username || chroot_dir)
-			droproot(username, chroot_dir);
-	}
-#endif /* WIN32 */
-#ifdef SIGINFO
-	(void)setsignal(SIGINFO, requestinfo);
+	if (RFileName == NULL)
+		(void)setsignal(SIGNAL_REQ_INFO, requestinfo);
 #endif
 
 	if (vflag > 0 && WFileName) {
@@ -1028,9 +1547,11 @@
 
 #ifndef WIN32
 	if (RFileName == NULL) {
-		int dlt;
-		const char *dlt_name;
-
+		/*
+		 * Live capture (if -V was specified, we set RFileName
+		 * to a file from the -V file).  Print a message to
+		 * the standard error on UN*X.
+		 */
 		if (!vflag && !WFileName) {
 			(void)fprintf(stderr,
 			    "%s: verbose output suppressed, use -v or -vv for full protocol decode\n",
@@ -1050,37 +1571,77 @@
 		(void)fflush(stderr);
 	}
 #endif /* WIN32 */
-	status = pcap_loop(pd, cnt, callback, pcap_userdata);
-	if (WFileName == NULL) {
-		/*
-		 * We're printing packets.  Flush the printed output,
-		 * so it doesn't get intermingled with error output.
-		 */
-		if (status == -2) {
+	do {
+		status = pcap_loop(pd, cnt, callback, pcap_userdata);
+		if (WFileName == NULL) {
 			/*
-			 * We got interrupted, so perhaps we didn't
-			 * manage to finish a line we were printing.
-			 * Print an extra newline, just in case.
+			 * We're printing packets.  Flush the printed output,
+			 * so it doesn't get intermingled with error output.
 			 */
-			putchar('\n');
+			if (status == -2) {
+				/*
+				 * We got interrupted, so perhaps we didn't
+				 * manage to finish a line we were printing.
+				 * Print an extra newline, just in case.
+				 */
+				putchar('\n');
+			}
+			(void)fflush(stdout);
 		}
-		(void)fflush(stdout);
+                if (status == -2) {
+			/*
+			 * We got interrupted. If we are reading multiple
+			 * files (via -V) set these so that we stop.
+			 */
+			VFileName = NULL;
+			ret = NULL;
+		}
+		if (status == -1) {
+			/*
+			 * Error.  Report it.
+			 */
+			(void)fprintf(stderr, "%s: pcap_loop: %s\n",
+			    program_name, pcap_geterr(pd));
+		}
+		if (RFileName == NULL) {
+			/*
+			 * We're doing a live capture.  Report the capture
+			 * statistics.
+			 */
+			info(1);
+		}
+		pcap_close(pd);
+		if (VFileName != NULL) {
+			ret = get_next_file(VFile, VFileLine);
+			if (ret) {
+				RFileName = VFileLine;
+				pd = pcap_open_offline(RFileName, ebuf);
+				if (pd == NULL)
+					error("%s", ebuf);
+				new_dlt = pcap_datalink(pd);
+				if (WFileName && new_dlt != dlt)
+					error("%s: new dlt does not match original", RFileName);
+				printinfo = get_print_info(new_dlt);
+				dlt_name = pcap_datalink_val_to_name(new_dlt);
+				if (dlt_name == NULL) {
+					fprintf(stderr, "reading from file %s, link-type %u\n",
+					RFileName, new_dlt);
+				} else {
+					fprintf(stderr,
+					"reading from file %s, link-type %s (%s)\n",
+					RFileName, dlt_name,
+					pcap_datalink_val_to_description(new_dlt));
+				}
+				if (pcap_compile(pd, &fcode, cmdbuf, Oflag, netmask) < 0)
+					error("%s", pcap_geterr(pd));
+				if (pcap_setfilter(pd, &fcode) < 0)
+					error("%s", pcap_geterr(pd));
+			}
+		}
 	}
-	if (status == -1) {
-		/*
-		 * Error.  Report it.
-		 */
-		(void)fprintf(stderr, "%s: pcap_loop: %s\n",
-		    program_name, pcap_geterr(pd));
-	}
-	if (RFileName == NULL) {
-		/*
-		 * We're doing a live capture.  Report the capture
-		 * statistics.
-		 */
-		info(1);
-	}
-	pcap_close(pd);
+	while (ret != NULL);
+
+	free(cmdbuf);
 	exit(status == -1 ? 1 : 0);
 }
 
@@ -1125,38 +1686,106 @@
 #endif
 }
 
+/*
+  On windows, we do not use a fork, so we do not care less about
+  waiting a child processes to die
+ */
+#if defined(HAVE_FORK) || defined(HAVE_VFORK)
+static RETSIGTYPE
+child_cleanup(int signo _U_)
+{
+  wait(NULL);
+}
+#endif /* HAVE_FORK && HAVE_VFORK */
+
 static void
 info(register int verbose)
 {
 	struct pcap_stat stat;
 
+	/*
+	 * Older versions of libpcap didn't set ps_ifdrop on some
+	 * platforms; initialize it to 0 to handle that.
+	 */
+	stat.ps_ifdrop = 0;
 	if (pcap_stats(pd, &stat) < 0) {
 		(void)fprintf(stderr, "pcap_stats: %s\n", pcap_geterr(pd));
+		infoprint = 0;
 		return;
 	}
 
 	if (!verbose)
 		fprintf(stderr, "%s: ", program_name);
 
-	(void)fprintf(stderr, "%u packets captured", packets_captured);
+	(void)fprintf(stderr, "%u packet%s captured", packets_captured,
+	    PLURAL_SUFFIX(packets_captured));
 	if (!verbose)
 		fputs(", ", stderr);
 	else
 		putc('\n', stderr);
-	(void)fprintf(stderr, "%d packets received by filter", stat.ps_recv);
+	(void)fprintf(stderr, "%u packet%s received by filter", stat.ps_recv,
+	    PLURAL_SUFFIX(stat.ps_recv));
 	if (!verbose)
 		fputs(", ", stderr);
 	else
 		putc('\n', stderr);
-	(void)fprintf(stderr, "%d packets dropped by kernel\n", stat.ps_drop);
+	(void)fprintf(stderr, "%u packet%s dropped by kernel", stat.ps_drop,
+	    PLURAL_SUFFIX(stat.ps_drop));
+	if (stat.ps_ifdrop != 0) {
+		if (!verbose)
+			fputs(", ", stderr);
+		else
+			putc('\n', stderr);
+		(void)fprintf(stderr, "%u packet%s dropped by interface\n",
+		    stat.ps_ifdrop, PLURAL_SUFFIX(stat.ps_ifdrop));
+	} else
+		putc('\n', stderr);
 	infoprint = 0;
 }
 
+#if defined(HAVE_FORK) || defined(HAVE_VFORK)
+static void
+compress_savefile(const char *filename)
+{
+# ifdef HAVE_FORK
+	if (fork())
+# else
+	if (vfork())
+# endif
+		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, (char *)NULL) == -1)
+		fprintf(stderr,
+			"compress_savefile:execlp(%s, %s): %s\n",
+			zflag,
+			filename,
+			strerror(errno));
+# ifdef HAVE_FORK
+	exit(1);
+# else
+	_exit(1);
+# endif
+}
+#else  /* HAVE_FORK && HAVE_VFORK */
+static void
+compress_savefile(const char *filename)
+{
+	fprintf(stderr,
+		"compress_savefile failed. Functionality not implemented under your system\n");
+}
+#endif /* HAVE_FORK && HAVE_VFORK */
+
 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;
 
@@ -1165,29 +1794,111 @@
 	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(PATH_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);
+
+#ifdef HAVE_CAP_NG_H
+			capng_update(CAPNG_ADD, CAPNG_EFFECTIVE, CAP_DAC_OVERRIDE);
+			capng_apply(CAPNG_EFFECTIVE);
+#endif /* HAVE_CAP_NG_H */
+			dump_info->p = pcap_dump_open(dump_info->pd, dump_info->CurrentFileName);
+#ifdef HAVE_CAP_NG_H
+			capng_update(CAPNG_DROP, CAPNG_EFFECTIVE, CAP_DAC_OVERRIDE);
+			capng_apply(CAPNG_EFFECTIVE);
+#endif /* HAVE_CAP_NG_H */
+			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(PATH_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));
 	}
@@ -1241,7 +1952,12 @@
 	 */
 	snapend = sp + h->caplen;
 
-	hdrlen = (*print_info->printer)(h, sp);
+        if(print_info->ndo_type) {
+                hdrlen = (*print_info->p.ndo_printer)(print_info->ndo, h, sp);
+        } else {
+                hdrlen = (*print_info->p.printer)(h, sp);
+        }
+                
 	if (Xflag) {
 		/*
 		 * Print the raw packet data in hex and ASCII.
@@ -1349,7 +2065,7 @@
 	ndo_default_print(gndo, bp, length);
 }
 
-#ifdef SIGINFO
+#ifdef SIGNAL_REQ_INFO
 RETSIGTYPE requestinfo(int signo _U_)
 {
 	if (infodelay)
@@ -1364,7 +2080,7 @@
  */
 #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;
 
@@ -1411,15 +2127,21 @@
 #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 [-aAbd" D_FLAG "efhH" I_FLAG J_FLAG "KlLnNOpqRStu" U_FLAG "vxX]" B_FLAG_USAGE " [ -c count ]\n", program_name);
 	(void)fprintf(stderr,
-"\t\t[ -E algo:secret ] [ -F file ] [ -i interface ] [ -M secret ]\n");
+"\t\t[ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ]\n");
 	(void)fprintf(stderr,
-"\t\t[ -r file ] [ -s snaplen ] [ -T type ] [ -w file ]\n");
+"\t\t[ -i interface ]" j_FLAG_USAGE " [ -M secret ]\n");
+#ifdef HAVE_PCAP_SETDIRECTION
 	(void)fprintf(stderr,
-"\t\t[ -W filecount ] [ -y datalinktype ] [ -Z user ]\n");
+"\t\t[ -Q in|out|inout ]\n");
+#endif
 	(void)fprintf(stderr,
-"\t\t[ expression ]\n");
+"\t\t[ -r file ] [ -s snaplen ] [ -T type ] [ -V file ] [ -w file ]\n");
+	(void)fprintf(stderr,
+"\t\t[ -W filecount ] [ -y datalinktype ] [ -z command ]\n");
+	(void)fprintf(stderr,
+"\t\t[ -Z user ] [ expression ]\n");
 	exit(1);
 }
 
diff --git a/telnet.h b/telnet.h
index da11043..33a07be 100644
--- a/telnet.h
+++ b/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/tests/.cvsignore b/tests/.cvsignore
deleted file mode 100644
index f097c8a..0000000
--- a/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/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 0000000..98d697f
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1,4 @@
+.failed
+.passed
+DIFF
+NEW
diff --git a/tests/02-sunrise-sunset-esp.puu b/tests/02-sunrise-sunset-esp.puu
deleted file mode 100644
index 0ceffc1..0000000
--- a/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/tests/08-sunrise-sunset-aes.puu b/tests/08-sunrise-sunset-aes.puu
deleted file mode 100644
index ec8793d..0000000
--- a/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/tests/08-sunrise-sunset-esp2.puu b/tests/08-sunrise-sunset-esp2.puu
deleted file mode 100644
index 4785f2b..0000000
--- a/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/tests/QinQpacket.out b/tests/QinQpacket.out
new file mode 100644
index 0000000..0ef7015
--- /dev/null
+++ b/tests/QinQpacket.out
@@ -0,0 +1,249 @@
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 (6f:6e:02:63:61:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 (6f:6e:02:63:61:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548
diff --git a/tests/QinQpacket.pcap b/tests/QinQpacket.pcap
new file mode 100644
index 0000000..eeabfe4
--- /dev/null
+++ b/tests/QinQpacket.pcap
Binary files differ
diff --git a/tests/QinQpacketv.out b/tests/QinQpacketv.out
new file mode 100644
index 0000000..03ed7cf
--- /dev/null
+++ b/tests/QinQpacketv.out
@@ -0,0 +1,1977 @@
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51417, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696a090, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51427, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696a090, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51435, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696a090, secs 12, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51451, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696a090, secs 28, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51482, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696a090, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51486, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696a090, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51493, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696a090, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51509, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696a090, secs 27, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51540, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696a015, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51551, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696a015, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51558, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696a015, secs 10, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51574, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696a015, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51605, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696a015, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51608, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696a015, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51616, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696a015, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51632, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696a015, secs 27, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51664, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969f99, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51675, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969f99, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51683, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969f99, secs 12, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51699, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969f99, secs 28, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51731, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969f99, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51734, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969f99, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51742, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969f99, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51757, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969f99, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51788, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969f1d, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 (6f:6e:02:63:61:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51802, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969f1d, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51809, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969f1d, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51824, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969f1d, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51855, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969f1d, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51859, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969f1d, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51867, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969f1d, secs 12, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51883, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969f1d, secs 28, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51915, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969e9e, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51925, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969e9e, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51932, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969e9e, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51947, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969e9e, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51979, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969e9e, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51983, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969e9e, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 51990, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969e9e, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52006, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969e9e, secs 27, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52037, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969e24, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52048, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969e24, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52056, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969e24, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52072, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969e24, secs 27, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52104, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969e24, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52107, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969e24, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52115, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969e24, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52130, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969e24, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52162, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969da7, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52167, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969da7, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52175, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969da7, secs 12, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52191, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969da7, secs 28, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52223, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969da7, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52227, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969da7, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52234, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969da7, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52250, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969da7, secs 27, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52281, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969d30, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52289, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969d30, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 (6f:6e:02:63:61:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52297, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969d30, secs 12, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52312, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969d30, secs 27, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52343, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969d30, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52347, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969d30, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52355, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969d30, secs 12, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52371, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969d30, secs 28, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52403, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969cb6, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52413, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969cb6, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52420, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969cb6, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52435, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969cb6, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52467, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969cb6, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52470, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969cb6, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52478, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969cb6, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52493, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969cb6, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52524, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969c3d, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52534, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969c3d, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52541, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969c3d, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52556, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969c3d, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52588, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969c3d, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52591, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969c3d, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52598, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969c3d, secs 10, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52613, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969c3d, secs 25, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52645, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969bc4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52649, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969bc4, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52656, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969bc4, secs 10, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52672, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969bc4, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52704, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969bc4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52708, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969bc4, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52715, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969bc4, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52731, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969bc4, secs 27, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52762, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969b4f, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52772, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969b4f, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52779, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969b4f, secs 10, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52794, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969b4f, secs 25, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52825, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969b4f, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52829, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969b4f, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52836, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969b4f, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52851, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969b4f, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52882, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969ad7, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52893, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969ad7, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52900, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969ad7, secs 10, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52915, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969ad7, secs 25, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52947, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969ad7, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52950, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969ad7, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52957, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969ad7, secs 10, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 52973, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969ad7, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53004, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969a5d, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53010, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969a5d, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53018, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969a5d, secs 12, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53034, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x96969a5d, secs 28, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53065, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969a5d, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53068, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969a5d, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53075, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969a5d, secs 10, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53090, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x96969a5d, secs 25, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53122, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x969699e7, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53134, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x969699e7, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53141, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x969699e7, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53156, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x969699e7, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53187, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x969699e7, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53191, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x969699e7, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53198, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x969699e7, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53214, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x969699e7, secs 27, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53246, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696996b, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 (03:6f:72:67:00:00) tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53250, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696996b, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53257, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696996b, secs 10, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53273, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696996b, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53304, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696996b, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53307, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696996b, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53314, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696996b, secs 10, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53329, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696996b, secs 25, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53360, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x969698f9, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53372, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x969698f9, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53379, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x969698f9, secs 10, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53395, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x969698f9, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53426, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x969698f9, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53430, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x969698f9, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53437, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x969698f9, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53453, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x969698f9, secs 27, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53485, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696987c, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53492, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696987c, secs 4, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53499, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696987c, secs 11, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 344: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53514, offset 0, flags [DF], proto UDP (17), length 326)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 298, xid 0x9696987c, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 64: vlan 200, p 0, ethertype ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 172.17.0.2 tell 172.17.0.20, length 46
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53545, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696987c, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53548, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696987c, secs 3, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53555, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696987c, secs 10, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
+00:08:5d:23:0c:3f > ff:ff:ff:ff:ff:ff, ethertype 802.1Q-QinQ (0x88a8), length 594: vlan 200, p 0, ethertype IPv4, (tos 0x0, ttl 32, id 53571, offset 0, flags [DF], proto UDP (17), length 576)
+    0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:08:5d:23:0c:3f, length 548, xid 0x9696987c, secs 26, Flags [none]
+	  Client-Ethernet-Address 00:08:5d:23:0c:3f
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    MSZ Option 57, length 2: 1500
+	    Parameter-Request Option 55, length 9: 
+	      Subnet-Mask, Default-Gateway, Domain-Name-Server, NTP
+	      Vendor-Option, Time-Zone, TFTP, Option 159
+	      Option 160
+	    Hostname Option 12, length 17: "6731i00085D230C3F"
+	    Vendor-Class Option 60, length 18: "AastraIPPhone6731i"
diff --git a/tests/TESTLIST b/tests/TESTLIST
new file mode 100644
index 0000000..8892b84
--- /dev/null
+++ b/tests/TESTLIST
@@ -0,0 +1,162 @@
+# Various flags applied to a TCP session.
+#
+# We cannot rely on, for example, "print-x.out" and
+# "print-X.out" being different files - we might be running
+# this on a case-insensitive file system, e.g. a Windows
+# file system or a case-insensitive HFS+ file system on
+# Mac OS X.
+#
+# Therefore, for "X" and "XX", we have "print-capX.out"
+# and "print-capXX.out".
+#
+print-x		print-flags.pcap	print-x.out	-t -x
+print-xx	print-flags.pcap	print-xx.out	-t -xx
+print-X		print-flags.pcap	print-capX.out	-t -X
+print-XX	print-flags.pcap	print-capXX.out	-t -XX
+print-A		print-flags.pcap	print-A.out	-t -A
+print-AA	print-flags.pcap	print-AA.out	-t -AA
+
+# BGP tests
+bgp_vpn_attrset bgp_vpn_attrset.pcap bgp_vpn_attrset.out -t -v 
+mpbgp-linklocal-nexthop mpbgp-linklocal-nexthop.pcap mpbgp-linklocal-nexthop.out -t -v
+
+# EAP tests
+eapon1 eapon1.pcap eapon1.out -t 
+
+# ESP tests
+esp0 02-sunrise-sunset-esp.pcap esp0.out -t -n
+esp1 02-sunrise-sunset-esp.pcap esp1.out -t -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758" 
+esp2 08-sunrise-sunset-esp2.pcap esp2.out -t -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840,0xabcdabcd@192.0.1.1 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043"
+esp3 02-sunrise-sunset-esp.pcap esp1.out -t -E "3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"
+esp4 08-sunrise-sunset-esp2.pcap esp2.out -t -E "file esp-secrets.txt"
+esp5 08-sunrise-sunset-aes.pcap esp5.out -t -E "file esp-secrets.txt"
+espudp1 espudp1.pcap                    espudp1.out -nnnn -t -E "file esp-secrets.txt"
+
+# ISAKMP tests
+isakmp1 isakmp-delete-segfault.pcap isakmp1.out -t 
+isakmp2 isakmp-pointer-loop.pcap    isakmp2.out -t
+isakmp3 isakmp-identification-segfault.pcap isakmp3.out -t -v
+isakmp4 isakmp4500.pcap             isakmp4.out -t -E "file esp-secrets.txt"
+
+# Link Management Protocol tests
+lmp		lmp.pcap		lmp.out -t -T lmp
+lmp-v		lmp.pcap		lmp-v.out -t -T lmp -v
+
+# MPLS tests
+mpls-ldp-hello	mpls-ldp-hello.pcap	mpls-ldp-hello.out -t -v
+
+# OSPF tests
+ospf-gmpls	ospf-gmpls.pcap		ospf-gmpls.out	-t -v
+
+# IKEv2 tests
+ikev2four	ikev2four.pcap		ikev2four.out	-t -v
+ikev2fourv	ikev2four.pcap		ikev2fourv.out	-t -v -v -v 
+ikev2fourv4	ikev2four.pcap		ikev2fourv4.out	-t -v -v -v -v
+ikev2pI2	ikev2pI2.pcap		ikev2pI2.out	-t -E "file ikev2pI2-secrets.txt" -v -v -v -v
+
+# IETF ROLL RPL packets
+dio01           dio.pcap                dio.out         -t -v
+
+# IPNET encapsulated site
+e1000g		e1000g.pcap		e1000g.out	-t
+
+# IETF FORCES WG packets and printer
+forces01        forces1.pcap            forces1.out     -t
+forces01vvv     forces1.pcap            forces1vvv.out  -t -v -v -v 
+forces01vvvv    forces1.pcap            forces1vvvv.out -t -v -v -v -v
+# need new pcap file, not sure what the differences were?
+#forces02        forces2.pcap            forces2.out     -t
+#forces02v       forces2.pcap            forces2v.out    -t -v
+#forces02vv      forces2.pcap            forces2vv.out   -t -v -v
+
+# 802.1ad, QinQ tests 
+qinq            QinQpacket.pcap         QinQpacket.out  -t -e
+qinqv           QinQpacket.pcap         QinQpacketv.out  -t -e -v
+
+# now SFLOW tests
+sflow1          sflow_multiple_counter_30_pdus.pcap     sflow_multiple_counter_30_pdus.out      -t -v
+sflow2          sflow_multiple_counter_30_pdus.pcap     sflow_multiple_counter_30_pdus-nv.out      -t
+
+# Babel tests
+babel1          babel.pcap             babel1.out      -t 
+babel1v         babel.pcap             babel1v.out     -t -v
+babel_auth      babel_auth.pcap        babel_auth.out  -t -v
+babel_pad1      babel_pad1.pcap        babel_pad1.out  -t
+
+# PPPoE tests
+pppoe           pppoe.pcap             pppoe.out       -t
+pppoes          pppoes.pcap            pppoes.out      -t
+pppoes_id       pppoes.pcap            pppoes_id.out   -t pppoes 0x3b
+
+# IGMP tests
+igmpv3-queries  igmpv3-queries.pcap     igmpv3-queries.out      -t
+
+# ICMPv6
+icmpv6          icmpv6.pcap             icmpv6.out      -t -vv
+
+# SPB tests
+spb	            spb.pcap	            spb.out -t
+
+# SPB BPDUv4 tests
+spb_bpduv4      spb_bpduv4.pcap       spb_bpduv4.out -t
+
+# DCB Tests
+dcb_ets         dcb_ets.pcap          dcb_ets.out   -t -vv
+dcb_pfc         dcb_pfc.pcap          dcb_pfc.out   -t -vv
+dcb_qcn         dcb_qcn.pcap          dcb_qcn.out   -t -vv
+
+# EVB tests
+evb             evb.pcap              evb.out       -t -vv
+
+# RIP tests
+ripv1v2         ripv1v2.pcap            ripv1v2.out     -t -v
+ripv2_auth      ripv2_auth.pcap         ripv2_auth.out  -t -v
+
+# DHCPv6 tests
+dhcpv6-aftr-name	dhcpv6-AFTR-Name-RFC6334.pcap	dhcpv6-AFTR-Name-RFC6334.out	-t -v
+dhcpv6-ia-na	dhcpv6-ia-na.pcap	dhcpv6-ia-na.out	-t -v
+dhcpv6-ia-pd	dhcpv6-ia-pd.pcap	dhcpv6-ia-pd.out	-t -v
+dhcpv6-ia-ta	dhcpv6-ia-ta.pcap	dhcpv6-ia-ta.out	-t -v
+dhcpv6-ntp-server	dhcpv6-ntp-server.pcap	dhcpv6-ntp-server.out	-t -v
+dhcpv6-sip-server-d	dhcpv6-sip-server-d.pcap	dhcpv6-sip-server-d.out -t -v
+dhcpv6-domain-list	dhcpv6-domain-list.pcap	dhcpv6-domain-list.out	-t -v
+
+# ZeroMQ/PGM tests
+# ZMTP/1.0 over TCP
+zmtp1v		zmtp1.pcap		zmtp1.out	-t -v -T zmtp1
+# native PGM
+pgmv		pgm_zmtp1.pcap		pgmv.out	-t -v
+# UDP-encapsulated PGM
+epgmv		epgm_zmtp1.pcap		epgmv.out	-t -v -T pgm
+# ZMTP/1.0 inside native PGM
+pgm_zmtp1v	pgm_zmtp1.pcap		pgm_zmtp1v.out	-t -v -T pgm_zmtp1
+# ZMTP/1.0 inside UDP-encapsulated PGM
+epgm_zmtp1v	epgm_zmtp1.pcap		epgm_zmtp1v.out	-t -v -T pgm_zmtp1
+
+# MS NLB tests
+msnlb		msnlb.pcap		msnlb.out	-t
+msnlb2		msnlb2.pcap		msnlb2.out	-t
+
+# MPTCP tests
+mptcp		mptcp.pcap		mptcp.out		-t
+mptcp-fclose	mptcp-fclose.pcap	mptcp-fclose.out	-t
+# TFO tests
+tfo		tfo-5c1fa7f9ae91.pcap	tfo.out		-t
+
+# IEEE 802.11 tests
+802.11_exthdr	ieee802.11_exthdr.pcap	ieee802.11_exthdr.out	-t -v
+802.11_rx-stbc	ieee802.11_rx-stbc.pcap	ieee802.11_rx-stbc.out	-t
+
+# OpenFlow tests
+of10_p3295-vv	of10_p3295.pcap		of10_p3295-vv.out	-t -vv
+of10_s4810-vvvv	of10_s4810.pcap		of10_s4810-vvvv.out	-t -vvvv
+of10_pf5240-vv	of10_pf5240.pcap	of10_pf5240-vv.out	-t -vv
+
+# GeoNetworking and CALM FAST tests
+geonet-calm-fast	geonet_and_calm_fast.pcap	geonet_and_calm_fast.out	-t -vv -n
+
+# NFLOG test case
+nflog-e		nflog.pcap		nflog-e.out		-t -e
+
+# syslog test case
+syslog-v	syslog_udp.pcap		syslog-v.out		-t -v
diff --git a/tests/TESTonce b/tests/TESTonce
new file mode 100755
index 0000000..c5bcb34
--- /dev/null
+++ b/tests/TESTonce
@@ -0,0 +1,39 @@
+#!/usr/bin/perl
+
+$debug = 0;
+system("mkdir -p NEW DIFF");
+
+if(@ARGV == 1) {
+  open(TESTLIST, "TESTLIST") || die "can not open TESTLIST: $!\n";
+  $wanted = $ARGV[0];
+  #print "Searching for test case $wanted\n";
+  while(<TESTLIST>) {
+    #print "Processing $_\n";
+    next unless (/^$wanted/);
+
+    chop;
+    ($name,$input,$output,$options)=split(/\s+/,$_, 4);
+    last;
+  }
+  close(TESTLIST);
+
+  die "Can not find test $wanted\n" unless defined($input);
+
+} elsif(@ARGV == 4) {
+  $name=$ARGV[0];
+  $input=$ARGV[1];
+  $output=$ARGV[2];
+  $options=$ARGV[3];
+} else {
+  print "Usage: TESTonce name [input output options]\n";
+  exit 20;
+}
+
+print "Running $name. \n" if $debug;
+print "   Input: $input, OUTPUT: $output, OPTIONS: $options\n" if $debug;
+
+print "    ";
+exec("../tcpdump 2>/dev/null -n -r $input $options | tee NEW/$output | diff -w - $output >DIFF/$output.diff");
+@cores = glob("core*");
+exit 10 if (@cores > 0);
+exit 0;
diff --git a/tests/TESTrun.sh b/tests/TESTrun.sh
new file mode 100755
index 0000000..d1baaa7
--- /dev/null
+++ b/tests/TESTrun.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+mkdir -p NEW
+mkdir -p DIFF
+passed=0
+failed=0
+cat /dev/null > failure-outputs.txt
+
+# first run any specific tests.
+for i in *.sh
+do
+  case $i in TEST*.sh) continue;; esac
+
+  if sh ./$i >DIFF/$i.result
+  then
+      echo $i: passed.
+      rm -f DIFF/$i.result
+      passed=`expr $passed + 1`
+  else
+      echo $i: failed.
+      failed=`expr $failed + 1`
+  fi          
+done 
+
+echo $passed >.passed
+echo $failed >.failed
+
+# now run typical tests
+cat TESTLIST | while read name input output options
+do
+  case $name in
+      \#*) continue;;
+      '') continue;;
+  esac
+
+  if ./TESTonce $name $input $output "$options"
+  then
+      echo $name: passed.
+      rm -f DIFF/$output.diff
+      passed=`expr $passed + 1`
+      echo $passed >.passed
+  else
+      echo $name: failed.
+      failed=`expr $failed + 1`
+      echo $failed >.failed
+      echo "Failed test: $name" >> failure-outputs.txt
+      echo >> failure-outputs.txt
+      cat DIFF/$output.diff >> failure-outputs.txt
+      echo >> failure-outputs.txt
+  fi
+done 
+
+# I hate shells with their stupid, useless subshells.
+passed=`cat .passed`
+failed=`cat .failed`
+
+# exit with number of failing tests.
+echo 
+echo
+printf "%4u tests failed\n" $failed
+printf "%4u tests passed\n" $passed
+echo
+echo
+cat failure-outputs.txt
+echo
+echo
+exit $failed      
+
+
+
+
diff --git a/tests/alltests.sh b/tests/alltests.sh
deleted file mode 100644
index 7df2599..0000000
--- a/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/tests/babel.pcap b/tests/babel.pcap
new file mode 100644
index 0000000..a9ab2b8
--- /dev/null
+++ b/tests/babel.pcap
Binary files differ
diff --git a/tests/babel1.out b/tests/babel1.out
new file mode 100644
index 0000000..2243847
--- /dev/null
+++ b/tests/babel1.out
@@ -0,0 +1,25 @@
+IP6 fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: babel 2 (8) hello
+IP6 fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: babel 2 (8) hello
+IP6 fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: babel 2 (110) update/prefix/id nh update update/prefix/id update update
+IP6 fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: babel 2 (24) hello ihu
+IP6 fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: babel 2 (8) hello
+IP6 fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: babel 2 (8) hello
+IP6 fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: babel 2 (24) hello ihu
+IP6 fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: babel 2 (8) hello
+IP6 fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: babel 2 (8) hello
+IP6 fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: babel 2 (52) update/prefix/id update/prefix update/prefix
+IP6 fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: babel 2 (32) mh-request
+IP6 fe80::68d3:1235:d068:1f9e.5359 > ff02::cca6:c0f9:e182:5359.5359: UDP, length 42
+IP6 fe80::68d3:1235:d068:1f9e.5359 > ff02::cca6:c0f9:e182:5359.5359: UDP, length 42
+IP6 fe80::3428:af91:251:d626.5359 > fe80::68d3:1235:d068:1f9e.5359: UDP, length 180
+IP6 fe80::68d3:1235:d068:1f9e.5359 > ff02::cca6:c0f9:e182:5359.5359: UDP, length 42
+IP6 fe80::3428:af91:251:d626.5359 > ff02::cca6:c0f9:e182:5359.5359: UDP, length 42
+IP6 fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: babel 2 (28) update/prefix/id
+IP6 fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: babel 2 (32) mh-request
+IP6 fe80::3428:af91:251:d626.5359 > fe80::68d3:1235:d068:1f9e.5359: UDP, length 180
+IP6 fe80::68d3:1235:d068:1f9e.5359 > ff02::cca6:c0f9:e182:5359.5359: UDP, length 42
+IP6 fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: babel 2 (24) hello ihu
+IP6 fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: babel 2 (28) update/prefix/id
+IP6 fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: babel 2 (32) mh-request
+IP6 fe80::3428:af91:251:d626.5359 > fe80::68d3:1235:d068:1f9e.5359: UDP, length 180
+IP6 fe80::68d3:1235:d068:1f9e > ff02::16: HBH ICMP6, multicast listener report v2, 2 group record(s), length 48
diff --git a/tests/babel1v.out b/tests/babel1v.out
new file mode 100644
index 0000000..c8d85ee
--- /dev/null
+++ b/tests/babel1v.out
@@ -0,0 +1,51 @@
+IP6 (hlim 1, next-header UDP (17) payload length: 20) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (8)
+	Hello seqno 8042 interval 200.0s
+IP6 (hlim 1, next-header UDP (17) payload length: 20) fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (8)
+	Hello seqno 40102 interval 200.0s
+IP6 (hlim 1, next-header UDP (17) payload length: 122) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (110)
+	Update/prefix/id 2001:660:3301:8063:218:84ff:fe1a:615d/128 metric 1 seqno 32272 interval 800.0s sub-diversity 6
+	Next Hop 192.168.4.25
+	Update 192.168.4.195/32 metric 1 seqno 32272 interval 800.0s sub-diversity 6
+	Update/prefix/id 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 0 seqno 40149 interval 800.0s sub-diversity empty
+	Update ::/0 metric 196 seqno 40149 interval 800.0s sub-diversity empty
+	Update 192.168.4.25/32 metric 0 seqno 40149 interval 800.0s sub-diversity empty
+IP6 (hlim 1, next-header UDP (17) payload length: 36) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (24)
+	Hello seqno 8043 interval 200.0s
+	IHU fe80::3428:af91:251:d626 txcost 96 interval 600.0s
+IP6 (hlim 1, next-header UDP (17) payload length: 20) fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (8)
+	Hello seqno 40103 interval 200.0s
+IP6 (hlim 1, next-header UDP (17) payload length: 20) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (8)
+	Hello seqno 8044 interval 200.0s
+IP6 (hlim 1, next-header UDP (17) payload length: 36) fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (24)
+	Hello seqno 40104 interval 200.0s
+	IHU fe80::68d3:1235:d068:1f9e txcost 96 interval 600.0s
+IP6 (hlim 1, next-header UDP (17) payload length: 20) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (8)
+	Hello seqno 8045 interval 200.0s
+IP6 (hlim 1, next-header UDP (17) payload length: 20) fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (8)
+	Hello seqno 40105 interval 200.0s
+IP6 (hlim 1, next-header UDP (17) payload length: 64) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (52)
+	Update/prefix/id 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 800.0s
+	Update/prefix 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 800.0s
+	Update/prefix 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 800.0s
+IP6 (hlim 1, next-header UDP (17) payload length: 44) fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (32)
+	MH-Request (127 hops) for 2001:660:3301:8063:218:f3ff:fea9:914e/128 seqno 40150 id 02:18:f3:ff:fe:a9:91:4e
+IP6 (hlim 1, next-header UDP (17) payload length: 50) fe80::68d3:1235:d068:1f9e.5359 > ff02::cca6:c0f9:e182:5359.5359: [udp sum ok] UDP, length 42
+IP6 (hlim 1, next-header UDP (17) payload length: 50) fe80::68d3:1235:d068:1f9e.5359 > ff02::cca6:c0f9:e182:5359.5359: [udp sum ok] UDP, length 42
+IP6 (hlim 64, next-header UDP (17) payload length: 188) fe80::3428:af91:251:d626.5359 > fe80::68d3:1235:d068:1f9e.5359: [udp sum ok] UDP, length 180
+IP6 (hlim 1, next-header UDP (17) payload length: 50) fe80::68d3:1235:d068:1f9e.5359 > ff02::cca6:c0f9:e182:5359.5359: [udp sum ok] UDP, length 42
+IP6 (hlim 1, next-header UDP (17) payload length: 50) fe80::3428:af91:251:d626.5359 > ff02::cca6:c0f9:e182:5359.5359: [udp sum ok] UDP, length 42
+IP6 (hlim 1, next-header UDP (17) payload length: 40) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (28)
+	Update/prefix/id 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 800.0s
+IP6 (hlim 1, next-header UDP (17) payload length: 44) fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (32)
+	MH-Request (127 hops) for 2001:660:3301:8063:218:f3ff:fea9:914e/128 seqno 40150 id 02:18:f3:ff:fe:a9:91:4e
+IP6 (hlim 64, next-header UDP (17) payload length: 188) fe80::3428:af91:251:d626.5359 > fe80::68d3:1235:d068:1f9e.5359: [udp sum ok] UDP, length 180
+IP6 (hlim 1, next-header UDP (17) payload length: 50) fe80::68d3:1235:d068:1f9e.5359 > ff02::cca6:c0f9:e182:5359.5359: [udp sum ok] UDP, length 42
+IP6 (hlim 1, next-header UDP (17) payload length: 36) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (24)
+	Hello seqno 8046 interval 200.0s
+	IHU fe80::3428:af91:251:d626 txcost 96 interval 600.0s
+IP6 (hlim 1, next-header UDP (17) payload length: 40) fe80::68d3:1235:d068:1f9e.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (28)
+	Update/prefix/id 2001:660:3301:8063:218:f3ff:fea9:914e/128 metric 65535 seqno 40149 interval 800.0s
+IP6 (hlim 1, next-header UDP (17) payload length: 44) fe80::3428:af91:251:d626.6697 > ff02::1:6.6697: [udp sum ok] babel 2 (32)
+	MH-Request (127 hops) for 2001:660:3301:8063:218:f3ff:fea9:914e/128 seqno 40150 id 02:18:f3:ff:fe:a9:91:4e
+IP6 (hlim 64, next-header UDP (17) payload length: 188) fe80::3428:af91:251:d626.5359 > fe80::68d3:1235:d068:1f9e.5359: [udp sum ok] UDP, length 180
+IP6 (hlim 1, next-header Options (0) payload length: 56) fe80::68d3:1235:d068:1f9e > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 2 group record(s) [gaddr ff02::1:6 to_ex, 0 source(s)] [gaddr ff02::cca6:c0f9:e182:5359 to_ex, 0 source(s)]
diff --git a/tests/babel_auth.out b/tests/babel_auth.out
new file mode 100644
index 0000000..56ca7fd
--- /dev/null
+++ b/tests/babel_auth.out
@@ -0,0 +1,13 @@
+IP6 (class 0xc0, hlim 1, next-header UDP (17) payload length: 436) fe80::b299:28ff:fec8:d646.6696 > ff02::1:6.6696: [udp sum ok] babel 2 (424)
+	Hello seqno 58134 interval 40.0s
+	Update/id ::/0 metric 65535 seqno 41391 interval infinity
+	Request for any
+	TS/PC timestamp 1339081200 packetcounter 2
+	HMAC key-id 30 digest-20 AD0FA7CD8D5A1898EC5409C8EDDA68B3ACA21B80
+	HMAC key-id 50 digest-32 8239F283D985047FA4B88597FDE3246455C6E4DD917B1441C2F3A82B9F737674
+	HMAC key-id 1000 digest-64 6718CB4C2BB0976C127AB3CCCBFA1105A1D158F035BC9FAD86B0610A7ACD27E5A3D5A3090FFB0312D7CBB31834E5D3EA2B68CD1FEC3CFB9CE731D16BA8FEBA8C
+	HMAC key-id 1000 digest-48 D2A5B80FF9D006907E3B6601C0C255D7D12D6EC61815E413A334E2A0D9271C75AFBC086C070C714E3EFF3496C20C56FB
+	HMAC key-id 100 digest-20 7213CED66FE7154034EC64CD14AE4142A092DF33
+	HMAC key-id 2000 digest-64 2A5D9D55393B19E440FAC49BDA521E18A7FE77F7AB4A90377009E46E2FFE49336435C7E4E7BE215996DF4F59C167EA1CCCDB4FF788DA29A30E34D974307ADFF4
+	HMAC key-id 2000 digest-48 FE91AF27EEE137EF489F37FEE449100CDA8CCB3E794D0C4A225D12724A8CE2FFC85811B879CC566FD172269847091ED1
+	HMAC key-id 3000 digest-64 38C4D82883A5778500D728D1E243E7579DE96FA726C9DB7F0805C52E96FEFDCE7A5FB9AF2CB845703926EAAB43C3E44989D6CCB158FC06DB455E9F8D0550B54F
diff --git a/tests/babel_auth.pcap b/tests/babel_auth.pcap
new file mode 100644
index 0000000..941e628
--- /dev/null
+++ b/tests/babel_auth.pcap
Binary files differ
diff --git a/tests/babel_pad1.out b/tests/babel_pad1.out
new file mode 100644
index 0000000..c42f2eb
--- /dev/null
+++ b/tests/babel_pad1.out
@@ -0,0 +1,2 @@
+IP6 fe80::b299:28ff:fec8:d646.6696 > ff02::1:6.6696: babel 2 (9) hello pad1
+IP6 fe80::b299:28ff:fec8:d646.6696 > ff02::1:6.6696: babel 2 (60) hello pad1 nh pad1 router-id pad1 update pad1 update pad1
diff --git a/tests/babel_pad1.pcap b/tests/babel_pad1.pcap
new file mode 100644
index 0000000..0e87911
--- /dev/null
+++ b/tests/babel_pad1.pcap
Binary files differ
diff --git a/tests/bgp_vpn_attrset.out b/tests/bgp_vpn_attrset.out
index 7fb12ae..a0a9f1c 100644
--- a/tests/bgp_vpn_attrset.out
+++ b/tests/bgp_vpn_attrset.out
@@ -1,10 +1,11 @@
-IP (tos 0xc0, ttl  62, id 58628, offset 0, flags [none], proto: TCP (6), length: 173) 12.4.4.4.2051 > 12.1.1.1.179: P, cksum 0xcf18 (correct), 3293077573:3293077694(121) ack 3348108582 win 16384 <nop,nop,timestamp 383131 890299>: BGP, length: 121
+IP (tos 0xc0, ttl 62, id 58628, offset 0, flags [none], proto TCP (6), length 173)
+    12.4.4.4.2051 > 12.1.1.1.179: Flags [P.], cksum 0xcf18 (correct), seq 3293077573:3293077694, ack 3348108582, win 16384, options [nop,nop,TS val 383131 ecr 890299], length 121: BGP, length: 121
 	Update Message (2), length: 121
 	  Origin (1), length: 1, Flags [T]: IGP
 	  AS Path (2), length: 0, Flags [T]: empty
 	  Local Preference (5), length: 4, Flags [T]: 100
 	  Extended Community (16), length: 8, Flags [OT]: 
-	    target (0x0002), Flags [none]: 300:0.0.1.44
+	    target (0x0002), Flags [none]: 300:300 (= 0.0.1.44)
 	  Attribute Set (128), length: 36, Flags [OT]: 
 	    Origin AS: 65001
 	      Origin (1), length: 1, Flags [T]: IGP
@@ -14,5 +15,5 @@
 	      Cluster List (10), length: 4, Flags [O]: 22.5.5.5
 	  Multi-Protocol Reach NLRI (14), length: 30, Flags [OE]: 
 	    AFI: IPv4 (1), SAFI: labeled VPN Unicast (128)
-	    nexthop: RD: 0:0.0.0.0, 12.4.4.4, nh-length: 12, no SNPA
-	      RD: 500:0.0.1.244, 133.0.0.0/8, label:100208 (bottom)
+	    nexthop: RD: 0:0 (= 0.0.0.0), 12.4.4.4, nh-length: 12, no SNPA
+	      RD: 500:500 (= 0.0.1.244), 133.0.0.0/8, label:100208 (bottom)
diff --git a/tests/bgp_vpn_attrset.sh b/tests/bgp_vpn_attrset.sh
deleted file mode 100755
index c32872c..0000000
--- a/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/tests/dcb_ets.out b/tests/dcb_ets.out
new file mode 100644
index 0000000..c9a94a7
--- /dev/null
+++ b/tests/dcb_ets.out
@@ -0,0 +1,1923 @@
+IP6 (hlim 1, next-header Options (0) payload length: 36) fe80::a00:27ff:fe46:e884 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 1 group record(s) [gaddr ff02::1:ff00:0 to_ex { }]
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xd60c7466, secs 13, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xd60c7466, secs 24, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xd60c7466, secs 36, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+IP6 (hlim 1, next-header Options (0) payload length: 76) :: > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 3 group record(s) [gaddr ff02::1:ff46:e884 to_ex { }] [gaddr ff02::2 to_ex { }] [gaddr ff02::202 to_ex { }]
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0x3c41e764, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+IP6 (hlim 255, next-header ICMPv6 (58) payload length: 24) :: > ff02::1:ff46:e884: [icmp6 sum ok] ICMP6, neighbor solicitation, length 24, who has fe80::a00:27ff:fe46:e884
+IP6 (hlim 255, next-header ICMPv6 (58) payload length: 16) fe80::a00:27ff:fe46:e884 > ff02::2: [icmp6 sum ok] ICMP6, router solicitation, length 16
+	  source link-address option (1), length 8 (1): 08:00:27:46:e8:84
+	    0x0000:  0800 2746 e884
+IP6 (hlim 1, next-header Options (0) payload length: 96) fe80::a00:27ff:fe46:e884 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 4 group record(s) [gaddr ff02::1:ff00:0 to_ex { }] [gaddr ff02::1:ff46:e884 to_ex { }] [gaddr ff02::2 to_ex { }] [gaddr ff02::202 to_ex { }]
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+IP6 (hlim 1, next-header Options (0) payload length: 76) :: > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 3 group record(s) [gaddr ff02::1:ff42:ba59 to_ex { }] [gaddr ff02::2 to_ex { }] [gaddr ff02::202 to_ex { }]
+IP6 (hlim 255, next-header ICMPv6 (58) payload length: 24) :: > ff02::1:ff42:ba59: [icmp6 sum ok] ICMP6, neighbor solicitation, length 24, who has fe80::a00:27ff:fe42:ba59
+IP6 (hlim 1, next-header Options (0) payload length: 96) fe80::a00:27ff:fe42:ba59 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 4 group record(s) [gaddr ff02::1:ff00:0 to_ex { }] [gaddr ff02::1:ff42:ba59 to_ex { }] [gaddr ff02::2 to_ex { }] [gaddr ff02::202 to_ex { }]
+IP6 (hlim 1, next-header Options (0) payload length: 36) fe80::a00:27ff:fe46:e884 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 1 group record(s) [gaddr ff02::1:ff00:0 to_ex { }]
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0x3c41e764, secs 8, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+IP6 (hlim 1, next-header Options (0) payload length: 36) fe80::a00:27ff:fe42:ba59 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 1 group record(s) [gaddr ff02::1:ff00:0 to_ex { }]
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0x3c41e764, secs 20, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0x3c41e764, secs 41, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+IP6 (hlim 1, next-header Options (0) payload length: 76) :: > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 3 group record(s) [gaddr ff02::1:ff46:e884 to_ex { }] [gaddr ff02::2 to_ex { }] [gaddr ff02::202 to_ex { }]
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xc1fb0d77, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+IP6 (hlim 255, next-header ICMPv6 (58) payload length: 24) :: > ff02::1:ff46:e884: [icmp6 sum ok] ICMP6, neighbor solicitation, length 24, who has fe80::a00:27ff:fe46:e884
+IP6 (hlim 255, next-header ICMPv6 (58) payload length: 16) fe80::a00:27ff:fe46:e884 > ff02::2: [icmp6 sum ok] ICMP6, router solicitation, length 16
+	  source link-address option (1), length 8 (1): 08:00:27:46:e8:84
+	    0x0000:  0800 2746 e884
+IP6 (hlim 1, next-header Options (0) payload length: 96) fe80::a00:27ff:fe46:e884 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 4 group record(s) [gaddr ff02::1:ff00:0 to_ex { }] [gaddr ff02::1:ff46:e884 to_ex { }] [gaddr ff02::2 to_ex { }] [gaddr ff02::202 to_ex { }]
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xc1fb0d77, secs 3, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+IP6 (hlim 1, next-header Options (0) payload length: 36) fe80::a00:27ff:fe46:e884 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 1 group record(s) [gaddr ff02::1:ff00:0 to_ex { }]
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  15  15  15  15  15  15  15 
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c209 00ff ffff ff00 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  15  15  15  15  15  15  15 
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c20a 00ff ffff ff00 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  15  15  15  15  15  15  15 
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c209 00ff ffff ff00 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  15  15  15  15  15  15  15 
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c20a 00ff ffff ff00 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	End TLV (0), length 0
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xc1fb0d77, secs 11, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xc1fb0d77, secs 23, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xc1fb0d77, secs 36, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  1   15  15  15  1   15  1  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c209 00f1 fff1 f100 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  1   15  15  15  1   15  1  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c20a 00f1 fff1 f100 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  1   15  15  15  1   15  1  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c209 00f1 fff1 f100 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  1   15  15  15  1   15  1  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c20a 00f1 fff1 f100 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+IP6 (hlim 1, next-header Options (0) payload length: 76) :: > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 3 group record(s) [gaddr ff02::1:ff46:e884 to_ex { }] [gaddr ff02::2 to_ex { }] [gaddr ff02::202 to_ex { }]
+IP6 (hlim 255, next-header ICMPv6 (58) payload length: 24) :: > ff02::1:ff46:e884: [icmp6 sum ok] ICMP6, neighbor solicitation, length 24, who has fe80::a00:27ff:fe46:e884
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xf0059f6c, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+IP6 (hlim 255, next-header ICMPv6 (58) payload length: 16) fe80::a00:27ff:fe46:e884 > ff02::2: [icmp6 sum ok] ICMP6, router solicitation, length 16
+	  source link-address option (1), length 8 (1): 08:00:27:46:e8:84
+	    0x0000:  0800 2746 e884
+IP6 (hlim 1, next-header Options (0) payload length: 96) fe80::a00:27ff:fe46:e884 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 4 group record(s) [gaddr ff02::1:ff00:0 to_ex { }] [gaddr ff02::1:ff46:e884 to_ex { }] [gaddr ff02::2 to_ex { }] [gaddr ff02::202 to_ex { }]
+IP6 (hlim 1, next-header Options (0) payload length: 36) fe80::a00:27ff:fe46:e884 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 1 group record(s) [gaddr ff02::1:ff00:0 to_ex { }]
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xf0059f6c, secs 5, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xf0059f6c, secs 17, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  15  15  15  15  15  15  15 
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c209 00ff ffff ff00 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  15  15  15  15  15  15  15 
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c20a 00ff ffff ff00 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  15  15  15  15  15  15  15 
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c209 00ff ffff ff00 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  15  15  15  15  15  15  15 
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c20a 00ff ffff ff00 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xf0059f6c, secs 36, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  15  1   1   15  15  1   15 
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c209 00ff 11ff 1f00 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  15  1   1   15  15  1   15 
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c20a 00ff 11ff 1f00 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  15  1   1   15  15  1   15 
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c209 00ff 11ff 1f00 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  15  1   1   15  15  1   15 
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   0   0   0   0   0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   0   0   0   0   0   0   0  
+	  0x0000:  0080 c20a 00ff 11ff 1f00 0000 0000 0000
+	  0x0010:  0000 0000 0000 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
+LLDP, length 135
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Configuration Subtype (9)
+	    Willing:0, CBS:0, RES:0, Max TCs:0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c209 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	Organization specific TLV (127), length 25: OUI Ethernet bridged (0x0080c2)
+	  ETS Recommendation Subtype (10)
+	    RES: 0
+	    Priority Assignment Table
+	     Priority : 0   1   2   3   4   5   6   7
+	     Value    : 15  4   1   1   15  4   1   4  
+	    TC Bandwidth Table
+	     TC%   : 0   1   2   3   4   5   6   7
+	     Value : 0   50  0   0   50  0   0   0  
+	    TSA Assignment Table
+	     Traffic Class: 0   1   2   3   4   5   6   7
+	     Value        : 0   2   0   0   2   0   0   0  
+	  0x0000:  0080 c20a 00f4 11f4 1400 3200 0032 0000
+	  0x0010:  0000 0200 0002 0000 00
+	End TLV (0), length 0
diff --git a/tests/dcb_ets.pcap b/tests/dcb_ets.pcap
new file mode 100644
index 0000000..995887b
--- /dev/null
+++ b/tests/dcb_ets.pcap
Binary files differ
diff --git a/tests/dcb_pfc.out b/tests/dcb_pfc.out
new file mode 100644
index 0000000..005b0c1
--- /dev/null
+++ b/tests/dcb_pfc.out
@@ -0,0 +1,148 @@
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0x85bfaf7d, secs 31, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+LLDP, length 87
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Priority Flow Control Configuration Subtype (11)
+	    Willing: 0, MBC: 0, RES: 0, PFC cap:4 
+	    PFC Enable
+	     Priority : 0  1  2  3  4  5  6  7
+	     Value    : 0  0  1  0  1  1  0  0  
+	  0x0000:  0080 c20b 0434
+	End TLV (0), length 0
+LLDP, length 87
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Priority Flow Control Configuration Subtype (11)
+	    Willing: 0, MBC: 0, RES: 0, PFC cap:4 
+	    PFC Enable
+	     Priority : 0  1  2  3  4  5  6  7
+	     Value    : 0  0  1  0  1  1  0  0  
+	  0x0000:  0080 c20b 0434
+	End TLV (0), length 0
+LLDP, length 87
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Priority Flow Control Configuration Subtype (11)
+	    Willing: 0, MBC: 0, RES: 0, PFC cap:4 
+	    PFC Enable
+	     Priority : 0  1  2  3  4  5  6  7
+	     Value    : 0  0  1  0  1  1  0  0  
+	  0x0000:  0080 c20b 0434
+	End TLV (0), length 0
+LLDP, length 87
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Priority Flow Control Configuration Subtype (11)
+	    Willing: 0, MBC: 0, RES: 0, PFC cap:4 
+	    PFC Enable
+	     Priority : 0  1  2  3  4  5  6  7
+	     Value    : 0  0  1  0  1  1  0  0  
+	  0x0000:  0080 c20b 0434
+	End TLV (0), length 0
diff --git a/tests/dcb_pfc.pcap b/tests/dcb_pfc.pcap
new file mode 100644
index 0000000..c777a33
--- /dev/null
+++ b/tests/dcb_pfc.pcap
Binary files differ
diff --git a/tests/dcb_qcn.out b/tests/dcb_qcn.out
new file mode 100644
index 0000000..747df9b
--- /dev/null
+++ b/tests/dcb_qcn.out
@@ -0,0 +1,363 @@
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xfddb5251, secs 7, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xfddb5251, secs 17, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+LLDP, length 86
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 5: OUI Ethernet bridged (0x0080c2)
+	  Application Priority Subtype (12)
+	    RES: 0
+	  0x0000:  0080 c20c 00
+	End TLV (0), length 0
+LLDP, length 86
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 5: OUI Ethernet bridged (0x0080c2)
+	  Application Priority Subtype (12)
+	    RES: 0
+	  0x0000:  0080 c20c 00
+	End TLV (0), length 0
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xfddb5251, secs 25, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+LLDP, length 94
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Congestion Notification Subtype (8)
+	    Pre-Priority CNPV Indicator
+	     Priority : 0  1  2  3  4  5  6  7
+	     Value    : 0  0  0  0  0  1  0  0  
+	    Pre-Priority Ready Indicator
+	     Priority : 0  1  2  3  4  5  6  7
+	     Value    : 0  0  0  0  0  0  0  0  
+	  0x0000:  0080 c208 2000
+	Organization specific TLV (127), length 5: OUI Ethernet bridged (0x0080c2)
+	  Application Priority Subtype (12)
+	    RES: 0
+	  0x0000:  0080 c20c 00
+	End TLV (0), length 0
+LLDP, length 94
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Congestion Notification Subtype (8)
+	    Pre-Priority CNPV Indicator
+	     Priority : 0  1  2  3  4  5  6  7
+	     Value    : 0  0  0  0  0  1  0  0  
+	    Pre-Priority Ready Indicator
+	     Priority : 0  1  2  3  4  5  6  7
+	     Value    : 0  0  0  0  0  0  0  0  
+	  0x0000:  0080 c208 2000
+	Organization specific TLV (127), length 5: OUI Ethernet bridged (0x0080c2)
+	  Application Priority Subtype (12)
+	    RES: 0
+	  0x0000:  0080 c20c 00
+	End TLV (0), length 0
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xfddb5251, secs 40, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+IP6 (hlim 1, next-header Options (0) payload length: 76) :: > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 3 group record(s) [gaddr ff02::1:ff46:e884 to_ex { }] [gaddr ff02::2 to_ex { }] [gaddr ff02::202 to_ex { }]
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xbb58bf40, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+IP6 (hlim 255, next-header ICMPv6 (58) payload length: 24) :: > ff02::1:ff46:e884: [icmp6 sum ok] ICMP6, neighbor solicitation, length 24, who has fe80::a00:27ff:fe46:e884
+IP6 (hlim 255, next-header ICMPv6 (58) payload length: 16) fe80::a00:27ff:fe46:e884 > ff02::2: [icmp6 sum ok] ICMP6, router solicitation, length 16
+	  source link-address option (1), length 8 (1): 08:00:27:46:e8:84
+	    0x0000:  0800 2746 e884
+IP6 (hlim 1, next-header Options (0) payload length: 96) fe80::a00:27ff:fe46:e884 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 4 group record(s) [gaddr ff02::1:ff00:0 to_ex { }] [gaddr ff02::1:ff46:e884 to_ex { }] [gaddr ff02::2 to_ex { }] [gaddr ff02::202 to_ex { }]
+LLDP, length 86
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 5: OUI Ethernet bridged (0x0080c2)
+	  Application Priority Subtype (12)
+	    RES: 0
+	  0x0000:  0080 c20c 00
+	End TLV (0), length 0
+LLDP, length 86
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:42:ba:59
+	  0x0000:  0408 0027 42ba 59
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:42:ba:59
+	  0x0000:  0308 0027 42ba 59
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 5: OUI Ethernet bridged (0x0080c2)
+	  Application Priority Subtype (12)
+	    RES: 0
+	  0x0000:  0080 c20c 00
+	End TLV (0), length 0
+IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)
+    0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 08:00:27:46:e8:84, length 300, xid 0xbb58bf40, secs 7, Flags [none] (0x0000)
+	  Client-Ethernet-Address 08:00:27:46:e8:84
+	  Vendor-rfc1048 Extensions
+	    Magic Cookie 0x63825363
+	    DHCP-Message Option 53, length 1: Discover
+	    Parameter-Request Option 55, length 17: 
+	      Subnet-Mask, BR, Time-Zone, Classless-Static-Route
+	      Domain-Name, Domain-Name-Server, Hostname, YD
+	      YS, NTP, MTU, Option 119
+	      Default-Gateway, Classless-Static-Route, Classless-Static-Route-Microsoft, Option 252
+	      NTP
+IP6 (hlim 1, next-header Options (0) payload length: 36) fe80::a00:27ff:fe46:e884 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 1 group record(s) [gaddr ff02::1:ff00:0 to_ex { }]
+LLDP, length 94
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Congestion Notification Subtype (8)
+	    Pre-Priority CNPV Indicator
+	     Priority : 0  1  2  3  4  5  6  7
+	     Value    : 0  0  0  0  0  1  0  0  
+	    Pre-Priority Ready Indicator
+	     Priority : 0  1  2  3  4  5  6  7
+	     Value    : 0  0  0  0  0  0  0  0  
+	  0x0000:  0080 c208 2000
+	Organization specific TLV (127), length 5: OUI Ethernet bridged (0x0080c2)
+	  Application Priority Subtype (12)
+	    RES: 0
+	  0x0000:  0080 c20c 00
+	End TLV (0), length 0
+LLDP, length 94
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 00
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Congestion Notification Subtype (8)
+	    Pre-Priority CNPV Indicator
+	     Priority : 0  1  2  3  4  5  6  7
+	     Value    : 0  0  0  0  0  1  0  0  
+	    Pre-Priority Ready Indicator
+	     Priority : 0  1  2  3  4  5  6  7
+	     Value    : 0  0  0  0  0  0  0  0  
+	  0x0000:  0080 c208 2000
+	Organization specific TLV (127), length 5: OUI Ethernet bridged (0x0080c2)
+	  Application Priority Subtype (12)
+	    RES: 0
+	  0x0000:  0080 c20c 00
+	End TLV (0), length 0
diff --git a/tests/dcb_qcn.pcap b/tests/dcb_qcn.pcap
new file mode 100644
index 0000000..9034d7c
--- /dev/null
+++ b/tests/dcb_qcn.pcap
Binary files differ
diff --git a/tests/dhcpv6-AFTR-Name-RFC6334.out b/tests/dhcpv6-AFTR-Name-RFC6334.out
new file mode 100644
index 0000000..13f6a4f
--- /dev/null
+++ b/tests/dhcpv6-AFTR-Name-RFC6334.out
@@ -0,0 +1,4 @@
+IP6 (class 0xc0, hlim 64, next-header UDP (17) payload length: 56) fe80::201:2ff:fe03:405.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=d81eb8 (client-ID hwaddr type 1 000102030405) (option-request DNS-server AFTR-Name) (elapsed-time 0) (IA_PD IAID:33752069 T1:3600 T2:5400))
+IP6 (hlim 64, next-header UDP (17) payload length: 142) fe80::211:22ff:fe33:4455.547 > fe80::201:2ff:fe03:405.546: [udp sum ok] dhcp6 advertise (xid=d81eb8 (IA_PD IAID:33752069 T1:150 T2:250 (IA_PD-prefix 2a00:1:1:100::/56 pltime:250 vltime:300)) (client-ID hwaddr type 1 000102030405) (server-ID hwaddr/time type 1 time 406802160 001122334455) (preference 10) (DNS-server 2a01::1) (AFTR-Name aftr-name.mydomain.net))
+IP6 (class 0xc0, hlim 64, next-header UDP (17) payload length: 103) fe80::201:2ff:fe03:405.546 > ff02::1:2.547: [udp sum ok] dhcp6 request (xid=1e291d (client-ID hwaddr type 1 000102030405) (server-ID hwaddr/time type 1 time 406802160 001122334455) (option-request DNS-server AFTR-Name) (elapsed-time 0) (IA_PD IAID:33752069 T1:3600 T2:5400 (IA_PD-prefix 2a00:1:1:100::/56 pltime:7200 vltime:7500)))
+IP6 (hlim 64, next-header UDP (17) payload length: 142) fe80::211:22ff:fe33:4455.547 > fe80::201:2ff:fe03:405.546: [udp sum ok] dhcp6 reply (xid=1e291d (IA_PD IAID:33752069 T1:150 T2:250 (IA_PD-prefix 2a00:1:1:100::/56 pltime:250 vltime:300)) (client-ID hwaddr type 1 000102030405) (server-ID hwaddr/time type 1 time 406802160 001122334455) (preference 10) (DNS-server 2a01::1) (AFTR-Name aftr-name.mydomain.net))
diff --git a/tests/dhcpv6-AFTR-Name-RFC6334.pcap b/tests/dhcpv6-AFTR-Name-RFC6334.pcap
new file mode 100644
index 0000000..d6b353e
--- /dev/null
+++ b/tests/dhcpv6-AFTR-Name-RFC6334.pcap
Binary files differ
diff --git a/tests/dhcpv6-domain-list.out b/tests/dhcpv6-domain-list.out
new file mode 100644
index 0000000..30b449c
--- /dev/null
+++ b/tests/dhcpv6-domain-list.out
@@ -0,0 +1 @@
+IP6 (hlim 64, next-header UDP (17) payload length: 101) fe80::20c:29ff:fe9b:a15d.547 > fe80::20c:29ff:fe38:f368.546: [udp sum ok] dhcp6 reply (xid=aa56ce (client-ID hwaddr/time type 1 time 418384703 000c2938f368) (server-ID hwaddr/time type 1 time 418354459 000c299ba153) (DNS-search-list example.com. sales.example.com. eng.example.com.))
diff --git a/tests/dhcpv6-domain-list.pcap b/tests/dhcpv6-domain-list.pcap
new file mode 100644
index 0000000..b0afeff
--- /dev/null
+++ b/tests/dhcpv6-domain-list.pcap
Binary files differ
diff --git a/tests/dhcpv6-ia-na.out b/tests/dhcpv6-ia-na.out
new file mode 100644
index 0000000..b1dd0f0
--- /dev/null
+++ b/tests/dhcpv6-ia-na.out
@@ -0,0 +1,4 @@
+IP6 (class 0xc0, hlim 64, next-header UDP (17) payload length: 56) fe80::201:2ff:fe03:405.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=90b45c (client-ID hwaddr type 1 000102030405) (option-request DNS-server DNS-search-list) (elapsed-time 0) (IA_NA IAID:33752069 T1:3600 T2:5400))
+IP6 (hlim 64, next-header UDP (17) payload length: 88) fe80::211:22ff:fe33:4455.547 > fe80::201:2ff:fe03:405.546: [udp sum ok] dhcp6 advertise (xid=90b45c (IA_NA IAID:33752069 T1:3600 T2:5400 (IA_ADDR 2a00:1:1:200:38e6:b22e:c440:acdf pltime:4500 vltime:7200)) (client-ID hwaddr type 1 000102030405) (server-ID hwaddr/time type 1 time 407259276 001122334455))
+IP6 (class 0xc0, hlim 64, next-header UDP (17) payload length: 102) fe80::201:2ff:fe03:405.546 > ff02::1:2.547: [udp sum ok] dhcp6 request (xid=2ffdd1 (client-ID hwaddr type 1 000102030405) (server-ID hwaddr/time type 1 time 407259276 001122334455) (option-request DNS-server DNS-search-list) (elapsed-time 0) (IA_NA IAID:33752069 T1:3600 T2:5400 (IA_ADDR 2a00:1:1:200:38e6:b22e:c440:acdf pltime:7200 vltime:7500)))
+IP6 (hlim 64, next-header UDP (17) payload length: 88) fe80::211:22ff:fe33:4455.547 > fe80::201:2ff:fe03:405.546: [udp sum ok] dhcp6 reply (xid=2ffdd1 (IA_NA IAID:33752069 T1:3600 T2:5400 (IA_ADDR 2a00:1:1:200:38e6:b22e:c440:acdf pltime:4500 vltime:7200)) (client-ID hwaddr type 1 000102030405) (server-ID hwaddr/time type 1 time 407259276 001122334455))
diff --git a/tests/dhcpv6-ia-na.pcap b/tests/dhcpv6-ia-na.pcap
new file mode 100644
index 0000000..3cafdc5
--- /dev/null
+++ b/tests/dhcpv6-ia-na.pcap
Binary files differ
diff --git a/tests/dhcpv6-ia-pd.out b/tests/dhcpv6-ia-pd.out
new file mode 100644
index 0000000..f230467
--- /dev/null
+++ b/tests/dhcpv6-ia-pd.out
@@ -0,0 +1,4 @@
+IP6 (class 0xc0, hlim 64, next-header UDP (17) payload length: 56) fe80::201:2ff:fe03:405.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=e1e093 (client-ID hwaddr type 1 000102030405) (option-request DNS-server DNS-search-list) (elapsed-time 0) (IA_PD IAID:33752069 T1:3600 T2:5400))
+IP6 (hlim 64, next-header UDP (17) payload length: 89) fe80::211:22ff:fe33:4455.547 > fe80::201:2ff:fe03:405.546: [udp sum ok] dhcp6 advertise (xid=e1e093 (IA_PD IAID:33752069 T1:3600 T2:5400 (IA_PD-prefix 2a00:1:1:100::/56 pltime:4500 vltime:7200)) (client-ID hwaddr type 1 000102030405) (server-ID hwaddr/time type 1 time 407259545 001122334455))
+IP6 (class 0xc0, hlim 64, next-header UDP (17) payload length: 103) fe80::201:2ff:fe03:405.546 > ff02::1:2.547: [udp sum ok] dhcp6 request (xid=12b08a (client-ID hwaddr type 1 000102030405) (server-ID hwaddr/time type 1 time 407259545 001122334455) (option-request DNS-server DNS-search-list) (elapsed-time 0) (IA_PD IAID:33752069 T1:3600 T2:5400 (IA_PD-prefix 2a00:1:1:100::/56 pltime:7200 vltime:7500)))
+IP6 (hlim 64, next-header UDP (17) payload length: 89) fe80::211:22ff:fe33:4455.547 > fe80::201:2ff:fe03:405.546: [udp sum ok] dhcp6 reply (xid=12b08a (IA_PD IAID:33752069 T1:3600 T2:5400 (IA_PD-prefix 2a00:1:1:100::/56 pltime:4500 vltime:7200)) (client-ID hwaddr type 1 000102030405) (server-ID hwaddr/time type 1 time 407259545 001122334455))
diff --git a/tests/dhcpv6-ia-pd.pcap b/tests/dhcpv6-ia-pd.pcap
new file mode 100644
index 0000000..5fdd067
--- /dev/null
+++ b/tests/dhcpv6-ia-pd.pcap
Binary files differ
diff --git a/tests/dhcpv6-ia-ta.out b/tests/dhcpv6-ia-ta.out
new file mode 100644
index 0000000..5a8acef
--- /dev/null
+++ b/tests/dhcpv6-ia-ta.out
@@ -0,0 +1,4 @@
+IP6 (class 0xc0, hlim 64, next-header UDP (17) payload length: 48) fe80::201:2ff:fe03:405.546 > ff02::1:2.547: [udp sum ok] dhcp6 solicit (xid=28b040 (client-ID hwaddr type 1 000102030405) (option-request DNS-server DNS-search-list) (elapsed-time 0) (IA_TA IAID:33752069))
+IP6 (hlim 64, next-header UDP (17) payload length: 80) fe80::211:22ff:fe33:4455.547 > fe80::201:2ff:fe03:405.546: [udp sum ok] dhcp6 advertise (xid=28b040 (IA_TA IAID:33752069 (IA_ADDR 2a00:1:1:200:5da2:f920:84c4:88cc pltime:4500 vltime:7200)) (client-ID hwaddr type 1 000102030405) (server-ID hwaddr/time type 1 time 407259120 001122334455))
+IP6 (class 0xc0, hlim 64, next-header UDP (17) payload length: 94) fe80::201:2ff:fe03:405.546 > ff02::1:2.547: [udp sum ok] dhcp6 request (xid=2b0e45 (client-ID hwaddr type 1 000102030405) (server-ID hwaddr/time type 1 time 407259120 001122334455) (option-request DNS-server DNS-search-list) (elapsed-time 0) (IA_TA IAID:33752069 (IA_ADDR 2a00:1:1:200:5da2:f920:84c4:88cc pltime:7200 vltime:7500)))
+IP6 (hlim 64, next-header UDP (17) payload length: 80) fe80::211:22ff:fe33:4455.547 > fe80::201:2ff:fe03:405.546: [udp sum ok] dhcp6 reply (xid=2b0e45 (IA_TA IAID:33752069 (IA_ADDR 2a00:1:1:200:5da2:f920:84c4:88cc pltime:4500 vltime:7200)) (client-ID hwaddr type 1 000102030405) (server-ID hwaddr/time type 1 time 407259120 001122334455))
diff --git a/tests/dhcpv6-ia-ta.pcap b/tests/dhcpv6-ia-ta.pcap
new file mode 100644
index 0000000..b91f8b7
--- /dev/null
+++ b/tests/dhcpv6-ia-ta.pcap
Binary files differ
diff --git a/tests/dhcpv6-ntp-server.out b/tests/dhcpv6-ntp-server.out
new file mode 100644
index 0000000..23db5bd
--- /dev/null
+++ b/tests/dhcpv6-ntp-server.out
@@ -0,0 +1 @@
+IP6 (hlim 64, next-header UDP (17) payload length: 113) fe80::20c:29ff:fe9b:a15d.547 > fe80::20c:29ff:fe38:f368.546: [udp sum ok] dhcp6 reply (xid=f69b57 (client-ID hwaddr/time type 1 time 418384703 000c2938f368) (server-ID hwaddr/time type 1 time 418354459 000c299ba153) (NTP-server subopt:1 2a01::1 subopt:2 ff05::101 subopt:3 ntp.example.com.))
diff --git a/tests/dhcpv6-ntp-server.pcap b/tests/dhcpv6-ntp-server.pcap
new file mode 100644
index 0000000..5657692
--- /dev/null
+++ b/tests/dhcpv6-ntp-server.pcap
Binary files differ
diff --git a/tests/dhcpv6-sip-server-d.out b/tests/dhcpv6-sip-server-d.out
new file mode 100644
index 0000000..4600e9f
--- /dev/null
+++ b/tests/dhcpv6-sip-server-d.out
@@ -0,0 +1 @@
+IP6 (hlim 64, next-header UDP (17) payload length: 114) fe80::20c:29ff:fe9b:a15d.547 > fe80::20c:29ff:fe38:f368.546: [udp sum ok] dhcp6 reply (xid=6890d8 (client-ID hwaddr/time type 1 time 418384703 000c2938f368) (server-ID hwaddr/time type 1 time 418354459 000c299ba153) (SIP-servers-domain sip1.my-domain.net. sip2.example.com. sip3.sub.my-domain.org.))
diff --git a/tests/dhcpv6-sip-server-d.pcap b/tests/dhcpv6-sip-server-d.pcap
new file mode 100644
index 0000000..7cb2103
--- /dev/null
+++ b/tests/dhcpv6-sip-server-d.pcap
Binary files differ
diff --git a/tests/dio.out b/tests/dio.out
new file mode 100644
index 0000000..4f0c189
--- /dev/null
+++ b/tests/dio.out
@@ -0,0 +1 @@
+IP6 (hlim 255, next-header ICMPv6 (58) payload length: 24) fe80::1000:ff:fe64:6423 > ff02::1: [icmp6 sum ok] ICMP6, RPL, (CLR)Destination Advertisement Object
diff --git a/tests/dio.pcap b/tests/dio.pcap
new file mode 100644
index 0000000..8170635
--- /dev/null
+++ b/tests/dio.pcap
Binary files differ
diff --git a/tests/e1000g.out b/tests/e1000g.out
new file mode 100644
index 0000000..0cc3b9e
--- /dev/null
+++ b/tests/e1000g.out
@@ -0,0 +1,20 @@
+IP 129.146.106.55 > 10.5.233.117: ICMP echo request, id 6901, seq 0, length 64
+IP 10.5.233.117 > 129.146.106.55: ICMP echo reply, id 6901, seq 0, length 64
+IP 129.146.106.55 > 10.5.233.117: ICMP echo request, id 6901, seq 1, length 64
+IP 10.5.233.117 > 129.146.106.55: ICMP echo reply, id 6901, seq 1, length 64
+IP 129.146.106.55 > 10.5.233.117: ICMP echo request, id 6901, seq 2, length 64
+IP 10.5.233.117 > 129.146.106.55: ICMP echo reply, id 6901, seq 2, length 64
+IP 129.146.106.55 > 10.5.233.117: ICMP echo request, id 6901, seq 3, length 64
+IP 10.5.233.117 > 129.146.106.55: ICMP echo reply, id 6901, seq 3, length 64
+IP 129.146.106.55 > 10.5.233.117: ICMP echo request, id 6901, seq 4, length 64
+IP 10.5.233.117 > 129.146.106.55: ICMP echo reply, id 6901, seq 4, length 64
+IP 129.146.106.55 > 10.5.233.117: ICMP echo request, id 6901, seq 5, length 64
+IP 10.5.233.117 > 129.146.106.55: ICMP echo reply, id 6901, seq 5, length 64
+IP 129.146.106.55 > 10.5.233.117: ICMP echo request, id 6901, seq 6, length 64
+IP 10.5.233.117 > 129.146.106.55: ICMP echo reply, id 6901, seq 6, length 64
+IP 129.146.106.55 > 10.5.233.117: ICMP echo request, id 6901, seq 7, length 64
+IP 10.5.233.117 > 129.146.106.55: ICMP echo reply, id 6901, seq 7, length 64
+IP 129.146.106.55 > 10.5.233.117: ICMP echo request, id 6901, seq 8, length 64
+IP 10.5.233.117 > 129.146.106.55: ICMP echo reply, id 6901, seq 8, length 64
+IP 129.146.106.55 > 10.5.233.117: ICMP echo request, id 6901, seq 9, length 64
+IP 10.5.233.117 > 129.146.106.55: ICMP echo reply, id 6901, seq 9, length 64
diff --git a/tests/e1000g.pcap b/tests/e1000g.pcap
new file mode 100644
index 0000000..11b0174
--- /dev/null
+++ b/tests/e1000g.pcap
Binary files differ
diff --git a/tests/eapon1.new b/tests/eapon1.new
deleted file mode 100644
index c5042e3..0000000
--- a/tests/eapon1.new
+++ /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/tests/eapon1.out b/tests/eapon1.out
index c5042e3..69f7537 100644
--- a/tests/eapon1.out
+++ b/tests/eapon1.out
@@ -1,114 +1,114 @@
-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 192.168.1.249.138 > 192.168.1.255.138: NBT UDP PACKET(138)
+IP 192.168.1.249.138 > 192.168.1.255.138: NBT UDP PACKET(138)
+IP 192.168.1.249.138 > 192.168.1.255.138: NBT UDP PACKET(138)
+IP 192.168.1.249.137 > 192.168.1.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
+IP 192.168.1.249.137 > 192.168.1.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
+IP 192.168.1.249.137 > 192.168.1.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
+IP 192.168.1.249.138 > 192.168.1.255.138: NBT UDP PACKET(138)
+IP 192.168.1.249.137 > 192.168.1.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
+IP 192.168.1.249.137 > 192.168.1.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
+IP 192.168.1.249.137 > 192.168.1.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
+ARP, Request who-has 192.168.1.1 tell 192.168.1.249, length 28
+ARP, Reply 192.168.1.1 is-at 00:0d:88:4f:25:91, length 46
+IP 192.168.1.249.68 > 192.168.1.1.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+EAP packet (0) v1, len 5
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+EAPOL start (1) v1, len 0
+EAP packet (0) v1, len 5
+EAP packet (0) v1, len 45
+EAP packet (0) v1, len 20
+EAP packet (0) v1, len 76
+EAP packet (0) v1, len 80
+EAP packet (0) v1, len 28
+EAP packet (0) v1, len 4
+EAPOL key (3) v1, len 57
+EAPOL key (3) v1, len 44
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+EAPOL start (1) v1, len 0
+EAP packet (0) v1, len 5
+EAP packet (0) v1, len 45
+EAP packet (0) v1, len 20
+EAP packet (0) v1, len 76
+EAP packet (0) v1, len 80
+EAP packet (0) v1, len 28
+EAP packet (0) v1, len 4
+EAPOL key (3) v1, len 57
+EAPOL key (3) v1, len 44
+ARP, Request who-has 169.254.67.194 tell 169.254.67.194, length 28
+ARP, Request who-has 169.254.67.194 tell 169.254.67.194, length 28
+ARP, Request who-has 169.254.67.194 tell 169.254.67.194, length 28
 IP 169.254.67.194.4299 > 239.255.255.250.1900: UDP, length 133
-IP 169.254.67.194 > IGMP: igmp v3 report, 1 group record(s)
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194 > IGMP: igmp v3 report, 1 group record(s)
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194 > 224.0.0.22: igmp v3 report, 1 group record(s)
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194 > 224.0.0.22: igmp v3 report, 1 group record(s)
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
 IP 169.254.67.194.4299 > 239.255.255.250.1900: UDP, length 133
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-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.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+EAPOL start (1) v1, len 0
+EAP packet (0) v1, len 5
+EAP packet (0) v1, len 45
+EAP packet (0) v1, len 20
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+EAP packet (0) v1, len 76
+EAP packet (0) v1, len 80
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+EAP packet (0) v1, len 28
+EAP packet (0) v1, len 4
+EAPOL key (3) v1, len 57
+EAPOL key (3) v1, len 44
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
 IP 169.254.67.194.4299 > 239.255.255.250.1900: UDP, length 133
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
-IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
-IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
-IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
-IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
-IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300
-IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
-IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
-IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
-IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
-IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
-IP 169.254.67.194.netbios-dgm > 169.254.255.255.netbios-dgm: NBT UDP PACKET(138)
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
-IP 169.254.67.194.netbios-ns > 169.254.255.255.netbios-ns: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
-IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:04:23:57:a5:7a (oui Unknown), length: 300
-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 
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
+IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
+IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
+IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
+IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
+IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
+IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
+IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): REGISTRATION; REQUEST; BROADCAST
+IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
+IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
+IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
+IP 169.254.67.194.137 > 169.254.255.255.137: NBT UDP PACKET(137): QUERY; REQUEST; BROADCAST
+IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 00:04:23:57:a5:7a, length 300
+EAPOL start (1) v1, len 0
+EAP packet (0) v1, len 5
+EAP packet (0) v1, len 45
+EAP packet (0) v1, len 20
+IP 169.254.67.194.138 > 169.254.255.255.138: NBT UDP PACKET(138)
+EAP packet (0) v1, len 76
+EAP packet (0) v1, len 80
+EAP packet (0) v1, len 28
+EAP packet (0) v1, len 4
+EAPOL key (3) v1, len 57
+EAPOL key (3) v1, len 44
diff --git a/tests/eapon1.puu b/tests/eapon1.puu
deleted file mode 100644
index 25c1436..0000000
--- a/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/tests/eapon1.sh b/tests/eapon1.sh
deleted file mode 100755
index 1c8aa63..0000000
--- a/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/tests/eapon2.puu b/tests/eapon2.puu
deleted file mode 100644
index 70abb23..0000000
--- a/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/tests/epgm_zmtp1.pcap b/tests/epgm_zmtp1.pcap
new file mode 100644
index 0000000..1883579
--- /dev/null
+++ b/tests/epgm_zmtp1.pcap
Binary files differ
diff --git a/tests/epgm_zmtp1v.out b/tests/epgm_zmtp1v.out
new file mode 100644
index 0000000..171ecac
--- /dev/null
+++ b/tests/epgm_zmtp1v.out
@@ -0,0 +1,79 @@
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 471 trail 0 lead 281 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 472 trail 0 lead 281 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 473 trail 0 lead 281 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 474 trail 0 lead 281 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 475 trail 0 lead 281 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 1480)
+    10.0.0.45.40251 > 239.255.0.16.5563: 39236 > 5563: PGM, length 1428 0x47e3fdad9a9c ODATA trail 0 seq 282 [1452]
+	 frame offset 0x0000
+	 frame flags+body  (8-bit) length 116, flags 0x00 (-|-|-|-|-|-|-|-), first 115 byte(s) of body:
+	 0x0000:  5468 6973 2069 7320 6120 7368 6f72 7420  This.is.a.short.
+	 0x0010:  4153 4349 4920 6d65 7373 6167 6520 666f  ASCII.message.fo
+	 0x0020:  6c6c 6f77 6564 2062 7920 6120 7368 6f72  llowed.by.a.shor
+	 0x0030:  7420 6269 6e61 7279 206d 6573 7361 6765  t.binary.message
+	 0x0040:  2c20 6120 6c6f 6e67 6572 2041 5343 4949  ,.a.longer.ASCII
+	 0x0050:  206d 6573 7361 6765 2061 6e64 2061 2073  .message.and.a.s
+	 0x0060:  686f 7274 2041 5343 4949 206d 6573 7361  hort.ASCII.messa
+	 0x0070:  6765 2e                                  ge.
+
+	 frame flags+body  (8-bit) length 17, flags 0x00 (-|-|-|-|-|-|-|-), first 16 byte(s) of body:
+	 0x0000:  0001 0203 0405 0607 0809 0a0b 0c0d 0e0f  ................
+
+	 frame flags+body (64-bit) length 2790 (1282 captured), flags 0x00 (-|-|-|-|-|-|-|-), first 128 byte(s) of body:
+	 0x0000:  5468 6520 7175 6963 6b20 6272 6f77 6e20  The.quick.brown.
+	 0x0010:  666f 7820 6a75 6d70 7320 6f76 6572 2074  fox.jumps.over.t
+	 0x0020:  6865 206c 617a 7920 646f 672e 2054 6865  he.lazy.dog..The
+	 0x0030:  2071 7569 636b 2062 726f 776e 2066 6f78  .quick.brown.fox
+	 0x0040:  206a 756d 7073 206f 7665 7220 7468 6520  .jumps.over.the.
+	 0x0050:  6c61 7a79 2064 6f67 2e20 5468 6520 7175  lazy.dog..The.qu
+	 0x0060:  6963 6b20 6272 6f77 6e20 666f 7820 6a75  ick.brown.fox.ju
+	 0x0070:  6d70 7320 6f76 6572 2074 6865 206c 617a  mps.over.the.laz
+ [|zmtp1]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 1480)
+    10.0.0.45.40251 > 239.255.0.16.5563: 39236 > 5563: PGM, length 1428 0x47e3fdad9a9c ODATA trail 0 seq 283 [1452]
+	 frame offset 0xffff
+	 frame intermediate part, 1426 bytes, first 128 byte(s):
+	 0x0000:  756d 7073 206f 7665 7220 7468 6520 6c61  umps.over.the.la
+	 0x0010:  7a79 2064 6f67 2e20 5468 6520 7175 6963  zy.dog..The.quic
+	 0x0020:  6b20 6272 6f77 6e20 666f 7820 6a75 6d70  k.brown.fox.jump
+	 0x0030:  7320 6f76 6572 2074 6865 206c 617a 7920  s.over.the.lazy.
+	 0x0040:  646f 672e 2054 6865 2071 7569 636b 2062  dog..The.quick.b
+	 0x0050:  726f 776e 2066 6f78 206a 756d 7073 206f  rown.fox.jumps.o
+	 0x0060:  7665 7220 7468 6520 6c61 7a79 2064 6f67  ver.the.lazy.dog
+	 0x0070:  2e20 5468 6520 7175 6963 6b20 6272 6f77  ..The.quick.brow
+
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 173)
+    10.0.0.45.40251 > 239.255.0.16.5563: 39236 > 5563: PGM, length 121 0x47e3fdad9a9c ODATA trail 0 seq 284 [145]
+	 frame offset 0x0052
+	 frame intermediate part, 82 bytes, first 82 byte(s):
+	 0x0000:  636b 2062 726f 776e 2066 6f78 206a 756d  ck.brown.fox.jum
+	 0x0010:  7073 206f 7665 7220 7468 6520 6c61 7a79  ps.over.the.lazy
+	 0x0020:  2064 6f67 2e20 5468 6520 7175 6963 6b20  .dog..The.quick.
+	 0x0030:  6272 6f77 6e20 666f 7820 6a75 6d70 7320  brown.fox.jumps.
+	 0x0040:  6f76 6572 2074 6865 206c 617a 7920 646f  over.the.lazy.do
+	 0x0050:  672e                                     g.
+
+	 frame flags+body  (8-bit) length 36, flags 0x00 (-|-|-|-|-|-|-|-), first 35 byte(s) of body:
+	 0x0000:  5468 6973 2069 7320 7468 6520 7472 6169  This.is.the.trai
+	 0x0010:  6c69 6e67 2041 5343 4949 206d 6573 7361  ling.ASCII.messa
+	 0x0020:  6765 2e                                  ge.
+
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 476 trail 0 lead 284 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 44)
+    10.0.0.45.46357 > 239.255.0.16.5563: 5563 > 39236: PGM, length 0 0x47e3fdad9a9c SPMR [16]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 477 trail 0 lead 284 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 478 trail 0 lead 284 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 479 trail 0 lead 284 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 480 trail 0 lead 284 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 481 trail 0 lead 284 nla 10.0.0.45 [36]
diff --git a/tests/epgmv.out b/tests/epgmv.out
new file mode 100644
index 0000000..ffa1b82
--- /dev/null
+++ b/tests/epgmv.out
@@ -0,0 +1,30 @@
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 471 trail 0 lead 281 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 472 trail 0 lead 281 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 473 trail 0 lead 281 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 474 trail 0 lead 281 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 475 trail 0 lead 281 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 1480)
+    10.0.0.45.40251 > 239.255.0.16.5563: 39236 > 5563: PGM, length 1428 0x47e3fdad9a9c ODATA trail 0 seq 282 [1452]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 1480)
+    10.0.0.45.40251 > 239.255.0.16.5563: 39236 > 5563: PGM, length 1428 0x47e3fdad9a9c ODATA trail 0 seq 283 [1452]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 173)
+    10.0.0.45.40251 > 239.255.0.16.5563: 39236 > 5563: PGM, length 121 0x47e3fdad9a9c ODATA trail 0 seq 284 [145]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 476 trail 0 lead 284 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 44)
+    10.0.0.45.46357 > 239.255.0.16.5563: 5563 > 39236: PGM, length 0 0x47e3fdad9a9c SPMR [16]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 477 trail 0 lead 284 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 478 trail 0 lead 284 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 479 trail 0 lead 284 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 480 trail 0 lead 284 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto UDP (17), length 64)
+    10.0.0.45.33280 > 239.255.0.16.5563: 39236 > 5563: PGM, length 0 0x47e3fdad9a9c SPM seq 481 trail 0 lead 284 nla 10.0.0.45 [36]
diff --git a/tests/esp0.sh b/tests/esp0.sh
deleted file mode 100644
index daf407c..0000000
--- a/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/tests/esp1.new b/tests/esp1.new
deleted file mode 100644
index 61b2967..0000000
--- a/tests/esp1.new
+++ /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/tests/esp1.sh b/tests/esp1.sh
deleted file mode 100644
index 87ee3b9..0000000
--- a/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/tests/esp2.new b/tests/esp2.new
deleted file mode 100644
index a829c8e..0000000
--- a/tests/esp2.new
+++ /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/tests/esp2.sh b/tests/esp2.sh
deleted file mode 100644
index 18a7083..0000000
--- a/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/tests/esp3.new b/tests/esp3.new
deleted file mode 100644
index 61b2967..0000000
--- a/tests/esp3.new
+++ /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/tests/esp3.sh b/tests/esp3.sh
deleted file mode 100644
index 122beab..0000000
--- a/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/tests/esp4.new b/tests/esp4.new
deleted file mode 100644
index a829c8e..0000000
--- a/tests/esp4.new
+++ /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/tests/esp4.sh b/tests/esp4.sh
deleted file mode 100644
index bba26e7..0000000
--- a/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/tests/esp5.new b/tests/esp5.new
deleted file mode 100644
index 73f35e0..0000000
--- a/tests/esp5.new
+++ /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/tests/esp5.sh b/tests/esp5.sh
deleted file mode 100644
index 405b677..0000000
--- a/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/tests/espudp1.new b/tests/espudp1.new
deleted file mode 100644
index 8999ff4..0000000
--- a/tests/espudp1.new
+++ /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/tests/espudp1.out b/tests/espudp1.out
index 8999ff4..db8eafb 100644
--- a/tests/espudp1.out
+++ b/tests/espudp1.out
@@ -1,6 +1,6 @@
 IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x1), length 116
 IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x2), length 116:  ip-proto-227 49
-IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x3), length 116: PIMv13, length: 10
+IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x3), length 116: PIMv13, length 10
 IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x4), length 116
 IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x5), length 116
 IP 192.1.2.23.4500 > 192.1.2.45.4500: UDP-encap: ESP(spi=0x12345678,seq=0x6), length 116:  ip-proto-183 28
diff --git a/tests/espudp1.puu b/tests/espudp1.puu
deleted file mode 100644
index 353c1c9..0000000
--- a/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/tests/espudp1.sh b/tests/espudp1.sh
deleted file mode 100644
index 35dc0a8..0000000
--- a/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/tests/evb.out b/tests/evb.out
new file mode 100644
index 0000000..db8888c
--- /dev/null
+++ b/tests/evb.out
@@ -0,0 +1,146 @@
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
+LLDP, length 103
+	Chassis ID TLV (1), length 7
+	  Subtype MAC address (4): 08:00:27:0d:f1:3c
+	  0x0000:  0408 0027 0df1 3c
+	Port ID TLV (2), length 7
+	  Subtype MAC address (3): 08:00:27:0d:f1:3c
+	  0x0000:  0308 0027 0df1 3c
+	Time to Live TLV (3), length 2: TTL 120s
+	  0x0000:  0078
+	Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
+	  Port VLAN Id Subtype (1)
+	    port vlan id (PVID): 1
+	  0x0000:  0080 c201 0001
+	Organization specific TLV (127), length 7: OUI Ethernet bridged (0x0080c2)
+	  Port and Protocol VLAN ID Subtype (2)
+	    port and protocol vlan id (PPVID): 0, flags [supported] (0x02)
+	  0x0000:  0080 c202 0200 00
+	Organization specific TLV (127), length 14: OUI Ethernet bridged (0x0080c2)
+	  VLAN name Subtype (3)
+	    vlan id (VID): 1
+	    vlan name: default
+	  0x0000:  0080 c203 0001 0764 6566 6175 6c74
+	Organization specific TLV (127), length 13: OUI Ethernet bridged (0x0080c2)
+	  Protocol Identity Subtype (4)
+	    protocol identity: 
+	  0x0000:  0080 c204 0800 0042 4203 0000 03
+	Organization specific TLV (127), length 9: OUI Ethernet bridged (0x0080c2)
+	  EVB Subtype (13)
+	    EVB Bridge Status
+	      RES: 0, BGID: 0, RRCAP: 1, RRCTR: 0
+	    EVB Station Status
+	      RES: 0, SGID: 0, RRREQ: 0,RRSTAT: 0
+	    R: 7, RTE: 20, EVB Mode: EVB Bridge [1]
+	    ROL: 0, RWD: 31, RES: 0, ROL: 0, RKA: 31
+	  0x0000:  0080 c20d 0200 f45f 1f
+	Organization specific TLV (127), length 11: OUI Ethernet bridged (0x0080c2)
+	  CDCP Subtype (14)
+	    Role: 0, RES: 0, Scomp: 0 ChnCap: 167
+	    SCID: 1, SVID: 1
+	  0x0000:  0080 c20e 0000 00a7 0010 01
+	End TLV (0), length 0
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
+STP 802.1s, Rapid STP, CIST Flags [Learn, Forward], length 102
+	port-role Designated, CIST root-id 8000.08:00:27:0d:f1:3c, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:00:27:0d:f1:3c, CIST port-id 8003, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name Default, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:00:27:0d:f1:3c, CIST remaining-hops 20
diff --git a/tests/evb.pcap b/tests/evb.pcap
new file mode 100644
index 0000000..1aea021
--- /dev/null
+++ b/tests/evb.pcap
Binary files differ
diff --git a/tests/forces1.out b/tests/forces1.out
new file mode 100644
index 0000000..63bb581
--- /dev/null
+++ b/tests/forces1.out
@@ -0,0 +1,40 @@
+IP 150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP] (1) [DATA] (B)(E) [TSN: 1048037094] [SID: 0] [SSEQ 1] [PPID 0x0] 
+	ForCES Query Response 
+
+IP 211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP] (1) [DATA] (B)(E) [TSN: 18398476] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES HeartBeat 
+
+IP 150.140.254.202.48316 > 211.129.72.8.6706: sctp[ForCES LP] (1) [SACK] [cum ack 18398476] [a_rwnd 57320] [#gap acks 0] [#dup tsns 0] 
+IP 211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP] (1) [DATA] (B)(E) [TSN: 167996938] [SID: 0] [SSEQ 2] [PPID 0x0] 
+	ForCES Query 
+
+IP 211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP] (1) [DATA] (B)(E) [TSN: 167996939] [SID: 0] [SSEQ 3] [PPID 0x0] 
+	ForCES Config 
+
+IP 150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP] (1) [SACK] [cum ack 167996939] [a_rwnd 57228] [#gap acks 0] [#dup tsns 0] 
+IP 211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP] (1) [DATA] (B)(E) [TSN: 167996940] [SID: 0] [SSEQ 4] [PPID 0x0] 
+	ForCES Config 
+
+IP 211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP] (1) [DATA] (B)(E) [TSN: 167996941] [SID: 0] [SSEQ 5] [PPID 0x0] 
+	ForCES Config 
+
+IP 150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP] (1) [SACK] [cum ack 167996941] [a_rwnd 57100] [#gap acks 0] [#dup tsns 0] 
+IP 211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP] (1) [DATA] (B)(E) [TSN: 167996942] [SID: 0] [SSEQ 6] [PPID 0x0] 
+	ForCES Config 
+
+IP 211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP] (1) [SACK] [cum ack 1830592459] [a_rwnd 55272] [#gap acks 0] [#dup tsns 0] 
+IP 150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP] (1) [HB REQ] 
+IP 211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP] (1) [HB REQ] 
+IP 150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP] (1) [HB ACK] 
+IP 150.140.254.202.48316 > 211.129.72.8.6706: sctp[ForCES LP] (1) [DATA] (B)(E) [TSN: 1830592460] [SID: 0] [SSEQ 30] [PPID 0x0] 
+	ForCES HeartBeat 
+
+IP 211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP] (1) [HB ACK] 
+IP 211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP] (1) [DATA] (B)(E) [TSN: 18398553] [SID: 0] [SSEQ 77] [PPID 0x0] 
+	ForCES HeartBeat 
+
+IP 211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP] (1) [DATA] (B)(E) [TSN: 18398573] [SID: 0] [SSEQ 97] [PPID 0x0] 
+	ForCES HeartBeat 
+
+IP 211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP] (1) [SACK] [cum ack 1830592477] [a_rwnd 55272] [#gap acks 0] [#dup tsns 0] 
+IP 150.140.254.202.48316 > 211.129.72.8.6706: sctp[ForCES LP] (1) [SACK] [cum ack 18398573] [a_rwnd 56144] [#gap acks 0] [#dup tsns 0] 
diff --git a/tests/forces1.pcap b/tests/forces1.pcap
new file mode 100644
index 0000000..b60fdd0
--- /dev/null
+++ b/tests/forces1.pcap
Binary files differ
diff --git a/tests/forces1vvv.out b/tests/forces1vvv.out
new file mode 100644
index 0000000..32b7693
--- /dev/null
+++ b/tests/forces1vvv.out
@@ -0,0 +1,227 @@
+IP (tos 0x2,ECT(0), ttl 64, id 4, offset 0, flags [DF], proto SCTP (132), length 380)
+    150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 1048037094] [SID: 0] [SSEQ 1] [PPID 0x0] 
+	ForCES Query Response 
+	ForCES Version 1 len 332B flags 0x38400000 
+	SrcID 0x2(FE) DstID 0x40000001(CE) Correlator 0x1
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 308 (data length 304 Bytes)
+         FEObj LFB(Classid 1) instance 1
+          Oper TLV  GetResp(0x9) length 296
+           PATH-DATA TLV, length 292 (data encapsulated 288 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 2
+              FULLDATA TLV (Length 280 DataLen 276 Bytes)
+               [
+               0x0000:  0000 0000 0000 0001 0000 0001 0000 0001
+               0x0010:  0000 0002 0000 0001 0000 0002 0000 0003
+               0x0020:  0000 0001 0000 0003 0000 0003 0000 0002
+               0x0030:  0000 0004 0000 0004 0000 0001 0000 0005
+               0x0040:  0000 0004 0000 0002 0000 0006 0000 0005
+               0x0050:  0000 0001 0000 0007 0000 0005 0000 0002
+               0x0060:  0000 0008 0000 0006 0000 0001 0000 0009
+               0x0070:  0000 0007 0000 0001 0000 000a 0000 0007
+               0x0080:  0000 0002 0000 000b 0000 0008 0000 0001
+               0x0090:  0000 000c 0000 0009 0000 0001 0000 000d
+               0x00a0:  0000 000a 0000 0001 0000 000e 0000 000b
+               0x00b0:  0000 0001 0000 000f 0000 000c 0000 0001
+               0x00c0:  0000 0010 0000 000d 0000 0001 0000 0011
+               0x00d0:  0000 000e 0000 0001 0000 0012 0000 000f
+               0x00e0:  0000 0001 0000 0013 0000 0010 0000 0001
+               0x00f0:  0000 0014 0000 0011 0000 0001 0000 0015
+               0x0100:  0000 0012 0000 0001 0000 0016 0000 0013
+               0x0110:  0000 0001
+               ]
+
+
+IP (tos 0x0, ttl 46, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 18398476] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x2
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 48)
+    150.140.254.202.48316 > 211.129.72.8.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 18398476] [a_rwnd 57320] [#gap acks 0] [#dup tsns 0] 
+IP (tos 0x0, ttl 46, id 3, offset 0, flags [DF], proto SCTP (132), length 100)
+    211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 167996938] [SID: 0] [SSEQ 2] [PPID 0x0] 
+	ForCES Query 
+	ForCES Version 1 len 52B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x3
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 28 (data length 24 Bytes)
+         FEObj LFB(Classid 1) instance 1
+          Oper TLV  Get(0x7) length 16
+           PATH-DATA TLV, length 12 (data encapsulated 8 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+
+
+IP (tos 0x0, ttl 46, id 4, offset 0, flags [DF], proto SCTP (132), length 112)
+    211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 167996939] [SID: 0] [SSEQ 3] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 64B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x4
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 40 (data length 36 Bytes)
+         #3(Classid 3) instance 1
+          Oper TLV  SetProp(0x2) length 28
+           PATH-DATA TLV, length 24 (data encapsulated 20 Bytes)
+            Pathdata: Flags 0x0 ID count 2
+              ID#01: 60
+              ID#02: 1
+              FULLDATA TLV (Length 8 DataLen 4 Bytes)
+               [
+               0x0000:  0000 0001
+               ]
+
+
+IP (tos 0x2,ECT(0), ttl 64, id 5, offset 0, flags [DF], proto SCTP (132), length 48)
+    150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP]
+	1) [SACK] [cum ack 167996939] [a_rwnd 57228] [#gap acks 0] [#dup tsns 0] 
+IP (tos 0x0, ttl 46, id 5, offset 0, flags [DF], proto SCTP (132), length 112)
+    211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 167996940] [SID: 0] [SSEQ 4] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 64B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x5
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 40 (data length 36 Bytes)
+         #3(Classid 3) instance 1
+          Oper TLV  SetProp(0x2) length 28
+           PATH-DATA TLV, length 24 (data encapsulated 20 Bytes)
+            Pathdata: Flags 0x0 ID count 2
+              ID#01: 60
+              ID#02: 2
+              FULLDATA TLV (Length 8 DataLen 4 Bytes)
+               [
+               0x0000:  0000 0001
+               ]
+
+
+IP (tos 0x0, ttl 46, id 6, offset 0, flags [DF], proto SCTP (132), length 112)
+    211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 167996941] [SID: 0] [SSEQ 5] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 64B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x6
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 40 (data length 36 Bytes)
+         #3(Classid 3) instance 1
+          Oper TLV  SetProp(0x2) length 28
+           PATH-DATA TLV, length 24 (data encapsulated 20 Bytes)
+            Pathdata: Flags 0x0 ID count 2
+              ID#01: 60
+              ID#02: 3
+              FULLDATA TLV (Length 8 DataLen 4 Bytes)
+               [
+               0x0000:  0000 0001
+               ]
+
+
+IP (tos 0x2,ECT(0), ttl 64, id 6, offset 0, flags [DF], proto SCTP (132), length 48)
+    150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP]
+	1) [SACK] [cum ack 167996941] [a_rwnd 57100] [#gap acks 0] [#dup tsns 0] 
+IP (tos 0x0, ttl 46, id 7, offset 0, flags [DF], proto SCTP (132), length 112)
+    211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 167996942] [SID: 0] [SSEQ 6] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 64B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x7
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 40 (data length 36 Bytes)
+         #3(Classid 3) instance 2
+          Oper TLV  SetProp(0x2) length 28
+           PATH-DATA TLV, length 24 (data encapsulated 20 Bytes)
+            Pathdata: Flags 0x0 ID count 2
+              ID#01: 60
+              ID#02: 1
+              FULLDATA TLV (Length 8 DataLen 4 Bytes)
+               [
+               0x0000:  0000 0001
+               ]
+
+
+IP (tos 0x0, ttl 46, id 110, offset 0, flags [DF], proto SCTP (132), length 48)
+    211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP]
+	1) [SACK] [cum ack 1830592459] [a_rwnd 55272] [#gap acks 0] [#dup tsns 0] 
+IP (tos 0x2,ECT(0), ttl 64, id 90, offset 0, flags [DF], proto SCTP (132), length 80)
+    150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP]
+	1) [HB REQ] 
+IP (tos 0x0, ttl 46, id 111, offset 0, flags [DF], proto SCTP (132), length 80)
+    211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP]
+	1) [HB REQ] 
+IP (tos 0x2,ECT(0), ttl 64, id 91, offset 0, flags [DF], proto SCTP (132), length 80)
+    150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP]
+	1) [HB ACK] 
+IP (tos 0x2,ECT(0), ttl 64, id 111, offset 0, flags [DF], proto SCTP (132), length 72)
+    150.140.254.202.48316 > 211.129.72.8.6706: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 1830592460] [SID: 0] [SSEQ 30] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x00000000 
+	SrcID 0x2(FE) DstID 0x40000001(CE) Correlator 0x53
+	ForCES flags:
+	  NoACK(0x0), prio=0, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+IP (tos 0x0, ttl 46, id 112, offset 0, flags [DF], proto SCTP (132), length 80)
+    211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP]
+	1) [HB ACK] 
+IP (tos 0x0, ttl 46, id 111, offset 0, flags [DF], proto SCTP (132), length 72)
+    211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 18398553] [SID: 0] [SSEQ 77] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x83
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+IP (tos 0x0, ttl 46, id 148, offset 0, flags [DF], proto SCTP (132), length 72)
+    211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 18398573] [SID: 0] [SSEQ 97] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x97
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+IP (tos 0x0, ttl 46, id 149, offset 0, flags [DF], proto SCTP (132), length 48)
+    211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP]
+	1) [SACK] [cum ack 1830592477] [a_rwnd 55272] [#gap acks 0] [#dup tsns 0] 
+IP (tos 0x2,ECT(0), ttl 64, id 147, offset 0, flags [DF], proto SCTP (132), length 48)
+    150.140.254.202.48316 > 211.129.72.8.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 18398573] [a_rwnd 56144] [#gap acks 0] [#dup tsns 0] 
diff --git a/tests/forces1vvvv.out b/tests/forces1vvvv.out
new file mode 100644
index 0000000..6bc4faa
--- /dev/null
+++ b/tests/forces1vvvv.out
@@ -0,0 +1,306 @@
+IP (tos 0x2,ECT(0), ttl 64, id 4, offset 0, flags [DF], proto SCTP (132), length 380)
+    150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 1048037094] [SID: 0] [SSEQ 1] [PPID 0x0] 
+	ForCES Query Response 
+	ForCES Version 1 len 332B flags 0x38400000 
+	SrcID 0x2(FE) DstID 0x40000001(CE) Correlator 0x1
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 308 (data length 304 Bytes)
+         FEObj LFB(Classid 1) instance 1
+          Oper TLV  GetResp(0x9) length 296
+           PATH-DATA TLV, length 292 (data encapsulated 288 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 2
+              FULLDATA TLV (Length 280 DataLen 276 Bytes)
+               [
+               0x0000:  0000 0000 0000 0001 0000 0001 0000 0001
+               0x0010:  0000 0002 0000 0001 0000 0002 0000 0003
+               0x0020:  0000 0001 0000 0003 0000 0003 0000 0002
+               0x0030:  0000 0004 0000 0004 0000 0001 0000 0005
+               0x0040:  0000 0004 0000 0002 0000 0006 0000 0005
+               0x0050:  0000 0001 0000 0007 0000 0005 0000 0002
+               0x0060:  0000 0008 0000 0006 0000 0001 0000 0009
+               0x0070:  0000 0007 0000 0001 0000 000a 0000 0007
+               0x0080:  0000 0002 0000 000b 0000 0008 0000 0001
+               0x0090:  0000 000c 0000 0009 0000 0001 0000 000d
+               0x00a0:  0000 000a 0000 0001 0000 000e 0000 000b
+               0x00b0:  0000 0001 0000 000f 0000 000c 0000 0001
+               0x00c0:  0000 0010 0000 000d 0000 0001 0000 0011
+               0x00d0:  0000 000e 0000 0001 0000 0012 0000 000f
+               0x00e0:  0000 0001 0000 0013 0000 0010 0000 0001
+               0x00f0:  0000 0014 0000 0011 0000 0001 0000 0015
+               0x0100:  0000 0012 0000 0001 0000 0016 0000 0013
+               0x0110:  0000 0001
+               ]
+
+	  Raw ForCES message
+	 [
+	 0x0000:  1014 0053 0000 0002 4000 0001 0000 0000
+	 0x0010:  0000 0001 3840 0000 1000 0134 0000 0001
+	 0x0020:  0000 0001 0009 0128 0110 0124 0000 0001
+	 0x0030:  0000 0002 0112 0118 0000 0000 0000 0001
+	 0x0040:  0000 0001 0000 0001 0000 0002 0000 0001
+	 0x0050:  0000 0002 0000 0003 0000 0001 0000 0003
+	 0x0060:  0000 0003 0000 0002 0000 0004 0000 0004
+	 0x0070:  0000 0001 0000 0005 0000 0004 0000 0002
+	 0x0080:  0000 0006 0000 0005 0000 0001 0000 0007
+	 0x0090:  0000 0005 0000 0002 0000 0008 0000 0006
+	 0x00a0:  0000 0001 0000 0009 0000 0007 0000 0001
+	 0x00b0:  0000 000a 0000 0007 0000 0002 0000 000b
+	 0x00c0:  0000 0008 0000 0001 0000 000c 0000 0009
+	 0x00d0:  0000 0001 0000 000d 0000 000a 0000 0001
+	 0x00e0:  0000 000e 0000 000b 0000 0001 0000 000f
+	 0x00f0:  0000 000c 0000 0001 0000 0010 0000 000d
+	 0x0100:  0000 0001 0000 0011 0000 000e 0000 0001
+	 0x0110:  0000 0012 0000 000f 0000 0001 0000 0013
+	 0x0120:  0000 0010 0000 0001 0000 0014 0000 0011
+	 0x0130:  0000 0001 0000 0015 0000 0012 0000 0001
+	 0x0140:  0000 0016 0000 0013 0000 0001
+	 ]
+
+IP (tos 0x0, ttl 46, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 18398476] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x2
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+	  Raw ForCES message
+	 [
+	 0x0000:  100f 0006 4000 0001 0000 0002 0000 0000
+	 0x0010:  0000 0002 c040 0000
+	 ]
+
+IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 48)
+    150.140.254.202.48316 > 211.129.72.8.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 18398476] [a_rwnd 57320] [#gap acks 0] [#dup tsns 0] 
+IP (tos 0x0, ttl 46, id 3, offset 0, flags [DF], proto SCTP (132), length 100)
+    211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 167996938] [SID: 0] [SSEQ 2] [PPID 0x0] 
+	ForCES Query 
+	ForCES Version 1 len 52B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x3
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 28 (data length 24 Bytes)
+         FEObj LFB(Classid 1) instance 1
+          Oper TLV  Get(0x7) length 16
+           PATH-DATA TLV, length 12 (data encapsulated 8 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+
+	  Raw ForCES message
+	 [
+	 0x0000:  1004 000d 4000 0001 0000 0002 0000 0000
+	 0x0010:  0000 0003 f840 0000 1000 001c 0000 0001
+	 0x0020:  0000 0001 0007 0010 0110 000c 0000 0001
+	 0x0030:  0000 0001
+	 ]
+
+IP (tos 0x0, ttl 46, id 4, offset 0, flags [DF], proto SCTP (132), length 112)
+    211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 167996939] [SID: 0] [SSEQ 3] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 64B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x4
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 40 (data length 36 Bytes)
+         #3(Classid 3) instance 1
+          Oper TLV  SetProp(0x2) length 28
+           PATH-DATA TLV, length 24 (data encapsulated 20 Bytes)
+            Pathdata: Flags 0x0 ID count 2
+              ID#01: 60
+              ID#02: 1
+              FULLDATA TLV (Length 8 DataLen 4 Bytes)
+               [
+               0x0000:  0000 0001
+               ]
+
+	  Raw ForCES message
+	 [
+	 0x0000:  1003 0010 4000 0001 0000 0002 0000 0000
+	 0x0010:  0000 0004 f840 0000 1000 0028 0000 0003
+	 0x0020:  0000 0001 0002 001c 0110 0018 0000 0002
+	 0x0030:  0000 003c 0000 0001 0112 0008 0000 0001
+	 ]
+
+IP (tos 0x2,ECT(0), ttl 64, id 5, offset 0, flags [DF], proto SCTP (132), length 48)
+    150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP]
+	1) [SACK] [cum ack 167996939] [a_rwnd 57228] [#gap acks 0] [#dup tsns 0] 
+IP (tos 0x0, ttl 46, id 5, offset 0, flags [DF], proto SCTP (132), length 112)
+    211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 167996940] [SID: 0] [SSEQ 4] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 64B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x5
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 40 (data length 36 Bytes)
+         #3(Classid 3) instance 1
+          Oper TLV  SetProp(0x2) length 28
+           PATH-DATA TLV, length 24 (data encapsulated 20 Bytes)
+            Pathdata: Flags 0x0 ID count 2
+              ID#01: 60
+              ID#02: 2
+              FULLDATA TLV (Length 8 DataLen 4 Bytes)
+               [
+               0x0000:  0000 0001
+               ]
+
+	  Raw ForCES message
+	 [
+	 0x0000:  1003 0010 4000 0001 0000 0002 0000 0000
+	 0x0010:  0000 0005 f840 0000 1000 0028 0000 0003
+	 0x0020:  0000 0001 0002 001c 0110 0018 0000 0002
+	 0x0030:  0000 003c 0000 0002 0112 0008 0000 0001
+	 ]
+
+IP (tos 0x0, ttl 46, id 6, offset 0, flags [DF], proto SCTP (132), length 112)
+    211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 167996941] [SID: 0] [SSEQ 5] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 64B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x6
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 40 (data length 36 Bytes)
+         #3(Classid 3) instance 1
+          Oper TLV  SetProp(0x2) length 28
+           PATH-DATA TLV, length 24 (data encapsulated 20 Bytes)
+            Pathdata: Flags 0x0 ID count 2
+              ID#01: 60
+              ID#02: 3
+              FULLDATA TLV (Length 8 DataLen 4 Bytes)
+               [
+               0x0000:  0000 0001
+               ]
+
+	  Raw ForCES message
+	 [
+	 0x0000:  1003 0010 4000 0001 0000 0002 0000 0000
+	 0x0010:  0000 0006 f840 0000 1000 0028 0000 0003
+	 0x0020:  0000 0001 0002 001c 0110 0018 0000 0002
+	 0x0030:  0000 003c 0000 0003 0112 0008 0000 0001
+	 ]
+
+IP (tos 0x2,ECT(0), ttl 64, id 6, offset 0, flags [DF], proto SCTP (132), length 48)
+    150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP]
+	1) [SACK] [cum ack 167996941] [a_rwnd 57100] [#gap acks 0] [#dup tsns 0] 
+IP (tos 0x0, ttl 46, id 7, offset 0, flags [DF], proto SCTP (132), length 112)
+    211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 167996942] [SID: 0] [SSEQ 6] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 64B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x7
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 40 (data length 36 Bytes)
+         #3(Classid 3) instance 2
+          Oper TLV  SetProp(0x2) length 28
+           PATH-DATA TLV, length 24 (data encapsulated 20 Bytes)
+            Pathdata: Flags 0x0 ID count 2
+              ID#01: 60
+              ID#02: 1
+              FULLDATA TLV (Length 8 DataLen 4 Bytes)
+               [
+               0x0000:  0000 0001
+               ]
+
+	  Raw ForCES message
+	 [
+	 0x0000:  1003 0010 4000 0001 0000 0002 0000 0000
+	 0x0010:  0000 0007 f840 0000 1000 0028 0000 0003
+	 0x0020:  0000 0002 0002 001c 0110 0018 0000 0002
+	 0x0030:  0000 003c 0000 0001 0112 0008 0000 0001
+	 ]
+
+IP (tos 0x0, ttl 46, id 110, offset 0, flags [DF], proto SCTP (132), length 48)
+    211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP]
+	1) [SACK] [cum ack 1830592459] [a_rwnd 55272] [#gap acks 0] [#dup tsns 0] 
+IP (tos 0x2,ECT(0), ttl 64, id 90, offset 0, flags [DF], proto SCTP (132), length 80)
+    150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP]
+	1) [HB REQ] 
+IP (tos 0x0, ttl 46, id 111, offset 0, flags [DF], proto SCTP (132), length 80)
+    211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP]
+	1) [HB REQ] 
+IP (tos 0x2,ECT(0), ttl 64, id 91, offset 0, flags [DF], proto SCTP (132), length 80)
+    150.140.254.202.57077 > 211.129.72.8.6704: sctp[ForCES HP]
+	1) [HB ACK] 
+IP (tos 0x2,ECT(0), ttl 64, id 111, offset 0, flags [DF], proto SCTP (132), length 72)
+    150.140.254.202.48316 > 211.129.72.8.6706: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 1830592460] [SID: 0] [SSEQ 30] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x00000000 
+	SrcID 0x2(FE) DstID 0x40000001(CE) Correlator 0x53
+	ForCES flags:
+	  NoACK(0x0), prio=0, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+	  Raw ForCES message
+	 [
+	 0x0000:  100f 0006 0000 0002 4000 0001 0000 0000
+	 0x0010:  0000 0053 0000 0000
+	 ]
+
+IP (tos 0x0, ttl 46, id 112, offset 0, flags [DF], proto SCTP (132), length 80)
+    211.129.72.8.6704 > 150.140.254.202.57077: sctp[ForCES HP]
+	1) [HB ACK] 
+IP (tos 0x0, ttl 46, id 111, offset 0, flags [DF], proto SCTP (132), length 72)
+    211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 18398553] [SID: 0] [SSEQ 77] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x83
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+	  Raw ForCES message
+	 [
+	 0x0000:  100f 0006 4000 0001 0000 0002 0000 0000
+	 0x0010:  0000 0083 c040 0000
+	 ]
+
+IP (tos 0x0, ttl 46, id 148, offset 0, flags [DF], proto SCTP (132), length 72)
+    211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 18398573] [SID: 0] [SSEQ 97] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0400000 
+	SrcID 0x40000001(CE) DstID 0x2(FE) Correlator 0x97
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+	  Raw ForCES message
+	 [
+	 0x0000:  100f 0006 4000 0001 0000 0002 0000 0000
+	 0x0010:  0000 0097 c040 0000
+	 ]
+
+IP (tos 0x0, ttl 46, id 149, offset 0, flags [DF], proto SCTP (132), length 48)
+    211.129.72.8.6706 > 150.140.254.202.48316: sctp[ForCES LP]
+	1) [SACK] [cum ack 1830592477] [a_rwnd 55272] [#gap acks 0] [#dup tsns 0] 
+IP (tos 0x2,ECT(0), ttl 64, id 147, offset 0, flags [DF], proto SCTP (132), length 48)
+    150.140.254.202.48316 > 211.129.72.8.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 18398573] [a_rwnd 56144] [#gap acks 0] [#dup tsns 0] 
diff --git a/tests/forces2.pcap b/tests/forces2.pcap
new file mode 100644
index 0000000..51a2095
--- /dev/null
+++ b/tests/forces2.pcap
Binary files differ
diff --git a/MODULE_LICENSE_BSD b/tests/forces2v.out
similarity index 100%
rename from MODULE_LICENSE_BSD
rename to tests/forces2v.out
diff --git a/tests/forces2vv.out b/tests/forces2vv.out
new file mode 100644
index 0000000..74f37c6
--- /dev/null
+++ b/tests/forces2vv.out
@@ -0,0 +1,378 @@
+05:05:09.298782 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 68)
+    192.168.1.142.33985 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [INIT] [init tag: 2496668056] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 3848071494] 
+05:05:09.303686 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 292)
+    192.168.1.143.6704 > 192.168.1.142.33985: sctp[ForCES HP]
+	1) [INIT ACK] [init tag: 970400624] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 918167005] 
+05:05:09.304939 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 264)
+    192.168.1.142.33985 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [COOKIE ECHO] 
+05:05:09.306408 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6704 > 192.168.1.142.33985: sctp[ForCES HP]
+	1) [COOKIE ACK] 
+05:05:10.309380 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 68)
+    192.168.1.142.39555 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [INIT] [init tag: 2044981539] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 2236306515] 
+05:05:10.309715 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 292)
+    192.168.1.143.6705 > 192.168.1.142.39555: sctp[ForCES MP]
+	1) [INIT ACK] [init tag: 3835501490] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 2895206285] 
+05:05:10.309749 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 264)
+    192.168.1.142.39555 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [COOKIE ECHO] 
+05:05:10.309952 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6705 > 192.168.1.142.39555: sctp[ForCES MP]
+	1) [COOKIE ACK] 
+05:05:11.310417 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 68)
+    192.168.1.142.34521 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [INIT] [init tag: 3379268938] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 4164546507] 
+05:05:11.310768 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 292)
+    192.168.1.143.6706 > 192.168.1.142.34521: sctp[ForCES LP]
+	1) [INIT ACK] [init tag: 1840401365] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 1469124988] 
+05:05:11.310801 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 264)
+    192.168.1.142.34521 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [COOKIE ECHO] 
+05:05:11.311000 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6706 > 192.168.1.142.34521: sctp[ForCES LP]
+	1) [COOKIE ACK] 
+05:05:12.312310 IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.142.33985 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 3848071494] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES Association Setup 
+	ForCES Version 1 len 24B flags 0xf8000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x1
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:05:12.314195 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6704 > 192.168.1.142.33985: sctp[ForCES HP]
+	1) [SACK] [cum ack 3848071494] [a_rwnd 57320] [#gap acks 0] [#dup tsns 0] 
+05:05:12.416220 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.33985: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 918167005] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES Association Response 
+	ForCES Version 1 len 32B flags 0x38100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x1
+	ForCES flags:
+	  NoACK(0x0), prio=7, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:05:12.416942 IP (tos 0x2,ECT(0), ttl 64, id 2, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.33985 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SACK] [cum ack 918167005] [a_rwnd 57312] [#gap acks 0] [#dup tsns 0] 
+05:05:20.347682 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.34521: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 1469124988] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0500000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x1
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, execute-all-or-none(0x1),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:05:20.352187 IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.34521 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 1469124988] [a_rwnd 57320] [#gap acks 0] [#dup tsns 0] 
+05:05:21.248574 IP (tos 0x2,ECT(0), ttl 64, id 2, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.142.34521 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 4164546507] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x1
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:05:21.249024 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.34521: sctp[ForCES LP]
+	1) [SACK] [cum ack 4164546507] [a_rwnd 57320] [#gap acks 0] [#dup tsns 0] 
+05:05:32.421106 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.34521: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 1469124989] [SID: 0] [SSEQ 1] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x2
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:05:32.621031 IP (tos 0x2,ECT(0), ttl 64, id 3, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.34521 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 1469124989] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:05:33.263419 IP (tos 0x2,ECT(0), ttl 64, id 4, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.142.34521 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 4164546508] [SID: 0] [SSEQ 1] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x2
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:05:33.464155 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.34521: sctp[ForCES LP]
+	1) [SACK] [cum ack 4164546508] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:05:43.022434 IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.39555 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB REQ] 
+05:05:43.023282 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.39555: sctp[ForCES MP]
+	1) [HB ACK] 
+05:05:43.196617 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.39555: sctp[ForCES MP]
+	1) [HB REQ] 
+05:05:43.197037 IP (tos 0x2,ECT(0), ttl 64, id 2, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.39555 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB ACK] 
+05:05:44.604199 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.33985: sctp[ForCES HP]
+	1) [HB REQ] 
+05:05:44.604244 IP (tos 0x2,ECT(0), ttl 64, id 3, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.33985 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB ACK] 
+05:05:46.350074 IP (tos 0x2,ECT(0), ttl 64, id 4, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.33985 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB REQ] 
+05:05:46.350436 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.33985: sctp[ForCES HP]
+	1) [HB ACK] 
+05:05:52.435455 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.34521: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 1469124990] [SID: 0] [SSEQ 2] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x3
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:05:52.635909 IP (tos 0x2,ECT(0), ttl 64, id 5, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.34521 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 1469124990] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:05:53.285747 IP (tos 0x2,ECT(0), ttl 64, id 6, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.142.34521 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 4164546509] [SID: 0] [SSEQ 2] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x3
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:05:53.486513 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.34521: sctp[ForCES LP]
+	1) [SACK] [cum ack 4164546509] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:05:57.511596 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 184)
+    192.168.1.143.6704 > 192.168.1.142.33985: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 918167006] [SID: 0] [SSEQ 1] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 136B flags 0xf8500000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x4
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:05:57.712372 IP (tos 0x2,ECT(0), ttl 64, id 5, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.33985 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SACK] [cum ack 918167006] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:05:58.292051 IP (tos 0x2,ECT(0), ttl 64, id 6, offset 0, flags [DF], proto SCTP (132), length 144)
+    192.168.1.142.33985 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 3848071495] [SID: 0] [SSEQ 1] [PPID 0x0] 
+	ForCES Config Response 
+	ForCES Version 1 len 96B flags 0x38500000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x4
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:05:58.492214 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6704 > 192.168.1.142.33985: sctp[ForCES HP]
+	1) [SACK] [cum ack 3848071495] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:05:58.519224 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 128)
+    192.168.1.143.6704 > 192.168.1.142.33985: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 918167007] [SID: 0] [SSEQ 2] [PPID 0x0] 
+	ForCES Query 
+	ForCES Version 1 len 80B flags 0xf8500000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x5
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:05:58.719328 IP (tos 0x2,ECT(0), ttl 64, id 7, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.33985 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SACK] [cum ack 918167007] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:05:59.293832 IP (tos 0x2,ECT(0), ttl 64, id 8, offset 0, flags [DF], proto SCTP (132), length 196)
+    192.168.1.142.33985 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 3848071496] [SID: 0] [SSEQ 2] [PPID 0x0] 
+	ForCES Query Response 
+	ForCES Version 1 len 148B flags 0x38500000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x5
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:05:59.494322 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6704 > 192.168.1.142.33985: sctp[ForCES HP]
+	1) [SACK] [cum ack 3848071496] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:06:12.447511 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.34521: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 1469124991] [SID: 0] [SSEQ 3] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x6
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:06:12.613268 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.33985: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 918167008] [SID: 0] [SSEQ 3] [PPID 0x0] 
+	ForCES Association TearDown 
+	ForCES Version 1 len 32B flags 0x38100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x0
+	ForCES flags:
+	  NoACK(0x0), prio=7, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:06:12.646587 IP (tos 0x2,ECT(0), ttl 64, id 7, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.34521 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 1469124991] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:06:12.812720 IP (tos 0x2,ECT(0), ttl 64, id 9, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.33985 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SACK] [cum ack 918167008] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:06:13.617136 IP (tos 0x2,ECT(0), ttl 64, id 10, offset 0, flags [DF], proto SCTP (132), length 40)
+    192.168.1.142.33985 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SHUTDOWN] 
+05:06:13.617464 IP (tos 0x2,ECT(0), ttl 64, id 3, offset 0, flags [DF], proto SCTP (132), length 40)
+    192.168.1.142.39555 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [SHUTDOWN] 
+05:06:13.617602 IP (tos 0x2,ECT(0), ttl 64, id 8, offset 0, flags [DF], proto SCTP (132), length 40)
+    192.168.1.142.34521 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SHUTDOWN] 
+05:06:13.617922 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6704 > 192.168.1.142.33985: sctp[ForCES HP]
+	1) [SHUTDOWN ACK] 
+05:06:13.618337 IP (tos 0x2,ECT(0), ttl 64, id 11, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.142.33985 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SHUTDOWN COMPLETE] 
+05:06:13.619459 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6705 > 192.168.1.142.39555: sctp[ForCES MP]
+	1) [SHUTDOWN ACK] 
+05:06:13.619484 IP (tos 0x2,ECT(0), ttl 64, id 4, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.142.39555 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [SHUTDOWN COMPLETE] 
+05:06:13.619537 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6706 > 192.168.1.142.34521: sctp[ForCES LP]
+	1) [SHUTDOWN ACK] 
+05:06:13.619550 IP (tos 0x2,ECT(0), ttl 64, id 9, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.142.34521 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SHUTDOWN COMPLETE] 
+05:06:14.310789 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 68)
+    192.168.1.142.59807 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [INIT] [init tag: 648920342] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 3143112306] 
+05:06:14.311204 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 292)
+    192.168.1.143.6704 > 192.168.1.142.59807: sctp[ForCES HP]
+	1) [INIT ACK] [init tag: 3977131441] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 3691296472] 
+05:06:14.312029 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 264)
+    192.168.1.142.59807 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [COOKIE ECHO] 
+05:06:14.312276 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6704 > 192.168.1.142.59807: sctp[ForCES HP]
+	1) [COOKIE ACK] 
+05:06:15.314129 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 68)
+    192.168.1.142.55497 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [INIT] [init tag: 3941704218] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 2908637682] 
+05:06:15.314897 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 292)
+    192.168.1.143.6705 > 192.168.1.142.55497: sctp[ForCES MP]
+	1) [INIT ACK] [init tag: 2312011763] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 3797683222] 
+05:06:15.314939 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 264)
+    192.168.1.142.55497 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [COOKIE ECHO] 
+05:06:15.315192 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6705 > 192.168.1.142.55497: sctp[ForCES MP]
+	1) [COOKIE ACK] 
+05:06:16.316012 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 68)
+    192.168.1.142.37985 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [INIT] [init tag: 738970165] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 2249629206] 
+05:06:16.316410 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 292)
+    192.168.1.143.6706 > 192.168.1.142.37985: sctp[ForCES LP]
+	1) [INIT ACK] [init tag: 1998517320] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 1397847889] 
+05:06:16.316444 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 264)
+    192.168.1.142.37985 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [COOKIE ECHO] 
+05:06:16.316679 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6706 > 192.168.1.142.37985: sctp[ForCES LP]
+	1) [COOKIE ACK] 
+05:06:17.317412 IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.142.59807 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 3143112306] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES Association Setup 
+	ForCES Version 1 len 24B flags 0xf8000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x2
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:06:17.318437 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6704 > 192.168.1.142.59807: sctp[ForCES HP]
+	1) [SACK] [cum ack 3143112306] [a_rwnd 57320] [#gap acks 0] [#dup tsns 0] 
+05:06:17.332703 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.59807: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 3691296472] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES Association Response 
+	ForCES Version 1 len 32B flags 0x38100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x2
+	ForCES flags:
+	  NoACK(0x0), prio=7, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:06:17.332763 IP (tos 0x2,ECT(0), ttl 64, id 2, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.59807 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SACK] [cum ack 3691296472] [a_rwnd 57312] [#gap acks 0] [#dup tsns 0] 
+05:06:17.334067 IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.142.37985 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 2249629206] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x6
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:06:17.334681 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.37985: sctp[ForCES LP]
+	1) [SACK] [cum ack 2249629206] [a_rwnd 57320] [#gap acks 0] [#dup tsns 0] 
diff --git a/tests/forces2vvv.out b/tests/forces2vvv.out
new file mode 100644
index 0000000..6a9bd5f
--- /dev/null
+++ b/tests/forces2vvv.out
@@ -0,0 +1,751 @@
+05:12:46.942414 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 68)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [INIT] [init tag: 2926667004] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 1498547998] 
+05:12:46.943161 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 292)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [INIT ACK] [init tag: 3861163764] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 2413889661] 
+05:12:46.943242 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 264)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [COOKIE ECHO] 
+05:12:46.943643 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [COOKIE ACK] 
+05:12:47.944776 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 68)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [INIT] [init tag: 3153359751] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 3738337023] 
+05:12:47.946163 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 292)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [INIT ACK] [init tag: 562272820] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 2275981483] 
+05:12:47.946319 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 264)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [COOKIE ECHO] 
+05:12:47.947214 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [COOKIE ACK] 
+05:12:48.948471 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 68)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [INIT] [init tag: 1637919099] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 922703190] 
+05:12:48.949179 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 292)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [INIT ACK] [init tag: 2538997808] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 2244318871] 
+05:12:48.949212 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 264)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [COOKIE ECHO] 
+05:12:48.950191 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [COOKIE ACK] 
+05:12:49.951610 IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 1498547998] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES Association Setup 
+	ForCES Version 1 len 24B flags 0xf8000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x1
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:12:49.952213 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [SACK] [cum ack 1498547998] [a_rwnd 57320] [#gap acks 0] [#dup tsns 0] 
+05:12:49.983328 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 2413889661] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES Association Response 
+	ForCES Version 1 len 32B flags 0x38100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x1
+	ForCES flags:
+	  NoACK(0x0), prio=7, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:12:49.983414 IP (tos 0x2,ECT(0), ttl 64, id 2, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SACK] [cum ack 2413889661] [a_rwnd 57312] [#gap acks 0] [#dup tsns 0] 
+05:13:09.990457 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 2244318871] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x1
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:13:09.990576 IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 2244318871] [a_rwnd 57320] [#gap acks 0] [#dup tsns 0] 
+05:13:10.977285 IP (tos 0x2,ECT(0), ttl 64, id 2, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 922703190] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x1
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:13:10.977790 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [SACK] [cum ack 922703190] [a_rwnd 57320] [#gap acks 0] [#dup tsns 0] 
+05:13:20.110083 IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB REQ] 
+05:13:20.110531 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB ACK] 
+05:13:20.668242 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB REQ] 
+05:13:20.668307 IP (tos 0x2,ECT(0), ttl 64, id 2, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB ACK] 
+05:13:21.822790 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [HB REQ] 
+05:13:21.822849 IP (tos 0x2,ECT(0), ttl 64, id 3, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB ACK] 
+05:13:22.926155 IP (tos 0x2,ECT(0), ttl 64, id 4, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB REQ] 
+05:13:22.926561 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [HB ACK] 
+05:13:30.012956 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 2244318872] [SID: 0] [SSEQ 1] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x2
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:13:30.213362 IP (tos 0x2,ECT(0), ttl 64, id 3, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 2244318872] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:13:30.998747 IP (tos 0x2,ECT(0), ttl 64, id 4, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 922703191] [SID: 0] [SSEQ 1] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x2
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:13:31.199633 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [SACK] [cum ack 922703191] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:13:50.022950 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 2244318873] [SID: 0] [SSEQ 2] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x3
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:13:50.222804 IP (tos 0x2,ECT(0), ttl 64, id 5, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 2244318873] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:13:50.957859 IP (tos 0x2,ECT(0), ttl 64, id 3, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB REQ] 
+05:13:50.958254 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB ACK] 
+05:13:51.017217 IP (tos 0x2,ECT(0), ttl 64, id 6, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 922703192] [SID: 0] [SSEQ 2] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x3
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:13:51.218065 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [SACK] [cum ack 922703192] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:13:52.029041 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB REQ] 
+05:13:52.029131 IP (tos 0x2,ECT(0), ttl 64, id 4, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB ACK] 
+05:13:52.668078 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [HB REQ] 
+05:13:52.668129 IP (tos 0x2,ECT(0), ttl 64, id 5, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB ACK] 
+05:13:54.157975 IP (tos 0x2,ECT(0), ttl 64, id 6, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB REQ] 
+05:13:54.158408 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [HB ACK] 
+05:14:10.034601 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 2244318874] [SID: 0] [SSEQ 3] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x4
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:14:10.036750 IP (tos 0x2,ECT(0), ttl 64, id 7, offset 0, flags [DF], proto SCTP (132), length 88)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 2244318874] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+	2) [DATA] (B)(E) [TSN: 922703193] [SID: 0] [SSEQ 3] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x4
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:14:10.237566 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [SACK] [cum ack 922703193] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:14:22.318623 IP (tos 0x2,ECT(0), ttl 64, id 5, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB REQ] 
+05:14:22.319118 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB ACK] 
+05:14:23.004801 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB REQ] 
+05:14:23.004855 IP (tos 0x2,ECT(0), ttl 64, id 6, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB ACK] 
+05:14:23.644941 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [HB REQ] 
+05:14:23.645019 IP (tos 0x2,ECT(0), ttl 64, id 7, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB ACK] 
+05:14:25.517659 IP (tos 0x2,ECT(0), ttl 64, id 8, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB REQ] 
+05:14:25.518177 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [HB ACK] 
+05:14:30.056428 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 2244318875] [SID: 0] [SSEQ 4] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x5
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:14:30.058780 IP (tos 0x2,ECT(0), ttl 64, id 8, offset 0, flags [DF], proto SCTP (132), length 88)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 2244318875] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+	2) [DATA] (B)(E) [TSN: 922703194] [SID: 0] [SSEQ 4] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x5
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:14:30.260069 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [SACK] [cum ack 922703194] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:14:50.070392 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 2244318876] [SID: 0] [SSEQ 5] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x6
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:14:50.078619 IP (tos 0x2,ECT(0), ttl 64, id 9, offset 0, flags [DF], proto SCTP (132), length 88)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 2244318876] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+	2) [DATA] (B)(E) [TSN: 922703195] [SID: 0] [SSEQ 5] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x6
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:14:50.278482 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [SACK] [cum ack 922703195] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:14:52.910320 IP (tos 0x2,ECT(0), ttl 64, id 7, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB REQ] 
+05:14:52.910757 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB ACK] 
+05:14:54.236596 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB REQ] 
+05:14:54.236684 IP (tos 0x2,ECT(0), ttl 64, id 8, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB ACK] 
+05:14:54.236747 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [HB REQ] 
+05:14:54.236765 IP (tos 0x2,ECT(0), ttl 64, id 9, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB ACK] 
+05:14:56.494447 IP (tos 0x2,ECT(0), ttl 64, id 10, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB REQ] 
+05:14:56.494903 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [HB ACK] 
+05:15:10.087164 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 2244318877] [SID: 0] [SSEQ 6] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x7
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:15:10.099646 IP (tos 0x2,ECT(0), ttl 64, id 10, offset 0, flags [DF], proto SCTP (132), length 88)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 2244318877] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+	2) [DATA] (B)(E) [TSN: 922703196] [SID: 0] [SSEQ 6] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x7
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:15:10.300908 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [SACK] [cum ack 922703196] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:15:24.142057 IP (tos 0x2,ECT(0), ttl 64, id 9, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB REQ] 
+05:15:24.142436 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB ACK] 
+05:15:25.468346 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB REQ] 
+05:15:25.468420 IP (tos 0x2,ECT(0), ttl 64, id 10, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB ACK] 
+05:15:25.724070 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [HB REQ] 
+05:15:25.724132 IP (tos 0x2,ECT(0), ttl 64, id 11, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB ACK] 
+05:15:27.854217 IP (tos 0x2,ECT(0), ttl 64, id 12, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB REQ] 
+05:15:27.854637 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [HB ACK] 
+05:15:30.103924 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 2244318878] [SID: 0] [SSEQ 7] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x8
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:15:30.121626 IP (tos 0x2,ECT(0), ttl 64, id 11, offset 0, flags [DF], proto SCTP (132), length 88)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 2244318878] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+	2) [DATA] (B)(E) [TSN: 922703197] [SID: 0] [SSEQ 7] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x8
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:15:30.322461 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [SACK] [cum ack 922703197] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:15:50.116903 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 2244318879] [SID: 0] [SSEQ 8] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x9
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:15:50.141079 IP (tos 0x2,ECT(0), ttl 64, id 12, offset 0, flags [DF], proto SCTP (132), length 88)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 2244318879] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+	2) [DATA] (B)(E) [TSN: 922703198] [SID: 0] [SSEQ 8] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x9
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:15:50.341982 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [SACK] [cum ack 922703198] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:15:51.957705 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 140)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 2413889662] [SID: 0] [SSEQ 1] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 92B flags 0x78400000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x10
+	ForCES flags:
+	  SuccessACK(0x1), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:15:52.144354 IP (tos 0x2,ECT(0), ttl 64, id 13, offset 0, flags [DF], proto SCTP (132), length 156)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SACK] [cum ack 2413889662] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+	2) [DATA] (B)(E) [TSN: 1498547999] [SID: 0] [SSEQ 1] [PPID 0x0] 
+	ForCES Config Response 
+	ForCES Version 1 len 92B flags 0x38400000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x10
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:15:52.344974 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [SACK] [cum ack 1498547999] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:15:55.629842 IP (tos 0x2,ECT(0), ttl 64, id 11, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB REQ] 
+05:15:55.630342 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB ACK] 
+05:15:56.189088 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB REQ] 
+05:15:56.189160 IP (tos 0x2,ECT(0), ttl 64, id 12, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB ACK] 
+05:16:11.972673 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 2244318880] [SID: 0] [SSEQ 9] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x11
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:16:12.163738 IP (tos 0x2,ECT(0), ttl 64, id 13, offset 0, flags [DF], proto SCTP (132), length 88)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 2244318880] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+	2) [DATA] (B)(E) [TSN: 922703199] [SID: 0] [SSEQ 9] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x11
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:16:12.364365 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [SACK] [cum ack 922703199] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:16:22.766463 IP (tos 0x2,ECT(0), ttl 64, id 14, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB REQ] 
+05:16:22.766888 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [HB ACK] 
+05:16:22.812607 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [HB REQ] 
+05:16:22.812641 IP (tos 0x2,ECT(0), ttl 64, id 15, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB ACK] 
+05:16:26.908770 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB REQ] 
+05:16:26.908850 IP (tos 0x2,ECT(0), ttl 64, id 13, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB ACK] 
+05:16:27.118570 IP (tos 0x2,ECT(0), ttl 64, id 14, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB REQ] 
+05:16:27.118998 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB ACK] 
+05:16:31.990056 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 2244318881] [SID: 0] [SSEQ 10] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x12
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:16:32.184118 IP (tos 0x2,ECT(0), ttl 64, id 14, offset 0, flags [DF], proto SCTP (132), length 88)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 2244318881] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+	2) [DATA] (B)(E) [TSN: 922703200] [SID: 0] [SSEQ 10] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x12
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:16:32.384948 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [SACK] [cum ack 922703200] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:16:52.009081 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 72)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [DATA] (B)(E) [TSN: 2244318882] [SID: 0] [SSEQ 11] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0xc0100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x13
+	ForCES flags:
+	  AlwaysACK(0x3), prio=0, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:16:52.205727 IP (tos 0x2,ECT(0), ttl 64, id 15, offset 0, flags [DF], proto SCTP (132), length 88)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SACK] [cum ack 2244318882] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+	2) [DATA] (B)(E) [TSN: 922703201] [SID: 0] [SSEQ 11] [PPID 0x0] 
+	ForCES HeartBeat 
+	ForCES Version 1 len 24B flags 0x08000000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x13
+	ForCES flags:
+	  NoACK(0x0), prio=1, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:16:52.406443 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [SACK] [cum ack 922703201] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:16:53.532328 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [HB REQ] 
+05:16:53.532396 IP (tos 0x2,ECT(0), ttl 64, id 16, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB ACK] 
+05:16:53.998215 IP (tos 0x2,ECT(0), ttl 64, id 17, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [HB REQ] 
+05:16:53.998632 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [HB ACK] 
+05:16:57.965660 IP (tos 0x2,ECT(0), ttl 64, id 15, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB REQ] 
+05:16:57.966179 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB ACK] 
+05:16:58.268666 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [HB REQ] 
+05:16:58.268737 IP (tos 0x2,ECT(0), ttl 64, id 16, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [HB ACK] 
+05:16:58.751669 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 124)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 2413889663] [SID: 0] [SSEQ 2] [PPID 0x0] 
+	ForCES Query 
+	ForCES Version 1 len 76B flags 0x78400000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x14
+	ForCES flags:
+	  SuccessACK(0x1), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:16:58.952418 IP (tos 0x2,ECT(0), ttl 64, id 18, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SACK] [cum ack 2413889663] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:16:59.213890 IP (tos 0x2,ECT(0), ttl 64, id 19, offset 0, flags [DF], proto SCTP (132), length 140)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 1498548000] [SID: 0] [SSEQ 2] [PPID 0x0] 
+	ForCES Query Response 
+	ForCES Version 1 len 92B flags 0x38400000 
+	SrcID 0x2(FE) DstID 0x40000003(CE) Correlator 0x14
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:16:59.414572 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [SACK] [cum ack 1498548000] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:17:06.275584 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 80)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 2413889664] [SID: 0] [SSEQ 3] [PPID 0x0] 
+	ForCES Association TearDown 
+	ForCES Version 1 len 32B flags 0x38100000 
+	SrcID 0x40000003(CE) DstID 0x2(FE) Correlator 0x0
+	ForCES flags:
+	  NoACK(0x0), prio=7, EMReserved(0x0),
+	  Standalone(0x0), EndofTransaction(0x2)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+05:17:06.475558 IP (tos 0x2,ECT(0), ttl 64, id 20, offset 0, flags [DF], proto SCTP (132), length 48)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SACK] [cum ack 2413889664] [a_rwnd 57344] [#gap acks 0] [#dup tsns 0] 
+05:17:07.278281 IP (tos 0x2,ECT(0), ttl 64, id 21, offset 0, flags [DF], proto SCTP (132), length 40)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SHUTDOWN] 
+05:17:07.278648 IP (tos 0x2,ECT(0), ttl 64, id 17, offset 0, flags [DF], proto SCTP (132), length 40)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [SHUTDOWN] 
+05:17:07.278805 IP (tos 0x2,ECT(0), ttl 64, id 16, offset 0, flags [DF], proto SCTP (132), length 40)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SHUTDOWN] 
+05:17:07.278894 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6704 > 192.168.1.142.53333: sctp[ForCES HP]
+	1) [SHUTDOWN ACK] 
+05:17:07.278986 IP (tos 0x2,ECT(0), ttl 64, id 22, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.142.53333 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SHUTDOWN COMPLETE] 
+05:17:07.279062 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6705 > 192.168.1.142.48432: sctp[ForCES MP]
+	1) [SHUTDOWN ACK] 
+05:17:07.279086 IP (tos 0x2,ECT(0), ttl 64, id 18, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.142.48432 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [SHUTDOWN COMPLETE] 
+05:17:07.279125 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6706 > 192.168.1.142.57793: sctp[ForCES LP]
+	1) [SHUTDOWN ACK] 
+05:17:07.279383 IP (tos 0x2,ECT(0), ttl 64, id 17, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.142.57793 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SHUTDOWN COMPLETE] 
+05:17:08.224255 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 68)
+    192.168.1.142.60979 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [INIT] [init tag: 893123932] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 4001675829] 
+05:17:08.224782 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 292)
+    192.168.1.143.6704 > 192.168.1.142.60979: sctp[ForCES HP]
+	1) [INIT ACK] [init tag: 3751052708] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 2904779402] 
+05:17:08.224834 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 264)
+    192.168.1.142.60979 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [COOKIE ECHO] 
+05:17:08.225194 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6704 > 192.168.1.142.60979: sctp[ForCES HP]
+	1) [COOKIE ACK] 
+05:17:09.226814 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 68)
+    192.168.1.142.41874 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [INIT] [init tag: 2631831000] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 3186084970] 
+05:17:09.227378 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 292)
+    192.168.1.143.6705 > 192.168.1.142.41874: sctp[ForCES MP]
+	1) [INIT ACK] [init tag: 1025500394] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 492081856] 
+05:17:09.227470 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 264)
+    192.168.1.142.41874 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [COOKIE ECHO] 
+05:17:09.227843 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6705 > 192.168.1.142.41874: sctp[ForCES MP]
+	1) [COOKIE ACK] 
+05:17:10.234920 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 68)
+    192.168.1.142.43249 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [INIT] [init tag: 1071698335] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 1223456824] 
+05:17:10.235259 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 292)
+    192.168.1.143.6706 > 192.168.1.142.43249: sctp[ForCES LP]
+	1) [INIT ACK] [init tag: 2401559485] [rwnd: 57344] [OS: 1] [MIS: 1] [init TSN: 4176597732] 
+05:17:10.235295 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 264)
+    192.168.1.142.43249 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [COOKIE ECHO] 
+05:17:10.235559 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6706 > 192.168.1.142.43249: sctp[ForCES LP]
+	1) [COOKIE ACK] 
+05:17:10.432954 IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 40)
+    192.168.1.142.60979 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SHUTDOWN] 
+05:17:10.433287 IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 40)
+    192.168.1.142.41874 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [SHUTDOWN] 
+05:17:10.433473 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6704 > 192.168.1.142.60979: sctp[ForCES HP]
+	1) [SHUTDOWN ACK] 
+05:17:10.433517 IP (tos 0x2,ECT(0), ttl 64, id 2, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.142.60979 > 192.168.1.143.6704: sctp[ForCES HP]
+	1) [SHUTDOWN COMPLETE] 
+05:17:10.433629 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6705 > 192.168.1.142.41874: sctp[ForCES MP]
+	1) [SHUTDOWN ACK] 
+05:17:10.433866 IP (tos 0x2,ECT(0), ttl 64, id 2, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.142.41874 > 192.168.1.143.6705: sctp[ForCES MP]
+	1) [SHUTDOWN COMPLETE] 
+05:17:10.434075 IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 40)
+    192.168.1.142.43249 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SHUTDOWN] 
+05:17:10.434365 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.143.6706 > 192.168.1.142.43249: sctp[ForCES LP]
+	1) [SHUTDOWN ACK] 
+05:17:10.434388 IP (tos 0x2,ECT(0), ttl 64, id 2, offset 0, flags [DF], proto SCTP (132), length 36)
+    192.168.1.142.43249 > 192.168.1.143.6706: sctp[ForCES LP]
+	1) [SHUTDOWN COMPLETE] 
diff --git a/tests/forces3.pcap b/tests/forces3.pcap
new file mode 100644
index 0000000..a968425
--- /dev/null
+++ b/tests/forces3.pcap
Binary files differ
diff --git a/tests/forces3vvv.out b/tests/forces3vvv.out
new file mode 100644
index 0000000..6d2394d
--- /dev/null
+++ b/tests/forces3vvv.out
@@ -0,0 +1,602 @@
+23:38:56.018934 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 76)
+    172.20.4.63.16702 > 172.20.4.93.6702: sctp[ForCES LP]
+	1) [INIT] [init tag: 3355263363] [rwnd: 55296] [OS: 10] [MIS: 65535] [init TSN: 861291022] 
+23:38:56.019037 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 236)
+    172.20.4.93.6702 > 172.20.4.63.16702: sctp[ForCES LP]
+	1) [INIT ACK] [init tag: 2807207095] [rwnd: 54784] [OS: 10] [MIS: 10] [init TSN: 2957773506] 
+23:38:56.019110 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 200)
+    172.20.4.63.16702 > 172.20.4.93.6702: sctp[ForCES LP]
+	1) [COOKIE ECHO] 
+23:38:56.019241 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    172.20.4.93.6702 > 172.20.4.63.16702: sctp[ForCES LP]
+	1) [COOKIE ACK] 
+23:38:56.019920 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 76)
+    172.20.4.63.16701 > 172.20.4.93.6701: sctp[ForCES MP]
+	1) [INIT] [init tag: 355895801] [rwnd: 55296] [OS: 10] [MIS: 65535] [init TSN: 1729985532] 
+23:38:56.020061 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 236)
+    172.20.4.93.6701 > 172.20.4.63.16701: sctp[ForCES MP]
+	1) [INIT ACK] [init tag: 2960733132] [rwnd: 54784] [OS: 10] [MIS: 10] [init TSN: 777474576] 
+23:38:56.020111 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 200)
+    172.20.4.63.16701 > 172.20.4.93.6701: sctp[ForCES MP]
+	1) [COOKIE ECHO] 
+23:38:56.020235 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    172.20.4.93.6701 > 172.20.4.63.16701: sctp[ForCES MP]
+	1) [COOKIE ACK] 
+23:38:56.020433 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 76)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [INIT] [init tag: 3006905571] [rwnd: 55296] [OS: 10] [MIS: 65535] [init TSN: 2958179469] 
+23:38:56.020578 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 236)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [INIT ACK] [init tag: 3515444933] [rwnd: 54784] [OS: 10] [MIS: 10] [init TSN: 1811362564] 
+23:38:56.020617 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 200)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [COOKIE ECHO] 
+23:38:56.020739 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 36)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [COOKIE ACK] 
+23:38:57.240366 IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 72)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 2958179469] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES Association Setup 
+	ForCES Version 1 len 24B flags 0xf8000000 
+	SrcID 0x3(FE) DstID 0x40000001(CE) Correlator 0x1
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, EMReserved(0x0),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+
+
+23:38:57.240474 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [SACK] [cum ack 2958179469] [a_rwnd 54760] [#gap acks 0] [#dup tsns 0] 
+23:38:57.241034 IP (tos 0x2,ECT(0), ttl 64, id 1, offset 0, flags [DF], proto SCTP (132), length 80)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 1811362564] [SID: 0] [SSEQ 0] [PPID 0x0] 
+	ForCES Association Response 
+	ForCES Version 1 len 32B flags 0x38400000 
+	SrcID 0x40000001(CE) DstID 0x3(FE) Correlator 0x1
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	ASResult TLV, length 8 (data length 4 Bytes)
+         Success (0)
+         
+
+23:38:57.241079 IP (tos 0x2,ECT(0), ttl 64, id 2, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [SACK] [cum ack 1811362564] [a_rwnd 55264] [#gap acks 0] [#dup tsns 0] 
+23:38:57.241047 IP (tos 0x2,ECT(0), ttl 64, id 2, offset 0, flags [DF], proto SCTP (132), length 100)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 1811362565] [SID: 0] [SSEQ 1] [PPID 0x0] 
+	ForCES Query 
+	ForCES Version 1 len 52B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x3(FE) Correlator 0x1
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 28 (data length 24 Bytes)
+         FEObj LFB(Classid 1) instance 1
+          Oper TLV  Get(0x7) length 16
+           PATH-DATA TLV, length 12 (data encapsulated 8 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 2
+
+
+23:38:57.244420 IP (tos 0x2,ECT(0), ttl 64, id 3, offset 0, flags [DF], proto SCTP (132), length 140)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 2958179470] [SID: 0] [SSEQ 1] [PPID 0x0] 
+	ForCES Query Response 
+	ForCES Version 1 len 92B flags 0x38400000 
+	SrcID 0x3(FE) DstID 0x40000001(CE) Correlator 0x1
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 68 (data length 64 Bytes)
+         FEObj LFB(Classid 1) instance 1
+          Oper TLV  GetResp(0x9) length 56
+           PATH-DATA TLV, length 52 (data encapsulated 48 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 2
+              FULLDATA TLV (Length 40 DataLen 36 Bytes)
+               [
+               0x0000:  0000 0000 0000 0001 0000 0001 0000 0001
+               0x0010:  0000 0002 0000 0001 0000 0002 0000 000e
+               0x0020:  0000 0001
+               ]
+
+
+23:38:57.440152 IP (tos 0x2,ECT(0), ttl 64, id 4, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [SACK] [cum ack 1811362565] [a_rwnd 55264] [#gap acks 0] [#dup tsns 0] 
+23:38:57.444197 IP (tos 0x2,ECT(0), ttl 64, id 3, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [SACK] [cum ack 2958179470] [a_rwnd 54760] [#gap acks 0] [#dup tsns 0] 
+23:39:04.942310 IP (tos 0x2,ECT(0), ttl 64, id 4, offset 0, flags [DF], proto SCTP (132), length 100)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 1811362566] [SID: 0] [SSEQ 2] [PPID 0x0] 
+	ForCES Query 
+	ForCES Version 1 len 52B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x3(FE) Correlator 0x2
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 28 (data length 24 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  Get(0x7) length 16
+           PATH-DATA TLV, length 12 (data encapsulated 8 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+
+
+23:39:04.943823 IP (tos 0x2,ECT(0), ttl 64, id 5, offset 0, flags [DF], proto SCTP (132), length 188)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 2958179471] [SID: 0] [SSEQ 2] [PPID 0x0] 
+	ForCES Query Response 
+	ForCES Version 1 len 140B flags 0x38400000 
+	SrcID 0x3(FE) DstID 0x40000001(CE) Correlator 0x2
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 116 (data length 112 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  GetResp(0x9) length 104
+           PATH-DATA TLV, length 100 (data encapsulated 96 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              FULLDATA TLV (Length 88 DataLen 84 Bytes)
+               [
+               0x0000:  0112 0054 0000 0000 0000 0001 0112 0028
+               0x0010:  0000 0000 0102 0304 0000 0018 0001 0203
+               0x0020:  0405 0000 0001 1112 1314 0000 0019 0a0b
+               0x0030:  0c0d 0e0f 0000 0001 0000 0002 0112 0018
+               0x0040:  0000 0000 0807 0605 0000 0010 1415 1617
+               0x0050:  1819 0000
+               ]
+
+
+23:39:05.141776 IP (tos 0x2,ECT(0), ttl 64, id 6, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [SACK] [cum ack 1811362566] [a_rwnd 55264] [#gap acks 0] [#dup tsns 0] 
+23:39:05.143071 IP (tos 0x2,ECT(0), ttl 64, id 5, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [SACK] [cum ack 2958179471] [a_rwnd 54760] [#gap acks 0] [#dup tsns 0] 
+23:39:08.406266 IP (tos 0x2,ECT(0), ttl 64, id 6, offset 0, flags [DF], proto SCTP (132), length 156)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 1811362567] [SID: 0] [SSEQ 3] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 108B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x3(FE) Correlator 0x3
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 84 (data length 80 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  Set(0x1) length 72
+           PATH-DATA TLV, length 68 (data encapsulated 64 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              PATH-DATA TLV, length 56 (data encapsulated 52 Bytes)
+               Pathdata: Flags 0x0 ID count 1
+                 ID#01: 0
+                 PATH-DATA TLV, length 44 (data encapsulated 40 Bytes)
+                  Pathdata: Flags 0x0 ID count 1
+                    ID#01: 2
+                    PATH-DATA TLV, length 32 (data encapsulated 28 Bytes)
+                     Pathdata: Flags 0x0 ID count 1
+                       ID#01: 0
+                       PATH-DATA TLV, length 20 (data encapsulated 16 Bytes)
+                        Pathdata: Flags 0x0 ID count 1
+                          ID#01: 1
+                          FULLDATA TLV (Length 8 DataLen 4 Bytes)
+                           [
+                           0x0000:  0a00 0001
+                           ]
+
+
+23:39:08.410057 IP (tos 0x2,ECT(0), ttl 64, id 7, offset 0, flags [DF], proto SCTP (132), length 108)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 2958179472] [SID: 0] [SSEQ 3] [PPID 0x0] 
+	ForCES Config Response 
+	ForCES Version 1 len 60B flags 0x38400000 
+	SrcID 0x3(FE) DstID 0x40000001(CE) Correlator 0x3
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 36 (data length 32 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  SetResp(0x3) length 24
+           PATH-DATA TLV, length 20 (data encapsulated 16 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              RESULT TLV (Length 8 DataLen 4 Bytes)
+                Result: SUCCESS (code 0x0)
+
+
+23:39:08.606148 IP (tos 0x2,ECT(0), ttl 64, id 8, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [SACK] [cum ack 1811362567] [a_rwnd 55264] [#gap acks 0] [#dup tsns 0] 
+23:39:08.610452 IP (tos 0x2,ECT(0), ttl 64, id 7, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [SACK] [cum ack 2958179472] [a_rwnd 54760] [#gap acks 0] [#dup tsns 0] 
+23:39:10.517887 IP (tos 0x2,ECT(0), ttl 64, id 8, offset 0, flags [DF], proto SCTP (132), length 156)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 1811362568] [SID: 0] [SSEQ 4] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 108B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x3(FE) Correlator 0x4
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 84 (data length 80 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  Set(0x1) length 72
+           PATH-DATA TLV, length 68 (data encapsulated 64 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              PATH-DATA TLV, length 56 (data encapsulated 52 Bytes)
+               Pathdata: Flags 0x0 ID count 1
+                 ID#01: 0
+                 PATH-DATA TLV, length 44 (data encapsulated 40 Bytes)
+                  Pathdata: Flags 0x0 ID count 1
+                    ID#01: 2
+                    PATH-DATA TLV, length 32 (data encapsulated 28 Bytes)
+                     Pathdata: Flags 0x0 ID count 1
+                       ID#01: 0
+                       PATH-DATA TLV, length 20 (data encapsulated 16 Bytes)
+                        Pathdata: Flags 0x0 ID count 1
+                          ID#01: 2
+                          FULLDATA TLV (Length 8 DataLen 4 Bytes)
+                           [
+                           0x0000:  0000 0008
+                           ]
+
+
+23:39:10.521718 IP (tos 0x2,ECT(0), ttl 64, id 9, offset 0, flags [DF], proto SCTP (132), length 108)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 2958179473] [SID: 0] [SSEQ 4] [PPID 0x0] 
+	ForCES Config Response 
+	ForCES Version 1 len 60B flags 0x38400000 
+	SrcID 0x3(FE) DstID 0x40000001(CE) Correlator 0x4
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 36 (data length 32 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  SetResp(0x3) length 24
+           PATH-DATA TLV, length 20 (data encapsulated 16 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              RESULT TLV (Length 8 DataLen 4 Bytes)
+                Result: SUCCESS (code 0x0)
+
+
+23:39:10.717774 IP (tos 0x2,ECT(0), ttl 64, id 10, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [SACK] [cum ack 1811362568] [a_rwnd 55264] [#gap acks 0] [#dup tsns 0] 
+23:39:10.721988 IP (tos 0x2,ECT(0), ttl 64, id 9, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [SACK] [cum ack 2958179473] [a_rwnd 54760] [#gap acks 0] [#dup tsns 0] 
+23:39:12.997636 IP (tos 0x2,ECT(0), ttl 64, id 10, offset 0, flags [DF], proto SCTP (132), length 160)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 1811362569] [SID: 0] [SSEQ 5] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 112B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x3(FE) Correlator 0x5
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 88 (data length 84 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  Set(0x1) length 76
+           PATH-DATA TLV, length 72 (data encapsulated 68 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              PATH-DATA TLV, length 60 (data encapsulated 56 Bytes)
+               Pathdata: Flags 0x0 ID count 1
+                 ID#01: 0
+                 PATH-DATA TLV, length 48 (data encapsulated 44 Bytes)
+                  Pathdata: Flags 0x0 ID count 1
+                    ID#01: 2
+                    PATH-DATA TLV, length 36 (data encapsulated 32 Bytes)
+                     Pathdata: Flags 0x0 ID count 1
+                       ID#01: 0
+                       PATH-DATA TLV, length 24 (data encapsulated 20 Bytes)
+                        Pathdata: Flags 0x0 ID count 1
+                          ID#01: 3
+                          FULLDATA TLV (Length 10 DataLen 6 pad 2 Bytes)
+                           [
+                           0x0000:  0002 0406 080a 0000
+                           ]
+
+
+23:39:13.001457 IP (tos 0x2,ECT(0), ttl 64, id 11, offset 0, flags [DF], proto SCTP (132), length 108)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 2958179474] [SID: 0] [SSEQ 5] [PPID 0x0] 
+	ForCES Config Response 
+	ForCES Version 1 len 60B flags 0x38400000 
+	SrcID 0x3(FE) DstID 0x40000001(CE) Correlator 0x5
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 36 (data length 32 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  SetResp(0x3) length 24
+           PATH-DATA TLV, length 20 (data encapsulated 16 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              RESULT TLV (Length 8 DataLen 4 Bytes)
+                Result: SUCCESS (code 0x0)
+
+
+23:39:13.197325 IP (tos 0x2,ECT(0), ttl 64, id 12, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [SACK] [cum ack 1811362569] [a_rwnd 55264] [#gap acks 0] [#dup tsns 0] 
+23:39:13.201336 IP (tos 0x2,ECT(0), ttl 64, id 11, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [SACK] [cum ack 2958179474] [a_rwnd 54760] [#gap acks 0] [#dup tsns 0] 
+23:39:15.389357 IP (tos 0x2,ECT(0), ttl 64, id 12, offset 0, flags [DF], proto SCTP (132), length 200)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 1811362570] [SID: 0] [SSEQ 6] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 152B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x3(FE) Correlator 0x6
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 128 (data length 124 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  Set(0x1) length 116
+           PATH-DATA TLV, length 112 (data encapsulated 108 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              PATH-DATA TLV, length 100 (data encapsulated 96 Bytes)
+               Pathdata: Flags 0x0 ID count 1
+                 ID#01: 0
+                 PATH-DATA TLV, length 88 (data encapsulated 84 Bytes)
+                  Pathdata: Flags 0x0 ID count 1
+                    ID#01: 2
+                    PATH-DATA TLV, length 76 (data encapsulated 72 Bytes)
+                     Pathdata: Flags 0x0 ID count 1
+                       ID#01: 2
+                       PATH-DATA TLV, length 20 (data encapsulated 16 Bytes)
+                        Pathdata: Flags 0x0 ID count 1
+                          ID#01: 1
+                          FULLDATA TLV (Length 8 DataLen 4 Bytes)
+                           [
+                           0x0000:  1400 0001
+                           ]
+                      PATH-DATA TLV, length 20 (data encapsulated 16 Bytes)
+                       Pathdata: Flags 0x0 ID count 1
+                         ID#01: 2
+                         FULLDATA TLV (Length 8 DataLen 4 Bytes)
+                          [
+                          0x0000:  0000 000c
+                          ]
+                      PATH-DATA TLV, length 24 (data encapsulated 20 Bytes)
+                       Pathdata: Flags 0x0 ID count 1
+                         ID#01: 3
+                         FULLDATA TLV (Length 10 DataLen 6 pad 2 Bytes)
+                          [
+                          0x0000:  0003 0609 0c0f 0000
+                          ]
+
+
+23:39:15.393377 IP (tos 0x2,ECT(0), ttl 64, id 13, offset 0, flags [DF], proto SCTP (132), length 108)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 2958179475] [SID: 0] [SSEQ 6] [PPID 0x0] 
+	ForCES Config Response 
+	ForCES Version 1 len 60B flags 0x38400000 
+	SrcID 0x3(FE) DstID 0x40000001(CE) Correlator 0x6
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 36 (data length 32 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  SetResp(0x3) length 24
+           PATH-DATA TLV, length 20 (data encapsulated 16 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              RESULT TLV (Length 8 DataLen 4 Bytes)
+                Result: SUCCESS (code 0x0)
+
+
+23:39:15.588896 IP (tos 0x2,ECT(0), ttl 64, id 14, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [SACK] [cum ack 1811362570] [a_rwnd 55264] [#gap acks 0] [#dup tsns 0] 
+23:39:15.592787 IP (tos 0x2,ECT(0), ttl 64, id 13, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [SACK] [cum ack 2958179475] [a_rwnd 54760] [#gap acks 0] [#dup tsns 0] 
+23:39:18.045055 IP (tos 0x2,ECT(0), ttl 64, id 14, offset 0, flags [DF], proto SCTP (132), length 220)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 1811362571] [SID: 0] [SSEQ 7] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 172B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x3(FE) Correlator 0x7
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 148 (data length 144 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  Set(0x1) length 136
+           PATH-DATA TLV, length 132 (data encapsulated 128 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              PATH-DATA TLV, length 120 (data encapsulated 116 Bytes)
+               Pathdata: Flags 0x0 ID count 1
+                 ID#01: 2
+                 PATH-DATA TLV, length 20 (data encapsulated 16 Bytes)
+                  Pathdata: Flags 0x0 ID count 1
+                    ID#01: 1
+                    FULLDATA TLV (Length 8 DataLen 4 Bytes)
+                     [
+                     0x0000:  0000 0003
+                     ]
+                PATH-DATA TLV, length 88 (data encapsulated 84 Bytes)
+                 Pathdata: Flags 0x0 ID count 1
+                   ID#01: 2
+                   PATH-DATA TLV, length 76 (data encapsulated 72 Bytes)
+                    Pathdata: Flags 0x0 ID count 1
+                      ID#01: 0
+                      PATH-DATA TLV, length 20 (data encapsulated 16 Bytes)
+                       Pathdata: Flags 0x0 ID count 1
+                         ID#01: 1
+                         FULLDATA TLV (Length 8 DataLen 4 Bytes)
+                          [
+                          0x0000:  1e00 0001
+                          ]
+                     PATH-DATA TLV, length 20 (data encapsulated 16 Bytes)
+                      Pathdata: Flags 0x0 ID count 1
+                        ID#01: 2
+                        FULLDATA TLV (Length 8 DataLen 4 Bytes)
+                         [
+                         0x0000:  0000 000d
+                         ]
+                     PATH-DATA TLV, length 24 (data encapsulated 20 Bytes)
+                      Pathdata: Flags 0x0 ID count 1
+                        ID#01: 3
+                        FULLDATA TLV (Length 10 DataLen 6 pad 2 Bytes)
+                         [
+                         0x0000:  0004 080c 1014 0000
+                         ]
+
+
+23:39:18.049369 IP (tos 0x2,ECT(0), ttl 64, id 15, offset 0, flags [DF], proto SCTP (132), length 108)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 2958179476] [SID: 0] [SSEQ 7] [PPID 0x0] 
+	ForCES Config Response 
+	ForCES Version 1 len 60B flags 0x38400000 
+	SrcID 0x3(FE) DstID 0x40000001(CE) Correlator 0x7
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 36 (data length 32 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  SetResp(0x3) length 24
+           PATH-DATA TLV, length 20 (data encapsulated 16 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              RESULT TLV (Length 8 DataLen 4 Bytes)
+                Result: SUCCESS (code 0x0)
+
+
+23:39:18.244425 IP (tos 0x2,ECT(0), ttl 64, id 16, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [SACK] [cum ack 1811362571] [a_rwnd 55264] [#gap acks 0] [#dup tsns 0] 
+23:39:18.248927 IP (tos 0x2,ECT(0), ttl 64, id 15, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [SACK] [cum ack 2958179476] [a_rwnd 54760] [#gap acks 0] [#dup tsns 0] 
+23:39:20.060819 IP (tos 0x2,ECT(0), ttl 64, id 16, offset 0, flags [DF], proto SCTP (132), length 136)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 1811362572] [SID: 0] [SSEQ 8] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 88B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x3(FE) Correlator 0x8
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 64 (data length 60 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  Del(0x5) length 52
+           PATH-DATA TLV, length 48 (data encapsulated 44 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              PATH-DATA TLV, length 36 (data encapsulated 32 Bytes)
+               Pathdata: Flags 0x0 ID count 1
+                 ID#01: 0
+                 PATH-DATA TLV, length 24 (data encapsulated 20 Bytes)
+                  Pathdata: Flags 0x0 ID count 1
+                    ID#01: 2
+                    PATH-DATA TLV, length 12 (data encapsulated 8 Bytes)
+                     Pathdata: Flags 0x0 ID count 1
+                       ID#01: 2
+
+
+23:39:20.065279 IP (tos 0x2,ECT(0), ttl 64, id 17, offset 0, flags [DF], proto SCTP (132), length 108)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 2958179477] [SID: 0] [SSEQ 8] [PPID 0x0] 
+	ForCES Config Response 
+	ForCES Version 1 len 60B flags 0x38400000 
+	SrcID 0x3(FE) DstID 0x40000001(CE) Correlator 0x8
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 36 (data length 32 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  DelResp(0x6) length 24
+           PATH-DATA TLV, length 20 (data encapsulated 16 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              RESULT TLV (Length 8 DataLen 4 Bytes)
+                Result: SUCCESS (code 0x0)
+
+
+23:39:20.260061 IP (tos 0x2,ECT(0), ttl 64, id 18, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [SACK] [cum ack 1811362572] [a_rwnd 55264] [#gap acks 0] [#dup tsns 0] 
+23:39:20.265566 IP (tos 0x2,ECT(0), ttl 64, id 17, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [SACK] [cum ack 2958179477] [a_rwnd 54760] [#gap acks 0] [#dup tsns 0] 
+23:39:22.796350 IP (tos 0x2,ECT(0), ttl 64, id 18, offset 0, flags [DF], proto SCTP (132), length 112)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 1811362573] [SID: 0] [SSEQ 9] [PPID 0x0] 
+	ForCES Config 
+	ForCES Version 1 len 64B flags 0xf8400000 
+	SrcID 0x40000001(CE) DstID 0x3(FE) Correlator 0x9
+	ForCES flags:
+	  AlwaysACK(0x3), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 40 (data length 36 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  Del(0x5) length 28
+           PATH-DATA TLV, length 24 (data encapsulated 20 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              PATH-DATA TLV, length 12 (data encapsulated 8 Bytes)
+               Pathdata: Flags 0x0 ID count 1
+                 ID#01: 2
+
+
+23:39:22.800525 IP (tos 0x2,ECT(0), ttl 64, id 19, offset 0, flags [DF], proto SCTP (132), length 108)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [DATA] (B)(E) [TSN: 2958179478] [SID: 0] [SSEQ 9] [PPID 0x0] 
+	ForCES Config Response 
+	ForCES Version 1 len 60B flags 0x38400000 
+	SrcID 0x3(FE) DstID 0x40000001(CE) Correlator 0x9
+	ForCES flags:
+	  NoACK(0x0), prio=7, execute-all-or-none(0x1),
+	  Standalone(0x0), StartofTransaction(0x0)
+	  Extra flags: rsv(b5-7) 0x0 rsv(b13-31) 0x0
+	LFBselect TLV, length 36 (data length 32 Bytes)
+         #14(Classid e) instance 1
+          Oper TLV  DelResp(0x6) length 24
+           PATH-DATA TLV, length 20 (data encapsulated 16 Bytes)
+            Pathdata: Flags 0x0 ID count 1
+              ID#01: 1
+              RESULT TLV (Length 8 DataLen 4 Bytes)
+                Result: SUCCESS (code 0x0)
+
+
+23:39:22.995584 IP (tos 0x2,ECT(0), ttl 64, id 20, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.63.16700 > 172.20.4.93.6700: sctp[ForCES HP]
+	1) [SACK] [cum ack 1811362573] [a_rwnd 55264] [#gap acks 0] [#dup tsns 0] 
+23:39:23.001212 IP (tos 0x2,ECT(0), ttl 64, id 19, offset 0, flags [DF], proto SCTP (132), length 48)
+    172.20.4.93.6700 > 172.20.4.63.16700: sctp[ForCES HP]
+	1) [SACK] [cum ack 2958179478] [a_rwnd 54760] [#gap acks 0] [#dup tsns 0] 
diff --git a/tests/geonet_and_calm_fast.out b/tests/geonet_and_calm_fast.out
new file mode 100644
index 0000000..eae996f
--- /dev/null
+++ b/tests/geonet_and_calm_fast.out
@@ -0,0 +1,169 @@
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769562 lon:56597275
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770788 lon:56598784
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769562 lon:56597275
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770788 lon:56598784
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769562 lon:56597275
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770822 lon:56598670
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769562 lon:56597275
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770711 lon:56598670
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769562 lon:56597275
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770711 lon:56598670
+GeoNet src:00:0c:42:69:68:be; v:0 NH:1-BTP-A HT:5-1-TopoScopeBcast-MH HopLim:2 Payload:29 GN_ADDR:c0:cc:00:0c:42:69:68:be lat:514775183 lon:56605966; BTP Dst:5000 Src:5000; ItsPduHeader v:0 t:0-CAM
+	0x0000:  0000 013c f7d0 912d 0000 0019 8400 6bf4  ...<...-......k.
+	0x0010:  d607 abb5 6c80 09f6 00                   ....l....
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769429 lon:56597103
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770711 lon:56598670
+CALM FAST src:00:0c:42:69:68:be; SrcNwref:0; DstNwref:0; 
+	0x0000:  0000 01ac 8005 4455 3540 1c02 a2b3 0290  ......DU5@......
+	0x0010:  2035 6fa0 6041 a4b6 1737 4656 56c2 0547  .5o.`A...7FVV..G
+	0x0020:  2617 6657 2736 52f5 a756 9646 5696 e646  &.fW'6R..V.FV..F
+	0x0030:  5020 4047 063f 9300 0030                 P.@G.?...0
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769429 lon:56597103
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770641 lon:56598655
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769429 lon:56597103
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770641 lon:56598655
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769429 lon:56597103
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770717 lon:56598526
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769415 lon:56597089
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770717 lon:56598526
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769415 lon:56597089
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770606 lon:56598526
+GeoNet src:00:0c:42:69:68:be; v:0 NH:1-BTP-A HT:5-1-TopoScopeBcast-MH HopLim:2 Payload:29 GN_ADDR:c0:cc:00:0c:42:69:68:be lat:514775183 lon:56605966; BTP Dst:5000 Src:5000; ItsPduHeader v:0 t:0-CAM
+	0x0000:  0000 013c f7d0 9ce7 0000 0019 8400 6bf4  ...<..........k.
+	0x0010:  d607 abb5 6c80 09f6 00                   ....l....
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769422 lon:56596946
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770606 lon:56598526
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769422 lon:56596946
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770620 lon:56598541
+GeoNet src:00:0c:42:69:68:be; v:0 NH:1-BTP-A HT:5-1-TopoScopeBcast-MH HopLim:2 Payload:29 GN_ADDR:c0:cc:00:0c:42:69:68:be lat:514775183 lon:56605966; BTP Dst:5000 Src:5000; ItsPduHeader v:0 t:0-CAM
+	0x0000:  0000 013c f7d0 a0d0 0000 0019 8400 6bf4  ...<..........k.
+	0x0010:  d607 abb5 6c80 09f6 00                   ....l....
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+CALM FAST src:00:0c:42:69:68:be; SrcNwref:0; DstNwref:0; 
+	0x0000:  0000 02dc 8005 4455 3540 1c02 0513 04f3  ......DU5@......
+	0x0010:  0380 2030 0ff8 4020 356f a060 a010 2300  ...0..@.5o.`..#.
+	0x0020:  a020 4512 4d10 e020 202c 9300 c020 402b  ..E.M....,....@+
+	0x0030:  2fc1 5020 4188 be06 5300 6020 1000 2010  /.P.A...S.`.....
+	0x0040:  0020 1000 2010 00a0 101a 1133 0000 2010  ...........3....
+	0x0050:  0020 1000 a010 2020 1000 2010 0040 0060  .............@.`
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769408 lon:56596932
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770514 lon:56598397
+CALM FAST src:00:0c:42:69:68:be; SrcNwref:0; DstNwref:0; 
+	0x0000:  0000 01ac 8005 4455 3540 1c02 a2b3 0290  ......DU5@......
+	0x0010:  2035 6fa0 6041 a4b6 1737 4656 56c2 0547  .5o.`A...7FVV..G
+	0x0020:  2617 6657 2736 52f5 a756 9646 5696 e646  &.fW'6R..V.FV..F
+	0x0030:  5020 4039 226f 5300 0030                 P.@9"oS..0
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769408 lon:56596932
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770514 lon:56598397
+GeoNet src:00:0c:42:69:68:be; v:0 NH:1-BTP-A HT:5-1-TopoScopeBcast-MH HopLim:2 Payload:29 GN_ADDR:c0:cc:00:0c:42:69:68:be lat:514775183 lon:56605966; BTP Dst:5000 Src:5000; ItsPduHeader v:0 t:0-CAM
+	0x0000:  0000 013c f7d0 a4b9 0000 0019 8400 6bf4  ...<..........k.
+	0x0010:  d607 abb5 6c80 09f6 00                   ....l....
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769352 lon:56596932
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770514 lon:56598397
+CALM FAST src:00:0c:42:69:68:be; SrcNwref:0; DstNwref:0; 
+	0x0000:  0000 01ac 8005 4455 3540 1c02 a2b3 0290  ......DU5@......
+	0x0010:  2035 6fa0 6041 a4b6 1737 4656 56c2 0547  .5o.`A...7FVV..G
+	0x0020:  2617 6657 2736 52f5 a756 9646 5696 e646  &.fW'6R..V.FV..F
+	0x0030:  5020 4039 226f 5300 0030                 P.@9"oS..0
+GeoNet src:00:0c:42:69:68:be; v:0 NH:1-BTP-A HT:5-1-TopoScopeBcast-MH HopLim:2 Payload:138 GN_ADDR:c0:cc:00:0c:42:69:68:be lat:514775183 lon:56605966; BTP Dst:6103 Src:6103; ItsPduHeader v:0 t:106-ecoCAM
+	0x0000:  006a 013c f7d0 a6aa 0000 0066 0026 013c  .j.<.......f.&.<
+	0x0010:  f7d0 ba32 0080 0280 00cc 0407 d456 4c00  ...2.........VL.
+	0x0020:  8000 9e7b e857 2100 9e7b e857 2100 00cc  ...{.W!..{.W!...
+	0x0030:  0407 d4ab cc00 8000 9e7b e85a ed00 9e7b  .........{.Z...{
+	0x0040:  e85a ed00 00cc 0407 d501 cc00 8000 9e7b  .Z.............{
+	0x0050:  e85e b900 9e7b e85e b900 00cc 0407 d557  .^...{.^.......W
+	0x0060:  4c00 8000 9e7b e862 8500 9e7b e862 8500  L....{.b...{.b..
+	0x0070:  00cc 0407 d5ad 4c00 8000 9e7b e866 5100  ......L....{.fQ.
+	0x0080:  9e7b e866 5100                           .{.fQ.
+GeoNet src:00:0c:42:69:68:be; v:0 NH:1-BTP-A HT:5-1-TopoScopeBcast-MH HopLim:2 Payload:29 GN_ADDR:c0:cc:00:0c:42:69:68:be lat:514775183 lon:56605966; BTP Dst:5000 Src:5000; ItsPduHeader v:0 t:0-CAM
+	0x0000:  0000 013c f7d0 a6ae 0000 0019 8400 6bf4  ...<..........k.
+	0x0010:  d607 abb5 6c80 09f6 00                   ....l....
+GeoNet src:00:0c:42:69:68:be; v:0 NH:1-BTP-A HT:5-1-TopoScopeBcast-MH HopLim:2 Payload:236 GN_ADDR:c0:cc:00:0c:42:69:68:be lat:514775183 lon:56605966; BTP Dst:6102 Src:6102; ItsPduHeader v:0 t:106-ecoCAM
+	0x0000:  006a 013c f7d0 a6e1 0000 0066 fe7f 013c  .j.<.......f...<
+	0x0010:  f7d0 ba69 0006 6000 b402 03e9 0004 4e34  ...i..`.......N4
+	0x0020:  4030 000f de81 770f 4602 03ea 0204 4e4a  @0....w.F.....NJ
+	0x0030:  044e 4a80 3000 0fde 85dc 0f20 0004 0203  .NJ.0...........
+	0x0040:  eb00 044e 5c40 3000 0fde 8947 0f44 0207  ...N\@0....G.D..
+	0x0050:  d400 049c 9040 3000 0fde 80bb 8f44 0207  .....@0......D..
+	0x0060:  d500 049c a440 3000 0fde 8232 8f44 0207  .....@0....2.D..
+	0x0070:  d600 044e 9840 3000 0fde 8232 8f44 020b  ...N.@0....2.D..
+	0x0080:  bf00 04ea ec40 3000 0fde 83a9 8f46 020b  .....@0......F..
+	0x0090:  c002 04eb 0204 eb02 8030 000f de85 dc0f  .........0......
+	0x00a0:  2000 0602 0bc1 0004 eb14 4030 000f de86  ..........@0....
+	0x00b0:  978f 4000 1402 0faa 0006 0139 4840 3000  ..@........9H@0.
+	0x00c0:  0fde 86d6 0f44 020f ab00 0601 395c 4030  .....D......9\@0
+	0x00d0:  000f de8a 7f8f 4402 0fac 0006 0139 7040  ......D......9p@
+	0x00e0:  3000 0fde 8b3b 0f40                      0....;.@
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769352 lon:56596932
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770473 lon:56598412
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769345 lon:56597075
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770473 lon:56598412
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+CALM FAST src:00:0c:42:69:68:be; SrcNwref:0; DstNwref:0; 
+	0x0000:  0000 02dc 8005 4455 3540 1c02 0513 04f3  ......DU5@......
+	0x0010:  0380 2030 0ff8 9020 356f a060 a010 2300  ...0....5o.`..#.
+	0x0020:  a020 4512 4d11 1020 200d e300 c020 402b  ..E.M.........@+
+	0x0030:  2fc1 5020 4188 be06 5300 6020 1000 2010  /.P.A...S.`.....
+	0x0040:  0020 1000 2010 00a0 101a 1133 0000 2010  ...........3....
+	0x0050:  0020 1000 a010 2020 1000 2010 0040 0060  .............@.`
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769345 lon:56597075
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770528 lon:56598412
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769345 lon:56597075
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770528 lon:56598412
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769345 lon:56597075
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770473 lon:56598412
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769289 lon:56597075
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770473 lon:56598412
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769289 lon:56597075
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770486 lon:56598426
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769289 lon:56597075
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770486 lon:56598426
+GeoNet src:00:0c:42:69:68:be; v:0 NH:1-BTP-A HT:5-1-TopoScopeBcast-MH HopLim:2 Payload:29 GN_ADDR:c0:cc:00:0c:42:69:68:be lat:514775183 lon:56605966; BTP Dst:5000 Src:5000; ItsPduHeader v:0 t:0-CAM
+	0x0000:  0000 013c f7d0 b651 0000 0019 8400 6bf4  ...<...Q......k.
+	0x0010:  d607 abb5 6c80 09f6 00                   ....l....
+GeoNet src:00:0c:42:69:68:be; v:0 NH:1-BTP-A HT:5-1-TopoScopeBcast-MH HopLim:2 Payload:138 GN_ADDR:c0:cc:00:0c:42:69:68:be lat:514775183 lon:56605966; BTP Dst:6103 Src:6103; ItsPduHeader v:0 t:106-ecoCAM
+	0x0000:  006a 013c f7d0 b650 0000 0066 002e 013c  .j.<...P...f...<
+	0x0010:  f7d0 c9d8 0080 0280 00cc 0407 d456 4c00  .............VL.
+	0x0020:  8000 9e7b e85e f400 9e7b e85e f400 00cc  ...{.^...{.^....
+	0x0030:  0407 d4ab cc00 8000 9e7b e862 c000 9e7b  .........{.b...{
+	0x0040:  e862 c000 00cc 0407 d501 cc00 8000 9e7b  .b.............{
+	0x0050:  e866 8c00 9e7b e866 8c00 00cc 0407 d557  .f...{.f.......W
+	0x0060:  4c00 8000 9e7b e86a 5800 9e7b e86a 5800  L....{.jX..{.jX.
+	0x0070:  00cc 0407 d5ad 4c00 8000 9e7b e86e 2400  ......L....{.n$.
+	0x0080:  9e7b e86e 2400                           .{.n$.
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769289 lon:56597075
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770486 lon:56598426
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769289 lon:56597075
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770486 lon:56598426
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769289 lon:56597075
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770592 lon:56598569
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769289 lon:56597075
+GeoNet src:00:0c:42:6d:54:df; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:df lat:514770592 lon:56598569
+GeoNet src:00:0c:42:6d:54:db; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:db lat:0 lon:0
+GeoNet src:00:0c:42:6d:54:d5; v:0 NH:0-Any HT:1-0-Beacon HopLim:1 Payload:0 GN_ADDR:00:00:00:0c:42:6d:54:d5 lat:514769289 lon:56597075
diff --git a/tests/geonet_and_calm_fast.pcap b/tests/geonet_and_calm_fast.pcap
new file mode 100644
index 0000000..eaaebe5
--- /dev/null
+++ b/tests/geonet_and_calm_fast.pcap
Binary files differ
diff --git a/tests/icmpv6.out b/tests/icmpv6.out
new file mode 100644
index 0000000..bb7775e
--- /dev/null
+++ b/tests/icmpv6.out
@@ -0,0 +1,26 @@
+IP6 (hlim 255, next-header ICMPv6 (58) payload length: 176) fe80::b299:28ff:fec8:d66c > ff02::1: [icmp6 sum ok] ICMP6, router advertisement, length 176
+	hop limit 64, Flags [home agent], pref medium, router lifetime 15s, reachable time 0s, retrans time 0s
+	  prefix info option (3), length 32 (4): 2222:3333:4444:5555:6600::/72, Flags [onlink, auto], valid time 2592000s, pref. time 604800s
+	    0x0000:  48c0 0027 8d00 0009 3a80 0000 0000 2222
+	    0x0010:  3333 4444 5555 6600 0000 0000 0000
+	  rdnss option (25), length 40 (5):  lifetime 5s, addr: abcd::efef addr: 1234:5678::1
+	    0x0000:  0000 0000 0005 abcd 0000 0000 0000 0000
+	    0x0010:  0000 0000 efef 1234 5678 0000 0000 0000
+	    0x0020:  0000 0000 0001
+	  dnssl option (31), length 56 (7):  lifetime 5s, domain(s): example.com. example.org. dom1.dom2.tld.
+	    0x0000:  0000 0000 0005 0765 7861 6d70 6c65 0363
+	    0x0010:  6f6d 0007 6578 616d 706c 6503 6f72 6700
+	    0x0020:  0464 6f6d 3104 646f 6d32 0374 6c64 0000
+	    0x0030:  0000 0000 0000
+	  mtu option (5), length 8 (1):  100
+	    0x0000:  0000 0000 0064
+	  source link-address option (1), length 8 (1): b0:99:28:c8:d6:6c
+	    0x0000:  b099 28c8 d66c
+	  advertisement interval option (7), length 8 (1):  5000ms
+	    0x0000:  0000 0000 1388
+	  homeagent information option (8), length 8 (1):  preference 50001, lifetime 15
+	    0x0000:  0000 c351 000f
+IP6 (hlim 1, next-header Options (0) payload length: 36) fe80::215:17ff:fecc:e546 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 1 group record(s) [gaddr ff02::db8:1122:3344 to_ex { }]
+IP6 (hlim 1, next-header Options (0) payload length: 36) fe80::b2a8:6eff:fe0c:d4e8 > ff02::1: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener query v2 [max resp delay=10000] [gaddr :: robustness=2 qqi=60]
+IP6 (hlim 1, next-header Options (0) payload length: 96) fe80::215:17ff:fecc:e546 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 4 group record(s) [gaddr ff02::db8:1122:3344 is_ex { }] [gaddr ff02::1:ffcc:e546 is_ex { }] [gaddr ff02::1:ffa7:10ad is_ex { }] [gaddr ff02::1:ff00:2 is_ex { }]
+IP6 (hlim 1, next-header Options (0) payload length: 36) fe80::215:17ff:fecc:e546 > ff02::16: HBH (rtalert: 0x0000) (padn) [icmp6 sum ok] ICMP6, multicast listener report v2, 1 group record(s) [gaddr ff02::db8:1122:3344 to_in { }]
diff --git a/tests/icmpv6.pcap b/tests/icmpv6.pcap
new file mode 100644
index 0000000..d480e72
--- /dev/null
+++ b/tests/icmpv6.pcap
Binary files differ
diff --git a/tests/ieee802.11_exthdr.out b/tests/ieee802.11_exthdr.out
new file mode 100644
index 0000000..dd1689d
--- /dev/null
+++ b/tests/ieee802.11_exthdr.out
@@ -0,0 +1,26 @@
+10016360us tsft 1.0 Mb/s 2412 MHz 11b -22dB signal -86dB noise antenna 1 [bit 31] 0us Probe Request (omus) [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
+10018922us tsft 1.0 Mb/s 2412 MHz 11b -19dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a 
+10017245us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Probe Response (omus) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 1
+10085301us tsft 1.0 Mb/s 2412 MHz 11b -19dB signal -86dB noise antenna 1 [bit 31] 0us Probe Request (omus) [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
+10087718us tsft 1.0 Mb/s 2412 MHz 11b -18dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a 
+10086042us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Probe Response (omus) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 1
+10284358us tsft 1.0 Mb/s 2412 MHz 11b -61dB signal -86dB noise antenna 1 [bit 31] 0us Probe Request (omus) [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
+10288217us tsft 1.0 Mb/s 2412 MHz 11b -46dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a 
+10286542us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Probe Response (omus) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 1
+10351366us tsft 1.0 Mb/s 2412 MHz 11b -70dB signal -86dB noise antenna 1 [bit 31] 0us Probe Request (omus) [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
+10353769us tsft 1.0 Mb/s 2412 MHz 11b -57dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a 
+10352092us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Probe Response (omus) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 1
+10418368us tsft 1.0 Mb/s 2412 MHz 11b -67dB signal -86dB noise antenna 1 [bit 31] 0us Probe Request (omus) [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
+10420929us tsft 1.0 Mb/s 2412 MHz 11b -73dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a 
+10419253us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Probe Response (omus) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 1
+10485371us tsft 1.0 Mb/s 2412 MHz 11b -72dB signal -86dB noise antenna 1 [bit 31] 0us Probe Request (omus) [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
+10489278us tsft 1.0 Mb/s 2412 MHz 11b -74dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a 
+10487602us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Probe Response (omus) [1.0* 2.0* 5.5* 11.0* 6.0 9.0 12.0 18.0 Mbit] CH: 1
+13338508us tsft 1.0 Mb/s 2412 MHz 11b -14dB signal -86dB noise antenna 1 [bit 31] 314us Authentication (Open System)-1: Successful
+13340215us tsft 1.0 Mb/s 2412 MHz 11b -17dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a 
+13339435us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Authentication (Open System)-2: 
+13341999us tsft 1.0 Mb/s 2412 MHz 11b -18dB signal -86dB noise antenna 1 [bit 31] 314us Assoc Request (omus) [1.0 2.0 5.5 11.0 6.0 9.0 12.0 18.0 Mbit]
+13346458us tsft 1.0 Mb/s 2412 MHz 11b -18dB signal -86dB noise antenna 0 [bit 31] 0us Acknowledgment RA:90:a4:de:c0:46:0a 
+13344925us tsft 1.0 Mb/s -86dB noise 27dBm tx power [bit 15] 314us Assoc Response AID(1) :: Successful
+13355433us tsft 2412 MHz 11g -22dB signal -86dB noise antenna 1 19.5 Mb/s MCS 2 20 MHz lon GI [bit 31] 48us 
+13454791us tsft 2412 MHz 11g -21dB signal -86dB noise antenna 1 52.0 Mb/s MCS 11 20 MHz lon GI [bit 31] Pwr Mgmt 44us 
diff --git a/tests/ieee802.11_exthdr.pcap b/tests/ieee802.11_exthdr.pcap
new file mode 100644
index 0000000..613a443
--- /dev/null
+++ b/tests/ieee802.11_exthdr.pcap
Binary files differ
diff --git a/tests/ieee802.11_rx-stbc.out b/tests/ieee802.11_rx-stbc.out
new file mode 100644
index 0000000..9f483b9
--- /dev/null
+++ b/tests/ieee802.11_rx-stbc.out
@@ -0,0 +1,3 @@
+7268us tsft 2462 MHz 11g -51dB signal antenna 1 150.0 Mb/s MCS 7 40 MHz short GI RX-STBC1 CF +QoS Data IV: 11 Pad 20 KeyID 0
+119738173us tsft 2462 MHz 11g -46dB signal antenna 1 135.0 Mb/s MCS 7 40 MHz lon GI RX-STBC2 CF +QoS Data IV:  1 Pad 20 KeyID 0
+470382336us tsft 2462 MHz 11g -45dB signal antenna 1 150.0 Mb/s MCS 7 40 MHz short GI RX-STBC3 CF +QoS Data IV:  5 Pad 20 KeyID 0
diff --git a/tests/ieee802.11_rx-stbc.pcap b/tests/ieee802.11_rx-stbc.pcap
new file mode 100644
index 0000000..b825a0a
--- /dev/null
+++ b/tests/ieee802.11_rx-stbc.pcap
Binary files differ
diff --git a/tests/igmpv3-queries.out b/tests/igmpv3-queries.out
new file mode 100644
index 0000000..9db6f9b
--- /dev/null
+++ b/tests/igmpv3-queries.out
@@ -0,0 +1,6 @@
+IP 192.2.0.2 > 224.0.0.1: igmp query v3
+IP 192.2.0.2 > 224.0.0.1: igmp query v3 [max resp time 51m12s]
+IP 192.2.0.2 > 224.0.0.1: igmp query v3 [max resp time 51m12s]
+IP 192.2.0.2 > 224.0.0.1: igmp query v3 [max resp time 1.0s]
+IP 192.2.0.2 > 224.0.0.1: igmp query v3 [max resp time 1.0s]
+IP 192.2.0.2 > 224.0.0.1: igmp query v3 [max resp time 1.0s]
diff --git a/tests/igmpv3-queries.pcap b/tests/igmpv3-queries.pcap
new file mode 100644
index 0000000..df653ce
--- /dev/null
+++ b/tests/igmpv3-queries.pcap
Binary files differ
diff --git a/tests/ikev2four.out b/tests/ikev2four.out
new file mode 100644
index 0000000..db2e8ef
--- /dev/null
+++ b/tests/ikev2four.out
@@ -0,0 +1,107 @@
+IP (tos 0x0, ttl 64, id 19908, offset 0, flags [none], proto UDP (17), length 404)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000000: parent_sa ikev2_init[I]:
+    (sa: len=116
+        (p: #1 protoid=isakmp transform=12 len=116
+            (t: #1 type=encr id=aes (type=keylen value=0080))
+            (t: #2 type=encr id=aes (type=keylen value=0100))
+            (t: #3 type=encr id=aes (type=keylen value=00c0))
+            (t: #4 type=encr id=3des )
+            (t: #5 type=prf id=hmac-sha )
+            (t: #6 type=prf id=hmac-md5 )
+            (t: #7 type=prf id=aes128_xcbc )
+            (t: #8 type=integ id=hmac-sha )
+            (t: #9 type=integ id=hmac-md5 )
+            (t: #10 type=integ id=aes-xcbc )
+            (t: #11 type=dh id=modp1024 )
+            (t: #12 type=dh id=modp2048 )))
+    (v2ke: len=128 group=modp1024)
+    (nonce: len=32 data=(6128ebd023a864e94a7f...ba041b5de59955900d818ac54e18b236739d9e8b))
+    (n: prot_id=#0 type=16388(nat_detection_source_ip))
+    (n: prot_id=#0 type=16389(nat_detection_destination_ip))
+IP (tos 0x0, ttl 64, id 19909, offset 0, flags [none], proto UDP (17), length 88)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000000: parent_sa ikev2_init[R]:
+    (n: prot_id=#0 type=16390(cookie) data=(00000001c2221e50c16e123f2b0c71aefcf0cb3b798782c6))
+IP (tos 0x0, ttl 64, id 19910, offset 0, flags [none], proto UDP (17), length 436)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000000: parent_sa ikev2_init[I]:
+    (n: prot_id=#0 type=16390(cookie) data=(00000001c2221e50c16e...ba041b5de59955900d818ac54e18b236739d9e8b))
+    (sa: len=116
+        (p: #1 protoid=isakmp transform=12 len=116
+            (t: #1 type=encr id=aes (type=keylen value=0080))
+            (t: #2 type=encr id=aes (type=keylen value=0100))
+            (t: #3 type=encr id=aes (type=keylen value=00c0))
+            (t: #4 type=encr id=3des )
+            (t: #5 type=prf id=hmac-sha )
+            (t: #6 type=prf id=hmac-md5 )
+            (t: #7 type=prf id=aes128_xcbc )
+            (t: #8 type=integ id=hmac-sha )
+            (t: #9 type=integ id=hmac-md5 )
+            (t: #10 type=integ id=aes-xcbc )
+            (t: #11 type=dh id=modp1024 )
+            (t: #12 type=dh id=modp2048 )))
+    (v2ke: len=128 group=modp1024)
+    (nonce: len=32 data=(6128ebd023a864e94a7f...ba041b5de59955900d818ac54e18b236739d9e8b))
+    (n: prot_id=#0 type=16388(nat_detection_source_ip))
+    (n: prot_id=#0 type=16389(nat_detection_destination_ip))
+IP (tos 0x0, ttl 64, id 19911, offset 0, flags [none], proto UDP (17), length 332)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000000: parent_sa ikev2_init[R]:
+    (sa: len=44
+        (p: #1 protoid=isakmp transform=4 len=44
+            (t: #1 type=encr id=aes (type=keylen value=0080))
+            (t: #2 type=prf id=hmac-sha )
+            (t: #3 type=integ id=hmac-sha )
+            (t: #4 type=dh id=modp1024 )))
+    (v2ke: len=128 group=modp1024)
+    (nonce: len=32 data=(b31c379f272ce2984bd1...905954a783be2c37e2ccc4fdd270a532dbe6f428))
+    (n: prot_id=#0 type=16388(nat_detection_source_ip))
+    (n: prot_id=#0 type=16389(nat_detection_destination_ip))
+IP (tos 0x0, ttl 64, id 19912, offset 0, flags [none], proto UDP (17), length 264)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000001: child_sa  ikev2_auth[I]:
+    (v2e: len=204)
+IP (tos 0x0, ttl 64, id 19913, offset 0, flags [none], proto UDP (17), length 184)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000001: child_sa  ikev2_auth[R]:
+    (v2e: len=124)
+IP (tos 0x0, ttl 64, id 19914, offset 0, flags [none], proto UDP (17), length 280)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000002: child_sa  child_sa[I]:
+    (v2e: len=220)
+IP (tos 0x0, ttl 64, id 19915, offset 0, flags [none], proto UDP (17), length 248)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000003: child_sa  child_sa[I]:
+    (v2e: len=188)
+IP (tos 0x0, ttl 64, id 19916, offset 0, flags [none], proto UDP (17), length 104)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000002: child_sa  child_sa[R]:
+    (v2e: len=44)
+IP (tos 0x0, ttl 64, id 19917, offset 0, flags [none], proto UDP (17), length 104)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000003: child_sa  child_sa[R]:
+    (v2e: len=44)
+IP (tos 0x0, ttl 64, id 19918, offset 0, flags [none], proto UDP (17), length 312)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000004: child_sa  child_sa[I]:
+    (v2e: len=252)
+IP (tos 0x0, ttl 64, id 19919, offset 0, flags [none], proto UDP (17), length 280)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000005: child_sa  child_sa[I]:
+    (v2e: len=220)
+IP (tos 0x0, ttl 64, id 19920, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000004: child_sa  child_sa[R]:
+    (v2e: len=172)
+IP (tos 0x0, ttl 64, id 19921, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000005: child_sa  child_sa[R]:
+    (v2e: len=172)
+IP (tos 0x0, ttl 64, id 19922, offset 0, flags [none], proto UDP (17), length 312)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000006: child_sa  child_sa[I]:
+    (v2e: len=252)
+IP (tos 0x0, ttl 64, id 19923, offset 0, flags [none], proto UDP (17), length 280)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000007: child_sa  child_sa[I]:
+    (v2e: len=220)
+IP (tos 0x0, ttl 64, id 19924, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000006: child_sa  child_sa[R]:
+    (v2e: len=172)
+IP (tos 0x0, ttl 64, id 19925, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000007: child_sa  child_sa[R]:
+    (v2e: len=172)
+IP (tos 0x0, ttl 64, id 19926, offset 0, flags [none], proto UDP (17), length 392)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000008: child_sa  child_sa[I]:
+    (v2e: len=332)
+IP (tos 0x0, ttl 64, id 19927, offset 0, flags [none], proto UDP (17), length 344)
+    192.168.1.1.500 > 192.168.1.2.500: isakmp 2.0 msgid 00000008: child_sa  child_sa[R]:
+    (v2e: len=284)
+IP (tos 0x0, ttl 64, id 19928, offset 0, flags [none], proto UDP (17), length 120)
+    192.168.1.2.500 > 192.168.1.1.500: isakmp 2.0 msgid 00000000: parent_sa inf2[I]:
+    (v2e: len=60)
diff --git a/tests/ikev2four.pcap b/tests/ikev2four.pcap
new file mode 100644
index 0000000..4b1d0bf
--- /dev/null
+++ b/tests/ikev2four.pcap
Binary files differ
diff --git a/tests/ikev2fourv.out b/tests/ikev2fourv.out
new file mode 100644
index 0000000..15c482f
--- /dev/null
+++ b/tests/ikev2fourv.out
@@ -0,0 +1,107 @@
+IP (tos 0x0, ttl 64, id 19908, offset 0, flags [none], proto UDP (17), length 404)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x0765 -> 0xf5df!] isakmp 2.0 msgid 00000000 cookie a88875a8198992a6->0000000000000000: parent_sa ikev2_init[I]:
+    (sa: len=116
+        (p: #1 protoid=isakmp transform=12 len=116
+            (t: #1 type=encr id=aes (type=keylen value=0080))
+            (t: #2 type=encr id=aes (type=keylen value=0100))
+            (t: #3 type=encr id=aes (type=keylen value=00c0))
+            (t: #4 type=encr id=3des )
+            (t: #5 type=prf id=hmac-sha )
+            (t: #6 type=prf id=hmac-md5 )
+            (t: #7 type=prf id=aes128_xcbc )
+            (t: #8 type=integ id=hmac-sha )
+            (t: #9 type=integ id=hmac-md5 )
+            (t: #10 type=integ id=aes-xcbc )
+            (t: #11 type=dh id=modp1024 )
+            (t: #12 type=dh id=modp2048 )))
+    (v2ke: len=128 group=modp1024 b5445bd60cece6fdcd3c96a52cbb7bb426a8c7a0f56a9c38d1b1c4f0c3a6e8e7dba5c7339b6ed02e757119dfb5b6933ce93b604987fbbc77221b2a0c7cdd32787eff10572bef546c361462f9da34847969a42e51c755996beac42e6fba961a75de0fc1b23f099380896ee89202122dedac1bd54aa8494ac3d740be4d2a4cf39d)
+    (nonce: len=32 nonce=(6128ebd023a864e94a7ffb74bf7cce2fd4367322b8b073f942282bd52ebfe3e6) )
+    (n: prot_id=#0 type=16388(nat_detection_source_ip))
+    (n: prot_id=#0 type=16389(nat_detection_destination_ip))
+IP (tos 0x0, ttl 64, id 19909, offset 0, flags [none], proto UDP (17), length 88)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x0629 -> 0x0cd0!] isakmp 2.0 msgid 00000000 cookie a88875a8198992a6->0000000000000000: parent_sa ikev2_init[R]:
+    (n: prot_id=#0 type=16390(cookie) data=(00000001c2221e50c16e123f2b0c71aefcf0cb3b798782c6))
+IP (tos 0x0, ttl 64, id 19910, offset 0, flags [none], proto UDP (17), length 436)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x0785 -> 0x7702!] isakmp 2.0 msgid 00000000 cookie a88875a8198992a6->0000000000000000: parent_sa ikev2_init[I]:
+    (n: prot_id=#0 type=16390(cookie) data=(00000001c2221e50c16e...ba041b5de59955900d818ac54e18b236739d9e8b))
+    (sa: len=116
+        (p: #1 protoid=isakmp transform=12 len=116
+            (t: #1 type=encr id=aes (type=keylen value=0080))
+            (t: #2 type=encr id=aes (type=keylen value=0100))
+            (t: #3 type=encr id=aes (type=keylen value=00c0))
+            (t: #4 type=encr id=3des )
+            (t: #5 type=prf id=hmac-sha )
+            (t: #6 type=prf id=hmac-md5 )
+            (t: #7 type=prf id=aes128_xcbc )
+            (t: #8 type=integ id=hmac-sha )
+            (t: #9 type=integ id=hmac-md5 )
+            (t: #10 type=integ id=aes-xcbc )
+            (t: #11 type=dh id=modp1024 )
+            (t: #12 type=dh id=modp2048 )))
+    (v2ke: len=128 group=modp1024 b5445bd60cece6fdcd3c96a52cbb7bb426a8c7a0f56a9c38d1b1c4f0c3a6e8e7dba5c7339b6ed02e757119dfb5b6933ce93b604987fbbc77221b2a0c7cdd32787eff10572bef546c361462f9da34847969a42e51c755996beac42e6fba961a75de0fc1b23f099380896ee89202122dedac1bd54aa8494ac3d740be4d2a4cf39d)
+    (nonce: len=32 nonce=(6128ebd023a864e94a7ffb74bf7cce2fd4367322b8b073f942282bd52ebfe3e6) )
+    (n: prot_id=#0 type=16388(nat_detection_source_ip))
+    (n: prot_id=#0 type=16389(nat_detection_destination_ip))
+IP (tos 0x0, ttl 64, id 19911, offset 0, flags [none], proto UDP (17), length 332)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x071d -> 0x8650!] isakmp 2.0 msgid 00000000 cookie a88875a8198992a6->71be8358efae7663: parent_sa ikev2_init[R]:
+    (sa: len=44
+        (p: #1 protoid=isakmp transform=4 len=44
+            (t: #1 type=encr id=aes (type=keylen value=0080))
+            (t: #2 type=prf id=hmac-sha )
+            (t: #3 type=integ id=hmac-sha )
+            (t: #4 type=dh id=modp1024 )))
+    (v2ke: len=128 group=modp1024 5a56714d3abf64e3a3f401ead9f5323ff0b77faa5f1e99199b13ac821f0a0c4f854786ca09b7a76aa508bcee11f16369a16d5fa041ca2d9a8dfa8228c61f2482d2175c5c1a9491fc221bec7a1fa69f656d4c98ba49ae9d721dedf4a02d7ecdfc201dc785a13ed74e4f3982762a2720ffdfc365ee4e37279af496cd86f881fd15)
+    (nonce: len=32 nonce=(b31c379f272ce2984bd17ca38c8729e1edbc081a14fb0f67cff81721dfeec1f9) )
+    (n: prot_id=#0 type=16388(nat_detection_source_ip))
+    (n: prot_id=#0 type=16389(nat_detection_destination_ip))
+IP (tos 0x0, ttl 64, id 19912, offset 0, flags [none], proto UDP (17), length 264)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x07d9 -> 0xb2d6!] isakmp 2.0 msgid 00000001 cookie a88875a8198992a6->71be8358efae7663: child_sa  ikev2_auth[I]:
+    (v2e: len=204 f606135ad373e70836fda91b63ca4c608e1ad58218488c2647ff1e8a912958aa77efbc3068a2ae6ab7c3d0cb1e6fb864df99c62f2cc045708084708154a393c2f4cbefad1f6848525d49db563e13345a4e6e2fd066c04e2ce291f4714baec6bf328356c446247cab835bda3e8e1aae5967248f01eb3a1c02a541b4da09b3276b400d50a067542a678468c5f41e54017c00964f1003f8c88896a6f12215a5f1a060713cc83802cae3abee18417c0c35dc6f58a01adb96ed1c009c68e3069ae70f4b10afb7736c111ade4d826e)
+IP (tos 0x0, ttl 64, id 19913, offset 0, flags [none], proto UDP (17), length 184)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x0689 -> 0x0748!] isakmp 2.0 msgid 00000001 cookie a88875a8198992a6->71be8358efae7663: child_sa  ikev2_auth[R]:
+    (v2e: len=124 6afe95bc5147b0ad7e4ccb9141c160a44f7c6eddc6b29d414ad5e2b882544fdc6c3ee6983ae1408b5764b1649343876454d1bf4d515aaf03c15eafe71be6b4cf51ab60630c45bcf0e2a2db8eee70095a4e010fdb342adb6d03dae5def9d4907cdfc8ccd6f3da9b7497c58e84a952d983bafb941ab1de1b0bb9ffad3b)
+IP (tos 0x0, ttl 64, id 19914, offset 0, flags [none], proto UDP (17), length 280)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x07e9 -> 0x35ac!] isakmp 2.0 msgid 00000002 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[I]:
+    (v2e: len=220 53cc6c0b41f14e4fc057c7f6a3524adde8521f26f67c058430a902db1a52ed16d322630d2eb515372dc12d97dc7c20552607e2ed193d9b33939e10aa2fc37b6199f0a629c6b58135f5b6f9e07906cd30dc3cae7d55fe08d95d3e660a623731c396a325adbff11c490f9fd102224391a65fb7bbe862945b64cf1fb833b9ce68c83df0b9d2ce7bd54f650864af9445e547cdfe5caa393344ae5274933b7efcf616821ea7daa9c5a6e8275ad6c688700cb7f4bcd6fb8025e93bb6dd5f581faebcbecb798c87617a4ec1b06ba290ac5fc1d6e4c2725c1f9f0e10b144fbbe)
+IP (tos 0x0, ttl 64, id 19915, offset 0, flags [none], proto UDP (17), length 248)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x06c9 -> 0xdeaf!] isakmp 2.0 msgid 00000003 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[I]:
+    (v2e: len=188 9603e03f280964782717da15a502f0a9e9f17dbf4487c6923cf00b7040d539bc947c705790e4e99b834a7ae2a8d79f5620e11615e0a762889aab821e0d03132dfb8cc6b3718582411bcd98c242a8b10a66274dae1ce055fb30a4d3e64c969be6e08b626958f4446c6e4a0c8d7a24522959c6152e63a575c06930c2097539bfbdff08c70533428cf6b452e0b8b0259c2292925d2ed62e8956bc7e3a911a61509be1ac8f7b7cd4636176e524f4d0f17573f2aeddce2251fd6d5d9cd54d)
+IP (tos 0x0, ttl 64, id 19916, offset 0, flags [none], proto UDP (17), length 104)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x0639 -> 0xc72b!] isakmp 2.0 msgid 00000002 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[R]:
+    (v2e: len=44 5bd2d26cb43b6cec30dec13fa387359797baf7b41e783422bc4dabf5d03ab2420d277d3b2f28d1f003da98d1)
+IP (tos 0x0, ttl 64, id 19917, offset 0, flags [none], proto UDP (17), length 104)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x0639 -> 0x4119!] isakmp 2.0 msgid 00000003 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[R]:
+    (v2e: len=44 38f60ab69110967961ae04af4e47a770260d61e29d18fb13ce093a47970068dacb342f7999cc3d0d59f77a94)
+IP (tos 0x0, ttl 64, id 19918, offset 0, flags [none], proto UDP (17), length 312)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x0709 -> 0x236f!] isakmp 2.0 msgid 00000004 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[I]:
+    (v2e: len=252 c7f2f1cc4997b30a61623222d4bfb535baa302199c4d8c1fdcfa745b0b29b5e7618ff0356848444d25010e5ad420760890ede066c838269b22d9e30d4fec1a012e731a210c243f803b661970d32e998e919f573c5742d2288949052c5a46a0cd7c4a1a295ede296c4fd9839b64dc4944e11a35f42a8ce18b447200fd03dbd58a71583b3a27c380148c801ce14452f7d756b1f55b10b84a58cfa9526001fff7157154645022e4456085517ceed98b79e20ed33297cf5ad80287e782728a8c6b87d2b422e7eeda1c72b33ebc51a5b76def9a59ffd1b4f97dec88c22a4f5448a71aeedf20c87dae5b44cd2e7a519d719a509f83f3b2faf6f5c607da609f)
+IP (tos 0x0, ttl 64, id 19919, offset 0, flags [none], proto UDP (17), length 280)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x07e9 -> 0xd8ba!] isakmp 2.0 msgid 00000005 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[I]:
+    (v2e: len=220 dae6134a9cff1a4e3cc59a79e019a93f8469dd4e2faaaad1c3afba22ecd128fdb1e8954c753f8f62aeb6aac9732f414b065ec39569a670be6980c81eb3e44bc93ec63e9a754d0456c6703cd718371edeef674928180f9d14c39e52cfa4a517368e7db2fa0bfdb41cf56d97006233103f22650fdcd5ffab8418e40903e4749e126d06e9dc2a18cfd5bfda0013e3e9eb53e79bbe30eadf0f4ddcefbab0c08e870b29d39b2401c75b68fc46a066782857ca48d547e410ac15cabb6738875200b535cbd9ae1e1ce99839c9c25639070e5ed977809c50b6bb9550b50b49bb)
+IP (tos 0x0, ttl 64, id 19920, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x06b9 -> 0x7194!] isakmp 2.0 msgid 00000004 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[R]:
+    (v2e: len=172 1fd8516b57b1ab1bdbcdba1930a5097decc023c5c534497ca53f178b9d4d11228746454371b0cc6ec067e14e1e5c5652840cfdae0ea84c7f0a6e799ff7fb131d15763feef45e80f24716cde47d23527f68e055a7c3adc7225489295e1bc3f1029b63822872865df55c6c275dead8a6f64bda8ae44f42c318fa71eb04eed7312dafd2dd8665fd5d3225f3aae6f7335b581c3a89c07af1009871dea9927f046432cd01b04234204d01583baf3a)
+IP (tos 0x0, ttl 64, id 19921, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x06b9 -> 0x6053!] isakmp 2.0 msgid 00000005 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[R]:
+    (v2e: len=172 f6fc8113f34b92eb7d595a048f57d46593441ad9a61919e5919e7de4454fa35882937d3b74c83ab959fd053c6a12a51b04a0e92e01683782658bb9af2bbcc7a4bd5e1eef2dbcdc7715cac6eaecfbcc051a46f2263d1b8387bdad7e68c6e4ba1be9794e163e484768995a9f4a18edcbc6a44f0a74cb01c318e7848562e0866f388b8d04f14f1af87de7de6cee1f889d4330d82932a7127b7d1a934e641c32b76e33b37706d50286f8cbe335ba)
+IP (tos 0x0, ttl 64, id 19922, offset 0, flags [none], proto UDP (17), length 312)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x0709 -> 0xfb68!] isakmp 2.0 msgid 00000006 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[I]:
+    (v2e: len=252 0aa2636a3b897ff3fa8093282ad1724ec9f326b64bf998e781d6edbb77a369a8444dc47a4dc095ebd3ac3b1dc337570bc42c93cd6dcb7289bc99a90874e66cc4ede7a13a58ce17c65b185e86def83d66f4c4ddc433e66baf1834e54296671357a5139b0b63ebf32e652df0938badea5a960ee1758e00faa643bed85f7adee2e2e75baeec9e0df88857a67ca5f2a2f4919d0b272313d42c791eb75feca145756a0ccae3640ee98c16689df511443228846d2c5b8830ea6d149c1abed11ad0a28ca33993036e91965d48a82a898145ada994af55978696480ab6cb697e13e67968a7748c3338786efb77250e5411b3a7eac84cd221324bd7b9109d9a69)
+IP (tos 0x0, ttl 64, id 19923, offset 0, flags [none], proto UDP (17), length 280)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x07e9 -> 0x9881!] isakmp 2.0 msgid 00000007 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[I]:
+    (v2e: len=220 02c703f4bdd83246adc67e1ca07d7e7cfe21b6bde94637680a332813b8a4ca47341abd3a9c37263896c08252bfb1ea6c7ea44783b92ac52acb4fbfec53f03554281c6377650c09208f3d778b11e77b5fbd983be1e96699232392ef31a501fda73c6150fcc2e80bab1e0d49845bd5d511f7c9285ec08352687a2ac8d70d0dec3476491c40b97cb9da405606fc5e8d46bbe199e6d91ae993b7faa0583ec4296a80812fb7e0ae88d3bd54c4a30e5edb2778c960f3e0cb5b1369e999f84de4dc72b5d006805efb7e2d2ed4033e11ff9578012d22942e3799c9382506a021)
+IP (tos 0x0, ttl 64, id 19924, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x06b9 -> 0x3549!] isakmp 2.0 msgid 00000006 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[R]:
+    (v2e: len=172 7e2e6623c66e161de9641ac7e1b6dfdcf3a5f45bbed123be88f3754d12514404afc054b3c7f789eb52a432a438359dde31152c11b8d209203d62779ca064823d70536c40f846d43d6694a2f12a3176f57007a3506c82fffaf3dbb713bbdbb5f540b7b39aee3c97145671504356095f7ab0c5a84347c0268bce259ca51b4a2dd75a7e3a7ee79f3bffc58d2fc0ac36686229f2309b5cd0c0dcc2af798664c14f5f166ab5e3c1f693092121aa44)
+IP (tos 0x0, ttl 64, id 19925, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x06b9 -> 0xe402!] isakmp 2.0 msgid 00000007 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[R]:
+    (v2e: len=172 7b545033a2d35df2ab9f26c4bc444713910a32e60fb04cb10a9e76634787f9ddc138c6792faa074be2ebcb43f83f444249679018ec6dc7d4e2247dd8cb915778d90fa5597f1ecba8471db53e3b4da8f73d1eb60c23ca9fb5fa599dc526a961364471b49e5288fcef6a24d02a084d29c4a5c5d1fa305310dba01d09c9c36c86c0af297e05d3fc8559a11666a4363bacc354e96c941349b3f60dd397eb4c2bb09f381831167c0b33686c6bb5d8)
+IP (tos 0x0, ttl 64, id 19926, offset 0, flags [none], proto UDP (17), length 392)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x0759 -> 0x3076!] isakmp 2.0 msgid 00000008 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[I]:
+    (v2e: len=332 c4bf89ec6e7936ac98a432a525c2406de940b338c9149ce19cb1bf23a69dfd481df7b3ada1adbb70bf17074643edf97e63ade5ed07f74674f26c48d2d6a9044477ee9f203084c26e85405987ec8b9693deaea20ce78c2a451bf4e834d7bcc3c54c1322b5f28ba307f2ce31a00552b97b8fc103a29fee2e0040ccddfa10bf3ab3d1209e643c228dec575240c7bd750cf4d6d06c958f66bd8a79831df871f6fbd93e025b16bd03de35ffcdbabac65570d2367e624d9f8e8560da9bc3a2142b75008b7ceb8e839dbf425da74c4be15c9dc31735ef1ac6f65c2375042dcf9682df74259b8c4437d7ee8df19fea6ec1d5bd491409cc7276d70ee0ba9172b4177fbce7fa28171a236ca8e2e0c149e602c9c6a0a3ff5f054287f54b7c314b07cdf6d246241dd364c7419cc0647422d08f5511b13e7b5cb719616466e1c6966f5ccd4d2ca2b12dda7047c6f63af5dd47)
+IP (tos 0x0, ttl 64, id 19927, offset 0, flags [none], proto UDP (17), length 344)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x0729 -> 0xd64e!] isakmp 2.0 msgid 00000008 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[R]:
+    (v2e: len=284 2c1ac864ae2c8499b3c7af8c61a8c4dc9e1af23577b588d6bb3fdef3e483cc2f0158c07071d6dfaef73dccb6cdcf7a5758e41778daceb71cf6733e17168beff6ef2015d670c0b6574fc72e97d4282909966f394a9f9e0fced8e269bbf60e93f0f2080f48dcd4e02ff1129b94f68b268ddd9cff436f38e78fa7986d87e622d1f3da3b3c2795570ebc27d3c3d51f29ef0fff01ae89bd71d2e10ab8faee7d7bb4b5be8a9ee0ea9b5e347bbaf3ebdfaf19735d75e6faa020d6ea72826c2aa5cb2ee648de6b36cbb25087428dea44bd34504e05f2d4fef43c48e2a690510e9278ca8ff2f775792af061b5ccbcf77b3fee658851289969c55edc6d561718a0c761b09b0f67c96e61d00a7fa2929023b5adcfdd33436f63a478141d51b52333)
+IP (tos 0x0, ttl 64, id 19928, offset 0, flags [none], proto UDP (17), length 120)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x0649 -> 0x85b7!] isakmp 2.0 msgid 00000000 cookie 1d9be9451d4f97a8->64a2a4b5d0e17b6a: parent_sa inf2[I]:
+    (v2e: len=60 691b48829b6c5d6dd93fa8e33c38dd4c00f5434dc22b4251c0876f0bdb5dbba3dd06283907559a272f07ec7709b9d596a24cd8fe69b82a1f65dbf6f2)
diff --git a/tests/ikev2fourv4.out b/tests/ikev2fourv4.out
new file mode 100644
index 0000000..dd6c3ee
--- /dev/null
+++ b/tests/ikev2fourv4.out
@@ -0,0 +1,107 @@
+IP (tos 0x0, ttl 64, id 19908, offset 0, flags [none], proto UDP (17), length 404)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x0765 -> 0xf5df!] isakmp 2.0 msgid 00000000 cookie a88875a8198992a6->0000000000000000: parent_sa ikev2_init[I]:
+    (sa: len=116
+        (p: #1 protoid=isakmp transform=12 len=116
+            (t: #1 type=encr id=aes (type=keylen value=0080))
+            (t: #2 type=encr id=aes (type=keylen value=0100))
+            (t: #3 type=encr id=aes (type=keylen value=00c0))
+            (t: #4 type=encr id=3des )
+            (t: #5 type=prf id=hmac-sha )
+            (t: #6 type=prf id=hmac-md5 )
+            (t: #7 type=prf id=aes128_xcbc )
+            (t: #8 type=integ id=hmac-sha )
+            (t: #9 type=integ id=hmac-md5 )
+            (t: #10 type=integ id=aes-xcbc )
+            (t: #11 type=dh id=modp1024 )
+            (t: #12 type=dh id=modp2048 )))
+    (v2ke: len=128 group=modp1024 b5445bd60cece6fdcd3c96a52cbb7bb426a8c7a0f56a9c38d1b1c4f0c3a6e8e7dba5c7339b6ed02e757119dfb5b6933ce93b604987fbbc77221b2a0c7cdd32787eff10572bef546c361462f9da34847969a42e51c755996beac42e6fba961a75de0fc1b23f099380896ee89202122dedac1bd54aa8494ac3d740be4d2a4cf39d)
+    (nonce: len=32 nonce=(6128ebd023a864e94a7ffb74bf7cce2fd4367322b8b073f942282bd52ebfe3e6) )
+    (n: prot_id=#0 type=16388(nat_detection_source_ip) data=(442ffe5aea0cee4dbacc758e801233bdc09a0abf0000001c00004005ba041b5de59955900d818ac54e18b236739d9e8b))
+    (n: prot_id=#0 type=16389(nat_detection_destination_ip) data=(ba041b5de59955900d818ac54e18b236739d9e8b))
+IP (tos 0x0, ttl 64, id 19909, offset 0, flags [none], proto UDP (17), length 88)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x0629 -> 0x0cd0!] isakmp 2.0 msgid 00000000 cookie a88875a8198992a6->0000000000000000: parent_sa ikev2_init[R]:
+    (n: prot_id=#0 type=16390(cookie) data=(00000001c2221e50c16e123f2b0c71aefcf0cb3b798782c6))
+IP (tos 0x0, ttl 64, id 19910, offset 0, flags [none], proto UDP (17), length 436)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x0785 -> 0x7702!] isakmp 2.0 msgid 00000000 cookie a88875a8198992a6->0000000000000000: parent_sa ikev2_init[I]:
+    (n: prot_id=#0 type=16390(cookie) data=(00000001c2221e50c16e123f2b0c71aefcf0cb3b798782c622000078000000740101000c0300000c0100000c800e00800300000c0100000c800e01000300000c0100000c800e00c003000008010000030300000802000002030000080200000103000008020000040300000803000002030000080300000103000008030000050300000804000002000000080400000e2800008800020000b5445bd60cece6fdcd3c96a52cbb7bb426a8c7a0f56a9c38d1b1c4f0c3a6e8e7dba5c7339b6ed02e757119dfb5b6933ce93b604987fbbc77221b2a0c7cdd32787eff10572bef546c361462f9da34847969a42e51c755996beac42e6fba961a75de0fc1b23f099380896ee89202122dedac1bd54aa8494ac3d740be4d2a4cf39d290000246128ebd023a864e94a7ffb74bf7cce2fd4367322b8b073f942282bd52ebfe3e62900001c00004004442ffe5aea0cee4dbacc758e801233bdc09a0abf0000001c00004005ba041b5de59955900d818ac54e18b236739d9e8b))
+    (sa: len=116
+        (p: #1 protoid=isakmp transform=12 len=116
+            (t: #1 type=encr id=aes (type=keylen value=0080))
+            (t: #2 type=encr id=aes (type=keylen value=0100))
+            (t: #3 type=encr id=aes (type=keylen value=00c0))
+            (t: #4 type=encr id=3des )
+            (t: #5 type=prf id=hmac-sha )
+            (t: #6 type=prf id=hmac-md5 )
+            (t: #7 type=prf id=aes128_xcbc )
+            (t: #8 type=integ id=hmac-sha )
+            (t: #9 type=integ id=hmac-md5 )
+            (t: #10 type=integ id=aes-xcbc )
+            (t: #11 type=dh id=modp1024 )
+            (t: #12 type=dh id=modp2048 )))
+    (v2ke: len=128 group=modp1024 b5445bd60cece6fdcd3c96a52cbb7bb426a8c7a0f56a9c38d1b1c4f0c3a6e8e7dba5c7339b6ed02e757119dfb5b6933ce93b604987fbbc77221b2a0c7cdd32787eff10572bef546c361462f9da34847969a42e51c755996beac42e6fba961a75de0fc1b23f099380896ee89202122dedac1bd54aa8494ac3d740be4d2a4cf39d)
+    (nonce: len=32 nonce=(6128ebd023a864e94a7ffb74bf7cce2fd4367322b8b073f942282bd52ebfe3e6) )
+    (n: prot_id=#0 type=16388(nat_detection_source_ip) data=(442ffe5aea0cee4dbacc758e801233bdc09a0abf0000001c00004005ba041b5de59955900d818ac54e18b236739d9e8b))
+    (n: prot_id=#0 type=16389(nat_detection_destination_ip) data=(ba041b5de59955900d818ac54e18b236739d9e8b))
+IP (tos 0x0, ttl 64, id 19911, offset 0, flags [none], proto UDP (17), length 332)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x071d -> 0x8650!] isakmp 2.0 msgid 00000000 cookie a88875a8198992a6->71be8358efae7663: parent_sa ikev2_init[R]:
+    (sa: len=44
+        (p: #1 protoid=isakmp transform=4 len=44
+            (t: #1 type=encr id=aes (type=keylen value=0080))
+            (t: #2 type=prf id=hmac-sha )
+            (t: #3 type=integ id=hmac-sha )
+            (t: #4 type=dh id=modp1024 )))
+    (v2ke: len=128 group=modp1024 5a56714d3abf64e3a3f401ead9f5323ff0b77faa5f1e99199b13ac821f0a0c4f854786ca09b7a76aa508bcee11f16369a16d5fa041ca2d9a8dfa8228c61f2482d2175c5c1a9491fc221bec7a1fa69f656d4c98ba49ae9d721dedf4a02d7ecdfc201dc785a13ed74e4f3982762a2720ffdfc365ee4e37279af496cd86f881fd15)
+    (nonce: len=32 nonce=(b31c379f272ce2984bd17ca38c8729e1edbc081a14fb0f67cff81721dfeec1f9) )
+    (n: prot_id=#0 type=16388(nat_detection_source_ip) data=(fe2bfb7c2c81ed0b61f756b57fac78a75ced8af60000001c00004005905954a783be2c37e2ccc4fdd270a532dbe6f428))
+    (n: prot_id=#0 type=16389(nat_detection_destination_ip) data=(905954a783be2c37e2ccc4fdd270a532dbe6f428))
+IP (tos 0x0, ttl 64, id 19912, offset 0, flags [none], proto UDP (17), length 264)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x07d9 -> 0xb2d6!] isakmp 2.0 msgid 00000001 cookie a88875a8198992a6->71be8358efae7663: child_sa  ikev2_auth[I]:
+    (v2e: len=204 f606135ad373e70836fda91b63ca4c608e1ad58218488c2647ff1e8a912958aa77efbc3068a2ae6ab7c3d0cb1e6fb864df99c62f2cc045708084708154a393c2f4cbefad1f6848525d49db563e13345a4e6e2fd066c04e2ce291f4714baec6bf328356c446247cab835bda3e8e1aae5967248f01eb3a1c02a541b4da09b3276b400d50a067542a678468c5f41e54017c00964f1003f8c88896a6f12215a5f1a060713cc83802cae3abee18417c0c35dc6f58a01adb96ed1c009c68e3069ae70f4b10afb7736c111ade4d826e)
+IP (tos 0x0, ttl 64, id 19913, offset 0, flags [none], proto UDP (17), length 184)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x0689 -> 0x0748!] isakmp 2.0 msgid 00000001 cookie a88875a8198992a6->71be8358efae7663: child_sa  ikev2_auth[R]:
+    (v2e: len=124 6afe95bc5147b0ad7e4ccb9141c160a44f7c6eddc6b29d414ad5e2b882544fdc6c3ee6983ae1408b5764b1649343876454d1bf4d515aaf03c15eafe71be6b4cf51ab60630c45bcf0e2a2db8eee70095a4e010fdb342adb6d03dae5def9d4907cdfc8ccd6f3da9b7497c58e84a952d983bafb941ab1de1b0bb9ffad3b)
+IP (tos 0x0, ttl 64, id 19914, offset 0, flags [none], proto UDP (17), length 280)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x07e9 -> 0x35ac!] isakmp 2.0 msgid 00000002 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[I]:
+    (v2e: len=220 53cc6c0b41f14e4fc057c7f6a3524adde8521f26f67c058430a902db1a52ed16d322630d2eb515372dc12d97dc7c20552607e2ed193d9b33939e10aa2fc37b6199f0a629c6b58135f5b6f9e07906cd30dc3cae7d55fe08d95d3e660a623731c396a325adbff11c490f9fd102224391a65fb7bbe862945b64cf1fb833b9ce68c83df0b9d2ce7bd54f650864af9445e547cdfe5caa393344ae5274933b7efcf616821ea7daa9c5a6e8275ad6c688700cb7f4bcd6fb8025e93bb6dd5f581faebcbecb798c87617a4ec1b06ba290ac5fc1d6e4c2725c1f9f0e10b144fbbe)
+IP (tos 0x0, ttl 64, id 19915, offset 0, flags [none], proto UDP (17), length 248)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x06c9 -> 0xdeaf!] isakmp 2.0 msgid 00000003 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[I]:
+    (v2e: len=188 9603e03f280964782717da15a502f0a9e9f17dbf4487c6923cf00b7040d539bc947c705790e4e99b834a7ae2a8d79f5620e11615e0a762889aab821e0d03132dfb8cc6b3718582411bcd98c242a8b10a66274dae1ce055fb30a4d3e64c969be6e08b626958f4446c6e4a0c8d7a24522959c6152e63a575c06930c2097539bfbdff08c70533428cf6b452e0b8b0259c2292925d2ed62e8956bc7e3a911a61509be1ac8f7b7cd4636176e524f4d0f17573f2aeddce2251fd6d5d9cd54d)
+IP (tos 0x0, ttl 64, id 19916, offset 0, flags [none], proto UDP (17), length 104)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x0639 -> 0xc72b!] isakmp 2.0 msgid 00000002 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[R]:
+    (v2e: len=44 5bd2d26cb43b6cec30dec13fa387359797baf7b41e783422bc4dabf5d03ab2420d277d3b2f28d1f003da98d1)
+IP (tos 0x0, ttl 64, id 19917, offset 0, flags [none], proto UDP (17), length 104)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x0639 -> 0x4119!] isakmp 2.0 msgid 00000003 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[R]:
+    (v2e: len=44 38f60ab69110967961ae04af4e47a770260d61e29d18fb13ce093a47970068dacb342f7999cc3d0d59f77a94)
+IP (tos 0x0, ttl 64, id 19918, offset 0, flags [none], proto UDP (17), length 312)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x0709 -> 0x236f!] isakmp 2.0 msgid 00000004 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[I]:
+    (v2e: len=252 c7f2f1cc4997b30a61623222d4bfb535baa302199c4d8c1fdcfa745b0b29b5e7618ff0356848444d25010e5ad420760890ede066c838269b22d9e30d4fec1a012e731a210c243f803b661970d32e998e919f573c5742d2288949052c5a46a0cd7c4a1a295ede296c4fd9839b64dc4944e11a35f42a8ce18b447200fd03dbd58a71583b3a27c380148c801ce14452f7d756b1f55b10b84a58cfa9526001fff7157154645022e4456085517ceed98b79e20ed33297cf5ad80287e782728a8c6b87d2b422e7eeda1c72b33ebc51a5b76def9a59ffd1b4f97dec88c22a4f5448a71aeedf20c87dae5b44cd2e7a519d719a509f83f3b2faf6f5c607da609f)
+IP (tos 0x0, ttl 64, id 19919, offset 0, flags [none], proto UDP (17), length 280)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x07e9 -> 0xd8ba!] isakmp 2.0 msgid 00000005 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[I]:
+    (v2e: len=220 dae6134a9cff1a4e3cc59a79e019a93f8469dd4e2faaaad1c3afba22ecd128fdb1e8954c753f8f62aeb6aac9732f414b065ec39569a670be6980c81eb3e44bc93ec63e9a754d0456c6703cd718371edeef674928180f9d14c39e52cfa4a517368e7db2fa0bfdb41cf56d97006233103f22650fdcd5ffab8418e40903e4749e126d06e9dc2a18cfd5bfda0013e3e9eb53e79bbe30eadf0f4ddcefbab0c08e870b29d39b2401c75b68fc46a066782857ca48d547e410ac15cabb6738875200b535cbd9ae1e1ce99839c9c25639070e5ed977809c50b6bb9550b50b49bb)
+IP (tos 0x0, ttl 64, id 19920, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x06b9 -> 0x7194!] isakmp 2.0 msgid 00000004 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[R]:
+    (v2e: len=172 1fd8516b57b1ab1bdbcdba1930a5097decc023c5c534497ca53f178b9d4d11228746454371b0cc6ec067e14e1e5c5652840cfdae0ea84c7f0a6e799ff7fb131d15763feef45e80f24716cde47d23527f68e055a7c3adc7225489295e1bc3f1029b63822872865df55c6c275dead8a6f64bda8ae44f42c318fa71eb04eed7312dafd2dd8665fd5d3225f3aae6f7335b581c3a89c07af1009871dea9927f046432cd01b04234204d01583baf3a)
+IP (tos 0x0, ttl 64, id 19921, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x06b9 -> 0x6053!] isakmp 2.0 msgid 00000005 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[R]:
+    (v2e: len=172 f6fc8113f34b92eb7d595a048f57d46593441ad9a61919e5919e7de4454fa35882937d3b74c83ab959fd053c6a12a51b04a0e92e01683782658bb9af2bbcc7a4bd5e1eef2dbcdc7715cac6eaecfbcc051a46f2263d1b8387bdad7e68c6e4ba1be9794e163e484768995a9f4a18edcbc6a44f0a74cb01c318e7848562e0866f388b8d04f14f1af87de7de6cee1f889d4330d82932a7127b7d1a934e641c32b76e33b37706d50286f8cbe335ba)
+IP (tos 0x0, ttl 64, id 19922, offset 0, flags [none], proto UDP (17), length 312)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x0709 -> 0xfb68!] isakmp 2.0 msgid 00000006 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[I]:
+    (v2e: len=252 0aa2636a3b897ff3fa8093282ad1724ec9f326b64bf998e781d6edbb77a369a8444dc47a4dc095ebd3ac3b1dc337570bc42c93cd6dcb7289bc99a90874e66cc4ede7a13a58ce17c65b185e86def83d66f4c4ddc433e66baf1834e54296671357a5139b0b63ebf32e652df0938badea5a960ee1758e00faa643bed85f7adee2e2e75baeec9e0df88857a67ca5f2a2f4919d0b272313d42c791eb75feca145756a0ccae3640ee98c16689df511443228846d2c5b8830ea6d149c1abed11ad0a28ca33993036e91965d48a82a898145ada994af55978696480ab6cb697e13e67968a7748c3338786efb77250e5411b3a7eac84cd221324bd7b9109d9a69)
+IP (tos 0x0, ttl 64, id 19923, offset 0, flags [none], proto UDP (17), length 280)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x07e9 -> 0x9881!] isakmp 2.0 msgid 00000007 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[I]:
+    (v2e: len=220 02c703f4bdd83246adc67e1ca07d7e7cfe21b6bde94637680a332813b8a4ca47341abd3a9c37263896c08252bfb1ea6c7ea44783b92ac52acb4fbfec53f03554281c6377650c09208f3d778b11e77b5fbd983be1e96699232392ef31a501fda73c6150fcc2e80bab1e0d49845bd5d511f7c9285ec08352687a2ac8d70d0dec3476491c40b97cb9da405606fc5e8d46bbe199e6d91ae993b7faa0583ec4296a80812fb7e0ae88d3bd54c4a30e5edb2778c960f3e0cb5b1369e999f84de4dc72b5d006805efb7e2d2ed4033e11ff9578012d22942e3799c9382506a021)
+IP (tos 0x0, ttl 64, id 19924, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x06b9 -> 0x3549!] isakmp 2.0 msgid 00000006 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[R]:
+    (v2e: len=172 7e2e6623c66e161de9641ac7e1b6dfdcf3a5f45bbed123be88f3754d12514404afc054b3c7f789eb52a432a438359dde31152c11b8d209203d62779ca064823d70536c40f846d43d6694a2f12a3176f57007a3506c82fffaf3dbb713bbdbb5f540b7b39aee3c97145671504356095f7ab0c5a84347c0268bce259ca51b4a2dd75a7e3a7ee79f3bffc58d2fc0ac36686229f2309b5cd0c0dcc2af798664c14f5f166ab5e3c1f693092121aa44)
+IP (tos 0x0, ttl 64, id 19925, offset 0, flags [none], proto UDP (17), length 232)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x06b9 -> 0xe402!] isakmp 2.0 msgid 00000007 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[R]:
+    (v2e: len=172 7b545033a2d35df2ab9f26c4bc444713910a32e60fb04cb10a9e76634787f9ddc138c6792faa074be2ebcb43f83f444249679018ec6dc7d4e2247dd8cb915778d90fa5597f1ecba8471db53e3b4da8f73d1eb60c23ca9fb5fa599dc526a961364471b49e5288fcef6a24d02a084d29c4a5c5d1fa305310dba01d09c9c36c86c0af297e05d3fc8559a11666a4363bacc354e96c941349b3f60dd397eb4c2bb09f381831167c0b33686c6bb5d8)
+IP (tos 0x0, ttl 64, id 19926, offset 0, flags [none], proto UDP (17), length 392)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x0759 -> 0x3076!] isakmp 2.0 msgid 00000008 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[I]:
+    (v2e: len=332 c4bf89ec6e7936ac98a432a525c2406de940b338c9149ce19cb1bf23a69dfd481df7b3ada1adbb70bf17074643edf97e63ade5ed07f74674f26c48d2d6a9044477ee9f203084c26e85405987ec8b9693deaea20ce78c2a451bf4e834d7bcc3c54c1322b5f28ba307f2ce31a00552b97b8fc103a29fee2e0040ccddfa10bf3ab3d1209e643c228dec575240c7bd750cf4d6d06c958f66bd8a79831df871f6fbd93e025b16bd03de35ffcdbabac65570d2367e624d9f8e8560da9bc3a2142b75008b7ceb8e839dbf425da74c4be15c9dc31735ef1ac6f65c2375042dcf9682df74259b8c4437d7ee8df19fea6ec1d5bd491409cc7276d70ee0ba9172b4177fbce7fa28171a236ca8e2e0c149e602c9c6a0a3ff5f054287f54b7c314b07cdf6d246241dd364c7419cc0647422d08f5511b13e7b5cb719616466e1c6966f5ccd4d2ca2b12dda7047c6f63af5dd47)
+IP (tos 0x0, ttl 64, id 19927, offset 0, flags [none], proto UDP (17), length 344)
+    192.168.1.1.500 > 192.168.1.2.500: [bad udp cksum 0x0729 -> 0xd64e!] isakmp 2.0 msgid 00000008 cookie a88875a8198992a6->71be8358efae7663: child_sa  child_sa[R]:
+    (v2e: len=284 2c1ac864ae2c8499b3c7af8c61a8c4dc9e1af23577b588d6bb3fdef3e483cc2f0158c07071d6dfaef73dccb6cdcf7a5758e41778daceb71cf6733e17168beff6ef2015d670c0b6574fc72e97d4282909966f394a9f9e0fced8e269bbf60e93f0f2080f48dcd4e02ff1129b94f68b268ddd9cff436f38e78fa7986d87e622d1f3da3b3c2795570ebc27d3c3d51f29ef0fff01ae89bd71d2e10ab8faee7d7bb4b5be8a9ee0ea9b5e347bbaf3ebdfaf19735d75e6faa020d6ea72826c2aa5cb2ee648de6b36cbb25087428dea44bd34504e05f2d4fef43c48e2a690510e9278ca8ff2f775792af061b5ccbcf77b3fee658851289969c55edc6d561718a0c761b09b0f67c96e61d00a7fa2929023b5adcfdd33436f63a478141d51b52333)
+IP (tos 0x0, ttl 64, id 19928, offset 0, flags [none], proto UDP (17), length 120)
+    192.168.1.2.500 > 192.168.1.1.500: [bad udp cksum 0x0649 -> 0x85b7!] isakmp 2.0 msgid 00000000 cookie 1d9be9451d4f97a8->64a2a4b5d0e17b6a: parent_sa inf2[I]:
+    (v2e: len=60 691b48829b6c5d6dd93fa8e33c38dd4c00f5434dc22b4251c0876f0bdb5dbba3dd06283907559a272f07ec7709b9d596a24cd8fe69b82a1f65dbf6f2)
diff --git a/tests/ikev2pI2-secrets.txt b/tests/ikev2pI2-secrets.txt
new file mode 100644
index 0000000..efe9636
--- /dev/null
+++ b/tests/ikev2pI2-secrets.txt
@@ -0,0 +1,2 @@
+ikev2 I 0x0001020304050607 0xc02e7a3031a03188 sha1:0x4ea8e662b07cdd430f6944c6723e4b82d5722418 aes128:0x3f44bf47cafd8150591deb088199fcbf
+ikev2 R 0x0001020304050607 0xc02e7a3031a03188 sha1:0x515b0bd22e6d76b34fdb760aa7bfad80b109b75d aes128:0xbedb67ec7dc3d00cccac42e70cd63bde
diff --git a/tests/ikev2pI2.out b/tests/ikev2pI2.out
new file mode 100644
index 0000000..7940e8c
--- /dev/null
+++ b/tests/ikev2pI2.out
@@ -0,0 +1,41 @@
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 536, bad cksum 0 (->f48e)!)
+    192.1.2.45.500 > 192.1.2.23.500: [no cksum] isakmp 2.0 msgid 00000000 cookie 0001020304050607->0000000000000000: parent_sa ikev2_init[I]:
+    (sa[C]: len=240
+        (p: #1 protoid=isakmp transform=4 len=40
+            (t: #1 type=encr id=aes )
+            (t: #2 type=integ id=hmac-sha )
+            (t: #3 type=prf id=hmac-sha )
+            (t: #4 type=dh id=modp1536 ))
+        (p: #2 protoid=isakmp transform=4 len=40
+            (t: #1 type=encr id=aes )
+            (t: #2 type=integ id=hmac-sha )
+            (t: #3 type=prf id=hmac-md5 )
+            (t: #4 type=dh id=modp1536 ))
+        (p: #3 protoid=isakmp transform=4 len=40
+            (t: #1 type=encr id=3des )
+            (t: #2 type=integ id=hmac-sha )
+            (t: #3 type=prf id=hmac-sha )
+            (t: #4 type=dh id=modp1536 ))
+        (p: #4 protoid=isakmp transform=4 len=40
+            (t: #1 type=encr id=3des )
+            (t: #2 type=integ id=hmac-sha )
+            (t: #3 type=prf id=hmac-md5 )
+            (t: #4 type=dh id=modp1536 ))
+        (p: #5 protoid=isakmp transform=4 len=40
+            (t: #1 type=encr id=3des )
+            (t: #2 type=integ id=hmac-sha )
+            (t: #3 type=prf id=hmac-sha )
+            (t: #4 type=dh id=modp1024 ))
+        (p: #6 protoid=isakmp transform=4 len=40
+            (t: #1 type=encr id=3des )
+            (t: #2 type=integ id=hmac-sha )
+            (t: #3 type=prf id=hmac-md5 )
+            (t: #4 type=dh id=modp1024 )))
+    (v2ke: len=192 group=modp1536 ffbc6a92a6b9559b05fa96a7a43507b4c1e1c0861a5871d9ba73a163113788c0debb3979e7ff0c52b4ce6050eb05369ea4300d2bff3b1b299f3b802ccb13318c2ab9e3b5627cb4b35eb939982076b57c050d7b35c3c5c7cc8c0feab7b64a7d7b6b8f6b4dabf4ac406dd20126b90a98ac766efa37a7890c4394ff9a77615b58f52d651bbfa58d2a549af8b01aa4bca3d762426663b155d4ebda9f60a6a13573e6a888135cdc673dd483029903f3a90eca23e1ec1e270331b2d050f4f758f49927)
+    (nonce[C]: len=16 nonce=(b5ce8419095c6e2b6b62d3055305b3c4) )
+    (v2vid: len=12 vid=OErlA\nQukSR 4f45726c415c6e51756b5352)
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto UDP (17), length 312, bad cksum 0 (->f56e)!)
+    192.1.2.45.500 > 192.1.2.23.500: [no cksum] isakmp 2.0 msgid 00000000 cookie 0001020304050607->c02e7a3031a03188: parent_sa ikev2_auth[I]:
+    (v2e[C]: len=252 000102030405060708090a0b0c0d0e0f4bcf2da20444caca5fb591c1ab4b9b4d4f22ac7cb49e6b08d2738884fb3efd8eebc607accc1f80f890e24df65e53d61e899f1d319d89c033524d036fd4ea7e0345def93356e2865e5481a6a20a7604083de04595e1071a2e98179eefb4e6ae4708e6875ae297b4dc5b2602d971e36f66cef12303946eea897d86bbb5903115281a266f4dcb627e146972ff2f7102931df82f24a2e40df594afc11e0a85eb1c56b9eddb7e2de52fa95cf51f4b4c9b5d53237ae39f64519413d201374a987fa8d1ce460fa2d67c417462203f2948c0b9ed8b734a69a015ff63bde767f44f83c3cfe5119d72d74e695b1032b957
+            (v2IDi: len=8 0200000077657374 fqdn:west)
+            (v2auth: len=196 method=rsasig authdata=(000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) ))
diff --git a/tests/ikev2pI2.pcap b/tests/ikev2pI2.pcap
new file mode 100644
index 0000000..8d5eb48
--- /dev/null
+++ b/tests/ikev2pI2.pcap
Binary files differ
diff --git a/tests/isakmp-delete-segfault.puu b/tests/isakmp-delete-segfault.puu
deleted file mode 100644
index 11512b1..0000000
--- a/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/tests/isakmp-identification-segfault.puu b/tests/isakmp-identification-segfault.puu
deleted file mode 100644
index 6f0ae0e..0000000
--- a/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/tests/isakmp-pointer-loop.puu b/tests/isakmp-pointer-loop.puu
deleted file mode 100644
index fc58248..0000000
--- a/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/tests/isakmp1.out b/tests/isakmp1.out
index 67a6ed1..355a8ea 100644
--- a/tests/isakmp1.out
+++ b/tests/isakmp1.out
@@ -1 +1 @@
-IP 127.0.0.1.500 > 127.0.0.1.500: isakmp: phase 2/others ? #190[C]
+IP 127.0.0.1.500 > 127.0.0.1.500: isakmp:
diff --git a/tests/isakmp1.sh b/tests/isakmp1.sh
deleted file mode 100644
index ce2de7d..0000000
--- a/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/tests/isakmp2.sh b/tests/isakmp2.sh
deleted file mode 100644
index d0006a8..0000000
--- a/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/tests/isakmp3.new b/tests/isakmp3.new
deleted file mode 100644
index 6b37b77..0000000
--- a/tests/isakmp3.new
+++ /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/tests/isakmp3.out b/tests/isakmp3.out
index 6b37b77..8619263 100644
--- a/tests/isakmp3.out
+++ b/tests/isakmp3.out
@@ -1,2 +1,3 @@
-IP (tos 0x0, ttl 255, id 41068, offset 0, flags [none], proto: UDP (17), length: 312) 127.0.0.1.501 > 127.0.0.1.500: isakmp 1.0 msgid : phase 1 I ident:
-    (id: idtype=FQDN protoid=0 port=0 len=248 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000)
+IP (tos 0x0, ttl 255, id 41068, offset 0, flags [none], proto UDP (17), length 312)
+    127.0.0.1.501 > 127.0.0.1.500: isakmp 1.0 msgid 00000000: phase 1 I ident:
+    (id: idtype=FQDN protoid=0 port=0 len=248 \0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00\0x00)
diff --git a/tests/isakmp3.sh b/tests/isakmp3.sh
deleted file mode 100644
index e6003cc..0000000
--- a/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/tests/isakmp4.new b/tests/isakmp4.new
deleted file mode 100644
index 8c5b7da..0000000
--- a/tests/isakmp4.new
+++ /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/tests/isakmp4.out b/tests/isakmp4.out
index 8c5b7da..0de3ebc 100644
--- a/tests/isakmp4.out
+++ b/tests/isakmp4.out
@@ -1,5 +1,5 @@
-arp who-has 192.1.2.23 tell 192.1.2.254
-arp reply 192.1.2.23 is-at 10:00:00:64:64:23
+ARP, Request who-has 192.1.2.23 tell 192.1.2.254, length 28
+ARP, Reply 192.1.2.23 is-at 10:00:00:64:64:23, length 28
 IP 192.1.2.254.500 > 192.1.2.23.500: isakmp: phase 1 I ident
 IP 192.1.2.23.500 > 192.1.2.254.500: isakmp: phase 1 R ident
 IP 192.1.2.254.500 > 192.1.2.23.500: isakmp: phase 1 I ident
@@ -10,8 +10,8 @@
 IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 2/others R oakley-quick[E]
 IP 192.1.2.254.4500 > 192.1.2.23.4500: NONESP-encap: isakmp: phase 2/others I oakley-quick[E]
 IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x1), length 132
-arp who-has 192.1.2.254 tell 192.1.2.23
-arp reply 192.1.2.254 is-at 10:00:00:de:ad:ba
+ARP, Request who-has 192.1.2.254 tell 192.1.2.23, length 28
+ARP, Reply 192.1.2.254 is-at 10:00:00:de:ad:ba, length 28
 IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 2/others R oakley-quick[E]
 IP 192.1.2.254.4500 > 192.1.2.23.4500: NONESP-encap: isakmp: phase 2/others I oakley-quick[E]
 IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x2), length 132
@@ -23,13 +23,13 @@
 IP 192.1.2.254.4500 > 192.1.2.23.4500: isakmp-nat-keep-alive
 IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x5), length 132
 IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x6), length 132
-arp who-has 192.1.2.23 tell 192.1.2.254
-arp reply 192.1.2.23 is-at 10:00:00:64:64:23
+ARP, Request who-has 192.1.2.23 tell 192.1.2.254, length 28
+ARP, Reply 192.1.2.23 is-at 10:00:00:64:64:23, length 28
 IP 192.1.2.254.4500 > 192.1.2.23.4500: isakmp-nat-keep-alive
 IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x7), length 132
 IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 2/others R oakley-quick[E]
 IP 192.1.2.254.4500 > 192.1.2.23.4500: UDP-encap: ESP(spi=0xf4dc0ae5,seq=0x8), length 132
-arp who-has 192.1.2.254 tell 192.1.2.23
-arp reply 192.1.2.254 is-at 10:00:00:de:ad:ba
+ARP, Request who-has 192.1.2.254 tell 192.1.2.23, length 28
+ARP, Reply 192.1.2.254 is-at 10:00:00:de:ad:ba, length 28
 IP 192.1.2.254.4500 > 192.1.2.23.4500: isakmp-nat-keep-alive
 IP 192.1.2.23.4500 > 192.1.2.254.4500: NONESP-encap: isakmp: phase 2/others R inf[E]
diff --git a/tests/isakmp4.sh b/tests/isakmp4.sh
deleted file mode 100644
index dd7bf07..0000000
--- a/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/tests/isakmp4500.puu b/tests/isakmp4500.puu
deleted file mode 100644
index 0b55dcc..0000000
--- a/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/tests/lmp.new b/tests/lmp-v.out
similarity index 60%
rename from tests/lmp.new
rename to tests/lmp-v.out
index ee37bca..fcd3bed 100644
--- a/tests/lmp.new
+++ b/tests/lmp-v.out
@@ -1,5 +1,6 @@
-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
+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: [none], 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
@@ -11,18 +12,19 @@
 	    Verify Interval: 20
 	    Data links: 30
 	    Encoding type: Lambda (photonic)
-	    Verify Tranport Mechanism: 32768 (0x8000) 
-	    Transmission Rate: 100.000 Mbps
+	    Verify Transport Mechanism: 32768 (0x8000)
+	    Transmission Rate: 0.001 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
+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: [none], 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
+	    Tx Seq: 50, Rx Seq: 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: [none], 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
@@ -36,8 +38,9 @@
 	  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
+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: [none], 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
@@ -48,8 +51,9 @@
 	    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
+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: [none], 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
@@ -59,101 +63,104 @@
 	  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
+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: [none], 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
+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: [none], 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
+	    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) 			
+	    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
+	      Switching Type: Lambda-Switch Capable (150)
+	      Encoding Type: Lambda (photonic) (8)
+	      Min Reservable Bandwidth: 0.001 Mbps
+	      Max Reservable Bandwidth: 0.001 Mbps
 	    Subobject, Type: Wavelength (2), Length: 8
-		    Wavelength: 6
+	      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) 			
+	    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
+	      Switching Type: Lambda-Switch Capable (150)
+	      Encoding Type: ANSI/ETSI PDH (3)
+	      Min Reservable Bandwidth: 9877.895 Mbps
+	      Max Reservable Bandwidth: 10325.547 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
+	      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: [none], 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 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
+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: [none], 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
+	    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: [none], 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
+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: [none], 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
+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: [none], 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
+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: [none], 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
+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: [none], 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
+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: [none], 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
+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: [none], 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
@@ -161,8 +168,9 @@
 	  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
+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: [none], 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
@@ -176,8 +184,9 @@
 		    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
+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: [none], 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
diff --git a/tests/lmp.out b/tests/lmp.out
index ee37bca..1338982 100644
--- a/tests/lmp.out
+++ b/tests/lmp.out
@@ -1,191 +1,18 @@
-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)
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Begin Verify Message, length: 56
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Hello Message, length: 28
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Config NACK Message, length: 56
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Config ACK Message, length: 48
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Config Message, length: 40
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Link Summary ACK Message, length: 16
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Link Summary NACK Message, length: 96
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Begin Verify ACK Message, length: 40
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Begin Verify NACK Message, length: 32
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 End Verify Message, length: 24
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 End Verify ACK Message, length: 24
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Test Message, length: 24
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Test Status Failure Message, length: 24
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Test Status ACK Message, length: 24
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Channel Status ACK Message, length: 16
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Channel Status Request Message, length: 36
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Channel Status Message, length: 44
+IP 10.0.12.1.49998 > 10.0.12.2.49998: LMPv1 Channel Status Response Message, length: 36
diff --git a/tests/lmp.puu b/tests/lmp.puu
deleted file mode 100644
index c14cd56..0000000
--- a/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/tests/lmp.sh b/tests/lmp.sh
deleted file mode 100755
index 9919044..0000000
--- a/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/tests/mpbgp-linklocal-nexthop.out b/tests/mpbgp-linklocal-nexthop.out
new file mode 100644
index 0000000..337f0d8
--- /dev/null
+++ b/tests/mpbgp-linklocal-nexthop.out
@@ -0,0 +1,10 @@
+IP (tos 0xc0, ttl 64, id 22725, offset 0, flags [DF], proto TCP (6), length 142)
+    30.0.0.1.49038 > 30.0.0.2.179: Flags [P.], cksum 0xd6dc (correct), seq 1284816775:1284816865, ack 1288709908, win 29, options [nop,nop,TS val 184150022 ecr 184150021], length 90: BGP, length: 90
+	Update Message (2), length: 90
+	  Origin (1), length: 1, Flags [T]: Incomplete
+	  AS Path (2), length: 4, Flags [T]: 1 
+	  Next Hop (3), length: 4, Flags [T]: 0.0.0.0
+	  Multi-Protocol Reach NLRI (14), length: 46, Flags [O]: 
+	    AFI: IPv6 (2), SAFI: Unicast (1)
+	    nexthop: dead:beef::1, fe80::1ff:fe01:0, nh-length: 32, no SNPA
+	      4:5::/64
diff --git a/tests/mpbgp-linklocal-nexthop.pcap b/tests/mpbgp-linklocal-nexthop.pcap
new file mode 100644
index 0000000..1ac823d
--- /dev/null
+++ b/tests/mpbgp-linklocal-nexthop.pcap
Binary files differ
diff --git a/tests/mpls-ldp-hello.new b/tests/mpls-ldp-hello.new
deleted file mode 100644
index fa621ca..0000000
--- a/tests/mpls-ldp-hello.new
+++ /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/tests/mpls-ldp-hello.out b/tests/mpls-ldp-hello.out
index fa621ca..a8b2373 100644
--- a/tests/mpls-ldp-hello.out
+++ b/tests/mpls-ldp-hello.out
@@ -1,4 +1,5 @@
-IP (tos 0xc0, ttl   1, id 15579, offset 0, flags [none], proto: UDP (17), length: 70) 10.1.1.3.646 > 224.0.0.2.646: 
+IP (tos 0xc0, ttl 1, id 15579, offset 0, flags [none], proto UDP (17), length 70)
+    10.1.1.3.646 > 224.0.0.2.646: 
 	LDP, Label-Space-ID: 10.1.0.2:0, pdu-length: 38
 	  Hello Message (0x0100), length: 28, Message ID: 0x00011970, Flags: [ignore if unknown]
 	    Common Hello Parameters TLV (0x0400), length: 4, Flags: [ignore and don't forward if unknown]
diff --git a/tests/mpls-ldp-hello.puu b/tests/mpls-ldp-hello.puu
deleted file mode 100644
index b7f3b62..0000000
--- a/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/tests/mpls-ldp-hello.sh b/tests/mpls-ldp-hello.sh
deleted file mode 100755
index b1a5b19..0000000
--- a/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/tests/mptcp-fclose.out b/tests/mptcp-fclose.out
new file mode 100644
index 0000000..90ab599
--- /dev/null
+++ b/tests/mptcp-fclose.out
@@ -0,0 +1,11 @@
+ARP, Request who-has 10.2.1.2 tell 10.2.1.1, length 28
+ARP, Reply 10.2.1.2 is-at d6:06:3c:4a:35:7a, length 28
+IP 10.1.1.2.37479 > 10.2.1.2.2002: Flags [S], seq 1895673170, win 14600, options [mss 1460,sackOK,TS val 38230 ecr 0,nop,wscale 6,mptcp capable csum {0x9b59be3d695e66a7}], length 0
+IP 10.2.1.2.2002 > 10.1.1.2.37479: Flags [S.], seq 2868811558, ack 1895673171, win 14280, options [mss 1460,sackOK,TS val 4294943148 ecr 38230,nop,wscale 6,mptcp capable csum {0xd005b1ab34bad344}], length 0
+IP 10.1.1.2.37479 > 10.2.1.2.2002: Flags [.], ack 1, win 229, options [nop,nop,TS val 38230 ecr 4294943148,mptcp capable csum {0x9b59be3d695e66a7,0xd005b1ab34bad344}], length 0
+IP 10.1.1.2.37479 > 10.2.1.2.2002: Flags [P.], seq 1:2, ack 1, win 229, options [nop,nop,TS val 38230 ecr 4294943148,mptcp dss ack 3386645601 seq 2976985014 subseq 1 len 1 csum 0x9e91], length 1
+IP 10.2.1.2.2002 > 10.1.1.2.37479: Flags [.], ack 2, win 224, options [nop,nop,TS val 4294943148 ecr 38230,mptcp dss ack 2976985015], length 0
+IP 10.2.1.2.2002 > 10.1.1.2.37479: Flags [P.], seq 1:2, ack 2, win 224, options [nop,nop,TS val 4294943250 ecr 38230,mptcp dss ack 2976985015 seq 3386645601 subseq 1 len 1 csum 0x54ab], length 1
+IP 10.1.1.2.37479 > 10.2.1.2.2002: Flags [.], ack 2, win 229, options [nop,nop,TS val 38334 ecr 4294943250,mptcp dss ack 3386645602], length 0
+IP 10.1.1.2.37479 > 10.2.1.2.2002: Flags [.], ack 2, win 229, options [nop,nop,TS val 38734 ecr 4294943250,mptcp fast-close key 0xd005b1ab34bad344], length 0
+IP 10.2.1.2.2002 > 10.1.1.2.37479: Flags [R.], seq 2, ack 2, win 224, options [nop,nop,TS val 4294943650 ecr 38734,mptcp dss ack 2976985015], length 0
diff --git a/tests/mptcp-fclose.pcap b/tests/mptcp-fclose.pcap
new file mode 100644
index 0000000..6949548
--- /dev/null
+++ b/tests/mptcp-fclose.pcap
Binary files differ
diff --git a/tests/mptcp.out b/tests/mptcp.out
new file mode 100644
index 0000000..e52cab1
--- /dev/null
+++ b/tests/mptcp.out
@@ -0,0 +1,264 @@
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [S], seq 2912457561, win 14600, options [mss 1460,sackOK,TS val 4294943152 ecr 0,nop,wscale 6,mptcp capable csum {0x9c9eabd1e46a33b2}], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [S.], seq 125971326, ack 2912457562, win 14280, options [mss 1460,sackOK,TS val 4294943467 ecr 4294943152,nop,wscale 5,mptcp capable csum {0x967d2770b6960552}], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1, win 229, options [nop,nop,TS val 4294943152 ecr 4294943467,mptcp capable csum {0x9c9eabd1e46a33b2,0x967d2770b6960552}], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1:42, ack 1, win 447, options [nop,nop,TS val 4294943474 ecr 4294943152,mptcp add-addr id 1 10.1.2.2,mptcp dss ack 3576348362 seq 3518592144 subseq 1 len 41 csum 0x82f], length 41
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 42, win 229, options [nop,nop,TS val 4294943168 ecr 4294943474,mptcp dss ack 3518592185], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 1:42, ack 42, win 229, options [nop,nop,TS val 4294943168 ecr 4294943474,mptcp dss ack 3518592185 seq 3576348362 subseq 1 len 41 csum 0x45c9], length 41
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [.], ack 42, win 447, options [nop,nop,TS val 4294943474 ecr 4294943168,mptcp dss ack 3576348403], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [S], seq 1863826096, win 14600, options [mss 1460,sackOK,TS val 4294943168 ecr 0,nop,wscale 6,mptcp join id 0 token 0xe47f0142 nonce 0x1b665a18], length 0
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [S.], seq 1704897135, ack 1863826097, win 14280, options [mss 1460,sackOK,TS val 4294943474 ecr 4294943168,nop,wscale 5,mptcp join id 1 hmac 0x5ab680c7884af03d nonce 0x33abe9d5], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 1, win 229, options [nop,nop,TS val 4294943168 ecr 4294943474,mptcp join hmac 0xcb7b87f5e5f0502f43b535fb70ef6607df2e6c7a], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 42:890, ack 42, win 229, options [nop,nop,TS val 4294943168 ecr 4294943474,mptcp dss ack 3518592185 seq 3576348403 subseq 42 len 848 csum 0x6d11], length 848
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [.], ack 1, win 447, options [nop,nop,TS val 4294943474 ecr 4294943168,mptcp dss ack 3576348403], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [.], ack 890, win 500, options [nop,nop,TS val 4294943474 ecr 4294943168,mptcp dss ack 3576349251], length 0
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 1:785, ack 1, win 500, options [nop,nop,TS val 4294943474 ecr 4294943168,mptcp dss ack 3576349251 seq 3518592185 subseq 1 len 784 csum 0x5187], length 784
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 785, win 253, options [nop,nop,TS val 4294943170 ecr 4294943474,mptcp dss ack 3518592969], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 1:25, ack 785, win 253, options [nop,nop,TS val 4294943170 ecr 4294943474,mptcp dss ack 3518592969 seq 3576349251 subseq 1 len 24 csum 0xec8a], length 24
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [.], ack 25, win 500, options [nop,nop,TS val 4294943474 ecr 4294943170,mptcp dss ack 3576349275], length 0
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 785:937, ack 25, win 500, options [nop,nop,TS val 4294943474 ecr 4294943170,mptcp dss ack 3576349275 seq 3518592969 subseq 785 len 152 csum 0x217c], length 152
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 25:169, ack 937, win 258, options [nop,nop,TS val 4294943170 ecr 4294943474,mptcp dss ack 3518593121 seq 3576349275 subseq 25 len 144 csum 0x7220], length 144
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 937:1657, ack 169, win 533, options [nop,nop,TS val 4294943474 ecr 4294943170,mptcp dss ack 3576349419 seq 3518593121 subseq 937 len 720 csum 0xfb83], length 720
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 890:906, ack 42, win 280, options [nop,nop,TS val 4294943172 ecr 4294943474,mptcp dss ack 3518593841 seq 3576349419 subseq 890 len 16 csum 0xc87], length 16
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [.], ack 906, win 533, options [nop,nop,TS val 4294943474 ecr 4294943172,mptcp dss ack 3576349435], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 906:954, ack 42, win 280, options [nop,nop,TS val 4294943172 ecr 4294943474,mptcp dss ack 3518593841 seq 3576349435 subseq 906 len 48 csum 0x36d0], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [.], ack 954, win 533, options [nop,nop,TS val 4294943474 ecr 4294943172,mptcp dss ack 3576349483], length 0
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 1657:1705, ack 169, win 533, options [nop,nop,TS val 4294943474 ecr 4294943170,mptcp dss ack 3576349483 seq 3518593841 subseq 1657 len 48 csum 0xb8f3], length 48
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 1705, win 280, options [nop,nop,TS val 4294943172 ecr 4294943474,mptcp dss ack 3518593889], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 954:1018, ack 42, win 280, options [nop,nop,TS val 4294943172 ecr 4294943474,mptcp dss ack 3518593889 seq 3576349483 subseq 954 len 64 csum 0x71f6], length 64
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [.], ack 1018, win 533, options [nop,nop,TS val 4294943474 ecr 4294943172,mptcp dss ack 3576349547], length 0
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 1705:1769, ack 169, win 533, options [nop,nop,TS val 4294943474 ecr 4294943172,mptcp dss ack 3576349547 seq 3518593889 subseq 1705 len 64 csum 0x67b9], length 64
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 1018:1386, ack 42, win 280, options [nop,nop,TS val 4294943175 ecr 4294943474,mptcp dss ack 3518593953 seq 3576349547 subseq 1018 len 368 csum 0x81d2], length 368
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [.], ack 1386, win 567, options [nop,nop,TS val 4294943474 ecr 4294943175,mptcp dss ack 3576349915], length 0
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 1769:2089, ack 169, win 567, options [nop,nop,TS val 4294943474 ecr 4294943172,mptcp dss ack 3576349915 seq 3518593953 subseq 1769 len 320 csum 0x5fc5], length 320
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 2089, win 290, options [nop,nop,TS val 4294943175 ecr 4294943474,mptcp dss ack 3518594273], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 1386:2026, ack 42, win 290, options [nop,nop,TS val 4294943175 ecr 4294943474,mptcp dss ack 3518594273 seq 3576349915 subseq 1386 len 640 csum 0x5af4], length 640
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [.], ack 2026, win 607, options [nop,nop,TS val 4294943485 ecr 4294943175,mptcp dss ack 3576350555], length 0
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 2089:2153, ack 169, win 607, options [nop,nop,TS val 4294943485 ecr 4294943175,mptcp dss ack 3576350555 seq 3518594273 subseq 2089 len 64 csum 0x548b], length 64
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 2153, win 290, options [nop,nop,TS val 4294943179 ecr 4294943485,mptcp dss ack 3518594337], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2026:2170, ack 42, win 290, options [nop,nop,TS val 4294943301 ecr 4294943485,mptcp dss ack 3518594337 seq 3576350555 subseq 2026 len 144 csum 0x62d7], length 144
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [.], ack 2170, win 640, options [nop,nop,TS val 4294943610 ecr 4294943301,mptcp dss ack 3576350699], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 42:74, ack 2170, win 640, options [nop,nop,TS val 4294943611 ecr 4294943301,mptcp dss ack 3576350699 seq 3518594337 subseq 42 len 32 csum 0x24cb], length 32
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2170:2298, ack 74, win 290, options [nop,nop,TS val 4294943304 ecr 4294943611,mptcp dss ack 3518594369 seq 3576350699 subseq 2170 len 128 csum 0x33ac], length 128
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 74:122, ack 2298, win 674, options [nop,nop,TS val 4294943611 ecr 4294943304,mptcp dss ack 3576350827 seq 3518594369 subseq 74 len 48 csum 0xf616], length 48
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 169:617, ack 2153, win 290, options [nop,nop,TS val 4294943306 ecr 4294943485,mptcp dss ack 3518594417 seq 3576350827 subseq 169 len 448 csum 0xe192], length 448
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 122:234, ack 2298, win 707, options [nop,nop,TS val 4294943611 ecr 4294943304,mptcp dss ack 3576351275 seq 3518594417 subseq 122 len 112 csum 0xeb29], length 112
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 234, win 290, options [nop,nop,TS val 4294943306 ecr 4294943611,mptcp dss ack 3518594529], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 234:346, ack 2298, win 707, options [nop,nop,TS val 4294943611 ecr 4294943306,mptcp dss ack 3576351275 seq 3518594529 subseq 234 len 112 csum 0x70c0], length 112
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 346:538, ack 2298, win 707, options [nop,nop,TS val 4294943611 ecr 4294943306,mptcp dss ack 3576351275 seq 3518594641 subseq 346 len 192 csum 0x91c], length 192
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 538, win 296, options [nop,nop,TS val 4294943309 ecr 4294943611,mptcp dss ack 3518594833], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 538:634, ack 2298, win 707, options [nop,nop,TS val 4294943611 ecr 4294943309,mptcp dss ack 3576351275 seq 3518594833 subseq 538 len 96 csum 0x5851], length 96
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 634:778, ack 2298, win 707, options [nop,nop,TS val 4294943611 ecr 4294943309,mptcp dss ack 3576351275 seq 3518594929 subseq 634 len 144 csum 0x405a], length 144
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 778, win 301, options [nop,nop,TS val 4294943309 ecr 4294943611,mptcp dss ack 3518595073], length 0
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [.], ack 617, win 707, options [nop,nop,TS val 4294943621 ecr 4294943306,mptcp dss ack 3576351275], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 778:858, ack 2298, win 707, options [nop,nop,TS val 4294943621 ecr 4294943309,mptcp dss ack 3576351275 seq 3518595073 subseq 778 len 80 csum 0x3c7b], length 80
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 858, win 301, options [nop,nop,TS val 4294943316 ecr 4294943621,mptcp dss ack 3518595153], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2298:2346, ack 858, win 301, options [nop,nop,TS val 4294943328 ecr 4294943621,mptcp dss ack 3518595153 seq 3576351275 subseq 2298 len 48 csum 0xe0ce], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 858:906, ack 2346, win 707, options [nop,nop,TS val 4294943629 ecr 4294943328,mptcp dss ack 3576351323 seq 3518595153 subseq 858 len 48 csum 0xbe20], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 906, win 301, options [nop,nop,TS val 4294943328 ecr 4294943629,mptcp dss ack 3518595201], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 906:1034, ack 2346, win 707, options [nop,nop,TS val 4294943645 ecr 4294943328,mptcp dss ack 3576351323 seq 3518595201 subseq 906 len 128 csum 0x3d9d], length 128
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1034, win 305, options [nop,nop,TS val 4294943339 ecr 4294943645,mptcp dss ack 3518595329], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2346:2394, ack 1034, win 305, options [nop,nop,TS val 4294943343 ecr 4294943645,mptcp dss ack 3518595329 seq 3576351323 subseq 2346 len 48 csum 0x8505], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1034:1114, ack 2394, win 707, options [nop,nop,TS val 4294943651 ecr 4294943343,mptcp dss ack 3576351371 seq 3518595329 subseq 1034 len 80 csum 0xb3da], length 80
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1114, win 305, options [nop,nop,TS val 4294943343 ecr 4294943651,mptcp dss ack 3518595409], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2394:2442, ack 1114, win 305, options [nop,nop,TS val 4294943355 ecr 4294943651,mptcp dss ack 3518595409 seq 3576351371 subseq 2394 len 48 csum 0xd46b], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1114:1194, ack 2442, win 707, options [nop,nop,TS val 4294943663 ecr 4294943355,mptcp dss ack 3576351419 seq 3518595409 subseq 1114 len 80 csum 0xfe3d], length 80
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1194, win 305, options [nop,nop,TS val 4294943355 ecr 4294943663,mptcp dss ack 3518595489], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2442:2490, ack 1194, win 305, options [nop,nop,TS val 4294943387 ecr 4294943663,mptcp dss ack 3518595489 seq 3576351419 subseq 2442 len 48 csum 0xd83], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1194:1242, ack 2490, win 707, options [nop,nop,TS val 4294943695 ecr 4294943387,mptcp dss ack 3576351467 seq 3518595489 subseq 1194 len 48 csum 0xad99], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1242, win 305, options [nop,nop,TS val 4294943387 ecr 4294943695,mptcp dss ack 3518595537], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2490:2538, ack 1242, win 305, options [nop,nop,TS val 4294943395 ecr 4294943695,mptcp dss ack 3518595537 seq 3576351467 subseq 2490 len 48 csum 0x3689], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1242:1290, ack 2538, win 707, options [nop,nop,TS val 4294943703 ecr 4294943395,mptcp dss ack 3576351515 seq 3518595537 subseq 1242 len 48 csum 0xf0cf], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1290, win 305, options [nop,nop,TS val 4294943395 ecr 4294943703,mptcp dss ack 3518595585], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2538:2586, ack 1290, win 305, options [nop,nop,TS val 4294943408 ecr 4294943703,mptcp dss ack 3518595585 seq 3576351515 subseq 2538 len 48 csum 0xed5f], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1290:1338, ack 2586, win 707, options [nop,nop,TS val 4294943717 ecr 4294943408,mptcp dss ack 3576351563 seq 3518595585 subseq 1290 len 48 csum 0xf2ec], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1338, win 305, options [nop,nop,TS val 4294943408 ecr 4294943717,mptcp dss ack 3518595633], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2586:2634, ack 1338, win 305, options [nop,nop,TS val 4294943417 ecr 4294943717,mptcp dss ack 3518595633 seq 3576351563 subseq 2586 len 48 csum 0x3678], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1338:1386, ack 2634, win 707, options [nop,nop,TS val 4294943726 ecr 4294943417,mptcp dss ack 3576351611 seq 3518595633 subseq 1338 len 48 csum 0xc9a1], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1386, win 305, options [nop,nop,TS val 4294943417 ecr 4294943726,mptcp dss ack 3518595681], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2634:2682, ack 1386, win 305, options [nop,nop,TS val 4294943424 ecr 4294943726,mptcp dss ack 3518595681 seq 3576351611 subseq 2634 len 48 csum 0x54c7], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1386:1434, ack 2682, win 707, options [nop,nop,TS val 4294943733 ecr 4294943424,mptcp dss ack 3576351659 seq 3518595681 subseq 1386 len 48 csum 0xf5e9], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1434, win 305, options [nop,nop,TS val 4294943424 ecr 4294943733,mptcp dss ack 3518595729], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2682:2730, ack 1434, win 305, options [nop,nop,TS val 4294943435 ecr 4294943733,mptcp dss ack 3518595729 seq 3576351659 subseq 2682 len 48 csum 0xc90a], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1434:1482, ack 2730, win 707, options [nop,nop,TS val 4294943743 ecr 4294943435,mptcp dss ack 3576351707 seq 3518595729 subseq 1434 len 48 csum 0x4e7d], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1482, win 305, options [nop,nop,TS val 4294943435 ecr 4294943743,mptcp dss ack 3518595777], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2730:2778, ack 1482, win 305, options [nop,nop,TS val 4294943440 ecr 4294943743,mptcp dss ack 3518595777 seq 3576351707 subseq 2730 len 48 csum 0x7b3d], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1482:1530, ack 2778, win 707, options [nop,nop,TS val 4294943749 ecr 4294943440,mptcp dss ack 3576351755 seq 3518595777 subseq 1482 len 48 csum 0x83e2], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1530, win 305, options [nop,nop,TS val 4294943440 ecr 4294943749,mptcp dss ack 3518595825], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2778:2826, ack 1530, win 305, options [nop,nop,TS val 4294943453 ecr 4294943749,mptcp dss ack 3518595825 seq 3576351755 subseq 2778 len 48 csum 0x6e36], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1530:1578, ack 2826, win 707, options [nop,nop,TS val 4294943762 ecr 4294943453,mptcp dss ack 3576351803 seq 3518595825 subseq 1530 len 48 csum 0xb348], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1578, win 305, options [nop,nop,TS val 4294943453 ecr 4294943762,mptcp dss ack 3518595873], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2826:2874, ack 1578, win 305, options [nop,nop,TS val 4294943458 ecr 4294943762,mptcp dss ack 3518595873 seq 3576351803 subseq 2826 len 48 csum 0x1991], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1578:1626, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943458,mptcp dss ack 3576351851 seq 3518595873 subseq 1578 len 48 csum 0xb4f], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1626, win 305, options [nop,nop,TS val 4294943458 ecr 4294943766,mptcp dss ack 3518595921], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1626:1722, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943458,mptcp dss ack 3576351851 seq 3518595921 subseq 1626 len 96 csum 0x9334], length 96
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1722:1834, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943458,mptcp dss ack 3576351851 seq 3518596017 subseq 1722 len 112 csum 0xdc3f], length 112
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1722, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518596017], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1834, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518596129], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1834:1946, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518596129 subseq 1834 len 112 csum 0x349e], length 112
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 1946, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518596241], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 1946:2042, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518596241 subseq 1946 len 96 csum 0xd5fe], length 96
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 2042, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518596337], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 2042:2154, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518596337 subseq 2042 len 112 csum 0x2c14], length 112
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 2154, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518596449], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 2154:2266, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518596449 subseq 2154 len 112 csum 0xe76e], length 112
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 2266, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518596561], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 2266:2346, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518596561 subseq 2266 len 80 csum 0x839a], length 80
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 2346:2442, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518596641 subseq 2346 len 96 csum 0xc1ee], length 96
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 2346, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518596641], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 2442, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518596737], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 2442:2506, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518596737 subseq 2442 len 64 csum 0xe67], length 64
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 2506:2554, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518596801 subseq 2506 len 48 csum 0x1474], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 2506, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518596801], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 2554, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518596849], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 2554:2650, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518596849 subseq 2554 len 96 csum 0x5dc1], length 96
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 2650, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518596945], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 2650:2762, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518596945 subseq 2650 len 112 csum 0xa20c], length 112
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 2762, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518597057], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 2762:2874, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518597057 subseq 2762 len 112 csum 0x643c], length 112
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 2874, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518597169], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 2874:2970, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518597169 subseq 2874 len 96 csum 0x5244], length 96
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 2970, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518597265], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 2970:3082, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518597265 subseq 2970 len 112 csum 0x295a], length 112
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 3082, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518597377], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 3082:3194, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518597377 subseq 3082 len 112 csum 0x510b], length 112
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 3194, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518597489], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 3194:3274, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518597489 subseq 3194 len 80 csum 0xc29a], length 80
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 3274, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518597569], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 3274:3370, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518597569 subseq 3274 len 96 csum 0x22a5], length 96
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 3370, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518597665], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 3370:3434, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518597665 subseq 3370 len 64 csum 0xe385], length 64
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 3434, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518597729], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 3434:3482, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518597729 subseq 3434 len 48 csum 0xd6b0], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 3482, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518597777], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 3482:3562, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518597777 subseq 3482 len 80 csum 0xec9d], length 80
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 3562, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518597857], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 3562:3658, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518597857 subseq 3562 len 96 csum 0x1eee], length 96
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 3658, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518597953], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 3658:3738, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518597953 subseq 3658 len 80 csum 0xbc5e], length 80
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 3738, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518598033], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 3738:3834, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518598033 subseq 3738 len 96 csum 0xe], length 96
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 3834, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518598129], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 3834:3930, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518598129 subseq 3834 len 96 csum 0xd42], length 96
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 3930, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518598225], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 3930:4042, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518598225 subseq 3930 len 112 csum 0xb006], length 112
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4042, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518598337], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4042:4122, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518598337 subseq 4042 len 80 csum 0x986f], length 80
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4122, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518598417], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4122:4218, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518598417 subseq 4122 len 96 csum 0x43ff], length 96
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4218, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518598513], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4218:4266, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518598513 subseq 4218 len 48 csum 0x8666], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4266, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518598561], length 0
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4266:4346, ack 2874, win 707, options [nop,nop,TS val 4294943766 ecr 4294943460,mptcp dss ack 3576351851 seq 3518598561 subseq 4266 len 80 csum 0x9239], length 80
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4346, win 305, options [nop,nop,TS val 4294943460 ecr 4294943766,mptcp dss ack 3518598641], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2874:2922, ack 4346, win 305, options [nop,nop,TS val 4294943484 ecr 4294943766,mptcp dss ack 3518598641 seq 3576351851 subseq 2874 len 48 csum 0xd397], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4346:4394, ack 2922, win 707, options [nop,nop,TS val 4294943793 ecr 4294943484,mptcp dss ack 3576351899 seq 3518598641 subseq 4346 len 48 csum 0xeeaa], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4394, win 305, options [nop,nop,TS val 4294943484 ecr 4294943793,mptcp dss ack 3518598689], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2922:2970, ack 4394, win 305, options [nop,nop,TS val 4294943496 ecr 4294943793,mptcp dss ack 3518598689 seq 3576351899 subseq 2922 len 48 csum 0x48a7], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4394:4442, ack 2970, win 707, options [nop,nop,TS val 4294943805 ecr 4294943496,mptcp dss ack 3576351947 seq 3518598689 subseq 4394 len 48 csum 0xc354], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4442, win 305, options [nop,nop,TS val 4294943496 ecr 4294943805,mptcp dss ack 3518598737], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 2970:3018, ack 4442, win 305, options [nop,nop,TS val 4294943513 ecr 4294943805,mptcp dss ack 3518598737 seq 3576351947 subseq 2970 len 48 csum 0xf6d], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4442:4490, ack 3018, win 707, options [nop,nop,TS val 4294943822 ecr 4294943513,mptcp dss ack 3576351995 seq 3518598737 subseq 4442 len 48 csum 0xe0e2], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4490, win 305, options [nop,nop,TS val 4294943513 ecr 4294943822,mptcp dss ack 3518598785], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3018:3066, ack 4490, win 305, options [nop,nop,TS val 4294943521 ecr 4294943822,mptcp dss ack 3518598785 seq 3576351995 subseq 3018 len 48 csum 0xf320], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4490:4538, ack 3066, win 707, options [nop,nop,TS val 4294943830 ecr 4294943521,mptcp dss ack 3576352043 seq 3518598785 subseq 4490 len 48 csum 0x9c04], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4538, win 305, options [nop,nop,TS val 4294943521 ecr 4294943830,mptcp dss ack 3518598833], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3066:3114, ack 4538, win 305, options [nop,nop,TS val 4294943525 ecr 4294943830,mptcp dss ack 3518598833 seq 3576352043 subseq 3066 len 48 csum 0x88f6], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4538:4586, ack 3114, win 707, options [nop,nop,TS val 4294943834 ecr 4294943525,mptcp dss ack 3576352091 seq 3518598833 subseq 4538 len 48 csum 0x8612], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4586, win 305, options [nop,nop,TS val 4294943525 ecr 4294943834,mptcp dss ack 3518598881], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3114:3162, ack 4586, win 305, options [nop,nop,TS val 4294943532 ecr 4294943834,mptcp dss ack 3518598881 seq 3576352091 subseq 3114 len 48 csum 0xa14c], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4586:4634, ack 3162, win 707, options [nop,nop,TS val 4294943841 ecr 4294943532,mptcp dss ack 3576352139 seq 3518598881 subseq 4586 len 48 csum 0x7979], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4634, win 305, options [nop,nop,TS val 4294943532 ecr 4294943841,mptcp dss ack 3518598929], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3162:3210, ack 4634, win 305, options [nop,nop,TS val 4294943543 ecr 4294943841,mptcp dss ack 3518598929 seq 3576352139 subseq 3162 len 48 csum 0x7c49], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4634:4682, ack 3210, win 707, options [nop,nop,TS val 4294943851 ecr 4294943543,mptcp dss ack 3576352187 seq 3518598929 subseq 4634 len 48 csum 0x7799], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4682, win 305, options [nop,nop,TS val 4294943543 ecr 4294943851,mptcp dss ack 3518598977], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3210:3258, ack 4682, win 305, options [nop,nop,TS val 4294943549 ecr 4294943851,mptcp dss ack 3518598977 seq 3576352187 subseq 3210 len 48 csum 0x7589], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4682:4730, ack 3258, win 707, options [nop,nop,TS val 4294943858 ecr 4294943549,mptcp dss ack 3576352235 seq 3518598977 subseq 4682 len 48 csum 0x9da3], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4730, win 305, options [nop,nop,TS val 4294943549 ecr 4294943858,mptcp dss ack 3518599025], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3258:3306, ack 4730, win 305, options [nop,nop,TS val 4294943560 ecr 4294943858,mptcp dss ack 3518599025 seq 3576352235 subseq 3258 len 48 csum 0x652], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4730:4778, ack 3306, win 707, options [nop,nop,TS val 4294943869 ecr 4294943560,mptcp dss ack 3576352283 seq 3518599025 subseq 4730 len 48 csum 0xf212], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4778, win 305, options [nop,nop,TS val 4294943560 ecr 4294943869,mptcp dss ack 3518599073], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3306:3354, ack 4778, win 305, options [nop,nop,TS val 4294943572 ecr 4294943869,mptcp dss ack 3518599073 seq 3576352283 subseq 3306 len 48 csum 0x757c], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4778:4826, ack 3354, win 707, options [nop,nop,TS val 4294943881 ecr 4294943572,mptcp dss ack 3576352331 seq 3518599073 subseq 4778 len 48 csum 0x5cf1], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4826, win 305, options [nop,nop,TS val 4294943572 ecr 4294943881,mptcp dss ack 3518599121], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3354:3402, ack 4826, win 305, options [nop,nop,TS val 4294943580 ecr 4294943881,mptcp dss ack 3518599121 seq 3576352331 subseq 3354 len 48 csum 0x363c], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4826:4874, ack 3402, win 707, options [nop,nop,TS val 4294943889 ecr 4294943580,mptcp dss ack 3576352379 seq 3518599121 subseq 4826 len 48 csum 0xdae4], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4874, win 305, options [nop,nop,TS val 4294943580 ecr 4294943889,mptcp dss ack 3518599169], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3402:3450, ack 4874, win 305, options [nop,nop,TS val 4294943589 ecr 4294943889,mptcp dss ack 3518599169 seq 3576352379 subseq 3402 len 48 csum 0x5ded], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4874:4922, ack 3450, win 707, options [nop,nop,TS val 4294943898 ecr 4294943589,mptcp dss ack 3576352427 seq 3518599169 subseq 4874 len 48 csum 0xb977], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4922, win 305, options [nop,nop,TS val 4294943589 ecr 4294943898,mptcp dss ack 3518599217], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3450:3498, ack 4922, win 305, options [nop,nop,TS val 4294943624 ecr 4294943898,mptcp dss ack 3518599217 seq 3576352427 subseq 3450 len 48 csum 0x8425], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4922:4970, ack 3498, win 707, options [nop,nop,TS val 4294943933 ecr 4294943624,mptcp dss ack 3576352475 seq 3518599217 subseq 4922 len 48 csum 0x1a42], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 4970, win 305, options [nop,nop,TS val 4294943624 ecr 4294943933,mptcp dss ack 3518599265], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3498:3546, ack 4970, win 305, options [nop,nop,TS val 4294943675 ecr 4294943933,mptcp dss ack 3518599265 seq 3576352475 subseq 3498 len 48 csum 0x37f5], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 4970:5018, ack 3546, win 707, options [nop,nop,TS val 4294943983 ecr 4294943675,mptcp dss ack 3576352523 seq 3518599265 subseq 4970 len 48 csum 0xb0f0], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 5018, win 305, options [nop,nop,TS val 4294943675 ecr 4294943983,mptcp dss ack 3518599313], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3546:3594, ack 5018, win 305, options [nop,nop,TS val 4294943688 ecr 4294943983,mptcp dss ack 3518599313 seq 3576352523 subseq 3546 len 48 csum 0xd912], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 5018:5066, ack 3594, win 707, options [nop,nop,TS val 4294943997 ecr 4294943688,mptcp dss ack 3576352571 seq 3518599313 subseq 5018 len 48 csum 0x5be5], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 5066, win 305, options [nop,nop,TS val 4294943688 ecr 4294943997,mptcp dss ack 3518599361], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3594:3642, ack 5066, win 305, options [nop,nop,TS val 4294943703 ecr 4294943997,mptcp dss ack 3518599361 seq 3576352571 subseq 3594 len 48 csum 0x539a], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 5066:5114, ack 3642, win 707, options [nop,nop,TS val 4294944011 ecr 4294943703,mptcp dss ack 3576352619 seq 3518599361 subseq 5066 len 48 csum 0x2d9e], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 5114, win 305, options [nop,nop,TS val 4294943703 ecr 4294944011,mptcp dss ack 3518599409], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3642:3690, ack 5114, win 305, options [nop,nop,TS val 4294943712 ecr 4294944011,mptcp dss ack 3518599409 seq 3576352619 subseq 3642 len 48 csum 0xbda6], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 5114:5162, ack 3690, win 707, options [nop,nop,TS val 4294944021 ecr 4294943712,mptcp dss ack 3576352667 seq 3518599409 subseq 5114 len 48 csum 0x1bc7], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 5162, win 305, options [nop,nop,TS val 4294943712 ecr 4294944021,mptcp dss ack 3518599457], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3690:3738, ack 5162, win 305, options [nop,nop,TS val 4294943725 ecr 4294944021,mptcp dss ack 3518599457 seq 3576352667 subseq 3690 len 48 csum 0xad71], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 5162:5210, ack 3738, win 707, options [nop,nop,TS val 4294944034 ecr 4294943725,mptcp dss ack 3576352715 seq 3518599457 subseq 5162 len 48 csum 0xf8f7], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 5210, win 305, options [nop,nop,TS val 4294943725 ecr 4294944034,mptcp dss ack 3518599505], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [P.], seq 3738:3786, ack 5210, win 305, options [nop,nop,TS val 4294943746 ecr 4294944034,mptcp dss ack 3518599505 seq 3576352715 subseq 3738 len 48 csum 0xd16], length 48
+IP 10.1.1.2.22 > 10.2.1.2.35961: Flags [P.], seq 5210:5258, ack 3786, win 707, options [nop,nop,TS val 4294944054 ecr 4294943746,mptcp dss ack 3576352763 seq 3518599505 subseq 5210 len 48 csum 0x8122], length 48
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [.], ack 5258, win 305, options [nop,nop,TS val 4294943746 ecr 4294944054,mptcp dss ack 3518599553], length 0
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [.], ack 617, win 707, options [nop,nop,TS val 4294944054 ecr 4294943306,mptcp rem-addr id 0,mptcp dss ack 3576352763], length 0
+IP 10.2.1.2.35961 > 10.1.1.2.22: Flags [R.], seq 3786, ack 5258, win 305, options [nop,nop,TS val 4294943749 ecr 4294944054,mptcp dss ack 3518599553], length 0
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 2153:2233, ack 617, win 707, options [nop,nop,TS val 4294944054 ecr 4294943306,mptcp dss ack 3576352763 seq 3518599553 subseq 2153 len 80 csum 0xe206], length 80
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 2233, win 305, options [nop,nop,TS val 4294943749 ecr 4294944054,mptcp dss ack 3518599633], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 617:665, ack 2233, win 305, options [nop,nop,TS val 4294943782 ecr 4294944054,mptcp dss ack 3518599633 seq 3576352763 subseq 617 len 48 csum 0xa135], length 48
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [.], ack 665, win 707, options [nop,nop,TS val 4294944090 ecr 4294943782,mptcp dss ack 3576352811], length 0
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 2233:2313, ack 665, win 707, options [nop,nop,TS val 4294944090 ecr 4294943782,mptcp dss ack 3576352811 seq 3518599633 subseq 2233 len 80 csum 0x917d], length 80
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 2313, win 305, options [nop,nop,TS val 4294943782 ecr 4294944090,mptcp dss ack 3518599713], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 665:713, ack 2313, win 305, options [nop,nop,TS val 4294943797 ecr 4294944090,mptcp dss ack 3518599713 seq 3576352811 subseq 665 len 48 csum 0x3789], length 48
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 2313:2393, ack 713, win 707, options [nop,nop,TS val 4294944106 ecr 4294943797,mptcp dss ack 3576352859 seq 3518599713 subseq 2313 len 80 csum 0x6cf1], length 80
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 2393, win 305, options [nop,nop,TS val 4294943797 ecr 4294944106,mptcp dss ack 3518599793], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 713:761, ack 2393, win 305, options [nop,nop,TS val 4294943811 ecr 4294944106,mptcp dss ack 3518599793 seq 3576352859 subseq 713 len 48 csum 0xc47b], length 48
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 2393:2473, ack 761, win 707, options [nop,nop,TS val 4294944119 ecr 4294943811,mptcp dss ack 3576352907 seq 3518599793 subseq 2393 len 80 csum 0x226], length 80
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 2473, win 305, options [nop,nop,TS val 4294943811 ecr 4294944119,mptcp dss ack 3518599873], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 761:809, ack 2473, win 305, options [nop,nop,TS val 4294943826 ecr 4294944119,mptcp dss ack 3518599873 seq 3576352907 subseq 761 len 48 csum 0x187f], length 48
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 2473:2553, ack 809, win 707, options [nop,nop,TS val 4294944134 ecr 4294943826,mptcp dss ack 3576352955 seq 3518599873 subseq 2473 len 80 csum 0xe4fe], length 80
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 2553, win 305, options [nop,nop,TS val 4294943826 ecr 4294944134,mptcp dss ack 3518599953], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 809:857, ack 2553, win 305, options [nop,nop,TS val 4294943840 ecr 4294944134,mptcp dss ack 3518599953 seq 3576352955 subseq 809 len 48 csum 0xf780], length 48
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 2553:2633, ack 857, win 707, options [nop,nop,TS val 4294944149 ecr 4294943840,mptcp dss ack 3576353003 seq 3518599953 subseq 2553 len 80 csum 0xb0e6], length 80
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 2633, win 305, options [nop,nop,TS val 4294943841 ecr 4294944149,mptcp dss ack 3518600033], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 857:905, ack 2633, win 305, options [nop,nop,TS val 4294943856 ecr 4294944149,mptcp dss ack 3518600033 seq 3576353003 subseq 857 len 48 csum 0x1272], length 48
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 2633:2713, ack 905, win 707, options [nop,nop,TS val 4294944164 ecr 4294943856,mptcp dss ack 3576353051 seq 3518600033 subseq 2633 len 80 csum 0x2521], length 80
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 2713, win 305, options [nop,nop,TS val 4294943856 ecr 4294944164,mptcp dss ack 3518600113], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 905:953, ack 2713, win 305, options [nop,nop,TS val 4294943871 ecr 4294944164,mptcp dss ack 3518600113 seq 3576353051 subseq 905 len 48 csum 0xeb71], length 48
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 2713:2793, ack 953, win 707, options [nop,nop,TS val 4294944179 ecr 4294943871,mptcp dss ack 3576353099 seq 3518600113 subseq 2713 len 80 csum 0xdd08], length 80
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 2793, win 305, options [nop,nop,TS val 4294943871 ecr 4294944179,mptcp dss ack 3518600193], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 953:1001, ack 2793, win 305, options [nop,nop,TS val 4294943887 ecr 4294944179,mptcp dss ack 3518600193 seq 3576353099 subseq 953 len 48 csum 0xf047], length 48
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 2793:2873, ack 1001, win 707, options [nop,nop,TS val 4294944195 ecr 4294943887,mptcp dss ack 3576353147 seq 3518600193 subseq 2793 len 80 csum 0x3967], length 80
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 2873, win 305, options [nop,nop,TS val 4294943887 ecr 4294944195,mptcp dss ack 3518600273], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 1001:1049, ack 2873, win 305, options [nop,nop,TS val 4294944018 ecr 4294944195,mptcp dss ack 3518600273 seq 3576353147 subseq 1001 len 48 csum 0xa43d], length 48
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 2873:2921, ack 1049, win 707, options [nop,nop,TS val 4294944326 ecr 4294944018,mptcp dss ack 3576353195 seq 3518600273 subseq 2873 len 48 csum 0x1c25], length 48
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 2921, win 305, options [nop,nop,TS val 4294944018 ecr 4294944326,mptcp dss ack 3518600321], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 1049:1097, ack 2921, win 305, options [nop,nop,TS val 4294944032 ecr 4294944326,mptcp dss ack 3518600321 seq 3576353195 subseq 1049 len 48 csum 0xebdc], length 48
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 2921:2969, ack 1097, win 707, options [nop,nop,TS val 4294944341 ecr 4294944032,mptcp dss ack 3576353243 seq 3518600321 subseq 2921 len 48 csum 0xf7df], length 48
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 2969, win 305, options [nop,nop,TS val 4294944032 ecr 4294944341,mptcp dss ack 3518600369], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 1097:1145, ack 2969, win 305, options [nop,nop,TS val 4294944037 ecr 4294944341,mptcp dss ack 3518600369 seq 3576353243 subseq 1097 len 48 csum 0xb656], length 48
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 2969:3017, ack 1145, win 707, options [nop,nop,TS val 4294944346 ecr 4294944037,mptcp dss ack 3576353291 seq 3518600369 subseq 2969 len 48 csum 0x73fb], length 48
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 3017, win 305, options [nop,nop,TS val 4294944037 ecr 4294944346,mptcp dss ack 3518600417], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 1145:1193, ack 3017, win 305, options [nop,nop,TS val 4294944056 ecr 4294944346,mptcp dss ack 3518600417 seq 3576353291 subseq 1145 len 48 csum 0x7813], length 48
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 3017:3065, ack 1193, win 707, options [nop,nop,TS val 4294944365 ecr 4294944056,mptcp dss ack 3576353339 seq 3518600417 subseq 3017 len 48 csum 0xa7ff], length 48
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 3065, win 305, options [nop,nop,TS val 4294944056 ecr 4294944365,mptcp dss ack 3518600465], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 1193:1241, ack 3065, win 305, options [nop,nop,TS val 4294944064 ecr 4294944365,mptcp dss ack 3518600465 seq 3576353339 subseq 1193 len 48 csum 0xd43c], length 48
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 3065:3241, ack 1241, win 707, options [nop,nop,TS val 4294944372 ecr 4294944064,mptcp dss ack 3576353387 seq 3518600465 subseq 3065 len 176 csum 0x49a0], length 176
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [P.], seq 3241:3305, ack 1241, win 707, options [nop,nop,TS val 4294944372 ecr 4294944064,mptcp dss ack 3576353387 seq 3518600641 subseq 3241 len 64 csum 0x2541], length 64
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 3241, win 310, options [nop,nop,TS val 4294944064 ecr 4294944372,mptcp dss ack 3518600641], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 3305, win 310, options [nop,nop,TS val 4294944064 ecr 4294944372,mptcp dss ack 3518600705], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 1241:1273, ack 3305, win 310, options [nop,nop,TS val 4294944064 ecr 4294944372,mptcp dss ack 3518600705 seq 3576353387 subseq 1241 len 32 csum 0xec34], length 32
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [P.], seq 1273:1337, ack 3305, win 310, options [nop,nop,TS val 4294944064 ecr 4294944372,mptcp dss ack 3518600705 seq 3576353419 subseq 1273 len 64 csum 0x3f93], length 64
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [.], ack 1337, win 707, options [nop,nop,TS val 4294944372 ecr 4294944064,mptcp dss ack 3576353483], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 3305, win 310, options [nop,nop,TS val 4294944064 ecr 4294944372,mptcp dss fin ack 3518600705 seq 3576353483 subseq 0 len 1 csum 0xa51], length 0
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [.], ack 1337, win 707, options [nop,nop,TS val 4294944372 ecr 4294944064,mptcp dss fin ack 3576353484 seq 3518600705 subseq 0 len 1 csum 0xbe46], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [F.], seq 1337, ack 3305, win 310, options [nop,nop,TS val 4294944066 ecr 4294944372,mptcp dss ack 3518600705], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 3305, win 310, options [nop,nop,TS val 4294944066 ecr 4294944372,mptcp dss ack 3518600706], length 0
+IP 10.1.2.2.22 > 10.2.1.2.41221: Flags [F.], seq 3305, ack 1338, win 707, options [nop,nop,TS val 4294944372 ecr 4294944066,mptcp dss ack 3576353484], length 0
+IP 10.2.1.2.41221 > 10.1.2.2.22: Flags [.], ack 3306, win 310, options [nop,nop,TS val 4294944066 ecr 4294944372,mptcp dss ack 3518600706], length 0
diff --git a/tests/mptcp.pcap b/tests/mptcp.pcap
new file mode 100644
index 0000000..c3eaae5
--- /dev/null
+++ b/tests/mptcp.pcap
Binary files differ
diff --git a/tests/msnlb.out b/tests/msnlb.out
new file mode 100644
index 0000000..194dbcd
--- /dev/null
+++ b/tests/msnlb.out
@@ -0,0 +1,2 @@
+MS NLB heartbeat, host priority: 2, cluster IP: 192.168.100.80, host IP: 192.168.100.82
+MS NLB heartbeat, host priority: 1, cluster IP: 192.168.100.80, host IP: 192.168.100.81
diff --git a/tests/msnlb.pcap b/tests/msnlb.pcap
new file mode 100644
index 0000000..dab88fe
--- /dev/null
+++ b/tests/msnlb.pcap
Binary files differ
diff --git a/tests/msnlb2.out b/tests/msnlb2.out
new file mode 100644
index 0000000..00fc1a6
--- /dev/null
+++ b/tests/msnlb2.out
@@ -0,0 +1,2 @@
+[|MS NLB]
+[|MS NLB]
diff --git a/tests/msnlb2.pcap b/tests/msnlb2.pcap
new file mode 100644
index 0000000..270476d
--- /dev/null
+++ b/tests/msnlb2.pcap
Binary files differ
diff --git a/tests/nflog-e.out b/tests/nflog-e.out
new file mode 100644
index 0000000..636d38e
--- /dev/null
+++ b/tests/nflog-e.out
@@ -0,0 +1,4 @@
+version 0, resource ID 20, family IPv4 (2), length 180: 74.82.42.42.53 > 10.0.0.20.42585: 17265 1/0/0 A 93.184.216.119 (45)
+version 0, resource ID 20, family IPv4 (2), length 192: 74.82.42.42.53 > 10.0.0.20.45190: 52954 1/0/0 AAAA 2606:2800:220:6d:26bf:1447:1097:aa7 (57)
+version 0, resource ID 20, family IPv4 (2), length 184: 74.82.42.42.53 > 10.0.0.20.44031: 8279 1/0/0 A 93.184.216.119 (49)
+version 0, resource ID 20, family IPv4 (2), length 196: 74.82.42.42.53 > 10.0.0.20.48736: 2122 1/0/0 AAAA 2606:2800:220:6d:26bf:1447:1097:aa7 (61)
diff --git a/tests/nflog.pcap b/tests/nflog.pcap
new file mode 100644
index 0000000..9151d6a
--- /dev/null
+++ b/tests/nflog.pcap
Binary files differ
diff --git a/tests/of10_p3295-vv.out b/tests/of10_p3295-vv.out
new file mode 100644
index 0000000..824595d
--- /dev/null
+++ b/tests/of10_p3295-vv.out
@@ -0,0 +1,798 @@
+IP (tos 0x0, ttl 64, id 55495, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [S], cksum 0xa230 (correct), seq 3930397949, win 5840, options [sackOK,TS val 194888762 ecr 0,mss 1460,nop,wscale 5], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [S.], cksum 0x1474 (incorrect -> 0x4253), seq 491620419, ack 3930397950, win 14480, options [mss 1460,sackOK,TS val 220957518 ecr 194888762,nop,wscale 7], length 0
+IP (tos 0x0, ttl 64, id 55496, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [.], cksum 0xa8f8 (correct), seq 1, ack 1, win 183, options [nop,nop,TS val 194888762 ecr 220957518], length 0
+IP (tos 0x0, ttl 64, id 778, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [P.], cksum 0x1474 (incorrect -> 0xa818), seq 1:9, ack 1, win 114, options [nop,nop,TS val 220957530 ecr 194888762], length 8: OpenFlow
+	version 1.0, type HELLO, length 8, xid 0x00000001
+IP (tos 0x0, ttl 64, id 55497, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [.], cksum 0xa8e1 (correct), seq 1, ack 9, win 183, options [nop,nop,TS val 194888765 ecr 220957530], length 0
+IP (tos 0x0, ttl 64, id 55498, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0xa74f (correct), seq 1:9, ack 9, win 183, options [nop,nop,TS val 194888811 ecr 220957530], length 8: OpenFlow
+	version 1.0, type HELLO, length 8, xid 0x0000004c
+IP (tos 0x0, ttl 64, id 779, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0xa839), seq 9, ack 9, win 114, options [nop,nop,TS val 220957713 ecr 194888811], length 0
+IP (tos 0x0, ttl 64, id 780, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [P.], cksum 0x1474 (incorrect -> 0xa719), seq 9:17, ack 9, win 114, options [nop,nop,TS val 220957714 ecr 194888811], length 8: OpenFlow
+	version 1.0, type FEATURES_REQUEST, length 8, xid 0x00000002
+IP (tos 0x0, ttl 64, id 55499, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [.], cksum 0xa7eb (correct), seq 9, ack 17, win 183, options [nop,nop,TS val 194888811 ecr 220957714], length 0
+IP (tos 0x0, ttl 64, id 55500, offset 0, flags [DF], proto TCP (6), length 2628)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x1e7c (incorrect -> 0xae92), seq 9:2585, ack 17, win 183, options [nop,nop,TS val 194889013 ecr 220957714], length 2576: OpenFlow
+	version 1.0, type FEATURES_REPLY, length 2576, xid 0x00000002
+	 dpid 0x0000089e0162d5f4, n_buffers 256, n_tables 1
+	 capabilities 0x00000087 (FLOW_STATS, TABLE_STATS, PORT_STATS, ARP_MATCH_IP)
+	 actions 0x0000003f (OUTPUT, SET_VLAN_VID, SET_VLAN_PCP, STRIP_VLAN, SET_DL_SRC, SET_DL_DST)
+	  port_no 42, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/42'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 33, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/33'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 36, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/36'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 31, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/31'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 48, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/48'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 40, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/40'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 1, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/1'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 28, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/28'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 20, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/20'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 10, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/10'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 22, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/22'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 29, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/29'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 44, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/44'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 41, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/41'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 21, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/21'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 16, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/16'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 45, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/45'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 49, hw_addr 08:9e:01:62:d5:f4, name 'te-1/1/49'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x00000020 (1GB_FD)
+	   supported 0x00000e60 (1GB_FD, 10GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 38, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/38'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 17, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/17'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 27, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/27'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 51, hw_addr 08:9e:01:62:d5:f4, name 'te-1/1/51'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x00000020 (1GB_FD)
+	   supported 0x00000e60 (1GB_FD, 10GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 46, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/46'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 6, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/6'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 50, hw_addr 08:9e:01:62:d5:f4, name 'te-1/1/50'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x00000020 (1GB_FD)
+	   supported 0x00000e60 (1GB_FD, 10GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 43, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/43'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 35, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/35'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 19, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/19'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 47, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/47'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 23, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/23'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 25, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/25'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 37, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/37'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 7, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/7'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 26, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/26'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 32, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/32'
+	   config 0x00000020 (NO_FWD)
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 4, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/4'
+	   config 0x00000000
+	   state 0x00000000
+	   curr 0x00000020 (1GB_FD)
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	  port_no 3, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/3'
+	   config 0x00000000
+	   state 0x00000000
+	   curr 0x00000020 (1GB_FD)
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	  port_no 18, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/18'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 39, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/39'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 8, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/8'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 2, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/2'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 14, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/14'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 5, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/5'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 30, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/30'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 11, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/11'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 15, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/15'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 52, hw_addr 08:9e:01:62:d5:f4, name 'te-1/1/52'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x00000020 (1GB_FD)
+	   supported 0x00000e60 (1GB_FD, 10GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 34, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/34'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 13, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/13'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 12, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/12'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 24, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/24'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no 9, hw_addr 08:9e:01:62:d5:f4, name 'ge-1/1/9'
+	   config 0x00000000
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000000
+	   advertised 0x0000042f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, PAUSE)
+	   supported 0x00000e2f (10MB_HD, 10MB_FD, 100MB_HD, 100MB_FD, 1GB_FD, AUTONEG, PAUSE, PAUSE_ASYM)
+	   peer 0x00000000
+	  port_no LOCAL, hw_addr 08:9e:01:62:d5:f4, name 'br0'
+	   config 0x00000001 (PORT_DOWN)
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000082 (10MB_FD, COPPER)
+	   advertised 0x00000000
+	   supported 0x00000000
+	   peer 0x00000000
+IP (tos 0x0, ttl 64, id 781, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0x9a07), seq 17, ack 2585, win 154, options [nop,nop,TS val 220958521 ecr 194889013], length 0
+IP (tos 0x0, ttl 64, id 782, offset 0, flags [DF], proto TCP (6), length 136)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [P.], cksum 0x14c0 (incorrect -> 0x96f3), seq 17:101, ack 2585, win 154, options [nop,nop,TS val 220958525 ecr 194889013], length 84: OpenFlow
+	version 1.0, type SET_CONFIG, length 12, xid 0x00000003
+	 flags FRAG_NORMAL, miss_send_len 65535
+	version 1.0, type FLOW_MOD, length 72, xid 0x00000004
+	 cookie 0x0000000000000000, command DELETE, out_port NONE, flags 0x0000
+IP (tos 0x0, ttl 64, id 55502, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [.], cksum 0x9991 (correct), seq 2585, ack 101, win 183, options [nop,nop,TS val 194889014 ecr 220958525], length 0
+IP (tos 0x0, ttl 64, id 783, offset 0, flags [DF], proto TCP (6), length 1500)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x1a14 (incorrect -> 0xcf68), seq 101:1549, ack 2585, win 154, options [nop,nop,TS val 220958532 ecr 194889014], length 1448: OpenFlow
+	version 1.0, type GET_CONFIG_REQUEST, length 8, xid 0x00000005
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000006
+	 match in_port 4
+	 cookie 0x0000000000000001, command ADD, priority 54321, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000007
+	 match in_port 4
+	 cookie 0x0000000000000002, command ADD, priority 54320, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port LOCAL
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000008
+	 match in_port 4
+	 cookie 0x0000000000000003, command ADD, priority 54319, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port CONTROLLER, max_len 65535
+	version 1.0, type FLOW_MOD, length 88, xid 0x00000009
+	 match in_port 4
+	 cookie 0x0000000000000004, command ADD, priority 54318, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_VLAN_VID, len 8, vlan_vid 2
+	 action type SET_TP_SRC, len 8, tp_port 23
+	version 1.0, type FLOW_MOD, length 80, xid 0x0000000a
+	 match in_port 4
+	 cookie 0x0000000000000005, command ADD, priority 54317, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_VLAN_PCP, len 8, vlan_pcp 5
+	version 1.0, type FLOW_MOD, length 80, xid 0x0000000b
+	 match in_port 4
+	 cookie 0x0000000000000006, command ADD, priority 54316, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type STRIP_VLAN, len 8
+	version 1.0, type FLOW_MOD, length 96, xid 0x0000000c
+	 match in_port 4
+	 cookie 0x0000000000000007, command ADD, priority 54315, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 11:22:33:44:55:66
+	 action type SET_NW_SRC, len 8, nw_addr 192.168.72.143
+	version 1.0, type FLOW_MOD, length 96, xid 0x0000000d
+	 match in_port 4
+	 cookie 0x0000000000000008, command ADD, priority 54314, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_DST, len 16, dl_addr 77:88:99:aa:bb:cc
+	 action type SET_NW_DST, len 8, nw_addr 192.168.98.55
+	version 1.0, type FLOW_MOD, length 88, xid 0x0000000e
+	 match in_port 4
+	 cookie 0x0000000000000009, command ADD, priority 54313, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_NW_TOS, len 8, nw_tos 0x2c
+	 action type SET_TP_DST, len 8, tp_port 80
+	version 1.0, type FLOW_MOD, length 88, xid 0x0000000f
+	 match in_port 4
+	 cookie 0x000000000000000a, command ADD, priority 54312, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type ENQUEUE, len 16, port 1, queue_id 2
+	version 1.0, type FLOW_MOD, length 144, xid 0x00000010
+	 match in_port 4
+	 cookie 0x000000000000000b, command ADD, priority 54311, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type VENDOR, len 72, vendor 0x00001234
+	 data (64 octets)
+	  0x0000:  4469 6420 796f 7520 6b6e 6f77 2076 656e  Did.you.know.ven
+	  0x0010:  646f 7220 6163 7469 6f6e 2064 6174 6120  dor.action.data.
+	  0x0020:  6c65 6e67 7468 206d 7573 7420 6265 2061  length.must.be.a
+	  0x0030:  206d 756c 7469 706c 6520 6f66 2020 383f  .multiple.of..8?
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000011
+	 match in_port 1
+	 match dl_src 00:00:00:00:00:01
+	 cookie 0x000000000000000c, command ADD, priority 43210, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 5
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000012
+	 match dl_vlan 100
+	 match dl_vlan_pcp 4
+	 match dl_type 0x8100
+	 cookie 0x000000000000000d, command ADD, priority 43209, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 5
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000013
+	 match dl_type 0x0800
+	 match nw_src 10.11.12.0/24
+	 match nw_dst 10.13.14.0/24
+	 cookie 0x000000000000000e, command ADD, priority 43208, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 5
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000014
+	 match dl_type 0x0800
+	 match nw_proto 17
+	 match tp_src 68
+	 match tp_dst 67
+	 cookie 0x000000000000000f, command ADD, priority 43207, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 5
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000015
+	 match dl_type 0x0800
+	 match nw_proto 1
+	 match icmp_type 8
+	 cookie 0x0000000000000010, command ADD, priority 43206, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 5
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000016
+	 match dl_type 0x0800
+	 match nw_proto 1 [|openflow]
+IP (tos 0x0, ttl 64, id 784, offset 0, flags [DF], proto TCP (6), length 740)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [P.], cksum 0x171c (incorrect -> 0xdfee), seq 1549:2237, ack 2585, win 154, options [nop,nop,TS val 220958532 ecr 194889014], length 688: OpenFlow
+	version unknown (0x00), type 0x00, length 0, xid 0x0003000d (corrupt)
+IP (tos 0x0, ttl 64, id 55503, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [.], cksum 0x9386 (correct), seq 2585, ack 1549, win 273, options [nop,nop,TS val 194889016 ecr 220958532], length 0
+IP (tos 0x0, ttl 64, id 55504, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [.], cksum 0x907b (correct), seq 2585, ack 2237, win 364, options [nop,nop,TS val 194889016 ecr 220958532], length 0
+IP (tos 0x0, ttl 64, id 55505, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0xba5c (correct), seq 2585:2673, ack 2237, win 364, options [nop,nop,TS val 194889060 ecr 220958532], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match dl_type 0x0800
+	 match nw_proto 17
+	 match tp_src 68
+	 match tp_dst 67
+	 cookie 0x000000000000000f, priority 43207, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 55506, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x3c6a (correct), seq 2673:2761, ack 2237, win 364, options [nop,nop,TS val 194889060 ecr 220958532], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match dl_vlan 100
+	 match dl_vlan_pcp 4
+	 match dl_type 0x8100
+	 cookie 0x000000000000000d, priority 43209, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 785, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0x8fbf), seq 2237, ack 2761, win 154, options [nop,nop,TS val 220958710 ecr 194889060], length 0
+IP (tos 0x0, ttl 64, id 55507, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0xc154 (correct), seq 2761:2849, ack 2237, win 364, options [nop,nop,TS val 194889060 ecr 220958532], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 cookie 0x0000000000000014, priority 43202, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 55508, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0xc04a (correct), seq 2849:2937, ack 2237, win 364, options [nop,nop,TS val 194889060 ecr 220958710], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 cookie 0x0000000000000015, priority 43201, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 55509, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0xa1f0 (correct), seq 2937:3025, ack 2237, win 364, options [nop,nop,TS val 194889060 ecr 220958710], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match dl_type 0x0800
+	 match nw_src 10.11.12.0/24
+	 match nw_dst 10.13.14.0/24
+	 cookie 0x000000000000000e, priority 43208, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 786, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0x8eb7), seq 2237, ack 3025, win 154, options [nop,nop,TS val 220958710 ecr 194889060], length 0
+IP (tos 0x0, ttl 64, id 55510, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0xbf9d (correct), seq 3025:3113, ack 2237, win 364, options [nop,nop,TS val 194889060 ecr 220958710], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match in_port 1
+	 match dl_src 00:00:00:00:00:01
+	 cookie 0x000000000000000c, priority 43210, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 55511, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x54e2 (correct), seq 3113:3201, ack 2237, win 364, options [nop,nop,TS val 194889060 ecr 220958710], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match dl_src aa:00:00:00:00:11
+	 match dl_dst bb:00:00:00:00:22
+	 cookie 0x0000000000000013, priority 43203, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 13, byte_count 1323
+IP (tos 0x0, ttl 64, id 55512, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x6bfc (correct), seq 3201:3289, ack 2237, win 364, options [nop,nop,TS val 194889060 ecr 220958710], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match in_port 4
+	 cookie 0x0000000000000001, priority 54321, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 100, byte_count 10027
+IP (tos 0x0, ttl 64, id 787, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0x8dae), seq 2237, ack 3289, win 154, options [nop,nop,TS val 220958711 ecr 194889060], length 0
+IP (tos 0x0, ttl 64, id 55513, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x9333 (correct), seq 3289:3377, ack 2237, win 364, options [nop,nop,TS val 194889060 ecr 220958710], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match in_port 4
+	 cookie 0x0000000000000002, priority 54320, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 55514, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x92da (correct), seq 3377:3465, ack 2237, win 364, options [nop,nop,TS val 194889060 ecr 220958711], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match in_port 4
+	 cookie 0x0000000000000003, priority 54319, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 55515, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x9282 (correct), seq 3465:3553, ack 2237, win 364, options [nop,nop,TS val 194889060 ecr 220958711], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match in_port 4
+	 cookie 0x0000000000000004, priority 54318, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 788, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0x8ca5), seq 2237, ack 3553, win 154, options [nop,nop,TS val 220958712 ecr 194889060], length 0
+IP (tos 0x0, ttl 64, id 55516, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x922a (correct), seq 3553:3641, ack 2237, win 364, options [nop,nop,TS val 194889060 ecr 220958711], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match in_port 4
+	 cookie 0x0000000000000005, priority 54317, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 55517, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x91d1 (correct), seq 3641:3729, ack 2237, win 364, options [nop,nop,TS val 194889060 ecr 220958712], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match in_port 4
+	 cookie 0x0000000000000006, priority 54316, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 789, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0x8bf5), seq 2237, ack 3729, win 154, options [nop,nop,TS val 220958712 ecr 194889060], length 0
+IP (tos 0x0, ttl 64, id 55518, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x9179 (correct), seq 3729:3817, ack 2237, win 364, options [nop,nop,TS val 194889060 ecr 220958712], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match in_port 4
+	 cookie 0x0000000000000007, priority 54315, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 55519, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x9120 (correct), seq 3817:3905, ack 2237, win 364, options [nop,nop,TS val 194889061 ecr 220958712], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match in_port 4
+	 cookie 0x0000000000000008, priority 54314, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 55520, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x90c8 (correct), seq 3905:3993, ack 2237, win 364, options [nop,nop,TS val 194889061 ecr 220958712], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match in_port 4
+	 cookie 0x0000000000000009, priority 54313, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 790, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0x8aec), seq 2237, ack 3993, win 154, options [nop,nop,TS val 220958713 ecr 194889060], length 0
+IP (tos 0x0, ttl 64, id 55521, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x9070 (correct), seq 3993:4081, ack 2237, win 364, options [nop,nop,TS val 194889061 ecr 220958712], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000000
+	 match in_port 4
+	 cookie 0x000000000000000a, priority 54312, reason DELETE, duration_sec 122, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 55522, offset 0, flags [DF], proto TCP (6), length 64)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x8894 (correct), seq 4081:4093, ack 2237, win 364, options [nop,nop,TS val 194889061 ecr 220958713], length 12: OpenFlow
+	version 1.0, type GET_CONFIG_REPLY, length 12, xid 0x00000005
+	 flags FRAG_NORMAL, miss_send_len 65535
+IP (tos 0x0, ttl 64, id 791, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0x8a87), seq 2237, ack 4093, win 154, options [nop,nop,TS val 220958713 ecr 194889061], length 0
+IP (tos 0x0, ttl 64, id 55523, offset 0, flags [DF], proto TCP (6), length 128)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x90e5 (correct), seq 4093:4169, ack 2237, win 364, options [nop,nop,TS val 194889061 ecr 220958713], length 76: OpenFlow
+	version 1.0, type ERROR, length 76, xid 0x00000010
+	 type BAD_ACTION, code BAD_VENDOR
+	 data (64 octets)
+	  0x0000:  010e 0090 0000 0010 0038 20fe 0004 0000  .........8......
+	  0x0010:  0000 0000 0000 0000 0000 0000 0000 0000  ................
+	  0x0020:  0000 0000 0000 0000 0000 0000 0000 0000  ................
+	  0x0030:  0000 0000 0000 000b 0000 0000 0000 d427  ...............'
+IP (tos 0x0, ttl 64, id 55524, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x8821 (correct), seq 4169:4177, ack 2237, win 364, options [nop,nop,TS val 194889063 ecr 220958713], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x0000001b
+IP (tos 0x0, ttl 64, id 55525, offset 0, flags [DF], proto TCP (6), length 1120)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0xb778 (correct), seq 4177:5245, ack 2237, win 364, options [nop,nop,TS val 194889063 ecr 220958713], length 1068: OpenFlow
+	version 1.0, type STATS_REPLY, length 1068, xid 0x0000001c
+	 type DESC, flags 0x0000
+	  mfr_desc 'Nicira Networks, Inc.'
+	  hw_desc 'Open vSwitch'
+	  sw_desc '1.2.2'
+	  serial_num 'None'
+	  dp_desc 'None'
+IP (tos 0x0, ttl 64, id 792, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0x85e9), seq 2237, ack 5245, win 176, options [nop,nop,TS val 220958721 ecr 194889061], length 0
+IP (tos 0x0, ttl 64, id 55526, offset 0, flags [DF], proto TCP (6), length 1752)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x1b10 (incorrect -> 0x7df4), seq 5245:6945, ack 2237, win 364, options [nop,nop,TS val 194889063 ecr 220958713], length 1700: OpenFlow
+	version 1.0, type STATS_REPLY, length 1700, xid 0x0000001d
+	 type FLOW, flags 0x0000
+	 length 96, table_id 0
+	  match dl_type 0x0800
+	  match nw_proto 17
+	  match tp_src 68
+	  match tp_dst 67
+	  duration_sec 0, duration_nsec 0, priority 43207, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000f, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 5
+	 length 96, table_id 0
+	  match dl_vlan 100
+	  match dl_vlan_pcp 4
+	  match dl_type 0x8100
+	  duration_sec 0, duration_nsec 0, priority 43209, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000d, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 5
+	 length 96, table_id 0
+	  duration_sec 0, duration_nsec 0, priority 43202, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000014, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 5
+	 length 96, table_id 0
+	  duration_sec 0, duration_nsec 0, priority 43201, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000015, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 5
+	 length 96, table_id 0
+	  match dl_type 0x0800
+	  match nw_src 10.11.12.0/24
+	  match nw_dst 10.13.14.0/24
+	  duration_sec 0, duration_nsec 0, priority 43208, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000e, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 5
+	 length 96, table_id 0
+	  match in_port 1
+	  match dl_src 00:00:00:00:00:01
+	  duration_sec 0, duration_nsec 0, priority 43210, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000c, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 5
+	 length 96, table_id 0
+	  match dl_src aa:00:00:00:00:11
+	  match dl_dst bb:00:00:00:00:22
+	  duration_sec 0, duration_nsec 0, priority 43203, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000013, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 5
+	 length 96, table_id 0
+	  match in_port 4
+	  duration_sec 0, duration_nsec 0, priority 54321, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000001, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 0
+	  match in_port 4
+	  duration_sec 0, duration_nsec 0, priority 54320, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000002, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port LOCAL
+	 length 96, table_id 0
+	  match in_port 4
+	  duration_sec 0, duration_nsec 0, priority 54319, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000003, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port CONTROLLER, max_len 65535
+	 length 104, table_id 0
+	  match in_port 4
+	  duration_sec 0, duration_nsec 0, priority 54318, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000004, packet_count 0, byte_count 0
+	  action type SET_VLAN_VID, len 8, vlan_vid 2
+	  action type SET_TP_SRC, len 8, tp_port 23
+	 length 96, table_id 0
+	  match in_port 4
+	  duration_sec 0, duration_nsec 0, priority 54317, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000005, packet_count 0, byte_count 0
+	  action type SET_VLAN_PCP, len 8, vlan_pcp 5
+	 length 96, table_id 0
+	  match in_port 4
+	  duration_sec 0, duration_nsec 0, priority 54316, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000006, packet_count 0, byte_count 0
+	  action type STRIP_VLAN, len 8
+	 length 112, table_id 0
+	  match in_port 4
+	  duration_sec 0, duration_nsec 0, priority 54315, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000007, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 11:22:33:44:55:66
+	  action type SET_NW_SRC, len 8, nw_addr 192.168.72.143
+	 length 112, table_id 0
+	  match in_port 4
+	  duration_sec 0, duration_nsec 0, priority 54314, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000008, packet_count 0, byte_count 0
+	  action type SET_DL_DST, len 16, dl_addr 77:88:99:aa:bb:cc
+	  action type SET_NW_DST, len 8, nw_addr 192.168.98.55
+	 length 104, table_id 0
+	  match in_port 4
+	  duration_sec 0, duration_nsec 0, priority 54313, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000009, packet_count 0, byte_count 0
+	  action type SET_NW_TOS, len 8, nw_tos 0x2c
+	  action type SET_TP_DST, len 8, tp_port 80
+	 length 104, table_id 0
+	  match in_port 4
+	  duration_sec 0, duration_nsec 0, priority 54312, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000a, packet_count 0, byte_count 0
+	  action type ENQUEUE, len 16, port 1, queue_id 2
+IP (tos 0x0, ttl 64, id 793, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0x7f28), seq 2237, ack 6945, win 203, options [nop,nop,TS val 220958721 ecr 194889063], length 0
+IP (tos 0x0, ttl 64, id 55528, offset 0, flags [DF], proto TCP (6), length 88)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x7cfd (correct), seq 6945:6981, ack 2237, win 364, options [nop,nop,TS val 194889063 ecr 220958713], length 36: OpenFlow
+	version 1.0, type STATS_REPLY, length 36, xid 0x0000001e
+	 type AGGREGATE, flags 0x0000
+	 packet_count 0, byte_count 0, flow_count 17
+IP (tos 0x0, ttl 64, id 55529, offset 0, flags [DF], proto TCP (6), length 128)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0xeac4 (correct), seq 6981:7057, ack 2237, win 364, options [nop,nop,TS val 194889063 ecr 220958713], length 76: OpenFlow
+	version 1.0, type STATS_REPLY, length 76, xid 0x0000001f
+	 type TABLE, flags 0x0000
+	 table_id 0, name 'classifier'
+	 wildcards 0x003fffff (IN_PORT, DL_VLAN, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	 max_entries 1000000, active_count 26, lookup_count 1158498983736653433, matched_count 1158498983736653433
+IP (tos 0x0, ttl 64, id 794, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0x7eb8), seq 2237, ack 7057, win 203, options [nop,nop,TS val 220958721 ecr 194889063], length 0
+IP (tos 0x0, ttl 64, id 55530, offset 0, flags [DF], proto TCP (6), length 2948)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [.], cksum 0x1fbc (incorrect -> 0x5886), seq 7057:9953, ack 2237, win 364, options [nop,nop,TS val 194889063 ecr 220958721], length 2896: OpenFlow
+	version 1.0, type STATS_REPLY, length 5524, xid 0x00000020
+	 type PORT, flags 0x0000
+	  port_no 42, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 33, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 36, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 31, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 48, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 40, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 1, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 28, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 20, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 10, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 22, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 29, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 44, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 41, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 21, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 16, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 45, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 49, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 38, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 17, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 27, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 51, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 46, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 6, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 50, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 43, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 35, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0, rx_frame_err 0, rx_over_err 0, rx_crc_err 0, collisions 0
+	  port_no 19, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 0, tx_errors 0 [|openflow]
+IP (tos 0x0, ttl 64, id 795, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0x733a), seq 2237, ack 9953, win 248, options [nop,nop,TS val 220958722 ecr 194889063], length 0
+IP (tos 0x0, ttl 64, id 55532, offset 0, flags [DF], proto TCP (6), length 2680)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x1eb0 (incorrect -> 0x561b), seq 9953:12581, ack 2237, win 364, options [nop,nop,TS val 194889063 ecr 220958721], length 2628: OpenFlow
+	version unknown (0x00), type 0x00, length 0, xid 0x00000000 (corrupt)
+IP (tos 0x0, ttl 64, id 796, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0x68cd), seq 2237, ack 12581, win 289, options [nop,nop,TS val 220958722 ecr 194889063], length 0
+IP (tos 0x0, ttl 64, id 55534, offset 0, flags [DF], proto TCP (6), length 64)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0x672c (correct), seq 12581:12593, ack 2237, win 364, options [nop,nop,TS val 194889063 ecr 220958721], length 12: OpenFlow
+	version 1.0, type STATS_REPLY, length 12, xid 0x00000021
+	 type QUEUE, flags 0x0000
+IP (tos 0x0, ttl 64, id 55535, offset 0, flags [DF], proto TCP (6), length 128)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [P.], cksum 0xda41 (correct), seq 12593:12669, ack 2237, win 364, options [nop,nop,TS val 194889063 ecr 220958721], length 76: OpenFlow
+	version 1.0, type ERROR, length 76, xid 0x00000022
+	 type BAD_REQUEST, code BAD_VENDOR
+	 data (64 octets)
+	  0x0000:  0110 0090 0000 0022 ffff 0000 0000 1234  .......".......4
+	  0x0010:  afaf afaf afaf afaf afaf afaf afaf afaf  ................
+	  0x0020:  afaf afaf afaf afaf afaf afaf afaf afaf  ................
+	  0x0030:  afaf afaf afaf afaf afaf afaf afaf afaf  ................
+IP (tos 0x0, ttl 64, id 797, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x146c (incorrect -> 0x6875), seq 2237, ack 12669, win 289, options [nop,nop,TS val 220958722 ecr 194889063], length 0
+IP (tos 0x0, ttl 64, id 798, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [F.], cksum 0x146c (incorrect -> 0x5a63), seq 2237, ack 12669, win 289, options [nop,nop,TS val 220962323 ecr 194889063], length 0
+IP (tos 0x0, ttl 64, id 55536, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [.], cksum 0x568a (correct), seq 12669, ack 2238, win 364, options [nop,nop,TS val 194889973 ecr 220962323], length 0
+IP (tos 0x0, ttl 64, id 55537, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.50.35256 > 10.0.0.20.6633: Flags [F.], cksum 0x5664 (correct), seq 12669, ack 2238, win 364, options [nop,nop,TS val 194890010 ecr 220962323], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.50.35256: Flags [.], cksum 0x55f5 (correct), seq 2238, ack 12670, win 289, options [nop,nop,TS val 220962509 ecr 194890010], length 0
diff --git a/tests/of10_p3295.pcap b/tests/of10_p3295.pcap
new file mode 100644
index 0000000..85f1b27
--- /dev/null
+++ b/tests/of10_p3295.pcap
Binary files differ
diff --git a/tests/of10_pf5240-vv.out b/tests/of10_pf5240-vv.out
new file mode 100644
index 0000000..a7685e9
--- /dev/null
+++ b/tests/of10_pf5240-vv.out
@@ -0,0 +1,428 @@
+IP (tos 0xa0, ttl 64, id 10670, offset 0, flags [DF], proto TCP (6), length 60)
+    172.16.1.101.62224 > 172.16.1.51.6633: Flags [S], cksum 0x6dd0 (correct), seq 2446711727, win 2048, options [mss 1460,nop,wscale 0,nop,nop,TS val 0 ecr 0], length 0
+IP (tos 0xa0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 40)
+    172.16.1.51.6633 > 172.16.1.101.62224: Flags [R.], cksum 0xda97 (correct), seq 0, ack 2446711728, win 0, length 0
+IP (tos 0xa0, ttl 64, id 10673, offset 0, flags [DF], proto TCP (6), length 60)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [S], cksum 0xa14c (correct), seq 2619186670, win 2048, options [mss 1460,nop,wscale 0,nop,nop,TS val 0 ecr 0], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [S.], cksum 0x5ae7 (incorrect -> 0x3c7c), seq 3998019188, ack 2619186671, win 14480, options [mss 1460,nop,nop,TS val 2256457959 ecr 0,nop,wscale 7], length 0
+IP (tos 0xa0, ttl 64, id 10674, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [.], cksum 0x956f (correct), seq 1, ack 1, win 2920, options [nop,nop,TS val 0 ecr 2256457959], length 0
+IP (tos 0xa0, ttl 64, id 10675, offset 0, flags [DF], proto TCP (6), length 60)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [P.], cksum 0xb6f9 (correct), seq 1:9, ack 1, win 2920, options [nop,nop,TS val 0 ecr 2256457959], length 8: OpenFlow
+	version 1.0, type HELLO, length 8, xid 0x000cdd51
+IP (tos 0x0, ttl 64, id 16028, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [.], cksum 0x5adf (incorrect -> 0xa05b), seq 1, ack 9, win 114, options [nop,nop,TS val 2256457961 ecr 0], length 0
+IP (tos 0x0, ttl 64, id 16029, offset 0, flags [DF], proto TCP (6), length 60)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [P.], cksum 0x5ae7 (incorrect -> 0x9f29), seq 1:9, ack 9, win 114, options [nop,nop,TS val 2256457986 ecr 0], length 8: OpenFlow
+	version 1.0, type HELLO, length 8, xid 0x00000001
+IP (tos 0x0, ttl 64, id 16030, offset 0, flags [DF], proto TCP (6), length 60)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [P.], cksum 0x5ae7 (incorrect -> 0x9f13), seq 9:17, ack 9, win 114, options [nop,nop,TS val 2256457994 ecr 0], length 8: OpenFlow
+	version 1.0, type FEATURES_REQUEST, length 8, xid 0x00000002
+IP (tos 0xa0, ttl 64, id 10676, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [.], cksum 0x9544 (correct), seq 9, ack 17, win 2912, options [nop,nop,TS val 0 ecr 2256457986], length 0
+IP (tos 0xa0, ttl 64, id 10679, offset 0, flags [DF], proto TCP (6), length 468)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [P.], cksum 0xcacf (correct), seq 9:425, ack 17, win 2920, options [nop,nop,TS val 0 ecr 2256457986], length 416: OpenFlow
+	version 1.0, type FEATURES_REPLY, length 416, xid 0x00000002
+	 dpid 0x000100255cab0c07, n_buffers 544, n_tables 11
+	 capabilities 0x00000087 (FLOW_STATS, TABLE_STATS, PORT_STATS, ARP_MATCH_IP)
+	 actions 0x00000fff (OUTPUT, SET_VLAN_VID, SET_VLAN_PCP, STRIP_VLAN, SET_DL_SRC, SET_DL_DST, SET_NW_SRC, SET_NW_DST, SET_NW_TOS, SET_TP_SRC, SET_TP_DST, ENQUEUE)
+	  port_no 1, hw_addr 00:25:5c:ab:0c:87, name 'GBE0/1'
+	   config 0x00000002 (NO_STP)
+	   state 0x00000200 (STP_FORWARD, STP_BLOCK)
+	   curr 0x000002a0 (1GB_FD, COPPER, AUTONEG)
+	   advertised 0x00000000
+	   supported 0x00000000
+	   peer 0x00000000
+	  port_no 2, hw_addr 00:25:5c:ab:0c:47, name 'GBE0/2'
+	   config 0x00000002 (NO_STP)
+	   state 0x00000200 (STP_FORWARD, STP_BLOCK)
+	   curr 0x000002a0 (1GB_FD, COPPER, AUTONEG)
+	   advertised 0x00000000
+	   supported 0x00000000
+	   peer 0x00000000
+	  port_no 3, hw_addr 00:25:5c:ab:0c:c7, name 'GBE0/3'
+	   config 0x00000002 (NO_STP)
+	   state 0x00000200 (STP_FORWARD, STP_BLOCK)
+	   curr 0x000002a0 (1GB_FD, COPPER, AUTONEG)
+	   advertised 0x00000000
+	   supported 0x00000000
+	   peer 0x00000000
+	  port_no 4, hw_addr 00:25:5c:ab:0c:27, name 'GBE0/4'
+	   config 0x00000002 (NO_STP)
+	   state 0x00000201 (LINK_DOWN, STP_FORWARD, STP_BLOCK)
+	   curr 0x00000000
+	   advertised 0x00000000
+	   supported 0x00000000
+	   peer 0x00000000
+	  port_no 5, hw_addr 00:25:5c:ab:0c:a7, name 'GBE0/5'
+	   config 0x00000002 (NO_STP)
+	   state 0x00000201 (LINK_DOWN, STP_FORWARD, STP_BLOCK)
+	   curr 0x00000000
+	   advertised 0x00000000
+	   supported 0x00000000
+	   peer 0x00000000
+	  port_no 6, hw_addr 00:25:5c:ab:0c:67, name 'GBE0/6'
+	   config 0x00000002 (NO_STP)
+	   state 0x00000201 (LINK_DOWN, STP_FORWARD, STP_BLOCK)
+	   curr 0x00000000
+	   advertised 0x00000000
+	   supported 0x00000000
+	   peer 0x00000000
+	  port_no 7, hw_addr 00:25:5c:ab:0c:e7, name 'GBE0/7'
+	   config 0x00000002 (NO_STP)
+	   state 0x00000201 (LINK_DOWN, STP_FORWARD, STP_BLOCK)
+	   curr 0x00000000
+	   advertised 0x00000000
+	   supported 0x00000000
+	   peer 0x00000000
+	  port_no 8, hw_addr 00:25:5c:ab:0c:17, name 'GBE0/8'
+	   config 0x00000002 (NO_STP)
+	   state 0x00000201 (LINK_DOWN, STP_FORWARD, STP_BLOCK)
+	   curr 0x00000000
+	   advertised 0x00000000
+	   supported 0x00000000
+	   peer 0x00000000
+IP (tos 0x0, ttl 64, id 16031, offset 0, flags [DF], proto TCP (6), length 136)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [P.], cksum 0x5b33 (incorrect -> 0x9b62), seq 17:101, ack 425, win 122, options [nop,nop,TS val 2256458010 ecr 0], length 84: OpenFlow
+	version 1.0, type SET_CONFIG, length 12, xid 0x00000003
+	 flags FRAG_NORMAL, miss_send_len 65535
+	version 1.0, type FLOW_MOD, length 72, xid 0x00000004
+	 cookie 0x0000000000000000, command DELETE, out_port NONE, flags 0x0000
+IP (tos 0x0, ttl 64, id 16032, offset 0, flags [DF], proto TCP (6), length 60)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [P.], cksum 0x5ae7 (incorrect -> 0x9ceb), seq 101:109, ack 425, win 122, options [nop,nop,TS val 2256458014 ecr 0], length 8: OpenFlow
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x00000005
+IP (tos 0xa0, ttl 64, id 10680, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [.], cksum 0x932f (correct), seq 425, ack 109, win 2912, options [nop,nop,TS val 1 ecr 2256458010], length 0
+IP (tos 0xa0, ttl 64, id 10681, offset 0, flags [DF], proto TCP (6), length 60)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [P.], cksum 0x91f7 (correct), seq 425:433, ack 109, win 2920, options [nop,nop,TS val 1 ecr 2256458010], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x00000005
+IP (tos 0x0, ttl 64, id 16033, offset 0, flags [DF], proto TCP (6), length 72)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [P.], cksum 0x5af3 (incorrect -> 0x9ba7), seq 109:129, ack 433, win 122, options [nop,nop,TS val 2256458017 ecr 1], length 20: OpenFlow
+	version 1.0, type STATS_REQUEST, length 12, xid 0x00000006
+	 type DESC, flags 0x0000
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x00000007
+IP (tos 0xa0, ttl 64, id 10682, offset 0, flags [DF], proto TCP (6), length 1120)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [P.], cksum 0x7324 (correct), seq 433:1501, ack 129, win 2912, options [nop,nop,TS val 1 ecr 2256458017], length 1068: OpenFlow
+	version 1.0, type STATS_REPLY, length 1068, xid 0x00000006
+	 type DESC, flags 0x0000
+	  mfr_desc 'NEC Corporation'
+	  hw_desc 'PF5240F-48T4XW-AX(L1L2)'
+	  sw_desc 'OS-F3PA Ver. V4.0.1.0'
+	  serial_num 'Y1252CFA0000S4068C8N004'
+	  dp_desc 'PFS1'
+IP (tos 0x0, ttl 64, id 16034, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [.], cksum 0x5adf (incorrect -> 0x998b), seq 129, ack 1501, win 139, options [nop,nop,TS val 2256458059 ecr 1], length 0
+IP (tos 0xa0, ttl 64, id 10686, offset 0, flags [DF], proto TCP (6), length 60)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [P.], cksum 0x8da6 (correct), seq 1501:1509, ack 129, win 2920, options [nop,nop,TS val 1 ecr 2256458017], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x00000007
+IP (tos 0x0, ttl 64, id 16035, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [.], cksum 0x5adf (incorrect -> 0x9982), seq 129, ack 1509, win 139, options [nop,nop,TS val 2256458060 ecr 1], length 0
+IP (tos 0x0, ttl 64, id 16036, offset 0, flags [DF], proto TCP (6), length 84)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [P.], cksum 0x5aff (incorrect -> 0x95e2), seq 129:161, ack 1509, win 139, options [nop,nop,TS val 2256458060 ecr 1], length 32: OpenFlow
+	version 1.0, type QUEUE_GET_CONFIG_REQUEST, length 12, xid 0x00000008
+	 port_no 1
+	version 1.0, type QUEUE_GET_CONFIG_REQUEST, length 12, xid 0x00000009
+	 port_no 2
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x0000000a
+IP (tos 0xa0, ttl 64, id 10687, offset 0, flags [DF], proto TCP (6), length 196)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [P.], cksum 0x8b77 (correct), seq 1509:1653, ack 161, win 2900, options [nop,nop,TS val 1 ecr 2256458060], length 144: OpenFlow
+	version 1.0, type QUEUE_GET_CONFIG_REPLY, length 144, xid 0x00000008
+	 port_no 1
+	  queue_id 0, len 16
+	   property NONE, len 8
+	  queue_id 1, len 16
+	   property NONE, len 8
+	  queue_id 2, len 16
+	   property NONE, len 8
+	  queue_id 3, len 16
+	   property NONE, len 8
+	  queue_id 4, len 16
+	   property NONE, len 8
+	  queue_id 5, len 16
+	   property NONE, len 8
+	  queue_id 6, len 16
+	   property NONE, len 8
+	  queue_id 7, len 16
+	   property NONE, len 8
+IP (tos 0x0, ttl 64, id 16037, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [.], cksum 0x5adf (incorrect -> 0x9899), seq 161, ack 1653, win 155, options [nop,nop,TS val 2256458101 ecr 1], length 0
+IP (tos 0xa0, ttl 64, id 10688, offset 0, flags [DF], proto TCP (6), length 204)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [P.], cksum 0x89a4 (correct), seq 1653:1805, ack 161, win 2920, options [nop,nop,TS val 1 ecr 2256458060], length 152: OpenFlow
+	version 1.0, type QUEUE_GET_CONFIG_REPLY, length 144, xid 0x00000009
+	 port_no 2
+	  queue_id 0, len 16
+	   property NONE, len 8
+	  queue_id 1, len 16
+	   property NONE, len 8
+	  queue_id 2, len 16
+	   property NONE, len 8
+	  queue_id 3, len 16
+	   property NONE, len 8
+	  queue_id 4, len 16
+	   property NONE, len 8
+	  queue_id 5, len 16
+	   property NONE, len 8
+	  queue_id 6, len 16
+	   property NONE, len 8
+	  queue_id 7, len 16
+	   property NONE, len 8
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x0000000a
+IP (tos 0x0, ttl 64, id 16038, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [.], cksum 0x5adf (incorrect -> 0x97ef), seq 161, ack 1805, win 172, options [nop,nop,TS val 2256458102 ecr 1], length 0
+IP (tos 0x0, ttl 64, id 16039, offset 0, flags [DF], proto TCP (6), length 100)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [P.], cksum 0x5b0f (incorrect -> 0x9424), seq 161:209, ack 1805, win 172, options [nop,nop,TS val 2256458102 ecr 1], length 48: OpenFlow
+	version 1.0, type STATS_REQUEST, length 20, xid 0x0000000b
+	 type QUEUE, flags 0x0000
+	 port_no 1, queue_id ALL
+	version 1.0, type STATS_REQUEST, length 20, xid 0x0000000c
+	 type QUEUE, flags 0x0000
+	 port_no 2, queue_id ALL
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x0000000d
+IP (tos 0xa0, ttl 64, id 10689, offset 0, flags [DF], proto TCP (6), length 96)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [P.], cksum 0x8b9c (correct), seq 1805:1849, ack 209, win 2892, options [nop,nop,TS val 1 ecr 2256458102], length 44: OpenFlow
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000b
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 1, queue_id 0, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+IP (tos 0x0, ttl 64, id 16040, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [.], cksum 0x5adf (incorrect -> 0x9769), seq 209, ack 1849, win 172, options [nop,nop,TS val 2256458144 ecr 1], length 0
+IP (tos 0xa0, ttl 64, id 10690, offset 0, flags [DF], proto TCP (6), length 744)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [P.], cksum 0x72af (correct), seq 1849:2541, ack 209, win 2920, options [nop,nop,TS val 1 ecr 2256458102], length 692: OpenFlow
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000b
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 1, queue_id 1, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000b
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 1, queue_id 2, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000b
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 1, queue_id 3, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000b
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 1, queue_id 4, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000b
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 1, queue_id 5, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000b
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 1, queue_id 6, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000b
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 1, queue_id 7, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 12, xid 0x0000000b
+	 type QUEUE, flags 0x0000
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000c
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 2, queue_id 0, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000c
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 2, queue_id 1, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000c
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 2, queue_id 2, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000c
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 2, queue_id 3, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000c
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 2, queue_id 4, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000c
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 2, queue_id 5, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000c
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 2, queue_id 6, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 44, xid 0x0000000c
+	 type QUEUE, flags 0x0001 (MORE)
+	  port_no 2, queue_id 7, tx_bytes 18446744073709551615, tx_packets 18446744073709551615, tx_errors 18446744073709551615
+	version 1.0, type STATS_REPLY, length 12, xid 0x0000000c
+	 type QUEUE, flags 0x0000
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x0000000d
+IP (tos 0x0, ttl 64, id 16041, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [.], cksum 0x5adf (incorrect -> 0x94a3), seq 209, ack 2541, win 189, options [nop,nop,TS val 2256458145 ecr 1], length 0
+IP (tos 0x0, ttl 64, id 16042, offset 0, flags [DF], proto TCP (6), length 700)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [P.], cksum 0x5d67 (incorrect -> 0xa5e9), seq 209:857, ack 2541, win 189, options [nop,nop,TS val 2256458147 ecr 1], length 648: OpenFlow
+	version 1.0, type FLOW_MOD, length 80, xid 0x0000000e
+	 match in_port 1
+	 cookie 0x0000000000000001, command ADD, priority 24100, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 4
+	version 1.0, type FLOW_MOD, length 80, xid 0x0000000f
+	 match in_port 2
+	 cookie 0x0000000000000002, command ADD, priority 24200, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 4
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000010
+	 match in_port 3
+	 cookie 0x0000000000000003, command ADD, priority 24300, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 4
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000011
+	 match in_port 5
+	 cookie 0x0000000000000004, command ADD, priority 20500, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 8
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000012
+	 match in_port 6
+	 cookie 0x0000000000000005, command ADD, priority 20600, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 8
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000013
+	 match in_port 7
+	 cookie 0x0000000000000006, command ADD, priority 20700, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 8
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000014
+	 match in_port 4
+	 cookie 0x0000000000000007, command ADD, priority 25400, buffer_id NONE, flags 0x0005 (SEND_FLOW_REM, EMERG)
+	 action type OUTPUT, len 8, port 8
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000015
+	 match in_port 8
+	 cookie 0x0000000000000008, command ADD, priority 25800, buffer_id NONE, flags 0x0005 (SEND_FLOW_REM, EMERG)
+	 action type OUTPUT, len 8, port 4
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x00000016
+IP (tos 0xa0, ttl 64, id 10691, offset 0, flags [DF], proto TCP (6), length 60)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [P.], cksum 0x862d (correct), seq 2541:2549, ack 857, win 2920, options [nop,nop,TS val 1 ecr 2256458147], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x00000016
+IP (tos 0x0, ttl 64, id 16043, offset 0, flags [DF], proto TCP (6), length 116)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [P.], cksum 0x5b1f (incorrect -> 0x6ef4), seq 857:921, ack 2549, win 189, options [nop,nop,TS val 2256458158 ecr 1], length 64: OpenFlow
+	version 1.0, type STATS_REQUEST, length 56, xid 0x00000017
+	 type FLOW, flags 0x0000
+	 table_id ALL, out_port NONE
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x00000018
+IP (tos 0xa0, ttl 64, id 10692, offset 0, flags [DF], proto TCP (6), length 160)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [P.], cksum 0x0485 (correct), seq 2549:2657, ack 921, win 2912, options [nop,nop,TS val 1 ecr 2256458158], length 108: OpenFlow
+	version 1.0, type STATS_REPLY, length 108, xid 0x00000017
+	 type FLOW, flags 0x0001 (MORE)
+	 length 96, table_id 0
+	  match in_port 3
+	  duration_sec 0, duration_nsec 0, priority 24300, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000003, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 4
+IP (tos 0x0, ttl 64, id 16044, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [.], cksum 0x5adf (incorrect -> 0x9131), seq 921, ack 2657, win 189, options [nop,nop,TS val 2256458199 ecr 1], length 0
+IP (tos 0xa0, ttl 64, id 10693, offset 0, flags [DF], proto TCP (6), length 828)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [P.], cksum 0x1544 (correct), seq 2657:3433, ack 921, win 2920, options [nop,nop,TS val 1 ecr 2256458158], length 776: OpenFlow
+	version 1.0, type STATS_REPLY, length 108, xid 0x00000017
+	 type FLOW, flags 0x0001 (MORE)
+	 length 96, table_id 0
+	  match in_port 2
+	  duration_sec 0, duration_nsec 0, priority 24200, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000002, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 4
+	version 1.0, type STATS_REPLY, length 108, xid 0x00000017
+	 type FLOW, flags 0x0001 (MORE)
+	 length 96, table_id 0
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 24100, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000001, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 4
+	version 1.0, type STATS_REPLY, length 108, xid 0x00000017
+	 type FLOW, flags 0x0001 (MORE)
+	 length 96, table_id 1
+	  match in_port 7
+	  duration_sec 0, duration_nsec 0, priority 20700, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000006, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 8
+	version 1.0, type STATS_REPLY, length 108, xid 0x00000017
+	 type FLOW, flags 0x0001 (MORE)
+	 length 96, table_id 1
+	  match in_port 6
+	  duration_sec 0, duration_nsec 0, priority 20600, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000005, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 8
+	version 1.0, type STATS_REPLY, length 108, xid 0x00000017
+	 type FLOW, flags 0x0001 (MORE)
+	 length 96, table_id 1
+	  match in_port 5
+	  duration_sec 0, duration_nsec 0, priority 20500, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000004, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 8
+	version 1.0, type STATS_REPLY, length 108, xid 0x00000017
+	 type FLOW, flags 0x0001 (MORE)
+	 length 96, table_id EMERG
+	  match in_port 8
+	  duration_sec 0, duration_nsec 0, priority 25800, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000008, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 4
+	version 1.0, type STATS_REPLY, length 108, xid 0x00000017
+	 type FLOW, flags 0x0001 (MORE)
+	 length 96, table_id EMERG
+	  match in_port 4
+	  duration_sec 0, duration_nsec 0, priority 25400, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000007, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 8
+	version 1.0, type STATS_REPLY, length 12, xid 0x00000017
+	 type FLOW, flags 0x0000
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x00000018
+IP (tos 0x0, ttl 64, id 16045, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [.], cksum 0x5adf (incorrect -> 0x8e18), seq 921, ack 3433, win 205, options [nop,nop,TS val 2256458200 ecr 1], length 0
+IP (tos 0x0, ttl 64, id 16046, offset 0, flags [DF], proto TCP (6), length 72)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [P.], cksum 0x5af3 (incorrect -> 0x8b90), seq 921:941, ack 3433, win 205, options [nop,nop,TS val 2256458200 ecr 1], length 20: OpenFlow
+	version 1.0, type STATS_REQUEST, length 12, xid 0x00000019
+	 type TABLE, flags 0x0000
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x0000001a
+IP (tos 0xa0, ttl 64, id 10694, offset 0, flags [DF], proto TCP (6), length 128)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [P.], cksum 0xe84a (correct), seq 3433:3509, ack 941, win 2912, options [nop,nop,TS val 1 ecr 2256458200], length 76: OpenFlow
+	version 1.0, type STATS_REPLY, length 76, xid 0x00000019
+	 type TABLE, flags 0x0001 (MORE)
+	 table_id 0, name 'Normal 1 Flow Table'
+	  wildcards 0x003820ff (IN_PORT, DL_VLAN, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 5632, active_count 3, lookup_count 18446744073709551615, matched_count 18446744073709551615
+IP (tos 0x0, ttl 64, id 16047, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [.], cksum 0x5adf (incorrect -> 0x8d8f), seq 941, ack 3509, win 205, options [nop,nop,TS val 2256458241 ecr 1], length 0
+IP (tos 0xa0, ttl 64, id 10695, offset 0, flags [DF], proto TCP (6), length 832)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [P.], cksum 0x198c (correct), seq 3509:4289, ack 941, win 2920, options [nop,nop,TS val 1 ecr 2256458200], length 780: OpenFlow
+	version 1.0, type STATS_REPLY, length 76, xid 0x00000019
+	 type TABLE, flags 0x0001 (MORE)
+	 table_id 1, name 'Expanded Flow Table'
+	  wildcards 0x003820ff (IN_PORT, DL_VLAN, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 163840, active_count 3, lookup_count 18446744073709551615, matched_count 18446744073709551615
+	version 1.0, type STATS_REPLY, length 76, xid 0x00000019
+	 type TABLE, flags 0x0001 (MORE)
+	 table_id 20, name 'Normal 2 Flow Table'
+	  wildcards 0x003820ff (IN_PORT, DL_VLAN, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 512, active_count 0, lookup_count 18446744073709551615, matched_count 18446744073709551615
+	version 1.0, type STATS_REPLY, length 76, xid 0x00000019
+	 type TABLE, flags 0x0001 (MORE)
+	 table_id 50, name 'Mpls 1 Flow Table'
+	  wildcards 0x003820ef (IN_PORT, DL_VLAN, DL_SRC, DL_DST, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 512, active_count 0, lookup_count 18446744073709551615, matched_count 18446744073709551615
+	version 1.0, type STATS_REPLY, length 76, xid 0x00000019
+	 type TABLE, flags 0x0001 (MORE)
+	 table_id 51, name 'Mpls 2 Flow Table'
+	  wildcards 0x003820ef (IN_PORT, DL_VLAN, DL_SRC, DL_DST, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 16384, active_count 0, lookup_count 18446744073709551615, matched_count 18446744073709551615
+	version 1.0, type STATS_REPLY, length 76, xid 0x00000019
+	 type TABLE, flags 0x0001 (MORE)
+	 table_id 99, name 'Software Flow Table'
+	  wildcards 0x003820ff (IN_PORT, DL_VLAN, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 2048, active_count 0, lookup_count 18446744073709551615, matched_count 18446744073709551615
+	version 1.0, type STATS_REPLY, length 76, xid 0x00000019
+	 type TABLE, flags 0x0001 (MORE)
+	 table_id 100, name 'V-Normal 1 Flow Table'
+	  wildcards 0x003820ff (IN_PORT, DL_VLAN, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 0, active_count 0, lookup_count 18446744073709551615, matched_count 18446744073709551615
+	version 1.0, type STATS_REPLY, length 76, xid 0x00000019
+	 type TABLE, flags 0x0001 (MORE)
+	 table_id 101, name 'V-Expanded Flow Table'
+	  wildcards 0x003820ff (IN_PORT, DL_VLAN, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 0, active_count 0, lookup_count 18446744073709551615, matched_count 18446744073709551615
+	version 1.0, type STATS_REPLY, length 76, xid 0x00000019
+	 type TABLE, flags 0x0001 (MORE)
+	 table_id 120, name 'V-Normal 2 Flow Table'
+	  wildcards 0x003820ff (IN_PORT, DL_VLAN, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 0, active_count 0, lookup_count 18446744073709551615, matched_count 18446744073709551615
+	version 1.0, type STATS_REPLY, length 76, xid 0x00000019
+	 type TABLE, flags 0x0001 (MORE)
+	 table_id 140, name 'Q-Normal 1 Flow Table'
+	  wildcards 0x003820ff (IN_PORT, DL_VLAN, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 0, active_count 0, lookup_count 18446744073709551615, matched_count 18446744073709551615
+	version 1.0, type STATS_REPLY, length 76, xid 0x00000019
+	 type TABLE, flags 0x0001 (MORE)
+	 table_id EMERG, name 'Emergency Flow Cache'
+	  wildcards 0x003820ff (IN_PORT, DL_VLAN, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 5632, active_count 2, lookup_count 18446744073709551615, matched_count 18446744073709551615
+	version 1.0, type STATS_REPLY, length 12, xid 0x00000019
+	 type TABLE, flags 0x0000
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x0000001a
+IP (tos 0x0, ttl 64, id 16048, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [.], cksum 0x5adf (incorrect -> 0x8a72), seq 941, ack 4289, win 222, options [nop,nop,TS val 2256458241 ecr 1], length 0
+IP (tos 0x0, ttl 64, id 16049, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [F.], cksum 0x5adf (incorrect -> 0x895d), seq 941, ack 4289, win 222, options [nop,nop,TS val 2256458517 ecr 1], length 0
+IP (tos 0xa0, ttl 64, id 10696, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [.], cksum 0x7ed2 (correct), seq 4289, ack 942, win 2920, options [nop,nop,TS val 2 ecr 2256458517], length 0
+IP (tos 0xa0, ttl 64, id 10697, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.101.62221 > 172.16.1.51.6633: Flags [F.], cksum 0x7ed1 (correct), seq 4289, ack 942, win 2920, options [nop,nop,TS val 2 ecr 2256458517], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    172.16.1.51.6633 > 172.16.1.101.62221: Flags [.], cksum 0x8958 (correct), seq 942, ack 4290, win 222, options [nop,nop,TS val 2256458520 ecr 2], length 0
+IP (tos 0xa0, ttl 64, id 10710, offset 0, flags [DF], proto TCP (6), length 60)
+    172.16.1.101.62216 > 172.16.1.51.6633: Flags [S], cksum 0xf0a4 (correct), seq 2928426028, win 2048, options [mss 1460,nop,wscale 0,nop,nop,TS val 0 ecr 0], length 0
+IP (tos 0xa0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 40)
+    172.16.1.51.6633 > 172.16.1.101.62216: Flags [R.], cksum 0x5d6c (correct), seq 0, ack 2928426029, win 0, length 0
diff --git a/tests/of10_pf5240.pcap b/tests/of10_pf5240.pcap
new file mode 100644
index 0000000..9f5aed2
--- /dev/null
+++ b/tests/of10_pf5240.pcap
Binary files differ
diff --git a/tests/of10_s4810-vvvv.out b/tests/of10_s4810-vvvv.out
new file mode 100644
index 0000000..dabc2f2
--- /dev/null
+++ b/tests/of10_s4810-vvvv.out
@@ -0,0 +1,1333 @@
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 64)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [S], cksum 0xa75a (correct), seq 469952923, win 32768, options [mss 1380,nop,wscale 5,sackOK,nop,nop,nop,nop,TS val 1 ecr 0], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [S.], cksum 0x1493 (incorrect -> 0xa59a), seq 1198728146, ack 469952924, win 14480, options [mss 1460,sackOK,TS val 47836340 ecr 1,nop,wscale 7], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [.], cksum 0x08ec (correct), seq 1, ack 1, win 1035, options [nop,nop,TS val 1 ecr 47836340], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x293c (correct), seq 1:9, ack 1, win 1035, options [nop,nop,TS val 1 ecr 47836340], length 8: OpenFlow
+	version 1.0, type HELLO, length 8, xid 0xf1c0ecd6
+IP (tos 0x0, ttl 64, id 53094, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0x0c7c), seq 1, ack 9, win 114, options [nop,nop,TS val 47836341 ecr 1], length 0
+IP (tos 0x0, ttl 64, id 53095, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [P.], cksum 0x1493 (incorrect -> 0x0b5d), seq 1:9, ack 9, win 114, options [nop,nop,TS val 47836347 ecr 1], length 8: OpenFlow
+	version 1.0, type HELLO, length 8, xid 0x00000001
+IP (tos 0x0, ttl 64, id 53096, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [P.], cksum 0x1493 (incorrect -> 0x0b4e), seq 9:17, ack 9, win 114, options [nop,nop,TS val 47836348 ecr 1], length 8: OpenFlow
+	version 1.0, type FEATURES_REQUEST, length 8, xid 0x00000002
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [.], cksum 0x08ce (correct), seq 9, ack 17, win 1034, options [nop,nop,TS val 1 ecr 47836347], length 0
+IP (tos 0x0, ttl 64, id 53469, offset 0, flags [DF], proto TCP (6), length 180)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x48dc (correct), seq 9:137, ack 17, win 1035, options [nop,nop,TS val 1 ecr 47836347], length 128: OpenFlow
+	version 1.0, type FEATURES_REPLY, length 128, xid 0x00000002
+	 dpid 0x00010001e88ae0e2, n_buffers 0, n_tables 6
+	 capabilities 0x00000007 (FLOW_STATS, TABLE_STATS, PORT_STATS)
+	 actions 0x00000137 (OUTPUT, SET_VLAN_VID, SET_VLAN_PCP, SET_DL_SRC, SET_DL_DST, SET_NW_TOS)
+	  port_no 1, hw_addr 00:01:e8:8a:e0:e4, name 'Te 0/0'
+	   config 0x00000000
+	   state 0x00000000
+	   curr 0x00000340 (10GB_FD, FIBER, AUTONEG)
+	   advertised 0x00000340 (10GB_FD, FIBER, AUTONEG)
+	   supported 0x00000340 (10GB_FD, FIBER, AUTONEG)
+	   peer 0x00000000
+	  port_no 2, hw_addr 00:01:e8:8a:e0:e4, name 'Te 0/1'
+	   config 0x00000001 (PORT_DOWN)
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000300 (FIBER, AUTONEG)
+	   advertised 0x00000300 (FIBER, AUTONEG)
+	   supported 0x00000300 (FIBER, AUTONEG)
+	   peer 0x00000000
+IP (tos 0x0, ttl 64, id 53097, offset 0, flags [DF], proto TCP (6), length 136)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [P.], cksum 0x14df (incorrect -> 0x08c9), seq 17:101, ack 137, win 122, options [nop,nop,TS val 47836352 ecr 1], length 84: OpenFlow
+	version 1.0, type SET_CONFIG, length 12, xid 0x00000003
+	 flags FRAG_NORMAL, miss_send_len 65535
+	version 1.0, type FLOW_MOD, length 72, xid 0x00000004
+	 cookie 0x0000000000000000, command DELETE, out_port NONE, flags 0x0000
+IP (tos 0x0, ttl 64, id 53098, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [P.], cksum 0x1493 (incorrect -> 0x0a54), seq 101:109, ack 137, win 122, options [nop,nop,TS val 47836354 ecr 1], length 8: OpenFlow
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x00000005
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [.], cksum 0x07ed (correct), seq 137, ack 109, win 1034, options [nop,nop,TS val 1 ecr 47836352], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x06bc (correct), seq 137:145, ack 109, win 1035, options [nop,nop,TS val 1 ecr 47836352], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x00000005
+IP (tos 0x0, ttl 64, id 53099, offset 0, flags [DF], proto TCP (6), length 80)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [P.], cksum 0x14a7 (incorrect -> 0x07f3), seq 109:137, ack 145, win 122, options [nop,nop,TS val 47836355 ecr 1], length 28: OpenFlow
+	version 1.0, type FEATURES_REQUEST, length 8, xid 0x00000006
+	version 1.0, type STATS_REQUEST, length 12, xid 0x00000007
+	 type TABLE, flags 0x0000
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x00000008
+IP (tos 0x0, ttl 64, id 53475, offset 0, flags [DF], proto TCP (6), length 180)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x47d0 (correct), seq 145:273, ack 137, win 1035, options [nop,nop,TS val 1 ecr 47836355], length 128: OpenFlow
+	version 1.0, type FEATURES_REPLY, length 128, xid 0x00000006
+	 dpid 0x00010001e88ae0e2, n_buffers 0, n_tables 6
+	 capabilities 0x00000007 (FLOW_STATS, TABLE_STATS, PORT_STATS)
+	 actions 0x00000137 (OUTPUT, SET_VLAN_VID, SET_VLAN_PCP, SET_DL_SRC, SET_DL_DST, SET_NW_TOS)
+	  port_no 1, hw_addr 00:01:e8:8a:e0:e4, name 'Te 0/0'
+	   config 0x00000000
+	   state 0x00000000
+	   curr 0x00000340 (10GB_FD, FIBER, AUTONEG)
+	   advertised 0x00000340 (10GB_FD, FIBER, AUTONEG)
+	   supported 0x00000340 (10GB_FD, FIBER, AUTONEG)
+	   peer 0x00000000
+	  port_no 2, hw_addr 00:01:e8:8a:e0:e4, name 'Te 0/1'
+	   config 0x00000001 (PORT_DOWN)
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000300 (FIBER, AUTONEG)
+	   advertised 0x00000300 (FIBER, AUTONEG)
+	   supported 0x00000300 (FIBER, AUTONEG)
+	   peer 0x00000000
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x0612 (correct), seq 273:281, ack 137, win 1035, options [nop,nop,TS val 1 ecr 47836355], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x00000008
+IP (tos 0x0, ttl 64, id 53476, offset 0, flags [DF], proto TCP (6), length 448)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x2be8 (correct), seq 281:677, ack 137, win 1035, options [nop,nop,TS val 1 ecr 47836355], length 396: OpenFlow
+	version 1.0, type STATS_REPLY, length 396, xid 0x00000007
+	 type TABLE, flags 0x0000
+	 table_id 0, name 'VLAN Table'
+	  wildcards 0x003ffffd (IN_PORT, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 1024, active_count 0, lookup_count 0, matched_count 0
+	 table_id 0, name 'MAC Table'
+	  wildcards 0x003ffff5 (IN_PORT, DL_SRC, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 49152, active_count 0, lookup_count 0, matched_count 0
+	 table_id 0, name 'Route Table'
+	  wildcards 0x003fffff (IN_PORT, DL_VLAN, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 6144, active_count 0, lookup_count 0, matched_count 0
+	 table_id 0, name 'ACL Table'
+	  wildcards 0x003fffff (IN_PORT, DL_VLAN, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 498, active_count 0, lookup_count 127028, matched_count 0
+	 table_id 0, name 'Learning Switch Table'
+	  wildcards 0x003fffff (IN_PORT, DL_VLAN, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 24576, active_count 0, lookup_count 0, matched_count 0
+	 table_id 0, name 'Egress Port Block Table'
+	  wildcards 0x003fffff (IN_PORT, DL_VLAN, DL_SRC, DL_DST, DL_TYPE, NW_PROTO, TP_SRC, TP_DST, DL_VLAN_PCP, NW_TOS)
+	  max_entries 256, active_count 0, lookup_count 0, matched_count 0
+IP (tos 0x0, ttl 64, id 53100, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0x088c), seq 137, ack 677, win 139, options [nop,nop,TS val 47836520 ecr 1], length 0
+IP (tos 0x0, ttl 64, id 53101, offset 0, flags [DF], proto TCP (6), length 4156)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x2493 (incorrect -> 0xa671), seq 137:4241, ack 677, win 139, options [nop,nop,TS val 47836527 ecr 1], length 4104: OpenFlow
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000009
+	 match in_port 1
+	 cookie 0x0000000000000001, command ADD, priority 35000, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port CONTROLLER, max_len 65535
+	version 1.0, type FLOW_MOD, length 80, xid 0x0000000a
+	 match in_port 1
+	 cookie 0x0000000000000002, command ADD, priority 34999, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_VLAN_VID, len 8, vlan_vid 2
+	version 1.0, type FLOW_MOD, length 80, xid 0x0000000b
+	 match in_port 1
+	 cookie 0x0000000000000003, command ADD, priority 34998, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_VLAN_PCP, len 8, vlan_pcp 5
+	version 1.0, type FLOW_MOD, length 88, xid 0x0000000c
+	 match in_port 1
+	 cookie 0x0000000000000004, command ADD, priority 34997, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_VLAN_VID, len 8, vlan_vid 2
+	 action type SET_VLAN_PCP, len 8, vlan_pcp 5
+	version 1.0, type FLOW_MOD, length 88, xid 0x0000000d
+	 match in_port 1
+	 cookie 0x0000000000000005, command ADD, priority 34996, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 11:22:33:44:55:66
+	version 1.0, type FLOW_MOD, length 88, xid 0x0000000e
+	 match in_port 1
+	 cookie 0x0000000000000006, command ADD, priority 34995, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_DST, len 16, dl_addr 77:88:99:aa:bb:cc
+	version 1.0, type FLOW_MOD, length 104, xid 0x0000000f
+	 match in_port 1
+	 cookie 0x0000000000000007, command ADD, priority 34994, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 11:22:33:44:55:66
+	 action type SET_DL_DST, len 16, dl_addr 77:88:99:aa:bb:cc
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000010
+	 match in_port 1
+	 match dl_src 00:00:00:00:00:01
+	 cookie 0x0000000000000008, command ADD, priority 34000, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000011
+	 match in_port 1
+	 cookie 0x0000000000000009, command ADD, priority 33000, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_NW_TOS, len 8, nw_tos 0x28
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000012
+	 match dl_vlan 100
+	 match dl_vlan_pcp 4
+	 match dl_type 0x0800
+	 cookie 0x000000000000000a, command ADD, priority 32000, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000013
+	 match dl_type 0x0800
+	 match nw_src 10.11.12.0/24
+	 match nw_dst 10.13.14.0/24
+	 cookie 0x000000000000000b, command ADD, priority 31999, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000014
+	 match dl_type 0x0800
+	 match nw_proto 17
+	 match tp_src 68
+	 match tp_dst 67
+	 cookie 0x000000000000000c, command ADD, priority 31998, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000015
+	 match dl_type 0x0800
+	 match nw_proto 1
+	 match icmp_type 8
+	 cookie 0x000000000000000d, command ADD, priority 31997, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000016
+	 match dl_type 0x0800
+	 match nw_proto 1
+	 match icmp_type 3
+	 match icmp_code 13
+	 cookie 0x000000000000000e, command ADD, priority 31996, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000017
+	 match dl_src aa:00:00:00:00:11
+	 match dl_dst bb:00:00:00:00:22
+	 cookie 0x000000000000000f, command ADD, priority 31995, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000018
+	 match dl_type 0x0800
+	 match nw_tos 0x24
+	 cookie 0x0000000000000010, command ADD, priority 31994, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000019
+	 match dl_type 0x0800
+	 match nw_proto 6
+	 match tp_src 80
+	 match tp_dst 80
+	 cookie 0x0000000000000011, command ADD, priority 31993, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 112, xid 0x0000001a
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.21.0.0/16
+	 cookie 0x0000000000000012, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	 action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 112, xid 0x0000001b
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.22.0.0/16
+	 cookie 0x0000000000000013, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	 action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 112, xid 0x0000001c
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.23.0.0/16
+	 cookie 0x0000000000000014, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	 action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 112, xid 0x0000001d
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.24.0.0/16
+	 cookie 0x0000000000000015, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	 action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 112, xid 0x0000001e
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.0.0/24
+	 cookie 0x0000000000000016, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	 action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 112, xid 0x0000001f
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.1.0/24
+	 cookie 0x0000000000000017, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	 action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 112, xid 0x00000020
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.2.0/24
+	 cookie 0x0000000000000018, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	 action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 112, xid 0x00000021
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.3.0/24
+	 cookie 0x0000000000000019, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	 action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 112, xid 0x00000022
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.4.0/24
+	 cookie 0x000000000000001a, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	 action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 112, xid 0x00000023
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.5.0/24
+	 cookie 0x000000000000001b, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	 action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 112, xid 0x00000024
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.6.0/24
+	 cookie 0x000000000000001c, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	 action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 112, xid 0x00000025
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.7.0/24
+	 cookie 0x000000000000001d, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	 action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 112, xid 0x00000026
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 cookie 0x000000000000001e, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	 action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	 action type OUTPUT, len 8, port 2
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000027
+	 match dl_dst 00:11:22:33:00:32
+	 match dl_vlan 50
+	 cookie 0x000000000000001f, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000028
+	 match dl_dst 00:11:22:33:00:33
+	 match dl_vlan 51
+	 cookie 0x0000000000000020, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000029
+	 match dl_dst 00:11:22:33:00:34
+	 match dl_vlan 52
+	 cookie 0x0000000000000021, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x0000002a
+	 match dl_dst 00:11:22:33:00:35
+	 match dl_vlan 53
+	 cookie 0x0000000000000022, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x0000002b
+	 match dl_dst 00:11:22:33:00:36
+	 match dl_vlan 54
+	 cookie 0x0000000000000023, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x0000002c
+	 match dl_dst 00:11:22:33:00:37
+	 match dl_vlan 55
+	 cookie 0x0000000000000024, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x0000002d
+	 match dl_dst 00:11:22:33:00:38
+	 match dl_vlan 56
+	 cookie 0x0000000000000025, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x0000002e
+	 match dl_dst 00:11:22:33:00:39
+	 match dl_vlan 57
+	 cookie 0x0000000000000026, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x0000002f
+	 match dl_src 00:11:22:33:00:0a
+	 match dl_dst 00:11:22:33:00:14
+	 cookie 0x0000000000000027, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000030
+	 match dl_src 00:11:22:33:00:0a
+	 match dl_dst 00:11:22:33:00:15
+	 cookie 0x0000000000000028, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000031
+	 match dl_src 00:11:22:33:00:0a
+	 match dl_dst 00:11:22:33:00:16
+	 cookie 0x0000000000000029, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000032
+	 match dl_src 00:11:22:33:00:0b
+	 match dl_dst 00:11:22:33:00:14
+	 cookie 0x000000000000002a, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000033
+	 match dl_src 00:11:22:33:00:0b
+	 match dl_dst 00:11:22:33:00:15
+	 cookie 0x000000000000002b, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000034
+	 match dl_src 00:11:22:33:00:0b
+	 match dl_dst 00:11:22:33:00:16
+	 cookie 0x000000000000002c, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000035
+	 match dl_src 00:11:22:33:00:0c
+	 match dl_dst 00:11:22:33:00:14
+	 cookie 0x000000000000002d, command ADD, priority 65535, buffer_id NONE, flags 0x0001 (SEND_FLOW_REM)
+	 action type OUTPUT, len 8, port 1
+	version 1.0, type FLOW_MOD, length 80, xid 0x00000036
+	 match dl_src 00:11:22:33:00:0c
+	 match dl_dst 00:11:22:33:00:15 [|openflow]
+IP (tos 0x0, ttl 64, id 53104, offset 0, flags [DF], proto TCP (6), length 180)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [P.], cksum 0x150b (incorrect -> 0x8ec7), seq 4241:4369, ack 677, win 139, options [nop,nop,TS val 47836527 ecr 1], length 128: OpenFlow
+	version unknown (0x00), type 0x00, length 0, xid 0x00000000 (corrupt)
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [.], cksum 0xfaa7 (correct), seq 677, ack 2873, win 952, options [nop,nop,TS val 1 ecr 47836527], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [.], cksum 0xf4fe (correct), seq 677, ack 4369, win 905, options [nop,nop,TS val 1 ecr 47836527], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [.], cksum 0xf4a7 (correct), seq 677, ack 4369, win 992, options [nop,nop,TS val 1 ecr 47836527], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xf318 (correct), seq 677:685, ack 4369, win 1035, options [nop,nop,TS val 2 ecr 47836527], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x00000038
+IP (tos 0x0, ttl 64, id 53105, offset 0, flags [DF], proto TCP (6), length 228)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [P.], cksum 0x153b (incorrect -> 0x165f), seq 4369:4545, ack 685, win 139, options [nop,nop,TS val 47836757 ecr 2], length 176: OpenFlow
+	version 1.0, type STATS_REQUEST, length 56, xid 0x00000039
+	 type FLOW, flags 0x0000
+	 table_id ALL, out_port NONE
+	version 1.0, type STATS_REQUEST, length 56, xid 0x0000003a
+	 type FLOW, flags 0x0000
+	 table_id 0, out_port NONE
+	version 1.0, type STATS_REQUEST, length 56, xid 0x0000003b
+	 type FLOW, flags 0x0000
+	 match dl_src 00:00:00:00:77:77
+	 table_id 0, out_port CONTROLLER
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x0000003c
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [.], cksum 0xf2dd (correct), seq 685, ack 4545, win 1035, options [nop,nop,TS val 2 ecr 47836757], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 64)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xf170 (correct), seq 685:697, ack 4545, win 1035, options [nop,nop,TS val 2 ecr 47836757], length 12: OpenFlow
+	version 1.0, type STATS_REPLY, length 12, xid 0x0000003b
+	 type FLOW, flags 0x0000
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xf16a (correct), seq 697:705, ack 4545, win 1035, options [nop,nop,TS val 2 ecr 47836757], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x0000003c
+IP (tos 0x0, ttl 64, id 53106, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xf556), seq 4545, ack 705, win 139, options [nop,nop,TS val 47837000 ecr 2], length 0
+IP (tos 0x0, ttl 64, id 53575, offset 0, flags [DF], proto TCP (6), length 1216)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x39b4 (correct), seq 705:1869, ack 4545, win 1035, options [nop,nop,TS val 2 ecr 47836757], length 1164: OpenFlow
+	version 1.0, type STATS_REPLY, length 1164, xid 0x00000039
+	 type FLOW, flags 0x0001 (MORE)
+	 length 128, table_id 30
+	  match dl_dst 00:01:e8:8a:e0:e4
+	  match dl_type 0x0800
+	  match nw_dst 10.21.0.0/16
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000012, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	  action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	  action type OUTPUT, len 8, port 2
+	 length 128, table_id 30
+	  match dl_dst 00:01:e8:8a:e0:e4
+	  match dl_type 0x0800
+	  match nw_dst 10.22.0.0/16
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000013, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	  action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	  action type OUTPUT, len 8, port 2
+	 length 128, table_id 30
+	  match dl_dst 00:01:e8:8a:e0:e4
+	  match dl_type 0x0800
+	  match nw_dst 10.23.0.0/16
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000014, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	  action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	  action type OUTPUT, len 8, port 2
+	 length 128, table_id 30
+	  match dl_dst 00:01:e8:8a:e0:e4
+	  match dl_type 0x0800
+	  match nw_dst 10.24.0.0/16
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000015, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	  action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	  action type OUTPUT, len 8, port 2
+	 length 128, table_id 30
+	  match dl_dst 00:01:e8:8a:e0:e4
+	  match dl_type 0x0800
+	  match nw_dst 10.20.0.0/24
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000016, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	  action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	  action type OUTPUT, len 8, port 2
+	 length 128, table_id 30
+	  match dl_dst 00:01:e8:8a:e0:e4
+	  match dl_type 0x0800
+	  match nw_dst 10.20.1.0/24
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000017, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	  action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	  action type OUTPUT, len 8, port 2
+	 length 128, table_id 30
+	  match dl_dst 00:01:e8:8a:e0:e4
+	  match dl_type 0x0800
+	  match nw_dst 10.20.2.0/24
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000018, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	  action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	  action type OUTPUT, len 8, port 2
+	 length 128, table_id 30
+	  match dl_dst 00:01:e8:8a:e0:e4
+	  match dl_type 0x0800
+	  match nw_dst 10.20.3.0/24
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000019, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	  action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	  action type OUTPUT, len 8, port 2
+	 length 128, table_id 30
+	  match dl_dst 00:01:e8:8a:e0:e4
+	  match dl_type 0x0800
+	  match nw_dst 10.20.4.0/24
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x000000000000001a, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	  action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	  action type OUTPUT, len 8, port 2
+IP (tos 0x0, ttl 64, id 53576, offset 0, flags [DF], proto TCP (6), length 1176)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x6b64 (correct), seq 1869:2993, ack 4545, win 1035, options [nop,nop,TS val 2 ecr 47836757], length 1124: OpenFlow
+	version 1.0, type STATS_REPLY, length 1124, xid 0x00000039
+	 type FLOW, flags 0x0001 (MORE)
+	 length 128, table_id 30
+	  match dl_dst 00:01:e8:8a:e0:e4
+	  match dl_type 0x0800
+	  match nw_dst 10.20.5.0/24
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x000000000000001b, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	  action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	  action type OUTPUT, len 8, port 2
+	 length 128, table_id 30
+	  match dl_dst 00:01:e8:8a:e0:e4
+	  match dl_type 0x0800
+	  match nw_dst 10.20.6.0/24
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x000000000000001c, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	  action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	  action type OUTPUT, len 8, port 2
+	 length 128, table_id 30
+	  match dl_dst 00:01:e8:8a:e0:e4
+	  match dl_type 0x0800
+	  match nw_dst 10.20.7.0/24
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x000000000000001d, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	  action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	  action type OUTPUT, len 8, port 2
+	 length 128, table_id 30
+	  match dl_dst 00:01:e8:8a:e0:e4
+	  match dl_type 0x0800
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x000000000000001e, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 00:01:e8:8a:e0:e4
+	  action type SET_DL_DST, len 16, dl_addr 11:00:00:00:00:00
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 40
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 35000, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000001, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port CONTROLLER, max_len 65535
+	 length 96, table_id 40
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 34999, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000002, packet_count 0, byte_count 0
+	  action type SET_VLAN_VID, len 8, vlan_vid 2
+	 length 96, table_id 40
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 34998, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000003, packet_count 0, byte_count 0
+	  action type SET_VLAN_PCP, len 8, vlan_pcp 5
+	 length 104, table_id 40
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 34997, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000004, packet_count 0, byte_count 0
+	  action type SET_VLAN_VID, len 8, vlan_vid 2
+	  action type SET_VLAN_PCP, len 8, vlan_pcp 5
+	 length 104, table_id 40
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 34996, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000005, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 11:22:33:44:55:66
+	 length 104, table_id 40
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 34995, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000006, packet_count 0, byte_count 0
+	  action type SET_DL_DST, len 16, dl_addr 77:88:99:aa:bb:cc
+IP (tos 0x0, ttl 64, id 53107, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xec39), seq 4545, ack 2993, win 184, options [nop,nop,TS val 47837000 ecr 2], length 0
+IP (tos 0x0, ttl 64, id 53108, offset 0, flags [DF], proto TCP (6), length 148)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [P.], cksum 0x14eb (incorrect -> 0xc5f7), seq 4545:4641, ack 2993, win 184, options [nop,nop,TS val 47837000 ecr 2], length 96: OpenFlow
+	version 1.0, type STATS_REQUEST, length 12, xid 0x0000003d
+	 type DESC, flags 0x0000
+	version 1.0, type STATS_REQUEST, length 56, xid 0x0000003e
+	 type AGGREGATE, flags 0x0000
+	 table_id ALL, out_port NONE
+	version 1.0, type STATS_REQUEST, length 20, xid 0x0000003f
+	 type PORT, flags 0x0000
+	 port_no NONE
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x00000040
+IP (tos 0x0, ttl 64, id 53577, offset 0, flags [DF], proto TCP (6), length 1048)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x29df (correct), seq 2993:3989, ack 4545, win 1035, options [nop,nop,TS val 2 ecr 47836757], length 996: OpenFlow
+	version 1.0, type STATS_REPLY, length 996, xid 0x00000039
+	 type FLOW, flags 0x0001 (MORE)
+	 length 120, table_id 40
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 34994, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000007, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 11:22:33:44:55:66
+	  action type SET_DL_DST, len 16, dl_addr 77:88:99:aa:bb:cc
+	 length 96, table_id 40
+	  match in_port 1
+	  match dl_src 00:00:00:00:00:01
+	  duration_sec 0, duration_nsec 0, priority 34000, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000008, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 40
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 33000, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000009, packet_count 0, byte_count 0
+	  action type SET_NW_TOS, len 8, nw_tos 0x28
+	 length 96, table_id 40
+	  match dl_vlan 100
+	  match dl_vlan_pcp 4
+	  match dl_type 0x0800
+	  duration_sec 0, duration_nsec 0, priority 32000, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000a, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 40
+	  match dl_type 0x0800
+	  match nw_src 10.11.12.0/24
+	  match nw_dst 10.13.14.0/24
+	  duration_sec 0, duration_nsec 0, priority 31999, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000b, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 40
+	  match dl_type 0x0800
+	  match nw_proto 17
+	  match tp_src 68
+	  match tp_dst 67
+	  duration_sec 0, duration_nsec 0, priority 31998, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000c, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 40
+	  match dl_type 0x0800
+	  match nw_proto 1
+	  match icmp_type 8
+	  duration_sec 0, duration_nsec 0, priority 31997, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000d, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 40
+	  match dl_type 0x0800
+	  match nw_proto 1
+	  match icmp_type 3
+	  match icmp_code 13
+	  duration_sec 0, duration_nsec 0, priority 31996, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000e, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 40
+	  match dl_src aa:00:00:00:00:11
+	  match dl_dst bb:00:00:00:00:22
+	  duration_sec 0, duration_nsec 0, priority 31995, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000f, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 40
+	  match dl_type 0x0800
+	  match nw_tos 0x24
+	  duration_sec 0, duration_nsec 0, priority 31994, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000010, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+IP (tos 0x0, ttl 64, id 53578, offset 0, flags [DF], proto TCP (6), length 1024)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x45c0 (correct), seq 3989:4961, ack 4545, win 1035, options [nop,nop,TS val 2 ecr 47836757], length 972: OpenFlow
+	version 1.0, type STATS_REPLY, length 972, xid 0x00000039
+	 type FLOW, flags 0x0001 (MORE)
+	 length 96, table_id 40
+	  match dl_type 0x0800
+	  match nw_proto 6
+	  match tp_src 80
+	  match tp_dst 80
+	  duration_sec 0, duration_nsec 0, priority 31993, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000011, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 40
+	  match dl_dst 00:11:22:33:00:32
+	  match dl_vlan 50
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x000000000000001f, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_dst 00:11:22:33:00:33
+	  match dl_vlan 51
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000020, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_dst 00:11:22:33:00:34
+	  match dl_vlan 52
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000021, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_dst 00:11:22:33:00:35
+	  match dl_vlan 53
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000022, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_dst 00:11:22:33:00:36
+	  match dl_vlan 54
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000023, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_dst 00:11:22:33:00:37
+	  match dl_vlan 55
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000024, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_dst 00:11:22:33:00:38
+	  match dl_vlan 56
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000025, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_dst 00:11:22:33:00:39
+	  match dl_vlan 57
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000026, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_src 00:11:22:33:00:0a
+	  match dl_dst 00:11:22:33:00:14
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000027, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+IP (tos 0x0, ttl 64, id 53109, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xe405), seq 4641, ack 4961, win 220, options [nop,nop,TS val 47837000 ecr 2], length 0
+IP (tos 0x0, ttl 64, id 53579, offset 0, flags [DF], proto TCP (6), length 832)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x6f3d (correct), seq 4961:5741, ack 4545, win 1035, options [nop,nop,TS val 2 ecr 47836757], length 780: OpenFlow
+	version 1.0, type STATS_REPLY, length 780, xid 0x00000039
+	 type FLOW, flags 0x0000
+	 length 96, table_id 40
+	  match dl_src 00:11:22:33:00:0a
+	  match dl_dst 00:11:22:33:00:15
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000028, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_src 00:11:22:33:00:0a
+	  match dl_dst 00:11:22:33:00:16
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000029, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_src 00:11:22:33:00:0b
+	  match dl_dst 00:11:22:33:00:14
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x000000000000002a, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_src 00:11:22:33:00:0b
+	  match dl_dst 00:11:22:33:00:15
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x000000000000002b, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_src 00:11:22:33:00:0b
+	  match dl_dst 00:11:22:33:00:16
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x000000000000002c, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_src 00:11:22:33:00:0c
+	  match dl_dst 00:11:22:33:00:14
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x000000000000002d, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_src 00:11:22:33:00:0c
+	  match dl_dst 00:11:22:33:00:15
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x000000000000002e, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 40
+	  match dl_src 00:11:22:33:00:0c
+	  match dl_dst 00:11:22:33:00:16
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x000000000000002f, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+IP (tos 0x0, ttl 64, id 53580, offset 0, flags [DF], proto TCP (6), length 976)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x0dbb (correct), seq 5741:6665, ack 4545, win 1035, options [nop,nop,TS val 2 ecr 47836757], length 924: OpenFlow
+	version 1.0, type STATS_REPLY, length 924, xid 0x0000003a
+	 type FLOW, flags 0x0001 (MORE)
+	 length 96, table_id 0
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 35000, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000001, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port CONTROLLER, max_len 65535
+	 length 96, table_id 0
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 34999, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000002, packet_count 0, byte_count 0
+	  action type SET_VLAN_VID, len 8, vlan_vid 2
+	 length 96, table_id 0
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 34998, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000003, packet_count 0, byte_count 0
+	  action type SET_VLAN_PCP, len 8, vlan_pcp 5
+	 length 104, table_id 0
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 34997, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000004, packet_count 0, byte_count 0
+	  action type SET_VLAN_VID, len 8, vlan_vid 2
+	  action type SET_VLAN_PCP, len 8, vlan_pcp 5
+	 length 104, table_id 0
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 34996, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000005, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 11:22:33:44:55:66
+	 length 104, table_id 0
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 34995, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000006, packet_count 0, byte_count 0
+	  action type SET_DL_DST, len 16, dl_addr 77:88:99:aa:bb:cc
+	 length 120, table_id 0
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 34994, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000007, packet_count 0, byte_count 0
+	  action type SET_DL_SRC, len 16, dl_addr 11:22:33:44:55:66
+	  action type SET_DL_DST, len 16, dl_addr 77:88:99:aa:bb:cc
+	 length 96, table_id 0
+	  match in_port 1
+	  match dl_src 00:00:00:00:00:01
+	  duration_sec 0, duration_nsec 0, priority 34000, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000008, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 0
+	  match in_port 1
+	  duration_sec 0, duration_nsec 0, priority 33000, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000009, packet_count 0, byte_count 0
+	  action type SET_NW_TOS, len 8, nw_tos 0x28
+IP (tos 0x0, ttl 64, id 53110, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xdd38), seq 4641, ack 6665, win 257, options [nop,nop,TS val 47837000 ecr 2], length 0
+IP (tos 0x0, ttl 64, id 53581, offset 0, flags [DF], proto TCP (6), length 1500)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [.], cksum 0x2501 (correct), seq 6665:8113, ack 4545, win 1035, options [nop,nop,TS val 2 ecr 47837000], length 1448: OpenFlow
+	version 1.0, type STATS_REPLY, length 972, xid 0x0000003a
+	 type FLOW, flags 0x0001 (MORE)
+	 length 96, table_id 0
+	  match dl_vlan 100
+	  match dl_vlan_pcp 4
+	  match dl_type 0x0800
+	  duration_sec 0, duration_nsec 0, priority 32000, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000a, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 0
+	  match dl_type 0x0800
+	  match nw_src 10.11.12.0/24
+	  match nw_dst 10.13.14.0/24
+	  duration_sec 0, duration_nsec 0, priority 31999, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000b, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 0
+	  match dl_type 0x0800
+	  match nw_proto 17
+	  match tp_src 68
+	  match tp_dst 67
+	  duration_sec 0, duration_nsec 0, priority 31998, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000c, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 0
+	  match dl_type 0x0800
+	  match nw_proto 1
+	  match icmp_type 8
+	  duration_sec 0, duration_nsec 0, priority 31997, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000d, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 0
+	  match dl_type 0x0800
+	  match nw_proto 1
+	  match icmp_type 3
+	  match icmp_code 13
+	  duration_sec 0, duration_nsec 0, priority 31996, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000e, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 0
+	  match dl_src aa:00:00:00:00:11
+	  match dl_dst bb:00:00:00:00:22
+	  duration_sec 0, duration_nsec 0, priority 31995, idle_timeout 0, hard_timeout 0, cookie 0x000000000000000f, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 0
+	  match dl_type 0x0800
+	  match nw_tos 0x24
+	  duration_sec 0, duration_nsec 0, priority 31994, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000010, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 0
+	  match dl_type 0x0800
+	  match nw_proto 6
+	  match tp_src 80
+	  match tp_dst 80
+	  duration_sec 0, duration_nsec 0, priority 31993, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000011, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 2
+	 length 96, table_id 0
+	  match dl_dst 00:11:22:33:00:32
+	  match dl_vlan 50
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x000000000000001f, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 0
+	  match dl_dst 00:11:22:33:00:33
+	  match dl_vlan 51
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000020, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	version 1.0, type STATS_REPLY, length 972, xid 0x0000003a
+	 type FLOW, flags 0x0001 (MORE)
+	 length 96, table_id 0
+	  match dl_dst 00:11:22:33:00:34
+	  match dl_vlan 52
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000021, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 0
+	  match dl_dst 00:11:22:33:00:35
+	  match dl_vlan 53
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000022, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 0
+	  match dl_dst 00:11:22:33:00:36
+	  match dl_vlan 54
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000023, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 0
+	  match dl_dst 00:11:22:33:00:37
+	  match dl_vlan 55
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000024, packet_count 0, byte_count 0
+	  action type OUTPUT, len 8, port 1
+	 length 96, table_id 0
+	  match dl_dst 00:11:22:33:00:38
+	  match dl_vlan 56
+	  duration_sec 0, duration_nsec 0, priority 65535, idle_timeout 0, hard_timeout 0, cookie 0x0000000000000025, packet_count 0 [|openflow]
+IP (tos 0x0, ttl 64, id 53582, offset 0, flags [DF], proto TCP (6), length 1040)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x395e (correct), seq 8113:9101, ack 4545, win 1035, options [nop,nop,TS val 2 ecr 47837000], length 988: OpenFlow
+	version unknown (0x00), type 0x00, length 0, xid 0x00000000 (corrupt)
+IP (tos 0x0, ttl 64, id 53111, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xd387), seq 4641, ack 9101, win 302, options [nop,nop,TS val 47837000 ecr 2], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [.], cksum 0xd0aa (correct), seq 9101, ack 4641, win 1035, options [nop,nop,TS val 2 ecr 47837000], length 0
+IP (tos 0x0, ttl 64, id 53602, offset 0, flags [DF], proto TCP (6), length 1120)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x141f (correct), seq 9101:10169, ack 4641, win 1035, options [nop,nop,TS val 3 ecr 47837000], length 1068: OpenFlow
+	version 1.0, type STATS_REPLY, length 1068, xid 0x0000003d
+	 type DESC, flags 0x0000
+	  mfr_desc 'Dell Force 10'
+	  hw_desc 'OpenFlow switch HW ver. 1.0'
+	  sw_desc 'OpenFlow switch SW ver. 1.0'
+	  serial_num '02132012'
+	  dp_desc 'Dell-Switch: 00:01:e8:8a:e0:e2; instance: 1'
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xcb12 (correct), seq 10169:10177, ack 4641, win 1035, options [nop,nop,TS val 3 ecr 47837000], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x00000040
+IP (tos 0x0, ttl 64, id 53603, offset 0, flags [DF], proto TCP (6), length 88)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xcaa5 (correct), seq 10177:10213, ack 4641, win 1035, options [nop,nop,TS val 3 ecr 47837000], length 36: OpenFlow
+	version 1.0, type STATS_REPLY, length 36, xid 0x0000003e
+	 type AGGREGATE, flags 0x0000
+	 packet_count 0, byte_count 0, flow_count 47
+IP (tos 0x0, ttl 64, id 53604, offset 0, flags [DF], proto TCP (6), length 189)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x03e7 (correct), seq 10213:10350, ack 4641, win 1035, options [nop,nop,TS val 3 ecr 47837000], length 137: OpenFlow
+	version 1.0, type PACKET_IN, length 137, xid 0x00000000
+	 buffer_id NONE, total_len 119, in_port 1, reason ACTION
+	 data (119 octets), frame decoding below
+STP 802.1s, Rapid STP, CIST Flags [Proposal, Learn, Forward, Agreement], length 102
+	port-role Designated, CIST root-id 8000.08:9e:01:62:d5:f4, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:9e:01:62:d5:f4, CIST port-id 8034, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name pica8, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:9e:01:62:d5:f4, CIST remaining-hops 20
+IP (tos 0x0, ttl 64, id 53605, offset 0, flags [DF], proto TCP (6), length 168)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x4a03 (correct), seq 10350:10466, ack 4641, win 1035, options [nop,nop,TS val 3 ecr 47837000], length 116: OpenFlow
+	version 1.0, type STATS_REPLY, length 116, xid 0x0000003f
+	 type PORT, flags 0x0001 (MORE)
+	  port_no 1, rx_packets 129437, tx_packets 8061, rx_bytes 16090662, tx_bytes 515904, rx_dropped 0, tx_dropped 0, rx_errors 18446744073709551615, tx_errors 18446744073709551615, rx_frame_err 18446744073709551615, rx_over_err 18446744073709551615, rx_crc_err 0, collisions 0
+IP (tos 0x0, ttl 64, id 53606, offset 0, flags [DF], proto TCP (6), length 168)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xc90e (correct), seq 10466:10582, ack 4641, win 1035, options [nop,nop,TS val 3 ecr 47837000], length 116: OpenFlow
+	version 1.0, type STATS_REPLY, length 116, xid 0x0000003f
+	 type PORT, flags 0x0000
+	  port_no 2, rx_packets 0, tx_packets 0, rx_bytes 0, tx_bytes 0, rx_dropped 0, tx_dropped 0, rx_errors 18446744073709551615, tx_errors 18446744073709551615, rx_frame_err 18446744073709551615, rx_over_err 18446744073709551615, rx_crc_err 0, collisions 0
+IP (tos 0x0, ttl 64, id 53112, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xcccd), seq 4641, ack 10582, win 331, options [nop,nop,TS val 47837211 ecr 3], length 0
+IP (tos 0x0, ttl 64, id 53113, offset 0, flags [DF], proto TCP (6), length 132)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [P.], cksum 0x14db (incorrect -> 0xc93e), seq 4641:4721, ack 10582, win 331, options [nop,nop,TS val 47837212 ecr 3], length 80: OpenFlow
+	version 1.0, type FLOW_MOD, length 72, xid 0x00000041
+	 cookie 0x0000000000000000, command DELETE, priority 65535, out_port NONE, flags 0x0001 (SEND_FLOW_REM)
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x00000042
+IP (tos 0x0, ttl 64, id 53707, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xc92c (correct), seq 10582:10670, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837212], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000001a
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.21.0.0/16
+	 cookie 0x0000000000000012, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53708, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xc8d1 (correct), seq 10670:10758, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837212], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000001b
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.22.0.0/16
+	 cookie 0x0000000000000013, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53709, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xc876 (correct), seq 10758:10846, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837212], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000001c
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.23.0.0/16
+	 cookie 0x0000000000000014, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53710, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xc81b (correct), seq 10846:10934, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837212], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000001d
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.24.0.0/16
+	 cookie 0x0000000000000015, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53711, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xc7c7 (correct), seq 10934:11022, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837212], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000001e
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.0.0/24
+	 cookie 0x0000000000000016, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53712, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xc66d (correct), seq 11022:11110, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837212], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000001f
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.1.0/24
+	 cookie 0x0000000000000017, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53713, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xc513 (correct), seq 11110:11198, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837212], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000020
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.2.0/24
+	 cookie 0x0000000000000018, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53714, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xc3b9 (correct), seq 11198:11286, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837212], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000021
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.3.0/24
+	 cookie 0x0000000000000019, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53114, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xc900), seq 4721, ack 11286, win 331, options [nop,nop,TS val 47837400 ecr 3], length 0
+IP (tos 0x0, ttl 64, id 53715, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xc25f (correct), seq 11286:11374, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837212], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000022
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.4.0/24
+	 cookie 0x000000000000001a, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53716, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xc105 (correct), seq 11374:11462, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837212], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000023
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.5.0/24
+	 cookie 0x000000000000001b, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53717, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xbfab (correct), seq 11462:11550, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837212], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000024
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.6.0/24
+	 cookie 0x000000000000001c, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53718, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xbe51 (correct), seq 11550:11638, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837212], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000025
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 match nw_dst 10.20.7.0/24
+	 cookie 0x000000000000001d, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53719, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xcf05 (correct), seq 11638:11726, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837212], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000026
+	 match dl_dst 00:01:e8:8a:e0:e4
+	 match dl_type 0x0800
+	 cookie 0x000000000000001e, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53720, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x37c4 (correct), seq 11726:11814, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837400], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000009
+	 match in_port 1
+	 cookie 0x0000000000000001, priority 35000, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53721, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x376b (correct), seq 11814:11902, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837400], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000000a
+	 match in_port 1
+	 cookie 0x0000000000000002, priority 34999, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53115, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xc697), seq 4721, ack 11902, win 331, options [nop,nop,TS val 47837401 ecr 3], length 0
+IP (tos 0x0, ttl 64, id 53722, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x3712 (correct), seq 11902:11990, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837400], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000000b
+	 match in_port 1
+	 cookie 0x0000000000000003, priority 34998, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53723, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x36b9 (correct), seq 11990:12078, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837400], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000000c
+	 match in_port 1
+	 cookie 0x0000000000000004, priority 34997, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53724, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x3660 (correct), seq 12078:12166, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837400], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000000d
+	 match in_port 1
+	 cookie 0x0000000000000005, priority 34996, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53725, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x3607 (correct), seq 12166:12254, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837400], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000000e
+	 match in_port 1
+	 cookie 0x0000000000000006, priority 34995, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53726, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x35ae (correct), seq 12254:12342, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837400], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000000f
+	 match in_port 1
+	 cookie 0x0000000000000007, priority 34994, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53727, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x3938 (correct), seq 12342:12430, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000010
+	 match in_port 1
+	 match dl_src 00:00:00:00:00:01
+	 cookie 0x0000000000000008, priority 34000, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53728, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x3cc3 (correct), seq 12430:12518, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000011
+	 match in_port 1
+	 cookie 0x0000000000000009, priority 33000, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53116, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xc42f), seq 4721, ack 12518, win 331, options [nop,nop,TS val 47837401 ecr 3], length 0
+IP (tos 0x0, ttl 64, id 53729, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x1317 (correct), seq 12518:12606, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000012
+	 match dl_vlan 100
+	 match dl_vlan_pcp 4
+	 match dl_type 0x0800
+	 cookie 0x000000000000000a, priority 32000, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53730, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x00fe (correct), seq 12606:12694, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000013
+	 match dl_type 0x0800
+	 match nw_src 10.11.12.0/24
+	 match nw_dst 10.13.14.0/24
+	 cookie 0x000000000000000b, priority 31999, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53731, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x16ff (correct), seq 12694:12782, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000014
+	 match dl_type 0x0800
+	 match nw_proto 17
+	 match tp_src 68
+	 match tp_dst 67
+	 cookie 0x000000000000000c, priority 31998, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53732, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x16b5 (correct), seq 12782:12870, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000015
+	 match dl_type 0x0800
+	 match nw_proto 1
+	 match icmp_type 8
+	 cookie 0x000000000000000d, priority 31997, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53733, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x16d4 (correct), seq 12870:12958, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000016
+	 match dl_type 0x0800
+	 match nw_proto 1
+	 match icmp_type 3
+	 match icmp_code 13
+	 cookie 0x000000000000000e, priority 31996, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53117, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xc37f), seq 4721, ack 12694, win 331, options [nop,nop,TS val 47837401 ecr 3], length 0
+IP (tos 0x0, ttl 64, id 53734, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xd96b (correct), seq 12958:13046, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000017
+	 match dl_src aa:00:00:00:00:11
+	 match dl_dst bb:00:00:00:00:22
+	 cookie 0x000000000000000f, priority 31995, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53735, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xf172 (correct), seq 13046:13134, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000018
+	 match dl_type 0x0800
+	 match nw_tos 0x24
+	 cookie 0x0000000000000010, priority 31994, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53736, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x1534 (correct), seq 13134:13222, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000019
+	 match dl_type 0x0800
+	 match nw_proto 6
+	 match tp_src 80
+	 match tp_dst 80
+	 cookie 0x0000000000000011, priority 31993, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53118, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xc16f), seq 4721, ack 13222, win 331, options [nop,nop,TS val 47837401 ecr 3], length 0
+IP (tos 0x0, ttl 64, id 53737, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x97c9 (correct), seq 13222:13310, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000027
+	 match dl_dst 00:11:22:33:00:32
+	 match dl_vlan 50
+	 cookie 0x000000000000001f, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53738, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x976d (correct), seq 13310:13398, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000028
+	 match dl_dst 00:11:22:33:00:33
+	 match dl_vlan 51
+	 cookie 0x0000000000000020, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53739, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x9711 (correct), seq 13398:13486, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000029
+	 match dl_dst 00:11:22:33:00:34
+	 match dl_vlan 52
+	 cookie 0x0000000000000021, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53740, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x96b5 (correct), seq 13486:13574, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000002a
+	 match dl_dst 00:11:22:33:00:35
+	 match dl_vlan 53
+	 cookie 0x0000000000000022, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53741, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x9659 (correct), seq 13574:13662, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000002b
+	 match dl_dst 00:11:22:33:00:36
+	 match dl_vlan 54
+	 cookie 0x0000000000000023, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53742, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x95fd (correct), seq 13662:13750, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000002c
+	 match dl_dst 00:11:22:33:00:37
+	 match dl_vlan 55
+	 cookie 0x0000000000000024, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53743, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x95a1 (correct), seq 13750:13838, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000002d
+	 match dl_dst 00:11:22:33:00:38
+	 match dl_vlan 56
+	 cookie 0x0000000000000025, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53119, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xbf07), seq 4721, ack 13838, win 331, options [nop,nop,TS val 47837401 ecr 3], length 0
+IP (tos 0x0, ttl 64, id 53744, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x9545 (correct), seq 13838:13926, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000002e
+	 match dl_dst 00:11:22:33:00:39
+	 match dl_vlan 57
+	 cookie 0x0000000000000026, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53745, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x72fd (correct), seq 13926:14014, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x0000002f
+	 match dl_src 00:11:22:33:00:0a
+	 match dl_dst 00:11:22:33:00:14
+	 cookie 0x0000000000000027, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53746, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x72a2 (correct), seq 14014:14102, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000030
+	 match dl_src 00:11:22:33:00:0a
+	 match dl_dst 00:11:22:33:00:15
+	 cookie 0x0000000000000028, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53747, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x7247 (correct), seq 14102:14190, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000031
+	 match dl_src 00:11:22:33:00:0a
+	 match dl_dst 00:11:22:33:00:16
+	 cookie 0x0000000000000029, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53748, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x71ee (correct), seq 14190:14278, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000032
+	 match dl_src 00:11:22:33:00:0b
+	 match dl_dst 00:11:22:33:00:14
+	 cookie 0x000000000000002a, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53120, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xbd4e), seq 4721, ack 14278, win 331, options [nop,nop,TS val 47837402 ecr 3], length 0
+IP (tos 0x0, ttl 64, id 53749, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x7193 (correct), seq 14278:14366, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000033
+	 match dl_src 00:11:22:33:00:0b
+	 match dl_dst 00:11:22:33:00:15
+	 cookie 0x000000000000002b, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53750, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x7138 (correct), seq 14366:14454, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000034
+	 match dl_src 00:11:22:33:00:0b
+	 match dl_dst 00:11:22:33:00:16
+	 cookie 0x000000000000002c, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53751, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x70df (correct), seq 14454:14542, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000035
+	 match dl_src 00:11:22:33:00:0c
+	 match dl_dst 00:11:22:33:00:14
+	 cookie 0x000000000000002d, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53752, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x7084 (correct), seq 14542:14630, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837401], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000036
+	 match dl_src 00:11:22:33:00:0c
+	 match dl_dst 00:11:22:33:00:15
+	 cookie 0x000000000000002e, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 53753, offset 0, flags [DF], proto TCP (6), length 140)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0x7028 (correct), seq 14630:14718, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837402], length 88: OpenFlow
+	version 1.0, type FLOW_REMOVED, length 88, xid 0x00000037
+	 match dl_src 00:11:22:33:00:0c
+	 match dl_dst 00:11:22:33:00:16
+	 cookie 0x000000000000002f, priority 65535, reason DELETE, duration_sec 0, duration_nsec 0, packet_count 0, byte_count 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xb769 (correct), seq 14718:14726, ack 4721, win 1035, options [nop,nop,TS val 3 ecr 47837402], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x00000042
+IP (tos 0x0, ttl 64, id 53121, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xbb8e), seq 4721, ack 14726, win 331, options [nop,nop,TS val 47837402 ecr 3], length 0
+IP (tos 0x0, ttl 64, id 53122, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [P.], cksum 0x1493 (incorrect -> 0xba21), seq 4721:4729, ack 14726, win 331, options [nop,nop,TS val 47837402 ecr 3], length 8: OpenFlow
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x00000043
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xb758 (correct), seq 14726:14734, ack 4729, win 1035, options [nop,nop,TS val 3 ecr 47837402], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x00000043
+IP (tos 0x0, ttl 64, id 53123, offset 0, flags [DF], proto TCP (6), length 144)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [P.], cksum 0x14e7 (incorrect -> 0x2671), seq 4729:4821, ack 14734, win 331, options [nop,nop,TS val 47837403 ecr 3], length 92: OpenFlow
+	version 1.0, type PACKET_OUT, length 84, xid 0x00000044
+	 buffer_id 0xffffffff, in_port CONTROLLER
+	 action type OUTPUT, len 8, port 1
+	 data (60 octets), frame decoding below
+67:68:00:00:00:00 > 61:62:63:64:65:66 Null Information, send seq 0, rcv seq 0, Flags [Command], length 46
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x00000045
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xb6f1 (correct), seq 14734:14742, ack 4821, win 1035, options [nop,nop,TS val 3 ecr 47837403], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x00000045
+IP (tos 0x0, ttl 64, id 53124, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [P.], cksum 0x1493 (incorrect -> 0xb9a7), seq 4821:4829, ack 14742, win 331, options [nop,nop,TS val 47837405 ecr 3], length 8: OpenFlow
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x00000046
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xb6de (correct), seq 14742:14750, ack 4829, win 1035, options [nop,nop,TS val 3 ecr 47837405], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x00000046
+IP (tos 0x0, ttl 64, id 53125, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [P.], cksum 0x1493 (incorrect -> 0xb995), seq 4829:4837, ack 14750, win 331, options [nop,nop,TS val 47837406 ecr 3], length 8: OpenFlow
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x00000047
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xb6cc (correct), seq 14750:14758, ack 4837, win 1035, options [nop,nop,TS val 3 ecr 47837406], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x00000047
+IP (tos 0x0, ttl 64, id 53126, offset 0, flags [DF], proto TCP (6), length 72)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [P.], cksum 0x149f (incorrect -> 0xb819), seq 4837:4857, ack 14758, win 331, options [nop,nop,TS val 47837407 ecr 3], length 20: OpenFlow
+	version 1.0, type SET_CONFIG, length 12, xid 0x00000048
+	 flags FRAG_NORMAL, miss_send_len 65535
+	version 1.0, type BARRIER_REQUEST, length 8, xid 0x00000049
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xb6ad (correct), seq 14758:14766, ack 4857, win 1035, options [nop,nop,TS val 3 ecr 47837407], length 8: OpenFlow
+	version 1.0, type BARRIER_REPLY, length 8, xid 0x00000049
+IP (tos 0x0, ttl 64, id 53127, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xbab1), seq 4857, ack 14766, win 331, options [nop,nop,TS val 47837447 ecr 3], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 64)
+    10.0.0.81.55442 > 10.0.0.20.6633: Flags [S], cksum 0xb924 (correct), seq 553833795, win 32768, options [mss 1380,nop,wscale 5,sackOK,nop,nop,nop,nop,TS val 1 ecr 0], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.20.6633 > 10.0.0.81.55442: Flags [S.], cksum 0x1493 (incorrect -> 0x6111), seq 845973340, ack 553833796, win 14480, options [mss 1460,sackOK,TS val 47838340 ecr 1,nop,wscale 7], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.81.55442 > 10.0.0.20.6633: Flags [.], cksum 0xc462 (correct), seq 1, ack 1, win 1035, options [nop,nop,TS val 1 ecr 47838340], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.81.55442 > 10.0.0.20.6633: Flags [P.], cksum 0x3724 (correct), seq 1:9, ack 1, win 1035, options [nop,nop,TS val 1 ecr 47838340], length 8: OpenFlow
+	version 1.0, type HELLO, length 8, xid 0x95e1f644
+IP (tos 0x0, ttl 64, id 29656, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.55442: Flags [.], cksum 0x148b (incorrect -> 0xc7f2), seq 1, ack 9, win 114, options [nop,nop,TS val 47838341 ecr 1], length 0
+IP (tos 0x0, ttl 64, id 29657, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.20.6633 > 10.0.0.81.55442: Flags [P.], cksum 0x1493 (incorrect -> 0xc6d3), seq 1:9, ack 9, win 114, options [nop,nop,TS val 47838347 ecr 1], length 8: OpenFlow
+	version 1.0, type HELLO, length 8, xid 0x00000001
+IP (tos 0x0, ttl 64, id 29658, offset 0, flags [DF], proto TCP (6), length 60)
+    10.0.0.20.6633 > 10.0.0.81.55442: Flags [P.], cksum 0x1493 (incorrect -> 0xc6c4), seq 9:17, ack 9, win 114, options [nop,nop,TS val 47838348 ecr 1], length 8: OpenFlow
+	version 1.0, type FEATURES_REQUEST, length 8, xid 0x00000002
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.81.55442 > 10.0.0.20.6633: Flags [.], cksum 0xc444 (correct), seq 9, ack 17, win 1034, options [nop,nop,TS val 1 ecr 47838347], length 0
+IP (tos 0x0, ttl 64, id 53761, offset 0, flags [DF], proto TCP (6), length 180)
+    10.0.0.81.55442 > 10.0.0.20.6633: Flags [P.], cksum 0x1df1 (correct), seq 9:137, ack 17, win 1035, options [nop,nop,TS val 1 ecr 47838347], length 128: OpenFlow
+	version 1.0, type FEATURES_REPLY, length 128, xid 0x00000002
+	 dpid 0x00050001e88ae0e2, n_buffers 0, n_tables 6
+	 capabilities 0x00000007 (FLOW_STATS, TABLE_STATS, PORT_STATS)
+	 actions 0x00000137 (OUTPUT, SET_VLAN_VID, SET_VLAN_PCP, SET_DL_SRC, SET_DL_DST, SET_NW_TOS)
+	  port_no 13, hw_addr 00:01:e8:8a:e0:e4, name 'Te 0/12'
+	   config 0x00000001 (PORT_DOWN)
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000300 (FIBER, AUTONEG)
+	   advertised 0x00000300 (FIBER, AUTONEG)
+	   supported 0x00000300 (FIBER, AUTONEG)
+	   peer 0x00000000
+	  port_no 16, hw_addr 00:01:e8:8a:e0:e4, name 'Te 0/15'
+	   config 0x00008001 (PORT_DOWN) (bogus)
+	   state 0x00000001 (LINK_DOWN)
+	   curr 0x00000300 (FIBER, AUTONEG)
+	   advertised 0x00000300 (FIBER, AUTONEG)
+	   supported 0x00000300 (FIBER, AUTONEG)
+	   peer 0x00000000
+IP (tos 0x0, ttl 64, id 29659, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.55442: Flags [F.], cksum 0x148b (incorrect -> 0xc74d), seq 17, ack 137, win 122, options [nop,nop,TS val 47838353 ecr 1], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.81.55442 > 10.0.0.20.6633: Flags [.], cksum 0xc3bc (correct), seq 137, ack 18, win 1035, options [nop,nop,TS val 1 ecr 47838353], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.81.55442 > 10.0.0.20.6633: Flags [F.], cksum 0xc3bb (correct), seq 137, ack 18, win 1035, options [nop,nop,TS val 1 ecr 47838353], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.55442: Flags [.], cksum 0xc74c (correct), seq 18, ack 138, win 122, options [nop,nop,TS val 47838353 ecr 1], length 0
+IP (tos 0x0, ttl 64, id 53775, offset 0, flags [DF], proto TCP (6), length 189)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [P.], cksum 0xf083 (correct), seq 14766:14903, ack 4857, win 1035, options [nop,nop,TS val 6 ecr 47837447], length 137: OpenFlow
+	version 1.0, type PACKET_IN, length 137, xid 0x00000000
+	 buffer_id NONE, total_len 119, in_port 1, reason NO_MATCH
+	 data (119 octets), frame decoding below
+STP 802.1s, Rapid STP, CIST Flags [Proposal, Learn, Forward, Agreement], length 102
+	port-role Designated, CIST root-id 8000.08:9e:01:62:d5:f4, CIST ext-pathcost 0 
+	CIST regional-root-id 8000.08:9e:01:62:d5:f4, CIST port-id 8034, 
+	message-age 0.00s, max-age 20.00s, hello-time 2.00s, forwarding-delay 15.00s
+	v3len 64, MCID Name pica8, rev 0, 
+		digest ac36177f50283cd4b83821d8ab26de62, CIST int-root-pathcost 0, 
+	CIST bridge-id 8000.08:9e:01:62:d5:f4, CIST remaining-hops 20
+IP (tos 0x0, ttl 64, id 53128, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0x148b (incorrect -> 0xb3e0), seq 4857, ack 14903, win 331, options [nop,nop,TS val 47839052 ecr 6], length 0
+IP (tos 0x0, ttl 64, id 53129, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [F.], cksum 0x148b (incorrect -> 0xac31), seq 4857, ack 14903, win 331, options [nop,nop,TS val 47841018 ecr 6], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [.], cksum 0xa96d (correct), seq 14903, ack 4858, win 1035, options [nop,nop,TS val 10 ecr 47841018], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.81.56068 > 10.0.0.20.6633: Flags [F.], cksum 0xa96c (correct), seq 14903, ack 4858, win 1035, options [nop,nop,TS val 10 ecr 47841018], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
+    10.0.0.20.6633 > 10.0.0.81.56068: Flags [.], cksum 0xac2b (correct), seq 4858, ack 14904, win 331, options [nop,nop,TS val 47841019 ecr 10], length 0
diff --git a/tests/of10_s4810.pcap b/tests/of10_s4810.pcap
new file mode 100644
index 0000000..4c9c194
--- /dev/null
+++ b/tests/of10_s4810.pcap
Binary files differ
diff --git a/tests/ospf-gmpls.new b/tests/ospf-gmpls.new
deleted file mode 100644
index 965affc..0000000
--- a/tests/ospf-gmpls.new
+++ /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/tests/ospf-gmpls.out b/tests/ospf-gmpls.out
index 965affc..e4dd9ab 100644
--- a/tests/ospf-gmpls.out
+++ b/tests/ospf-gmpls.out
@@ -1,8 +1,9 @@
-IP (tos 0xc0, ttl   1, id 4052, offset 0, flags [none], proto: OSPF (89), length: 172) 40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length: 152
-	Router-ID: 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA
+IP (tos 0xc0, ttl 1, id 4052, offset 0, flags [none], proto OSPF (89), length 172)
+    40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length 152
+	Router-ID 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA
 	  LSA #1
-	  Advertising Router: 10.255.245.37, seq 0x80000002, age 9s, length: 104
-	    Area Local Opaque LSA (10), Opaque-Type: Traffic Engineering LSA (1), Opaque-ID: 8
+	  Advertising Router 10.255.245.37, seq 0x80000002, age 9s, length 104
+	    Area Local Opaque LSA (10), Opaque-Type Traffic Engineering LSA (1), Opaque-ID 8
 	    Options: [External]
 	    Link TLV (2), length: 100
 	      Link Type subTLV (1), length: 1, Point-to-point (1)
@@ -22,11 +23,12 @@
 		TE-Class 6: 622.080 Mbps
 		TE-Class 7: 622.080 Mbps
 	      Administrative Group subTLV (9), length: 4, 0x00000000
-IP (tos 0xc0, ttl   1, id 4106, offset 0, flags [none], proto: OSPF (89), length: 172) 40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length: 152
-	Router-ID: 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA
+IP (tos 0xc0, ttl 1, id 4106, offset 0, flags [none], proto OSPF (89), length 172)
+    40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length 152
+	Router-ID 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA
 	  LSA #1
-	  Advertising Router: 10.255.245.37, seq 0x80000002, age 9s, length: 104
-	    Area Local Opaque LSA (10), Opaque-Type: Traffic Engineering LSA (1), Opaque-ID: 9
+	  Advertising Router 10.255.245.37, seq 0x80000002, age 9s, length 104
+	    Area Local Opaque LSA (10), Opaque-Type Traffic Engineering LSA (1), Opaque-ID 9
 	    Options: [External]
 	    Link TLV (2), length: 100
 	      Link Type subTLV (1), length: 1, Point-to-point (1)
@@ -46,11 +48,12 @@
 		TE-Class 6: 622.080 Mbps
 		TE-Class 7: 622.080 Mbps
 	      Administrative Group subTLV (9), length: 4, 0x00000000
-IP (tos 0xc0, ttl   1, id 4160, offset 0, flags [none], proto: OSPF (89), length: 212) 40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length: 192
-	Router-ID: 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA
+IP (tos 0xc0, ttl 1, id 4160, offset 0, flags [none], proto OSPF (89), length 212)
+    40.35.1.2 > 224.0.0.5: OSPFv2, LS-Update, length 192
+	Router-ID 10.255.245.35, Backbone Area, Authentication Type: none (0), 1 LSA
 	  LSA #1
-	  Advertising Router: 10.255.245.35, seq 0x80000003, age 3s, length: 144
-	    Area Local Opaque LSA (10), Opaque-Type: Traffic Engineering LSA (1), Opaque-ID: 3
+	  Advertising Router 10.255.245.35, seq 0x80000003, age 3s, length 144
+	    Area Local Opaque LSA (10), Opaque-Type Traffic Engineering LSA (1), Opaque-ID 3
 	    Options: [External]
 	    Link TLV (2), length: 140
 	      Link Type subTLV (1), length: 1, Point-to-point (1)
diff --git a/tests/ospf-gmpls.puu b/tests/ospf-gmpls.puu
deleted file mode 100644
index 691e38e..0000000
--- a/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/tests/ospf-gmpls.sh b/tests/ospf-gmpls.sh
deleted file mode 100755
index da2dd3b..0000000
--- a/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/tests/pgm_zmtp1.pcap b/tests/pgm_zmtp1.pcap
new file mode 100644
index 0000000..ee01e91
--- /dev/null
+++ b/tests/pgm_zmtp1.pcap
Binary files differ
diff --git a/tests/pgm_zmtp1v.out b/tests/pgm_zmtp1v.out
new file mode 100644
index 0000000..09044a7
--- /dev/null
+++ b/tests/pgm_zmtp1v.out
@@ -0,0 +1,76 @@
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92190 trail 21618 lead 54950 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92191 trail 21618 lead 54950 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92192 trail 21618 lead 54950 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 1480)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 1436 0x3329041eba74 ODATA trail 21618 seq 54951 [1460]
+	 frame offset 0x0000
+	 frame flags+body  (8-bit) length 116, flags 0x00 (-|-|-|-|-|-|-|-), first 115 byte(s) of body:
+	 0x0000:  5468 6973 2069 7320 6120 7368 6f72 7420  This.is.a.short.
+	 0x0010:  4153 4349 4920 6d65 7373 6167 6520 666f  ASCII.message.fo
+	 0x0020:  6c6c 6f77 6564 2062 7920 6120 7368 6f72  llowed.by.a.shor
+	 0x0030:  7420 6269 6e61 7279 206d 6573 7361 6765  t.binary.message
+	 0x0040:  2c20 6120 6c6f 6e67 6572 2041 5343 4949  ,.a.longer.ASCII
+	 0x0050:  206d 6573 7361 6765 2061 6e64 2061 2073  .message.and.a.s
+	 0x0060:  686f 7274 2041 5343 4949 206d 6573 7361  hort.ASCII.messa
+	 0x0070:  6765 2e                                  ge.
+
+	 frame flags+body  (8-bit) length 17, flags 0x00 (-|-|-|-|-|-|-|-), first 16 byte(s) of body:
+	 0x0000:  0001 0203 0405 0607 0809 0a0b 0c0d 0e0f  ................
+
+	 frame flags+body (64-bit) length 2790 (1290 captured), flags 0x00 (-|-|-|-|-|-|-|-), first 128 byte(s) of body:
+	 0x0000:  5468 6520 7175 6963 6b20 6272 6f77 6e20  The.quick.brown.
+	 0x0010:  666f 7820 6a75 6d70 7320 6f76 6572 2074  fox.jumps.over.t
+	 0x0020:  6865 206c 617a 7920 646f 672e 2054 6865  he.lazy.dog..The
+	 0x0030:  2071 7569 636b 2062 726f 776e 2066 6f78  .quick.brown.fox
+	 0x0040:  206a 756d 7073 206f 7665 7220 7468 6520  .jumps.over.the.
+	 0x0050:  6c61 7a79 2064 6f67 2e20 5468 6520 7175  lazy.dog..The.qu
+	 0x0060:  6963 6b20 6272 6f77 6e20 666f 7820 6a75  ick.brown.fox.ju
+	 0x0070:  6d70 7320 6f76 6572 2074 6865 206c 617a  mps.over.the.laz
+ [|zmtp1]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 1480)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 1436 0x3329041eba74 ODATA trail 21619 seq 54952 [1460]
+	 frame offset 0xffff
+	 frame intermediate part, 1434 bytes, first 128 byte(s):
+	 0x0000:  7220 7468 6520 6c61 7a79 2064 6f67 2e20  r.the.lazy.dog..
+	 0x0010:  5468 6520 7175 6963 6b20 6272 6f77 6e20  The.quick.brown.
+	 0x0020:  666f 7820 6a75 6d70 7320 6f76 6572 2074  fox.jumps.over.t
+	 0x0030:  6865 206c 617a 7920 646f 672e 2054 6865  he.lazy.dog..The
+	 0x0040:  2071 7569 636b 2062 726f 776e 2066 6f78  .quick.brown.fox
+	 0x0050:  206a 756d 7073 206f 7665 7220 7468 6520  .jumps.over.the.
+	 0x0060:  6c61 7a79 2064 6f67 2e20 5468 6520 7175  lazy.dog..The.qu
+	 0x0070:  6963 6b20 6272 6f77 6e20 666f 7820 6a75  ick.brown.fox.ju
+
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 149)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 105 0x3329041eba74 ODATA trail 21620 seq 54953 [129]
+	 frame offset 0x0042
+	 frame intermediate part, 66 bytes, first 66 byte(s):
+	 0x0000:  7073 206f 7665 7220 7468 6520 6c61 7a79  ps.over.the.lazy
+	 0x0010:  2064 6f67 2e20 5468 6520 7175 6963 6b20  .dog..The.quick.
+	 0x0020:  6272 6f77 6e20 666f 7820 6a75 6d70 7320  brown.fox.jumps.
+	 0x0030:  6f76 6572 2074 6865 206c 617a 7920 646f  over.the.lazy.do
+	 0x0040:  672e                                     g.
+
+	 frame flags+body  (8-bit) length 36, flags 0x00 (-|-|-|-|-|-|-|-), first 35 byte(s) of body:
+	 0x0000:  5468 6973 2069 7320 7468 6520 7472 6169  This.is.the.trai
+	 0x0010:  6c69 6e67 2041 5343 4949 206d 6573 7361  ling.ASCII.messa
+	 0x0020:  6765 2e                                  ge.
+
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92193 trail 21621 lead 54953 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 1, id 0, offset 0, flags [DF], proto PGM (113), length 36)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.5563 > 239.255.0.16.13320: PGM, length 0 0x3329041eba74 SPMR [16]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92194 trail 21621 lead 54953 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92195 trail 21621 lead 54953 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92196 trail 21621 lead 54953 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92197 trail 21621 lead 54953 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92198 trail 21621 lead 54953 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92199 trail 21621 lead 54953 nla 10.0.0.45 [36]
diff --git a/tests/pgmv.out b/tests/pgmv.out
new file mode 100644
index 0000000..606f3c0
--- /dev/null
+++ b/tests/pgmv.out
@@ -0,0 +1,28 @@
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92190 trail 21618 lead 54950 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92191 trail 21618 lead 54950 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92192 trail 21618 lead 54950 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 1480)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 1436 0x3329041eba74 ODATA trail 21618 seq 54951 [1460]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 1480)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 1436 0x3329041eba74 ODATA trail 21619 seq 54952 [1460]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 149)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 105 0x3329041eba74 ODATA trail 21620 seq 54953 [129]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92193 trail 21621 lead 54953 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 1, id 0, offset 0, flags [DF], proto PGM (113), length 36)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.5563 > 239.255.0.16.13320: PGM, length 0 0x3329041eba74 SPMR [16]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92194 trail 21621 lead 54953 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92195 trail 21621 lead 54953 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92196 trail 21621 lead 54953 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92197 trail 21621 lead 54953 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92198 trail 21621 lead 54953 nla 10.0.0.45 [36]
+IP (tos 0xb8, ttl 16, id 0, offset 0, flags [DF], proto PGM (113), length 56)
+    10.0.0.45 > 239.255.0.16: 10.0.0.45.13320 > 239.255.0.16.5563: PGM, length 0 0x3329041eba74 SPM seq 92199 trail 21621 lead 54953 nla 10.0.0.45 [36]
diff --git a/tests/pppoe.out b/tests/pppoe.out
new file mode 100644
index 0000000..b8f95e0
--- /dev/null
+++ b/tests/pppoe.out
@@ -0,0 +1 @@
+PPPoE PADI [Service-Name] [PPP-Max-Payload 0x05DC] [Host-Uniq 0x16372C16]
diff --git a/tests/pppoe.pcap b/tests/pppoe.pcap
new file mode 100644
index 0000000..3296174
--- /dev/null
+++ b/tests/pppoe.pcap
Binary files differ
diff --git a/tests/pppoes.out b/tests/pppoes.out
new file mode 100644
index 0000000..608c5d7
--- /dev/null
+++ b/tests/pppoes.out
@@ -0,0 +1,2 @@
+PPPoE  [ses 0x17] LCP, Echo-Request (0x09), id 106, length 14
+PPPoE  [ses 0x3b] LCP, Echo-Request (0x09), id 103, length 14
diff --git a/tests/pppoes.pcap b/tests/pppoes.pcap
new file mode 100644
index 0000000..a2c7698
--- /dev/null
+++ b/tests/pppoes.pcap
Binary files differ
diff --git a/tests/pppoes_id.out b/tests/pppoes_id.out
new file mode 100644
index 0000000..ef794fe
--- /dev/null
+++ b/tests/pppoes_id.out
@@ -0,0 +1 @@
+PPPoE  [ses 0x3b] LCP, Echo-Request (0x09), id 103, length 14
diff --git a/tests/print-A.new b/tests/print-A.new
deleted file mode 100644
index 71cba64..0000000
--- a/tests/print-A.new
+++ /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/tests/print-A.out b/tests/print-A.out
index 71cba64..9daff5a 100644
--- a/tests/print-A.out
+++ b/tests/print-A.out
@@ -1,13 +1,13 @@
-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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [S], seq 928549246, win 32767, options [mss 16396,sackOK,TS val 1306300950 ecr 0,nop,wscale 2], length 0
 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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [S.], seq 930778609, ack 928549247, win 32767, options [mss 16396,sackOK,TS val 1306300950 ecr 1306300950,nop,wscale 2], length 0
 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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 1, win 8192, options [nop,nop,TS val 1306300950 ecr 1306300950], length 0
 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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [P.], seq 1:203, ack 1, win 8192, options [nop,nop,TS val 1306300951 ecr 1306300950], length 202
 E....l@.@. ..........p.P7X..7z.... ........
 M...M...GET / HTTP/1.1
 Host: localhost
@@ -18,10 +18,10 @@
 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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [.], ack 203, win 8192, options [nop,nop,TS val 1306300952 ecr 1306300951], length 0
 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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [P.], seq 1:5560, ack 203, win 8192, options [nop,nop,TS val 1306300953 ecr 1306300951], length 5559
 E.....@.@..%.........P.p7z..7X.I.. ........
 M...M...HTTP/1.1 200 OK
 Date: Wed, 06 Jul 2005 03:57:35 GMT
@@ -179,15 +179,15 @@
 </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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 5560, win 12383, options [nop,nop,TS val 1306300953 ecr 1306300953], length 0
 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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [F.], seq 203, ack 5560, win 12383, options [nop,nop,TS val 1306302241 ecr 1306300953], length 0
 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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [F.], seq 5560, ack 204, win 8192, options [nop,nop,TS val 1306302243 ecr 1306302241], length 0
 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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 5561, win 12383, options [nop,nop,TS val 1306302243 ecr 1306302243], length 0
 E..4.r@.@.!P.........p.P7X.J7z....0_.......
 M..#M..#
diff --git a/tests/print-AA.new b/tests/print-AA.new
deleted file mode 100644
index 9099c6d..0000000
--- a/tests/print-AA.new
+++ /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/tests/print-AA.out b/tests/print-AA.out
index 9099c6d..a1bc485 100644
--- a/tests/print-AA.out
+++ b/tests/print-AA.out
@@ -1,13 +1,13 @@
-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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [S], seq 928549246, win 32767, options [mss 16396,sackOK,TS val 1306300950 ecr 0,nop,wscale 2], length 0
 ..............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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [S.], seq 930778609, ack 928549247, win 32767, options [mss 16396,sackOK,TS val 1306300950 ecr 1306300950,nop,wscale 2], length 0
 ..............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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 1, win 8192, options [nop,nop,TS val 1306300950 ecr 1306300950], length 0
 ..............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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [P.], seq 1:203, ack 1, win 8192, options [nop,nop,TS val 1306300951 ecr 1306300950], length 202
 ..............E....l@.@. ..........p.P7X..7z.... ........
 M...M...GET / HTTP/1.1
 Host: localhost
@@ -18,10 +18,10 @@
 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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [.], ack 203, win 8192, options [nop,nop,TS val 1306300952 ecr 1306300951], length 0
 ..............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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [P.], seq 1:5560, ack 203, win 8192, options [nop,nop,TS val 1306300953 ecr 1306300951], length 5559
 ..............E.....@.@..%.........P.p7z..7X.I.. ........
 M...M...HTTP/1.1 200 OK
 Date: Wed, 06 Jul 2005 03:57:35 GMT
@@ -179,15 +179,15 @@
 </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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 5560, win 12383, options [nop,nop,TS val 1306300953 ecr 1306300953], length 0
 ..............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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [F.], seq 203, ack 5560, win 12383, options [nop,nop,TS val 1306302241 ecr 1306300953], length 0
 ..............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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [F.], seq 5560, ack 204, win 8192, options [nop,nop,TS val 1306302243 ecr 1306302241], length 0
 ..............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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 5561, win 12383, options [nop,nop,TS val 1306302243 ecr 1306302243], length 0
 ..............E..4.r@.@.!P.........p.P7X.J7z....0_.......
 M..#M..#
diff --git a/tests/print-X.new b/tests/print-X.new
deleted file mode 100644
index 53e44ed..0000000
--- a/tests/print-X.new
+++ /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/tests/print-XX.new b/tests/print-XX.new
deleted file mode 100644
index 6921a01..0000000
--- a/tests/print-XX.new
+++ /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/tests/print-capX.out b/tests/print-capX.out
index 53e44ed..22b9090 100644
--- a/tests/print-capX.out
+++ b/tests/print-capX.out
@@ -1,19 +1,19 @@
-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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [S], seq 928549246, win 32767, options [mss 16396,sackOK,TS val 1306300950 ecr 0,nop,wscale 2], length 0
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [S.], seq 930778609, ack 928549247, win 32767, options [mss 16396,sackOK,TS val 1306300950 ecr 1306300950,nop,wscale 2], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 1, win 8192, options [nop,nop,TS val 1306300950 ecr 1306300950], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [P.], seq 1:203, ack 1, win 8192, options [nop,nop,TS val 1306300951 ecr 1306300950], length 202
 	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...
@@ -30,12 +30,12 @@
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [.], ack 203, win 8192, options [nop,nop,TS val 1306300952 ecr 1306300951], length 0
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [P.], seq 1:5560, ack 203, win 8192, options [nop,nop,TS val 1306300953 ecr 1306300951], length 5559
 	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...
@@ -387,22 +387,22 @@
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 5560, win 12383, options [nop,nop,TS val 1306300953 ecr 1306300953], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [F.], seq 203, ack 5560, win 12383, options [nop,nop,TS val 1306302241 ecr 1306300953], length 0
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [F.], seq 5560, ack 204, win 8192, options [nop,nop,TS val 1306302243 ecr 1306302241], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 5561, win 12383, options [nop,nop,TS val 1306302243 ecr 1306302243], length 0
 	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..#
diff --git a/tests/print-capXX.out b/tests/print-capXX.out
index 6921a01..524030c 100644
--- a/tests/print-capXX.out
+++ b/tests/print-capXX.out
@@ -1,22 +1,22 @@
-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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [S], seq 928549246, win 32767, options [mss 16396,sackOK,TS val 1306300950 ecr 0,nop,wscale 2], length 0
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [S.], seq 930778609, ack 928549247, win 32767, options [mss 16396,sackOK,TS val 1306300950 ecr 1306300950,nop,wscale 2], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 1, win 8192, options [nop,nop,TS val 1306300950 ecr 1306300950], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [P.], seq 1:203, ack 1, win 8192, options [nop,nop,TS val 1306300951 ecr 1306300950], length 202
 	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....
@@ -34,13 +34,13 @@
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [.], ack 203, win 8192, options [nop,nop,TS val 1306300952 ecr 1306300951], length 0
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [P.], seq 1:5560, ack 203, win 8192, options [nop,nop,TS val 1306300953 ecr 1306300951], length 5559
 	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..
@@ -393,25 +393,25 @@
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 5560, win 12383, options [nop,nop,TS val 1306300953 ecr 1306300953], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [F.], seq 203, ack 5560, win 12383, options [nop,nop,TS val 1306302241 ecr 1306300953], length 0
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [F.], seq 5560, ack 204, win 8192, options [nop,nop,TS val 1306302243 ecr 1306302241], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 5561, win 12383, options [nop,nop,TS val 1306302243 ecr 1306302243], length 0
 	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....
diff --git a/tests/print-flags.puu b/tests/print-flags.puu
deleted file mode 100644
index bcd8b99..0000000
--- a/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/tests/print-flags.sh b/tests/print-flags.sh
deleted file mode 100755
index c99f782..0000000
--- a/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/tests/print-x.new b/tests/print-x.new
deleted file mode 100644
index 0b25bf6..0000000
--- a/tests/print-x.new
+++ /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/tests/print-x.out b/tests/print-x.out
index 0b25bf6..34e0544 100644
--- a/tests/print-x.out
+++ b/tests/print-x.out
@@ -1,19 +1,19 @@
-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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [S], seq 928549246, win 32767, options [mss 16396,sackOK,TS val 1306300950 ecr 0,nop,wscale 2], length 0
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [S.], seq 930778609, ack 928549247, win 32767, options [mss 16396,sackOK,TS val 1306300950 ecr 1306300950,nop,wscale 2], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 1, win 8192, options [nop,nop,TS val 1306300950 ecr 1306300950], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [P.], seq 1:203, ack 1, win 8192, options [nop,nop,TS val 1306300951 ecr 1306300950], length 202
 	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
@@ -30,12 +30,12 @@
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [.], ack 203, win 8192, options [nop,nop,TS val 1306300952 ecr 1306300951], length 0
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [P.], seq 1:5560, ack 203, win 8192, options [nop,nop,TS val 1306300953 ecr 1306300951], length 5559
 	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
@@ -387,22 +387,22 @@
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 5560, win 12383, options [nop,nop,TS val 1306300953 ecr 1306300953], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [F.], seq 203, ack 5560, win 12383, options [nop,nop,TS val 1306302241 ecr 1306300953], length 0
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [F.], seq 5560, ack 204, win 8192, options [nop,nop,TS val 1306302243 ecr 1306302241], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 5561, win 12383, options [nop,nop,TS val 1306302243 ecr 1306302243], length 0
 	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
diff --git a/tests/print-xx.new b/tests/print-xx.new
deleted file mode 100644
index 82323d4..0000000
--- a/tests/print-xx.new
+++ /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/tests/print-xx.out b/tests/print-xx.out
index 82323d4..2d5b241 100644
--- a/tests/print-xx.out
+++ b/tests/print-xx.out
@@ -1,22 +1,22 @@
-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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [S], seq 928549246, win 32767, options [mss 16396,sackOK,TS val 1306300950 ecr 0,nop,wscale 2], length 0
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [S.], seq 930778609, ack 928549247, win 32767, options [mss 16396,sackOK,TS val 1306300950 ecr 1306300950,nop,wscale 2], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 1, win 8192, options [nop,nop,TS val 1306300950 ecr 1306300950], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [P.], seq 1:203, ack 1, win 8192, options [nop,nop,TS val 1306300951 ecr 1306300950], length 202
 	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
@@ -34,13 +34,13 @@
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [.], ack 203, win 8192, options [nop,nop,TS val 1306300952 ecr 1306300951], length 0
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [P.], seq 1:5560, ack 203, win 8192, options [nop,nop,TS val 1306300953 ecr 1306300951], length 5559
 	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
@@ -393,25 +393,25 @@
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 5560, win 12383, options [nop,nop,TS val 1306300953 ecr 1306300953], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [F.], seq 203, ack 5560, win 12383, options [nop,nop,TS val 1306302241 ecr 1306300953], length 0
 	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>
+IP 127.0.0.1.80 > 127.0.0.1.55920: Flags [F.], seq 5560, ack 204, win 8192, options [nop,nop,TS val 1306302243 ecr 1306302241], length 0
 	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>
+IP 127.0.0.1.55920 > 127.0.0.1.80: Flags [.], ack 5561, win 12383, options [nop,nop,TS val 1306302243 ecr 1306302243], length 0
 	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
diff --git a/tests/ripv1v2.out b/tests/ripv1v2.out
new file mode 100644
index 0000000..65243d8
--- /dev/null
+++ b/tests/ripv1v2.out
@@ -0,0 +1,16 @@
+IP (tos 0xc0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 52)
+    10.0.0.20.520 > 10.0.0.255.520: 
+	RIPv1, Request, length: 24, routes: 1
+	  AFI 0, 0.0.0.0, metric: 16
+IP (tos 0xc0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 52)
+    10.0.0.20.520 > 10.0.0.255.520: 
+	RIPv1, Response, length: 24, routes: 1
+	  10.70.178.0, metric: 1
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 52)
+    10.0.0.20.520 > 224.0.0.9.520: 
+	RIPv2, Request, length: 24, routes: 1 or less
+	  AFI 0,         0.0.0.0/0 , tag 0x0000, metric: 16, next-hop: self
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 52)
+    10.0.0.20.520 > 224.0.0.9.520: 
+	RIPv2, Response, length: 24, routes: 1 or less
+	  AFI IPv4,     10.70.178.0/24, tag 0x0000, metric: 1, next-hop: self
diff --git a/tests/ripv1v2.pcap b/tests/ripv1v2.pcap
new file mode 100644
index 0000000..b98056f
--- /dev/null
+++ b/tests/ripv1v2.pcap
Binary files differ
diff --git a/tests/ripv2_auth.out b/tests/ripv2_auth.out
new file mode 100644
index 0000000..618e4a7
--- /dev/null
+++ b/tests/ripv2_auth.out
@@ -0,0 +1,94 @@
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 72)
+    10.0.0.20.520 > 224.0.0.9.520: 
+	RIPv2, Request, length: 44, routes: 2 or less
+	  Simple Text Authentication data: abcdefghijklmnop
+	  AFI 0,         0.0.0.0/0 , tag 0x0000, metric: 16, next-hop: self
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 72)
+    10.0.0.20.520 > 224.0.0.9.520: 
+	RIPv2, Response, length: 44, routes: 2 or less
+	  Simple Text Authentication data: abcdefghijklmnop
+	  AFI IPv4,     10.70.178.0/24, tag 0x0000, metric: 1, next-hop: self
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 92)
+    10.0.0.20.520 > 224.0.0.9.520: 
+	RIPv2, Request, length: 64, routes: 3 or less
+	  Auth header: Packet Len 44, Key-ID 45, Auth Data Len 16, SeqNo 1339429688, MBZ 0, MBZ 0
+	  AFI 0,         0.0.0.0/0 , tag 0x0000, metric: 16, next-hop: self
+	  Auth trailer:
+	  0x0000:  a2fe c865 f120 8808 2326 1369 d6c2 3593
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 92)
+    10.0.0.20.520 > 224.0.0.9.520: 
+	RIPv2, Response, length: 64, routes: 3 or less
+	  Auth header: Packet Len 44, Key-ID 45, Auth Data Len 16, SeqNo 1339429692, MBZ 0, MBZ 0
+	  AFI IPv4,     10.70.178.0/24, tag 0x0000, metric: 1, next-hop: self
+	  Auth trailer:
+	  0x0000:  6d21 5dd5 6d27 a6f4 8a51 e2c2 fcc2 af0f
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 96)
+    10.0.0.20.520 > 224.0.0.9.520: 
+	RIPv2, Request, length: 68, routes: 3 or less
+	  Auth header: Packet Len 44, Key-ID 45, Auth Data Len 20, SeqNo 1339429713, MBZ 0, MBZ 0
+	  AFI 0,         0.0.0.0/0 , tag 0x0000, metric: 16, next-hop: self
+	  Auth trailer:
+	  0x0000:  728c 5b16 9a1b 3913 0021 a73f 7a73 bc1b
+	  0x0010:  eee0 e6a2
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 96)
+    10.0.0.20.520 > 224.0.0.9.520: 
+	RIPv2, Response, length: 68, routes: 3 or less
+	  Auth header: Packet Len 44, Key-ID 45, Auth Data Len 20, SeqNo 1339429716, MBZ 0, MBZ 0
+	  AFI IPv4,     10.70.178.0/24, tag 0x0000, metric: 1, next-hop: self
+	  Auth trailer:
+	  0x0000:  375c 8a50 f77f 543b 2425 a695 a27d 6b95
+	  0x0010:  3375 fc89
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 108)
+    10.0.0.20.520 > 224.0.0.9.520: 
+	RIPv2, Request, length: 80, routes: 4 or less
+	  Auth header: Packet Len 44, Key-ID 45, Auth Data Len 32, SeqNo 1339429740, MBZ 0, MBZ 0
+	  AFI 0,         0.0.0.0/0 , tag 0x0000, metric: 16, next-hop: self
+	  Auth trailer:
+	  0x0000:  4ae5 fb9c 9702 03b8 5a93 812d 0258 6740
+	  0x0010:  451a bd20 cee4 8a3d a466 17a0 e550 5b4b
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 108)
+    10.0.0.20.520 > 224.0.0.9.520: 
+	RIPv2, Response, length: 80, routes: 4 or less
+	  Auth header: Packet Len 44, Key-ID 45, Auth Data Len 32, SeqNo 1339429744, MBZ 0, MBZ 0
+	  AFI IPv4,     10.70.178.0/24, tag 0x0000, metric: 1, next-hop: self
+	  Auth trailer:
+	  0x0000:  3965 b755 535a 3375 e83a 973c 60c9 1693
+	  0x0010:  f2de 8132 9e87 3f7f b763 3cb0 b3dc 3ba2
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 124)
+    10.0.0.20.520 > 224.0.0.9.520: 
+	RIPv2, Request, length: 96, routes: 4 or less
+	  Auth header: Packet Len 44, Key-ID 45, Auth Data Len 48, SeqNo 1339429761, MBZ 0, MBZ 0
+	  AFI 0,         0.0.0.0/0 , tag 0x0000, metric: 16, next-hop: self
+	  Auth trailer:
+	  0x0000:  a1f2 20f6 6f72 f45b e8e0 291f 2322 a198
+	  0x0010:  1b6b 67bc 9279 7d3b 8e05 c683 8b7e 05bc
+	  0x0020:  230c abc8 1470 8e30 5470 fb27 6fe3 4506
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 124)
+    10.0.0.20.520 > 224.0.0.9.520: 
+	RIPv2, Response, length: 96, routes: 4 or less
+	  Auth header: Packet Len 44, Key-ID 45, Auth Data Len 48, SeqNo 1339429765, MBZ 0, MBZ 0
+	  AFI IPv4,     10.70.178.0/24, tag 0x0000, metric: 1, next-hop: self
+	  Auth trailer:
+	  0x0000:  64de 1dec 3632 e210 0258 2404 0b32 a947
+	  0x0010:  aa86 59a1 fef3 9248 3115 c266 0386 f183
+	  0x0020:  4f31 1df0 0681 e1cc ba10 b4c1 7795 9773
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 140)
+    10.0.0.20.520 > 224.0.0.9.520: 
+	RIPv2, Request, length: 112, routes: 5 or less
+	  Auth header: Packet Len 44, Key-ID 45, Auth Data Len 64, SeqNo 1339429781, MBZ 0, MBZ 0
+	  AFI 0,         0.0.0.0/0 , tag 0x0000, metric: 16, next-hop: self
+	  Auth trailer:
+	  0x0000:  73ad b6e3 5fe6 07bd 0bc5 ca25 41cc 63ec
+	  0x0010:  bd06 55b1 77a4 e223 ef52 8ea2 7480 e39c
+	  0x0020:  ee51 96bd 4e35 8cb7 f185 ba49 9892 e683
+	  0x0030:  e756 788d aa23 bf90 0b01 5c2d 241d 2d8e
+IP (tos 0xc0, ttl 1, id 0, offset 0, flags [DF], proto UDP (17), length 140)
+    10.0.0.20.520 > 224.0.0.9.520: 
+	RIPv2, Response, length: 112, routes: 5 or less
+	  Auth header: Packet Len 44, Key-ID 45, Auth Data Len 64, SeqNo 1339429785, MBZ 0, MBZ 0
+	  AFI IPv4,     10.70.178.0/24, tag 0x0000, metric: 1, next-hop: self
+	  Auth trailer:
+	  0x0000:  ad5a 5d8a a1a8 b023 1ec3 5c1c ba6a 45fb
+	  0x0010:  bee1 5584 6b1c 724d b1b7 f02e 7365 f038
+	  0x0020:  7558 0914 6762 00d1 a92f d499 5da2 43ad
+	  0x0030:  202c 7a9b 8065 49ad 260b 2142 0f8d d83f
diff --git a/tests/ripv2_auth.pcap b/tests/ripv2_auth.pcap
new file mode 100644
index 0000000..57b5a41
--- /dev/null
+++ b/tests/ripv2_auth.pcap
Binary files differ
diff --git a/tests/sflow_multiple_counter_30_pdus-nv.out b/tests/sflow_multiple_counter_30_pdus-nv.out
new file mode 100644
index 0000000..45a2d90
--- /dev/null
+++ b/tests/sflow_multiple_counter_30_pdus-nv.out
@@ -0,0 +1,30 @@
+IP 15.184.1.76.40948 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.8.4, agent-id 2, length 1288
+IP 15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, length 1288
+IP 15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, length 1288
+IP 15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, length 1288
+IP 15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, length 1288
+IP 15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, length 1108
+IP 15.184.1.76.40948 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.8.4, agent-id 2, length 208
+IP 15.184.1.194.3099 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.194, agent-id 1, length 1288
+IP 15.184.1.194.3099 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.194, agent-id 1, length 1288
+IP 15.184.1.194.3099 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.194, agent-id 1, length 1288
+IP 15.184.1.194.3099 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.194, agent-id 1, length 1288
+IP 15.184.4.165.49408 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.4.165, agent-id 100, length 460
+IP 168.87.240.2.40000 > 15.184.3.9.6343: sFlow version 327681 packet not supported
+IP 15.184.3.1.41024 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.129, agent-id 2, length 1288
+IP 15.184.3.1.41024 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.129, agent-id 2, length 568
+IP 168.87.240.3.50340 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.129, agent-id 6, length 928
+IP 15.184.1.194.3099 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.194, agent-id 1, length 1108
+IP 15.184.13.248.50229 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.13.52, agent-id 100, length 424
+IP 168.87.240.1.40000 > 15.184.3.9.6343: sFlow version 327681 packet not supported
+IP 168.87.240.1.40000 > 15.184.3.9.6343: sFlow version 327682 packet not supported
+IP 168.87.240.1.40000 > 15.184.3.9.6343: sFlow version 327681 packet not supported
+IP 168.87.240.2.40000 > 15.184.3.9.6343: sFlow version 327682 packet not supported
+IP 168.87.240.3.50340 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.129, agent-id 6, length 568
+IP 15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, length 1288
+IP 15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, length 1288
+IP 15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, length 1288
+IP 15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, length 1288
+IP 15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, length 1108
+IP 15.184.1.194.3099 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.194, agent-id 1, length 1288
+IP 15.184.1.194.3099 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.194, agent-id 1, length 1288
diff --git a/tests/sflow_multiple_counter_30_pdus.out b/tests/sflow_multiple_counter_30_pdus.out
new file mode 100644
index 0000000..1b1938e
--- /dev/null
+++ b/tests/sflow_multiple_counter_30_pdus.out
@@ -0,0 +1,1828 @@
+IP (tos 0x0, ttl 253, id 23654, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.76.40948 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.8.4, agent-id 2, seqnum 204720, uptime 2612972293, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 87096, type 0, idx 55, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 55, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 820721, unicast pkts 9601, multicast pkts 0, broadcast pkts 1302, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 178785248, unicast pkts 9736, multicast pkts 132958, broadcast pkts 2213534, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 87096, type 0, idx 56, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 56, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 156084746, unicast pkts 473593, multicast pkts 0, broadcast pkts 1862745, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 59635889, unicast pkts 8834, multicast pkts 132958, broadcast pkts 352092, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 87099, type 0, idx 57, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 57, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3051593057, unicast pkts 52919488, multicast pkts 1491, broadcast pkts 956, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1525716840, unicast pkts 30013667, multicast pkts 131467, broadcast pkts 2213880, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 87096, type 0, idx 60, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 60, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 0, unicast pkts 0, multicast pkts 0, broadcast pkts 0, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 178404732, unicast pkts 3035, multicast pkts 132958, broadcast pkts 2214836, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 87016, type 0, idx 61, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 61, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 0, unicast pkts 0, multicast pkts 0, broadcast pkts 0, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 178368955, unicast pkts 3031, multicast pkts 132840, broadcast pkts 2214791, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 87096, type 0, idx 62, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 62, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 0, unicast pkts 0, multicast pkts 0, broadcast pkts 0, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 178404650, unicast pkts 3034, multicast pkts 132958, broadcast pkts 2214836, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 87096, type 0, idx 63, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 63, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 0, unicast pkts 0, multicast pkts 0, broadcast pkts 0, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 178404732, unicast pkts 3035, multicast pkts 132958, broadcast pkts 2214836, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 12208, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, seqnum 10499682, uptime 12973660, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 2007195, type 0, idx 1, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 1, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 2460750, unicast pkts 22544, multicast pkts 5, broadcast pkts 6408, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3991394888, unicast pkts 131978, multicast pkts 2198965, broadcast pkts 48358863, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2006745, type 0, idx 2, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 2, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 122196260, unicast pkts 82823825, multicast pkts 710, broadcast pkts 38540, discards 0
+	      In errors 2, unknown protos 0
+	      Out octets 3744715166, unicast pkts 93942161, multicast pkts 2218252, broadcast pkts 48317917, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 2, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007118, type 0, idx 3, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 3, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 87175881, unicast pkts 11173387, multicast pkts 1312, broadcast pkts 7310, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2575091711, unicast pkts 8663056, multicast pkts 1949260, broadcast pkts 8701202, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007648, type 0, idx 4, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 4, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3013636604, unicast pkts 424917316, multicast pkts 1216, broadcast pkts 196654, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 584566587, unicast pkts 294167676, multicast pkts 1948957, broadcast pkts 8512276, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 1832884, type 0, idx 5, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 5, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3835856598, unicast pkts 6812799, multicast pkts 1145, broadcast pkts 705277, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2182764482, unicast pkts 8284848, multicast pkts 2738770, broadcast pkts 7987023, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007139, type 0, idx 6, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 6, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 21722, unicast pkts 0, multicast pkts 12, broadcast pkts 37, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1874046310, unicast pkts 98496, multicast pkts 1955062, broadcast pkts 20311831, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2006986, type 0, idx 7, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 7, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3474926128, unicast pkts 10088201, multicast pkts 1463, broadcast pkts 14105, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 831378523, unicast pkts 12805926, multicast pkts 1954494, broadcast pkts 20293366, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 12209, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, seqnum 10499683, uptime 12973661, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 2007114, type 0, idx 8, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 8, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3858988244, unicast pkts 13191097, multicast pkts 1215, broadcast pkts 24593, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2559231968, unicast pkts 16126546, multicast pkts 1954848, broadcast pkts 20284429, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007001, type 0, idx 9, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 9, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3386316332, unicast pkts 14360061, multicast pkts 1244, broadcast pkts 16485, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1675798901, unicast pkts 15790519, multicast pkts 1954451, broadcast pkts 20291225, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2005309, type 0, idx 10, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 10, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1558898282, unicast pkts 162603641, multicast pkts 1331, broadcast pkts 188407, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3568458580, unicast pkts 162582480, multicast pkts 1953553, broadcast pkts 20106780, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007256, type 0, idx 11, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 11, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 125808339, unicast pkts 691735, multicast pkts 2539, broadcast pkts 22184, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1249750181, unicast pkts 33020559, multicast pkts 2196657, broadcast pkts 48342104, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007178, type 0, idx 12, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 12, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 45949249, unicast pkts 205456, multicast pkts 1743, broadcast pkts 8308, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4019313234, unicast pkts 210496, multicast pkts 2197587, broadcast pkts 48353561, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007155, type 0, idx 13, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 13, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 32111027, unicast pkts 143922, multicast pkts 1193, broadcast pkts 5276, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4050797426, unicast pkts 198665, multicast pkts 2197850, broadcast pkts 48353779, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2006875, type 0, idx 14, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 14, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 19576, unicast pkts 19, multicast pkts 5, broadcast pkts 30, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3990801228, unicast pkts 107683, multicast pkts 2199048, broadcast pkts 48364452, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 12210, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, seqnum 10499684, uptime 12973663, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 2007174, type 0, idx 15, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 15, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 96700793, unicast pkts 453020, multicast pkts 2568, broadcast pkts 22804, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4042743345, unicast pkts 379591, multicast pkts 2196676, broadcast pkts 48338646, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007085, type 0, idx 16, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 16, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 289703711, unicast pkts 1654844, multicast pkts 37302, broadcast pkts 22784, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4098637095, unicast pkts 801788, multicast pkts 2166613, broadcast pkts 48320960, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007171, type 0, idx 17, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 17, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 45204461, unicast pkts 194096, multicast pkts 1700, broadcast pkts 8788, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4014792810, unicast pkts 198133, multicast pkts 2197652, broadcast pkts 48351768, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007169, type 0, idx 18, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 18, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 95210366, unicast pkts 443561, multicast pkts 2169, broadcast pkts 24997, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4035379503, unicast pkts 332327, multicast pkts 2196767, broadcast pkts 48336027, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007264, type 0, idx 19, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 19, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1379521296, unicast pkts 50010620, multicast pkts 1046, broadcast pkts 48921, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 435976335, unicast pkts 57993600, multicast pkts 2197958, broadcast pkts 48315375, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007257, type 0, idx 20, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 20, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 312017292, unicast pkts 47238597, multicast pkts 1476, broadcast pkts 23377, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3242136708, unicast pkts 57532634, multicast pkts 2198069, broadcast pkts 48339981, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2009604, type 0, idx 21, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 21, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 4127607826, unicast pkts 29906144, multicast pkts 1233, broadcast pkts 69575, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2091792747, unicast pkts 3024931093, multicast pkts 2198065, broadcast pkts 48294332, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 12211, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, seqnum 10499685, uptime 12973664, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 2007104, type 0, idx 22, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 22, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 124432239, unicast pkts 511115, multicast pkts 21969, broadcast pkts 120004, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3066166092, unicast pkts 2595939, multicast pkts 2177143, broadcast pkts 48244891, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2008568, type 0, idx 23, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 23, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 142412715, unicast pkts 4067695849, multicast pkts 1301, broadcast pkts 59350, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3335716564, unicast pkts 2083658988, multicast pkts 2198160, broadcast pkts 48304443, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2009649, type 0, idx 24, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 24, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1376243919, unicast pkts 42736656, multicast pkts 1161, broadcast pkts 37177, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3949008841, unicast pkts 3045234063, multicast pkts 2197974, broadcast pkts 48326808, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2009621, type 0, idx 25, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 25, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1314601210, unicast pkts 4258058414, multicast pkts 1154, broadcast pkts 42425, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2836953588, unicast pkts 2986750860, multicast pkts 2197982, broadcast pkts 48321714, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007193, type 0, idx 26, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 26, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 2022052468, unicast pkts 13527038, multicast pkts 933, broadcast pkts 57921, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 620629707, unicast pkts 19469425, multicast pkts 2198358, broadcast pkts 48305869, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007253, type 0, idx 27, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 27, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3262458931, unicast pkts 47684835, multicast pkts 1039, broadcast pkts 5299, discards 0
+	      In errors 3, unknown protos 0
+	      Out octets 3900626480, unicast pkts 54120142, multicast pkts 2198706, broadcast pkts 48356894, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 2, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2005148, type 0, idx 28, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 28, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 259120552, unicast pkts 1107924, multicast pkts 198, broadcast pkts 3429, discards 0
+	      In errors 2, unknown protos 0
+	      Out octets 653805810, unicast pkts 4189777, multicast pkts 2198871, broadcast pkts 48346830, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 2, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 12212, offset 0, flags [none], proto UDP (17), length 1136)
+    15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, seqnum 10499686, uptime 12973800, samples 6, length 1108
+	expanded counter sample (4), length 172, seqnum 2007268, type 0, idx 29, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 29, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1267844166, unicast pkts 49781127, multicast pkts 1368, broadcast pkts 40480, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 321243842, unicast pkts 57718818, multicast pkts 2197767, broadcast pkts 48323189, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2009633, type 0, idx 30, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 30, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1960827113, unicast pkts 4258067543, multicast pkts 1249, broadcast pkts 60280, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3144893898, unicast pkts 3032873251, multicast pkts 2198370, broadcast pkts 48301571, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2017264, type 0, idx 50, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 50, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 4161963595, unicast pkts 3263163886, multicast pkts 1151176, broadcast pkts 287880328, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 296840057, unicast pkts 1684325909, multicast pkts 1126235, broadcast pkts 1405132663, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2017179, type 0, idx 51, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 51, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 2214905605, unicast pkts 2466386895, multicast pkts 5276601, broadcast pkts 1225128676, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3025945518, unicast pkts 2183065991, multicast pkts 899419, broadcast pkts 2308600565, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 1220659, type 0, idx 52, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 52, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3618900052, unicast pkts 334487763, multicast pkts 651947, broadcast pkts 3712423535, discards 0
+	      In errors 1, unknown protos 0
+	      Out octets 697413100, unicast pkts 537120139, multicast pkts 163886, broadcast pkts 4083094099, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 1, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 1
+	expanded counter sample (4), length 172, seqnum 1220562, type 0, idx 53, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 53, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 851207797, unicast pkts 325440428, multicast pkts 164171, broadcast pkts 21946044, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1855403849, unicast pkts 517660679, multicast pkts 163669, broadcast pkts 21301, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 23656, offset 0, flags [none], proto UDP (17), length 236)
+    15.184.1.76.40948 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.8.4, agent-id 2, seqnum 204721, uptime 2612972594, samples 1, length 208
+	expanded counter sample (4), length 172, seqnum 87243, type 0, idx 105, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 105, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1063772406, unicast pkts 81120, multicast pkts 174318, broadcast pkts 3847558651, discards 0
+	      In errors 6, unknown protos 0
+	      Out octets 3728106697, unicast pkts 53832149, multicast pkts 218554, broadcast pkts 2160868, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 6, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 4
+IP (tos 0x0, ttl 253, id 27097, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.194.3099 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.194, agent-id 1, seqnum 10354082, uptime 15617401, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 2007459, type 0, idx 1, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 1, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 398, unicast pkts 0, multicast pkts 5, broadcast pkts 0, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3980656605, unicast pkts 65082, multicast pkts 2199480, broadcast pkts 48372199, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007455, type 0, idx 2, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 2, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1444442513, unicast pkts 69372226, multicast pkts 1207, broadcast pkts 31114, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1845546441, unicast pkts 41823689, multicast pkts 2201740, broadcast pkts 48335077, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007396, type 0, idx 3, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 3, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 200763454, unicast pkts 891785, multicast pkts 982, broadcast pkts 13320, discards 0
+	      In errors 1, unknown protos 0
+	      Out octets 3317395016, unicast pkts 5225674, multicast pkts 1949791, broadcast pkts 8711770, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 1, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007402, type 0, idx 4, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 4, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 165801154, unicast pkts 662297, multicast pkts 491, broadcast pkts 15752, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2164450538, unicast pkts 1115261, multicast pkts 1949901, broadcast pkts 8709518, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 1993492, type 0, idx 5, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 5, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 198991268, unicast pkts 941829, multicast pkts 664, broadcast pkts 33726, discards 0
+	      In errors 1, unknown protos 0
+	      Out octets 4052534333, unicast pkts 2591418, multicast pkts 1994963, broadcast pkts 8691000, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 1, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 1, frames too long 0, mac receive errors 0, symbol errors 1
+	expanded counter sample (4), length 172, seqnum 2007737, type 0, idx 6, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 6, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 561751280, unicast pkts 575605209, multicast pkts 1250, broadcast pkts 15322854, discards 0
+	      In errors 1, unknown protos 0
+	      Out octets 1513353683, unicast pkts 602598577, multicast pkts 1954404, broadcast pkts 4990177, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2008403, type 0, idx 7, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 7, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3193665198, unicast pkts 642460773, multicast pkts 1401, broadcast pkts 219741, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2913194238, unicast pkts 390983681, multicast pkts 1955407, broadcast pkts 20090610, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 27098, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.194.3099 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.194, agent-id 1, seqnum 10354083, uptime 15617403, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 2008394, type 0, idx 8, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 8, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1089063112, unicast pkts 559652885, multicast pkts 634, broadcast pkts 224712, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3489201031, unicast pkts 383200930, multicast pkts 1955795, broadcast pkts 20085985, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2008429, type 0, idx 9, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 9, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 2436646808, unicast pkts 568003495, multicast pkts 906, broadcast pkts 16545, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1717246279, unicast pkts 389888234, multicast pkts 1955669, broadcast pkts 20294132, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2005878, type 0, idx 10, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 10, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 105616289, unicast pkts 531333, multicast pkts 768, broadcast pkts 9159, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 10387408, unicast pkts 2209569, multicast pkts 1954606, broadcast pkts 20288646, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007661, type 0, idx 11, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 11, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1801369357, unicast pkts 137590483, multicast pkts 2109, broadcast pkts 55528, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1769140298, unicast pkts 113363667, multicast pkts 2197521, broadcast pkts 48315560, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007552, type 0, idx 12, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 12, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 4201581256, unicast pkts 45842890, multicast pkts 1610, broadcast pkts 22730, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1948082196, unicast pkts 53163690, multicast pkts 2198297, broadcast pkts 48348226, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007540, type 0, idx 13, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 13, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1019109063, unicast pkts 46613839, multicast pkts 1236, broadcast pkts 22226, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2052469045, unicast pkts 53287225, multicast pkts 2198499, broadcast pkts 48348754, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2010424, type 0, idx 14, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 14, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 36138805, unicast pkts 2267783883, multicast pkts 298, broadcast pkts 38306126, discards 0
+	      In errors 2, unknown protos 0
+	      Out octets 614425293, unicast pkts 2014274284, multicast pkts 2199305, broadcast pkts 10065409, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 2, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 27099, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.194.3099 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.194, agent-id 1, seqnum 10354084, uptime 15617404, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 2009508, type 0, idx 15, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 15, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 601225935, unicast pkts 4276033652, multicast pkts 1612, broadcast pkts 34856, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1981555755, unicast pkts 2886814164, multicast pkts 2198139, broadcast pkts 48336014, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007691, type 0, idx 16, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 16, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 4196949353, unicast pkts 109362236, multicast pkts 10140, broadcast pkts 40757, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 703618451, unicast pkts 113710944, multicast pkts 2190477, broadcast pkts 48326386, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007530, type 0, idx 17, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 17, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 4170852137, unicast pkts 45863536, multicast pkts 1559, broadcast pkts 27211, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2026848065, unicast pkts 53131746, multicast pkts 2198420, broadcast pkts 48343547, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2009475, type 0, idx 18, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 18, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 125400617, unicast pkts 3953942566, multicast pkts 1121, broadcast pkts 35754, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3010600832, unicast pkts 2658737621, multicast pkts 2198495, broadcast pkts 48334857, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007417, type 0, idx 19, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 19, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 97068375, unicast pkts 444889, multicast pkts 1007, broadcast pkts 8350, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4110456622, unicast pkts 336462, multicast pkts 2198059, broadcast pkts 48354968, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007243, type 0, idx 20, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 20, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 85827864, unicast pkts 397199, multicast pkts 1855, broadcast pkts 9570, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4029102009, unicast pkts 295961, multicast pkts 2196786, broadcast pkts 48315955, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007206, type 0, idx 21, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 21, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 91053304, unicast pkts 438205, multicast pkts 1011, broadcast pkts 7940, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4103297026, unicast pkts 317273, multicast pkts 2197586, broadcast pkts 48306440, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 27100, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.194.3099 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.194, agent-id 1, seqnum 10354085, uptime 15617405, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 2006231, type 0, idx 22, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 22, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 34112098, unicast pkts 105160, multicast pkts 21890, broadcast pkts 87902, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3973831211, unicast pkts 170034, multicast pkts 2177391, broadcast pkts 48280299, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007385, type 0, idx 23, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 23, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 88669719, unicast pkts 426910, multicast pkts 1274, broadcast pkts 9963, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4040560781, unicast pkts 263325, multicast pkts 2198421, broadcast pkts 48355369, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007419, type 0, idx 24, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 24, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 91303939, unicast pkts 434713, multicast pkts 1082, broadcast pkts 9160, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4108976190, unicast pkts 328918, multicast pkts 2198317, broadcast pkts 48355036, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007417, type 0, idx 25, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 25, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 92997371, unicast pkts 447348, multicast pkts 1121, broadcast pkts 9663, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4037714536, unicast pkts 258087, multicast pkts 2198271, broadcast pkts 48354566, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007413, type 0, idx 26, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 26, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 736394053, unicast pkts 4302342, multicast pkts 1537, broadcast pkts 9112, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4154005710, unicast pkts 612617, multicast pkts 2197991, broadcast pkts 48350433, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007109, type 0, idx 27, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 27, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 7325604, unicast pkts 91520, multicast pkts 1016, broadcast pkts 2335, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4107132478, unicast pkts 154975, multicast pkts 2199118, broadcast pkts 48364314, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2004644, type 0, idx 28, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 28, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 15584594, unicast pkts 232478, multicast pkts 12, broadcast pkts 1252, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 250802552, unicast pkts 447550, multicast pkts 2198406, broadcast pkts 48250290, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto UDP (17), length 488)
+    15.184.4.165.49408 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.4.165, agent-id 100, seqnum 304697, uptime 568980408, samples 1, length 460
+	counter sample (2), length 424, seqnum 304697, type 2, idx 1, records 6
+	    enterprise 0, Unknown (2001) length 68
+		0x0000:  0000 0004 0000 0002 0000 0001 1cc1 de18
+		0x0010:  96f0 0000 0000 0003 0000 0001 1cc1 de18
+		0x0020:  96f0 0000 0000 0005 0000 0001 1cc1 de18
+		0x0030:  96f0 0000 0000 0006 0000 0001 0000 0000
+		0x0040:  0000 0000
+	    enterprise 0, Unknown (2005) length 52
+		0x0000:  0000 01ce 1562 3800 0000 01b5 5abb 6000
+		0x0010:  0000 07a2 0002 2ed1 0000 0000 ad27 5000
+		0x0020:  0011 36a1 03c8 c6c6 0000 014c e1b6 8800
+		0x0030:  1016 b722
+	    enterprise 0, Unknown (2004) length 72
+		0x0000:  0000 0005 e225 c000 0000 0003 848a 3000
+		0x0010:  0000 0000 0000 0000 0000 0000 13bf c000
+		0x0020:  0000 0002 3662 0000 0000 0000 0000 0000
+		0x0030:  0000 0000 0000 0000 0015 af62 299c 36d1
+		0x0040:  0000 0000 0000 0000
+	    enterprise 0, Unknown (2003) length 68
+		0x0000:  3ca3 d70a 3c23 d70a 3d23 d70a 0000 0001
+		0x0010:  0000 0186 0000 0018 0000 0640 0096 43b9
+		0x0020:  1e74 d09c 0187 6bc0 142d 000a cc79 de36
+		0x0030:  00a5 dd9a 0051 60bc 041a 9f4c 7a8f 6da7
+		0x0040:  3842 8b86
+	    enterprise 0, Unknown (2006) length 40
+		0x0000:  0000 16b2 0b31 f24e fcb8 d0dc 0000 0000
+		0x0010:  0000 032a 0000 36b3 f8ae 8e96 0ab2 541e
+		0x0020:  0000 0000 0000 0000
+	    enterprise 0, Unknown (2000) length 64
+		0x0000:  0000 0010 7072 6f78 792d 7573 6530 3331
+		0x0010:  3437 6b32 3638 3935 3431 5355 4530 3331
+		0x0020:  3437 4b32 0000 0003 0000 0002 0000 000e
+		0x0030:  322e 362e 3138 2d31 3934 2e65 6c35 0000
+IP (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto UDP (17), length 100)
+    168.87.240.2.40000 > 15.184.3.9.6343: sFlow version 327681 packet not supported
+IP (tos 0x0, ttl 255, id 16476, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.3.1.41024 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.129, agent-id 2, seqnum 211306, uptime 2441326183, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 81390, type 0, idx 56, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 56, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 809903675, unicast pkts 3736015, multicast pkts 162927, broadcast pkts 30039, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3159365496, unicast pkts 3749574, multicast pkts 328087, broadcast pkts 279825377, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 6536, type 0, idx 33, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 33, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 2950591154, unicast pkts 334880915, multicast pkts 13078, broadcast pkts 633, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3019300047, unicast pkts 221588667, multicast pkts 13070, broadcast pkts 62903, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 81076, type 0, idx 34, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 34, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 49685433, unicast pkts 2528128710, multicast pkts 162056, broadcast pkts 1220, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2876151927, unicast pkts 678847059, multicast pkts 163438, broadcast pkts 1810770236, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 81493, type 0, idx 35, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 35, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 408342602, unicast pkts 2796427385, multicast pkts 751161, broadcast pkts 740734824, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 642300096, unicast pkts 1951849543, multicast pkts 183235, broadcast pkts 22658, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 81669, type 0, idx 37, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 37, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1461246724, unicast pkts 1380492582, multicast pkts 163835, broadcast pkts 140670, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 498812438, unicast pkts 3834735035, multicast pkts 174908, broadcast pkts 1255093219, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 81390, type 0, idx 38, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 38, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 71981454, unicast pkts 214133, multicast pkts 162760, broadcast pkts 157, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3267993738, unicast pkts 2856556, multicast pkts 164514, broadcast pkts 1813907262, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 81434, type 0, idx 39, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 39, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3630784674, unicast pkts 832589817, multicast pkts 162837, broadcast pkts 84051, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3008452523, unicast pkts 1179091938, multicast pkts 164436, broadcast pkts 1814098221, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 255, id 16477, offset 0, flags [none], proto UDP (17), length 596)
+    15.184.3.1.41024 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.129, agent-id 2, seqnum 211307, uptime 2441326343, samples 3, length 568
+	expanded counter sample (4), length 172, seqnum 81390, type 0, idx 40, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 40, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 38989430, unicast pkts 0, multicast pkts 162755, broadcast pkts 3, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2802182351, unicast pkts 56820, multicast pkts 165686, broadcast pkts 1814332502, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 81138, type 0, idx 41, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 41, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 46653626, unicast pkts 85863, multicast pkts 27682, broadcast pkts 478300, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 311406364, unicast pkts 80002, multicast pkts 1261847, broadcast pkts 1178283, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 81376, type 0, idx 50, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 50, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 2331728577, unicast pkts 108446058, multicast pkts 81380, broadcast pkts 1837, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 330353971, unicast pkts 160483289, multicast pkts 1588895, broadcast pkts 1448152, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 254, id 50953, offset 0, flags [none], proto UDP (17), length 956)
+    168.87.240.3.50340 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.129, agent-id 6, seqnum 444098, uptime 127118529, samples 5, length 928
+	expanded counter sample (4), length 172, seqnum 147400, type 0, idx 60, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 60, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 72510805, unicast pkts 0, multicast pkts 294749, broadcast pkts 0, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 123866349, unicast pkts 13446, multicast pkts 736973, broadcast pkts 117224, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 147400, type 0, idx 61, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 61, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 72511166, unicast pkts 0, multicast pkts 294750, broadcast pkts 0, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2101933816, unicast pkts 33990, multicast pkts 368505, broadcast pkts 42768255, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 147400, type 0, idx 62, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 62, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 89171611, unicast pkts 5392, multicast pkts 294750, broadcast pkts 49641, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 124086999, unicast pkts 11982, multicast pkts 736973, broadcast pkts 117224, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 147400, type 0, idx 63, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 63, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 71037120, unicast pkts 0, multicast pkts 294748, broadcast pkts 0, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2101596784, unicast pkts 29476, multicast pkts 368505, broadcast pkts 42768255, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 147400, type 0, idx 64, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 64, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 71037922, unicast pkts 0, multicast pkts 294751, broadcast pkts 0, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 123494040, unicast pkts 7500, multicast pkts 736973, broadcast pkts 117224, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 27101, offset 0, flags [none], proto UDP (17), length 1136)
+    15.184.1.194.3099 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.194, agent-id 1, seqnum 10354086, uptime 15618312, samples 6, length 1108
+	expanded counter sample (4), length 172, seqnum 2007421, type 0, idx 29, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 29, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 82208831, unicast pkts 403685, multicast pkts 1054, broadcast pkts 8246, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4103781979, unicast pkts 294994, multicast pkts 2198185, broadcast pkts 48352457, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007311, type 0, idx 30, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 30, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 92569896, unicast pkts 433051, multicast pkts 1312, broadcast pkts 12292, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4037227515, unicast pkts 268387, multicast pkts 2197973, broadcast pkts 48326301, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2018134, type 0, idx 50, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 50, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1215684621, unicast pkts 3179986010, multicast pkts 4299773, broadcast pkts 2959481171, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 832983248, unicast pkts 684975702, multicast pkts 1115367, broadcast pkts 45280648, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 1221174, type 0, idx 51, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 51, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 576720530, unicast pkts 537564819, multicast pkts 1613151, broadcast pkts 660268633, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 428264565, unicast pkts 1068854786, multicast pkts 344705, broadcast pkts 9140809, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 1221287, type 0, idx 52, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 52, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3028289271, unicast pkts 458255786, multicast pkts 651461, broadcast pkts 541454, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3361225808, unicast pkts 1109386475, multicast pkts 163507, broadcast pkts 8683, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 1221183, type 0, idx 53, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 53, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 2050689076, unicast pkts 476082627, multicast pkts 164214, broadcast pkts 21756786, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2159078261, unicast pkts 1043897297, multicast pkts 163510, broadcast pkts 210489, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 62, id 0, offset 0, flags [DF], proto UDP (17), length 452)
+    15.184.13.248.50229 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.13.52, agent-id 100, seqnum 26626, uptime 798762000, samples 1, length 424
+	counter sample (2), length 388, seqnum 26626, type 2, idx 1, records 6
+	    enterprise 0, Unknown (2001) length 36
+		0x0000:  0000 0002 0000 0002 0000 0001 d485 64cc
+		0x0010:  6024 0000 0000 0003 0000 0001 d485 64cc
+		0x0020:  6025 0000
+	    enterprise 0, Unknown (2005) length 52
+		0x0000:  0000 0018 3daa e800 0000 0016 50cb 8000
+		0x0010:  0000 07e5 0000 bac1 0000 0000 29ac 2400
+		0x0020:  0003 3cc1 0044 1f88 0000 000c eeff 1000
+		0x0030:  0011 78ce
+	    enterprise 0, Unknown (2004) length 72
+		0x0000:  0000 0003 caa6 5000 0000 0003 9dc3 3000
+		0x0010:  0000 0000 0000 0000 0000 0000 0a33 d000
+		0x0020:  0000 0000 1a2a 4000 0000 0000 7ff5 6000
+		0x0030:  0000 0000 7ff5 6000 0005 3fea 019d dfe2
+		0x0040:  0000 0000 0000 0000
+	    enterprise 0, Unknown (2003) length 68
+		0x0000:  0000 0000 0000 0000 0000 0000 0000 0001
+		0x0010:  0000 0153 0000 0018 0000 0640 000c 3077
+		0x0020:  0033 efdc 0000 02da 0015 f7b6 7652 2a4a
+		0x0030:  0002 204c 0000 36ba 0001 458c 306c a669
+		0x0040:  e653 ddf6
+	    enterprise 0, Unknown (2006) length 40
+		0x0000:  0000 0000 2550 2198 005a d481 0000 0000
+		0x0010:  0000 0000 0000 0000 1a2e 15ef 002a 4d2a
+		0x0020:  0000 0000 0000 0000
+	    enterprise 0, Unknown (2000) length 60
+		0x0000:  0000 000a 7573 6530 3337 3130 6666 0000
+		0x0010:  3431 3036 3630 5355 4530 3337 3130 4646
+		0x0020:  0000 0003 0000 0002 0000 000e 322e 362e
+		0x0030:  3138 2d31 3934 2e65 6c35 0000
+IP (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto UDP (17), length 100)
+    168.87.240.1.40000 > 15.184.3.9.6343: sFlow version 327681 packet not supported
+IP (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto UDP (17), length 148)
+    168.87.240.1.40000 > 15.184.3.9.6343: sFlow version 327682 packet not supported
+IP (tos 0x0, ttl 254, id 8886, offset 0, flags [none], proto UDP (17), length 100)
+    168.87.240.1.40000 > 15.184.3.9.6343: sFlow version 327681 packet not supported
+IP (tos 0x0, ttl 254, id 0, offset 0, flags [none], proto UDP (17), length 148)
+    168.87.240.2.40000 > 15.184.3.9.6343: sFlow version 327682 packet not supported
+IP (tos 0x0, ttl 254, id 50954, offset 0, flags [none], proto UDP (17), length 596)
+    168.87.240.3.50340 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.129, agent-id 6, seqnum 444099, uptime 127119529, samples 3, length 568
+	expanded counter sample (4), length 172, seqnum 147400, type 0, idx 65, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 65, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 71855431, unicast pkts 5778, multicast pkts 294751, broadcast pkts 0, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2102528585, unicast pkts 40099, multicast pkts 368505, broadcast pkts 42768255, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 147400, type 0, idx 66, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 66, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 1, adminstatus: up, operstatus: down
+	      In octets 25177702, unicast pkts 0, multicast pkts 104472, broadcast pkts 4, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 39878920, unicast pkts 4387, multicast pkts 261178, broadcast pkts 1, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 147400, type 0, idx 67, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 67, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 1, adminstatus: up, operstatus: down
+	      In octets 25284454, unicast pkts 0, multicast pkts 104859, broadcast pkts 4, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 31308450, unicast pkts 5841, multicast pkts 133252, broadcast pkts 299, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 12213, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, seqnum 10499687, uptime 12975660, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 2007196, type 0, idx 1, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 1, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 2460750, unicast pkts 22544, multicast pkts 5, broadcast pkts 6408, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3991394888, unicast pkts 131978, multicast pkts 2198965, broadcast pkts 48358863, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2006746, type 0, idx 2, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 2, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 122196260, unicast pkts 82823825, multicast pkts 710, broadcast pkts 38540, discards 0
+	      In errors 2, unknown protos 0
+	      Out octets 3744715166, unicast pkts 93942161, multicast pkts 2218252, broadcast pkts 48317917, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 2, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007119, type 0, idx 3, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 3, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 87175881, unicast pkts 11173387, multicast pkts 1312, broadcast pkts 7310, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2575091711, unicast pkts 8663056, multicast pkts 1949260, broadcast pkts 8701202, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007649, type 0, idx 4, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 4, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3013639728, unicast pkts 424917338, multicast pkts 1216, broadcast pkts 196654, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 584569975, unicast pkts 294167698, multicast pkts 1948957, broadcast pkts 8512276, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 1832885, type 0, idx 5, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 5, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3835856598, unicast pkts 6812799, multicast pkts 1145, broadcast pkts 705277, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2182764482, unicast pkts 8284848, multicast pkts 2738770, broadcast pkts 7987023, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007140, type 0, idx 6, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 6, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 21722, unicast pkts 0, multicast pkts 12, broadcast pkts 37, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1874046630, unicast pkts 98496, multicast pkts 1955062, broadcast pkts 20311836, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2006987, type 0, idx 7, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 7, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3474926128, unicast pkts 10088201, multicast pkts 1463, broadcast pkts 14105, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 831378843, unicast pkts 12805926, multicast pkts 1954494, broadcast pkts 20293371, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 12214, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, seqnum 10499688, uptime 12975661, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 2007115, type 0, idx 8, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 8, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3858988244, unicast pkts 13191097, multicast pkts 1215, broadcast pkts 24593, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2559232288, unicast pkts 16126546, multicast pkts 1954848, broadcast pkts 20284434, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007002, type 0, idx 9, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 9, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3386316332, unicast pkts 14360061, multicast pkts 1244, broadcast pkts 16485, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1675799221, unicast pkts 15790519, multicast pkts 1954451, broadcast pkts 20291230, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2005310, type 0, idx 10, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 10, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1558898282, unicast pkts 162603641, multicast pkts 1331, broadcast pkts 188407, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3568458900, unicast pkts 162582480, multicast pkts 1953553, broadcast pkts 20106785, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007257, type 0, idx 11, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 11, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 125808339, unicast pkts 691735, multicast pkts 2539, broadcast pkts 22184, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1249750181, unicast pkts 33020559, multicast pkts 2196657, broadcast pkts 48342104, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007179, type 0, idx 12, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 12, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 45949249, unicast pkts 205456, multicast pkts 1743, broadcast pkts 8308, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4019313234, unicast pkts 210496, multicast pkts 2197587, broadcast pkts 48353561, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007156, type 0, idx 13, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 13, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 32111027, unicast pkts 143922, multicast pkts 1193, broadcast pkts 5276, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4050797426, unicast pkts 198665, multicast pkts 2197850, broadcast pkts 48353779, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2006876, type 0, idx 14, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 14, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 19576, unicast pkts 19, multicast pkts 5, broadcast pkts 30, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3990801228, unicast pkts 107683, multicast pkts 2199048, broadcast pkts 48364452, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 12215, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, seqnum 10499689, uptime 12975663, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 2007175, type 0, idx 15, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 15, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 96700793, unicast pkts 453020, multicast pkts 2568, broadcast pkts 22804, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4042743345, unicast pkts 379591, multicast pkts 2196676, broadcast pkts 48338646, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007086, type 0, idx 16, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 16, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 289703711, unicast pkts 1654844, multicast pkts 37302, broadcast pkts 22784, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4098637095, unicast pkts 801788, multicast pkts 2166613, broadcast pkts 48320960, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007172, type 0, idx 17, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 17, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 45204461, unicast pkts 194096, multicast pkts 1700, broadcast pkts 8788, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4014792810, unicast pkts 198133, multicast pkts 2197652, broadcast pkts 48351768, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007170, type 0, idx 18, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 18, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 95210366, unicast pkts 443561, multicast pkts 2169, broadcast pkts 24997, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 4035379503, unicast pkts 332327, multicast pkts 2196767, broadcast pkts 48336027, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007265, type 0, idx 19, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 19, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1379521296, unicast pkts 50010620, multicast pkts 1046, broadcast pkts 48921, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 435976335, unicast pkts 57993600, multicast pkts 2197958, broadcast pkts 48315375, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007258, type 0, idx 20, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 20, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 312017292, unicast pkts 47238597, multicast pkts 1476, broadcast pkts 23377, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3242136708, unicast pkts 57532634, multicast pkts 2198069, broadcast pkts 48339981, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2009605, type 0, idx 21, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 21, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 4127607826, unicast pkts 29906144, multicast pkts 1233, broadcast pkts 69575, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2091792747, unicast pkts 3024931093, multicast pkts 2198065, broadcast pkts 48294332, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 12216, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, seqnum 10499690, uptime 12975664, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 2007105, type 0, idx 22, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 22, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 124432239, unicast pkts 511115, multicast pkts 21969, broadcast pkts 120004, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3066166092, unicast pkts 2595939, multicast pkts 2177143, broadcast pkts 48244891, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2008569, type 0, idx 23, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 23, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 142412715, unicast pkts 4067695849, multicast pkts 1301, broadcast pkts 59350, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3335716564, unicast pkts 2083658988, multicast pkts 2198160, broadcast pkts 48304443, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2009650, type 0, idx 24, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 24, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1376243919, unicast pkts 42736656, multicast pkts 1161, broadcast pkts 37177, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3949008841, unicast pkts 3045234063, multicast pkts 2197974, broadcast pkts 48326808, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2009622, type 0, idx 25, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 25, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1314601210, unicast pkts 4258058414, multicast pkts 1154, broadcast pkts 42425, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2836953588, unicast pkts 2986750860, multicast pkts 2197982, broadcast pkts 48321714, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007194, type 0, idx 26, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 26, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 2022052468, unicast pkts 13527038, multicast pkts 933, broadcast pkts 57921, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 620629707, unicast pkts 19469425, multicast pkts 2198358, broadcast pkts 48305869, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007254, type 0, idx 27, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 27, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3262458931, unicast pkts 47684835, multicast pkts 1039, broadcast pkts 5299, discards 0
+	      In errors 3, unknown protos 0
+	      Out octets 3900626480, unicast pkts 54120142, multicast pkts 2198706, broadcast pkts 48356894, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 2, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2005149, type 0, idx 28, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 28, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 259120552, unicast pkts 1107924, multicast pkts 198, broadcast pkts 3429, discards 0
+	      In errors 2, unknown protos 0
+	      Out octets 653805810, unicast pkts 4189777, multicast pkts 2198871, broadcast pkts 48346830, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 2, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 12217, offset 0, flags [none], proto UDP (17), length 1136)
+    15.184.1.195.4942 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.195, agent-id 1, seqnum 10499691, uptime 12975801, samples 6, length 1108
+	expanded counter sample (4), length 172, seqnum 2007269, type 0, idx 29, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 29, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1267844166, unicast pkts 49781127, multicast pkts 1368, broadcast pkts 40480, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 321243842, unicast pkts 57718818, multicast pkts 2197767, broadcast pkts 48323189, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2009634, type 0, idx 30, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 30, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1960827113, unicast pkts 4258067543, multicast pkts 1249, broadcast pkts 60280, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3144893898, unicast pkts 3032873251, multicast pkts 2198370, broadcast pkts 48301571, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2017265, type 0, idx 50, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 50, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 4161963799, unicast pkts 3263163886, multicast pkts 1151176, broadcast pkts 287880331, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 296849779, unicast pkts 1684325936, multicast pkts 1126235, broadcast pkts 1405132663, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2017180, type 0, idx 51, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 51, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 2214905605, unicast pkts 2466386895, multicast pkts 5276601, broadcast pkts 1225128676, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3025945518, unicast pkts 2183065991, multicast pkts 899419, broadcast pkts 2308600565, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 1220660, type 0, idx 52, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 52, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3618900052, unicast pkts 334487763, multicast pkts 651947, broadcast pkts 3712423535, discards 0
+	      In errors 1, unknown protos 0
+	      Out octets 697413100, unicast pkts 537120139, multicast pkts 163886, broadcast pkts 4083094099, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 1, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 1
+	expanded counter sample (4), length 172, seqnum 1220563, type 0, idx 53, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 53, iftype 117, ifspeed 10000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 851211409, unicast pkts 325440450, multicast pkts 164171, broadcast pkts 21946046, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1855403849, unicast pkts 517660679, multicast pkts 163669, broadcast pkts 21301, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 27102, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.194.3099 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.194, agent-id 1, seqnum 10354087, uptime 15619401, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 2007460, type 0, idx 1, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 1, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 398, unicast pkts 0, multicast pkts 5, broadcast pkts 0, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3980656605, unicast pkts 65082, multicast pkts 2199480, broadcast pkts 48372199, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007456, type 0, idx 2, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 2, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1444442513, unicast pkts 69372226, multicast pkts 1207, broadcast pkts 31114, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1845546441, unicast pkts 41823689, multicast pkts 2201740, broadcast pkts 48335077, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007397, type 0, idx 3, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 3, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 200763454, unicast pkts 891785, multicast pkts 982, broadcast pkts 13320, discards 0
+	      In errors 1, unknown protos 0
+	      Out octets 3317395016, unicast pkts 5225674, multicast pkts 1949791, broadcast pkts 8711770, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 1, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007403, type 0, idx 4, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 4, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 165801154, unicast pkts 662297, multicast pkts 491, broadcast pkts 15752, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2164450538, unicast pkts 1115261, multicast pkts 1949901, broadcast pkts 8709518, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 1993493, type 0, idx 5, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 5, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 198991268, unicast pkts 941829, multicast pkts 664, broadcast pkts 33726, discards 0
+	      In errors 1, unknown protos 0
+	      Out octets 4052534333, unicast pkts 2591418, multicast pkts 1994963, broadcast pkts 8691000, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 1, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 1, frames too long 0, mac receive errors 0, symbol errors 1
+	expanded counter sample (4), length 172, seqnum 2007738, type 0, idx 6, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 6, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 561751280, unicast pkts 575605209, multicast pkts 1250, broadcast pkts 15322854, discards 0
+	      In errors 1, unknown protos 0
+	      Out octets 1513354003, unicast pkts 602598577, multicast pkts 1954404, broadcast pkts 4990182, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2008404, type 0, idx 7, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 7, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 3193665262, unicast pkts 642460773, multicast pkts 1401, broadcast pkts 219742, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2913194494, unicast pkts 390983681, multicast pkts 1955407, broadcast pkts 20090614, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+IP (tos 0x0, ttl 253, id 27103, offset 0, flags [none], proto UDP (17), length 1316)
+    15.184.1.194.3099 > 15.184.3.9.6343: sFlowv5, IPv4 agent 15.184.1.194, agent-id 1, seqnum 10354088, uptime 15619403, samples 7, length 1288
+	expanded counter sample (4), length 172, seqnum 2008395, type 0, idx 8, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 8, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1089063112, unicast pkts 559652885, multicast pkts 634, broadcast pkts 224712, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 3489201351, unicast pkts 383200930, multicast pkts 1955795, broadcast pkts 20085990, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2008430, type 0, idx 9, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 9, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 2436646808, unicast pkts 568003495, multicast pkts 906, broadcast pkts 16545, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1717246599, unicast pkts 389888234, multicast pkts 1955669, broadcast pkts 20294137, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2005879, type 0, idx 10, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 10, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 105616289, unicast pkts 531333, multicast pkts 768, broadcast pkts 9159, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 10387728, unicast pkts 2209569, multicast pkts 1954606, broadcast pkts 20288651, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007662, type 0, idx 11, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 11, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1801371574, unicast pkts 137590493, multicast pkts 2109, broadcast pkts 55528, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1769141617, unicast pkts 113363676, multicast pkts 2197521, broadcast pkts 48315560, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007553, type 0, idx 12, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 12, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 4201581256, unicast pkts 45842890, multicast pkts 1610, broadcast pkts 22730, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 1948082196, unicast pkts 53163690, multicast pkts 2198297, broadcast pkts 48348226, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2007541, type 0, idx 13, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 13, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 1019109063, unicast pkts 46613839, multicast pkts 1236, broadcast pkts 22226, discards 0
+	      In errors 0, unknown protos 0
+	      Out octets 2052469045, unicast pkts 53287225, multicast pkts 2198499, broadcast pkts 48348754, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 0, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
+	expanded counter sample (4), length 172, seqnum 2010425, type 0, idx 14, records 2
+	    enterprise 0, Generic counter (1) length 88
+	      ifindex 14, iftype 117, ifspeed 1000000000, ifdirection 1 (full-duplex)
+	      ifstatus 3, adminstatus: up, operstatus: up
+	      In octets 36138805, unicast pkts 2267783883, multicast pkts 298, broadcast pkts 38306126, discards 0
+	      In errors 2, unknown protos 0
+	      Out octets 614425293, unicast pkts 2014274284, multicast pkts 2199305, broadcast pkts 10065409, discards 0
+	      Out errors 0, promisc mode 2
+	    enterprise 0, Ethernet counter (2) length 52
+	      align errors 0, fcs errors 2, single collision 0, multiple collision 0, test error 0
+	      deferred 0, late collision 0, excessive collision 0, mac trans error 0
+	      carrier error 0, frames too long 0, mac receive errors 0, symbol errors 0
diff --git a/tests/sflow_multiple_counter_30_pdus.pcap b/tests/sflow_multiple_counter_30_pdus.pcap
new file mode 100644
index 0000000..5ec39c4
--- /dev/null
+++ b/tests/sflow_multiple_counter_30_pdus.pcap
Binary files differ
diff --git a/tests/spb.out b/tests/spb.out
new file mode 100644
index 0000000..ef2f82a
--- /dev/null
+++ b/tests/spb.out
@@ -0,0 +1,53 @@
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, L1 LSP, lsp-id 2222.2222.2222.00-00, seq 0x0000000f, lifetime  1200s, length 149
+IS-IS, L1 PSNP, src-id 8888.8888.8888.00, length 35
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, L1 LSP, lsp-id 2222.2222.2222.00-00, seq 0x00000010, lifetime  1200s, length 149
+IS-IS, L1 PSNP, src-id 8888.8888.8888.00, length 35
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
+IS-IS, p2p IIH, src-id 2222.2222.2222, length 1492
+IS-IS, p2p IIH, src-id 8888.8888.8888, length 1492
diff --git a/tests/spb.pcap b/tests/spb.pcap
new file mode 100644
index 0000000..99e2505
--- /dev/null
+++ b/tests/spb.pcap
Binary files differ
diff --git a/tests/spb_bpduv4.out b/tests/spb_bpduv4.out
new file mode 100644
index 0000000..748d4d2
--- /dev/null
+++ b/tests/spb_bpduv4.out
@@ -0,0 +1,25 @@
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
+STP 802.1aq, Rapid STP, CIST Flags [Learn, Forward], length 205
diff --git a/tests/spb_bpduv4.pcap b/tests/spb_bpduv4.pcap
new file mode 100644
index 0000000..b12d4c1
--- /dev/null
+++ b/tests/spb_bpduv4.pcap
Binary files differ
diff --git a/tests/syslog-v.out b/tests/syslog-v.out
new file mode 100644
index 0000000..5ebed29
--- /dev/null
+++ b/tests/syslog-v.out
@@ -0,0 +1,16 @@
+IP (tos 0x0, ttl 64, id 30929, offset 0, flags [DF], proto UDP (17), length 79)
+    10.0.0.20.47565 > 10.0.0.72.514: SYSLOG, length: 51
+	Facility kernel (0), Severity notice (5)
+	Msg: Sep 12 19:16:12 through logger: test message 21\0x00
+IP (tos 0x0, ttl 64, id 37393, offset 0, flags [DF], proto UDP (17), length 79)
+    10.0.0.20.33884 > 10.0.0.72.514: SYSLOG, length: 51
+	Facility user (1), Severity alert (1)
+	Msg: Sep 12 19:16:18 through logger: test message 22\0x00
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 107)
+    10.0.0.20.52693 > 10.0.0.71.514: SYSLOG, length: 79
+	Facility user (1), Severity notice (5)
+	Msg: 2013-09-12T19:16:34.457849+04:00 localhost through rsyslog: test message 23
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 106)
+    10.0.0.20.52693 > 10.0.0.71.514: SYSLOG, length: 78
+	Facility user (1), Severity alert (1)
+	Msg: 2013-09-12T19:16:43.513746+04:00 localhost through rsyslog: test message 24
diff --git a/tests/syslog_udp.pcap b/tests/syslog_udp.pcap
new file mode 100644
index 0000000..06d54e6
--- /dev/null
+++ b/tests/syslog_udp.pcap
Binary files differ
diff --git a/tests/tfo-5c1fa7f9ae91.pcap b/tests/tfo-5c1fa7f9ae91.pcap
new file mode 100644
index 0000000..43ae5b7
--- /dev/null
+++ b/tests/tfo-5c1fa7f9ae91.pcap
Binary files differ
diff --git a/tests/tfo.out b/tests/tfo.out
new file mode 100644
index 0000000..ff5a955
--- /dev/null
+++ b/tests/tfo.out
@@ -0,0 +1,14 @@
+IP 192.168.0.100.13047 > 3.3.3.3.13054: Flags [S], seq 218476388, win 1400, options [exp-tfo cookiereq], length 0
+IP 9.9.9.9.13047 > 3.3.3.3.13054: Flags [S], seq 218476388, win 1400, options [mss 1460,exp-tfo cookiereq], length 0
+IP 3.3.3.3.13054 > 9.9.9.9.13047: Flags [S.], seq 4035392501, ack 218476389, win 1400, options [exp-tfo cookie 090909090000,nop,nop], length 0
+IP 3.3.3.3.13054 > 192.168.0.100.13047: Flags [S.], seq 4035392501, ack 218476389, win 1400, options [mss 1500,exp-tfo cookie 090909090000,nop,nop], length 0
+IP 192.168.0.100.13047 > 3.3.3.3.13054: Flags [.], ack 1, win 1400, length 0
+IP 9.9.9.9.13047 > 3.3.3.3.13054: Flags [.], ack 1, win 1400, length 0
+IP 192.168.0.100.13047 > 3.3.3.3.13054: Flags [F.], seq 1, ack 1, win 1400, length 0
+IP 9.9.9.9.13047 > 3.3.3.3.13054: Flags [F.], seq 1, ack 1, win 1400, length 0
+IP 3.3.3.3.13054 > 9.9.9.9.13047: Flags [F.], seq 1, ack 2, win 1400, length 0
+IP 3.3.3.3.13054 > 192.168.0.100.13047: Flags [F.], seq 1, ack 2, win 1400, length 0
+IP 192.168.0.100.13047 > 3.3.3.3.13054: Flags [.], ack 2, win 1400, length 0
+IP 9.9.9.9.13047 > 3.3.3.3.13054: Flags [.], ack 2, win 1400, length 0
+IP 192.168.0.100.13048 > 3.3.3.3.13054: Flags [S], seq 936732547:936732551, win 1400, options [exp-tfo cookie 090909090000,nop,nop], length 4
+IP 192.168.0.100.13048 > 3.3.3.3.13054: Flags [F.], seq 936732552, ack 0, win 1400, length 0
diff --git a/tests/zmtp1.out b/tests/zmtp1.out
new file mode 100644
index 0000000..5b52877
--- /dev/null
+++ b/tests/zmtp1.out
@@ -0,0 +1,73 @@
+IP (tos 0x0, ttl 64, id 17993, offset 0, flags [DF], proto TCP (6), length 60)
+    127.0.0.1.55358 > 127.0.0.1.33000: Flags [S], cksum 0xfe30 (incorrect -> 0x1a9d), seq 2523978814, win 32792, options [mss 16396,sackOK,TS val 245537399 ecr 0,nop,wscale 7], length 0
+IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
+    127.0.0.1.33000 > 127.0.0.1.55358: Flags [S.], cksum 0xfe30 (incorrect -> 0x31b6), seq 3988083230, ack 2523978815, win 32768, options [mss 16396,sackOK,TS val 245537399 ecr 245537399,nop,wscale 7], length 0
+IP (tos 0x0, ttl 64, id 17994, offset 0, flags [DF], proto TCP (6), length 52)
+    127.0.0.1.55358 > 127.0.0.1.33000: Flags [.], cksum 0xfe28 (incorrect -> 0x19da), ack 1, win 257, options [nop,nop,TS val 245537399 ecr 245537399], length 0
+IP (tos 0x0, ttl 64, id 17995, offset 0, flags [DF], proto TCP (6), length 54)
+    127.0.0.1.55358 > 127.0.0.1.33000: Flags [P.], cksum 0xfe2a (incorrect -> 0x18d0), seq 1:3, ack 1, win 257, options [nop,nop,TS val 245537399 ecr 245537399], length 2: ZMTP/1.0
+	 frame flags+body  (8-bit) length 1, flags 0x00 (-|-|-|-|-|-|-|-)
+IP (tos 0x0, ttl 64, id 51304, offset 0, flags [DF], proto TCP (6), length 52)
+    127.0.0.1.33000 > 127.0.0.1.55358: Flags [.], cksum 0xfe28 (incorrect -> 0x19d9), ack 3, win 256, options [nop,nop,TS val 245537399 ecr 245537399], length 0
+IP (tos 0x0, ttl 64, id 51305, offset 0, flags [DF], proto TCP (6), length 54)
+    127.0.0.1.33000 > 127.0.0.1.55358: Flags [P.], cksum 0xfe2a (incorrect -> 0x18cf), seq 1:3, ack 3, win 256, options [nop,nop,TS val 245537399 ecr 245537399], length 2: ZMTP/1.0
+	 frame flags+body  (8-bit) length 1, flags 0x00 (-|-|-|-|-|-|-|-)
+IP (tos 0x0, ttl 64, id 17996, offset 0, flags [DF], proto TCP (6), length 52)
+    127.0.0.1.55358 > 127.0.0.1.33000: Flags [.], cksum 0xfe28 (incorrect -> 0x19d6), ack 3, win 257, options [nop,nop,TS val 245537399 ecr 245537399], length 0
+IP (tos 0x0, ttl 64, id 17997, offset 0, flags [DF], proto TCP (6), length 148)
+    127.0.0.1.55358 > 127.0.0.1.33000: Flags [P.], cksum 0xfe88 (incorrect -> 0x11da), seq 3:99, ack 3, win 257, options [nop,nop,TS val 245537399 ecr 245537399], length 96: ZMTP/1.0
+	 frame flags+body  (8-bit) length 1, flags 0x01 (-|-|-|-|-|-|-|MORE)
+	 frame flags+body  (8-bit) length 93, flags 0x00 (-|-|-|-|-|-|-|-), first 92 byte(s) of body:
+	 0x0000:  5468 6973 2069 7320 6120 7368 6f72 7420  This.is.a.short.
+	 0x0010:  4153 4349 4920 6d65 7373 6167 6520 666f  ASCII.message.fo
+	 0x0020:  6c6c 6f77 6564 2062 7920 6120 7368 6f72  llowed.by.a.shor
+	 0x0030:  7420 6269 6e61 7279 206d 6573 7361 6765  t.binary.message
+	 0x0040:  2061 6e64 2061 206c 6f6e 6765 7220 4153  .and.a.longer.AS
+	 0x0050:  4349 4920 6d65 7373 6167 652e            CII.message.
+
+IP (tos 0x0, ttl 64, id 51306, offset 0, flags [DF], proto TCP (6), length 84)
+    127.0.0.1.33000 > 127.0.0.1.55358: Flags [P.], cksum 0xfe48 (incorrect -> 0xc80f), seq 3:35, ack 99, win 256, options [nop,nop,TS val 245537399 ecr 245537399], length 32: ZMTP/1.0
+	 frame flags+body  (8-bit) length 1, flags 0x01 (-|-|-|-|-|-|-|MORE)
+	 frame flags+body  (8-bit) length 29, flags 0x00 (-|-|-|-|-|-|-|-), first 28 byte(s) of body:
+	 0x0000:  5468 6973 2069 7320 6120 7368 6f72 7420  This.is.a.short.
+	 0x0010:  4153 4349 4920 7265 706c 792e            ASCII.reply.
+
+IP (tos 0x0, ttl 64, id 17998, offset 0, flags [DF], proto TCP (6), length 72)
+    127.0.0.1.55358 > 127.0.0.1.33000: Flags [P.], cksum 0xfe3c (incorrect -> 0xcef8), seq 99:119, ack 35, win 257, options [nop,nop,TS val 245537399 ecr 245537399], length 20: ZMTP/1.0
+	 frame flags+body  (8-bit) length 1, flags 0x01 (-|-|-|-|-|-|-|MORE)
+	 frame flags+body  (8-bit) length 17, flags 0x00 (-|-|-|-|-|-|-|-), first 16 byte(s) of body:
+	 0x0000:  0001 0203 0405 0607 0809 0a0b 0c0d 0e0f  ................
+
+IP (tos 0x0, ttl 64, id 51307, offset 0, flags [DF], proto TCP (6), length 84)
+    127.0.0.1.33000 > 127.0.0.1.55358: Flags [P.], cksum 0xfe48 (incorrect -> 0xc7da), seq 35:67, ack 119, win 256, options [nop,nop,TS val 245537400 ecr 245537399], length 32: ZMTP/1.0
+	 frame flags+body  (8-bit) length 1, flags 0x01 (-|-|-|-|-|-|-|MORE)
+	 frame flags+body  (8-bit) length 29, flags 0x00 (-|-|-|-|-|-|-|-), first 28 byte(s) of body:
+	 0x0000:  5468 6973 2069 7320 6120 7368 6f72 7420  This.is.a.short.
+	 0x0010:  4153 4349 4920 7265 706c 792e            ASCII.reply.
+
+IP (tos 0x0, ttl 64, id 17999, offset 0, flags [DF], proto TCP (6), length 603)
+    127.0.0.1.55358 > 127.0.0.1.33000: Flags [P.], cksum 0x0050 (incorrect -> 0xafc1), seq 119:670, ack 67, win 257, options [nop,nop,TS val 245537400 ecr 245537400], length 551: ZMTP/1.0
+	 frame flags+body  (8-bit) length 1, flags 0x01 (-|-|-|-|-|-|-|MORE)
+	 frame flags+body (64-bit) length 540, flags 0x00 (-|-|-|-|-|-|-|-), first 128 byte(s) of body:
+	 0x0000:  5468 6520 7175 6963 6b20 6272 6f77 6e20  The.quick.brown.
+	 0x0010:  666f 7820 6a75 6d70 7320 6f76 6572 2074  fox.jumps.over.t
+	 0x0020:  6865 206c 617a 7920 646f 672e 2054 6865  he.lazy.dog..The
+	 0x0030:  2071 7569 636b 2062 726f 776e 2066 6f78  .quick.brown.fox
+	 0x0040:  206a 756d 7073 206f 7665 7220 7468 6520  .jumps.over.the.
+	 0x0050:  6c61 7a79 2064 6f67 2e20 5468 6520 7175  lazy.dog..The.qu
+	 0x0060:  6963 6b20 6272 6f77 6e20 666f 7820 6a75  ick.brown.fox.ju
+	 0x0070:  6d70 7320 6f76 6572 2074 6865 206c 617a  mps.over.the.laz
+
+IP (tos 0x0, ttl 64, id 51308, offset 0, flags [DF], proto TCP (6), length 84)
+    127.0.0.1.33000 > 127.0.0.1.55358: Flags [P.], cksum 0xfe48 (incorrect -> 0xc592), seq 67:99, ack 670, win 256, options [nop,nop,TS val 245537400 ecr 245537400], length 32: ZMTP/1.0
+	 frame flags+body  (8-bit) length 1, flags 0x01 (-|-|-|-|-|-|-|MORE)
+	 frame flags+body  (8-bit) length 29, flags 0x00 (-|-|-|-|-|-|-|-), first 28 byte(s) of body:
+	 0x0000:  5468 6973 2069 7320 6120 7368 6f72 7420  This.is.a.short.
+	 0x0010:  4153 4349 4920 7265 706c 792e            ASCII.reply.
+
+IP (tos 0x0, ttl 64, id 18000, offset 0, flags [DF], proto TCP (6), length 52)
+    127.0.0.1.55358 > 127.0.0.1.33000: Flags [F.], cksum 0xfe28 (incorrect -> 0x16d8), seq 670, ack 99, win 257, options [nop,nop,TS val 245537400 ecr 245537400], length 0
+IP (tos 0x0, ttl 64, id 51309, offset 0, flags [DF], proto TCP (6), length 52)
+    127.0.0.1.33000 > 127.0.0.1.55358: Flags [F.], cksum 0xfe28 (incorrect -> 0x16d8), seq 99, ack 671, win 256, options [nop,nop,TS val 245537400 ecr 245537400], length 0
+IP (tos 0x0, ttl 64, id 18001, offset 0, flags [DF], proto TCP (6), length 52)
+    127.0.0.1.55358 > 127.0.0.1.33000: Flags [.], cksum 0xfe28 (incorrect -> 0x16d7), ack 100, win 257, options [nop,nop,TS val 245537400 ecr 245537400], length 0
diff --git a/tests/zmtp1.pcap b/tests/zmtp1.pcap
new file mode 100644
index 0000000..55aebea
--- /dev/null
+++ b/tests/zmtp1.pcap
Binary files differ
diff --git a/tftp.h b/tftp.h
index 4408304..6a092e0 100644
--- a/tftp.h
+++ b/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.2 2008-04-11 16:47:38 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/timed.h b/timed.h
index 0a5c5fe..f8d5a11 100644
--- a/timed.h
+++ b/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.6 2008-02-05 19:46:19 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/token.h b/token.h
index 8e7fd6d..73a8271 100644
--- a/token.h
+++ b/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.
@@ -34,12 +34,12 @@
 #define FRAME_TYPE(trp)		(((trp)->token_fc & 0xC0) >> 6)
 #define TOKEN_FC_LLC		1
 
-#define BROADCAST(trp)		((ntohs((trp)->token_rcf) & 0xE000) >> 13)
-#define RIF_LENGTH(trp)		((ntohs((trp)->token_rcf) & 0x1f00) >> 8)
-#define DIRECTION(trp)		((ntohs((trp)->token_rcf) & 0x0080) >> 7)
-#define LARGEST_FRAME(trp)	((ntohs((trp)->token_rcf) & 0x0070) >> 4)
-#define RING_NUMBER(trp, x)	((ntohs((trp)->token_rseg[x]) & 0xfff0) >> 4)
-#define BRIDGE_NUMBER(trp, x)	((ntohs((trp)->token_rseg[x]) & 0x000f))
+#define BROADCAST(trp)		((EXTRACT_16BITS(&(trp)->token_rcf) & 0xE000) >> 13)
+#define RIF_LENGTH(trp)		((EXTRACT_16BITS(&(trp)->token_rcf) & 0x1f00) >> 8)
+#define DIRECTION(trp)		((EXTRACT_16BITS(&(trp)->token_rcf) & 0x0080) >> 7)
+#define LARGEST_FRAME(trp)	((EXTRACT_16BITS(&(trp)->token_rcf) & 0x0070) >> 4)
+#define RING_NUMBER(trp, x)	((EXTRACT_16BITS(&(trp)->token_rseg[x]) & 0xfff0) >> 4)
+#define BRIDGE_NUMBER(trp, x)	((EXTRACT_16BITS(&(trp)->token_rseg[x]) & 0x000f))
 #define SEGMENT_COUNT(trp)	((int)((RIF_LENGTH(trp) - 2) / 2))
 
 struct token_header {
diff --git a/udp.h b/udp.h
index dedc9c1..d712dfc 100644
--- a/udp.h
+++ b/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,14 +76,24 @@
 #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 VAT_PORT		3456
 #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 WB_PORT			4567
+#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 */
+#define OTV_PORT                8472  /* draft-hasmit-otv-04 */
+#define VXLAN_PORT              4789  /* draft-mahalingam-dutt-dcops-vxlan-04 */
 
 #ifdef INET6
 #define RIPNG_PORT 521		/*XXX*/
 #define DHCP6_SERV_PORT 546	/*XXX*/
 #define DHCP6_CLI_PORT 547	/*XXX*/
+#define BABEL_PORT 6696
+#define BABEL_PORT_OLD 6697
 #endif
diff --git a/util.c b/util.c
index 912f6f3..2ea7636 100644
--- a/util.c
+++ b/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 @@
 
 #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.
@@ -62,12 +64,12 @@
 			ret = 0;
 			break;
 		}
-		if (!isascii(c)) {
-			c = toascii(c);
+		if (!ND_ISASCII(c)) {
+			c = ND_TOASCII(c);
 			putchar('M');
 			putchar('-');
 		}
-		if (!isprint(c)) {
+		if (!ND_ISPRINT(c)) {
 			c ^= 0x40;	/* DEL to ?, others to alpha */
 			putchar('^');
 		}
@@ -90,12 +92,12 @@
 	while (n > 0 && (ep == NULL || s < ep)) {
 		n--;
 		c = *s++;
-		if (!isascii(c)) {
-			c = toascii(c);
+		if (!ND_ISASCII(c)) {
+			c = ND_TOASCII(c);
 			putchar('M');
 			putchar('-');
 		}
-		if (!isprint(c)) {
+		if (!ND_ISPRINT(c)) {
 			c ^= 0x40;	/* DEL to ?, others to alpha */
 			putchar('^');
 		}
@@ -124,12 +126,12 @@
 			ret = 0;
 			break;
 		}
-		if (!isascii(c)) {
-			c = toascii(c);
+		if (!ND_ISASCII(c)) {
+			c = ND_TOASCII(c);
 			putchar('M');
 			putchar('-');
 		}
-		if (!isprint(c)) {
+		if (!ND_ISPRINT(c)) {
 			c ^= 0x40;	/* DEL to ?, others to alpha */
 			putchar('^');
 		}
@@ -139,6 +141,19 @@
 }
 
 /*
+ * 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 @@
 	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 @@
 		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;
+                        /* init timestamp for first packet */
+                        b_usec = tvp->tv_usec;
+                        b_sec = tvp->tv_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;
+                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 @@
 		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,18 +316,19 @@
 
 /*
  * 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;
         register int rotbit; /* this is the bit we rotate through all bitpositions */
         register int tokval;
 
-	while (lp->s != NULL && lp != NULL) {
+	while (lp != NULL && lp->s != NULL) {
             tokval=lp->v;   /* load our first value */
             rotbit=1;
             while (rotbit != 0) {
@@ -318,7 +338,8 @@
                  */
 		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 @@
             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 @@
 }
 
 /*
+ * 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
@@ -367,7 +415,7 @@
  */
 
 int
-mask2plen (u_int32_t mask)
+mask2plen(u_int32_t mask)
 {
 	u_int32_t bitmasks[33] = {
 		0x00000000,
@@ -391,6 +439,35 @@
 	return (prefix_len);
 }
 
+#ifdef INET6
+int
+mask62plen(const u_char *mask)
+{
+	u_char bitmasks[9] = {
+		0x00,
+		0x80, 0xc0, 0xe0, 0xf0,
+		0xf8, 0xfc, 0xfe, 0xff
+	};
+	int byte;
+	int cidr_len = 0;
+
+	for (byte = 0; byte < 16; byte++) {
+		u_int bits;
+
+		for (bits = 0; bits < (sizeof (bitmasks) / sizeof (bitmasks[0])); bits++) {
+			if (mask[byte] == bitmasks[bits]) {
+				cidr_len += bits;
+				break;
+			}
+		}
+
+		if (mask[byte] != 0xff)
+			break;
+	}
+	return (cidr_len);
+}
+#endif /* INET6 */
+
 /* VARARGS */
 void
 error(const char *fmt, ...)
@@ -509,7 +586,8 @@
 void
 safeputs(const char *s, int maxlen)
 {
-    int idx = 0;
+	int idx = 0;
+
 	while (*s && idx < maxlen) {
 		safeputchar(*s);
                 idx++;
@@ -523,8 +601,28 @@
 	unsigned char ch;
 
 	ch = (unsigned char)(c & 0xff);
-	if (ch < 0x80 && isprint(ch))
+	if (ch < 0x80 && ND_ISPRINT(ch))
 		printf("%c", ch);
 	else
-		printf("\\%03o", ch);
+		printf("\\0x%02x", ch);
 }
+
+#ifdef LBL_ALIGN
+/*
+ * Some compilers try to optimize memcpy(), using the alignment constraint
+ * on the argument pointer type.  by using this function, we try to avoid the
+ * optimization.
+ */
+void
+unaligned_memcpy(void *p, const void *q, size_t l)
+{
+	memcpy(p, q, l);
+}
+
+/* As with memcpy(), so with memcmp(). */
+int
+unaligned_memcmp(const void *p, const void *q, size_t l)
+{
+	return (memcmp(p, q, l));
+}
+#endif
diff --git a/version.c b/version.c
index 12a1ba5..6481d27 100644
--- a/version.c
+++ b/version.c
@@ -1 +1 @@
-char version[] = "3.9.8";
+const char version[] = "4.5.1";
diff --git a/vfprintf.c b/vfprintf.c
index 354406c..6f8407a 100644
--- a/vfprintf.c
+++ b/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
diff --git a/missing/bittypes.h b/win32/Include/bittypes.h
similarity index 74%
rename from missing/bittypes.h
rename to win32/Include/bittypes.h
index 31013ae..95aa9fa 100644
--- a/missing/bittypes.h
+++ b/win32/Include/bittypes.h
@@ -26,62 +26,32 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
+#ifndef _BITTYPES_H
+#define _BITTYPES_H
+
 #ifndef HAVE_U_INT8_T
-
-#if SIZEOF_CHAR == 1
 typedef unsigned char u_int8_t;
-#elif SIZEOF_INT == 1
-typedef unsigned int u_int8_t;
-#else  /* XXX */
-#error "there's no appropriate type for u_int8_t"
-#endif
-
+typedef signed char int8_t;
 #endif /* HAVE_U_INT8_T */
 
 #ifndef HAVE_U_INT16_T
-
-#if SIZEOF_SHORT == 2
 typedef unsigned short u_int16_t;
-#elif SIZEOF_INT == 2
-typedef unsigned int u_int16_t;
-#elif SIZEOF_CHAR == 2
-typedef unsigned char u_int16_t;
-#else  /* XXX */
-#error "there's no appropriate type for u_int16_t"
-#endif
-
+typedef signed short int16_t;
 #endif /* HAVE_U_INT16_T */
 
 #ifndef HAVE_U_INT32_T
-
-#if SIZEOF_INT == 4
 typedef unsigned int u_int32_t;
-#elif SIZEOF_LONG == 4
-typedef unsigned long u_int32_t;
-#elif SIZEOF_SHORT == 4
-typedef unsigned short u_int32_t;
-#else  /* XXX */
-#error "there's no appropriate type for u_int32_t"
-#endif
-
+typedef signed int int32_t;
 #endif /* HAVE_U_INT32_T */
 
 #ifndef HAVE_U_INT64_T
-
-#if SIZEOF_LONG_LONG == 8
-typedef unsigned long long u_int64_t;
-#elif defined(_MSC_EXTENSIONS)
+#ifdef _MSC_EXTENSIONS
 typedef unsigned _int64 u_int64_t;
-#elif SIZEOF_INT == 8
-typedef unsigned int u_int64_t;
-#elif SIZEOF_LONG == 8
-typedef unsigned long u_int64_t;
-#elif SIZEOF_SHORT == 8
-typedef unsigned short u_int64_t;
-#else  /* XXX */
-#error "there's no appropriate type for u_int64_t"
-#endif
-
+typedef _int64 int64_t;
+#else /* _MSC_EXTENSIONS */
+typedef unsigned long long u_int64_t;
+typedef long long int64_t;
+#endif /* _MSC_EXTENSIONS */
 #endif /* HAVE_U_INT64_T */
 
 #ifndef PRId64
@@ -115,3 +85,5 @@
 #define PRIu64	"llu"
 #endif /* _MSC_EXTENSIONS */
 #endif /* PRIu64 */
+
+#endif /* _BITTYPES_H */
diff --git a/win32/Include/errno.h b/win32/Include/errno.h
new file mode 100644
index 0000000..7cf599f
--- /dev/null
+++ b/win32/Include/errno.h
@@ -0,0 +1,132 @@
+#ifndef _I386_ERRNO_H
+#define _I386_ERRNO_H
+
+#define	EPERM		 1	/* Operation not permitted */
+#define	ENOENT		 2	/* No such file or directory */
+#define	ESRCH		 3	/* No such process */
+#define	EINTR		 4	/* Interrupted system call */
+#define	EIO		 5	/* I/O error */
+#define	ENXIO		 6	/* No such device or address */
+#define	E2BIG		 7	/* Arg list too long */
+#define	ENOEXEC		 8	/* Exec format error */
+#define	EBADF		 9	/* Bad file number */
+#define	ECHILD		10	/* No child processes */
+#define	EAGAIN		11	/* Try again */
+#define	ENOMEM		12	/* Out of memory */
+#define	EACCES		13	/* Permission denied */
+#define	EFAULT		14	/* Bad address */
+#define	ENOTBLK		15	/* Block device required */
+#define	EBUSY		16	/* Device or resource busy */
+#define	EEXIST		17	/* File exists */
+#define	EXDEV		18	/* Cross-device link */
+#define	ENODEV		19	/* No such device */
+#define	ENOTDIR		20	/* Not a directory */
+#define	EISDIR		21	/* Is a directory */
+#define	EINVAL		22	/* Invalid argument */
+#define	ENFILE		23	/* File table overflow */
+#define	EMFILE		24	/* Too many open files */
+#define	ENOTTY		25	/* Not a typewriter */
+#define	ETXTBSY		26	/* Text file busy */
+#define	EFBIG		27	/* File too large */
+#define	ENOSPC		28	/* No space left on device */
+#define	ESPIPE		29	/* Illegal seek */
+#define	EROFS		30	/* Read-only file system */
+#define	EMLINK		31	/* Too many links */
+#define	EPIPE		32	/* Broken pipe */
+#define	EDOM		33	/* Math argument out of domain of func */
+#define	ERANGE		34	/* Math result not representable */
+#define	EDEADLK		35	/* Resource deadlock would occur */
+#define	ENAMETOOLONG	36	/* File name too long */
+#define	ENOLCK		37	/* No record locks available */
+#define	ENOSYS		38	/* Function not implemented */
+#define	ENOTEMPTY	39	/* Directory not empty */
+#define	ELOOP		40	/* Too many symbolic links encountered */
+#define	EWOULDBLOCK	EAGAIN	/* Operation would block */
+#define	ENOMSG		42	/* No message of desired type */
+#define	EIDRM		43	/* Identifier removed */
+#define	ECHRNG		44	/* Channel number out of range */
+#define	EL2NSYNC	45	/* Level 2 not synchronized */
+#define	EL3HLT		46	/* Level 3 halted */
+#define	EL3RST		47	/* Level 3 reset */
+#define	ELNRNG		48	/* Link number out of range */
+#define	EUNATCH		49	/* Protocol driver not attached */
+#define	ENOCSI		50	/* No CSI structure available */
+#define	EL2HLT		51	/* Level 2 halted */
+#define	EBADE		52	/* Invalid exchange */
+#define	EBADR		53	/* Invalid request descriptor */
+#define	EXFULL		54	/* Exchange full */
+#define	ENOANO		55	/* No anode */
+#define	EBADRQC		56	/* Invalid request code */
+#define	EBADSLT		57	/* Invalid slot */
+
+#define	EDEADLOCK	EDEADLK
+
+#define	EBFONT		59	/* Bad font file format */
+#define	ENOSTR		60	/* Device not a stream */
+#define	ENODATA		61	/* No data available */
+#define	ETIME		62	/* Timer expired */
+#define	ENOSR		63	/* Out of streams resources */
+#define	ENONET		64	/* Machine is not on the network */
+#define	ENOPKG		65	/* Package not installed */
+#define	EREMOTE		66	/* Object is remote */
+#define	ENOLINK		67	/* Link has been severed */
+#define	EADV		68	/* Advertise error */
+#define	ESRMNT		69	/* Srmount error */
+#define	ECOMM		70	/* Communication error on send */
+#define	EPROTO		71	/* Protocol error */
+#define	EMULTIHOP	72	/* Multihop attempted */
+#define	EDOTDOT		73	/* RFS specific error */
+#define	EBADMSG		74	/* Not a data message */
+#define	EOVERFLOW	75	/* Value too large for defined data type */
+#define	ENOTUNIQ	76	/* Name not unique on network */
+#define	EBADFD		77	/* File descriptor in bad state */
+#define	EREMCHG		78	/* Remote address changed */
+#define	ELIBACC		79	/* Can not access a needed shared library */
+#define	ELIBBAD		80	/* Accessing a corrupted shared library */
+#define	ELIBSCN		81	/* .lib section in a.out corrupted */
+#define	ELIBMAX		82	/* Attempting to link in too many shared libraries */
+#define	ELIBEXEC	83	/* Cannot exec a shared library directly */
+#define	EILSEQ		84	/* Illegal byte sequence */
+#define	ERESTART	85	/* Interrupted system call should be restarted */
+#define	ESTRPIPE	86	/* Streams pipe error */
+#define	EUSERS		87	/* Too many users */
+#define	ENOTSOCK	88	/* Socket operation on non-socket */
+#define	EDESTADDRREQ	89	/* Destination address required */
+#define	EMSGSIZE	90	/* Message too long */
+#define	EPROTOTYPE	91	/* Protocol wrong type for socket */
+#define	ENOPROTOOPT	92	/* Protocol not available */
+#define	EPROTONOSUPPORT	93	/* Protocol not supported */
+#define	ESOCKTNOSUPPORT	94	/* Socket type not supported */
+#define	EOPNOTSUPP	95	/* Operation not supported on transport endpoint */
+#define	EPFNOSUPPORT	96	/* Protocol family not supported */
+#define	EAFNOSUPPORT	97	/* Address family not supported by protocol */
+#define	EADDRINUSE	98	/* Address already in use */
+#define	EADDRNOTAVAIL	99	/* Cannot assign requested address */
+#define	ENETDOWN	100	/* Network is down */
+#define	ENETUNREACH	101	/* Network is unreachable */
+#define	ENETRESET	102	/* Network dropped connection because of reset */
+#define	ECONNABORTED	103	/* Software caused connection abort */
+#define	ECONNRESET	104	/* Connection reset by peer */
+#define	ENOBUFS		105	/* No buffer space available */
+#define	EISCONN		106	/* Transport endpoint is already connected */
+#define	ENOTCONN	107	/* Transport endpoint is not connected */
+#define	ESHUTDOWN	108	/* Cannot send after transport endpoint shutdown */
+#define	ETOOMANYREFS	109	/* Too many references: cannot splice */
+#define	ETIMEDOUT	110	/* Connection timed out */
+#define	ECONNREFUSED	111	/* Connection refused */
+#define	EHOSTDOWN	112	/* Host is down */
+#define	EHOSTUNREACH	113	/* No route to host */
+#define	EALREADY	114	/* Operation already in progress */
+#define	EINPROGRESS	115	/* Operation now in progress */
+#define	ESTALE		116	/* Stale NFS file handle */
+#define	EUCLEAN		117	/* Structure needs cleaning */
+#define	ENOTNAM		118	/* Not a XENIX named type file */
+#define	ENAVAIL		119	/* No XENIX semaphores available */
+#define	EISNAM		120	/* Is a named type file */
+#define	EREMOTEIO	121	/* Remote I/O error */
+#define	EDQUOT		122	/* Quota exceeded */
+
+#define	ENOMEDIUM	123	/* No medium found */
+#define	EMEDIUMTYPE	124	/* Wrong medium type */
+
+#endif
diff --git a/win32/Include/getopt.h b/win32/Include/getopt.h
new file mode 100644
index 0000000..b439ab1
--- /dev/null
+++ b/win32/Include/getopt.h
@@ -0,0 +1,138 @@
+/* Declarations for getopt.
+   Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+
+This file is part of the GNU C Library.
+
+The GNU C Library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public License as
+published by the Free Software Foundation; either version 2 of the
+License, or (at your option) any later version.
+
+The GNU C Library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with the GNU C Library; see the file COPYING.LIB.  If
+not, write to the Free Software Foundation, Inc., 675 Mass Ave,
+Cambridge, MA 02139, USA.  */
+
+#ifndef _GETOPT_H
+#define _GETOPT_H 1
+
+#ifdef	__cplusplus
+extern "C" {
+#endif
+
+/* For communication from `getopt' to the caller.
+   When `getopt' finds an option that takes an argument,
+   the argument value is returned here.
+   Also, when `ordering' is RETURN_IN_ORDER,
+   each non-option ARGV-element is returned here.  */
+
+#ifndef WIN32
+extern char *optarg;
+#endif
+
+/* Index in ARGV of the next element to be scanned.
+   This is used for communication to and from the caller
+   and for communication between successive calls to `getopt'.
+
+   On entry to `getopt', zero means this is the first call; initialize.
+
+   When `getopt' returns EOF, this is the index of the first of the
+   non-option elements that the caller should itself scan.
+
+   Otherwise, `optind' communicates from one call to the next
+   how much of ARGV has been scanned so far.  */
+
+#ifndef WIN32
+extern int optind;
+#endif
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+   for unrecognized options.  */
+
+#ifndef WIN32
+extern int opterr;
+#endif
+
+/* Set to an option character which was unrecognized.  */
+
+extern int optopt;
+
+/* Describe the long-named options requested by the application.
+   The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+   of `struct option' terminated by an element containing a name which is
+   zero.
+
+   The field `has_arg' is:
+   no_argument		(or 0) if the option does not take an argument,
+   required_argument	(or 1) if the option requires an argument,
+   optional_argument 	(or 2) if the option takes an optional argument.
+
+   If the field `flag' is not NULL, it points to a variable that is set
+   to the value given in the field `val' when the option is found, but
+   left unchanged if the option is not found.
+
+   To have a long-named option do something other than set an `int' to
+   a compiled-in constant, such as set a value from `optarg', set the
+   option's `flag' field to zero and its `val' field to a nonzero
+   value (the equivalent single-letter option character, if there is
+   one).  For long options that have a zero `flag' field, `getopt'
+   returns the contents of the `val' field.  */
+
+struct option
+{
+#if	__STDC__
+  const char *name;
+#else
+  char *name;
+#endif
+  /* has_arg can't be an enum because some compilers complain about
+     type mismatches in all the code that assumes it is an int.  */
+  int has_arg;
+  int *flag;
+  int val;
+};
+
+/* Names for the values of the `has_arg' field of `struct option'.  */
+
+#define	no_argument		0
+#define required_argument	1
+#define optional_argument	2
+
+#if __STDC__
+#if defined(__GNU_LIBRARY__)
+/* Many other libraries have conflicting prototypes for getopt, with
+   differences in the consts, in stdlib.h.  To avoid compilation
+   errors, only prototype getopt for the GNU C library.  */
+extern int getopt (int argc, char *const *argv, const char *shortopts);
+#else /* not __GNU_LIBRARY__ */
+extern int getopt ();
+#endif /* not __GNU_LIBRARY__ */
+extern int getopt_long (int argc, char *const *argv, const char *shortopts,
+		        const struct option *longopts, int *longind);
+extern int getopt_long_only (int argc, char *const *argv,
+			     const char *shortopts,
+		             const struct option *longopts, int *longind);
+
+/* Internal only.  Users should not call this directly.  */
+extern int _getopt_internal (int argc, char *const *argv,
+			     const char *shortopts,
+		             const struct option *longopts, int *longind,
+			     int long_only);
+#else /* not __STDC__ */
+extern int getopt ();
+extern int getopt_long ();
+extern int getopt_long_only ();
+
+extern int _getopt_internal ();
+#endif /* not __STDC__ */
+
+#ifdef	__cplusplus
+}
+#endif
+
+#endif /* _GETOPT_H */
diff --git a/win32/Include/w32_fzs.h b/win32/Include/w32_fzs.h
new file mode 100644
index 0000000..8b5e598
--- /dev/null
+++ b/win32/Include/w32_fzs.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 1999
+ * NetGroup, Politecnico di Torino (Italy)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the Politecnico di Torino 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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#ifndef _WINSOCKAPI_
+#define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */
+#endif /* _WINSOCKAPI_ */
+#include <windows.h>
+#include <winsock2.h>
+
+extern int progress;
+int wsockinit();
+void InitP();
+void PrintCapBegins (char* program_name, char* device);
+extern char* AdapterName1;
+#ifndef WIN95
+WCHAR* SChar2WChar(char* nome);
+#else
+BOOLEAN StartPacketDriver(LPTSTR ServiceName);
+#endif
diff --git a/win32/Src/getopt.c b/win32/Src/getopt.c
new file mode 100644
index 0000000..be74ef0
--- /dev/null
+++ b/win32/Src/getopt.c
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 1987, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. 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 BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)getopt.c	8.3 (Berkeley) 4/27/95";
+#endif /* LIBC_SCCS and not lint */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+int	opterr = 1,		/* if error message should be printed */
+	optind = 1,		/* index into parent argv vector */
+	optopt,			/* character checked for validity */
+	optreset;		/* reset getopt */
+char	*optarg;		/* argument associated with option */
+
+#define	BADCH	(int)'?'
+#define	BADARG	(int)':'
+#define	EMSG	""
+
+/*
+ * getopt --
+ *	Parse argc/argv argument vector.
+ */
+int
+getopt(nargc, nargv, ostr)
+	int nargc;
+	char * const *nargv;
+	const char *ostr;
+{
+	extern char *program_name;
+	static char *place = EMSG;		/* option letter processing */
+	char *oli;				/* option letter list index */
+
+	if (optreset || !*place) {		/* update scanning pointer */
+		optreset = 0;
+		if (optind >= nargc || *(place = nargv[optind]) != '-') {
+			place = EMSG;
+			return (-1);
+		}
+		if (place[1] && *++place == '-') {	/* found "--" */
+			++optind;
+			place = EMSG;
+			return (-1);
+		}
+	}					/* option letter okay? */
+	if ((optopt = (int)*place++) == (int)':' ||
+	    !(oli = strchr(ostr, optopt))) {
+		/*
+		 * if the user didn't specify '-' as an option,
+		 * assume it means -1.
+		 */
+		if (optopt == (int)'-')
+			return (-1);
+		if (!*place)
+			++optind;
+		if (opterr && *ostr != ':')
+			(void)fprintf(stderr,
+			    "%s: illegal option -- %c\n", program_name, optopt);
+		return (BADCH);
+	}
+	if (*++oli != ':') {			/* don't need argument */
+		optarg = NULL;
+		if (!*place)
+			++optind;
+	}
+	else {					/* need an argument */
+		if (*place)			/* no white space */
+			optarg = place;
+		else if (nargc <= ++optind) {	/* no arg */
+			place = EMSG;
+			if (*ostr == ':')
+				return (BADARG);
+			if (opterr)
+				(void)fprintf(stderr,
+				    "%s: option requires an argument -- %c\n",
+				    program_name, optopt);
+			return (BADCH);
+		}
+	 	else				/* white space */
+			optarg = nargv[optind];
+		place = EMSG;
+		++optind;
+	}
+	return (optopt);			/* dump back option letter */
+}
diff --git a/win32/prj/GNUmakefile b/win32/prj/GNUmakefile
new file mode 100644
index 0000000..bffdaaa
--- /dev/null
+++ b/win32/prj/GNUmakefile
@@ -0,0 +1,175 @@
+# Makefile for cygwin gcc
+# Nate Lawson <nate@rootlabs.oom>
+
+# Location of your pcap src tree, build it first
+PCAP_DIR = ../../../winpcap
+
+# OPTFLAGS = -g
+OPTFLAGS = -O
+# -O2 may break things. Use at your own risk.
+
+CFLAGS = -I ${PCAP_DIR}/wpcap/libpcap/bpf \
+	-I ${PCAP_DIR}/wpcap/libpcap \
+	-I ${PCAP_DIR}/wpcap/libpcap/Win32/Include \
+	-I ${PCAP_DIR}/wpcap/libpcap/Win32/Include/net \
+	-I ../../Win32/Include -I ../../linux-Include \
+	-I ../../lbl -I../.. \
+	-DWIN32 -DINET6 -DHAVE_ADDRINFO=1 -DHAVE_SOCKADDR_STORAGE=1 \
+	-DHAVE_PCAP_LIST_DATALINKS=1 -DHAVE_PCAP_SET_DATALINK=1 \
+	-DHAVE_PCAP_DATALINK_NAME_TO_VAL=1 \
+	-DHAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION=1 \
+	-DHAVE_PCAP_DUMP_FTELL=1 -DHAVE_BPF_DUMP=1 \
+	-DHAVE_PCAP_DUMP_FLUSH=1 -DHAVE_PCAP_FINDALLDEVS=1 \
+	-DHAVE_PCAP_IF_T=1 -DHAVE_PCAP_LIB_VERSION=1 \
+	-D_U_="__attribute__((unused))" \
+	-D_WIN32_WINNT=0x0501 \
+	-mno-cygwin ${OPTFLAGS}
+LDFLAGS = 
+LIBS = -L ${PCAP_DIR}/WPCAP/LIB -lwpcap -lws2_32
+OBJS = \
+	../../addrtoname.o \
+	../../af.o \
+	../../checksum.o \
+	../../gmpls.o \
+	../../gmt2local.o \
+	../../missing/inet_aton.o \
+	../../missing/inet_ntop.o \
+	../../missing/strlcpy.o \
+	../../missing/dlnames.o \
+	../../missing/datalinks.o \
+	../../missing/strsep.o \
+	../../missing/inet_pton.o \
+	../../machdep.o \
+	../../oui.o \
+	../../parsenfsfh.o \
+	../../print-802_11.o \
+	../../print-ah.o \
+	../../print-aodv.o \
+	../../print-ap1394.o \
+	../../print-arcnet.o \
+	../../print-arp.o \
+	../../print-ascii.o \
+	../../print-atalk.o \
+	../../print-atm.o \
+	../../print-beep.o \
+	../../print-bfd.o \
+	../../print-bgp.o \
+	../../print-bootp.o \
+	../../print-cdp.o \
+	../../print-cfm.o \
+	../../print-chdlc.o \
+	../../print-cip.o \
+	../../print-cnfp.o \
+	../../print-decnet.o \
+	../../print-dhcp6.o \
+	../../print-domain.o \
+	../../print-dtp.o \
+	../../print-dvmrp.o \
+	../../print-egp.o \
+	../../print-enc.o \
+	../../print-esp.o \
+	../../print-ether.o \
+	../../print-fddi.o \
+	../../print-fr.o \
+	../../print-frag6.o \
+	../../print-gre.o \
+	../../print-hsrp.o \
+	../../print-icmp.o \
+	../../print-icmp6.o \
+	../../print-igmp.o \
+	../../print-igrp.o \
+	../../print-ip.o \
+	../../print-ip6.o \
+	../../print-ip6opts.o \
+	../../print-ipcomp.o \
+	../../print-ipfc.o \
+	../../print-ipx.o \
+	../../print-isakmp.o \
+	../../print-isoclns.o \
+	../../print-krb.o \
+	../../print-l2tp.o \
+	../../print-lane.o \
+	../../print-ldp.o \
+	../../print-lldp.o \
+	../../print-llc.o \
+	../../print-lwapp.o \
+	../../print-lwres.o \
+	../../print-mobile.o \
+	../../print-mobility.o \
+	../../print-mpcp.o \
+	../../print-mpls.o \
+	../../print-msdp.o \
+	../../print-nfs.o \
+	../../print-ntp.o \
+	../../print-null.o \
+	../../print-olsr.o \
+	../../print-ospf.o \
+	../../print-ospf6.o \
+	../../print-pim.o \
+	../../print-pgm.o \
+	../../print-ppp.o \
+	../../print-pppoe.o \
+	../../print-pptp.o \
+	../../print-radius.o \
+	../../print-raw.o \
+	../../print-rrcp.o \
+	../../print-rip.o \
+	../../print-ripng.o \
+	../../print-rsvp.o \
+	../../print-rt6.o \
+	../../print-rx.o \
+	../../print-sctp.o \
+	../../print-sflow.o \
+	../../print-sl.o \
+	../../print-sll.o \
+	../../print-slow.o \
+	../../print-smb.o \
+	../../print-snmp.o \
+	../../print-stp.o \
+	../../print-sunatm.o \
+	../../print-sunrpc.o \
+	../../print-symantec.o \
+	../../print-tcp.o \
+	../../print-telnet.o \
+	../../print-tftp.o \
+	../../print-timed.o \
+	../../print-token.o \
+	../../print-udld.o \
+	../../print-udp.o \
+	../../print-vjc.o \
+	../../print-vqp.o \
+	../../print-vrrp.o \
+        ../../print-vtp.o \
+	../../print-wb.o \
+	../../print-zephyr.o \
+	../../setsignal.o \
+	../../smbutil.o \
+	../../tcpdump.o \
+	../../util.o \
+	../../Win32/src/getopt.o \
+	../../cpack.o \
+	../../ipproto.o \
+	../../l2vpn.o \
+	../../nlpid.o \
+	../../print-eigrp.o \
+	../../print-juniper.o \
+	../../print-lspping.o \
+	../../print-sip.o \
+	../../print-eap.o \
+	../../print-lmp.o \
+	../../print-syslog.o \
+	../../print-dccp.o \
+	../../print-bt.o \
+	../../signature.o
+
+main: ${OBJS}
+	${CC} ${CFLAGS} ${LDFLAGS} -o windump.exe ${OBJS} ${LIBS}
+
+install: windump.exe
+	cp windump.exe c:/windows
+
+clean:
+	rm -f ${OBJS} windump.exe
+
+.c.o:
+	${CC} ${CFLAGS} -o $*.o -c $<
diff --git a/win32/prj/WinDump.dsp b/win32/prj/WinDump.dsp
new file mode 100644
index 0000000..f3b3513
--- /dev/null
+++ b/win32/prj/WinDump.dsp
@@ -0,0 +1,639 @@
+# Microsoft Developer Studio Project File - Name="WinDump" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=WinDump - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "WinDump.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "WinDump.mak" CFG="WinDump - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "WinDump - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "WinDump - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 1
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "WinDump - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "../../"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "../../../winpcap/wpcap/libpcap/bpf" /I "../../../winpcap/wpcap/libpcap" /I "../../../winpcap/wpcap/libpcap/Win32/Include" /I "../../../winpcap/wpcap/libpcap/Win32/Include/net" /I "../../Win32/Include" /I "../../linux-Include" /I "../../lbl" /I "../../" /I "../../../winpcap/wpcap/win32-extensions" /D "NDEBUG" /D "INET6" /D "WIN32" /D "_MBCS" /D "_CONSOLE" /D "__STDC__" /D "WPCAP" /D HAVE_ADDRINFO=1 /D HAVE_SOCKADDR_STORAGE=1 /D HAVE_PCAP_LIST_DATALINKS=1 /D HAVE_PCAP_SET_DATALINK=1 /D HAVE_PCAP_DATALINK_NAME_TO_VAL=1 /D HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION=1 /D HAVE_PCAP_DUMP_FTELL=1 /D HAVE_BPF_DUMP=1 /D HAVE_PCAP_DUMP_FLUSH=1 /D HAVE_PCAP_FINDALLDEVS=1 /D HAVE_PCAP_IF_T=1 /D HAVE_PCAP_LIB_VERSION=1 /D "HAVE_REMOTE" /D _U_= /YX /FD /c
+# ADD BASE RSC /l 0x410 /d "NDEBUG"
+# ADD RSC /l 0x410 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib wpcap.lib /nologo /subsystem:console /machine:I386 /out:"release/WinDump.exe" /libpath:"../../../winpcap/wpcap/lib"
+
+!ELSEIF  "$(CFG)" == "WinDump - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WinDump_"
+# PROP BASE Intermediate_Dir "WinDump_"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "../../"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /Gm /Gi /GX /ZI /I "../../../winpcap/wpcap/libpcap/bpf" /I "../../../winpcap/wpcap/libpcap" /I "../../../winpcap/wpcap/libpcap/Win32/Include" /I "../../../winpcap/wpcap/libpcap/Win32/Include/net" /I "../../Win32/Include" /I "../../linux-Include" /I "../../lbl" /I "../../" /I "../../../winpcap/wpcap/win32-extensions" /D "_DEBUG" /D "_WINDOWS" /D "INET6" /D "WIN32" /D "_MBCS" /D "_CONSOLE" /D "__STDC__" /D "WPCAP" /D HAVE_ADDRINFO=1 /D HAVE_SOCKADDR_STORAGE=1 /D HAVE_PCAP_LIST_DATALINKS=1 /D HAVE_PCAP_SET_DATALINK=1 /D HAVE_PCAP_DATALINK_NAME_TO_VAL=1 /D HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION=1 /D HAVE_PCAP_DUMP_FTELL=1 /D HAVE_BPF_DUMP=1 /D HAVE_PCAP_DUMP_FLUSH=1 /D HAVE_PCAP_FINDALLDEVS=1 /D HAVE_PCAP_IF_T=1 /D HAVE_PCAP_LIB_VERSION=1 /D "HAVE_REMOTE" /D _U_= /FR /YX /FD /c
+# ADD BASE RSC /l 0x410 /d "_DEBUG"
+# ADD RSC /l 0x410 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 wpcap.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /map /debug /debugtype:both /machine:I386 /out:"debug/WinDump.exe" /pdbtype:sept /libpath:"../../../winpcap/wpcap/lib"
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF 
+
+# Begin Target
+
+# Name "WinDump - Win32 Release"
+# Name "WinDump - Win32 Debug"
+# Begin Source File
+
+SOURCE=..\..\addrtoname.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\af.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\bpf_dump.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\checksum.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\cpack.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\missing\datalinks.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\missing\dlnames.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\Src\getopt.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\gmpls.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\gmt2local.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\missing\inet_aton.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\missing\inet_ntop.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\missing\inet_pton.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\ipproto.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\l2vpn.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\machdep.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\nlpid.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\oui.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\parsenfsfh.c
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-802_11.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ah.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-aodv.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ap1394.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-arcnet.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-arp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ascii.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-atalk.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-atm.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-beep.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-bfd.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-bgp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-bootp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-bt.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-cdp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-cfm.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-chdlc.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-cip.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-cnfp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-dccp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-decnet.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-dhcp6.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-domain.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-dtp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-dvmrp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-eap.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-egp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-eigrp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-enc.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-esp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ether.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-fddi.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-fr.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-frag6.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-gre.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-hsrp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-icmp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-icmp6.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-igmp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-igrp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ip.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ip6.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ip6opts.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ipcomp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ipfc.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ipx.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-isakmp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-isoclns.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-juniper.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-krb.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-l2tp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-lane.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ldp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-llc.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-lldp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-lmp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-lspping.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-lwapp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-lwres.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-mobile.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-mobility.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-mpcp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-mpls.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-msdp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-netbios.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-nfs.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ntp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-null.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-olsr.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ospf.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ospf6.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-pgm.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-pim.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ppp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-pppoe.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-pptp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-radius.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-raw.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-rrcp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-rip.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-ripng.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-rpki-rtr.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-rsvp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-rt6.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-rx.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-sctp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-sflow.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-sip.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-sl.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-sll.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-slow.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-smb.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-snmp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-stp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-sunatm.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-sunrpc.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-symantec.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-syslog.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-tcp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-telnet.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-tftp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-timed.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-token.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-udld.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-udp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-vjc.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-vqp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-vrrp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-vtp.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-wb.c"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\print-zephyr.c"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\setsignal.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\smbutil.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\strcasecmp.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\missing\strlcat.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\missing\strlcpy.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\missing\strsep.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\Tcpdump.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\util.c
+# End Source File
+# End Target
+# End Project
diff --git a/win32/prj/WinDump.dsw b/win32/prj/WinDump.dsw
new file mode 100644
index 0000000..6bf7408
--- /dev/null
+++ b/win32/prj/WinDump.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "WinDump"=".\WinDump.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/win32/prj/WinDump.sln b/win32/prj/WinDump.sln
new file mode 100644
index 0000000..55a842f
--- /dev/null
+++ b/win32/prj/WinDump.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinDump", "WinDump.vcproj", "{CA799811-AF71-4C88-BBDA-CDC49B13758B}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{CA799811-AF71-4C88-BBDA-CDC49B13758B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{CA799811-AF71-4C88-BBDA-CDC49B13758B}.Debug|Win32.Build.0 = Debug|Win32
+		{CA799811-AF71-4C88-BBDA-CDC49B13758B}.Release|Win32.ActiveCfg = Release|Win32
+		{CA799811-AF71-4C88-BBDA-CDC49B13758B}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/win32/prj/WinDump.vcproj b/win32/prj/WinDump.vcproj
new file mode 100644
index 0000000..d42d4bc
--- /dev/null
+++ b/win32/prj/WinDump.vcproj
@@ -0,0 +1,3250 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="WinDump"
+	ProjectGUID="{CA799811-AF71-4C88-BBDA-CDC49B13758B}"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\../.."
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\../../WinDump.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="4"
+				AdditionalIncludeDirectories="../../../winpcap/wpcap/libpcap/bpf,../../../winpcap/wpcap/libpcap,../../../winpcap/wpcap/libpcap/Win32/Include,../../../winpcap/wpcap/libpcap/Win32/Include/net,../../Win32/Include,../../linux-Include,../../lbl,../../,../../../winpcap/wpcap/win32-extensions"
+				PreprocessorDefinitions="_DEBUG;_WINDOWS;INET6;WIN32;_CONSOLE;__STDC__;WPCAP;HAVE_ADDRINFO=1;HAVE_SOCKADDR_STORAGE=1;HAVE_PCAP_LIST_DATALINKS=1;HAVE_PCAP_SET_DATALINK=1;HAVE_PCAP_DATALINK_NAME_TO_VAL=1;HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION=1;HAVE_PCAP_DUMP_FTELL=1;HAVE_BPF_DUMP=1;HAVE_PCAP_DUMP_FLUSH=1;HAVE_PCAP_FINDALLDEVS=1;HAVE_PCAP_IF_T=1;HAVE_PCAP_LIB_VERSION=1;HAVE_REMOTE;_U_=;_CRT_SECURE_NO_WARNINGS"
+				MinimalRebuild="true"
+				RuntimeLibrary="1"
+				PrecompiledHeaderFile=".\Debug/WinDump.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				BrowseInformation="1"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1040"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="wpcap.lib odbc32.lib odbccp32.lib wsock32.lib"
+				OutputFile="debug/WinDump.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="../../../winpcap/wpcap/PRJ/Debug/x86"
+				GenerateDebugInformation="true"
+				ProgramDatabaseFile=".\../../WinDump.pdb"
+				GenerateMapFile="true"
+				MapFileName=".\Debug/WinDump.map"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\../../WinDump.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\../.."
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\../../WinDump.tlb"
+				HeaderFileName=""
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="../../../winpcap/wpcap/libpcap/bpf,../../../winpcap/wpcap/libpcap,../../../winpcap/wpcap/libpcap/Win32/Include,../../../winpcap/wpcap/libpcap/Win32/Include/net,../../Win32/Include,../../linux-Include,../../lbl,../../,../../../winpcap/wpcap/win32-extensions"
+				PreprocessorDefinitions="NDEBUG;INET6;WIN32;_CONSOLE;__STDC__;WPCAP;HAVE_ADDRINFO=1;HAVE_SOCKADDR_STORAGE=1;HAVE_PCAP_LIST_DATALINKS=1;HAVE_PCAP_SET_DATALINK=1;HAVE_PCAP_DATALINK_NAME_TO_VAL=1;HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION=1;HAVE_PCAP_DUMP_FTELL=1;HAVE_BPF_DUMP=1;HAVE_PCAP_DUMP_FLUSH=1;HAVE_PCAP_FINDALLDEVS=1;HAVE_PCAP_IF_T=1;HAVE_PCAP_LIB_VERSION=1;HAVE_REMOTE;_U_=;_CRT_SECURE_NO_WARNINGS"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				PrecompiledHeaderFile=".\Release/WinDump.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="true"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1040"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="odbc32.lib odbccp32.lib wsock32.lib wpcap.lib"
+				OutputFile="release/WinDump.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="true"
+				AdditionalLibraryDirectories="../../../winpcap/wpcap/PRJ/Release/x86"
+				ProgramDatabaseFile=".\../../WinDump.pdb"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="true"
+				OutputFile=".\../../WinDump.bsc"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<File
+			RelativePath="..\..\addrtoname.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\af.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\bpf_dump.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\checksum.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\cpack.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\missing\datalinks.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\missing\dlnames.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\Src\getopt.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\gmpls.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\gmt2local.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\missing\inet_aton.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\missing\inet_ntop.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\missing\inet_pton.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\ipproto.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\l2vpn.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\machdep.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\nlpid.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\oui.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\parsenfsfh.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-802_11.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ah.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-aodv.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ap1394.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-arcnet.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-arp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ascii.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-atalk.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-atm.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-beep.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-bfd.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-bgp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-bootp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-bt.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-cdp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-cfm.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-chdlc.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-cip.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-cnfp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-dccp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-decnet.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-dhcp6.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-domain.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-dtp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-dvmrp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-eap.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-egp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-eigrp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-enc.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-esp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ether.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-fddi.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-fr.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-frag6.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-gre.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-hsrp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-icmp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-icmp6.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-igmp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-igrp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ip.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ip6.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ip6opts.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ipcomp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ipfc.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ipx.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-isakmp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-isoclns.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-juniper.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-krb.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-l2tp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-lane.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ldp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-llc.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-lldp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-lmp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-lspping.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-lwapp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-lwres.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-mobile.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-mobility.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-mpcp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-mpls.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-msdp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-netbios.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-nfs.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ntp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-null.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-olsr.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ospf.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ospf6.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-pgm.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-pim.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ppp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-pppoe.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-pptp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-radius.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-raw.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-rip.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-ripng.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-rpki-rtr.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-rrcp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-rsvp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-rt6.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-rx.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-sctp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-sflow.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-sip.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-sl.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-sll.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-slow.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-smb.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-snmp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-stp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-sunatm.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-sunrpc.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-symantec.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-syslog.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-tcp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-telnet.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-tftp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-timed.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-token.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-udld.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-udp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-vjc.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-vqp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-vrrp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-vtp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-wb.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\print-zephyr.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\setsignal.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\signature.c"
+			>
+		</File>
+		<File
+			RelativePath="..\..\smbutil.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\strcasecmp.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\missing\strlcat.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\missing\strlcpy.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\missing\strsep.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\Tcpdump.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+		<File
+			RelativePath="..\..\util.c"
+			>
+			<FileConfiguration
+				Name="Debug|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+			<FileConfiguration
+				Name="Release|Win32"
+				>
+				<Tool
+					Name="VCCLCompilerTool"
+					AdditionalIncludeDirectories=""
+					PreprocessorDefinitions=""
+				/>
+			</FileConfiguration>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>