From 2db105b04c05f523ab0a4ad031e65bc4aa138085 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Fri, 11 Nov 2011 01:00:40 +0000 Subject: [PATCH] Add ISC_R_NOMORE to dlz_minimal.h, document its use in findzone() routines. No CHANGES note. --- contrib/dlz/example/README | 9 ++++++--- contrib/dlz/example/dlz_minimal.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/contrib/dlz/example/README b/contrib/dlz/example/README index 42d38ce455..3468b6d8f2 100644 --- a/contrib/dlz/example/README +++ b/contrib/dlz/example/README @@ -110,9 +110,12 @@ are mandatory, others optional). - isc_result_t dlz_findzonedb(void *dbdata, const char *name); - Required for all external DLZ modules. This indicates whether the - DLZ module can answer for a given zone. Returns ISC_R_SUCCESS if - so, otherwise ISC_R_NOTFOUND. + Required for all external DLZ modules. This indicates whether + the DLZ module can answer for the given name. Returns ISC_R_SUCCESS + if so, and ISC_R_NOTFOUND if not. As an optimization, it can + also return ISC_R_NOMORE: this indicates that the DLZ module has + no data for the given name or for any name above it in the DNS. + This prevents named from searching for a zone cut. - isc_result_t dlz_lookup(const char *zone, const char *name, void *dbdata, dns_sdlzlookup_t *lookup, diff --git a/contrib/dlz/example/dlz_minimal.h b/contrib/dlz/example/dlz_minimal.h index bfad3b2ad0..c72c1d4c75 100644 --- a/contrib/dlz/example/dlz_minimal.h +++ b/contrib/dlz/example/dlz_minimal.h @@ -47,6 +47,7 @@ typedef uint32_t dns_ttl_t; #define ISC_R_NOPERM 6 #define ISC_R_NOTFOUND 23 #define ISC_R_FAILURE 25 +#define ISC_R_NOMORE 29 /* boolean values */ #define ISC_TRUE 1