Lines Matching refs:current

446 addonlevel(dns_rbtnode_t *node, dns_rbtnode_t *current, int order,
660 /* Reserve space for current node. */
695 /* Serialize the current node. */
1141 dns_rbtnode_t **root, *parent, *child, *current, *new_current;
1220 current = NULL;
1229 current = child;
1231 NODENAME(current, &current_name);
1236 *nodep = current;
1245 parent = current;
1246 child = LEFT(current);
1249 parent = current;
1250 child = RIGHT(current);
1257 * name at the current node. If the name at
1258 * the current node is shorter, that means the
1260 * name at the current node is longer, that means
1281 root = &DOWN(current);
1285 PARENT(*root) == current));
1288 child = DOWN(current);
1295 * than the number of labels at the current
1296 * node, so the current node must be adjusted
1332 * current node.
1334 new_current->is_root = current->is_root;
1335 if (current->nsec == DNS_RBT_NSEC_HAS_NSEC)
1338 new_current->nsec = current->nsec;
1339 PARENT(new_current) = PARENT(current);
1340 LEFT(new_current) = LEFT(current);
1341 RIGHT(new_current) = RIGHT(current);
1342 COLOR(new_current) = COLOR(current);
1345 * Fix pointers that were to the current node.
1348 if (LEFT(parent) == current)
1359 if (*root == current)
1362 NAMELEN(current) = prefix->length;
1363 OFFSETLEN(current) = prefix->labels;
1370 current->is_root = 1;
1371 PARENT(current) = new_current;
1372 DOWN(new_current) = current;
1375 UPPERNODE(new_current) = UPPERNODE(current);
1376 UPPERNODE(current) = new_current;
1382 LEFT(current) = NULL;
1383 RIGHT(current) = NULL;
1385 MAKE_BLACK(current);
1386 ATTRS(current) &= ~DNS_NAMEATTR_ABSOLUTE;
1406 * The current node has no data,
1438 UPPERNODE(new_current) = current;
1442 addonlevel(new_current, current, order, root);
1490 dns_rbtnode_t *current, *last_compared;
1546 current = rbt->root;
1548 while (ISC_LIKELY(current != NULL)) {
1549 NODENAME(current, &current_name);
1558 last_compared = current;
1566 * Here, current is pointing at a subtree root
1570 * find a node to which the current node has a
1583 * The case of current not being a subtree root,
1591 INSIST(IS_ROOT(current));
1596 * current is the root of the current level, so
1599 up_current = PARENT(current);
1649 current = hnode;
1678 current = NULL;
1687 current = LEFT(current);
1689 current = RIGHT(current);
1698 * the current node's name length, then follow the
1706 * Whack off the current node's common parts
1715 if (DATA(current) != NULL ||
1717 *node = current;
1721 * needs to be done before 'current' is pointed
1723 * block of code needs the current 'current',
1730 ADD_LEVEL(chain, current);
1740 FINDCALLBACK(current)) {
1749 result = (callback)(current,
1758 current = NULL;
1766 current = DOWN(current);
1777 current = NULL;
1783 * If current is not NULL, NOEXACT is not disallowing exact matches,
1787 if (current != NULL && (options & DNS_RBTFIND_NOEXACT) == 0 &&
1788 (DATA(current) != NULL ||
1793 chain->end = current;
1802 *node = current;
1846 if (current != NULL) {
1860 DATA(current) == NULL));
1861 chain->end = current;
1894 * Point current to the node that stopped
1903 * The assignment of current to NULL when
1911 current = last_compared;
1913 current = NULL;
1915 while (current != NULL) {
1916 NODENAME(current, &current_name);
1924 last_compared = current;
1930 current = LEFT(current);
1932 current = RIGHT(current);
1936 current = last_compared;
1966 if (DOWN(current) != NULL) {
1967 ADD_LEVEL(chain, current);
1971 DOWN(current));
1981 chain->end = current;
1986 chain->end = current;
2184 dns_name_t current;
2191 dns_name_init(&current, NULL);
2197 NODENAME(node, &current);
2199 result = dns_name_concatenate(name, &current, name, NULL);
2482 addonlevel(dns_rbtnode_t *node, dns_rbtnode_t *current, int order,
2492 REQUIRE(current != NULL);
2501 PARENT(node) = current;
2513 NODENAME(current, &current_name);
2516 INSIST(LEFT(current) == NULL);
2517 LEFT(current) = node;
2519 INSIST(RIGHT(current) == NULL);
2520 RIGHT(current) = node;
2524 PARENT(node) = current;
3244 dns_rbtnode_t *current, *previous, *predecessor;
3252 current = chain->end;
3254 if (LEFT(current) != NULL) {
3259 current = LEFT(current);
3261 while (RIGHT(current) != NULL)
3262 current = RIGHT(current);
3264 predecessor = current;
3273 while (! IS_ROOT(current)) {
3274 previous = current;
3275 current = PARENT(current);
3277 if (RIGHT(current) == previous) {
3278 predecessor = current;
3324 INSIST(chain->level_count > 0 && IS_ROOT(current));
3361 dns_rbtnode_t *current, *successor;
3369 current = chain->end;
3371 if (DOWN(current) != NULL) {
3378 OFFSETLEN(current) > 1)
3381 ADD_LEVEL(chain, current);
3382 current = DOWN(current);
3384 while (LEFT(current) != NULL)
3385 current = LEFT(current);
3387 successor = current;
3423 dns_rbtnode_t *current, *previous, *successor;
3430 current = chain->end;
3432 if (RIGHT(current) == NULL) {
3433 while (! IS_ROOT(current)) {
3434 previous = current;
3435 current = PARENT(current);
3437 if (LEFT(current) == previous) {
3438 successor = current;
3443 current = RIGHT(current);
3445 while (LEFT(current) != NULL)
3446 current = LEFT(current);
3448 successor = current;
3468 dns_rbtnode_t *current, *previous, *successor;
3476 current = chain->end;
3482 if (DOWN(current) != NULL) {
3489 OFFSETLEN(current) > 1)
3492 ADD_LEVEL(chain, current);
3493 current = DOWN(current);
3495 while (LEFT(current) != NULL)
3496 current = LEFT(current);
3498 successor = current;
3500 } else if (RIGHT(current) == NULL) {
3512 while (! IS_ROOT(current)) {
3513 previous = current;
3514 current = PARENT(current);
3516 if (LEFT(current) == previous) {
3517 successor = current;
3532 * node splits to occur, "current" may
3540 INSIST(PARENT(current) == NULL);
3544 current = chain->levels[--chain->level_count];
3547 if (RIGHT(current) != NULL)
3553 if (successor == NULL && RIGHT(current) != NULL) {
3554 current = RIGHT(current);
3556 while (LEFT(current) != NULL)
3557 current = LEFT(current);
3559 successor = current;
3564 * If we determine that the current node is the successor to