result.c revision c5223c9cb7c22620d5ee6611228673e95b48a270
633c5dc507fa3133a6d49a55cfe84bf4fd522c72Tinderbox User * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * Copyright (C) 1998-2003 Internet Software Consortium.
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater * Permission to use, copy, modify, and distribute this software for any
1ccbfca64ae86ace521053773001cb995352f96fBob Halley * purpose with or without fee is hereby granted, provided that the above
1ccbfca64ae86ace521053773001cb995352f96fBob Halley * copyright notice and this permission notice appear in all copies.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * PERFORMANCE OF THIS SOFTWARE.
7829fad4093f2c1985b1efb7cea00287ff015d2bckb/* $Id: result.c,v 1.120 2005/05/19 04:59:03 marka Exp $ */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "label too long", /*%< 0 DNS_R_LABELTOOLONG */
1ccbfca64ae86ace521053773001cb995352f96fBob Halley * Note that DNS_R_BADBITSTRING and DNS_R_BITSTRINGTOOLONG are
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence * deprecated.
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "bad bitstring", /*%< 2 DNS_R_BADBITSTRING */
cfb1587eb9a6dc6d1d36ea0344e1b20068b81e88Evan Hunt "bitstring too long", /*%< 3 DNS_R_BITSTRINGTOOLONG */
c03ce72a3b1bd639d5bc430ed37f791051125c56Andreas Gustafsson "empty label", /*%< 4 DNS_R_EMPTYLABEL */
341323e0e7ef69f7c425cd3462afe06d0930c528Michael Graff "bad dotted quad", /*%< 5 DNS_R_BADDOTTEDQUAD */
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley "invalid NS owner name (wildcard)", /*%< 6 DNS_R_INVALIDNS */
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley "bad compression pointer", /*%< 9 DNS_R_BADPOINTER */
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley "disallowed (by application policy)", /*%< 11 DNS_R_DISALLOWED */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "extra input data", /*%< 13 DNS_R_EXTRADATA */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "text too long", /*%< 14 DNS_R_TEXTTOOLONG */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "not at top of zone", /*%< 15 DNS_R_NOTZONETOP */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "bad IPv6 address", /*%< 18 DNS_R_BADAAAA */
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 "more data needed/to be rendered", /*%< 27 DNS_R_NOREDATA */
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 "delegation", /*%< 29 DNS_R_DELEGATION */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "tsig verify failure", /*%< 38 DNS_R_TSIGVERIFYFAILURE */
b61c97cebd9c23e7bbfbdc9508cf022c68461d46Danny Mayer "tsig indicates error", /*%< 39 DNS_R_TSIGERRORSET */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "RRSIG failed to verify", /*%< 40 DNS_R_SIGINVALID */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "RRSIG has expired", /*%< 41 DNS_R_SIGEXPIRED */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "RRSIG validity period has not begun", /*%< 42 DNS_R_SIGFUTURE */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "key is unauthorized to sign data", /*%< 43 DNS_R_KEYUNAUTHORIZED */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "invalid time", /*%< 44 DNS_R_INVALIDTIME */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "expected a TSIG or SIG(0)", /*%< 45 DNS_R_EXPECTEDTSIG */
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 "did not expect a TSIG or SIG(0)", /*%< 46 DNS_R_UNEXPECTEDTSIG */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "TKEY is unacceptable", /*%< 47 DNS_R_INVALIDTKEY */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "zone not loaded", /*%< 50 DNS_R_NOTLOADED */
307d2084502eddc7ce921e5ce439aec3531d90e0Tatuya JINMEI 神明達哉 "ncache nxdomain", /*%< 51 DNS_R_NCACHENXDOMAIN */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "ncache nxrrset", /*%< 52 DNS_R_NCACHENXRRSET */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "not verified yet", /*%< 54 DNS_R_NOTVERIFIEDYET */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "no valid RRSIG", /*%< 59 DNS_R_NOVALIDSIG */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "no valid NSEC", /*%< 60 DNS_R_NOVALIDNSEC */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "not insecure", /*%< 61 DNS_R_NOTINSECURE */
e672951ed28b2e9cc7a19c3d7fa4a258382f981cAutomatic Updater "unknown service", /*%< 62 DNS_R_UNKNOWNSERVICE */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "recoverable error occurred", /*%< 63 DNS_R_RECOVERABLE */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "unknown opt attribute record", /*%< 64 DNS_R_UNKNOWNOPT */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "unexpected message id", /*%< 65 DNS_R_UNEXPECTEDID */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "seen include file", /*%< 66 DNS_R_SEENINCLUDE */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "address blackholed", /*%< 68 DNS_R_BLACKHOLED */
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley "invalid use of a meta type", /*%< 70 DNS_R_METATYPE */
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley "CNAME and other data", /*%< 71 DNS_R_CNAMEANDOTHER */
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley "multiple RRs of singleton type", /*%< 72 DNS_R_SINGLETON */
6d12fdf96621801e80f3f4c2a8a569fe48766a20David Lawrence "no master file configured", /*%< 74 DNS_R_NOMASTERFILE */
1ccbfca64ae86ace521053773001cb995352f96fBob Halley "unknown protocol", /*%< 75 DNS_R_UNKNOWNPROTO */
1ccbfca64ae86ace521053773001cb995352f96fBob Halley "clocks are unsynchronized", /*%< 76 DNS_R_CLOCKSKEW */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "not authoritative", /*%< 78 DNS_R_NOTAUTHORITATIVE */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "no valid KEY", /*%< 79 DNS_R_NOVALIDKEY */
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley "expected a response", /*%< 83 DNS_R_EXPECTEDRESPONSE */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "received FORMERR", /*%< 86 DNS_R_REMOTEFORMERR */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "truncated TCP response", /*%< 87 DNS_R_TRUNCATEDTCP */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "lame server detected", /*%< 88 DNS_R_LAME */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "unexpected RCODE", /*%< 89 DNS_R_UNEXPECTEDRCODE */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "unexpected OPCODE", /*%< 90 DNS_R_UNEXPECTEDOPCODE */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "chase DS servers", /*%< 91 DNS_R_CHASEDSSERVERS */
77ac297199fc44809d9628558223627c10ae3f31Brian Wellington "from wildcard", /*%< 95 DNS_R_FROMWILDCARD */
1ccbfca64ae86ace521053773001cb995352f96fBob Halley "bad owner name (check-names)", /*%< 96 DNS_R_BADOWNERNAME */
c03ce72a3b1bd639d5bc430ed37f791051125c56Andreas Gustafsson "bad name (check-names)", /*%< 97 DNS_R_BADNAME */
c03ce72a3b1bd639d5bc430ed37f791051125c56Andreas Gustafsson "unknown command", /*%< 99 DNS_R_UNKNOWNCOMMAND */
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff "must-be-secure", /*%< 100 DNS_R_MUSTBESECURE */
1ccbfca64ae86ace521053773001cb995352f96fBob Halley "covering NSEC record returned", /*%< 101 DNS_R_COVERINGNSEC */
1ccbfca64ae86ace521053773001cb995352f96fBob Halleystatic const char *rcode_text[DNS_R_NRCODERESULTS] = {
d549c3734869b48e740c64e80890bcb6f3ce672cJames Brister result = isc_result_register(ISC_RESULTCLASS_DNS, DNS_R_NRESULTS,
d549c3734869b48e740c64e80890bcb6f3ce672cJames Brister result = isc_result_register(ISC_RESULTCLASS_DNSRCODE,
62837b832f6a9999976d607eb0a9125bbbbb138bBob Halley RUNTIME_CHECK(isc_once_do(&once, initialize_action) == ISC_R_SUCCESS);
a6733246eafeb43755ce6d7ec3627ac4209cbccbMark Andrews * Rcodes can't be bigger than 12 bits, which is why we
a6733246eafeb43755ce6d7ec3627ac4209cbccbMark Andrews * AND with 0xFFF instead of 0xFFFF.
a6733246eafeb43755ce6d7ec3627ac4209cbccbMark Andrews * Try to supply an appropriate rcode.
a76b380643a22f23a67a9df284e86cd7ef7608c1Mark Andrews /* case DNS_R_BADBITSTRING: deprecated */
a76b380643a22f23a67a9df284e86cd7ef7608c1Mark Andrews /* case DNS_R_BITSTRINGTOOLONG: deprecated */