• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/bind9-45.100/bind9/lib/dns/

Lines Matching +defs:current +defs:hashtable

70 	dns_rbtnode_t **        hashtable;
217 dns_rbt_addonlevel(dns_rbtnode_t *node, dns_rbtnode_t *current, int order,
256 rbt->hashtable = NULL;
296 if (rbt->hashtable != NULL)
297 isc_mem_put(rbt->mctx, rbt->hashtable,
372 dns_rbtnode_t **root, *parent, *child, *current, *new_current;
417 current = NULL;
426 current = child;
428 NODENAME(current, &current_name);
433 *nodep = current;
442 parent = current;
443 child = LEFT(current);
446 parent = current;
447 child = RIGHT(current);
454 * name at the current node. If the name at
455 * the current node is shorter, that means the
457 * name at the current node is longer, that means
478 root = &DOWN(current);
482 PARENT(*root) == current));
485 child = DOWN(current);
486 ADD_LEVEL(&chain, current);
491 * than the number of labels at the current
492 * node, so the current node must be adjusted
537 * current node.
539 new_current->is_root = current->is_root;
540 if (current->nsec == DNS_RBT_NSEC_HAS_NSEC)
543 new_current->nsec = current->nsec;
544 PARENT(new_current) = PARENT(current);
545 LEFT(new_current) = LEFT(current);
546 RIGHT(new_current) = RIGHT(current);
547 COLOR(new_current) = COLOR(current);
550 * Fix pointers that were to the current node.
553 if (LEFT(parent) == current)
564 if (*root == current)
567 NAMELEN(current) = prefix->length;
568 OFFSETLEN(current) = prefix->labels;
575 current->is_root = 1;
576 PARENT(current) = new_current;
577 DOWN(new_current) = current;
582 LEFT(current) = NULL;
583 RIGHT(current) = NULL;
585 MAKE_BLACK(current);
586 ATTRS(current) &= ~DNS_NAMEATTR_ABSOLUTE;
606 * The current node has no data,
636 dns_rbt_addonlevel(new_current, current, order, root);
684 dns_rbtnode_t *current, *last_compared, *current_root;
741 current = rbt->root;
744 while (current != NULL) {
745 NODENAME(current, &current_name);
748 last_compared = current;
765 if (rbt->hashtable == NULL)
769 * The case of current != current_root, that
776 INSIST(current == current_root);
781 * current_root is the root of the current level, so
800 for (hnode = rbt->hashtable[hash % rbt->hashsize];
817 current = hnode;
846 current = NULL;
855 current = LEFT(current);
857 current = RIGHT(current);
864 * the current node's name length, then follow the
870 * Whack off the current node's common parts
879 if (DATA(current) != NULL ||
881 *node = current;
885 * needs to be done before 'current' is pointed
887 * block of code needs the current 'current',
894 ADD_LEVEL(chain, current);
904 FINDCALLBACK(current)) {
913 result = (callback)(current,
922 current = NULL;
930 current = DOWN(current);
931 current_root = current;
943 current = NULL;
949 * If current is not NULL, NOEXACT is not disallowing exact matches,
953 if (current != NULL && (options & DNS_RBTFIND_NOEXACT) == 0 &&
954 (DATA(current) != NULL ||
959 chain->end = current;
968 *node = current;
1012 if (current != NULL) {
1026 DATA(current) == NULL));
1027 chain->end = current;
1060 * Point current to the node that stopped
1069 * The assignment of current to NULL when
1077 current = last_compared;
1079 current = NULL;
1081 while (current != NULL) {
1082 NODENAME(current, &current_name);
1090 last_compared = current;
1096 current = LEFT(current);
1098 current = RIGHT(current);
1102 current = last_compared;
1132 if (DOWN(current) != NULL) {
1133 ADD_LEVEL(chain, current);
1137 DOWN(current));
1147 chain->end = current;
1152 chain->end = current;
1373 dns_name_t current;
1380 dns_name_init(&current, NULL);
1386 NODENAME(node, &current);
1388 result = dns_name_concatenate(name, &current, name, NULL);
1500 HASHNEXT(node) = rbt->hashtable[hash];
1502 rbt->hashtable[hash] = node;
1511 rbt->hashtable = isc_mem_get(rbt->mctx, bytes);
1513 if (rbt->hashtable == NULL)
1516 memset(rbt->hashtable, 0, bytes);
1530 oldtable = rbt->hashtable;
1532 rbt->hashtable = isc_mem_get(rbt->mctx,
1534 if (rbt->hashtable == NULL) {
1535 rbt->hashtable = oldtable;
1541 rbt->hashtable[i] = NULL;
1548 HASHNEXT(node) = rbt->hashtable[hash];
1549 rbt->hashtable[hash] = node;
1575 if (rbt->hashtable != NULL) {
1577 bucket_node = rbt->hashtable[bucket];
1580 rbt->hashtable[bucket] = HASHNEXT(node);
1663 dns_rbt_addonlevel(dns_rbtnode_t *node, dns_rbtnode_t *current, int order,
1673 REQUIRE(current != NULL);
1682 PARENT(node) = current;
1694 NODENAME(current, &current_name);
1697 INSIST(LEFT(current) == NULL);
1698 LEFT(current) = node;
1700 INSIST(RIGHT(current) == NULL);
1701 RIGHT(current) = node;
1705 PARENT(node) = current;
2268 dns_rbtnode_t *current, *previous, *predecessor;
2276 current = chain->end;
2278 if (LEFT(current) != NULL) {
2283 current = LEFT(current);
2285 while (RIGHT(current) != NULL)
2286 current = RIGHT(current);
2288 predecessor = current;
2297 while (! IS_ROOT(current)) {
2298 previous = current;
2299 current = PARENT(current);
2301 if (RIGHT(current) == previous) {
2302 predecessor = current;
2348 INSIST(chain->level_count > 0 && IS_ROOT(current));
2385 dns_rbtnode_t *current, *successor;
2393 current = chain->end;
2395 if (DOWN(current) != NULL) {
2402 OFFSETLEN(current) > 1)
2405 ADD_LEVEL(chain, current);
2406 current = DOWN(current);
2408 while (LEFT(current) != NULL)
2409 current = LEFT(current);
2411 successor = current;
2447 dns_rbtnode_t *current, *previous, *successor;
2454 current = chain->end;
2456 if (RIGHT(current) == NULL) {
2457 while (! IS_ROOT(current)) {
2458 previous = current;
2459 current = PARENT(current);
2461 if (LEFT(current) == previous) {
2462 successor = current;
2467 current = RIGHT(current);
2469 while (LEFT(current) != NULL)
2470 current = LEFT(current);
2472 successor = current;
2492 dns_rbtnode_t *current, *previous, *successor;
2500 current = chain->end;
2506 if (DOWN(current) != NULL) {
2513 OFFSETLEN(current) > 1)
2516 ADD_LEVEL(chain, current);
2517 current = DOWN(current);
2519 while (LEFT(current) != NULL)
2520 current = LEFT(current);
2522 successor = current;
2524 } else if (RIGHT(current) == NULL) {
2536 while (! IS_ROOT(current)) {
2537 previous = current;
2538 current = PARENT(current);
2540 if (LEFT(current) == previous) {
2541 successor = current;
2554 current = chain->levels[--chain->level_count];
2557 if (RIGHT(current) != NULL)
2563 if (successor == NULL && RIGHT(current) != NULL) {
2564 current = RIGHT(current);
2566 while (LEFT(current) != NULL)
2567 current = LEFT(current);
2569 successor = current;