xref: /minix3/external/bsd/bind/include/dns/code.h (revision 00b67f09dd46474d133c95011a48590a8e8f94c7)
1*00b67f09SDavid van Moolenbroek /*
2*00b67f09SDavid van Moolenbroek  * Copyright (C) 2004-2015 Internet Systems Consortium, Inc. ("ISC")
3*00b67f09SDavid van Moolenbroek  * Copyright (C) 1998-2003 Internet Software Consortium.
4*00b67f09SDavid van Moolenbroek  *
5*00b67f09SDavid van Moolenbroek  * Permission to use, copy, modify, and distribute this software for any
6*00b67f09SDavid van Moolenbroek  * purpose with or without fee is hereby granted, provided that the above
7*00b67f09SDavid van Moolenbroek  * copyright notice and this permission notice appear in all copies.
8*00b67f09SDavid van Moolenbroek  *
9*00b67f09SDavid van Moolenbroek  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10*00b67f09SDavid van Moolenbroek  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11*00b67f09SDavid van Moolenbroek  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12*00b67f09SDavid van Moolenbroek  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13*00b67f09SDavid van Moolenbroek  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14*00b67f09SDavid van Moolenbroek  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15*00b67f09SDavid van Moolenbroek  * PERFORMANCE OF THIS SOFTWARE.
16*00b67f09SDavid van Moolenbroek  */
17*00b67f09SDavid van Moolenbroek 
18*00b67f09SDavid van Moolenbroek /***************
19*00b67f09SDavid van Moolenbroek  ***************
20*00b67f09SDavid van Moolenbroek  ***************   THIS FILE IS AUTOMATICALLY GENERATED BY gen.c.
21*00b67f09SDavid van Moolenbroek  ***************   DO NOT EDIT!
22*00b67f09SDavid van Moolenbroek  ***************
23*00b67f09SDavid van Moolenbroek  ***************/
24*00b67f09SDavid van Moolenbroek 
25*00b67f09SDavid van Moolenbroek /*! \file */
26*00b67f09SDavid van Moolenbroek 
27*00b67f09SDavid van Moolenbroek #ifndef DNS_CODE_H
28*00b67f09SDavid van Moolenbroek #define DNS_CODE_H 1
29*00b67f09SDavid van Moolenbroek 
30*00b67f09SDavid van Moolenbroek #include <isc/boolean.h>
31*00b67f09SDavid van Moolenbroek #include <isc/result.h>
32*00b67f09SDavid van Moolenbroek 
33*00b67f09SDavid van Moolenbroek #include <dns/name.h>
34*00b67f09SDavid van Moolenbroek 
35*00b67f09SDavid van Moolenbroek #include "rdata/in_1/a_1.c"
36*00b67f09SDavid van Moolenbroek #include "rdata/ch_3/a_1.c"
37*00b67f09SDavid van Moolenbroek #include "rdata/hs_4/a_1.c"
38*00b67f09SDavid van Moolenbroek #include "rdata/generic/ns_2.c"
39*00b67f09SDavid van Moolenbroek #include "rdata/generic/md_3.c"
40*00b67f09SDavid van Moolenbroek #include "rdata/generic/mf_4.c"
41*00b67f09SDavid van Moolenbroek #include "rdata/generic/cname_5.c"
42*00b67f09SDavid van Moolenbroek #include "rdata/generic/soa_6.c"
43*00b67f09SDavid van Moolenbroek #include "rdata/generic/mb_7.c"
44*00b67f09SDavid van Moolenbroek #include "rdata/generic/mg_8.c"
45*00b67f09SDavid van Moolenbroek #include "rdata/generic/mr_9.c"
46*00b67f09SDavid van Moolenbroek #include "rdata/generic/null_10.c"
47*00b67f09SDavid van Moolenbroek #include "rdata/in_1/wks_11.c"
48*00b67f09SDavid van Moolenbroek #include "rdata/generic/ptr_12.c"
49*00b67f09SDavid van Moolenbroek #include "rdata/generic/hinfo_13.c"
50*00b67f09SDavid van Moolenbroek #include "rdata/generic/minfo_14.c"
51*00b67f09SDavid van Moolenbroek #include "rdata/generic/mx_15.c"
52*00b67f09SDavid van Moolenbroek #include "rdata/generic/txt_16.c"
53*00b67f09SDavid van Moolenbroek #include "rdata/generic/rp_17.c"
54*00b67f09SDavid van Moolenbroek #include "rdata/generic/afsdb_18.c"
55*00b67f09SDavid van Moolenbroek #include "rdata/generic/x25_19.c"
56*00b67f09SDavid van Moolenbroek #include "rdata/generic/isdn_20.c"
57*00b67f09SDavid van Moolenbroek #include "rdata/generic/rt_21.c"
58*00b67f09SDavid van Moolenbroek #include "rdata/in_1/nsap_22.c"
59*00b67f09SDavid van Moolenbroek #include "rdata/in_1/nsap-ptr_23.c"
60*00b67f09SDavid van Moolenbroek #include "rdata/generic/sig_24.c"
61*00b67f09SDavid van Moolenbroek #include "rdata/generic/key_25.c"
62*00b67f09SDavid van Moolenbroek #include "rdata/in_1/px_26.c"
63*00b67f09SDavid van Moolenbroek #include "rdata/generic/gpos_27.c"
64*00b67f09SDavid van Moolenbroek #include "rdata/in_1/aaaa_28.c"
65*00b67f09SDavid van Moolenbroek #include "rdata/generic/loc_29.c"
66*00b67f09SDavid van Moolenbroek #include "rdata/generic/nxt_30.c"
67*00b67f09SDavid van Moolenbroek #include "rdata/in_1/srv_33.c"
68*00b67f09SDavid van Moolenbroek #include "rdata/generic/naptr_35.c"
69*00b67f09SDavid van Moolenbroek #include "rdata/in_1/kx_36.c"
70*00b67f09SDavid van Moolenbroek #include "rdata/generic/cert_37.c"
71*00b67f09SDavid van Moolenbroek #include "rdata/in_1/a6_38.c"
72*00b67f09SDavid van Moolenbroek #include "rdata/generic/dname_39.c"
73*00b67f09SDavid van Moolenbroek #include "rdata/generic/opt_41.c"
74*00b67f09SDavid van Moolenbroek #include "rdata/in_1/apl_42.c"
75*00b67f09SDavid van Moolenbroek #include "rdata/generic/ds_43.c"
76*00b67f09SDavid van Moolenbroek #include "rdata/generic/sshfp_44.c"
77*00b67f09SDavid van Moolenbroek #include "rdata/generic/ipseckey_45.c"
78*00b67f09SDavid van Moolenbroek #include "rdata/generic/rrsig_46.c"
79*00b67f09SDavid van Moolenbroek #include "rdata/generic/nsec_47.c"
80*00b67f09SDavid van Moolenbroek #include "rdata/generic/dnskey_48.c"
81*00b67f09SDavid van Moolenbroek #include "rdata/in_1/dhcid_49.c"
82*00b67f09SDavid van Moolenbroek #include "rdata/generic/nsec3_50.c"
83*00b67f09SDavid van Moolenbroek #include "rdata/generic/nsec3param_51.c"
84*00b67f09SDavid van Moolenbroek #include "rdata/generic/tlsa_52.c"
85*00b67f09SDavid van Moolenbroek #include "rdata/generic/hip_55.c"
86*00b67f09SDavid van Moolenbroek #include "rdata/generic/cds_59.c"
87*00b67f09SDavid van Moolenbroek #include "rdata/generic/cdnskey_60.c"
88*00b67f09SDavid van Moolenbroek #include "rdata/generic/openpgpkey_61.c"
89*00b67f09SDavid van Moolenbroek #include "rdata/generic/spf_99.c"
90*00b67f09SDavid van Moolenbroek #include "rdata/generic/unspec_103.c"
91*00b67f09SDavid van Moolenbroek #include "rdata/generic/nid_104.c"
92*00b67f09SDavid van Moolenbroek #include "rdata/generic/l32_105.c"
93*00b67f09SDavid van Moolenbroek #include "rdata/generic/l64_106.c"
94*00b67f09SDavid van Moolenbroek #include "rdata/generic/lp_107.c"
95*00b67f09SDavid van Moolenbroek #include "rdata/generic/eui48_108.c"
96*00b67f09SDavid van Moolenbroek #include "rdata/generic/eui64_109.c"
97*00b67f09SDavid van Moolenbroek #include "rdata/generic/tkey_249.c"
98*00b67f09SDavid van Moolenbroek #include "rdata/any_255/tsig_250.c"
99*00b67f09SDavid van Moolenbroek #include "rdata/generic/uri_256.c"
100*00b67f09SDavid van Moolenbroek #include "rdata/generic/caa_257.c"
101*00b67f09SDavid van Moolenbroek #include "rdata/generic/dlv_32769.c"
102*00b67f09SDavid van Moolenbroek #include "rdata/generic/keydata_65533.c"
103*00b67f09SDavid van Moolenbroek 
104*00b67f09SDavid van Moolenbroek 
105*00b67f09SDavid van Moolenbroek 
106*00b67f09SDavid van Moolenbroek #define FROMTEXTSWITCH \
107*00b67f09SDavid van Moolenbroek 	switch (type) { \
108*00b67f09SDavid van Moolenbroek 	case 1: switch (rdclass) { \
109*00b67f09SDavid van Moolenbroek 		case 1: result = fromtext_in_a(rdclass, type, lexer, origin, options, target, callbacks); break; \
110*00b67f09SDavid van Moolenbroek 		case 3: result = fromtext_ch_a(rdclass, type, lexer, origin, options, target, callbacks); break; \
111*00b67f09SDavid van Moolenbroek 		case 4: result = fromtext_hs_a(rdclass, type, lexer, origin, options, target, callbacks); break; \
112*00b67f09SDavid van Moolenbroek 		default: result = DNS_R_UNKNOWN; break; \
113*00b67f09SDavid van Moolenbroek 		} \
114*00b67f09SDavid van Moolenbroek 		break; \
115*00b67f09SDavid van Moolenbroek 	case 2: result = fromtext_ns(rdclass, type, lexer, origin, options, target, callbacks); break; \
116*00b67f09SDavid van Moolenbroek 	case 3: result = fromtext_md(rdclass, type, lexer, origin, options, target, callbacks); break; \
117*00b67f09SDavid van Moolenbroek 	case 4: result = fromtext_mf(rdclass, type, lexer, origin, options, target, callbacks); break; \
118*00b67f09SDavid van Moolenbroek 	case 5: result = fromtext_cname(rdclass, type, lexer, origin, options, target, callbacks); break; \
119*00b67f09SDavid van Moolenbroek 	case 6: result = fromtext_soa(rdclass, type, lexer, origin, options, target, callbacks); break; \
120*00b67f09SDavid van Moolenbroek 	case 7: result = fromtext_mb(rdclass, type, lexer, origin, options, target, callbacks); break; \
121*00b67f09SDavid van Moolenbroek 	case 8: result = fromtext_mg(rdclass, type, lexer, origin, options, target, callbacks); break; \
122*00b67f09SDavid van Moolenbroek 	case 9: result = fromtext_mr(rdclass, type, lexer, origin, options, target, callbacks); break; \
123*00b67f09SDavid van Moolenbroek 	case 10: result = fromtext_null(rdclass, type, lexer, origin, options, target, callbacks); break; \
124*00b67f09SDavid van Moolenbroek 	case 11: switch (rdclass) { \
125*00b67f09SDavid van Moolenbroek 		case 1: result = fromtext_in_wks(rdclass, type, lexer, origin, options, target, callbacks); break; \
126*00b67f09SDavid van Moolenbroek 		default: result = DNS_R_UNKNOWN; break; \
127*00b67f09SDavid van Moolenbroek 		} \
128*00b67f09SDavid van Moolenbroek 		break; \
129*00b67f09SDavid van Moolenbroek 	case 12: result = fromtext_ptr(rdclass, type, lexer, origin, options, target, callbacks); break; \
130*00b67f09SDavid van Moolenbroek 	case 13: result = fromtext_hinfo(rdclass, type, lexer, origin, options, target, callbacks); break; \
131*00b67f09SDavid van Moolenbroek 	case 14: result = fromtext_minfo(rdclass, type, lexer, origin, options, target, callbacks); break; \
132*00b67f09SDavid van Moolenbroek 	case 15: result = fromtext_mx(rdclass, type, lexer, origin, options, target, callbacks); break; \
133*00b67f09SDavid van Moolenbroek 	case 16: result = fromtext_txt(rdclass, type, lexer, origin, options, target, callbacks); break; \
134*00b67f09SDavid van Moolenbroek 	case 17: result = fromtext_rp(rdclass, type, lexer, origin, options, target, callbacks); break; \
135*00b67f09SDavid van Moolenbroek 	case 18: result = fromtext_afsdb(rdclass, type, lexer, origin, options, target, callbacks); break; \
136*00b67f09SDavid van Moolenbroek 	case 19: result = fromtext_x25(rdclass, type, lexer, origin, options, target, callbacks); break; \
137*00b67f09SDavid van Moolenbroek 	case 20: result = fromtext_isdn(rdclass, type, lexer, origin, options, target, callbacks); break; \
138*00b67f09SDavid van Moolenbroek 	case 21: result = fromtext_rt(rdclass, type, lexer, origin, options, target, callbacks); break; \
139*00b67f09SDavid van Moolenbroek 	case 22: switch (rdclass) { \
140*00b67f09SDavid van Moolenbroek 		case 1: result = fromtext_in_nsap(rdclass, type, lexer, origin, options, target, callbacks); break; \
141*00b67f09SDavid van Moolenbroek 		default: result = DNS_R_UNKNOWN; break; \
142*00b67f09SDavid van Moolenbroek 		} \
143*00b67f09SDavid van Moolenbroek 		break; \
144*00b67f09SDavid van Moolenbroek 	case 23: switch (rdclass) { \
145*00b67f09SDavid van Moolenbroek 		case 1: result = fromtext_in_nsap_ptr(rdclass, type, lexer, origin, options, target, callbacks); break; \
146*00b67f09SDavid van Moolenbroek 		default: result = DNS_R_UNKNOWN; break; \
147*00b67f09SDavid van Moolenbroek 		} \
148*00b67f09SDavid van Moolenbroek 		break; \
149*00b67f09SDavid van Moolenbroek 	case 24: result = fromtext_sig(rdclass, type, lexer, origin, options, target, callbacks); break; \
150*00b67f09SDavid van Moolenbroek 	case 25: result = fromtext_key(rdclass, type, lexer, origin, options, target, callbacks); break; \
151*00b67f09SDavid van Moolenbroek 	case 26: switch (rdclass) { \
152*00b67f09SDavid van Moolenbroek 		case 1: result = fromtext_in_px(rdclass, type, lexer, origin, options, target, callbacks); break; \
153*00b67f09SDavid van Moolenbroek 		default: result = DNS_R_UNKNOWN; break; \
154*00b67f09SDavid van Moolenbroek 		} \
155*00b67f09SDavid van Moolenbroek 		break; \
156*00b67f09SDavid van Moolenbroek 	case 27: result = fromtext_gpos(rdclass, type, lexer, origin, options, target, callbacks); break; \
157*00b67f09SDavid van Moolenbroek 	case 28: switch (rdclass) { \
158*00b67f09SDavid van Moolenbroek 		case 1: result = fromtext_in_aaaa(rdclass, type, lexer, origin, options, target, callbacks); break; \
159*00b67f09SDavid van Moolenbroek 		default: result = DNS_R_UNKNOWN; break; \
160*00b67f09SDavid van Moolenbroek 		} \
161*00b67f09SDavid van Moolenbroek 		break; \
162*00b67f09SDavid van Moolenbroek 	case 29: result = fromtext_loc(rdclass, type, lexer, origin, options, target, callbacks); break; \
163*00b67f09SDavid van Moolenbroek 	case 30: result = fromtext_nxt(rdclass, type, lexer, origin, options, target, callbacks); break; \
164*00b67f09SDavid van Moolenbroek 	case 33: switch (rdclass) { \
165*00b67f09SDavid van Moolenbroek 		case 1: result = fromtext_in_srv(rdclass, type, lexer, origin, options, target, callbacks); break; \
166*00b67f09SDavid van Moolenbroek 		default: result = DNS_R_UNKNOWN; break; \
167*00b67f09SDavid van Moolenbroek 		} \
168*00b67f09SDavid van Moolenbroek 		break; \
169*00b67f09SDavid van Moolenbroek 	case 35: result = fromtext_naptr(rdclass, type, lexer, origin, options, target, callbacks); break; \
170*00b67f09SDavid van Moolenbroek 	case 36: switch (rdclass) { \
171*00b67f09SDavid van Moolenbroek 		case 1: result = fromtext_in_kx(rdclass, type, lexer, origin, options, target, callbacks); break; \
172*00b67f09SDavid van Moolenbroek 		default: result = DNS_R_UNKNOWN; break; \
173*00b67f09SDavid van Moolenbroek 		} \
174*00b67f09SDavid van Moolenbroek 		break; \
175*00b67f09SDavid van Moolenbroek 	case 37: result = fromtext_cert(rdclass, type, lexer, origin, options, target, callbacks); break; \
176*00b67f09SDavid van Moolenbroek 	case 38: switch (rdclass) { \
177*00b67f09SDavid van Moolenbroek 		case 1: result = fromtext_in_a6(rdclass, type, lexer, origin, options, target, callbacks); break; \
178*00b67f09SDavid van Moolenbroek 		default: result = DNS_R_UNKNOWN; break; \
179*00b67f09SDavid van Moolenbroek 		} \
180*00b67f09SDavid van Moolenbroek 		break; \
181*00b67f09SDavid van Moolenbroek 	case 39: result = fromtext_dname(rdclass, type, lexer, origin, options, target, callbacks); break; \
182*00b67f09SDavid van Moolenbroek 	case 41: result = fromtext_opt(rdclass, type, lexer, origin, options, target, callbacks); break; \
183*00b67f09SDavid van Moolenbroek 	case 42: switch (rdclass) { \
184*00b67f09SDavid van Moolenbroek 		case 1: result = fromtext_in_apl(rdclass, type, lexer, origin, options, target, callbacks); break; \
185*00b67f09SDavid van Moolenbroek 		default: result = DNS_R_UNKNOWN; break; \
186*00b67f09SDavid van Moolenbroek 		} \
187*00b67f09SDavid van Moolenbroek 		break; \
188*00b67f09SDavid van Moolenbroek 	case 43: result = fromtext_ds(rdclass, type, lexer, origin, options, target, callbacks); break; \
189*00b67f09SDavid van Moolenbroek 	case 44: result = fromtext_sshfp(rdclass, type, lexer, origin, options, target, callbacks); break; \
190*00b67f09SDavid van Moolenbroek 	case 45: result = fromtext_ipseckey(rdclass, type, lexer, origin, options, target, callbacks); break; \
191*00b67f09SDavid van Moolenbroek 	case 46: result = fromtext_rrsig(rdclass, type, lexer, origin, options, target, callbacks); break; \
192*00b67f09SDavid van Moolenbroek 	case 47: result = fromtext_nsec(rdclass, type, lexer, origin, options, target, callbacks); break; \
193*00b67f09SDavid van Moolenbroek 	case 48: result = fromtext_dnskey(rdclass, type, lexer, origin, options, target, callbacks); break; \
194*00b67f09SDavid van Moolenbroek 	case 49: switch (rdclass) { \
195*00b67f09SDavid van Moolenbroek 		case 1: result = fromtext_in_dhcid(rdclass, type, lexer, origin, options, target, callbacks); break; \
196*00b67f09SDavid van Moolenbroek 		default: result = DNS_R_UNKNOWN; break; \
197*00b67f09SDavid van Moolenbroek 		} \
198*00b67f09SDavid van Moolenbroek 		break; \
199*00b67f09SDavid van Moolenbroek 	case 50: result = fromtext_nsec3(rdclass, type, lexer, origin, options, target, callbacks); break; \
200*00b67f09SDavid van Moolenbroek 	case 51: result = fromtext_nsec3param(rdclass, type, lexer, origin, options, target, callbacks); break; \
201*00b67f09SDavid van Moolenbroek 	case 52: result = fromtext_tlsa(rdclass, type, lexer, origin, options, target, callbacks); break; \
202*00b67f09SDavid van Moolenbroek 	case 55: result = fromtext_hip(rdclass, type, lexer, origin, options, target, callbacks); break; \
203*00b67f09SDavid van Moolenbroek 	case 59: result = fromtext_cds(rdclass, type, lexer, origin, options, target, callbacks); break; \
204*00b67f09SDavid van Moolenbroek 	case 60: result = fromtext_cdnskey(rdclass, type, lexer, origin, options, target, callbacks); break; \
205*00b67f09SDavid van Moolenbroek 	case 61: result = fromtext_openpgpkey(rdclass, type, lexer, origin, options, target, callbacks); break; \
206*00b67f09SDavid van Moolenbroek 	case 99: result = fromtext_spf(rdclass, type, lexer, origin, options, target, callbacks); break; \
207*00b67f09SDavid van Moolenbroek 	case 103: result = fromtext_unspec(rdclass, type, lexer, origin, options, target, callbacks); break; \
208*00b67f09SDavid van Moolenbroek 	case 104: result = fromtext_nid(rdclass, type, lexer, origin, options, target, callbacks); break; \
209*00b67f09SDavid van Moolenbroek 	case 105: result = fromtext_l32(rdclass, type, lexer, origin, options, target, callbacks); break; \
210*00b67f09SDavid van Moolenbroek 	case 106: result = fromtext_l64(rdclass, type, lexer, origin, options, target, callbacks); break; \
211*00b67f09SDavid van Moolenbroek 	case 107: result = fromtext_lp(rdclass, type, lexer, origin, options, target, callbacks); break; \
212*00b67f09SDavid van Moolenbroek 	case 108: result = fromtext_eui48(rdclass, type, lexer, origin, options, target, callbacks); break; \
213*00b67f09SDavid van Moolenbroek 	case 109: result = fromtext_eui64(rdclass, type, lexer, origin, options, target, callbacks); break; \
214*00b67f09SDavid van Moolenbroek 	case 249: result = fromtext_tkey(rdclass, type, lexer, origin, options, target, callbacks); break; \
215*00b67f09SDavid van Moolenbroek 	case 250: switch (rdclass) { \
216*00b67f09SDavid van Moolenbroek 		case 255: result = fromtext_any_tsig(rdclass, type, lexer, origin, options, target, callbacks); break; \
217*00b67f09SDavid van Moolenbroek 		default: result = DNS_R_UNKNOWN; break; \
218*00b67f09SDavid van Moolenbroek 		} \
219*00b67f09SDavid van Moolenbroek 		break; \
220*00b67f09SDavid van Moolenbroek 	case 256: result = fromtext_uri(rdclass, type, lexer, origin, options, target, callbacks); break; \
221*00b67f09SDavid van Moolenbroek 	case 257: result = fromtext_caa(rdclass, type, lexer, origin, options, target, callbacks); break; \
222*00b67f09SDavid van Moolenbroek 	case 32769: result = fromtext_dlv(rdclass, type, lexer, origin, options, target, callbacks); break; \
223*00b67f09SDavid van Moolenbroek 	case 65533: result = fromtext_keydata(rdclass, type, lexer, origin, options, target, callbacks); break; \
224*00b67f09SDavid van Moolenbroek 	default: result = DNS_R_UNKNOWN; break; \
225*00b67f09SDavid van Moolenbroek 	}
226*00b67f09SDavid van Moolenbroek 
227*00b67f09SDavid van Moolenbroek #define TOTEXTSWITCH \
228*00b67f09SDavid van Moolenbroek 	switch (rdata->type) { \
229*00b67f09SDavid van Moolenbroek 	case 1: switch (rdata->rdclass) { \
230*00b67f09SDavid van Moolenbroek 		case 1: result = totext_in_a(rdata, tctx, target); break; \
231*00b67f09SDavid van Moolenbroek 		case 3: result = totext_ch_a(rdata, tctx, target); break; \
232*00b67f09SDavid van Moolenbroek 		case 4: result = totext_hs_a(rdata, tctx, target); break; \
233*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
234*00b67f09SDavid van Moolenbroek 		} \
235*00b67f09SDavid van Moolenbroek 		break; \
236*00b67f09SDavid van Moolenbroek 	case 2: result = totext_ns(rdata, tctx, target); break; \
237*00b67f09SDavid van Moolenbroek 	case 3: result = totext_md(rdata, tctx, target); break; \
238*00b67f09SDavid van Moolenbroek 	case 4: result = totext_mf(rdata, tctx, target); break; \
239*00b67f09SDavid van Moolenbroek 	case 5: result = totext_cname(rdata, tctx, target); break; \
240*00b67f09SDavid van Moolenbroek 	case 6: result = totext_soa(rdata, tctx, target); break; \
241*00b67f09SDavid van Moolenbroek 	case 7: result = totext_mb(rdata, tctx, target); break; \
242*00b67f09SDavid van Moolenbroek 	case 8: result = totext_mg(rdata, tctx, target); break; \
243*00b67f09SDavid van Moolenbroek 	case 9: result = totext_mr(rdata, tctx, target); break; \
244*00b67f09SDavid van Moolenbroek 	case 10: result = totext_null(rdata, tctx, target); break; \
245*00b67f09SDavid van Moolenbroek 	case 11: switch (rdata->rdclass) { \
246*00b67f09SDavid van Moolenbroek 		case 1: result = totext_in_wks(rdata, tctx, target); break; \
247*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
248*00b67f09SDavid van Moolenbroek 		} \
249*00b67f09SDavid van Moolenbroek 		break; \
250*00b67f09SDavid van Moolenbroek 	case 12: result = totext_ptr(rdata, tctx, target); break; \
251*00b67f09SDavid van Moolenbroek 	case 13: result = totext_hinfo(rdata, tctx, target); break; \
252*00b67f09SDavid van Moolenbroek 	case 14: result = totext_minfo(rdata, tctx, target); break; \
253*00b67f09SDavid van Moolenbroek 	case 15: result = totext_mx(rdata, tctx, target); break; \
254*00b67f09SDavid van Moolenbroek 	case 16: result = totext_txt(rdata, tctx, target); break; \
255*00b67f09SDavid van Moolenbroek 	case 17: result = totext_rp(rdata, tctx, target); break; \
256*00b67f09SDavid van Moolenbroek 	case 18: result = totext_afsdb(rdata, tctx, target); break; \
257*00b67f09SDavid van Moolenbroek 	case 19: result = totext_x25(rdata, tctx, target); break; \
258*00b67f09SDavid van Moolenbroek 	case 20: result = totext_isdn(rdata, tctx, target); break; \
259*00b67f09SDavid van Moolenbroek 	case 21: result = totext_rt(rdata, tctx, target); break; \
260*00b67f09SDavid van Moolenbroek 	case 22: switch (rdata->rdclass) { \
261*00b67f09SDavid van Moolenbroek 		case 1: result = totext_in_nsap(rdata, tctx, target); break; \
262*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
263*00b67f09SDavid van Moolenbroek 		} \
264*00b67f09SDavid van Moolenbroek 		break; \
265*00b67f09SDavid van Moolenbroek 	case 23: switch (rdata->rdclass) { \
266*00b67f09SDavid van Moolenbroek 		case 1: result = totext_in_nsap_ptr(rdata, tctx, target); break; \
267*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
268*00b67f09SDavid van Moolenbroek 		} \
269*00b67f09SDavid van Moolenbroek 		break; \
270*00b67f09SDavid van Moolenbroek 	case 24: result = totext_sig(rdata, tctx, target); break; \
271*00b67f09SDavid van Moolenbroek 	case 25: result = totext_key(rdata, tctx, target); break; \
272*00b67f09SDavid van Moolenbroek 	case 26: switch (rdata->rdclass) { \
273*00b67f09SDavid van Moolenbroek 		case 1: result = totext_in_px(rdata, tctx, target); break; \
274*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
275*00b67f09SDavid van Moolenbroek 		} \
276*00b67f09SDavid van Moolenbroek 		break; \
277*00b67f09SDavid van Moolenbroek 	case 27: result = totext_gpos(rdata, tctx, target); break; \
278*00b67f09SDavid van Moolenbroek 	case 28: switch (rdata->rdclass) { \
279*00b67f09SDavid van Moolenbroek 		case 1: result = totext_in_aaaa(rdata, tctx, target); break; \
280*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
281*00b67f09SDavid van Moolenbroek 		} \
282*00b67f09SDavid van Moolenbroek 		break; \
283*00b67f09SDavid van Moolenbroek 	case 29: result = totext_loc(rdata, tctx, target); break; \
284*00b67f09SDavid van Moolenbroek 	case 30: result = totext_nxt(rdata, tctx, target); break; \
285*00b67f09SDavid van Moolenbroek 	case 33: switch (rdata->rdclass) { \
286*00b67f09SDavid van Moolenbroek 		case 1: result = totext_in_srv(rdata, tctx, target); break; \
287*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
288*00b67f09SDavid van Moolenbroek 		} \
289*00b67f09SDavid van Moolenbroek 		break; \
290*00b67f09SDavid van Moolenbroek 	case 35: result = totext_naptr(rdata, tctx, target); break; \
291*00b67f09SDavid van Moolenbroek 	case 36: switch (rdata->rdclass) { \
292*00b67f09SDavid van Moolenbroek 		case 1: result = totext_in_kx(rdata, tctx, target); break; \
293*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
294*00b67f09SDavid van Moolenbroek 		} \
295*00b67f09SDavid van Moolenbroek 		break; \
296*00b67f09SDavid van Moolenbroek 	case 37: result = totext_cert(rdata, tctx, target); break; \
297*00b67f09SDavid van Moolenbroek 	case 38: switch (rdata->rdclass) { \
298*00b67f09SDavid van Moolenbroek 		case 1: result = totext_in_a6(rdata, tctx, target); break; \
299*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
300*00b67f09SDavid van Moolenbroek 		} \
301*00b67f09SDavid van Moolenbroek 		break; \
302*00b67f09SDavid van Moolenbroek 	case 39: result = totext_dname(rdata, tctx, target); break; \
303*00b67f09SDavid van Moolenbroek 	case 41: result = totext_opt(rdata, tctx, target); break; \
304*00b67f09SDavid van Moolenbroek 	case 42: switch (rdata->rdclass) { \
305*00b67f09SDavid van Moolenbroek 		case 1: result = totext_in_apl(rdata, tctx, target); break; \
306*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
307*00b67f09SDavid van Moolenbroek 		} \
308*00b67f09SDavid van Moolenbroek 		break; \
309*00b67f09SDavid van Moolenbroek 	case 43: result = totext_ds(rdata, tctx, target); break; \
310*00b67f09SDavid van Moolenbroek 	case 44: result = totext_sshfp(rdata, tctx, target); break; \
311*00b67f09SDavid van Moolenbroek 	case 45: result = totext_ipseckey(rdata, tctx, target); break; \
312*00b67f09SDavid van Moolenbroek 	case 46: result = totext_rrsig(rdata, tctx, target); break; \
313*00b67f09SDavid van Moolenbroek 	case 47: result = totext_nsec(rdata, tctx, target); break; \
314*00b67f09SDavid van Moolenbroek 	case 48: result = totext_dnskey(rdata, tctx, target); break; \
315*00b67f09SDavid van Moolenbroek 	case 49: switch (rdata->rdclass) { \
316*00b67f09SDavid van Moolenbroek 		case 1: result = totext_in_dhcid(rdata, tctx, target); break; \
317*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
318*00b67f09SDavid van Moolenbroek 		} \
319*00b67f09SDavid van Moolenbroek 		break; \
320*00b67f09SDavid van Moolenbroek 	case 50: result = totext_nsec3(rdata, tctx, target); break; \
321*00b67f09SDavid van Moolenbroek 	case 51: result = totext_nsec3param(rdata, tctx, target); break; \
322*00b67f09SDavid van Moolenbroek 	case 52: result = totext_tlsa(rdata, tctx, target); break; \
323*00b67f09SDavid van Moolenbroek 	case 55: result = totext_hip(rdata, tctx, target); break; \
324*00b67f09SDavid van Moolenbroek 	case 59: result = totext_cds(rdata, tctx, target); break; \
325*00b67f09SDavid van Moolenbroek 	case 60: result = totext_cdnskey(rdata, tctx, target); break; \
326*00b67f09SDavid van Moolenbroek 	case 61: result = totext_openpgpkey(rdata, tctx, target); break; \
327*00b67f09SDavid van Moolenbroek 	case 99: result = totext_spf(rdata, tctx, target); break; \
328*00b67f09SDavid van Moolenbroek 	case 103: result = totext_unspec(rdata, tctx, target); break; \
329*00b67f09SDavid van Moolenbroek 	case 104: result = totext_nid(rdata, tctx, target); break; \
330*00b67f09SDavid van Moolenbroek 	case 105: result = totext_l32(rdata, tctx, target); break; \
331*00b67f09SDavid van Moolenbroek 	case 106: result = totext_l64(rdata, tctx, target); break; \
332*00b67f09SDavid van Moolenbroek 	case 107: result = totext_lp(rdata, tctx, target); break; \
333*00b67f09SDavid van Moolenbroek 	case 108: result = totext_eui48(rdata, tctx, target); break; \
334*00b67f09SDavid van Moolenbroek 	case 109: result = totext_eui64(rdata, tctx, target); break; \
335*00b67f09SDavid van Moolenbroek 	case 249: result = totext_tkey(rdata, tctx, target); break; \
336*00b67f09SDavid van Moolenbroek 	case 250: switch (rdata->rdclass) { \
337*00b67f09SDavid van Moolenbroek 		case 255: result = totext_any_tsig(rdata, tctx, target); break; \
338*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
339*00b67f09SDavid van Moolenbroek 		} \
340*00b67f09SDavid van Moolenbroek 		break; \
341*00b67f09SDavid van Moolenbroek 	case 256: result = totext_uri(rdata, tctx, target); break; \
342*00b67f09SDavid van Moolenbroek 	case 257: result = totext_caa(rdata, tctx, target); break; \
343*00b67f09SDavid van Moolenbroek 	case 32769: result = totext_dlv(rdata, tctx, target); break; \
344*00b67f09SDavid van Moolenbroek 	case 65533: result = totext_keydata(rdata, tctx, target); break; \
345*00b67f09SDavid van Moolenbroek 	default: use_default = ISC_TRUE; break; \
346*00b67f09SDavid van Moolenbroek 	}
347*00b67f09SDavid van Moolenbroek 
348*00b67f09SDavid van Moolenbroek #define FROMWIRESWITCH \
349*00b67f09SDavid van Moolenbroek 	switch (type) { \
350*00b67f09SDavid van Moolenbroek 	case 1: switch (rdclass) { \
351*00b67f09SDavid van Moolenbroek 		case 1: result = fromwire_in_a(rdclass, type, source, dctx, options, target); break; \
352*00b67f09SDavid van Moolenbroek 		case 3: result = fromwire_ch_a(rdclass, type, source, dctx, options, target); break; \
353*00b67f09SDavid van Moolenbroek 		case 4: result = fromwire_hs_a(rdclass, type, source, dctx, options, target); break; \
354*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
355*00b67f09SDavid van Moolenbroek 		} \
356*00b67f09SDavid van Moolenbroek 		break; \
357*00b67f09SDavid van Moolenbroek 	case 2: result = fromwire_ns(rdclass, type, source, dctx, options, target); break; \
358*00b67f09SDavid van Moolenbroek 	case 3: result = fromwire_md(rdclass, type, source, dctx, options, target); break; \
359*00b67f09SDavid van Moolenbroek 	case 4: result = fromwire_mf(rdclass, type, source, dctx, options, target); break; \
360*00b67f09SDavid van Moolenbroek 	case 5: result = fromwire_cname(rdclass, type, source, dctx, options, target); break; \
361*00b67f09SDavid van Moolenbroek 	case 6: result = fromwire_soa(rdclass, type, source, dctx, options, target); break; \
362*00b67f09SDavid van Moolenbroek 	case 7: result = fromwire_mb(rdclass, type, source, dctx, options, target); break; \
363*00b67f09SDavid van Moolenbroek 	case 8: result = fromwire_mg(rdclass, type, source, dctx, options, target); break; \
364*00b67f09SDavid van Moolenbroek 	case 9: result = fromwire_mr(rdclass, type, source, dctx, options, target); break; \
365*00b67f09SDavid van Moolenbroek 	case 10: result = fromwire_null(rdclass, type, source, dctx, options, target); break; \
366*00b67f09SDavid van Moolenbroek 	case 11: switch (rdclass) { \
367*00b67f09SDavid van Moolenbroek 		case 1: result = fromwire_in_wks(rdclass, type, source, dctx, options, target); break; \
368*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
369*00b67f09SDavid van Moolenbroek 		} \
370*00b67f09SDavid van Moolenbroek 		break; \
371*00b67f09SDavid van Moolenbroek 	case 12: result = fromwire_ptr(rdclass, type, source, dctx, options, target); break; \
372*00b67f09SDavid van Moolenbroek 	case 13: result = fromwire_hinfo(rdclass, type, source, dctx, options, target); break; \
373*00b67f09SDavid van Moolenbroek 	case 14: result = fromwire_minfo(rdclass, type, source, dctx, options, target); break; \
374*00b67f09SDavid van Moolenbroek 	case 15: result = fromwire_mx(rdclass, type, source, dctx, options, target); break; \
375*00b67f09SDavid van Moolenbroek 	case 16: result = fromwire_txt(rdclass, type, source, dctx, options, target); break; \
376*00b67f09SDavid van Moolenbroek 	case 17: result = fromwire_rp(rdclass, type, source, dctx, options, target); break; \
377*00b67f09SDavid van Moolenbroek 	case 18: result = fromwire_afsdb(rdclass, type, source, dctx, options, target); break; \
378*00b67f09SDavid van Moolenbroek 	case 19: result = fromwire_x25(rdclass, type, source, dctx, options, target); break; \
379*00b67f09SDavid van Moolenbroek 	case 20: result = fromwire_isdn(rdclass, type, source, dctx, options, target); break; \
380*00b67f09SDavid van Moolenbroek 	case 21: result = fromwire_rt(rdclass, type, source, dctx, options, target); break; \
381*00b67f09SDavid van Moolenbroek 	case 22: switch (rdclass) { \
382*00b67f09SDavid van Moolenbroek 		case 1: result = fromwire_in_nsap(rdclass, type, source, dctx, options, target); break; \
383*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
384*00b67f09SDavid van Moolenbroek 		} \
385*00b67f09SDavid van Moolenbroek 		break; \
386*00b67f09SDavid van Moolenbroek 	case 23: switch (rdclass) { \
387*00b67f09SDavid van Moolenbroek 		case 1: result = fromwire_in_nsap_ptr(rdclass, type, source, dctx, options, target); break; \
388*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
389*00b67f09SDavid van Moolenbroek 		} \
390*00b67f09SDavid van Moolenbroek 		break; \
391*00b67f09SDavid van Moolenbroek 	case 24: result = fromwire_sig(rdclass, type, source, dctx, options, target); break; \
392*00b67f09SDavid van Moolenbroek 	case 25: result = fromwire_key(rdclass, type, source, dctx, options, target); break; \
393*00b67f09SDavid van Moolenbroek 	case 26: switch (rdclass) { \
394*00b67f09SDavid van Moolenbroek 		case 1: result = fromwire_in_px(rdclass, type, source, dctx, options, target); break; \
395*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
396*00b67f09SDavid van Moolenbroek 		} \
397*00b67f09SDavid van Moolenbroek 		break; \
398*00b67f09SDavid van Moolenbroek 	case 27: result = fromwire_gpos(rdclass, type, source, dctx, options, target); break; \
399*00b67f09SDavid van Moolenbroek 	case 28: switch (rdclass) { \
400*00b67f09SDavid van Moolenbroek 		case 1: result = fromwire_in_aaaa(rdclass, type, source, dctx, options, target); break; \
401*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
402*00b67f09SDavid van Moolenbroek 		} \
403*00b67f09SDavid van Moolenbroek 		break; \
404*00b67f09SDavid van Moolenbroek 	case 29: result = fromwire_loc(rdclass, type, source, dctx, options, target); break; \
405*00b67f09SDavid van Moolenbroek 	case 30: result = fromwire_nxt(rdclass, type, source, dctx, options, target); break; \
406*00b67f09SDavid van Moolenbroek 	case 33: switch (rdclass) { \
407*00b67f09SDavid van Moolenbroek 		case 1: result = fromwire_in_srv(rdclass, type, source, dctx, options, target); break; \
408*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
409*00b67f09SDavid van Moolenbroek 		} \
410*00b67f09SDavid van Moolenbroek 		break; \
411*00b67f09SDavid van Moolenbroek 	case 35: result = fromwire_naptr(rdclass, type, source, dctx, options, target); break; \
412*00b67f09SDavid van Moolenbroek 	case 36: switch (rdclass) { \
413*00b67f09SDavid van Moolenbroek 		case 1: result = fromwire_in_kx(rdclass, type, source, dctx, options, target); break; \
414*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
415*00b67f09SDavid van Moolenbroek 		} \
416*00b67f09SDavid van Moolenbroek 		break; \
417*00b67f09SDavid van Moolenbroek 	case 37: result = fromwire_cert(rdclass, type, source, dctx, options, target); break; \
418*00b67f09SDavid van Moolenbroek 	case 38: switch (rdclass) { \
419*00b67f09SDavid van Moolenbroek 		case 1: result = fromwire_in_a6(rdclass, type, source, dctx, options, target); break; \
420*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
421*00b67f09SDavid van Moolenbroek 		} \
422*00b67f09SDavid van Moolenbroek 		break; \
423*00b67f09SDavid van Moolenbroek 	case 39: result = fromwire_dname(rdclass, type, source, dctx, options, target); break; \
424*00b67f09SDavid van Moolenbroek 	case 41: result = fromwire_opt(rdclass, type, source, dctx, options, target); break; \
425*00b67f09SDavid van Moolenbroek 	case 42: switch (rdclass) { \
426*00b67f09SDavid van Moolenbroek 		case 1: result = fromwire_in_apl(rdclass, type, source, dctx, options, target); break; \
427*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
428*00b67f09SDavid van Moolenbroek 		} \
429*00b67f09SDavid van Moolenbroek 		break; \
430*00b67f09SDavid van Moolenbroek 	case 43: result = fromwire_ds(rdclass, type, source, dctx, options, target); break; \
431*00b67f09SDavid van Moolenbroek 	case 44: result = fromwire_sshfp(rdclass, type, source, dctx, options, target); break; \
432*00b67f09SDavid van Moolenbroek 	case 45: result = fromwire_ipseckey(rdclass, type, source, dctx, options, target); break; \
433*00b67f09SDavid van Moolenbroek 	case 46: result = fromwire_rrsig(rdclass, type, source, dctx, options, target); break; \
434*00b67f09SDavid van Moolenbroek 	case 47: result = fromwire_nsec(rdclass, type, source, dctx, options, target); break; \
435*00b67f09SDavid van Moolenbroek 	case 48: result = fromwire_dnskey(rdclass, type, source, dctx, options, target); break; \
436*00b67f09SDavid van Moolenbroek 	case 49: switch (rdclass) { \
437*00b67f09SDavid van Moolenbroek 		case 1: result = fromwire_in_dhcid(rdclass, type, source, dctx, options, target); break; \
438*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
439*00b67f09SDavid van Moolenbroek 		} \
440*00b67f09SDavid van Moolenbroek 		break; \
441*00b67f09SDavid van Moolenbroek 	case 50: result = fromwire_nsec3(rdclass, type, source, dctx, options, target); break; \
442*00b67f09SDavid van Moolenbroek 	case 51: result = fromwire_nsec3param(rdclass, type, source, dctx, options, target); break; \
443*00b67f09SDavid van Moolenbroek 	case 52: result = fromwire_tlsa(rdclass, type, source, dctx, options, target); break; \
444*00b67f09SDavid van Moolenbroek 	case 55: result = fromwire_hip(rdclass, type, source, dctx, options, target); break; \
445*00b67f09SDavid van Moolenbroek 	case 59: result = fromwire_cds(rdclass, type, source, dctx, options, target); break; \
446*00b67f09SDavid van Moolenbroek 	case 60: result = fromwire_cdnskey(rdclass, type, source, dctx, options, target); break; \
447*00b67f09SDavid van Moolenbroek 	case 61: result = fromwire_openpgpkey(rdclass, type, source, dctx, options, target); break; \
448*00b67f09SDavid van Moolenbroek 	case 99: result = fromwire_spf(rdclass, type, source, dctx, options, target); break; \
449*00b67f09SDavid van Moolenbroek 	case 103: result = fromwire_unspec(rdclass, type, source, dctx, options, target); break; \
450*00b67f09SDavid van Moolenbroek 	case 104: result = fromwire_nid(rdclass, type, source, dctx, options, target); break; \
451*00b67f09SDavid van Moolenbroek 	case 105: result = fromwire_l32(rdclass, type, source, dctx, options, target); break; \
452*00b67f09SDavid van Moolenbroek 	case 106: result = fromwire_l64(rdclass, type, source, dctx, options, target); break; \
453*00b67f09SDavid van Moolenbroek 	case 107: result = fromwire_lp(rdclass, type, source, dctx, options, target); break; \
454*00b67f09SDavid van Moolenbroek 	case 108: result = fromwire_eui48(rdclass, type, source, dctx, options, target); break; \
455*00b67f09SDavid van Moolenbroek 	case 109: result = fromwire_eui64(rdclass, type, source, dctx, options, target); break; \
456*00b67f09SDavid van Moolenbroek 	case 249: result = fromwire_tkey(rdclass, type, source, dctx, options, target); break; \
457*00b67f09SDavid van Moolenbroek 	case 250: switch (rdclass) { \
458*00b67f09SDavid van Moolenbroek 		case 255: result = fromwire_any_tsig(rdclass, type, source, dctx, options, target); break; \
459*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
460*00b67f09SDavid van Moolenbroek 		} \
461*00b67f09SDavid van Moolenbroek 		break; \
462*00b67f09SDavid van Moolenbroek 	case 256: result = fromwire_uri(rdclass, type, source, dctx, options, target); break; \
463*00b67f09SDavid van Moolenbroek 	case 257: result = fromwire_caa(rdclass, type, source, dctx, options, target); break; \
464*00b67f09SDavid van Moolenbroek 	case 32769: result = fromwire_dlv(rdclass, type, source, dctx, options, target); break; \
465*00b67f09SDavid van Moolenbroek 	case 65533: result = fromwire_keydata(rdclass, type, source, dctx, options, target); break; \
466*00b67f09SDavid van Moolenbroek 	default: use_default = ISC_TRUE; break; \
467*00b67f09SDavid van Moolenbroek 	}
468*00b67f09SDavid van Moolenbroek 
469*00b67f09SDavid van Moolenbroek #define TOWIRESWITCH \
470*00b67f09SDavid van Moolenbroek 	switch (rdata->type) { \
471*00b67f09SDavid van Moolenbroek 	case 1: switch (rdata->rdclass) { \
472*00b67f09SDavid van Moolenbroek 		case 1: result = towire_in_a(rdata, cctx, target); break; \
473*00b67f09SDavid van Moolenbroek 		case 3: result = towire_ch_a(rdata, cctx, target); break; \
474*00b67f09SDavid van Moolenbroek 		case 4: result = towire_hs_a(rdata, cctx, target); break; \
475*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
476*00b67f09SDavid van Moolenbroek 		} \
477*00b67f09SDavid van Moolenbroek 		break; \
478*00b67f09SDavid van Moolenbroek 	case 2: result = towire_ns(rdata, cctx, target); break; \
479*00b67f09SDavid van Moolenbroek 	case 3: result = towire_md(rdata, cctx, target); break; \
480*00b67f09SDavid van Moolenbroek 	case 4: result = towire_mf(rdata, cctx, target); break; \
481*00b67f09SDavid van Moolenbroek 	case 5: result = towire_cname(rdata, cctx, target); break; \
482*00b67f09SDavid van Moolenbroek 	case 6: result = towire_soa(rdata, cctx, target); break; \
483*00b67f09SDavid van Moolenbroek 	case 7: result = towire_mb(rdata, cctx, target); break; \
484*00b67f09SDavid van Moolenbroek 	case 8: result = towire_mg(rdata, cctx, target); break; \
485*00b67f09SDavid van Moolenbroek 	case 9: result = towire_mr(rdata, cctx, target); break; \
486*00b67f09SDavid van Moolenbroek 	case 10: result = towire_null(rdata, cctx, target); break; \
487*00b67f09SDavid van Moolenbroek 	case 11: switch (rdata->rdclass) { \
488*00b67f09SDavid van Moolenbroek 		case 1: result = towire_in_wks(rdata, cctx, target); break; \
489*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
490*00b67f09SDavid van Moolenbroek 		} \
491*00b67f09SDavid van Moolenbroek 		break; \
492*00b67f09SDavid van Moolenbroek 	case 12: result = towire_ptr(rdata, cctx, target); break; \
493*00b67f09SDavid van Moolenbroek 	case 13: result = towire_hinfo(rdata, cctx, target); break; \
494*00b67f09SDavid van Moolenbroek 	case 14: result = towire_minfo(rdata, cctx, target); break; \
495*00b67f09SDavid van Moolenbroek 	case 15: result = towire_mx(rdata, cctx, target); break; \
496*00b67f09SDavid van Moolenbroek 	case 16: result = towire_txt(rdata, cctx, target); break; \
497*00b67f09SDavid van Moolenbroek 	case 17: result = towire_rp(rdata, cctx, target); break; \
498*00b67f09SDavid van Moolenbroek 	case 18: result = towire_afsdb(rdata, cctx, target); break; \
499*00b67f09SDavid van Moolenbroek 	case 19: result = towire_x25(rdata, cctx, target); break; \
500*00b67f09SDavid van Moolenbroek 	case 20: result = towire_isdn(rdata, cctx, target); break; \
501*00b67f09SDavid van Moolenbroek 	case 21: result = towire_rt(rdata, cctx, target); break; \
502*00b67f09SDavid van Moolenbroek 	case 22: switch (rdata->rdclass) { \
503*00b67f09SDavid van Moolenbroek 		case 1: result = towire_in_nsap(rdata, cctx, target); break; \
504*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
505*00b67f09SDavid van Moolenbroek 		} \
506*00b67f09SDavid van Moolenbroek 		break; \
507*00b67f09SDavid van Moolenbroek 	case 23: switch (rdata->rdclass) { \
508*00b67f09SDavid van Moolenbroek 		case 1: result = towire_in_nsap_ptr(rdata, cctx, target); break; \
509*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
510*00b67f09SDavid van Moolenbroek 		} \
511*00b67f09SDavid van Moolenbroek 		break; \
512*00b67f09SDavid van Moolenbroek 	case 24: result = towire_sig(rdata, cctx, target); break; \
513*00b67f09SDavid van Moolenbroek 	case 25: result = towire_key(rdata, cctx, target); break; \
514*00b67f09SDavid van Moolenbroek 	case 26: switch (rdata->rdclass) { \
515*00b67f09SDavid van Moolenbroek 		case 1: result = towire_in_px(rdata, cctx, target); break; \
516*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
517*00b67f09SDavid van Moolenbroek 		} \
518*00b67f09SDavid van Moolenbroek 		break; \
519*00b67f09SDavid van Moolenbroek 	case 27: result = towire_gpos(rdata, cctx, target); break; \
520*00b67f09SDavid van Moolenbroek 	case 28: switch (rdata->rdclass) { \
521*00b67f09SDavid van Moolenbroek 		case 1: result = towire_in_aaaa(rdata, cctx, target); break; \
522*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
523*00b67f09SDavid van Moolenbroek 		} \
524*00b67f09SDavid van Moolenbroek 		break; \
525*00b67f09SDavid van Moolenbroek 	case 29: result = towire_loc(rdata, cctx, target); break; \
526*00b67f09SDavid van Moolenbroek 	case 30: result = towire_nxt(rdata, cctx, target); break; \
527*00b67f09SDavid van Moolenbroek 	case 33: switch (rdata->rdclass) { \
528*00b67f09SDavid van Moolenbroek 		case 1: result = towire_in_srv(rdata, cctx, target); break; \
529*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
530*00b67f09SDavid van Moolenbroek 		} \
531*00b67f09SDavid van Moolenbroek 		break; \
532*00b67f09SDavid van Moolenbroek 	case 35: result = towire_naptr(rdata, cctx, target); break; \
533*00b67f09SDavid van Moolenbroek 	case 36: switch (rdata->rdclass) { \
534*00b67f09SDavid van Moolenbroek 		case 1: result = towire_in_kx(rdata, cctx, target); break; \
535*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
536*00b67f09SDavid van Moolenbroek 		} \
537*00b67f09SDavid van Moolenbroek 		break; \
538*00b67f09SDavid van Moolenbroek 	case 37: result = towire_cert(rdata, cctx, target); break; \
539*00b67f09SDavid van Moolenbroek 	case 38: switch (rdata->rdclass) { \
540*00b67f09SDavid van Moolenbroek 		case 1: result = towire_in_a6(rdata, cctx, target); break; \
541*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
542*00b67f09SDavid van Moolenbroek 		} \
543*00b67f09SDavid van Moolenbroek 		break; \
544*00b67f09SDavid van Moolenbroek 	case 39: result = towire_dname(rdata, cctx, target); break; \
545*00b67f09SDavid van Moolenbroek 	case 41: result = towire_opt(rdata, cctx, target); break; \
546*00b67f09SDavid van Moolenbroek 	case 42: switch (rdata->rdclass) { \
547*00b67f09SDavid van Moolenbroek 		case 1: result = towire_in_apl(rdata, cctx, target); break; \
548*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
549*00b67f09SDavid van Moolenbroek 		} \
550*00b67f09SDavid van Moolenbroek 		break; \
551*00b67f09SDavid van Moolenbroek 	case 43: result = towire_ds(rdata, cctx, target); break; \
552*00b67f09SDavid van Moolenbroek 	case 44: result = towire_sshfp(rdata, cctx, target); break; \
553*00b67f09SDavid van Moolenbroek 	case 45: result = towire_ipseckey(rdata, cctx, target); break; \
554*00b67f09SDavid van Moolenbroek 	case 46: result = towire_rrsig(rdata, cctx, target); break; \
555*00b67f09SDavid van Moolenbroek 	case 47: result = towire_nsec(rdata, cctx, target); break; \
556*00b67f09SDavid van Moolenbroek 	case 48: result = towire_dnskey(rdata, cctx, target); break; \
557*00b67f09SDavid van Moolenbroek 	case 49: switch (rdata->rdclass) { \
558*00b67f09SDavid van Moolenbroek 		case 1: result = towire_in_dhcid(rdata, cctx, target); break; \
559*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
560*00b67f09SDavid van Moolenbroek 		} \
561*00b67f09SDavid van Moolenbroek 		break; \
562*00b67f09SDavid van Moolenbroek 	case 50: result = towire_nsec3(rdata, cctx, target); break; \
563*00b67f09SDavid van Moolenbroek 	case 51: result = towire_nsec3param(rdata, cctx, target); break; \
564*00b67f09SDavid van Moolenbroek 	case 52: result = towire_tlsa(rdata, cctx, target); break; \
565*00b67f09SDavid van Moolenbroek 	case 55: result = towire_hip(rdata, cctx, target); break; \
566*00b67f09SDavid van Moolenbroek 	case 59: result = towire_cds(rdata, cctx, target); break; \
567*00b67f09SDavid van Moolenbroek 	case 60: result = towire_cdnskey(rdata, cctx, target); break; \
568*00b67f09SDavid van Moolenbroek 	case 61: result = towire_openpgpkey(rdata, cctx, target); break; \
569*00b67f09SDavid van Moolenbroek 	case 99: result = towire_spf(rdata, cctx, target); break; \
570*00b67f09SDavid van Moolenbroek 	case 103: result = towire_unspec(rdata, cctx, target); break; \
571*00b67f09SDavid van Moolenbroek 	case 104: result = towire_nid(rdata, cctx, target); break; \
572*00b67f09SDavid van Moolenbroek 	case 105: result = towire_l32(rdata, cctx, target); break; \
573*00b67f09SDavid van Moolenbroek 	case 106: result = towire_l64(rdata, cctx, target); break; \
574*00b67f09SDavid van Moolenbroek 	case 107: result = towire_lp(rdata, cctx, target); break; \
575*00b67f09SDavid van Moolenbroek 	case 108: result = towire_eui48(rdata, cctx, target); break; \
576*00b67f09SDavid van Moolenbroek 	case 109: result = towire_eui64(rdata, cctx, target); break; \
577*00b67f09SDavid van Moolenbroek 	case 249: result = towire_tkey(rdata, cctx, target); break; \
578*00b67f09SDavid van Moolenbroek 	case 250: switch (rdata->rdclass) { \
579*00b67f09SDavid van Moolenbroek 		case 255: result = towire_any_tsig(rdata, cctx, target); break; \
580*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
581*00b67f09SDavid van Moolenbroek 		} \
582*00b67f09SDavid van Moolenbroek 		break; \
583*00b67f09SDavid van Moolenbroek 	case 256: result = towire_uri(rdata, cctx, target); break; \
584*00b67f09SDavid van Moolenbroek 	case 257: result = towire_caa(rdata, cctx, target); break; \
585*00b67f09SDavid van Moolenbroek 	case 32769: result = towire_dlv(rdata, cctx, target); break; \
586*00b67f09SDavid van Moolenbroek 	case 65533: result = towire_keydata(rdata, cctx, target); break; \
587*00b67f09SDavid van Moolenbroek 	default: use_default = ISC_TRUE; break; \
588*00b67f09SDavid van Moolenbroek 	}
589*00b67f09SDavid van Moolenbroek 
590*00b67f09SDavid van Moolenbroek #define COMPARESWITCH \
591*00b67f09SDavid van Moolenbroek 	switch (rdata1->type) { \
592*00b67f09SDavid van Moolenbroek 	case 1: switch (rdata1->rdclass) { \
593*00b67f09SDavid van Moolenbroek 		case 1: result = compare_in_a(rdata1, rdata2); break; \
594*00b67f09SDavid van Moolenbroek 		case 3: result = compare_ch_a(rdata1, rdata2); break; \
595*00b67f09SDavid van Moolenbroek 		case 4: result = compare_hs_a(rdata1, rdata2); break; \
596*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
597*00b67f09SDavid van Moolenbroek 		} \
598*00b67f09SDavid van Moolenbroek 		break; \
599*00b67f09SDavid van Moolenbroek 	case 2: result = compare_ns(rdata1, rdata2); break; \
600*00b67f09SDavid van Moolenbroek 	case 3: result = compare_md(rdata1, rdata2); break; \
601*00b67f09SDavid van Moolenbroek 	case 4: result = compare_mf(rdata1, rdata2); break; \
602*00b67f09SDavid van Moolenbroek 	case 5: result = compare_cname(rdata1, rdata2); break; \
603*00b67f09SDavid van Moolenbroek 	case 6: result = compare_soa(rdata1, rdata2); break; \
604*00b67f09SDavid van Moolenbroek 	case 7: result = compare_mb(rdata1, rdata2); break; \
605*00b67f09SDavid van Moolenbroek 	case 8: result = compare_mg(rdata1, rdata2); break; \
606*00b67f09SDavid van Moolenbroek 	case 9: result = compare_mr(rdata1, rdata2); break; \
607*00b67f09SDavid van Moolenbroek 	case 10: result = compare_null(rdata1, rdata2); break; \
608*00b67f09SDavid van Moolenbroek 	case 11: switch (rdata1->rdclass) { \
609*00b67f09SDavid van Moolenbroek 		case 1: result = compare_in_wks(rdata1, rdata2); break; \
610*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
611*00b67f09SDavid van Moolenbroek 		} \
612*00b67f09SDavid van Moolenbroek 		break; \
613*00b67f09SDavid van Moolenbroek 	case 12: result = compare_ptr(rdata1, rdata2); break; \
614*00b67f09SDavid van Moolenbroek 	case 13: result = compare_hinfo(rdata1, rdata2); break; \
615*00b67f09SDavid van Moolenbroek 	case 14: result = compare_minfo(rdata1, rdata2); break; \
616*00b67f09SDavid van Moolenbroek 	case 15: result = compare_mx(rdata1, rdata2); break; \
617*00b67f09SDavid van Moolenbroek 	case 16: result = compare_txt(rdata1, rdata2); break; \
618*00b67f09SDavid van Moolenbroek 	case 17: result = compare_rp(rdata1, rdata2); break; \
619*00b67f09SDavid van Moolenbroek 	case 18: result = compare_afsdb(rdata1, rdata2); break; \
620*00b67f09SDavid van Moolenbroek 	case 19: result = compare_x25(rdata1, rdata2); break; \
621*00b67f09SDavid van Moolenbroek 	case 20: result = compare_isdn(rdata1, rdata2); break; \
622*00b67f09SDavid van Moolenbroek 	case 21: result = compare_rt(rdata1, rdata2); break; \
623*00b67f09SDavid van Moolenbroek 	case 22: switch (rdata1->rdclass) { \
624*00b67f09SDavid van Moolenbroek 		case 1: result = compare_in_nsap(rdata1, rdata2); break; \
625*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
626*00b67f09SDavid van Moolenbroek 		} \
627*00b67f09SDavid van Moolenbroek 		break; \
628*00b67f09SDavid van Moolenbroek 	case 23: switch (rdata1->rdclass) { \
629*00b67f09SDavid van Moolenbroek 		case 1: result = compare_in_nsap_ptr(rdata1, rdata2); break; \
630*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
631*00b67f09SDavid van Moolenbroek 		} \
632*00b67f09SDavid van Moolenbroek 		break; \
633*00b67f09SDavid van Moolenbroek 	case 24: result = compare_sig(rdata1, rdata2); break; \
634*00b67f09SDavid van Moolenbroek 	case 25: result = compare_key(rdata1, rdata2); break; \
635*00b67f09SDavid van Moolenbroek 	case 26: switch (rdata1->rdclass) { \
636*00b67f09SDavid van Moolenbroek 		case 1: result = compare_in_px(rdata1, rdata2); break; \
637*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
638*00b67f09SDavid van Moolenbroek 		} \
639*00b67f09SDavid van Moolenbroek 		break; \
640*00b67f09SDavid van Moolenbroek 	case 27: result = compare_gpos(rdata1, rdata2); break; \
641*00b67f09SDavid van Moolenbroek 	case 28: switch (rdata1->rdclass) { \
642*00b67f09SDavid van Moolenbroek 		case 1: result = compare_in_aaaa(rdata1, rdata2); break; \
643*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
644*00b67f09SDavid van Moolenbroek 		} \
645*00b67f09SDavid van Moolenbroek 		break; \
646*00b67f09SDavid van Moolenbroek 	case 29: result = compare_loc(rdata1, rdata2); break; \
647*00b67f09SDavid van Moolenbroek 	case 30: result = compare_nxt(rdata1, rdata2); break; \
648*00b67f09SDavid van Moolenbroek 	case 33: switch (rdata1->rdclass) { \
649*00b67f09SDavid van Moolenbroek 		case 1: result = compare_in_srv(rdata1, rdata2); break; \
650*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
651*00b67f09SDavid van Moolenbroek 		} \
652*00b67f09SDavid van Moolenbroek 		break; \
653*00b67f09SDavid van Moolenbroek 	case 35: result = compare_naptr(rdata1, rdata2); break; \
654*00b67f09SDavid van Moolenbroek 	case 36: switch (rdata1->rdclass) { \
655*00b67f09SDavid van Moolenbroek 		case 1: result = compare_in_kx(rdata1, rdata2); break; \
656*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
657*00b67f09SDavid van Moolenbroek 		} \
658*00b67f09SDavid van Moolenbroek 		break; \
659*00b67f09SDavid van Moolenbroek 	case 37: result = compare_cert(rdata1, rdata2); break; \
660*00b67f09SDavid van Moolenbroek 	case 38: switch (rdata1->rdclass) { \
661*00b67f09SDavid van Moolenbroek 		case 1: result = compare_in_a6(rdata1, rdata2); break; \
662*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
663*00b67f09SDavid van Moolenbroek 		} \
664*00b67f09SDavid van Moolenbroek 		break; \
665*00b67f09SDavid van Moolenbroek 	case 39: result = compare_dname(rdata1, rdata2); break; \
666*00b67f09SDavid van Moolenbroek 	case 41: result = compare_opt(rdata1, rdata2); break; \
667*00b67f09SDavid van Moolenbroek 	case 42: switch (rdata1->rdclass) { \
668*00b67f09SDavid van Moolenbroek 		case 1: result = compare_in_apl(rdata1, rdata2); break; \
669*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
670*00b67f09SDavid van Moolenbroek 		} \
671*00b67f09SDavid van Moolenbroek 		break; \
672*00b67f09SDavid van Moolenbroek 	case 43: result = compare_ds(rdata1, rdata2); break; \
673*00b67f09SDavid van Moolenbroek 	case 44: result = compare_sshfp(rdata1, rdata2); break; \
674*00b67f09SDavid van Moolenbroek 	case 45: result = compare_ipseckey(rdata1, rdata2); break; \
675*00b67f09SDavid van Moolenbroek 	case 46: result = compare_rrsig(rdata1, rdata2); break; \
676*00b67f09SDavid van Moolenbroek 	case 47: result = compare_nsec(rdata1, rdata2); break; \
677*00b67f09SDavid van Moolenbroek 	case 48: result = compare_dnskey(rdata1, rdata2); break; \
678*00b67f09SDavid van Moolenbroek 	case 49: switch (rdata1->rdclass) { \
679*00b67f09SDavid van Moolenbroek 		case 1: result = compare_in_dhcid(rdata1, rdata2); break; \
680*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
681*00b67f09SDavid van Moolenbroek 		} \
682*00b67f09SDavid van Moolenbroek 		break; \
683*00b67f09SDavid van Moolenbroek 	case 50: result = compare_nsec3(rdata1, rdata2); break; \
684*00b67f09SDavid van Moolenbroek 	case 51: result = compare_nsec3param(rdata1, rdata2); break; \
685*00b67f09SDavid van Moolenbroek 	case 52: result = compare_tlsa(rdata1, rdata2); break; \
686*00b67f09SDavid van Moolenbroek 	case 55: result = compare_hip(rdata1, rdata2); break; \
687*00b67f09SDavid van Moolenbroek 	case 59: result = compare_cds(rdata1, rdata2); break; \
688*00b67f09SDavid van Moolenbroek 	case 60: result = compare_cdnskey(rdata1, rdata2); break; \
689*00b67f09SDavid van Moolenbroek 	case 61: result = compare_openpgpkey(rdata1, rdata2); break; \
690*00b67f09SDavid van Moolenbroek 	case 99: result = compare_spf(rdata1, rdata2); break; \
691*00b67f09SDavid van Moolenbroek 	case 103: result = compare_unspec(rdata1, rdata2); break; \
692*00b67f09SDavid van Moolenbroek 	case 104: result = compare_nid(rdata1, rdata2); break; \
693*00b67f09SDavid van Moolenbroek 	case 105: result = compare_l32(rdata1, rdata2); break; \
694*00b67f09SDavid van Moolenbroek 	case 106: result = compare_l64(rdata1, rdata2); break; \
695*00b67f09SDavid van Moolenbroek 	case 107: result = compare_lp(rdata1, rdata2); break; \
696*00b67f09SDavid van Moolenbroek 	case 108: result = compare_eui48(rdata1, rdata2); break; \
697*00b67f09SDavid van Moolenbroek 	case 109: result = compare_eui64(rdata1, rdata2); break; \
698*00b67f09SDavid van Moolenbroek 	case 249: result = compare_tkey(rdata1, rdata2); break; \
699*00b67f09SDavid van Moolenbroek 	case 250: switch (rdata1->rdclass) { \
700*00b67f09SDavid van Moolenbroek 		case 255: result = compare_any_tsig(rdata1, rdata2); break; \
701*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
702*00b67f09SDavid van Moolenbroek 		} \
703*00b67f09SDavid van Moolenbroek 		break; \
704*00b67f09SDavid van Moolenbroek 	case 256: result = compare_uri(rdata1, rdata2); break; \
705*00b67f09SDavid van Moolenbroek 	case 257: result = compare_caa(rdata1, rdata2); break; \
706*00b67f09SDavid van Moolenbroek 	case 32769: result = compare_dlv(rdata1, rdata2); break; \
707*00b67f09SDavid van Moolenbroek 	case 65533: result = compare_keydata(rdata1, rdata2); break; \
708*00b67f09SDavid van Moolenbroek 	default: use_default = ISC_TRUE; break; \
709*00b67f09SDavid van Moolenbroek 	}
710*00b67f09SDavid van Moolenbroek 
711*00b67f09SDavid van Moolenbroek #define CASECOMPARESWITCH \
712*00b67f09SDavid van Moolenbroek 	switch (rdata1->type) { \
713*00b67f09SDavid van Moolenbroek 	case 1: switch (rdata1->rdclass) { \
714*00b67f09SDavid van Moolenbroek 		case 1: result = casecompare_in_a(rdata1, rdata2); break; \
715*00b67f09SDavid van Moolenbroek 		case 3: result = casecompare_ch_a(rdata1, rdata2); break; \
716*00b67f09SDavid van Moolenbroek 		case 4: result = casecompare_hs_a(rdata1, rdata2); break; \
717*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
718*00b67f09SDavid van Moolenbroek 		} \
719*00b67f09SDavid van Moolenbroek 		break; \
720*00b67f09SDavid van Moolenbroek 	case 2: result = casecompare_ns(rdata1, rdata2); break; \
721*00b67f09SDavid van Moolenbroek 	case 3: result = casecompare_md(rdata1, rdata2); break; \
722*00b67f09SDavid van Moolenbroek 	case 4: result = casecompare_mf(rdata1, rdata2); break; \
723*00b67f09SDavid van Moolenbroek 	case 5: result = casecompare_cname(rdata1, rdata2); break; \
724*00b67f09SDavid van Moolenbroek 	case 6: result = casecompare_soa(rdata1, rdata2); break; \
725*00b67f09SDavid van Moolenbroek 	case 7: result = casecompare_mb(rdata1, rdata2); break; \
726*00b67f09SDavid van Moolenbroek 	case 8: result = casecompare_mg(rdata1, rdata2); break; \
727*00b67f09SDavid van Moolenbroek 	case 9: result = casecompare_mr(rdata1, rdata2); break; \
728*00b67f09SDavid van Moolenbroek 	case 10: result = casecompare_null(rdata1, rdata2); break; \
729*00b67f09SDavid van Moolenbroek 	case 11: switch (rdata1->rdclass) { \
730*00b67f09SDavid van Moolenbroek 		case 1: result = casecompare_in_wks(rdata1, rdata2); break; \
731*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
732*00b67f09SDavid van Moolenbroek 		} \
733*00b67f09SDavid van Moolenbroek 		break; \
734*00b67f09SDavid van Moolenbroek 	case 12: result = casecompare_ptr(rdata1, rdata2); break; \
735*00b67f09SDavid van Moolenbroek 	case 13: result = casecompare_hinfo(rdata1, rdata2); break; \
736*00b67f09SDavid van Moolenbroek 	case 14: result = casecompare_minfo(rdata1, rdata2); break; \
737*00b67f09SDavid van Moolenbroek 	case 15: result = casecompare_mx(rdata1, rdata2); break; \
738*00b67f09SDavid van Moolenbroek 	case 16: result = casecompare_txt(rdata1, rdata2); break; \
739*00b67f09SDavid van Moolenbroek 	case 17: result = casecompare_rp(rdata1, rdata2); break; \
740*00b67f09SDavid van Moolenbroek 	case 18: result = casecompare_afsdb(rdata1, rdata2); break; \
741*00b67f09SDavid van Moolenbroek 	case 19: result = casecompare_x25(rdata1, rdata2); break; \
742*00b67f09SDavid van Moolenbroek 	case 20: result = casecompare_isdn(rdata1, rdata2); break; \
743*00b67f09SDavid van Moolenbroek 	case 21: result = casecompare_rt(rdata1, rdata2); break; \
744*00b67f09SDavid van Moolenbroek 	case 22: switch (rdata1->rdclass) { \
745*00b67f09SDavid van Moolenbroek 		case 1: result = casecompare_in_nsap(rdata1, rdata2); break; \
746*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
747*00b67f09SDavid van Moolenbroek 		} \
748*00b67f09SDavid van Moolenbroek 		break; \
749*00b67f09SDavid van Moolenbroek 	case 23: switch (rdata1->rdclass) { \
750*00b67f09SDavid van Moolenbroek 		case 1: result = casecompare_in_nsap_ptr(rdata1, rdata2); break; \
751*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
752*00b67f09SDavid van Moolenbroek 		} \
753*00b67f09SDavid van Moolenbroek 		break; \
754*00b67f09SDavid van Moolenbroek 	case 24: result = casecompare_sig(rdata1, rdata2); break; \
755*00b67f09SDavid van Moolenbroek 	case 25: result = casecompare_key(rdata1, rdata2); break; \
756*00b67f09SDavid van Moolenbroek 	case 26: switch (rdata1->rdclass) { \
757*00b67f09SDavid van Moolenbroek 		case 1: result = casecompare_in_px(rdata1, rdata2); break; \
758*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
759*00b67f09SDavid van Moolenbroek 		} \
760*00b67f09SDavid van Moolenbroek 		break; \
761*00b67f09SDavid van Moolenbroek 	case 27: result = casecompare_gpos(rdata1, rdata2); break; \
762*00b67f09SDavid van Moolenbroek 	case 28: switch (rdata1->rdclass) { \
763*00b67f09SDavid van Moolenbroek 		case 1: result = casecompare_in_aaaa(rdata1, rdata2); break; \
764*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
765*00b67f09SDavid van Moolenbroek 		} \
766*00b67f09SDavid van Moolenbroek 		break; \
767*00b67f09SDavid van Moolenbroek 	case 29: result = casecompare_loc(rdata1, rdata2); break; \
768*00b67f09SDavid van Moolenbroek 	case 30: result = casecompare_nxt(rdata1, rdata2); break; \
769*00b67f09SDavid van Moolenbroek 	case 33: switch (rdata1->rdclass) { \
770*00b67f09SDavid van Moolenbroek 		case 1: result = casecompare_in_srv(rdata1, rdata2); break; \
771*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
772*00b67f09SDavid van Moolenbroek 		} \
773*00b67f09SDavid van Moolenbroek 		break; \
774*00b67f09SDavid van Moolenbroek 	case 35: result = casecompare_naptr(rdata1, rdata2); break; \
775*00b67f09SDavid van Moolenbroek 	case 36: switch (rdata1->rdclass) { \
776*00b67f09SDavid van Moolenbroek 		case 1: result = casecompare_in_kx(rdata1, rdata2); break; \
777*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
778*00b67f09SDavid van Moolenbroek 		} \
779*00b67f09SDavid van Moolenbroek 		break; \
780*00b67f09SDavid van Moolenbroek 	case 37: result = casecompare_cert(rdata1, rdata2); break; \
781*00b67f09SDavid van Moolenbroek 	case 38: switch (rdata1->rdclass) { \
782*00b67f09SDavid van Moolenbroek 		case 1: result = casecompare_in_a6(rdata1, rdata2); break; \
783*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
784*00b67f09SDavid van Moolenbroek 		} \
785*00b67f09SDavid van Moolenbroek 		break; \
786*00b67f09SDavid van Moolenbroek 	case 39: result = casecompare_dname(rdata1, rdata2); break; \
787*00b67f09SDavid van Moolenbroek 	case 41: result = casecompare_opt(rdata1, rdata2); break; \
788*00b67f09SDavid van Moolenbroek 	case 42: switch (rdata1->rdclass) { \
789*00b67f09SDavid van Moolenbroek 		case 1: result = casecompare_in_apl(rdata1, rdata2); break; \
790*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
791*00b67f09SDavid van Moolenbroek 		} \
792*00b67f09SDavid van Moolenbroek 		break; \
793*00b67f09SDavid van Moolenbroek 	case 43: result = casecompare_ds(rdata1, rdata2); break; \
794*00b67f09SDavid van Moolenbroek 	case 44: result = casecompare_sshfp(rdata1, rdata2); break; \
795*00b67f09SDavid van Moolenbroek 	case 45: result = casecompare_ipseckey(rdata1, rdata2); break; \
796*00b67f09SDavid van Moolenbroek 	case 46: result = casecompare_rrsig(rdata1, rdata2); break; \
797*00b67f09SDavid van Moolenbroek 	case 47: result = casecompare_nsec(rdata1, rdata2); break; \
798*00b67f09SDavid van Moolenbroek 	case 48: result = casecompare_dnskey(rdata1, rdata2); break; \
799*00b67f09SDavid van Moolenbroek 	case 49: switch (rdata1->rdclass) { \
800*00b67f09SDavid van Moolenbroek 		case 1: result = casecompare_in_dhcid(rdata1, rdata2); break; \
801*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
802*00b67f09SDavid van Moolenbroek 		} \
803*00b67f09SDavid van Moolenbroek 		break; \
804*00b67f09SDavid van Moolenbroek 	case 50: result = casecompare_nsec3(rdata1, rdata2); break; \
805*00b67f09SDavid van Moolenbroek 	case 51: result = casecompare_nsec3param(rdata1, rdata2); break; \
806*00b67f09SDavid van Moolenbroek 	case 52: result = casecompare_tlsa(rdata1, rdata2); break; \
807*00b67f09SDavid van Moolenbroek 	case 55: result = casecompare_hip(rdata1, rdata2); break; \
808*00b67f09SDavid van Moolenbroek 	case 59: result = casecompare_cds(rdata1, rdata2); break; \
809*00b67f09SDavid van Moolenbroek 	case 60: result = casecompare_cdnskey(rdata1, rdata2); break; \
810*00b67f09SDavid van Moolenbroek 	case 61: result = casecompare_openpgpkey(rdata1, rdata2); break; \
811*00b67f09SDavid van Moolenbroek 	case 99: result = casecompare_spf(rdata1, rdata2); break; \
812*00b67f09SDavid van Moolenbroek 	case 103: result = casecompare_unspec(rdata1, rdata2); break; \
813*00b67f09SDavid van Moolenbroek 	case 104: result = casecompare_nid(rdata1, rdata2); break; \
814*00b67f09SDavid van Moolenbroek 	case 105: result = casecompare_l32(rdata1, rdata2); break; \
815*00b67f09SDavid van Moolenbroek 	case 106: result = casecompare_l64(rdata1, rdata2); break; \
816*00b67f09SDavid van Moolenbroek 	case 107: result = casecompare_lp(rdata1, rdata2); break; \
817*00b67f09SDavid van Moolenbroek 	case 108: result = casecompare_eui48(rdata1, rdata2); break; \
818*00b67f09SDavid van Moolenbroek 	case 109: result = casecompare_eui64(rdata1, rdata2); break; \
819*00b67f09SDavid van Moolenbroek 	case 249: result = casecompare_tkey(rdata1, rdata2); break; \
820*00b67f09SDavid van Moolenbroek 	case 250: switch (rdata1->rdclass) { \
821*00b67f09SDavid van Moolenbroek 		case 255: result = casecompare_any_tsig(rdata1, rdata2); break; \
822*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
823*00b67f09SDavid van Moolenbroek 		} \
824*00b67f09SDavid van Moolenbroek 		break; \
825*00b67f09SDavid van Moolenbroek 	case 256: result = casecompare_uri(rdata1, rdata2); break; \
826*00b67f09SDavid van Moolenbroek 	case 257: result = casecompare_caa(rdata1, rdata2); break; \
827*00b67f09SDavid van Moolenbroek 	case 32769: result = casecompare_dlv(rdata1, rdata2); break; \
828*00b67f09SDavid van Moolenbroek 	case 65533: result = casecompare_keydata(rdata1, rdata2); break; \
829*00b67f09SDavid van Moolenbroek 	default: use_default = ISC_TRUE; break; \
830*00b67f09SDavid van Moolenbroek 	}
831*00b67f09SDavid van Moolenbroek 
832*00b67f09SDavid van Moolenbroek #define FROMSTRUCTSWITCH \
833*00b67f09SDavid van Moolenbroek 	switch (type) { \
834*00b67f09SDavid van Moolenbroek 	case 1: switch (rdclass) { \
835*00b67f09SDavid van Moolenbroek 		case 1: result = fromstruct_in_a(rdclass, type, source, target); break; \
836*00b67f09SDavid van Moolenbroek 		case 3: result = fromstruct_ch_a(rdclass, type, source, target); break; \
837*00b67f09SDavid van Moolenbroek 		case 4: result = fromstruct_hs_a(rdclass, type, source, target); break; \
838*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
839*00b67f09SDavid van Moolenbroek 		} \
840*00b67f09SDavid van Moolenbroek 		break; \
841*00b67f09SDavid van Moolenbroek 	case 2: result = fromstruct_ns(rdclass, type, source, target); break; \
842*00b67f09SDavid van Moolenbroek 	case 3: result = fromstruct_md(rdclass, type, source, target); break; \
843*00b67f09SDavid van Moolenbroek 	case 4: result = fromstruct_mf(rdclass, type, source, target); break; \
844*00b67f09SDavid van Moolenbroek 	case 5: result = fromstruct_cname(rdclass, type, source, target); break; \
845*00b67f09SDavid van Moolenbroek 	case 6: result = fromstruct_soa(rdclass, type, source, target); break; \
846*00b67f09SDavid van Moolenbroek 	case 7: result = fromstruct_mb(rdclass, type, source, target); break; \
847*00b67f09SDavid van Moolenbroek 	case 8: result = fromstruct_mg(rdclass, type, source, target); break; \
848*00b67f09SDavid van Moolenbroek 	case 9: result = fromstruct_mr(rdclass, type, source, target); break; \
849*00b67f09SDavid van Moolenbroek 	case 10: result = fromstruct_null(rdclass, type, source, target); break; \
850*00b67f09SDavid van Moolenbroek 	case 11: switch (rdclass) { \
851*00b67f09SDavid van Moolenbroek 		case 1: result = fromstruct_in_wks(rdclass, type, source, target); break; \
852*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
853*00b67f09SDavid van Moolenbroek 		} \
854*00b67f09SDavid van Moolenbroek 		break; \
855*00b67f09SDavid van Moolenbroek 	case 12: result = fromstruct_ptr(rdclass, type, source, target); break; \
856*00b67f09SDavid van Moolenbroek 	case 13: result = fromstruct_hinfo(rdclass, type, source, target); break; \
857*00b67f09SDavid van Moolenbroek 	case 14: result = fromstruct_minfo(rdclass, type, source, target); break; \
858*00b67f09SDavid van Moolenbroek 	case 15: result = fromstruct_mx(rdclass, type, source, target); break; \
859*00b67f09SDavid van Moolenbroek 	case 16: result = fromstruct_txt(rdclass, type, source, target); break; \
860*00b67f09SDavid van Moolenbroek 	case 17: result = fromstruct_rp(rdclass, type, source, target); break; \
861*00b67f09SDavid van Moolenbroek 	case 18: result = fromstruct_afsdb(rdclass, type, source, target); break; \
862*00b67f09SDavid van Moolenbroek 	case 19: result = fromstruct_x25(rdclass, type, source, target); break; \
863*00b67f09SDavid van Moolenbroek 	case 20: result = fromstruct_isdn(rdclass, type, source, target); break; \
864*00b67f09SDavid van Moolenbroek 	case 21: result = fromstruct_rt(rdclass, type, source, target); break; \
865*00b67f09SDavid van Moolenbroek 	case 22: switch (rdclass) { \
866*00b67f09SDavid van Moolenbroek 		case 1: result = fromstruct_in_nsap(rdclass, type, source, target); break; \
867*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
868*00b67f09SDavid van Moolenbroek 		} \
869*00b67f09SDavid van Moolenbroek 		break; \
870*00b67f09SDavid van Moolenbroek 	case 23: switch (rdclass) { \
871*00b67f09SDavid van Moolenbroek 		case 1: result = fromstruct_in_nsap_ptr(rdclass, type, source, target); break; \
872*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
873*00b67f09SDavid van Moolenbroek 		} \
874*00b67f09SDavid van Moolenbroek 		break; \
875*00b67f09SDavid van Moolenbroek 	case 24: result = fromstruct_sig(rdclass, type, source, target); break; \
876*00b67f09SDavid van Moolenbroek 	case 25: result = fromstruct_key(rdclass, type, source, target); break; \
877*00b67f09SDavid van Moolenbroek 	case 26: switch (rdclass) { \
878*00b67f09SDavid van Moolenbroek 		case 1: result = fromstruct_in_px(rdclass, type, source, target); break; \
879*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
880*00b67f09SDavid van Moolenbroek 		} \
881*00b67f09SDavid van Moolenbroek 		break; \
882*00b67f09SDavid van Moolenbroek 	case 27: result = fromstruct_gpos(rdclass, type, source, target); break; \
883*00b67f09SDavid van Moolenbroek 	case 28: switch (rdclass) { \
884*00b67f09SDavid van Moolenbroek 		case 1: result = fromstruct_in_aaaa(rdclass, type, source, target); break; \
885*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
886*00b67f09SDavid van Moolenbroek 		} \
887*00b67f09SDavid van Moolenbroek 		break; \
888*00b67f09SDavid van Moolenbroek 	case 29: result = fromstruct_loc(rdclass, type, source, target); break; \
889*00b67f09SDavid van Moolenbroek 	case 30: result = fromstruct_nxt(rdclass, type, source, target); break; \
890*00b67f09SDavid van Moolenbroek 	case 33: switch (rdclass) { \
891*00b67f09SDavid van Moolenbroek 		case 1: result = fromstruct_in_srv(rdclass, type, source, target); break; \
892*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
893*00b67f09SDavid van Moolenbroek 		} \
894*00b67f09SDavid van Moolenbroek 		break; \
895*00b67f09SDavid van Moolenbroek 	case 35: result = fromstruct_naptr(rdclass, type, source, target); break; \
896*00b67f09SDavid van Moolenbroek 	case 36: switch (rdclass) { \
897*00b67f09SDavid van Moolenbroek 		case 1: result = fromstruct_in_kx(rdclass, type, source, target); break; \
898*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
899*00b67f09SDavid van Moolenbroek 		} \
900*00b67f09SDavid van Moolenbroek 		break; \
901*00b67f09SDavid van Moolenbroek 	case 37: result = fromstruct_cert(rdclass, type, source, target); break; \
902*00b67f09SDavid van Moolenbroek 	case 38: switch (rdclass) { \
903*00b67f09SDavid van Moolenbroek 		case 1: result = fromstruct_in_a6(rdclass, type, source, target); break; \
904*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
905*00b67f09SDavid van Moolenbroek 		} \
906*00b67f09SDavid van Moolenbroek 		break; \
907*00b67f09SDavid van Moolenbroek 	case 39: result = fromstruct_dname(rdclass, type, source, target); break; \
908*00b67f09SDavid van Moolenbroek 	case 41: result = fromstruct_opt(rdclass, type, source, target); break; \
909*00b67f09SDavid van Moolenbroek 	case 42: switch (rdclass) { \
910*00b67f09SDavid van Moolenbroek 		case 1: result = fromstruct_in_apl(rdclass, type, source, target); break; \
911*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
912*00b67f09SDavid van Moolenbroek 		} \
913*00b67f09SDavid van Moolenbroek 		break; \
914*00b67f09SDavid van Moolenbroek 	case 43: result = fromstruct_ds(rdclass, type, source, target); break; \
915*00b67f09SDavid van Moolenbroek 	case 44: result = fromstruct_sshfp(rdclass, type, source, target); break; \
916*00b67f09SDavid van Moolenbroek 	case 45: result = fromstruct_ipseckey(rdclass, type, source, target); break; \
917*00b67f09SDavid van Moolenbroek 	case 46: result = fromstruct_rrsig(rdclass, type, source, target); break; \
918*00b67f09SDavid van Moolenbroek 	case 47: result = fromstruct_nsec(rdclass, type, source, target); break; \
919*00b67f09SDavid van Moolenbroek 	case 48: result = fromstruct_dnskey(rdclass, type, source, target); break; \
920*00b67f09SDavid van Moolenbroek 	case 49: switch (rdclass) { \
921*00b67f09SDavid van Moolenbroek 		case 1: result = fromstruct_in_dhcid(rdclass, type, source, target); break; \
922*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
923*00b67f09SDavid van Moolenbroek 		} \
924*00b67f09SDavid van Moolenbroek 		break; \
925*00b67f09SDavid van Moolenbroek 	case 50: result = fromstruct_nsec3(rdclass, type, source, target); break; \
926*00b67f09SDavid van Moolenbroek 	case 51: result = fromstruct_nsec3param(rdclass, type, source, target); break; \
927*00b67f09SDavid van Moolenbroek 	case 52: result = fromstruct_tlsa(rdclass, type, source, target); break; \
928*00b67f09SDavid van Moolenbroek 	case 55: result = fromstruct_hip(rdclass, type, source, target); break; \
929*00b67f09SDavid van Moolenbroek 	case 59: result = fromstruct_cds(rdclass, type, source, target); break; \
930*00b67f09SDavid van Moolenbroek 	case 60: result = fromstruct_cdnskey(rdclass, type, source, target); break; \
931*00b67f09SDavid van Moolenbroek 	case 61: result = fromstruct_openpgpkey(rdclass, type, source, target); break; \
932*00b67f09SDavid van Moolenbroek 	case 99: result = fromstruct_spf(rdclass, type, source, target); break; \
933*00b67f09SDavid van Moolenbroek 	case 103: result = fromstruct_unspec(rdclass, type, source, target); break; \
934*00b67f09SDavid van Moolenbroek 	case 104: result = fromstruct_nid(rdclass, type, source, target); break; \
935*00b67f09SDavid van Moolenbroek 	case 105: result = fromstruct_l32(rdclass, type, source, target); break; \
936*00b67f09SDavid van Moolenbroek 	case 106: result = fromstruct_l64(rdclass, type, source, target); break; \
937*00b67f09SDavid van Moolenbroek 	case 107: result = fromstruct_lp(rdclass, type, source, target); break; \
938*00b67f09SDavid van Moolenbroek 	case 108: result = fromstruct_eui48(rdclass, type, source, target); break; \
939*00b67f09SDavid van Moolenbroek 	case 109: result = fromstruct_eui64(rdclass, type, source, target); break; \
940*00b67f09SDavid van Moolenbroek 	case 249: result = fromstruct_tkey(rdclass, type, source, target); break; \
941*00b67f09SDavid van Moolenbroek 	case 250: switch (rdclass) { \
942*00b67f09SDavid van Moolenbroek 		case 255: result = fromstruct_any_tsig(rdclass, type, source, target); break; \
943*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
944*00b67f09SDavid van Moolenbroek 		} \
945*00b67f09SDavid van Moolenbroek 		break; \
946*00b67f09SDavid van Moolenbroek 	case 256: result = fromstruct_uri(rdclass, type, source, target); break; \
947*00b67f09SDavid van Moolenbroek 	case 257: result = fromstruct_caa(rdclass, type, source, target); break; \
948*00b67f09SDavid van Moolenbroek 	case 32769: result = fromstruct_dlv(rdclass, type, source, target); break; \
949*00b67f09SDavid van Moolenbroek 	case 65533: result = fromstruct_keydata(rdclass, type, source, target); break; \
950*00b67f09SDavid van Moolenbroek 	default: use_default = ISC_TRUE; break; \
951*00b67f09SDavid van Moolenbroek 	}
952*00b67f09SDavid van Moolenbroek 
953*00b67f09SDavid van Moolenbroek #define TOSTRUCTSWITCH \
954*00b67f09SDavid van Moolenbroek 	switch (rdata->type) { \
955*00b67f09SDavid van Moolenbroek 	case 1: switch (rdata->rdclass) { \
956*00b67f09SDavid van Moolenbroek 		case 1: result = tostruct_in_a(rdata, target, mctx); break; \
957*00b67f09SDavid van Moolenbroek 		case 3: result = tostruct_ch_a(rdata, target, mctx); break; \
958*00b67f09SDavid van Moolenbroek 		case 4: result = tostruct_hs_a(rdata, target, mctx); break; \
959*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
960*00b67f09SDavid van Moolenbroek 		} \
961*00b67f09SDavid van Moolenbroek 		break; \
962*00b67f09SDavid van Moolenbroek 	case 2: result = tostruct_ns(rdata, target, mctx); break; \
963*00b67f09SDavid van Moolenbroek 	case 3: result = tostruct_md(rdata, target, mctx); break; \
964*00b67f09SDavid van Moolenbroek 	case 4: result = tostruct_mf(rdata, target, mctx); break; \
965*00b67f09SDavid van Moolenbroek 	case 5: result = tostruct_cname(rdata, target, mctx); break; \
966*00b67f09SDavid van Moolenbroek 	case 6: result = tostruct_soa(rdata, target, mctx); break; \
967*00b67f09SDavid van Moolenbroek 	case 7: result = tostruct_mb(rdata, target, mctx); break; \
968*00b67f09SDavid van Moolenbroek 	case 8: result = tostruct_mg(rdata, target, mctx); break; \
969*00b67f09SDavid van Moolenbroek 	case 9: result = tostruct_mr(rdata, target, mctx); break; \
970*00b67f09SDavid van Moolenbroek 	case 10: result = tostruct_null(rdata, target, mctx); break; \
971*00b67f09SDavid van Moolenbroek 	case 11: switch (rdata->rdclass) { \
972*00b67f09SDavid van Moolenbroek 		case 1: result = tostruct_in_wks(rdata, target, mctx); break; \
973*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
974*00b67f09SDavid van Moolenbroek 		} \
975*00b67f09SDavid van Moolenbroek 		break; \
976*00b67f09SDavid van Moolenbroek 	case 12: result = tostruct_ptr(rdata, target, mctx); break; \
977*00b67f09SDavid van Moolenbroek 	case 13: result = tostruct_hinfo(rdata, target, mctx); break; \
978*00b67f09SDavid van Moolenbroek 	case 14: result = tostruct_minfo(rdata, target, mctx); break; \
979*00b67f09SDavid van Moolenbroek 	case 15: result = tostruct_mx(rdata, target, mctx); break; \
980*00b67f09SDavid van Moolenbroek 	case 16: result = tostruct_txt(rdata, target, mctx); break; \
981*00b67f09SDavid van Moolenbroek 	case 17: result = tostruct_rp(rdata, target, mctx); break; \
982*00b67f09SDavid van Moolenbroek 	case 18: result = tostruct_afsdb(rdata, target, mctx); break; \
983*00b67f09SDavid van Moolenbroek 	case 19: result = tostruct_x25(rdata, target, mctx); break; \
984*00b67f09SDavid van Moolenbroek 	case 20: result = tostruct_isdn(rdata, target, mctx); break; \
985*00b67f09SDavid van Moolenbroek 	case 21: result = tostruct_rt(rdata, target, mctx); break; \
986*00b67f09SDavid van Moolenbroek 	case 22: switch (rdata->rdclass) { \
987*00b67f09SDavid van Moolenbroek 		case 1: result = tostruct_in_nsap(rdata, target, mctx); break; \
988*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
989*00b67f09SDavid van Moolenbroek 		} \
990*00b67f09SDavid van Moolenbroek 		break; \
991*00b67f09SDavid van Moolenbroek 	case 23: switch (rdata->rdclass) { \
992*00b67f09SDavid van Moolenbroek 		case 1: result = tostruct_in_nsap_ptr(rdata, target, mctx); break; \
993*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
994*00b67f09SDavid van Moolenbroek 		} \
995*00b67f09SDavid van Moolenbroek 		break; \
996*00b67f09SDavid van Moolenbroek 	case 24: result = tostruct_sig(rdata, target, mctx); break; \
997*00b67f09SDavid van Moolenbroek 	case 25: result = tostruct_key(rdata, target, mctx); break; \
998*00b67f09SDavid van Moolenbroek 	case 26: switch (rdata->rdclass) { \
999*00b67f09SDavid van Moolenbroek 		case 1: result = tostruct_in_px(rdata, target, mctx); break; \
1000*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1001*00b67f09SDavid van Moolenbroek 		} \
1002*00b67f09SDavid van Moolenbroek 		break; \
1003*00b67f09SDavid van Moolenbroek 	case 27: result = tostruct_gpos(rdata, target, mctx); break; \
1004*00b67f09SDavid van Moolenbroek 	case 28: switch (rdata->rdclass) { \
1005*00b67f09SDavid van Moolenbroek 		case 1: result = tostruct_in_aaaa(rdata, target, mctx); break; \
1006*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1007*00b67f09SDavid van Moolenbroek 		} \
1008*00b67f09SDavid van Moolenbroek 		break; \
1009*00b67f09SDavid van Moolenbroek 	case 29: result = tostruct_loc(rdata, target, mctx); break; \
1010*00b67f09SDavid van Moolenbroek 	case 30: result = tostruct_nxt(rdata, target, mctx); break; \
1011*00b67f09SDavid van Moolenbroek 	case 33: switch (rdata->rdclass) { \
1012*00b67f09SDavid van Moolenbroek 		case 1: result = tostruct_in_srv(rdata, target, mctx); break; \
1013*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1014*00b67f09SDavid van Moolenbroek 		} \
1015*00b67f09SDavid van Moolenbroek 		break; \
1016*00b67f09SDavid van Moolenbroek 	case 35: result = tostruct_naptr(rdata, target, mctx); break; \
1017*00b67f09SDavid van Moolenbroek 	case 36: switch (rdata->rdclass) { \
1018*00b67f09SDavid van Moolenbroek 		case 1: result = tostruct_in_kx(rdata, target, mctx); break; \
1019*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1020*00b67f09SDavid van Moolenbroek 		} \
1021*00b67f09SDavid van Moolenbroek 		break; \
1022*00b67f09SDavid van Moolenbroek 	case 37: result = tostruct_cert(rdata, target, mctx); break; \
1023*00b67f09SDavid van Moolenbroek 	case 38: switch (rdata->rdclass) { \
1024*00b67f09SDavid van Moolenbroek 		case 1: result = tostruct_in_a6(rdata, target, mctx); break; \
1025*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1026*00b67f09SDavid van Moolenbroek 		} \
1027*00b67f09SDavid van Moolenbroek 		break; \
1028*00b67f09SDavid van Moolenbroek 	case 39: result = tostruct_dname(rdata, target, mctx); break; \
1029*00b67f09SDavid van Moolenbroek 	case 41: result = tostruct_opt(rdata, target, mctx); break; \
1030*00b67f09SDavid van Moolenbroek 	case 42: switch (rdata->rdclass) { \
1031*00b67f09SDavid van Moolenbroek 		case 1: result = tostruct_in_apl(rdata, target, mctx); break; \
1032*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1033*00b67f09SDavid van Moolenbroek 		} \
1034*00b67f09SDavid van Moolenbroek 		break; \
1035*00b67f09SDavid van Moolenbroek 	case 43: result = tostruct_ds(rdata, target, mctx); break; \
1036*00b67f09SDavid van Moolenbroek 	case 44: result = tostruct_sshfp(rdata, target, mctx); break; \
1037*00b67f09SDavid van Moolenbroek 	case 45: result = tostruct_ipseckey(rdata, target, mctx); break; \
1038*00b67f09SDavid van Moolenbroek 	case 46: result = tostruct_rrsig(rdata, target, mctx); break; \
1039*00b67f09SDavid van Moolenbroek 	case 47: result = tostruct_nsec(rdata, target, mctx); break; \
1040*00b67f09SDavid van Moolenbroek 	case 48: result = tostruct_dnskey(rdata, target, mctx); break; \
1041*00b67f09SDavid van Moolenbroek 	case 49: switch (rdata->rdclass) { \
1042*00b67f09SDavid van Moolenbroek 		case 1: result = tostruct_in_dhcid(rdata, target, mctx); break; \
1043*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1044*00b67f09SDavid van Moolenbroek 		} \
1045*00b67f09SDavid van Moolenbroek 		break; \
1046*00b67f09SDavid van Moolenbroek 	case 50: result = tostruct_nsec3(rdata, target, mctx); break; \
1047*00b67f09SDavid van Moolenbroek 	case 51: result = tostruct_nsec3param(rdata, target, mctx); break; \
1048*00b67f09SDavid van Moolenbroek 	case 52: result = tostruct_tlsa(rdata, target, mctx); break; \
1049*00b67f09SDavid van Moolenbroek 	case 55: result = tostruct_hip(rdata, target, mctx); break; \
1050*00b67f09SDavid van Moolenbroek 	case 59: result = tostruct_cds(rdata, target, mctx); break; \
1051*00b67f09SDavid van Moolenbroek 	case 60: result = tostruct_cdnskey(rdata, target, mctx); break; \
1052*00b67f09SDavid van Moolenbroek 	case 61: result = tostruct_openpgpkey(rdata, target, mctx); break; \
1053*00b67f09SDavid van Moolenbroek 	case 99: result = tostruct_spf(rdata, target, mctx); break; \
1054*00b67f09SDavid van Moolenbroek 	case 103: result = tostruct_unspec(rdata, target, mctx); break; \
1055*00b67f09SDavid van Moolenbroek 	case 104: result = tostruct_nid(rdata, target, mctx); break; \
1056*00b67f09SDavid van Moolenbroek 	case 105: result = tostruct_l32(rdata, target, mctx); break; \
1057*00b67f09SDavid van Moolenbroek 	case 106: result = tostruct_l64(rdata, target, mctx); break; \
1058*00b67f09SDavid van Moolenbroek 	case 107: result = tostruct_lp(rdata, target, mctx); break; \
1059*00b67f09SDavid van Moolenbroek 	case 108: result = tostruct_eui48(rdata, target, mctx); break; \
1060*00b67f09SDavid van Moolenbroek 	case 109: result = tostruct_eui64(rdata, target, mctx); break; \
1061*00b67f09SDavid van Moolenbroek 	case 249: result = tostruct_tkey(rdata, target, mctx); break; \
1062*00b67f09SDavid van Moolenbroek 	case 250: switch (rdata->rdclass) { \
1063*00b67f09SDavid van Moolenbroek 		case 255: result = tostruct_any_tsig(rdata, target, mctx); break; \
1064*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1065*00b67f09SDavid van Moolenbroek 		} \
1066*00b67f09SDavid van Moolenbroek 		break; \
1067*00b67f09SDavid van Moolenbroek 	case 256: result = tostruct_uri(rdata, target, mctx); break; \
1068*00b67f09SDavid van Moolenbroek 	case 257: result = tostruct_caa(rdata, target, mctx); break; \
1069*00b67f09SDavid van Moolenbroek 	case 32769: result = tostruct_dlv(rdata, target, mctx); break; \
1070*00b67f09SDavid van Moolenbroek 	case 65533: result = tostruct_keydata(rdata, target, mctx); break; \
1071*00b67f09SDavid van Moolenbroek 	default: use_default = ISC_TRUE; break; \
1072*00b67f09SDavid van Moolenbroek 	}
1073*00b67f09SDavid van Moolenbroek 
1074*00b67f09SDavid van Moolenbroek #define FREESTRUCTSWITCH \
1075*00b67f09SDavid van Moolenbroek 	switch (common->rdtype) { \
1076*00b67f09SDavid van Moolenbroek 	case 1: switch (common->rdclass) { \
1077*00b67f09SDavid van Moolenbroek 		case 1: freestruct_in_a(source); break; \
1078*00b67f09SDavid van Moolenbroek 		case 3: freestruct_ch_a(source); break; \
1079*00b67f09SDavid van Moolenbroek 		case 4: freestruct_hs_a(source); break; \
1080*00b67f09SDavid van Moolenbroek 		default: break; \
1081*00b67f09SDavid van Moolenbroek 		} \
1082*00b67f09SDavid van Moolenbroek 		break; \
1083*00b67f09SDavid van Moolenbroek 	case 2: freestruct_ns(source); break; \
1084*00b67f09SDavid van Moolenbroek 	case 3: freestruct_md(source); break; \
1085*00b67f09SDavid van Moolenbroek 	case 4: freestruct_mf(source); break; \
1086*00b67f09SDavid van Moolenbroek 	case 5: freestruct_cname(source); break; \
1087*00b67f09SDavid van Moolenbroek 	case 6: freestruct_soa(source); break; \
1088*00b67f09SDavid van Moolenbroek 	case 7: freestruct_mb(source); break; \
1089*00b67f09SDavid van Moolenbroek 	case 8: freestruct_mg(source); break; \
1090*00b67f09SDavid van Moolenbroek 	case 9: freestruct_mr(source); break; \
1091*00b67f09SDavid van Moolenbroek 	case 10: freestruct_null(source); break; \
1092*00b67f09SDavid van Moolenbroek 	case 11: switch (common->rdclass) { \
1093*00b67f09SDavid van Moolenbroek 		case 1: freestruct_in_wks(source); break; \
1094*00b67f09SDavid van Moolenbroek 		default: break; \
1095*00b67f09SDavid van Moolenbroek 		} \
1096*00b67f09SDavid van Moolenbroek 		break; \
1097*00b67f09SDavid van Moolenbroek 	case 12: freestruct_ptr(source); break; \
1098*00b67f09SDavid van Moolenbroek 	case 13: freestruct_hinfo(source); break; \
1099*00b67f09SDavid van Moolenbroek 	case 14: freestruct_minfo(source); break; \
1100*00b67f09SDavid van Moolenbroek 	case 15: freestruct_mx(source); break; \
1101*00b67f09SDavid van Moolenbroek 	case 16: freestruct_txt(source); break; \
1102*00b67f09SDavid van Moolenbroek 	case 17: freestruct_rp(source); break; \
1103*00b67f09SDavid van Moolenbroek 	case 18: freestruct_afsdb(source); break; \
1104*00b67f09SDavid van Moolenbroek 	case 19: freestruct_x25(source); break; \
1105*00b67f09SDavid van Moolenbroek 	case 20: freestruct_isdn(source); break; \
1106*00b67f09SDavid van Moolenbroek 	case 21: freestruct_rt(source); break; \
1107*00b67f09SDavid van Moolenbroek 	case 22: switch (common->rdclass) { \
1108*00b67f09SDavid van Moolenbroek 		case 1: freestruct_in_nsap(source); break; \
1109*00b67f09SDavid van Moolenbroek 		default: break; \
1110*00b67f09SDavid van Moolenbroek 		} \
1111*00b67f09SDavid van Moolenbroek 		break; \
1112*00b67f09SDavid van Moolenbroek 	case 23: switch (common->rdclass) { \
1113*00b67f09SDavid van Moolenbroek 		case 1: freestruct_in_nsap_ptr(source); break; \
1114*00b67f09SDavid van Moolenbroek 		default: break; \
1115*00b67f09SDavid van Moolenbroek 		} \
1116*00b67f09SDavid van Moolenbroek 		break; \
1117*00b67f09SDavid van Moolenbroek 	case 24: freestruct_sig(source); break; \
1118*00b67f09SDavid van Moolenbroek 	case 25: freestruct_key(source); break; \
1119*00b67f09SDavid van Moolenbroek 	case 26: switch (common->rdclass) { \
1120*00b67f09SDavid van Moolenbroek 		case 1: freestruct_in_px(source); break; \
1121*00b67f09SDavid van Moolenbroek 		default: break; \
1122*00b67f09SDavid van Moolenbroek 		} \
1123*00b67f09SDavid van Moolenbroek 		break; \
1124*00b67f09SDavid van Moolenbroek 	case 27: freestruct_gpos(source); break; \
1125*00b67f09SDavid van Moolenbroek 	case 28: switch (common->rdclass) { \
1126*00b67f09SDavid van Moolenbroek 		case 1: freestruct_in_aaaa(source); break; \
1127*00b67f09SDavid van Moolenbroek 		default: break; \
1128*00b67f09SDavid van Moolenbroek 		} \
1129*00b67f09SDavid van Moolenbroek 		break; \
1130*00b67f09SDavid van Moolenbroek 	case 29: freestruct_loc(source); break; \
1131*00b67f09SDavid van Moolenbroek 	case 30: freestruct_nxt(source); break; \
1132*00b67f09SDavid van Moolenbroek 	case 33: switch (common->rdclass) { \
1133*00b67f09SDavid van Moolenbroek 		case 1: freestruct_in_srv(source); break; \
1134*00b67f09SDavid van Moolenbroek 		default: break; \
1135*00b67f09SDavid van Moolenbroek 		} \
1136*00b67f09SDavid van Moolenbroek 		break; \
1137*00b67f09SDavid van Moolenbroek 	case 35: freestruct_naptr(source); break; \
1138*00b67f09SDavid van Moolenbroek 	case 36: switch (common->rdclass) { \
1139*00b67f09SDavid van Moolenbroek 		case 1: freestruct_in_kx(source); break; \
1140*00b67f09SDavid van Moolenbroek 		default: break; \
1141*00b67f09SDavid van Moolenbroek 		} \
1142*00b67f09SDavid van Moolenbroek 		break; \
1143*00b67f09SDavid van Moolenbroek 	case 37: freestruct_cert(source); break; \
1144*00b67f09SDavid van Moolenbroek 	case 38: switch (common->rdclass) { \
1145*00b67f09SDavid van Moolenbroek 		case 1: freestruct_in_a6(source); break; \
1146*00b67f09SDavid van Moolenbroek 		default: break; \
1147*00b67f09SDavid van Moolenbroek 		} \
1148*00b67f09SDavid van Moolenbroek 		break; \
1149*00b67f09SDavid van Moolenbroek 	case 39: freestruct_dname(source); break; \
1150*00b67f09SDavid van Moolenbroek 	case 41: freestruct_opt(source); break; \
1151*00b67f09SDavid van Moolenbroek 	case 42: switch (common->rdclass) { \
1152*00b67f09SDavid van Moolenbroek 		case 1: freestruct_in_apl(source); break; \
1153*00b67f09SDavid van Moolenbroek 		default: break; \
1154*00b67f09SDavid van Moolenbroek 		} \
1155*00b67f09SDavid van Moolenbroek 		break; \
1156*00b67f09SDavid van Moolenbroek 	case 43: freestruct_ds(source); break; \
1157*00b67f09SDavid van Moolenbroek 	case 44: freestruct_sshfp(source); break; \
1158*00b67f09SDavid van Moolenbroek 	case 45: freestruct_ipseckey(source); break; \
1159*00b67f09SDavid van Moolenbroek 	case 46: freestruct_rrsig(source); break; \
1160*00b67f09SDavid van Moolenbroek 	case 47: freestruct_nsec(source); break; \
1161*00b67f09SDavid van Moolenbroek 	case 48: freestruct_dnskey(source); break; \
1162*00b67f09SDavid van Moolenbroek 	case 49: switch (common->rdclass) { \
1163*00b67f09SDavid van Moolenbroek 		case 1: freestruct_in_dhcid(source); break; \
1164*00b67f09SDavid van Moolenbroek 		default: break; \
1165*00b67f09SDavid van Moolenbroek 		} \
1166*00b67f09SDavid van Moolenbroek 		break; \
1167*00b67f09SDavid van Moolenbroek 	case 50: freestruct_nsec3(source); break; \
1168*00b67f09SDavid van Moolenbroek 	case 51: freestruct_nsec3param(source); break; \
1169*00b67f09SDavid van Moolenbroek 	case 52: freestruct_tlsa(source); break; \
1170*00b67f09SDavid van Moolenbroek 	case 55: freestruct_hip(source); break; \
1171*00b67f09SDavid van Moolenbroek 	case 59: freestruct_cds(source); break; \
1172*00b67f09SDavid van Moolenbroek 	case 60: freestruct_cdnskey(source); break; \
1173*00b67f09SDavid van Moolenbroek 	case 61: freestruct_openpgpkey(source); break; \
1174*00b67f09SDavid van Moolenbroek 	case 99: freestruct_spf(source); break; \
1175*00b67f09SDavid van Moolenbroek 	case 103: freestruct_unspec(source); break; \
1176*00b67f09SDavid van Moolenbroek 	case 104: freestruct_nid(source); break; \
1177*00b67f09SDavid van Moolenbroek 	case 105: freestruct_l32(source); break; \
1178*00b67f09SDavid van Moolenbroek 	case 106: freestruct_l64(source); break; \
1179*00b67f09SDavid van Moolenbroek 	case 107: freestruct_lp(source); break; \
1180*00b67f09SDavid van Moolenbroek 	case 108: freestruct_eui48(source); break; \
1181*00b67f09SDavid van Moolenbroek 	case 109: freestruct_eui64(source); break; \
1182*00b67f09SDavid van Moolenbroek 	case 249: freestruct_tkey(source); break; \
1183*00b67f09SDavid van Moolenbroek 	case 250: switch (common->rdclass) { \
1184*00b67f09SDavid van Moolenbroek 		case 255: freestruct_any_tsig(source); break; \
1185*00b67f09SDavid van Moolenbroek 		default: break; \
1186*00b67f09SDavid van Moolenbroek 		} \
1187*00b67f09SDavid van Moolenbroek 		break; \
1188*00b67f09SDavid van Moolenbroek 	case 256: freestruct_uri(source); break; \
1189*00b67f09SDavid van Moolenbroek 	case 257: freestruct_caa(source); break; \
1190*00b67f09SDavid van Moolenbroek 	case 32769: freestruct_dlv(source); break; \
1191*00b67f09SDavid van Moolenbroek 	case 65533: freestruct_keydata(source); break; \
1192*00b67f09SDavid van Moolenbroek 	default: break; \
1193*00b67f09SDavid van Moolenbroek 	}
1194*00b67f09SDavid van Moolenbroek 
1195*00b67f09SDavid van Moolenbroek #define ADDITIONALDATASWITCH \
1196*00b67f09SDavid van Moolenbroek 	switch (rdata->type) { \
1197*00b67f09SDavid van Moolenbroek 	case 1: switch (rdata->rdclass) { \
1198*00b67f09SDavid van Moolenbroek 		case 1: result = additionaldata_in_a(rdata, add, arg); break; \
1199*00b67f09SDavid van Moolenbroek 		case 3: result = additionaldata_ch_a(rdata, add, arg); break; \
1200*00b67f09SDavid van Moolenbroek 		case 4: result = additionaldata_hs_a(rdata, add, arg); break; \
1201*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1202*00b67f09SDavid van Moolenbroek 		} \
1203*00b67f09SDavid van Moolenbroek 		break; \
1204*00b67f09SDavid van Moolenbroek 	case 2: result = additionaldata_ns(rdata, add, arg); break; \
1205*00b67f09SDavid van Moolenbroek 	case 3: result = additionaldata_md(rdata, add, arg); break; \
1206*00b67f09SDavid van Moolenbroek 	case 4: result = additionaldata_mf(rdata, add, arg); break; \
1207*00b67f09SDavid van Moolenbroek 	case 5: result = additionaldata_cname(rdata, add, arg); break; \
1208*00b67f09SDavid van Moolenbroek 	case 6: result = additionaldata_soa(rdata, add, arg); break; \
1209*00b67f09SDavid van Moolenbroek 	case 7: result = additionaldata_mb(rdata, add, arg); break; \
1210*00b67f09SDavid van Moolenbroek 	case 8: result = additionaldata_mg(rdata, add, arg); break; \
1211*00b67f09SDavid van Moolenbroek 	case 9: result = additionaldata_mr(rdata, add, arg); break; \
1212*00b67f09SDavid van Moolenbroek 	case 10: result = additionaldata_null(rdata, add, arg); break; \
1213*00b67f09SDavid van Moolenbroek 	case 11: switch (rdata->rdclass) { \
1214*00b67f09SDavid van Moolenbroek 		case 1: result = additionaldata_in_wks(rdata, add, arg); break; \
1215*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1216*00b67f09SDavid van Moolenbroek 		} \
1217*00b67f09SDavid van Moolenbroek 		break; \
1218*00b67f09SDavid van Moolenbroek 	case 12: result = additionaldata_ptr(rdata, add, arg); break; \
1219*00b67f09SDavid van Moolenbroek 	case 13: result = additionaldata_hinfo(rdata, add, arg); break; \
1220*00b67f09SDavid van Moolenbroek 	case 14: result = additionaldata_minfo(rdata, add, arg); break; \
1221*00b67f09SDavid van Moolenbroek 	case 15: result = additionaldata_mx(rdata, add, arg); break; \
1222*00b67f09SDavid van Moolenbroek 	case 16: result = additionaldata_txt(rdata, add, arg); break; \
1223*00b67f09SDavid van Moolenbroek 	case 17: result = additionaldata_rp(rdata, add, arg); break; \
1224*00b67f09SDavid van Moolenbroek 	case 18: result = additionaldata_afsdb(rdata, add, arg); break; \
1225*00b67f09SDavid van Moolenbroek 	case 19: result = additionaldata_x25(rdata, add, arg); break; \
1226*00b67f09SDavid van Moolenbroek 	case 20: result = additionaldata_isdn(rdata, add, arg); break; \
1227*00b67f09SDavid van Moolenbroek 	case 21: result = additionaldata_rt(rdata, add, arg); break; \
1228*00b67f09SDavid van Moolenbroek 	case 22: switch (rdata->rdclass) { \
1229*00b67f09SDavid van Moolenbroek 		case 1: result = additionaldata_in_nsap(rdata, add, arg); break; \
1230*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1231*00b67f09SDavid van Moolenbroek 		} \
1232*00b67f09SDavid van Moolenbroek 		break; \
1233*00b67f09SDavid van Moolenbroek 	case 23: switch (rdata->rdclass) { \
1234*00b67f09SDavid van Moolenbroek 		case 1: result = additionaldata_in_nsap_ptr(rdata, add, arg); break; \
1235*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1236*00b67f09SDavid van Moolenbroek 		} \
1237*00b67f09SDavid van Moolenbroek 		break; \
1238*00b67f09SDavid van Moolenbroek 	case 24: result = additionaldata_sig(rdata, add, arg); break; \
1239*00b67f09SDavid van Moolenbroek 	case 25: result = additionaldata_key(rdata, add, arg); break; \
1240*00b67f09SDavid van Moolenbroek 	case 26: switch (rdata->rdclass) { \
1241*00b67f09SDavid van Moolenbroek 		case 1: result = additionaldata_in_px(rdata, add, arg); break; \
1242*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1243*00b67f09SDavid van Moolenbroek 		} \
1244*00b67f09SDavid van Moolenbroek 		break; \
1245*00b67f09SDavid van Moolenbroek 	case 27: result = additionaldata_gpos(rdata, add, arg); break; \
1246*00b67f09SDavid van Moolenbroek 	case 28: switch (rdata->rdclass) { \
1247*00b67f09SDavid van Moolenbroek 		case 1: result = additionaldata_in_aaaa(rdata, add, arg); break; \
1248*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1249*00b67f09SDavid van Moolenbroek 		} \
1250*00b67f09SDavid van Moolenbroek 		break; \
1251*00b67f09SDavid van Moolenbroek 	case 29: result = additionaldata_loc(rdata, add, arg); break; \
1252*00b67f09SDavid van Moolenbroek 	case 30: result = additionaldata_nxt(rdata, add, arg); break; \
1253*00b67f09SDavid van Moolenbroek 	case 33: switch (rdata->rdclass) { \
1254*00b67f09SDavid van Moolenbroek 		case 1: result = additionaldata_in_srv(rdata, add, arg); break; \
1255*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1256*00b67f09SDavid van Moolenbroek 		} \
1257*00b67f09SDavid van Moolenbroek 		break; \
1258*00b67f09SDavid van Moolenbroek 	case 35: result = additionaldata_naptr(rdata, add, arg); break; \
1259*00b67f09SDavid van Moolenbroek 	case 36: switch (rdata->rdclass) { \
1260*00b67f09SDavid van Moolenbroek 		case 1: result = additionaldata_in_kx(rdata, add, arg); break; \
1261*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1262*00b67f09SDavid van Moolenbroek 		} \
1263*00b67f09SDavid van Moolenbroek 		break; \
1264*00b67f09SDavid van Moolenbroek 	case 37: result = additionaldata_cert(rdata, add, arg); break; \
1265*00b67f09SDavid van Moolenbroek 	case 38: switch (rdata->rdclass) { \
1266*00b67f09SDavid van Moolenbroek 		case 1: result = additionaldata_in_a6(rdata, add, arg); break; \
1267*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1268*00b67f09SDavid van Moolenbroek 		} \
1269*00b67f09SDavid van Moolenbroek 		break; \
1270*00b67f09SDavid van Moolenbroek 	case 39: result = additionaldata_dname(rdata, add, arg); break; \
1271*00b67f09SDavid van Moolenbroek 	case 41: result = additionaldata_opt(rdata, add, arg); break; \
1272*00b67f09SDavid van Moolenbroek 	case 42: switch (rdata->rdclass) { \
1273*00b67f09SDavid van Moolenbroek 		case 1: result = additionaldata_in_apl(rdata, add, arg); break; \
1274*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1275*00b67f09SDavid van Moolenbroek 		} \
1276*00b67f09SDavid van Moolenbroek 		break; \
1277*00b67f09SDavid van Moolenbroek 	case 43: result = additionaldata_ds(rdata, add, arg); break; \
1278*00b67f09SDavid van Moolenbroek 	case 44: result = additionaldata_sshfp(rdata, add, arg); break; \
1279*00b67f09SDavid van Moolenbroek 	case 45: result = additionaldata_ipseckey(rdata, add, arg); break; \
1280*00b67f09SDavid van Moolenbroek 	case 46: result = additionaldata_rrsig(rdata, add, arg); break; \
1281*00b67f09SDavid van Moolenbroek 	case 47: result = additionaldata_nsec(rdata, add, arg); break; \
1282*00b67f09SDavid van Moolenbroek 	case 48: result = additionaldata_dnskey(rdata, add, arg); break; \
1283*00b67f09SDavid van Moolenbroek 	case 49: switch (rdata->rdclass) { \
1284*00b67f09SDavid van Moolenbroek 		case 1: result = additionaldata_in_dhcid(rdata, add, arg); break; \
1285*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1286*00b67f09SDavid van Moolenbroek 		} \
1287*00b67f09SDavid van Moolenbroek 		break; \
1288*00b67f09SDavid van Moolenbroek 	case 50: result = additionaldata_nsec3(rdata, add, arg); break; \
1289*00b67f09SDavid van Moolenbroek 	case 51: result = additionaldata_nsec3param(rdata, add, arg); break; \
1290*00b67f09SDavid van Moolenbroek 	case 52: result = additionaldata_tlsa(rdata, add, arg); break; \
1291*00b67f09SDavid van Moolenbroek 	case 55: result = additionaldata_hip(rdata, add, arg); break; \
1292*00b67f09SDavid van Moolenbroek 	case 59: result = additionaldata_cds(rdata, add, arg); break; \
1293*00b67f09SDavid van Moolenbroek 	case 60: result = additionaldata_cdnskey(rdata, add, arg); break; \
1294*00b67f09SDavid van Moolenbroek 	case 61: result = additionaldata_openpgpkey(rdata, add, arg); break; \
1295*00b67f09SDavid van Moolenbroek 	case 99: result = additionaldata_spf(rdata, add, arg); break; \
1296*00b67f09SDavid van Moolenbroek 	case 103: result = additionaldata_unspec(rdata, add, arg); break; \
1297*00b67f09SDavid van Moolenbroek 	case 104: result = additionaldata_nid(rdata, add, arg); break; \
1298*00b67f09SDavid van Moolenbroek 	case 105: result = additionaldata_l32(rdata, add, arg); break; \
1299*00b67f09SDavid van Moolenbroek 	case 106: result = additionaldata_l64(rdata, add, arg); break; \
1300*00b67f09SDavid van Moolenbroek 	case 107: result = additionaldata_lp(rdata, add, arg); break; \
1301*00b67f09SDavid van Moolenbroek 	case 108: result = additionaldata_eui48(rdata, add, arg); break; \
1302*00b67f09SDavid van Moolenbroek 	case 109: result = additionaldata_eui64(rdata, add, arg); break; \
1303*00b67f09SDavid van Moolenbroek 	case 249: result = additionaldata_tkey(rdata, add, arg); break; \
1304*00b67f09SDavid van Moolenbroek 	case 250: switch (rdata->rdclass) { \
1305*00b67f09SDavid van Moolenbroek 		case 255: result = additionaldata_any_tsig(rdata, add, arg); break; \
1306*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1307*00b67f09SDavid van Moolenbroek 		} \
1308*00b67f09SDavid van Moolenbroek 		break; \
1309*00b67f09SDavid van Moolenbroek 	case 256: result = additionaldata_uri(rdata, add, arg); break; \
1310*00b67f09SDavid van Moolenbroek 	case 257: result = additionaldata_caa(rdata, add, arg); break; \
1311*00b67f09SDavid van Moolenbroek 	case 32769: result = additionaldata_dlv(rdata, add, arg); break; \
1312*00b67f09SDavid van Moolenbroek 	case 65533: result = additionaldata_keydata(rdata, add, arg); break; \
1313*00b67f09SDavid van Moolenbroek 	default: use_default = ISC_TRUE; break; \
1314*00b67f09SDavid van Moolenbroek 	}
1315*00b67f09SDavid van Moolenbroek 
1316*00b67f09SDavid van Moolenbroek #define DIGESTSWITCH \
1317*00b67f09SDavid van Moolenbroek 	switch (rdata->type) { \
1318*00b67f09SDavid van Moolenbroek 	case 1: switch (rdata->rdclass) { \
1319*00b67f09SDavid van Moolenbroek 		case 1: result = digest_in_a(rdata, digest, arg); break; \
1320*00b67f09SDavid van Moolenbroek 		case 3: result = digest_ch_a(rdata, digest, arg); break; \
1321*00b67f09SDavid van Moolenbroek 		case 4: result = digest_hs_a(rdata, digest, arg); break; \
1322*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1323*00b67f09SDavid van Moolenbroek 		} \
1324*00b67f09SDavid van Moolenbroek 		break; \
1325*00b67f09SDavid van Moolenbroek 	case 2: result = digest_ns(rdata, digest, arg); break; \
1326*00b67f09SDavid van Moolenbroek 	case 3: result = digest_md(rdata, digest, arg); break; \
1327*00b67f09SDavid van Moolenbroek 	case 4: result = digest_mf(rdata, digest, arg); break; \
1328*00b67f09SDavid van Moolenbroek 	case 5: result = digest_cname(rdata, digest, arg); break; \
1329*00b67f09SDavid van Moolenbroek 	case 6: result = digest_soa(rdata, digest, arg); break; \
1330*00b67f09SDavid van Moolenbroek 	case 7: result = digest_mb(rdata, digest, arg); break; \
1331*00b67f09SDavid van Moolenbroek 	case 8: result = digest_mg(rdata, digest, arg); break; \
1332*00b67f09SDavid van Moolenbroek 	case 9: result = digest_mr(rdata, digest, arg); break; \
1333*00b67f09SDavid van Moolenbroek 	case 10: result = digest_null(rdata, digest, arg); break; \
1334*00b67f09SDavid van Moolenbroek 	case 11: switch (rdata->rdclass) { \
1335*00b67f09SDavid van Moolenbroek 		case 1: result = digest_in_wks(rdata, digest, arg); break; \
1336*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1337*00b67f09SDavid van Moolenbroek 		} \
1338*00b67f09SDavid van Moolenbroek 		break; \
1339*00b67f09SDavid van Moolenbroek 	case 12: result = digest_ptr(rdata, digest, arg); break; \
1340*00b67f09SDavid van Moolenbroek 	case 13: result = digest_hinfo(rdata, digest, arg); break; \
1341*00b67f09SDavid van Moolenbroek 	case 14: result = digest_minfo(rdata, digest, arg); break; \
1342*00b67f09SDavid van Moolenbroek 	case 15: result = digest_mx(rdata, digest, arg); break; \
1343*00b67f09SDavid van Moolenbroek 	case 16: result = digest_txt(rdata, digest, arg); break; \
1344*00b67f09SDavid van Moolenbroek 	case 17: result = digest_rp(rdata, digest, arg); break; \
1345*00b67f09SDavid van Moolenbroek 	case 18: result = digest_afsdb(rdata, digest, arg); break; \
1346*00b67f09SDavid van Moolenbroek 	case 19: result = digest_x25(rdata, digest, arg); break; \
1347*00b67f09SDavid van Moolenbroek 	case 20: result = digest_isdn(rdata, digest, arg); break; \
1348*00b67f09SDavid van Moolenbroek 	case 21: result = digest_rt(rdata, digest, arg); break; \
1349*00b67f09SDavid van Moolenbroek 	case 22: switch (rdata->rdclass) { \
1350*00b67f09SDavid van Moolenbroek 		case 1: result = digest_in_nsap(rdata, digest, arg); break; \
1351*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1352*00b67f09SDavid van Moolenbroek 		} \
1353*00b67f09SDavid van Moolenbroek 		break; \
1354*00b67f09SDavid van Moolenbroek 	case 23: switch (rdata->rdclass) { \
1355*00b67f09SDavid van Moolenbroek 		case 1: result = digest_in_nsap_ptr(rdata, digest, arg); break; \
1356*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1357*00b67f09SDavid van Moolenbroek 		} \
1358*00b67f09SDavid van Moolenbroek 		break; \
1359*00b67f09SDavid van Moolenbroek 	case 24: result = digest_sig(rdata, digest, arg); break; \
1360*00b67f09SDavid van Moolenbroek 	case 25: result = digest_key(rdata, digest, arg); break; \
1361*00b67f09SDavid van Moolenbroek 	case 26: switch (rdata->rdclass) { \
1362*00b67f09SDavid van Moolenbroek 		case 1: result = digest_in_px(rdata, digest, arg); break; \
1363*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1364*00b67f09SDavid van Moolenbroek 		} \
1365*00b67f09SDavid van Moolenbroek 		break; \
1366*00b67f09SDavid van Moolenbroek 	case 27: result = digest_gpos(rdata, digest, arg); break; \
1367*00b67f09SDavid van Moolenbroek 	case 28: switch (rdata->rdclass) { \
1368*00b67f09SDavid van Moolenbroek 		case 1: result = digest_in_aaaa(rdata, digest, arg); break; \
1369*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1370*00b67f09SDavid van Moolenbroek 		} \
1371*00b67f09SDavid van Moolenbroek 		break; \
1372*00b67f09SDavid van Moolenbroek 	case 29: result = digest_loc(rdata, digest, arg); break; \
1373*00b67f09SDavid van Moolenbroek 	case 30: result = digest_nxt(rdata, digest, arg); break; \
1374*00b67f09SDavid van Moolenbroek 	case 33: switch (rdata->rdclass) { \
1375*00b67f09SDavid van Moolenbroek 		case 1: result = digest_in_srv(rdata, digest, arg); break; \
1376*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1377*00b67f09SDavid van Moolenbroek 		} \
1378*00b67f09SDavid van Moolenbroek 		break; \
1379*00b67f09SDavid van Moolenbroek 	case 35: result = digest_naptr(rdata, digest, arg); break; \
1380*00b67f09SDavid van Moolenbroek 	case 36: switch (rdata->rdclass) { \
1381*00b67f09SDavid van Moolenbroek 		case 1: result = digest_in_kx(rdata, digest, arg); break; \
1382*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1383*00b67f09SDavid van Moolenbroek 		} \
1384*00b67f09SDavid van Moolenbroek 		break; \
1385*00b67f09SDavid van Moolenbroek 	case 37: result = digest_cert(rdata, digest, arg); break; \
1386*00b67f09SDavid van Moolenbroek 	case 38: switch (rdata->rdclass) { \
1387*00b67f09SDavid van Moolenbroek 		case 1: result = digest_in_a6(rdata, digest, arg); break; \
1388*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1389*00b67f09SDavid van Moolenbroek 		} \
1390*00b67f09SDavid van Moolenbroek 		break; \
1391*00b67f09SDavid van Moolenbroek 	case 39: result = digest_dname(rdata, digest, arg); break; \
1392*00b67f09SDavid van Moolenbroek 	case 41: result = digest_opt(rdata, digest, arg); break; \
1393*00b67f09SDavid van Moolenbroek 	case 42: switch (rdata->rdclass) { \
1394*00b67f09SDavid van Moolenbroek 		case 1: result = digest_in_apl(rdata, digest, arg); break; \
1395*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1396*00b67f09SDavid van Moolenbroek 		} \
1397*00b67f09SDavid van Moolenbroek 		break; \
1398*00b67f09SDavid van Moolenbroek 	case 43: result = digest_ds(rdata, digest, arg); break; \
1399*00b67f09SDavid van Moolenbroek 	case 44: result = digest_sshfp(rdata, digest, arg); break; \
1400*00b67f09SDavid van Moolenbroek 	case 45: result = digest_ipseckey(rdata, digest, arg); break; \
1401*00b67f09SDavid van Moolenbroek 	case 46: result = digest_rrsig(rdata, digest, arg); break; \
1402*00b67f09SDavid van Moolenbroek 	case 47: result = digest_nsec(rdata, digest, arg); break; \
1403*00b67f09SDavid van Moolenbroek 	case 48: result = digest_dnskey(rdata, digest, arg); break; \
1404*00b67f09SDavid van Moolenbroek 	case 49: switch (rdata->rdclass) { \
1405*00b67f09SDavid van Moolenbroek 		case 1: result = digest_in_dhcid(rdata, digest, arg); break; \
1406*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1407*00b67f09SDavid van Moolenbroek 		} \
1408*00b67f09SDavid van Moolenbroek 		break; \
1409*00b67f09SDavid van Moolenbroek 	case 50: result = digest_nsec3(rdata, digest, arg); break; \
1410*00b67f09SDavid van Moolenbroek 	case 51: result = digest_nsec3param(rdata, digest, arg); break; \
1411*00b67f09SDavid van Moolenbroek 	case 52: result = digest_tlsa(rdata, digest, arg); break; \
1412*00b67f09SDavid van Moolenbroek 	case 55: result = digest_hip(rdata, digest, arg); break; \
1413*00b67f09SDavid van Moolenbroek 	case 59: result = digest_cds(rdata, digest, arg); break; \
1414*00b67f09SDavid van Moolenbroek 	case 60: result = digest_cdnskey(rdata, digest, arg); break; \
1415*00b67f09SDavid van Moolenbroek 	case 61: result = digest_openpgpkey(rdata, digest, arg); break; \
1416*00b67f09SDavid van Moolenbroek 	case 99: result = digest_spf(rdata, digest, arg); break; \
1417*00b67f09SDavid van Moolenbroek 	case 103: result = digest_unspec(rdata, digest, arg); break; \
1418*00b67f09SDavid van Moolenbroek 	case 104: result = digest_nid(rdata, digest, arg); break; \
1419*00b67f09SDavid van Moolenbroek 	case 105: result = digest_l32(rdata, digest, arg); break; \
1420*00b67f09SDavid van Moolenbroek 	case 106: result = digest_l64(rdata, digest, arg); break; \
1421*00b67f09SDavid van Moolenbroek 	case 107: result = digest_lp(rdata, digest, arg); break; \
1422*00b67f09SDavid van Moolenbroek 	case 108: result = digest_eui48(rdata, digest, arg); break; \
1423*00b67f09SDavid van Moolenbroek 	case 109: result = digest_eui64(rdata, digest, arg); break; \
1424*00b67f09SDavid van Moolenbroek 	case 249: result = digest_tkey(rdata, digest, arg); break; \
1425*00b67f09SDavid van Moolenbroek 	case 250: switch (rdata->rdclass) { \
1426*00b67f09SDavid van Moolenbroek 		case 255: result = digest_any_tsig(rdata, digest, arg); break; \
1427*00b67f09SDavid van Moolenbroek 		default: use_default = ISC_TRUE; break; \
1428*00b67f09SDavid van Moolenbroek 		} \
1429*00b67f09SDavid van Moolenbroek 		break; \
1430*00b67f09SDavid van Moolenbroek 	case 256: result = digest_uri(rdata, digest, arg); break; \
1431*00b67f09SDavid van Moolenbroek 	case 257: result = digest_caa(rdata, digest, arg); break; \
1432*00b67f09SDavid van Moolenbroek 	case 32769: result = digest_dlv(rdata, digest, arg); break; \
1433*00b67f09SDavid van Moolenbroek 	case 65533: result = digest_keydata(rdata, digest, arg); break; \
1434*00b67f09SDavid van Moolenbroek 	default: use_default = ISC_TRUE; break; \
1435*00b67f09SDavid van Moolenbroek 	}
1436*00b67f09SDavid van Moolenbroek 
1437*00b67f09SDavid van Moolenbroek #define CHECKOWNERSWITCH \
1438*00b67f09SDavid van Moolenbroek 	switch (type) { \
1439*00b67f09SDavid van Moolenbroek 	case 1: switch (rdclass) { \
1440*00b67f09SDavid van Moolenbroek 		case 1: result = checkowner_in_a(name, rdclass, type, wildcard); break; \
1441*00b67f09SDavid van Moolenbroek 		case 3: result = checkowner_ch_a(name, rdclass, type, wildcard); break; \
1442*00b67f09SDavid van Moolenbroek 		case 4: result = checkowner_hs_a(name, rdclass, type, wildcard); break; \
1443*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1444*00b67f09SDavid van Moolenbroek 		} \
1445*00b67f09SDavid van Moolenbroek 		break; \
1446*00b67f09SDavid van Moolenbroek 	case 2: result = checkowner_ns(name, rdclass, type, wildcard); break; \
1447*00b67f09SDavid van Moolenbroek 	case 3: result = checkowner_md(name, rdclass, type, wildcard); break; \
1448*00b67f09SDavid van Moolenbroek 	case 4: result = checkowner_mf(name, rdclass, type, wildcard); break; \
1449*00b67f09SDavid van Moolenbroek 	case 5: result = checkowner_cname(name, rdclass, type, wildcard); break; \
1450*00b67f09SDavid van Moolenbroek 	case 6: result = checkowner_soa(name, rdclass, type, wildcard); break; \
1451*00b67f09SDavid van Moolenbroek 	case 7: result = checkowner_mb(name, rdclass, type, wildcard); break; \
1452*00b67f09SDavid van Moolenbroek 	case 8: result = checkowner_mg(name, rdclass, type, wildcard); break; \
1453*00b67f09SDavid van Moolenbroek 	case 9: result = checkowner_mr(name, rdclass, type, wildcard); break; \
1454*00b67f09SDavid van Moolenbroek 	case 10: result = checkowner_null(name, rdclass, type, wildcard); break; \
1455*00b67f09SDavid van Moolenbroek 	case 11: switch (rdclass) { \
1456*00b67f09SDavid van Moolenbroek 		case 1: result = checkowner_in_wks(name, rdclass, type, wildcard); break; \
1457*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1458*00b67f09SDavid van Moolenbroek 		} \
1459*00b67f09SDavid van Moolenbroek 		break; \
1460*00b67f09SDavid van Moolenbroek 	case 12: result = checkowner_ptr(name, rdclass, type, wildcard); break; \
1461*00b67f09SDavid van Moolenbroek 	case 13: result = checkowner_hinfo(name, rdclass, type, wildcard); break; \
1462*00b67f09SDavid van Moolenbroek 	case 14: result = checkowner_minfo(name, rdclass, type, wildcard); break; \
1463*00b67f09SDavid van Moolenbroek 	case 15: result = checkowner_mx(name, rdclass, type, wildcard); break; \
1464*00b67f09SDavid van Moolenbroek 	case 16: result = checkowner_txt(name, rdclass, type, wildcard); break; \
1465*00b67f09SDavid van Moolenbroek 	case 17: result = checkowner_rp(name, rdclass, type, wildcard); break; \
1466*00b67f09SDavid van Moolenbroek 	case 18: result = checkowner_afsdb(name, rdclass, type, wildcard); break; \
1467*00b67f09SDavid van Moolenbroek 	case 19: result = checkowner_x25(name, rdclass, type, wildcard); break; \
1468*00b67f09SDavid van Moolenbroek 	case 20: result = checkowner_isdn(name, rdclass, type, wildcard); break; \
1469*00b67f09SDavid van Moolenbroek 	case 21: result = checkowner_rt(name, rdclass, type, wildcard); break; \
1470*00b67f09SDavid van Moolenbroek 	case 22: switch (rdclass) { \
1471*00b67f09SDavid van Moolenbroek 		case 1: result = checkowner_in_nsap(name, rdclass, type, wildcard); break; \
1472*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1473*00b67f09SDavid van Moolenbroek 		} \
1474*00b67f09SDavid van Moolenbroek 		break; \
1475*00b67f09SDavid van Moolenbroek 	case 23: switch (rdclass) { \
1476*00b67f09SDavid van Moolenbroek 		case 1: result = checkowner_in_nsap_ptr(name, rdclass, type, wildcard); break; \
1477*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1478*00b67f09SDavid van Moolenbroek 		} \
1479*00b67f09SDavid van Moolenbroek 		break; \
1480*00b67f09SDavid van Moolenbroek 	case 24: result = checkowner_sig(name, rdclass, type, wildcard); break; \
1481*00b67f09SDavid van Moolenbroek 	case 25: result = checkowner_key(name, rdclass, type, wildcard); break; \
1482*00b67f09SDavid van Moolenbroek 	case 26: switch (rdclass) { \
1483*00b67f09SDavid van Moolenbroek 		case 1: result = checkowner_in_px(name, rdclass, type, wildcard); break; \
1484*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1485*00b67f09SDavid van Moolenbroek 		} \
1486*00b67f09SDavid van Moolenbroek 		break; \
1487*00b67f09SDavid van Moolenbroek 	case 27: result = checkowner_gpos(name, rdclass, type, wildcard); break; \
1488*00b67f09SDavid van Moolenbroek 	case 28: switch (rdclass) { \
1489*00b67f09SDavid van Moolenbroek 		case 1: result = checkowner_in_aaaa(name, rdclass, type, wildcard); break; \
1490*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1491*00b67f09SDavid van Moolenbroek 		} \
1492*00b67f09SDavid van Moolenbroek 		break; \
1493*00b67f09SDavid van Moolenbroek 	case 29: result = checkowner_loc(name, rdclass, type, wildcard); break; \
1494*00b67f09SDavid van Moolenbroek 	case 30: result = checkowner_nxt(name, rdclass, type, wildcard); break; \
1495*00b67f09SDavid van Moolenbroek 	case 33: switch (rdclass) { \
1496*00b67f09SDavid van Moolenbroek 		case 1: result = checkowner_in_srv(name, rdclass, type, wildcard); break; \
1497*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1498*00b67f09SDavid van Moolenbroek 		} \
1499*00b67f09SDavid van Moolenbroek 		break; \
1500*00b67f09SDavid van Moolenbroek 	case 35: result = checkowner_naptr(name, rdclass, type, wildcard); break; \
1501*00b67f09SDavid van Moolenbroek 	case 36: switch (rdclass) { \
1502*00b67f09SDavid van Moolenbroek 		case 1: result = checkowner_in_kx(name, rdclass, type, wildcard); break; \
1503*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1504*00b67f09SDavid van Moolenbroek 		} \
1505*00b67f09SDavid van Moolenbroek 		break; \
1506*00b67f09SDavid van Moolenbroek 	case 37: result = checkowner_cert(name, rdclass, type, wildcard); break; \
1507*00b67f09SDavid van Moolenbroek 	case 38: switch (rdclass) { \
1508*00b67f09SDavid van Moolenbroek 		case 1: result = checkowner_in_a6(name, rdclass, type, wildcard); break; \
1509*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1510*00b67f09SDavid van Moolenbroek 		} \
1511*00b67f09SDavid van Moolenbroek 		break; \
1512*00b67f09SDavid van Moolenbroek 	case 39: result = checkowner_dname(name, rdclass, type, wildcard); break; \
1513*00b67f09SDavid van Moolenbroek 	case 41: result = checkowner_opt(name, rdclass, type, wildcard); break; \
1514*00b67f09SDavid van Moolenbroek 	case 42: switch (rdclass) { \
1515*00b67f09SDavid van Moolenbroek 		case 1: result = checkowner_in_apl(name, rdclass, type, wildcard); break; \
1516*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1517*00b67f09SDavid van Moolenbroek 		} \
1518*00b67f09SDavid van Moolenbroek 		break; \
1519*00b67f09SDavid van Moolenbroek 	case 43: result = checkowner_ds(name, rdclass, type, wildcard); break; \
1520*00b67f09SDavid van Moolenbroek 	case 44: result = checkowner_sshfp(name, rdclass, type, wildcard); break; \
1521*00b67f09SDavid van Moolenbroek 	case 45: result = checkowner_ipseckey(name, rdclass, type, wildcard); break; \
1522*00b67f09SDavid van Moolenbroek 	case 46: result = checkowner_rrsig(name, rdclass, type, wildcard); break; \
1523*00b67f09SDavid van Moolenbroek 	case 47: result = checkowner_nsec(name, rdclass, type, wildcard); break; \
1524*00b67f09SDavid van Moolenbroek 	case 48: result = checkowner_dnskey(name, rdclass, type, wildcard); break; \
1525*00b67f09SDavid van Moolenbroek 	case 49: switch (rdclass) { \
1526*00b67f09SDavid van Moolenbroek 		case 1: result = checkowner_in_dhcid(name, rdclass, type, wildcard); break; \
1527*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1528*00b67f09SDavid van Moolenbroek 		} \
1529*00b67f09SDavid van Moolenbroek 		break; \
1530*00b67f09SDavid van Moolenbroek 	case 50: result = checkowner_nsec3(name, rdclass, type, wildcard); break; \
1531*00b67f09SDavid van Moolenbroek 	case 51: result = checkowner_nsec3param(name, rdclass, type, wildcard); break; \
1532*00b67f09SDavid van Moolenbroek 	case 52: result = checkowner_tlsa(name, rdclass, type, wildcard); break; \
1533*00b67f09SDavid van Moolenbroek 	case 55: result = checkowner_hip(name, rdclass, type, wildcard); break; \
1534*00b67f09SDavid van Moolenbroek 	case 59: result = checkowner_cds(name, rdclass, type, wildcard); break; \
1535*00b67f09SDavid van Moolenbroek 	case 60: result = checkowner_cdnskey(name, rdclass, type, wildcard); break; \
1536*00b67f09SDavid van Moolenbroek 	case 61: result = checkowner_openpgpkey(name, rdclass, type, wildcard); break; \
1537*00b67f09SDavid van Moolenbroek 	case 99: result = checkowner_spf(name, rdclass, type, wildcard); break; \
1538*00b67f09SDavid van Moolenbroek 	case 103: result = checkowner_unspec(name, rdclass, type, wildcard); break; \
1539*00b67f09SDavid van Moolenbroek 	case 104: result = checkowner_nid(name, rdclass, type, wildcard); break; \
1540*00b67f09SDavid van Moolenbroek 	case 105: result = checkowner_l32(name, rdclass, type, wildcard); break; \
1541*00b67f09SDavid van Moolenbroek 	case 106: result = checkowner_l64(name, rdclass, type, wildcard); break; \
1542*00b67f09SDavid van Moolenbroek 	case 107: result = checkowner_lp(name, rdclass, type, wildcard); break; \
1543*00b67f09SDavid van Moolenbroek 	case 108: result = checkowner_eui48(name, rdclass, type, wildcard); break; \
1544*00b67f09SDavid van Moolenbroek 	case 109: result = checkowner_eui64(name, rdclass, type, wildcard); break; \
1545*00b67f09SDavid van Moolenbroek 	case 249: result = checkowner_tkey(name, rdclass, type, wildcard); break; \
1546*00b67f09SDavid van Moolenbroek 	case 250: switch (rdclass) { \
1547*00b67f09SDavid van Moolenbroek 		case 255: result = checkowner_any_tsig(name, rdclass, type, wildcard); break; \
1548*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1549*00b67f09SDavid van Moolenbroek 		} \
1550*00b67f09SDavid van Moolenbroek 		break; \
1551*00b67f09SDavid van Moolenbroek 	case 256: result = checkowner_uri(name, rdclass, type, wildcard); break; \
1552*00b67f09SDavid van Moolenbroek 	case 257: result = checkowner_caa(name, rdclass, type, wildcard); break; \
1553*00b67f09SDavid van Moolenbroek 	case 32769: result = checkowner_dlv(name, rdclass, type, wildcard); break; \
1554*00b67f09SDavid van Moolenbroek 	case 65533: result = checkowner_keydata(name, rdclass, type, wildcard); break; \
1555*00b67f09SDavid van Moolenbroek 	default: result = ISC_TRUE; break; \
1556*00b67f09SDavid van Moolenbroek 	}
1557*00b67f09SDavid van Moolenbroek 
1558*00b67f09SDavid van Moolenbroek #define CHECKNAMESSWITCH \
1559*00b67f09SDavid van Moolenbroek 	switch (rdata->type) { \
1560*00b67f09SDavid van Moolenbroek 	case 1: switch (rdata->rdclass) { \
1561*00b67f09SDavid van Moolenbroek 		case 1: result = checknames_in_a(rdata, owner, bad); break; \
1562*00b67f09SDavid van Moolenbroek 		case 3: result = checknames_ch_a(rdata, owner, bad); break; \
1563*00b67f09SDavid van Moolenbroek 		case 4: result = checknames_hs_a(rdata, owner, bad); break; \
1564*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1565*00b67f09SDavid van Moolenbroek 		} \
1566*00b67f09SDavid van Moolenbroek 		break; \
1567*00b67f09SDavid van Moolenbroek 	case 2: result = checknames_ns(rdata, owner, bad); break; \
1568*00b67f09SDavid van Moolenbroek 	case 3: result = checknames_md(rdata, owner, bad); break; \
1569*00b67f09SDavid van Moolenbroek 	case 4: result = checknames_mf(rdata, owner, bad); break; \
1570*00b67f09SDavid van Moolenbroek 	case 5: result = checknames_cname(rdata, owner, bad); break; \
1571*00b67f09SDavid van Moolenbroek 	case 6: result = checknames_soa(rdata, owner, bad); break; \
1572*00b67f09SDavid van Moolenbroek 	case 7: result = checknames_mb(rdata, owner, bad); break; \
1573*00b67f09SDavid van Moolenbroek 	case 8: result = checknames_mg(rdata, owner, bad); break; \
1574*00b67f09SDavid van Moolenbroek 	case 9: result = checknames_mr(rdata, owner, bad); break; \
1575*00b67f09SDavid van Moolenbroek 	case 10: result = checknames_null(rdata, owner, bad); break; \
1576*00b67f09SDavid van Moolenbroek 	case 11: switch (rdata->rdclass) { \
1577*00b67f09SDavid van Moolenbroek 		case 1: result = checknames_in_wks(rdata, owner, bad); break; \
1578*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1579*00b67f09SDavid van Moolenbroek 		} \
1580*00b67f09SDavid van Moolenbroek 		break; \
1581*00b67f09SDavid van Moolenbroek 	case 12: result = checknames_ptr(rdata, owner, bad); break; \
1582*00b67f09SDavid van Moolenbroek 	case 13: result = checknames_hinfo(rdata, owner, bad); break; \
1583*00b67f09SDavid van Moolenbroek 	case 14: result = checknames_minfo(rdata, owner, bad); break; \
1584*00b67f09SDavid van Moolenbroek 	case 15: result = checknames_mx(rdata, owner, bad); break; \
1585*00b67f09SDavid van Moolenbroek 	case 16: result = checknames_txt(rdata, owner, bad); break; \
1586*00b67f09SDavid van Moolenbroek 	case 17: result = checknames_rp(rdata, owner, bad); break; \
1587*00b67f09SDavid van Moolenbroek 	case 18: result = checknames_afsdb(rdata, owner, bad); break; \
1588*00b67f09SDavid van Moolenbroek 	case 19: result = checknames_x25(rdata, owner, bad); break; \
1589*00b67f09SDavid van Moolenbroek 	case 20: result = checknames_isdn(rdata, owner, bad); break; \
1590*00b67f09SDavid van Moolenbroek 	case 21: result = checknames_rt(rdata, owner, bad); break; \
1591*00b67f09SDavid van Moolenbroek 	case 22: switch (rdata->rdclass) { \
1592*00b67f09SDavid van Moolenbroek 		case 1: result = checknames_in_nsap(rdata, owner, bad); break; \
1593*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1594*00b67f09SDavid van Moolenbroek 		} \
1595*00b67f09SDavid van Moolenbroek 		break; \
1596*00b67f09SDavid van Moolenbroek 	case 23: switch (rdata->rdclass) { \
1597*00b67f09SDavid van Moolenbroek 		case 1: result = checknames_in_nsap_ptr(rdata, owner, bad); break; \
1598*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1599*00b67f09SDavid van Moolenbroek 		} \
1600*00b67f09SDavid van Moolenbroek 		break; \
1601*00b67f09SDavid van Moolenbroek 	case 24: result = checknames_sig(rdata, owner, bad); break; \
1602*00b67f09SDavid van Moolenbroek 	case 25: result = checknames_key(rdata, owner, bad); break; \
1603*00b67f09SDavid van Moolenbroek 	case 26: switch (rdata->rdclass) { \
1604*00b67f09SDavid van Moolenbroek 		case 1: result = checknames_in_px(rdata, owner, bad); break; \
1605*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1606*00b67f09SDavid van Moolenbroek 		} \
1607*00b67f09SDavid van Moolenbroek 		break; \
1608*00b67f09SDavid van Moolenbroek 	case 27: result = checknames_gpos(rdata, owner, bad); break; \
1609*00b67f09SDavid van Moolenbroek 	case 28: switch (rdata->rdclass) { \
1610*00b67f09SDavid van Moolenbroek 		case 1: result = checknames_in_aaaa(rdata, owner, bad); break; \
1611*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1612*00b67f09SDavid van Moolenbroek 		} \
1613*00b67f09SDavid van Moolenbroek 		break; \
1614*00b67f09SDavid van Moolenbroek 	case 29: result = checknames_loc(rdata, owner, bad); break; \
1615*00b67f09SDavid van Moolenbroek 	case 30: result = checknames_nxt(rdata, owner, bad); break; \
1616*00b67f09SDavid van Moolenbroek 	case 33: switch (rdata->rdclass) { \
1617*00b67f09SDavid van Moolenbroek 		case 1: result = checknames_in_srv(rdata, owner, bad); break; \
1618*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1619*00b67f09SDavid van Moolenbroek 		} \
1620*00b67f09SDavid van Moolenbroek 		break; \
1621*00b67f09SDavid van Moolenbroek 	case 35: result = checknames_naptr(rdata, owner, bad); break; \
1622*00b67f09SDavid van Moolenbroek 	case 36: switch (rdata->rdclass) { \
1623*00b67f09SDavid van Moolenbroek 		case 1: result = checknames_in_kx(rdata, owner, bad); break; \
1624*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1625*00b67f09SDavid van Moolenbroek 		} \
1626*00b67f09SDavid van Moolenbroek 		break; \
1627*00b67f09SDavid van Moolenbroek 	case 37: result = checknames_cert(rdata, owner, bad); break; \
1628*00b67f09SDavid van Moolenbroek 	case 38: switch (rdata->rdclass) { \
1629*00b67f09SDavid van Moolenbroek 		case 1: result = checknames_in_a6(rdata, owner, bad); break; \
1630*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1631*00b67f09SDavid van Moolenbroek 		} \
1632*00b67f09SDavid van Moolenbroek 		break; \
1633*00b67f09SDavid van Moolenbroek 	case 39: result = checknames_dname(rdata, owner, bad); break; \
1634*00b67f09SDavid van Moolenbroek 	case 41: result = checknames_opt(rdata, owner, bad); break; \
1635*00b67f09SDavid van Moolenbroek 	case 42: switch (rdata->rdclass) { \
1636*00b67f09SDavid van Moolenbroek 		case 1: result = checknames_in_apl(rdata, owner, bad); break; \
1637*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1638*00b67f09SDavid van Moolenbroek 		} \
1639*00b67f09SDavid van Moolenbroek 		break; \
1640*00b67f09SDavid van Moolenbroek 	case 43: result = checknames_ds(rdata, owner, bad); break; \
1641*00b67f09SDavid van Moolenbroek 	case 44: result = checknames_sshfp(rdata, owner, bad); break; \
1642*00b67f09SDavid van Moolenbroek 	case 45: result = checknames_ipseckey(rdata, owner, bad); break; \
1643*00b67f09SDavid van Moolenbroek 	case 46: result = checknames_rrsig(rdata, owner, bad); break; \
1644*00b67f09SDavid van Moolenbroek 	case 47: result = checknames_nsec(rdata, owner, bad); break; \
1645*00b67f09SDavid van Moolenbroek 	case 48: result = checknames_dnskey(rdata, owner, bad); break; \
1646*00b67f09SDavid van Moolenbroek 	case 49: switch (rdata->rdclass) { \
1647*00b67f09SDavid van Moolenbroek 		case 1: result = checknames_in_dhcid(rdata, owner, bad); break; \
1648*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1649*00b67f09SDavid van Moolenbroek 		} \
1650*00b67f09SDavid van Moolenbroek 		break; \
1651*00b67f09SDavid van Moolenbroek 	case 50: result = checknames_nsec3(rdata, owner, bad); break; \
1652*00b67f09SDavid van Moolenbroek 	case 51: result = checknames_nsec3param(rdata, owner, bad); break; \
1653*00b67f09SDavid van Moolenbroek 	case 52: result = checknames_tlsa(rdata, owner, bad); break; \
1654*00b67f09SDavid van Moolenbroek 	case 55: result = checknames_hip(rdata, owner, bad); break; \
1655*00b67f09SDavid van Moolenbroek 	case 59: result = checknames_cds(rdata, owner, bad); break; \
1656*00b67f09SDavid van Moolenbroek 	case 60: result = checknames_cdnskey(rdata, owner, bad); break; \
1657*00b67f09SDavid van Moolenbroek 	case 61: result = checknames_openpgpkey(rdata, owner, bad); break; \
1658*00b67f09SDavid van Moolenbroek 	case 99: result = checknames_spf(rdata, owner, bad); break; \
1659*00b67f09SDavid van Moolenbroek 	case 103: result = checknames_unspec(rdata, owner, bad); break; \
1660*00b67f09SDavid van Moolenbroek 	case 104: result = checknames_nid(rdata, owner, bad); break; \
1661*00b67f09SDavid van Moolenbroek 	case 105: result = checknames_l32(rdata, owner, bad); break; \
1662*00b67f09SDavid van Moolenbroek 	case 106: result = checknames_l64(rdata, owner, bad); break; \
1663*00b67f09SDavid van Moolenbroek 	case 107: result = checknames_lp(rdata, owner, bad); break; \
1664*00b67f09SDavid van Moolenbroek 	case 108: result = checknames_eui48(rdata, owner, bad); break; \
1665*00b67f09SDavid van Moolenbroek 	case 109: result = checknames_eui64(rdata, owner, bad); break; \
1666*00b67f09SDavid van Moolenbroek 	case 249: result = checknames_tkey(rdata, owner, bad); break; \
1667*00b67f09SDavid van Moolenbroek 	case 250: switch (rdata->rdclass) { \
1668*00b67f09SDavid van Moolenbroek 		case 255: result = checknames_any_tsig(rdata, owner, bad); break; \
1669*00b67f09SDavid van Moolenbroek 		default: result = ISC_TRUE; break; \
1670*00b67f09SDavid van Moolenbroek 		} \
1671*00b67f09SDavid van Moolenbroek 		break; \
1672*00b67f09SDavid van Moolenbroek 	case 256: result = checknames_uri(rdata, owner, bad); break; \
1673*00b67f09SDavid van Moolenbroek 	case 257: result = checknames_caa(rdata, owner, bad); break; \
1674*00b67f09SDavid van Moolenbroek 	case 32769: result = checknames_dlv(rdata, owner, bad); break; \
1675*00b67f09SDavid van Moolenbroek 	case 65533: result = checknames_keydata(rdata, owner, bad); break; \
1676*00b67f09SDavid van Moolenbroek 	default: result = ISC_TRUE; break; \
1677*00b67f09SDavid van Moolenbroek 	}
1678*00b67f09SDavid van Moolenbroek #define RDATATYPE_COMPARE(_s, _d, _tn, _n, _tp) \
1679*00b67f09SDavid van Moolenbroek 	do { \
1680*00b67f09SDavid van Moolenbroek 		if (sizeof(_s) - 1 == _n && \
1681*00b67f09SDavid van Moolenbroek 		    strncasecmp(_s,(_tn),(sizeof(_s) - 1)) == 0) { \
1682*00b67f09SDavid van Moolenbroek 			if ((dns_rdatatype_attributes(_d) & DNS_RDATATYPEATTR_RESERVED) != 0) \
1683*00b67f09SDavid van Moolenbroek 				return (ISC_R_NOTIMPLEMENTED); \
1684*00b67f09SDavid van Moolenbroek 			*(_tp) = _d; \
1685*00b67f09SDavid van Moolenbroek 			return (ISC_R_SUCCESS); \
1686*00b67f09SDavid van Moolenbroek 		} \
1687*00b67f09SDavid van Moolenbroek 	} while (0)
1688*00b67f09SDavid van Moolenbroek 
1689*00b67f09SDavid van Moolenbroek #define RDATATYPE_FROMTEXT_SW(_hash,_typename,_length,_typep) \
1690*00b67f09SDavid van Moolenbroek 	switch (_hash) { \
1691*00b67f09SDavid van Moolenbroek 		case 16: \
1692*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("reserved0", 0, _typename, _length, _typep); \
1693*00b67f09SDavid van Moolenbroek 			break; \
1694*00b67f09SDavid van Moolenbroek 		case 34: \
1695*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("a", 1, _typename, _length, _typep); \
1696*00b67f09SDavid van Moolenbroek 			break; \
1697*00b67f09SDavid van Moolenbroek 		case 80: \
1698*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("ns", 2, _typename, _length, _typep); \
1699*00b67f09SDavid van Moolenbroek 			break; \
1700*00b67f09SDavid van Moolenbroek 		case 92: \
1701*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("md", 3, _typename, _length, _typep); \
1702*00b67f09SDavid van Moolenbroek 			break; \
1703*00b67f09SDavid van Moolenbroek 		case 58: \
1704*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("mf", 4, _typename, _length, _typep); \
1705*00b67f09SDavid van Moolenbroek 			break; \
1706*00b67f09SDavid van Moolenbroek 		case 8: \
1707*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("cname", 5, _typename, _length, _typep); \
1708*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("mx", 15, _typename, _length, _typep); \
1709*00b67f09SDavid van Moolenbroek 			break; \
1710*00b67f09SDavid van Moolenbroek 		case 182: \
1711*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("soa", 6, _typename, _length, _typep); \
1712*00b67f09SDavid van Moolenbroek 			break; \
1713*00b67f09SDavid van Moolenbroek 		case 126: \
1714*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("mb", 7, _typename, _length, _typep); \
1715*00b67f09SDavid van Moolenbroek 			break; \
1716*00b67f09SDavid van Moolenbroek 		case 169: \
1717*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("mg", 8, _typename, _length, _typep); \
1718*00b67f09SDavid van Moolenbroek 			break; \
1719*00b67f09SDavid van Moolenbroek 		case 110: \
1720*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("mr", 9, _typename, _length, _typep); \
1721*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("minfo", 14, _typename, _length, _typep); \
1722*00b67f09SDavid van Moolenbroek 			break; \
1723*00b67f09SDavid van Moolenbroek 		case 24: \
1724*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("null", 10, _typename, _length, _typep); \
1725*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("kx", 36, _typename, _length, _typep); \
1726*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("nsec3param", 51, _typename, _length, _typep); \
1727*00b67f09SDavid van Moolenbroek 			break; \
1728*00b67f09SDavid van Moolenbroek 		case 206: \
1729*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("wks", 11, _typename, _length, _typep); \
1730*00b67f09SDavid van Moolenbroek 			break; \
1731*00b67f09SDavid van Moolenbroek 		case 54: \
1732*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("ptr", 12, _typename, _length, _typep); \
1733*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("naptr", 35, _typename, _length, _typep); \
1734*00b67f09SDavid van Moolenbroek 			break; \
1735*00b67f09SDavid van Moolenbroek 		case 67: \
1736*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("hinfo", 13, _typename, _length, _typep); \
1737*00b67f09SDavid van Moolenbroek 			break; \
1738*00b67f09SDavid van Moolenbroek 		case 236: \
1739*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("txt", 16, _typename, _length, _typep); \
1740*00b67f09SDavid van Moolenbroek 			break; \
1741*00b67f09SDavid van Moolenbroek 		case 192: \
1742*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("rp", 17, _typename, _length, _typep); \
1743*00b67f09SDavid van Moolenbroek 			break; \
1744*00b67f09SDavid van Moolenbroek 		case 12: \
1745*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("afsdb", 18, _typename, _length, _typep); \
1746*00b67f09SDavid van Moolenbroek 			break; \
1747*00b67f09SDavid van Moolenbroek 		case 119: \
1748*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("x25", 19, _typename, _length, _typep); \
1749*00b67f09SDavid van Moolenbroek 			break; \
1750*00b67f09SDavid van Moolenbroek 		case 214: \
1751*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("isdn", 20, _typename, _length, _typep); \
1752*00b67f09SDavid van Moolenbroek 			break; \
1753*00b67f09SDavid van Moolenbroek 		case 144: \
1754*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("rt", 21, _typename, _length, _typep); \
1755*00b67f09SDavid van Moolenbroek 			break; \
1756*00b67f09SDavid van Moolenbroek 		case 224: \
1757*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("nsap", 22, _typename, _length, _typep); \
1758*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("uid", 101, _typename, _length, _typep); \
1759*00b67f09SDavid van Moolenbroek 			break; \
1760*00b67f09SDavid van Moolenbroek 		case 140: \
1761*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("nsap-ptr", 23, _typename, _length, _typep); \
1762*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("l64", 106, _typename, _length, _typep); \
1763*00b67f09SDavid van Moolenbroek 			break; \
1764*00b67f09SDavid van Moolenbroek 		case 122: \
1765*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("sig", 24, _typename, _length, _typep); \
1766*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("dlv", 32769, _typename, _length, _typep); \
1767*00b67f09SDavid van Moolenbroek 			break; \
1768*00b67f09SDavid van Moolenbroek 		case 254: \
1769*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("key", 25, _typename, _length, _typep); \
1770*00b67f09SDavid van Moolenbroek 			break; \
1771*00b67f09SDavid van Moolenbroek 		case 112: \
1772*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("px", 26, _typename, _length, _typep); \
1773*00b67f09SDavid van Moolenbroek 			break; \
1774*00b67f09SDavid van Moolenbroek 		case 17: \
1775*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("gpos", 27, _typename, _length, _typep); \
1776*00b67f09SDavid van Moolenbroek 			break; \
1777*00b67f09SDavid van Moolenbroek 		case 69: \
1778*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("aaaa", 28, _typename, _length, _typep); \
1779*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("atma", 34, _typename, _length, _typep); \
1780*00b67f09SDavid van Moolenbroek 			break; \
1781*00b67f09SDavid van Moolenbroek 		case 237: \
1782*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("loc", 29, _typename, _length, _typep); \
1783*00b67f09SDavid van Moolenbroek 			break; \
1784*00b67f09SDavid van Moolenbroek 		case 52: \
1785*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("nxt", 30, _typename, _length, _typep); \
1786*00b67f09SDavid van Moolenbroek 			break; \
1787*00b67f09SDavid van Moolenbroek 		case 160: \
1788*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("eid", 31, _typename, _length, _typep); \
1789*00b67f09SDavid van Moolenbroek 			break; \
1790*00b67f09SDavid van Moolenbroek 		case 220: \
1791*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("nimloc", 32, _typename, _length, _typep); \
1792*00b67f09SDavid van Moolenbroek 			break; \
1793*00b67f09SDavid van Moolenbroek 		case 100: \
1794*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("srv", 33, _typename, _length, _typep); \
1795*00b67f09SDavid van Moolenbroek 			break; \
1796*00b67f09SDavid van Moolenbroek 		case 172: \
1797*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("cert", 37, _typename, _length, _typep); \
1798*00b67f09SDavid van Moolenbroek 			break; \
1799*00b67f09SDavid van Moolenbroek 		case 226: \
1800*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("a6", 38, _typename, _length, _typep); \
1801*00b67f09SDavid van Moolenbroek 			break; \
1802*00b67f09SDavid van Moolenbroek 		case 109: \
1803*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("dname", 39, _typename, _length, _typep); \
1804*00b67f09SDavid van Moolenbroek 			break; \
1805*00b67f09SDavid van Moolenbroek 		case 168: \
1806*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("opt", 41, _typename, _length, _typep); \
1807*00b67f09SDavid van Moolenbroek 			break; \
1808*00b67f09SDavid van Moolenbroek 		case 48: \
1809*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("apl", 42, _typename, _length, _typep); \
1810*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("eui48", 108, _typename, _length, _typep); \
1811*00b67f09SDavid van Moolenbroek 			break; \
1812*00b67f09SDavid van Moolenbroek 		case 210: \
1813*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("ds", 43, _typename, _length, _typep); \
1814*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("cds", 59, _typename, _length, _typep); \
1815*00b67f09SDavid van Moolenbroek 			break; \
1816*00b67f09SDavid van Moolenbroek 		case 128: \
1817*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("sshfp", 44, _typename, _length, _typep); \
1818*00b67f09SDavid van Moolenbroek 			break; \
1819*00b67f09SDavid van Moolenbroek 		case 105: \
1820*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("ipseckey", 45, _typename, _length, _typep); \
1821*00b67f09SDavid van Moolenbroek 			break; \
1822*00b67f09SDavid van Moolenbroek 		case 225: \
1823*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("rrsig", 46, _typename, _length, _typep); \
1824*00b67f09SDavid van Moolenbroek 			break; \
1825*00b67f09SDavid van Moolenbroek 		case 22: \
1826*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("nsec", 47, _typename, _length, _typep); \
1827*00b67f09SDavid van Moolenbroek 			break; \
1828*00b67f09SDavid van Moolenbroek 		case 26: \
1829*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("dnskey", 48, _typename, _length, _typep); \
1830*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("cdnskey", 60, _typename, _length, _typep); \
1831*00b67f09SDavid van Moolenbroek 			break; \
1832*00b67f09SDavid van Moolenbroek 		case 4: \
1833*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("dhcid", 49, _typename, _length, _typep); \
1834*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("spf", 99, _typename, _length, _typep); \
1835*00b67f09SDavid van Moolenbroek 			break; \
1836*00b67f09SDavid van Moolenbroek 		case 233: \
1837*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("nsec3", 50, _typename, _length, _typep); \
1838*00b67f09SDavid van Moolenbroek 			break; \
1839*00b67f09SDavid van Moolenbroek 		case 120: \
1840*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("tlsa", 52, _typename, _length, _typep); \
1841*00b67f09SDavid van Moolenbroek 			break; \
1842*00b67f09SDavid van Moolenbroek 		case 208: \
1843*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("hip", 55, _typename, _length, _typep); \
1844*00b67f09SDavid van Moolenbroek 			break; \
1845*00b67f09SDavid van Moolenbroek 		case 49: \
1846*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("openpgpkey", 61, _typename, _length, _typep); \
1847*00b67f09SDavid van Moolenbroek 			break; \
1848*00b67f09SDavid van Moolenbroek 		case 230: \
1849*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("uinfo", 100, _typename, _length, _typep); \
1850*00b67f09SDavid van Moolenbroek 			break; \
1851*00b67f09SDavid van Moolenbroek 		case 104: \
1852*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("gid", 102, _typename, _length, _typep); \
1853*00b67f09SDavid van Moolenbroek 			break; \
1854*00b67f09SDavid van Moolenbroek 		case 145: \
1855*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("unspec", 103, _typename, _length, _typep); \
1856*00b67f09SDavid van Moolenbroek 			break; \
1857*00b67f09SDavid van Moolenbroek 		case 36: \
1858*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("nid", 104, _typename, _length, _typep); \
1859*00b67f09SDavid van Moolenbroek 			break; \
1860*00b67f09SDavid van Moolenbroek 		case 174: \
1861*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("l32", 105, _typename, _length, _typep); \
1862*00b67f09SDavid van Moolenbroek 			break; \
1863*00b67f09SDavid van Moolenbroek 		case 32: \
1864*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("lp", 107, _typename, _length, _typep); \
1865*00b67f09SDavid van Moolenbroek 			break; \
1866*00b67f09SDavid van Moolenbroek 		case 136: \
1867*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("eui64", 109, _typename, _length, _typep); \
1868*00b67f09SDavid van Moolenbroek 			break; \
1869*00b67f09SDavid van Moolenbroek 		case 184: \
1870*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("tkey", 249, _typename, _length, _typep); \
1871*00b67f09SDavid van Moolenbroek 			break; \
1872*00b67f09SDavid van Moolenbroek 		case 72: \
1873*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("tsig", 250, _typename, _length, _typep); \
1874*00b67f09SDavid van Moolenbroek 			break; \
1875*00b67f09SDavid van Moolenbroek 		case 138: \
1876*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("ixfr", 251, _typename, _length, _typep); \
1877*00b67f09SDavid van Moolenbroek 			break; \
1878*00b67f09SDavid van Moolenbroek 		case 250: \
1879*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("axfr", 252, _typename, _length, _typep); \
1880*00b67f09SDavid van Moolenbroek 			break; \
1881*00b67f09SDavid van Moolenbroek 		case 164: \
1882*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("mailb", 253, _typename, _length, _typep); \
1883*00b67f09SDavid van Moolenbroek 			break; \
1884*00b67f09SDavid van Moolenbroek 		case 50: \
1885*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("maila", 254, _typename, _length, _typep); \
1886*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("keydata", 65533, _typename, _length, _typep); \
1887*00b67f09SDavid van Moolenbroek 			break; \
1888*00b67f09SDavid van Moolenbroek 		case 68: \
1889*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("any", 255, _typename, _length, _typep); \
1890*00b67f09SDavid van Moolenbroek 			break; \
1891*00b67f09SDavid van Moolenbroek 		case 56: \
1892*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("uri", 256, _typename, _length, _typep); \
1893*00b67f09SDavid van Moolenbroek 			break; \
1894*00b67f09SDavid van Moolenbroek 		case 166: \
1895*00b67f09SDavid van Moolenbroek 			RDATATYPE_COMPARE("caa", 257, _typename, _length, _typep); \
1896*00b67f09SDavid van Moolenbroek 			break; \
1897*00b67f09SDavid van Moolenbroek 	}
1898*00b67f09SDavid van Moolenbroek #define RDATATYPE_ATTRIBUTE_SW \
1899*00b67f09SDavid van Moolenbroek 	switch (type) { \
1900*00b67f09SDavid van Moolenbroek 	case 0: return (DNS_RDATATYPEATTR_RESERVED); \
1901*00b67f09SDavid van Moolenbroek 	case 1: return (RRTYPE_A_ATTRIBUTES); \
1902*00b67f09SDavid van Moolenbroek 	case 2: return (RRTYPE_NS_ATTRIBUTES); \
1903*00b67f09SDavid van Moolenbroek 	case 3: return (RRTYPE_MD_ATTRIBUTES); \
1904*00b67f09SDavid van Moolenbroek 	case 4: return (RRTYPE_MF_ATTRIBUTES); \
1905*00b67f09SDavid van Moolenbroek 	case 5: return (RRTYPE_CNAME_ATTRIBUTES); \
1906*00b67f09SDavid van Moolenbroek 	case 6: return (RRTYPE_SOA_ATTRIBUTES); \
1907*00b67f09SDavid van Moolenbroek 	case 7: return (RRTYPE_MB_ATTRIBUTES); \
1908*00b67f09SDavid van Moolenbroek 	case 8: return (RRTYPE_MG_ATTRIBUTES); \
1909*00b67f09SDavid van Moolenbroek 	case 9: return (RRTYPE_MR_ATTRIBUTES); \
1910*00b67f09SDavid van Moolenbroek 	case 10: return (RRTYPE_NULL_ATTRIBUTES); \
1911*00b67f09SDavid van Moolenbroek 	case 11: return (RRTYPE_WKS_ATTRIBUTES); \
1912*00b67f09SDavid van Moolenbroek 	case 12: return (RRTYPE_PTR_ATTRIBUTES); \
1913*00b67f09SDavid van Moolenbroek 	case 13: return (RRTYPE_HINFO_ATTRIBUTES); \
1914*00b67f09SDavid van Moolenbroek 	case 14: return (RRTYPE_MINFO_ATTRIBUTES); \
1915*00b67f09SDavid van Moolenbroek 	case 15: return (RRTYPE_MX_ATTRIBUTES); \
1916*00b67f09SDavid van Moolenbroek 	case 16: return (RRTYPE_TXT_ATTRIBUTES); \
1917*00b67f09SDavid van Moolenbroek 	case 17: return (RRTYPE_RP_ATTRIBUTES); \
1918*00b67f09SDavid van Moolenbroek 	case 18: return (RRTYPE_AFSDB_ATTRIBUTES); \
1919*00b67f09SDavid van Moolenbroek 	case 19: return (RRTYPE_X25_ATTRIBUTES); \
1920*00b67f09SDavid van Moolenbroek 	case 20: return (RRTYPE_ISDN_ATTRIBUTES); \
1921*00b67f09SDavid van Moolenbroek 	case 21: return (RRTYPE_RT_ATTRIBUTES); \
1922*00b67f09SDavid van Moolenbroek 	case 22: return (RRTYPE_NSAP_ATTRIBUTES); \
1923*00b67f09SDavid van Moolenbroek 	case 23: return (RRTYPE_NSAP_PTR_ATTRIBUTES); \
1924*00b67f09SDavid van Moolenbroek 	case 24: return (RRTYPE_SIG_ATTRIBUTES); \
1925*00b67f09SDavid van Moolenbroek 	case 25: return (RRTYPE_KEY_ATTRIBUTES); \
1926*00b67f09SDavid van Moolenbroek 	case 26: return (RRTYPE_PX_ATTRIBUTES); \
1927*00b67f09SDavid van Moolenbroek 	case 27: return (RRTYPE_GPOS_ATTRIBUTES); \
1928*00b67f09SDavid van Moolenbroek 	case 28: return (RRTYPE_AAAA_ATTRIBUTES); \
1929*00b67f09SDavid van Moolenbroek 	case 29: return (RRTYPE_LOC_ATTRIBUTES); \
1930*00b67f09SDavid van Moolenbroek 	case 30: return (RRTYPE_NXT_ATTRIBUTES); \
1931*00b67f09SDavid van Moolenbroek 	case 31: return (DNS_RDATATYPEATTR_RESERVED); \
1932*00b67f09SDavid van Moolenbroek 	case 32: return (DNS_RDATATYPEATTR_RESERVED); \
1933*00b67f09SDavid van Moolenbroek 	case 33: return (RRTYPE_SRV_ATTRIBUTES); \
1934*00b67f09SDavid van Moolenbroek 	case 34: return (DNS_RDATATYPEATTR_RESERVED); \
1935*00b67f09SDavid van Moolenbroek 	case 35: return (RRTYPE_NAPTR_ATTRIBUTES); \
1936*00b67f09SDavid van Moolenbroek 	case 36: return (RRTYPE_KX_ATTRIBUTES); \
1937*00b67f09SDavid van Moolenbroek 	case 37: return (RRTYPE_CERT_ATTRIBUTES); \
1938*00b67f09SDavid van Moolenbroek 	case 38: return (RRTYPE_A6_ATTRIBUTES); \
1939*00b67f09SDavid van Moolenbroek 	case 39: return (RRTYPE_DNAME_ATTRIBUTES); \
1940*00b67f09SDavid van Moolenbroek 	case 41: return (RRTYPE_OPT_ATTRIBUTES); \
1941*00b67f09SDavid van Moolenbroek 	case 42: return (RRTYPE_APL_ATTRIBUTES); \
1942*00b67f09SDavid van Moolenbroek 	case 43: return (RRTYPE_DS_ATTRIBUTES); \
1943*00b67f09SDavid van Moolenbroek 	case 44: return (RRTYPE_SSHFP_ATTRIBUTES); \
1944*00b67f09SDavid van Moolenbroek 	case 45: return (RRTYPE_IPSECKEY_ATTRIBUTES); \
1945*00b67f09SDavid van Moolenbroek 	case 46: return (RRTYPE_RRSIG_ATTRIBUTES); \
1946*00b67f09SDavid van Moolenbroek 	case 47: return (RRTYPE_NSEC_ATTRIBUTES); \
1947*00b67f09SDavid van Moolenbroek 	case 48: return (RRTYPE_DNSKEY_ATTRIBUTES); \
1948*00b67f09SDavid van Moolenbroek 	case 49: return (RRTYPE_DHCID_ATTRIBUTES); \
1949*00b67f09SDavid van Moolenbroek 	case 50: return (RRTYPE_NSEC3_ATTRIBUTES); \
1950*00b67f09SDavid van Moolenbroek 	case 51: return (RRTYPE_NSEC3PARAM_ATTRIBUTES); \
1951*00b67f09SDavid van Moolenbroek 	case 52: return (RRTYPE_TLSA_ATTRIBUTES); \
1952*00b67f09SDavid van Moolenbroek 	case 55: return (RRTYPE_HIP_ATTRIBUTES); \
1953*00b67f09SDavid van Moolenbroek 	case 59: return (RRTYPE_CDS_ATTRIBUTES); \
1954*00b67f09SDavid van Moolenbroek 	case 60: return (RRTYPE_CDNSKEY_ATTRIBUTES); \
1955*00b67f09SDavid van Moolenbroek 	case 61: return (RRTYPE_OPENPGPKEY_ATTRIBUTES); \
1956*00b67f09SDavid van Moolenbroek 	case 99: return (RRTYPE_SPF_ATTRIBUTES); \
1957*00b67f09SDavid van Moolenbroek 	case 100: return (DNS_RDATATYPEATTR_RESERVED); \
1958*00b67f09SDavid van Moolenbroek 	case 101: return (DNS_RDATATYPEATTR_RESERVED); \
1959*00b67f09SDavid van Moolenbroek 	case 102: return (DNS_RDATATYPEATTR_RESERVED); \
1960*00b67f09SDavid van Moolenbroek 	case 103: return (RRTYPE_UNSPEC_ATTRIBUTES); \
1961*00b67f09SDavid van Moolenbroek 	case 104: return (RRTYPE_NID_ATTRIBUTES); \
1962*00b67f09SDavid van Moolenbroek 	case 105: return (RRTYPE_L32_ATTRIBUTES); \
1963*00b67f09SDavid van Moolenbroek 	case 106: return (RRTYPE_L64_ATTRIBUTES); \
1964*00b67f09SDavid van Moolenbroek 	case 107: return (RRTYPE_LP_ATTRIBUTES); \
1965*00b67f09SDavid van Moolenbroek 	case 108: return (RRTYPE_EUI48_ATTRIBUTES); \
1966*00b67f09SDavid van Moolenbroek 	case 109: return (RRTYPE_EUI64_ATTRIBUTES); \
1967*00b67f09SDavid van Moolenbroek 	case 249: return (RRTYPE_TKEY_ATTRIBUTES); \
1968*00b67f09SDavid van Moolenbroek 	case 250: return (RRTYPE_TSIG_ATTRIBUTES); \
1969*00b67f09SDavid van Moolenbroek 	case 251: return (DNS_RDATATYPEATTR_META | DNS_RDATATYPEATTR_QUESTIONONLY); \
1970*00b67f09SDavid van Moolenbroek 	case 252: return (DNS_RDATATYPEATTR_META | DNS_RDATATYPEATTR_QUESTIONONLY); \
1971*00b67f09SDavid van Moolenbroek 	case 253: return (DNS_RDATATYPEATTR_META | DNS_RDATATYPEATTR_QUESTIONONLY); \
1972*00b67f09SDavid van Moolenbroek 	case 254: return (DNS_RDATATYPEATTR_META | DNS_RDATATYPEATTR_QUESTIONONLY); \
1973*00b67f09SDavid van Moolenbroek 	case 255: return (DNS_RDATATYPEATTR_META | DNS_RDATATYPEATTR_QUESTIONONLY); \
1974*00b67f09SDavid van Moolenbroek 	case 256: return (RRTYPE_URI_ATTRIBUTES); \
1975*00b67f09SDavid van Moolenbroek 	case 257: return (RRTYPE_CAA_ATTRIBUTES); \
1976*00b67f09SDavid van Moolenbroek 	case 32769: return (RRTYPE_DLV_ATTRIBUTES); \
1977*00b67f09SDavid van Moolenbroek 	case 65533: return (RRTYPE_KEYDATA_ATTRIBUTES); \
1978*00b67f09SDavid van Moolenbroek 	}
1979*00b67f09SDavid van Moolenbroek #define RDATATYPE_TOTEXT_SW \
1980*00b67f09SDavid van Moolenbroek 	switch (type) { \
1981*00b67f09SDavid van Moolenbroek 	case 0: return (str_totext("RESERVED0", target)); \
1982*00b67f09SDavid van Moolenbroek 	case 1: return (str_totext("A", target)); \
1983*00b67f09SDavid van Moolenbroek 	case 2: return (str_totext("NS", target)); \
1984*00b67f09SDavid van Moolenbroek 	case 3: return (str_totext("MD", target)); \
1985*00b67f09SDavid van Moolenbroek 	case 4: return (str_totext("MF", target)); \
1986*00b67f09SDavid van Moolenbroek 	case 5: return (str_totext("CNAME", target)); \
1987*00b67f09SDavid van Moolenbroek 	case 6: return (str_totext("SOA", target)); \
1988*00b67f09SDavid van Moolenbroek 	case 7: return (str_totext("MB", target)); \
1989*00b67f09SDavid van Moolenbroek 	case 8: return (str_totext("MG", target)); \
1990*00b67f09SDavid van Moolenbroek 	case 9: return (str_totext("MR", target)); \
1991*00b67f09SDavid van Moolenbroek 	case 10: return (str_totext("NULL", target)); \
1992*00b67f09SDavid van Moolenbroek 	case 11: return (str_totext("WKS", target)); \
1993*00b67f09SDavid van Moolenbroek 	case 12: return (str_totext("PTR", target)); \
1994*00b67f09SDavid van Moolenbroek 	case 13: return (str_totext("HINFO", target)); \
1995*00b67f09SDavid van Moolenbroek 	case 14: return (str_totext("MINFO", target)); \
1996*00b67f09SDavid van Moolenbroek 	case 15: return (str_totext("MX", target)); \
1997*00b67f09SDavid van Moolenbroek 	case 16: return (str_totext("TXT", target)); \
1998*00b67f09SDavid van Moolenbroek 	case 17: return (str_totext("RP", target)); \
1999*00b67f09SDavid van Moolenbroek 	case 18: return (str_totext("AFSDB", target)); \
2000*00b67f09SDavid van Moolenbroek 	case 19: return (str_totext("X25", target)); \
2001*00b67f09SDavid van Moolenbroek 	case 20: return (str_totext("ISDN", target)); \
2002*00b67f09SDavid van Moolenbroek 	case 21: return (str_totext("RT", target)); \
2003*00b67f09SDavid van Moolenbroek 	case 22: return (str_totext("NSAP", target)); \
2004*00b67f09SDavid van Moolenbroek 	case 23: return (str_totext("NSAP-PTR", target)); \
2005*00b67f09SDavid van Moolenbroek 	case 24: return (str_totext("SIG", target)); \
2006*00b67f09SDavid van Moolenbroek 	case 25: return (str_totext("KEY", target)); \
2007*00b67f09SDavid van Moolenbroek 	case 26: return (str_totext("PX", target)); \
2008*00b67f09SDavid van Moolenbroek 	case 27: return (str_totext("GPOS", target)); \
2009*00b67f09SDavid van Moolenbroek 	case 28: return (str_totext("AAAA", target)); \
2010*00b67f09SDavid van Moolenbroek 	case 29: return (str_totext("LOC", target)); \
2011*00b67f09SDavid van Moolenbroek 	case 30: return (str_totext("NXT", target)); \
2012*00b67f09SDavid van Moolenbroek 	case 31: return (str_totext("EID", target)); \
2013*00b67f09SDavid van Moolenbroek 	case 32: return (str_totext("NIMLOC", target)); \
2014*00b67f09SDavid van Moolenbroek 	case 33: return (str_totext("SRV", target)); \
2015*00b67f09SDavid van Moolenbroek 	case 34: return (str_totext("ATMA", target)); \
2016*00b67f09SDavid van Moolenbroek 	case 35: return (str_totext("NAPTR", target)); \
2017*00b67f09SDavid van Moolenbroek 	case 36: return (str_totext("KX", target)); \
2018*00b67f09SDavid van Moolenbroek 	case 37: return (str_totext("CERT", target)); \
2019*00b67f09SDavid van Moolenbroek 	case 38: return (str_totext("A6", target)); \
2020*00b67f09SDavid van Moolenbroek 	case 39: return (str_totext("DNAME", target)); \
2021*00b67f09SDavid van Moolenbroek 	case 41: return (str_totext("OPT", target)); \
2022*00b67f09SDavid van Moolenbroek 	case 42: return (str_totext("APL", target)); \
2023*00b67f09SDavid van Moolenbroek 	case 43: return (str_totext("DS", target)); \
2024*00b67f09SDavid van Moolenbroek 	case 44: return (str_totext("SSHFP", target)); \
2025*00b67f09SDavid van Moolenbroek 	case 45: return (str_totext("IPSECKEY", target)); \
2026*00b67f09SDavid van Moolenbroek 	case 46: return (str_totext("RRSIG", target)); \
2027*00b67f09SDavid van Moolenbroek 	case 47: return (str_totext("NSEC", target)); \
2028*00b67f09SDavid van Moolenbroek 	case 48: return (str_totext("DNSKEY", target)); \
2029*00b67f09SDavid van Moolenbroek 	case 49: return (str_totext("DHCID", target)); \
2030*00b67f09SDavid van Moolenbroek 	case 50: return (str_totext("NSEC3", target)); \
2031*00b67f09SDavid van Moolenbroek 	case 51: return (str_totext("NSEC3PARAM", target)); \
2032*00b67f09SDavid van Moolenbroek 	case 52: return (str_totext("TLSA", target)); \
2033*00b67f09SDavid van Moolenbroek 	case 55: return (str_totext("HIP", target)); \
2034*00b67f09SDavid van Moolenbroek 	case 59: return (str_totext("CDS", target)); \
2035*00b67f09SDavid van Moolenbroek 	case 60: return (str_totext("CDNSKEY", target)); \
2036*00b67f09SDavid van Moolenbroek 	case 61: return (str_totext("OPENPGPKEY", target)); \
2037*00b67f09SDavid van Moolenbroek 	case 99: return (str_totext("SPF", target)); \
2038*00b67f09SDavid van Moolenbroek 	case 100: return (str_totext("UINFO", target)); \
2039*00b67f09SDavid van Moolenbroek 	case 101: return (str_totext("UID", target)); \
2040*00b67f09SDavid van Moolenbroek 	case 102: return (str_totext("GID", target)); \
2041*00b67f09SDavid van Moolenbroek 	case 103: return (str_totext("UNSPEC", target)); \
2042*00b67f09SDavid van Moolenbroek 	case 104: return (str_totext("NID", target)); \
2043*00b67f09SDavid van Moolenbroek 	case 105: return (str_totext("L32", target)); \
2044*00b67f09SDavid van Moolenbroek 	case 106: return (str_totext("L64", target)); \
2045*00b67f09SDavid van Moolenbroek 	case 107: return (str_totext("LP", target)); \
2046*00b67f09SDavid van Moolenbroek 	case 108: return (str_totext("EUI48", target)); \
2047*00b67f09SDavid van Moolenbroek 	case 109: return (str_totext("EUI64", target)); \
2048*00b67f09SDavid van Moolenbroek 	case 249: return (str_totext("TKEY", target)); \
2049*00b67f09SDavid van Moolenbroek 	case 250: return (str_totext("TSIG", target)); \
2050*00b67f09SDavid van Moolenbroek 	case 251: return (str_totext("IXFR", target)); \
2051*00b67f09SDavid van Moolenbroek 	case 252: return (str_totext("AXFR", target)); \
2052*00b67f09SDavid van Moolenbroek 	case 253: return (str_totext("MAILB", target)); \
2053*00b67f09SDavid van Moolenbroek 	case 254: return (str_totext("MAILA", target)); \
2054*00b67f09SDavid van Moolenbroek 	case 255: return (str_totext("ANY", target)); \
2055*00b67f09SDavid van Moolenbroek 	case 256: return (str_totext("URI", target)); \
2056*00b67f09SDavid van Moolenbroek 	case 257: return (str_totext("CAA", target)); \
2057*00b67f09SDavid van Moolenbroek 	case 32769: return (str_totext("DLV", target)); \
2058*00b67f09SDavid van Moolenbroek 	}
2059*00b67f09SDavid van Moolenbroek #endif /* DNS_CODE_H */
2060