Lines Matching defs:sdbiter

1066 	sdb_dbiterator_t *sdbiter;
1079 sdbiter = isc_mem_get(sdb->common.mctx, sizeof(sdb_dbiterator_t));
1080 if (sdbiter == NULL)
1083 sdbiter->common.methods = &dbiterator_methods;
1084 sdbiter->common.db = NULL;
1085 dns_db_attach(db, &sdbiter->common.db);
1086 sdbiter->common.relative_names = ISC_TF(options & DNS_DB_RELATIVENAMES);
1087 sdbiter->common.magic = DNS_DBITERATOR_MAGIC;
1088 ISC_LIST_INIT(sdbiter->nodelist);
1089 sdbiter->current = NULL;
1090 sdbiter->origin = NULL;
1093 result = imp->methods->allnodes(sdb->zone, sdb->dbdata, sdbiter);
1096 dbiterator_destroy((dns_dbiterator_t **) (void *)&sdbiter);
1100 if (sdbiter->origin != NULL) {
1101 ISC_LIST_UNLINK(sdbiter->nodelist, sdbiter->origin, link);
1102 ISC_LIST_PREPEND(sdbiter->nodelist, sdbiter->origin, link);
1105 *iteratorp = (dns_dbiterator_t *)sdbiter;
1454 sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)(*iteratorp);
1455 dns_sdb_t *sdb = (dns_sdb_t *)sdbiter->common.db;
1457 while (!ISC_LIST_EMPTY(sdbiter->nodelist)) {
1459 node = ISC_LIST_HEAD(sdbiter->nodelist);
1460 ISC_LIST_UNLINK(sdbiter->nodelist, node, link);
1464 dns_db_detach(&sdbiter->common.db);
1465 isc_mem_put(sdb->common.mctx, sdbiter, sizeof(sdb_dbiterator_t));
1472 sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator;
1474 sdbiter->current = ISC_LIST_HEAD(sdbiter->nodelist);
1475 if (sdbiter->current == NULL)
1483 sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator;
1485 sdbiter->current = ISC_LIST_TAIL(sdbiter->nodelist);
1486 if (sdbiter->current == NULL)
1494 sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator;
1496 sdbiter->current = ISC_LIST_HEAD(sdbiter->nodelist);
1497 while (sdbiter->current != NULL) {
1498 if (dns_name_equal(sdbiter->current->name, name))
1500 sdbiter->current = ISC_LIST_NEXT(sdbiter->current, link);
1507 sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator;
1509 sdbiter->current = ISC_LIST_PREV(sdbiter->current, link);
1510 if (sdbiter->current == NULL)
1518 sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator;
1520 sdbiter->current = ISC_LIST_NEXT(sdbiter->current, link);
1521 if (sdbiter->current == NULL)
1531 sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator;
1533 attachnode(iterator->db, sdbiter->current, nodep);
1535 return (dns_name_copy(sdbiter->current->name, name, NULL));