From df4531fda77d3b08f37d7a8cf47efbaf0ba00ae2 Mon Sep 17 00:00:00 2001 From: llsth Date: Sat, 5 Mar 2016 11:31:07 +0100 Subject: [PATCH] Updated documentation --- CHANGES | 88 ------------- CONTACT | 15 --- FILES | 40 ------ LICENSE => LICENCE | 2 + README | 33 ----- README.md | 18 +++ dnstracer.8 => doc/dnstracer.8 | 0 doc/dnstracer.help | 92 ++++++++++++++ dnstracer.spec => doc/dnstracer.spec | 0 doc/dnstracer.txt | 92 ++++++++++++++ workman => doc/workman | 0 fping_amiga.c | 179 --------------------------- 12 files changed, 204 insertions(+), 355 deletions(-) delete mode 100644 CHANGES delete mode 100644 CONTACT delete mode 100644 FILES rename LICENSE => LICENCE (95%) delete mode 100644 README create mode 100644 README.md rename dnstracer.8 => doc/dnstracer.8 (100%) create mode 100644 doc/dnstracer.help rename dnstracer.spec => doc/dnstracer.spec (100%) create mode 100644 doc/dnstracer.txt rename workman => doc/workman (100%) delete mode 100644 fping_amiga.c diff --git a/CHANGES b/CHANGES deleted file mode 100644 index 679d0e0..0000000 --- a/CHANGES +++ /dev/null @@ -1,88 +0,0 @@ -$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 - - - 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 regarding - sprintf()'s without format-strings (yes, I feel ashamed). - - On request of Anthony DeRobertis , - via Thomas Seyrat , 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 - - 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 ) - - support for /etc/resolv.conf via a patch from Moritz - Barsnick - - -s . will take A.ROOT-SERVERS.NET - - autoconf/automake support... *shudder* - - support for different query-classes. - - Gerd v. Egidy 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 diff --git a/CONTACT b/CONTACT deleted file mode 100644 index e564f11..0000000 --- a/CONTACT +++ /dev/null @@ -1,15 +0,0 @@ -$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. diff --git a/FILES b/FILES deleted file mode 100644 index e1733ce..0000000 --- a/FILES +++ /dev/null @@ -1,40 +0,0 @@ -$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) diff --git a/LICENSE b/LICENCE similarity index 95% rename from LICENSE rename to LICENCE index 0cc8c50..99a3661 100644 --- a/LICENSE +++ b/LICENCE @@ -22,3 +22,5 @@ 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. + +Detailed license info can be found in supplied source files. diff --git a/README b/README deleted file mode 100644 index 210a9f0..0000000 --- a/README +++ /dev/null @@ -1,33 +0,0 @@ -$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 ) - -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 diff --git a/README.md b/README.md new file mode 100644 index 0000000..7f22407 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +##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. + +##EXAMPLE OF USAGE + +Show trace of DNS for google.com using A.ROOT-SERVERS.NET +> dnstrace google.com + +##FURTHER INFORMATION + +The 13 root name servers are operated by 12 independent organisations. +More information is available from: http://www.root-servers.org/ + +Google also operates 2 public DNS servers: +https://developers.google.com/speed/public-dns/ diff --git a/dnstracer.8 b/doc/dnstracer.8 similarity index 100% rename from dnstracer.8 rename to doc/dnstracer.8 diff --git a/doc/dnstracer.help b/doc/dnstracer.help new file mode 100644 index 0000000..63ef8c3 --- /dev/null +++ b/doc/dnstracer.help @@ -0,0 +1,92 @@ +DNSTRACER(8) General Commands Manual DNSTRACER(8) + +NAME + dnstracer - trace a chain of DNS servers to the source + +SYNOPSIS + dnstracer [options] name + +DESCRIPTION + 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: + + -c Disable local caching. + + -C Enable negative caching. + + -o Enable overview of received answers at the end. + + -q 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. + + -r retries + Number of retries for DNS requests, default 3. + + -s 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. + + -v Be verbose on what sent or received. + + -4 Use only IPv4 servers, don't query IPv6 servers (only available + when IPv6 support hasn't been disabled) + + -S sourceaddress + Use this as source-address for the outgoing packets. + +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. + +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 "-s" . "-q" mx mavetju.org + + Search for the PTR record (hostname) of 212.204.230.141: + + dnstracer "-q" ptr 141.230.204.212.in-addr.arpa + + And for IPv6 addresses: + + dnstracer "-q" ptr "-s" . "-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 + +SEE ALSO + ntptrace(8), traceroute(8), dig(1) + +AUTHOR + Edwin Groothuis, edwin@mavetju.org (http://www.mavetju.org) + + See http://www.mavetju.org/contacts.php for mailing-lists. + +February 10, 2008 February 10, 2008 DNSTRACER(8) diff --git a/dnstracer.spec b/doc/dnstracer.spec similarity index 100% rename from dnstracer.spec rename to doc/dnstracer.spec diff --git a/doc/dnstracer.txt b/doc/dnstracer.txt new file mode 100644 index 0000000..03b11b2 --- /dev/null +++ b/doc/dnstracer.txt @@ -0,0 +1,92 @@ +DNSTRACER(8) General Commands Manual DNSTRACER(8) + +NAME + dnstracer - trace a chain of DNS servers to the source + +SYNOPSIS + dnstracer [options] name + +DESCRIPTION + 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: + + -c Disable local caching. + + -C Enable negative caching. + + -o Enable overview of received answers at the end. + + -q 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. + + -r retries + Number of retries for DNS requests, default 3. + + -s 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. + + -v Be verbose on what sent or received. + + -4 Use only IPv4 servers, don't query IPv6 servers (only available + when IPv6 support hasn't been disabled) + + -S sourceaddress + Use this as source-address for the outgoing packets. + +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. + +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 "-s" . "-q" mx mavetju.org + + Search for the PTR record (hostname) of 212.204.230.141: + + dnstracer "-q" ptr 141.230.204.212.in-addr.arpa + + And for IPv6 addresses: + + dnstracer "-q" ptr "-s" . "-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 + +SEE ALSO + ntptrace(8), traceroute(8), dig(1) + +AUTHOR + Edwin Groothuis, edwin@mavetju.org (http://www.mavetju.org) + + See http://www.mavetju.org/contacts.php for mailing-lists. + +February 10, 2008 February 10, 2008 DNSTRACER(8) diff --git a/workman b/doc/workman similarity index 100% rename from workman rename to doc/workman diff --git a/fping_amiga.c b/fping_amiga.c deleted file mode 100644 index 827cfcd..0000000 --- a/fping_amiga.c +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Written by Carsten Larsen. - * Public domain. - */ - -#include -#include -#include -#include -#include -#include -#include - -#define OPEN_ERROR "Cannot open %s.\n" -#define OPEN_VER_ERROR "Cannot open %s (%d.0)\n" -#define DOSLIB_NAME "dos.library" -#define DOSLIB_REV 37L -#define BSDLIB_NAME "bsdsocket.library" -#define BSDLIB_REV 03L -#define UTILLIB_NAME "utility.library" -#define UTILLIB_REV 37L -#define TIMER_NAME TIMERNAME -#define LIB_ERROR 4 - -#include "config.h" -const char *vers = "\0$VER: " PACKAGE_NAME " " PACKAGE_VERSION " (21.02.2016)"; - -#include -#ifdef AOS3 -uid_t getuid () { - return 1; -} - -int setuid (uid_t id) { - return 1; -} - -int h_errno; -#endif - -struct Library* DOSBase = NULL; -struct Library* SocketBase = NULL; -struct Library* UtilityBase = NULL; -struct Device* TimerBase = NULL; -struct timerequest* TimeRequest = NULL; - -int create_timer(); -void delete_timer(); - -void amiga_open_error(char *name) -{ - printf(OPEN_ERROR, name); -} - -void amiga_open_lib_error(char *name, int version) -{ - printf(OPEN_VER_ERROR, name, version); -} - -void close_libs() -{ - close_ping_socket(); - cleanup_ping_buffer(); - - if (TimerBase != NULL) { - delete_timer(); - } - - if (UtilityBase != NULL) { - CloseLibrary(UtilityBase); - UtilityBase = NULL; - } - - if (SocketBase != NULL) { - CloseLibrary(SocketBase); - SocketBase = NULL; - } - - if (DOSBase != NULL) { - CloseLibrary(DOSBase); - DOSBase = NULL; - } - - freeall(); -} - -int open_libs() -{ - struct timeval tv; - - atexit(close_libs); - InitSemaphore(&GetaddrinfoSemaphore); - - if(!(DOSBase = OpenLibrary((STRPTR)DOSLIB_NAME, DOSLIB_REV))) { - amiga_open_lib_error(DOSLIB_NAME, DOSLIB_REV); - return LIB_ERROR; - } - - if(!(SocketBase = OpenLibrary((STRPTR)BSDLIB_NAME, BSDLIB_REV))) { - amiga_open_lib_error(BSDLIB_NAME, BSDLIB_REV); - return LIB_ERROR; - } else { - SocketBaseTags( - SBTM_SETVAL(SBTC_ERRNOPTR(sizeof(errno))), (IPTR) &errno, - SBTM_SETVAL(SBTC_HERRNOLONGPTR), (IPTR) &h_errno, - SBTM_SETVAL(SBTC_LOGTAGPTR), (IPTR) &prog, - TAG_DONE ); - } - - if(!(UtilityBase = OpenLibrary((STRPTR)UTILLIB_NAME, UTILLIB_REV))) { - amiga_open_lib_error(UTILLIB_NAME, UTILLIB_REV); - return LIB_ERROR; - } - - if (create_timer() != 0) { - amiga_open_error(TIMER_NAME); - return LIB_ERROR; - } - - getsystime(&tv); - srand(tv.tv_usec); - - return 0; -} - -int create_timer() -{ - LONG error; - struct MsgPort *port = CreatePort(0, 0); - if (port == NULL) - return 1; - - TimeRequest = (struct timerequest*)CreateExtIO(port, sizeof(struct timerequest)); - if (TimeRequest == NULL) - { - DeletePort(port); - return 1; - } - - error = OpenDevice( - (STRPTR)TIMER_NAME, UNIT_MICROHZ, - (struct IORequest*)TimeRequest, 0L - ); - - if (error != 0) - { - delete_timer(TimeRequest); - return 1; - } - - TimerBase = (struct Device*)TimeRequest->tr_node.io_Device; - - return 0; -} - -void delete_timer() -{ - struct MsgPort *port; - if (TimeRequest == NULL) - return; - - port = TimeRequest->tr_node.io_Message.mn_ReplyPort; - - if (port != 0) - DeletePort(port); - - CloseDevice((struct IORequest*)TimeRequest); - DeleteExtIO((struct IORequest*)TimeRequest); -} - -int getsystime(struct timeval *tv) -{ - struct timeval tv1; - - GetSysTime(&tv1); - *tv = tv1; - - return 0; -}