lookups. Bit string lookups are no longer attempted.
+1339. [func] dig, host and nslookup now use IP6.ARPA for nibble
+ lookups. Bit string lookups are no longer attempted.
+
1338. [func] IPv6 synthesis is now performed for IP6.ARPA bit
string queries.
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dig.c,v 1.178 2002/05/29 05:30:59 marka Exp $ */
+/* $Id: dig.c,v 1.179 2002/07/25 05:46:07 marka Exp $ */
#include <config.h>
#include <stdlib.h>
static char domainopt[DNS_NAME_MAXTEXT];
static isc_boolean_t short_form = ISC_FALSE, printcmd = ISC_TRUE,
- nibble = ISC_FALSE, plusquest = ISC_FALSE, pluscomm = ISC_FALSE,
+ ip6_int = ISC_FALSE, plusquest = ISC_FALSE, pluscomm = ISC_FALSE,
multiline = ISC_FALSE, nottl = ISC_FALSE, noclass = ISC_FALSE;
static const char *opcodetext[] = {
" (Use ixfr=version for type ixfr)\n"
" q-opt is one of:\n"
" -x dot-notation (shortcut for in-addr lookups)\n"
-" -n (nibble form for reverse IPv6 lookups)\n"
+" -i (IP6.INT reverse IPv6 lookups)\n"
" -f filename (batch mode)\n"
" -b address (bind to source address)\n"
" -p port (specify port number)\n"
help();
exit(0);
break;
+ case 'i':
+ ip6_int = ISC_TRUE;
+ return (ISC_FALSE);
case 'm': /* memdebug */
/* memdebug is handled in preparse_args() */
return (ISC_FALSE);
case 'n':
- nibble = ISC_TRUE;
+ /* deprecated */
return (ISC_FALSE);
case 'v':
version();
return (value_from_next);
case 'x':
*lookup = clone_lookup(default_lookup, ISC_TRUE);
- if (get_reverse(textname, value, nibble, ISC_FALSE)
+ if (get_reverse(textname, value, ip6_int, ISC_FALSE)
== ISC_R_SUCCESS)
{
strncpy((*lookup)->textname, textname,
debug("looking up %s", (*lookup)->textname);
(*lookup)->trace_root = ISC_TF((*lookup)->trace ||
(*lookup)->ns_search_only);
- (*lookup)->nibble = nibble;
+ (*lookup)->ip6_int = ip6_int;
if (!(*lookup)->rdtypeset)
(*lookup)->rdtype = dns_rdatatype_ptr;
if (!(*lookup)->rdclassset)
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: dig.docbook,v 1.11 2002/05/22 04:58:30 marka Exp $ -->
+<!-- $Id: dig.docbook,v 1.12 2002/07/25 05:46:07 marka Exp $ -->
<refentry>
automatically performs a lookup for a name like
<literal>11.12.13.10.in-addr.arpa</literal> and sets the query type and
class to PTR and IN respectively. By default, IPv6 addresses are
-looked up using the IP6.ARPA domain and binary labels as defined in
-RFC2874. To use the older RFC1886 method using the IP6.INT domain and
-"nibble" labels, specify the <option>-n</option> (nibble) option.
+looked up using nibble format under the IP6.ARPA domain.
+To use the older RFC1886 method using the IP6.INT domain
+specify the <option>-i</option> option. Bit string labels (RFC2874)
+are now experimental and are not attempted.
</para>
<para>
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dighost.c,v 1.245 2002/07/10 01:03:14 marka Exp $ */
+/* $Id: dighost.c,v 1.246 2002/07/25 05:46:07 marka Exp $ */
/*
* Notice to programmers: Do not use this code as an example of how to
}
isc_result_t
-get_reverse(char *reverse, char *value, isc_boolean_t nibble,
+get_reverse(char *reverse, char *value, isc_boolean_t ip6_int,
isc_boolean_t strict)
{
int r;
/* This is a valid IPv6 address. */
dns_fixedname_t fname;
dns_name_t *name;
+ unsigned int options = DNS_BYADDROPT_IPV6NIBBLE;
+
+ if (ip6_int)
+ options |= DNS_BYADDROPT_IPV6INT;
dns_fixedname_init(&fname);
name = dns_fixedname_name(&fname);
- result = dns_byaddr_createptrname(&addr, nibble, name);
+ result = dns_byaddr_createptrname2(&addr, options, name);
if (result != ISC_R_SUCCESS)
return (result);
dns_name_format(name, reverse, MXNAME);
looknew->retries = tries;
looknew->nsfound = 0;
looknew->tcp_mode = ISC_FALSE;
- looknew->nibble = ISC_FALSE;
+ looknew->ip6_int = ISC_FALSE;
looknew->comments = ISC_TRUE;
looknew->stats = ISC_TRUE;
looknew->section_question = ISC_TRUE;
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: host.c,v 1.83 2001/12/19 12:16:40 marka Exp $ */
+/* $Id: host.c,v 1.84 2002/07/25 05:46:07 marka Exp $ */
#include <config.h>
#include <stdlib.h>
static void
show_usage(void) {
fputs(
-"Usage: host [-aCdlrTwv] [-c class] [-n] [-N ndots] [-t type] [-W time]\n"
+"Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time]\n"
" [-R number] hostname [server]\n"
" -a is equivalent to -v -t *\n"
" -c specifies query class for non-IN data\n"
" -C compares SOA records on authoritative nameservers\n"
" -d is equivalent to -v\n"
" -l lists all hosts in a domain, using AXFR\n"
-" -n Use the nibble form of IPv6 reverse lookup\n"
+" -i IP6.INT reverse lookups\n"
" -N changes the number of dots allowed before root lookup is done\n"
" -r disables recursive processing\n"
" -R specifies number of retries for UDP packets\n"
lookup = make_empty_lookup();
- while ((c = isc_commandline_parse(argc, argv, "lvwrdt:c:aTCN:R:W:Dn"))
+ while ((c = isc_commandline_parse(argc, argv, "lvwrdt:c:aTCN:R:W:Dni"))
!= EOF) {
switch (c) {
case 'l':
lookup->rdtypeset = ISC_TRUE;
short_form = ISC_FALSE;
break;
+ case 'i':
+ lookup->ip6_int = ISC_TRUE;
+ break;
case 'n':
- lookup->nibble = ISC_TRUE;
+ /* deprecated */
break;
case 'w':
/*
}
lookup->pending = ISC_FALSE;
- if (get_reverse(store, hostname, lookup->nibble, ISC_TRUE)
+ if (get_reverse(store, hostname, lookup->ip6_int, ISC_TRUE)
== ISC_R_SUCCESS)
{
strncpy(lookup->textname, store, sizeof(lookup->textname));
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $Id: host.docbook,v 1.2 2001/06/08 17:18:13 gson Exp $ -->
+<!-- $Id: host.docbook,v 1.3 2002/07/25 05:46:07 marka Exp $ -->
<refentry>
</para>
<para>
-The <option>-n</option>
+The <option>-i</option>
option specifies that reverse lookups of IPv6 addresses should
-use the IP6.INT domain and "nibble" labels as defined in RFC1886.
-The default is to use IP6.ARPA and binary labels as defined in RFC2874.
+use the IP6.INT domain as defined in RFC1886.
+The default is to use IP6.ARPA.
</para>
<para>
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dig.h,v 1.77 2002/05/29 05:31:05 marka Exp $ */
+/* $Id: dig.h,v 1.78 2002/07/25 05:46:07 marka Exp $ */
#ifndef DIG_H
#define DIG_H
trace, /* dig +trace */
trace_root, /* initial query for either +trace or +nssearch */
tcp_mode,
- nibble,
+ ip6_int,
comments,
stats,
section_question,
get_address(char *host, in_port_t port, isc_sockaddr_t *sockaddr);
isc_result_t
-get_reverse(char *reverse, char *value, isc_boolean_t nibble,
+get_reverse(char *reverse, char *value, isc_boolean_t ip6_int,
isc_boolean_t strict);
void
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nslookup.c,v 1.96 2002/03/20 18:20:03 marka Exp $ */
+/* $Id: nslookup.c,v 1.97 2002/07/25 05:46:07 marka Exp $ */
#include <config.h>
rdclass = dns_rdataclass_in;
}
lookup = make_empty_lookup();
- if (get_reverse(store, opt, lookup->nibble, ISC_TRUE)
+ if (get_reverse(store, opt, lookup->ip6_int, ISC_TRUE)
== ISC_R_SUCCESS)
{
safecpy(lookup->textname, store, sizeof(lookup->textname));