]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1390. [func] host now supports ixfr.
authorMark Andrews <marka@isc.org>
Thu, 17 Oct 2002 23:44:35 +0000 (23:44 +0000)
committerMark Andrews <marka@isc.org>
Thu, 17 Oct 2002 23:44:35 +0000 (23:44 +0000)
developer: marka
reviewer: jinmei

CHANGES
bin/dig/host.c
bin/dig/host.docbook

diff --git a/CHANGES b/CHANGES
index fc051e723cc8d76d0be534341bcae612895d3177..7777e5ff18024aaa6f243a5a6c90b35dcd2d7f29 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+1390.  [func]          host now supports ixfr.
+
 1389.  [bug]           named could fail to rotate long log files.  [RT #3666]
 
 1388.  [port]          irix: check for sys/sysctl.h and NET_RT_IFLIST before
index d2f92e0d3f1b667d790fb64f94dba379d954af73..a0ae986d931b914a94eaa7e6292062fe17e46bf8 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: host.c,v 1.87 2002/09/26 11:17:06 jinmei Exp $ */
+/* $Id: host.c,v 1.88 2002/10/17 23:44:35 marka Exp $ */
 
 #include <config.h>
 #include <stdlib.h>
@@ -500,6 +500,7 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
        isc_result_t result = ISC_R_SUCCESS;
        dns_rdatatype_t rdtype;
        dns_rdataclass_t rdclass;
+       isc_uint32_t serial = 0;
 
        UNUSED(is_batchfile);
 
@@ -522,10 +523,19 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
                        lookup->recurse = ISC_FALSE;
                        break;
                case 't':
-                       tr.base = isc_commandline_argument;
-                       tr.length = strlen(isc_commandline_argument);
-                       result = dns_rdatatype_fromtext(&rdtype,
+                       if (strncasecmp(isc_commandline_argument,
+                                       "ixfr=", 5) == 0) {
+                               rdtype = dns_rdatatype_ixfr;
+                               /* XXXMPA add error checking */
+                               serial = strtoul(isc_commandline_argument + 5,
+                                                NULL, 10);
+                               result = ISC_R_SUCCESS;
+                       } else {
+                               tr.base = isc_commandline_argument;
+                               tr.length = strlen(isc_commandline_argument);
+                               result = dns_rdatatype_fromtext(&rdtype,
                                                   (isc_textregion_t *)&tr);
+                       }
 
                        if (result != ISC_R_SUCCESS) {
                                fatalexit = 2;
@@ -541,7 +551,10 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
                                list_type = dns_rdatatype_any;
                                short_form = ISC_FALSE;
                                lookup->tcp_mode = ISC_TRUE;
-                       } else 
+                       } else if (rdtype == dns_rdatatype_ixfr) {
+                               lookup->ixfr_serial = serial;
+                               list_type = rdtype;
+                       } else
                                list_type = rdtype;
                        list_addresses = ISC_FALSE;
                        break;
index 85d562b9028cadce102e04a36e23e9bbc4e1899a..77a5e1229d39826ddb48fb33d07ea77408d02c49 100644 (file)
@@ -16,7 +16,7 @@
  - WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 -->
 
-<!-- $Id: host.docbook,v 1.3 2002/07/25 05:46:07 marka Exp $ -->
+<!-- $Id: host.docbook,v 1.4 2002/10/17 23:44:35 marka Exp $ -->
 
 <refentry>
 
@@ -103,9 +103,9 @@ output.
 <para>
 List mode is selected by the <option>-l</option> option.  This makes
 <command>host</command> perform a zone transfer for zone
-<parameter>name</parameter>.  The argument is provided for
-compatibility with older implemementations.  This option is equivalent
-to making a query of type AXFR.
+<parameter>name</parameter>.  Transfer the zone printing out the NS, PTR
+and address records (A/AAAA).  If combined with <option>-a</option>
+all records will be printed.  
 </para>
 
 <para>
@@ -163,7 +163,9 @@ type.  By default it looks for A records, but if the
 <option>-C</option> option was given, queries will be made for SOA
 records, and if <parameter>name</parameter> is a dotted-decimal IPv4
 address or colon-delimited IPv6 address, <command>host</command> will
-query for PTR records.
+query for PTR records.  If a query type of IXFR is chosen the starting
+serial number can be specified by appending an equal followed by the
+starting serial number (e.g. -t IXFR=12345678).
 </para>
 
 <para>