Commit 3ac324ad authored by Devon Kearns's avatar Devon Kearns

Imported Upstream version 1.9

parents
$Id: CHANGES,v 1.26 2004/07/08 08:19:58 mavetju Exp $
Version 1.9:
- With the rollout of IPv6 for a.root-servers.net, it always
took the IPv6 address even if you used the -4 option.
- Fix false lame server issues with domains which have the
higher domain in it (command.com for example).
Version 1.8.1:
- Put back timeout command line parameter, it will be the
maximum time to wait instead of an increasing one.
Version 1.8:
- Better handling of timeout (instead of a static value,
start with five seconds and double it each retry)
- Warnings are printed if you receive a different RR type
than the one you asked for (for example when you ask for
an A record and receive a CNAME)
- Fixed problems when records received in the authority
field are shorter than the domain the nameserver is
authoritative for.
- When compiled without IPv6 support on an IPv6 capable
machine the machine tried to query the IPv6 translated
IPv5 address anyway.
- -C caches hosts which haven't answered too.
Version 1.7.1:
- Fix display of SOA serial number, by Janne Snabb
<snabb@epipe.com>
- Non-IPv6 builds should not use gethostbyname2()
Version 1.7:
- Removed a debug-line while doing PTR requests.
- Now IPv6 servers are traced too. Use -4 to disable it.
- Added -S option for specifying source IP address.
version 1.6:
- Added SOA record tracing
- Fixed a debug duplicate variable printing.
version 1.5:
- Sometimes it happened while tracing a name without
specifying a server it would return immediatly without
printing any information.
- names with a trailing dot are now handled correctly.
- warning from Kris Kennaway <kris@obsecurity.org> regarding
sprintf()'s without format-strings (yes, I feel ashamed).
- On request of Anthony DeRobertis <asd@suespammers.org>,
via Thomas Seyrat <tomasera@debian.org>, support for PTR
records.
version 1.4:
- Added -Wall to Makefile.am so at least I would get warnings
from my C compiler thank you. Removed some stupid unused
variables.
- Fixed big/little endian problem in the structs so that the
flags are looking allright now.
- Answers are displayed as authoritative or normal.
- Digging goes on until we have hit an authorative server.
- Info about which zone is being queried now.
version 1.3:
- added win32 support by Mike Black <mblack@csihq.com>
- fixed bug where the IP addresses in the resource records
wouldn't be used.
- when an authority NS record wouldn't have an additional
A record it can get multiple IP addresses when it resolves
the hostname in the gethostbyname(). This is now handled
correctly.
version 1.2:
- renamed into dnstracer due to clash with DJBDNS's dnstracer.
- dnstracer would segfault if nameserver name couldn't be
resolved (by Vilhelm Bergman <d96v@dtek.chalmers.se>)
- support for /etc/resolv.conf via a patch from Moritz
Barsnick <moritz@barsnick.net>
- -s . will take A.ROOT-SERVERS.NET
- autoconf/automake support... *shudder*
- support for different query-classes.
- Gerd v. Egidy <egidy@deam.de> gave it RPM capabilities
and checked the automake/autoconf construction.
version 1.1:
- fixed problems for big-endian little-endian machines.
- fixed linking problem on Solaris. Use Makefile.sun for them.
version 1.0:
- initial release
$Id: CONTACT,v 1.1 2002/01/21 00:40:23 mavetju Exp $
HOW TO CONTACT
Via email: edwin@mavetju.org
Via snail-mail: Edwin Groothuis
7 Islington Crescent
Greenacre NSW2190
AUSTRALIA
I have two mailing-lists:
announce@lists.mavetju.org <- low traffic announcements only
questions@lists.mavetju.org <- general questions
See http://www.mavetju.org/contacts.php on how to subscribe to them.
$Id: FILES,v 1.1 2002/01/25 01:40:09 mavetju Exp $
General
-------
CHANGES - Change log
CONTACT - How to contact me
FILES - This file
LICENSE - License under which this software is distributed
README - Small manual
Auto-configuration
------------------
Makefile.am - My Makefile-template
configure.in - My configure-template
Makefile.in - (Created by automake)
aclocal.m4 - (Needed by autoconf)
config.guess - (Needed by configure)
config.sub - (Needed by configure)
configure - Configure-file
depcomp - (Needed by configure)
install-sh - (Needed by configure)
missing - (Needed by configure)
mkinstalldirs - (Needed by configure)
Source-file
-----------
dnstracer.8 - Man-page, obtained from dnstracer.pod
dnstracer.c - The source-file
dnstracer.pod - The original man-file
dnstracer.spec - Needed for RPM creation
dnstracer_broken.h - Contains values for enumerations in case they
are not defined in arpa/nameser.h
WIN32 compatibility
-------------------
MSVC.BAT - Microsoft Visual C++ mini-makefile
getopt.c - Visual C++ doesn't provide these routines
getopt.h - Visual C++ doesn't provide these routines
(between brackets: not important, part of autoconfigure)
Copyright 2002, 2003, 2004 by Edwin Groothuis, edwin@mavetju.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.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
rem
rem $Id: MSVC.BAT,v 1.1 2002/01/25 00:38:18 mavetju Exp $
rem
rem mini-Makefile for dnstracer with Microsoft Visual C++
rem Supplied by Mike Black <mblack@csihq.com>
rem
cl /DWIN32 dnstracer.c getopt.c wsock32.lib
bin_PROGRAMS = dnstracer
dnstracer_SOURCES = dnstracer.c dnstracer-broken.h
man_MANS = dnstracer.8
@NOIPV6_TRUE@AM_CFLAGS= -DNOIPV6
dnstracer.8: dnstracer.pod
$(PERL2MAN_RULE)
PERL2MAN_RULE = \
pod2man --release="February 10, 2008" --date="February 10, 2008" --center="General Commands Manual" --section=8 $? > $@
This diff is collapsed.
$Id: README,v 1.8 2003/01/06 22:40:31 mavetju Exp $
WHAT IS DNSTRACER?
Dnstracer determines where a given Domain Name Server (DNS) gets
its information from, and follows the chain of DNS servers back to
the servers which know the data.
Its behaviour is similair to ntptrace(8), which does it for the
NTP protocol.
HOW TO INSTALL?
In theory, run 'configure', 'make' and 'make install' should be
enough to install the binary and the man-page. I've developed it
under FreeBSD 4.4 and tested it on Debian, SunOS and Solaris. Due
to the nature of autoconf and friends, you need GNU Make.
If you don't want to have IPv6 support in it, run configure with
the --disable-ipv6 option.
Windows users with Microsoft Visual C++ please use MSVB.BAT (supplied
by Mike Black <mblack@csihq.com>)
LICENSE
BSD license. See the file LICENSE for more information.
CONTACT
My email address is edwin@mavetju.org
My website is http://www.mavetju.org
Mailing-lists are available: http://www.mavetju.org/contacts.php
This diff is collapsed.
This diff is collapsed.
# This file was created by autom4te.
# It contains the lists of macros which have been traced.
# It can be safely removed.
@request = (
bless( [
'0',
1,
[
'/usr/local/share/autoconf'
],
[
'--reload-state=/usr/local/share/autoconf/autoconf/autoconf.m4f',
'aclocal.m4',
'configure.in'
],
{
'AC_HEADER_STAT' => 1,
'AC_FUNC_STRFTIME' => 1,
'AC_PROG_RANLIB' => 1,
'AC_FUNC_WAIT3' => 1,
'AC_FUNC_SETPGRP' => 1,
'AC_HEADER_TIME' => 1,
'AC_FUNC_SETVBUF_REVERSED' => 1,
'AC_HEADER_SYS_WAIT' => 1,
'AC_TYPE_UID_T' => 1,
'AM_CONDITIONAL' => 1,
'AC_CHECK_LIB' => 1,
'AC_PROG_LN_S' => 1,
'AC_FUNC_MEMCMP' => 1,
'AC_FUNC_FORK' => 1,
'AC_FUNC_GETGROUPS' => 1,
'AC_HEADER_MAJOR' => 1,
'AC_FUNC_STRTOD' => 1,
'AC_HEADER_DIRENT' => 1,
'AC_FUNC_UTIME_NULL' => 1,
'AC_CONFIG_FILES' => 1,
'AC_FUNC_ALLOCA' => 1,
'AC_C_CONST' => 1,
'include' => 1,
'AC_FUNC_OBSTACK' => 1,
'AC_FUNC_LSTAT' => 1,
'AC_STRUCT_TIMEZONE' => 1,
'AC_FUNC_GETPGRP' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'AC_CHECK_HEADERS' => 1,
'AC_TYPE_MODE_T' => 1,
'AC_CHECK_TYPES' => 1,
'AC_PROG_YACC' => 1,
'AC_TYPE_PID_T' => 1,
'AC_FUNC_STRERROR_R' => 1,
'AC_STRUCT_ST_BLOCKS' => 1,
'AC_PROG_GCC_TRADITIONAL' => 1,
'AC_TYPE_SIGNAL' => 1,
'AC_FUNC_FNMATCH' => 1,
'AC_PROG_CPP' => 1,
'AM_PROG_LIBTOOL' => 1,
'AC_FUNC_STAT' => 1,
'AC_PROG_INSTALL' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_FUNC_STRCOLL' => 1,
'AC_LIBSOURCE' => 1,
'AC_C_INLINE' => 1,
'AC_FUNC_CHOWN' => 1,
'AC_PROG_LEX' => 1,
'AH_OUTPUT' => 1,
'AC_HEADER_STDC' => 1,
'AC_FUNC_GETLOADAVG' => 1,
'AC_CHECK_FUNCS' => 1,
'AC_TYPE_SIZE_T' => 1,
'AC_DECL_SYS_SIGLIST' => 1,
'AC_FUNC_MKTIME' => 1,
'AC_PROG_MAKE_SET' => 1,
'AC_PROG_CXX' => 1,
'm4_pattern_allow' => 1,
'm4_include' => 1,
'AC_PROG_AWK' => 1,
'm4_pattern_forbid' => 1,
'AC_FUNC_VPRINTF' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_PATH_X' => 1,
'AC_TYPE_OFF_T' => 1,
'AC_FUNC_MALLOC' => 1,
'AC_FUNC_ERROR_AT_LINE' => 1,
'AC_FUNC_FSEEKO' => 1,
'AC_FUNC_MMAP' => 1,
'AC_STRUCT_TM' => 1,
'AC_SUBST' => 1,
'AC_PROG_CC' => 1,
'AC_PROG_LIBTOOL' => 1
}
], 'Request' )
);
This diff is collapsed.
This diff is collapsed.
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you have the `gethostbyname' function. */
#undef HAVE_GETHOSTBYNAME
/* Define to 1 if you have the `inet_ntoa' function. */
#undef HAVE_INET_NTOA
/* Define to 1 if you have the `inet_pton' function. */
#undef HAVE_INET_PTON
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `nsl' library (-lnsl). */
#undef HAVE_LIBNSL
/* Define to 1 if you have the `resolv' library (-lresolv). */
#undef HAVE_LIBRESOLV
/* Define to 1 if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define to 1 if you have the <resolv.h> header file. */
#undef HAVE_RESOLV_H
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
/* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
/* Define to 1 if you have the `strdup' function. */
#undef HAVE_STRDUP
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Version number of package */
#undef VERSION
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
This diff is collapsed.
This diff is collapsed.
dnl
dnl dnstracer configure.in. Scary... very scary.
dnl
dnl autoscan && aclocal && autoheader && autoconf && automake
dnl rm -rf Makefile autom4te.cache autoscan.log config.h config.h.in~
dnl rm -rf config.log config.status configure.scan stamp-*
dnl
AC_INIT(dnstracer.c)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(dnstracer,1.7)
AC_PROG_CC
AC_PROG_INSTALL
AC_C_BIGENDIAN
AC_ARG_ENABLE(
ipv6,
[ --disable-ipv6 Disable IPv6 support],
[
case "${enableval}" in
yes) ipv6=true;;
no) echo "Disabling support for IPv6 queries"
ipv6=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-ipv6) ;;
esac],
[ipv6=yes]
)
AM_CONDITIONAL(NOIPV6,test x$ipv6 = xfalse)
AC_CHECK_FUNC(inet_ntoa, [], AC_CHECK_LIB(resolv, inet_ntoa))
AC_CHECK_FUNC(socket, [], AC_CHECK_LIB(socket, socket))
AC_CHECK_FUNC(gethostbyname, [], AC_CHECK_LIB(nsl, gethostbyname))
AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h resolv.h])
AC_CHECK_FUNCS([gethostbyname inet_ntoa inet_pton memset select socket strcasecmp strchr strdup])
AC_OUTPUT(Makefile)
# Process this file with autoconf to produce a configure script.
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_AWK
# Checks for libraries.
# FIXME: Replace `main' with a function in `-le':
AC_CHECK_LIB([e], [main])
# FIXME: Replace `main' with a function in `-links':
AC_CHECK_LIB([inks], [main])
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_TIME
# Checks for library functions.
AC_CHECK_FUNCS([gethostbyname inet_ntoa memset select socket strcasecmp strchr strdup])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#
# $Id: dnstracer.pod,v 1.19 2004/07/08 11:15:42 mavetju Exp $
#
=head1 NAME
B<dnstracer> - trace a chain of DNS servers to the source
=head1 SYNOPSIS
B<dnstracer> [B<options>] I<name>
=head1 DESCRIPTION
B<dnstracer> determines where a given Domain Name Server (DNS) gets
its information from, and follows the chain of DNS servers back to
the servers which know the data.
Options are:
=over 8
=item B<-c>
Disable local caching.
=item B<-C>
Enable negative caching.
=item B<-o>
Enable overview of received answers at the end.
=item B<-q I<queryclass>>
Change the query-class, default is A. You can either specify a
number of the type (if you're brave) or one of the following strings:
a, aaaa, a6, soa, cname, hinfo, mx, ns, txt and ptr.
=item B<-r I<retries>>
Number of retries for DNS requests, default 3.
=item B<-s I<server>>
DNS server to use for the initial request, default is aquired from
the system. If a dot is specified (.), A.ROOT-SERVERS.NET will be
used.
=item B<-v>
Be verbose on what sent or received.
=item B<-4>
Use only IPv4 servers, don't query IPv6 servers (only available
when IPv6 support hasn't been disabled)
=item B<-S I<sourceaddress>>
Use this as source-address for the outgoing packets.
=back
=head1 HOW IT WORKS
It sends the specified name-server a non-recursive request for the
name.
Non-recursive means: if the name-server knows it, it will return
the data requested. If the name-server doesn't know it, it will
return pointers to name-servers that are authoritive for the domain
part in the name or it will return the addresses of the root
name-servers.
If the name server does returns an authoritative answer for the name,
the next server is queried. If it returns an non-authoritative
answer for the name, the name servers in the authority records will
be queried.
The program stops if all name-servers are queried.
Make sure the server you're querying doesn't do forwarding towards
other servers, as dnstracer is not able to detect this for you.
It detects so called lame servers, which are name-servers which has
been told to have information about a certain domain, but don't
have this information.
=head1 EXAMPLES
Search for the A record of www.mavetju.org on your local nameserver:
dnstracer www.mavetju.org
Search for the MX record of mavetju.org on the root-nameservers:
dnstracer C<-s> . C<-q> mx mavetju.org
Search for the PTR record (hostname) of 212.204.230.141:
dnstracer C<-q> ptr 141.230.204.212.in-addr.arpa
And for IPv6 addresses:
dnstracer C<-q> ptr C<-s> . C<-o> 2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.6.4.0.2.0.0.0.0.8.b.0.e.f.f.3.ip6.int
=head1 SEE ALSO
ntptrace(8), traceroute(8), dig(1)
=head1 AUTHOR
Edwin Groothuis, edwin@mavetju.org (http://www.mavetju.org)
See http://www.mavetju.org/contacts.php for mailing-lists.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
timestamp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment