summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfenner <fenner@FreeBSD.org>2003-03-02 08:22:26 +0000
committerfenner <fenner@FreeBSD.org>2003-03-02 08:22:26 +0000
commit5f76ebca43302f98858e83a6212d9c610e939bad (patch)
treec244ceda18deb5fc8e576971e1e83b7b631f5219
parent24ede2d805a7ffac09999aafe7d4f285e45a6edd (diff)
downloadFreeBSD-src-5f76ebca43302f98858e83a6212d9c610e939bad.zip
FreeBSD-src-5f76ebca43302f98858e83a6212d9c610e939bad.tar.gz
Import tcpdump 3.7.2 (fudging for multi-DLT support) from
http://www.tcpdump.org/release/tcpdump-3.7.2.tar.gz
-rw-r--r--contrib/tcpdump/CHANGES24
-rw-r--r--contrib/tcpdump/CREDITS7
-rw-r--r--contrib/tcpdump/FILES2
-rw-r--r--contrib/tcpdump/INSTALL96
-rw-r--r--contrib/tcpdump/README28
-rw-r--r--contrib/tcpdump/VERSION2
-rw-r--r--contrib/tcpdump/aclocal.m447
-rw-r--r--contrib/tcpdump/addrtoname.c14
-rw-r--r--contrib/tcpdump/config.h.in6
-rwxr-xr-xcontrib/tcpdump/configure536
-rwxr-xr-xcontrib/tcpdump/configure.in6
-rw-r--r--contrib/tcpdump/gmt2local.c5
-rw-r--r--contrib/tcpdump/interface.h16
-rw-r--r--contrib/tcpdump/print-802_11.c70
-rw-r--r--contrib/tcpdump/print-arcnet.c5
-rw-r--r--contrib/tcpdump/print-arp.c16
-rw-r--r--contrib/tcpdump/print-atalk.c15
-rw-r--r--contrib/tcpdump/print-beep.c16
-rw-r--r--contrib/tcpdump/print-bgp.c26
-rw-r--r--contrib/tcpdump/print-bootp.c40
-rw-r--r--contrib/tcpdump/print-dhcp6.c400
-rw-r--r--contrib/tcpdump/print-egp.c3
-rw-r--r--contrib/tcpdump/print-esp.c10
-rw-r--r--contrib/tcpdump/print-ether.c5
-rw-r--r--contrib/tcpdump/print-fddi.c4
-rw-r--r--contrib/tcpdump/print-gre.c3
-rw-r--r--contrib/tcpdump/print-icmp.c5
-rw-r--r--contrib/tcpdump/print-icmp6.c4
-rw-r--r--contrib/tcpdump/print-igmp.c4
-rw-r--r--contrib/tcpdump/print-ip.c22
-rw-r--r--contrib/tcpdump/print-isakmp.c22
-rw-r--r--contrib/tcpdump/print-isoclns.c22
-rw-r--r--contrib/tcpdump/print-l2tp.c117
-rw-r--r--contrib/tcpdump/print-mobile.c3
-rw-r--r--contrib/tcpdump/print-mpls.c35
-rw-r--r--contrib/tcpdump/print-nfs.c44
-rw-r--r--contrib/tcpdump/print-ntp.c4
-rw-r--r--contrib/tcpdump/print-null.c7
-rw-r--r--contrib/tcpdump/print-pim.c16
-rw-r--r--contrib/tcpdump/print-radius.c9
-rw-r--r--contrib/tcpdump/print-raw.c4
-rw-r--r--contrib/tcpdump/print-rx.c14
-rw-r--r--contrib/tcpdump/print-sctp.c71
-rw-r--r--contrib/tcpdump/print-sll.c5
-rw-r--r--contrib/tcpdump/print-smb.c32
-rw-r--r--contrib/tcpdump/print-snmp.c24
-rw-r--r--contrib/tcpdump/print-stp.c4
-rw-r--r--contrib/tcpdump/print-sunrpc.c5
-rw-r--r--contrib/tcpdump/print-zephyr.c8
-rw-r--r--contrib/tcpdump/smbutil.c27
-rw-r--r--contrib/tcpdump/util.c8
51 files changed, 1009 insertions, 909 deletions
diff --git a/contrib/tcpdump/CHANGES b/contrib/tcpdump/CHANGES
index d293a11..e0e4cb8 100644
--- a/contrib/tcpdump/CHANGES
+++ b/contrib/tcpdump/CHANGES
@@ -1,4 +1,24 @@
-$Header: /tcpdump/master/tcpdump/CHANGES,v 1.81 2002/01/21 11:03:33 mcr Exp $
+$Header: /tcpdump/master/tcpdump/CHANGES,v 1.81.2.1 2003/02/26 07:08:58 fenner Exp $
+
+Tuesday, February 25, 2003. fenner@research.att.com. 3.7.2 release
+
+ Fixed infinite loop when parsing malformed isakmp packets.
+ (reported by iDefense; already fixed in CVS)
+ Fixed infinite loop when parsing malformed BGP packets.
+ Fixed buffer overflow with certain malformed NFS packets.
+ Pretty-print unprintable network names in 802.11 printer.
+ Handle truncated nbp (appletalk) packets.
+ Updated DHCPv6 printer to match draft-ietf-dhc-dhcpv6-22.txt
+ Print IP protocol name even if we don't have a printer for it.
+ Print IP protocol name or number for fragments.
+ Print the whole MPLS label stack, not just the top label.
+ Print request header and file handle for NFS v3 FSINFO and PATHCONF
+ requests.
+ Fix NFS packet truncation checks.
+ Handle "old" DR-Priority and Bidir-Capable PIM HELLO options.
+ Handle unknown RADIUS attributes properly.
+ Fix an ASN.1 parsing error that would cause e.g. the OID
+ 2.100.3 to be misrepresented as 4.20.3 .
Monday, January 21, 2002. mcr@sandelman.ottawa.on.ca. Summary for 3.7 release
see http://www.tcpdump.org/cvs-log/2002-01-21.10:16:48.html for commit log.
@@ -653,4 +673,4 @@ v2.0 Sun Jan 13 12:20:40 PST 1991
- Initial public release.
-@(#) $Header: /tcpdump/master/tcpdump/CHANGES,v 1.81 2002/01/21 11:03:33 mcr Exp $ (LBL)
+@(#) $Header: /tcpdump/master/tcpdump/CHANGES,v 1.81.2.1 2003/02/26 07:08:58 fenner Exp $ (LBL)
diff --git a/contrib/tcpdump/CREDITS b/contrib/tcpdump/CREDITS
index e766e89..9f0d253 100644
--- a/contrib/tcpdump/CREDITS
+++ b/contrib/tcpdump/CREDITS
@@ -13,6 +13,7 @@ The current maintainers:
Additional people who have contributed patches:
Alfredo Andres <aandres@s21sec.com>
+ Andrew Hintz <adhintz@users.sourceforge.net>
Andrew Tridgell <tridge@linuxcare.com>
Arkadiusz Miskiewicz <misiek@pld.org.pl>
Armando L. Caro Jr. <acaro@mail.eecis.udel.edu>
@@ -46,13 +47,14 @@ Additional people who have contributed patches:
Kazushi Sugyo <sugyo@pb.jp.nec.com>
Kelly Carmichael <kcarmich@ipapp.com>
Ken Hornstein <kenh@cmf.nrl.navy.mil>
- Kevin Steves <stevesk@sweden.hp.com>
+ Kevin Steves <stevesk@pobox.com>
Klaus Klein <kleink@reziprozitaet.de>
Kris Kennaway <kris@freebsd.org>
Larry Lile <lile@stdio.com>
Lennert Buytenhek <buytenh@gnu.org>
Love Hörnquist-Åstrand <lha@stacken.kth.se>
Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+ Marc A. Lehmann <pcg@goof.com>
Marko Kiiskila <carnil@cs.tut.fi>
Marshall Rose <mrose@dbc.mtview.ca.us>
Martin Husemann <martin@netbsd.org>
@@ -72,11 +74,12 @@ Additional people who have contributed patches:
Peter Jeremy <peter.jeremy@alcatel.com.au>
Rafal Maszkowski <rzm@icm.edu.pl>
Rick Jones <raj@cup.hp.com>
+ Rick Watson <watsonrick@users.sourceforge.net>
Roderick Schertler <roderick@argon.org>
Sebastian Krahmer <krahmer@cs.uni-potsdam.de>
Seth Webster <swebster@sst.ll.mit.edu>
Timo Koskiahde
- Tony Li <tli@jnx.com>
+ Tony Li <tli@procket.com>
Uns Lider <unslider@miranda.org>
Wilbert de Graaf <wilbertdg@hetnet.nl>
diff --git a/contrib/tcpdump/FILES b/contrib/tcpdump/FILES
index 3b4f3d4..c65384e 100644
--- a/contrib/tcpdump/FILES
+++ b/contrib/tcpdump/FILES
@@ -23,8 +23,6 @@ config.sub
configure
configure.in
decnet.h
-dhcp6.h
-dhcp6opt.h
esp.h
ether.h
ethertype.h
diff --git a/contrib/tcpdump/INSTALL b/contrib/tcpdump/INSTALL
index 5e5af94..80a1c4a 100644
--- a/contrib/tcpdump/INSTALL
+++ b/contrib/tcpdump/INSTALL
@@ -1,4 +1,4 @@
-@(#) $Header: /tcpdump/master/tcpdump/INSTALL,v 1.47 2000/12/16 09:07:45 guy Exp $ (LBL)
+@(#) $Header: /tcpdump/master/tcpdump/INSTALL,v 1.47.6.1 2002/07/16 04:41:57 guy Exp $ (LBL)
If you have not built libpcap, do so first. See the README
file in this directory for the ftp location.
@@ -27,8 +27,8 @@ Note that most systems ship tcpdump, but usually an older version.
Remember to remove or rename the installed binary when upgrading.
If you use Linux, this version of libpcap is known to compile and run
-with 2.0.25 and more modern, and 2.2.x kernels. It is guaranteed not
-to work with 1.X kernels.
+with 2.0.25 and more modern, and 2.2 and later, kernels. It is
+guaranteed not to work with 1.X kernels.
If your system is not one which we have tested tcpdump on, you may have
to modify the configure script and Makefile.in. Please send us patches
@@ -43,6 +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
+LICENSE - the license under which tcpdump is distributed
Makefile.in - compilation rules (input to the configure script)
README - description of distribution
VERSION - version of this release
@@ -50,32 +51,40 @@ acconfig.h - autoconf input
aclocal.m4 - autoconf macros
addrtoname.c - address to hostname routines
addrtoname.h - address to hostname definitions
+ah.h - IPSEC Authentication Header definitions
appletalk.h - AppleTalk definitions
+arcnet.h - ARCNET definitions
atime.awk - TCP ack awk script
bootp.h - BOOTP definitions
+bpf_dump.c - BPF program printing routines, in case libpcap doesn't
+ have them
+chdlc.h - Cisco HDLC definitions
config.guess - autoconf support
config.h.in - autoconf input
config.sub - autoconf support
configure - configure script (run this first)
configure.in - configure script source
decnet.h - DECnet definitions
-dhcp6.h - IPv6 DHCP definitions
-dhcp6opt.h - IPv6 DHCP options
-ethertype.h - ethernet definitions
+esp.h - IPSEC Encapsulating Security Payload definitions
+ether.h - Ethernet definitions
+ethertype.h - Ethernet type value definitions
extract.h - alignment definitions
fddi.h - Fiber Distributed Data Interface definitions
gmt2local.c - time conversion routines
gmt2local.h - time conversion prototypes
+icmp6.h - ICMPv6 definitiions
+ieee802_11.h - IEEE 802.11 definitions
igrp.h - Interior Gateway Routing Protocol definitions
install-sh - BSD style install script
interface.h - globals, prototypes and definitions
+ip.h - IP definitions
+ip6.h - IPv6 definitions
ipsec_doi.h - ISAKMP packet definitions - RFC2407
ipx.h - IPX definitions
isakmp.h - ISAKMP packet definitions - RFC2408
-l2tp.h -
-lane.h -
-lbl/gnuc.h - gcc macros and defines
-lbl/os-*.h - os dependent defines and prototypes
+l2tp.h - Layer Two Tunneling Protocol definitions
+lane.h - ATM LANE definitions
+lbl/os-*.h - OS-dependent defines and prototypes
llc.h - LLC definitions
machdep.c - machine dependent routines
machdep.h - machine dependent definitions
@@ -94,14 +103,18 @@ ospf6.h - IPv6 Open Shortest Path First definitions
packetdat.awk - TCP chunk summary awk script
parsenfsfh.c - Network File System file parser routines
ppp.h - Point to Point Protocol definitions
+print-802_11.c - IEEE 802.11 printer routines
print-ah.c - IPSEC Authentication Header printer routines
+print-arcnet.c - ARCNET printer routines
print-arp.c - Address Resolution Protocol printer routines
print-ascii.c - ASCII packet dump routines
print-atalk.c - AppleTalk printer routines
-print-atm.c - atm printer routines
+print-atm.c - ATM printer routines
print-bgp.c - Border Gateway Protocol printer routines
print-bootp.c - BOOTP and IPv4 DHCP printer routines
-print-chdlc.c - CHDLC printer routines
+print-beep.c - BEEP 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
print-cnfp.c - Cisco NetFlow printer routines
print-decnet.c - DECnet printer routines
@@ -110,65 +123,84 @@ print-domain.c - Domain Name System printer routines
print-dvmrp.c - Distance Vector Multicast Routing Protocol printer routines
print-egp.c - External Gateway Protocol printer routines
print-esp.c - IPSEC Encapsulating Security Payload printer routines
-print-ether.c - ethernet printer routines
+print-ether.c - Ethernet printer routines
print-fddi.c - Fiber Distributed Data Interface printer routines
print-frag6.c - IPv6 fragmentation header printer routines
print-gre.c - Generic Routing Encapsulation printer routines
+print-hsrp.c - Cisco Hot Standby Router Protocol printer routines
print-icmp.c - Internet Control Message Protocol printer routines
print-icmp6.c - IPv6 Internet Control Message Protocol printer routines
+print-igmp.c - Internet Group Management Protocol printer routines
print-igrp.c - Interior Gateway Routing Protocol printer routines
-print-ip.c - ip printer routines
+print-ip.c - IP printer routines
print-ip6.c - IPv6 printer routines
print-ip6opts.c - IPv6 header option printer routines
print-ipcomp.c - IP Payload Compression Protocol printer routines
print-ipx.c - IPX printer routines
print-isakmp.c - Internet Security Association and Key Management Protocol
-print-isoclns.c - isoclns printer routines
+print-isoclns.c - ISO CLNS, ESIS, and ISIS printer routines
print-krb.c - Kerberos printer routines
print-l2tp.c - Layer Two Tunneling Protocol printer routines
-print-lane.c -
-print-lcp.c -
-print-llc.c - llc printer routines
+print-lane.c - ATM LANE printer routines
+print-lcp.c - PPP Link Control Protocol printer routines
+print-llc.c - IEEE 802.2 LLC printer routines
+print-lwres.c - Lightweight Resolver protocol printer routines
print-mobile.c - IPv4 mobility printer routines
-print-netbios.c - netbios printer routines
+print-mpls.c - Multi-Protocol Label Switching printer routines
+print-msdp.c - Multicast Source Discovery Protocol printer routines
+print-netbios.c - NetBIOS frame protocol printer routines
print-nfs.c - Network File System printer routines
print-ntp.c - Network Time Protocol printer routines
-print-null.c - null printer routines
+print-null.c - BSD loopback device printer routines
print-ospf.c - Open Shortest Path First printer routines
print-ospf6.c - IPv6 Open Shortest Path First printer routines
print-pim.c - Protocol Independent Multicast printer routines
print-ppp.c - Point to Point Protocol printer routines
-print-pppoe.c -
-print-raw.c - raw printer routines
+print-pppoe.c - PPP-over-Ethernet printer routines
+print-pptp.c - Point-to-Point Tunnelling Protocol printer routines
+print-radius.c - Radius protocol printer routines
+print-raw.c - Raw IP printer routines
print-rip.c - Routing Information Protocol printer routines
print-ripng.c - IPv6 Routing Information Protocol printer routines
print-rt6.c - IPv6 routing header printer routines
print-rx.c - AFS RX printer routines
+print-sctp.c - Stream Control Transmission Protocol printer routines
print-sl.c - Compressed Serial Line Internet Protocol printer routines
-print-smb.c - SMB (samba) printer routines
+print-sll.c - Linux "cooked" capture printer routines
+print-smb.c - SMB/CIFS printer routines
print-snmp.c - Simple Network Management Protocol printer routines
print-stp.c - IEEE 802.1d spanning tree protocol printer routines
print-sunrpc.c - Sun Remote Procedure Call printer routines
print-tcp.c - TCP printer routines
print-telnet.c - Telnet option printer routines
print-tftp.c - Trivial File Transfer Protocol printer routines
+print-timed.c - BSD time daemon protocol printer routines
print-token.c - Token Ring printer routines
print-udp.c - UDP printer routines
-print-vjc.c - PPP Van Jacovson compression (RFC1144) 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
+print-wb.c - White Board printer routines
+print-zephyr.c - Zephyr printer routines
route6d.h - packet definition for IPv6 Routing Information Protocol
-rx.h -
-savestr.c - strdup() replacement
-savestr.h - savestr prototypes
+rx.h - AFS RX definitions
+sctpConstants.h - Stream Control Transmission Protocol constant definitions
+sctpHeader.h - Stream Control Transmission Protocol packet definitions
send-ack.awk - unidirectional tcp send/ack awk script
-setsignal.c - os independent signal routines
-setsignal.h - os independent signal prototypes
-smb.h -
-smbutil.c -
+setsignal.c - OS-independent signal routines
+setsignal.h - OS-independent signal prototypes
+slcompress.h - SLIP/PPP Van Jacobson compression (RFC1144) definitions
+slip.h - SLIP definitions
+sll.h - Linux "cooked" capture definitions
+smb.h - SMB/CIFS definitions
+smbutil.c - SMB/CIFS utility routines
stime.awk - TCP send awk script
strcasecmp.c - missing routine
+tcp.h - TCP definitions
tcpdump.1 - manual entry
tcpdump.c - main program
+telnet.h - Telnet definitions
+timed.h - BSD time daemon protocol definitions
+token.h - Token Ring definitions
+udp.h - UDP definitions
util.c - utility routines
vfprintf.c - emulation routine
diff --git a/contrib/tcpdump/README b/contrib/tcpdump/README
index bd6d184..b9c2596 100644
--- a/contrib/tcpdump/README
+++ b/contrib/tcpdump/README
@@ -1,18 +1,18 @@
-@(#) $Header: /tcpdump/master/tcpdump/README,v 1.60 2002/01/21 11:16:33 mcr Exp $ (LBL)
+@(#) $Header: /tcpdump/master/tcpdump/README,v 1.60.2.3 2003/02/26 07:08:58 fenner Exp $ (LBL)
-TCPDUMP 3.7.1
+TCPDUMP 3.7.2
Now maintained by "The Tcpdump Group"
See www.tcpdump.org
Please send inquiries/comments/reports to tcpdump-workers@tcpdump.org
Anonymous CVS is available via:
- cvs -d cvs.tcpdump.org:/tcpdump/master login
+ cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master login
(password "anoncvs")
- cvs -d cvs.tcpdump.org:/tcpdump/master checkout tcpdump
+ cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master checkout tcpdump
-Version 3.7.1 of TCPDUMP can be retrived with the CVS tag "tcpdump_3_7rel1":
- cvs -d cvs.tcpdump.org:/tcpdump/master checkout -r tcpdump_3_7rel1 tcpdump
+Version 3.7.2 of TCPDUMP can be retrived with the CVS tag "tcpdump_3_7rel2":
+ cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master checkout -r tcpdump_3_7rel2 tcpdump
Please send patches against the master copy to patches@tcpdump.org.
@@ -66,13 +66,19 @@ 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".
+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
-Source code contributions, etc. should be sent to the email address
-"patches@tcpdump.org".
+ http://sourceforge.net/projects/tcpdump/
-Current versions can be found at www.tcpdump.org
+Source code contributions, etc. should be sent to the email address
+"patches@tcpdump.org", or submitted as patches on the SourceForge site
+for tcpdump.
+
+Current versions can be found at www.tcpdump.org, or the SourceForge
+site for tcpdump.
- The TCPdump team
diff --git a/contrib/tcpdump/VERSION b/contrib/tcpdump/VERSION
index 382c402..752b302 100644
--- a/contrib/tcpdump/VERSION
+++ b/contrib/tcpdump/VERSION
@@ -1 +1 @@
-3.7.1+multidlt
+3.7.2+multidlt
diff --git a/contrib/tcpdump/aclocal.m4 b/contrib/tcpdump/aclocal.m4
index 788fb22..5391e9f 100644
--- a/contrib/tcpdump/aclocal.m4
+++ b/contrib/tcpdump/aclocal.m4
@@ -1,4 +1,4 @@
-dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.80 2001/12/10 08:41:15 guy Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.80.2.4 2002/07/13 09:38:53 guy Exp $ (LBL)
dnl
dnl Copyright (c) 1995, 1996, 1997, 1998
dnl The Regents of the University of California. All rights reserved.
@@ -157,6 +157,51 @@ AC_DEFUN(AC_LBL_C_INIT,
fi
])
+#
+# Try compiling a sample of the type of code that appears in
+# gencode.c with "inline", "__inline__", and "__inline".
+#
+# Autoconf's AC_C_INLINE, at least in autoconf 2.13, isn't good enough,
+# as it just tests whether a function returning "int" can be inlined;
+# at least some versions of HP's C compiler can inline that, but can't
+# inline a function that returns a struct pointer.
+#
+AC_DEFUN(AC_LBL_C_INLINE,
+ [AC_MSG_CHECKING(for inline)
+ AC_CACHE_VAL(ac_cv_lbl_inline, [
+ ac_cv_lbl_inline=""
+ ac_lbl_cc_inline=no
+ for ac_lbl_inline in inline __inline__ __inline
+ do
+ AC_TRY_COMPILE(
+ [#define inline $ac_lbl_inline
+ static inline struct iltest *foo(void);
+ struct iltest {
+ int iltest1;
+ int iltest2;
+ };
+
+ static inline struct iltest *
+ foo()
+ {
+ static struct iltest xxx;
+
+ return &xxx;
+ }],,ac_lbl_cc_inline=yes,)
+ if test "$ac_lbl_cc_inline" = yes ; then
+ break;
+ fi
+ done
+ if test "$ac_lbl_cc_inline" = yes ; then
+ ac_cv_lbl_inline=$ac_lbl_inline
+ fi])
+ if test ! -z "$ac_cv_lbl_inline" ; then
+ AC_MSG_RESULT($ac_cv_lbl_inline)
+ else
+ AC_MSG_RESULT(no)
+ fi
+ AC_DEFINE_UNQUOTED(inline, $ac_cv_lbl_inline, [Define as token for inline if inlining supported])])
+
dnl
dnl Use pfopen.c if available and pfopen() not in standard libraries
dnl Require libpcap
diff --git a/contrib/tcpdump/addrtoname.c b/contrib/tcpdump/addrtoname.c
index 69008b9..1f4bf9f 100644
--- a/contrib/tcpdump/addrtoname.c
+++ b/contrib/tcpdump/addrtoname.c
@@ -23,7 +23,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.83 2001/09/17 21:57:50 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.83.4.1 2002/06/02 00:08:07 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -34,14 +34,16 @@ static const char rcsid[] =
#include <sys/socket.h>
#include <sys/time.h>
-struct mbuf;
-struct rtentry;
-#include <net/if.h>
-
#include <netinet/in.h>
+
+#ifdef USE_ETHER_NTOHOST
#ifdef HAVE_NETINET_IF_ETHER_H
+struct mbuf; /* Squelch compiler warnings on some platforms for */
+struct rtentry; /* declarations in <net/if.h> */
+#include <net/if.h> /* for "struct ifnet" in "struct arpcom" on Solaris */
#include <netinet/if_ether.h>
-#endif
+#endif /* HAVE_NETINET_IF_ETHER_H */
+#endif /* USE_ETHER_NTOHOST */
#include <arpa/inet.h>
diff --git a/contrib/tcpdump/config.h.in b/contrib/tcpdump/config.h.in
index 87eced8..ae543f0 100644
--- a/contrib/tcpdump/config.h.in
+++ b/contrib/tcpdump/config.h.in
@@ -5,9 +5,6 @@
/* Define to empty if the keyword does not work. */
#undef const
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
-
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
@@ -189,6 +186,9 @@
/* Define if you have the smi library (-lsmi). */
#undef HAVE_LIBSMI
+/* Define as token for inline if inlining supported */
+#undef inline
+
/* define if your compiler has __attribute__ */
#undef HAVE___ATTRIBUTE__
diff --git a/contrib/tcpdump/configure b/contrib/tcpdump/configure
index 5c4e84f..05b34d1 100755
--- a/contrib/tcpdump/configure
+++ b/contrib/tcpdump/configure
@@ -1,10 +1,21 @@
#! /bin/sh
-# From configure.in Revision: 1.145
+# From configure.in Revision: 1.145.2.1
+#
+# Try compiling a sample of the type of code that appears in
+# gencode.c with "inline", "__inline__", and "__inline".
+#
+# Autoconf's AC_C_INLINE, at least in autoconf 2.13, isn't good enough,
+# as it just tests whether a function returning "int" can be inlined;
+# at least some versions of HP's C compiler can inline that, but can't
+# inline a function that returns a struct pointer.
+#
+
+
@@ -620,7 +631,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:624: checking host system type" >&5
+echo "configure:635: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -666,7 +677,7 @@ fi
# Extract the first word of "shlicc2", so it can be a program name with args.
set dummy shlicc2; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:670: checking for $ac_word" >&5
+echo "configure:681: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_SHLICC2'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -707,7 +718,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:711: checking for $ac_word" >&5
+echo "configure:722: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -737,7 +748,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:741: checking for $ac_word" >&5
+echo "configure:752: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -788,7 +799,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:792: checking for $ac_word" >&5
+echo "configure:803: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -820,7 +831,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:824: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:835: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -831,12 +842,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 835 "configure"
+#line 846 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -862,12 +873,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:866: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:877: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:871: checking whether we are using GNU C" >&5
+echo "configure:882: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -876,7 +887,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:891: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -895,7 +906,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:899: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:910: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -932,7 +943,7 @@ fi
V_CCOPT="-O2"
else
echo $ac_n "checking gcc version""... $ac_c" 1>&6
-echo "configure:936: checking gcc version" >&5
+echo "configure:947: checking gcc version" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_gcc_vers'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -950,19 +961,19 @@ fi
fi
else
echo $ac_n "checking that $CC handles ansi prototypes""... $ac_c" 1>&6
-echo "configure:954: checking that $CC handles ansi prototypes" >&5
+echo "configure:965: checking that $CC handles ansi prototypes" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_cc_ansi_prototypes'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 959 "configure"
+#line 970 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
int frob(int, char *)
; return 0; }
EOF
-if { (eval echo configure:966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_cc_ansi_prototypes=yes
else
@@ -980,21 +991,21 @@ fi
hpux*)
echo $ac_n "checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)""... $ac_c" 1>&6
-echo "configure:984: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5
+echo "configure:995: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5
savedcflags="$CFLAGS"
CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
if eval "test \"`echo '$''{'ac_cv_lbl_cc_hpux_cc_aa'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 991 "configure"
+#line 1002 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
int frob(int, char *)
; return 0; }
EOF
-if { (eval echo configure:998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_cc_hpux_cc_aa=yes
else
@@ -1038,12 +1049,12 @@ EOF
ultrix*)
echo $ac_n "checking that Ultrix $CC hacks const in prototypes""... $ac_c" 1>&6
-echo "configure:1042: checking that Ultrix $CC hacks const in prototypes" >&5
+echo "configure:1053: checking that Ultrix $CC hacks const in prototypes" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_cc_const_proto'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1047 "configure"
+#line 1058 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
@@ -1051,7 +1062,7 @@ struct a { int b; };
void c(const struct a *)
; return 0; }
EOF
-if { (eval echo configure:1055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_cc_const_proto=yes
else
@@ -1075,54 +1086,71 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1079: checking for inline" >&5
-if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
+echo "configure:1090: checking for inline" >&5
+ if eval "test \"`echo '$''{'ac_cv_lbl_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
- cat > conftest.$ac_ext <<EOF
-#line 1086 "configure"
+
+ ac_cv_lbl_inline=""
+ ac_lbl_cc_inline=no
+ for ac_lbl_inline in inline __inline__ __inline
+ do
+ cat > conftest.$ac_ext <<EOF
+#line 1100 "configure"
#include "confdefs.h"
+#define inline $ac_lbl_inline
+ static inline struct iltest *foo(void);
+ struct iltest {
+ int iltest1;
+ int iltest2;
+ };
+
+ static inline struct iltest *
+ foo()
+ {
+ static struct iltest xxx;
+ return &xxx;
+ }
int main() {
-} $ac_kw foo() {
+
; return 0; }
EOF
-if { (eval echo configure:1093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- ac_cv_c_inline=$ac_kw; break
+ ac_lbl_cc_inline=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest*
-done
-
+ if test "$ac_lbl_cc_inline" = yes ; then
+ break;
+ fi
+ done
+ if test "$ac_lbl_cc_inline" = yes ; then
+ ac_cv_lbl_inline=$ac_lbl_inline
+ fi
fi
-echo "$ac_t""$ac_cv_c_inline" 1>&6
-case "$ac_cv_c_inline" in
- inline | yes) ;;
- no) cat >> confdefs.h <<\EOF
-#define inline
-EOF
- ;;
- *) cat >> confdefs.h <<EOF
-#define inline $ac_cv_c_inline
+ if test ! -z "$ac_cv_lbl_inline" ; then
+ echo "$ac_t""$ac_cv_lbl_inline" 1>&6
+ else
+ echo "$ac_t""no" 1>&6
+ fi
+ cat >> confdefs.h <<EOF
+#define inline $ac_cv_lbl_inline
EOF
- ;;
-esac
echo $ac_n "checking for __attribute__""... $ac_c" 1>&6
-echo "configure:1120: checking for __attribute__" >&5
+echo "configure:1148: checking for __attribute__" >&5
if eval "test \"`echo '$''{'ac_cv___attribute__'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1126 "configure"
+#line 1154 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -1139,7 +1167,7 @@ foo(void)
; return 0; }
EOF
-if { (eval echo configure:1143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv___attribute__=yes
else
@@ -1161,7 +1189,7 @@ echo "$ac_t""$ac_cv___attribute__" 1>&6
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1165: checking how to run the C preprocessor" >&5
+echo "configure:1193: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1176,13 +1204,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1180 "configure"
+#line 1208 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1193,13 +1221,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1197 "configure"
+#line 1225 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1210,13 +1238,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1214 "configure"
+#line 1242 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1244,17 +1272,17 @@ for ac_hdr in fcntl.h rpc/rpcent.h netinet/if_ether.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1248: checking for $ac_hdr" >&5
+echo "configure:1276: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1253 "configure"
+#line 1281 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1281,12 +1309,12 @@ fi
done
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1285: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1313: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1290 "configure"
+#line 1318 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -1295,7 +1323,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -1320,7 +1348,7 @@ case "$host_os" in
linux*)
echo $ac_n "checking Linux kernel version""... $ac_c" 1>&6
-echo "configure:1324: checking Linux kernel version" >&5
+echo "configure:1352: checking Linux kernel version" >&5
if test "$cross_compiling" = yes; then
if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1355,17 +1383,17 @@ for ac_hdr in smi.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1359: checking for $ac_hdr" >&5
+echo "configure:1387: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1364 "configure"
+#line 1392 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1392,7 +1420,7 @@ fi
done
echo $ac_n "checking for smiInit in -lsmi""... $ac_c" 1>&6
-echo "configure:1396: checking for smiInit in -lsmi" >&5
+echo "configure:1424: checking for smiInit in -lsmi" >&5
ac_lib_var=`echo smi'_'smiInit | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1400,7 +1428,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsmi $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1404 "configure"
+#line 1432 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1411,7 +1439,7 @@ int main() {
smiInit()
; return 0; }
EOF
-if { (eval echo configure:1415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -1441,14 +1469,14 @@ fi
if test "$ac_cv_header_smi_h" = yes -a "$ac_cv_lib_smi_smiInit" = yes
then
echo $ac_n "checking whether to enable libsmi""... $ac_c" 1>&6
-echo "configure:1445: checking whether to enable libsmi" >&5
+echo "configure:1473: checking whether to enable libsmi" >&5
if test "$cross_compiling" = yes; then
echo "$ac_t""not when cross-compiling" 1>&6
libsmi=no
else
cat > conftest.$ac_ext <<EOF
-#line 1452 "configure"
+#line 1480 "configure"
#include "confdefs.h"
/* libsmi available check */
#include <smi.h>
@@ -1469,7 +1497,7 @@ main()
}
EOF
-if { (eval echo configure:1473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
@@ -1496,7 +1524,7 @@ fi
fi
echo $ac_n "checking whether to enable the possibly-buggy SMB printer""... $ac_c" 1>&6
-echo "configure:1500: checking whether to enable the possibly-buggy SMB printer" >&5
+echo "configure:1528: checking whether to enable the possibly-buggy SMB printer" >&5
# Check whether --enable-smb or --disable-smb was given.
if test "${enable_smb+set}" = set; then
enableval="$enable_smb"
@@ -1520,7 +1548,7 @@ esac
CFLAGS="$CFLAGS -Dss_family=__ss_family -Dss_len=__ss_len"
echo $ac_n "checking whether to enable ipv6""... $ac_c" 1>&6
-echo "configure:1524: checking whether to enable ipv6" >&5
+echo "configure:1552: checking whether to enable ipv6" >&5
# Check whether --enable-ipv6 or --disable-ipv6 was given.
if test "${enable_ipv6+set}" = set; then
enableval="$enable_ipv6"
@@ -1545,7 +1573,7 @@ else
else
cat > conftest.$ac_ext <<EOF
-#line 1549 "configure"
+#line 1577 "configure"
#include "confdefs.h"
/* AF_INET6 available check */
#include <sys/types.h>
@@ -1559,7 +1587,7 @@ main()
}
EOF
-if { (eval echo configure:1563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""yes" 1>&6
LOCALSRC="print-ip6.c print-ip6opts.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC"
@@ -1587,12 +1615,12 @@ ipv6trylibc=no
if test "$ipv6" = "yes"; then
echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
-echo "configure:1591: checking ipv6 stack type" >&5
+echo "configure:1619: checking ipv6 stack type" >&5
for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
case $i in
inria)
cat > conftest.$ac_ext <<EOF
-#line 1596 "configure"
+#line 1624 "configure"
#include "confdefs.h"
dnl
#include <netinet/in.h>
@@ -1611,7 +1639,7 @@ rm -f conftest*
;;
kame)
cat > conftest.$ac_ext <<EOF
-#line 1615 "configure"
+#line 1643 "configure"
#include "confdefs.h"
dnl
#include <netinet/in.h>
@@ -1633,7 +1661,7 @@ rm -f conftest*
;;
linux-glibc)
cat > conftest.$ac_ext <<EOF
-#line 1637 "configure"
+#line 1665 "configure"
#include "confdefs.h"
dnl
#include <features.h>
@@ -1661,7 +1689,7 @@ rm -f conftest*
;;
toshiba)
cat > conftest.$ac_ext <<EOF
-#line 1665 "configure"
+#line 1693 "configure"
#include "confdefs.h"
dnl
#include <sys/param.h>
@@ -1682,7 +1710,7 @@ rm -f conftest*
;;
v6d)
cat > conftest.$ac_ext <<EOF
-#line 1686 "configure"
+#line 1714 "configure"
#include "confdefs.h"
dnl
#include </usr/local/v6/include/sys/v6config.h>
@@ -1703,7 +1731,7 @@ rm -f conftest*
;;
zeta)
cat > conftest.$ac_ext <<EOF
-#line 1707 "configure"
+#line 1735 "configure"
#include "confdefs.h"
dnl
#include <sys/param.h>
@@ -1750,14 +1778,14 @@ fi
if test "$ipv6" = "yes"; then
echo $ac_n "checking for library containing getaddrinfo""... $ac_c" 1>&6
-echo "configure:1754: checking for library containing getaddrinfo" >&5
+echo "configure:1782: checking for library containing getaddrinfo" >&5
if eval "test \"`echo '$''{'ac_cv_search_getaddrinfo'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_getaddrinfo="no"
cat > conftest.$ac_ext <<EOF
-#line 1761 "configure"
+#line 1789 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1768,7 +1796,7 @@ int main() {
getaddrinfo()
; return 0; }
EOF
-if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_getaddrinfo="none required"
else
@@ -1779,7 +1807,7 @@ rm -f conftest*
test "$ac_cv_search_getaddrinfo" = "no" && for i in socket; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1783 "configure"
+#line 1811 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1790,7 +1818,7 @@ int main() {
getaddrinfo()
; return 0; }
EOF
-if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_getaddrinfo="-l$i"
break
@@ -1807,13 +1835,13 @@ echo "$ac_t""$ac_cv_search_getaddrinfo" 1>&6
if test "$ac_cv_search_getaddrinfo" != "no"; then
test "$ac_cv_search_getaddrinfo" = "none required" || LIBS="$ac_cv_search_getaddrinfo $LIBS"
echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
-echo "configure:1811: checking getaddrinfo bug" >&5
+echo "configure:1839: checking getaddrinfo bug" >&5
if test "$cross_compiling" = yes; then
echo "$ac_t""buggy" 1>&6
buggygetaddrinfo=yes
else
cat > conftest.$ac_ext <<EOF
-#line 1817 "configure"
+#line 1845 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -1910,7 +1938,7 @@ main()
}
EOF
-if { (eval echo configure:1914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""good" 1>&6
buggygetaddrinfo=no
@@ -1942,12 +1970,12 @@ fi
for ac_func in getaddrinfo getnameinfo
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1946: checking for $ac_func" >&5
+echo "configure:1974: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1951 "configure"
+#line 1979 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1970,7 +1998,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1998,9 +2026,9 @@ done
fi
echo $ac_n "checking for inet_ntop""... $ac_c" 1>&6
-echo "configure:2002: checking for inet_ntop" >&5
+echo "configure:2030: checking for inet_ntop" >&5
cat > conftest.$ac_ext <<EOF
-#line 2004 "configure"
+#line 2032 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -2011,7 +2039,7 @@ char src[4], dst[128];
inet_ntop(AF_INET, src, dst, sizeof(dst));
; return 0; }
EOF
-if { (eval echo configure:2015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@@ -2022,12 +2050,12 @@ else
for ac_func in inet_ntop
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2026: checking for $ac_func" >&5
+echo "configure:2054: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2031 "configure"
+#line 2059 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2050,7 +2078,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2079,9 +2107,9 @@ done
fi
rm -f conftest*
echo $ac_n "checking for inet_pton""... $ac_c" 1>&6
-echo "configure:2083: checking for inet_pton" >&5
+echo "configure:2111: checking for inet_pton" >&5
cat > conftest.$ac_ext <<EOF
-#line 2085 "configure"
+#line 2113 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -2092,7 +2120,7 @@ char src[128], dst[4];
inet_pton(AF_INET, src, dst);
; return 0; }
EOF
-if { (eval echo configure:2096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@@ -2103,12 +2131,12 @@ else
for ac_func in inet_pton
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2107: checking for $ac_func" >&5
+echo "configure:2135: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2112 "configure"
+#line 2140 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2131,7 +2159,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2160,9 +2188,9 @@ done
fi
rm -f conftest*
echo $ac_n "checking for inet_aton""... $ac_c" 1>&6
-echo "configure:2164: checking for inet_aton" >&5
+echo "configure:2192: checking for inet_aton" >&5
cat > conftest.$ac_ext <<EOF
-#line 2166 "configure"
+#line 2194 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <netinet/in.h>
@@ -2173,7 +2201,7 @@ struct in_addr dst;
inet_aton(src, &dst);
; return 0; }
EOF
-if { (eval echo configure:2177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@@ -2184,12 +2212,12 @@ else
for ac_func in inet_aton
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2188: checking for $ac_func" >&5
+echo "configure:2216: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2193 "configure"
+#line 2221 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2212,7 +2240,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2243,12 +2271,12 @@ rm -f conftest*
echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
-echo "configure:2247: checking if sockaddr struct has sa_len member" >&5
+echo "configure:2275: checking if sockaddr struct has sa_len member" >&5
if eval "test \"`echo '$''{'ac_cv_sockaddr_has_sa_len'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2252 "configure"
+#line 2280 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -2257,7 +2285,7 @@ int main() {
u_int i = sizeof(((struct sockaddr *)0)->sa_len)
; return 0; }
EOF
-if { (eval echo configure:2261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sockaddr_has_sa_len=yes
else
@@ -2282,7 +2310,7 @@ if test "$ac_cv_sockaddr_has_sa_len" = no; then
fi
echo $ac_n "checking size of char""... $ac_c" 1>&6
-echo "configure:2286: checking size of char" >&5
+echo "configure:2314: checking size of char" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2290,7 +2318,7 @@ else
ac_cv_sizeof_char=1
else
cat > conftest.$ac_ext <<EOF
-#line 2294 "configure"
+#line 2322 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2301,7 +2329,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_char=`cat conftestval`
else
@@ -2321,7 +2349,7 @@ EOF
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:2325: checking size of short" >&5
+echo "configure:2353: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2329,7 +2357,7 @@ else
ac_cv_sizeof_short=2
else
cat > conftest.$ac_ext <<EOF
-#line 2333 "configure"
+#line 2361 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2340,7 +2368,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
@@ -2360,7 +2388,7 @@ EOF
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:2364: checking size of int" >&5
+echo "configure:2392: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2368,7 +2396,7 @@ else
ac_cv_sizeof_int=4
else
cat > conftest.$ac_ext <<EOF
-#line 2372 "configure"
+#line 2400 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2379,7 +2407,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
@@ -2399,7 +2427,7 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:2403: checking size of long" >&5
+echo "configure:2431: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2407,7 +2435,7 @@ else
ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <<EOF
-#line 2411 "configure"
+#line 2439 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -2418,7 +2446,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:2422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
@@ -2441,12 +2469,12 @@ EOF
echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
-echo "configure:2445: checking for addrinfo" >&5
+echo "configure:2473: checking for addrinfo" >&5
if eval "test \"`echo '$''{'ac_cv_addrinfo'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2450 "configure"
+#line 2478 "configure"
#include "confdefs.h"
# include <netdb.h>
@@ -2454,7 +2482,7 @@ int main() {
struct addrinfo a
; return 0; }
EOF
-if { (eval echo configure:2458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_addrinfo=yes
else
@@ -2485,12 +2513,12 @@ fi
echo $ac_n "checking for NI_MAXSERV""... $ac_c" 1>&6
-echo "configure:2489: checking for NI_MAXSERV" >&5
+echo "configure:2517: checking for NI_MAXSERV" >&5
if eval "test \"`echo '$''{'ac_cv_maxserv'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2494 "configure"
+#line 2522 "configure"
#include "confdefs.h"
#include <netdb.h>
#ifdef NI_MAXSERV
@@ -2523,12 +2551,12 @@ fi
echo $ac_n "checking for NI_NAMEREQD""... $ac_c" 1>&6
-echo "configure:2527: checking for NI_NAMEREQD" >&5
+echo "configure:2555: checking for NI_NAMEREQD" >&5
if eval "test \"`echo '$''{'ac_cv_namereqd'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2532 "configure"
+#line 2560 "configure"
#include "confdefs.h"
#include <netdb.h>
#ifdef NI_NOFQDN
@@ -2561,12 +2589,12 @@ fi
echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
-echo "configure:2565: checking for sockaddr_storage" >&5
+echo "configure:2593: checking for sockaddr_storage" >&5
if eval "test \"`echo '$''{'ac_cv_sa_storage'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2570 "configure"
+#line 2598 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -2575,7 +2603,7 @@ int main() {
struct sockaddr_storage s
; return 0; }
EOF
-if { (eval echo configure:2579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sa_storage=yes
else
@@ -2602,12 +2630,12 @@ fi
ac_cv_addrsz=yes
echo $ac_n "checking for INADDRSZ""... $ac_c" 1>&6
-echo "configure:2606: checking for INADDRSZ" >&5
+echo "configure:2634: checking for INADDRSZ" >&5
if eval "test \"`echo '$''{'ac_cv_inaddrsz'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2611 "configure"
+#line 2639 "configure"
#include "confdefs.h"
# include <arpa/nameser.h>
@@ -2615,7 +2643,7 @@ int main() {
int a = INADDRSZ
; return 0; }
EOF
-if { (eval echo configure:2619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_inaddrsz=yes
else
@@ -2637,12 +2665,12 @@ EOF
ac_cv_addrsz=no
fi
echo $ac_n "checking for IN6ADDRSZ""... $ac_c" 1>&6
-echo "configure:2641: checking for IN6ADDRSZ" >&5
+echo "configure:2669: checking for IN6ADDRSZ" >&5
if eval "test \"`echo '$''{'ac_cv_in6addrsz'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2646 "configure"
+#line 2674 "configure"
#include "confdefs.h"
# include <arpa/nameser.h>
@@ -2650,7 +2678,7 @@ int main() {
int a = IN6ADDRSZ
; return 0; }
EOF
-if { (eval echo configure:2654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_in6addrsz=yes
else
@@ -2678,12 +2706,12 @@ fi
echo $ac_n "checking for RES_USE_INET6""... $ac_c" 1>&6
-echo "configure:2682: checking for RES_USE_INET6" >&5
+echo "configure:2710: checking for RES_USE_INET6" >&5
if eval "test \"`echo '$''{'ac_cv_res_inet6'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2687 "configure"
+#line 2715 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -2693,7 +2721,7 @@ int main() {
int a = RES_USE_INET6
; return 0; }
EOF
-if { (eval echo configure:2697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_res_inet6=yes
else
@@ -2719,12 +2747,12 @@ fi
echo $ac_n "checking for res_state_ext""... $ac_c" 1>&6
-echo "configure:2723: checking for res_state_ext" >&5
+echo "configure:2751: checking for res_state_ext" >&5
if eval "test \"`echo '$''{'ac_cv_res_state_ext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2728 "configure"
+#line 2756 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -2735,7 +2763,7 @@ int main() {
struct __res_state_ext e
; return 0; }
EOF
-if { (eval echo configure:2739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_res_state_ext=yes
else
@@ -2761,12 +2789,12 @@ fi
echo $ac_n "checking for nsort in res_state""... $ac_c" 1>&6
-echo "configure:2765: checking for nsort in res_state" >&5
+echo "configure:2793: checking for nsort in res_state" >&5
if eval "test \"`echo '$''{'ac_cv_res_state'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2770 "configure"
+#line 2798 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -2777,7 +2805,7 @@ int main() {
struct __res_state e; e.nsort = 0
; return 0; }
EOF
-if { (eval echo configure:2781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_res_state=yes
else
@@ -2807,12 +2835,12 @@ fi
for ac_func in vfprintf strcasecmp strlcat strlcpy strdup
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2811: checking for $ac_func" >&5
+echo "configure:2839: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2816 "configure"
+#line 2844 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2835,7 +2863,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2864,12 +2892,12 @@ done
for ac_func in ether_ntohost
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2868: checking for $ac_func" >&5
+echo "configure:2896: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2873 "configure"
+#line 2901 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2892,7 +2920,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -2912,7 +2940,7 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
EOF
echo $ac_n "checking for buggy ether_ntohost""... $ac_c" 1>&6
-echo "configure:2916: checking for buggy ether_ntohost" >&5
+echo "configure:2944: checking for buggy ether_ntohost" >&5
if eval "test \"`echo '$''{'ac_cv_buggy_ether_ntohost'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2921,7 +2949,7 @@ else
ac_cv_buggy_ether_ntohost=not while cross-compiling
else
cat > conftest.$ac_ext <<EOF
-#line 2925 "configure"
+#line 2953 "configure"
#include "confdefs.h"
#include <netdb.h>
@@ -2940,7 +2968,7 @@ else
}
EOF
-if { (eval echo configure:2944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_buggy_ether_ntohost=no
else
@@ -2970,12 +2998,12 @@ done
for ac_func in setlinebuf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2974: checking for $ac_func" >&5
+echo "configure:3002: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2979 "configure"
+#line 3007 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2998,7 +3026,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3027,12 +3055,12 @@ needsnprintf=no
for ac_func in vsnprintf snprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3031: checking for $ac_func" >&5
+echo "configure:3059: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3036 "configure"
+#line 3064 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3055,7 +3083,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3086,12 +3114,12 @@ fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:3090: checking return type of signal handlers" >&5
+echo "configure:3118: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3095 "configure"
+#line 3123 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -3108,7 +3136,7 @@ int main() {
int i;
; return 0; }
EOF
-if { (eval echo configure:3112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -3150,12 +3178,12 @@ EOF
for ac_func in sigset
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3154: checking for $ac_func" >&5
+echo "configure:3182: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3159 "configure"
+#line 3187 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3178,7 +3206,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3206,12 +3234,12 @@ done
for ac_func in sigaction
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3210: checking for $ac_func" >&5
+echo "configure:3238: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3215 "configure"
+#line 3243 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3234,7 +3262,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3263,7 +3291,7 @@ done
esac
echo $ac_n "checking for dnet_htoa in -ldnet""... $ac_c" 1>&6
-echo "configure:3267: checking for dnet_htoa in -ldnet" >&5
+echo "configure:3295: checking for dnet_htoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_htoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3271,7 +3299,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3275 "configure"
+#line 3303 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3282,7 +3310,7 @@ int main() {
dnet_htoa()
; return 0; }
EOF
-if { (eval echo configure:3286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3311,7 +3339,7 @@ fi
echo $ac_n "checking for main in -lrpc""... $ac_c" 1>&6
-echo "configure:3315: checking for main in -lrpc" >&5
+echo "configure:3343: checking for main in -lrpc" >&5
ac_lib_var=`echo rpc'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3319,14 +3347,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lrpc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3323 "configure"
+#line 3351 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:3330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3355,14 +3383,14 @@ fi
echo $ac_n "checking for library containing getrpcbynumber""... $ac_c" 1>&6
-echo "configure:3359: checking for library containing getrpcbynumber" >&5
+echo "configure:3387: checking for library containing getrpcbynumber" >&5
if eval "test \"`echo '$''{'ac_cv_search_getrpcbynumber'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_getrpcbynumber="no"
cat > conftest.$ac_ext <<EOF
-#line 3366 "configure"
+#line 3394 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3373,7 +3401,7 @@ int main() {
getrpcbynumber()
; return 0; }
EOF
-if { (eval echo configure:3377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_getrpcbynumber="none required"
else
@@ -3384,7 +3412,7 @@ rm -f conftest*
test "$ac_cv_search_getrpcbynumber" = "no" && for i in nsl; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3388 "configure"
+#line 3416 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3395,7 +3423,7 @@ int main() {
getrpcbynumber()
; return 0; }
EOF
-if { (eval echo configure:3399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_getrpcbynumber="-l$i"
break
@@ -3424,14 +3452,14 @@ fi
# Some strange OSes (SINIX) have it in libsocket:
echo $ac_n "checking for library containing gethostbyname""... $ac_c" 1>&6
-echo "configure:3428: checking for library containing gethostbyname" >&5
+echo "configure:3456: checking for library containing gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_search_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_gethostbyname="no"
cat > conftest.$ac_ext <<EOF
-#line 3435 "configure"
+#line 3463 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3442,7 +3470,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:3446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_gethostbyname="none required"
else
@@ -3453,7 +3481,7 @@ rm -f conftest*
test "$ac_cv_search_gethostbyname" = "no" && for i in nsl socket resolv; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3457 "configure"
+#line 3485 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3464,7 +3492,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_gethostbyname="-l$i"
break
@@ -3489,7 +3517,7 @@ fi
if test "$ac_cv_search_gethostbyname" = "no"
then
echo $ac_n "checking for gethostbyname in -lsocket""... $ac_c" 1>&6
-echo "configure:3493: checking for gethostbyname in -lsocket" >&5
+echo "configure:3521: checking for gethostbyname in -lsocket" >&5
ac_lib_var=`echo socket'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3497,7 +3525,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket -lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3501 "configure"
+#line 3529 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3508,7 +3536,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:3512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3531,14 +3559,14 @@ fi
fi
echo $ac_n "checking for library containing socket""... $ac_c" 1>&6
-echo "configure:3535: checking for library containing socket" >&5
+echo "configure:3563: checking for library containing socket" >&5
if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_socket="no"
cat > conftest.$ac_ext <<EOF
-#line 3542 "configure"
+#line 3570 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3549,7 +3577,7 @@ int main() {
socket()
; return 0; }
EOF
-if { (eval echo configure:3553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_socket="none required"
else
@@ -3560,7 +3588,7 @@ rm -f conftest*
test "$ac_cv_search_socket" = "no" && for i in socket; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3564 "configure"
+#line 3592 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3571,7 +3599,7 @@ int main() {
socket()
; return 0; }
EOF
-if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_socket="-l$i"
break
@@ -3590,7 +3618,7 @@ if test "$ac_cv_search_socket" != "no"; then
else :
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:3594: checking for socket in -lsocket" >&5
+echo "configure:3622: checking for socket in -lsocket" >&5
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3598,7 +3626,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket -lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3602 "configure"
+#line 3630 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3609,7 +3637,7 @@ int main() {
socket()
; return 0; }
EOF
-if { (eval echo configure:3613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3633,14 +3661,14 @@ fi
# DLPI needs putmsg under HPUX so test for -lstr while we're at it
echo $ac_n "checking for library containing putmsg""... $ac_c" 1>&6
-echo "configure:3637: checking for library containing putmsg" >&5
+echo "configure:3665: checking for library containing putmsg" >&5
if eval "test \"`echo '$''{'ac_cv_search_putmsg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_putmsg="no"
cat > conftest.$ac_ext <<EOF
-#line 3644 "configure"
+#line 3672 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3651,7 +3679,7 @@ int main() {
putmsg()
; return 0; }
EOF
-if { (eval echo configure:3655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_putmsg="none required"
else
@@ -3662,7 +3690,7 @@ rm -f conftest*
test "$ac_cv_search_putmsg" = "no" && for i in str; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3666 "configure"
+#line 3694 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3673,7 +3701,7 @@ int main() {
putmsg()
; return 0; }
EOF
-if { (eval echo configure:3677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_putmsg="-l$i"
break
@@ -3701,12 +3729,12 @@ fi
for ac_func in pfopen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3705: checking for $ac_func" >&5
+echo "configure:3733: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3710 "configure"
+#line 3738 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3729,7 +3757,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3759,7 +3787,7 @@ done
fi
fi
echo $ac_n "checking for local pcap library""... $ac_c" 1>&6
-echo "configure:3763: checking for local pcap library" >&5
+echo "configure:3791: checking for local pcap library" >&5
libpcap=FAIL
lastdir=FAIL
places=`ls .. | sed -e 's,/$,,' -e 's,^,../,' | \
@@ -3778,7 +3806,7 @@ echo "configure:3763: checking for local pcap library" >&5
if test $libpcap = FAIL ; then
echo "$ac_t""not found" 1>&6
echo $ac_n "checking for main in -lpcap""... $ac_c" 1>&6
-echo "configure:3782: checking for main in -lpcap" >&5
+echo "configure:3810: checking for main in -lpcap" >&5
ac_lib_var=`echo pcap'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3786,14 +3814,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lpcap $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3790 "configure"
+#line 3818 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:3797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3835,7 +3863,7 @@ fi
aix*)
pseexe="/lib/pse.exp"
echo $ac_n "checking for $pseexe""... $ac_c" 1>&6
-echo "configure:3839: checking for $pseexe" >&5
+echo "configure:3867: checking for $pseexe" >&5
if test -f $pseexe ; then
echo "$ac_t""yes" 1>&6
LIBS="$LIBS -I:$pseexe"
@@ -3846,12 +3874,12 @@ echo "configure:3839: checking for $pseexe" >&5
for ac_func in bpf_dump
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3850: checking for $ac_func" >&5
+echo "configure:3878: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3855 "configure"
+#line 3883 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3874,7 +3902,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3931,12 +3959,12 @@ if test -f /dev/bpf0 ; then
fi
echo $ac_n "checking for u_int8_t using $CC""... $ac_c" 1>&6
-echo "configure:3935: checking for u_int8_t using $CC" >&5
+echo "configure:3963: checking for u_int8_t using $CC" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int8_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3940 "configure"
+#line 3968 "configure"
#include "confdefs.h"
# include "confdefs.h"
@@ -3949,7 +3977,7 @@ int main() {
u_int8_t i
; return 0; }
EOF
-if { (eval echo configure:3953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_have_u_int8_t=yes
else
@@ -3969,12 +3997,12 @@ EOF
fi
echo $ac_n "checking for int16_t using $CC""... $ac_c" 1>&6
-echo "configure:3973: checking for int16_t using $CC" >&5
+echo "configure:4001: checking for int16_t using $CC" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_have_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3978 "configure"
+#line 4006 "configure"
#include "confdefs.h"
# include "confdefs.h"
@@ -3987,7 +4015,7 @@ int main() {
int16_t i
; return 0; }
EOF
-if { (eval echo configure:3991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_have_int16_t=yes
else
@@ -4007,12 +4035,12 @@ EOF
fi
echo $ac_n "checking for u_int16_t using $CC""... $ac_c" 1>&6
-echo "configure:4011: checking for u_int16_t using $CC" >&5
+echo "configure:4039: checking for u_int16_t using $CC" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4016 "configure"
+#line 4044 "configure"
#include "confdefs.h"
# include "confdefs.h"
@@ -4025,7 +4053,7 @@ int main() {
u_int16_t i
; return 0; }
EOF
-if { (eval echo configure:4029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_have_u_int16_t=yes
else
@@ -4045,12 +4073,12 @@ EOF
fi
echo $ac_n "checking for int32_t using $CC""... $ac_c" 1>&6
-echo "configure:4049: checking for int32_t using $CC" >&5
+echo "configure:4077: checking for int32_t using $CC" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_have_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4054 "configure"
+#line 4082 "configure"
#include "confdefs.h"
# include "confdefs.h"
@@ -4063,7 +4091,7 @@ int main() {
int32_t i
; return 0; }
EOF
-if { (eval echo configure:4067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_have_int32_t=yes
else
@@ -4083,12 +4111,12 @@ EOF
fi
echo $ac_n "checking for u_int32_t using $CC""... $ac_c" 1>&6
-echo "configure:4087: checking for u_int32_t using $CC" >&5
+echo "configure:4115: checking for u_int32_t using $CC" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_have_u_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4092 "configure"
+#line 4120 "configure"
#include "confdefs.h"
# include "confdefs.h"
@@ -4101,7 +4129,7 @@ int main() {
u_int32_t i
; return 0; }
EOF
-if { (eval echo configure:4105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_have_u_int32_t=yes
else
@@ -4161,12 +4189,12 @@ EOF
fi
echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
-echo "configure:4165: checking if sockaddr struct has sa_len member" >&5
+echo "configure:4193: checking if sockaddr struct has sa_len member" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4170 "configure"
+#line 4198 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -4175,7 +4203,7 @@ int main() {
u_int i = sizeof(((struct sockaddr *)0)->sa_len)
; return 0; }
EOF
-if { (eval echo configure:4179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_sockaddr_has_sa_len=yes
else
@@ -4196,7 +4224,7 @@ EOF
fi
echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
-echo "configure:4200: checking if unaligned accesses fail" >&5
+echo "configure:4228: checking if unaligned accesses fail" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4261,12 +4289,12 @@ EOF
echo $ac_n "checking for h_errno""... $ac_c" 1>&6
-echo "configure:4265: checking for h_errno" >&5
+echo "configure:4293: checking for h_errno" >&5
if eval "test \"`echo '$''{'ac_cv_var_h_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4270 "configure"
+#line 4298 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -4275,7 +4303,7 @@ int main() {
int foo = h_errno;
; return 0; }
EOF
-if { (eval echo configure:4279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_var_h_errno=yes
else
@@ -4303,7 +4331,7 @@ if test "${with_crypto+set}" = set; then
else
echo $ac_n "checking for SSLeay""... $ac_c" 1>&6
-echo "configure:4307: checking for SSLeay" >&5
+echo "configure:4335: checking for SSLeay" >&5
ac_cv_ssleay_path=no
incdir=no
for dir in /usr /usr/local /usr/local/ssl /usr/pkg; do
@@ -4331,7 +4359,7 @@ if test "$ac_cv_ssleay_path" != no; then
LIBS="$LIBS -lrsaref"
fi
echo $ac_n "checking for des_cbc_encrypt in -lcrypto""... $ac_c" 1>&6
-echo "configure:4335: checking for des_cbc_encrypt in -lcrypto" >&5
+echo "configure:4363: checking for des_cbc_encrypt in -lcrypto" >&5
ac_lib_var=`echo crypto'_'des_cbc_encrypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4339,7 +4367,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcrypto $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4343 "configure"
+#line 4371 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4350,7 +4378,7 @@ int main() {
des_cbc_encrypt()
; return 0; }
EOF
-if { (eval echo configure:4354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4384,17 +4412,17 @@ fi
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4388: checking for $ac_hdr" >&5
+echo "configure:4416: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4393 "configure"
+#line 4421 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4423,12 +4451,12 @@ done
if test "$ac_cv_header_cast_h" = "yes"; then
echo $ac_n "checking for buggy CAST128""... $ac_c" 1>&6
-echo "configure:4427: checking for buggy CAST128" >&5
+echo "configure:4455: checking for buggy CAST128" >&5
if test "$cross_compiling" = yes; then
buggy_cast128="cross-compiling, assume yes"
else
cat > conftest.$ac_ext <<EOF
-#line 4432 "configure"
+#line 4460 "configure"
#include "confdefs.h"
#include <cast.h>
@@ -4447,7 +4475,7 @@ main()
return 1;
}
EOF
-if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
buggy_cast128=yes
else
@@ -4479,17 +4507,17 @@ for ac_hdr in rc5.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4483: checking for $ac_hdr" >&5
+echo "configure:4511: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4488 "configure"
+#line 4516 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4534,7 +4562,7 @@ done
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:4538: checking for a BSD compatible install" >&5
+echo "configure:4566: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
diff --git a/contrib/tcpdump/configure.in b/contrib/tcpdump/configure.in
index 361fba0..810608d 100755
--- a/contrib/tcpdump/configure.in
+++ b/contrib/tcpdump/configure.in
@@ -1,4 +1,4 @@
-dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.145 2002/01/17 05:00:16 guy Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.145.2.1 2002/06/28 10:48:31 guy Exp $ (LBL)
dnl
dnl Copyright (c) 1994, 1995, 1996, 1997
dnl The Regents of the University of California. All rights reserved.
@@ -6,14 +6,14 @@ dnl
dnl Process this file with autoconf to produce a configure script.
dnl
-AC_REVISION($Revision: 1.145 $)
+AC_REVISION($Revision: 1.145.2.1 $)
AC_PREREQ(2.13)
AC_INIT(tcpdump.c)
AC_CANONICAL_HOST
AC_LBL_C_INIT(V_CCOPT, V_INCLS)
-AC_C_INLINE
+AC_LBL_C_INLINE
AC_C___ATTRIBUTE__
AC_CHECK_HEADERS(fcntl.h rpc/rpcent.h netinet/if_ether.h)
diff --git a/contrib/tcpdump/gmt2local.c b/contrib/tcpdump/gmt2local.c
index d68c4bf..bcef636 100644
--- a/contrib/tcpdump/gmt2local.c
+++ b/contrib/tcpdump/gmt2local.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/gmt2local.c,v 1.4 2000/07/11 00:49:02 assar Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/gmt2local.c,v 1.4.6.1 2002/06/01 23:43:53 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -29,12 +29,9 @@ static const char rcsid[] =
#endif
#include <sys/types.h>
-#include <sys/time.h>
#include <stdio.h>
-#ifdef TIME_WITH_SYS_TIME
#include <time.h>
-#endif
#ifdef HAVE_OS_PROTO_H
#include "os-proto.h"
diff --git a/contrib/tcpdump/interface.h b/contrib/tcpdump/interface.h
index 8e19062..2c8f7ac 100644
--- a/contrib/tcpdump/interface.h
+++ b/contrib/tcpdump/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.178 2002/01/21 11:39:58 mcr Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.178.4.2 2002/07/10 07:32:17 guy Exp $ (LBL)
*/
#ifndef tcpdump_interface_h
@@ -81,8 +81,6 @@ extern int xflag; /* print packet in hex */
extern int Xflag; /* print packet in hex/ascii */
extern char *espsecret;
-extern struct esp_algorithm *espsecret_xform; /* cache of decoded alg. */
-extern char *espsecret_key;
extern int packettype; /* as specified by -T */
#define PT_VAT 1 /* Visual Audio Tool */
@@ -135,8 +133,16 @@ extern int snaplen;
extern const u_char *packetp;
extern const u_char *snapend;
-/* True if "l" bytes of "var" were captured */
-#define TTEST2(var, l) ((const u_char *)&(var) <= snapend - (l))
+/*
+ * True if "l" bytes of "var" were captured.
+ *
+ * The "snapend - (l) <= snapend" checks to make sure "l" isn't so large
+ * that "snapend - (l)" underflows.
+ *
+ * The check is for <= rather than < because "l" might be 0.
+ */
+#define TTEST2(var, l) (snapend - (l) <= snapend && \
+ (const u_char *)&(var) <= snapend - (l))
/* True if "var" was captured */
#define TTEST(var) TTEST2(var, sizeof(var))
diff --git a/contrib/tcpdump/print-802_11.c b/contrib/tcpdump/print-802_11.c
index b9c2bb8..b8c03d8 100644
--- a/contrib/tcpdump/print-802_11.c
+++ b/contrib/tcpdump/print-802_11.c
@@ -22,7 +22,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.6 2001/09/17 21:57:53 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-802_11.c,v 1.6.4.1 2002/05/13 08:34:50 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -47,11 +47,16 @@ static const char rcsid[] =
#include "ieee802_11.h"
-#define RATEStoBUF(p, buf) \
+#define PRINT_RATES(p) \
do { \
- int z = 0; \
- for (z = 0 ; z < p.rates.length ; z++) \
- snprintf(buf, sizeof(buf), "%s %2.1f", buf, (.5 * (p.rates.rate[z] & 0x7f))); \
+ int z; \
+ char *sep = " ["; \
+ for (z = 0; z < p.rates.length ; z++) { \
+ printf("%s%2.1f", sep, (.5 * (p.rates.rate[z] & 0x7f))); \
+ sep = " "; \
+ } \
+ if (p.rates.length != 0) \
+ printf(" Mbit]"); \
} while (0)
static const char *auth_alg_text[]={"Open System","Shared Key","EAP"};
@@ -131,9 +136,7 @@ static int parse_elements(struct mgmt_body_t *pbody,const u_char *p,int offset)
{
for (;;) {
if (!TTEST2(*(p + offset), 1))
- return 0;
- if (*(p + offset) == 0xff)
- break;
+ return 1;
switch (*(p + offset)) {
case E_SSID:
if (!TTEST2(*(p+offset), 2))
@@ -216,9 +219,7 @@ static int handle_beacon(u_int16_t fc, const struct mgmt_header_t *pmh,
{
struct mgmt_body_t pbody;
int offset = 0;
- char buf[128];
- memset(buf, 0, sizeof(buf));
memset(&pbody, 0, sizeof(pbody));
if (!TTEST2(*p, 12))
@@ -233,10 +234,11 @@ static int handle_beacon(u_int16_t fc, const struct mgmt_header_t *pmh,
if (!parse_elements(&pbody,p,offset))
return 0;
- RATEStoBUF(pbody, buf);
-
- printf("%s (%s) [%s Mbit] %s CH: %x %s",
- subtype_text[FC_SUBTYPE(fc)], pbody.ssid.ssid, buf,
+ printf("%s (", subtype_text[FC_SUBTYPE(fc)]);
+ fn_print(pbody.ssid.ssid, NULL);
+ printf(")");
+ PRINT_RATES(pbody);
+ printf(" %s CH: %u %s",
CAPABILITY_ESS(pbody.capability_info) ? "ESS" : "IBSS",
pbody.ds.channel,
CAPABILITY_PRIVACY(pbody.capability_info) ? ", PRIVACY" : "" );
@@ -249,9 +251,7 @@ static int handle_assoc_request(u_int16_t fc, const struct mgmt_header_t *pmh,
{
struct mgmt_body_t pbody;
int offset = 0;
- char buf[128];
- memset(buf, 0, sizeof(buf));
memset(&pbody, 0, sizeof(pbody));
if (!TTEST2(*p, 4))
@@ -264,10 +264,10 @@ static int handle_assoc_request(u_int16_t fc, const struct mgmt_header_t *pmh,
if (!parse_elements(&pbody,p,offset))
return 0;
- RATEStoBUF(pbody,buf);
-
- printf("%s (%s) [%s Mbit] ",
- subtype_text[FC_SUBTYPE(fc)], pbody.ssid.ssid,buf);
+ printf("%s (", subtype_text[FC_SUBTYPE(fc)]);
+ fn_print(pbody.ssid.ssid, NULL);
+ printf(")");
+ PRINT_RATES(pbody);
return 1;
}
@@ -291,7 +291,7 @@ static int handle_assoc_response(u_int16_t fc, const struct mgmt_header_t *pmh,
if (!parse_elements(&pbody,p,offset))
return 0;
- printf("%s AID(%x) :%s: %s ", subtype_text[FC_SUBTYPE(fc)],
+ printf("%s AID(%x) :%s: %s", subtype_text[FC_SUBTYPE(fc)],
((u_int16_t)(pbody.aid << 2 )) >> 2 ,
CAPABILITY_PRIVACY(pbody.capability_info) ? " PRIVACY " : "",
(pbody.status_code < 19 ? status_text[pbody.status_code] : "n/a"));
@@ -320,7 +320,9 @@ static int handle_reassoc_request(u_int16_t fc, const struct mgmt_header_t *pmh,
if (!parse_elements(&pbody,p,offset))
return 0;
- printf("%s (%s) AP : %s",subtype_text[FC_SUBTYPE(fc)], pbody.ssid.ssid, etheraddr_string( pbody.ap ));
+ printf("%s (", subtype_text[FC_SUBTYPE(fc)]);
+ fn_print(pbody.ssid.ssid, NULL);
+ printf(") AP : %s", etheraddr_string( pbody.ap ));
return 1;
}
@@ -337,19 +339,16 @@ static int handle_probe_request(u_int16_t fc, const struct mgmt_header_t *pmh,
{
struct mgmt_body_t pbody;
int offset = 0;
- char buf[128];
-
- memset(buf, 0, sizeof(buf));
memset(&pbody, 0, sizeof(pbody));
if (!parse_elements(&pbody, p, offset))
return 0;
- RATEStoBUF(pbody, buf);
-
- printf("%s (%s) [%s Mbit] ", subtype_text[FC_SUBTYPE(fc)],
- pbody.ssid.ssid,buf);
+ printf("%s (", subtype_text[FC_SUBTYPE(fc)]);
+ fn_print(pbody.ssid.ssid, NULL);
+ printf(")");
+ PRINT_RATES(pbody);
return 1;
}
@@ -359,9 +358,6 @@ static int handle_probe_response(u_int16_t fc, const struct mgmt_header_t *pmh,
{
struct mgmt_body_t pbody;
int offset = 0;
- char buf[128];
-
- memset(buf, 0, sizeof(buf));
memset(&pbody, 0, sizeof(pbody));
@@ -377,8 +373,12 @@ static int handle_probe_response(u_int16_t fc, const struct mgmt_header_t *pmh,
if (!parse_elements(&pbody, p, offset))
return 0;
- printf("%s (%s) CH: %x %s", subtype_text[FC_SUBTYPE(fc)], pbody.ssid.ssid,pbody.ds.channel,
- CAPABILITY_PRIVACY(pbody.capability_info) ? ",PRIVACY " : "" );
+ printf("%s (", subtype_text[FC_SUBTYPE(fc)]);
+ fn_print(pbody.ssid.ssid, NULL);
+ printf(") ");
+ PRINT_RATES(pbody);
+ printf(" CH: %u%s", pbody.ds.channel,
+ CAPABILITY_PRIVACY(pbody.capability_info) ? ", PRIVACY" : "" );
return 1;
}
@@ -404,7 +404,7 @@ static int handle_disassoc(u_int16_t fc, const struct mgmt_header_t *pmh,
pbody.reason_code = EXTRACT_LE_16BITS(p);
offset += 2;
- printf("%s: %s ", subtype_text[FC_SUBTYPE(fc)],
+ printf("%s: %s", subtype_text[FC_SUBTYPE(fc)],
pbody.reason_code < 10 ? reason_text[pbody.reason_code] : "Reserved" );
return 1;
diff --git a/contrib/tcpdump/print-arcnet.c b/contrib/tcpdump/print-arcnet.c
index 3b6ea90..70b814e 100644
--- a/contrib/tcpdump/print-arcnet.c
+++ b/contrib/tcpdump/print-arcnet.c
@@ -22,7 +22,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-arcnet.c,v 1.6 2001/09/17 21:57:54 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-arcnet.c,v 1.6.4.1 2002/06/01 23:51:11 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -33,9 +33,6 @@ static const char rcsid[] =
#include <sys/time.h>
#include <sys/socket.h>
-struct mbuf;
-struct rtentry;
-
#include <netinet/in.h>
#include <stdio.h>
diff --git a/contrib/tcpdump/print-arp.c b/contrib/tcpdump/print-arp.c
index 160c7a8..78f8738 100644
--- a/contrib/tcpdump/print-arp.c
+++ b/contrib/tcpdump/print-arp.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-arp.c,v 1.51 2001/09/17 21:57:54 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-arp.c,v 1.51.4.2 2002/07/10 07:09:53 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -52,7 +52,7 @@ static const char rcsid[] =
* arp_tha and arp_tpa in that order, according to the lengths
* specified. Field names used correspond to RFC 826.
*/
-struct arphdr {
+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 */
@@ -80,10 +80,10 @@ struct arphdr {
u_char ar_tha[]; /* target hardware address */
u_char ar_tpa[]; /* target protocol address */
#endif
-#define ar_sha(ap) (((const caddr_t)((ap)+1))+0)
-#define ar_spa(ap) (((const caddr_t)((ap)+1))+ (ap)->ar_hln)
-#define ar_tha(ap) (((const caddr_t)((ap)+1))+ (ap)->ar_hln+(ap)->ar_pln)
-#define ar_tpa(ap) (((const caddr_t)((ap)+1))+2*(ap)->ar_hln+(ap)->ar_pln)
+#define ar_sha(ap) (((const u_char *)((ap)+1))+0)
+#define ar_spa(ap) (((const u_char *)((ap)+1))+ (ap)->ar_hln)
+#define ar_tha(ap) (((const u_char *)((ap)+1))+ (ap)->ar_hln+(ap)->ar_pln)
+#define ar_tpa(ap) (((const u_char *)((ap)+1))+2*(ap)->ar_hln+(ap)->ar_pln)
};
#define ARP_HDRLEN 8
@@ -103,10 +103,10 @@ static u_char ezero[6];
void
arp_print(const u_char *bp, u_int length, u_int caplen)
{
- const struct arphdr *ap;
+ const struct arp_pkthdr *ap;
u_short pro, hrd, op;
- ap = (const struct arphdr *)bp;
+ ap = (const struct arp_pkthdr *)bp;
TCHECK(*ap);
if ((const u_char *)(ar_tpa(ap) + PLN(ap)) > snapend) {
(void)printf("truncated-arp");
diff --git a/contrib/tcpdump/print-atalk.c b/contrib/tcpdump/print-atalk.c
index 5446521..d0760c5 100644
--- a/contrib/tcpdump/print-atalk.c
+++ b/contrib/tcpdump/print-atalk.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.70 2001/11/15 08:23:12 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-atalk.c,v 1.70.2.1 2002/02/05 10:04:18 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -112,6 +112,14 @@ llap_print(register const u_char *bp, u_int length)
register const struct atShortDDP *sdp;
u_short snet;
+ /*
+ * 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()".
+ */
lp = (const struct LAP *)bp;
bp += sizeof(*lp);
length -= sizeof(*lp);
@@ -394,6 +402,11 @@ nbp_print(register const struct atNBP *np, u_int length, register u_short snet,
int i;
const u_char *ep;
+ if (length < nbpHeaderSize) {
+ (void)printf(" truncated-nbp %d", length);
+ return;
+ }
+
length -= nbpHeaderSize;
if (length < 8) {
/* must be room for at least one tuple */
diff --git a/contrib/tcpdump/print-beep.c b/contrib/tcpdump/print-beep.c
index 51c1295..4cb6916 100644
--- a/contrib/tcpdump/print-beep.c
+++ b/contrib/tcpdump/print-beep.c
@@ -11,7 +11,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-beep.c,v 1.1 2001/12/10 08:21:24 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-beep.c,v 1.1.2.1 2002/07/11 07:47:01 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -54,19 +54,19 @@ void
beep_print(const u_char *bp, u_int length)
{
- if (l_strnstart("MSG", 4, bp, length)) /* A REQuest */
+ if (l_strnstart("MSG", 4, (const char *)bp, length)) /* A REQuest */
printf(" BEEP MSG");
- else if (l_strnstart("RPY ", 4, bp, length))
+ else if (l_strnstart("RPY ", 4, (const char *)bp, length))
printf(" BEEP RPY");
- else if (l_strnstart("ERR ", 4, bp, length))
+ else if (l_strnstart("ERR ", 4, (const char *)bp, length))
printf(" BEEP ERR");
- else if (l_strnstart("ANS ", 4, bp, length))
+ else if (l_strnstart("ANS ", 4, (const char *)bp, length))
printf(" BEEP ANS");
- else if (l_strnstart("NUL ", 4, bp, length))
+ else if (l_strnstart("NUL ", 4, (const char *)bp, length))
printf(" BEEP NUL");
- else if (l_strnstart("SEQ ", 4, bp, length))
+ else if (l_strnstart("SEQ ", 4, (const char *)bp, length))
printf(" BEEP SEQ");
- else if (l_strnstart("END", 4, bp, length))
+ else if (l_strnstart("END", 4, (const char *)bp, length))
printf(" BEEP END");
else
printf(" BEEP (payload or undecoded)");
diff --git a/contrib/tcpdump/print-bgp.c b/contrib/tcpdump/print-bgp.c
index 342292b..b14067d 100644
--- a/contrib/tcpdump/print-bgp.c
+++ b/contrib/tcpdump/print-bgp.c
@@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.27 2001/10/18 09:52:17 itojun Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-bgp.c,v 1.27.2.1 2003/02/26 05:51:56 fenner Exp $";
#endif
#include <sys/param.h>
@@ -469,11 +469,19 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *dat, int len)
switch (af) {
case AFNUM_INET:
advance = decode_prefix4(p, buf, sizeof(buf));
+ if (advance < 0) {
+ p = dat + len;
+ break;
+ }
printf(" %s", buf);
break;
#ifdef INET6
case AFNUM_INET6:
advance = decode_prefix6(p, buf, sizeof(buf));
+ if (advance < 0) {
+ p = dat + len;
+ break;
+ }
printf(" %s", buf);
break;
#endif
@@ -505,11 +513,19 @@ bgp_attr_print(const struct bgp_attr *attr, const u_char *dat, int len)
switch (af) {
case AFNUM_INET:
advance = decode_prefix4(p, buf, sizeof(buf));
+ if (advance < 0) {
+ p = dat + len;
+ break;
+ }
printf(" %s", buf);
break;
#ifdef INET6
case AFNUM_INET6:
advance = decode_prefix6(p, buf, sizeof(buf));
+ if (advance < 0) {
+ p = dat + len;
+ break;
+ }
printf(" %s", buf);
break;
#endif
@@ -598,6 +614,7 @@ bgp_update_print(const u_char *dat, int length)
printf(" (Withdrawn routes: %d bytes)", len);
#else
char buf[MAXHOSTNAMELEN + 100];
+ int wpfx;
TCHECK2(p[2], len);
i = 2;
@@ -605,7 +622,10 @@ bgp_update_print(const u_char *dat, int length)
printf(" (Withdrawn routes:");
while(i < 2 + len) {
- i += decode_prefix4(&p[i], buf, sizeof(buf));
+ wpfx = decode_prefix4(&p[i], buf, sizeof(buf));
+ if (wpfx < 0)
+ break;
+ i += wpfx;
printf(" %s", buf);
}
printf(")\n");
@@ -666,9 +686,9 @@ bgp_update_print(const u_char *dat, int length)
while (dat + length > p) {
char buf[MAXHOSTNAMELEN + 100];
i = decode_prefix4(p, buf, sizeof(buf));
- printf(" %s", buf);
if (i < 0)
break;
+ printf(" %s", buf);
p += i;
}
diff --git a/contrib/tcpdump/print-bootp.c b/contrib/tcpdump/print-bootp.c
index fd8754a..b46f2b5 100644
--- a/contrib/tcpdump/print-bootp.c
+++ b/contrib/tcpdump/print-bootp.c
@@ -22,7 +22,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.60 2001/09/17 21:57:56 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.60.4.2 2002/06/01 23:51:11 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -33,9 +33,6 @@ static const char rcsid[] =
#include <sys/time.h>
#include <sys/socket.h>
-struct mbuf;
-struct rtentry;
-
#include <netinet/in.h>
#include <ctype.h>
@@ -349,13 +346,14 @@ static struct tok arp2str[] = {
static void
rfc1048_print(register const u_char *bp)
{
- register u_char tag;
+ register u_int16_t tag;
register u_int len, size;
register const char *cp;
register char c;
int first;
u_int32_t ul;
- u_short us;
+ u_int16_t us;
+ u_int8_t uc;
printf(" vend-rfc1048");
@@ -376,9 +374,9 @@ rfc1048_print(register const u_char *bp)
* preclude overlap of 1-byte and 2-byte spaces.
* If not, we need to offset tag after this step.
*/
- cp = tok2str(xtag2str, "?xT%d", tag);
+ cp = tok2str(xtag2str, "?xT%u", tag);
} else
- cp = tok2str(tag2str, "?T%d", tag);
+ cp = tok2str(tag2str, "?T%u", tag);
c = *cp++;
printf(" %s:", cp);
@@ -394,8 +392,8 @@ rfc1048_print(register const u_char *bp)
}
if (tag == TAG_DHCP_MESSAGE && len == 1) {
- c = *bp++;
- switch (c) {
+ uc = *bp++;
+ switch (uc) {
case DHCPDISCOVER: printf("DISCOVER"); break;
case DHCPOFFER: printf("OFFER"); break;
case DHCPREQUEST: printf("REQUEST"); break;
@@ -404,7 +402,7 @@ rfc1048_print(register const u_char *bp)
case DHCPNAK: printf("NACK"); break;
case DHCPRELEASE: printf("RELEASE"); break;
case DHCPINFORM: printf("INFORM"); break;
- default: printf("%u", c); break;
+ default: printf("%u", uc); break;
}
continue;
}
@@ -412,8 +410,8 @@ rfc1048_print(register const u_char *bp)
if (tag == TAG_PARM_REQUEST) {
first = 1;
while (len-- > 0) {
- c = *bp++;
- cp = tok2str(tag2str, "?T%d", c);
+ uc = *bp++;
+ cp = tok2str(tag2str, "?T%u", uc);
if (!first)
putchar('+');
printf("%s", cp + 1);
@@ -425,9 +423,9 @@ rfc1048_print(register const u_char *bp)
first = 1;
while (len > 1) {
len -= 2;
- c = EXTRACT_16BITS(bp);
+ us = EXTRACT_16BITS(bp);
bp += 2;
- cp = tok2str(xtag2str, "?xT%d", c);
+ cp = tok2str(xtag2str, "?xT%u", us);
if (!first)
putchar('+');
printf("%s", cp + 1);
@@ -502,7 +500,7 @@ rfc1048_print(register const u_char *bp)
if (!first)
putchar(',');
us = EXTRACT_16BITS(bp);
- printf("%d", us);
+ printf("%u", us);
bp += sizeof(us);
size -= sizeof(us);
first = 0;
@@ -522,7 +520,7 @@ rfc1048_print(register const u_char *bp)
putchar('Y');
break;
default:
- printf("%d?", *bp);
+ printf("%u?", *bp);
break;
}
++bp;
@@ -541,7 +539,7 @@ rfc1048_print(register const u_char *bp)
if (c == 'x')
printf("%02x", *bp);
else
- printf("%d", *bp);
+ printf("%u", *bp);
++bp;
--size;
first = 0;
@@ -568,7 +566,7 @@ rfc1048_print(register const u_char *bp)
if (*bp++)
printf("[svrreg]");
if (*bp)
- printf("%d/%d/", *bp, *(bp+1));
+ printf("%u/%u/", *bp, *(bp+1));
bp += 2;
putchar('"');
(void)fn_printn(bp, size - 3, NULL);
@@ -600,7 +598,7 @@ rfc1048_print(register const u_char *bp)
}
default:
- printf("[unknown special tag %d, size %d]",
+ printf("[unknown special tag %u, size %u]",
tag, size);
bp += size;
size = 0;
@@ -610,7 +608,7 @@ rfc1048_print(register const u_char *bp)
}
/* Data left over? */
if (size)
- printf("[len %d]", len);
+ printf("[len %u]", len);
}
return;
trunc:
diff --git a/contrib/tcpdump/print-dhcp6.c b/contrib/tcpdump/print-dhcp6.c
index e42febf..455a1f7 100644
--- a/contrib/tcpdump/print-dhcp6.c
+++ b/contrib/tcpdump/print-dhcp6.c
@@ -26,10 +26,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+/*
+ * draft-ietf-dhc-dhcpv6-22.txt
+ */
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.14 2001/09/17 21:57:59 fenner Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-dhcp6.c,v 1.14.4.2 2002/06/01 23:51:12 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -40,9 +43,6 @@ static const char rcsid[] =
#include <sys/time.h>
#include <sys/socket.h>
-struct mbuf;
-struct rtentry;
-
#include <netinet/in.h>
#include <ctype.h>
@@ -52,172 +52,125 @@ struct rtentry;
#include "interface.h"
#include "addrtoname.h"
-#include "dhcp6.h"
-#include "dhcp6opt.h"
-
-#if 0
-static void dhcp6opttab_init(void);
-static struct dhcp6_opt *dhcp6opttab_byname(char *);
-#endif
-static struct dhcp6_opt *dhcp6opttab_bycode(u_int);
-
-static const char tstr[] = " [|dhcp6]";
-
-static struct dhcp6_opt dh6opttab[] = {
- /* IP Address Extension */
- { 1, OL6_N, "IP Address", OT6_NONE, },
-
- /* General Extension */
- { 8193, OL6_N, "IEEE 1003.1 POSIX Timezone", OT6_STR, },
- { 8194, OL6_16N, "Domain Name Server", OT6_V6, },
- { 8195, OL6_N, "Domain Name", OT6_STR, },
-
- { 8196, OL6_N, "SLP Agent", OT6_NONE, },
- { 8197, OL6_N, "SLP Scope" , OT6_NONE, },
- { 8198, OL6_16N, "Network Time Protocol Servers", OT6_V6, },
- { 8199, OL6_N, "NIS Domain", OT6_STR, },
- { 8200, OL6_16N, "NIS Servers", OT6_V6, },
- { 8201, OL6_N, "NIS+ Domain", OT6_STR, },
- { 8202, OL6_16N, "NIS+ Servers", OT6_V6, },
- /* TCP Parameters */
- { 8203, 4, "TCP Keepalive Interval", OT6_NUM, },
-
- /* DHCPv6 Extensions */
- { 8204, 4, "Maximum DHCPv6 Message Size", OT6_NUM, },
- { 8205, OL6_N, "DHCP Retransmission and Configuration Parameter",
- OT6_NONE, },
- { 8206, OL6_N, "Extension Request", OT6_NONE, },
- { 8207, OL6_N, "Subnet Prefix", OT6_NONE, },
- { 8208, OL6_N, "Platform Specific Information", OT6_NONE, },
- { 8209, OL6_N, "Platform Class Identifier", OT6_STR, },
- { 8210, OL6_N, "Class Identifier", OT6_STR, },
- { 8211, 16, "Reconfigure Multicast Address", OT6_V6, },
- { 8212, 16, "Renumber DHCPv6 Server Address",
- OT6_V6, },
- { 8213, OL6_N, "Client-Server Authentication", OT6_NONE, },
- { 8214, 4, "Client Key Selection", OT6_NUM, },
-
- /* End Extension */
- { 65536, OL6_Z, "End", OT6_NONE, },
-
- { 0 },
-};
-
-#if 0
-static struct dhcp6_opt *dh6o_pad;
-static struct dhcp6_opt *dh6o_end;
+/* Error Values */
+#define DH6ERR_FAILURE 16
+#define DH6ERR_AUTHFAIL 17
+#define DH6ERR_POORLYFORMED 18
+#define DH6ERR_UNAVAIL 19
+#define DH6ERR_OPTUNAVAIL 20
+
+/* Message type */
+#define DH6_REPLY 7
+#define DH6_INFORM_REQ 11
+
+/* DHCP6 base packet format */
+struct dhcp6 {
+ union {
+ u_int8_t m;
+ u_int32_t x;
+ } dh6_msgtypexid;
+ struct in6_addr dh6_servaddr;
+ /* options follow */
+} __attribute__ ((__packed__));
+#define dh6_msgtype dh6_msgtypexid.m
+#define dh6_xid dh6_msgtypexid.x
+#define DH6_XIDMASK 0x00ffffff
+
+/* option */
+#define DH6OPT_DUID 1 /* TBD */
+#define DH6OPT_DNS 11 /* TBD */
+struct dhcp6opt {
+ u_int16_t dh6opt_type;
+ u_int16_t dh6opt_len;
+ /* type-dependent data follows */
+} __attribute__ ((__packed__));
static void
-dhcp6opttab_init()
-{
- dh6o_pad = dhcp6opttab_bycode(0);
- dh6o_end = dhcp6opttab_bycode(65536);
-}
-#endif
-
-#if 0
-static struct dhcp6_opt *
-dhcp6opttab_byname(name)
- char *name;
+dhcp6opt_print(u_char *cp, u_char *ep)
{
- struct dhcp6_opt *p;
-
- for (p = dh6opttab; p->code; p++)
- if (strcmp(name, p->name) == 0)
- return p;
- return NULL;
-}
-#endif
-
-static struct dhcp6_opt *
-dhcp6opttab_bycode(code)
- u_int code;
-{
- struct dhcp6_opt *p;
-
- for (p = dh6opttab; p->code; p++)
- if (p->code == code)
- return p;
- return NULL;
-}
-
-static void
-dhcp6ext_print(u_char *cp, u_char *ep)
-{
- u_int16_t code, len;
- struct dhcp6_opt *p;
- char buf[BUFSIZ];
+ struct dhcp6opt *dh6o;
+ u_char *tp;
int i;
+ size_t optlen;
if (cp == ep)
return;
while (cp < ep) {
- if (ep - cp < sizeof(u_int16_t))
- break;
- code = ntohs(*(u_int16_t *)&cp[0]);
- if (ep - cp < sizeof(u_int16_t) * 2)
- break;
- if (code != 65535)
- len = ntohs(*(u_int16_t *)&cp[2]);
- else
- len = 0;
- if (ep - cp < len + 4)
- break;
- p = dhcp6opttab_bycode(code);
- if (p == NULL) {
- printf("(unknown, len=%d)", len);
- cp += len + 4;
- continue;
- }
-
- /* sanity check on length */
- switch (p->len) {
- case OL6_N:
- break;
- case OL6_16N:
- if (len % 16 != 0)
- goto trunc;
- break;
- case OL6_Z:
- if (len != 0)
- goto trunc;
+ if (ep - cp < sizeof(*dh6o))
+ goto trunc;
+ dh6o = (struct dhcp6opt *)cp;
+ optlen = ntohs(dh6o->dh6opt_len);
+ if (ep - cp < sizeof(*dh6o) + optlen)
+ goto trunc;
+ switch (ntohs(dh6o->dh6opt_type)) {
+ case DH6OPT_DUID:
+ printf(" (duid"); /*)*/
+ if (optlen < 2) {
+ /*(*/
+ printf(" ??)");
+ break;
+ }
+ tp = (u_char *)(dh6o + 1);
+ switch (ntohs(*(u_int16_t *)tp)) {
+ case 1:
+ if (optlen >= 2 + 6) {
+ printf(" hwaddr/time time %u type %u ",
+ ntohl(*(u_int32_t *)&tp[2]),
+ ntohs(*(u_int16_t *)&tp[6]));
+ for (i = 8; i < optlen; i++)
+ printf("%02x", tp[i]);
+ /*(*/
+ printf(")");
+ } else {
+ /*(*/
+ printf(" ??)");
+ }
+ break;
+ case 2:
+ if (optlen >= 2 + 8) {
+ printf(" vid ");
+ for (i = 2; i < 2 + 8; i++)
+ printf("%02x", tp[i]);
+ /*(*/
+ printf(")");
+ } else {
+ /*(*/
+ printf(" ??)");
+ }
+ break;
+ case 3:
+ if (optlen >= 2 + 2) {
+ printf(" hwaddr type %u ",
+ ntohs(*(u_int16_t *)&tp[2]));
+ for (i = 4; i < optlen; i++)
+ printf("%02x", tp[i]);
+ /*(*/
+ printf(")");
+ } else {
+ /*(*/
+ printf(" ??)");
+ }
+ }
break;
+ case DH6OPT_DNS:
+ printf(" (dnsserver"); /*)*/
+ if (optlen % 16) {
+ /*(*/
+ printf(" ??)");
+ break;
+ }
+ tp = (u_char *)(dh6o + 1);
+ for (i = 0; i < optlen; i += 16)
+ printf(" %s", ip6addr_string(&tp[i]));
+ /*(*/
+ printf(")");
default:
- if (len != p->len)
- goto trunc;
+ printf(" (opt-%u)", ntohs(dh6o->dh6opt_type));
break;
}
- if (cp + 4 + len > ep) {
- printf(" [|%s]", p->name);
- return;
- }
- printf(" (%s, ", p->name);
- switch (p->type) {
- case OT6_V6:
- for (i = 0; i < len; i += 16) {
- inet_ntop(AF_INET6, &cp[4 + i], buf,
- sizeof(buf));
- if (i != 0)
- printf(",");
- printf("%s", buf);
- }
- break;
- case OT6_STR:
- memset(&buf, 0, sizeof(buf));
- strncpy(buf, &cp[4], len);
- printf("%s", buf);
- break;
- case OT6_NUM:
- printf("%d", (u_int32_t)ntohl(*(u_int32_t *)&cp[4]));
- break;
- default:
- for (i = 0; i < len; i++)
- printf("%02x", cp[4 + i] & 0xff);
- }
- printf(")");
- cp += len + 4;
+ cp += sizeof(*dh6o) + optlen;
}
return;
@@ -226,128 +179,57 @@ trunc:
}
/*
- * Print dhcp6 requests
+ * Print dhcp6 packets
*/
void
dhcp6_print(register const u_char *cp, u_int length,
u_int16_t sport, u_int16_t dport)
{
- union dhcp6 *dh6;
+ struct dhcp6 *dh6;
u_char *ep;
u_char *extp;
- u_int16_t field16;
+ const char *name;
printf("dhcp6");
ep = (u_char *)snapend;
- dh6 = (union dhcp6 *)cp;
- TCHECK(dh6->dh6_msgtype);
+ dh6 = (struct dhcp6 *)cp;
+ TCHECK(dh6->dh6_servaddr);
switch (dh6->dh6_msgtype) {
- case DH6_SOLICIT:
- if (!(vflag && TTEST(dh6->dh6_sol.dh6sol_relayaddr))) {
- printf(" solicit");
- break;
- }
-
- printf(" solicit ("); /*)*/
- if (dh6->dh6_sol.dh6sol_flags != 0) {
- u_int8_t f = dh6->dh6_sol.dh6sol_flags;
- printf("%s%s ",
- (f & DH6SOL_PREFIX) ? "P" : "",
- (f & DH6SOL_CLOSE) ? "C" : "");
- }
-
- memcpy(&field16, &dh6->dh6_sol.dh6sol_plen_id,
- sizeof(field16));
- field16 = ntohs(field16);
- if (field16 & ~DH6SOL_SOLICIT_PLEN_MASK)
- printf("plen=%d ", DH6SOL_SOLICIT_PLEN(field16));
- printf("solicit-ID=%d", DH6SOL_SOLICIT_ID(field16));
-
- printf(" cliaddr=%s",
- ip6addr_string(&dh6->dh6_sol.dh6sol_cliaddr));
- printf(" relayaddr=%s",
- ip6addr_string(&dh6->dh6_sol.dh6sol_relayaddr));
- /*(*/
- printf(")");
- break;
- case DH6_ADVERT:
- if (!(vflag && TTEST(dh6->dh6_adv.dh6adv_serveraddr))) {
- printf(" advert");
- break;
- }
- printf(" advert ("); /*)*/
- memcpy(&field16, &dh6->dh6_adv.dh6adv_rsv_id, sizeof(field16));
- printf("solicit-ID=%d",
- ntohs(field16) & DH6SOL_SOLICIT_ID_MASK);
- printf(" pref=%u", dh6->dh6_adv.dh6adv_pref);
- printf(" cliaddr=%s",
- ip6addr_string(&dh6->dh6_adv.dh6adv_cliaddr));
- printf(" relayaddr=%s",
- ip6addr_string(&dh6->dh6_adv.dh6adv_relayaddr));
- printf(" servaddr=%s",
- ip6addr_string(&dh6->dh6_adv.dh6adv_serveraddr));
- extp = (u_char *)((&dh6->dh6_adv) + 1);
- dhcp6ext_print(extp, ep);
- /*(*/
- printf(")");
- break;
- case DH6_REQUEST:
- if (!(vflag && TTEST(dh6->dh6_req.dh6req_relayaddr))) {
- printf(" request");
- break;
- }
- printf(" request ("); /*)*/
- if (dh6->dh6_req.dh6req_flags != 0) {
- u_int8_t f = dh6->dh6_req.dh6req_flags;
- printf("%s%s ",
- (f & DH6REQ_CLOSE) ? "C" : "",
- (f & DH6REQ_REBOOT) ? "R" : "");
- }
- printf("xid=0x%04x", dh6->dh6_req.dh6req_xid);
- printf(" cliaddr=%s",
- ip6addr_string(&dh6->dh6_req.dh6req_cliaddr));
- printf(" relayaddr=%s",
- ip6addr_string(&dh6->dh6_req.dh6req_relayaddr));
- printf(" servaddr=%s",
- ip6addr_string(&dh6->dh6_req.dh6req_serveraddr));
- dhcp6ext_print((char *)(&dh6->dh6_req + 1), ep);
- /*(*/
- printf(")");
- break;
case DH6_REPLY:
- if (!(vflag && TTEST(dh6->dh6_rep.dh6rep_xid))) {
- printf(" reply");
- break;
- }
- printf(" reply ("); /*)*/
- if ((dh6->dh6_rep.dh6rep_flagandstat & DH6REP_RELAYPRESENT) != 0)
- printf("R ");
- printf("stat=0x%02x",
- dh6->dh6_rep.dh6rep_flagandstat & DH6REP_STATMASK);
- printf(" xid=0x%04x", dh6->dh6_rep.dh6rep_xid);
- printf(" cliaddr=%s",
- ip6addr_string(&dh6->dh6_rep.dh6rep_cliaddr));
- extp = (u_char *)((&dh6->dh6_rep) + 1);
- if ((dh6->dh6_rep.dh6rep_flagandstat & DH6REP_RELAYPRESENT) !=
- 0) {
- printf(" relayaddr=%s", ip6addr_string(extp));
- extp += sizeof(struct in6_addr);
- }
- dhcp6ext_print(extp, ep);
- /*(*/
- printf(")");
+ name = "reply";
break;
- case DH6_RELEASE:
- printf(" release");
+ case DH6_INFORM_REQ:
+ name= "inf-req";
break;
- case DH6_RECONFIG:
- printf(" reconfig");
+ default:
+ name = NULL;
break;
}
+
+ if (!vflag) {
+ if (name)
+ printf(" %s", name);
+ else
+ printf(" msgtype-%u", dh6->dh6_msgtype);
+ return;
+ }
+
+ /* XXX relay agent messages have to be handled differently */
+
+ if (name)
+ printf(" %s (", name); /*)*/
+ else
+ printf(" msgtype-%u (", dh6->dh6_msgtype); /*)*/
+ printf("xid=%x", ntohl(dh6->dh6_xid) & DH6_XIDMASK);
+ printf(" server=%s", ip6addr_string(&dh6->dh6_servaddr));
+ extp = (u_char *)(dh6 + 1);
+ dhcp6opt_print(extp, ep);
+ /*(*/
+ printf(")");
return;
trunc:
- printf("%s", tstr);
+ printf("[|dhcp6]");
}
diff --git a/contrib/tcpdump/print-egp.c b/contrib/tcpdump/print-egp.c
index 56dfb26..a60d438 100644
--- a/contrib/tcpdump/print-egp.c
+++ b/contrib/tcpdump/print-egp.c
@@ -20,7 +20,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-egp.c,v 1.28 2001/09/17 21:58:01 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-egp.c,v 1.28.4.1 2002/06/01 23:51:12 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -29,7 +29,6 @@ static const char rcsid[] =
#include <sys/param.h>
#include <sys/time.h>
-#include <sys/uio.h>
#include <sys/socket.h>
#include <netinet/in.h>
diff --git a/contrib/tcpdump/print-esp.c b/contrib/tcpdump/print-esp.c
index 33edf8a..b486346 100644
--- a/contrib/tcpdump/print-esp.c
+++ b/contrib/tcpdump/print-esp.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-esp.c,v 1.20 2002/01/21 11:39:59 mcr Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-esp.c,v 1.20.4.2 2002/02/22 09:26:27 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -35,6 +35,7 @@ static const char rcsid[] =
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <stdlib.h>
#include <netinet/in.h>
@@ -50,7 +51,6 @@ static const char rcsid[] =
#endif
#include <stdio.h>
-#include <unistd.h>
#include "ip.h"
#include "esp.h"
@@ -120,7 +120,7 @@ static int hex2byte(char *hexstring)
}
-void esp_print_decodesecret()
+static void esp_print_decodesecret(void)
{
char *colon;
int len, i;
@@ -359,8 +359,8 @@ esp_print(register const u_char *bp, register const u_char *bp2,
des_check_key = 1;
des_set_odd_parity((void *)secret);
- des_set_odd_parity((void *)secret+8);
- des_set_odd_parity((void *)secret+16);
+ des_set_odd_parity((void *)(secret + 8));
+ des_set_odd_parity((void *)(secret + 16));
if(des_set_key((void *)secret, s1) != 0) {
printf("failed to schedule key 1\n");
}
diff --git a/contrib/tcpdump/print-ether.c b/contrib/tcpdump/print-ether.c
index dc68f86..ba76987 100644
--- a/contrib/tcpdump/print-ether.c
+++ b/contrib/tcpdump/print-ether.c
@@ -20,7 +20,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.65 2001/07/04 22:03:14 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.65.4.1 2002/06/01 23:51:12 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -31,9 +31,6 @@ static const char rcsid[] =
#include <sys/time.h>
#include <sys/socket.h>
-struct mbuf;
-struct rtentry;
-
#include <netinet/in.h>
#include <stdio.h>
diff --git a/contrib/tcpdump/print-fddi.c b/contrib/tcpdump/print-fddi.c
index a178f15..7857863 100644
--- a/contrib/tcpdump/print-fddi.c
+++ b/contrib/tcpdump/print-fddi.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.53 2001/11/14 16:46:34 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.53.2.1 2002/06/01 23:51:13 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -31,8 +31,6 @@ static const char rcsid[] =
#include <sys/param.h>
#include <sys/time.h>
#include <sys/socket.h>
-#include <sys/file.h>
-#include <sys/ioctl.h>
#include <netinet/in.h>
diff --git a/contrib/tcpdump/print-gre.c b/contrib/tcpdump/print-gre.c
index ebadb0e..01afb90 100644
--- a/contrib/tcpdump/print-gre.c
+++ b/contrib/tcpdump/print-gre.c
@@ -24,7 +24,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-gre.c,v 1.13 2001/06/15 22:17:31 fenner Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-gre.c,v 1.13.4.1 2002/06/01 23:51:13 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -33,7 +33,6 @@ static const char rcsid[] =
#include <sys/param.h>
#include <sys/time.h>
-#include <sys/uio.h>
#include <sys/socket.h>
#include <netinet/in.h>
diff --git a/contrib/tcpdump/print-icmp.c b/contrib/tcpdump/print-icmp.c
index 71f9649..263960e 100644
--- a/contrib/tcpdump/print-icmp.c
+++ b/contrib/tcpdump/print-icmp.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.62 2001/07/24 16:56:11 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-icmp.c,v 1.62.4.1 2002/06/01 23:51:13 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -32,9 +32,6 @@ static const char rcsid[] =
#include <sys/time.h>
#include <sys/socket.h>
-struct mbuf;
-struct rtentry;
-
#include <netinet/in.h>
#include <stdio.h>
diff --git a/contrib/tcpdump/print-icmp6.c b/contrib/tcpdump/print-icmp6.c
index 73e78a3..40d71df 100644
--- a/contrib/tcpdump/print-icmp6.c
+++ b/contrib/tcpdump/print-icmp6.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.56 2001/06/27 02:48:43 itojun Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-icmp6.c,v 1.56.4.1 2002/05/31 10:08:31 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -574,7 +574,7 @@ icmp6_opt_print(const u_char *bp, int resid)
printf(")");
break;
default:
- printf("(unknwon opt_type=%d, opt_len=%d)",
+ printf("(unknown opt_type=%d, opt_len=%d)",
op->nd_opt_type, op->nd_opt_len);
break;
}
diff --git a/contrib/tcpdump/print-igmp.c b/contrib/tcpdump/print-igmp.c
index 07ace7d..3513353 100644
--- a/contrib/tcpdump/print-igmp.c
+++ b/contrib/tcpdump/print-igmp.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-igmp.c,v 1.5 2001/09/17 21:58:02 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-igmp.c,v 1.5.4.1 2002/06/02 18:25:05 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -32,8 +32,6 @@ static const char rcsid[] =
#include <sys/socket.h>
#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
#include <stdio.h>
#include <string.h>
diff --git a/contrib/tcpdump/print-ip.c b/contrib/tcpdump/print-ip.c
index e3e35ea..e1619c1 100644
--- a/contrib/tcpdump/print-ip.c
+++ b/contrib/tcpdump/print-ip.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.100 2001/09/17 21:58:03 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.100.4.1 2002/01/25 05:39:54 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -34,6 +34,7 @@ static const char rcsid[] =
#include <netinet/in.h>
+#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -257,13 +258,12 @@ ip_print(register const u_char *bp, register u_int length)
register const u_char *cp;
u_char nh;
int advance;
+ struct protoent *proto;
ip = (const struct ip *)bp;
#ifdef LBL_ALIGN
/*
* If the IP header is not aligned, copy into abuf.
- * This will never happen with BPF. It does happen raw packet
- * dumps from -r.
*/
if ((long)ip & 3) {
static u_char *abuf = NULL;
@@ -461,7 +461,11 @@ again:
break;
default:
- (void)printf(" ip-proto-%d %d", nh, len);
+ if ((proto = getprotobynumber(nh)) != NULL)
+ (void)printf(" %s", proto->p_name);
+ else
+ (void)printf(" ip-proto-%d", nh);
+ printf(" %d", len);
break;
}
}
@@ -480,11 +484,17 @@ again:
if (off & 0x3fff) {
/*
* if this isn't the first frag, we're missing the
- * next level protocol header. print the ip addr.
+ * next level protocol header. print the ip addr
+ * and the protocol.
*/
- if (off & 0x1fff)
+ if (off & 0x1fff) {
(void)printf("%s > %s:", ipaddr_string(&ip->ip_src),
ipaddr_string(&ip->ip_dst));
+ if ((proto = getprotobynumber(ip->ip_p)) != NULL)
+ (void)printf(" %s", proto->p_name);
+ else
+ (void)printf(" ip-proto-%d", ip->ip_p);
+ }
#ifndef IP_MF
#define IP_MF 0x2000
#endif /* IP_MF */
diff --git a/contrib/tcpdump/print-isakmp.c b/contrib/tcpdump/print-isakmp.c
index 909f0b95..6e5c58d 100644
--- a/contrib/tcpdump/print-isakmp.c
+++ b/contrib/tcpdump/print-isakmp.c
@@ -30,7 +30,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.29 2001/10/26 03:41:29 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-isakmp.c,v 1.29.2.2 2003/02/26 05:58:39 fenner Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -43,9 +43,6 @@ static const char rcsid[] =
#include <sys/time.h>
#include <sys/socket.h>
-struct mbuf;
-struct rtentry;
-
#include <netinet/in.h>
#include <stdio.h>
@@ -1028,6 +1025,7 @@ isakmp_sub0_print(u_char np, struct isakmp_gen *ext, u_char *ep,
{
u_char *cp;
struct isakmp_gen e;
+ u_int item_len;
cp = (u_char *)ext;
safememcpy(&e, ext, sizeof(e));
@@ -1036,7 +1034,16 @@ isakmp_sub0_print(u_char np, struct isakmp_gen *ext, u_char *ep,
cp = (*NPFUNC(np))(ext, ep, phase, doi, proto);
else {
printf("%s", NPSTR(np));
- cp += ntohs(e.len);
+ item_len = ntohs(e.len);
+ if (item_len == 0) {
+ /*
+ * We don't want to loop forever processing this
+ * bogus (zero-length) item; return NULL so that
+ * we stop dissecting.
+ */
+ cp = NULL;
+ } else
+ cp += item_len;
}
return cp;
}
@@ -1069,6 +1076,11 @@ isakmp_sub_print(u_char np, struct isakmp_gen *ext, u_char *ep,
printf(")");
depth--;
+ if (cp == NULL) {
+ /* Zero-length subitem */
+ return NULL;
+ }
+
np = e.np;
ext = (struct isakmp_gen *)cp;
}
diff --git a/contrib/tcpdump/print-isoclns.c b/contrib/tcpdump/print-isoclns.c
index 636de33..fc4009c 100644
--- a/contrib/tcpdump/print-isoclns.c
+++ b/contrib/tcpdump/print-isoclns.c
@@ -26,7 +26,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.36 2002/01/10 09:33:23 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.36.2.2 2002/06/29 04:28:44 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -574,7 +574,7 @@ isis_print_lspid(const u_char *cp)
static int
isis_print_tlv_ip_reach (const u_char *cp, int length)
{
- int bitmasks[33] = {
+ u_int bitmasks[33] = {
0x00000000,
0x80000000, 0xc0000000, 0xe0000000, 0xf0000000,
0xf8000000, 0xfc000000, 0xfe000000, 0xff000000,
@@ -585,7 +585,8 @@ isis_print_tlv_ip_reach (const u_char *cp, int length)
0xffffff80, 0xffffffc0, 0xffffffe0, 0xfffffff0,
0xfffffff8, 0xfffffffc, 0xfffffffe, 0xffffffff
};
- int mask, prefix_len;
+ u_int mask;
+ int prefix_len;
const struct isis_tlv_ip_reach *tlv_ip_reach;
tlv_ip_reach = (const struct isis_tlv_ip_reach *)cp;
@@ -676,6 +677,7 @@ static int isis_print (const u_char *p, u_int length)
u_char pdu_type, max_area, type, len, tmp, alen, subl, subt, tslen, ttslen;
const u_char *optr, *pptr, *tptr;
+ u_char subtlv_len;
u_short packet_len,pdu_len;
u_int i,j,bit_length,byte_length,metric;
u_char prefix[4]; /* copy buffer for ipv4 prefixes */
@@ -1244,10 +1246,11 @@ static int isis_print (const u_char *p, u_int length)
if (ISIS_MASK_TLV_EXT_IP_SUBTLV(j)) {
if (!TTEST2(*tptr, 1))
- return (1);
- printf(" (%u)",*tptr); /* no subTLV decoder supported - just print out subTLV length */
- i-=*tptr;
- tptr+=*tptr++;
+ return (1);
+ subtlv_len = *tptr;
+ printf(" (%u)",subtlv_len); /* no subTLV decoder supported - just print out subTLV length */
+ i -= subtlv_len;
+ tptr += subtlv_len + 1;
}
i-=(5+byte_length);
@@ -1516,8 +1519,9 @@ static int isis_print (const u_char *p, u_int length)
printf("\n\t\t\tRestart Request bit %s, Restart Acknowledgement bit %s\n\t\t\tRemaining holding time: %us",
ISIS_MASK_RESTART_RR(*tptr) ? "set" : "clear",
- ISIS_MASK_RESTART_RA(*tptr++) ? "set" : "clear",
- EXTRACT_16BITS(tptr));
+ ISIS_MASK_RESTART_RA(*tptr) ? "set" : "clear",
+ EXTRACT_16BITS(tptr+1));
+ tptr += 3;
break;
diff --git a/contrib/tcpdump/print-l2tp.c b/contrib/tcpdump/print-l2tp.c
index 973c942..2e3c090 100644
--- a/contrib/tcpdump/print-l2tp.c
+++ b/contrib/tcpdump/print-l2tp.c
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-l2tp.c,v 1.10 2001/11/10 21:37:58 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-l2tp.c,v 1.10.2.1 2002/05/25 09:47:07 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -38,6 +38,7 @@ static const char rcsid[] =
#include "l2tp.h"
#include "interface.h"
+#include "extract.h"
static char tstr[] = " [|l2tp]";
@@ -263,13 +264,13 @@ print_octets(const u_char *dat, u_int length)
static void
print_16bits_val(const u_int16_t *dat)
{
- printf("%u", ntohs(*dat));
+ printf("%u", EXTRACT_16BITS(dat));
}
static void
print_32bits_val(const u_int32_t *dat)
{
- printf("%lu", (u_long)ntohl(*dat));
+ printf("%lu", (u_long)EXTRACT_32BITS(dat));
}
/***********************************/
@@ -280,7 +281,8 @@ l2tp_msgtype_print(const u_char *dat)
{
u_int16_t *ptr = (u_int16_t*)dat;
- printf("%s", tok2str(l2tp_msgtype2str, "MSGTYPE-#%u", ntohs(*ptr)));
+ printf("%s", tok2str(l2tp_msgtype2str, "MSGTYPE-#%u",
+ EXTRACT_16BITS(ptr)));
}
static void
@@ -288,11 +290,11 @@ l2tp_result_code_print(const u_char *dat, u_int length)
{
u_int16_t *ptr = (u_int16_t *)dat;
- printf("%u", ntohs(*ptr++)); /* Result Code */
- if (length > 2) { /* Error Code (opt) */
- printf("/%u", ntohs(*ptr++));
+ printf("%u", EXTRACT_16BITS(ptr)); ptr++; /* Result Code */
+ if (length > 2) { /* Error Code (opt) */
+ printf("/%u", EXTRACT_16BITS(ptr)); ptr++;
}
- if (length > 4) { /* Error Message (opt) */
+ if (length > 4) { /* Error Message (opt) */
printf(" ");
print_string((u_char *)ptr, length - 4);
}
@@ -301,7 +303,8 @@ l2tp_result_code_print(const u_char *dat, u_int length)
static void
l2tp_proto_ver_print(const u_int16_t *dat)
{
- printf("%u.%u", (ntohs(*dat) >> 8), (ntohs(*dat) & 0xff));
+ printf("%u.%u", (EXTRACT_16BITS(dat) >> 8),
+ (EXTRACT_16BITS(dat) & 0xff));
}
static void
@@ -309,10 +312,10 @@ l2tp_framing_cap_print(const u_char *dat)
{
u_int32_t *ptr = (u_int32_t *)dat;
- if (ntohl(*ptr) & L2TP_FRAMING_CAP_ASYNC_MASK) {
+ if (EXTRACT_32BITS(ptr) & L2TP_FRAMING_CAP_ASYNC_MASK) {
printf("A");
}
- if (ntohl(*ptr) & L2TP_FRAMING_CAP_SYNC_MASK) {
+ if (EXTRACT_32BITS(ptr) & L2TP_FRAMING_CAP_SYNC_MASK) {
printf("S");
}
}
@@ -322,10 +325,10 @@ l2tp_bearer_cap_print(const u_char *dat)
{
u_int32_t *ptr = (u_int32_t *)dat;
- if (ntohl(*ptr) & L2TP_BEARER_CAP_ANALOG_MASK) {
+ if (EXTRACT_32BITS(ptr) & L2TP_BEARER_CAP_ANALOG_MASK) {
printf("A");
}
- if (ntohl(*ptr) & L2TP_BEARER_CAP_DIGITAL_MASK) {
+ if (EXTRACT_32BITS(ptr) & L2TP_BEARER_CAP_DIGITAL_MASK) {
printf("D");
}
}
@@ -346,10 +349,10 @@ l2tp_bearer_type_print(const u_char *dat)
{
u_int32_t *ptr = (u_int32_t *)dat;
- if (ntohl(*ptr) & L2TP_BEARER_TYPE_ANALOG_MASK) {
+ if (EXTRACT_32BITS(ptr) & L2TP_BEARER_TYPE_ANALOG_MASK) {
printf("A");
}
- if (ntohl(*ptr) & L2TP_BEARER_TYPE_DIGITAL_MASK) {
+ if (EXTRACT_32BITS(ptr) & L2TP_BEARER_TYPE_DIGITAL_MASK) {
printf("D");
}
}
@@ -359,10 +362,10 @@ l2tp_framing_type_print(const u_char *dat)
{
u_int32_t *ptr = (u_int32_t *)dat;
- if (ntohl(*ptr) & L2TP_FRAMING_TYPE_ASYNC_MASK) {
+ if (EXTRACT_32BITS(ptr) & L2TP_FRAMING_TYPE_ASYNC_MASK) {
printf("A");
}
- if (ntohl(*ptr) & L2TP_FRAMING_TYPE_SYNC_MASK) {
+ if (EXTRACT_32BITS(ptr) & L2TP_FRAMING_TYPE_SYNC_MASK) {
printf("S");
}
}
@@ -379,7 +382,7 @@ l2tp_proxy_auth_type_print(const u_char *dat)
u_int16_t *ptr = (u_int16_t *)dat;
printf("%s", tok2str(l2tp_authentype2str,
- "AuthType-#%u", ntohs(*ptr)));
+ "AuthType-#%u", EXTRACT_16BITS(ptr)));
}
static void
@@ -387,7 +390,7 @@ l2tp_proxy_auth_id_print(const u_char *dat)
{
u_int16_t *ptr = (u_int16_t *)dat;
- printf("%u", ntohs(*ptr) & L2TP_PROXY_AUTH_ID_MASK);
+ printf("%u", EXTRACT_16BITS(ptr) & L2TP_PROXY_AUTH_ID_MASK);
}
static void
@@ -398,28 +401,28 @@ l2tp_call_errors_print(const u_char *dat)
ptr++; /* skip "Reserved" */
- val_h = ntohs(*ptr++);
- val_l = ntohs(*ptr++);
+ val_h = EXTRACT_16BITS(ptr); ptr++;
+ val_l = EXTRACT_16BITS(ptr); ptr++;
printf("CRCErr=%u ", (val_h<<16) + val_l);
- val_h = ntohs(*ptr++);
- val_l = ntohs(*ptr++);
+ val_h = EXTRACT_16BITS(ptr); ptr++;
+ val_l = EXTRACT_16BITS(ptr); ptr++;
printf("FrameErr=%u ", (val_h<<16) + val_l);
- val_h = ntohs(*ptr++);
- val_l = ntohs(*ptr++);
+ val_h = EXTRACT_16BITS(ptr); ptr++;
+ val_l = EXTRACT_16BITS(ptr); ptr++;
printf("HardOver=%u ", (val_h<<16) + val_l);
- val_h = ntohs(*ptr++);
- val_l = ntohs(*ptr++);
+ val_h = EXTRACT_16BITS(ptr); ptr++;
+ val_l = EXTRACT_16BITS(ptr); ptr++;
printf("BufOver=%u ", (val_h<<16) + val_l);
- val_h = ntohs(*ptr++);
- val_l = ntohs(*ptr++);
+ val_h = EXTRACT_16BITS(ptr); ptr++;
+ val_l = EXTRACT_16BITS(ptr); ptr++;
printf("Timeout=%u ", (val_h<<16) + val_l);
- val_h = ntohs(*ptr++);
- val_l = ntohs(*ptr++);
+ val_h = EXTRACT_16BITS(ptr); ptr++;
+ val_l = EXTRACT_16BITS(ptr); ptr++;
printf("AlignErr=%u ", (val_h<<16) + val_l);
}
@@ -431,12 +434,12 @@ l2tp_accm_print(const u_char *dat)
ptr++; /* skip "Reserved" */
- val_h = ntohs(*ptr++);
- val_l = ntohs(*ptr++);
+ val_h = EXTRACT_16BITS(ptr); ptr++;
+ val_l = EXTRACT_16BITS(ptr); ptr++;
printf("send=%08x ", (val_h<<16) + val_l);
- val_h = ntohs(*ptr++);
- val_l = ntohs(*ptr++);
+ val_h = EXTRACT_16BITS(ptr); ptr++;
+ val_l = EXTRACT_16BITS(ptr); ptr++;
printf("recv=%08x ", (val_h<<16) + val_l);
}
@@ -445,8 +448,8 @@ l2tp_ppp_discon_cc_print(const u_char *dat, u_int length)
{
u_int16_t *ptr = (u_int16_t *)dat;
- printf("%04x, ", ntohs(*ptr++)); /* Disconnect Code */
- printf("%04x ", ntohs(*ptr++)); /* Control Protocol Number */
+ printf("%04x, ", EXTRACT_16BITS(ptr)); ptr++; /* Disconnect Code */
+ printf("%04x ", EXTRACT_16BITS(ptr)); ptr++; /* Control Protocol Number */
printf("%s", tok2str(l2tp_cc_direction2str,
"Direction-#%u", *((u_char *)ptr++)));
@@ -471,33 +474,33 @@ l2tp_avp_print(const u_char *dat, int length)
printf(" ");
TCHECK(*ptr); /* Flags & Length */
- len = ntohs(*ptr) & L2TP_AVP_HDR_LEN_MASK;
+ len = EXTRACT_16BITS(ptr) & L2TP_AVP_HDR_LEN_MASK;
/* If it is not long enough to decode the entire AVP, we'll
abandon. */
TCHECK2(*ptr, len);
/* After this point, no need to worry about truncation */
- if (ntohs(*ptr) & L2TP_AVP_HDR_FLAG_MANDATORY) {
+ if (EXTRACT_16BITS(ptr) & L2TP_AVP_HDR_FLAG_MANDATORY) {
printf("*");
}
- if (ntohs(*ptr) & L2TP_AVP_HDR_FLAG_HIDDEN) {
+ if (EXTRACT_16BITS(ptr) & L2TP_AVP_HDR_FLAG_HIDDEN) {
hidden = TRUE;
printf("?");
}
ptr++;
- if (ntohs(*ptr)) {
+ if (EXTRACT_16BITS(ptr)) {
/* Vendor Specific Attribute */
- printf("VENDOR%04x:", ntohs(*ptr++));
- printf("ATTR%04x", ntohs(*ptr++));
+ printf("VENDOR%04x:", EXTRACT_16BITS(ptr)); ptr++;
+ printf("ATTR%04x", EXTRACT_16BITS(ptr)); ptr++;
printf("(");
print_octets((u_char *)ptr, len-6);
printf(")");
} else {
/* IETF-defined Attributes */
ptr++;
- attr_type = ntohs(*ptr++);
+ attr_type = EXTRACT_16BITS(ptr); ptr++;
printf("%s", tok2str(l2tp_avp2str, "AVP-#%u", attr_type));
printf("(");
if (hidden) {
@@ -613,9 +616,9 @@ l2tp_print(const u_char *dat, u_int length)
flag_t = flag_l = flag_s = flag_o = flag_p = FALSE;
TCHECK(*ptr); /* Flags & Version */
- if ((ntohs(*ptr) & L2TP_VERSION_MASK) == L2TP_VERSION_L2TP) {
+ if ((EXTRACT_16BITS(ptr) & L2TP_VERSION_MASK) == L2TP_VERSION_L2TP) {
printf(" l2tp:");
- } else if ((ntohs(*ptr) & L2TP_VERSION_MASK) == L2TP_VERSION_L2F) {
+ } else if ((EXTRACT_16BITS(ptr) & L2TP_VERSION_MASK) == L2TP_VERSION_L2F) {
printf(" l2f:");
return; /* nothing to do */
} else {
@@ -624,23 +627,23 @@ l2tp_print(const u_char *dat, u_int length)
}
printf("[");
- if (ntohs(*ptr) & L2TP_FLAG_TYPE) {
+ if (EXTRACT_16BITS(ptr) & L2TP_FLAG_TYPE) {
flag_t = TRUE;
printf("T");
}
- if (ntohs(*ptr) & L2TP_FLAG_LENGTH) {
+ if (EXTRACT_16BITS(ptr) & L2TP_FLAG_LENGTH) {
flag_l = TRUE;
printf("L");
}
- if (ntohs(*ptr) & L2TP_FLAG_SEQUENCE) {
+ if (EXTRACT_16BITS(ptr) & L2TP_FLAG_SEQUENCE) {
flag_s = TRUE;
printf("S");
}
- if (ntohs(*ptr) & L2TP_FLAG_OFFSET) {
+ if (EXTRACT_16BITS(ptr) & L2TP_FLAG_OFFSET) {
flag_o = TRUE;
printf("O");
}
- if (ntohs(*ptr) & L2TP_FLAG_PRIORITY) {
+ if (EXTRACT_16BITS(ptr) & L2TP_FLAG_PRIORITY) {
flag_p = TRUE;
printf("P");
}
@@ -651,31 +654,31 @@ l2tp_print(const u_char *dat, u_int length)
if (flag_l) {
TCHECK(*ptr); /* Length */
- l2tp_len = ntohs(*ptr++);
+ l2tp_len = EXTRACT_16BITS(ptr); ptr++;
cnt += 2;
} else {
l2tp_len = 0;
}
TCHECK(*ptr); /* Tunnel ID */
- printf("(%u/", ntohs(*ptr++));
+ printf("(%u/", EXTRACT_16BITS(ptr)); ptr++;
cnt += 2;
TCHECK(*ptr); /* Session ID */
- printf("%u)", ntohs(*ptr++));
+ printf("%u)", EXTRACT_16BITS(ptr)); ptr++;
cnt += 2;
if (flag_s) {
TCHECK(*ptr); /* Ns */
- printf("Ns=%u,", ntohs(*ptr++));
+ printf("Ns=%u,", EXTRACT_16BITS(ptr)); ptr++;
cnt += 2;
TCHECK(*ptr); /* Nr */
- printf("Nr=%u", ntohs(*ptr++));
+ printf("Nr=%u", EXTRACT_16BITS(ptr)); ptr++;
cnt += 2;
}
if (flag_o) {
TCHECK(*ptr); /* Offset Size */
- pad = ntohs(*ptr++);
+ pad = EXTRACT_16BITS(ptr); ptr++;
ptr += pad / sizeof(*ptr);
cnt += (2 + pad);
}
diff --git a/contrib/tcpdump/print-mobile.c b/contrib/tcpdump/print-mobile.c
index bc4f3cb..f585c9b 100644
--- a/contrib/tcpdump/print-mobile.c
+++ b/contrib/tcpdump/print-mobile.c
@@ -42,12 +42,11 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.7 2001/08/20 17:53:54 fenner Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-mobile.c,v 1.7.4.1 2002/06/01 23:51:14 guy Exp $";
#endif
#include <sys/param.h>
#include <sys/time.h>
-#include <sys/uio.h>
#include <sys/socket.h>
#include <netinet/in.h>
diff --git a/contrib/tcpdump/print-mpls.c b/contrib/tcpdump/print-mpls.c
index eb03705..ed7defb 100644
--- a/contrib/tcpdump/print-mpls.c
+++ b/contrib/tcpdump/print-mpls.c
@@ -28,7 +28,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-mpls.c,v 1.2 2001/06/26 06:24:57 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-mpls.c,v 1.2.4.1 2002/05/07 18:36:28 fenner Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -83,23 +83,24 @@ mpls_print(const u_char *bp, u_int length)
p = bp;
printf("MPLS");
- TCHECK2(*p, sizeof(v));
- memcpy(&v, p, sizeof(v));
- v = (u_int32_t)ntohl(v);
- printf(" ("); /*)*/
- printf("label 0x%x", MPLS_LABEL(v));
- if (vflag &&
- MPLS_LABEL(v) < sizeof(mpls_labelname) / sizeof(mpls_labelname[0]))
- printf("(%s)", mpls_labelname[MPLS_LABEL(v)]);
- if (MPLS_EXP(v))
- printf(" exp 0x%x", MPLS_EXP(v));
- if (MPLS_STACK(v))
- printf("[S]");
- printf(" TTL %u", MPLS_TTL(v));
- /*(*/
- printf(")");
+ do {
+ TCHECK2(*p, sizeof(v));
+ v = EXTRACT_32BITS(p);
+ printf(" ("); /*)*/
+ printf("label 0x%x", MPLS_LABEL(v));
+ if (vflag &&
+ MPLS_LABEL(v) < sizeof(mpls_labelname) / sizeof(mpls_labelname[0]))
+ printf("(%s)", mpls_labelname[MPLS_LABEL(v)]);
+ if (MPLS_EXP(v))
+ printf(" exp 0x%x", MPLS_EXP(v));
+ if (MPLS_STACK(v))
+ printf("[S]");
+ printf(" TTL %u", MPLS_TTL(v));
+ /*(*/
+ printf(")");
- p += sizeof(v);
+ p += sizeof(v);
+ } while (!MPLS_STACK(v));
switch (MPLS_LABEL(v)) {
case 0: /* IPv4 explicit NULL label */
diff --git a/contrib/tcpdump/print-nfs.c b/contrib/tcpdump/print-nfs.c
index 5c2cc6d..48dc9e3 100644
--- a/contrib/tcpdump/print-nfs.c
+++ b/contrib/tcpdump/print-nfs.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-nfs.c,v 1.89 2001/07/08 08:01:43 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-nfs.c,v 1.89.4.2 2002/06/01 23:51:14 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -32,9 +32,6 @@ static const char rcsid[] =
#include <sys/time.h>
#include <sys/socket.h>
-struct mbuf;
-struct rtentry;
-
#include <netinet/in.h>
#include <rpc/rpc.h>
@@ -716,10 +713,16 @@ nfsreq_print(register const u_char *bp, u_int length,
case NFSPROC_FSINFO:
printf(" fsinfo");
+ if ((dp = parsereq(rp, length)) != NULL &&
+ parsefh(dp, v3) != NULL)
+ return;
break;
case NFSPROC_PATHCONF:
printf(" pathconf");
+ if ((dp = parsereq(rp, length)) != NULL &&
+ parsefh(dp, v3) != NULL)
+ return;
break;
case NFSPROC_COMMIT:
@@ -1027,7 +1030,6 @@ parsestatus(const u_int32_t *dp, int *er)
printf(" ERROR: %s",
tok2str(status2str, "unk %d", errnum));
nfserr = 1;
- return (NULL);
}
return (dp + 1);
trunc:
@@ -1109,8 +1111,10 @@ parseattrstat(const u_int32_t *dp, int verbose, int v3)
int er;
dp = parsestatus(dp, &er);
- if (dp == NULL || er)
+ if (dp == NULL)
return (0);
+ if (er)
+ return (1);
return (parsefattr(dp, verbose, v3) != NULL);
}
@@ -1120,8 +1124,10 @@ parsediropres(const u_int32_t *dp)
{
int er;
- if (!(dp = parsestatus(dp, &er)) || er)
+ if (!(dp = parsestatus(dp, &er)))
return (0);
+ if (er)
+ return (1);
dp = parsefh(dp, 0);
if (dp == NULL)
@@ -1136,8 +1142,10 @@ parselinkres(const u_int32_t *dp, int v3)
int er;
dp = parsestatus(dp, &er);
- if (dp == NULL || er)
+ if (dp == NULL)
return(0);
+ if (er)
+ return(1);
if (v3 && !(dp = parse_post_op_attr(dp, vflag)))
return (0);
putchar(' ');
@@ -1151,8 +1159,10 @@ parsestatfs(const u_int32_t *dp, int v3)
int er;
dp = parsestatus(dp, &er);
- if (dp == NULL || (!v3 && er))
+ if (dp == NULL)
return (0);
+ if (!v3 && er)
+ return (1);
if (qflag)
return(1);
@@ -1164,7 +1174,7 @@ parsestatfs(const u_int32_t *dp, int v3)
return (0);
}
- TCHECK2(dp, (v3 ? NFSX_V3STATFS : NFSX_V2STATFS));
+ TCHECK2(*dp, (v3 ? NFSX_V3STATFS : NFSX_V2STATFS));
sfsp = (const struct nfs_statfs *)dp;
@@ -1205,8 +1215,10 @@ parserddires(const u_int32_t *dp)
int er;
dp = parsestatus(dp, &er);
- if (dp == NULL || er)
+ if (dp == NULL)
return (0);
+ if (er)
+ return (1);
if (qflag)
return (1);
@@ -1242,7 +1254,7 @@ parse_pre_op_attr(const u_int32_t *dp, int verbose)
if (!ntohl(dp[0]))
return (dp + 1);
dp++;
- TCHECK2(dp, 24);
+ TCHECK2(*dp, 24);
if (verbose > 1) {
return parse_wcc_attr(dp);
} else {
@@ -1379,9 +1391,9 @@ parsefsinfo(const u_int32_t *dp)
(u_int32_t) ntohl(sfp->fs_timedelta.nfsv3_sec),
(u_int32_t) ntohl(sfp->fs_timedelta.nfsv3_nsec));
}
- return (0);
-trunc:
return (1);
+trunc:
+ return (0);
}
static int
@@ -1409,9 +1421,9 @@ parsepathconf(const u_int32_t *dp)
ntohl(spp->pc_chownrestricted) ? "chownres" : "",
ntohl(spp->pc_caseinsensitive) ? "igncase" : "",
ntohl(spp->pc_casepreserving) ? "keepcase" : "");
- return (0);
-trunc:
return (1);
+trunc:
+ return (0);
}
static void
diff --git a/contrib/tcpdump/print-ntp.c b/contrib/tcpdump/print-ntp.c
index 57a0b7a..f5d348f 100644
--- a/contrib/tcpdump/print-ntp.c
+++ b/contrib/tcpdump/print-ntp.c
@@ -25,7 +25,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.32 2001/08/20 15:36:57 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ntp.c,v 1.32.4.1 2002/07/10 07:13:37 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -155,7 +155,7 @@ ntp_print(register const u_char *cp, u_int length)
break;
case PRIM_REF:
- fn_printn((char *)&(bp->refid), 4, NULL);
+ fn_printn((u_char *)&(bp->refid), 4, NULL);
break;
case INFO_QUERY:
diff --git a/contrib/tcpdump/print-null.c b/contrib/tcpdump/print-null.c
index e02d298..2893585 100644
--- a/contrib/tcpdump/print-null.c
+++ b/contrib/tcpdump/print-null.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.41 2001/07/05 18:54:15 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.41.4.1 2002/06/01 23:51:15 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -31,11 +31,6 @@ static const char rcsid[] =
#include <sys/param.h>
#include <sys/time.h>
#include <sys/socket.h>
-#include <sys/file.h>
-#include <sys/ioctl.h>
-
-struct mbuf;
-struct rtentry;
#include <netinet/in.h>
diff --git a/contrib/tcpdump/print-pim.c b/contrib/tcpdump/print-pim.c
index 63ccb14..a8219dc 100644
--- a/contrib/tcpdump/print-pim.c
+++ b/contrib/tcpdump/print-pim.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.29 2001/07/04 21:36:15 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-pim.c,v 1.29.4.1 2002/05/07 18:30:19 fenner Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -584,7 +584,20 @@ pimv2_print(register const u_char *bp, register u_int len)
(void)printf(")");
break;
+ case 18: /* Old DR-Priority */
+ if (olen == 4)
+ (void)printf(" (OLD-DR-Priority: %d)",
+ EXTRACT_32BITS(&bp[4]));
+ else
+ goto unknown;
+ break;
+
+
case 19: /* DR-Priority */
+ if (olen == 0) {
+ (void)printf(" (OLD-bidir-capable)");
+ break;
+ }
(void)printf(" (DR-Priority: ");
if (olen != 4) {
(void)printf("!olen=%d!)", olen);
@@ -614,6 +627,7 @@ pimv2_print(register const u_char *bp, register u_int len)
break;
default:
+ unknown:
if (vflag)
(void)printf(" [Hello option %d]", otype);
}
diff --git a/contrib/tcpdump/print-radius.c b/contrib/tcpdump/print-radius.c
index a3c8403..9ec4066 100644
--- a/contrib/tcpdump/print-radius.c
+++ b/contrib/tcpdump/print-radius.c
@@ -44,7 +44,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: print-radius.c,v 1.10 2001/10/22 06:58:33 itojun Exp $";
+ "$Id: print-radius.c,v 1.10.2.2 2002/07/03 16:35:04 fenner Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -59,6 +59,10 @@ static const char rcsid[] =
#include <stdio.h>
+#ifdef TIME_WITH_SYS_TIME
+#include <time.h>
+#endif
+
#include "interface.h"
#include "addrtoname.h"
#include "extract.h"
@@ -522,7 +526,8 @@ print_attr_num(register u_char *data, u_int length, u_short attr_code )
data_value = EXTRACT_32BITS(data);
}
if ( data_value <= (attr_type[attr_code].siz_subtypes - 1 +
- attr_type[attr_code].first_subtype) )
+ attr_type[attr_code].first_subtype) &&
+ data_value >= attr_type[attr_code].first_subtype )
printf("{%s}",table[data_value]);
else
printf("{#%d}",data_value);
diff --git a/contrib/tcpdump/print-raw.c b/contrib/tcpdump/print-raw.c
index f6ffc41..a3bfda8 100644
--- a/contrib/tcpdump/print-raw.c
+++ b/contrib/tcpdump/print-raw.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.34 2001/07/05 18:54:17 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-raw.c,v 1.34.4.1 2002/06/01 23:51:15 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -31,8 +31,6 @@ static const char rcsid[] =
#include <sys/param.h>
#include <sys/time.h>
#include <sys/socket.h>
-#include <sys/file.h>
-#include <sys/ioctl.h>
#include <netinet/in.h>
diff --git a/contrib/tcpdump/print-rx.c b/contrib/tcpdump/print-rx.c
index 530965d..a448804 100644
--- a/contrib/tcpdump/print-rx.c
+++ b/contrib/tcpdump/print-rx.c
@@ -34,7 +34,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.27 2001/10/20 07:41:55 itojun Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-rx.c,v 1.27.2.2 2002/07/10 07:17:57 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -44,7 +44,9 @@ static const char rcsid[] =
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef TIME_WITH_SYS_TIME
#include <time.h>
+#endif
#include <sys/param.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -755,15 +757,15 @@ rx_cache_find(const struct rx_header *rxh, const struct ip *ip, int sport,
* This is the sickest one of all
*/
-#define VECOUT(MAX) { char *sp; \
- char s[AFSNAMEMAX]; \
+#define VECOUT(MAX) { u_char *sp; \
+ u_char s[AFSNAMEMAX]; \
int k; \
if ((MAX) + 1 > sizeof(s)) \
goto trunc; \
TCHECK2(bp[0], (MAX) * sizeof(int32_t)); \
sp = s; \
for (k = 0; k < (MAX); k++) { \
- *sp++ = (char) EXTRACT_32BITS(bp); \
+ *sp++ = (u_char) EXTRACT_32BITS(bp); \
bp += sizeof(int32_t); \
} \
s[(MAX)] = '\0'; \
@@ -1128,7 +1130,7 @@ acl_print(u_char *s, int maxsize, u_char *end)
goto finish;
s += n;
printf(" +{");
- fn_print(user, NULL);
+ fn_print((u_char *)user, NULL);
printf(" ");
ACLOUT(acl);
printf("}");
@@ -1141,7 +1143,7 @@ acl_print(u_char *s, int maxsize, u_char *end)
goto finish;
s += n;
printf(" -{");
- fn_print(user, NULL);
+ fn_print((u_char *)user, NULL);
printf(" ");
ACLOUT(acl);
printf("}");
diff --git a/contrib/tcpdump/print-sctp.c b/contrib/tcpdump/print-sctp.c
index 8bf45ca..4f48aaa 100644
--- a/contrib/tcpdump/print-sctp.c
+++ b/contrib/tcpdump/print-sctp.c
@@ -35,7 +35,7 @@
#ifndef lint
static const char rcsid[] =
-"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.7 2001/12/12 07:16:40 guy Exp $ (NETLAB/PEL)";
+"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.7.2.1 2002/07/10 07:20:57 guy Exp $ (NETLAB/PEL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -74,25 +74,25 @@ void sctp_print(const u_char *bp, /* beginning of sctp packet */
const struct ip6_hdr *ip6;
#endif
const u_char *cp;
- void *endPacketPtr;
+ const void *endPacketPtr;
u_short sourcePort, destPort;
int chunkCount;
- struct sctpChunkDesc *chunkDescPtr;
- void *nextChunk;
+ const struct sctpChunkDesc *chunkDescPtr;
+ const void *nextChunk;
- sctpPktHdr = (struct sctpHeader*) bp;
- endPacketPtr = ((u_char*)((u_char*)sctpPktHdr+sctpPacketLength));
+ sctpPktHdr = (const struct sctpHeader*) bp;
+ endPacketPtr = (const u_char*)sctpPktHdr+sctpPacketLength;
if( (u_long) endPacketPtr > (u_long) snapend)
- endPacketPtr = (void *) snapend;
+ endPacketPtr = (const void *) snapend;
ip = (struct ip *)bp2;
#ifdef INET6
if (IP_V(ip) == 6)
- ip6 = (struct ip6_hdr *)bp2;
+ ip6 = (const struct ip6_hdr *)bp2;
else
ip6 = NULL;
#endif /*INET6*/
- cp = (u_char *)(sctpPktHdr + 1);
+ cp = (const u_char *)(sctpPktHdr + 1);
if (cp > snapend)
{
printf("[|sctp]");
@@ -145,31 +145,32 @@ void sctp_print(const u_char *bp, /* beginning of sctp packet */
/* cycle through all chunks, printing information on each one */
for (chunkCount = 0,
- chunkDescPtr = (struct sctpChunkDesc *) ( (u_char*) sctpPktHdr +
- sizeof(struct sctpHeader));
+ chunkDescPtr = (const struct sctpChunkDesc *)
+ ((const u_char*) sctpPktHdr + sizeof(struct sctpHeader));
chunkDescPtr != NULL &&
- ( (void *) ((u_char *) chunkDescPtr + sizeof(struct sctpChunkDesc))
+ ( (const void *)
+ ((const u_char *) chunkDescPtr + sizeof(struct sctpChunkDesc))
<= endPacketPtr);
- chunkDescPtr = (struct sctpChunkDesc *) nextChunk, chunkCount++)
+ chunkDescPtr = (const struct sctpChunkDesc *) nextChunk, chunkCount++)
{
u_short align;
- u_char *chunkEnd;
+ const u_char *chunkEnd;
- chunkEnd = ((u_char*)chunkDescPtr + ntohs(chunkDescPtr->chunkLength));
+ chunkEnd = ((const u_char*)chunkDescPtr + ntohs(chunkDescPtr->chunkLength));
align=ntohs(chunkDescPtr->chunkLength) % 4;
if (align != 0)
align = 4 - align;
- nextChunk = (void *) (chunkEnd + align);
+ nextChunk = (const void *) (chunkEnd + align);
printf("\n\t%d) ", chunkCount+1);
switch (chunkDescPtr->chunkID)
{
case SCTP_DATA :
{
- struct sctpDataPart *dataHdrPtr;
+ const struct sctpDataPart *dataHdrPtr;
printf("[DATA] ");
@@ -195,7 +196,7 @@ void sctp_print(const u_char *bp, /* beginning of sctp packet */
== SCTP_DATA_LAST_FRAG) )
printf(" ");
- dataHdrPtr=(struct sctpDataPart*)(chunkDescPtr+1);
+ dataHdrPtr=(const struct sctpDataPart*)(chunkDescPtr+1);
printf("[TSN: %u] ", (u_int32_t)ntohl(dataHdrPtr->TSN));
printf("[SID: %u] ", ntohs(dataHdrPtr->streamId));
@@ -205,12 +206,12 @@ void sctp_print(const u_char *bp, /* beginning of sctp packet */
if (vflag) /* if verbose output is specified */
{ /* at the command line */
- char *payloadPtr;
+ const u_char *payloadPtr;
printf("[Payload");
if (!xflag && !qflag) {
- payloadPtr = (char *) (++dataHdrPtr);
+ payloadPtr = (const u_char *) (++dataHdrPtr);
printf(":");
default_print(payloadPtr,
htons(chunkDescPtr->chunkLength)-1 -
@@ -222,10 +223,10 @@ void sctp_print(const u_char *bp, /* beginning of sctp packet */
}
case SCTP_INITIATION :
{
- struct sctpInitiation *init;
+ const struct sctpInitiation *init;
printf("[INIT] ");
- init=(struct sctpInitiation*)(chunkDescPtr+1);
+ init=(const struct sctpInitiation*)(chunkDescPtr+1);
printf("[init tag: %u] ", (u_int32_t)ntohl(init->initTag));
printf("[rwnd: %u] ", (u_int32_t)ntohl(init->rcvWindowCredit));
printf("[OS: %u] ", ntohs(init->NumPreopenStreams));
@@ -241,10 +242,10 @@ void sctp_print(const u_char *bp, /* beginning of sctp packet */
}
case SCTP_INITIATION_ACK :
{
- struct sctpInitiation *init;
+ const struct sctpInitiation *init;
printf("[INIT ACK] ");
- init=(struct sctpInitiation*)(chunkDescPtr+1);
+ init=(const struct sctpInitiation*)(chunkDescPtr+1);
printf("[init tag: %u] ", (u_int32_t)ntohl(init->initTag));
printf("[rwnd: %u] ", (u_int32_t)ntohl(init->rcvWindowCredit));
printf("[OS: %u] ", ntohs(init->NumPreopenStreams));
@@ -260,13 +261,13 @@ void sctp_print(const u_char *bp, /* beginning of sctp packet */
}
case SCTP_SELECTIVE_ACK:
{
- struct sctpSelectiveAck *sack;
- struct sctpSelectiveFrag *frag;
+ const struct sctpSelectiveAck *sack;
+ const struct sctpSelectiveFrag *frag;
int fragNo, tsnNo;
- u_long *dupTSN;
+ const u_long *dupTSN;
printf("[SACK] ");
- sack=(struct sctpSelectiveAck*)(chunkDescPtr+1);
+ sack=(const struct sctpSelectiveAck*)(chunkDescPtr+1);
printf("[cum ack %u] ", (u_int32_t)ntohl(sack->highestConseqTSN));
printf("[a_rwnd %u] ", (u_int32_t)ntohl(sack->updatedRwnd));
printf("[#gap acks %u] ", ntohs(sack->numberOfdesc));
@@ -274,10 +275,10 @@ void sctp_print(const u_char *bp, /* beginning of sctp packet */
/* print gaps */
- for (frag = ( (struct sctpSelectiveFrag *)
- ((struct sctpSelectiveAck *) sack+1)),
+ for (frag = ( (const struct sctpSelectiveFrag *)
+ ((const struct sctpSelectiveAck *) sack+1)),
fragNo=0;
- (void *)frag < nextChunk && fragNo < ntohs(sack->numberOfdesc);
+ (const void *)frag < nextChunk && fragNo < ntohs(sack->numberOfdesc);
frag++, fragNo++)
printf("\n\t\t[gap ack block #%d: start = %u, end = %u] ",
fragNo+1,
@@ -286,8 +287,8 @@ void sctp_print(const u_char *bp, /* beginning of sctp packet */
/* print duplicate TSNs */
- for (dupTSN = (u_long*)frag, tsnNo=0;
- (void *) dupTSN < nextChunk && tsnNo<ntohs(sack->numDupTsns);
+ for (dupTSN = (const u_long*)frag, tsnNo=0;
+ (const void *) dupTSN < nextChunk && tsnNo<ntohs(sack->numDupTsns);
dupTSN++, tsnNo++)
printf("\n\t\t[dup TSN #%u: %u] ", tsnNo+1,
(u_int32_t)ntohl(*dupTSN));
@@ -296,9 +297,9 @@ void sctp_print(const u_char *bp, /* beginning of sctp packet */
}
case SCTP_HEARTBEAT_REQUEST :
{
- struct sctpHBsender *hb;
+ const struct sctpHBsender *hb;
- hb=(struct sctpHBsender*)chunkDescPtr;
+ hb=(const struct sctpHBsender*)chunkDescPtr;
printf("[HB REQ] ");
diff --git a/contrib/tcpdump/print-sll.c b/contrib/tcpdump/print-sll.c
index 0b284c8..22bcb15 100644
--- a/contrib/tcpdump/print-sll.c
+++ b/contrib/tcpdump/print-sll.c
@@ -20,7 +20,7 @@
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.6 2001/07/05 18:54:18 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.6.4.1 2002/06/01 23:51:16 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -31,9 +31,6 @@ static const char rcsid[] =
#include <sys/time.h>
#include <sys/socket.h>
-struct mbuf;
-struct rtentry;
-
#include <netinet/in.h>
#include <stdio.h>
diff --git a/contrib/tcpdump/print-smb.c b/contrib/tcpdump/print-smb.c
index eb7df57..c61d866 100644
--- a/contrib/tcpdump/print-smb.c
+++ b/contrib/tcpdump/print-smb.c
@@ -12,13 +12,15 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-smb.c,v 1.20 2002/01/17 04:38:29 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-smb.c,v 1.20.2.4 2002/07/11 07:47:01 guy Exp $";
#endif
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
+#include <netinet/in.h>
+
#include "interface.h"
#include "extract.h"
#include "smb.h"
@@ -173,7 +175,7 @@ print_trans2(const u_char *words, const u_char *dat, const u_char *buf, const u_
static struct smbfnsint *fn = &trans2_fns[0];
const u_char *data, *param;
const u_char *w = words + 1;
- const u_char *f1 = NULL, *f2 = NULL;
+ const char *f1 = NULL, *f2 = NULL;
int pcnt, dcnt;
TCHECK(words[0]);
@@ -224,8 +226,8 @@ print_trans2(const u_char *words, const u_char *dat, const u_char *buf, const u_
if (fn->descript.fn)
(*fn->descript.fn)(param, data, pcnt, dcnt);
else {
- smb_fdata(param, f1 ? f1 : (u_char *)"Paramaters=\n", param + pcnt);
- smb_fdata(data, f2 ? f2 : (u_char *)"Data=\n", data + dcnt);
+ smb_fdata(param, f1 ? f1 : "Parameters=\n", param + pcnt);
+ smb_fdata(data, f2 ? f2 : "Data=\n", data + dcnt);
}
return;
trunc:
@@ -329,7 +331,7 @@ print_ipc(const u_char *param, int paramlen, const u_char *data, int datalen)
static void
print_trans(const u_char *words, const u_char *data1, const u_char *buf, const u_char *maxbuf)
{
- const u_char *f1, *f2, *f3, *f4;
+ const char *f1, *f2, *f3, *f4;
const u_char *data, *param;
const u_char *w = words + 1;
int datalen, paramlen;
@@ -359,12 +361,12 @@ print_trans(const u_char *words, const u_char *data1, const u_char *buf, const u
smb_fdata(words + 1, f1, SMBMIN(words + 1 + 2 * words[0], maxbuf));
smb_fdata(data1 + 2, f2, maxbuf - (paramlen + datalen));
- if (!strcmp(data1 + 2, "\\MAILSLOT\\BROWSE")) {
+ if (strcmp((const char *)(data1 + 2), "\\MAILSLOT\\BROWSE") == 0) {
print_browse(param, paramlen, data, datalen);
return;
}
- if (!strcmp(data1 + 2, "\\PIPE\\LANMAN")) {
+ if (strcmp((const char *)(data1 + 2), "\\PIPE\\LANMAN") == 0) {
print_ipc(param, paramlen, data, datalen);
return;
}
@@ -383,7 +385,7 @@ trunc:
static void
print_negprot(const u_char *words, const u_char *data, const u_char *buf, const u_char *maxbuf)
{
- u_char *f1 = NULL, *f2 = NULL;
+ const char *f1 = NULL, *f2 = NULL;
TCHECK(words[0]);
if (request)
@@ -418,7 +420,7 @@ static void
print_sesssetup(const u_char *words, const u_char *data, const u_char *buf, const u_char *maxbuf)
{
int wcnt;
- u_char *f1 = NULL, *f2 = NULL;
+ const char *f1 = NULL, *f2 = NULL;
TCHECK(words[0]);
wcnt = words[0];
@@ -762,7 +764,7 @@ print_smb(const u_char *buf, const u_char *maxbuf)
TCHECK(words[0]);
for (;;) {
- const u_char *f1, *f2;
+ const char *f1, *f2;
int wct;
int bcc;
@@ -857,9 +859,9 @@ nbt_tcp_print(const u_char *data, int length)
return;
if (vflag > 1)
- printf ("\n>>> ");
+ printf ("\n>>>");
- printf("NBT Packet");
+ printf(" NBT Packet");
if (vflag < 2)
return;
@@ -949,7 +951,7 @@ nbt_udp137_print(const u_char *data, int length)
int name_trn_id, response, opcode, nm_flags, rcode;
int qdcount, ancount, nscount, arcount;
char *opcodestr;
- const char *p;
+ const u_char *p;
int total, i;
TCHECK2(data[10], 2);
@@ -1078,14 +1080,14 @@ nbt_udp137_print(const u_char *data, int length)
p += 2;
}
} else {
- print_data(p, min(rdlen, length - ((const u_char *)p - data)));
+ print_data(p, min(rdlen, length - (p - data)));
p += rdlen;
}
}
}
}
- if ((u_char*)p < maxbuf)
+ if (p < maxbuf)
smb_fdata(p, "AdditionalData:\n", maxbuf);
out:
diff --git a/contrib/tcpdump/print-snmp.c b/contrib/tcpdump/print-snmp.c
index a2638ce..cdb189e 100644
--- a/contrib/tcpdump/print-snmp.c
+++ b/contrib/tcpdump/print-snmp.c
@@ -58,7 +58,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-snmp.c,v 1.50 2001/09/17 22:16:53 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-snmp.c,v 1.50.4.2 2002/07/20 23:33:08 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -688,13 +688,17 @@ asn1_print(struct be *elem)
/*
* first subitem encodes two items with 1st*OIDMUX+2nd
+ * (see X.690:1997 clause 8.19 for the details)
*/
if (first < 0) {
+ int s;
if (!nflag)
objp = mibroot;
first = 0;
- OBJ_PRINT(o/OIDMUX, first);
- o %= OIDMUX;
+ s = o / OIDMUX;
+ if (s > 2) s = 2;
+ OBJ_PRINT(s, first);
+ o -= s * OIDMUX;
}
OBJ_PRINT(o, first);
if (--first < 0)
@@ -875,16 +879,19 @@ static void smi_decode_oid(struct be *elem, unsigned int *oid,
/*
* first subitem encodes two items with 1st*OIDMUX+2nd
+ * (see X.690:1997 clause 8.19 for the details)
*/
if (first < 0) {
first = 0;
if (*oidlen < oidsize) {
- oid[(*oidlen)++] = o/OIDMUX;
+ oid[*oidlen] = o / OIDMUX;
+ if (oid[*oidlen] > 2) oid[*oidlen] = 2;
}
- o %= OIDMUX;
+ o -= oid[*oidlen] * OIDMUX;
+ if (*oidlen < oidsize) (*oidlen)++;
}
if (*oidlen < oidsize) {
- oid[(*oidlen)++] = o;
+ oid[(*oidlen)++] = o;
}
o = 0;
}
@@ -1530,8 +1537,9 @@ community_print(const u_char *np, u_int length, int version)
return;
}
/* default community */
- if (strncmp((char *)elem.data.str, DEF_COMMUNITY,
- sizeof(DEF_COMMUNITY) - 1))
+ if (!(elem.asnlen == sizeof(DEF_COMMUNITY) - 1 &&
+ strncmp((char *)elem.data.str, DEF_COMMUNITY,
+ sizeof(DEF_COMMUNITY) - 1) == 0))
/* ! "public" */
printf("C=%.*s ", (int)elem.asnlen, elem.data.str);
length -= count;
diff --git a/contrib/tcpdump/print-stp.c b/contrib/tcpdump/print-stp.c
index 9281663..40d4d79 100644
--- a/contrib/tcpdump/print-stp.c
+++ b/contrib/tcpdump/print-stp.c
@@ -11,7 +11,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-stp.c,v 1.6 2000/09/29 04:58:50 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-stp.c,v 1.6.6.1 2002/05/29 10:00:00 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -96,7 +96,7 @@ stp_print(const u_char *p, u_int length)
break;
default:
- printf("unknown type %i\n", p[6]);
+ printf("unknown type %i", p[6]);
break;
}
diff --git a/contrib/tcpdump/print-sunrpc.c b/contrib/tcpdump/print-sunrpc.c
index 7ab39d0..968a68c 100644
--- a/contrib/tcpdump/print-sunrpc.c
+++ b/contrib/tcpdump/print-sunrpc.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.39 2000/10/07 05:53:13 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-sunrpc.c,v 1.39.6.1 2002/06/01 23:51:16 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -32,9 +32,6 @@ static const char rcsid[] =
#include <sys/time.h>
#include <sys/socket.h>
-struct mbuf;
-struct rtentry;
-
#include <netinet/in.h>
#include <rpc/rpc.h>
diff --git a/contrib/tcpdump/print-zephyr.c b/contrib/tcpdump/print-zephyr.c
index 5792e60..f1b7907 100644
--- a/contrib/tcpdump/print-zephyr.c
+++ b/contrib/tcpdump/print-zephyr.c
@@ -20,7 +20,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-zephyr.c,v 1.2 2001/09/11 02:37:12 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-zephyr.c,v 1.2.4.2 2002/07/11 07:49:19 guy Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -56,7 +56,7 @@ struct z_packet {
/* Other fields follow here.. */
};
-enum {
+enum z_packet_type {
Z_PACKET_UNSAFE = 0,
Z_PACKET_UNACKED,
Z_PACKET_ACKED,
@@ -66,7 +66,7 @@ enum {
Z_PACKET_SERVNAK,
Z_PACKET_CLIENTACK,
Z_PACKET_STAT
-} z_packet_type;
+};
static struct tok z_types[] = {
{ Z_PACKET_UNSAFE, "unsafe" },
@@ -122,7 +122,7 @@ str_to_lower(char *string)
string = z_buf;
while (*string) {
- *string = tolower(*string);
+ *string = tolower((unsigned char)(*string));
string++;
}
diff --git a/contrib/tcpdump/smbutil.c b/contrib/tcpdump/smbutil.c
index 756a8d2..84c6f33 100644
--- a/contrib/tcpdump/smbutil.c
+++ b/contrib/tcpdump/smbutil.c
@@ -12,7 +12,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/smbutil.c,v 1.18 2002/01/17 04:38:29 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/smbutil.c,v 1.18.2.3 2002/07/10 07:29:23 guy Exp $";
#endif
#include <sys/param.h>
@@ -26,7 +26,9 @@ static const char rcsid[] =
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef TIME_WITH_SYS_TIME
#include <time.h>
+#endif
#include "interface.h"
#include "extract.h"
@@ -336,7 +338,7 @@ write_bits(unsigned int val, char *fmt)
/* convert a UCS2 string into iso-8859-1 string */
static const char *
-unistr(const char *s, int *len)
+unistr(const u_char *s, int *len)
{
static char buf[1000];
int l=0;
@@ -352,8 +354,8 @@ unistr(const char *s, int *len)
/* maybe it isn't unicode - a cheap trick */
if (!use_unicode || (s[0] && s[1])) {
- *len = strlen(s) + 1;
- return s;
+ *len = strlen((const char *)s) + 1;
+ return (const char *)s;
}
*len = 0;
@@ -398,8 +400,11 @@ smb_fdata1(const u_char *buf, const char *fmt, const u_char *maxbuf)
case '{':
{
char bitfmt[128];
- char *p = strchr(++fmt, '}');
- int l = PTR_DIFF(p, fmt);
+ char *p;
+ int l;
+
+ p = strchr(++fmt, '}');
+ l = PTR_DIFF(p, fmt);
strncpy(bitfmt, fmt, l);
bitfmt[l] = 0;
fmt = p + 1;
@@ -413,7 +418,7 @@ smb_fdata1(const u_char *buf, const char *fmt, const u_char *maxbuf)
int l = atoi(fmt + 1);
buf += l;
fmt++;
- while (isdigit(*fmt))
+ while (isdigit((unsigned char)*fmt))
fmt++;
break;
}
@@ -527,7 +532,7 @@ smb_fdata1(const u_char *buf, const char *fmt, const u_char *maxbuf)
printf("%-*.*s", l, l, buf);
buf += l;
fmt++;
- while (isdigit(*fmt))
+ while (isdigit((unsigned char)*fmt))
fmt++;
break;
}
@@ -537,7 +542,7 @@ smb_fdata1(const u_char *buf, const char *fmt, const u_char *maxbuf)
while (l--)
printf("%02x", *buf++);
fmt++;
- while (isdigit(*fmt))
+ while (isdigit((unsigned char)*fmt))
fmt++;
break;
}
@@ -569,7 +574,7 @@ smb_fdata1(const u_char *buf, const char *fmt, const u_char *maxbuf)
break;
}
fmt++;
- while (isdigit(*fmt))
+ while (isdigit((unsigned char)*fmt))
fmt++;
break;
}
@@ -601,7 +606,7 @@ smb_fdata1(const u_char *buf, const char *fmt, const u_char *maxbuf)
}
printf("%s", t ? asctime(localtime(&t)) : "NULL\n");
fmt++;
- while (isdigit(*fmt))
+ while (isdigit((unsigned char)*fmt))
fmt++;
break;
}
diff --git a/contrib/tcpdump/util.c b/contrib/tcpdump/util.c
index 3e498ac..f5bd7ca 100644
--- a/contrib/tcpdump/util.c
+++ b/contrib/tcpdump/util.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/util.c,v 1.72 2001/10/08 16:12:13 fenner Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/util.c,v 1.72.2.2 2002/07/16 04:03:54 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -354,8 +354,8 @@ safeputchar(int c)
unsigned char ch;
ch = (unsigned char)(c & 0xff);
- if (c < 0x80 && isprint(c))
- printf("%c", c & 0xff);
+ if (ch < 0x80 && isprint(ch))
+ printf("%c", ch);
else
- printf("\\%03o", c & 0xff);
+ printf("\\%03o", ch);
}
OpenPOWER on IntegriCloud