+6086. [cleanup] Remove some remnants of bitstring labels. [GL !7196]
+
6085. [func] Add isc_time_monotonic() to simplify time measurements.
[GL !7468]
/* This is a valid IPv6 address. */
dns_fixedname_t fname;
dns_name_t *name;
- unsigned int options = 0;
name = dns_fixedname_initname(&fname);
- result = dns_byaddr_createptrname(&addr, options, name);
+ result = dns_byaddr_createptrname(&addr, name);
if (result != ISC_R_SUCCESS) {
return (result);
}
/* This is a valid IPv6 address. */
dns_fixedname_t fname;
dns_name_t *name;
- unsigned int options = 0;
name = dns_fixedname_initname(&fname);
- result = dns_byaddr_createptrname(&addr, options, name);
+ result = dns_byaddr_createptrname(&addr, name);
if (result != ISC_R_SUCCESS) {
return (result);
}
* @example
* 192.168.0.1 -> 1.0.168.192.in-addr.arpa
*/
- result = dns_byaddr_createptrname(&isc_ip, 0, name);
+ result = dns_byaddr_createptrname(&isc_ip, name);
if (result != ISC_R_SUCCESS) {
log_write(ISC_LOG_ERROR,
"syncptr_find_zone: dns_byaddr_createptrname -> %s\n",
/* This is a valid IPv6 address. */
dns_fixedname_t fname;
dns_name_t *name;
- unsigned int options = 0;
name = dns_fixedname_initname(&fname);
- result = dns_byaddr_createptrname(&addr, options, name);
- CHECK("dns_byaddr_createptrname2", result);
+ result = dns_byaddr_createptrname(&addr, name);
+ CHECK("dns_byaddr_createptrname", result);
dns_name_format(name, reverse, (unsigned int)len);
return;
} else {
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
isc_result_t
-dns_byaddr_createptrname(const isc_netaddr_t *address, unsigned int options,
- dns_name_t *name) {
+dns_byaddr_createptrname(const isc_netaddr_t *address, dns_name_t *name) {
char textname[128];
const unsigned char *bytes;
int i;
unsigned int len;
REQUIRE(address != NULL);
- UNUSED(options);
/*
* We create the text representation and then convert to a
ISC_LANG_BEGINDECLS
isc_result_t
-dns_byaddr_createptrname(const isc_netaddr_t *address, unsigned int options,
- dns_name_t *name);
+dns_byaddr_createptrname(const isc_netaddr_t *address, dns_name_t *name);
/*%<
- * Creates a name that would be used in a PTR query for this address. The
- * nibble flag indicates that the 'nibble' format is to be used if an IPv6
- * address is provided, instead of the 'bitstring' format. Since we dropped
- * the support of the bitstring labels, it is expected that the flag is always
- * set. 'options' are the same as for dns_byaddr_create().
+ * Creates a name that would be used in a PTR query for this address.
*
* Requires:
*
*/
/*%
- * The number of level blocks to allocate at a time. Currently the maximum
- * number of levels is allocated directly in the structure, but future
- * revisions of this code might have a static initial block with dynamic
- * growth. Allocating space for 256 levels when the tree is almost never that
- * deep is wasteful, but it's not clear that it matters, since the waste is
- * only 2MB for 1000 concurrently active chains on a system with 64-bit
- * pointers.
+ * The number of level blocks to allocate at a time, same as the maximum
+ * number of labels. Allocating space for 128 levels when the tree is
+ * almost never that deep is wasteful, but it's not clear that it matters,
+ * since the waste is only 1MB for 1000 concurrently active chains on a
+ * system with 64-bit pointers.
*/
-#define DNS_RBT_LEVELBLOCK 254
+#define DNS_RBT_LEVELBLOCK 127
typedef struct dns_rbtnodechain {
unsigned int magic;
*/
dns_rbtnode_t *end;
/*%
- * The maximum number of labels in a name is 128; bitstrings mean
- * a conceptually very large number (which I have not bothered to
- * compute) of logical levels because splitting can potentially occur
- * at each bit. However, DNSSEC restricts the number of "logical"
- * labels in a name to 255, meaning only 254 pointers are needed
- * in the worst case.
+ * Currently the maximum number of levels is allocated directly in
+ * the structure, but future revisions of this code might have a
+ * static initial block with dynamic growth.
*/
dns_rbtnode_t *levels[DNS_RBT_LEVELBLOCK];
/*%
/*
* search_name is the name segment being sought in each tree level.
* By using a fixedname, the search_name will definitely have offsets
- * for use by any splitting.
- * By using dns_name_clone, no name data should be copied thanks to
- * the lack of bitstring labels.
+ * for use by any splitting. By using dns_name_clone, no name data
+ * should be copied.
*/
search_name = dns_fixedname_initname(&fixedsearchname);
INSIST(search_name != NULL);
/*
* All of the labels have been tried against the hash
- * table. Since we dropped the support of bitstring
- * labels, the name isn't in the table.
+ * table.
*/
current = NULL;
continue;
case ISC_R_RANGE:
case ISC_R_UNEXPECTEDEND:
case DNS_R_BADAAAA:
- /* case DNS_R_BADBITSTRING: deprecated */
case DNS_R_BADCKSUM:
case DNS_R_BADCLASS:
case DNS_R_BADLABELTYPE:
case DNS_R_BADPOINTER:
case DNS_R_BADTTL:
case DNS_R_BADZONE:
- /* case DNS_R_BITSTRINGTOOLONG: deprecated */
case DNS_R_EXTRADATA:
case DNS_R_LABELTOOLONG:
case DNS_R_NOREDATA: