mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-22 10:10:06 +00:00
Make isc_result a static enum
Remove the dynamic registration of result codes. Convert isc_result_t from unsigned + #defines into 32-bit enum type in grand unified <isc/result.h> header. Keep the existing values of the result codes even at the expense of the description and identifier tables being unnecessary large. Additionally, add couple of: switch (result) { [...] default: break; } statements where compiler now complains about missing enum values in the switch statement.
This commit is contained in:
parent
804ec1bcaa
commit
2e3a2eecfe
@ -22,6 +22,7 @@
|
||||
#include <isc/netdb.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/symtab.h>
|
||||
@ -38,7 +39,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/types.h>
|
||||
#include <dns/zone.h>
|
||||
|
||||
|
@ -32,7 +32,6 @@
|
||||
#include <dns/log.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/rootns.h>
|
||||
#include <dns/zone.h>
|
||||
|
||||
@ -451,7 +450,7 @@ configure_zone(const char *vclass, const char *view, const cfg_obj_t *zconfig,
|
||||
NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "%s/%s/%s: %s\n", view, zname, zclass,
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
@ -708,8 +707,6 @@ main(int argc, char **argv) {
|
||||
|
||||
RUNTIME_CHECK(setup_logging(mctx, stdout, &logc) == ISC_R_SUCCESS);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
RUNTIME_CHECK(cfg_parser_create(mctx, logc, &parser) == ISC_R_SUCCESS);
|
||||
|
||||
if (nodeprecate) {
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/socket.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
@ -38,7 +39,6 @@
|
||||
#include <dns/name.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/types.h>
|
||||
#include <dns/zone.h>
|
||||
|
||||
@ -59,7 +59,7 @@ static enum { progmode_check, progmode_compile } progmode;
|
||||
if (result != ISC_R_SUCCESS) { \
|
||||
if (!quiet) \
|
||||
fprintf(stderr, "%s() returned %s\n", \
|
||||
function, dns_result_totext(result)); \
|
||||
function, isc_result_totext(result)); \
|
||||
return (result); \
|
||||
} \
|
||||
} while (0)
|
||||
@ -521,8 +521,6 @@ main(int argc, char **argv) {
|
||||
ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
dns_result_register();
|
||||
|
||||
origin = argv[isc_commandline_index++];
|
||||
|
||||
if (isc_commandline_index == argc) {
|
||||
|
@ -36,7 +36,6 @@
|
||||
|
||||
#include <dns/keyvalues.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
@ -97,8 +96,6 @@ main(int argc, char **argv) {
|
||||
int len = 0;
|
||||
int ch;
|
||||
|
||||
dns_result_register();
|
||||
|
||||
result = isc_file_progname(*argv, program, sizeof(program));
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
memmove(program, "tsig-keygen", 11);
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <isc/netmgr.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/socket.h>
|
||||
#include <isc/string.h>
|
||||
@ -55,12 +56,10 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/secalg.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
#include <dst/result.h>
|
||||
|
||||
#include <isccfg/log.h>
|
||||
#include <isccfg/namedconf.h>
|
||||
@ -1736,8 +1735,6 @@ main(int argc, char *argv[]) {
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
result = dst_lib_init(mctx, NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("dst_lib_init failed: %d", result);
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/util.h>
|
||||
@ -38,7 +39,6 @@
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/tsig.h>
|
||||
|
||||
#include "dighost.h"
|
||||
|
@ -68,11 +68,9 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/tsig.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
#include <dst/result.h>
|
||||
|
||||
#include <isccfg/namedconf.h>
|
||||
|
||||
@ -1332,8 +1330,6 @@ setup_libs(void) {
|
||||
|
||||
debug("setup_libs()");
|
||||
|
||||
dns_result_register();
|
||||
|
||||
result = isc_net_probeipv4();
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
have_ipv4 = true;
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/serial.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/time.h>
|
||||
@ -50,7 +51,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/time.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
@ -475,7 +475,7 @@ match_key_dsset(keyinfo_t *ki, dns_rdataset_t *dsset, strictness_t strictness) {
|
||||
"dns_ds_buildrdata("
|
||||
"keytag=%d, algo=%d, digest=%d): %s\n",
|
||||
ds.key_tag, ds.algorithm, ds.digest_type,
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
continue;
|
||||
}
|
||||
/* allow for both DS and CDS */
|
||||
@ -552,7 +552,7 @@ match_keyset_dsset(dns_rdataset_t *keyset, dns_rdataset_t *dsset,
|
||||
vbprintf(3,
|
||||
"dns_dnssec_keyfromrdata("
|
||||
"keytag=%d, algo=%d): %s\n",
|
||||
ki->tag, ki->algo, dns_result_totext(result));
|
||||
ki->tag, ki->algo, isc_result_totext(result));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1057,8 +1057,6 @@ main(int argc, char *argv[]) {
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
|
||||
#define OPTIONS "a:c:Dd:f:i:ms:T:uv:V"
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@ -39,7 +40,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
@ -373,8 +373,6 @@ main(int argc, char **argv) {
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
|
||||
#define OPTIONS "12Aa:Cc:d:Ff:K:l:sT:v:hV"
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@ -37,7 +38,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
@ -312,8 +312,6 @@ main(int argc, char **argv) {
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
|
||||
#define CMDLINE_FLAGS "D:f:hK:L:P:v:V"
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@ -31,7 +32,6 @@
|
||||
#include <dns/log.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/secalg.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
@ -157,8 +157,6 @@ main(int argc, char **argv) {
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
|
||||
isc_stdtime_get(&now);
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@ -47,7 +48,6 @@
|
||||
#include <dns/log.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/secalg.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
@ -868,8 +868,6 @@ main(int argc, char **argv) {
|
||||
usage();
|
||||
}
|
||||
|
||||
dns_result_register();
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
|
||||
/*
|
||||
|
@ -23,11 +23,11 @@
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/keyvalues.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
@ -83,8 +83,6 @@ main(int argc, char **argv) {
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
|
||||
while ((ch = isc_commandline_parse(argc, argv, "E:fK:rRhv:V")) != -1) {
|
||||
|
@ -25,13 +25,13 @@
|
||||
#include <isc/hash.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/time.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/keyvalues.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
@ -248,8 +248,6 @@ main(int argc, char **argv) {
|
||||
|
||||
setup_logging(mctx, &log);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
|
||||
isc_stdtime_get(&now);
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include <isc/os.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/rwlock.h>
|
||||
#include <isc/safe.h>
|
||||
#include <isc/serial.h>
|
||||
@ -76,7 +77,6 @@
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/soa.h>
|
||||
#include <dns/time.h>
|
||||
#include <dns/update.h>
|
||||
@ -455,6 +455,8 @@ expecttofindkey(dns_name_t *name) {
|
||||
case DNS_R_CNAME:
|
||||
case DNS_R_DNAME:
|
||||
return (false);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
dns_name_format(name, namestr, sizeof(namestr));
|
||||
fatal("failure looking for '%s DNSKEY' in database: %s", namestr,
|
||||
@ -3390,8 +3392,6 @@ main(int argc, char *argv[]) {
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
|
||||
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <isc/os.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/rwlock.h>
|
||||
#include <isc/serial.h>
|
||||
#include <isc/stdio.h>
|
||||
@ -54,7 +55,6 @@
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/soa.h>
|
||||
#include <dns/time.h>
|
||||
#include <dns/zoneverify.h>
|
||||
@ -208,8 +208,6 @@ main(int argc, char *argv[]) {
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
isc_commandline_errprint = false;
|
||||
|
||||
while ((ch = isc_commandline_parse(argc, argv, CMDLINE_FLAGS)) != -1) {
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <isc/list.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/time.h>
|
||||
#include <isc/util.h>
|
||||
@ -46,7 +47,6 @@
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/secalg.h>
|
||||
#include <dns/time.h>
|
||||
|
||||
|
@ -22,7 +22,6 @@
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/result.h>
|
||||
#include <dns/sdb.h>
|
||||
|
||||
#include <named/builtin.h>
|
||||
|
@ -17,15 +17,13 @@
|
||||
#include <isc/event.h>
|
||||
#include <isc/lex.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/timer.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <isccc/alist.h>
|
||||
#include <isccc/cc.h>
|
||||
#include <isccc/result.h>
|
||||
|
||||
#include <named/control.h>
|
||||
#include <named/globals.h>
|
||||
|
@ -32,13 +32,10 @@
|
||||
#include <isc/task.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <isccc/alist.h>
|
||||
#include <isccc/cc.h>
|
||||
#include <isccc/ccmsg.h>
|
||||
#include <isccc/events.h>
|
||||
#include <isccc/result.h>
|
||||
#include <isccc/sexpr.h>
|
||||
#include <isccc/symtab.h>
|
||||
#include <isccc/util.h>
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#include <dns/dlz_dlopen.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <dlz/dlz_dlopen_driver.h>
|
||||
#include <named/globals.h>
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include <isc/os.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/resource.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
@ -47,13 +48,8 @@
|
||||
#include <dns/dyndb.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/resolver.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
#include <isccc/result.h>
|
||||
|
||||
#include <dlz/dlz_dlopen_driver.h>
|
||||
|
||||
#ifdef HAVE_GPERFTOOLS_PROFILER
|
||||
@ -1433,10 +1429,6 @@ main(int argc, char *argv[]) {
|
||||
|
||||
named_os_init(program_name);
|
||||
|
||||
dns_result_register();
|
||||
dst_result_register();
|
||||
isccc_result_register();
|
||||
|
||||
parse_command_line(argc, argv);
|
||||
|
||||
#ifdef ENABLE_AFL
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <isc/print.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/resource.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/siphash.h>
|
||||
#include <isc/socket.h>
|
||||
#include <isc/stat.h>
|
||||
@ -100,7 +101,6 @@
|
||||
#include <dns/zt.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
#include <dst/result.h>
|
||||
|
||||
#include <isccfg/grammar.h>
|
||||
#include <isccfg/kaspconf.h>
|
||||
@ -11326,7 +11326,7 @@ cleanup:
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"dumpstats failed: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
@ -11465,7 +11465,7 @@ resume:
|
||||
}
|
||||
if (result == ISC_R_NOTIMPLEMENTED) {
|
||||
fprintf(dctx->fp, "; %s\n",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
} else if (result != ISC_R_SUCCESS) {
|
||||
goto cleanup;
|
||||
}
|
||||
@ -11513,7 +11513,7 @@ resume:
|
||||
result = dns_zone_getdb(dctx->zone->zone, &dctx->db);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(dctx->fp, "; %s\n",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
goto nextzone;
|
||||
}
|
||||
dns_db_currentversion(dctx->db, &dctx->version);
|
||||
@ -11526,7 +11526,7 @@ resume:
|
||||
}
|
||||
if (result == ISC_R_NOTIMPLEMENTED) {
|
||||
fprintf(dctx->fp, "; %s\n",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
result = ISC_R_SUCCESS;
|
||||
POST(result);
|
||||
goto nextzone;
|
||||
@ -11554,7 +11554,7 @@ cleanup:
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"dumpdb failed: %s", dns_result_totext(result));
|
||||
"dumpdb failed: %s", isc_result_totext(result));
|
||||
}
|
||||
dumpcontext_destroy(dctx);
|
||||
}
|
||||
@ -11797,7 +11797,7 @@ cleanup:
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"dumpsecroots failed: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
@ -11836,7 +11836,7 @@ cleanup:
|
||||
isc_log_write(named_g_lctx, NAMED_LOGCATEGORY_GENERAL,
|
||||
NAMED_LOGMODULE_SERVER, ISC_LOG_ERROR,
|
||||
"dumprecursing failed: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
return (result);
|
||||
}
|
||||
@ -12850,6 +12850,8 @@ named_server_freeze(named_server_t *server, bool freeze, isc_lex_t *lex,
|
||||
"Check the logs to see the result.";
|
||||
result = ISC_R_SUCCESS;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,10 +16,10 @@
|
||||
#include <isc/base64.h>
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/result.h>
|
||||
#include <dns/tsig.h>
|
||||
|
||||
#include <isccfg/cfg.h>
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <isc/file.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/stats.h>
|
||||
#include <isc/string.h> /* Required for HP/UX (and others?) */
|
||||
#include <isc/util.h>
|
||||
@ -34,7 +35,6 @@
|
||||
#include <dns/rdatalist.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/sdlz.h>
|
||||
#include <dns/ssu.h>
|
||||
#include <dns/stats.h>
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
@ -63,7 +64,6 @@
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/request.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/tkey.h>
|
||||
#include <dns/tsig.h>
|
||||
|
||||
@ -532,7 +532,7 @@ setup_keystr(void) {
|
||||
false, NULL, 0, 0, gmctx, NULL, &tsigkey);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "could not create key from %s: %s\n", keystr,
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
} else {
|
||||
dst_key_setbits(tsigkey->key, digestbits);
|
||||
}
|
||||
@ -805,8 +805,6 @@ setup_system(void) {
|
||||
|
||||
ddebug("setup_system()");
|
||||
|
||||
dns_result_register();
|
||||
|
||||
isc_log_create(gmctx, &glctx, &logconfig);
|
||||
isc_log_setcontext(glctx);
|
||||
dns_log_init(glctx);
|
||||
@ -1642,7 +1640,7 @@ evaluate_key(char *cmdline) {
|
||||
isc_mem_free(gmctx, secret);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "could not create key from %s %s: %s\n",
|
||||
namestr, secretstr, dns_result_totext(result));
|
||||
namestr, secretstr, isc_result_totext(result));
|
||||
return (STATUS_SYNTAX);
|
||||
}
|
||||
dst_key_setbits(tsigkey->key, digestbits);
|
||||
@ -3184,7 +3182,7 @@ recvgss(isc_task_t *task, isc_event_t *event) {
|
||||
result = dns_message_settsigkey(rcvmsg, tsigkey);
|
||||
check_result(result, "dns_message_settsigkey");
|
||||
result = dns_message_checksig(rcvmsg, NULL);
|
||||
ddebug("tsig verification: %s", dns_result_totext(result));
|
||||
ddebug("tsig verification: %s", isc_result_totext(result));
|
||||
check_result(result, "dns_message_checksig");
|
||||
#endif /* 0 */
|
||||
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include <dns/log.h>
|
||||
#include <dns/message.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/types.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include <dns/log.h>
|
||||
#include <dns/message.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/types.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/socket.h>
|
||||
#include <isc/stdtime.h>
|
||||
#include <isc/string.h>
|
||||
@ -42,7 +43,6 @@
|
||||
#include <isccc/base64.h>
|
||||
#include <isccc/cc.h>
|
||||
#include <isccc/ccmsg.h>
|
||||
#include <isccc/result.h>
|
||||
#include <isccc/sexpr.h>
|
||||
#include <isccc/types.h>
|
||||
#include <isccc/util.h>
|
||||
@ -1046,8 +1046,6 @@ main(int argc, char **argv) {
|
||||
|
||||
parse_config(rndc_mctx, log, keyname, &pctx, &config);
|
||||
|
||||
isccc_result_register();
|
||||
|
||||
isc_buffer_allocate(rndc_mctx, &databuf, 2048);
|
||||
|
||||
/*
|
||||
|
@ -6,14 +6,14 @@
|
||||
#define _LD_LOG_H_
|
||||
|
||||
#include <isc/error.h>
|
||||
#include <isc/result.h>
|
||||
|
||||
#include <dns/log.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#define fatal_error(...) isc_error_fatal(__FILE__, __LINE__, __VA_ARGS__)
|
||||
|
||||
#define log_error_r(fmt, ...) \
|
||||
log_error(fmt ": %s", ##__VA_ARGS__, dns_result_totext(result))
|
||||
log_error(fmt ": %s", ##__VA_ARGS__, isc_result_totext(result))
|
||||
|
||||
#define log_error(format, ...) log_write(ISC_LOG_ERROR, format, ##__VA_ARGS__)
|
||||
|
||||
|
@ -222,7 +222,7 @@ activate_zone(sample_instance_t *inst, dns_zone_t *raw) {
|
||||
result = publish_zone(inst, raw);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
dns_zone_log(raw, ISC_LOG_ERROR, "cannot add zone to view: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
@ -27,8 +27,6 @@
|
||||
#include <isc/types.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <ns/client.h>
|
||||
#include <ns/events.h>
|
||||
#include <ns/hooks.h>
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/db.h>
|
||||
@ -25,7 +26,6 @@
|
||||
#include <dns/journal.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
#define CHECK(r) \
|
||||
@ -115,8 +115,6 @@ main(int argc, char **argv) {
|
||||
|
||||
CHECK(isc_log_usechannel(logconfig, "stderr", NULL, NULL));
|
||||
|
||||
dns_result_register();
|
||||
|
||||
result = loadzone(&olddb, origin, file1);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "Couldn't load %s: ", file1);
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <isc/netmgr.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/util.h>
|
||||
@ -42,8 +43,6 @@
|
||||
#include <dns/types.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
#define CHECK(str, x) \
|
||||
{ \
|
||||
if ((x) != ISC_R_SUCCESS) { \
|
||||
@ -93,7 +92,7 @@ recvresponse(isc_task_t *task, isc_event_t *event) {
|
||||
CHECK("dns_request_getresponse", result);
|
||||
|
||||
if (response->rcode != dns_rcode_noerror) {
|
||||
result = ISC_RESULTCLASS_DNSRCODE + response->rcode;
|
||||
result = dns_result_fromrcode(response->rcode);
|
||||
fprintf(stderr, "I:response rcode: %s\n",
|
||||
isc_result_totext(result));
|
||||
exit(-1);
|
||||
@ -243,8 +242,6 @@ main(int argc, char *argv[]) {
|
||||
have_src = true;
|
||||
}
|
||||
|
||||
dns_result_register();
|
||||
|
||||
isc_sockaddr_any(&bind_any);
|
||||
|
||||
result = ISC_R_FAILURE;
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/netmgr.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/timer.h>
|
||||
@ -42,7 +43,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/secalg.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
@ -471,7 +471,7 @@ main(int argc, char *argv[]) {
|
||||
resopt, &namelist);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fprintf(stderr, "resolution failed: %s\n",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
for (name = ISC_LIST_HEAD(namelist); name != NULL;
|
||||
name = ISC_LIST_NEXT(name, link))
|
||||
|
@ -28,17 +28,17 @@
|
||||
#include <openssl/objects.h>
|
||||
#include <openssl/rsa.h>
|
||||
|
||||
#include <isc/result.h>
|
||||
|
||||
#include <dns/dnssec.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/keyvalues.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/secalg.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
#include <dst/result.h>
|
||||
|
||||
dst_key_t *key;
|
||||
dns_fixedname_t fname;
|
||||
@ -100,8 +100,6 @@ main(int argc, char **argv) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
dns_result_register();
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
CHECK(dst_lib_init(mctx, NULL), "dst_lib_init()");
|
||||
isc_log_create(mctx, &log_, &logconfig);
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <isc/nonce.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/util.h>
|
||||
@ -37,8 +38,6 @@
|
||||
#include <dns/tsig.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
#define CHECK(str, x) \
|
||||
{ \
|
||||
if ((x) != ISC_R_SUCCESS) { \
|
||||
@ -92,7 +91,7 @@ recvquery(isc_task_t *task, isc_event_t *event) {
|
||||
CHECK("dns_request_getresponse", result);
|
||||
|
||||
if (response->rcode != dns_rcode_noerror) {
|
||||
result = ISC_RESULTCLASS_DNSRCODE + response->rcode;
|
||||
result = dns_result_fromrcode(response->rcode);
|
||||
fprintf(stderr, "I:response rcode: %s\n",
|
||||
isc_result_totext(result));
|
||||
exit(-1);
|
||||
@ -213,8 +212,6 @@ main(int argc, char *argv[]) {
|
||||
ownername_str = argv[4];
|
||||
}
|
||||
|
||||
dns_result_register();
|
||||
|
||||
isc_mem_debugging = ISC_MEM_DEBUGRECORD;
|
||||
isc_mem_create(&mctx);
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <isc/netmgr.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/util.h>
|
||||
@ -36,8 +37,6 @@
|
||||
#include <dns/tsig.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
#define CHECK(str, x) \
|
||||
{ \
|
||||
if ((x) != ISC_R_SUCCESS) { \
|
||||
@ -83,7 +82,7 @@ recvquery(isc_task_t *task, isc_event_t *event) {
|
||||
CHECK("dns_request_getresponse", result);
|
||||
|
||||
if (response->rcode != dns_rcode_noerror) {
|
||||
result = ISC_RESULTCLASS_DNSRCODE + response->rcode;
|
||||
result = dns_result_fromrcode(response->rcode);
|
||||
fprintf(stderr, "I:response rcode: %s\n",
|
||||
isc_result_totext(result));
|
||||
exit(-1);
|
||||
@ -158,8 +157,6 @@ main(int argc, char **argv) {
|
||||
port = atoi(argv[2]);
|
||||
keyname = argv[3];
|
||||
|
||||
dns_result_register();
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
|
||||
isc_log_create(mctx, &log, &logconfig);
|
||||
|
@ -18,11 +18,11 @@
|
||||
#include <isc/file.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/message.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
int parseflags = 0;
|
||||
isc_mem_t *mctx = NULL;
|
||||
@ -38,7 +38,7 @@ printmessage(dns_message_t *msg);
|
||||
static inline void
|
||||
CHECKRESULT(isc_result_t result, const char *msg) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
printf("%s: %s\n", msg, dns_result_totext(result));
|
||||
printf("%s: %s\n", msg, isc_result_totext(result));
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include <isc/hex.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@ -47,7 +48,6 @@
|
||||
#include <dns/masterdump.h>
|
||||
#include <dns/message.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include "dnstap.pb-c.h"
|
||||
|
||||
@ -360,8 +360,6 @@ main(int argc, char *argv[]) {
|
||||
|
||||
isc_mem_create(&mctx);
|
||||
|
||||
dns_result_register();
|
||||
|
||||
CHECKM(dns_dt_open(argv[0], dns_dtmode_file, mctx, &handle),
|
||||
"dns_dt_openfile");
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
@ -46,12 +47,9 @@
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/request.h>
|
||||
#include <dns/resolver.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/types.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
#include <bind9/getaddresses.h>
|
||||
|
||||
#define CHECK(str, x) \
|
||||
@ -2075,8 +2073,6 @@ main(int argc, char *argv[]) {
|
||||
|
||||
RUNCHECK(isc_app_start());
|
||||
|
||||
dns_result_register();
|
||||
|
||||
if (isc_net_probeipv4() == ISC_R_SUCCESS) {
|
||||
have_ipv4 = true;
|
||||
}
|
||||
|
@ -17,11 +17,11 @@
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/journal.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
const char *progname = NULL;
|
||||
@ -123,7 +123,7 @@ main(int argc, char **argv) {
|
||||
} else {
|
||||
result = dns_journal_print(mctx, flags, file, stdout);
|
||||
if (result == DNS_R_NOJOURNAL) {
|
||||
fprintf(stderr, "%s\n", dns_result_totext(result));
|
||||
fprintf(stderr, "%s\n", isc_result_totext(result));
|
||||
}
|
||||
}
|
||||
isc_log_destroy(&lctx);
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <isc/lex.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@ -26,7 +27,6 @@
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
static isc_mem_t *mctx;
|
||||
static isc_lex_t *lex;
|
||||
@ -175,7 +175,7 @@ main(int argc, char *argv[]) {
|
||||
result = dns_name_fromstring(name, origin, 0, NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("dns_name_fromstring: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
}
|
||||
|
||||
@ -209,7 +209,7 @@ main(int argc, char *argv[]) {
|
||||
&rdclass, &token.value.as_textregion);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("dns_rdataclass_fromtext: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
if (dns_rdataclass_ismeta(rdclass)) {
|
||||
fatal("class %.*s(%d) is a meta value",
|
||||
@ -250,7 +250,7 @@ main(int argc, char *argv[]) {
|
||||
&rdtype, &token.value.as_textregion);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("dns_rdatatype_fromtext: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
if (dns_rdatatype_ismeta(rdtype)) {
|
||||
fatal("type %.*s(%d) is a meta value",
|
||||
@ -266,7 +266,7 @@ main(int argc, char *argv[]) {
|
||||
0, mctx, &dbuf, NULL);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("dns_rdata_fromtext: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
once = true;
|
||||
}
|
||||
@ -282,19 +282,19 @@ main(int argc, char *argv[]) {
|
||||
result = dns_rdataclass_totext(rdclass, &tbuf);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("dns_rdataclass_totext: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
isc_buffer_putstr(&tbuf, "\t");
|
||||
result = dns_rdatatype_totext(rdtype, &tbuf);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("dns_rdatatype_totext: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
isc_buffer_putstr(&tbuf, "\t");
|
||||
result = dns_rdata_totext(&rdata, NULL, &tbuf);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("dns_rdata_totext: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
|
||||
printf("%.*s\n", (int)tbuf.used, (char *)tbuf.base);
|
||||
@ -306,13 +306,13 @@ main(int argc, char *argv[]) {
|
||||
result = dns_rdataclass_tounknowntext(rdclass, &tbuf);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("dns_rdataclass_tounknowntext: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
isc_buffer_putstr(&tbuf, "\t");
|
||||
result = dns_rdatatype_tounknowntext(rdtype, &tbuf);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("dns_rdatatype_tounknowntext: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
isc_buffer_putstr(&tbuf, "\t");
|
||||
result = dns_rdata_tofmttext(&rdata, NULL,
|
||||
@ -320,7 +320,7 @@ main(int argc, char *argv[]) {
|
||||
"", &tbuf);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
fatal("dns_rdata_tofmttext: %sn",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
|
||||
printf("%.*s\n", (int)tbuf.used, (char *)tbuf.base);
|
||||
|
@ -1549,7 +1549,6 @@ AC_CONFIG_FILES([lib/isc/tests/Makefile
|
||||
lib/dns/tests/Makefile
|
||||
lib/ns/tests/Makefile
|
||||
lib/irs/tests/Makefile
|
||||
lib/isccc/tests/Makefile
|
||||
lib/isccfg/tests/Makefile])
|
||||
|
||||
AC_CONFIG_FILES([lib/unit-test-driver.sh],
|
||||
|
@ -479,7 +479,7 @@ differentiate very similar messages in the same module.
|
||||
|
||||
When available, include standard library return codes via %s in the
|
||||
format string, with strerrr(errno) from the system library or functions
|
||||
like isc_result_totext(result) and dns_result_totext(result).
|
||||
like isc_result_totext(result) and isc_result_totext(result).
|
||||
|
||||
THINGS I AM NOT KEEN ABOUT
|
||||
|
||||
|
@ -18,11 +18,11 @@
|
||||
#include <isc/file.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/message.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include "fuzz.h"
|
||||
|
||||
|
@ -50,13 +50,11 @@
|
||||
#include <dns/rbt.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/rrl.h>
|
||||
#include <dns/secalg.h>
|
||||
#include <dns/ssu.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
#include <dst/result.h>
|
||||
|
||||
#include <isccfg/aclconf.h>
|
||||
#include <isccfg/cfg.h>
|
||||
|
@ -145,8 +145,7 @@ libdns_la_HEADERS = \
|
||||
dstdir = $(includedir)/dst
|
||||
dst_HEADERS = \
|
||||
include/dst/dst.h \
|
||||
include/dst/gssapi.h \
|
||||
include/dst/result.h
|
||||
include/dst/gssapi.h
|
||||
|
||||
libdns_la_SOURCES = \
|
||||
$(libdns_la_HEADERS) \
|
||||
@ -174,7 +173,6 @@ libdns_la_SOURCES = \
|
||||
dst_openssl.h \
|
||||
dst_parse.c \
|
||||
dst_parse.h \
|
||||
dst_result.c \
|
||||
dyndb.c \
|
||||
ecs.c \
|
||||
fixedname.c \
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/stats.h>
|
||||
#include <isc/string.h> /* Required for HP/UX (and others?) */
|
||||
#include <isc/task.h>
|
||||
@ -40,7 +41,6 @@
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/resolver.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/stats.h>
|
||||
|
||||
#define DNS_ADB_MAGIC ISC_MAGIC('D', 'a', 'd', 'b')
|
||||
@ -3825,6 +3825,8 @@ dbfind_name(dns_adbname_t *adbname, isc_stdtime_t now, dns_rdatatype_t rdtype) {
|
||||
adbname->fetch6_err = FIND_ERR_SUCCESS;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (dns_rdataset_isassociated(&rdataset)) {
|
||||
@ -3976,7 +3978,7 @@ fetch_callback(isc_task_t *task, isc_event_t *ev) {
|
||||
dns_name_format(&name->name, buf, sizeof(buf));
|
||||
DP(DEF_LEVEL, "adb: fetch of '%s' %s failed: %s", buf,
|
||||
address_type == DNS_ADBFIND_INET ? "A" : "AAAA",
|
||||
dns_result_totext(dev->result));
|
||||
isc_result_totext(dev->result));
|
||||
/*
|
||||
* Don't record a failure unless this is the initial
|
||||
* fetch of a chain.
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h> /* Required for HP/UX (and others?) */
|
||||
#include <isc/task.h>
|
||||
#include <isc/util.h>
|
||||
@ -28,7 +29,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/resolver.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
/*
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/stats.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
@ -33,7 +34,6 @@
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/stats.h>
|
||||
|
||||
#ifdef HAVE_JSON_C
|
||||
@ -467,7 +467,7 @@ cache_cleaner_init(dns_cache_t *cache, isc_taskmgr_t *taskmgr,
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_task_create() failed: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto cleanup;
|
||||
}
|
||||
@ -481,7 +481,7 @@ cache_cleaner_init(dns_cache_t *cache, isc_taskmgr_t *taskmgr,
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"cache cleaner: "
|
||||
"isc_task_onshutdown() failed: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -548,7 +548,7 @@ begin_cleaning(cache_cleaner_t *cleaner) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"cache cleaner: "
|
||||
"dns_dbiterator_first() failed: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
dns_dbiterator_destroy(&cleaner->iterator);
|
||||
} else if (cleaner->iterator != NULL) {
|
||||
result = dns_dbiterator_pause(cleaner->iterator);
|
||||
@ -689,7 +689,7 @@ incremental_cleaning_action(isc_task_t *task, isc_event_t *event) {
|
||||
"cache cleaner: "
|
||||
"dns_dbiterator_current() "
|
||||
"failed: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
|
||||
end_cleaning(cleaner, event);
|
||||
return;
|
||||
@ -718,7 +718,7 @@ incremental_cleaning_action(isc_task_t *task, isc_event_t *event) {
|
||||
"cache cleaner: "
|
||||
"dns_dbiterator_next() "
|
||||
"failed: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
} else if (cleaner->overmem) {
|
||||
result =
|
||||
dns_dbiterator_first(cleaner->iterator);
|
||||
@ -793,7 +793,7 @@ dns_cache_clean(dns_cache_t *cache, isc_stdtime_t now) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"cache cleaner: dns_db_expirenode() "
|
||||
"failed: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
/*
|
||||
* Continue anyway.
|
||||
*/
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/portset.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/safe.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/socket.h>
|
||||
@ -43,7 +44,6 @@
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/request.h>
|
||||
#include <dns/resolver.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/tsec.h>
|
||||
#include <dns/tsig.h>
|
||||
#include <dns/view.h>
|
||||
|
@ -17,13 +17,13 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/compress.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/rbt.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#define CCTX_MAGIC ISC_MAGIC('C', 'C', 'T', 'X')
|
||||
#define VALID_CCTX(x) ISC_MAGIC_VALID(x, CCTX_MAGIC)
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/once.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/rwlock.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
@ -34,7 +35,6 @@
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
/***
|
||||
*** Private Types
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <isc/file.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@ -30,7 +31,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/time.h>
|
||||
|
||||
#define CHECK(op) \
|
||||
@ -616,7 +616,7 @@ dns_diff_print(dns_diff_t *diff, FILE *file) {
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"diff_tuple_tordataset failed: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
result = ISC_R_UNEXPECTED;
|
||||
goto cleanup;
|
||||
}
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <isc/list.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@ -22,7 +23,6 @@
|
||||
#include <dns/dns64.h>
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
struct dns_dns64 {
|
||||
unsigned char bits[16]; /*
|
||||
|
@ -24,10 +24,11 @@
|
||||
|
||||
#include <dns/db.h>
|
||||
#define LIBRPZ_LIB_OPEN DNSRPS_LIB_OPEN
|
||||
#include <isc/result.h>
|
||||
|
||||
#include <dns/dnsrps.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/rpz.h>
|
||||
|
||||
librpz_t *librpz;
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <isc/dir.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/serial.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
@ -36,12 +37,9 @@
|
||||
#include <dns/rdatalist.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/stats.h>
|
||||
#include <dns/tsig.h> /* for DNS_TSIG_FUDGE */
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
isc_stats_t *dns_dnssec_stats;
|
||||
|
||||
#define is_response(msg) ((msg->flags & DNS_MESSAGEFLAG_QR) != 0)
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/once.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/sockaddr.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/thread.h>
|
||||
@ -72,7 +73,6 @@
|
||||
#include <dns/message.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/stats.h>
|
||||
#include <dns/types.h>
|
||||
#include <dns/view.h>
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/md.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/ds.h>
|
||||
@ -23,7 +24,6 @@
|
||||
#include <dns/name.h>
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
|
@ -47,6 +47,8 @@
|
||||
|
||||
#define DST_KEY_INTERNAL
|
||||
|
||||
#include <isc/result.h>
|
||||
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/keyvalues.h>
|
||||
#include <dns/name.h>
|
||||
@ -55,8 +57,6 @@
|
||||
#include <dns/ttl.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
#include "dst_internal.h"
|
||||
|
||||
#define DST_AS_STR(t) ((t).value.as_textregion.base)
|
||||
@ -190,8 +190,6 @@ dst_lib_init(isc_mem_t *mctx, const char *engine) {
|
||||
|
||||
UNUSED(engine);
|
||||
|
||||
dst_result_register();
|
||||
|
||||
memset(dst_t_func, 0, sizeof(dst_t_func));
|
||||
RETERR(dst__hmacmd5_init(&dst_t_func[DST_ALG_HMACMD5]));
|
||||
RETERR(dst__hmacsha1_init(&dst_t_func[DST_ALG_HMACSHA1]));
|
||||
|
@ -41,8 +41,8 @@
|
||||
#include <dns/log.h>
|
||||
#include <dns/time.h>
|
||||
|
||||
#include "dst/result.h"
|
||||
#include "dst_internal.h"
|
||||
#include "isc/result.h"
|
||||
|
||||
#define DST_AS_STR(t) ((t).value.as_textregion.base)
|
||||
|
||||
|
@ -1,108 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#include <isc/once.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
static const char *text[DST_R_NRESULTS] = {
|
||||
"algorithm is unsupported", /*%< 0 */
|
||||
"crypto failure", /*%< 1 */
|
||||
"built with no crypto support", /*%< 2 */
|
||||
"illegal operation for a null key", /*%< 3 */
|
||||
"public key is invalid", /*%< 4 */
|
||||
"private key is invalid", /*%< 5 */
|
||||
"external key", /*%< 6 */
|
||||
"error occurred writing key to disk", /*%< 7 */
|
||||
"invalid algorithm specific parameter", /*%< 8 */
|
||||
"UNUSED9", /*%< 9 */
|
||||
"UNUSED10", /*%< 10 */
|
||||
"sign failure", /*%< 11 */
|
||||
"UNUSED12", /*%< 12 */
|
||||
"UNUSED13", /*%< 13 */
|
||||
"verify failure", /*%< 14 */
|
||||
"not a public key", /*%< 15 */
|
||||
"not a private key", /*%< 16 */
|
||||
"not a key that can compute a secret", /*%< 17 */
|
||||
"failure computing a shared secret", /*%< 18 */
|
||||
"no randomness available", /*%< 19 */
|
||||
"bad key type", /*%< 20 */
|
||||
"no engine", /*%< 21 */
|
||||
"illegal operation for an external key", /*%< 22 */
|
||||
};
|
||||
|
||||
static const char *ids[DST_R_NRESULTS] = {
|
||||
"DST_R_UNSUPPORTEDALG",
|
||||
"DST_R_CRYPTOFAILURE",
|
||||
"DST_R_NOCRYPTO",
|
||||
"DST_R_NULLKEY",
|
||||
"DST_R_INVALIDPUBLICKEY",
|
||||
"DST_R_INVALIDPRIVATEKEY",
|
||||
"UNUSED",
|
||||
"DST_R_WRITEERROR",
|
||||
"DST_R_INVALIDPARAM",
|
||||
"UNUSED",
|
||||
"UNUSED",
|
||||
"DST_R_SIGNFAILURE",
|
||||
"UNUSED",
|
||||
"UNUSED",
|
||||
"DST_R_VERIFYFAILURE",
|
||||
"DST_R_NOTPUBLICKEY",
|
||||
"DST_R_NOTPRIVATEKEY",
|
||||
"DST_R_KEYCANNOTCOMPUTESECRET",
|
||||
"DST_R_COMPUTESECRETFAILURE",
|
||||
"DST_R_NORANDOMNESS",
|
||||
"DST_R_BADKEYTYPE",
|
||||
"DST_R_NOENGINE",
|
||||
"DST_R_EXTERNALKEY",
|
||||
};
|
||||
|
||||
#define DST_RESULT_RESULTSET 2
|
||||
|
||||
static isc_once_t once = ISC_ONCE_INIT;
|
||||
|
||||
static void
|
||||
initialize_action(void) {
|
||||
isc_result_t result;
|
||||
|
||||
result = isc_result_register(ISC_RESULTCLASS_DST, DST_R_NRESULTS, text,
|
||||
DST_RESULT_RESULTSET);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_result_register() failed: %u", result);
|
||||
}
|
||||
result = isc_result_registerids(ISC_RESULTCLASS_DST, DST_R_NRESULTS,
|
||||
ids, DST_RESULT_RESULTSET);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_result_registerids() failed: %u", result);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
initialize(void) {
|
||||
RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
const char *
|
||||
dst_result_totext(isc_result_t result) {
|
||||
initialize();
|
||||
|
||||
return (isc_result_totext(result));
|
||||
}
|
||||
|
||||
void
|
||||
dst_result_register(void) {
|
||||
initialize();
|
||||
}
|
||||
|
||||
/*! \file */
|
@ -13,12 +13,12 @@
|
||||
|
||||
#include <isc/magic.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/rwlock.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/forward.h>
|
||||
#include <dns/rbt.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
struct dns_fwdtable {
|
||||
|
@ -29,11 +29,11 @@
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dst/gssapi.h>
|
||||
#include <dst/result.h>
|
||||
|
||||
#include "dst_internal.h"
|
||||
#include "dst_parse.h"
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include <isc/once.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/time.h>
|
||||
#include <isc/util.h>
|
||||
@ -52,11 +53,9 @@
|
||||
#include <dns/name.h>
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
#include <dst/gssapi.h>
|
||||
#include <dst/result.h>
|
||||
|
||||
#include "dst_internal.h"
|
||||
|
||||
|
@ -32,12 +32,11 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/nonce.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/safe.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
#include "dst_internal.h"
|
||||
#ifdef HAVE_FIPS_MODE
|
||||
#include "dst_openssl.h" /* FIPS_mode() prototype */
|
||||
|
@ -15,196 +15,18 @@
|
||||
/*! \file dns/result.h */
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/resultclass.h>
|
||||
#include <isc/result.h>
|
||||
|
||||
#include <dns/types.h>
|
||||
|
||||
/*
|
||||
* Nothing in this file truly depends on <isc/result.h>, but the
|
||||
* DNS result codes are considered to be publicly derived from
|
||||
* the ISC result codes, so including this file buys you the ISC_R_
|
||||
* namespace too.
|
||||
*/
|
||||
#include <isc/result.h> /* Contractual promise. */
|
||||
|
||||
/*
|
||||
* DNS library result codes
|
||||
*/
|
||||
#define DNS_R_LABELTOOLONG (ISC_RESULTCLASS_DNS + 0)
|
||||
#define DNS_R_BADESCAPE (ISC_RESULTCLASS_DNS + 1)
|
||||
/*
|
||||
* Since we dropped the support of bitstring labels, deprecate the related
|
||||
* result codes too.
|
||||
*
|
||||
#define DNS_R_BADBITSTRING (ISC_RESULTCLASS_DNS + 2)
|
||||
#define DNS_R_BITSTRINGTOOLONG (ISC_RESULTCLASS_DNS + 3)
|
||||
*/
|
||||
#define DNS_R_EMPTYLABEL (ISC_RESULTCLASS_DNS + 4)
|
||||
#define DNS_R_BADDOTTEDQUAD (ISC_RESULTCLASS_DNS + 5)
|
||||
#define DNS_R_INVALIDNS (ISC_RESULTCLASS_DNS + 6)
|
||||
#define DNS_R_UNKNOWN (ISC_RESULTCLASS_DNS + 7)
|
||||
#define DNS_R_BADLABELTYPE (ISC_RESULTCLASS_DNS + 8)
|
||||
#define DNS_R_BADPOINTER (ISC_RESULTCLASS_DNS + 9)
|
||||
#define DNS_R_TOOMANYHOPS (ISC_RESULTCLASS_DNS + 10)
|
||||
#define DNS_R_DISALLOWED (ISC_RESULTCLASS_DNS + 11)
|
||||
#define DNS_R_EXTRATOKEN (ISC_RESULTCLASS_DNS + 12)
|
||||
#define DNS_R_EXTRADATA (ISC_RESULTCLASS_DNS + 13)
|
||||
#define DNS_R_TEXTTOOLONG (ISC_RESULTCLASS_DNS + 14)
|
||||
#define DNS_R_NOTZONETOP (ISC_RESULTCLASS_DNS + 15)
|
||||
#define DNS_R_SYNTAX (ISC_RESULTCLASS_DNS + 16)
|
||||
#define DNS_R_BADCKSUM (ISC_RESULTCLASS_DNS + 17)
|
||||
#define DNS_R_BADAAAA (ISC_RESULTCLASS_DNS + 18)
|
||||
#define DNS_R_NOOWNER (ISC_RESULTCLASS_DNS + 19)
|
||||
#define DNS_R_NOTTL (ISC_RESULTCLASS_DNS + 20)
|
||||
#define DNS_R_BADCLASS (ISC_RESULTCLASS_DNS + 21)
|
||||
#define DNS_R_NAMETOOLONG (ISC_RESULTCLASS_DNS + 22)
|
||||
#define DNS_R_PARTIALMATCH (ISC_RESULTCLASS_DNS + 23)
|
||||
#define DNS_R_NEWORIGIN (ISC_RESULTCLASS_DNS + 24)
|
||||
#define DNS_R_UNCHANGED (ISC_RESULTCLASS_DNS + 25)
|
||||
#define DNS_R_BADTTL (ISC_RESULTCLASS_DNS + 26)
|
||||
#define DNS_R_NOREDATA (ISC_RESULTCLASS_DNS + 27)
|
||||
#define DNS_R_CONTINUE (ISC_RESULTCLASS_DNS + 28)
|
||||
#define DNS_R_DELEGATION (ISC_RESULTCLASS_DNS + 29)
|
||||
#define DNS_R_GLUE (ISC_RESULTCLASS_DNS + 30)
|
||||
#define DNS_R_DNAME (ISC_RESULTCLASS_DNS + 31)
|
||||
#define DNS_R_CNAME (ISC_RESULTCLASS_DNS + 32)
|
||||
#define DNS_R_BADDB (ISC_RESULTCLASS_DNS + 33)
|
||||
#define DNS_R_ZONECUT (ISC_RESULTCLASS_DNS + 34)
|
||||
#define DNS_R_BADZONE (ISC_RESULTCLASS_DNS + 35)
|
||||
#define DNS_R_MOREDATA (ISC_RESULTCLASS_DNS + 36)
|
||||
#define DNS_R_UPTODATE (ISC_RESULTCLASS_DNS + 37)
|
||||
#define DNS_R_TSIGVERIFYFAILURE (ISC_RESULTCLASS_DNS + 38)
|
||||
#define DNS_R_TSIGERRORSET (ISC_RESULTCLASS_DNS + 39)
|
||||
#define DNS_R_SIGINVALID (ISC_RESULTCLASS_DNS + 40)
|
||||
#define DNS_R_SIGEXPIRED (ISC_RESULTCLASS_DNS + 41)
|
||||
#define DNS_R_SIGFUTURE (ISC_RESULTCLASS_DNS + 42)
|
||||
#define DNS_R_KEYUNAUTHORIZED (ISC_RESULTCLASS_DNS + 43)
|
||||
#define DNS_R_INVALIDTIME (ISC_RESULTCLASS_DNS + 44)
|
||||
#define DNS_R_EXPECTEDTSIG (ISC_RESULTCLASS_DNS + 45)
|
||||
#define DNS_R_UNEXPECTEDTSIG (ISC_RESULTCLASS_DNS + 46)
|
||||
#define DNS_R_INVALIDTKEY (ISC_RESULTCLASS_DNS + 47)
|
||||
#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_WAIT (ISC_RESULTCLASS_DNS + 53)
|
||||
#define DNS_R_NOTVERIFIEDYET (ISC_RESULTCLASS_DNS + 54)
|
||||
#define DNS_R_NOIDENTITY (ISC_RESULTCLASS_DNS + 55)
|
||||
#define DNS_R_NOJOURNAL (ISC_RESULTCLASS_DNS + 56)
|
||||
#define DNS_R_ALIAS (ISC_RESULTCLASS_DNS + 57)
|
||||
#define DNS_R_USETCP (ISC_RESULTCLASS_DNS + 58)
|
||||
#define DNS_R_NOVALIDSIG (ISC_RESULTCLASS_DNS + 59)
|
||||
#define DNS_R_NOVALIDNSEC (ISC_RESULTCLASS_DNS + 60)
|
||||
#define DNS_R_NOTINSECURE (ISC_RESULTCLASS_DNS + 61)
|
||||
#define DNS_R_UNKNOWNSERVICE (ISC_RESULTCLASS_DNS + 62)
|
||||
#define DNS_R_RECOVERABLE (ISC_RESULTCLASS_DNS + 63)
|
||||
#define DNS_R_UNKNOWNOPT (ISC_RESULTCLASS_DNS + 64)
|
||||
#define DNS_R_UNEXPECTEDID (ISC_RESULTCLASS_DNS + 65)
|
||||
#define DNS_R_SEENINCLUDE (ISC_RESULTCLASS_DNS + 66)
|
||||
#define DNS_R_NOTEXACT (ISC_RESULTCLASS_DNS + 67)
|
||||
#define DNS_R_BLACKHOLED (ISC_RESULTCLASS_DNS + 68)
|
||||
#define DNS_R_BADALG (ISC_RESULTCLASS_DNS + 69)
|
||||
#define DNS_R_METATYPE (ISC_RESULTCLASS_DNS + 70)
|
||||
#define DNS_R_CNAMEANDOTHER (ISC_RESULTCLASS_DNS + 71)
|
||||
#define DNS_R_SINGLETON (ISC_RESULTCLASS_DNS + 72)
|
||||
#define DNS_R_HINTNXRRSET (ISC_RESULTCLASS_DNS + 73)
|
||||
#define DNS_R_NOMASTERFILE (ISC_RESULTCLASS_DNS + 74)
|
||||
#define DNS_R_UNKNOWNPROTO (ISC_RESULTCLASS_DNS + 75)
|
||||
#define DNS_R_CLOCKSKEW (ISC_RESULTCLASS_DNS + 76)
|
||||
#define DNS_R_BADIXFR (ISC_RESULTCLASS_DNS + 77)
|
||||
#define DNS_R_NOTAUTHORITATIVE (ISC_RESULTCLASS_DNS + 78)
|
||||
#define DNS_R_NOVALIDKEY (ISC_RESULTCLASS_DNS + 79)
|
||||
#define DNS_R_OBSOLETE (ISC_RESULTCLASS_DNS + 80)
|
||||
#define DNS_R_FROZEN (ISC_RESULTCLASS_DNS + 81)
|
||||
#define DNS_R_UNKNOWNFLAG (ISC_RESULTCLASS_DNS + 82)
|
||||
#define DNS_R_EXPECTEDRESPONSE (ISC_RESULTCLASS_DNS + 83)
|
||||
#define DNS_R_NOVALIDDS (ISC_RESULTCLASS_DNS + 84)
|
||||
#define DNS_R_NSISADDRESS (ISC_RESULTCLASS_DNS + 85)
|
||||
#define DNS_R_REMOTEFORMERR (ISC_RESULTCLASS_DNS + 86)
|
||||
#define DNS_R_TRUNCATEDTCP (ISC_RESULTCLASS_DNS + 87)
|
||||
#define DNS_R_LAME (ISC_RESULTCLASS_DNS + 88)
|
||||
#define DNS_R_UNEXPECTEDRCODE (ISC_RESULTCLASS_DNS + 89)
|
||||
#define DNS_R_UNEXPECTEDOPCODE (ISC_RESULTCLASS_DNS + 90)
|
||||
#define DNS_R_CHASEDSSERVERS (ISC_RESULTCLASS_DNS + 91)
|
||||
#define DNS_R_EMPTYNAME (ISC_RESULTCLASS_DNS + 92)
|
||||
#define DNS_R_EMPTYWILD (ISC_RESULTCLASS_DNS + 93)
|
||||
#define DNS_R_BADBITMAP (ISC_RESULTCLASS_DNS + 94)
|
||||
#define DNS_R_FROMWILDCARD (ISC_RESULTCLASS_DNS + 95)
|
||||
#define DNS_R_BADOWNERNAME (ISC_RESULTCLASS_DNS + 96)
|
||||
#define DNS_R_BADNAME (ISC_RESULTCLASS_DNS + 97)
|
||||
#define DNS_R_DYNAMIC (ISC_RESULTCLASS_DNS + 98)
|
||||
#define DNS_R_UNKNOWNCOMMAND (ISC_RESULTCLASS_DNS + 99)
|
||||
#define DNS_R_MUSTBESECURE (ISC_RESULTCLASS_DNS + 100)
|
||||
#define DNS_R_COVERINGNSEC (ISC_RESULTCLASS_DNS + 101)
|
||||
#define DNS_R_MXISADDRESS (ISC_RESULTCLASS_DNS + 102)
|
||||
#define DNS_R_DUPLICATE (ISC_RESULTCLASS_DNS + 103)
|
||||
#define DNS_R_INVALIDNSEC3 (ISC_RESULTCLASS_DNS + 104)
|
||||
#define DNS_R_NOTMASTER (ISC_RESULTCLASS_DNS + 105)
|
||||
#define DNS_R_BROKENCHAIN (ISC_RESULTCLASS_DNS + 106)
|
||||
#define DNS_R_EXPIRED (ISC_RESULTCLASS_DNS + 107)
|
||||
#define DNS_R_NOTDYNAMIC (ISC_RESULTCLASS_DNS + 108)
|
||||
#define DNS_R_BADEUI (ISC_RESULTCLASS_DNS + 109)
|
||||
#define DNS_R_NTACOVERED (ISC_RESULTCLASS_DNS + 110)
|
||||
#define DNS_R_BADCDS (ISC_RESULTCLASS_DNS + 111)
|
||||
#define DNS_R_BADCDNSKEY (ISC_RESULTCLASS_DNS + 112)
|
||||
#define DNS_R_OPTERR (ISC_RESULTCLASS_DNS + 113)
|
||||
#define DNS_R_BADDNSTAP (ISC_RESULTCLASS_DNS + 114)
|
||||
#define DNS_R_BADTSIG (ISC_RESULTCLASS_DNS + 115)
|
||||
#define DNS_R_BADSIG0 (ISC_RESULTCLASS_DNS + 116)
|
||||
#define DNS_R_TOOMANYRECORDS (ISC_RESULTCLASS_DNS + 117)
|
||||
#define DNS_R_VERIFYFAILURE (ISC_RESULTCLASS_DNS + 118)
|
||||
#define DNS_R_ATZONETOP (ISC_RESULTCLASS_DNS + 119)
|
||||
#define DNS_R_NOKEYMATCH (ISC_RESULTCLASS_DNS + 120)
|
||||
#define DNS_R_TOOMANYKEYS (ISC_RESULTCLASS_DNS + 121)
|
||||
#define DNS_R_KEYNOTACTIVE (ISC_RESULTCLASS_DNS + 122)
|
||||
#define DNS_R_NSEC3ITERRANGE (ISC_RESULTCLASS_DNS + 123)
|
||||
#define DNS_R_NSEC3SALTRANGE (ISC_RESULTCLASS_DNS + 124)
|
||||
#define DNS_R_NSEC3BADALG (ISC_RESULTCLASS_DNS + 125)
|
||||
#define DNS_R_NSEC3RESALT (ISC_RESULTCLASS_DNS + 126)
|
||||
#define DNS_R_INCONSISTENTRR (ISC_RESULTCLASS_DNS + 127)
|
||||
|
||||
#define DNS_R_NRESULTS 128 /*%< Number of results */
|
||||
|
||||
/*
|
||||
* DNS wire format rcodes.
|
||||
*
|
||||
* By making these their own class we can easily convert them into the
|
||||
* wire-format rcode value simply by masking off the resultclass.
|
||||
*/
|
||||
#define DNS_R_NOERROR (ISC_RESULTCLASS_DNSRCODE + 0)
|
||||
#define DNS_R_FORMERR (ISC_RESULTCLASS_DNSRCODE + 1)
|
||||
#define DNS_R_SERVFAIL (ISC_RESULTCLASS_DNSRCODE + 2)
|
||||
#define DNS_R_NXDOMAIN (ISC_RESULTCLASS_DNSRCODE + 3)
|
||||
#define DNS_R_NOTIMP (ISC_RESULTCLASS_DNSRCODE + 4)
|
||||
#define DNS_R_REFUSED (ISC_RESULTCLASS_DNSRCODE + 5)
|
||||
#define DNS_R_YXDOMAIN (ISC_RESULTCLASS_DNSRCODE + 6)
|
||||
#define DNS_R_YXRRSET (ISC_RESULTCLASS_DNSRCODE + 7)
|
||||
#define DNS_R_NXRRSET (ISC_RESULTCLASS_DNSRCODE + 8)
|
||||
#define DNS_R_NOTAUTH (ISC_RESULTCLASS_DNSRCODE + 9)
|
||||
#define DNS_R_NOTZONE (ISC_RESULTCLASS_DNSRCODE + 10)
|
||||
#define DNS_R_RCODE11 (ISC_RESULTCLASS_DNSRCODE + 11)
|
||||
#define DNS_R_RCODE12 (ISC_RESULTCLASS_DNSRCODE + 12)
|
||||
#define DNS_R_RCODE13 (ISC_RESULTCLASS_DNSRCODE + 13)
|
||||
#define DNS_R_RCODE14 (ISC_RESULTCLASS_DNSRCODE + 14)
|
||||
#define DNS_R_RCODE15 (ISC_RESULTCLASS_DNSRCODE + 15)
|
||||
#define DNS_R_BADVERS (ISC_RESULTCLASS_DNSRCODE + 16)
|
||||
|
||||
#define DNS_R_NRCODERESULTS 17 /*%< Number of rcode results */
|
||||
|
||||
#define DNS_RESULT_ISRCODE(result) \
|
||||
(ISC_RESULTCLASS_INCLASS(ISC_RESULTCLASS_DNSRCODE, (result)))
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
const char *dns_result_totext(isc_result_t);
|
||||
|
||||
void
|
||||
dns_result_register(void);
|
||||
|
||||
dns_rcode_t
|
||||
dns_result_torcode(isc_result_t result);
|
||||
|
||||
isc_result_t
|
||||
dns_result_fromrcode(dns_rcode_t rcode);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DNS_RESULT_H */
|
||||
|
@ -1,65 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*
|
||||
* See the COPYRIGHT file distributed with this work for additional
|
||||
* information regarding copyright ownership.
|
||||
*/
|
||||
|
||||
#ifndef DST_RESULT_H
|
||||
#define DST_RESULT_H 1
|
||||
|
||||
/*! \file dst/result.h */
|
||||
|
||||
#include <isc/lang.h>
|
||||
#include <isc/resultclass.h>
|
||||
|
||||
/*
|
||||
* Nothing in this file truly depends on <isc/result.h>, but the
|
||||
* DST result codes are considered to be publicly derived from
|
||||
* the ISC result codes, so including this file buys you the ISC_R_
|
||||
* namespace too.
|
||||
*/
|
||||
#include <isc/result.h> /* Contractual promise. */
|
||||
|
||||
#define DST_R_UNSUPPORTEDALG (ISC_RESULTCLASS_DST + 0)
|
||||
#define DST_R_CRYPTOFAILURE (ISC_RESULTCLASS_DST + 1)
|
||||
/* compat */
|
||||
#define DST_R_OPENSSLFAILURE DST_R_CRYPTOFAILURE
|
||||
#define DST_R_NOCRYPTO (ISC_RESULTCLASS_DST + 2)
|
||||
#define DST_R_NULLKEY (ISC_RESULTCLASS_DST + 3)
|
||||
#define DST_R_INVALIDPUBLICKEY (ISC_RESULTCLASS_DST + 4)
|
||||
#define DST_R_INVALIDPRIVATEKEY (ISC_RESULTCLASS_DST + 5)
|
||||
/* 6 is unused */
|
||||
#define DST_R_WRITEERROR (ISC_RESULTCLASS_DST + 7)
|
||||
#define DST_R_INVALIDPARAM (ISC_RESULTCLASS_DST + 8)
|
||||
/* 9 is unused */
|
||||
/* 10 is unused */
|
||||
#define DST_R_SIGNFAILURE (ISC_RESULTCLASS_DST + 11)
|
||||
/* 12 is unused */
|
||||
/* 13 is unused */
|
||||
#define DST_R_VERIFYFAILURE (ISC_RESULTCLASS_DST + 14)
|
||||
#define DST_R_NOTPUBLICKEY (ISC_RESULTCLASS_DST + 15)
|
||||
#define DST_R_NOTPRIVATEKEY (ISC_RESULTCLASS_DST + 16)
|
||||
#define DST_R_KEYCANNOTCOMPUTESECRET (ISC_RESULTCLASS_DST + 17)
|
||||
#define DST_R_COMPUTESECRETFAILURE (ISC_RESULTCLASS_DST + 18)
|
||||
#define DST_R_NORANDOMNESS (ISC_RESULTCLASS_DST + 19)
|
||||
#define DST_R_BADKEYTYPE (ISC_RESULTCLASS_DST + 20)
|
||||
#define DST_R_NOENGINE (ISC_RESULTCLASS_DST + 21)
|
||||
#define DST_R_EXTERNALKEY (ISC_RESULTCLASS_DST + 22)
|
||||
|
||||
#define DST_R_NRESULTS 23 /* Number of results */
|
||||
|
||||
ISC_LANG_BEGINDECLS
|
||||
|
||||
const char *dst_result_totext(isc_result_t);
|
||||
|
||||
void
|
||||
dst_result_register(void);
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
#endif /* DST_RESULT_H */
|
@ -19,6 +19,7 @@
|
||||
#include <isc/file.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/serial.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
@ -33,7 +34,6 @@
|
||||
#include <dns/log.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/soa.h>
|
||||
|
||||
/*! \file
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <isc/dir.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@ -28,10 +29,8 @@
|
||||
#include <dns/keymgr.h>
|
||||
#include <dns/keyvalues.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
#include <dst/result.h>
|
||||
|
||||
#define RETERR(x) \
|
||||
do { \
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/rwlock.h>
|
||||
#include <isc/string.h> /* Required for HP/UX (and others?) */
|
||||
#include <isc/util.h>
|
||||
@ -28,7 +29,6 @@
|
||||
#include <dns/rdatalist.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#define KEYTABLE_MAGIC ISC_MAGIC('K', 'T', 'b', 'l')
|
||||
#define VALID_KEYTABLE(kt) ISC_MAGIC_VALID(kt, KEYTABLE_MAGIC)
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h> /* Required for HP/UX (and others?) */
|
||||
#include <isc/task.h>
|
||||
#include <isc/util.h>
|
||||
@ -26,7 +27,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/resolver.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
struct dns_lookup {
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/serial.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/stdtime.h>
|
||||
@ -39,7 +40,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/soa.h>
|
||||
#include <dns/time.h>
|
||||
#include <dns/ttl.h>
|
||||
@ -305,18 +305,18 @@ loadctx_destroy(dns_loadctx_t *lctx);
|
||||
result == ISC_R_NOPERM) \
|
||||
(*callbacks->error)(callbacks, "%s: %s:%lu: %s: %s", \
|
||||
"dns_master_load", source, line, filename, \
|
||||
dns_result_totext(result)); \
|
||||
isc_result_totext(result)); \
|
||||
else \
|
||||
LOGIT(result)
|
||||
|
||||
#define LOGIT(result) \
|
||||
if (result == ISC_R_NOMEMORY) \
|
||||
(*callbacks->error)(callbacks, "dns_master_load: %s", \
|
||||
dns_result_totext(result)); \
|
||||
isc_result_totext(result)); \
|
||||
else \
|
||||
(*callbacks->error)(callbacks, "%s: %s:%lu: %s", \
|
||||
"dns_master_load", source, line, \
|
||||
dns_result_totext(result))
|
||||
isc_result_totext(result))
|
||||
|
||||
static unsigned char in_addr_arpa_data[] = "\007IN-ADDR\004ARPA";
|
||||
static unsigned char in_addr_arpa_offsets[] = { 0, 8, 13 };
|
||||
@ -914,10 +914,10 @@ generate(dns_loadctx_t *lctx, char *range, char *lhs, char *gtype, char *rhs,
|
||||
error_cleanup:
|
||||
if (result == ISC_R_NOMEMORY) {
|
||||
(*callbacks->error)(callbacks, "$GENERATE: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
} else {
|
||||
(*callbacks->error)(callbacks, "$GENERATE: %s:%lu: %s", source,
|
||||
line, dns_result_totext(result));
|
||||
line, isc_result_totext(result));
|
||||
}
|
||||
|
||||
insist_cleanup:
|
||||
@ -1738,7 +1738,7 @@ load_text(dns_loadctx_t *lctx) {
|
||||
dns_rdatatype_format(type, typebuf, sizeof(typebuf));
|
||||
(*callbacks->error)(callbacks, "%s:%lu: %s '%s': %s",
|
||||
source, line, "type", typebuf,
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
if (MANYERRS(lctx, result)) {
|
||||
SETRESULT(lctx, result);
|
||||
} else {
|
||||
@ -1758,7 +1758,7 @@ load_text(dns_loadctx_t *lctx) {
|
||||
dns_rdatatype_format(type, typebuf, sizeof(typebuf));
|
||||
(*callbacks->error)(callbacks, "%s:%lu: %s '%s': %s",
|
||||
source, line, "type", typebuf,
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
if (MANYERRS(lctx, result)) {
|
||||
SETRESULT(lctx, result);
|
||||
} else {
|
||||
@ -1817,7 +1817,7 @@ load_text(dns_loadctx_t *lctx) {
|
||||
const char *desc;
|
||||
dns_name_format(name, namebuf, sizeof(namebuf));
|
||||
result = DNS_R_BADOWNERNAME;
|
||||
desc = dns_result_totext(result);
|
||||
desc = isc_result_totext(result);
|
||||
if (CHECKNAMESFAIL(lctx->options) ||
|
||||
type == dns_rdatatype_nsec3) {
|
||||
(*callbacks->error)(
|
||||
@ -2614,7 +2614,7 @@ cleanup:
|
||||
}
|
||||
if (result != ISC_R_SUCCESS && result != DNS_R_CONTINUE) {
|
||||
(*callbacks->error)(callbacks, "dns_master_load: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
|
||||
return (result);
|
||||
@ -3064,17 +3064,17 @@ commit(dns_rdatacallbacks_t *callbacks, dns_loadctx_t *lctx,
|
||||
&dataset));
|
||||
if (result == ISC_R_NOMEMORY) {
|
||||
(*error)(callbacks, "dns_master_load: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
} else if (result != ISC_R_SUCCESS) {
|
||||
dns_name_format(owner, namebuf, sizeof(namebuf));
|
||||
if (source != NULL) {
|
||||
(*error)(callbacks, "%s: %s:%lu: %s: %s",
|
||||
"dns_master_load", source, line,
|
||||
namebuf, dns_result_totext(result));
|
||||
namebuf, isc_result_totext(result));
|
||||
} else {
|
||||
(*error)(callbacks, "%s: %s: %s",
|
||||
"dns_master_load", namebuf,
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
}
|
||||
if (MANYERRS(lctx, result)) {
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/stdio.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
@ -43,7 +44,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/time.h>
|
||||
#include <dns/ttl.h>
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h> /* Required for HP/UX (and others?) */
|
||||
#include <isc/utf8.h>
|
||||
#include <isc/util.h>
|
||||
@ -37,7 +38,6 @@
|
||||
#include <dns/rdatalist.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/tsig.h>
|
||||
#include <dns/ttl.h>
|
||||
#include <dns/view.h>
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <isc/once.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/thread.h>
|
||||
#include <isc/util.h>
|
||||
@ -29,7 +30,6 @@
|
||||
#include <dns/compress.h>
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/name.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#define VALID_NAME(n) ISC_MAGIC_VALID(n, DNS_NAME_MAGIC)
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <isc/log.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@ -24,7 +25,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <isc/iterated_hash.h>
|
||||
#include <isc/md.h>
|
||||
#include <isc/nonce.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/safe.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
@ -34,7 +35,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/zone.h>
|
||||
|
||||
#include <dst/dst.h>
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <isc/log.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/rwlock.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
@ -33,7 +34,6 @@
|
||||
#include <dns/rbt.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/resolver.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/time.h>
|
||||
|
||||
struct dns_nta {
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/mutex.h>
|
||||
#include <isc/mutexblock.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/thread.h>
|
||||
#include <isc/tls.h>
|
||||
@ -33,8 +34,6 @@
|
||||
|
||||
#include <dns/log.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
#include "dst_internal.h"
|
||||
#include "dst_openssl.h"
|
||||
|
||||
|
@ -32,12 +32,11 @@
|
||||
#include <openssl/opensslv.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/safe.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
#include "dst_internal.h"
|
||||
#include "dst_openssl.h"
|
||||
#include "dst_parse.h"
|
||||
|
@ -22,14 +22,13 @@
|
||||
#endif
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/safe.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/keyvalues.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
#include "dst_internal.h"
|
||||
#include "dst_openssl.h"
|
||||
#include "dst_parse.h"
|
||||
|
@ -31,8 +31,6 @@
|
||||
|
||||
#include <dns/keyvalues.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
#include "dst_internal.h"
|
||||
#include "dst_openssl.h"
|
||||
#include "dst_parse.h"
|
||||
|
@ -20,12 +20,11 @@
|
||||
#include <openssl/rsa.h>
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/safe.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dst/result.h>
|
||||
|
||||
#include "dst_internal.h"
|
||||
#include "dst_openssl.h"
|
||||
#include "dst_parse.h"
|
||||
|
@ -35,10 +35,11 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <isc/result.h>
|
||||
|
||||
#include <dns/fixedname.h>
|
||||
#include <dns/log.h>
|
||||
#include <dns/rbt.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
#define CHECK(x) \
|
||||
do { \
|
||||
@ -1545,7 +1546,7 @@ dns_rbt_formatnodename(dns_rbtnode_t *node, char *printname,
|
||||
dns_name_format(name, printname, size);
|
||||
} else {
|
||||
snprintf(printname, size, "<error building name: %s>",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
|
||||
return (printname);
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/rwlock.h>
|
||||
#include <isc/serial.h>
|
||||
#include <isc/socket.h>
|
||||
@ -55,7 +56,6 @@
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdataslab.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/stats.h>
|
||||
#include <dns/time.h>
|
||||
#include <dns/view.h>
|
||||
@ -2594,7 +2594,7 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, bool commit) {
|
||||
DNS_LOGMODULE_ZONE, ISC_LOG_ERROR,
|
||||
"Unable to reinsert header to "
|
||||
"re-signing heap: %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
}
|
||||
}
|
||||
decrement_reference(rbtdb, header->node, least_serial,
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include <dns/keyvalues.h>
|
||||
#include <dns/rcode.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/secalg.h>
|
||||
#include <dns/secproto.h>
|
||||
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <isc/mem.h>
|
||||
#include <isc/parseint.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@ -39,7 +40,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/secalg.h>
|
||||
#include <dns/secproto.h>
|
||||
#include <dns/time.h>
|
||||
@ -2100,7 +2100,7 @@ warn_badmx(isc_token_t *token, isc_lex_t *lexer,
|
||||
line = isc_lex_getsourceline(lexer);
|
||||
(*callbacks->warn)(callbacks, "%s:%u: warning: '%s': %s", file,
|
||||
line, DNS_AS_STR(*token),
|
||||
dns_result_totext(DNS_R_MXISADDRESS));
|
||||
isc_result_totext(DNS_R_MXISADDRESS));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2117,7 +2117,7 @@ warn_badname(const dns_name_t *name, isc_lex_t *lexer,
|
||||
dns_name_format(name, namebuf, sizeof(namebuf));
|
||||
(*callbacks->warn)(callbacks, "%s:%u: warning: %s: %s", file,
|
||||
line, namebuf,
|
||||
dns_result_totext(DNS_R_BADNAME));
|
||||
isc_result_totext(DNS_R_BADNAME));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2134,35 +2134,35 @@ fromtext_error(void (*callback)(dns_rdatacallbacks_t *, const char *, ...),
|
||||
case isc_tokentype_eol:
|
||||
(*callback)(callbacks, "%s: %s:%lu: near eol: %s",
|
||||
"dns_rdata_fromtext", name, line,
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
break;
|
||||
case isc_tokentype_eof:
|
||||
(*callback)(callbacks, "%s: %s:%lu: near eof: %s",
|
||||
"dns_rdata_fromtext", name, line,
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
break;
|
||||
case isc_tokentype_number:
|
||||
(*callback)(callbacks, "%s: %s:%lu: near %lu: %s",
|
||||
"dns_rdata_fromtext", name, line,
|
||||
token->value.as_ulong,
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
break;
|
||||
case isc_tokentype_string:
|
||||
case isc_tokentype_qstring:
|
||||
(*callback)(callbacks, "%s: %s:%lu: near '%s': %s",
|
||||
"dns_rdata_fromtext", name, line,
|
||||
DNS_AS_STR(*token),
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
break;
|
||||
default:
|
||||
(*callback)(callbacks, "%s: %s:%lu: %s",
|
||||
"dns_rdata_fromtext", name, line,
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
(*callback)(callbacks, "dns_rdata_fromtext: %s:%lu: %s", name,
|
||||
line, dns_result_totext(result));
|
||||
line, isc_result_totext(result));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,13 +16,13 @@
|
||||
|
||||
#include <isc/mem.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h> /* Required for HP/UX (and others?) */
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdataslab.h>
|
||||
#include <dns/result.h>
|
||||
|
||||
/*
|
||||
* The rdataslab structure allows iteration to occur in both load order
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include <isc/magic.h>
|
||||
#include <isc/mem.h>
|
||||
#include <isc/netmgr.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/task.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@ -29,7 +30,6 @@
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/request.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/tsig.h>
|
||||
|
||||
#define REQUESTMGR_MAGIC ISC_MAGIC('R', 'q', 'u', 'M')
|
||||
@ -619,7 +619,7 @@ cleanup:
|
||||
}
|
||||
req_detach(&request);
|
||||
req_log(ISC_LOG_DEBUG(3), "dns_request_createraw: failed %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
return (result);
|
||||
}
|
||||
|
||||
@ -792,7 +792,7 @@ cleanup:
|
||||
}
|
||||
req_detach(&request);
|
||||
req_log(ISC_LOG_DEBUG(3), "dns_request_createvia: failed %s",
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
return (result);
|
||||
}
|
||||
|
||||
@ -1055,7 +1055,7 @@ req_response(isc_result_t result, isc_region_t *region, void *arg) {
|
||||
dns_request_t *request = (dns_request_t *)arg;
|
||||
|
||||
req_log(ISC_LOG_DEBUG(3), "req_response: request %p: %s", request,
|
||||
dns_result_totext(result));
|
||||
isc_result_totext(result));
|
||||
|
||||
if (result == ISC_R_CANCELED || result == ISC_R_EOF) {
|
||||
return;
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <isc/print.h>
|
||||
#include <isc/random.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/siphash.h>
|
||||
#include <isc/stats.h>
|
||||
#include <isc/string.h>
|
||||
@ -56,7 +57,6 @@
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/resolver.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/rootns.h>
|
||||
#include <dns/stats.h>
|
||||
#include <dns/tsig.h>
|
||||
@ -3107,7 +3107,7 @@ add_bad(fetchctx_t *fctx, dns_message_t *rmessage, dns_adbaddrinfo_t *addrinfo,
|
||||
isc_log_write(
|
||||
dns_lctx, DNS_LOGCATEGORY_LAME_SERVERS, DNS_LOGMODULE_RESOLVER,
|
||||
ISC_LOG_INFO, "%s%s%s resolving '%s/%s/%s': %s", code, spc,
|
||||
dns_result_totext(reason), namebuf, typebuf, classbuf, addrbuf);
|
||||
isc_result_totext(reason), namebuf, typebuf, classbuf, addrbuf);
|
||||
}
|
||||
|
||||
/*
|
||||
|
389
lib/dns/result.c
389
lib/dns/result.c
@ -12,386 +12,12 @@
|
||||
/*! \file */
|
||||
|
||||
#include <isc/once.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/result.h>
|
||||
|
||||
static const char *text[DNS_R_NRESULTS] = {
|
||||
"label too long", /*%< 0 DNS_R_LABELTOOLONG */
|
||||
"bad escape", /*%< 1 DNS_R_BADESCAPE */
|
||||
/*!
|
||||
* Note that DNS_R_BADBITSTRING and DNS_R_BITSTRINGTOOLONG are
|
||||
* deprecated.
|
||||
*/
|
||||
"bad bitstring", /*%< 2 DNS_R_BADBITSTRING */
|
||||
"bitstring too long", /*%< 3 DNS_R_BITSTRINGTOOLONG */
|
||||
"empty label", /*%< 4 DNS_R_EMPTYLABEL */
|
||||
|
||||
"bad dotted quad", /*%< 5 DNS_R_BADDOTTEDQUAD */
|
||||
"invalid NS owner name (wildcard)", /*%< 6 DNS_R_INVALIDNS */
|
||||
"unknown class/type", /*%< 7 DNS_R_UNKNOWN */
|
||||
"bad label type", /*%< 8 DNS_R_BADLABELTYPE */
|
||||
"bad compression pointer", /*%< 9 DNS_R_BADPOINTER */
|
||||
|
||||
"too many hops", /*%< 10 DNS_R_TOOMANYHOPS */
|
||||
"disallowed (by application policy)", /*%< 11 DNS_R_DISALLOWED */
|
||||
"extra input text", /*%< 12 DNS_R_EXTRATOKEN */
|
||||
"extra input data", /*%< 13 DNS_R_EXTRADATA */
|
||||
"text too long", /*%< 14 DNS_R_TEXTTOOLONG */
|
||||
|
||||
"not at top of zone", /*%< 15 DNS_R_NOTZONETOP */
|
||||
"syntax error", /*%< 16 DNS_R_SYNTAX */
|
||||
"bad checksum", /*%< 17 DNS_R_BADCKSUM */
|
||||
"bad IPv6 address", /*%< 18 DNS_R_BADAAAA */
|
||||
"no owner", /*%< 19 DNS_R_NOOWNER */
|
||||
|
||||
"no ttl", /*%< 20 DNS_R_NOTTL */
|
||||
"bad class", /*%< 21 DNS_R_BADCLASS */
|
||||
"name too long", /*%< 22 DNS_R_NAMETOOLONG */
|
||||
"partial match", /*%< 23 DNS_R_PARTIALMATCH */
|
||||
"new origin", /*%< 24 DNS_R_NEWORIGIN */
|
||||
|
||||
"unchanged", /*%< 25 DNS_R_UNCHANGED */
|
||||
"bad ttl", /*%< 26 DNS_R_BADTTL */
|
||||
"more data needed/to be rendered", /*%< 27 DNS_R_NOREDATA */
|
||||
"continue", /*%< 28 DNS_R_CONTINUE */
|
||||
"delegation", /*%< 29 DNS_R_DELEGATION */
|
||||
|
||||
"glue", /*%< 30 DNS_R_GLUE */
|
||||
"dname", /*%< 31 DNS_R_DNAME */
|
||||
"cname", /*%< 32 DNS_R_CNAME */
|
||||
"bad database", /*%< 33 DNS_R_BADDB */
|
||||
"zonecut", /*%< 34 DNS_R_ZONECUT */
|
||||
|
||||
"bad zone", /*%< 35 DNS_R_BADZONE */
|
||||
"more data", /*%< 36 DNS_R_MOREDATA */
|
||||
"up to date", /*%< 37 DNS_R_UPTODATE */
|
||||
"tsig verify failure", /*%< 38 DNS_R_TSIGVERIFYFAILURE */
|
||||
"tsig indicates error", /*%< 39 DNS_R_TSIGERRORSET */
|
||||
|
||||
"RRSIG failed to verify", /*%< 40 DNS_R_SIGINVALID */
|
||||
"RRSIG has expired", /*%< 41 DNS_R_SIGEXPIRED */
|
||||
"RRSIG validity period has not begun", /*%< 42 DNS_R_SIGFUTURE */
|
||||
"key is unauthorized to sign data", /*%< 43 DNS_R_KEYUNAUTHORIZED */
|
||||
"invalid time", /*%< 44 DNS_R_INVALIDTIME */
|
||||
|
||||
"expected a TSIG or SIG(0)", /*%< 45 DNS_R_EXPECTEDTSIG */
|
||||
"did not expect a TSIG or SIG(0)", /*%< 46 DNS_R_UNEXPECTEDTSIG */
|
||||
"TKEY is unacceptable", /*%< 47 DNS_R_INVALIDTKEY */
|
||||
"hint", /*%< 48 DNS_R_HINT */
|
||||
"drop", /*%< 49 DNS_R_DROP */
|
||||
|
||||
"zone not loaded", /*%< 50 DNS_R_NOTLOADED */
|
||||
"ncache nxdomain", /*%< 51 DNS_R_NCACHENXDOMAIN */
|
||||
"ncache nxrrset", /*%< 52 DNS_R_NCACHENXRRSET */
|
||||
"wait", /*%< 53 DNS_R_WAIT */
|
||||
"not verified yet", /*%< 54 DNS_R_NOTVERIFIEDYET */
|
||||
|
||||
"no identity", /*%< 55 DNS_R_NOIDENTITY */
|
||||
"no journal", /*%< 56 DNS_R_NOJOURNAL */
|
||||
"alias", /*%< 57 DNS_R_ALIAS */
|
||||
"use TCP", /*%< 58 DNS_R_USETCP */
|
||||
"no valid RRSIG", /*%< 59 DNS_R_NOVALIDSIG */
|
||||
|
||||
"no valid NSEC", /*%< 60 DNS_R_NOVALIDNSEC */
|
||||
"insecurity proof failed", /*%< 61 DNS_R_NOTINSECURE */
|
||||
"unknown service", /*%< 62 DNS_R_UNKNOWNSERVICE */
|
||||
"recoverable error occurred", /*%< 63 DNS_R_RECOVERABLE */
|
||||
"unknown opt attribute record", /*%< 64 DNS_R_UNKNOWNOPT */
|
||||
|
||||
"unexpected message id", /*%< 65 DNS_R_UNEXPECTEDID */
|
||||
"seen include file", /*%< 66 DNS_R_SEENINCLUDE */
|
||||
"not exact", /*%< 67 DNS_R_NOTEXACT */
|
||||
"address blackholed", /*%< 68 DNS_R_BLACKHOLED */
|
||||
"bad algorithm", /*%< 69 DNS_R_BADALG */
|
||||
|
||||
"invalid use of a meta type", /*%< 70 DNS_R_METATYPE */
|
||||
"CNAME and other data", /*%< 71 DNS_R_CNAMEANDOTHER */
|
||||
"multiple RRs of singleton type", /*%< 72 DNS_R_SINGLETON */
|
||||
"hint nxrrset", /*%< 73 DNS_R_HINTNXRRSET */
|
||||
"no master file configured", /*%< 74 DNS_R_NOMASTERFILE */
|
||||
|
||||
"unknown protocol", /*%< 75 DNS_R_UNKNOWNPROTO */
|
||||
"clocks are unsynchronized", /*%< 76 DNS_R_CLOCKSKEW */
|
||||
"IXFR failed", /*%< 77 DNS_R_BADIXFR */
|
||||
"not authoritative", /*%< 78 DNS_R_NOTAUTHORITATIVE */
|
||||
"no valid KEY", /*%< 79 DNS_R_NOVALIDKEY */
|
||||
|
||||
"obsolete", /*%< 80 DNS_R_OBSOLETE */
|
||||
"already frozen", /*%< 81 DNS_R_FROZEN */
|
||||
"unknown flag", /*%< 82 DNS_R_UNKNOWNFLAG */
|
||||
"expected a response", /*%< 83 DNS_R_EXPECTEDRESPONSE */
|
||||
"no valid DS", /*%< 84 DNS_R_NOVALIDDS */
|
||||
|
||||
"NS is an address", /*%< 85 DNS_R_NSISADDRESS */
|
||||
"received FORMERR", /*%< 86 DNS_R_REMOTEFORMERR */
|
||||
"truncated TCP response", /*%< 87 DNS_R_TRUNCATEDTCP */
|
||||
"lame server detected", /*%< 88 DNS_R_LAME */
|
||||
"unexpected RCODE", /*%< 89 DNS_R_UNEXPECTEDRCODE */
|
||||
|
||||
"unexpected OPCODE", /*%< 90 DNS_R_UNEXPECTEDOPCODE */
|
||||
"chase DS servers", /*%< 91 DNS_R_CHASEDSSERVERS */
|
||||
"empty name", /*%< 92 DNS_R_EMPTYNAME */
|
||||
"empty wild", /*%< 93 DNS_R_EMPTYWILD */
|
||||
"bad bitmap", /*%< 94 DNS_R_BADBITMAP */
|
||||
|
||||
"from wildcard", /*%< 95 DNS_R_FROMWILDCARD */
|
||||
"bad owner name (check-names)", /*%< 96 DNS_R_BADOWNERNAME */
|
||||
"bad name (check-names)", /*%< 97 DNS_R_BADNAME */
|
||||
"dynamic zone", /*%< 98 DNS_R_DYNAMIC */
|
||||
"unknown command", /*%< 99 DNS_R_UNKNOWNCOMMAND */
|
||||
|
||||
"must-be-secure", /*%< 100 DNS_R_MUSTBESECURE */
|
||||
"covering NSEC record returned", /*%< 101 DNS_R_COVERINGNSEC */
|
||||
"MX is an address", /*%< 102 DNS_R_MXISADDRESS */
|
||||
"duplicate query", /*%< 103 DNS_R_DUPLICATE */
|
||||
"invalid NSEC3 owner name (wildcard)", /*%< 104 DNS_R_INVALIDNSEC3 */
|
||||
|
||||
"not master", /*%< 105 DNS_R_NOTMASTER */
|
||||
"broken trust chain", /*%< 106 DNS_R_BROKENCHAIN */
|
||||
"expired", /*%< 107 DNS_R_EXPIRED */
|
||||
"not dynamic", /*%< 108 DNS_R_NOTDYNAMIC */
|
||||
"bad EUI", /*%< 109 DNS_R_BADEUI */
|
||||
|
||||
"covered by negative trust anchor", /*%< 110 DNS_R_NTACOVERED */
|
||||
"bad CDS", /*%< 111 DNS_R_BADCDS */
|
||||
"bad CDNSKEY", /*%< 112 DNS_R_BADCDNSKEY */
|
||||
"malformed OPT option", /*%< 113 DNS_R_OPTERR */
|
||||
"malformed DNSTAP data", /*%< 114 DNS_R_BADDNSTAP */
|
||||
|
||||
"TSIG in wrong location", /*%< 115 DNS_R_BADTSIG */
|
||||
"SIG(0) in wrong location", /*%< 116 DNS_R_BADSIG0 */
|
||||
"too many records", /*%< 117 DNS_R_TOOMANYRECORDS */
|
||||
"verify failure", /*%< 118 DNS_R_VERIFYFAILURE */
|
||||
"at top of zone", /*%< 119 DNS_R_ATZONETOP */
|
||||
|
||||
"no matching key found", /*%< 120 DNS_R_NOKEYMATCH */
|
||||
"too many keys matching", /*%< 121 DNS_R_TOOMANYKEYS */
|
||||
"key is not actively signing", /*%< 122 DNS_R_KEYNOTACTIVE */
|
||||
"NSEC3 iterations out of range", /*%< 123 DNS_R_NSEC3ITERRANGE */
|
||||
"NSEC3 salt length too high", /*%< 124 DNS_R_NSEC3SALTRANGE */
|
||||
|
||||
"cannot use NSEC3 with key algorithm", /*%< 125 DNS_R_NSEC3BADALG */
|
||||
"NSEC3 resalt", /*%< 126 DNS_R_NSEC3RESALT */
|
||||
"inconsistent resource record", /*%< 127 DNS_R_INCONSISTENTRR */
|
||||
};
|
||||
|
||||
static const char *ids[DNS_R_NRESULTS] = {
|
||||
"DNS_R_LABELTOOLONG",
|
||||
"DNS_R_BADESCAPE",
|
||||
/*!
|
||||
* Note that DNS_R_BADBITSTRING and DNS_R_BITSTRINGTOOLONG are
|
||||
* deprecated.
|
||||
*/
|
||||
"DNS_R_BADBITSTRING",
|
||||
"DNS_R_BITSTRINGTOOLONG",
|
||||
"DNS_R_EMPTYLABEL",
|
||||
"DNS_R_BADDOTTEDQUAD",
|
||||
"DNS_R_INVALIDNS",
|
||||
"DNS_R_UNKNOWN",
|
||||
"DNS_R_BADLABELTYPE",
|
||||
"DNS_R_BADPOINTER",
|
||||
"DNS_R_TOOMANYHOPS",
|
||||
"DNS_R_DISALLOWED",
|
||||
"DNS_R_EXTRATOKEN",
|
||||
"DNS_R_EXTRADATA",
|
||||
"DNS_R_TEXTTOOLONG",
|
||||
"DNS_R_NOTZONETOP",
|
||||
"DNS_R_SYNTAX",
|
||||
"DNS_R_BADCKSUM",
|
||||
"DNS_R_BADAAAA",
|
||||
"DNS_R_NOOWNER",
|
||||
"DNS_R_NOTTL",
|
||||
"DNS_R_BADCLASS",
|
||||
"DNS_R_NAMETOOLONG",
|
||||
"DNS_R_PARTIALMATCH",
|
||||
"DNS_R_NEWORIGIN",
|
||||
"DNS_R_UNCHANGED",
|
||||
"DNS_R_BADTTL",
|
||||
"DNS_R_NOREDATA",
|
||||
"DNS_R_CONTINUE",
|
||||
"DNS_R_DELEGATION",
|
||||
"DNS_R_GLUE",
|
||||
"DNS_R_DNAME",
|
||||
"DNS_R_CNAME",
|
||||
"DNS_R_BADDB",
|
||||
"DNS_R_ZONECUT",
|
||||
"DNS_R_BADZONE",
|
||||
"DNS_R_MOREDATA",
|
||||
"DNS_R_UPTODATE",
|
||||
"DNS_R_TSIGVERIFYFAILURE",
|
||||
"DNS_R_TSIGERRORSET",
|
||||
"DNS_R_SIGINVALID",
|
||||
"DNS_R_SIGEXPIRED",
|
||||
"DNS_R_SIGFUTURE",
|
||||
"DNS_R_KEYUNAUTHORIZED",
|
||||
"DNS_R_INVALIDTIME",
|
||||
"DNS_R_EXPECTEDTSIG",
|
||||
"DNS_R_UNEXPECTEDTSIG",
|
||||
"DNS_R_INVALIDTKEY",
|
||||
"DNS_R_HINT",
|
||||
"DNS_R_DROP",
|
||||
"DNS_R_NOTLOADED",
|
||||
"DNS_R_NCACHENXDOMAIN",
|
||||
"DNS_R_NCACHENXRRSET",
|
||||
"DNS_R_WAIT",
|
||||
"DNS_R_NOTVERIFIEDYET",
|
||||
"DNS_R_NOIDENTITY",
|
||||
"DNS_R_NOJOURNAL",
|
||||
"DNS_R_ALIAS",
|
||||
"DNS_R_USETCP",
|
||||
"DNS_R_NOVALIDSIG",
|
||||
"DNS_R_NOVALIDNSEC",
|
||||
"DNS_R_NOTINSECURE",
|
||||
"DNS_R_UNKNOWNSERVICE",
|
||||
"DNS_R_RECOVERABLE",
|
||||
"DNS_R_UNKNOWNOPT",
|
||||
"DNS_R_UNEXPECTEDID",
|
||||
"DNS_R_SEENINCLUDE",
|
||||
"DNS_R_NOTEXACT",
|
||||
"DNS_R_BLACKHOLED",
|
||||
"DNS_R_BADALG",
|
||||
"DNS_R_METATYPE",
|
||||
"DNS_R_CNAMEANDOTHER",
|
||||
"DNS_R_SINGLETON",
|
||||
"DNS_R_HINTNXRRSET",
|
||||
"DNS_R_NOMASTERFILE",
|
||||
"DNS_R_UNKNOWNPROTO",
|
||||
"DNS_R_CLOCKSKEW",
|
||||
"DNS_R_BADIXFR",
|
||||
"DNS_R_NOTAUTHORITATIVE",
|
||||
"DNS_R_NOVALIDKEY",
|
||||
"DNS_R_OBSOLETE",
|
||||
"DNS_R_FROZEN",
|
||||
"DNS_R_UNKNOWNFLAG",
|
||||
"DNS_R_EXPECTEDRESPONSE",
|
||||
"DNS_R_NOVALIDDS",
|
||||
"DNS_R_NSISADDRESS",
|
||||
"DNS_R_REMOTEFORMERR",
|
||||
"DNS_R_TRUNCATEDTCP",
|
||||
"DNS_R_LAME",
|
||||
"DNS_R_UNEXPECTEDRCODE",
|
||||
"DNS_R_UNEXPECTEDOPCODE",
|
||||
"DNS_R_CHASEDSSERVERS",
|
||||
"DNS_R_EMPTYNAME",
|
||||
"DNS_R_EMPTYWILD",
|
||||
"DNS_R_BADBITMAP",
|
||||
"DNS_R_FROMWILDCARD",
|
||||
"DNS_R_BADOWNERNAME",
|
||||
"DNS_R_BADNAME",
|
||||
"DNS_R_DYNAMIC",
|
||||
"DNS_R_UNKNOWNCOMMAND",
|
||||
"DNS_R_MUSTBESECURE",
|
||||
"DNS_R_COVERINGNSEC",
|
||||
"DNS_R_MXISADDRESS",
|
||||
"DNS_R_DUPLICATE",
|
||||
"DNS_R_INVALIDNSEC3",
|
||||
"DNS_R_NOTMASTER",
|
||||
"DNS_R_BROKENCHAIN",
|
||||
"DNS_R_EXPIRED",
|
||||
"DNS_R_NOTDYNAMIC",
|
||||
"DNS_R_BADEUI",
|
||||
"DNS_R_NTACOVERED",
|
||||
"DNS_R_BADCDS",
|
||||
"DNS_R_BADCDNSKEY",
|
||||
"DNS_R_OPTERR",
|
||||
"DNS_R_BADDNSTAP",
|
||||
"DNS_R_BADTSIG",
|
||||
"DNS_R_BADSIG0",
|
||||
"DNS_R_TOOMANYRECORDS",
|
||||
"DNS_R_VERIFYFAILURE",
|
||||
"DNS_R_ATZONETOP",
|
||||
"DNS_R_NOKEYMATCH",
|
||||
"DNS_R_TOOMANYKEYS",
|
||||
"DNS_R_KEYNOTACTIVE",
|
||||
"DNS_R_NSEC3ITERRANGE",
|
||||
"DNS_R_NSEC3SALTRANGE",
|
||||
"DNS_R_NSEC3BADALG",
|
||||
"DNS_R_NSEC3RESALT",
|
||||
"DNS_R_INCONSISTENTRR",
|
||||
};
|
||||
|
||||
static const char *rcode_text[DNS_R_NRCODERESULTS] = {
|
||||
"NOERROR", /*%< 0 DNS_R_NOERROR */
|
||||
"FORMERR", /*%< 1 DNS_R_FORMERR */
|
||||
"SERVFAIL", /*%< 2 DNS_R_SERVFAIL */
|
||||
"NXDOMAIN", /*%< 3 DNS_R_NXDOMAIN */
|
||||
"NOTIMP", /*%< 4 DNS_R_NOTIMP */
|
||||
|
||||
"REFUSED", /*%< 5 DNS_R_REFUSED */
|
||||
"YXDOMAIN", /*%< 6 DNS_R_YXDOMAIN */
|
||||
"YXRRSET", /*%< 7 DNS_R_YXRRSET */
|
||||
"NXRRSET", /*%< 8 DNS_R_NXRRSET */
|
||||
"NOTAUTH", /*%< 9 DNS_R_NOTAUTH */
|
||||
|
||||
"NOTZONE", /*%< 10 DNS_R_NOTZONE */
|
||||
"<rcode 11>", /*%< 11 DNS_R_RCODE11 */
|
||||
"<rcode 12>", /*%< 12 DNS_R_RCODE12 */
|
||||
"<rcode 13>", /*%< 13 DNS_R_RCODE13 */
|
||||
"<rcode 14>", /*%< 14 DNS_R_RCODE14 */
|
||||
|
||||
"<rcode 15>", /*%< 15 DNS_R_RCODE15 */
|
||||
"BADVERS", /*%< 16 DNS_R_BADVERS */
|
||||
};
|
||||
|
||||
static const char *rcode_ids[DNS_R_NRCODERESULTS] = {
|
||||
"DNS_R_NOERROR", "DNS_R_FORMERR", "DNS_R_SERVFAIL", "DNS_R_NXDOMAIN",
|
||||
"DNS_R_NOTIMP", "DNS_R_REFUSED", "DNS_R_YXDOMAIN", "DNS_R_YXRRSET",
|
||||
"DNS_R_NXRRSET", "DNS_R_NOTAUTH", "DNS_R_NOTZONE", "DNS_R_RCODE11",
|
||||
"RNS_R_RCODE12", "DNS_R_RCODE13", "DNS_R_RCODE14", "DNS_R_RCODE15",
|
||||
"DNS_R_BADVERS",
|
||||
};
|
||||
|
||||
#define DNS_RESULT_RESULTSET 2
|
||||
#define DNS_RESULT_RCODERESULTSET 3
|
||||
|
||||
static isc_once_t once = ISC_ONCE_INIT;
|
||||
|
||||
static void
|
||||
initialize_action(void) {
|
||||
isc_result_t result;
|
||||
|
||||
result = isc_result_register(ISC_RESULTCLASS_DNS, DNS_R_NRESULTS, text,
|
||||
DNS_RESULT_RESULTSET);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
result = isc_result_register(ISC_RESULTCLASS_DNSRCODE,
|
||||
DNS_R_NRCODERESULTS, rcode_text,
|
||||
DNS_RESULT_RCODERESULTSET);
|
||||
}
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_result_register() failed: %u", result);
|
||||
}
|
||||
|
||||
result = isc_result_registerids(ISC_RESULTCLASS_DNS, DNS_R_NRESULTS,
|
||||
ids, DNS_RESULT_RESULTSET);
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
result = isc_result_registerids(ISC_RESULTCLASS_DNSRCODE,
|
||||
DNS_R_NRCODERESULTS, rcode_ids,
|
||||
DNS_RESULT_RCODERESULTSET);
|
||||
}
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
UNEXPECTED_ERROR(__FILE__, __LINE__,
|
||||
"isc_result_registerids() failed: %u", result);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
initialize(void) {
|
||||
RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
|
||||
}
|
||||
|
||||
const char *
|
||||
dns_result_totext(isc_result_t result) {
|
||||
initialize();
|
||||
|
||||
return (isc_result_totext(result));
|
||||
}
|
||||
|
||||
void
|
||||
dns_result_register(void) {
|
||||
initialize();
|
||||
}
|
||||
#define DNS_RESULT_ISRCODE(result) (DNS_R_NOERROR == ((result)&0xFFFF0000))
|
||||
|
||||
dns_rcode_t
|
||||
dns_result_torcode(isc_result_t result) {
|
||||
@ -449,3 +75,14 @@ dns_result_torcode(isc_result_t result) {
|
||||
|
||||
return (rcode);
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
dns_result_fromrcode(dns_rcode_t rcode) {
|
||||
/*
|
||||
* Rcodes can't be bigger than 12 bits, which is why we
|
||||
* AND with 0xFFF instead of 0xFFFF.
|
||||
*/
|
||||
REQUIRE((rcode & 0xFFF) == rcode);
|
||||
|
||||
return ((isc_result_t)rcode + DNS_R_NOERROR);
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <isc/buffer.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h> /* Required for HP/UX (and others?) */
|
||||
#include <isc/util.h>
|
||||
|
||||
@ -28,7 +29,6 @@
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/rootns.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
@ -484,7 +484,7 @@ dns_root_checkhints(dns_view_t *view, dns_db_t *hints, dns_db_t *db) {
|
||||
DNS_LOGMODULE_HINTS, ISC_LOG_WARNING,
|
||||
"checkhints%s%s: unable to get root NS rrset "
|
||||
"from hints: %s",
|
||||
sep, viewname, dns_result_totext(result));
|
||||
sep, viewname, isc_result_totext(result));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -495,7 +495,7 @@ dns_root_checkhints(dns_view_t *view, dns_db_t *hints, dns_db_t *db) {
|
||||
DNS_LOGMODULE_HINTS, ISC_LOG_WARNING,
|
||||
"checkhints%s%s: unable to get root NS rrset "
|
||||
"from cache: %s",
|
||||
sep, viewname, dns_result_totext(result));
|
||||
sep, viewname, isc_result_totext(result));
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <isc/net.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/rwlock.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/task.h>
|
||||
@ -36,7 +37,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatastruct.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/rpz.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#include <isc/result.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
@ -25,7 +26,6 @@
|
||||
#include <dns/rdata.h>
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/rriterator.h>
|
||||
|
||||
/***
|
||||
|
@ -24,13 +24,13 @@
|
||||
#include <isc/net.h>
|
||||
#include <isc/netaddr.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/log.h>
|
||||
#include <dns/rcode.h>
|
||||
#include <dns/rdataclass.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/rrl.h>
|
||||
#include <dns/view.h>
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <isc/print.h>
|
||||
#include <isc/refcount.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/util.h>
|
||||
|
||||
#include <dns/callbacks.h>
|
||||
@ -36,7 +37,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/sdb.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
|
@ -58,6 +58,7 @@
|
||||
#include <isc/once.h>
|
||||
#include <isc/print.h>
|
||||
#include <isc/region.h>
|
||||
#include <isc/result.h>
|
||||
#include <isc/rwlock.h>
|
||||
#include <isc/string.h>
|
||||
#include <isc/util.h>
|
||||
@ -74,7 +75,6 @@
|
||||
#include <dns/rdataset.h>
|
||||
#include <dns/rdatasetiter.h>
|
||||
#include <dns/rdatatype.h>
|
||||
#include <dns/result.h>
|
||||
#include <dns/sdlz.h>
|
||||
#include <dns/types.h>
|
||||
|
||||
|
@ -39,7 +39,6 @@ check_PROGRAMS = \
|
||||
rdataset_test \
|
||||
rdatasetstats_test \
|
||||
resolver_test \
|
||||
result_test \
|
||||
rsa_test \
|
||||
sigs_test \
|
||||
time_test \
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user