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.
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.
added UNUSED(first) for when USEINITALWS is not defined.
added missing spaces around assignment operators per ISC style.
use ISC_TF() when assigning a boolean value.
removed unused stack variables "have_host", "xfr_mode" and "nsfind"
from parse_args().
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.)
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.
*/
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.)
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
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).
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.