* 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>
isc_result_t result = ISC_R_SUCCESS;
dns_rdatatype_t rdtype;
dns_rdataclass_t rdclass;
+ isc_uint32_t serial = 0;
UNUSED(is_batchfile);
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;
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;
- 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>
<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>
<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>