Commit graph

454 commits

Author SHA1 Message Date
Evan Hunt
31d95f1095 [master] typo in dig 2013-06-19 15:21:20 -07:00
Mark Andrews
93aba6dcec 3561. [bug] dig: issue a warning if an EDNS query returns FORMERR
or NOTIMP.  Adjust usage message. [RT #33363]
2013-05-01 14:53:16 +10:00
Mark Andrews
550c92405f 3515. [port] '%T' is not portable in strftime(). [RT #32763] 2013-03-06 15:34:10 +11:00
Tinderbox User
7b5130bd12 update copyright notice 2013-03-04 23:46:20 +00:00
Evan Hunt
19b037bcb9 [master] dig -u: microsecond time output
3513.	[func]		"dig -u" prints times in microseconds rather than
			milliseconds. [RT #32704]
2013-03-04 12:09:28 -08:00
Mark Andrews
0524248a3b signed/unsigned comparision 2012-11-30 23:35:34 +11:00
Tinderbox User
600cfd566a update copyright notice 2012-11-29 23:45:50 +00:00
Evan Hunt
706219e547 [master] add timezone to dig
3428.	[cleanup]	dig: Add timezone to date output. [RT #2269]
2012-11-29 09:07:28 -08:00
Evan Hunt
2f21adbc6a [master] fix dig +trace output
3427.	[bug]		dig +trace incorrectly displayed name server
			addresses instead of names. [RT #31641]
2012-11-28 19:05:50 -08:00
Evan Hunt
28c2bc2026 3237. [bug] dig -6 didn't work with +trace. [RT #26906] 2011-12-07 17:23:28 +00:00
Evan Hunt
59c79d8cc8 shorten an 81-char line in dig -h 2011-11-04 14:19:17 +00:00
Mark Andrews
3fb5bccf59 3205. [func] Upgrade dig's defaults to better reflect modern
nameserver behaviour.  Enable "dig +adflag" and
                        "dig +edns=0" by default.  Enable "+dnssec" when
                        running "dig +trace". [RT #23497]
2011-11-04 10:41:38 +00:00
Mark Andrews
0874abad14 3069. [cleanup] Silence warnings messages from clang static analysis.
[RT #20256]
2011-03-11 06:11:27 +00:00
Automatic Updater
0e27506ce3 update copyright notice 2011-03-05 23:52:31 +00:00
Evan Hunt
9a859983d7 3062. [func] Made several changes to enhance human readability
of DNSSEC data in dig output and in generated
			zone files:
			 - DNSKEY record comments are more verbose, no
			   longer used in multiline mode only
			 - multiline RRSIG records reformatted
			 - multiline output mode for NSEC3PARAM records
			 - "dig +norrcomments" suppresses DNSKEY comments
			 - "dig +split=X" breaks hex/base64 records into
			   fields of width X; "dig +nosplit" disables this.
			[RT #22820]
2011-03-05 19:39:07 +00:00
Automatic Updater
c8175ece69 update copyright notice 2011-03-01 23:48:07 +00:00
Evan Hunt
7cc5632595 3042. [bug] dig +trace could fail attempting to use IPv6
addresses on systems with only IPv4 connectivity.
			[RT #23797]
2011-02-25 23:11:13 +00:00
Mark Andrews
e18c62b1da 2888. [bug] Only the first EDNS option was displayed. [RT #21273] 2010-05-13 00:40:46 +00:00
Mark Andrews
108300f7f1 2883. [bug] 'dig +short' failed to handle really large datasets.
[RT #21113]
2010-05-12 01:31:37 +00:00
Automatic Updater
4d42b714be update copyright notice 2010-03-04 23:50:34 +00:00
Mark Andrews
13396661f4 2854. [func] dig: allow the final soa record in a axfr response to
be suppressed, dig +onesoa. [RT #20929]
2010-03-04 05:18:04 +00:00
Evan Hunt
1210799345 Add /* NOTREACHED */ comments 2009-10-03 18:03:54 +00:00
Francis Dupont
debd489a44 noreturn RT #20257 2009-09-29 15:06:07 +00:00
Evan Hunt
8436cc14ba 2684. [cleanup] dig: formalize +ad and +cd as synonyms for
+adflag and +cdflag.  [RT #19305]
2009-09-23 06:21:36 +00:00
Evan Hunt
d514c0dc9b 2679. [func] dig -k can now accept TSIG keys in named.conf
format.  [RT #20031]
2009-09-15 03:13:44 +00:00
Francis Dupont
d302a620e0 Fix unknown extended rcodes in dig 2009-05-06 10:16:32 +00:00
Mark Andrews
00f8377316 2535. [bug] dig +showsearh and +trace interacted badly. [RT #19091] 2009-01-22 05:06:33 +00:00
Automatic Updater
d362465c77 update copyright notice 2009-01-17 23:47:43 +00:00
Francis Dupont
db874a7b5c spelling 2009-01-17 09:58:29 +00:00
Automatic Updater
14c86fa67a update copyright notice 2008-10-28 23:47:06 +00:00
Mark Andrews
a21884ae7b 2477 [bug] dig: the global option to print the command line is
+cmd not print_cmd.  Update the output to reflect
                        this. [RT #17008]
2008-10-28 03:32:59 +00:00
Mark Andrews
7ca1016560 make the arrays rcodetext and opcodetext readonly 2008-10-15 02:16:51 +00:00
Jeremy Reed
0db6bf459f Document -m (enable memory usage debugging) option for dig. [RT #18757] 2008-10-13 21:18:56 +00:00
Mark Andrews
db30f4bdcb 2353. [func] Add support for Name Server ID (RFC 5001).
'dig +nsid' requests NSID from server.
                        'request-nsid yes;' causes recursive server to send
                        NSID requests to upstream servers.  Server responds
                        to NSID requests with the string configured by
                        'server-id' option.  [RT #17091]
2008-04-03 02:01:08 +00:00
Automatic Updater
6b3c17b9b0 update copyright notice 2008-02-05 23:47:08 +00:00
Mark Andrews
4a5b30c24c 2329. [bug] Clearer help text for dig's '-x' and '-i' options. 2008-02-05 06:57:52 +00:00
Mark Andrews
9e4b25fc3e 2275. [func] Add support to dig to perform IXFR queries over UDP.
[RT #17235]
2007-12-03 00:21:48 +00:00
Automatic Updater
ec5347e2c7 update copyright notice 2007-06-18 23:47:57 +00:00
Mark Andrews
a9c790c7dd 2166. [bug] When running in batch mode, dig could misinterpret
a server address as a name to be looked up, causing
                        unexpected output. [RT #16743]
(continued)
2007-04-03 23:06:39 +00:00
Automatic Updater
184d77489a update copyright notice 2007-03-30 23:46:45 +00:00
Evan Hunt
99cce386a4 When running in batch mode, dig could misinterpret a server address as
a name to be looked up, causing unexpected output. [RT #16743]
2007-03-30 03:46:13 +00:00
Mark Andrews
2b67af24fa 2056. [bug] dig: ixfr= was not being treated case insensitively
at all times. [RT #15955]
2006-07-21 23:50:15 +00:00
Mark Andrews
a24742821b recusion -> recursion 2006-05-15 06:10:58 +00:00
Mark Andrews
c6d4f78152 1973. [func] TSIG HMACSHA1, HMACSHA224, HMACSHA256, HMACSHA384 and
HMACSHA512 support. [RT #13606]
2006-01-27 02:35:15 +00:00
Mark Andrews
141132c272 update copyright notice 2006-01-07 00:23:35 +00:00
Mark Andrews
9a33e2d135 I1965. [func] Suppress spurious "recusion requested but not
available" warning with 'dig +qr'. [RT #15780].
2006-01-06 00:13:30 +00:00
Mark Andrews
16ee4fe11b 1930. [port] HPUX: ia64 support. [RT #15473]
1929.   [port]          FreeBSD: extend use of PTHREAD_SCOPE_SYSTEM.
2005-10-14 01:14:08 +00:00
Mark Andrews
715361d0c3 1917. [func] dig now warns if 'RA' is not set in the answer when
'RD' was set in the query.  host/nslookup skip servers
                        that fail to set 'RA' when 'RD' is set unless a server
                        is explicitly set.  [RT #15005]
2005-08-25 00:40:50 +00:00
Mark Andrews
a268fec7f5 1915. [func] dig now has a '-q queryname' and '+showsearch' options.
[RT #15034]
2005-08-25 00:17:46 +00:00
Mark Andrews
42b37d29c7 1894. [func] dig: report the number of extra bytes still left in
the packet after processing all the records.

1893.   [cleanup]       dighost.c: move external declarations into <dig/dig.h>.
2005-07-04 03:03:21 +00:00
Mark Andrews
1fc4793844 1879. [func] Added framework for handling multiple EDNS versions.
1878.   [func]          dig can now specify the EDNS version when making
                        a query.
2005-06-07 00:16:01 +00:00
Rob Austein
ab023a6556 1851. [doc] Doxygen comment markup. [RT #11398] 2005-04-27 04:57:32 +00:00
Mark Andrews
fcf6c62ab4 update copyright notice 2005-03-31 23:54:46 +00:00
Mark Andrews
b514e0cd0e 1841. [bug] "dig +nssearch" now makes a recursive query to
find the list of nameservers to query. [RT #13694]
2005-03-31 02:36:05 +00:00
Mark Andrews
81e6a5849d 1748. [func] dig now returns the byte count for axfr/ixfr. 2004-10-21 01:44:24 +00:00
Mark Andrews
3e15f55914 move the calculation of remaining 2004-09-16 02:12:37 +00:00
Mark Andrews
ffcbf9ea91 silence compiler warnings 2004-09-16 01:01:27 +00:00
Mark Andrews
9678a61917 indenting 2004-09-06 06:22:35 +00:00
Mark Andrews
3f79a8b6f1 1714. [bug] dig/host/nslookup were only trying the first
address when a nameserver was specified by name.
                        [RT #12286]
2004-09-06 01:24:44 +00:00
Mark Andrews
a4743d3d26 1712. [bug] Missing FULLCHECK for "trusted-key" in dig. 2004-09-03 03:55:20 +00:00
Mark Andrews
7de69feda2 1677. [bug] dig: +aaonly didn't work, +aaflag undocumented. 2004-06-23 04:07:29 +00:00
Rob Austein
32c7aa3dd1 1668. [bug] DIG_SIGCHASE was making bin/dig/host dump core. 2004-06-19 02:23:36 +00:00
Mark Andrews
e6c95fe56b 1651. [bug] dig: process multiple dash options.
1650.   [bug]           dig, nslookup: flush standard out after each command.
2004-06-07 03:56:02 +00:00
Mark Andrews
d21d4ddac7 update -b usage 2004-06-03 04:23:01 +00:00
Mark Andrews
c2ec022f57 1610. [bug] On dual stack machines "dig -b" failed to set the
address type to be looked up with "@server".
                        [RT #11069]
2004-04-15 06:47:08 +00:00
Mark Andrews
2a23a62524 sigchase 2004-04-13 02:54:15 +00:00
Mark Andrews
1ae75c1024 1609. [func] dig now has support to chase DNSSEC signature chains.
Requires -DDIG_SIGCHASE=1 to be set in STD_CDEFINES.
2004-04-13 02:39:35 +00:00
Mark Andrews
ea17e96977 1608. [func] dig and host now accept -4/-6 to select IP transport
to use when making queries.
2004-04-13 01:09:37 +00:00
Mark Andrews
28b863e609 pullup fixed from 9.3 2004-03-16 05:52:24 +00:00
Mark Andrews
dafcb997e3 update copyright notice 2004-03-05 05:14:21 +00:00
Mark Andrews
3818601601 remove redundant check [RT #8539] 2003-07-30 00:19:06 +00:00
Mark Andrews
974f1d7b49 pass the size of the result buffer in get_reverse 2003-07-25 04:02:54 +00:00
Mark Andrews
5eb91bd90e silence compiler warnings (HPUX/11i) 2003-07-25 00:01:16 +00:00
Mark Andrews
b312748a11 1442. [func] New fuctions for manipulating port lists:
dns_portlist_create(), dns_portlist_add(),
                        dns_portlist_remove(), dns_portlist_match(),
                        dns_portlist_attach() and dns_portlist_detach().

1441.   [func]          It is now possible to tell dig to bind to a specific
                        source port.

1440.   [func]          It is now possible to tell named to avoid using
                        certian source ports (avoid-v4-udp-ports,
                        avoid-v6-udp-ports).
developer: marka
reviewer: explorer
2003-02-26 05:05:16 +00:00
Mark Andrews
1b5b46942d developer: mayer
reviewed: marka
1370.   [bug]           dig '+[no]recurse' was incorrectly documented.
2002-08-29 07:45:04 +00:00
Mark Andrews
ec3984e9df 1339. [func] dig, host and nslookup now use IP6.ARPA for nibble
lookups.  Bit string lookups are no longer attempted.
2002-07-25 05:46:07 +00:00
Mark Andrews
a483e67c4c 1210. [func] "dig axfr" now reports the number of messages
as well as the number of records.
2002-05-29 05:31:05 +00:00
Mark Andrews
e7bb307667 1298. [func] dig: now supports +[no]cl +[no]ttlid. 2002-05-22 04:58:30 +00:00
Mark Andrews
da5d1cf1b1 1164. [bug] "Not Implemented" should be reported as NOTIMP. 2001-12-19 12:16:47 +00:00
Andreas Gustafsson
1f1d36a87b Check return values or cast them to (void), as required by the coding
standards; add exceptions to the coding standards for cases where this is
not desirable
2001-11-30 01:59:49 +00:00
Andreas Gustafsson
242bba8991 1151. [bug] nslookup failed to check that the arguments to
the port, timeout, and retry options were
                        valid integers and in range. [RT #2099]

1150.   [bug]           named incorrectly accepted TTL values
                        containing plus or minus signs, such as
                        1d+1h-1s.

1149.   [func]          New function isc_parse_uint32().
2001-11-30 01:02:18 +00:00
Andreas Gustafsson
cd801a4ed8 The dig help message did not documents the -b, -k, and +noqr options,
and some options were less than logically grouped [RT #2151]
2001-11-28 02:46:21 +00:00
Andreas Gustafsson
91cd0f93ad sizeof style 2001-11-27 01:56:32 +00:00
Andreas Gustafsson
9a762177e6 style 2001-11-22 01:59:02 +00:00
Mark Andrews
afeabf9f70 1120. [bug] dig only accept valid abbreviations of +options. 2001-11-07 05:40:48 +00:00
Andreas Gustafsson
589dce8281 spacing 2001-10-31 20:39:39 +00:00
Andreas Gustafsson
9066d09c3e Removed all code within #ifdef DNS_OPT_NEWCODES*.
It was the last thing being sanitized out of releases; removing
it makes it possible to eliminate the sanitation process.
2001-10-01 18:54:05 +00:00
Andreas Gustafsson
a4701d3b7e consistently begin error messages with a lower case letter 2001-09-26 00:38:39 +00:00
Andreas Gustafsson
bf097e2a31 the +rec option was no longer recognized after +retry
was added, due to a misplaced break statement
2001-09-20 19:11:59 +00:00
Brian Wellington
897adbe920 dig +retry, not +retries is the option from BIND 8. Conveniently,
+retries works also.
2001-09-20 17:15:03 +00:00
Brian Wellington
feb1f6a4ac 1003. [func] Add the +retry option to dig. 2001-09-18 18:25:14 +00:00
Brian Wellington
e49238474c 'dig +short' should explicitly enable printing the answer section.
Otherwise, 'dig +noall +short' prints nothing.
2001-09-14 04:54:56 +00:00
Mark Andrews
48cddfee7c remove broken (unreachable) undocumented ./.digrc support. 2001-09-13 03:02:59 +00:00
Mark Andrews
e60b3717f0 993. [func] dig: -v now reports the version. 2001-09-13 01:42:21 +00:00
Andreas Gustafsson
72baa6528d 80 columns 2001-09-12 21:48:41 +00:00
Mark Andrews
b1ae7a591a 987. [bug] "dig -help" didn't show "+[no]stats".
986.   [bug]           "dig +noall" failed to clear stats and command
                        printing.
2001-09-11 00:58:15 +00:00
Andreas Gustafsson
cad3210bb9 969. [func] dig now supports the undocumented dig 8 feature
of allowing arbitrary labels, not just dotted
                        decimal quads, with the -x option.  This can be
                        used to conveniently look up RFC2317 names as in
                        "dig -x 10.0.0.0-127". [RT #827, #1576, #1598]
2001-08-29 18:57:28 +00:00
Mark Andrews
d20b7d6bea silence compiler warnings 2001-08-23 04:39:31 +00:00
Brian Wellington
ecc38edf79 make +trace and +nssearch work together 2001-07-29 23:23:42 +00:00
Brian Wellington
3d388146c6 if both +trace and +nssearch are specified, ignore the second one. 2001-07-28 01:41:28 +00:00
Brian Wellington
d0de20156a Make +trace work. More cleanup. 2001-07-28 00:11:15 +00:00
Brian Wellington
637b4b4392 simplify header printing code. 2001-07-27 06:45:20 +00:00
Brian Wellington
0e0e575ec1 unused variables and stuff 2001-07-27 06:11:10 +00:00
Brian Wellington
f9521c63ea minor cleanup 2001-07-27 05:26:38 +00:00
Brian Wellington
3dba71207f The greeting and stats were printed in some cases when +short was used. 2001-07-18 21:03:54 +00:00
Brian Wellington
22cc4b4e0d fix broken comment 2001-07-01 23:47:49 +00:00
Danny Mayer
f5f40ad6c4 parse_int returns isc_uint32_t, casting required 2001-06-30 04:29:25 +00:00
Brian Wellington
fed846067d 916. [bug] Specifying type ixfr to dig without specifying
a serial number failed in unexpected ways.
2001-06-29 06:06:02 +00:00
Andreas Gustafsson
d82fda8358 brace style 2001-06-11 18:08:16 +00:00
Andreas Gustafsson
8fbd23c0aa 823. [func] The output of "dig -h" now goes to stdout so that it
can easily be piped through "more". [RT #1254]
2001-05-08 15:56:01 +00:00
Brian Wellington
099805b4c1 remove the nonexistent namelimit option and the deprecated rrlimit option. 2001-03-28 03:09:47 +00:00
Brian Wellington
668f8d91db 795. [func] Add the +multiline option to dig.
(which requires dns_message_totext(), etc. to take a style parameter)
2001-03-28 02:42:56 +00:00
Brian Wellington
aa5e0fe0fc spelling 2001-03-14 18:08:17 +00:00
Brian Wellington
e6743c1b25 Don't call get_address when processing "-b address". The address can't be a
host name, and if it's not a valid address, it would call isc_app_block()
and assert since isc_app_run() had not been called yet before calling the
resolver.  This could be seen by running:
	dig @localhost xbill.org -b 127.0.0.1:1111
which now exits with an error.
2001-02-17 20:27:24 +00:00
Andreas Gustafsson
1a77d17120 minor style fixes 2001-02-17 01:05:30 +00:00
Brian Wellington
f22ef00109 fix the potential buffer overflow in printgreeting() [RT #863] 2001-02-15 23:57:22 +00:00
Ben Cottrell
d8dde7c9fb Style fixes per Andreas, functionality fixes per Michael Sawyer.
The printgreeting() stuff is fixed once and for all by the change
to clone_lookup... I think this is the "right" way of doing it.
2001-02-15 23:44:08 +00:00
Ben Cottrell
2caff6b7df Something that I thought was a win turned out to be a lose. I now no longer
even try to restore previous state when someone issues two conflicting
type options.
2001-02-14 01:46:03 +00:00
Ben Cottrell
354f4f1ab2 Fixed RT #727 and #780. 2001-02-13 23:12:17 +00:00
Andreas Gustafsson
b4876b6ddf simplify dig/host/nslookup code by using the _format() functions in
more places; fix spacing issues; make nslookup print debugging details
for all lookup results, not just those with rcode==0; add comments
2001-01-24 19:28:34 +00:00
Andreas Gustafsson
688a4c50c2 More searchlist/domain handling fixes. Dig/host/nslookup no longer
have the notion that there can be both a search list and a default
domain at the same time.  The resolv.conf "domain" directive is now
used only if there is no "search" directive, and is treated exacly
like a one-element searchlist. The "+domain" option of dig and the
"set domain" command of nslookup are now merely ways of overriding the
resolv.conf search list.  Parents of the name given in the "domain"
directive are still not searched; this is considered a feature and is
consistent with lwres, but different from the BIND 8 resolver. The
"+defname" option to "dig" is now deprecated and treated as a synonym
for "+search"
2001-01-18 05:12:44 +00:00
Brian Wellington
499b34cea0 copyright update 2001-01-09 22:01:04 +00:00
Andreas Gustafsson
812ed4efbb removed pointless cast 2001-01-08 23:45:57 +00:00
Brian Wellington
78838d3e0c 8 space -> tab conversion 2000-12-11 19:24:30 +00:00
Michael Sawyer
cc7732e129 RT#528 fixed 2000-12-08 17:06:52 +00:00
Michael Sawyer
789145979d Add bounds checking to various dig options 2000-11-21 20:55:00 +00:00
Mark Andrews
25a66b4e41 #include <isc/print.h> 2000-11-20 13:02:18 +00:00
Brian Wellington
78d78f05d9 556. [func] The DNSSEC OK bit in the EDNS extended flags
is now implemented.  Responses to queries without
                        this bit set will not contain any DNSSEC records.
2000-11-13 21:34:03 +00:00
Michael Sawyer
04ab4ecb27 Remove name limits and counter from dig; there's no obvious way to count
names out of message_parse when PRESERVE_ORDER is set.
2000-11-08 00:47:18 +00:00
Michael Sawyer
d1fb32ad95 Print the version number information with "dig" alone on the command line 2000-11-07 01:29:34 +00:00
Mark Andrews
368b37b616 dns_rdata_invalidate -> dns_rdata_reset 2000-10-31 03:22:05 +00:00
Mark Andrews
c03bb27f06 532. [func] Implement DNS UPDATE pseudo records using
DNS_RDATA_UPDATE flag.

 531.   [func]          Rdata really should be initalized before being
                        assigned to (dns_rdata_fromwire(), dns_rdata_fromtext(),
                        dns_rdata_clone(), dns_rdata_fromregion()),
                        check that it is.
2000-10-25 04:26:57 +00:00
Michael Sawyer
5d20773abc Move generation of reverse lookups (blah.in-addr.arpa, etc...) names to
a common place.
2000-10-23 23:13:21 +00:00
Andreas Gustafsson
8ab588369b use sizeof(), not hardcoded constant 2000-10-20 19:53:59 +00:00
Michael Sawyer
b3c93eb846 Evil bad buffer overflow bug. 2000-10-20 00:54:01 +00:00
Michael Sawyer
801d49df37 From Brian's review:
digrc filename print length shouldn't be 132
        bargc should be more than 14
        Opcode 100 spelled wrong in host.c
2000-10-19 23:31:56 +00:00
Michael Sawyer
d7a2e05112 Changes which were made on the release branch when Brian and I were reviewing
dig's code, but never made it down to the mainline.  These are fixes to some
potential bugs Brian noticed.
2000-10-19 22:49:34 +00:00
Michael Sawyer
7a87d1c63b Fix places where wrong tag was used in #ifdef's 2000-10-19 21:49:49 +00:00
Andreas Gustafsson
0067b1721e English style 2000-10-18 22:11:20 +00:00
Michael Sawyer
88aa63f566 Make option processing case sensitive.
Remove -w option; default xfr's to +nocomments, +noquestion.  Remove wiring
around repeated comment printing, so xfr's with +comments will cause
comment headers to be printed per packet, producing same result as -w
gave.
2000-10-17 00:35:18 +00:00
Michael Sawyer
d97ea44061 Cause -m (memory debugging) option in dig to actually function. 2000-10-16 19:00:01 +00:00
Brian Wellington
e2babfac17 dig now calls isc_mem_stats() only if -m was specified, not if
isc_mem_debugging was set elsewhere.
2000-10-13 22:55:50 +00:00
Michael Sawyer
233514c1da Add +besteffort option to dig (on by default) which will cause the
message parser to accept somewhat malformed packets.
2000-10-13 17:54:00 +00:00
Michael Sawyer
dc570b92f6 Add support for proposed ZONE and VIEW opt attributes. These are currently
hidden behind #ifdef's, since no OPT code number has yet to be assigned
by the IANA.  They are also not quite complete in all regards; VIEW
options are understood and ignored.  ZONE options are understood and
acted upon, though some of the error cases aren't quite right.

Remove doubled isc_mem_stats in dighost.c

Update todo list.

Change literal 255's to DNS_NAME_MAXWIRE in name.c
2000-10-11 17:44:18 +00:00
Mark Andrews
a6368669a6 '-p' is already taken, -p port. Use '-w' (wire) to print out the packet. 2000-10-03 04:29:08 +00:00
Michael Sawyer
d2792acfaf Add (presently undocumented) -p option to show the begin of each DNS packet,
useful for AXFR's and similar replies.  (requested by GDIB)
2000-10-02 16:43:25 +00:00
Michael Sawyer
a5e89a4493 Make -t and -c change command line parsing so that unprefixed class and types
are treated as hosts.
2000-10-02 16:16:50 +00:00
Michael Sawyer
aea4345be8 Remove unused variable 2000-09-30 00:09:57 +00:00
Michael Sawyer
10e1788f9f Dig changes in response to RT321 (output formatting) 2000-09-29 23:42:15 +00:00
Michael Sawyer
2f96e6b9bb Change sense of +fail option to something more reasonable 2000-09-28 23:02:28 +00:00
Michael Sawyer
056aaae3e2 Remove +details option 2000-09-27 00:02:02 +00:00
Andreas Gustafsson
07f1d27a64 spacing; removed redundant break statements that caused
compiler warnings
2000-09-26 17:17:39 +00:00
Michael Sawyer
0dabedcca5 Add +fail option to try next server after a SERVFAIL
Fix some minor problems in some of the new option processing code.
Slight change in mem debugging
TODO changes
2000-09-25 23:10:00 +00:00
Michael Sawyer
b02d8fe708 plus-options with values (+bufsize=8000) didn't print properly in the dig
comment lines since my change of option processing.  Fixed.
2000-09-25 16:14:20 +00:00
Michael Sawyer
31ce593907 Add back +norec
Properly test for missing argument in - options
Spacing
Remove unnecessary variable
2000-09-22 23:58:32 +00:00
Michael Sawyer
a985c480e1 Code cleanup, mainly in dig option processing. 2000-09-22 23:21:32 +00:00
Andreas Gustafsson
92aa706a21 the mnemonic for the chaos class is CH, not CHAOS 2000-09-22 17:36:02 +00:00
Mark Andrews
34fec86ca3 make next_token() shared. 2000-09-21 23:47:41 +00:00
Michael Sawyer
b8f9623df0 Remove isc_app_block() from dig's get_address(). 2000-09-21 23:02:34 +00:00
Michael Sawyer
f900be2190 Dig, et al:
When you have more than 1 nameserver to send queries to,
	send them one at a time with a 1 second wait between transmissions
	instead of just flooding them all out at once.

	Fix bug 348, nslookup crashing when server specified without server
2000-09-21 22:46:39 +00:00
Mark Andrews
e412ae947d 482. [bug] nslookup: a plain "server" or "lserver" should be
treated as a lookup.

 480
strsep() has slightly different semantics to strtok(), use static function
to skip empty tokens.
2000-09-21 12:25:43 +00:00
Mark Andrews
07a926724c 481. [bug] nslookup:get_next_command() stack size exceeds
per thread limit.

 480.   [bug]           strtok() is not thread safe. [RT #349]

	replaced strtok() w/ strsep().
2000-09-21 11:53:16 +00:00
Michael Sawyer
97beb7237b A couple of typos corrected
Improvement to host8 compatibility.
2000-09-13 00:27:27 +00:00
Michael Sawyer
f63a6079d3 Typo fixed
Add +ignore option
2000-09-13 00:03:28 +00:00
Andreas Gustafsson
736be84da0 previous change was correct for release branch, but incorrect
for the mainline
2000-09-12 23:23:49 +00:00
Andreas Gustafsson
1024973c81 ISC_TRUE, not 1 2000-09-12 22:18:42 +00:00
Brian Wellington
6f710fce2d #include <time.h> 2000-08-26 01:51:37 +00:00
Brian Wellington
668bd3acee dig now does reverse IPv6 address lookup. 2000-08-14 20:23:39 +00:00
Brian Wellington
a81dd161f7 The +cdflag and +adflag lines in the help text were duplicated. 2000-08-10 15:45:54 +00:00
Michael Sawyer
19c8df90f1 Support yet another strange set of nslookup options.
nslookup - nameserver         nslookup -nameserver
are both listed in the old man page.  Both now are supported.
2000-08-03 17:43:06 +00:00
David Lawrence
281b7ba834 Variable "have_host" was set but never used. -- removed variable 2000-08-02 19:47:17 +00:00
Michael Sawyer
48674819eb 367. [func] Allow proper selection of server on nslookup command
line.

 366.   [func]          Allow use of '-' batch file in dig for stdin.
2000-08-02 17:58:07 +00:00
David Lawrence
40f53fa8d9 Trailing whitespace trimmed. Perhaps running "perl util/spacewhack.pl in your
own CVS tree will help minimize CVS conflicts.  Maybe not.
Blame Graff for getting me to trim all trailing whitespace.
2000-08-01 01:33:37 +00:00
Michael Sawyer
082bc93d68 Various changes (mostly small) picked up in code review 2000-08-01 00:53:20 +00:00
Brian Wellington
eec79d5e4d more isc_memdebugging cleanup 2000-07-28 00:04:44 +00:00
David Lawrence
15a4474541 word wrap copyright notice at column 70 2000-07-27 09:55:03 +00:00
Michael Sawyer
fcc6d71462 Don't crash if someone specifies an option (like -f) to dig without its
argument.
2000-07-25 00:51:14 +00:00
Michael Sawyer
aa38fc9f67 Move .digrc to home dir, and hide behinf #ifndef NOPOSIX 2000-07-24 23:13:44 +00:00
Michael Sawyer
1933e4c41f Allow users to place a .digrc file in the current directory which will
specify defaults.
2000-07-24 20:46:55 +00:00
Michael Sawyer
a056a85de0 Improve searchlist code 2000-07-24 18:07:03 +00:00
Andreas Gustafsson
baf50a7210 removed unsightly spaces 2000-07-21 21:21:26 +00:00
Michael Sawyer
8bf0f722f8 Count and possibly limit how many names and rr's in a xfr.
(Needed by GDIB folks)
2000-07-20 19:41:44 +00:00
Michael Sawyer
26cebf3482 Slight bug in batch processing 2000-07-20 17:56:20 +00:00
Michael Sawyer
68f0d29d61 Fix a minor race condition in SIGINT handling
Allow dig to used name key files
Allow SIGINT in nslookup
2000-07-19 17:52:27 +00:00
Michael Sawyer
5e804988e9 Add comments to source code 2000-07-18 18:51:40 +00:00
Michael Sawyer
aa6054ec74 Clean up type and class code. (No more ugly istype() and isclass() functions)
Minor changes to timeout handling code.
Don't preload batch file.
2000-07-18 01:28:20 +00:00
Michael Sawyer
4b7d316065 A few bug fixes. 2000-07-14 21:33:03 +00:00
Michael Sawyer
8cd54a7461 Lots of changes to the shutdown code. Get rid of the annoying "just exit"
method of shutting down.
Known bug: SIGINT while doing batch mode causes assertion.
2000-07-14 17:57:27 +00:00
Michael Sawyer
e715e01178 More code duplication removal and general cleanup
Slight change in +nssearch output formatting
2000-07-14 16:35:30 +00:00
Michael Sawyer
a31dbaa03f Replace +aa option, per AG. 2000-07-13 21:12:21 +00:00
Michael Sawyer
8f56f93547 Clean up duplicate code in host.c
Fix a socket cleanup problem which, in some isolated cases, prevented
correct shutdown.
Remove +aa option completely.
2000-07-13 21:01:00 +00:00
Michael Sawyer
c5ec9b45bb Lots of duplicate code removed
+tcp mode bug fixed
2000-07-13 18:52:58 +00:00
Michael Sawyer
738310d8cf It's probably a bad idea to pre-allocate 64K buffers for each lookup as soon
as you read in the batch file.  Don't.
2000-07-13 01:22:38 +00:00
Michael Sawyer
76959783dd Documentation changes in usage message. 2000-07-12 17:44:03 +00:00
Michael Sawyer
473cb90680 Choose reasonable default values for +trace mode. 2000-07-12 01:41:35 +00:00
Andreas Gustafsson
969b3374ed no space between function name and arg list 2000-07-12 00:22:57 +00:00
Michael Sawyer
6331b9a45e Don't try and reset timers which aren't being used. 2000-07-11 17:35:49 +00:00
Brian Wellington
3ce3305278 Remove a race condition where the final event could be posted before
isc_app_run started.
2000-07-10 18:02:31 +00:00
Michael Sawyer
38cf6e52ce Lots of style changes.
Clean up what appears to be a varient of the race condition, this one set
off in nslookup.
2000-07-05 23:28:32 +00:00
Andreas Gustafsson
24139527f3 lots of style changes; no functional change 2000-07-05 19:31:26 +00:00
Michael Sawyer
1893b56ef9 Move taskmgr shutdown to the correct place. 2000-06-30 14:11:49 +00:00
Michael Sawyer
db8b100cae DO NOT PULL ME UP TO THE RELEASE BRANCH.
This is a fix for the race condition in dig.  It seems to work well, except
there's a memory leak I can't quite track down.  Michael and I will look at
it on the plane ride tommorow, and commit a change via modem once we arrive
in PA.  We'll also be doing general code cleanup.
2000-06-29 05:21:12 +00:00
Michael Sawyer
84c4c99c9e 290. [cleanup] +twiddle option to dig (for testing only) removed. 2000-06-28 18:20:44 +00:00
Mark Andrews
abeb505bb6 276. [bug] dig now supports maximum sized TCP messages. 2000-06-23 16:53:53 +00:00
Michael Sawyer
23e8d9349b Make host -C and dig +nss actually work. 2000-06-22 22:37:31 +00:00
David Lawrence
bb18b04113 "we much have recovered" -> "we must have recovered" 2000-06-22 17:23:48 +00:00
David Lawrence
9ef9f6b8ae #include style lint 2000-06-22 01:26:38 +00:00
Michael Sawyer
c9defbf4b9 Sort #includes 2000-06-21 17:48:32 +00:00
Michael Sawyer
d821f1cd7e Additional debugging options
% comment option in dig
2000-06-21 01:40:42 +00:00
Michael Sawyer
a414896ee9 +ad/+noad option conflicting with +additional/+noadditional option 2000-06-19 19:00:49 +00:00
Michael Sawyer
518c9fea58 Add ability to set AD and CD flags in outgoing query. 2000-06-16 18:00:05 +00:00
Michael Sawyer
960c8888f6 TSIG verification of xfr replies working now. 2000-06-07 00:13:57 +00:00
Michael Sawyer
d62f922122 Fix segfault due to uninitialized variable 2000-06-06 23:06:25 +00:00
Michael Sawyer
910df0c767 Further attempts to make XFR's verify with TSIG keys. Still not
functional, and disabled in this checkin.
Added -debug and -memdebug command line options, to avoid having
to recompile every time these options are needed.
2000-06-06 22:50:44 +00:00
Michael Sawyer
47058d1726 Validate TSIG signatures on replies, *except* for xfr's.
Add Id string.
2000-06-06 18:49:06 +00:00
Michael Sawyer
a5ed46c9fd Send TSIG signed queries with dig. This version requires all queries
from a single invocation of dig use the same key, and doesn't validate
replies yet.  Also, keys must be passed on the command line with the
-y option.  -k forthcoming.
2000-06-06 00:43:17 +00:00
Michael Sawyer
d12ed0876f Add ixfr support to dig, as:
dig domain.nil. ixfr=12345
where 12345 is version you are ixrf'ing against
(testing still in progress of this option)
2000-06-02 18:45:33 +00:00
David Lawrence
7efc8c3f69 Megacommit of many files.
Mostly, several functions that take pointers as arguments, almost
always char * pointers, had those pointers qualified with "const".
Those that returned pointers to previously const-qualified arguments
had their return values qualified as const.  Some structure members
were qualified as const to retain that attribute from the variables
from which they were assigned.

Minor other ISC style cleanups.
2000-06-01 18:49:22 +00:00
Brian Wellington
83a44df0a1 include dns/name.h 2000-05-30 22:27:27 +00:00
Michael Sawyer
cc88be4af1 Change global task variable to global_task
Remove unused globals
2000-05-26 22:03:00 +00:00
Michael Sawyer
36e4d8878c Clean up uninitialized variable bug 2000-05-25 17:24:57 +00:00
Michael Sawyer
6afdb1e5e4 Clean up some unused variables... 2000-05-25 00:01:30 +00:00
Michael Sawyer
0eb5cf7351 Fix lookup limit.
Fix non-closing of sockets when finished.
2000-05-24 23:39:30 +00:00
Michael Sawyer
17747cd5ee Clean up warnings I accidentally left in in previous commit.
Add resetting of lookup counter between different name searches.
2000-05-24 19:49:51 +00:00
Michael Sawyer
932b781b81 Modify dig to use message_*totext() routines. 2000-05-24 19:27:01 +00:00
David Lawrence
b0ab096ce6 added missing prototype to show_usage().
added UNUSED(first) for when USEINITALWS is not defined.
use ISC_TF() when assigning a boolean value.
added missing spaces around assignment operators per ISC style.
2000-05-24 03:05:58 +00:00
Michael Sawyer
4e0dc7b50c Add option to bind to a specified address 2000-05-19 17:54:04 +00:00
Michael Sawyer
88e216c7b4 Remove duplicate printing of greeting message 2000-05-18 01:32:53 +00:00
Michael Sawyer
b437fa469e Correct bug in batch file handling 2000-05-18 01:21:19 +00:00
Michael Sawyer
df834113a3 Fix bug in dig's message printing. 2000-05-17 18:36:31 +00:00
Michael Sawyer
0cfdce899b Add +[np]cmd option 2000-05-16 18:54:40 +00:00
Michael Sawyer
844eaa56d6 Minor error in return codes fixed in dighost.c
Additional functionality to nslookup
2000-05-16 17:53:35 +00:00
Michael Sawyer
9fe3676b84 Clean up command line parsing in dig.
Fix bug in nslookup interactive mode.
2000-05-12 18:45:38 +00:00
Michael Sawyer
6fe03d6c83 Code cleanup of dighost.c, hopefully making some of the flow of
command a bit more obvious.
Addition of TCP fallback on UDP failure.  Will add option to disable this.
Further work on nslookup.
(nslookup is not built by default now, and is far from fully functional.
Interactive mode currently segfaults.)
2000-05-12 01:02:37 +00:00
Michael Sawyer
cefd68008f Host was broken in last commit; fixed here.
Add nslookup.c; non-functional and not compiled by make all.
2000-05-09 18:05:13 +00:00
Michael Sawyer
f17b62a64b Added +bufsize (EDNS0) option to dig
Added 1.2.3.4-> 4.3.2.1.in-addr.arpa translation to host
Added +defname, +aaonly, +cmd, +nostats, +qr flags to dig
Reviewed (and changed) result codes of dig.
2000-05-08 22:51:08 +00:00
David Lawrence
1a69a1a78c Megacommit of dozens of files.
Cleanup of redundant/useless header file inclusion.

ISC style lint, primarily for function declarations and standalone
comments -- ie, those that appear on a line without any code, which
should be written as follows:
   /*
    * This is a comment.
    */
2000-05-08 14:38:29 +00:00
Michael Sawyer
6c7a2db63c Add +trace option, change some of the behavior of other options. 2000-05-06 01:16:07 +00:00
Michael Sawyer
c4ae16b2aa Change command line options for dig. In particular, +short option added,
so users can easily get (for example) SOA list from all authorative servers
with 'dig +short +nssearch isc.org soa' rather than stringing dozens of
options together.  (Rather these options remain or are removed in the
release version is still subject to discussion.)
2000-05-04 21:40:47 +00:00
Michael Sawyer
16d00613cf Fix bug in handling of batch files.
Changes to conform to standard coding style.
Internally reorder batch line options to properly handle @ options in
batch files.
2000-05-03 23:07:30 +00:00
Michael Sawyer
e69ccf6d54 Move recursive flag into lookup structure.
Fix bug in batch processing in host.
Add fixed origin code.
2000-05-03 20:27:13 +00:00
Michael Sawyer
7949dbdae1 Add support for search list (from resolv.conf) to dig and host
Add support for ndots (from resolv.conf and command line) to dig and host
Add usage information
Add support for retrying UDP sends, with command line options to set
how many sends are allowed to dig and host
Add multiple option t dig, like -C on host
Add options in dig to enable and disable display of comment lines and
individual sections
2000-05-02 23:23:12 +00:00
Michael Sawyer
e01cfa577b Add +twiddle option for testing.
Fix up host resolution from resolv.conf.
2000-04-29 01:39:32 +00:00
Michael Sawyer
387a58e8c4 Cleanup of debugging messages. Cleanup of failure shutdown memory leaks.
Fix multiple sends when not needed.  Fix buffer length check failure
code.  Increase recv buffer size.
2000-04-29 00:12:56 +00:00
Michael Sawyer
df5503799f Add -C (Check all SOA records on authorative servers) and -T (tcp) options
to host program.  Clean up some memory issues in dighost.c and dig.c.

Still need to track down memory issues on ^C cleanup.
2000-04-28 21:41:19 +00:00
Michael Sawyer
1d2f2d7c9a Improved formatting of #ifdef DEBUG messages (left out \n's when puts calls
were changed to fputs to stderr).
Fix memory leak when doing axfr's.
Improvements to host program; most options and types fully supported.
Add (currently non-functional) -C option to host to check all SOA's
on authorative servers.  (Will require some notable changes to dighost.c
to make this a functional option.)

Issues stil needing resolution:
	IPv6 queries are not currently sent.
	Memory leak on ^C while waiting for UDP recv or TCP connect.
	A few more dig options need supporting.
	Support IXFR under dig (and maybe host).
	Support signatures (TSIG) under dig (and maybe host).
2000-04-27 23:20:29 +00:00
David Lawrence
6e49e91bd0 103. [func] libisc buffer API changes for <isc/buffer.h>:
Added:
                                isc_buffer_base(b)          (pointer)
                                isc_buffer_current(b)       (pointer)
                                isc_buffer_active(b)        (pointer)
                                isc_buffer_used(b)          (pointer)
                                isc_buffer_length(b)            (int)
                                isc_buffer_usedlength(b)        (int)
                                isc_buffer_consumedlength(b)    (int)
                                isc_buffer_remaininglength(b)   (int)
                                isc_buffer_activelength(b)      (int)
                                isc_buffer_availablelength(b)   (int)
                        Removed:
                                ISC_BUFFER_USEDCOUNT(b)
                                ISC_BUFFER_AVAILABLECOUNT(b)
                                isc_buffer_type(b)
                        Changed names:
                                isc_buffer_used(b, r) ->
                                        isc_buffer_usedregion(b, r)
                                isc_buffer_available(b, r) ->
                                        isc_buffer_available_region(b, r)
                                isc_buffer_consumed(b, r) ->
                                        isc_buffer_consumedregion(b, r)
                                isc_buffer_active(b, r) ->
                                        isc_buffer_activeregion(b, r)
                                isc_buffer_remaining(b, r) ->
                                        isc_buffer_remainingregion(b, r)

                        Buffer types were removed, so the ISC_BUFFERTYPE_*
                        macros are no more, and the type argument to
                        isc_buffer_init and isc_buffer_allocate were removed.
                        isc_buffer_putstr is now void (instead of isc_result_t)
                        and requires that the caller ensure that there
                        is enough available buffer space for the string.
2000-04-27 00:03:12 +00:00
Michael Sawyer
d43730bbf2 Stylistic changes and inclusion of isc/print.h 2000-04-26 19:36:40 +00:00
Michael Sawyer
30eee5633c Change debugging messages in dig.c and dighost.c to use stderr.
Improve message if resolver host not found.
2000-04-26 18:58:31 +00:00
Michael Sawyer
ebbfa36a62 Rearrange source files. dig.c/dighost.c builds dig binary, host.c/dighost.c
builds host binary.  Host does not presently work.
Add some additional command line options on dig.
2000-04-26 18:34:17 +00:00