diff options
author | dougb <dougb@FreeBSD.org> | 2002-07-01 01:07:56 +0000 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2002-07-01 01:07:56 +0000 |
commit | f4bd5053ab2eb505b16099244427d9e93442fe90 (patch) | |
tree | 2b447904bb3b9c0f6670bba10470d09a443c9a2e /contrib/bind/lib/resolv | |
parent | 52cf506b39ec774bba7e719390541e881296c3c4 (diff) | |
download | FreeBSD-src-f4bd5053ab2eb505b16099244427d9e93442fe90.zip FreeBSD-src-f4bd5053ab2eb505b16099244427d9e93442fe90.tar.gz |
Import of ISC BIND version 8.3.3
Diffstat (limited to 'contrib/bind/lib/resolv')
-rw-r--r-- | contrib/bind/lib/resolv/res_debug.c | 15 | ||||
-rw-r--r-- | contrib/bind/lib/resolv/res_init.c | 32 | ||||
-rw-r--r-- | contrib/bind/lib/resolv/res_private.h | 1 |
3 files changed, 28 insertions, 20 deletions
diff --git a/contrib/bind/lib/resolv/res_debug.c b/contrib/bind/lib/resolv/res_debug.c index 9b61e11..f2c0689 100644 --- a/contrib/bind/lib/resolv/res_debug.c +++ b/contrib/bind/lib/resolv/res_debug.c @@ -95,7 +95,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93"; -static const char rcsid[] = "$Id: res_debug.c,v 8.45 2001/12/19 12:05:56 marka Exp $"; +static const char rcsid[] = "$Id: res_debug.c,v 8.46 2002/05/21 01:57:45 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include "port_before.h" @@ -683,12 +683,10 @@ precsize_ntoa(prec) /* converts ascii size/precision X * 10**Y(cm) to 0xXY. moves pointer. */ static u_int8_t -precsize_aton(strptr) - char **strptr; -{ +precsize_aton(const char **strptr) { unsigned int mval = 0, cmval = 0; u_int8_t retval = 0; - char *cp; + const char *cp; int exponent; int mantissa; @@ -725,11 +723,8 @@ precsize_aton(strptr) /* converts ascii lat/lon to unsigned encoded 32-bit number. moves pointer. */ static u_int32_t -latlon2ul(latlonstrptr,which) - char **latlonstrptr; - int *which; -{ - char *cp; +latlon2ul(const char **latlonstrptr, int *which) { + const char *cp; u_int32_t retval; int deg = 0, min = 0, secs = 0, secsfrac = 0; diff --git a/contrib/bind/lib/resolv/res_init.c b/contrib/bind/lib/resolv/res_init.c index 8dc72f4..9f99d14 100644 --- a/contrib/bind/lib/resolv/res_init.c +++ b/contrib/bind/lib/resolv/res_init.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; -static const char rcsid[] = "$Id: res_init.c,v 8.28 2002/01/30 01:07:35 marka Exp $"; +static const char rcsid[] = "$Id: res_init.c,v 8.29 2002/05/31 06:05:31 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include "port_before.h" @@ -194,7 +194,8 @@ __res_vinit(res_state statp, int preinit) { if (statp->_u._ext.ext != NULL) { memset(statp->_u._ext.ext, 0, sizeof(*statp->_u._ext.ext)); statp->_u._ext.ext->nsaddrs[0].sin = statp->nsaddr; - strcpy(statp->_u._ext.ext->nsuffix, "ip6.int"); + strcpy(statp->_u._ext.ext->nsuffix, "ip6.arpa"); + strcpy(statp->_u._ext.ext->nsuffix2, "ip6.int"); strcpy(statp->_u._ext.ext->bsuffix, "ip6.arpa"); } #ifdef RESOLVSORT @@ -520,6 +521,14 @@ res_setoptions(res_state statp, const char *options, const char *source) strncpy(ext->nsuffix, cp, i); ext->nsuffix[i] = '\0'; } + else if (!strncmp(cp, "nibble2:", sizeof("nibble2:") - 1)) { + if (ext == NULL) + goto skip; + cp += sizeof("nibble2:") - 1; + i = MIN(strcspn(cp, " \t"), sizeof(ext->nsuffix2) - 1); + strncpy(ext->nsuffix2, cp, i); + ext->nsuffix2[i] = '\0'; + } else if (!strncmp(cp, "bitstring:", sizeof("bitstring:") - 1)) { if (ext == NULL) goto skip; @@ -530,16 +539,12 @@ res_setoptions(res_state statp, const char *options, const char *source) } else if (!strncmp(cp, "v6revmode:", sizeof("v6revmode:") - 1)) { cp += sizeof("v6revmode:") - 1; - if (!strncmp(cp, "nibble", sizeof("nibble") - 1)) { - statp->options &= ~RES_NO_NIBBLE; - statp->options |= RES_NO_BITSTRING; - } else if (!strncmp(cp, "bitstring", - sizeof("bitstring") - 1)) { - statp->options |= RES_NO_NIBBLE; - statp->options &= ~RES_NO_BITSTRING; + /* "nibble" and "bitstring" used to be valid */ + if (!strncmp(cp, "single", sizeof("single") - 1)) { + statp->options |= RES_NO_NIBBLE2; } else if (!strncmp(cp, "both", sizeof("both") - 1)) { statp->options &= - ~(RES_NO_NIBBLE|RES_NO_BITSTRING); + ~RES_NO_NIBBLE2; } } else { @@ -613,6 +618,13 @@ const char * res_get_nibblesuffix(res_state statp) { if (statp->_u._ext.ext) return (statp->_u._ext.ext->nsuffix); + return ("ip6.arpa"); +} + +const char * +res_get_nibblesuffix2(res_state statp) { + if (statp->_u._ext.ext) + return (statp->_u._ext.ext->nsuffix2); return ("ip6.int"); } diff --git a/contrib/bind/lib/resolv/res_private.h b/contrib/bind/lib/resolv/res_private.h index 2c7fa5e..ec9b384 100644 --- a/contrib/bind/lib/resolv/res_private.h +++ b/contrib/bind/lib/resolv/res_private.h @@ -12,6 +12,7 @@ struct __res_state_ext { } sort_list[MAXRESOLVSORT]; char nsuffix[64]; char bsuffix[64]; + char nsuffix2[64]; }; extern int |