PageRenderTime 10ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/contrib/bind9/lib/dns/include/dns/result.h

https://bitbucket.org/freebsd/freebsd-head/
C++ Header | 194 lines | 137 code | 17 blank | 40 comment | 0 complexity | ba29ef0620ed660dddeca06bbd4bbbd5 MD5 | raw file
  1/*
  2 * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. ("ISC")
  3 * Copyright (C) 1998-2003  Internet Software Consortium.
  4 *
  5 * Permission to use, copy, modify, and/or distribute this software for any
  6 * purpose with or without fee is hereby granted, provided that the above
  7 * copyright notice and this permission notice appear in all copies.
  8 *
  9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
 10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 11 * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
 12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 15 * PERFORMANCE OF THIS SOFTWARE.
 16 */
 17
 18/* $Id$ */
 19
 20#ifndef DNS_RESULT_H
 21#define DNS_RESULT_H 1
 22
 23/*! \file dns/result.h */
 24
 25#include <isc/lang.h>
 26#include <isc/resultclass.h>
 27
 28#include <dns/types.h>
 29
 30/*
 31 * Nothing in this file truly depends on <isc/result.h>, but the
 32 * DNS result codes are considered to be publicly derived from
 33 * the ISC result codes, so including this file buys you the ISC_R_
 34 * namespace too.
 35 */
 36#include <isc/result.h>		/* Contractual promise. */
 37
 38/*
 39 * DNS library result codes
 40 */
 41#define DNS_R_LABELTOOLONG		(ISC_RESULTCLASS_DNS + 0)
 42#define DNS_R_BADESCAPE			(ISC_RESULTCLASS_DNS + 1)
 43/*
 44 * Since we dropped the support of bitstring labels, deprecate the related
 45 * result codes too.
 46
 47#define DNS_R_BADBITSTRING		(ISC_RESULTCLASS_DNS + 2)
 48#define DNS_R_BITSTRINGTOOLONG		(ISC_RESULTCLASS_DNS + 3)
 49*/
 50#define DNS_R_EMPTYLABEL		(ISC_RESULTCLASS_DNS + 4)
 51#define DNS_R_BADDOTTEDQUAD		(ISC_RESULTCLASS_DNS + 5)
 52#define DNS_R_INVALIDNS			(ISC_RESULTCLASS_DNS + 6)
 53#define DNS_R_UNKNOWN			(ISC_RESULTCLASS_DNS + 7)
 54#define DNS_R_BADLABELTYPE		(ISC_RESULTCLASS_DNS + 8)
 55#define DNS_R_BADPOINTER		(ISC_RESULTCLASS_DNS + 9)
 56#define DNS_R_TOOMANYHOPS		(ISC_RESULTCLASS_DNS + 10)
 57#define DNS_R_DISALLOWED		(ISC_RESULTCLASS_DNS + 11)
 58#define DNS_R_EXTRATOKEN		(ISC_RESULTCLASS_DNS + 12)
 59#define DNS_R_EXTRADATA			(ISC_RESULTCLASS_DNS + 13)
 60#define DNS_R_TEXTTOOLONG		(ISC_RESULTCLASS_DNS + 14)
 61#define DNS_R_NOTZONETOP		(ISC_RESULTCLASS_DNS + 15)
 62#define DNS_R_SYNTAX			(ISC_RESULTCLASS_DNS + 16)
 63#define DNS_R_BADCKSUM			(ISC_RESULTCLASS_DNS + 17)
 64#define DNS_R_BADAAAA			(ISC_RESULTCLASS_DNS + 18)
 65#define DNS_R_NOOWNER			(ISC_RESULTCLASS_DNS + 19)
 66#define DNS_R_NOTTL			(ISC_RESULTCLASS_DNS + 20)
 67#define DNS_R_BADCLASS			(ISC_RESULTCLASS_DNS + 21)
 68#define DNS_R_NAMETOOLONG		(ISC_RESULTCLASS_DNS + 22)
 69#define DNS_R_PARTIALMATCH		(ISC_RESULTCLASS_DNS + 23)
 70#define DNS_R_NEWORIGIN			(ISC_RESULTCLASS_DNS + 24)
 71#define DNS_R_UNCHANGED			(ISC_RESULTCLASS_DNS + 25)
 72#define DNS_R_BADTTL			(ISC_RESULTCLASS_DNS + 26)
 73#define DNS_R_NOREDATA			(ISC_RESULTCLASS_DNS + 27)
 74#define DNS_R_CONTINUE			(ISC_RESULTCLASS_DNS + 28)
 75#define DNS_R_DELEGATION		(ISC_RESULTCLASS_DNS + 29)
 76#define DNS_R_GLUE			(ISC_RESULTCLASS_DNS + 30)
 77#define DNS_R_DNAME			(ISC_RESULTCLASS_DNS + 31)
 78#define DNS_R_CNAME			(ISC_RESULTCLASS_DNS + 32)
 79#define DNS_R_BADDB			(ISC_RESULTCLASS_DNS + 33)
 80#define DNS_R_ZONECUT			(ISC_RESULTCLASS_DNS + 34)
 81#define DNS_R_BADZONE			(ISC_RESULTCLASS_DNS + 35)
 82#define DNS_R_MOREDATA			(ISC_RESULTCLASS_DNS + 36)
 83#define DNS_R_UPTODATE			(ISC_RESULTCLASS_DNS + 37)
 84#define DNS_R_TSIGVERIFYFAILURE		(ISC_RESULTCLASS_DNS + 38)
 85#define DNS_R_TSIGERRORSET		(ISC_RESULTCLASS_DNS + 39)
 86#define DNS_R_SIGINVALID		(ISC_RESULTCLASS_DNS + 40)
 87#define DNS_R_SIGEXPIRED		(ISC_RESULTCLASS_DNS + 41)
 88#define DNS_R_SIGFUTURE			(ISC_RESULTCLASS_DNS + 42)
 89#define DNS_R_KEYUNAUTHORIZED		(ISC_RESULTCLASS_DNS + 43)
 90#define DNS_R_INVALIDTIME		(ISC_RESULTCLASS_DNS + 44)
 91#define DNS_R_EXPECTEDTSIG		(ISC_RESULTCLASS_DNS + 45)
 92#define DNS_R_UNEXPECTEDTSIG		(ISC_RESULTCLASS_DNS + 46)
 93#define DNS_R_INVALIDTKEY		(ISC_RESULTCLASS_DNS + 47)
 94#define DNS_R_HINT			(ISC_RESULTCLASS_DNS + 48)
 95#define DNS_R_DROP			(ISC_RESULTCLASS_DNS + 49)
 96#define DNS_R_NOTLOADED			(ISC_RESULTCLASS_DNS + 50)
 97#define DNS_R_NCACHENXDOMAIN		(ISC_RESULTCLASS_DNS + 51)
 98#define DNS_R_NCACHENXRRSET		(ISC_RESULTCLASS_DNS + 52)
 99#define DNS_R_WAIT			(ISC_RESULTCLASS_DNS + 53)
100#define DNS_R_NOTVERIFIEDYET		(ISC_RESULTCLASS_DNS + 54)
101#define DNS_R_NOIDENTITY		(ISC_RESULTCLASS_DNS + 55)
102#define DNS_R_NOJOURNAL			(ISC_RESULTCLASS_DNS + 56)
103#define DNS_R_ALIAS			(ISC_RESULTCLASS_DNS + 57)
104#define DNS_R_USETCP			(ISC_RESULTCLASS_DNS + 58)
105#define DNS_R_NOVALIDSIG		(ISC_RESULTCLASS_DNS + 59)
106#define DNS_R_NOVALIDNSEC		(ISC_RESULTCLASS_DNS + 60)
107#define DNS_R_NOTINSECURE		(ISC_RESULTCLASS_DNS + 61)
108#define DNS_R_UNKNOWNSERVICE		(ISC_RESULTCLASS_DNS + 62)
109#define DNS_R_RECOVERABLE		(ISC_RESULTCLASS_DNS + 63)
110#define DNS_R_UNKNOWNOPT		(ISC_RESULTCLASS_DNS + 64)
111#define DNS_R_UNEXPECTEDID		(ISC_RESULTCLASS_DNS + 65)
112#define DNS_R_SEENINCLUDE		(ISC_RESULTCLASS_DNS + 66)
113#define DNS_R_NOTEXACT			(ISC_RESULTCLASS_DNS + 67)
114#define DNS_R_BLACKHOLED		(ISC_RESULTCLASS_DNS + 68)
115#define DNS_R_BADALG			(ISC_RESULTCLASS_DNS + 69)
116#define DNS_R_METATYPE			(ISC_RESULTCLASS_DNS + 70)
117#define DNS_R_CNAMEANDOTHER		(ISC_RESULTCLASS_DNS + 71)
118#define DNS_R_SINGLETON			(ISC_RESULTCLASS_DNS + 72)
119#define DNS_R_HINTNXRRSET		(ISC_RESULTCLASS_DNS + 73)
120#define DNS_R_NOMASTERFILE		(ISC_RESULTCLASS_DNS + 74)
121#define DNS_R_UNKNOWNPROTO		(ISC_RESULTCLASS_DNS + 75)
122#define DNS_R_CLOCKSKEW			(ISC_RESULTCLASS_DNS + 76)
123#define DNS_R_BADIXFR			(ISC_RESULTCLASS_DNS + 77)
124#define DNS_R_NOTAUTHORITATIVE		(ISC_RESULTCLASS_DNS + 78)
125#define DNS_R_NOVALIDKEY		(ISC_RESULTCLASS_DNS + 79)
126#define DNS_R_OBSOLETE			(ISC_RESULTCLASS_DNS + 80)
127#define DNS_R_FROZEN			(ISC_RESULTCLASS_DNS + 81)
128#define DNS_R_UNKNOWNFLAG		(ISC_RESULTCLASS_DNS + 82)
129#define DNS_R_EXPECTEDRESPONSE		(ISC_RESULTCLASS_DNS + 83)
130#define DNS_R_NOVALIDDS			(ISC_RESULTCLASS_DNS + 84)
131#define DNS_R_NSISADDRESS		(ISC_RESULTCLASS_DNS + 85)
132#define DNS_R_REMOTEFORMERR		(ISC_RESULTCLASS_DNS + 86)
133#define DNS_R_TRUNCATEDTCP		(ISC_RESULTCLASS_DNS + 87)
134#define DNS_R_LAME			(ISC_RESULTCLASS_DNS + 88)
135#define DNS_R_UNEXPECTEDRCODE		(ISC_RESULTCLASS_DNS + 89)
136#define DNS_R_UNEXPECTEDOPCODE		(ISC_RESULTCLASS_DNS + 90)
137#define DNS_R_CHASEDSSERVERS		(ISC_RESULTCLASS_DNS + 91)
138#define DNS_R_EMPTYNAME			(ISC_RESULTCLASS_DNS + 92)
139#define DNS_R_EMPTYWILD			(ISC_RESULTCLASS_DNS + 93)
140#define DNS_R_BADBITMAP			(ISC_RESULTCLASS_DNS + 94)
141#define DNS_R_FROMWILDCARD		(ISC_RESULTCLASS_DNS + 95)
142#define DNS_R_BADOWNERNAME		(ISC_RESULTCLASS_DNS + 96)
143#define DNS_R_BADNAME			(ISC_RESULTCLASS_DNS + 97)
144#define DNS_R_DYNAMIC			(ISC_RESULTCLASS_DNS + 98)
145#define DNS_R_UNKNOWNCOMMAND		(ISC_RESULTCLASS_DNS + 99)
146#define DNS_R_MUSTBESECURE		(ISC_RESULTCLASS_DNS + 100)
147#define DNS_R_COVERINGNSEC		(ISC_RESULTCLASS_DNS + 101)
148#define DNS_R_MXISADDRESS		(ISC_RESULTCLASS_DNS + 102)
149#define DNS_R_DUPLICATE			(ISC_RESULTCLASS_DNS + 103)
150#define DNS_R_INVALIDNSEC3		(ISC_RESULTCLASS_DNS + 104)
151#define DNS_R_NOTMASTER 		(ISC_RESULTCLASS_DNS + 105)
152#define DNS_R_BROKENCHAIN		(ISC_RESULTCLASS_DNS + 106)
153#define DNS_R_EXPIRED			(ISC_RESULTCLASS_DNS + 107)
154
155#define DNS_R_NRESULTS			108	/*%< Number of results */
156
157/*
158 * DNS wire format rcodes.
159 *
160 * By making these their own class we can easily convert them into the
161 * wire-format rcode value simply by masking off the resultclass.
162 */
163#define DNS_R_NOERROR			(ISC_RESULTCLASS_DNSRCODE + 0)
164#define DNS_R_FORMERR			(ISC_RESULTCLASS_DNSRCODE + 1)
165#define DNS_R_SERVFAIL			(ISC_RESULTCLASS_DNSRCODE + 2)
166#define DNS_R_NXDOMAIN			(ISC_RESULTCLASS_DNSRCODE + 3)
167#define DNS_R_NOTIMP			(ISC_RESULTCLASS_DNSRCODE + 4)
168#define DNS_R_REFUSED			(ISC_RESULTCLASS_DNSRCODE + 5)
169#define DNS_R_YXDOMAIN			(ISC_RESULTCLASS_DNSRCODE + 6)
170#define DNS_R_YXRRSET			(ISC_RESULTCLASS_DNSRCODE + 7)
171#define DNS_R_NXRRSET			(ISC_RESULTCLASS_DNSRCODE + 8)
172#define DNS_R_NOTAUTH			(ISC_RESULTCLASS_DNSRCODE + 9)
173#define DNS_R_NOTZONE			(ISC_RESULTCLASS_DNSRCODE + 10)
174#define DNS_R_BADVERS			(ISC_RESULTCLASS_DNSRCODE + 16)
175
176#define DNS_R_NRCODERESULTS		17	/*%< Number of rcode results */
177
178#define DNS_RESULT_ISRCODE(result) \
179	(ISC_RESULTCLASS_INCLASS(ISC_RESULTCLASS_DNSRCODE, (result)))
180
181ISC_LANG_BEGINDECLS
182
183const char *
184dns_result_totext(isc_result_t);
185
186void
187dns_result_register(void);
188
189dns_rcode_t
190dns_result_torcode(isc_result_t result);
191
192ISC_LANG_ENDDECLS
193
194#endif /* DNS_RESULT_H */