Lines Matching refs:sdbiter

1044 	sdb_dbiterator_t *sdbiter;
1057 sdbiter = isc_mem_get(sdb->common.mctx, sizeof(sdb_dbiterator_t));
1058 if (sdbiter == NULL)
1061 sdbiter->common.methods = &dbiterator_methods;
1062 sdbiter->common.db = NULL;
1063 dns_db_attach(db, &sdbiter->common.db);
1064 sdbiter->common.relative_names = ISC_TF(options & DNS_DB_RELATIVENAMES);
1065 sdbiter->common.magic = DNS_DBITERATOR_MAGIC;
1066 ISC_LIST_INIT(sdbiter->nodelist);
1067 sdbiter->current = NULL;
1068 sdbiter->origin = NULL;
1071 result = imp->methods->allnodes(sdb->zone, sdb->dbdata, sdbiter);
1074 dbiterator_destroy((dns_dbiterator_t **) (void *)&sdbiter);
1078 if (sdbiter->origin != NULL) {
1079 ISC_LIST_UNLINK(sdbiter->nodelist, sdbiter->origin, link);
1080 ISC_LIST_PREPEND(sdbiter->nodelist, sdbiter->origin, link);
1083 *iteratorp = (dns_dbiterator_t *)sdbiter;
1420 sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)(*iteratorp);
1421 dns_sdb_t *sdb = (dns_sdb_t *)sdbiter->common.db;
1423 while (!ISC_LIST_EMPTY(sdbiter->nodelist)) {
1425 node = ISC_LIST_HEAD(sdbiter->nodelist);
1426 ISC_LIST_UNLINK(sdbiter->nodelist, node, link);
1430 dns_db_detach(&sdbiter->common.db);
1431 isc_mem_put(sdb->common.mctx, sdbiter, sizeof(sdb_dbiterator_t));
1438 sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator;
1440 sdbiter->current = ISC_LIST_HEAD(sdbiter->nodelist);
1441 if (sdbiter->current == NULL)
1449 sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator;
1451 sdbiter->current = ISC_LIST_TAIL(sdbiter->nodelist);
1452 if (sdbiter->current == NULL)
1460 sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator;
1462 sdbiter->current = ISC_LIST_HEAD(sdbiter->nodelist);
1463 while (sdbiter->current != NULL) {
1464 if (dns_name_equal(sdbiter->current->name, name))
1466 sdbiter->current = ISC_LIST_NEXT(sdbiter->current, link);
1473 sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator;
1475 sdbiter->current = ISC_LIST_PREV(sdbiter->current, link);
1476 if (sdbiter->current == NULL)
1484 sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator;
1486 sdbiter->current = ISC_LIST_NEXT(sdbiter->current, link);
1487 if (sdbiter->current == NULL)
1497 sdb_dbiterator_t *sdbiter = (sdb_dbiterator_t *)iterator;
1499 attachnode(iterator->db, sdbiter->current, nodep);
1501 return (dns_name_copy(sdbiter->current->name, name, NULL));