auto import from //depot/cupcake/@135843
authorThe Android Open Source Project <initial-contribution@android.com>
Wed, 4 Mar 2009 03:30:46 +0000 (19:30 -0800)
committerThe Android Open Source Project <initial-contribution@android.com>
Wed, 4 Mar 2009 03:30:46 +0000 (19:30 -0800)
347 files changed:
Android.mk [new file with mode: 0644]
CHANGES [new file with mode: 0644]
CREDITS [new file with mode: 0644]
FILES [new file with mode: 0644]
INSTALL [new file with mode: 0644]
LICENSE [new file with mode: 0644]
MODULE_LICENSE_BSD [new file with mode: 0644]
Makefile-devel-adds [new file with mode: 0644]
Makefile.in [new file with mode: 0644]
NOTICE [new file with mode: 0644]
PLATFORMS [new file with mode: 0644]
README [new file with mode: 0644]
TODO [new file with mode: 0644]
VERSION [new file with mode: 0644]
acconfig.h [new file with mode: 0644]
aclocal.m4 [new file with mode: 0644]
addrtoname.c [new file with mode: 0644]
addrtoname.h [new file with mode: 0644]
af.c [new file with mode: 0644]
af.h [new file with mode: 0644]
ah.h [new file with mode: 0644]
aodv.h [new file with mode: 0644]
appletalk.h [new file with mode: 0644]
arcnet.h [new file with mode: 0644]
atime.awk [new file with mode: 0644]
atm.h [new file with mode: 0644]
atmuni31.h [new file with mode: 0644]
bgp.h [new file with mode: 0755]
bootp.h [new file with mode: 0644]
bpf_dump.c [new file with mode: 0644]
chdlc.h [new file with mode: 0644]
config.guess [new file with mode: 0755]
config.h [new file with mode: 0644]
config.h.in [new file with mode: 0644]
config.sub [new file with mode: 0755]
configure [new file with mode: 0755]
configure.in [new file with mode: 0644]
cpack.c [new file with mode: 0644]
cpack.h [new file with mode: 0644]
dccp.h [new file with mode: 0644]
decnet.h [new file with mode: 0644]
decode_prefix.h [new file with mode: 0644]
enc.h [new file with mode: 0644]
esp.h [new file with mode: 0644]
ether.h [new file with mode: 0644]
ethertype.h [new file with mode: 0644]
extract.h [new file with mode: 0644]
fddi.h [new file with mode: 0644]
gmpls.c [new file with mode: 0644]
gmpls.h [new file with mode: 0644]
gmt2local.c [new file with mode: 0644]
gmt2local.h [new file with mode: 0644]
icmp6.h [new file with mode: 0644]
ieee802_11.h [new file with mode: 0644]
ieee802_11_radio.h [new file with mode: 0644]
igrp.h [new file with mode: 0644]
install-sh [new file with mode: 0755]
interface.h [new file with mode: 0644]
ip.h [new file with mode: 0644]
ip6.h [new file with mode: 0644]
ipfc.h [new file with mode: 0644]
ipproto.c [new file with mode: 0755]
ipproto.h [new file with mode: 0644]
ipsec_doi.h [new file with mode: 0644]
ipx.h [new file with mode: 0644]
isakmp.h [new file with mode: 0644]
l2tp.h [new file with mode: 0644]
l2vpn.c [new file with mode: 0755]
l2vpn.h [new file with mode: 0755]
lane.h [new file with mode: 0644]
lbl/os-osf4.h [new file with mode: 0644]
lbl/os-solaris2.h [new file with mode: 0644]
lbl/os-sunos4.h [new file with mode: 0644]
lbl/os-ultrix4.h [new file with mode: 0644]
llc.h [new file with mode: 0644]
machdep.c [new file with mode: 0644]
machdep.h [new file with mode: 0644]
makemib [new file with mode: 0755]
mib.h [new file with mode: 0644]
missing/addrinfo.h [new file with mode: 0644]
missing/addrsize.h [new file with mode: 0644]
missing/bittypes.h [new file with mode: 0644]
missing/datalinks.c [new file with mode: 0644]
missing/dlnames.c [new file with mode: 0644]
missing/getaddrinfo.c [new file with mode: 0644]
missing/getnameinfo.c [new file with mode: 0644]
missing/inet_aton.c [new file with mode: 0644]
missing/inet_ntop.c [new file with mode: 0644]
missing/inet_pton.c [new file with mode: 0644]
missing/resolv6.h [new file with mode: 0644]
missing/resolv_ext.h [new file with mode: 0644]
missing/snprintf.c [new file with mode: 0644]
missing/sockstorage.h [new file with mode: 0644]
missing/strdup.c [new file with mode: 0644]
missing/strlcat.c [new file with mode: 0644]
missing/strlcpy.c [new file with mode: 0644]
missing/strsep.c [new file with mode: 0644]
mkdep [new file with mode: 0755]
mpls.h [new file with mode: 0644]
nameser.h [new file with mode: 0644]
netbios.h [new file with mode: 0644]
netdissect.h [new file with mode: 0644]
nfs.h [new file with mode: 0644]
nfsfh.h [new file with mode: 0644]
nlpid.c [new file with mode: 0755]
nlpid.h [new file with mode: 0644]
ntp.h [new file with mode: 0644]
oakley.h [new file with mode: 0644]
ospf.h [new file with mode: 0644]
ospf6.h [new file with mode: 0644]
oui.c [new file with mode: 0644]
oui.h [new file with mode: 0644]
packetdat.awk [new file with mode: 0644]
parsenfsfh.c [new file with mode: 0644]
pcap-missing.h [new file with mode: 0644]
pcap_dump_ftell.c [new file with mode: 0644]
pmap_prot.h [new file with mode: 0644]
ppp.h [new file with mode: 0644]
print-802_11.c [new file with mode: 0644]
print-ah.c [new file with mode: 0644]
print-aodv.c [new file with mode: 0644]
print-ap1394.c [new file with mode: 0644]
print-arcnet.c [new file with mode: 0644]
print-arp.c [new file with mode: 0644]
print-ascii.c [new file with mode: 0644]
print-atalk.c [new file with mode: 0644]
print-atm.c [new file with mode: 0644]
print-beep.c [new file with mode: 0644]
print-bfd.c [new file with mode: 0644]
print-bgp.c [new file with mode: 0644]
print-bootp.c [new file with mode: 0644]
print-cdp.c [new file with mode: 0644]
print-chdlc.c [new file with mode: 0644]
print-cip.c [new file with mode: 0644]
print-cnfp.c [new file with mode: 0644]
print-dccp.c [new file with mode: 0644]
print-decnet.c [new file with mode: 0644]
print-dhcp6.c [new file with mode: 0644]
print-domain.c [new file with mode: 0644]
print-dvmrp.c [new file with mode: 0644]
print-eap.c [new file with mode: 0644]
print-egp.c [new file with mode: 0644]
print-eigrp.c [new file with mode: 0644]
print-enc.c [new file with mode: 0644]
print-esp.c [new file with mode: 0644]
print-ether.c [new file with mode: 0644]
print-fddi.c [new file with mode: 0644]
print-fr.c [new file with mode: 0644]
print-frag6.c [new file with mode: 0644]
print-gre.c [new file with mode: 0644]
print-hsrp.c [new file with mode: 0644]
print-icmp.c [new file with mode: 0644]
print-icmp6.c [new file with mode: 0644]
print-igmp.c [new file with mode: 0644]
print-igrp.c [new file with mode: 0644]
print-ip.c [new file with mode: 0644]
print-ip6.c [new file with mode: 0644]
print-ip6opts.c [new file with mode: 0644]
print-ipcomp.c [new file with mode: 0644]
print-ipfc.c [new file with mode: 0644]
print-ipx.c [new file with mode: 0644]
print-isakmp.c [new file with mode: 0644]
print-isoclns.c [new file with mode: 0644]
print-juniper.c [new file with mode: 0644]
print-krb.c [new file with mode: 0644]
print-l2tp.c [new file with mode: 0644]
print-lane.c [new file with mode: 0644]
print-ldp.c [new file with mode: 0644]
print-llc.c [new file with mode: 0644]
print-lmp.c [new file with mode: 0644]
print-lspping.c [new file with mode: 0644]
print-lwres.c [new file with mode: 0644]
print-mobile.c [new file with mode: 0644]
print-mobility.c [new file with mode: 0644]
print-mpls.c [new file with mode: 0644]
print-msdp.c [new file with mode: 0644]
print-netbios.c [new file with mode: 0644]
print-nfs.c [new file with mode: 0644]
print-ntp.c [new file with mode: 0644]
print-null.c [new file with mode: 0644]
print-olsr.c [new file with mode: 0644]
print-ospf.c [new file with mode: 0644]
print-ospf6.c [new file with mode: 0644]
print-pflog.c [new file with mode: 0644]
print-pgm.c [new file with mode: 0644]
print-pim.c [new file with mode: 0644]
print-ppp.c [new file with mode: 0644]
print-pppoe.c [new file with mode: 0644]
print-pptp.c [new file with mode: 0644]
print-radius.c [new file with mode: 0644]
print-raw.c [new file with mode: 0644]
print-rip.c [new file with mode: 0644]
print-ripng.c [new file with mode: 0644]
print-rsvp.c [new file with mode: 0644]
print-rt6.c [new file with mode: 0644]
print-rx.c [new file with mode: 0644]
print-sctp.c [new file with mode: 0644]
print-sip.c [new file with mode: 0644]
print-sl.c [new file with mode: 0644]
print-sll.c [new file with mode: 0644]
print-slow.c [new file with mode: 0644]
print-smb.c [new file with mode: 0644]
print-snmp.c [new file with mode: 0644]
print-stp.c [new file with mode: 0644]
print-sunatm.c [new file with mode: 0644]
print-sunrpc.c [new file with mode: 0644]
print-symantec.c [new file with mode: 0644]
print-syslog.c [new file with mode: 0755]
print-tcp.c [new file with mode: 0644]
print-telnet.c [new file with mode: 0644]
print-tftp.c [new file with mode: 0644]
print-timed.c [new file with mode: 0644]
print-token.c [new file with mode: 0644]
print-udp.c [new file with mode: 0644]
print-vjc.c [new file with mode: 0644]
print-vrrp.c [new file with mode: 0644]
print-wb.c [new file with mode: 0644]
print-zephyr.c [new file with mode: 0644]
route6d.h [new file with mode: 0644]
rpc_auth.h [new file with mode: 0644]
rpc_msg.h [new file with mode: 0644]
rx.h [new file with mode: 0644]
sctpConstants.h [new file with mode: 0644]
sctpHeader.h [new file with mode: 0644]
send-ack.awk [new file with mode: 0644]
setsignal.c [new file with mode: 0644]
setsignal.h [new file with mode: 0644]
slcompress.h [new file with mode: 0644]
slip.h [new file with mode: 0644]
sll.h [new file with mode: 0644]
smb.h [new file with mode: 0644]
smbutil.c [new file with mode: 0644]
stime.awk [new file with mode: 0644]
strcasecmp.c [new file with mode: 0644]
tcp.h [new file with mode: 0644]
tcpdump-stdinc.h [new file with mode: 0644]
tcpdump.1 [new file with mode: 0644]
tcpdump.c [new file with mode: 0644]
telnet.h [new file with mode: 0644]
tests/.cvsignore [new file with mode: 0644]
tests/02-sunrise-sunset-esp.pcap [new file with mode: 0644]
tests/02-sunrise-sunset-esp.puu [new file with mode: 0644]
tests/08-sunrise-sunset-aes.pcap [new file with mode: 0644]
tests/08-sunrise-sunset-aes.puu [new file with mode: 0644]
tests/08-sunrise-sunset-esp2.pcap [new file with mode: 0644]
tests/08-sunrise-sunset-esp2.puu [new file with mode: 0644]
tests/alltests.sh [new file with mode: 0644]
tests/bgp-infinite-loop.pcap [new file with mode: 0644]
tests/bgp_vpn_attrset.out [new file with mode: 0644]
tests/bgp_vpn_attrset.pcap [new file with mode: 0644]
tests/bgp_vpn_attrset.sh [new file with mode: 0755]
tests/chdlc-slarp-short.pcap [new file with mode: 0644]
tests/chdlc-slarp.pcap [new file with mode: 0644]
tests/eapon1.gdbinit [new file with mode: 0644]
tests/eapon1.new [new file with mode: 0644]
tests/eapon1.out [new file with mode: 0644]
tests/eapon1.pcap [new file with mode: 0644]
tests/eapon1.puu [new file with mode: 0644]
tests/eapon1.sh [new file with mode: 0755]
tests/eapon2.puu [new file with mode: 0644]
tests/esp-secrets.txt [new file with mode: 0644]
tests/esp0.out [new file with mode: 0644]
tests/esp0.sh [new file with mode: 0644]
tests/esp1.gdbinit [new file with mode: 0644]
tests/esp1.new [new file with mode: 0644]
tests/esp1.out [new file with mode: 0644]
tests/esp1.sh [new file with mode: 0644]
tests/esp2.gdbinit [new file with mode: 0644]
tests/esp2.new [new file with mode: 0644]
tests/esp2.out [new file with mode: 0644]
tests/esp2.sh [new file with mode: 0644]
tests/esp3.gdbinit [new file with mode: 0644]
tests/esp3.new [new file with mode: 0644]
tests/esp3.sh [new file with mode: 0644]
tests/esp4.gdbinit [new file with mode: 0644]
tests/esp4.new [new file with mode: 0644]
tests/esp4.sh [new file with mode: 0644]
tests/esp5.gdbinit [new file with mode: 0644]
tests/esp5.new [new file with mode: 0644]
tests/esp5.out [new file with mode: 0644]
tests/esp5.sh [new file with mode: 0644]
tests/espudp1.new [new file with mode: 0644]
tests/espudp1.out [new file with mode: 0644]
tests/espudp1.pcap [new file with mode: 0644]
tests/espudp1.puu [new file with mode: 0644]
tests/espudp1.sh [new file with mode: 0644]
tests/isakmp-delete-segfault.pcap [new file with mode: 0644]
tests/isakmp-delete-segfault.puu [new file with mode: 0644]
tests/isakmp-identification-segfault.pcap [new file with mode: 0644]
tests/isakmp-identification-segfault.puu [new file with mode: 0644]
tests/isakmp-pointer-loop.pcap [new file with mode: 0644]
tests/isakmp-pointer-loop.puu [new file with mode: 0644]
tests/isakmp1.out [new file with mode: 0644]
tests/isakmp1.sh [new file with mode: 0644]
tests/isakmp2.out [new file with mode: 0644]
tests/isakmp2.sh [new file with mode: 0644]
tests/isakmp3.new [new file with mode: 0644]
tests/isakmp3.out [new file with mode: 0644]
tests/isakmp3.sh [new file with mode: 0644]
tests/isakmp4.new [new file with mode: 0644]
tests/isakmp4.out [new file with mode: 0644]
tests/isakmp4.sh [new file with mode: 0644]
tests/isakmp4500.pcap [new file with mode: 0644]
tests/isakmp4500.puu [new file with mode: 0644]
tests/isis-infinite-loop.pcap [new file with mode: 0644]
tests/ldp-infinite-loop.pcap [new file with mode: 0644]
tests/lmp.new [new file with mode: 0644]
tests/lmp.out [new file with mode: 0644]
tests/lmp.pcap [new file with mode: 0644]
tests/lmp.puu [new file with mode: 0644]
tests/lmp.sh [new file with mode: 0755]
tests/lspping-fec-ldp.pcap [new file with mode: 0644]
tests/lspping-fec-rsvp.pcap [new file with mode: 0644]
tests/mpls-ldp-hello.new [new file with mode: 0644]
tests/mpls-ldp-hello.out [new file with mode: 0644]
tests/mpls-ldp-hello.pcap [new file with mode: 0644]
tests/mpls-ldp-hello.puu [new file with mode: 0644]
tests/mpls-ldp-hello.sh [new file with mode: 0755]
tests/mpls-traceroute.pcap [new file with mode: 0644]
tests/ospf-gmpls.new [new file with mode: 0644]
tests/ospf-gmpls.out [new file with mode: 0644]
tests/ospf-gmpls.pcap [new file with mode: 0644]
tests/ospf-gmpls.puu [new file with mode: 0644]
tests/ospf-gmpls.sh [new file with mode: 0755]
tests/print-A.new [new file with mode: 0644]
tests/print-A.out [new file with mode: 0644]
tests/print-AA.new [new file with mode: 0644]
tests/print-AA.out [new file with mode: 0644]
tests/print-X.new [new file with mode: 0644]
tests/print-XX.new [new file with mode: 0644]
tests/print-capX.out [new file with mode: 0644]
tests/print-capXX.out [new file with mode: 0644]
tests/print-flags.pcap [new file with mode: 0644]
tests/print-flags.puu [new file with mode: 0644]
tests/print-flags.sh [new file with mode: 0755]
tests/print-x.new [new file with mode: 0644]
tests/print-x.out [new file with mode: 0644]
tests/print-xx.new [new file with mode: 0644]
tests/print-xx.out [new file with mode: 0644]
tests/rsvp-infinite-loop.pcap [new file with mode: 0644]
tftp.h [new file with mode: 0644]
timed.h [new file with mode: 0644]
token.h [new file with mode: 0644]
udp.h [new file with mode: 0644]
util.c [new file with mode: 0644]
version.c [new file with mode: 0644]
vfprintf.c [new file with mode: 0644]

diff --git a/Android.mk b/Android.mk
new file mode 100644 (file)
index 0000000..0985b10
--- /dev/null
@@ -0,0 +1,138 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=\
+       addrtoname.c\
+       af.c\
+       cpack.c\
+       gmpls.c\
+       oui.c\
+       gmt2local.c\
+       ipproto.c\
+       nlpid.c\
+       l2vpn.c\
+       machdep.c\
+       parsenfsfh.c\
+       print-802_11.c\
+       print-ap1394.c\
+       print-ah.c\
+       print-arcnet.c\
+       print-aodv.c\
+       print-arp.c\
+       print-ascii.c\
+       print-atalk.c\
+       print-atm.c\
+       print-beep.c\
+       print-bfd.c\
+       print-bgp.c\
+       print-bootp.c\
+       print-cdp.c\
+       print-chdlc.c\
+       print-cip.c\
+       print-cnfp.c\
+       print-dccp.c\
+       print-dhcp6.c\
+       print-decnet.c\
+       print-domain.c\
+       print-dvmrp.c\
+       print-enc.c\
+       print-egp.c\
+       print-eap.c\
+       print-eigrp.c\
+       print-esp.c\
+       print-ether.c\
+       print-fddi.c\
+       print-fr.c\
+       print-frag6.c\
+       print-gre.c\
+       print-hsrp.c\
+       print-icmp.c\
+       print-icmp6.c\
+       print-igmp.c\
+       print-igrp.c\
+       print-ip.c\
+       print-ip6.c\
+       print-ip6opts.c\
+       print-ipcomp.c\
+       print-ipfc.c\
+       print-ipx.c\
+       print-isakmp.c\
+       print-isoclns.c\
+       print-juniper.c\
+       print-krb.c\
+       print-l2tp.c\
+       print-lane.c\
+       print-ldp.c\
+       print-llc.c\
+       print-lmp.c\
+       print-lspping.c\
+       print-lwres.c\
+       print-mobile.c\
+       print-mobility.c\
+       print-mpls.c\
+       print-msdp.c\
+       print-nfs.c\
+       print-ntp.c\
+       print-null.c\
+       print-olsr.c\
+       print-ospf.c\
+       print-ospf6.c\
+       print-pgm.c\
+       print-pim.c\
+       print-ppp.c\
+       print-pppoe.c\
+       print-pptp.c\
+       print-radius.c\
+       print-raw.c\
+       print-rip.c\
+       print-ripng.c\
+       print-rsvp.c\
+       print-rt6.c\
+       print-rx.c\
+       print-sctp.c\
+       print-sip.c\
+       print-sl.c\
+       print-sll.c\
+       print-slow.c\
+       print-snmp.c\
+       print-stp.c\
+       print-sunatm.c\
+       print-sunrpc.c\
+       print-symantec.c\
+       print-syslog.c\
+       print-tcp.c\
+       print-telnet.c\
+       print-tftp.c\
+       print-timed.c\
+       print-token.c\
+       print-udp.c\
+       print-vjc.c\
+       print-vrrp.c\
+       print-wb.c\
+       print-zephyr.c\
+       setsignal.c\
+       tcpdump.c\
+       util.c\
+       version.c\
+       print-smb.c\
+       smbutil.c\
+       missing/strlcat.c\
+       missing/strlcpy.c
+
+LOCAL_CFLAGS:=-O2 -g
+LOCAL_CFLAGS+=-DHAVE_CONFIG_H -D_U_="__attribute__((unused))"
+
+LOCAL_C_INCLUDES+=\
+       $(LOCAL_PATH)/missing\
+       external/openssl/include\
+       external/libpcap
+
+LOCAL_SHARED_LIBRARIES+=libssl
+
+LOCAL_STATIC_LIBRARIES+=libpcap
+
+LOCAL_MODULE_TAGS:=tests
+
+LOCAL_MODULE:=tcpdump
+
+include $(BUILD_EXECUTABLE)
diff --git a/CHANGES b/CHANGES
new file mode 100644 (file)
index 0000000..aa29e30
--- /dev/null
+++ b/CHANGES
@@ -0,0 +1,878 @@
+$Header: /tcpdump/master/tcpdump/CHANGES,v 1.87.2.17 2007/09/13 13:39:44 ken Exp $
+
+Mon.   September 10, 2007.  ken@xelerance.com.  Summary for 0.9.8 tcpdump release
+       Rework ARP printer
+       Rework OSPFv3 printer
+       Add support for Frame-Relay ARP
+       Decode DHCP Option 121 (RFC 3442 Classless Static Route)
+       Decode DHCP Option 249 (MS Classless Static Route) the same as Option 121
+       TLV: Add support for Juniper .pcap extensions
+       Print EGP header in new-world-order style
+       Converted print-isakmp.c to NETDISSECT
+       Moved AF specific stuff into af.h
+       Test subsystem now table driven, and saves outputs and diffs to one place
+        Require <net/pfvar.h> for pf definitions - allows reading of pflog formatted 
+         libpcap files on an OS other than where the file was generated
+
+Wed.   July 23, 2007.  mcr@xelerance.com.  Summary for 0.9.7 tcpdump release
+
+       NFS: Print unsigned values as such. 
+       RX: parse safely.
+       BGP: fixes for IPv6-less builds.
+       801.1ag: use standard codepoint.
+       use /dev/bpf on systems with such a device.
+       802.11: print QoS data, avoid dissect of no-data frame, ignore padding.
+       smb: make sure that we haven't gone past the end of the captured data.
+       smb: squelch an uninitialized complaint from coverity.
+       NFS: from NetBSD; don't interpret the reply as a possible NFS reply
+               if it got MSG_DENIED.
+       BGP: don't print TLV values that didn't fit, from www.digit-labs.org. 
+       revised INSTALL.txt about libpcap dependancy.
+
+Wed.   April 25, 2007. ken@xelerance.com.  Summary for 3.9.6 tcpdump release
+       Update man page to reflect changes to libpcap
+       Changes to both TCP and IP Printer Output
+       Fix a potential buffer overflow in the 802.11 printer
+       Print basic info about a few more Cisco LAN protocols.
+       mDNS cleanup
+       ICMP MPLS rework of the extension code
+       bugfix: use the correct codepoint for the OSPF simple text auth token
+        entry, and use safeputs to print the password.
+       Add support in pflog for additional values
+       Add support for OIF RSVP Extensions UNI 1.0 Rev. 2 and additional RSVP objects
+       Add support for the Message-id NACK c-type.
+       Add support for 802.3ah loopback ctrl msg
+       Add support for Multiple-STP as per 802.1s
+       Add support for rapid-SPT as per 802.1w
+       Add support for CFM Link-trace msg, Link-trace-Reply msg, 
+        Sender-ID tlv, private tlv, port, interface status
+       Add support for unidirectional link detection as per
+        http://www.ietf.org/internet-drafts/draft-foschiano-udld-02.txt
+       Add support for the olsr protocol as per RFC 3626 plus the LQ 
+        extensions from olsr.org
+       Add support for variable-length checksum in DCCP, as per section 9 of
+        RFC 4340.
+       Add support for per-VLAN spanning tree and per-VLAN rapid spanning tree
+       Add support for Multiple-STP as per 802.1s
+       Add support for the cisco propriatry 'dynamic trunking protocol'
+       Add support for the cisco proprietary VTP protocol
+       Update dhcp6 options table as per IETF standardization activities
+
+
+Tue.   September 19, 2006. ken@xelerance.com. Summary for 3.9.5 tcpdump release
+       
+       Fix compiling on AIX (, at end of ENUM)
+       Updated list of DNS RR typecodes
+       Use local Ethernet defs on WIN32
+       Add support for Frame-Relay ARP
+       Fixes for compiling under MSVC++
+       Add support for parsing Juniper .pcap files
+       Add support for FRF.16 Multilink Frame-Relay (DLT_MFR)
+       Rework the OSPFv3 printer
+       Fix printing for 4.4BSD/NetBSD NFS Filehandles
+       Add support for Cisco style NLPID encapsulation
+       Add cisco prop. eigrp related, extended communities
+       Add support for BGP signaled VPLS
+       Cleanup the bootp printer
+       Add support for PPP over Frame-Relay
+       Add some bounds checking to the IP options code, and clean up 
+        the options output a bit.
+       Add additional modp groups to ISAKMP printer
+       Add support for Address-Withdraw and Label-Withdraw Msgs
+       Add support for the BFD Discriminator TLV
+       Fixes for 64bit compiling
+       Add support for PIMv2 checksum verification
+       Add support for further dissection of the IPCP Compression Option
+       Add support for Cisco's proposed VQP protocol
+       Add basic support for keyed authentication TCP option
+       Lots of minor cosmetic changes to output printers
+
+
+Mon.   September 19, 2005.  ken@xelerance.com. Summary for 3.9.4 tcpdump release
+       Decoder support for more Juniper link-layer types
+       Fix a potential buffer overflow (although it can't occur in
+               practice).
+       Fix the handling of unknown management frame types in the 802.11
+               printer.
+       Add FRF.16 support, fix various Frame Relay bugs.
+       Add support for RSVP integrity objects, update fast-reroute
+               object printer to latest spec.
+       Clean up documentation of vlan filter expression, document mpls
+               filter expression.
+       Document new pppoed and pppoes filter expressions.
+       Update diffserver-TE codepoints as per RFC 4124.
+       Spelling fixes in ICMPv6.
+       Don't require any fields other than flags to be present in IS-IS
+               restart signaling TLVs, and only print the system ID in
+               those TLVs as system IDs, not as node IDs.
+       Support for DCCP.
+
+Tue.   July 5, 2005.  ken@xelerance.com. Summary for 3.9.3 tcpdump release
+
+       Option to chroot() when dropping privs
+       Fixes for compiling on nearly every platform,
+               including improved 64bit support
+       Many new testcases
+       Support for sending packets
+       Many compliation fixes on most platforms
+       Fixes for recent version of GCC to eliminate warnings
+       Improved Unicode support
+
+       Decoders & DLT Changes, Updates and New:
+               AES ESP support
+               Juniper ATM, FRF.15, FRF.16, PPPoE,
+                       ML-FR, ML-PIC, ML-PPP, PL-PPP, LS-PIC
+                       GGSN,ES,MONITOR,SERVICES
+               L2VPN
+               Axent Raptor/Symantec Firewall
+               TCP-MD5 (RFC 2385)
+               ESP-in-UDP (RFC 3948)
+               ATM OAM
+               LMP, LMP Service Discovery
+               IP over FC
+               IP over IEEE 1394
+               BACnet MS/TP
+               SS7
+               LDP over TCP
+               LACP, MARKER as per 802.3ad
+               PGM (RFC 3208)
+               LSP-PING
+               G.7041/Y.1303 Generic Framing Procedure
+               EIGRP-IP, EIGRP-IPX
+               ICMP6
+               Radio - via radiotap
+               DHCPv6
+               HDLC over PPP
+
+Tue.   March 30, 2004. mcr@sandelman.ottawa.on.ca. Summary for 3.8.3 release
+
+       No changes from 3.8.2. Version bumped only to maintain consistency
+       with libpcap 0.8.3.
+
+Mon.   March 29, 2004. mcr@sandelman.ottawa.on.ca. Summary for 3.8.2 release
+
+       Fixes for print-isakmp.c      CVE:    CAN-2004-0183, CAN-2004-0184
+                            http://www.rapid7.com/advisories/R7-0017.html
+       IP-over-IEEE1394 printing.
+       some MINGW32 changes.
+       updates for autoconf 2.5
+       fixes for print-aodv.c - check for too short packets
+       formatting changes to print-ascii for hex output.
+       check for too short packets: print-bgp.c, print-bootp.c, print-cdp.c,
+               print-chdlc.c, print-domain.c, print-icmp.c, print-icmp6.c,
+               print-ip.c, print-lwres.c, print-ospf.c, print-pim.c,
+               print-ppp.c,print-pppoe.c, print-rsvp.c, print-wb.c
+       print-ether.c - better handling of unknown types.
+       print-isoclns.c - additional decoding of types.
+       print-llc.c - strings for LLC names added.
+       print-pfloc.c - various enhancements
+       print-radius.c - better decoding to strings.
+
+Wed.   November 12, 2003. mcr@sandelman.ottawa.on.ca. Summary for 3.8 release
+
+       changed syntax of -E argument so that multiple SAs can be decrypted
+       fixes for Digital Unix headers and Documentation
+       __attribute__ fixes
+       CDP changes from Terry Kennedy <terry@tmk.com>.
+       IPv6 mobility updates from Kazushi Sugyo <sugyo@pb.jp.nec.com>
+       Fixes for ASN.1 decoder for 2.100.3 forms.
+       Added a count of packets received and processed to clarify numbers.
+       Incorporated WinDUMP patches for Win32 builds.
+       PPPoE payload length headers.
+       Fixes for HP C compiler builds.
+       Use new pcap_breakloop() and pcap_findalldevs() if we can.
+       BGP output split into multiple lines.
+       Fixes to 802.11 decoding.
+       Fixes to PIM decoder.
+       SuperH is a CPU that can't handle unaligned access. Many fixes for
+               unaligned access work.
+       Fixes to Frame-Relay decoder for Q.933/922 frames.
+       Clarified when Solaris can do captures as non-root.
+       Added tests/ subdir for examples/regression tests.
+       New -U flag.    -flush stdout after every packet
+       New -A flag     -print ascii only
+       support for decoding IS-IS inside Cisco HDLC Frames
+       more verbosity for tftp decoder
+       mDNS decoder
+       new BFD decoder
+       cross compilation patches
+       RFC 3561 AODV support.
+       UDP/TCP pseudo-checksum properly for source-route options.
+       sanitized all files to modified BSD license
+       Add support for RFC 2625 IP-over-Fibre Channel.
+       fixes for DECnet support.
+       Support RFC 2684 bridging of Ethernet, 802.5 Token Ring, and FDDI.
+       RFC 2684 encapsulation of BPDUs.
+
+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.
+       keyword "ipx" added.
+       Better OSI/802.2 support on Linux.
+       IEEE 802.11 support, from clenahan@fortresstech.com, achirica@ttd.net.
+       LLC SAP support for FDDI/token ring/RFC-1483 style ATM
+       BXXP protocol was replaced by the BEEP protocol;
+       improvements to SNAP demux.
+       Changes to "any" interface documentation.
+       Documentation on pcap_stats() counters.
+       Fix a memory leak found by Miklos Szeredi - pcap_ether_aton().
+       Added MPLS encapsulation decoding per RFC3032.
+       DNS dissector handles TKEY, TSIG and IXFR.
+       adaptive SLIP interface patch from Igor Khristophorov <igor@atdot.org>
+       SMB printing has much improved bounds checks
+       OUI 0x0000f8 decoded as encapsulated ethernet for Cisco-custom bridging
+       Zephyr support, from Nickolai Zeldovich <kolya@MIT.EDU>.
+       Solaris - devices with digits in them. Stefan Hudson <hudson@mbay.net>
+       IPX socket 0x85be is for Cisco EIGRP over IPX.
+       Improvements to fragmented ESP handling.
+       SCTP support from Armando L. Caro Jr. <acaro@mail.eecis.udel.edu>
+       Linux ARPHDR_ATM support fixed.
+       Added a "netbeui" keyword, which selects NetBEUI packets.
+       IPv6 ND improvements, MobileIP dissector, 2292bis-02 for RA option.
+       Handle ARPHDR_HDLC from Marcus Felipe Pereira <marcus@task.com.br>.
+       Handle IPX socket 0x553 -> NetBIOS-over-IPX socket, "nwlink-dgm"
+       Better Linux libc5 compat.
+       BIND9 lwres dissector added.
+       MIPS and SPARC get strict alignment macros (affects print-bgp.c)
+       Apple LocalTalk LINKTYPE_ reserved.
+       New time stamp formats documented.
+       DHCP6 updated to draft-22.txt spec.
+       ICMP types/codes now accept symbolic names.
+       Add SIGINFO handler from LBL
+       encrypted CIPE tunnels in IRIX, from Franz Schaefer <schaefer@mond.at>.
+       now we are -Wstrict-prototype clean.
+       NetBSD DLT_PPP_ETHER; adapted from Martin Husemann <martin@netbsd.org>.
+       PPPoE dissector cleaned up.
+       Support for LocalTalk hardware, from Uns Lider <unslider@miranda.org>.
+       In dissector, now the caller prints the IP addresses rather than proto.
+       cjclark@alum.mit.edu: print the IP proto for non-initial fragments.
+       LLC frames with a DSAP and LSAP of 0xe0 are IPX frames.
+       Linux cooked frames with a type value of LINUX_SLL_P_802_3 are IPX.
+       captures on the "any" device won't be done in promiscuous mode
+       Token Ring support on DLPI - Onno van der Linden <onno@simplex.nl>
+       ARCNet support, from NetBSD.
+       HSRP dissector, from Julian Cowley <julian@lava.net>.
+       Handle (GRE-encapsulated) PPTP
+       added -C option to rotate save file every optarg * 1,000,000 bytes.
+       support for "vrrp" name - NetBSD, by Klaus Klein <kleink@netbsd.org>.
+       PPTP support, from Motonori Shindo <mshindo@mshindo.net>.
+       IS-IS over PPP support, from Hannes Gredler <hannes@juniper.net>.
+       CNFP support for IPv6,format. Harry Raaymakers <harryr@connect.com.au>.
+       ESP printing updated to RFC2406.
+       HP-UX can now handle large number of PPAs.
+       MSDP printer added.
+       L2TP dissector improvements from Motonori Shindo.
+
+Tuesday January 9, 2001. mcr@sandelman.ottawa.on.ca. Summary for 3.6 release
+       Cleaned up documentation.
+       Promisc mode fixes for Linux
+       IPsec changes/cleanups.
+       Alignment fixes for picky architectures
+
+       Removed dependency on native headers for packet dissectors.
+       Removed Linux specific headers that were shipped
+
+       libpcap changes provide for exchanging capture files between
+         systems. Save files now have well known PACKET_ values instead of
+         depending upon system dependant mappings of DLT_* types.
+
+       Support for computing/checking IP and UDP/TCP checksums.
+
+       Updated autoconf stock files.
+
+       IPv6 improvements: dhcp (draft-15), mobile-ip6, ppp, ospf6,
+
+       Added dissector support for: ISOCLNS, Token Ring, IGMPv3, bxxp,
+               timed, vrrp, radius, chdlc, cnfp, cdp, IEEE802.1d, raw-AppleTalk
+
+       Added filtering support for: VLANs, ESIS, ISIS
+
+       Improvements to: print-telnet, IPTalk, bootp/dhcp, ECN, PPP,
+               L2TP, PPPoE
+
+       HP-UX 11.0 -- find the right dlpi device.
+       Solaris 8 - IPv6 works
+       Linux - Added support for an "any" device to capture on all interfaces
+
+       Security fixes: buffer overrun audit done. Strcpy replaced with
+               strlcpy, sprintf replaced with snprintf.
+       Look for lex problems, and warn about them.
+
+
+v3.5 Fri Jan 28 18:00:00 PST 2000
+
+Bill Fenner <fenner@research.att.com>
+- switch to config.h for autoconf
+- unify RCSID strings
+- Updated PIMv1, PIMv2, DVMRP, IGMP parsers, add Cisco Auto-RP parser
+- Really fix the RIP printer
+- Fix MAC address -> name translation.
+- some -Wall -Wformat fixes
+- update makemib to parse much of SMIv2
+- Print TCP sequence # with -vv even if you normally wouldn't
+- Print as much of IP/TCP/UDP headers as possible even if truncated.
+
+itojun@iijlab.net
+- -X will make a ascii dump.  from netbsd.
+- telnet command sequence decoder (ff xx xx).  from netbsd.
+- print-bgp.c: improve options printing.  ugly code exists for
+  unaligned option parsing (need some fix).
+- const poisoning in SMB decoder.
+- -Wall -Werror clean checks.
+- bring in KAME IPv6/IPsec decoding code.
+
+Assar Westerlund  <assar@sics.se>
+- SNMPv2 and SNMPv3 printer
+- If compiled with libsmi, tcpdump can load MIBs on the fly to decode
+  SNMP packets.
+- Incorporate NFS parsing code from NetBSD.  Adds support for nfsv3.
+- portability fixes
+- permit building in different directories.
+
+Ken Hornstein <kenh@cmf.nrl.navy.mil>
+- bring in code at
+  /afs/transarc.com/public/afs-contrib/tools/tcpdump for parsing
+  AFS3 packets
+
+Andrew Tridgell <tridge@linuxcare.com>
+- SMB printing code
+
+Love <lha@stacken.kth.se>
+- print-rx.c: add code for printing MakeDir and StoreStatus.  Also
+  change date format to the right one.
+
+Michael C. Richardson  <mcr@sandelman.ottawa.on.ca>
+- Created tcpdump.org repository
+
+v3.4 Sat Jul 25 12:40:55 PDT 1998
+
+- Hardwire Linux slip support since it's too hard to detect.
+
+- Redo configuration of "network" libraries (-lsocket and -lnsl) to
+  deal with IRIX. Thanks to John Hawkinson (jhawk@mit.edu)
+
+- Added -a which tries to translate network and broadcast addresses to
+  names. Suggested by Rob van Nieuwkerk (robn@verdi.et.tudelft.nl)
+
+- Added a configure option to disable gcc.
+
+- Added a "raw" packet printer.
+
+- Not having an interface address is no longer fatal. Requested by John
+  Hawkinson.
+
+- Rework signal setup to accommodate Linux.
+
+- OSPF truncation check fix. Also display the type of OSPF packets
+  using MD5 authentication. Thanks to Brian Wellington
+  (bwelling@tis.com)
+
+- Fix truncation check bugs in the Kerberos printer. Reported by Ezra
+  Peisach (epeisach@mit.edu)
+
+- Don't catch SIGHUP when invoked with nohup(1). Thanks to Dave Plonka
+  (plonka@mfa.com)
+
+- Specify full install target as a way of detecting if install
+  directory does not exist. Thanks to Dave Plonka.
+
+- Bit-swap FDDI addresses for BSD/OS too. Thanks to Paul Vixie
+  (paul@vix.com)
+
+- Fix off-by-one bug when testing size of ethernet packets. Thanks to
+  Marty Leisner (leisner@sdsp.mc.xerox.com)
+
+- Add a local autoconf macro to check for routines in libraries; the
+  autoconf version is broken (it only puts the library name in the
+  cache variable name). Thanks to John Hawkinson.
+
+- Add a local autoconf macro to check for types; the autoconf version
+  is broken (it uses grep instead of actually compiling a code fragment).
+
+- Modified to support the new BSD/OS 2.1 PPP and SLIP link layer header
+  formats.
+
+- Extend OSF ip header workaround to versions 1 and 2.
+
+- Fix some signed problems in the nfs printer. As reported by David
+  Sacerdote (davids@silence.secnet.com)
+
+- Detect group wheel and use it as the default since BSD/OS' install
+  can't hack numeric groups. Reported by David Sacerdote.
+
+- AIX needs special loader options. Thanks to Jonathan I. Kamens
+  (jik@cam.ov.com)
+
+- Fixed the nfs printer to print port numbers in decimal. Thanks to
+  Kent Vander Velden (graphix@iastate.edu)
+
+- Find installed libpcap in /usr/local/lib when not using gcc.
+
+- Disallow network masks with non-network bits set.
+
+- Attempt to detect "egcs" versions of gcc.
+
+- Add missing closing double quotes when displaying bootp strings.
+  Reported by Viet-Trung Luu (vluu@picard.math.uwaterloo.ca)
+
+v3.3 Sat Nov 30 20:56:27 PST 1996
+
+- Added Linux support.
+
+- GRE encapsulated packet printer thanks to John Hawkinson
+  (jhawk@mit.edu)
+
+- Rewrite gmt2local() to avoid problematic os dependencies.
+
+- Suppress nfs truncation message on errors.
+
+- Add missing m4 quoting in AC_LBL_UNALIGNED_ACCESS autoconf macro.
+  Reported by Joachim Ott (ott@ardala.han.de)
+
+- Enable "ip_hl vs. ip_vhl" workaround for OSF4 too.
+
+- Print arp hardware type in host order. Thanks to Onno van der Linden
+  (onno@simplex.nl)
+
+- Avoid solaris compiler warnings. Thanks to Bruce Barnett
+  (barnett@grymoire.crd.ge.com)
+
+- Fix rip printer to not print one more route than is actually in the
+  packet. Thanks to Jean-Luc Richier (Jean-Luc.Richier@imag.fr) and
+  Bill Fenner (fenner@parc.xerox.com)
+
+- Use autoconf endian detection since BYTE_ORDER isn't defined on all systems.
+
+- Fix dvmrp printer truncation checks and add a dvmrp probe printer.
+  Thanks to Danny J. Mitzel (mitzel@ipsilon.com)
+
+- Rewrite ospf printer to improve truncation checks.
+
+- Don't parse tcp options past the EOL. As noted by David Sacerdote
+  (davids@secnet.com). Also, check tcp options to make sure they ar
+  actually in the tcp header (in addition to the normal truncation
+  checks). Fix the SACK code to print the N blocks (instead of the
+  first block N times).
+
+- Don't say really small UDP packets are truncated just because they
+  aren't big enough to be a RPC. As noted by David Sacerdote.
+
+v3.2.1 Sun Jul 14 03:02:26 PDT 1996
+
+- Added rfc1716 icmp codes as suggested by Martin Fredriksson
+  (martin@msp.se)
+
+- Print mtu for icmp unreach need frag packets. Thanks to John
+  Hawkinson (jhawk@mit.edu)
+
+- Decode icmp router discovery messages. Thanks to Jeffrey Honig
+  (jch@bsdi.com)
+
+- Added a printer entry for DLT_IEEE802 as suggested by Tak Kushida
+  (kushida@trl.ibm.co.jp)
+
+- Check igmp checksum if possible. Thanks to John Hawkinson.
+
+- Made changes for SINIX. Thanks to Andrej Borsenkow
+  (borsenkow.msk@sni.de)
+
+- Use autoconf's idea of the top level directory in install targets.
+  Thanks to John Hawkinson.
+
+- Avoid infinite loop in tcp options printing code. Thanks to Jeffrey
+  Mogul (mogul@pa.dec.com)
+
+- Avoid using -lsocket in IRIX 5.2 and earlier since it breaks snoop.
+  Thanks to John Hawkinson.
+
+- Added some more packet truncation checks.
+
+- On systems that have it, use sigset() instead of signal() since
+  signal() has different semantics on these systems.
+
+- Fixed some more alignment problems on the alpha.
+
+- Add code to massage unprintable characters in the domain and ipx
+  printers. Thanks to John Hawkinson.
+
+- Added explicit netmask support. Thanks to Steve Nuchia
+  (steve@research.oknet.com)
+
+- Add "sca" keyword (for DEC cluster services) as suggested by Terry
+  Kennedy (terry@spcvxa.spc.edu)
+
+- Add "atalk" keyword as suggested by John Hawkinson.
+
+- Added an igrp printer. Thanks to Francis Dupont
+  (francis.dupont@inria.fr)
+
+- Print IPX net numbers in hex a la Novell Netware. Thanks to Terry
+  Kennedy (terry@spcvxa.spc.edu)
+
+- Fixed snmp extended tag field parsing bug. Thanks to Pascal Hennequin
+  (pascal.hennequin@hugo.int-evry.fr)
+
+- Added some ETHERTYPEs missing on some systems.
+
+- Added truncated packet macros and various checks.
+
+- Fixed endian problems with the DECnet printer.
+
+- Use $CC when checking gcc version. Thanks to Carl Lindberg
+  (carl_lindberg@blacksmith.com)
+
+- Fixes for AIX (although this system is not yet supported). Thanks to
+  John Hawkinson.
+
+- Fix bugs in the autoconf misaligned accesses code fragment.
+
+- Include sys/param.h to get BYTE_ORDER in a few places. Thanks to
+  Pavlin Ivanov Radoslavov (pavlin@cs.titech.ac.jp)
+
+v3.2 Sun Jun 23 02:28:10 PDT 1996
+
+- Print new icmp unreachable codes as suggested by Martin Fredriksson
+  (martin@msp.se). Also print code value when unknown for icmp redirect
+  and time exceeded.
+
+- Fix an alignment endian bug in getname(). Thanks to John Hawkinson.
+
+- Define "new" domain record types if not found in arpa/nameserv.h.
+  Resulted from a suggestion from John Hawkinson (jhawk@mit.edu). Also
+  fixed an endian bug when printing mx record and added some new record
+  types.
+
+- Added RIP V2 support. Thanks to Jeffrey Honig (jch@bsdi.com)
+
+- Added T/TCP options printing. As suggested by Richard Stevens
+  (rstevens@noao.edu)
+
+- Use autoconf to detect architectures that can't handle misaligned
+  accesses.
+
+v3.1 Thu Jun 13 20:59:32 PDT 1996
+
+- Changed u_int32/int32 to u_int32_t/int32_t to be consistent with bsd
+  and bind (as suggested by Charles Hannum).
+
+- Port to GNU autoconf.
+
+- Add support for printing DVMRP and PIM traffic thanks to
+  Havard Eidnes (Havard.Eidnes@runit.sintef.no).
+
+- Fix AppleTalk, IPX and DECnet byte order problems due to wrong endian
+  define being referenced. Reported by Terry Kennedy.
+
+- Minor fixes to the man page thanks to Mark Andrews.
+
+- Endian fixes to RTP and vat packet dumpers, thanks to Bruce Mah
+  (bmah@cs.berkeley.edu).
+
+- Added support for new dns types, thanks to Rainer Orth.
+
+- Fixed tftp_print() to print the block number for ACKs.
+
+- Document -dd and -ddd. Resulted from a bug report from Charlie Slater
+  (cslater@imatek.com).
+
+- Check return status from malloc/calloc/etc.
+
+- Check return status from pcap_loop() so we can print an error and
+  exit with a bad status if there were problems.
+
+- Bail if ip option length is <= 0. Resulted from a bug report from
+  Darren Reed (darrenr@vitruvius.arbld.unimelb.edu.au).
+
+- Print out a little more information for sun rpc packets.
+
+- Add suport for Kerberos 4 thanks to John Hawkinson (jhawk@mit.edu).
+
+- Fixed the Fix EXTRACT_SHORT() and EXTRACT_LONG() macros (which were
+  wrong on little endian machines).
+
+- Fixed alignment bug in ipx_decode(). Thanks to Matt Crawford
+  (crawdad@fnal.gov).
+
+- Fix ntp_print() to not print garbage when the stratum is
+  "unspecified." Thanks to Deus Ex Machina (root@belle.bork.com).
+
+- Rewrote tcp options printer code to check for truncation. Added
+  selective acknowledgment case.
+
+- Fixed an endian bug in the ospf printer. Thanks to Jeffrey C Honig
+  (jch@bsdi.com)
+
+- Fix rip printer to handle 4.4 BSD sockaddr struct which only uses one
+  octet for the sa_family member. Thanks to Yoshitaka Tokugawa
+  (toku@dit.co.jp)
+
+- Don't checksum ip header if we don't have all of it. Thanks to John
+  Hawkinson (jhawk@mit.edu).
+
+- Print out hostnames if possible in egp printer. Thanks to Jeffrey
+  Honig (jhc@bsdi.com)
+
+
+v3.1a1 Wed May  3 19:21:11 PDT 1995
+
+- Include time.h when SVR4 is defined to avoid problems under Solaris
+  2.3.
+
+- Fix etheraddr_string() in the ETHER_SERVICE to return the saved
+  strings, not the local buffer. Thanks to Stefan Petri
+  (petri@ibr.cs.tu-bs.de).
+
+- Detect when pcap raises the snaplen (e.g. with snit). Print a warning
+  that the selected value was not used. Thanks to Pascal Hennequin
+  (Pascal.Hennequin@hugo.int-evry.fr).
+
+- Add a truncated packet test to print-nfs.c. Thanks to Pascal Hennequin.
+
+- BYTEORDER -> BYTE_ORDER Thanks to Terry Kennedy (terry@spcvxa.spc.edu).
+
+v3.0.3 Sun Oct  1 18:35:00 GMT 1995
+
+- Although there never was a 3.0.3 release, the linux boys cleverly
+  "released" one in late 1995.
+
+v3.0.2 Thu Apr 20 21:28:16 PDT 1995
+
+- Change configuration to not use gcc v2 flags with gcc v1.
+
+- Redo gmt2local() so that it works under BSDI (which seems to return
+  an empty timezone struct from gettimeofday()). Based on report from
+  Terry Kennedy (terry@spcvxa.spc.edu).
+
+- Change configure to recognize IP[0-9]* as "mips" SGI hardware. Based
+  on report from Mark Andrews (mandrews@alias.com).
+
+- Don't pass cc flags to gcc. Resulted from a bug report from Rainer
+  Orth (ro@techfak.uni-bielefeld.de).
+
+- Fixed printout of connection id for uncompressed tcp slip packets.
+  Resulted from a bug report from Richard Stevens (rstevens@noao.edu).
+
+- Hack around deficiency in Ultrix's make.
+
+- Add ETHERTYPE_TRAIL define which is missing from irix5.
+
+v3.0.1 Wed Aug 31 22:42:26 PDT 1994
+
+- Fix problems with gcc2 vs. malloc() and read() prototypes under SunOS 4.
+
+v3.0 Mon Jun 20 19:23:27 PDT 1994
+
+- Added support for printing tcp option timestamps thanks to
+  Mark Andrews (mandrews@alias.com).
+
+- Reorganize protocol dumpers to take const pointers to packets so they
+  never change the contents (i.e., they used to do endian conversions
+  in place).  Previously, whenever more than one pass was taken over
+  the packet, the packet contents would be dumped incorrectly (i.e.,
+  the output form -x would be wrong on little endian machines because
+  the protocol dumpers would modify the data).  Thanks to Charles Hannum
+  (mycroft@gnu.ai.mit.edu) for reporting this problem.
+
+- Added support for decnet protocol dumping thanks to Jeff Mogul
+  (mogul@pa.dec.com).
+
+- Fix bug that caused length of packet to be incorrectly printed
+  (off by ether header size) for unknown ethernet types thanks
+  to Greg Miller (gmiller@kayak.mitre.org).
+
+- Added support for IPX protocol dumping thanks to Brad Parker
+  (brad@fcr.com).
+
+- Added check to verify IP header checksum under -v thanks to
+  Brad Parker (brad@fcr.com).
+
+- Move packet capture code to new libpcap library (which is
+  packaged separately).
+
+- Prototype everything and assume an ansi compiler.
+
+- print-arp.c: Print hardware ethernet addresses if they're not
+  what we expect.
+
+- print-bootp.c: Decode the cmu vendor field. Add RFC1497 tags.
+  Many helpful suggestions from Gordon Ross (gwr@jericho.mc.com).
+
+- print-fddi.c: Improvements. Thanks to Jeffrey Mogul
+  (mogul@pa.dec.com).
+
+- print-icmp.c: Byte swap netmask before printing. Thanks to
+  Richard Stevens (rstevens@noao.edu). Print icmp type when unknown.
+
+- print-ip.c: Print the inner ip datagram of ip-in-ip encapsulated packets.
+  By default, only the inner packet is dumped, appended with the token
+  "(encap)".  Under -v, both the inner and output packets are dumped
+  (on the same line).  Note that the filter applies to the original packet,
+  not the encapsulated packet.  So if you run tcpdump on a net with an
+  IP Multicast tunnel, you cannot filter out the datagrams using the
+  conventional syntax.  (You can filter away all the ip-in-ip traffic
+  with "not ip proto 4".)
+
+- print-nfs.c: Keep pending rpc's in circular table. Add generic
+  nfs header and remove os dependences. Thanks to Jeffrey Mogul.
+
+- print-ospf.c: Improvements. Thanks to Jeffrey Mogul.
+
+- tcpdump.c: Add -T flag allows interpretation of "vat", "wb", "rpc"
+  (sunrpc) and rtp packets. Added "inbound" and "outbound" keywords
+  Add && and || operators
+
+v2.2.1 Tue Jun 6 17:57:22 PDT 1992
+
+- Fix bug with -c flag.
+
+v2.2 Fri May 22 17:19:41 PDT 1992
+
+- savefile.c: Remove hack that shouldn't have been exported. Add
+  truncate checks.
+
+- Added the 'icmp' keyword.  For example, 'icmp[0] != 8 and icmp[0] != 0'
+  matches non-echo/reply ICMP packets.
+
+- Many improvements to filter code optimizer.
+
+- Added 'multicast' keyword and extended the 'broadcast' keyword can now be
+  so that protocol qualifications are allowed. For example, "ip broadcast"
+  and "ether multicast" are valid filters.
+
+- Added support for monitoring the loopback interface (i.e. 'tcpdump -i lo').
+  Jeffrey Honig (jch@MITCHELL.CIT.CORNELL.EDU) contributed the kernel
+  patches to netinet/if_loop.c.
+
+- Added support for the Ungermann-Bass Ethernet on IBM/PC-RTs running AOS.
+  Contact Jeffrey Honig (jch@MITCHELL.CIT.CORNELL.EDU) for the diffs.
+
+- Added EGP and OSPF printers, thanks to Jeffrey Honig.
+
+v2.1 Tue Jan 28 11:00:14 PST 1992
+
+- Internal release (never publically exported).
+
+v2.0.1 Sun Jan 26 21:10:10 PDT
+
+- Various byte ordering fixes.
+
+- Add truncation checks.
+
+- inet.c: Support BSD style SIOCGIFCONF.
+
+- nametoaddr.c: Handle multi addresses for single host.
+
+- optimize.c: Rewritten.
+
+- pcap-bpf.c: don't choke when we get ptraced. only set promiscuous
+  for broadcast nets.
+
+- print-atal.c: Fix an alignment bug (thanks to
+  stanonik@nprdc.navy.mil) Add missing printf() argument.
+
+- print-bootp.c: First attempt at decoding the vendor buffer.
+
+- print-domain.c: Fix truncation checks.
+
+- print-icmp.c: Calculate length of packets from the ip header.
+
+- print-ip.c: Print frag id in decimal (so it's easier to match up
+  with non-frags). Add support for ospf, egp and igmp.
+
+- print-nfs.c: Lots of changes.
+
+- print-ntp.c: Make some verbose output depend on -v.
+
+- print-snmp.c: New version from John LoVerso.
+
+- print-tcp.c: Print rfc1072 tcp options.
+
+- tcpdump.c: Print "0x" prefix for %x formats. Always print 6 digits
+  (microseconds) worth of precision. Fix uid bugs.
+
+- A packet dumper has been added (thanks to Jeff Mogul of DECWRL).
+  With this option, you can create an architecture independent binary
+  trace file in real time, without the overhead of the packet printer.
+  At a later time, the packets can be filtered (again) and printed.
+
+- BSD is supported.  You must have BPF in your kernel.
+  Since the filtering is now done in the kernel, fewer packets are
+  dropped.  In fact, with BPF and the packet dumper option, a measly
+  Sun 3/50 can keep up with a busy network.
+
+- Compressed SLIP packets can now be dumped, provided you use our
+  SLIP software and BPF.  These packets are dumped as any other IP
+  packet; the compressed headers are dumped with the '-e' option.
+
+- Machines with little-endian byte ordering are supported (thanks to
+  Jeff Mogul).
+
+- Ultrix 4.0 is supported (also thanks to Jeff Mogul).
+
+- IBM RT and Stanford Enetfilter support has been added by
+  Rayan Zachariassen <rayan@canet.ca>.  Tcpdump has been tested under
+  both the vanilla Enetfilter interface, and the extended interface
+  (#ifdef'd by IBMRTPC) present in the MERIT version of the Enetfilter.
+
+- TFTP packets are now printed (requests only).
+
+- BOOTP packets are now printed.
+
+- SNMP packets are now printed. (thanks to John LoVerso of Xylogics).
+
+- Sparc architectures, including the Sparcstation-1, are now
+  supported thanks to Steve McCanne and Craig Leres.
+
+- SunOS 4 is now supported thanks to Micky Liu of Columbia
+  University (micky@cunixc.cc.columbia.edu).
+
+- IP options are now printed.
+
+- RIP packets are now printed.
+
+- There's a -v flag that prints out more information than the
+  default (e.g., it will enable printing of IP ttl, tos and id)
+  and -q flag that prints out less (e.g., it will disable
+  interpretation of AppleTalk-in-UDP).
+
+- The grammar has undergone substantial changes (if you have an
+  earlier version of tcpdump, you should re-read the manual
+  entry).
+
+  The most useful change is the addition of an expression
+  syntax that lets you filter on arbitrary fields or values in the
+  packet.  E.g., "ip[0] > 0x45" would print only packets with IP
+  options, "tcp[13] & 3 != 0" would print only TCP SYN and FIN
+  packets.
+
+  The most painful change is that concatenation no longer means
+  "and" -- e.g., you have to say "host foo and port bar" instead
+  of "host foo port bar".  The up side to this down is that
+  repeated qualifiers can be omitted, making most filter
+  expressions shorter.  E.g., you can now say "ip host foo and
+  (bar or baz)" to look at ip traffic between hosts foo and bar or
+  between hosts foo and baz.  [The old way of saying this was "ip
+  host foo and (ip host bar or ip host baz)".]
+
+v2.0 Sun Jan 13 12:20:40 PST 1991
+
+- Initial public release.
diff --git a/CREDITS b/CREDITS
new file mode 100644 (file)
index 0000000..d327880
--- /dev/null
+++ b/CREDITS
@@ -0,0 +1,151 @@
+This file lists people who have contributed to tcpdump:
+
+The current maintainers:
+       Bill Fenner                     <fenner@research.att.com>
+        David Young                     <dyoung@pobox.com>
+       Fulvio Risso                    <risso@polito.it>
+       Guy Harris                      <guy@alum.mit.edu>
+       Hannes Gredler                  <hannes@juniper.net>
+       Jun-ichiro itojun Hagino        <itojun@iijlab.net>
+       Michael Richardson              <mcr@sandelman.ottawa.on.ca>
+
+Additional people who have contributed patches:
+
+        Aaron Campbell                  <aaron@arbor.net>
+       Alfredo Andres                  <aandres@s21sec.com>
+       Albert Chin                     <china@thewrittenword.com>
+       Andrew Brown                    <atatat@atatdot.net>
+       Andrew Church                   <andrew@users.sourceforge.net>
+       Andrew Hintz                    <adhintz@users.sourceforge.net>
+       Andrew Tridgell                 <tridge@linuxcare.com>
+        Andy Heffernan                  <ahh@juniper.net>
+       Arkadiusz Miskiewicz            <misiek@pld.org.pl>
+       Armando L. Caro Jr.             <acaro@mail.eecis.udel.edu>
+       Arnaldo Carvalho de Melo        <acme@ghostprotocols.net>
+       Atsushi Onoe                    <onoe@netbsd.org>
+       Ben Smithurst                   <ben@scientia.demon.co.uk>
+       Brent L. Bates                  <blbates@vigyan.com>
+       Brian Ginsbach                  <ginsbach@cray.com>
+       Bruce M. Simpson                <bms@spc.org>
+       Carles Kishimoto Bisbe          <ckishimo@ac.upc.es>
+       Charlie Lenahan                 <clenahan@fortresstech.com>
+       Charles M. Hannum               <mycroft@netbsd.org>
+       Chris Cogdon                    <chris@cogdon.org>
+       Chris G. Demetriou              <cgd@netbsd.org>
+       Christian Sievers               <c_s@users.sourceforge.net>
+       Chris Jepeway                   <jepeway@blasted-heath.com>
+       Chris Larson                    <clarson@kergoth.com>
+       Craig Rodrigues                 <rodrigc@mediaone.net>
+       Crist J. Clark                  <cjclark@alum.mit.edu>
+       Daniel Hagerty                  <hag@ai.mit.edu>
+       Darren Reed                     <darrenr@reed.wattle.id.au>
+       David Binderman                 <d.binderman@virgin.net>
+       David Smith                     <dsmith@redhat.com>
+       David Young                     <dyoung@ojctech.com>
+       Don Ebright                     <Don.Ebright@compuware.com>
+       Eddie Kohler                    <xexd@sourceforge.net>
+       Francis Dupont                  <Francis.Dupont@enst-bretagne.fr>
+       Francisco Matias Cuenca-Acuna   <mcuenca@george.rutgers.edu>
+       Frank Volf                      <volf@oasis.IAEhv.nl>
+       Fulvio Risso                    <risso@polito.it>
+       George Bakos                    <gbakos@ists.dartmouth.edu>
+       Gerald Combs                    <gerald@ethereal.com>
+       Gert Doering                    <gert@greenie.muc.de>
+        Greg Stark                      <gsstark@mit.edu>
+       Gilbert Ramirez Jr.             <gram@xiexie.org>
+       Gisle Vanem                     <giva@bgnett.no>
+        Hannes Viertel                  <hviertel@juniper.net>
+       Hank Leininger                  <tcpdump-workers@progressive-comp.com>
+       Harry Raaymakers                <harryr@connect.com.au>
+       Heinz-Ado Arnolds               <Ado.Arnolds@dhm-systems.de>
+       Hendrik Scholz                  <hendrik@scholz.net>
+       Ian McDonald                    <imcdnzl@gmail.com>
+        Jacek Tobiasz                   <Jacek.Tobiasz@atm.com.pl>
+       Jakob Schlyter                  <jakob@openbsd.org>
+       Jan Oravec                      <wsx@wsx6.net>
+       Jason R. Thorpe                 <thorpej@netbsd.org>
+       Jefferson Ogata                 <jogata@nodc.noaa.gov>
+       Jeffrey Hutzelman               <jhutz@cmu.edu>
+       Jesper Peterson                 <jesper@endace.com>
+       Jim Hutchins                    <jim@ca.sandia.gov>
+        Jonathan Heusser                <jonny@drugphish.ch>
+       Tatuya Jinmei                   <jinmei@kame.net>
+       Jørgen Thomsen                  <jth@jth.net> 
+       Julian Cowley                   <julian@lava.net>
+       Kaarthik Sivakumar              <kaarthik@torrentnet.com>
+       Kazushi Sugyo                   <sugyo@pb.jp.nec.com>
+       Kelly Carmichael                <kcarmich@ipapp.com>
+       Ken Hornstein                   <kenh@cmf.nrl.navy.mil>
+       Kevin Steves                    <stevesk@pobox.com>
+       Klaus Klein                     <kleink@reziprozitaet.de>
+       Kris Kennaway                   <kris@freebsd.org>
+       Krzysztof Halasa                <khc@pm.waw.pl>
+       Larry Lile                      <lile@stdio.com>
+       Lennert Buytenhek               <buytenh@gnu.org>
+       Loris Degioanni                 <loris@netgroup-serv.polito.it>
+       Love Hörnquist-Åstrand          <lha@stacken.kth.se>
+       Maciej W. Rozycki               <macro@ds2.pg.gda.pl>
+       Manu Pathak                     <mapathak@cisco.com>
+       Marc A. Lehmann                 <pcg@goof.com>
+       Mark Ellzey Thomas              <mark@ackers.net>
+       Marko Kiiskila                  <carnil@cs.tut.fi>
+       Markus Schöpflin                <schoepflin@sourceforge.net>
+       Marshall Rose                   <mrose@dbc.mtview.ca.us>
+       Martin Husemann                 <martin@netbsd.org>
+       Max Laier                       <max@love2party.net>
+       Michael Madore                  <mmadore@turbolinux.com>
+       Michael Shalayeff               <mickey@openbsd.org>
+       Michael Shields                 <shields@msrl.com>
+       Michael T. Stolarchuk           <mts@off.to>
+       Michele "mydecay" Marchetto     <smarchetto1@tin.it>
+       Monroe Williams                 <monroe@pobox.com>
+       Motonori Shindo                 <mshindo@mshindo.net>
+       Nathan J. Williams              <nathanw@MIT.EDU>
+       Nathaniel Couper-Noles          <Nathaniel@isi1.tccisi.com>
+       Neil T. Spring                  <bluehal@users.sourceforge.net>
+       Niels Provos                    <provos@openbsd.org>
+       Nickolai Zeldovich              <kolya@MIT.EDU>
+        Nicolas Ferrero                 <toorop@babylo.net>
+       Noritoshi Demizu                <demizu@users.sourceforge.net>
+       Olaf Kirch                      <okir@caldera.de>
+       Onno van der Linden             <onno@simplex.nl>
+       Pascal Hennequin                <pascal.hennequin@int-evry.fr>
+       Pasvorn Boonmark                <boonmark@juniper.net>
+       Paul Mundt                      <lethal@linux-sh.org>
+       Paul S. Traina                  <pst@freebsd.org>
+       Pavlin Radoslavov               <pavlin@icir.org>
+       Pekka Savola                    <pekkas@netcore.fi>     
+       Peter Fales                     <peter@fales-lorenz.net>
+       Peter Jeremy                    <peter.jeremy@alcatel.com.au>
+                                       <pfhunt@users.sourceforge.net>
+       Phil Wood                       <cpw@lanl.gov>
+       Rafal Maszkowski                <rzm@icm.edu.pl>
+       Raphael Raimbault               <raphael.raimbault@netasq.com>
+       Rick Cheng                      <rcheng@juniper.net>
+       Rick Jones                      <rick.jones2@hp.com>
+       Rick Watson                     <watsonrick@users.sourceforge.net>
+       Rob Braun                       <bbraun@synack.net>
+       Roderick Schertler              <roderick@argon.org>
+       Sami Farin                      <safari@iki.fi>
+       Scott Rose                      <syberpunk@users.sourceforge.net>
+       Sebastian Krahmer               <krahmer@cs.uni-potsdam.de>
+       Sebastien Vincent               <svincent@idems.fr>
+       Seth Webster                    <swebster@sst.ll.mit.edu>
+       Shinsuke Suzuki                 <suz@kame.net>
+       Steinar Haug                    <sthaug@nethelp.no>
+        Swaminathan Chandrasekaran      <chander@juniper.net>
+       Takashi Yamamoto                <yamt@mwd.biglobe.ne.jp>
+       Terry Kennedy                   <terry@tmk.com>
+       Timo Koskiahde
+       Tony Li                         <tli@procket.com>
+       Uns Lider                       <unslider@miranda.org>
+       Victor Oppleman                 <oppleman@users.sourceforge.net>
+       Wesley Griffin                  <wgriffin@users.sourceforge.net>
+       Wilbert de Graaf                <wilbertdg@hetnet.nl>
+       Yen Yen Lim
+       Yoshifumi Nishida
+
+The original LBL crew:
+       Steve McCanne
+       Craig Leres
+       Van Jacobson
diff --git a/FILES b/FILES
new file mode 100644 (file)
index 0000000..4e2afa2
--- /dev/null
+++ b/FILES
@@ -0,0 +1,251 @@
+CHANGES
+CREDITS
+FILES
+INSTALL
+LICENSE
+Makefile.in
+README
+Readme.Win32
+VERSION
+acconfig.h
+aclocal.m4
+addrtoname.c
+addrtoname.h
+af.c
+af.h
+ah.h
+aodv.h
+appletalk.h
+arcnet.h
+atime.awk
+atm.h
+atmuni31.h
+bootp.h
+bpf_dump.c
+bgp.h
+chdlc.h
+config.guess
+config.h.in
+config.sub
+configure
+configure.in
+cpack.c
+cpack.h
+dccp.h
+decnet.h
+decode_prefix.h
+enc.h
+esp.h
+ether.h
+ethertype.h
+extract.h
+fddi.h
+gmpls.c
+gmpls.h
+gmt2local.c
+gmt2local.h
+icmp6.h
+ieee802_11.h
+ieee802_11_radio.h
+igrp.h
+install-sh
+interface.h
+ip.h
+ip6.h
+ipfc.h
+ipproto.c
+ipproto.h
+ipsec_doi.h
+ipx.h
+isakmp.h
+l2tp.h
+l2vpn.c
+l2vpn.h
+lane.h
+lbl/os-osf4.h
+lbl/os-solaris2.h
+lbl/os-sunos4.h
+lbl/os-ultrix4.h
+llc.h
+machdep.c
+machdep.h
+makemib
+mib.h
+missing/addrinfo.h
+missing/addrsize.h
+missing/bittypes.h
+missing/dlnames.c
+missing/datalinks.c
+missing/getaddrinfo.c
+missing/getnameinfo.c
+missing/inet_aton.c
+missing/inet_ntop.c
+missing/inet_pton.c
+missing/resolv6.h
+missing/resolv_ext.h
+missing/snprintf.c
+missing/sockstorage.h
+missing/strdup.c
+missing/strlcat.c
+missing/strlcpy.c
+missing/strsep.c
+mkdep
+mpls.h
+nameser.h
+netbios.h
+netdissect.h
+nfs.h
+nfsfh.h
+nlpid.c
+nlpid.h
+ntp.h
+oakley.h
+ospf.h
+ospf6.h
+oui.c
+oui.h
+packetdat.awk
+parsenfsfh.c
+pcap_dump_ftell.c
+pcap-missing.h
+pmap_prot.h
+ppp.h
+print-802_11.c
+print-ah.c
+print-aodv.c
+print-ap1394.c
+print-arcnet.c
+print-arp.c
+print-ascii.c
+print-atalk.c
+print-atm.c
+print-beep.c
+print-bfd.c
+print-bgp.c
+print-bootp.c
+print-cdp.c
+print-chdlc.c
+print-cip.c
+print-cnfp.c
+print-dccp.c
+print-decnet.c
+print-dhcp6.c
+print-domain.c
+print-dvmrp.c
+print-eap.c
+print-egp.c
+print-enc.c
+print-esp.c
+print-eigrp.c
+print-ether.c
+print-fddi.c
+print-fr.c
+print-frag6.c
+print-gre.c
+print-hsrp.c
+print-icmp.c
+print-icmp6.c
+print-igmp.c
+print-igrp.c
+print-ip.c
+print-ip6.c
+print-ip6opts.c
+print-ipcomp.c
+print-ipfc.c
+print-ipx.c
+print-isakmp.c
+print-isoclns.c
+print-juniper.c
+print-krb.c
+print-l2tp.c
+print-lane.c
+print-ldp.c
+print-llc.c
+print-lmp.c
+print-lspping.c
+print-lwres.c
+print-mobile.c
+print-mobility.c
+print-mpls.c
+print-msdp.c
+print-netbios.c
+print-nfs.c
+print-ntp.c
+print-null.c
+print-olsr.c
+print-ospf.c
+print-ospf6.c
+print-pflog.c
+print-pgm.c
+print-pim.c
+print-ppp.c
+print-pppoe.c
+print-pptp.c
+print-radius.c
+print-raw.c
+print-rip.c
+print-ripng.c
+print-rsvp.c
+print-rt6.c
+print-rx.c
+print-sctp.c
+print-sip.c
+print-sl.c
+print-sll.c
+print-slow.c
+print-smb.c
+print-snmp.c
+print-stp.c
+print-sunatm.c
+print-sunrpc.c
+print-symantec.c
+print-syslog.c
+print-tcp.c
+print-telnet.c
+print-tftp.c
+print-timed.c
+print-token.c
+print-udp.c
+print-vjc.c
+print-vrrp.c
+print-wb.c
+print-zephyr.c
+route6d.h
+rpc_auth.h
+rpc_msg.h
+rx.h
+sctpConstants.h
+sctpHeader.h
+send-ack.awk
+setsignal.c
+setsignal.h
+slcompress.h
+slip.h
+sll.h
+smb.h
+smbutil.c
+stime.awk
+strcasecmp.c
+tcp.h
+tcpdump.1
+tcpdump.c
+tcpdump-stdinc.h
+telnet.h
+tftp.h
+timed.h
+token.h
+udp.h
+util.c
+vfprintf.c
+win32/Include/Arpa/tftp.h
+win32/Include/errno.h
+win32/Include/getopt.h
+win32/Include/inetprivate.h
+win32/Include/telnet.h
+win32/Include/w32_fzs.h
+win32/Include/Netinet/in_systm.h
+win32/Include/Netinet/ip.h
+win32/Src/getopt.c
+win32/prj/GNUmakefile
+win32/prj/WinDump.dsp
+win32/prj/WinDump.dsw
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..745997f
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,252 @@
+@(#) $Header: /tcpdump/master/tcpdump/INSTALL,v 1.63.2.7 2007/09/14 01:03:12 guy Exp $ (LBL)
+
+If you have not built libpcap, and your system does not have libpcap
+installed, install libpcap first.  Your system might provide a version
+of libpcap that can be installed; if so, to compile tcpdump you might
+need to install a "developer" version of libpcap as well as the
+"run-time" version.  You can also install tcpdump.org's version of
+libpcap; see the README file in this directory for the ftp location.
+
+You will need an ANSI C compiler to build tcpdump. The configure script
+will abort if your compiler is not ANSI compliant. If this happens, use
+the GNU C compiler, available via anonymous ftp:
+
+       ftp://ftp.gnu.org/pub/gnu/gcc/
+
+After libpcap has been built (either install it with "make install" or
+make sure both the libpcap and tcpdump source trees are in the same
+directory), run ./configure (a shell script).  "configure" will
+determine your system attributes and generate an appropriate Makefile
+from Makefile.in.  Now build tcpdump by running "make".
+
+If everything builds ok, su and type "make install".  This will install
+tcpdump and the manual entry.  Any user will be able to use tcpdump to
+read saved captures.  Whether a user will be able to capture traffic
+depends on the OS and the configuration of the system; see the tcpdump
+man page for details.  DO NOT give untrusted users the ability to
+capture traffic.  If a user can capture traffic, he or she could use
+utilities such as tcpdump to capture any traffic on your net, including
+passwords.
+
+Note that most systems ship tcpdump, but usually an older version.
+Remember to remove or rename the installed binary when upgrading.
+
+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
+for any modifications you need to make.
+
+Please see "PLATFORMS" for notes about tested platforms.
+
+
+FILES
+-----
+CHANGES                - description of differences between releases
+CREDITS                - people that have helped tcpdump along
+FILES          - list of files exported as part of the distribution
+INSTALL                - this file
+LICENSE                - the license under which tcpdump is distributed
+Makefile.in    - compilation rules (input to the configure script)
+README         - description of distribution
+Readme.Win32   - notes on building tcpdump on Win32 systems (with WinPcap)
+VERSION                - version of this release
+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
+aodv.h         - AODV definitions
+appletalk.h    - AppleTalk definitions
+arcnet.h       - ARCNET definitions
+atime.awk      - TCP ack awk script
+atm.h          - ATM traffic type definitions
+atmuni31.h     - ATM Q.2931 definitions
+bgp.h          - BGP declarations
+bootp.h                - BOOTP definitions
+bpf_dump.c     - BPF program printing routines, in case libpcap doesn't
+                 have them
+chdlc.h                - Cisco HDLC definitions
+cpack.c                - functions to extract packed data
+cpack.h                - declarations of functions to extract packed data
+config.guess   - autoconf support
+config.h.in    - autoconf input
+config.sub     - autoconf support
+configure      - configure script (run this first)
+configure.in   - configure script source
+dccp.h         - DCCP definitions
+decnet.h       - DECnet definitions
+decode_prefix.h        - Declarations of "decode_prefix{4,6}()"
+enc.h          - OpenBSD IPsec encapsulation BPF layer 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
+gmpls.c                - GMPLS definitions
+gmpls.h                - GMPLS declarations
+gmt2local.c    - time conversion routines
+gmt2local.h    - time conversion prototypes
+icmp6.h                - ICMPv6 definitiions
+ieee802_11.h   - IEEE 802.11 definitions
+ieee802_11_radio.h - radiotap header 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
+ipfc.h         - IP-over-Fibre Channel definitions
+ipproto.c      - IP protocol type value-to-name table
+ipproto.h      - IP protocol type value definitions
+ipsec_doi.h    - ISAKMP packet definitions - RFC2407
+ipx.h          - IPX definitions
+isakmp.h       - ISAKMP packet definitions - RFC2408
+l2vpn.c                - L2VPN encapsulation value-to-name table
+l2vpn.h                - L2VPN encapsulation definitions
+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
+makemib                - mib to header script
+mib.h          - mib definitions
+missing/*      - replacements for missing library functions
+mkdep          - construct Makefile dependency list
+mpls.h         - MPLS definitions
+nameser.h      - DNS definitions
+netbios.h      - NETBIOS definitions
+netdissect.h   - definitions and declarations for tcpdump-as-library
+                 (under development)
+nfs.h          - Network File System V2 definitions
+nfsfh.h                - Network File System file handle definitions
+nlpid.c                - OSI NLPID value-to-name table
+nlpid.h                - OSI NLPID definitions
+ntp.h          - Network Time Protocol definitions
+oakley.h       - ISAKMP packet definitions - RFC2409
+ospf.h         - Open Shortest Path First definitions
+ospf6.h                - IPv6 Open Shortest Path First definitions
+packetdat.awk  - TCP chunk summary awk script
+parsenfsfh.c   - Network File System file parser routines
+pcap_dump_ftell.c - pcap_dump_ftell() implementation, in case libpcap
+               doesn't have it
+pcap-missing.h - declarations of functions possibly missing from libpcap
+pmap_prot.h    - definitions for ONC RPC portmapper protocol
+ppp.h          - Point to Point Protocol definitions
+print-802_11.c - IEEE 802.11 printer routines
+print-ap1394.c - Apple IP-over-IEEE 1394 printer routines
+print-ah.c     - IPSEC Authentication Header printer routines
+print-aodv.c   - AODV 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-bgp.c    - Border Gateway Protocol printer routines
+print-bootp.c  - BOOTP and IPv4 DHCP 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-dccp.c   - DCCP printer routines
+print-decnet.c - DECnet printer routines
+print-dhcp6.c  - IPv6 DHCP printer routines
+print-domain.c - Domain Name System printer routines
+print-dvmrp.c  - Distance Vector Multicast Routing Protocol printer routines
+print-eap.c    - EAP printer routines
+print-enc.c    - OpenBSD IPsec encapsulation BPF layer 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-fddi.c   - Fiber Distributed Data Interface printer routines
+print-fr.c     - Frame Relay 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-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        - 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   - ATM LANE printer routines
+print-llc.c    - IEEE 802.2 LLC printer routines
+print-lspping.c        - LSPPING printer routines
+print-lwres.c  - Lightweight Resolver protocol printer routines
+print-mobile.c - IPv4 mobility printer routines
+print-mobility.c - IPv6 mobility 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   - 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-pflog.c  - OpenBSD packet filter log file printer routines
+print-pgm.c    - Pragmatic General Multicast printer routines
+print-pim.c    - Protocol Independent Multicast printer routines
+print-ppp.c    - Point to Point Protocol 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-rsvp.c   - Resource reSerVation Protocol (RSVP) 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-sip.c    - SIP printer routines
+print-sl.c     - Compressed Serial Line Internet Protocol printer routines
+print-sll.c    - Linux "cooked" capture printer routines
+print-slow.c   - IEEE "slow protocol" (802.3ad) 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-sunatm.c - SunATM DLPI capture printer routines
+print-sunrpc.c - Sun Remote Procedure Call printer routines
+print-symantec.c - Symantec Enterprise Firewall 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 Jacobson compression (RFC1144) printer routines
+print-vrrp.c   - Virtual Router Redundancy Protocol
+print-wb.c     - White Board printer routines
+print-zephyr.c - Zephyr printer routines
+route6d.h      - packet definition for IPv6 Routing Information Protocol
+rpc_auth.h     - definitions for ONC RPC authentication
+rpc_msg.h      - definitions for ONC RPC messages
+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
+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
+tftp.h         - TFTP 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
+win32          - headers and routines for building on Win32 systems
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..dea5f7d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
+License: BSD
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+  
+  1. Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+  3. The names of the authors may not be used to endorse or promote
+     products derived from this software without specific prior
+     written permission.
+  
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/MODULE_LICENSE_BSD b/MODULE_LICENSE_BSD
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/Makefile-devel-adds b/Makefile-devel-adds
new file mode 100644 (file)
index 0000000..512a119
--- /dev/null
@@ -0,0 +1,22 @@
+#
+# Auto-regenerate configure script or Makefile when things change.
+# From autoconf.info .  Works best with GNU Make.
+#
+${srcdir}/configure: configure.in
+       cd ${srcdir} && autoconf
+
+# autoheader might not change config.h.in, so touch a stamp file.
+${srcdir}/config.h.in: ${srcdir}/stamp-h.in
+${srcdir}/stamp-h.in: configure.in acconfig.h
+       cd ${srcdir} && autoheader
+       echo timestamp > ${srcdir}/stamp-h.in
+
+config.h: stamp-h
+stamp-h: ${srcdir}/config.h.in config.status
+       ./config.status
+
+Makefile: Makefile.in config.status
+       ./config.status
+
+config.status: ${srcdir}/configure
+       ./config.status --recheck
diff --git a/Makefile.in b/Makefile.in
new file mode 100644 (file)
index 0000000..dcc8f40
--- /dev/null
@@ -0,0 +1,192 @@
+#  Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
+#      The Regents of the University of California.  All rights reserved.
+#
+#  Redistribution and use in source and binary forms, with or without
+#  modification, are permitted provided that: (1) source code distributions
+#  retain the above copyright notice and this paragraph in its entirety, (2)
+#  distributions including binary code include the above copyright notice and
+#  this paragraph in its entirety in the documentation or other materials
+#  provided with the distribution, and (3) all advertising materials mentioning
+#  features or use of this software display the following acknowledgement:
+#  ``This product includes software developed by the University of California,
+#  Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+#  the University nor the names of its contributors may be used to endorse
+#  or promote products derived from this software without specific prior
+#  written permission.
+#  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+#  WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+#
+# @(#) $Header: /tcpdump/master/tcpdump/Makefile.in,v 1.293.2.7 2007/09/12 19:48:50 guy Exp $ (LBL)
+
+#
+# Various configurable paths (remember to edit Makefile.in, not Makefile)
+#
+
+# Top level hierarchy
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+# Pathname of directory to install the binary
+sbindir = @sbindir@
+# Pathname of directory to install the man page
+mandir = @mandir@
+
+# VPATH
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+#
+# You shouldn't need to edit anything below here.
+#
+
+CC = @CC@
+PROG = tcpdump
+CCOPT = @V_CCOPT@
+INCLS = -I. @V_INCLS@
+DEFS = @DEFS@ @CPPFLAGS@ @V_DEFS@
+
+# Standard CFLAGS
+CFLAGS = $(CCOPT) $(DEFS) $(INCLS)
+
+# Standard LDFLAGS
+LDFLAGS = @LDFLAGS@
+
+# Standard LIBS
+LIBS = @LIBS@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+# Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
+# Also, gcc does not remove the .o before forking 'as', which can be a
+# problem if you don't own the file but can write to the directory.
+.c.o:
+       @rm -f $@
+       $(CC) $(CFLAGS) -c $(srcdir)/$*.c
+
+CSRC = addrtoname.c af.c cpack.c gmpls.c oui.c gmt2local.c ipproto.c \
+        nlpid.c l2vpn.c machdep.c parsenfsfh.c \
+       print-802_11.c print-ap1394.c print-ah.c print-arcnet.c \
+       print-aodv.c print-arp.c print-ascii.c print-atalk.c print-atm.c \
+       print-beep.c print-bfd.c print-bgp.c print-bootp.c print-cdp.c \
+       print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c \
+       print-domain.c print-dvmrp.c print-enc.c print-egp.c \
+       print-eap.c print-eigrp.c\
+       print-esp.c print-ether.c print-fddi.c print-fr.c \
+       print-gre.c print-hsrp.c print-icmp.c print-igmp.c \
+       print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c \
+       print-ipx.c print-isakmp.c print-isoclns.c print-juniper.c print-krb.c \
+       print-l2tp.c print-lane.c print-ldp.c print-llc.c \
+        print-lmp.c print-lspping.c \
+       print-lwres.c print-mobile.c print-mpls.c print-msdp.c \
+       print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \
+       print-pgm.c print-pim.c print-ppp.c print-pppoe.c \
+       print-pptp.c print-radius.c print-raw.c print-rip.c \
+       print-rsvp.c print-rx.c print-sctp.c print-sip.c print-sl.c print-sll.c \
+       print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \
+       print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \
+       print-timed.c print-token.c print-udp.c print-vjc.c print-vrrp.c \
+       print-wb.c print-zephyr.c setsignal.c tcpdump.c util.c
+
+LOCALSRC = @LOCALSRC@
+GENSRC = version.c
+LIBOBJS = @LIBOBJS@
+
+SRC =  $(CSRC) $(GENSRC) $(LOCALSRC)
+
+# We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
+# hack the extra indirection
+OBJ =  $(CSRC:.c=.o) $(GENSRC:.c=.o) $(LOCALSRC:.c=.o) $(LIBOBJS)
+HDR =   addrtoname.h appletalk.h bootp.h cpack.h dccp.h decnet.h \
+       ethertype.h extract.h fddi.h gmt2local.h igrp.h interface.h \
+       ipx.h llc.h machdep.h mib.h nfsfh.h nfsv2.h ntp.h ospf.h \
+       setsignal.h \
+       gnuc.h ipsec_doi.h isakmp.h l2tp.h nameser.h \
+       netbios.h oakley.h ospf6.h pf.h ppp.h route6d.h
+
+TAGHDR = \
+       /usr/include/arpa/tftp.h \
+       /usr/include/net/if_arp.h \
+       /usr/include/net/slip.h \
+       /usr/include/netinet/if_ether.h \
+       /usr/include/netinet/in.h \
+       /usr/include/netinet/ip_icmp.h \
+       /usr/include/netinet/tcp.h \
+       /usr/include/netinet/udp.h \
+       /usr/include/protocols/routed.h
+
+TAGFILES = $(SRC) $(HDR) $(TAGHDR)
+
+CLEANFILES = $(PROG) $(OBJ) $(GENSRC)
+
+all: $(PROG)
+
+$(PROG): $(OBJ) @V_PCAPDEP@
+       @rm -f $@
+       $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
+
+datalinks.o: $(srcdir)/missing/datalinks.c
+       $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/datalinks.c
+dlnames.o: $(srcdir)/missing/dlnames.c
+       $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/dlnames.c
+getnameinfo.o: $(srcdir)/missing/getnameinfo.c
+       $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getnameinfo.c
+getaddrinfo.o: $(srcdir)/missing/getaddrinfo.c
+       $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/getaddrinfo.c
+inet_pton.o: $(srcdir)/missing/inet_pton.c
+       $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_pton.c
+inet_ntop.o: $(srcdir)/missing/inet_ntop.c
+       $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_ntop.c
+inet_aton.o: $(srcdir)/missing/inet_aton.c
+       $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/inet_aton.c
+snprintf.o: $(srcdir)/missing/snprintf.c
+       $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c
+strlcat.o: $(srcdir)/missing/strlcat.c
+       $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcat.c
+strlcpy.o: $(srcdir)/missing/strlcpy.c
+       $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strlcpy.c
+strsep.o: $(srcdir)/missing/strsep.c
+       $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/strsep.c
+
+version.o: version.c
+       $(CC) $(CFLAGS) -c version.c
+
+version.c: $(srcdir)/VERSION
+       @rm -f $@
+       sed -e 's/.*/char version[] = "&";/' $(srcdir)/VERSION > $@
+
+install:
+       [ -d $(DESTDIR)$(sbindir) ] || \
+           (mkdir -p $(DESTDIR)$(sbindir); chmod 755 $(DESTDIR)$(sbindir))
+       $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG)
+       [ -d $(DESTDIR)$(mandir)/man1 ] || \
+           (mkdir -p $(DESTDIR)$(mandir)/man1; chmod 755 $(DESTDIR)$(mandir)/man1)
+       $(INSTALL_DATA) $(srcdir)/$(PROG).1 $(DESTDIR)$(mandir)/man1/$(PROG).1
+
+uninstall:
+       rm -f $(DESTDIR)$(sbindir)/$(PROG)
+       rm -f $(DESTDIR)$(mandir)/man1/$(PROG).1
+
+lint: $(GENSRC)
+       lint -hbxn $(SRC) | \
+           grep -v 'struct/union .* never defined' | \
+           grep -v 'possible pointer alignment problem'
+
+clean:
+       rm -f $(CLEANFILES)
+
+distclean:
+       rm -f $(CLEANFILES) Makefile config.cache config.log config.status \
+           config.h gnuc.h os-proto.h stamp-h stamp-h.in
+
+tags: $(TAGFILES)
+       ctags -wtd $(TAGFILES)
+
+releasetar:
+       @cwd=`pwd` ; dir=`basename $$cwd` ; name=$(PROG)-`cat VERSION` ; \
+          list="" ; make distclean; cd ..; mkdir -p n; cd n; ln -s ../$$dir $$name; \
+          tar -c -z -f $$name.tar.gz $$name/. ;
+
+depend: $(GENSRC)
+       ${srcdir}/mkdep -c $(CC) $(DEFS) $(INCLS) $(SRC)
diff --git a/NOTICE b/NOTICE
new file mode 100644 (file)
index 0000000..dea5f7d
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,19 @@
+License: BSD
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+  
+  1. Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in
+     the documentation and/or other materials provided with the
+     distribution.
+  3. The names of the authors may not be used to endorse or promote
+     products derived from this software without specific prior
+     written permission.
+  
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/PLATFORMS b/PLATFORMS
new file mode 100644 (file)
index 0000000..2e1aedf
--- /dev/null
+++ b/PLATFORMS
@@ -0,0 +1,9 @@
+== Tested platforms ==
+NetBSD                 1.5/i386        (mcr - 2002/1/1)        
+Debian Linux (woody/i386)      (mcr - 2002/1/1)
+
+---
+RedHat Linux   6.1/i386        (assar)
+FreeBSD                2.2.8/i386      (itojun)
+
+
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..cb51d30
--- /dev/null
+++ b/README
@@ -0,0 +1,235 @@
+@(#) $Header: /tcpdump/master/tcpdump/README,v 1.65.2.1 2007/09/14 01:03:12 guy Exp $ (LBL)
+
+TCPDUMP 3.9
+Now maintained by "The Tcpdump Group"
+See            www.tcpdump.org
+
+Please send inquiries/comments/reports to      tcpdump-workers@tcpdump.org
+
+Anonymous CVS is available via:
+       cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master login
+       (password "anoncvs")
+       cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master checkout tcpdump
+
+Version 3.9 of TCPDUMP can be retrieved with the CVS tag "tcpdump_3_9rel1":
+       cvs -d :pserver:cvs.tcpdump.org:/tcpdump/master checkout -r tcpdump_3_9rel1 tcpdump
+
+Please submit patches against the master copy to the tcpdump project on
+sourceforge.net.
+
+formerly from  Lawrence Berkeley National Laboratory
+               Network Research Group <tcpdump@ee.lbl.gov>
+               ftp://ftp.ee.lbl.gov/tcpdump.tar.Z (3.4)
+
+This directory contains source code for tcpdump, a tool for network
+monitoring and data acquisition.  This software was originally
+developed by the Network Research Group at the Lawrence Berkeley
+National Laboratory.  The original distribution is available via
+anonymous ftp to ftp.ee.lbl.gov, in tcpdump.tar.Z.  More recent
+development is performed at tcpdump.org, http://www.tcpdump.org/
+
+Tcpdump uses libpcap, a system-independent interface for user-level
+packet capture.  Before building tcpdump, you must first retrieve and
+build libpcap, also originally from LBL and now being maintained by
+tcpdump.org; see http://www.tcpdump.org/ .
+
+Once libpcap is built (either install it or make sure it's in
+../libpcap), you can build tcpdump using the procedure in the INSTALL
+file.
+
+The program is loosely based on SMI's "etherfind" although none of the
+etherfind code remains.  It was originally written by Van Jacobson as
+part of an ongoing research project to investigate and improve tcp and
+internet gateway performance.  The parts of the program originally
+taken from Sun's etherfind were later re-written by Steven McCanne of
+LBL.  To insure that there would be no vestige of proprietary code in
+tcpdump, Steve wrote these pieces from the specification given by the
+manual entry, with no access to the source of tcpdump or etherfind.
+
+Over the past few years, tcpdump has been steadily improved by the
+excellent contributions from the Internet community (just browse
+through the CHANGES file).  We are grateful for all the input.
+
+Richard Stevens gives an excellent treatment of the Internet protocols
+in his book ``TCP/IP Illustrated, Volume 1''. If you want to learn more
+about tcpdump and how to interpret its output, pick up this book.
+
+Some tools for viewing and analyzing tcpdump trace files are available
+from the Internet Traffic Archive:
+
+       http://www.acm.org/sigcomm/ITA/
+
+Another tool that tcpdump users might find useful is tcpslice:
+
+       ftp://ftp.ee.lbl.gov/tcpslice.tar.Z
+
+It is a program that can be used to extract portions of tcpdump binary
+trace files. See the above distribution for further details and
+documentation.
+
+Problems, bugs, questions, desirable enhancements, etc. should be sent
+to the address "tcpdump-workers@tcpdump.org".  Bugs, support requests,
+and feature requests may also be submitted on the SourceForge site for
+tcpdump at
+
+       http://sourceforge.net/projects/tcpdump/
+
+Source code contributions, etc. should be sent to the email address
+"patches@tcpdump.org", or submitted as patches on the SourceForge site
+for tcpdump.
+
+Current versions can be found at www.tcpdump.org, or the SourceForge
+site for tcpdump.
+
+ - The TCPdump team
+
+original text by: Steve McCanne, Craig Leres, Van Jacobson
+
+-------------------------------------
+This directory also contains some short awk programs intended as
+examples of ways to reduce tcpdump data when you're tracking
+particular network problems:
+
+send-ack.awk
+       Simplifies the tcpdump trace for an ftp (or other unidirectional
+       tcp transfer).  Since we assume that one host only sends and
+       the other only acks, all address information is left off and
+       we just note if the packet is a "send" or an "ack".
+
+       There is one output line per line of the original trace.
+       Field 1 is the packet time in decimal seconds, relative
+       to the start of the conversation.  Field 2 is delta-time
+       from last packet.  Field 3 is packet type/direction.
+       "Send" means data going from sender to receiver, "ack"
+       means an ack going from the receiver to the sender.  A
+       preceding "*" indicates that the data is a retransmission.
+       A preceding "-" indicates a hole in the sequence space
+       (i.e., missing packet(s)), a "#" means an odd-size (not max
+       seg size) packet.  Field 4 has the packet flags
+       (same format as raw trace).  Field 5 is the sequence
+       number (start seq. num for sender, next expected seq number
+       for acks).  The number in parens following an ack is
+       the delta-time from the first send of the packet to the
+       ack.  A number in parens following a send is the
+       delta-time from the first send of the packet to the
+       current send (on duplicate packets only).  Duplicate
+       sends or acks have a number in square brackets showing
+       the number of duplicates so far.
+
+       Here is a short sample from near the start of an ftp:
+               3.00    0.20   send . 512
+               3.20    0.20    ack . 1024  (0.20)
+               3.20    0.00   send P 1024
+               3.40    0.20    ack . 1536  (0.20)
+               3.80    0.40 * send . 0  (3.80) [2]
+               3.82    0.02 *  ack . 1536  (0.62) [2]
+       Three seconds into the conversation, bytes 512 through 1023
+       were sent.  200ms later they were acked.  Shortly thereafter
+       bytes 1024-1535 were sent and again acked after 200ms.
+       Then, for no apparent reason, 0-511 is retransmitted, 3.8
+       seconds after its initial send (the round trip time for this
+       ftp was 1sec, +-500ms).  Since the receiver is expecting
+       1536, 1536 is re-acked when 0 arrives.
+
+packetdat.awk
+       Computes chunk summary data for an ftp (or similar
+       unidirectional tcp transfer). [A "chunk" refers to
+       a chunk of the sequence space -- essentially the packet
+       sequence number divided by the max segment size.]
+
+       A summary line is printed showing the number of chunks,
+       the number of packets it took to send that many chunks
+       (if there are no lost or duplicated packets, the number
+       of packets should equal the number of chunks) and the
+       number of acks.
+
+       Following the summary line is one line of information
+       per chunk.  The line contains eight fields:
+          1 - the chunk number
+          2 - the start sequence number for this chunk
+          3 - time of first send
+          4 - time of last send
+          5 - time of first ack
+          6 - time of last ack
+          7 - number of times chunk was sent
+          8 - number of times chunk was acked
+       (all times are in decimal seconds, relative to the start
+       of the conversation.)
+
+       As an example, here is the first part of the output for
+       an ftp trace:
+
+       # 134 chunks.  536 packets sent.  508 acks.
+       1       1       0.00    5.80    0.20    0.20    4       1
+       2       513     0.28    6.20    0.40    0.40    4       1
+       3       1025    1.16    6.32    1.20    1.20    4       1
+       4       1561    1.86    15.00   2.00    2.00    6       1
+       5       2049    2.16    15.44   2.20    2.20    5       1
+       6       2585    2.64    16.44   2.80    2.80    5       1
+       7       3073    3.00    16.66   3.20    3.20    4       1
+       8       3609    3.20    17.24   3.40    5.82    4       11
+       9       4097    6.02    6.58    6.20    6.80    2       5
+
+       This says that 134 chunks were transferred (about 70K
+       since the average packet size was 512 bytes).  It took
+       536 packets to transfer the data (i.e., on the average
+       each chunk was transmitted four times).  Looking at,
+       say, chunk 4, we see it represents the 512 bytes of
+       sequence space from 1561 to 2048.  It was first sent
+       1.86 seconds into the conversation.  It was last
+       sent 15 seconds into the conversation and was sent
+       a total of 6 times (i.e., it was retransmitted every
+       2 seconds on the average).  It was acked once, 140ms
+       after it first arrived.
+
+stime.awk
+atime.awk
+       Output one line per send or ack, respectively, in the form
+               <time> <seq. number>
+       where <time> is the time in seconds since the start of the
+       transfer and <seq. number> is the sequence number being sent
+       or acked.  I typically plot this data looking for suspicious
+       patterns.
+
+
+The problem I was looking at was the bulk-data-transfer
+throughput of medium delay network paths (1-6 sec.  round trip
+time) under typical DARPA Internet conditions.  The trace of the
+ftp transfer of a large file was used as the raw data source.
+The method was:
+
+  - On a local host (but not the Sun running tcpdump), connect to
+    the remote ftp.
+
+  - On the monitor Sun, start the trace going.  E.g.,
+      tcpdump host local-host and remote-host and port ftp-data >tracefile
+
+  - On local, do either a get or put of a large file (~500KB),
+    preferably to the null device (to minimize effects like
+    closing the receive window while waiting for a disk write).
+
+  - When transfer is finished, stop tcpdump.  Use awk to make up
+    two files of summary data (maxsize is the maximum packet size,
+    tracedata is the file of tcpdump tracedata):
+      awk -f send-ack.awk packetsize=avgsize tracedata >sa
+      awk -f packetdat.awk packetsize=avgsize tracedata >pd
+
+  - While the summary data files are printing, take a look at
+    how the transfer behaved:
+      awk -f stime.awk tracedata | xgraph
+    (90% of what you learn seems to happen in this step).
+
+  - Do all of the above steps several times, both directions,
+    at different times of day, with different protocol
+    implementations on the other end.
+
+  - Using one of the Unix data analysis packages (in my case,
+    S and Gary Perlman's Unix|Stat), spend a few months staring
+    at the data.
+
+  - Change something in the local protocol implementation and
+    redo the steps above.
+
+  - Once a week, tell your funding agent that you're discovering
+    wonderful things and you'll write up that research report
+    "real soon now".
diff --git a/TODO b/TODO
new file mode 100644 (file)
index 0000000..12c8b3f
--- /dev/null
+++ b/TODO
@@ -0,0 +1,6 @@
+1. update credits
+2. review "FILES"
+3. search for version info
+4. get PLATFORMS filled in
+5. update CHANGES file
+6. do same for libpcap
diff --git a/VERSION b/VERSION
new file mode 100644 (file)
index 0000000..26cb485
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+3.9.8
diff --git a/acconfig.h b/acconfig.h
new file mode 100644 (file)
index 0000000..f28d52c
--- /dev/null
@@ -0,0 +1,136 @@
+/* "generated automatically" means DO NOT MAKE CHANGES TO config.h.in --
+ * make them to acconfig.h and rerun autoheader */
+@TOP@
+
+/* Define if you have SSLeay 0.9.0b with the buggy cast128. */
+#undef HAVE_BUGGY_CAST128
+
+/* Define if you enable IPv6 support */
+#undef INET6
+
+/* Define if you enable support for the libsmi. */
+#undef LIBSMI
+
+/* Define if you have the <smi.h> header file.  */
+#undef HAVE_SMI_H
+
+/* define if you have struct __res_state_ext */
+#undef HAVE_RES_STATE_EXT
+
+/* define if your struct __res_state has the nsort member */
+#undef HAVE_NEW_RES_STATE
+
+/*
+ * define if struct ether_header.ether_dhost is a struct with ether_addr_octet
+ */
+#undef ETHER_HEADER_HAS_EA
+
+/* define if struct ether_arp contains arp_xsha */
+#undef ETHER_ARP_HAS_X
+
+/* define if you have the addrinfo function. */
+#undef HAVE_ADDRINFO
+
+/* define if you need to include missing/addrinfoh.h. */
+#undef NEED_ADDRINFO_H
+
+/* define ifyou have the h_errno variable. */
+#undef HAVE_H_ERRNO
+
+/* define if IN6ADDRSZ is defined (XXX not used!) */
+#undef HAVE_IN6ADDRSZ
+
+/* define if INADDRSZ is defined (XXX not used!) */
+#undef HAVE_INADDRSZ
+
+/* define if this is a development version, to use additional prototypes. */
+#undef HAVE_OS_PROTO_H
+
+/* define if <unistd.h> defines __P() */
+#undef HAVE_PORTABLE_PROTOTYPE
+
+/* define if RES_USE_INET6 is defined */
+#undef HAVE_RES_USE_INET6
+
+/* define if struct sockaddr has the sa_len member */
+#undef HAVE_SOCKADDR_SA_LEN
+
+/* define if you have struct sockaddr_storage */
+#undef HAVE_SOCKADDR_STORAGE
+
+/* define if you have both getipnodebyname() and getipnodebyaddr() */
+#undef USE_GETIPNODEBY
+
+/* define if you have ether_ntohost() and it works */
+#undef USE_ETHER_NTOHOST
+
+/* define if libpcap has pcap_version */
+#undef HAVE_PCAP_VERSION
+
+/* define if libpcap has pcap_debug */
+#undef HAVE_PCAP_DEBUG
+
+/* define if libpcap has yydebug */
+#undef HAVE_YYDEBUG
+
+/* define if libpcap has pcap_list_datalinks() */
+#undef HAVE_PCAP_LIST_DATALINKS
+
+/* define if libpcap has pcap_set_datalink() */
+#undef HAVE_PCAP_SET_DATALINK
+
+/* define if libpcap has pcap_datalink_name_to_val() */
+#undef HAVE_PCAP_DATALINK_NAME_TO_VAL
+
+/* define if libpcap has pcap_datalink_val_to_description() */
+#undef HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION
+
+/* define if libpcap has pcap_dump_ftell() */
+#undef HAVE_PCAP_DUMP_FTELL
+
+/* define if you have getrpcbynumber() */
+#undef HAVE_GETRPCBYNUMBER
+
+/* define if unaligned memory accesses fail */
+#undef LBL_ALIGN
+
+/* The successful return value from signal (?)XXX */
+#undef RETSIGVAL
+
+/* Define this on IRIX */
+#undef _BSD_SIGNALS
+
+/* For HP/UX ANSI compiler? */
+#undef _HPUX_SOURCE
+
+/* AIX hack. */
+#undef _SUN
+
+/* Workaround for missing 64-bit formats */
+#undef PRId64
+#undef PRIo64
+#undef PRIx64
+#undef PRIu64
+
+/* Whether or not to include the possibly-buggy SMB printer */
+#undef TCPDUMP_DO_SMB
+
+/* Long story short: aclocal.m4 depends on autoconf 2.13
+ * implementation details wrt "const"; newer versions
+ * have different implementation details so for now we
+ * put "const" here.  This may cause duplicate definitions
+ * in config.h but that should be OK since they're the same.
+ */
+#undef const
+
+/* Define if you have the dnet_htoa function.  */
+#undef HAVE_DNET_HTOA
+
+/* Define if you have a dnet_htoa declaration in <netdnet/dnetdb.h>.  */
+#undef HAVE_NETDNET_DNETDB_H_DNET_HTOA
+
+/* define if should drop privileges by default */
+#undef WITH_USER
+
+/* define if should chroot when dropping privileges */
+#undef WITH_CHROOT
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644 (file)
index 0000000..4b70105
--- /dev/null
@@ -0,0 +1,1256 @@
+dnl @(#) $Header: /tcpdump/master/tcpdump/aclocal.m4,v 1.106.2.7 2005/11/08 03:00:52 guy Exp $ (LBL)
+dnl
+dnl Copyright (c) 1995, 1996, 1997, 1998
+dnl    The Regents of the University of California.  All rights reserved.
+dnl
+dnl Redistribution and use in source and binary forms, with or without
+dnl modification, are permitted provided that: (1) source code distributions
+dnl retain the above copyright notice and this paragraph in its entirety, (2)
+dnl distributions including binary code include the above copyright notice and
+dnl this paragraph in its entirety in the documentation or other materials
+dnl provided with the distribution, and (3) all advertising materials mentioning
+dnl features or use of this software display the following acknowledgement:
+dnl ``This product includes software developed by the University of California,
+dnl Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+dnl the University nor the names of its contributors may be used to endorse
+dnl or promote products derived from this software without specific prior
+dnl written permission.
+dnl THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+dnl WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+dnl
+dnl LBL autoconf macros
+dnl
+
+dnl
+dnl Determine which compiler we're using (cc or gcc)
+dnl If using gcc, determine the version number
+dnl If using cc, require that it support ansi prototypes
+dnl If using gcc, use -O2 (otherwise use -O)
+dnl If using cc, explicitly specify /usr/local/include
+dnl
+dnl usage:
+dnl
+dnl    AC_LBL_C_INIT(copt, incls)
+dnl
+dnl results:
+dnl
+dnl    $1 (copt set)
+dnl    $2 (incls set)
+dnl    CC
+dnl    LDFLAGS
+dnl    ac_cv_lbl_gcc_vers
+dnl    LBL_CFLAGS
+dnl
+AC_DEFUN(AC_LBL_C_INIT,
+    [AC_PREREQ(2.12)
+    AC_BEFORE([$0], [AC_PROG_CC])
+    AC_BEFORE([$0], [AC_LBL_FIXINCLUDES])
+    AC_BEFORE([$0], [AC_LBL_DEVEL])
+    AC_ARG_WITH(gcc, [  --without-gcc           don't use gcc])
+    $1="-O"
+    $2=""
+    if test "${srcdir}" != "." ; then
+           $2="-I\$(srcdir)"
+    fi
+    if test "${CFLAGS+set}" = set; then
+           LBL_CFLAGS="$CFLAGS"
+    fi
+    if test -z "$CC" ; then
+           case "$host_os" in
+
+           bsdi*)
+                   AC_CHECK_PROG(SHLICC2, shlicc2, yes, no)
+                   if test $SHLICC2 = yes ; then
+                           CC=shlicc2
+                           export CC
+                   fi
+                   ;;
+           esac
+    fi
+    if test -z "$CC" -a "$with_gcc" = no ; then
+           CC=cc
+           export CC
+    fi
+    AC_PROG_CC
+    if test "$GCC" = yes ; then
+           if test "$SHLICC2" = yes ; then
+                   ac_cv_lbl_gcc_vers=2
+                   $1="-O2"
+           else
+                   AC_MSG_CHECKING(gcc version)
+                   AC_CACHE_VAL(ac_cv_lbl_gcc_vers,
+                       ac_cv_lbl_gcc_vers=`$CC -v 2>&1 | \
+                           sed -e '/^gcc version /!d' \
+                               -e 's/^gcc version //' \
+                               -e 's/ .*//' -e 's/^[[[^0-9]]]*//' \
+                               -e 's/\..*//'`)
+                   AC_MSG_RESULT($ac_cv_lbl_gcc_vers)
+                   if test $ac_cv_lbl_gcc_vers -gt 1 ; then
+                           $1="-O2"
+                   fi
+           fi
+    else
+           AC_MSG_CHECKING(that $CC handles ansi prototypes)
+           AC_CACHE_VAL(ac_cv_lbl_cc_ansi_prototypes,
+               AC_TRY_COMPILE(
+                   [#include <sys/types.h>],
+                   [int frob(int, char *)],
+                   ac_cv_lbl_cc_ansi_prototypes=yes,
+                   ac_cv_lbl_cc_ansi_prototypes=no))
+           AC_MSG_RESULT($ac_cv_lbl_cc_ansi_prototypes)
+           if test $ac_cv_lbl_cc_ansi_prototypes = no ; then
+                   case "$host_os" in
+
+                   hpux*)
+                           AC_MSG_CHECKING(for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE))
+                           savedcflags="$CFLAGS"
+                           CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
+                           AC_CACHE_VAL(ac_cv_lbl_cc_hpux_cc_aa,
+                               AC_TRY_COMPILE(
+                                   [#include <sys/types.h>],
+                                   [int frob(int, char *)],
+                                   ac_cv_lbl_cc_hpux_cc_aa=yes,
+                                   ac_cv_lbl_cc_hpux_cc_aa=no))
+                           AC_MSG_RESULT($ac_cv_lbl_cc_hpux_cc_aa)
+                           if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then
+                                   AC_MSG_ERROR(see the INSTALL doc for more info)
+                           fi
+                           CFLAGS="$savedcflags"
+                           V_CCOPT="-Aa $V_CCOPT"
+                           AC_DEFINE(_HPUX_SOURCE)
+                           ;;
+
+                   *)
+                           AC_MSG_ERROR(see the INSTALL doc for more info)
+                           ;;
+                   esac
+           fi
+           $2="$$2 -I/usr/local/include"
+           LDFLAGS="$LDFLAGS -L/usr/local/lib"
+
+           case "$host_os" in
+
+           irix*)
+                   V_CCOPT="$V_CCOPT -xansi -signed -O"
+                   ;;
+
+           osf*)
+                   V_CCOPT="$V_CCOPT -std1 -O"
+                   ;;
+
+           ultrix*)
+                   AC_MSG_CHECKING(that Ultrix $CC hacks const in prototypes)
+                   AC_CACHE_VAL(ac_cv_lbl_cc_const_proto,
+                       AC_TRY_COMPILE(
+                           [#include <sys/types.h>],
+                           [struct a { int b; };
+                           void c(const struct a *)],
+                           ac_cv_lbl_cc_const_proto=yes,
+                           ac_cv_lbl_cc_const_proto=no))
+                   AC_MSG_RESULT($ac_cv_lbl_cc_const_proto)
+                   if test $ac_cv_lbl_cc_const_proto = no ; then
+                           AC_DEFINE(const,)
+                   fi
+                   ;;
+           esac
+    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
+dnl Look for libpcap in ..
+dnl Use the installed libpcap if there is no local version
+dnl
+dnl usage:
+dnl
+dnl    AC_LBL_LIBPCAP(pcapdep, incls)
+dnl
+dnl results:
+dnl
+dnl    $1 (pcapdep set)
+dnl    $2 (incls appended)
+dnl    LIBS
+dnl    LBL_LIBS
+dnl
+AC_DEFUN(AC_LBL_LIBPCAP,
+    [AC_REQUIRE([AC_LBL_LIBRARY_NET])
+    dnl
+    dnl save a copy before locating libpcap.a
+    dnl
+    LBL_LIBS="$LIBS"
+    pfopen=/usr/examples/packetfilter/pfopen.c
+    if test -f $pfopen ; then
+           AC_CHECK_FUNCS(pfopen)
+           if test $ac_cv_func_pfopen = "no" ; then
+                   AC_MSG_RESULT(Using $pfopen)
+                   LIBS="$LIBS $pfopen"
+           fi
+    fi
+    AC_MSG_CHECKING(for local pcap library)
+    libpcap=FAIL
+    lastdir=FAIL
+    places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
+       egrep '/libpcap-[[0-9]]*.[[0-9]]*(.[[0-9]]*)?([[ab]][[0-9]]*)?$'`
+    for dir in $places $srcdir/../libpcap $srcdir/libpcap ; do
+           basedir=`echo $dir | sed -e 's/[[ab]][[0-9]]*$//'`
+           if test $lastdir = $basedir ; then
+                   dnl skip alphas when an actual release is present
+                   continue;
+           fi
+           lastdir=$dir
+           if test -r $dir/libpcap.a ; then
+                   libpcap=$dir/libpcap.a
+                   d=$dir
+                   dnl continue and select the last one that exists
+           fi
+    done
+    if test $libpcap = FAIL ; then
+           AC_MSG_RESULT(not found)
+           AC_CHECK_LIB(pcap, main, libpcap="-lpcap")
+           if test $libpcap = FAIL ; then
+                   AC_MSG_ERROR(see the INSTALL doc for more info)
+           fi
+           dnl
+           dnl Good old Red Hat Linux puts "pcap.h" in
+           dnl "/usr/include/pcap"; had the LBL folks done so,
+           dnl that would have been a good idea, but for
+           dnl the Red Hat folks to do so just breaks source
+           dnl compatibility with other systems.
+           dnl
+           dnl We work around this by assuming that, as we didn't
+           dnl find a local libpcap, libpcap is in /usr/lib or
+           dnl /usr/local/lib and that the corresponding header
+           dnl file is under one of those directories; if we don't
+           dnl find it in either of those directories, we check to
+           dnl see if it's in a "pcap" subdirectory of them and,
+           dnl if so, add that subdirectory to the "-I" list.
+           dnl
+           AC_MSG_CHECKING(for extraneous pcap header directories)
+           if test \( ! -r /usr/local/include/pcap.h \) -a \
+                       \( ! -r /usr/include/pcap.h \); then
+               if test -r /usr/local/include/pcap/pcap.h; then
+                   d="/usr/local/include/pcap"
+               elif test -r /usr/include/pcap/pcap.h; then
+                   d="/usr/include/pcap"
+               fi
+           fi
+           if test -z "$d" ; then
+               AC_MSG_RESULT(not found)
+           else
+               $2="-I$d $$2"
+               AC_MSG_RESULT(found -- -I$d added)
+           fi
+    else
+           $1=$libpcap
+           places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
+                       egrep '/libpcap-[[0-9]]*.[[0-9]]*(.[[0-9]]*)?([[ab]][[0-9]]*)?$'`
+           if test -r $d/pcap.h; then
+                   $2="-I$d $$2"
+           elif test -r $places/pcap.h; then
+                   $2="-I$places $$2"
+           else
+                    AC_MSG_ERROR(cannot find pcap.h, see INSTALL)
+           fi
+           AC_MSG_RESULT($libpcap)
+    fi
+    LIBS="$libpcap $LIBS"
+    case "$host_os" in
+
+    aix*)
+           pseexe="/lib/pse.exp"
+           AC_MSG_CHECKING(for $pseexe)
+           if test -f $pseexe ; then
+                   AC_MSG_RESULT(yes)
+                   LIBS="$LIBS -I:$pseexe"
+           fi
+           #
+           # We need "-lodm" and "-lcfg", as libpcap requires them on
+           # AIX, and we just build a static libpcap.a and thus can't
+           # arrange that when you link with libpcap you automatically
+           # link with those libraries.
+           #
+           LIBS="$LIBS -lodm -lcfg"
+           ;;
+    esac
+
+    dnl
+    dnl Check for "pcap_list_datalinks()", "pcap_set_datalink()",
+    dnl and "pcap_datalink_name_to_val()", and use substitute versions
+    dnl if they're not present.
+    dnl
+    AC_CHECK_FUNC(pcap_list_datalinks,
+       AC_DEFINE(HAVE_PCAP_LIST_DATALINKS),
+       [
+           AC_LIBOBJ(datalinks)
+       ])
+    AC_CHECK_FUNC(pcap_set_datalink,
+       AC_DEFINE(HAVE_PCAP_SET_DATALINK))
+    AC_CHECK_FUNC(pcap_datalink_name_to_val,
+       [
+           AC_DEFINE(HAVE_PCAP_DATALINK_NAME_TO_VAL)
+           AC_CHECK_FUNC(pcap_datalink_val_to_description,
+               AC_DEFINE(HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION),
+               [
+                   AC_LIBOBJ(dlnames)
+               ])
+       ],
+       [
+           AC_LIBOBJ(dlnames)
+       ])
+
+    dnl
+    dnl Check for "pcap_breakloop()"; you can't substitute for it if
+    dnl it's absent (it has hooks into the live capture routines),
+    dnl so just define the HAVE_ value if it's there.
+    dnl
+    AC_CHECK_FUNCS(pcap_breakloop)
+
+    dnl
+    dnl Check for "pcap_dump_ftell()" and use a substitute version
+    dnl if it's not present.
+    AC_CHECK_FUNC(pcap_dump_ftell,
+       AC_DEFINE(HAVE_PCAP_DUMP_FTELL),
+       [
+           AC_LIBOBJ(pcap_dump_ftell)
+       ])
+])
+
+dnl
+dnl Define RETSIGTYPE and RETSIGVAL
+dnl
+dnl usage:
+dnl
+dnl    AC_LBL_TYPE_SIGNAL
+dnl
+dnl results:
+dnl
+dnl    RETSIGTYPE (defined)
+dnl    RETSIGVAL (defined)
+dnl
+AC_DEFUN(AC_LBL_TYPE_SIGNAL,
+    [AC_BEFORE([$0], [AC_LBL_LIBPCAP])
+    AC_TYPE_SIGNAL
+    if test "$ac_cv_type_signal" = void ; then
+           AC_DEFINE(RETSIGVAL,)
+    else
+           AC_DEFINE(RETSIGVAL,(0))
+    fi
+    case "$host_os" in
+
+    irix*)
+           AC_DEFINE(_BSD_SIGNALS)
+           ;;
+
+    *)
+           dnl prefer sigaction() to sigset()
+           AC_CHECK_FUNCS(sigaction)
+           if test $ac_cv_func_sigaction = no ; then
+                   AC_CHECK_FUNCS(sigset)
+           fi
+           ;;
+    esac])
+
+dnl
+dnl If using gcc, make sure we have ANSI ioctl definitions
+dnl
+dnl usage:
+dnl
+dnl    AC_LBL_FIXINCLUDES
+dnl
+AC_DEFUN(AC_LBL_FIXINCLUDES,
+    [if test "$GCC" = yes ; then
+           AC_MSG_CHECKING(for ANSI ioctl definitions)
+           AC_CACHE_VAL(ac_cv_lbl_gcc_fixincludes,
+               AC_TRY_COMPILE(
+                   [/*
+                    * This generates a "duplicate case value" when fixincludes
+                    * has not be run.
+                    */
+#              include <sys/types.h>
+#              include <sys/time.h>
+#              include <sys/ioctl.h>
+#              ifdef HAVE_SYS_IOCCOM_H
+#              include <sys/ioccom.h>
+#              endif],
+                   [switch (0) {
+                   case _IO('A', 1):;
+                   case _IO('B', 1):;
+                   }],
+                   ac_cv_lbl_gcc_fixincludes=yes,
+                   ac_cv_lbl_gcc_fixincludes=no))
+           AC_MSG_RESULT($ac_cv_lbl_gcc_fixincludes)
+           if test $ac_cv_lbl_gcc_fixincludes = no ; then
+                   # Don't cache failure
+                   unset ac_cv_lbl_gcc_fixincludes
+                   AC_MSG_ERROR(see the INSTALL for more info)
+           fi
+    fi])
+
+dnl
+dnl Check for flex, default to lex
+dnl Require flex 2.4 or higher
+dnl Check for bison, default to yacc
+dnl Default to lex/yacc if both flex and bison are not available
+dnl Define the yy prefix string if using flex and bison
+dnl
+dnl usage:
+dnl
+dnl    AC_LBL_LEX_AND_YACC(lex, yacc, yyprefix)
+dnl
+dnl results:
+dnl
+dnl    $1 (lex set)
+dnl    $2 (yacc appended)
+dnl    $3 (optional flex and bison -P prefix)
+dnl
+AC_DEFUN(AC_LBL_LEX_AND_YACC,
+    [AC_ARG_WITH(flex, [  --without-flex          don't use flex])
+    AC_ARG_WITH(bison, [  --without-bison         don't use bison])
+    if test "$with_flex" = no ; then
+           $1=lex
+    else
+           AC_CHECK_PROGS($1, flex, lex)
+    fi
+    if test "$$1" = flex ; then
+           # The -V flag was added in 2.4
+           AC_MSG_CHECKING(for flex 2.4 or higher)
+           AC_CACHE_VAL(ac_cv_lbl_flex_v24,
+               if flex -V >/dev/null 2>&1; then
+                       ac_cv_lbl_flex_v24=yes
+               else
+                       ac_cv_lbl_flex_v24=no
+               fi)
+           AC_MSG_RESULT($ac_cv_lbl_flex_v24)
+           if test $ac_cv_lbl_flex_v24 = no ; then
+                   s="2.4 or higher required"
+                   AC_MSG_WARN(ignoring obsolete flex executable ($s))
+                   $1=lex
+           fi
+    fi
+    if test "$with_bison" = no ; then
+           $2=yacc
+    else
+           AC_CHECK_PROGS($2, bison, yacc)
+    fi
+    if test "$$2" = bison ; then
+           $2="$$2 -y"
+    fi
+    if test "$$1" != lex -a "$$2" = yacc -o "$$1" = lex -a "$$2" != yacc ; then
+           AC_MSG_WARN(don't have both flex and bison; reverting to lex/yacc)
+           $1=lex
+           $2=yacc
+    fi
+    if test "$$1" = flex -a -n "$3" ; then
+           $1="$$1 -P$3"
+           $2="$$2 -p $3"
+    fi])
+
+dnl
+dnl Checks to see if union wait is used with WEXITSTATUS()
+dnl
+dnl usage:
+dnl
+dnl    AC_LBL_UNION_WAIT
+dnl
+dnl results:
+dnl
+dnl    DECLWAITSTATUS (defined)
+dnl
+AC_DEFUN(AC_LBL_UNION_WAIT,
+    [AC_MSG_CHECKING(if union wait is used)
+    AC_CACHE_VAL(ac_cv_lbl_union_wait,
+       AC_TRY_COMPILE([
+#      include <sys/types.h>
+#      include <sys/wait.h>],
+           [int status;
+           u_int i = WEXITSTATUS(status);
+           u_int j = waitpid(0, &status, 0);],
+           ac_cv_lbl_union_wait=no,
+           ac_cv_lbl_union_wait=yes))
+    AC_MSG_RESULT($ac_cv_lbl_union_wait)
+    if test $ac_cv_lbl_union_wait = yes ; then
+           AC_DEFINE(DECLWAITSTATUS,union wait)
+    else
+           AC_DEFINE(DECLWAITSTATUS,int)
+    fi])
+
+dnl
+dnl Checks to see if the sockaddr struct has the 4.4 BSD sa_len member
+dnl
+dnl usage:
+dnl
+dnl    AC_LBL_SOCKADDR_SA_LEN
+dnl
+dnl results:
+dnl
+dnl    HAVE_SOCKADDR_SA_LEN (defined)
+dnl
+AC_DEFUN(AC_LBL_SOCKADDR_SA_LEN,
+    [AC_MSG_CHECKING(if sockaddr struct has sa_len member)
+    AC_CACHE_VAL(ac_cv_lbl_sockaddr_has_sa_len,
+       AC_TRY_COMPILE([
+#      include <sys/types.h>
+#      include <sys/socket.h>],
+       [u_int i = sizeof(((struct sockaddr *)0)->sa_len)],
+       ac_cv_lbl_sockaddr_has_sa_len=yes,
+       ac_cv_lbl_sockaddr_has_sa_len=no))
+    AC_MSG_RESULT($ac_cv_lbl_sockaddr_has_sa_len)
+    if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
+           AC_DEFINE(HAVE_SOCKADDR_SA_LEN)
+    fi])
+
+dnl
+dnl Checks to see if -R is used
+dnl
+dnl usage:
+dnl
+dnl    AC_LBL_HAVE_RUN_PATH
+dnl
+dnl results:
+dnl
+dnl    ac_cv_lbl_have_run_path (yes or no)
+dnl
+AC_DEFUN(AC_LBL_HAVE_RUN_PATH,
+    [AC_MSG_CHECKING(for ${CC-cc} -R)
+    AC_CACHE_VAL(ac_cv_lbl_have_run_path,
+       [echo 'main(){}' > conftest.c
+       ${CC-cc} -o conftest conftest.c -R/a1/b2/c3 >conftest.out 2>&1
+       if test ! -s conftest.out ; then
+               ac_cv_lbl_have_run_path=yes
+       else
+               ac_cv_lbl_have_run_path=no
+       fi
+       rm -f conftest*])
+    AC_MSG_RESULT($ac_cv_lbl_have_run_path)
+    ])
+
+dnl
+dnl Check whether a given format can be used to print 64-bit integers
+dnl
+AC_DEFUN(AC_LBL_CHECK_64BIT_FORMAT,
+  [
+    AC_MSG_CHECKING([whether %$1x can be used to format 64-bit integers])
+    AC_RUN_IFELSE(
+      [
+       AC_LANG_SOURCE(
+         [[
+#          ifdef HAVE_INTTYPES_H
+           #include <inttypes.h>
+#          endif
+#          ifdef HAVE_SYS_BITYPES_H
+            #include <sys/bitypes.h>
+#          endif
+           #include <stdio.h>
+           #include <sys/types.h>
+
+           main()
+           {
+             u_int64_t t = 1;
+             char strbuf[16+1];
+             sprintf(strbuf, "%016$1x", t << 32);
+             if (strcmp(strbuf, "0000000100000000") == 0)
+               exit(0);
+             else
+               exit(1);
+           }
+         ]])
+      ],
+      [
+       AC_DEFINE(PRId64, "$1d")
+       AC_DEFINE(PRIo64, "$1o")
+       AC_DEFINE(PRIx64, "$1x")
+       AC_DEFINE(PRIu64, "$1u")
+       AC_MSG_RESULT(yes)
+      ],
+      [
+       AC_MSG_RESULT(no)
+       $2
+      ])
+  ])
+
+dnl
+dnl Checks to see if unaligned memory accesses fail
+dnl
+dnl usage:
+dnl
+dnl    AC_LBL_UNALIGNED_ACCESS
+dnl
+dnl results:
+dnl
+dnl    LBL_ALIGN (DEFINED)
+dnl
+AC_DEFUN(AC_LBL_UNALIGNED_ACCESS,
+    [AC_MSG_CHECKING(if unaligned accesses fail)
+    AC_CACHE_VAL(ac_cv_lbl_unaligned_fail,
+       [case "$host_cpu" in
+
+       #
+       # These are CPU types where:
+       #
+       #       the CPU faults on an unaligned access, but at least some
+       #       OSes that support that CPU catch the fault and simulate
+       #       the unaligned access (e.g., Alpha/{Digital,Tru64} UNIX) -
+       #       the simulation is slow, so we don't want to use it;
+       #
+       #       the CPU, I infer (from the old
+       #
+       # XXX: should also check that they don't do weird things (like on arm)
+       #
+       #       comment) doesn't fault on unaligned accesses, but doesn't
+       #       do a normal unaligned fetch, either (e.g., presumably, ARM);
+       #
+       #       for whatever reason, the test program doesn't work
+       #       (this has been claimed to be the case for several of those
+       #       CPUs - I don't know what the problem is; the problem
+       #       was reported as "the test program dumps core" for SuperH,
+       #       but that's what the test program is *supposed* to do -
+       #       it dumps core before it writes anything, so the test
+       #       for an empty output file should find an empty output
+       #       file and conclude that unaligned accesses don't work).
+       #
+       # This run-time test won't work if you're cross-compiling, so
+       # in order to support cross-compiling for a particular CPU,
+       # we have to wire in the list of CPU types anyway, as far as
+       # I know, so perhaps we should just have a set of CPUs on
+       # which we know it doesn't work, a set of CPUs on which we
+       # know it does work, and have the script just fail on other
+       # cpu types and update it when such a failure occurs.
+       #
+       alpha*|arm*|hp*|mips*|sh*|sparc*|ia64|nv1)
+               ac_cv_lbl_unaligned_fail=yes
+               ;;
+
+       *)
+               cat >conftest.c <<EOF
+#              include <sys/types.h>
+#              include <sys/wait.h>
+#              include <stdio.h>
+               unsigned char a[[5]] = { 1, 2, 3, 4, 5 };
+               main() {
+               unsigned int i;
+               pid_t pid;
+               int status;
+               /* avoid "core dumped" message */
+               pid = fork();
+               if (pid <  0)
+                       exit(2);
+               if (pid > 0) {
+                       /* parent */
+                       pid = waitpid(pid, &status, 0);
+                       if (pid < 0)
+                               exit(3);
+                       exit(!WIFEXITED(status));
+               }
+               /* child */
+               i = *(unsigned int *)&a[[1]];
+               printf("%d\n", i);
+               exit(0);
+               }
+EOF
+               ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
+                   conftest.c $LIBS >/dev/null 2>&1
+               if test ! -x conftest ; then
+                       dnl failed to compile for some reason
+                       ac_cv_lbl_unaligned_fail=yes
+               else
+                       ./conftest >conftest.out
+                       if test ! -s conftest.out ; then
+                               ac_cv_lbl_unaligned_fail=yes
+                       else
+                               ac_cv_lbl_unaligned_fail=no
+                       fi
+               fi
+               rm -f conftest* core core.conftest
+               ;;
+       esac])
+    AC_MSG_RESULT($ac_cv_lbl_unaligned_fail)
+    if test $ac_cv_lbl_unaligned_fail = yes ; then
+           AC_DEFINE(LBL_ALIGN)
+    fi])
+
+dnl
+dnl If using gcc and the file .devel exists:
+dnl    Compile with -g (if supported) and -Wall
+dnl    If using gcc 2 or later, do extra prototype checking and some other
+dnl    checks
+dnl    If an os prototype include exists, symlink os-proto.h to it
+dnl
+dnl usage:
+dnl
+dnl    AC_LBL_DEVEL(copt)
+dnl
+dnl results:
+dnl
+dnl    $1 (copt appended)
+dnl    HAVE_OS_PROTO_H (defined)
+dnl    os-proto.h (symlinked)
+dnl
+AC_DEFUN(AC_LBL_DEVEL,
+    [rm -f os-proto.h
+    if test "${LBL_CFLAGS+set}" = set; then
+           $1="$$1 ${LBL_CFLAGS}"
+    fi
+    if test -f .devel ; then
+           if test "$GCC" = yes ; then
+                   if test "${LBL_CFLAGS+set}" != set; then
+                           if test "$ac_cv_prog_cc_g" = yes ; then
+                                   $1="-g $$1"
+                           fi
+                           $1="$$1 -Wall"
+                           if test $ac_cv_lbl_gcc_vers -gt 1 ; then
+                                   $1="$$1 -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wpointer-arith -W"
+                           fi
+                   fi
+           else
+                   case "$host_os" in
+
+                   irix6*)
+                           V_CCOPT="$V_CCOPT -n32"
+                           ;;
+
+                   *)
+                           ;;
+                   esac
+           fi
+           os=`echo $host_os | sed -e 's/\([[0-9]][[0-9]]*\)[[^0-9]].*$/\1/'`
+           name="lbl/os-$os.h"
+           if test -f $name ; then
+                   ln -s $name os-proto.h
+                   AC_DEFINE(HAVE_OS_PROTO_H)
+           else
+                   AC_MSG_WARN(can't find $name)
+           fi
+    fi])
+
+dnl
+dnl Improved version of AC_CHECK_LIB
+dnl
+dnl Thanks to John Hawkinson (jhawk@mit.edu)
+dnl
+dnl usage:
+dnl
+dnl    AC_LBL_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [,
+dnl        ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
+dnl
+dnl results:
+dnl
+dnl    LIBS
+dnl
+dnl XXX - "AC_LBL_LIBRARY_NET" was redone to use "AC_SEARCH_LIBS"
+dnl rather than "AC_LBL_CHECK_LIB", so this isn't used any more.
+dnl We keep it around for reference purposes in case it's ever
+dnl useful in the future.
+dnl
+
+define(AC_LBL_CHECK_LIB,
+[AC_MSG_CHECKING([for $2 in -l$1])
+dnl Use a cache variable name containing the library, function
+dnl name, and extra libraries to link with, because the test really is
+dnl for library $1 defining function $2, when linked with potinal
+dnl library $5, not just for library $1.  Separate tests with the same
+dnl $1 and different $2's or $5's may have different results.
+ac_lib_var=`echo $1['_']$2['_']$5 | sed 'y%./+- %__p__%'`
+AC_CACHE_VAL(ac_cv_lbl_lib_$ac_lib_var,
+[ac_save_LIBS="$LIBS"
+LIBS="-l$1 $5 $LIBS"
+AC_TRY_LINK(dnl
+ifelse([$2], [main], , dnl Avoid conflicting decl of main.
+[/* Override any gcc2 internal prototype to avoid an error.  */
+]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
+extern "C"
+#endif
+])dnl
+[/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $2();
+]),
+           [$2()],
+           eval "ac_cv_lbl_lib_$ac_lib_var=yes",
+           eval "ac_cv_lbl_lib_$ac_lib_var=no")
+LIBS="$ac_save_LIBS"
+])dnl
+if eval "test \"`echo '$ac_cv_lbl_lib_'$ac_lib_var`\" = yes"; then
+  AC_MSG_RESULT(yes)
+  ifelse([$3], ,
+[changequote(, )dnl
+  ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+changequote([, ])dnl
+  AC_DEFINE_UNQUOTED($ac_tr_lib)
+  LIBS="-l$1 $LIBS"
+], [$3])
+else
+  AC_MSG_RESULT(no)
+ifelse([$4], , , [$4
+])dnl
+fi
+])
+
+dnl
+dnl AC_LBL_LIBRARY_NET
+dnl
+dnl This test is for network applications that need socket() and
+dnl gethostbyname() -ish functions.  Under Solaris, those applications
+dnl need to link with "-lsocket -lnsl".  Under IRIX, they need to link
+dnl with "-lnsl" but should *not* link with "-lsocket" because
+dnl libsocket.a breaks a number of things (for instance:
+dnl gethostbyname() under IRIX 5.2, and snoop sockets under most
+dnl versions of IRIX).
+dnl
+dnl Unfortunately, many application developers are not aware of this,
+dnl and mistakenly write tests that cause -lsocket to be used under
+dnl IRIX.  It is also easy to write tests that cause -lnsl to be used
+dnl under operating systems where neither are necessary (or useful),
+dnl such as SunOS 4.1.4, which uses -lnsl for TLI.
+dnl
+dnl This test exists so that every application developer does not test
+dnl this in a different, and subtly broken fashion.
+
+dnl It has been argued that this test should be broken up into two
+dnl seperate tests, one for the resolver libraries, and one for the
+dnl libraries necessary for using Sockets API. Unfortunately, the two
+dnl are carefully intertwined and allowing the autoconf user to use
+dnl them independantly potentially results in unfortunate ordering
+dnl dependancies -- as such, such component macros would have to
+dnl carefully use indirection and be aware if the other components were
+dnl executed. Since other autoconf macros do not go to this trouble,
+dnl and almost no applications use sockets without the resolver, this
+dnl complexity has not been implemented.
+dnl
+dnl The check for libresolv is in case you are attempting to link
+dnl statically and happen to have a libresolv.a lying around (and no
+dnl libnsl.a).
+dnl
+AC_DEFUN(AC_LBL_LIBRARY_NET, [
+    # Most operating systems have gethostbyname() in the default searched
+    # libraries (i.e. libc):
+    # Some OSes (eg. Solaris) place it in libnsl
+    # Some strange OSes (SINIX) have it in libsocket:
+    AC_SEARCH_LIBS(gethostbyname, nsl socket resolv)
+    # Unfortunately libsocket sometimes depends on libnsl and
+    # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
+    if test "$ac_cv_search_gethostbyname" = "no"
+    then
+       AC_CHECK_LIB(socket, gethostbyname,
+                     LIBS="-lsocket -lnsl $LIBS", , -lnsl)
+    fi
+    AC_SEARCH_LIBS(socket, socket, ,
+       AC_CHECK_LIB(socket, socket, LIBS="-lsocket -lnsl $LIBS", , -lnsl))
+    # DLPI needs putmsg under HPUX so test for -lstr while we're at it
+    AC_SEARCH_LIBS(putmsg, str)
+    ])
+
+dnl Copyright (c) 1999 WIDE Project. All rights reserved.
+dnl
+dnl Redistribution and use in source and binary forms, with or without
+dnl modification, are permitted provided that the following conditions
+dnl are met:
+dnl 1. Redistributions of source code must retain the above copyright
+dnl    notice, this list of conditions and the following disclaimer.
+dnl 2. Redistributions in binary form must reproduce the above copyright
+dnl    notice, this list of conditions and the following disclaimer in the
+dnl    documentation and/or other materials provided with the distribution.
+dnl 3. Neither the name of the project nor the names of its contributors
+dnl    may be used to endorse or promote products derived from this software
+dnl    without specific prior written permission.
+dnl 
+dnl THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+dnl ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+dnl ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+dnl OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+dnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+dnl LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+dnl OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+dnl SUCH DAMAGE.
+
+dnl
+dnl Checks to see if AF_INET6 is defined
+AC_DEFUN(AC_CHECK_AF_INET6, [
+       AC_MSG_CHECKING(for AF_INET6)
+       AC_CACHE_VAL($1,
+       AC_TRY_COMPILE([
+#              include <sys/types.h>
+#              include <sys/socket.h>],
+               [int a = AF_INET6],
+               $1=yes,
+               $1=no))
+       AC_MSG_RESULT($$1)
+               if test $$1 = yes ; then
+                       AC_DEFINE(HAVE_AF_INET6)
+       fi
+])
+
+dnl
+dnl Checks to see if the sockaddr struct has the 4.4 BSD sa_len member
+dnl borrowed from LBL libpcap
+AC_DEFUN(AC_CHECK_SA_LEN, [
+       AC_MSG_CHECKING(if sockaddr struct has sa_len member)
+       AC_CACHE_VAL($1,
+       AC_TRY_COMPILE([
+#              include <sys/types.h>
+#              include <sys/socket.h>],
+               [u_int i = sizeof(((struct sockaddr *)0)->sa_len)],
+               $1=yes,
+               $1=no))
+       AC_MSG_RESULT($$1)
+               if test $$1 = yes ; then
+                       AC_DEFINE(HAVE_SOCKADDR_SA_LEN)
+       fi
+])
+
+dnl
+dnl Checks for portable prototype declaration macro
+AC_DEFUN(AC_CHECK_PORTABLE_PROTO,  [
+       AC_MSG_CHECKING(for __P)
+       AC_CACHE_VAL($1,
+       AC_TRY_COMPILE([
+#              include <unistd.h>],
+               [int f __P(())],
+               $1=yes,
+               $1=no))
+       AC_MSG_RESULT($$1)
+       if test $$1 = yes; then
+               AC_DEFINE(HAVE_PORTABLE_PROTOTYPE)
+       fi
+])
+
+dnl checks for u_intXX_t
+AC_DEFUN(AC_CHECK_BITTYPES, [
+       $1=yes
+dnl check for u_int8_t
+       AC_MSG_CHECKING(for u_int8_t)
+       AC_CACHE_VAL(ac_cv_u_int8_t,
+       AC_TRY_COMPILE([
+#              include <sys/types.h>],
+               [u_int8_t i],
+               ac_cv_u_int8_t=yes,
+               ac_cv_u_int8_t=no))
+       AC_MSG_RESULT($ac_cv_u_int8_t)
+       if test $ac_cv_u_int8_t = yes; then
+               AC_DEFINE(HAVE_U_INT8_T)
+       else
+               $1=no
+       fi
+dnl check for u_int16_t
+       AC_MSG_CHECKING(for u_int16_t)
+       AC_CACHE_VAL(ac_cv_u_int16_t,
+       AC_TRY_COMPILE([
+#              include <sys/types.h>],
+               [u_int16_t i],
+               ac_cv_u_int16_t=yes,
+               ac_cv_u_int16_t=no))
+       AC_MSG_RESULT($ac_cv_u_int16_t)
+       if test $ac_cv_u_int16_t = yes; then
+               AC_DEFINE(HAVE_U_INT16_T)
+       else
+               $1=no
+       fi
+dnl check for u_int32_t
+       AC_MSG_CHECKING(for u_int32_t)
+       AC_CACHE_VAL(ac_cv_u_int32_t,
+       AC_TRY_COMPILE([
+#              include <sys/types.h>],
+               [u_int32_t i],
+               ac_cv_u_int32_t=yes,
+               ac_cv_u_int32_t=no))
+       AC_MSG_RESULT($ac_cv_u_int32_t)
+       if test $ac_cv_u_int32_t = yes; then
+               AC_DEFINE(HAVE_U_INT32_T)
+       else
+               $1=no
+       fi
+dnl check for u_int64_t
+       AC_MSG_CHECKING(for u_int64_t)
+       AC_CACHE_VAL(ac_cv_u_int64_t,
+       AC_TRY_COMPILE([
+#              include <sys/types.h>],
+               [u_int64_t i],
+               ac_cv_u_int64_t=yes,
+               ac_cv_u_int64_t=no))
+       AC_MSG_RESULT($ac_cv_u_int64_t)
+       if test $ac_cv_u_int64_t = yes; then
+               AC_DEFINE(HAVE_U_INT64_T)
+       else
+               $1=no
+       fi
+])
+
+dnl
+dnl Checks for addrinfo structure
+AC_DEFUN(AC_STRUCT_ADDRINFO, [
+       AC_MSG_CHECKING(for addrinfo)
+       AC_CACHE_VAL($1,
+       AC_TRY_COMPILE([
+#              include <netdb.h>],
+               [struct addrinfo a],
+               $1=yes,
+               $1=no))
+       AC_MSG_RESULT($$1)
+       if test $$1 = yes; then
+               AC_DEFINE(HAVE_ADDRINFO)
+       else
+               AC_DEFINE(NEED_ADDRINFO_H)
+       fi
+])
+
+dnl
+dnl Checks for NI_MAXSERV
+AC_DEFUN(AC_NI_MAXSERV, [
+       AC_MSG_CHECKING(for NI_MAXSERV)
+       AC_CACHE_VAL($1,
+       AC_EGREP_CPP(yes, [#include <netdb.h>
+#ifdef NI_MAXSERV
+yes
+#endif],
+               $1=yes,
+               $1=no))
+       AC_MSG_RESULT($$1)
+       if test $$1 != yes; then
+               AC_DEFINE(NEED_ADDRINFO_H)
+       fi
+])
+
+dnl
+dnl Checks for NI_NAMEREQD
+AC_DEFUN(AC_NI_NAMEREQD, [
+       AC_MSG_CHECKING(for NI_NAMEREQD)
+       AC_CACHE_VAL($1,
+       AC_EGREP_CPP(yes, [#include <netdb.h>
+#ifdef NI_NOFQDN
+yes
+#endif],
+               $1=yes,
+               $1=no))
+       AC_MSG_RESULT($$1)
+       if test $$1 != yes; then
+               AC_DEFINE(NEED_ADDRINFO_H)
+       fi
+])
+
+dnl
+dnl Checks for sockaddr_storage structure
+AC_DEFUN(AC_STRUCT_SA_STORAGE, [
+       AC_MSG_CHECKING(for sockaddr_storage)
+       AC_CACHE_VAL($1,
+       AC_TRY_COMPILE([
+#              include <sys/types.h>
+#              include <sys/socket.h>],
+               [struct sockaddr_storage s],
+               $1=yes,
+               $1=no))
+       AC_MSG_RESULT($$1)
+       if test $$1 = yes; then
+               AC_DEFINE(HAVE_SOCKADDR_STORAGE)
+       fi
+])
+
+dnl
+dnl Checks for macro of IP address size
+AC_DEFUN(AC_CHECK_ADDRSZ, [
+       $1=yes
+dnl check for INADDRSZ
+       AC_MSG_CHECKING(for INADDRSZ)
+       AC_CACHE_VAL(ac_cv_inaddrsz,
+       AC_TRY_COMPILE([
+#              include <arpa/nameser.h>],
+               [int a = INADDRSZ],
+               ac_cv_inaddrsz=yes,
+               ac_cv_inaddrsz=no))
+       AC_MSG_RESULT($ac_cv_inaddrsz)
+       if test $ac_cv_inaddrsz = yes; then
+               AC_DEFINE(HAVE_INADDRSZ)
+       else
+               $1=no
+       fi
+dnl check for IN6ADDRSZ
+       AC_MSG_CHECKING(for IN6ADDRSZ)
+       AC_CACHE_VAL(ac_cv_in6addrsz,
+       AC_TRY_COMPILE([
+#              include <arpa/nameser.h>],
+               [int a = IN6ADDRSZ],
+               ac_cv_in6addrsz=yes,
+               ac_cv_in6addrsz=no))
+       AC_MSG_RESULT($ac_cv_in6addrsz)
+       if test $ac_cv_in6addrsz = yes; then
+               AC_DEFINE(HAVE_IN6ADDRSZ)
+       else
+               $1=no
+       fi
+])
+
+dnl
+dnl check for RES_USE_INET6
+AC_DEFUN(AC_CHECK_RES_USE_INET6, [
+       AC_MSG_CHECKING(for RES_USE_INET6)
+       AC_CACHE_VAL($1,
+       AC_TRY_COMPILE([
+#              include <sys/types.h>
+#              include <netinet/in.h>
+#              include <resolv.h>],
+               [int a = RES_USE_INET6],
+               $1=yes,
+               $1=no))
+       AC_MSG_RESULT($$1)
+       if test $$1 = yes; then
+               AC_DEFINE(HAVE_RES_USE_INET6)
+       fi
+])
+
+dnl
+dnl check for AAAA
+AC_DEFUN(AC_CHECK_AAAA, [
+       AC_MSG_CHECKING(for AAAA)
+       AC_CACHE_VAL($1,
+       AC_TRY_COMPILE([
+#              include <sys/types.h>
+#              include <arpa/nameser.h>],
+               [int a = T_AAAA],
+               $1=yes,
+               $1=no))
+       AC_MSG_RESULT($$1)
+       if test $$1 = yes; then
+               AC_DEFINE(HAVE_AAAA)
+       fi
+])
+
+dnl
+dnl check for struct res_state_ext
+AC_DEFUN(AC_STRUCT_RES_STATE_EXT, [
+       AC_MSG_CHECKING(for res_state_ext)
+       AC_CACHE_VAL($1,
+       AC_TRY_COMPILE([
+#              include <sys/types.h>
+#              include <netinet/in.h>
+#              include <netinet6/in6.h>
+#              include <resolv.h>],
+               [struct __res_state_ext e],
+               $1=yes,
+               $1=no))
+       AC_MSG_RESULT($$1)
+       if test $$1 = yes; then
+               AC_DEFINE(HAVE_RES_STATE_EXT)
+       fi
+])
+
+dnl
+dnl check for struct res_state_ext
+AC_DEFUN(AC_STRUCT_RES_STATE, [
+       AC_MSG_CHECKING(for nsort in res_state)
+       AC_CACHE_VAL($1,
+       AC_TRY_COMPILE([
+#              include <sys/types.h>
+#              include <netinet/in.h>
+#              include <netinet6/in6.h>
+#              include <resolv.h>],
+               [struct __res_state e; e.nsort = 0],
+               $1=yes,
+               $1=no))
+       AC_MSG_RESULT($$1)
+       if test $$1 = yes; then
+               AC_DEFINE(HAVE_NEW_RES_STATE)
+       fi
+])
+
+dnl
+dnl check for h_errno
+AC_DEFUN(AC_VAR_H_ERRNO, [
+       AC_MSG_CHECKING(for h_errno)
+       AC_CACHE_VAL(ac_cv_var_h_errno,
+       AC_TRY_COMPILE([
+#              include <sys/types.h>
+#              include <netdb.h>],
+               [int foo = h_errno;],
+               ac_cv_var_h_errno=yes,
+               ac_cv_var_h_errno=no))
+       AC_MSG_RESULT($ac_cv_var_h_errno)
+       if test "$ac_cv_var_h_errno" = "yes"; then
+               AC_DEFINE(HAVE_H_ERRNO)
+       fi
+])
+
+dnl
+dnl Test for __attribute__
+dnl
+
+AC_DEFUN(AC_C___ATTRIBUTE__, [
+AC_MSG_CHECKING(for __attribute__)
+AC_CACHE_VAL(ac_cv___attribute__, [
+AC_COMPILE_IFELSE(
+  AC_LANG_SOURCE([[
+#include <stdlib.h>
+
+static void foo(void) __attribute__ ((noreturn));
+
+static void
+foo(void)
+{
+  exit(1);
+}
+
+int
+main(int argc, char **argv)
+{
+  foo();
+}
+  ]]),
+ac_cv___attribute__=yes,
+ac_cv___attribute__=no)])
+if test "$ac_cv___attribute__" = "yes"; then
+  AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
+  V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
+else
+  V_DEFS="$V_DEFS -D_U_=\"\""
+fi
+AC_MSG_RESULT($ac_cv___attribute__)
+])
diff --git a/addrtoname.c b/addrtoname.c
new file mode 100644 (file)
index 0000000..53d615f
--- /dev/null
@@ -0,0 +1,1178 @@
+/*
+ * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code distributions
+ * retain the above copyright notice and this paragraph in its entirety, (2)
+ * distributions including binary code include the above copyright notice and
+ * this paragraph in its entirety in the documentation or other materials
+ * provided with the distribution, and (3) all advertising materials mentioning
+ * features or use of this software display the following acknowledgement:
+ * ``This product includes software developed by the University of California,
+ * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+ * the University nor the names of its contributors may be used to endorse
+ * or promote products derived from this software without specific prior
+ * written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ *  Internet, ethernet, port, and protocol string to address
+ *  and address to string conversion routines
+ */
+#ifndef lint
+static const char rcsid[] _U_ =
+    "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.108.2.9 2007/09/14 00:26:18 guy Exp $ (LBL)";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.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 /* HAVE_NETINET_IF_ETHER_H */
+#ifdef NETINET_ETHER_H_DECLARES_ETHER_NTOHOST
+#include <netinet/ether.h>
+#endif /* NETINET_ETHER_H_DECLARES_ETHER_NTOHOST */
+
+#if !defined(HAVE_DECL_ETHER_NTOHOST) || !HAVE_DECL_ETHER_NTOHOST
+#ifndef HAVE_STRUCT_ETHER_ADDR
+struct ether_addr {
+       unsigned char ether_addr_octet[6];
+};
+#endif
+extern int ether_ntohost(char *, const struct ether_addr *);
+#endif
+
+#endif /* USE_ETHER_NTOHOST */
+
+#include <pcap.h>
+#include <pcap-namedb.h>
+#include <signal.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include "interface.h"
+#include "addrtoname.h"
+#include "llc.h"
+#include "setsignal.h"
+#include "extract.h"
+#include "oui.h"
+
+#ifndef ETHER_ADDR_LEN
+#define ETHER_ADDR_LEN 6
+#endif
+
+/*
+ * hash tables for whatever-to-name translations
+ *
+ * XXX there has to be error checks against strdup(3) failure
+ */
+
+#define HASHNAMESIZE 4096
+#define BUFSIZE 128
+
+struct hnamemem {
+       u_int32_t addr;
+       const char *name;
+       struct hnamemem *nxt;
+};
+
+struct hnamemem hnametable[HASHNAMESIZE];
+struct hnamemem tporttable[HASHNAMESIZE];
+struct hnamemem uporttable[HASHNAMESIZE];
+struct hnamemem eprototable[HASHNAMESIZE];
+struct hnamemem dnaddrtable[HASHNAMESIZE];
+struct hnamemem ipxsaptable[HASHNAMESIZE];
+
+#if defined(INET6) && defined(WIN32)
+/*
+ * fake gethostbyaddr for Win2k/XP
+ * gethostbyaddr() returns incorrect value when AF_INET6 is passed
+ * to 3rd argument.
+ *
+ * h_name in struct hostent is only valid.
+ */
+static struct hostent *
+win32_gethostbyaddr(const char *addr, int len, int type)
+{
+       static struct hostent host;
+       static char hostbuf[NI_MAXHOST];
+       char hname[NI_MAXHOST];
+       struct sockaddr_in6 addr6;
+
+       host.h_name = hostbuf;
+       switch (type) {
+       case AF_INET:
+               return gethostbyaddr(addr, len, type);
+               break;
+       case AF_INET6:
+               memset(&addr6, 0, sizeof(addr6));
+               addr6.sin6_family = AF_INET6;
+               memcpy(&addr6.sin6_addr, addr, len);
+               if (getnameinfo((struct sockaddr *)&addr6, sizeof(addr6),
+                   hname, sizeof(hname), NULL, 0, 0)) {
+                       return NULL;
+               } else {
+                       strcpy(host.h_name, hname);
+                       return &host;
+               }
+               break;
+       default:
+               return NULL;
+       }
+}
+#define gethostbyaddr win32_gethostbyaddr
+#endif /* INET6 & WIN32 */
+
+#ifdef INET6
+struct h6namemem {
+       struct in6_addr addr;
+       char *name;
+       struct h6namemem *nxt;
+};
+
+struct h6namemem h6nametable[HASHNAMESIZE];
+#endif /* INET6 */
+
+struct enamemem {
+       u_short e_addr0;
+       u_short e_addr1;
+       u_short e_addr2;
+       const char *e_name;
+       u_char *e_nsap;                 /* used only for nsaptable[] */
+#define e_bs e_nsap                    /* for bytestringtable */
+       struct enamemem *e_nxt;
+};
+
+struct enamemem enametable[HASHNAMESIZE];
+struct enamemem nsaptable[HASHNAMESIZE];
+struct enamemem bytestringtable[HASHNAMESIZE];
+
+struct protoidmem {
+       u_int32_t p_oui;
+       u_short p_proto;
+       const char *p_name;
+       struct protoidmem *p_nxt;
+};
+
+struct protoidmem protoidtable[HASHNAMESIZE];
+
+/*
+ * A faster replacement for inet_ntoa().
+ */
+const char *
+intoa(u_int32_t addr)
+{
+       register char *cp;
+       register u_int byte;
+       register int n;
+       static char buf[sizeof(".xxx.xxx.xxx.xxx")];
+
+       NTOHL(addr);
+       cp = buf + sizeof(buf);
+       *--cp = '\0';
+
+       n = 4;
+       do {
+               byte = addr & 0xff;
+               *--cp = byte % 10 + '0';
+               byte /= 10;
+               if (byte > 0) {
+                       *--cp = byte % 10 + '0';
+                       byte /= 10;
+                       if (byte > 0)
+                               *--cp = byte + '0';
+               }
+               *--cp = '.';
+               addr >>= 8;
+       } while (--n > 0);
+
+       return cp + 1;
+}
+
+static u_int32_t f_netmask;
+static u_int32_t f_localnet;
+
+/*
+ * Return a name for the IP address pointed to by ap.  This address
+ * is assumed to be in network byte order.
+ *
+ * NOTE: ap is *NOT* necessarily part of the packet data (not even if
+ * this is being called with the "ipaddr_string()" macro), so you
+ * *CANNOT* use the TCHECK{2}/TTEST{2} macros on it.  Furthermore,
+ * even in cases where it *is* part of the packet data, the caller
+ * would still have to check for a null return value, even if it's
+ * just printing the return value with "%s" - not all versions of
+ * printf print "(null)" with "%s" and a null pointer, some of them
+ * don't check for a null pointer and crash in that case.
+ *
+ * The callers of this routine should, before handing this routine
+ * a pointer to packet data, be sure that the data is present in
+ * the packet buffer.  They should probably do those checks anyway,
+ * as other data at that layer might not be IP addresses, and it
+ * also needs to check whether they're present in the packet buffer.
+ */
+const char *
+getname(const u_char *ap)
+{
+       register struct hostent *hp;
+       u_int32_t addr;
+       static struct hnamemem *p;              /* static for longjmp() */
+
+       memcpy(&addr, ap, sizeof(addr));
+       p = &hnametable[addr & (HASHNAMESIZE-1)];
+       for (; p->nxt; p = p->nxt) {
+               if (p->addr == addr)
+                       return (p->name);
+       }
+       p->addr = addr;
+       p->nxt = newhnamemem();
+
+       /*
+        * Print names unless:
+        *      (1) -n was given.
+        *      (2) Address is foreign and -f was given. (If -f was not
+        *          given, f_netmask and f_localnet are 0 and the test
+        *          evaluates to true)
+        */
+       if (!nflag &&
+           (addr & f_netmask) == f_localnet) {
+               hp = gethostbyaddr((char *)&addr, 4, AF_INET);
+               if (hp) {
+                       char *dotp;
+
+                       p->name = strdup(hp->h_name);
+                       if (Nflag) {
+                               /* Remove domain qualifications */
+                               dotp = strchr(p->name, '.');
+                               if (dotp)
+                                       *dotp = '\0';
+                       }
+                       return (p->name);
+               }
+       }
+       p->name = strdup(intoa(addr));
+       return (p->name);
+}
+
+#ifdef INET6
+/*
+ * Return a name for the IP6 address pointed to by ap.  This address
+ * is assumed to be in network byte order.
+ */
+const char *
+getname6(const u_char *ap)
+{
+       register struct hostent *hp;
+       struct in6_addr addr;
+       static struct h6namemem *p;             /* static for longjmp() */
+       register const char *cp;
+       char ntop_buf[INET6_ADDRSTRLEN];
+
+       memcpy(&addr, ap, sizeof(addr));
+       p = &h6nametable[*(u_int16_t *)&addr.s6_addr[14] & (HASHNAMESIZE-1)];
+       for (; p->nxt; p = p->nxt) {
+               if (memcmp(&p->addr, &addr, sizeof(addr)) == 0)
+                       return (p->name);
+       }
+       p->addr = addr;
+       p->nxt = newh6namemem();
+
+       /*
+        * Do not print names if -n was given.
+        */
+       if (!nflag) {
+               hp = gethostbyaddr((char *)&addr, sizeof(addr), AF_INET6);
+               if (hp) {
+                       char *dotp;
+
+                       p->name = strdup(hp->h_name);
+                       if (Nflag) {
+                               /* Remove domain qualifications */
+                               dotp = strchr(p->name, '.');
+                               if (dotp)
+                                       *dotp = '\0';
+                       }
+                       return (p->name);
+               }
+       }
+       cp = inet_ntop(AF_INET6, &addr, ntop_buf, sizeof(ntop_buf));
+       p->name = strdup(cp);
+       return (p->name);
+}
+#endif /* INET6 */
+
+static char hex[] = "0123456789abcdef";
+
+
+/* Find the hash node that corresponds the ether address 'ep' */
+
+static inline struct enamemem *
+lookup_emem(const u_char *ep)
+{
+       register u_int i, j, k;
+       struct enamemem *tp;
+
+       k = (ep[0] << 8) | ep[1];
+       j = (ep[2] << 8) | ep[3];
+       i = (ep[4] << 8) | ep[5];
+
+       tp = &enametable[(i ^ j) & (HASHNAMESIZE-1)];
+       while (tp->e_nxt)
+               if (tp->e_addr0 == i &&
+                   tp->e_addr1 == j &&
+                   tp->e_addr2 == k)
+                       return tp;
+               else
+                       tp = tp->e_nxt;
+       tp->e_addr0 = i;
+       tp->e_addr1 = j;
+       tp->e_addr2 = k;
+       tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp));
+       if (tp->e_nxt == NULL)
+               error("lookup_emem: calloc");
+
+       return tp;
+}
+
+/*
+ * Find the hash node that corresponds to the bytestring 'bs'
+ * with length 'nlen'
+ */
+
+static inline struct enamemem *
+lookup_bytestring(register const u_char *bs, const unsigned int nlen)
+{
+       struct enamemem *tp;
+       register u_int i, j, k;
+
+       if (nlen >= 6) {
+               k = (bs[0] << 8) | bs[1];
+               j = (bs[2] << 8) | bs[3];
+               i = (bs[4] << 8) | bs[5];
+       } else if (nlen >= 4) {
+               k = (bs[0] << 8) | bs[1];
+               j = (bs[2] << 8) | bs[3];
+               i = 0;
+       } else
+               i = j = k = 0;
+
+       tp = &bytestringtable[(i ^ j) & (HASHNAMESIZE-1)];
+       while (tp->e_nxt)
+               if (tp->e_addr0 == i &&
+                   tp->e_addr1 == j &&
+                   tp->e_addr2 == k &&
+                   memcmp((const char *)bs, (const char *)(tp->e_bs), nlen) == 0)
+                       return tp;
+               else
+                       tp = tp->e_nxt;
+
+       tp->e_addr0 = i;
+       tp->e_addr1 = j;
+       tp->e_addr2 = k;
+
+       tp->e_bs = (u_char *) calloc(1, nlen + 1);
+       memcpy(tp->e_bs, bs, nlen);
+       tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp));
+       if (tp->e_nxt == NULL)
+               error("lookup_bytestring: calloc");
+
+       return tp;
+}
+
+/* Find the hash node that corresponds the NSAP 'nsap' */
+
+static inline struct enamemem *
+lookup_nsap(register const u_char *nsap)
+{
+       register u_int i, j, k;
+       unsigned int nlen = *nsap;
+       struct enamemem *tp;
+       const u_char *ensap = nsap + nlen - 6;
+
+       if (nlen > 6) {
+               k = (ensap[0] << 8) | ensap[1];
+               j = (ensap[2] << 8) | ensap[3];
+               i = (ensap[4] << 8) | ensap[5];
+       }
+       else
+               i = j = k = 0;
+
+       tp = &nsaptable[(i ^ j) & (HASHNAMESIZE-1)];
+       while (tp->e_nxt)
+               if (tp->e_addr0 == i &&
+                   tp->e_addr1 == j &&
+                   tp->e_addr2 == k &&
+                   tp->e_nsap[0] == nlen &&
+                   memcmp((const char *)&(nsap[1]),
+                       (char *)&(tp->e_nsap[1]), nlen) == 0)
+                       return tp;
+               else
+                       tp = tp->e_nxt;
+       tp->e_addr0 = i;
+       tp->e_addr1 = j;
+       tp->e_addr2 = k;
+       tp->e_nsap = (u_char *)malloc(nlen + 1);
+       if (tp->e_nsap == NULL)
+               error("lookup_nsap: malloc");
+       memcpy((char *)tp->e_nsap, (const char *)nsap, nlen + 1);
+       tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp));
+       if (tp->e_nxt == NULL)
+               error("lookup_nsap: calloc");
+
+       return tp;
+}
+
+/* Find the hash node that corresponds the protoid 'pi'. */
+
+static inline struct protoidmem *
+lookup_protoid(const u_char *pi)
+{
+       register u_int i, j;
+       struct protoidmem *tp;
+
+       /* 5 octets won't be aligned */
+       i = (((pi[0] << 8) + pi[1]) << 8) + pi[2];
+       j =   (pi[3] << 8) + pi[4];
+       /* XXX should be endian-insensitive, but do big-endian testing  XXX */
+
+       tp = &protoidtable[(i ^ j) & (HASHNAMESIZE-1)];
+       while (tp->p_nxt)
+               if (tp->p_oui == i && tp->p_proto == j)
+                       return tp;
+               else
+                       tp = tp->p_nxt;
+       tp->p_oui = i;
+       tp->p_proto = j;
+       tp->p_nxt = (struct protoidmem *)calloc(1, sizeof(*tp));
+       if (tp->p_nxt == NULL)
+               error("lookup_protoid: calloc");
+
+       return tp;
+}
+
+const char *
+etheraddr_string(register const u_char *ep)
+{
+       register int i;
+       register char *cp;
+       register struct enamemem *tp;
+       int oui;
+       char buf[BUFSIZE];
+
+       tp = lookup_emem(ep);
+       if (tp->e_name)
+               return (tp->e_name);
+#ifdef USE_ETHER_NTOHOST
+       if (!nflag) {
+               char buf2[BUFSIZE];
+
+               /*
+                * We don't cast it to "const struct ether_addr *"
+                * because some systems fail to declare the second
+                * argument as a "const" pointer, even though they
+                * don't modify what it points to.
+                */
+               if (ether_ntohost(buf2, (struct ether_addr *)ep) == 0) {
+                       tp->e_name = strdup(buf2);
+                       return (tp->e_name);
+               }
+       }
+#endif
+       cp = buf;
+       oui = EXTRACT_24BITS(ep);
+       *cp++ = hex[*ep >> 4 ];
+       *cp++ = hex[*ep++ & 0xf];
+       for (i = 5; --i >= 0;) {
+               *cp++ = ':';
+               *cp++ = hex[*ep >> 4 ];
+               *cp++ = hex[*ep++ & 0xf];
+       }
+
+       if (!nflag) {
+               snprintf(cp, BUFSIZE - (2 + 5*3), " (oui %s)",
+                   tok2str(oui_values, "Unknown", oui));
+       } else
+               *cp = '\0';
+       tp->e_name = strdup(buf);
+       return (tp->e_name);
+}
+
+const char *
+linkaddr_string(const u_char *ep, const unsigned int len)
+{
+       register u_int i;
+       register char *cp;
+       register struct enamemem *tp;
+
+       if (len == ETHER_ADDR_LEN)      /* XXX not totally correct... */
+               return etheraddr_string(ep);
+
+       tp = lookup_bytestring(ep, len);
+       if (tp->e_name)
+               return (tp->e_name);
+
+       tp->e_name = cp = (char *)malloc(len*3);
+       if (tp->e_name == NULL)
+               error("linkaddr_string: malloc");
+       *cp++ = hex[*ep >> 4];
+       *cp++ = hex[*ep++ & 0xf];
+       for (i = len-1; i > 0 ; --i) {
+               *cp++ = ':';
+               *cp++ = hex[*ep >> 4];
+               *cp++ = hex[*ep++ & 0xf];
+       }
+       *cp = '\0';
+       return (tp->e_name);
+}
+
+const char *
+etherproto_string(u_short port)
+{
+       register char *cp;
+       register struct hnamemem *tp;
+       register u_int32_t i = port;
+       char buf[sizeof("0000")];
+
+       for (tp = &eprototable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
+               if (tp->addr == i)
+                       return (tp->name);
+
+       tp->addr = i;
+       tp->nxt = newhnamemem();
+
+       cp = buf;
+       NTOHS(port);
+       *cp++ = hex[port >> 12 & 0xf];
+       *cp++ = hex[port >> 8 & 0xf];
+       *cp++ = hex[port >> 4 & 0xf];
+       *cp++ = hex[port & 0xf];
+       *cp++ = '\0';
+       tp->name = strdup(buf);
+       return (tp->name);
+}
+
+const char *
+protoid_string(register const u_char *pi)
+{
+       register u_int i, j;
+       register char *cp;
+       register struct protoidmem *tp;
+       char buf[sizeof("00:00:00:00:00")];
+
+       tp = lookup_protoid(pi);
+       if (tp->p_name)
+               return tp->p_name;
+
+       cp = buf;
+       if ((j = *pi >> 4) != 0)
+               *cp++ = hex[j];
+       *cp++ = hex[*pi++ & 0xf];
+       for (i = 4; (int)--i >= 0;) {
+               *cp++ = ':';
+               if ((j = *pi >> 4) != 0)
+                       *cp++ = hex[j];
+               *cp++ = hex[*pi++ & 0xf];
+       }
+       *cp = '\0';
+       tp->p_name = strdup(buf);
+       return (tp->p_name);
+}
+
+#define ISONSAP_MAX_LENGTH 20
+const char *
+isonsap_string(const u_char *nsap, register u_int nsap_length)
+{
+       register u_int nsap_idx;
+       register char *cp;
+       register struct enamemem *tp;
+
+       if (nsap_length < 1 || nsap_length > ISONSAP_MAX_LENGTH)
+               return ("isonsap_string: illegal length");
+
+       tp = lookup_nsap(nsap);
+       if (tp->e_name)
+               return tp->e_name;
+
+       tp->e_name = cp = (char *)malloc(sizeof("xx.xxxx.xxxx.xxxx.xxxx.xxxx.xxxx.xxxx.xxxx.xxxx.xx"));
+       if (cp == NULL)
+               error("isonsap_string: malloc");
+
+       for (nsap_idx = 0; nsap_idx < nsap_length; nsap_idx++) {
+               *cp++ = hex[*nsap >> 4];
+               *cp++ = hex[*nsap++ & 0xf];
+               if (((nsap_idx & 1) == 0) &&
+                    (nsap_idx + 1 < nsap_length)) {
+                       *cp++ = '.';
+               }
+       }
+       *cp = '\0';
+       return (tp->e_name);
+}
+
+const char *
+tcpport_string(u_short port)
+{
+       register struct hnamemem *tp;
+       register u_int32_t i = port;
+       char buf[sizeof("00000")];
+
+       for (tp = &tporttable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
+               if (tp->addr == i)
+                       return (tp->name);
+
+       tp->addr = i;
+       tp->nxt = newhnamemem();
+
+       (void)snprintf(buf, sizeof(buf), "%u", i);
+       tp->name = strdup(buf);
+       return (tp->name);
+}
+
+const char *
+udpport_string(register u_short port)
+{
+       register struct hnamemem *tp;
+       register u_int32_t i = port;
+       char buf[sizeof("00000")];
+
+       for (tp = &uporttable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
+               if (tp->addr == i)
+                       return (tp->name);
+
+       tp->addr = i;
+       tp->nxt = newhnamemem();
+
+       (void)snprintf(buf, sizeof(buf), "%u", i);
+       tp->name = strdup(buf);
+       return (tp->name);
+}
+
+const char *
+ipxsap_string(u_short port)
+{
+       register char *cp;
+       register struct hnamemem *tp;
+       register u_int32_t i = port;
+       char buf[sizeof("0000")];
+
+       for (tp = &ipxsaptable[i & (HASHNAMESIZE-1)]; tp->nxt; tp = tp->nxt)
+               if (tp->addr == i)
+                       return (tp->name);
+
+       tp->addr = i;
+       tp->nxt = newhnamemem();
+
+       cp = buf;
+       NTOHS(port);
+       *cp++ = hex[port >> 12 & 0xf];
+       *cp++ = hex[port >> 8 & 0xf];
+       *cp++ = hex[port >> 4 & 0xf];
+       *cp++ = hex[port & 0xf];
+       *cp++ = '\0';
+       tp->name = strdup(buf);
+       return (tp->name);
+}
+
+static void
+init_servarray(void)
+{
+       struct servent *sv;
+       register struct hnamemem *table;
+       register int i;
+       char buf[sizeof("0000000000")];
+
+       while ((sv = getservent()) != NULL) {
+               int port = ntohs(sv->s_port);
+               i = port & (HASHNAMESIZE-1);
+               if (strcmp(sv->s_proto, "tcp") == 0)
+                       table = &tporttable[i];
+               else if (strcmp(sv->s_proto, "udp") == 0)
+                       table = &uporttable[i];
+               else
+                       continue;
+
+               while (table->name)
+                       table = table->nxt;
+               if (nflag) {
+                       (void)snprintf(buf, sizeof(buf), "%d", port);
+                       table->name = strdup(buf);
+               } else
+                       table->name = strdup(sv->s_name);
+               table->addr = port;
+               table->nxt = newhnamemem();
+       }
+       endservent();
+}
+
+/* in libpcap.a (nametoaddr.c) */
+#if defined(WIN32) && !defined(USE_STATIC_LIBPCAP)
+__declspec(dllimport)
+#else
+extern
+#endif
+const struct eproto {
+       const char *s;
+       u_short p;
+} eproto_db[];
+
+static void
+init_eprotoarray(void)
+{
+       register int i;
+       register struct hnamemem *table;
+
+       for (i = 0; eproto_db[i].s; i++) {
+               int j = htons(eproto_db[i].p) & (HASHNAMESIZE-1);
+               table = &eprototable[j];
+               while (table->name)
+                       table = table->nxt;
+               table->name = eproto_db[i].s;
+               table->addr = htons(eproto_db[i].p);
+               table->nxt = newhnamemem();
+       }
+}
+
+static struct protoidlist {
+       const u_char protoid[5];
+       const char *name;
+} protoidlist[] = {
+       {{ 0x00, 0x00, 0x0c, 0x01, 0x07 }, "CiscoMLS" },
+       {{ 0x00, 0x00, 0x0c, 0x20, 0x00 }, "CiscoCDP" },
+       {{ 0x00, 0x00, 0x0c, 0x20, 0x01 }, "CiscoCGMP" },
+       {{ 0x00, 0x00, 0x0c, 0x20, 0x03 }, "CiscoVTP" },
+       {{ 0x00, 0xe0, 0x2b, 0x00, 0xbb }, "ExtremeEDP" },
+       {{ 0x00, 0x00, 0x00, 0x00, 0x00 }, NULL }
+};
+
+/*
+ * SNAP proto IDs with org code 0:0:0 are actually encapsulated Ethernet
+ * types.
+ */
+static void
+init_protoidarray(void)
+{
+       register int i;
+       register struct protoidmem *tp;
+       struct protoidlist *pl;
+       u_char protoid[5];
+
+       protoid[0] = 0;
+       protoid[1] = 0;
+       protoid[2] = 0;
+       for (i = 0; eproto_db[i].s; i++) {
+               u_short etype = htons(eproto_db[i].p);
+
+               memcpy((char *)&protoid[3], (char *)&etype, 2);
+               tp = lookup_protoid(protoid);
+               tp->p_name = strdup(eproto_db[i].s);
+       }
+       /* Hardwire some SNAP proto ID names */
+       for (pl = protoidlist; pl->name != NULL; ++pl) {
+               tp = lookup_protoid(pl->protoid);
+               /* Don't override existing name */
+               if (tp->p_name != NULL)
+                       continue;
+
+               tp->p_name = pl->name;
+       }
+}
+
+static struct etherlist {
+       const u_char addr[6];
+       const char *name;
+} etherlist[] = {
+       {{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, "Broadcast" },
+       {{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, NULL }
+};
+
+/*
+ * Initialize the ethers hash table.  We take two different approaches
+ * depending on whether or not the system provides the ethers name
+ * service.  If it does, we just wire in a few names at startup,
+ * and etheraddr_string() fills in the table on demand.  If it doesn't,
+ * then we suck in the entire /etc/ethers file at startup.  The idea
+ * is that parsing the local file will be fast, but spinning through
+ * all the ethers entries via NIS & next_etherent might be very slow.
+ *
+ * XXX pcap_next_etherent doesn't belong in the pcap interface, but
+ * since the pcap module already does name-to-address translation,
+ * it's already does most of the work for the ethernet address-to-name
+ * translation, so we just pcap_next_etherent as a convenience.
+ */
+static void
+init_etherarray(void)
+{
+       register struct etherlist *el;
+       register struct enamemem *tp;
+#ifdef USE_ETHER_NTOHOST
+       char name[256];
+#else
+       register struct pcap_etherent *ep;
+       register FILE *fp;
+
+       /* Suck in entire ethers file */
+       fp = fopen(PCAP_ETHERS_FILE, "r");
+       if (fp != NULL) {
+               while ((ep = pcap_next_etherent(fp)) != NULL) {
+                       tp = lookup_emem(ep->addr);
+                       tp->e_name = strdup(ep->name);
+               }
+               (void)fclose(fp);
+       }
+#endif
+
+       /* Hardwire some ethernet names */
+       for (el = etherlist; el->name != NULL; ++el) {
+               tp = lookup_emem(el->addr);
+               /* Don't override existing name */
+               if (tp->e_name != NULL)
+                       continue;
+
+#ifdef USE_ETHER_NTOHOST
+               /*
+                * Use YP/NIS version of name if available.
+                *
+                * We don't cast it to "const struct ether_addr *"
+                * because some systems don't modify the Ethernet
+                * address but fail to declare the second argument
+                * as a "const" pointer.
+                */
+               if (ether_ntohost(name, (struct ether_addr *)el->addr) == 0) {
+                       tp->e_name = strdup(name);
+                       continue;
+               }
+#endif
+               tp->e_name = el->name;
+       }
+}
+
+static struct tok ipxsap_db[] = {
+       { 0x0000, "Unknown" },
+       { 0x0001, "User" },
+       { 0x0002, "User Group" },
+       { 0x0003, "PrintQueue" },
+       { 0x0004, "FileServer" },
+       { 0x0005, "JobServer" },
+       { 0x0006, "Gateway" },
+       { 0x0007, "PrintServer" },
+       { 0x0008, "ArchiveQueue" },
+       { 0x0009, "ArchiveServer" },
+       { 0x000a, "JobQueue" },
+       { 0x000b, "Administration" },
+       { 0x000F, "Novell TI-RPC" },
+       { 0x0017, "Diagnostics" },
+       { 0x0020, "NetBIOS" },
+       { 0x0021, "NAS SNA Gateway" },
+       { 0x0023, "NACS AsyncGateway" },
+       { 0x0024, "RemoteBridge/RoutingService" },
+       { 0x0026, "BridgeServer" },
+       { 0x0027, "TCP/IP Gateway" },
+       { 0x0028, "Point-to-point X.25 BridgeServer" },
+       { 0x0029, "3270 Gateway" },
+       { 0x002a, "CHI Corp" },
+       { 0x002c, "PC Chalkboard" },
+       { 0x002d, "TimeSynchServer" },
+       { 0x002e, "ARCserve5.0/PalindromeBackup" },
+       { 0x0045, "DI3270 Gateway" },
+       { 0x0047, "AdvertisingPrintServer" },
+       { 0x004a, "NetBlazerModems" },
+       { 0x004b, "BtrieveVAP" },
+       { 0x004c, "NetwareSQL" },
+       { 0x004d, "XtreeNetwork" },
+       { 0x0050, "BtrieveVAP4.11" },
+       { 0x0052, "QuickLink" },
+       { 0x0053, "PrintQueueUser" },
+       { 0x0058, "Multipoint X.25 Router" },
+       { 0x0060, "STLB/NLM" },
+       { 0x0064, "ARCserve" },
+       { 0x0066, "ARCserve3.0" },
+       { 0x0072, "WAN CopyUtility" },
+       { 0x007a, "TES-NetwareVMS" },
+       { 0x0092, "WATCOM Debugger/EmeraldTapeBackupServer" },
+       { 0x0095, "DDA OBGYN" },
+       { 0x0098, "NetwareAccessServer" },
+       { 0x009a, "Netware for VMS II/NamedPipeServer" },
+       { 0x009b, "NetwareAccessServer" },
+       { 0x009e, "PortableNetwareServer/SunLinkNVT" },
+       { 0x00a1, "PowerchuteAPC UPS" },
+       { 0x00aa, "LAWserve" },
+       { 0x00ac, "CompaqIDA StatusMonitor" },
+       { 0x0100, "PIPE STAIL" },
+       { 0x0102, "LAN ProtectBindery" },
+       { 0x0103, "OracleDataBaseServer" },
+       { 0x0107, "Netware386/RSPX RemoteConsole" },
+       { 0x010f, "NovellSNA Gateway" },
+       { 0x0111, "TestServer" },
+       { 0x0112, "HP PrintServer" },
+       { 0x0114, "CSA MUX" },
+       { 0x0115, "CSA LCA" },
+       { 0x0116, "CSA CM" },
+       { 0x0117, "CSA SMA" },
+       { 0x0118, "CSA DBA" },
+       { 0x0119, "CSA NMA" },
+       { 0x011a, "CSA SSA" },
+       { 0x011b, "CSA STATUS" },
+       { 0x011e, "CSA APPC" },
+       { 0x0126, "SNA TEST SSA Profile" },
+       { 0x012a, "CSA TRACE" },
+       { 0x012b, "NetwareSAA" },
+       { 0x012e, "IKARUS VirusScan" },
+       { 0x0130, "CommunicationsExecutive" },
+       { 0x0133, "NNS DomainServer/NetwareNamingServicesDomain" },
+       { 0x0135, "NetwareNamingServicesProfile" },
+       { 0x0137, "Netware386 PrintQueue/NNS PrintQueue" },
+       { 0x0141, "LAN SpoolServer" },
+       { 0x0152, "IRMALAN Gateway" },
+       { 0x0154, "NamedPipeServer" },
+       { 0x0166, "NetWareManagement" },
+       { 0x0168, "Intel PICKIT CommServer/Intel CAS TalkServer" },
+       { 0x0173, "Compaq" },
+       { 0x0174, "Compaq SNMP Agent" },
+       { 0x0175, "Compaq" },
+       { 0x0180, "XTreeServer/XTreeTools" },
+       { 0x018A, "NASI ServicesBroadcastServer" },
+       { 0x01b0, "GARP Gateway" },
+       { 0x01b1, "Binfview" },
+       { 0x01bf, "IntelLanDeskManager" },
+       { 0x01ca, "AXTEC" },
+       { 0x01cb, "ShivaNetModem/E" },
+       { 0x01cc, "ShivaLanRover/E" },
+       { 0x01cd, "ShivaLanRover/T" },
+       { 0x01ce, "ShivaUniversal" },
+       { 0x01d8, "CastelleFAXPressServer" },
+       { 0x01da, "CastelleLANPressPrintServer" },
+       { 0x01dc, "CastelleFAX/Xerox7033 FaxServer/ExcelLanFax" },
+       { 0x01f0, "LEGATO" },
+       { 0x01f5, "LEGATO" },
+       { 0x0233, "NMS Agent/NetwareManagementAgent" },
+       { 0x0237, "NMS IPX Discovery/LANternReadWriteChannel" },
+       { 0x0238, "NMS IP Discovery/LANternTrapAlarmChannel" },
+       { 0x023a, "LANtern" },
+       { 0x023c, "MAVERICK" },
+       { 0x023f, "NovellSMDR" },
+       { 0x024e, "NetwareConnect" },
+       { 0x024f, "NASI ServerBroadcast Cisco" },
+       { 0x026a, "NMS ServiceConsole" },
+       { 0x026b, "TimeSynchronizationServer Netware 4.x" },
+       { 0x0278, "DirectoryServer Netware 4.x" },
+       { 0x027b, "NetwareManagementAgent" },
+       { 0x0280, "Novell File and Printer Sharing Service for PC" },
+       { 0x0304, "NovellSAA Gateway" },
+       { 0x0308, "COM/VERMED" },
+       { 0x030a, "GalacticommWorldgroupServer" },
+       { 0x030c, "IntelNetport2/HP JetDirect/HP Quicksilver" },
+       { 0x0320, "AttachmateGateway" },
+       { 0x0327, "MicrosoftDiagnostiocs" },
+       { 0x0328, "WATCOM SQL Server" },
+       { 0x0335, "MultiTechSystems MultisynchCommServer" },
+       { 0x0343, "Xylogics RemoteAccessServer/LANModem" },
+       { 0x0355, "ArcadaBackupExec" },
+       { 0x0358, "MSLCD1" },
+       { 0x0361, "NETINELO" },
+       { 0x037e, "Powerchute UPS Monitoring" },
+       { 0x037f, "ViruSafeNotify" },
+       { 0x0386, "HP Bridge" },
+       { 0x0387, "HP Hub" },
+       { 0x0394, "NetWare SAA Gateway" },
+       { 0x039b, "LotusNotes" },
+       { 0x03b7, "CertusAntiVirus" },
+       { 0x03c4, "ARCserve4.0" },
+       { 0x03c7, "LANspool3.5" },
+       { 0x03d7, "LexmarkPrinterServer" },
+       { 0x03d8, "LexmarkXLE PrinterServer" },
+       { 0x03dd, "BanyanENS NetwareClient" },
+       { 0x03de, "GuptaSequelBaseServer/NetWareSQL" },
+       { 0x03e1, "UnivelUnixware" },
+       { 0x03e4, "UnivelUnixware" },
+       { 0x03fc, "IntelNetport" },
+       { 0x03fd, "PrintServerQueue" },
+       { 0x040A, "ipnServer" },
+       { 0x040D, "LVERRMAN" },
+       { 0x040E, "LVLIC" },
+       { 0x0414, "NET Silicon (DPI)/Kyocera" },
+       { 0x0429, "SiteLockVirus" },
+       { 0x0432, "UFHELPR???" },
+       { 0x0433, "Synoptics281xAdvancedSNMPAgent" },
+       { 0x0444, "MicrosoftNT SNA Server" },
+       { 0x0448, "Oracle" },
+       { 0x044c, "ARCserve5.01" },
+       { 0x0457, "CanonGP55" },
+       { 0x045a, "QMS Printers" },
+       { 0x045b, "DellSCSI Array" },
+       { 0x0491, "NetBlazerModems" },
+       { 0x04ac, "OnTimeScheduler" },
+       { 0x04b0, "CD-Net" },
+       { 0x0513, "EmulexNQA" },
+       { 0x0520, "SiteLockChecks" },
+       { 0x0529, "SiteLockChecks" },
+       { 0x052d, "CitrixOS2 AppServer" },
+       { 0x0535, "Tektronix" },
+       { 0x0536, "Milan" },
+       { 0x055d, "Attachmate SNA gateway" },
+       { 0x056b, "IBM8235 ModemServer" },
+       { 0x056c, "ShivaLanRover/E PLUS" },
+       { 0x056d, "ShivaLanRover/T PLUS" },
+       { 0x0580, "McAfeeNetShield" },
+       { 0x05B8, "NLM to workstation communication (Revelation Software)" },
+       { 0x05BA, "CompatibleSystemsRouters" },
+       { 0x05BE, "CheyenneHierarchicalStorageManager" },
+       { 0x0606, "JCWatermarkImaging" },
+       { 0x060c, "AXISNetworkPrinter" },
+       { 0x0610, "AdaptecSCSIManagement" },
+       { 0x0621, "IBM AntiVirus" },
+       { 0x0640, "Windows95 RemoteRegistryService" },
+       { 0x064e, "MicrosoftIIS" },
+       { 0x067b, "Microsoft Win95/98 File and Print Sharing for NetWare" },
+       { 0x067c, "Microsoft Win95/98 File and Print Sharing for NetWare" },
+       { 0x076C, "Xerox" },
+       { 0x079b, "ShivaLanRover/E 115" },
+       { 0x079c, "ShivaLanRover/T 115" },
+       { 0x07B4, "CubixWorldDesk" },
+       { 0x07c2, "Quarterdeck IWare Connect V2.x NLM" },
+       { 0x07c1, "Quarterdeck IWare Connect V3.x NLM" },
+       { 0x0810, "ELAN License Server Demo" },
+       { 0x0824, "ShivaLanRoverAccessSwitch/E" },
+       { 0x086a, "ISSC Collector" },
+       { 0x087f, "ISSC DAS AgentAIX" },
+       { 0x0880, "Intel Netport PRO" },
+       { 0x0881, "Intel Netport PRO" },
+       { 0x0b29, "SiteLock" },
+       { 0x0c29, "SiteLockApplications" },
+       { 0x0c2c, "LicensingServer" },
+       { 0x2101, "PerformanceTechnologyInstantInternet" },
+       { 0x2380, "LAI SiteLock" },
+       { 0x238c, "MeetingMaker" },
+       { 0x4808, "SiteLockServer/SiteLockMetering" },
+       { 0x5555, "SiteLockUser" },
+       { 0x6312, "Tapeware" },
+       { 0x6f00, "RabbitGateway" },
+       { 0x7703, "MODEM" },
+       { 0x8002, "NetPortPrinters" },
+       { 0x8008, "WordPerfectNetworkVersion" },
+       { 0x85BE, "Cisco EIGRP" },
+       { 0x8888, "WordPerfectNetworkVersion/QuickNetworkManagement" },
+       { 0x9000, "McAfeeNetShield" },
+       { 0x9604, "CSA-NT_MON" },
+       { 0xb6a8, "OceanIsleReachoutRemoteControl" },
+       { 0xf11f, "SiteLockMetering" },
+       { 0xf1ff, "SiteLock" },
+       { 0xf503, "Microsoft SQL Server" },
+       { 0xF905, "IBM TimeAndPlace" },
+       { 0xfbfb, "TopCallIII FaxServer" },
+       { 0xffff, "AnyService/Wildcard" },
+       { 0, (char *)0 }
+};
+
+static void
+init_ipxsaparray(void)
+{
+       register int i;
+       register struct hnamemem *table;
+
+       for (i = 0; ipxsap_db[i].s != NULL; i++) {
+               int j = htons(ipxsap_db[i].v) & (HASHNAMESIZE-1);
+               table = &ipxsaptable[j];
+               while (table->name)
+                       table = table->nxt;
+               table->name = ipxsap_db[i].s;
+               table->addr = htons(ipxsap_db[i].v);
+               table->nxt = newhnamemem();
+       }
+}
+
+/*
+ * Initialize the address to name translation machinery.  We map all
+ * non-local IP addresses to numeric addresses if fflag is true (i.e.,
+ * to prevent blocking on the nameserver).  localnet is the IP address
+ * of the local network.  mask is its subnet mask.
+ */
+void
+init_addrtoname(u_int32_t localnet, u_int32_t mask)
+{
+       if (fflag) {
+               f_localnet = localnet;
+               f_netmask = mask;
+       }
+       if (nflag)
+               /*
+                * Simplest way to suppress names.
+                */
+               return;
+
+       init_etherarray();
+       init_servarray();
+       init_eprotoarray();
+       init_protoidarray();
+       init_ipxsaparray();
+}
+
+const char *
+dnaddr_string(u_short dnaddr)
+{
+       register struct hnamemem *tp;
+
+       for (tp = &dnaddrtable[dnaddr & (HASHNAMESIZE-1)]; tp->nxt != 0;
+            tp = tp->nxt)
+               if (tp->addr == dnaddr)
+                       return (tp->name);
+
+       tp->addr = dnaddr;
+       tp->nxt = newhnamemem();
+       if (nflag)
+               tp->name = dnnum_string(dnaddr);
+       else
+               tp->name = dnname_string(dnaddr);
+
+       return(tp->name);
+}
+
+/* Return a zero'ed hnamemem struct and cuts down on calloc() overhead */
+struct hnamemem *
+newhnamemem(void)
+{
+       register struct hnamemem *p;
+       static struct hnamemem *ptr = NULL;
+       static u_int num = 0;
+
+       if (num  <= 0) {
+               num = 64;
+               ptr = (struct hnamemem *)calloc(num, sizeof (*ptr));
+               if (ptr == NULL)
+                       error("newhnamemem: calloc");
+       }
+       --num;
+       p = ptr++;
+       return (p);
+}
+
+#ifdef INET6
+/* Return a zero'ed h6namemem struct and cuts down on calloc() overhead */
+struct h6namemem *
+newh6namemem(void)
+{
+       register struct h6namemem *p;
+       static struct h6namemem *ptr = NULL;
+       static u_int num = 0;
+
+       if (num  <= 0) {
+               num = 64;
+               ptr = (struct h6namemem *)calloc(num, sizeof (*ptr));
+               if (ptr == NULL)
+                       error("newh6namemem: calloc");
+       }
+       --num;
+       p = ptr++;
+       return (p);
+}
+#endif /* INET6 */
diff --git a/addrtoname.h b/addrtoname.h
new file mode 100644 (file)
index 0000000..67ded6e
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 1990, 1992, 1993, 1994, 1995, 1996, 1997
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code distributions
+ * retain the above copyright notice and this paragraph in its entirety, (2)
+ * distributions including binary code include the above copyright notice and
+ * this paragraph in its entirety in the documentation or other materials
+ * provided with the distribution, and (3) all advertising materials mentioning
+ * features or use of this software display the following acknowledgement:
+ * ``This product includes software developed by the University of California,
+ * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+ * the University nor the names of its contributors may be used to endorse
+ * or promote products derived from this software without specific prior
+ * written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @(#) $Header: /tcpdump/master/tcpdump/addrtoname.h,v 1.18 2001/09/17 21:57:51 fenner Exp $ (LBL)
+ */
+
+/* Name to address translation routines. */
+
+extern const char *linkaddr_string(const u_char *, const unsigned int);
+extern const char *etheraddr_string(const u_char *);
+extern const char *etherproto_string(u_short);
+extern const char *tcpport_string(u_short);
+extern const char *udpport_string(u_short);
+extern const char *getname(const u_char *);
+#ifdef INET6
+extern const char *getname6(const u_char *);
+#endif
+extern const char *intoa(u_int32_t);
+
+extern void init_addrtoname(u_int32_t, u_int32_t);
+extern struct hnamemem *newhnamemem(void);
+#ifdef INET6
+extern struct h6namemem *newh6namemem(void);
+#endif
+
+#define ipaddr_string(p) getname((const u_char *)(p))
+#ifdef INET6
+#define ip6addr_string(p) getname6((const u_char *)(p))
+#endif
diff --git a/af.c b/af.c
new file mode 100644 (file)
index 0000000..76d6178
--- /dev/null
+++ b/af.c
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 1998-2006 The TCPDUMP project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * Original code by Hannes Gredler (hannes@juniper.net)
+ */
+
+#ifndef lint
+static const char rcsid[] _U_ =
+    "@(#) $Header: /tcpdump/master/tcpdump/af.c,v 1.3.2.1 2007/02/26 13:33:17 hannes Exp $ (LBL)";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+#include "interface.h"
+#include "af.h"
+
+struct tok af_values[] = {
+    { 0,                      "Reserved"},
+    { AFNUM_INET,             "IPv4"},
+    { AFNUM_INET6,            "IPv6"},
+    { AFNUM_NSAP,             "NSAP"},
+    { AFNUM_HDLC,             "HDLC"},
+    { AFNUM_BBN1822,          "BBN 1822"},
+    { AFNUM_802,              "802"},
+    { AFNUM_E163,             "E.163"},
+    { AFNUM_E164,             "E.164"},
+    { AFNUM_F69,              "F.69"},
+    { AFNUM_X121,             "X.121"},
+    { AFNUM_IPX,              "Novell IPX"},
+    { AFNUM_ATALK,            "Appletalk"},
+    { AFNUM_DECNET,           "Decnet IV"},
+    { AFNUM_BANYAN,           "Banyan Vines"},
+    { AFNUM_E164NSAP,         "E.164 with NSAP subaddress"},
+    { AFNUM_L2VPN,            "Layer-2 VPN"},
+    { AFNUM_VPLS,             "VPLS"},
+    { 0, NULL},
+};
+
+struct tok bsd_af_values[] = {
+    { BSD_AFNUM_INET, "IPv4" },
+    { BSD_AFNUM_NS, "NS" },
+    { BSD_AFNUM_ISO, "ISO" },
+    { BSD_AFNUM_APPLETALK, "Appletalk" },
+    { BSD_AFNUM_IPX, "IPX" },
+    { BSD_AFNUM_INET6_BSD, "IPv6" },
+    { BSD_AFNUM_INET6_FREEBSD, "IPv6" },
+    { BSD_AFNUM_INET6_DARWIN, "IPv6" },
+    { 0, NULL}
+};
diff --git a/af.h b/af.h
new file mode 100644 (file)
index 0000000..1ba7662
--- /dev/null
+++ b/af.h
@@ -0,0 +1,57 @@
+/* @(#) $Header: /tcpdump/master/tcpdump/af.h,v 1.3.2.1 2007/02/26 13:33:17 hannes Exp $ (LBL) */
+
+/*
+ * Copyright (c) 1998-2006 The TCPDUMP project
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * Original code by Hannes Gredler (hannes@juniper.net)
+ */
+
+extern struct tok af_values[];
+extern struct tok bsd_af_values[];
+
+/* RFC1700 address family numbers */
+#define AFNUM_INET     1
+#define AFNUM_INET6    2
+#define AFNUM_NSAP     3
+#define AFNUM_HDLC     4
+#define AFNUM_BBN1822  5
+#define AFNUM_802      6
+#define AFNUM_E163     7
+#define AFNUM_E164     8
+#define AFNUM_F69      9
+#define AFNUM_X121     10
+#define AFNUM_IPX      11
+#define AFNUM_ATALK    12
+#define AFNUM_DECNET   13
+#define AFNUM_BANYAN   14
+#define AFNUM_E164NSAP 15
+#define AFNUM_VPLS      25
+/* draft-kompella-ppvpn-l2vpn */
+#define AFNUM_L2VPN     196 /* still to be approved by IANA */
+
+/*
+ * BSD AF_ values.
+ *
+ * Unfortunately, the BSDs don't all use the same value for AF_INET6,
+ * so, because we want to be able to read captures from all of the BSDs,
+ * we check for all of them.
+ */
+#define BSD_AFNUM_INET         2
+#define BSD_AFNUM_NS           6               /* XEROX NS protocols */
+#define BSD_AFNUM_ISO          7
+#define BSD_AFNUM_APPLETALK    16
+#define BSD_AFNUM_IPX          23
+#define BSD_AFNUM_INET6_BSD    24      /* OpenBSD (and probably NetBSD), BSD/OS */
+#define BSD_AFNUM_INET6_FREEBSD        28
+#define BSD_AFNUM_INET6_DARWIN 30
diff --git a/ah.h b/ah.h
new file mode 100644 (file)
index 0000000..c22806a
--- /dev/null
+++ b/ah.h
@@ -0,0 +1,57 @@
+/*     $NetBSD: ah.h,v 1.12 2000/07/23 05:23:04 itojun Exp $   */
+/*     $KAME: ah.h,v 1.12 2000/07/20 17:41:01 itojun Exp $     */
+
+/*
+ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the project nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * RFC1826/2402 authentication header.
+ */
+
+#ifndef _NETINET6_AH_H_
+#define _NETINET6_AH_H_
+
+struct ah {
+       u_int8_t        ah_nxt;         /* Next Header */
+       u_int8_t        ah_len;         /* Length of data, in 32bit */
+       u_int16_t       ah_reserve;     /* Reserved for future use */
+       u_int32_t       ah_spi;         /* Security parameter index */
+       /* variable size, 32bit bound*/ /* Authentication data */
+};
+
+struct newah {
+       u_int8_t        ah_nxt;         /* Next Header */
+       u_int8_t        ah_len;         /* Length of data + 1, in 32bit */
+       u_int16_t       ah_reserve;     /* Reserved for future use */
+       u_int32_t       ah_spi;         /* Security parameter index */
+       u_int32_t       ah_seq;         /* Sequence number field */
+       /* variable size, 32bit bound*/ /* Authentication data */
+};
+
+#endif /*_NETINET6_AH_H_*/
diff --git a/aodv.h b/aodv.h
new file mode 100644 (file)
index 0000000..335c175
--- /dev/null
+++ b/aodv.h
@@ -0,0 +1,190 @@
+/* @(#) $Header: /tcpdump/master/tcpdump/aodv.h,v 1.3 2003/09/13 01:34:42 guy Exp $ (LBL) */
+/*
+ * Copyright (c) 2003 Bruce M. Simpson <bms@spc.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *        This product includes software developed by Bruce M. Simpson.
+ * 4. Neither the name of Bruce M. Simpson nor the names of co-
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Bruce M. Simpson AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL Bruce M. Simpson OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+#ifndef _AODV_H_
+#define _AODV_H_
+
+struct aodv_rreq {
+       u_int8_t        rreq_type;      /* AODV message type (1) */
+       u_int8_t        rreq_flags;     /* various flags */
+       u_int8_t        rreq_zero0;     /* reserved, set to zero */
+       u_int8_t        rreq_hops;      /* number of hops from originator */
+       u_int32_t       rreq_id;        /* request ID */
+       u_int32_t       rreq_da;        /* destination IPv4 address */
+       u_int32_t       rreq_ds;        /* destination sequence number */
+       u_int32_t       rreq_oa;        /* originator IPv4 address */
+       u_int32_t       rreq_os;        /* originator sequence number */
+};
+#ifdef INET6
+struct aodv_rreq6 {
+       u_int8_t        rreq_type;      /* AODV message type (1) */
+       u_int8_t        rreq_flags;     /* various flags */
+       u_int8_t        rreq_zero0;     /* reserved, set to zero */
+       u_int8_t        rreq_hops;      /* number of hops from originator */
+       u_int32_t       rreq_id;        /* request ID */
+       struct in6_addr rreq_da;        /* destination IPv6 address */
+       u_int32_t       rreq_ds;        /* destination sequence number */
+       struct in6_addr rreq_oa;        /* originator IPv6 address */
+       u_int32_t       rreq_os;        /* originator sequence number */
+};
+struct aodv_rreq6_draft_01 {
+       u_int8_t        rreq_type;      /* AODV message type (16) */
+       u_int8_t        rreq_flags;     /* various flags */
+       u_int8_t        rreq_zero0;     /* reserved, set to zero */
+       u_int8_t        rreq_hops;      /* number of hops from originator */
+       u_int32_t       rreq_id;        /* request ID */
+       u_int32_t       rreq_ds;        /* destination sequence number */
+       u_int32_t       rreq_os;        /* originator sequence number */
+       struct in6_addr rreq_da;        /* destination IPv6 address */
+       struct in6_addr rreq_oa;        /* originator IPv6 address */
+};
+#endif
+
+#define        RREQ_JOIN       0x80            /* join (reserved for multicast */
+#define        RREQ_REPAIR     0x40            /* repair (reserved for multicast */
+#define        RREQ_GRAT       0x20            /* gratuitous RREP */
+#define        RREQ_DEST       0x10            /* destination only */
+#define        RREQ_UNKNOWN    0x08            /* unknown destination sequence num */
+#define        RREQ_FLAGS_MASK 0xF8            /* mask for rreq_flags */
+
+struct aodv_rrep {
+       u_int8_t        rrep_type;      /* AODV message type (2) */
+       u_int8_t        rrep_flags;     /* various flags */
+       u_int8_t        rrep_ps;        /* prefix size */
+       u_int8_t        rrep_hops;      /* number of hops from o to d */
+       u_int32_t       rrep_da;        /* destination IPv4 address */
+       u_int32_t       rrep_ds;        /* destination sequence number */
+       u_int32_t       rrep_oa;        /* originator IPv4 address */
+       u_int32_t       rrep_life;      /* lifetime of this route */
+};
+#ifdef INET6
+struct aodv_rrep6 {
+       u_int8_t        rrep_type;      /* AODV message type (2) */
+       u_int8_t        rrep_flags;     /* various flags */
+       u_int8_t        rrep_ps;        /* prefix size */
+       u_int8_t        rrep_hops;      /* number of hops from o to d */
+       struct in6_addr rrep_da;        /* destination IPv6 address */
+       u_int32_t       rrep_ds;        /* destination sequence number */
+       struct in6_addr rrep_oa;        /* originator IPv6 address */
+       u_int32_t       rrep_life;      /* lifetime of this route */
+};
+struct aodv_rrep6_draft_01 {
+       u_int8_t        rrep_type;      /* AODV message type (17) */
+       u_int8_t        rrep_flags;     /* various flags */
+       u_int8_t        rrep_ps;        /* prefix size */
+       u_int8_t        rrep_hops;      /* number of hops from o to d */
+       u_int32_t       rrep_ds;        /* destination sequence number */
+       struct in6_addr rrep_da;        /* destination IPv6 address */
+       struct in6_addr rrep_oa;        /* originator IPv6 address */
+       u_int32_t       rrep_life;      /* lifetime of this route */
+};
+#endif
+
+#define        RREP_REPAIR             0x80    /* repair (reserved for multicast */
+#define        RREP_ACK                0x40    /* acknowledgement required */
+#define        RREP_FLAGS_MASK         0xC0    /* mask for rrep_flags */
+#define        RREP_PREFIX_MASK        0x1F    /* mask for prefix size */
+
+struct rerr_unreach {
+       u_int32_t       u_da;   /* IPv4 address */
+       u_int32_t       u_ds;   /* sequence number */
+};
+#ifdef INET6
+struct rerr_unreach6 {
+       struct in6_addr u_da;   /* IPv6 address */
+       u_int32_t       u_ds;   /* sequence number */
+};
+struct rerr_unreach6_draft_01 {
+       struct in6_addr u_da;   /* IPv6 address */
+       u_int32_t       u_ds;   /* sequence number */
+};
+#endif
+
+struct aodv_rerr {
+       u_int8_t        rerr_type;      /* AODV message type (3 or 18) */
+       u_int8_t        rerr_flags;     /* various flags */
+       u_int8_t        rerr_zero0;     /* reserved, set to zero */
+       u_int8_t        rerr_dc;        /* destination count */
+       union {
+               struct  rerr_unreach dest[1];
+#ifdef INET6
+               struct  rerr_unreach6 dest6[1];
+               struct  rerr_unreach6_draft_01 dest6_draft_01[1];
+#endif
+       } r;
+};
+
+#define RERR_NODELETE          0x80    /* don't delete the link */
+#define RERR_FLAGS_MASK                0x80    /* mask for rerr_flags */
+
+struct aodv_rrep_ack {
+       u_int8_t        ra_type;
+       u_int8_t        ra_zero0;
+};
+
+union aodv {
+       struct aodv_rreq rreq;
+       struct aodv_rrep rrep;
+       struct aodv_rerr rerr;
+       struct aodv_rrep_ack rrep_ack;
+#ifdef INET6
+       struct aodv_rreq6 rreq6;
+       struct aodv_rreq6_draft_01 rreq6_draft_01;
+       struct aodv_rrep6 rrep6;
+       struct aodv_rrep6_draft_01 rrep6_draft_01;
+#endif
+};
+
+#define        AODV_RREQ               1       /* route request */
+#define        AODV_RREP               2       /* route response */
+#define        AODV_RERR               3       /* error report */
+#define        AODV_RREP_ACK           4       /* route response acknowledgement */
+
+#define AODV_V6_DRAFT_01_RREQ          16      /* IPv6 route request */
+#define AODV_V6_DRAFT_01_RREP          17      /* IPv6 route response */
+#define AODV_V6_DRAFT_01_RERR          18      /* IPv6 error report */
+#define AODV_V6_DRAFT_01_RREP_ACK      19      /* IPV6 route response acknowledgment */
+
+struct aodv_ext {
+       u_int8_t        type;           /* extension type */
+       u_int8_t        length;         /* extension length */
+};
+
+struct aodv_hello {
+       struct  aodv_ext        eh;             /* extension header */
+       u_int32_t               interval;       /* expect my next hello in
+                                                * (n) ms */
+};
+
+#define        AODV_EXT_HELLO  1
+
+#endif /* _AODV_H_ */
diff --git a/appletalk.h b/appletalk.h
new file mode 100644 (file)
index 0000000..67e62ef
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 1988, 1989, 1990, 1993, 1994, 1995, 1996
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code distributions
+ * retain the above copyright notice and this paragraph in its entirety, (2)
+ * distributions including binary code include the above copyright notice and
+ * this paragraph in its entirety in the documentation or other materials
+ * provided with the distribution, and (3) all advertising materials mentioning
+ * features or use of this software display the following acknowledgement:
+ * ``This product includes software developed by the University of California,
+ * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+ * the University nor the names of its contributors may be used to endorse
+ * or promote products derived from this software without specific prior
+ * written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * AppleTalk protocol formats (courtesy Bill Croft of Stanford/SUMEX).
+ *
+ * @(#) $Header: /tcpdump/master/tcpdump/appletalk.h,v 1.16 2004/05/01 09:41:50 hannes Exp $ (LBL)
+ */
+
+struct LAP {
+       u_int8_t        dst;
+       u_int8_t        src;
+       u_int8_t        type;
+};
+#define lapShortDDP    1       /* short DDP type */
+#define lapDDP         2       /* DDP type */
+#define lapKLAP                'K'     /* Kinetics KLAP type */
+
+/* Datagram Delivery Protocol */
+
+struct atDDP {
+       u_int16_t       length;
+       u_int16_t       checksum;
+       u_int16_t       dstNet;
+       u_int16_t       srcNet;
+       u_int8_t        dstNode;
+       u_int8_t        srcNode;
+       u_int8_t        dstSkt;
+       u_int8_t        srcSkt;
+       u_int8_t        type;
+};
+
+struct atShortDDP {
+       u_int16_t       length;
+       u_int8_t        dstSkt;
+       u_int8_t        srcSkt;
+       u_int8_t        type;
+};
+
+#define        ddpMaxWKS       0x7F
+#define        ddpMaxData      586
+#define        ddpLengthMask   0x3FF
+#define        ddpHopShift     10
+#define        ddpSize         13      /* size of DDP header (avoid struct padding) */
+#define        ddpSSize        5
+#define        ddpWKS          128     /* boundary of DDP well known sockets */
+#define        ddpRTMP         1       /* RTMP type */
+#define        ddpRTMPrequest  5       /* RTMP request type */
+#define        ddpNBP          2       /* NBP type */
+#define        ddpATP          3       /* ATP type */
+#define        ddpECHO         4       /* ECHO type */
+#define        ddpIP           22      /* IP type */
+#define        ddpARP          23      /* ARP type */
+#define ddpEIGRP        88      /* EIGRP over Appletalk */
+#define        ddpKLAP         0x4b    /* Kinetics KLAP type */
+
+
+/* AppleTalk Transaction Protocol */
+
+struct atATP {
+       u_int8_t        control;
+       u_int8_t        bitmap;
+       u_int16_t       transID;
+       int32_t userData;
+};
+
+#define        atpReqCode      0x40
+#define        atpRspCode      0x80
+#define        atpRelCode      0xC0
+#define        atpXO           0x20
+#define        atpEOM          0x10
+#define        atpSTS          0x08
+#define        atpFlagMask     0x3F
+#define        atpControlMask  0xF8
+#define        atpMaxNum       8
+#define        atpMaxData      578
+
+
+/* AppleTalk Echo Protocol */
+
+struct atEcho {
+       u_int8_t        echoFunction;
+       u_int8_t        *echoData;
+};
+
+#define echoSkt                4               /* the echoer socket */
+#define echoSize       1               /* size of echo header */
+#define echoRequest    1               /* echo request */
+#define echoReply      2               /* echo request */
+
+
+/* Name Binding Protocol */
+
+struct atNBP {
+       u_int8_t        control;
+       u_int8_t        id;
+};
+
+struct atNBPtuple {
+       u_int16_t       net;
+       u_int8_t        node;
+       u_int8_t        skt;
+       u_int8_t        enumerator;
+};
+
+#define        nbpBrRq         0x10
+#define        nbpLkUp         0x20
+#define        nbpLkUpReply    0x30
+
+#define        nbpNIS          2
+#define        nbpTupleMax     15
+
+#define        nbpHeaderSize   2
+#define nbpTupleSize   5
+
+#define nbpSkt         2               /* NIS */
+
+
+/* Routing Table Maint. Protocol */
+
+#define        rtmpSkt         1       /* number of RTMP socket */
+#define        rtmpSize        4       /* minimum size */
+#define        rtmpTupleSize   3
+
+
+/* Zone Information Protocol */
+
+struct zipHeader {
+       u_int8_t        command;
+       u_int8_t        netcount;
+};
+
+#define        zipHeaderSize   2
+#define        zipQuery        1
+#define        zipReply        2
+#define        zipTakedown     3
+#define        zipBringup      4
+#define        ddpZIP          6
+#define        zipSkt          6
+#define        GetMyZone       7
+#define        GetZoneList     8
+
+/*
+ * UDP port range used for ddp-in-udp encapsulation is 16512-16639
+ * for client sockets (128-255) and 200-327 for server sockets
+ * (0-127).  We also try to recognize the pre-April 88 server
+ * socket range of 768-895.
+ */
+#define atalk_port(p) \
+       (((unsigned)((p) - 16512) < 128) || \
+        ((unsigned)((p) - 200) < 128) || \
+        ((unsigned)((p) - 768) < 128))
diff --git a/arcnet.h b/arcnet.h
new file mode 100644 (file)
index 0000000..6e649f6
--- /dev/null
+++ b/arcnet.h
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 1982, 1986, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the University of
+ *     California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#) $Id: arcnet.h,v 1.3 2003/01/23 09:05:37 guy Exp $ (LBL)
+ *
+ * from: NetBSD: if_arc.h,v 1.13 1999/11/19 20:41:19 thorpej Exp
+ */
+
+/*
+ * Structure of a 2.5MB/s Arcnet header on the BSDs,
+ * as given to interface code.
+ */
+struct arc_header {
+       u_int8_t  arc_shost;
+       u_int8_t  arc_dhost;
+       u_int8_t  arc_type;
+       /*
+        * only present for newstyle encoding with LL fragmentation.
+        * Don't use sizeof(anything), use ARC_HDR{,NEW}LEN instead.
+        */
+       u_int8_t  arc_flag;
+       u_int16_t arc_seqid;
+
+       /*
+        * only present in exception packets (arc_flag == 0xff)
+        */
+       u_int8_t  arc_type2;    /* same as arc_type */
+       u_int8_t  arc_flag2;    /* real flag value */
+       u_int16_t arc_seqid2;   /* real seqid value */
+};
+
+#define        ARC_HDRLEN              3
+#define        ARC_HDRNEWLEN           6
+#define        ARC_HDRNEWLEN_EXC       10
+
+/* RFC 1051 */
+#define        ARCTYPE_IP_OLD          240     /* IP protocol */
+#define        ARCTYPE_ARP_OLD         241     /* address resolution protocol */
+
+/* RFC 1201 */
+#define        ARCTYPE_IP              212     /* IP protocol */
+#define        ARCTYPE_ARP             213     /* address resolution protocol */
+#define        ARCTYPE_REVARP          214     /* reverse addr resolution protocol */
+
+#define        ARCTYPE_ATALK           221     /* Appletalk */
+#define        ARCTYPE_BANIAN          247     /* Banyan Vines */
+#define        ARCTYPE_IPX             250     /* Novell IPX */
+
+#define ARCTYPE_INET6          0xc4    /* IPng */
+#define ARCTYPE_DIAGNOSE       0x80    /* as per ANSI/ATA 878.1 */
+
+/*
+ * Structure of a 2.5MB/s Arcnet header on Linux.  Linux has
+ * an extra "offset" field when given to interface code, and
+ * never presents packets that look like exception frames.
+ */
+struct arc_linux_header {
+       u_int8_t  arc_shost;
+       u_int8_t  arc_dhost;
+       u_int16_t arc_offset;
+       u_int8_t  arc_type;
+       /*
+        * only present for newstyle encoding with LL fragmentation.
+        * Don't use sizeof(anything), use ARC_LINUX_HDR{,NEW}LEN
+        * instead.
+        */
+       u_int8_t  arc_flag;
+       u_int16_t arc_seqid;
+};
+
+#define        ARC_LINUX_HDRLEN        5
+#define        ARC_LINUX_HDRNEWLEN     8
diff --git a/atime.awk b/atime.awk
new file mode 100644 (file)
index 0000000..b42dec2
--- /dev/null
+++ b/atime.awk
@@ -0,0 +1,18 @@
+$6 ~ /^ack/ && $5 !~ /[SFR]/   {
+       # given a tcpdump ftp trace, output one line for each ack
+       # in the form
+       #   <ack time> <seq no>
+       # where <ack time> is the time packet was acked (in seconds with
+       # zero at time of first packet) and <seq no> is the tcp sequence
+       # number of the ack divided by 1024 (i.e., Kbytes acked).
+       #
+       # convert time to seconds
+       n = split ($1,t,":")
+       tim = t[1]*3600 + t[2]*60 + t[3]
+       if (! tzero) {
+               tzero = tim
+               OFS = "\t"
+       }
+       # get packet sequence number
+       printf "%7.2f\t%g\n", tim-tzero, $7/1024
+       }
diff --git a/atm.h b/atm.h
new file mode 100644 (file)
index 0000000..c6ac53e
--- /dev/null
+++ b/atm.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2002 Guy Harris.
+ *                All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * The name of Guy Harris may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * @(#) $Header: /tcpdump/master/tcpdump/atm.h,v 1.1.4.1 2005/06/20 07:45:05 hannes Exp $
+ */
+
+/*
+ * Traffic types for ATM.
+ */
+#define ATM_UNKNOWN    0       /* Unknown */
+#define ATM_LANE       1       /* LANE */
+#define ATM_LLC                2       /* LLC encapsulation */
+
+/*
+ * some OAM cell captures (most notably Juniper's)
+ * do not deliver a heading HEC byte
+ */
+#define ATM_OAM_NOHEC   0
+#define ATM_OAM_HEC     1
diff --git a/atmuni31.h b/atmuni31.h
new file mode 100644 (file)
index 0000000..304859a
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 1997 Yen Yen Lim and North Dakota State University
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by Yen Yen Lim and
+        North Dakota State University
+ * 4. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @(#) $Header: /tcpdump/master/tcpdump/atmuni31.h,v 1.2 2002/08/05 07:47:23 guy Exp $ (LBL)
+ */
+
+/* Based on UNI3.1 standard by ATM Forum */
+
+/* ATM traffic types based on VPI=0 and (the following VCI */
+#define PPC                    0x05    /* Point-to-point signal msg */
+#define BCC                    0x02    /* Broadcast signal msg */
+#define OAMF4SC                        0x03    /* Segment OAM F4 flow cell */
+#define OAMF4EC                        0x04    /* End-to-end OAM F4 flow cell */
+#define METAC                  0x01    /* Meta signal msg */
+#define ILMIC                  0x10    /* ILMI msg */
+
+/* Q.2931 signalling messages */
+#define CALL_PROCEED           0x02    /* call proceeding */
+#define CONNECT                        0x07    /* connect */
+#define CONNECT_ACK            0x0f    /* connect_ack */
+#define SETUP                  0x05    /* setup */
+#define RELEASE                        0x4d    /* release */
+#define RELEASE_DONE           0x5a    /* release_done */
+#define RESTART                        0x46    /* restart */
+#define RESTART_ACK            0x4e    /* restart ack */
+#define STATUS                 0x7d    /* status */
+#define STATUS_ENQ             0x75    /* status ack */
+#define ADD_PARTY              0x80    /* add party */
+#define ADD_PARTY_ACK          0x81    /* add party ack */
+#define ADD_PARTY_REJ          0x82    /* add party rej */
+#define DROP_PARTY             0x83    /* drop party */
+#define DROP_PARTY_ACK         0x84    /* drop party ack */
+
+/* Information Element Parameters in the signalling messages */
+#define CAUSE                  0x08    /* cause */
+#define ENDPT_REF              0x54    /* endpoint reference */
+#define AAL_PARA               0x58    /* ATM adaptation layer parameters */
+#define TRAFF_DESCRIP          0x59    /* atm traffic descriptors */
+#define CONNECT_ID             0x5a    /* connection identifier */
+#define QOS_PARA               0x5c    /* quality of service parameters */
+#define B_HIGHER               0x5d    /* broadband higher layer information */
+#define B_BEARER               0x5e    /* broadband bearer capability */
+#define B_LOWER                        0x5f    /* broadband lower information */
+#define CALLING_PARTY          0x6c    /* calling party number */
+#define CALLED_PARTY           0x70    /* called party nmber */
+
+#define Q2931                  0x09
+
+/* Q.2931 signalling general messages format */
+#define PROTO_POS       0      /* offset of protocol discriminator */
+#define CALL_REF_POS    2      /* offset of call reference value */
+#define MSG_TYPE_POS    5      /* offset of message type */
+#define MSG_LEN_POS     7      /* offset of mesage length */
+#define IE_BEGIN_POS    9      /* offset of first information element */
+
+/* format of signalling messages */
+#define TYPE_POS       0
+#define LEN_POS                2
+#define FIELD_BEGIN_POS 4
diff --git a/bgp.h b/bgp.h
new file mode 100755 (executable)
index 0000000..06be3ea
--- /dev/null
+++ b/bgp.h
@@ -0,0 +1,17 @@
+/* @(#) $Header: /tcpdump/master/tcpdump/bgp.h,v 1.3 2004/06/16 08:45:15 hannes Exp $ (LBL) */
+/* 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code
+ * distributions retain the above copyright notice and this paragraph
+ * in its entirety, and (2) distributions including binary code include
+ * the above copyright notice and this paragraph in its entirety in
+ * the documentation or other materials provided with the distribution.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND
+ * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
+ * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE.
+ *
+ * Original code by Hannes Gredler (hannes@juniper.net)
+ */
+
+extern char *bgp_vpn_rd_print (const u_char *);
diff --git a/bootp.h b/bootp.h
new file mode 100644 (file)
index 0000000..7c63d0c
--- /dev/null
+++ b/bootp.h
@@ -0,0 +1,230 @@
+/* @(#) $Header: /tcpdump/master/tcpdump/bootp.h,v 1.15.4.3 2007/08/21 22:02:08 guy Exp $ (LBL) */
+/*
+ * Bootstrap Protocol (BOOTP).  RFC951 and RFC1048.
+ *
+ * This file specifies the "implementation-independent" BOOTP protocol
+ * information which is common to both client and server.
+ *
+ * Copyright 1988 by Carnegie Mellon.
+ *
+ * Permission to use, copy, modify, and distribute this program for any
+ * purpose and without fee is hereby granted, provided that this copyright
+ * and permission notice appear on all copies and supporting documentation,
+ * the name of Carnegie Mellon not be used in advertising or publicity
+ * pertaining to distribution of the program without specific prior
+ * permission, and notice be given in supporting documentation that copying
+ * and distribution is by permission of Carnegie Mellon and Stanford
+ * University.  Carnegie Mellon makes no representations about the
+ * suitability of this software for any purpose.  It is provided "as is"
+ * without express or implied warranty.
+ */
+
+
+struct bootp {
+       u_int8_t        bp_op;          /* packet opcode type */
+       u_int8_t        bp_htype;       /* hardware addr type */
+       u_int8_t        bp_hlen;        /* hardware addr length */
+       u_int8_t        bp_hops;        /* gateway hops */
+       u_int32_t       bp_xid;         /* transaction ID */
+       u_int16_t       bp_secs;        /* seconds since boot began */
+       u_int16_t       bp_flags;       /* flags - see bootp_flag_values[] in print-bootp.c */
+       struct in_addr  bp_ciaddr;      /* client IP address */
+       struct in_addr  bp_yiaddr;      /* 'your' IP address */
+       struct in_addr  bp_siaddr;      /* server IP address */
+       struct in_addr  bp_giaddr;      /* gateway IP address */
+       u_int8_t        bp_chaddr[16];  /* client hardware address */
+       u_int8_t        bp_sname[64];   /* server host name */
+       u_int8_t        bp_file[128];   /* boot file name */
+       u_int8_t        bp_vend[64];    /* vendor-specific area */
+};
+
+/*
+ * UDP port numbers, server and client.
+ */
+#define        IPPORT_BOOTPS           67
+#define        IPPORT_BOOTPC           68
+
+#define BOOTPREPLY             2
+#define BOOTPREQUEST           1
+
+/*
+ * Vendor magic cookie (v_magic) for CMU
+ */
+#define VM_CMU         "CMU"
+
+/*
+ * Vendor magic cookie (v_magic) for RFC1048
+ */
+#define VM_RFC1048     { 99, 130, 83, 99 }
+
+\f
+
+/*
+ * RFC1048 tag values used to specify what information is being supplied in
+ * the vendor field of the packet.
+ */
+
+#define TAG_PAD                        ((u_int8_t)   0)
+#define TAG_SUBNET_MASK                ((u_int8_t)   1)
+#define TAG_TIME_OFFSET                ((u_int8_t)   2)
+#define TAG_GATEWAY            ((u_int8_t)   3)
+#define TAG_TIME_SERVER                ((u_int8_t)   4)
+#define TAG_NAME_SERVER                ((u_int8_t)   5)
+#define TAG_DOMAIN_SERVER      ((u_int8_t)   6)
+#define TAG_LOG_SERVER         ((u_int8_t)   7)
+#define TAG_COOKIE_SERVER      ((u_int8_t)   8)
+#define TAG_LPR_SERVER         ((u_int8_t)   9)
+#define TAG_IMPRESS_SERVER     ((u_int8_t)  10)
+#define TAG_RLP_SERVER         ((u_int8_t)  11)
+#define TAG_HOSTNAME           ((u_int8_t)  12)
+#define TAG_BOOTSIZE           ((u_int8_t)  13)
+#define TAG_END                        ((u_int8_t) 255)
+/* RFC1497 tags */
+#define        TAG_DUMPPATH            ((u_int8_t)  14)
+#define        TAG_DOMAINNAME          ((u_int8_t)  15)
+#define        TAG_SWAP_SERVER         ((u_int8_t)  16)
+#define        TAG_ROOTPATH            ((u_int8_t)  17)
+#define        TAG_EXTPATH             ((u_int8_t)  18)
+/* RFC2132 */
+#define        TAG_IP_FORWARD          ((u_int8_t)  19)
+#define        TAG_NL_SRCRT            ((u_int8_t)  20)
+#define        TAG_PFILTERS            ((u_int8_t)  21)
+#define        TAG_REASS_SIZE          ((u_int8_t)  22)
+#define        TAG_DEF_TTL             ((u_int8_t)  23)
+#define        TAG_MTU_TIMEOUT         ((u_int8_t)  24)
+#define        TAG_MTU_TABLE           ((u_int8_t)  25)
+#define        TAG_INT_MTU             ((u_int8_t)  26)
+#define        TAG_LOCAL_SUBNETS       ((u_int8_t)  27)
+#define        TAG_BROAD_ADDR          ((u_int8_t)  28)
+#define        TAG_DO_MASK_DISC        ((u_int8_t)  29)
+#define        TAG_SUPPLY_MASK         ((u_int8_t)  30)
+#define        TAG_DO_RDISC            ((u_int8_t)  31)
+#define        TAG_RTR_SOL_ADDR        ((u_int8_t)  32)
+#define        TAG_STATIC_ROUTE        ((u_int8_t)  33)
+#define        TAG_USE_TRAILERS        ((u_int8_t)  34)
+#define        TAG_ARP_TIMEOUT         ((u_int8_t)  35)
+#define        TAG_ETH_ENCAP           ((u_int8_t)  36)
+#define        TAG_TCP_TTL             ((u_int8_t)  37)
+#define        TAG_TCP_KEEPALIVE       ((u_int8_t)  38)
+#define        TAG_KEEPALIVE_GO        ((u_int8_t)  39)
+#define        TAG_NIS_DOMAIN          ((u_int8_t)  40)
+#define        TAG_NIS_SERVERS         ((u_int8_t)  41)
+#define        TAG_NTP_SERVERS         ((u_int8_t)  42)
+#define        TAG_VENDOR_OPTS         ((u_int8_t)  43)
+#define        TAG_NETBIOS_NS          ((u_int8_t)  44)
+#define        TAG_NETBIOS_DDS         ((u_int8_t)  45)
+#define        TAG_NETBIOS_NODE        ((u_int8_t)  46)
+#define        TAG_NETBIOS_SCOPE       ((u_int8_t)  47)
+#define        TAG_XWIN_FS             ((u_int8_t)  48)
+#define        TAG_XWIN_DM             ((u_int8_t)  49)
+#define        TAG_NIS_P_DOMAIN        ((u_int8_t)  64)
+#define        TAG_NIS_P_SERVERS       ((u_int8_t)  65)
+#define        TAG_MOBILE_HOME         ((u_int8_t)  68)
+#define        TAG_SMPT_SERVER         ((u_int8_t)  69)
+#define        TAG_POP3_SERVER         ((u_int8_t)  70)
+#define        TAG_NNTP_SERVER         ((u_int8_t)  71)
+#define        TAG_WWW_SERVER          ((u_int8_t)  72)
+#define        TAG_FINGER_SERVER       ((u_int8_t)  73)
+#define        TAG_IRC_SERVER          ((u_int8_t)  74)
+#define        TAG_STREETTALK_SRVR     ((u_int8_t)  75)
+#define        TAG_STREETTALK_STDA     ((u_int8_t)  76)
+/* DHCP options */
+#define        TAG_REQUESTED_IP        ((u_int8_t)  50)
+#define        TAG_IP_LEASE            ((u_int8_t)  51)
+#define        TAG_OPT_OVERLOAD        ((u_int8_t)  52)
+#define        TAG_TFTP_SERVER         ((u_int8_t)  66)
+#define        TAG_BOOTFILENAME        ((u_int8_t)  67)
+#define        TAG_DHCP_MESSAGE        ((u_int8_t)  53)
+#define        TAG_SERVER_ID           ((u_int8_t)  54)
+#define        TAG_PARM_REQUEST        ((u_int8_t)  55)
+#define        TAG_MESSAGE             ((u_int8_t)  56)
+#define        TAG_MAX_MSG_SIZE        ((u_int8_t)  57)
+#define        TAG_RENEWAL_TIME        ((u_int8_t)  58)
+#define        TAG_REBIND_TIME         ((u_int8_t)  59)
+#define        TAG_VENDOR_CLASS        ((u_int8_t)  60)
+#define        TAG_CLIENT_ID           ((u_int8_t)  61)
+/* RFC 2241 */
+#define        TAG_NDS_SERVERS         ((u_int8_t)  85)
+#define        TAG_NDS_TREE_NAME       ((u_int8_t)  86)
+#define        TAG_NDS_CONTEXT         ((u_int8_t)  87)
+/* RFC 2242 */
+#define        TAG_NDS_IPDOMAIN        ((u_int8_t)  62)
+#define        TAG_NDS_IPINFO          ((u_int8_t)  63)
+/* RFC 2485 */
+#define        TAG_OPEN_GROUP_UAP      ((u_int8_t)  98)
+/* RFC 2563 */
+#define        TAG_DISABLE_AUTOCONF    ((u_int8_t) 116)
+/* RFC 2610 */
+#define        TAG_SLP_DA              ((u_int8_t)  78)
+#define        TAG_SLP_SCOPE           ((u_int8_t)  79)
+/* RFC 2937 */
+#define        TAG_NS_SEARCH           ((u_int8_t) 117)
+/* RFC 3011 */
+#define        TAG_IP4_SUBNET_SELECT   ((u_int8_t) 118)
+/* RFC 3442 */
+#define TAG_CLASSLESS_STATIC_RT        ((u_int8_t) 121)
+#define TAG_CLASSLESS_STA_RT_MS        ((u_int8_t) 249)
+/* ftp://ftp.isi.edu/.../assignments/bootp-dhcp-extensions */
+#define        TAG_USER_CLASS          ((u_int8_t)  77)
+#define        TAG_SLP_NAMING_AUTH     ((u_int8_t)  80)
+#define        TAG_CLIENT_FQDN         ((u_int8_t)  81)
+#define        TAG_AGENT_CIRCUIT       ((u_int8_t)  82)
+#define        TAG_AGENT_REMOTE        ((u_int8_t)  83)
+#define        TAG_AGENT_MASK          ((u_int8_t)  84)
+#define        TAG_TZ_STRING           ((u_int8_t)  88)
+#define        TAG_FQDN_OPTION         ((u_int8_t)  89)
+#define        TAG_AUTH                ((u_int8_t)  90)
+#define        TAG_VINES_SERVERS       ((u_int8_t)  91)
+#define        TAG_SERVER_RANK         ((u_int8_t)  92)
+#define        TAG_CLIENT_ARCH         ((u_int8_t)  93)
+#define        TAG_CLIENT_NDI          ((u_int8_t)  94)
+#define        TAG_CLIENT_GUID         ((u_int8_t)  97)
+#define        TAG_LDAP_URL            ((u_int8_t)  95)
+#define        TAG_6OVER4              ((u_int8_t)  96)
+#define        TAG_PRINTER_NAME        ((u_int8_t) 100)
+#define        TAG_MDHCP_SERVER        ((u_int8_t) 101)
+#define        TAG_IPX_COMPAT          ((u_int8_t) 110)
+#define        TAG_NETINFO_PARENT      ((u_int8_t) 112)
+#define        TAG_NETINFO_PARENT_TAG  ((u_int8_t) 113)
+#define        TAG_URL                 ((u_int8_t) 114)
+#define        TAG_FAILOVER            ((u_int8_t) 115)
+#define        TAG_EXTENDED_REQUEST    ((u_int8_t) 126)
+#define        TAG_EXTENDED_OPTION     ((u_int8_t) 127)
+
+
+/* DHCP Message types (values for TAG_DHCP_MESSAGE option) */
+#define                DHCPDISCOVER    1
+#define                DHCPOFFER       2
+#define                DHCPREQUEST     3
+#define                DHCPDECLINE     4
+#define                DHCPACK         5
+#define                DHCPNAK         6
+#define                DHCPRELEASE     7
+#define                DHCPINFORM      8
+
+
+/*
+ * "vendor" data permitted for CMU bootp clients.
+ */
+
+struct cmu_vend {
+       u_int8_t        v_magic[4];     /* magic number */
+       u_int32_t       v_flags;        /* flags/opcodes, etc. */
+       struct in_addr  v_smask;        /* Subnet mask */
+       struct in_addr  v_dgate;        /* Default gateway */
+       struct in_addr  v_dns1, v_dns2; /* Domain name servers */
+       struct in_addr  v_ins1, v_ins2; /* IEN-116 name servers */
+       struct in_addr  v_ts1, v_ts2;   /* Time servers */
+       u_int8_t        v_unused[24];   /* currently unused */
+};
+
+
+/* v_flags values */
+#define VF_SMASK       1       /* Subnet mask field contains valid data */
+
+/* RFC 4702 DHCP Client FQDN Option */
+
+#define CLIENT_FQDN_FLAGS_S    0x01
+#define CLIENT_FQDN_FLAGS_O    0x02
+#define CLIENT_FQDN_FLAGS_E    0x04
+#define CLIENT_FQDN_FLAGS_N    0x08
diff --git a/bpf_dump.c b/bpf_dump.c
new file mode 100644 (file)
index 0000000..0cad4d9
--- /dev/null
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 1992, 1993, 1994, 1995, 1996
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code distributions
+ * retain the above copyright notice and this paragraph in its entirety, (2)
+ * distributions including binary code include the above copyright notice and
+ * this paragraph in its entirety in the documentation or other materials
+ * provided with the distribution, and (3) all advertising materials mentioning
+ * features or use of this software display the following acknowledgement:
+ * ``This product includes software developed by the University of California,
+ * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+ * the University nor the names of its contributors may be used to endorse
+ * or promote products derived from this software without specific prior
+ * written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+#ifndef lint
+static const char rcsid[] _U_ =
+    "@(#) $Header: /tcpdump/master/tcpdump/bpf_dump.c,v 1.16 2003/11/16 09:36:08 guy Exp $ (LBL)";
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <tcpdump-stdinc.h>
+
+#include <pcap.h>
+#include <stdio.h>
+
+#include "interface.h"
+
+void
+bpf_dump(struct bpf_program *p, int option)
+{
+       struct bpf_insn *insn;
+       int i;
+       int n = p->bf_len;
+
+       insn = p->bf_insns;
+       if (option > 2) {
+               printf("%d\n", n);
+               for (i = 0; i < n; ++insn, ++i) {
+                       printf("%u %u %u %u\n", insn->code,
+                              insn->jt, insn->jf, insn->k);
+               }
+               return ;
+       }
+       if (option > 1) {
+               for (i = 0; i < n; ++insn, ++i)
+                       printf("{ 0x%x, %d, %d, 0x%08x },\n",
+                              insn->code, insn->jt, insn->jf, insn->k);
+               return;
+       }
+       for (i = 0; i < n; ++insn, ++i) {
+#ifdef BDEBUG
+               extern int bids[];
+               printf(bids[i] > 0 ? "[%02d]" : " -- ", bids[i] - 1);
+#endif
+               puts(bpf_image(insn, i));
+       }
+}
diff --git a/chdlc.h b/chdlc.h
new file mode 100644 (file)
index 0000000..4fb6e1d
--- /dev/null
+++ b/chdlc.h
@@ -0,0 +1,27 @@
+/* @(#) $Header: /tcpdump/master/tcpdump/chdlc.h,v 1.1 2000/09/18 05:11:43 guy Exp $ (LBL) */
+/*
+ * Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that: (1) source code distributions
+ * retain the above copyright notice and this paragraph in its entirety, (2)
+ * distributions including binary code include the above copyright notice and
+ * this paragraph in its entirety in the documentation or other materials
+ * provided with the distribution, and (3) all advertising materials mentioning
+ * features or use of this software display the following acknowledgement:
+ * ``This product includes software developed by the University of California,
+ * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of
+ * the University nor the names of its contributors may be used to endorse
+ * or promote products derived from this software without specific prior
+ * written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#define CHDLC_HDRLEN           4
+#define CHDLC_UNICAST          0x0f
+#define CHDLC_BCAST            0x8f
+#define CHDLC_TYPE_SLARP       0x8035
+#define CHDLC_TYPE_CDP         0x2000
diff --git a/config.guess b/config.guess
new file mode 100755 (executable)
index 0000000..4c5bde8
--- /dev/null
@@ -0,0 +1,1429 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2003-10-16'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )        # Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+       for c in cc gcc c89 c99 ; do
+         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+            CC_FOR_BUILD="$c"; break ;
+         fi ;
+       done ;
+       if test x"$CC_FOR_BUILD" = x ; then
+         CC_FOR_BUILD=no_compiler_found ;
+       fi
+       ;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+       PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+       # NetBSD (nbsd) targets should (where applicable) match one or
+       # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+       # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+       # switched to ELF, *-*-netbsd* would select the old
+       # object file format.  This provides both forward
+       # compatibility and a consistent mechanism for selecting the
+       # object file format.
+       #
+       # Note: NetBSD doesn't particularly care about the vendor
+       # portion of the name.  We always set it to "unknown".
+       sysctl="sysctl -n hw.machine_arch"
+       UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+           /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+       case "${UNAME_MACHINE_ARCH}" in
+           armeb) machine=armeb-unknown ;;
+           arm*) machine=arm-unknown ;;
+           sh3el) machine=shl-unknown ;;
+           sh3eb) machine=sh-unknown ;;
+           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+       esac
+       # The Operating System including object format, if it has switched
+       # to ELF recently, or will in the future.
+       case "${UNAME_MACHINE_ARCH}" in
+           arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+               eval $set_cc_for_build
+               if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+                       | grep __ELF__ >/dev/null
+               then
+                   # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+                   # Return netbsd for either.  FIX?
+                   os=netbsd
+               else
+                   os=netbsdelf
+               fi
+               ;;
+           *)
+               os=netbsd
+               ;;
+       esac
+       # The OS release
+       # Debian GNU/NetBSD machines have a different userland, and
+       # thus, need a distinct triplet. However, they do not need
+       # kernel version information, so it can be replaced with a
+       # suitable tag, in the style of linux-gnu.
+       case "${UNAME_VERSION}" in
+           Debian*)
+               release='-gnu'
+               ;;
+           *)
+               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               ;;
+       esac
+       # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+       # contains redundant information, the shorter form:
+       # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+       echo "${machine}-${os}${release}"
+       exit 0 ;;
+    amiga:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    arc:OpenBSD:*:*)
+       echo mipsel-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    hp300:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mac68k:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    macppc:OpenBSD:*:*)
+       echo powerpc-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+       echo m88k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mvmeppc:OpenBSD:*:*)
+       echo powerpc-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    pegasos:OpenBSD:*:*)
+       echo powerpc-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    pmax:OpenBSD:*:*)
+       echo mipsel-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    sgi:OpenBSD:*:*)
+       echo mipseb-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    sun3:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+       echo mipsel-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    *:OpenBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    alpha:OSF1:*:*)
+       if test $UNAME_RELEASE = "V4.0"; then
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+       fi
+       # According to Compaq, /usr/sbin/psrinfo has been available on
+       # OSF/1 and Tru64 systems produced since 1995.  I hope that
+       # covers most systems running today.  This code pipes the CPU
+       # types through head -n 1, so we only detect the type of CPU 0.
+       ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+       case "$ALPHA_CPU_TYPE" in
+           "EV4 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "EV4.5 (21064)")
+               UNAME_MACHINE="alpha" ;;
+           "LCA4 (21066/21068)")
+               UNAME_MACHINE="alpha" ;;
+           "EV5 (21164)")
+               UNAME_MACHINE="alphaev5" ;;
+           "EV5.6 (21164A)")
+               UNAME_MACHINE="alphaev56" ;;
+           "EV5.6 (21164PC)")
+               UNAME_MACHINE="alphapca56" ;;
+           "EV5.7 (21164PC)")
+               UNAME_MACHINE="alphapca57" ;;
+           "EV6 (21264)")
+               UNAME_MACHINE="alphaev6" ;;
+           "EV6.7 (21264A)")
+               UNAME_MACHINE="alphaev67" ;;
+           "EV6.8CB (21264C)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8AL (21264B)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.8CX (21264D)")
+               UNAME_MACHINE="alphaev68" ;;
+           "EV6.9A (21264/EV69A)")
+               UNAME_MACHINE="alphaev69" ;;
+           "EV7 (21364)")
+               UNAME_MACHINE="alphaev7" ;;
+           "EV7.9 (21364A)")
+               UNAME_MACHINE="alphaev79" ;;
+       esac
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
+       # 1.2 uses "1.2" for uname -r.
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       exit 0 ;;
+    Alpha*:OpenVMS:*:*)
+       echo alpha-hp-vms
+       exit 0 ;;
+    Alpha\ *:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # Should we change UNAME_MACHINE based on the output of uname instead
+       # of the specific Alpha model?
+       echo alpha-pc-interix
+       exit 0 ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-unknown-sysv4
+       exit 0;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-amigaos
+       exit 0 ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+       echo ${UNAME_MACHINE}-unknown-morphos
+       exit 0 ;;
+    *:OS/390:*:*)
+       echo i370-ibm-openedition
+       exit 0 ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+       exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix${UNAME_RELEASE}
+       exit 0;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+       echo hppa1.1-hitachi-hiuxmpp
+       exit 0;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit 0 ;;
+    NILE*:*:*:dcosx)
+       echo pyramid-pyramid-svr4
+       exit 0 ;;
+    DRS?6000:unix:4.0:6*)
+       echo sparc-icl-nx6
+       exit 0 ;;
+    DRS?6000:UNIX_SV:4.2*:7*)
+       case `/usr/bin/uname -p` in
+           sparc) echo sparc-icl-nx7 && exit 0 ;;
+       esac ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    i86pc:SunOS:5.*:*)
+       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    sun4*:SunOS:6*:*)
+       # According to config.sub, this is the proper way to canonicalize
+       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+       # it's likely to be more like Solaris than SunOS4.
+       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    sun4*:SunOS:*:*)
+       case "`/usr/bin/arch -k`" in
+           Series*|S4*)
+               UNAME_RELEASE=`uname -v`
+               ;;
+       esac
+       # Japanese Language versions have a version number like `4.1.3-JL'.
+       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+       exit 0 ;;
+    sun3*:SunOS:*:*)
+       echo m68k-sun-sunos${UNAME_RELEASE}
+       exit 0 ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos${UNAME_RELEASE}
+               ;;
+           sun4)
+               echo sparc-sun-sunos${UNAME_RELEASE}
+               ;;
+       esac
+       exit 0 ;;
+    aushp:SunOS:*:*)
+       echo sparc-auspex-sunos${UNAME_RELEASE}
+       exit 0 ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+       echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+       exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
+    powerpc:machten:*:*)
+       echo powerpc-apple-machten${UNAME_RELEASE}
+       exit 0 ;;
+    RISC*:Mach:*:*)
+       echo mips-dec-mach_bsd4.3
+       exit 0 ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix${UNAME_RELEASE}
+       exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix${UNAME_RELEASE}
+       exit 0 ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+       echo clipper-intergraph-clix${UNAME_RELEASE}
+       exit 0 ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+       int main (int argc, char *argv[]) {
+#else
+       int main (argc, argv) int argc; char *argv[]; {
+#endif
+       #if defined (host_mips) && defined (MIPSEB)
+       #if defined (SYSTYPE_SYSV)
+         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_SVR4)
+         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+       #endif
+       #endif
+         exit (-1);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c \
+         && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+         && exit 0
+       echo mips-mips-riscos${UNAME_RELEASE}
+       exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+       echo powerpc-motorola-powermax
+       exit 0 ;;
+    Motorola:*:4.3:PL8-*)
+       echo powerpc-harris-powermax
+       exit 0 ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+       echo powerpc-harris-powermax
+       exit 0 ;;
+    Night_Hawk:Power_UNIX:*:*)
+       echo powerpc-harris-powerunix
+       exit 0 ;;
+    m88k:CX/UX:7*:*)
+       echo m88k-harris-cxux7
+       exit 0 ;;
+    m88k:*:4*:R4*)
+       echo m88k-motorola-sysv4
+       exit 0 ;;
+    m88k:*:3*:R3*)
+       echo m88k-motorola-sysv3
+       exit 0 ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+       then
+           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+              [ ${TARGET_BINARY_INTERFACE}x = x ]
+           then
+               echo m88k-dg-dgux${UNAME_RELEASE}
+           else
+               echo m88k-dg-dguxbcs${UNAME_RELEASE}
+           fi
+       else
+           echo i586-dg-dgux${UNAME_RELEASE}
+       fi
+       exit 0 ;;
+    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
+       echo m88k-dolphin-sysv3
+       exit 0 ;;
+    M88*:*:R3*:*)
+       # Delta 88k system running SVR3
+       echo m88k-motorola-sysv3
+       exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+       echo m88k-tektronix-sysv3
+       exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+       echo m68k-tektronix-bsd
+       exit 0 ;;
+    *:IRIX*:*:*)
+       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+       exit 0 ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+       echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+       exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+       echo i386-ibm-aix
+       exit 0 ;;
+    ia64:AIX:*:*)
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+       exit 0 ;;
+    *:AIX:2:3)
+       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               eval $set_cc_for_build
+               sed 's/^                //' << EOF >$dummy.c
+               #include <sys/systemcfg.h>
+
+               main()
+                       {
+                       if (!__power_pc())
+                               exit(1);
+                       puts("powerpc-ibm-aix3.2.5");
+                       exit(0);
+                       }
+EOF
+               $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+               echo rs6000-ibm-aix3.2.5
+       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+               echo rs6000-ibm-aix3.2.4
+       else
+               echo rs6000-ibm-aix3.2
+       fi
+       exit 0 ;;
+    *:AIX:*:[45])
+       IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+               IBM_ARCH=rs6000
+       else
+               IBM_ARCH=powerpc
+       fi
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+       fi
+       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+       exit 0 ;;
+    *:AIX:*:*)
+       echo rs6000-ibm-aix
+       exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+       echo romp-ibm-bsd4.4
+       exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+       exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+       echo rs6000-bull-bosx
+       exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+       echo m68k-bull-sysv3
+       exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+       echo m68k-hp-bsd
+       exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+       echo m68k-hp-bsd4.4
+       exit 0 ;;
+    9000/[34678]??:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       case "${UNAME_MACHINE}" in
+           9000/31? )            HP_ARCH=m68000 ;;
+           9000/[34]?? )         HP_ARCH=m68k ;;
+           9000/[678][0-9][0-9])
+               if [ -x /usr/bin/getconf ]; then
+                   sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+                         '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+               fi
+               if [ "${HP_ARCH}" = "" ]; then
+                   eval $set_cc_for_build
+                   sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+               {
+               case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+               case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+               case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+                   switch (bits)
+                       {
+                       case 64: puts ("hppa2.0w"); break;
+                       case 32: puts ("hppa2.0n"); break;
+                       default: puts ("hppa2.0"); break;
+                       } break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+                   puts ("hppa2.0"); break;
+              #endif
+               default: puts ("hppa1.0"); break;
+               }
+                  exit (0);
+              }
+EOF
+                   (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   test -z "$HP_ARCH" && HP_ARCH=hppa
+               fi ;;
+       esac
+       if [ ${HP_ARCH} = "hppa2.0w" ]
+       then
+           # avoid double evaluation of $set_cc_for_build
+           test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+           then
+               HP_ARCH="hppa2.0w"
+           else
+               HP_ARCH="hppa64"
+           fi
+       fi
+       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       exit 0 ;;
+    ia64:HP-UX:*:*)
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux${HPUX_REV}
+       exit 0 ;;
+    3050*:HI-UX:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <unistd.h>
+       int
+       main ()
+       {
+         long cpu = sysconf (_SC_CPU_VERSION);
+         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+            results, however.  */
+         if (CPU_IS_PA_RISC (cpu))
+           {
+             switch (cpu)
+               {
+                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+                 default: puts ("hppa-hitachi-hiuxwe2"); break;
+               }
+           }
+         else if (CPU_IS_HP_MC68K (cpu))
+           puts ("m68k-hitachi-hiuxwe2");
+         else puts ("unknown-hitachi-hiuxwe2");
+         exit (0);
+       }
+EOF
+       $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+       echo unknown-hitachi-hiuxwe2
+       exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+       echo hppa1.1-hp-bsd
+       exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+       echo hppa1.0-hp-bsd
+       exit 0 ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+       echo hppa1.0-hp-mpeix
+       exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+       echo hppa1.1-hp-osf
+       exit 0 ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit 0 ;;
+    i*86:OSF1:*:*)
+       if [ -x /usr/sbin/sysversion ] ; then
+           echo ${UNAME_MACHINE}-unknown-osf1mk
+       else
+           echo ${UNAME_MACHINE}-unknown-osf1
+       fi
+       exit 0 ;;
+    parisc*:Lites*:*:*)
+       echo hppa1.1-hp-lites
+       exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+       echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+       echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+       echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+       echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    CRAY*[A-Z]90:*:*:*)
+       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+             -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    CRAY*TS:*:*:*)
+       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    CRAY*T3E:*:*:*)
+       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    CRAY*SV1:*:*:*)
+       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    *:UNICOS/mp:*:*)
+       echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit 0 ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+       FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit 0 ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit 0 ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+       exit 0 ;;
+    sparc*:BSD/OS:*:*)
+       echo sparc-unknown-bsdi${UNAME_RELEASE}
+       exit 0 ;;
+    *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+       exit 0 ;;
+    *:FreeBSD:*:*)
+       # Determine whether the default compiler uses glibc.
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <features.h>
+       #if __GLIBC__ >= 2
+       LIBC=gnu
+       #else
+       LIBC=
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+       # GNU/KFreeBSD systems have a "k" prefix to indicate we are using
+       # FreeBSD's kernel, but not the complete OS.
+       case ${LIBC} in gnu) kernel_only='k' ;; esac
+       echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+       exit 0 ;;
+    i*:CYGWIN*:*)
+       echo ${UNAME_MACHINE}-pc-cygwin
+       exit 0 ;;
+    i*:MINGW*:*)
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit 0 ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit 0 ;;
+    x86:Interix*:[34]*)
+       echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+       exit 0 ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+       echo i${UNAME_MACHINE}-pc-mks
+       exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+       # How do we know it's Interix rather than the generic POSIX subsystem?
+       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+       # UNAME_MACHINE based on the output of uname instead of i386?
+       echo i586-pc-interix
+       exit 0 ;;
+    i*:UWIN*:*)
+       echo ${UNAME_MACHINE}-pc-uwin
+       exit 0 ;;
+    p*:CYGWIN*:*)
+       echo powerpcle-unknown-cygwin
+       exit 0 ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    *:GNU:*:*)
+       # the GNU system
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       exit 0 ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       exit 0 ;;
+    i*86:Minix:*:*)
+       echo ${UNAME_MACHINE}-pc-minix
+       exit 0 ;;
+    arm*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    cris:Linux:*:*)
+       echo cris-axis-linux-gnu
+       exit 0 ;;
+    ia64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    m68*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    mips:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips
+       #undef mipsel
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mipsel
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+       test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+       ;;
+    mips64:Linux:*:*)
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #undef CPU
+       #undef mips64
+       #undef mips64el
+       #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+       CPU=mips64el
+       #else
+       #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+       CPU=mips64
+       #else
+       CPU=
+       #endif
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+       test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+       ;;
+    ppc:Linux:*:*)
+       echo powerpc-unknown-linux-gnu
+       exit 0 ;;
+    ppc64:Linux:*:*)
+       echo powerpc64-unknown-linux-gnu
+       exit 0 ;;
+    alpha:Linux:*:*)
+       case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+         EV5)   UNAME_MACHINE=alphaev5 ;;
+         EV56)  UNAME_MACHINE=alphaev56 ;;
+         PCA56) UNAME_MACHINE=alphapca56 ;;
+         PCA57) UNAME_MACHINE=alphapca56 ;;
+         EV6)   UNAME_MACHINE=alphaev6 ;;
+         EV67)  UNAME_MACHINE=alphaev67 ;;
+         EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+       objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+       if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+       echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+       exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+       # Look for CPU level
+       case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+         PA7*) echo hppa1.1-unknown-linux-gnu ;;
+         PA8*) echo hppa2.0-unknown-linux-gnu ;;
+         *)    echo hppa-unknown-linux-gnu ;;
+       esac
+       exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+       echo hppa64-unknown-linux-gnu
+       exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit 0 ;;
+    sh64*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    sh*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit 0 ;;
+    x86_64:Linux:*:*)
+       echo x86_64-unknown-linux-gnu
+       exit 0 ;;
+    i*86:Linux:*:*)
+       # The BFD linker knows what the default object file format is, so
+       # first see if it will tell us. cd to the root directory to prevent
+       # problems with other programs or directories called `ld' in the path.
+       # Set LC_ALL=C to ensure ld outputs messages in English.
+       ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+                        | sed -ne '/supported targets:/!d
+                                   s/[         ][      ]*/ /g
+                                   s/.*supported targets: *//
+                                   s/ .*//
+                                   p'`
+        case "$ld_supported_targets" in
+         elf32-i386)
+               TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+               ;;
+         a.out-i386-linux)
+               echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+               exit 0 ;;
+         coff-i386)
+               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+               exit 0 ;;
+         "")
+               # Either a pre-BFD a.out linker (linux-gnuoldld) or
+               # one that does not give us useful --help.
+               echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+               exit 0 ;;
+       esac
+       # Determine whether the default compiler is a.out or elf
+       eval $set_cc_for_build
+       sed 's/^        //' << EOF >$dummy.c
+       #include <features.h>
+       #ifdef __ELF__
+       # ifdef __GLIBC__
+       #  if __GLIBC__ >= 2
+       LIBC=gnu
+       #  else
+       LIBC=gnulibc1
+       #  endif
+       # else
+       LIBC=gnulibc1
+       # endif
+       #else
+       #ifdef __INTEL_COMPILER
+       LIBC=gnu
+       #else
+       LIBC=gnuaout
+       #endif
+       #endif
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
+EOF
+       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+       test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+       test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+       ;;
+    i*86:DYNIX/ptx:4*:*)
+       # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+       # earlier versions are messed up and put the nodename in both
+       # sysname and nodename.
+       echo i386-sequent-sysv4
+       exit 0 ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       exit 0 ;;
+    i*86:OS/2:*:*)
+       # If we were able to find `uname', then EMX Unix compatibility
+       # is probably installed.
+       echo ${UNAME_MACHINE}-pc-os2-emx
+       exit 0 ;;
+    i*86:XTS-300:*:STOP)
+       echo ${UNAME_MACHINE}-unknown-stop
+       exit 0 ;;
+    i*86:atheos:*:*)
+       echo ${UNAME_MACHINE}-unknown-atheos
+       exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+       echo i386-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    i*86:*DOS:*:*)
+       echo ${UNAME_MACHINE}-pc-msdosdjgpp
+       exit 0 ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+       else
+               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+       fi
+       exit 0 ;;
+    i*86:*:5:[78]*)
+       case `/bin/uname -X | grep "^Machine"` in
+           *486*)           UNAME_MACHINE=i486 ;;
+           *Pentium)        UNAME_MACHINE=i586 ;;
+           *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+       esac
+       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+       exit 0 ;;
+    i*86:*:3.2:*)
+       if test -f /usr/options/cb.name; then
+               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+       elif /bin/uname -X 2>/dev/null >/dev/null ; then
+               UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+               (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+               (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+                       && UNAME_MACHINE=i586
+               (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+                       && UNAME_MACHINE=i686
+               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+       else
+               echo ${UNAME_MACHINE}-pc-sysv32
+       fi
+       exit 0 ;;
+    pc:*:*:*)
+       # Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+       echo i386-pc-msdosdjgpp
+        exit 0 ;;
+    Intel:Mach:3*:*)
+       echo i386-pc-mach3
+       exit 0 ;;
+    paragon:*:*:*)
+       echo i860-intel-osf1
+       exit 0 ;;
+    i860:*:4.*:*) # i860-SVR4
+       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+       else # Add other i860-SVR4 vendors below as they are discovered.
+         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+       fi
+       exit 0 ;;
+    mini*:CTIX:SYS*5:*)
+       # "miniframe"
+       echo m68010-convergent-sysv
+       exit 0 ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+       echo m68k-convergent-sysv
+       exit 0 ;;
+    M680?0:D-NIX:5.3:*)
+       echo m68k-diab-dnix
+       exit 0 ;;
+    M68*:*:R3V[567]*:*)
+       test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+       OS_REL=''
+       test -r /etc/.relid \
+       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+         && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+       echo m68k-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit 0 ;;
+    TSUNAMI:LynxOS:2.*:*)
+       echo sparc-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    rs6000:LynxOS:2.*:*)
+       echo rs6000-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    SM[BE]S:UNIX_SV:*:*)
+       echo mips-dde-sysv${UNAME_RELEASE}
+       exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+       echo mips-sni-sysv4
+       exit 0 ;;
+    RM*:SINIX-*:*:*)
+       echo mips-sni-sysv4
+       exit 0 ;;
+    *:SINIX-*:*:*)
+       if uname -p 2>/dev/null >/dev/null ; then
+               UNAME_MACHINE=`(uname -p) 2>/dev/null`
+               echo ${UNAME_MACHINE}-sni-sysv4
+       else
+               echo ns32k-sni-sysv
+       fi
+       exit 0 ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit 0 ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # How about differentiating between stratus architectures? -djm
+       echo hppa1.1-stratus-sysv4
+       exit 0 ;;
+    *:*:*:FTX*)
+       # From seanf@swdc.stratus.com.
+       echo i860-stratus-sysv4
+       exit 0 ;;
+    *:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo hppa1.1-stratus-vos
+       exit 0 ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux${UNAME_RELEASE}
+       exit 0 ;;
+    news*:NEWS-OS:6*:*)
+       echo mips-sony-newsos6
+       exit 0 ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+       if [ -d /usr/nec ]; then
+               echo mips-nec-sysv${UNAME_RELEASE}
+       else
+               echo mips-unknown-sysv${UNAME_RELEASE}
+       fi
+        exit 0 ;;
+    BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
+       echo powerpc-be-beos
+       exit 0 ;;
+    BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
+       echo powerpc-apple-beos
+       exit 0 ;;
+    BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
+       echo i586-pc-beos
+       exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+       echo sx4-nec-superux${UNAME_RELEASE}
+       exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+       echo sx5-nec-superux${UNAME_RELEASE}
+       exit 0 ;;
+    SX-6:SUPER-UX:*:*)
+       echo sx6-nec-superux${UNAME_RELEASE}
+       exit 0 ;;
+    Power*:Rhapsody:*:*)
+       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       exit 0 ;;
+    *:Rhapsody:*:*)
+       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+       exit 0 ;;
+    *:Darwin:*:*)
+       case `uname -p` in
+           *86) UNAME_PROCESSOR=i686 ;;
+           powerpc) UNAME_PROCESSOR=powerpc ;;
+       esac
+       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+       exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+       UNAME_PROCESSOR=`uname -p`
+       if test "$UNAME_PROCESSOR" = "x86"; then
+               UNAME_PROCESSOR=i386
+               UNAME_MACHINE=pc
+       fi
+       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+       exit 0 ;;
+    *:QNX:*:4*)
+       echo i386-pc-qnx
+       exit 0 ;;
+    NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk${UNAME_RELEASE}
+       exit 0 ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit 0 ;;
+    BS2000:POSIX*:*:*)
+       echo bs2000-siemens-sysv
+       exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+       exit 0 ;;
+    *:Plan9:*:*)
+       # "uname -m" is not consistent, so use $cputype instead. 386
+       # is converted to i386 for consistency with other x86
+       # operating systems.
+       if test "$cputype" = "386"; then
+           UNAME_MACHINE=i386
+       else
+           UNAME_MACHINE="$cputype"
+       fi
+       echo ${UNAME_MACHINE}-unknown-plan9
+       exit 0 ;;
+    *:TOPS-10:*:*)
+       echo pdp10-unknown-tops10
+       exit 0 ;;
+    *:TENEX:*:*)
+       echo pdp10-unknown-tenex
+       exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+       echo pdp10-dec-tops20
+       exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+       echo pdp10-xkl-tops20
+       exit 0 ;;
+    *:TOPS-20:*:*)
+       echo pdp10-unknown-tops20
+       exit 0 ;;
+    *:ITS:*:*)
+       echo pdp10-unknown-its
+       exit 0 ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+       exit 0 ;;
+    *:DRAGONFLY:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly${UNAME_RELEASE}
+       exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+         ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+       printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+       printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+       echo c1-convex-bsd
+       exit 0 ;;
+    c2*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit 0 ;;
+    c34*)
+       echo c34-convex-bsd
+       exit 0 ;;
+    c38*)
+       echo c38-convex-bsd
+       exit 0 ;;
+    c4*)
+       echo c4-convex-bsd
+       exit 0 ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.h b/config.h
new file mode 100644 (file)
index 0000000..76ba53b
--- /dev/null
+++ b/config.h
@@ -0,0 +1,351 @@
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.in by autoheader.  */
+/* "generated automatically" means DO NOT MAKE CHANGES TO config.h.in --
+ * make them to acconfig.h and rerun autoheader */
+
+/* Define if you have SSLeay 0.9.0b with the buggy cast128. */
+/* #undef HAVE_BUGGY_CAST128 */
+
+/* Define if you enable IPv6 support */
+#define INET6 1
+
+/* Define if you enable support for the libsmi. */
+/* #undef LIBSMI */
+
+/* Define if you have the <smi.h> header file.  */
+/* #undef HAVE_SMI_H */
+
+/* define if you have struct __res_state_ext */
+/* #undef HAVE_RES_STATE_EXT */
+
+/* define if your struct __res_state has the nsort member */
+/* #undef HAVE_NEW_RES_STATE */
+
+/*
+ * define if struct ether_header.ether_dhost is a struct with ether_addr_octet
+ */
+/* #undef ETHER_HEADER_HAS_EA */
+
+/* define if struct ether_arp contains arp_xsha */
+/* #undef ETHER_ARP_HAS_X */
+
+/* define if you have the addrinfo function. */
+#define HAVE_ADDRINFO 1
+
+/* define if you need to include missing/addrinfoh.h. */
+/* #undef NEED_ADDRINFO_H */
+
+/* define ifyou have the h_errno variable. */
+#define HAVE_H_ERRNO 1
+
+/* define if IN6ADDRSZ is defined (XXX not used!) */
+#define HAVE_IN6ADDRSZ 1
+
+/* define if INADDRSZ is defined (XXX not used!) */
+#define HAVE_INADDRSZ 1
+
+/* define if this is a development version, to use additional prototypes. */
+/* #undef HAVE_OS_PROTO_H */
+
+/* define if <unistd.h> defines __P() */
+/* #undef HAVE_PORTABLE_PROTOTYPE */
+
+/* define if RES_USE_INET6 is defined */
+#define HAVE_RES_USE_INET6 1
+
+/* define if struct sockaddr has the sa_len member */
+/* #undef HAVE_SOCKADDR_SA_LEN */
+
+/* define if you have struct sockaddr_storage */
+#define HAVE_SOCKADDR_STORAGE 1
+
+/* define if you have both getipnodebyname() and getipnodebyaddr() */
+/* #undef USE_GETIPNODEBY */
+
+/* define if you have ether_ntohost() and it works */
+/* #undef USE_ETHER_NTOHOST */
+
+/* define if libpcap has pcap_version */
+/* #undef HAVE_PCAP_VERSION */
+
+/* define if libpcap has pcap_debug */
+/* #undef HAVE_PCAP_DEBUG */
+
+/* define if libpcap has yydebug */
+/* #undef HAVE_YYDEBUG */
+
+/* define if libpcap has pcap_list_datalinks() */
+#define HAVE_PCAP_LIST_DATALINKS 1
+
+/* define if libpcap has pcap_set_datalink() */
+#define HAVE_PCAP_SET_DATALINK 1
+
+/* define if libpcap has pcap_datalink_name_to_val() */
+#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1
+
+/* define if libpcap has pcap_datalink_val_to_description() */
+#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1
+
+/* define if libpcap has pcap_dump_ftell() */
+#define HAVE_PCAP_DUMP_FTELL 1
+
+/* define if you have getrpcbynumber() */
+/* #undef HAVE_GETRPCBYNUMBER */
+
+/* define if unaligned memory accesses fail */
+#define LBL_ALIGN 1
+
+/* The successful return value from signal (?)XXX */
+#define RETSIGVAL 
+
+/* Define this on IRIX */
+/* #undef _BSD_SIGNALS */
+
+/* For HP/UX ANSI compiler? */
+/* #undef _HPUX_SOURCE */
+
+/* AIX hack. */
+/* #undef _SUN */
+
+/* Workaround for missing 64-bit formats */
+/* #undef PRId64 */
+/* #undef PRIo64 */
+/* #undef PRIx64 */
+/* #undef PRIu64 */
+
+/* Whether or not to include the possibly-buggy SMB printer */
+#define TCPDUMP_DO_SMB 1
+
+/* Long story short: aclocal.m4 depends on autoconf 2.13
+ * implementation details wrt "const"; newer versions
+ * have different implementation details so for now we
+ * put "const" here.  This may cause duplicate definitions
+ * in config.h but that should be OK since they're the same.
+ */
+/* #undef const */
+
+/* Define if you have the dnet_htoa function.  */
+/* #undef HAVE_DNET_HTOA */
+
+/* Define if you have a dnet_htoa declaration in <netdnet/dnetdb.h>.  */
+/* #undef HAVE_NETDNET_DNETDB_H_DNET_HTOA */
+
+/* define if should drop privileges by default */
+/* #undef WITH_USER */
+
+/* define if should chroot when dropping privileges */
+/* #undef WITH_CHROOT */
+
+/* Define to 1 if you have the `alarm' function. */
+#define HAVE_ALARM 1
+
+/* Define to 1 if you have the `bpf_dump' function. */
+#define HAVE_BPF_DUMP 1
+
+/* Define to 1 if you have the declaration of `ether_ntohost', and to 0 if you
+   don't. */
+#define HAVE_DECL_ETHER_NTOHOST 1
+
+/* Define to 1 if you have the `ether_ntohost' function. */
+#define HAVE_ETHER_NTOHOST 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `getaddrinfo' function. */
+/* #undef HAVE_GETADDRINFO */
+
+/* Define to 1 if you have the `getnameinfo' function. */
+/* #undef HAVE_GETNAMEINFO */
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `crypto' library (-lcrypto). */
+#define HAVE_LIBCRYPTO 1
+
+/* Define to 1 if you have the `rpc' library (-lrpc). */
+/* #undef HAVE_LIBRPC */
+
+/* Define to 1 if you have the `smi' library (-lsmi). */
+/* #undef HAVE_LIBSMI */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <netdnet/dnetdb.h> header file. */
+/* #undef HAVE_NETDNET_DNETDB_H */
+
+/* Define to 1 if you have the <netinet/ether.h> header file. */
+#define HAVE_NETINET_ETHER_H 1
+
+/* Define to 1 if you have the <netinet/if_ether.h> header file. */
+#define HAVE_NETINET_IF_ETHER_H 1
+
+/* Define to 1 if you have the <net/pfvar.h> header file. */
+/* #undef HAVE_NET_PFVAR_H */
+
+/* Define to 1 if you have the <openssl/evp.h> header file. */
+#define HAVE_OPENSSL_EVP_H 1
+
+/* Define to 1 if you have the `pcap_breakloop' function. */
+#define HAVE_PCAP_BREAKLOOP 1
+
+/* Define to 1 if you have the `pcap_dump_flush' function. */
+#define HAVE_PCAP_DUMP_FLUSH 1
+
+/* Define to 1 if you have the `pcap_findalldevs' function. */
+#define HAVE_PCAP_FINDALLDEVS 1
+
+/* Define to 1 if the system has the type `pcap_if_t'. */
+#define HAVE_PCAP_IF_T 1
+
+/* Define to 1 if you have the `pcap_lib_version' function. */
+#define HAVE_PCAP_LIB_VERSION 1
+
+/* Define to 1 if you have the `pfopen' function. */
+/* #undef HAVE_PFOPEN */
+
+/* Define to 1 if you have the <rpc/rpcent.h> header file. */
+/* #undef HAVE_RPC_RPCENT_H */
+
+/* Define to 1 if you have the `setlinebuf' function. */
+#define HAVE_SETLINEBUF 1
+
+/* Define to 1 if you have the `sigaction' function. */
+#define HAVE_SIGACTION 1
+
+/* Define to 1 if you have the `sigset' function. */
+/* #undef HAVE_SIGSET */
+
+/* Define to 1 if you have the <smi.h> header file. */
+/* #undef HAVE_SMI_H */
+
+/* Define to 1 if you have the `snprintf' function. */
+#define HAVE_SNPRINTF 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strftime' function. */
+#define HAVE_STRFTIME 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strlcat' function. */
+/* #undef HAVE_STRLCAT */
+
+/* Define to 1 if you have the `strlcpy' function. */
+/* #undef HAVE_STRLCPY */
+
+/* Define to 1 if you have the `strsep' function. */
+#define HAVE_STRSEP 1
+
+/* Define to 1 if the system has the type `struct ether_addr'. */
+/* #undef HAVE_STRUCT_ETHER_ADDR */
+
+/* Define to 1 if you have the <sys/bitypes.h> header file. */
+/* #undef HAVE_SYS_BITYPES_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `vfprintf' function. */
+#define HAVE_VFPRINTF 1
+
+/* Define to 1 if you have the `vsnprintf' fu