From cd02757774252fe5b92dbd59a24b34721fb49ff4 Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Fri, 15 Oct 1999 20:49:33 +0000 Subject: [PATCH] add negative caching result codes --- lib/dns/include/dns/db.h | 15 ++++++++++++--- lib/dns/include/dns/result.h | 4 +++- lib/dns/result.c | 2 ++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/lib/dns/include/dns/db.h b/lib/dns/include/dns/db.h index 069a69ebc1..25e76bd264 100644 --- a/lib/dns/include/dns/db.h +++ b/lib/dns/include/dns/db.h @@ -674,7 +674,7 @@ dns_db_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version, * DNS_R_NXDOMAIN The desired name does not * exist. * - * DNS_R_NXRDATASET The desired name exists, but + * DNS_R_NXRRSET The desired name exists, but * the desired type does not. * * DNS_R_NXGLUE The desired name exists, but @@ -694,8 +694,17 @@ dns_db_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version, * use its nameserver(s) of last * resort (e.g. root hints). * - * XXX There will be a result codes for negative cache entries - * in the future. + * DNS_R_NCACHENXDOMAIN The desired name does not + * exist. 'node' is bound to the + * cache node with the desired + * name, and 'rdataset' contains + * the negative caching proof. + * + * DNS_R_NCACHENXRRSET The desired type does not + * exist. 'node' is bound to the + * cache node with the desired + * name, and 'rdataset' contains + * the negative caching proof. * * Error results: * diff --git a/lib/dns/include/dns/result.h b/lib/dns/include/dns/result.h index d2daa9ab71..df767903b8 100644 --- a/lib/dns/include/dns/result.h +++ b/lib/dns/include/dns/result.h @@ -98,8 +98,10 @@ typedef isc_result_t dns_result_t; /* XXXRTH for legacy use only */ #define DNS_R_HINT (ISC_RESULTCLASS_DNS + 48) #define DNS_R_DROP (ISC_RESULTCLASS_DNS + 49) #define DNS_R_NOTLOADED (ISC_RESULTCLASS_DNS + 50) +#define DNS_R_NCACHENXDOMAIN (ISC_RESULTCLASS_DNS + 51) +#define DNS_R_NCACHENXRRSET (ISC_RESULTCLASS_DNS + 52) -#define DNS_R_NRESULTS 51 /* Number of results */ +#define DNS_R_NRESULTS 53 /* Number of results */ /* * DNS wire format rcodes diff --git a/lib/dns/result.c b/lib/dns/result.c index 0feb90d70b..c81292964f 100644 --- a/lib/dns/result.c +++ b/lib/dns/result.c @@ -78,6 +78,8 @@ static char *text[DNS_R_NRESULTS] = { "hint", /* 48 */ "drop", /* 49 */ "zone not loaded", /* 50 */ + "ncache nxdomain", /* 51 */ + "ncache nxrrset", /* 52 */ }; static char *rcode_text[DNS_R_NRCODERESULTS] = {