fprintf(fp, "++ Per Zone Query Statistics ++\n");
zone = NULL;
- for (result = dns_zone_first(server->zonemgr, &zone);
- result == ISC_R_SUCCESS;
- next = NULL, result = dns_zone_next(zone, &next), zone = next)
+ for (result = dns_zonemgr_first_zone(server->zonemgr, &zone);
+ result == ISC_R_SUCCESS; next = NULL,
+ result = dns_zonemgr_next_zone(zone, &next), zone = next)
{
isc_stats_t *zonestats = dns_zone_getrequeststats(zone);
if (zonestats != NULL) {
fprintf(fp, "++ Per Zone Glue Cache Statistics ++\n");
zone = NULL;
- for (result = dns_zone_first(server->zonemgr, &zone);
- result == ISC_R_SUCCESS;
- next = NULL, result = dns_zone_next(zone, &next), zone = next)
+ for (result = dns_zonemgr_first_zone(server->zonemgr, &zone);
+ result == ISC_R_SUCCESS; next = NULL,
+ result = dns_zonemgr_next_zone(zone, &next), zone = next)
{
isc_stats_t *gluecachestats = dns_zone_getgluecachestats(zone);
if (gluecachestats != NULL) {
*\li Others
*/
-isc_result_t
-dns_zone_next(dns_zone_t *zone, dns_zone_t **next);
-/*%<
- * Find the next zone in the list of managed zones.
- *
- * Requires:
- *\li 'zone' to be valid
- *\li The zone manager for the indicated zone MUST be locked
- * by the caller. This is not checked.
- *\li 'next' be non-NULL, and '*next' be NULL.
- *
- * Ensures:
- *\li 'next' points to a valid zone (result ISC_R_SUCCESS) or to NULL
- * (result ISC_R_NOMORE).
- */
-
-isc_result_t
-dns_zone_first(dns_zonemgr_t *zmgr, dns_zone_t **first);
-/*%<
- * Find the first zone in the list of managed zones.
- *
- * Requires:
- *\li 'zonemgr' to be valid
- *\li The zone manager for the indicated zone MUST be locked
- * by the caller. This is not checked.
- *\li 'first' be non-NULL, and '*first' be NULL
- *
- * Ensures:
- *\li 'first' points to a valid zone (result ISC_R_SUCCESS) or to NULL
- * (result ISC_R_NOMORE).
- */
-
isc_result_t
dns_zone_getdnsseckeys(dns_zone_t *zone, dns_db_t *db, dns_dbversion_t *ver,
isc_stdtime_t now, dns_dnsseckeylist_t *keys);
*\li 'zmgr' is a valid zone manager.
*\li 'tlsctx_cache' is a valid TLS context cache.
*/
+
+isc_result_t
+dns_zonemgr_next_zone(dns_zone_t *zone, dns_zone_t **next);
+/*%<
+ * Find the next zone in the list of managed zones.
+ *
+ * Requires:
+ *\li 'zone' to be valid
+ *\li The zone manager for the indicated zone MUST be locked
+ * by the caller. This is not checked.
+ *\li 'next' be non-NULL, and '*next' be NULL.
+ *
+ * Ensures:
+ *\li 'next' points to a valid zone (result ISC_R_SUCCESS) or to NULL
+ * (result ISC_R_NOMORE).
+ */
+
+isc_result_t
+dns_zonemgr_first_zone(dns_zonemgr_t *zmgr, dns_zone_t **first);
+/*%<
+ * Find the first zone in the list of managed zones.
+ *
+ * Requires:
+ *\li 'zonemgr' to be valid
+ *\li The zone manager for the indicated zone MUST be locked
+ * by the caller. This is not checked.
+ *\li 'first' be non-NULL, and '*first' be NULL
+ *
+ * Ensures:
+ *\li 'first' points to a valid zone (result ISC_R_SUCCESS) or to NULL
+ * (result ISC_R_NOMORE).
+ */
return result;
}
-isc_result_t
-dns_zone_next(dns_zone_t *zone, dns_zone_t **next) {
- REQUIRE(DNS_ZONE_VALID(zone));
- REQUIRE(next != NULL && *next == NULL);
-
- *next = ISC_LIST_NEXT(zone, link);
- if (*next == NULL) {
- return ISC_R_NOMORE;
- } else {
- return ISC_R_SUCCESS;
- }
-}
-
-isc_result_t
-dns_zone_first(dns_zonemgr_t *zmgr, dns_zone_t **first) {
- REQUIRE(DNS_ZONEMGR_VALID(zmgr));
- REQUIRE(first != NULL && *first == NULL);
-
- *first = ISC_LIST_HEAD(zmgr->zones);
- if (*first == NULL) {
- return ISC_R_NOMORE;
- } else {
- return ISC_R_SUCCESS;
- }
-}
-
static isc_mutex_t *
zone_keymgmt_getlock(dns_zone_t *zone) {
uint32_t hash = dns_name_hash(&zone->origin);
return count;
}
+
+isc_result_t
+dns_zonemgr_next_zone(dns_zone_t *zone, dns_zone_t **next) {
+ REQUIRE(DNS_ZONE_VALID(zone));
+ REQUIRE(next != NULL && *next == NULL);
+
+ *next = ISC_LIST_NEXT(zone, link);
+ if (*next == NULL) {
+ return ISC_R_NOMORE;
+ } else {
+ return ISC_R_SUCCESS;
+ }
+}
+
+isc_result_t
+dns_zonemgr_first_zone(dns_zonemgr_t *zmgr, dns_zone_t **first) {
+ REQUIRE(DNS_ZONEMGR_VALID(zmgr));
+ REQUIRE(first != NULL && *first == NULL);
+
+ *first = ISC_LIST_HEAD(zmgr->zones);
+ if (*first == NULL) {
+ return ISC_R_NOMORE;
+ } else {
+ return ISC_R_SUCCESS;
+ }
+}