]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use mnemonics for RR class and type comparisons (#40297)
authorMukund Sivaraman <muks@isc.org>
Mon, 17 Aug 2015 06:53:35 +0000 (12:23 +0530)
committerMukund Sivaraman <muks@isc.org>
Mon, 17 Aug 2015 06:59:02 +0000 (12:29 +0530)
(cherry picked from commit b0ba1a6059b6d6c4b3aa77d8bc84cc443b981e01)
(cherry picked from commit 25747be3cb48efe243cc2f2531b7f77f8f19a2f4)

70 files changed:
CHANGES
lib/dns/rdata/any_255/tsig_250.c
lib/dns/rdata/ch_3/a_1.c
lib/dns/rdata/generic/afsdb_18.c
lib/dns/rdata/generic/caa_257.c
lib/dns/rdata/generic/cdnskey_60.c
lib/dns/rdata/generic/cds_59.c
lib/dns/rdata/generic/cert_37.c
lib/dns/rdata/generic/cname_5.c
lib/dns/rdata/generic/dlv_32769.c
lib/dns/rdata/generic/dname_39.c
lib/dns/rdata/generic/dnskey_48.c
lib/dns/rdata/generic/ds_43.c
lib/dns/rdata/generic/eui48_108.c
lib/dns/rdata/generic/eui64_109.c
lib/dns/rdata/generic/gpos_27.c
lib/dns/rdata/generic/hinfo_13.c
lib/dns/rdata/generic/hip_55.c
lib/dns/rdata/generic/ipseckey_45.c
lib/dns/rdata/generic/isdn_20.c
lib/dns/rdata/generic/key_25.c
lib/dns/rdata/generic/keydata_65533.c
lib/dns/rdata/generic/l32_105.c
lib/dns/rdata/generic/l64_106.c
lib/dns/rdata/generic/loc_29.c
lib/dns/rdata/generic/lp_107.c
lib/dns/rdata/generic/mb_7.c
lib/dns/rdata/generic/md_3.c
lib/dns/rdata/generic/mf_4.c
lib/dns/rdata/generic/mg_8.c
lib/dns/rdata/generic/minfo_14.c
lib/dns/rdata/generic/mr_9.c
lib/dns/rdata/generic/mx_15.c
lib/dns/rdata/generic/naptr_35.c
lib/dns/rdata/generic/nid_104.c
lib/dns/rdata/generic/ns_2.c
lib/dns/rdata/generic/nsec3_50.c
lib/dns/rdata/generic/nsec3param_51.c
lib/dns/rdata/generic/nsec_47.c
lib/dns/rdata/generic/null_10.c
lib/dns/rdata/generic/nxt_30.c
lib/dns/rdata/generic/openpgpkey_61.c
lib/dns/rdata/generic/opt_41.c
lib/dns/rdata/generic/proforma.c
lib/dns/rdata/generic/ptr_12.c
lib/dns/rdata/generic/rp_17.c
lib/dns/rdata/generic/rrsig_46.c
lib/dns/rdata/generic/rt_21.c
lib/dns/rdata/generic/sig_24.c
lib/dns/rdata/generic/soa_6.c
lib/dns/rdata/generic/spf_99.c
lib/dns/rdata/generic/sshfp_44.c
lib/dns/rdata/generic/tkey_249.c
lib/dns/rdata/generic/tlsa_52.c
lib/dns/rdata/generic/txt_16.c
lib/dns/rdata/generic/unspec_103.c
lib/dns/rdata/generic/uri_256.c
lib/dns/rdata/generic/x25_19.c
lib/dns/rdata/hs_4/a_1.c
lib/dns/rdata/in_1/a6_38.c
lib/dns/rdata/in_1/a_1.c
lib/dns/rdata/in_1/aaaa_28.c
lib/dns/rdata/in_1/apl_42.c
lib/dns/rdata/in_1/dhcid_49.c
lib/dns/rdata/in_1/kx_36.c
lib/dns/rdata/in_1/nsap-ptr_23.c
lib/dns/rdata/in_1/nsap_22.c
lib/dns/rdata/in_1/px_26.c
lib/dns/rdata/in_1/srv_33.c
lib/dns/rdata/in_1/wks_11.c

diff --git a/CHANGES b/CHANGES
index 61b5bc4828a7bb00615e61d6503a13b94e86b497..1dc6e40523a506a8e96728b93bb3a3467a744243 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4182.  [cleanup]       Use mnemonics for RR class and type comparisons.
+                       [RT #40297]
+
 4181.  [bug]           Queued notify messages could be dequeued from the
                        wrong rate limiter queue. [RT #40350]
 
index 92e835c05defff0d4cbd82ae05e4b76ae2d31cda..65ceb84152c973230a68a41f66b0643dc6d7bfa8 100644 (file)
@@ -35,8 +35,8 @@ fromtext_any_tsig(ARGS_FROMTEXT) {
        long i;
        char *e;
 
-       REQUIRE(type == 250);
-       REQUIRE(rdclass == 255);
+       REQUIRE(type == dns_rdatatype_tsig);
+       REQUIRE(rdclass == dns_rdataclass_any);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -141,8 +141,8 @@ totext_any_tsig(ARGS_TOTEXT) {
        isc_uint64_t sigtime;
        unsigned short n;
 
-       REQUIRE(rdata->type == 250);
-       REQUIRE(rdata->rdclass == 255);
+       REQUIRE(rdata->type == dns_rdatatype_tsig);
+       REQUIRE(rdata->rdclass == dns_rdataclass_any);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &sr);
@@ -251,8 +251,8 @@ fromwire_any_tsig(ARGS_FROMWIRE) {
        dns_name_t name;
        unsigned long n;
 
-       REQUIRE(type == 250);
-       REQUIRE(rdclass == 255);
+       REQUIRE(type == dns_rdatatype_tsig);
+       REQUIRE(rdclass == dns_rdataclass_any);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -314,8 +314,8 @@ towire_any_tsig(ARGS_TOWIRE) {
        dns_name_t name;
        dns_offsets_t offsets;
 
-       REQUIRE(rdata->type == 250);
-       REQUIRE(rdata->rdclass == 255);
+       REQUIRE(rdata->type == dns_rdatatype_tsig);
+       REQUIRE(rdata->rdclass == dns_rdataclass_any);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -337,8 +337,8 @@ compare_any_tsig(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 250);
-       REQUIRE(rdata1->rdclass == 255);
+       REQUIRE(rdata1->type == dns_rdatatype_tsig);
+       REQUIRE(rdata1->rdclass == dns_rdataclass_any);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -361,8 +361,8 @@ fromstruct_any_tsig(ARGS_FROMSTRUCT) {
        dns_rdata_any_tsig_t *tsig = source;
        isc_region_t tr;
 
-       REQUIRE(type == 250);
-       REQUIRE(rdclass == 255);
+       REQUIRE(type == dns_rdatatype_tsig);
+       REQUIRE(rdclass == dns_rdataclass_any);
        REQUIRE(source != NULL);
        REQUIRE(tsig->common.rdclass == rdclass);
        REQUIRE(tsig->common.rdtype == type);
@@ -433,8 +433,8 @@ tostruct_any_tsig(ARGS_TOSTRUCT) {
        dns_name_t alg;
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 250);
-       REQUIRE(rdata->rdclass == 255);
+       REQUIRE(rdata->type == dns_rdatatype_tsig);
+       REQUIRE(rdata->rdclass == dns_rdataclass_any);
        REQUIRE(rdata->length != 0);
 
        tsig = (dns_rdata_any_tsig_t *) target;
@@ -529,8 +529,8 @@ freestruct_any_tsig(ARGS_FREESTRUCT) {
        dns_rdata_any_tsig_t *tsig = (dns_rdata_any_tsig_t *) source;
 
        REQUIRE(source != NULL);
-       REQUIRE(tsig->common.rdtype == 250);
-       REQUIRE(tsig->common.rdclass == 255);
+       REQUIRE(tsig->common.rdtype == dns_rdatatype_tsig);
+       REQUIRE(tsig->common.rdclass == dns_rdataclass_any);
 
        if (tsig->mctx == NULL)
                return;
@@ -545,8 +545,8 @@ freestruct_any_tsig(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_any_tsig(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 250);
-       REQUIRE(rdata->rdclass == 255);
+       REQUIRE(rdata->type == dns_rdatatype_tsig);
+       REQUIRE(rdata->rdclass == dns_rdataclass_any);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -558,8 +558,8 @@ additionaldata_any_tsig(ARGS_ADDLDATA) {
 static inline isc_result_t
 digest_any_tsig(ARGS_DIGEST) {
 
-       REQUIRE(rdata->type == 250);
-       REQUIRE(rdata->rdclass == 255);
+       REQUIRE(rdata->type == dns_rdatatype_tsig);
+       REQUIRE(rdata->rdclass == dns_rdataclass_any);
 
        UNUSED(rdata);
        UNUSED(digest);
@@ -571,8 +571,8 @@ digest_any_tsig(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_any_tsig(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 250);
-       REQUIRE(rdclass == 255);
+       REQUIRE(type == dns_rdatatype_tsig);
+       REQUIRE(rdclass == dns_rdataclass_any);
 
        UNUSED(name);
        UNUSED(type);
@@ -585,8 +585,8 @@ checkowner_any_tsig(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_any_tsig(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 250);
-       REQUIRE(rdata->rdclass == 255);
+       REQUIRE(rdata->type == dns_rdatatype_tsig);
+       REQUIRE(rdata->rdclass == dns_rdataclass_any);
 
        UNUSED(rdata);
        UNUSED(owner);
index d25fcb50ac40d12a5dbdd741629ebf755d5382c1..ce2d62d358e28f7f656bd42cacf3207a3583b2f0 100644 (file)
@@ -32,7 +32,7 @@ fromtext_ch_a(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
 
-       REQUIRE(type == 1);
+       REQUIRE(type == dns_rdatatype_a);
        REQUIRE(rdclass == dns_rdataclass_ch); /* 3 */
 
        UNUSED(type);
@@ -72,7 +72,7 @@ totext_ch_a(ARGS_TOTEXT) {
        char buf[sizeof("0177777")];
        isc_uint16_t addr;
 
-       REQUIRE(rdata->type == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a);
        REQUIRE(rdata->rdclass == dns_rdataclass_ch); /* 3 */
        REQUIRE(rdata->length != 0);
 
@@ -98,7 +98,7 @@ fromwire_ch_a(ARGS_FROMWIRE) {
        isc_region_t tregion;
        dns_name_t name;
 
-       REQUIRE(type == 1);
+       REQUIRE(type == dns_rdatatype_a);
        REQUIRE(rdclass == dns_rdataclass_ch);
 
        UNUSED(type);
@@ -131,7 +131,7 @@ towire_ch_a(ARGS_TOWIRE) {
        isc_region_t sregion;
        isc_region_t tregion;
 
-       REQUIRE(rdata->type == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a);
        REQUIRE(rdata->rdclass == dns_rdataclass_ch);
        REQUIRE(rdata->length != 0);
 
@@ -164,7 +164,7 @@ compare_ch_a(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 1);
+       REQUIRE(rdata1->type == dns_rdatatype_a);
        REQUIRE(rdata1->rdclass == dns_rdataclass_ch);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
@@ -195,7 +195,7 @@ fromstruct_ch_a(ARGS_FROMSTRUCT) {
        dns_rdata_ch_a_t *a = source;
        isc_region_t region;
 
-       REQUIRE(type == 1);
+       REQUIRE(type == dns_rdatatype_a);
        REQUIRE(source != NULL);
        REQUIRE(a->common.rdtype == type);
        REQUIRE(a->common.rdclass == rdclass);
@@ -215,7 +215,7 @@ tostruct_ch_a(ARGS_TOSTRUCT) {
        isc_region_t region;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a);
        REQUIRE(rdata->rdclass == dns_rdataclass_ch);
        REQUIRE(rdata->length != 0);
 
@@ -241,7 +241,7 @@ freestruct_ch_a(ARGS_FREESTRUCT) {
        dns_rdata_ch_a_t *a = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(a->common.rdtype == 1);
+       REQUIRE(a->common.rdtype == dns_rdatatype_a);
 
        if (a->mctx == NULL)
                return;
@@ -253,7 +253,7 @@ freestruct_ch_a(ARGS_FREESTRUCT) {
 static inline isc_result_t
 additionaldata_ch_a(ARGS_ADDLDATA) {
 
-       REQUIRE(rdata->type == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a);
        REQUIRE(rdata->rdclass == dns_rdataclass_ch);
 
        UNUSED(rdata);
@@ -266,10 +266,9 @@ additionaldata_ch_a(ARGS_ADDLDATA) {
 static inline isc_result_t
 digest_ch_a(ARGS_DIGEST) {
        isc_region_t r;
-
        dns_name_t name;
 
-       REQUIRE(rdata->type == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a);
        REQUIRE(rdata->rdclass == dns_rdataclass_ch);
 
        dns_rdata_toregion(rdata, &r);
@@ -283,7 +282,7 @@ digest_ch_a(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_ch_a(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 1);
+       REQUIRE(type == dns_rdatatype_a);
        REQUIRE(rdclass == dns_rdataclass_ch);
 
        UNUSED(type);
@@ -296,7 +295,7 @@ checknames_ch_a(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a);
        REQUIRE(rdata->rdclass == dns_rdataclass_ch);
 
        UNUSED(owner);
index af95fa12e91b651739589fed4d1183e73555b00f..59a50ce3030172447039739e98d0877d64ed6793 100644 (file)
@@ -33,7 +33,7 @@ fromtext_afsdb(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_boolean_t ok;
 
-       REQUIRE(type == 18);
+       REQUIRE(type == dns_rdatatype_afsdb);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -76,7 +76,7 @@ totext_afsdb(ARGS_TOTEXT) {
        isc_boolean_t sub;
        unsigned int num;
 
-       REQUIRE(rdata->type == 18);
+       REQUIRE(rdata->type == dns_rdatatype_afsdb);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -98,7 +98,7 @@ fromwire_afsdb(ARGS_FROMWIRE) {
        isc_region_t sr;
        isc_region_t tr;
 
-       REQUIRE(type == 18);
+       REQUIRE(type == dns_rdatatype_afsdb);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -126,7 +126,7 @@ towire_afsdb(ARGS_TOWIRE) {
        dns_name_t name;
        dns_offsets_t offsets;
 
-       REQUIRE(rdata->type == 18);
+       REQUIRE(rdata->type == dns_rdatatype_afsdb);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -154,7 +154,7 @@ compare_afsdb(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 18);
+       REQUIRE(rdata1->type == dns_rdatatype_afsdb);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -182,7 +182,7 @@ fromstruct_afsdb(ARGS_FROMSTRUCT) {
        dns_rdata_afsdb_t *afsdb = source;
        isc_region_t region;
 
-       REQUIRE(type == 18);
+       REQUIRE(type == dns_rdatatype_afsdb);
        REQUIRE(source != NULL);
        REQUIRE(afsdb->common.rdclass == rdclass);
        REQUIRE(afsdb->common.rdtype == type);
@@ -201,7 +201,7 @@ tostruct_afsdb(ARGS_TOSTRUCT) {
        dns_rdata_afsdb_t *afsdb = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 18);
+       REQUIRE(rdata->type == dns_rdatatype_afsdb);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -229,7 +229,7 @@ freestruct_afsdb(ARGS_FREESTRUCT) {
        dns_rdata_afsdb_t *afsdb = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(afsdb->common.rdtype == 18);
+       REQUIRE(afsdb->common.rdtype == dns_rdatatype_afsdb);
 
        if (afsdb->mctx == NULL)
                return;
@@ -244,7 +244,7 @@ additionaldata_afsdb(ARGS_ADDLDATA) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 18);
+       REQUIRE(rdata->type == dns_rdatatype_afsdb);
 
        dns_name_init(&name, offsets);
        dns_rdata_toregion(rdata, &region);
@@ -259,7 +259,7 @@ digest_afsdb(ARGS_DIGEST) {
        isc_region_t r1, r2;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 18);
+       REQUIRE(rdata->type == dns_rdatatype_afsdb);
 
        dns_rdata_toregion(rdata, &r1);
        r2 = r1;
@@ -275,7 +275,7 @@ digest_afsdb(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_afsdb(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 18);
+       REQUIRE(type == dns_rdatatype_afsdb);
 
        UNUSED(name);
        UNUSED(type);
@@ -290,7 +290,7 @@ checknames_afsdb(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 18);
+       REQUIRE(rdata->type == dns_rdatatype_afsdb);
 
        UNUSED(owner);
 
index f934c23b117bb3bdfedd11b792f640376c53579d..648f4afdc3b6d2001c602bca4cc953c571d363bd 100644 (file)
@@ -45,7 +45,7 @@ fromtext_caa(ARGS_FROMTEXT) {
        isc_uint8_t flags;
        unsigned int i;
 
-       REQUIRE(type == 257);
+       REQUIRE(type == dns_rdatatype_caa);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -93,7 +93,7 @@ totext_caa(ARGS_TOTEXT) {
 
        UNUSED(tctx);
 
-       REQUIRE(rdata->type == 257);
+       REQUIRE(rdata->type == dns_rdatatype_caa);
        REQUIRE(rdata->length >= 3U);
        REQUIRE(rdata->data != NULL);
 
@@ -124,7 +124,7 @@ fromwire_caa(ARGS_FROMWIRE) {
        isc_region_t sr;
        unsigned int len, i;
 
-       REQUIRE(type == 257);
+       REQUIRE(type == dns_rdatatype_caa);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -167,7 +167,7 @@ static inline isc_result_t
 towire_caa(ARGS_TOWIRE) {
        isc_region_t region;
 
-       REQUIRE(rdata->type == 257);
+       REQUIRE(rdata->type == dns_rdatatype_caa);
        REQUIRE(rdata->length >= 3U);
        REQUIRE(rdata->data != NULL);
 
@@ -183,7 +183,7 @@ compare_caa(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 257);
+       REQUIRE(rdata1->type == dns_rdatatype_caa);
        REQUIRE(rdata1->length >= 3U);
        REQUIRE(rdata2->length >= 3U);
        REQUIRE(rdata1->data != NULL);
@@ -200,7 +200,7 @@ fromstruct_caa(ARGS_FROMSTRUCT) {
        isc_region_t region;
        unsigned int i;
 
-       REQUIRE(type == 257);
+       REQUIRE(type == dns_rdatatype_caa);
        REQUIRE(source != NULL);
        REQUIRE(caa->common.rdtype == type);
        REQUIRE(caa->common.rdclass == rdclass);
@@ -243,7 +243,7 @@ tostruct_caa(ARGS_TOSTRUCT) {
        dns_rdata_caa_t *caa = target;
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 257);
+       REQUIRE(rdata->type == dns_rdatatype_caa);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length >= 3U);
        REQUIRE(rdata->data != NULL);
@@ -297,7 +297,7 @@ freestruct_caa(ARGS_FREESTRUCT) {
        dns_rdata_caa_t *caa = (dns_rdata_caa_t *) source;
 
        REQUIRE(source != NULL);
-       REQUIRE(caa->common.rdtype == 257);
+       REQUIRE(caa->common.rdtype == dns_rdatatype_caa);
 
        if (caa->mctx == NULL)
                return;
@@ -311,7 +311,7 @@ freestruct_caa(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_caa(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 257);
+       REQUIRE(rdata->type == dns_rdatatype_caa);
        REQUIRE(rdata->data != NULL);
        REQUIRE(rdata->length >= 3U);
 
@@ -326,7 +326,7 @@ static inline isc_result_t
 digest_caa(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 257);
+       REQUIRE(rdata->type == dns_rdatatype_caa);
        REQUIRE(rdata->data != NULL);
        REQUIRE(rdata->length >= 3U);
 
@@ -338,7 +338,7 @@ digest_caa(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_caa(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 257);
+       REQUIRE(type == dns_rdatatype_caa);
 
        UNUSED(name);
        UNUSED(type);
@@ -351,7 +351,7 @@ checkowner_caa(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_caa(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 257);
+       REQUIRE(rdata->type == dns_rdatatype_caa);
        REQUIRE(rdata->data != NULL);
        REQUIRE(rdata->length >= 3U);
 
index 624f581725e0689a3dc0358c9ce53d18e2ab46f1..945b3644ce679523e18350a9dde870fba4cfeaf9 100644 (file)
@@ -37,7 +37,7 @@ fromtext_cdnskey(ARGS_FROMTEXT) {
        dns_secproto_t proto;
        dns_keyflags_t flags;
 
-       REQUIRE(type == 60);
+       REQUIRE(type == dns_rdatatype_cdnskey);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -87,7 +87,7 @@ totext_cdnskey(ARGS_TOTEXT) {
        char algbuf[DNS_NAME_FORMATSIZE];
        const char *keyinfo;
 
-       REQUIRE(rdata->type == 60);
+       REQUIRE(rdata->type == dns_rdatatype_cdnskey);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &sr);
@@ -171,7 +171,7 @@ fromwire_cdnskey(ARGS_FROMWIRE) {
        unsigned char algorithm;
        isc_region_t sr;
 
-       REQUIRE(type == 60);
+       REQUIRE(type == dns_rdatatype_cdnskey);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -211,7 +211,7 @@ static inline isc_result_t
 towire_cdnskey(ARGS_TOWIRE) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 60);
+       REQUIRE(rdata->type == dns_rdatatype_cdnskey);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -227,7 +227,7 @@ compare_cdnskey(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 60);
+       REQUIRE(rdata1->type == dns_rdatatype_cdnskey);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -240,7 +240,7 @@ static inline isc_result_t
 fromstruct_cdnskey(ARGS_FROMSTRUCT) {
        dns_rdata_cdnskey_t *dnskey = source;
 
-       REQUIRE(type == 60);
+       REQUIRE(type == dns_rdatatype_cdnskey);
        REQUIRE(source != NULL);
        REQUIRE(dnskey->common.rdtype == type);
        REQUIRE(dnskey->common.rdclass == rdclass);
@@ -266,7 +266,7 @@ tostruct_cdnskey(ARGS_TOSTRUCT) {
        dns_rdata_cdnskey_t *dnskey = target;
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 60);
+       REQUIRE(rdata->type == dns_rdatatype_cdnskey);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -309,7 +309,7 @@ freestruct_cdnskey(ARGS_FREESTRUCT) {
        dns_rdata_cdnskey_t *dnskey = (dns_rdata_cdnskey_t *) source;
 
        REQUIRE(source != NULL);
-       REQUIRE(dnskey->common.rdtype == 60);
+       REQUIRE(dnskey->common.rdtype == dns_rdatatype_cdnskey);
 
        if (dnskey->mctx == NULL)
                return;
@@ -321,7 +321,7 @@ freestruct_cdnskey(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_cdnskey(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 60);
+       REQUIRE(rdata->type == dns_rdatatype_cdnskey);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -334,7 +334,7 @@ static inline isc_result_t
 digest_cdnskey(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 60);
+       REQUIRE(rdata->type == dns_rdatatype_cdnskey);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -344,7 +344,7 @@ digest_cdnskey(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_cdnskey(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 60);
+       REQUIRE(type == dns_rdatatype_cdnskey);
 
        UNUSED(name);
        UNUSED(type);
@@ -357,7 +357,7 @@ checkowner_cdnskey(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_cdnskey(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 60);
+       REQUIRE(rdata->type == dns_rdatatype_cdnskey);
 
        UNUSED(rdata);
        UNUSED(owner);
index ff7ff6315790848587243d61dcd4b73df10e3517..b58d5f7999d2b2c1a9292196c500705864e924ca 100644 (file)
@@ -34,7 +34,7 @@ fromtext_cds(ARGS_FROMTEXT) {
        unsigned char c;
        int length;
 
-       REQUIRE(type == 59);
+       REQUIRE(type == dns_rdatatype_cds);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -98,7 +98,7 @@ totext_cds(ARGS_TOTEXT) {
        char buf[sizeof("64000 ")];
        unsigned int n;
 
-       REQUIRE(rdata->type == 59);
+       REQUIRE(rdata->type == dns_rdatatype_cds);
        REQUIRE(rdata->length != 0);
 
        UNUSED(tctx);
@@ -149,7 +149,7 @@ static inline isc_result_t
 fromwire_cds(ARGS_FROMWIRE) {
        isc_region_t sr;
 
-       REQUIRE(type == 59);
+       REQUIRE(type == dns_rdatatype_cds);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -194,7 +194,7 @@ static inline isc_result_t
 towire_cds(ARGS_TOWIRE) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 59);
+       REQUIRE(rdata->type == dns_rdatatype_cds);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -210,7 +210,7 @@ compare_cds(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 59);
+       REQUIRE(rdata1->type == dns_rdatatype_cds);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -223,7 +223,7 @@ static inline isc_result_t
 fromstruct_cds(ARGS_FROMSTRUCT) {
        dns_rdata_cds_t *ds = source;
 
-       REQUIRE(type == 59);
+       REQUIRE(type == dns_rdatatype_cds);
        REQUIRE(source != NULL);
        REQUIRE(ds->common.rdtype == type);
        REQUIRE(ds->common.rdclass == rdclass);
@@ -257,7 +257,7 @@ tostruct_cds(ARGS_TOSTRUCT) {
        dns_rdata_cds_t *ds = target;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 59);
+       REQUIRE(rdata->type == dns_rdatatype_cds);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -288,7 +288,7 @@ freestruct_cds(ARGS_FREESTRUCT) {
        dns_rdata_cds_t *ds = source;
 
        REQUIRE(ds != NULL);
-       REQUIRE(ds->common.rdtype == 59);
+       REQUIRE(ds->common.rdtype == dns_rdatatype_cds);
 
        if (ds->mctx == NULL)
                return;
@@ -300,7 +300,7 @@ freestruct_cds(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_cds(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 59);
+       REQUIRE(rdata->type == dns_rdatatype_cds);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -313,7 +313,7 @@ static inline isc_result_t
 digest_cds(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 59);
+       REQUIRE(rdata->type == dns_rdatatype_cds);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -323,7 +323,7 @@ digest_cds(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_cds(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 59);
+       REQUIRE(type == dns_rdatatype_cds);
 
        UNUSED(name);
        UNUSED(type);
@@ -336,7 +336,7 @@ checkowner_cds(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_cds(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 59);
+       REQUIRE(rdata->type == dns_rdatatype_cds);
 
        UNUSED(rdata);
        UNUSED(owner);
index a03290a60a021cffa758216499ddc1d0a0063eec..b7d1c3d661ebd282f31783bef3e7b227013d809e 100644 (file)
@@ -32,7 +32,7 @@ fromtext_cert(ARGS_FROMTEXT) {
        dns_secalg_t secalg;
        dns_cert_t cert;
 
-       REQUIRE(type == 37);
+       REQUIRE(type == dns_rdatatype_cert);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -74,7 +74,7 @@ totext_cert(ARGS_TOTEXT) {
        char buf[sizeof("64000 ")];
        unsigned int n;
 
-       REQUIRE(rdata->type == 37);
+       REQUIRE(rdata->type == dns_rdatatype_cert);
        REQUIRE(rdata->length != 0);
 
        UNUSED(tctx);
@@ -123,7 +123,7 @@ static inline isc_result_t
 fromwire_cert(ARGS_FROMWIRE) {
        isc_region_t sr;
 
-       REQUIRE(type == 37);
+       REQUIRE(type == dns_rdatatype_cert);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -142,7 +142,7 @@ static inline isc_result_t
 towire_cert(ARGS_TOWIRE) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 37);
+       REQUIRE(rdata->type == dns_rdatatype_cert);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -158,7 +158,7 @@ compare_cert(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 37);
+       REQUIRE(rdata1->type == dns_rdatatype_cert);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -171,7 +171,7 @@ static inline isc_result_t
 fromstruct_cert(ARGS_FROMSTRUCT) {
        dns_rdata_cert_t *cert = source;
 
-       REQUIRE(type == 37);
+       REQUIRE(type == dns_rdatatype_cert);
        REQUIRE(source != NULL);
        REQUIRE(cert->common.rdtype == type);
        REQUIRE(cert->common.rdclass == rdclass);
@@ -191,7 +191,7 @@ tostruct_cert(ARGS_TOSTRUCT) {
        dns_rdata_cert_t *cert = target;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 37);
+       REQUIRE(rdata->type == dns_rdatatype_cert);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -222,7 +222,7 @@ freestruct_cert(ARGS_FREESTRUCT) {
        dns_rdata_cert_t *cert = source;
 
        REQUIRE(cert != NULL);
-       REQUIRE(cert->common.rdtype == 37);
+       REQUIRE(cert->common.rdtype == dns_rdatatype_cert);
 
        if (cert->mctx == NULL)
                return;
@@ -234,7 +234,7 @@ freestruct_cert(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_cert(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 37);
+       REQUIRE(rdata->type == dns_rdatatype_cert);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -247,7 +247,7 @@ static inline isc_result_t
 digest_cert(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 37);
+       REQUIRE(rdata->type == dns_rdatatype_cert);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -257,7 +257,7 @@ digest_cert(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_cert(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 37);
+       REQUIRE(type == dns_rdatatype_cert);
 
        UNUSED(name);
        UNUSED(type);
@@ -270,7 +270,7 @@ checkowner_cert(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_cert(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 37);
+       REQUIRE(rdata->type == dns_rdatatype_cert);
 
        UNUSED(rdata);
        UNUSED(owner);
index 45a48a897fc027e877ed19a75aaf120626aff514..dbbe95423c06ccbc37dadb078d29230737f97447 100644 (file)
@@ -31,7 +31,7 @@ fromtext_cname(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
 
-       REQUIRE(type == 5);
+       REQUIRE(type == dns_rdatatype_cname);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -54,7 +54,7 @@ totext_cname(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 5);
+       REQUIRE(rdata->type == dns_rdatatype_cname);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -72,7 +72,7 @@ static inline isc_result_t
 fromwire_cname(ARGS_FROMWIRE) {
        dns_name_t name;
 
-       REQUIRE(type == 5);
+       REQUIRE(type == dns_rdatatype_cname);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -89,7 +89,7 @@ towire_cname(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 5);
+       REQUIRE(rdata->type == dns_rdatatype_cname);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
@@ -110,7 +110,7 @@ compare_cname(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 5);
+       REQUIRE(rdata1->type == dns_rdatatype_cname);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -131,7 +131,7 @@ fromstruct_cname(ARGS_FROMSTRUCT) {
        dns_rdata_cname_t *cname = source;
        isc_region_t region;
 
-       REQUIRE(type == 5);
+       REQUIRE(type == dns_rdatatype_cname);
        REQUIRE(source != NULL);
        REQUIRE(cname->common.rdtype == type);
        REQUIRE(cname->common.rdclass == rdclass);
@@ -149,7 +149,7 @@ tostruct_cname(ARGS_TOSTRUCT) {
        dns_rdata_cname_t *cname = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 5);
+       REQUIRE(rdata->type == dns_rdatatype_cname);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -185,7 +185,7 @@ additionaldata_cname(ARGS_ADDLDATA) {
        UNUSED(add);
        UNUSED(arg);
 
-       REQUIRE(rdata->type == 5);
+       REQUIRE(rdata->type == dns_rdatatype_cname);
 
        return (ISC_R_SUCCESS);
 }
@@ -195,7 +195,7 @@ digest_cname(ARGS_DIGEST) {
        isc_region_t r;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 5);
+       REQUIRE(rdata->type == dns_rdatatype_cname);
 
        dns_rdata_toregion(rdata, &r);
        dns_name_init(&name, NULL);
@@ -207,7 +207,7 @@ digest_cname(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_cname(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 5);
+       REQUIRE(type == dns_rdatatype_cname);
 
        UNUSED(name);
        UNUSED(type);
@@ -220,7 +220,7 @@ checkowner_cname(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_cname(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 5);
+       REQUIRE(rdata->type == dns_rdatatype_cname);
 
        UNUSED(rdata);
        UNUSED(owner);
index 5751ad8945273dd59003ca4ab3d72f70e809ff2e..8790463e70ddb4243919152b611cb1312bf95ddc 100644 (file)
@@ -35,7 +35,7 @@ fromtext_dlv(ARGS_FROMTEXT) {
        unsigned char c;
        int length;
 
-       REQUIRE(type == 32769);
+       REQUIRE(type == dns_rdatatype_dlv);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -100,7 +100,7 @@ totext_dlv(ARGS_TOTEXT) {
        char buf[sizeof("64000 ")];
        unsigned int n;
 
-       REQUIRE(rdata->type == 32769);
+       REQUIRE(rdata->type == dns_rdatatype_dlv);
        REQUIRE(rdata->length != 0);
 
        UNUSED(tctx);
@@ -151,7 +151,7 @@ static inline isc_result_t
 fromwire_dlv(ARGS_FROMWIRE) {
        isc_region_t sr;
 
-       REQUIRE(type == 32769);
+       REQUIRE(type == dns_rdatatype_dlv);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -196,7 +196,7 @@ static inline isc_result_t
 towire_dlv(ARGS_TOWIRE) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 32769);
+       REQUIRE(rdata->type == dns_rdatatype_dlv);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -212,7 +212,7 @@ compare_dlv(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 32769);
+       REQUIRE(rdata1->type == dns_rdatatype_dlv);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -225,7 +225,7 @@ static inline isc_result_t
 fromstruct_dlv(ARGS_FROMSTRUCT) {
        dns_rdata_dlv_t *dlv = source;
 
-       REQUIRE(type == 32769);
+       REQUIRE(type == dns_rdatatype_dlv);
        REQUIRE(source != NULL);
        REQUIRE(dlv->common.rdtype == type);
        REQUIRE(dlv->common.rdclass == rdclass);
@@ -259,7 +259,7 @@ tostruct_dlv(ARGS_TOSTRUCT) {
        dns_rdata_dlv_t *dlv = target;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 32769);
+       REQUIRE(rdata->type == dns_rdatatype_dlv);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -290,7 +290,7 @@ freestruct_dlv(ARGS_FREESTRUCT) {
        dns_rdata_dlv_t *dlv = source;
 
        REQUIRE(dlv != NULL);
-       REQUIRE(dlv->common.rdtype == 32769);
+       REQUIRE(dlv->common.rdtype == dns_rdatatype_dlv);
 
        if (dlv->mctx == NULL)
                return;
@@ -302,7 +302,7 @@ freestruct_dlv(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_dlv(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 32769);
+       REQUIRE(rdata->type == dns_rdatatype_dlv);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -315,7 +315,7 @@ static inline isc_result_t
 digest_dlv(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 32769);
+       REQUIRE(rdata->type == dns_rdatatype_dlv);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -325,7 +325,7 @@ digest_dlv(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_dlv(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 32769);
+       REQUIRE(type == dns_rdatatype_dlv);
 
        UNUSED(name);
        UNUSED(type);
@@ -338,7 +338,7 @@ checkowner_dlv(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_dlv(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 32769);
+       REQUIRE(rdata->type == dns_rdatatype_dlv);
 
        UNUSED(rdata);
        UNUSED(owner);
index d899494f53689a485bb6b05c8de47304168a7b9d..86e976683fc3bbe05cf92a57482e1ef7d9da4318 100644 (file)
@@ -32,7 +32,7 @@ fromtext_dname(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
 
-       REQUIRE(type == 39);
+       REQUIRE(type == dns_rdatatype_dname);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -55,7 +55,7 @@ totext_dname(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 39);
+       REQUIRE(rdata->type == dns_rdatatype_dname);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -73,7 +73,7 @@ static inline isc_result_t
 fromwire_dname(ARGS_FROMWIRE) {
        dns_name_t name;
 
-       REQUIRE(type == 39);
+       REQUIRE(type == dns_rdatatype_dname);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -90,7 +90,7 @@ towire_dname(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 39);
+       REQUIRE(rdata->type == dns_rdatatype_dname);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -110,7 +110,7 @@ compare_dname(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 39);
+       REQUIRE(rdata1->type == dns_rdatatype_dname);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -131,7 +131,7 @@ fromstruct_dname(ARGS_FROMSTRUCT) {
        dns_rdata_dname_t *dname = source;
        isc_region_t region;
 
-       REQUIRE(type == 39);
+       REQUIRE(type == dns_rdatatype_dname);
        REQUIRE(source != NULL);
        REQUIRE(dname->common.rdtype == type);
        REQUIRE(dname->common.rdclass == rdclass);
@@ -149,7 +149,7 @@ tostruct_dname(ARGS_TOSTRUCT) {
        dns_rdata_dname_t *dname = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 39);
+       REQUIRE(rdata->type == dns_rdatatype_dname);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -171,7 +171,7 @@ freestruct_dname(ARGS_FREESTRUCT) {
        dns_rdata_dname_t *dname = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(dname->common.rdtype == 39);
+       REQUIRE(dname->common.rdtype == dns_rdatatype_dname);
 
        if (dname->mctx == NULL)
                return;
@@ -186,7 +186,7 @@ additionaldata_dname(ARGS_ADDLDATA) {
        UNUSED(add);
        UNUSED(arg);
 
-       REQUIRE(rdata->type == 39);
+       REQUIRE(rdata->type == dns_rdatatype_dname);
 
        return (ISC_R_SUCCESS);
 }
@@ -196,7 +196,7 @@ digest_dname(ARGS_DIGEST) {
        isc_region_t r;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 39);
+       REQUIRE(rdata->type == dns_rdatatype_dname);
 
        dns_rdata_toregion(rdata, &r);
        dns_name_init(&name, NULL);
@@ -208,7 +208,7 @@ digest_dname(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_dname(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 39);
+       REQUIRE(type == dns_rdatatype_dname);
 
        UNUSED(name);
        UNUSED(type);
@@ -221,7 +221,7 @@ checkowner_dname(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_dname(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 39);
+       REQUIRE(rdata->type == dns_rdatatype_dname);
 
        UNUSED(rdata);
        UNUSED(owner);
index aa705cab3684868e1ee41473b02aa96bbd2616ec..13d8625eb006328009fdbc0e13a37d56d8cf84d3 100644 (file)
@@ -38,7 +38,7 @@ fromtext_dnskey(ARGS_FROMTEXT) {
        dns_secproto_t proto;
        dns_keyflags_t flags;
 
-       REQUIRE(type == 48);
+       REQUIRE(type == dns_rdatatype_dnskey);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -88,7 +88,7 @@ totext_dnskey(ARGS_TOTEXT) {
        char algbuf[DNS_NAME_FORMATSIZE];
        const char *keyinfo;
 
-       REQUIRE(rdata->type == 48);
+       REQUIRE(rdata->type == dns_rdatatype_dnskey);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &sr);
@@ -172,7 +172,7 @@ fromwire_dnskey(ARGS_FROMWIRE) {
        unsigned char algorithm;
        isc_region_t sr;
 
-       REQUIRE(type == 48);
+       REQUIRE(type == dns_rdatatype_dnskey);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -212,7 +212,7 @@ static inline isc_result_t
 towire_dnskey(ARGS_TOWIRE) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 48);
+       REQUIRE(rdata->type == dns_rdatatype_dnskey);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -228,7 +228,7 @@ compare_dnskey(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 48);
+       REQUIRE(rdata1->type == dns_rdatatype_dnskey);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -241,7 +241,7 @@ static inline isc_result_t
 fromstruct_dnskey(ARGS_FROMSTRUCT) {
        dns_rdata_dnskey_t *dnskey = source;
 
-       REQUIRE(type == 48);
+       REQUIRE(type == dns_rdatatype_dnskey);
        REQUIRE(source != NULL);
        REQUIRE(dnskey->common.rdtype == type);
        REQUIRE(dnskey->common.rdclass == rdclass);
@@ -267,7 +267,7 @@ tostruct_dnskey(ARGS_TOSTRUCT) {
        dns_rdata_dnskey_t *dnskey = target;
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 48);
+       REQUIRE(rdata->type == dns_rdatatype_dnskey);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -310,7 +310,7 @@ freestruct_dnskey(ARGS_FREESTRUCT) {
        dns_rdata_dnskey_t *dnskey = (dns_rdata_dnskey_t *) source;
 
        REQUIRE(source != NULL);
-       REQUIRE(dnskey->common.rdtype == 48);
+       REQUIRE(dnskey->common.rdtype == dns_rdatatype_dnskey);
 
        if (dnskey->mctx == NULL)
                return;
@@ -322,7 +322,7 @@ freestruct_dnskey(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_dnskey(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 48);
+       REQUIRE(rdata->type == dns_rdatatype_dnskey);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -335,7 +335,7 @@ static inline isc_result_t
 digest_dnskey(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 48);
+       REQUIRE(rdata->type == dns_rdatatype_dnskey);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -345,7 +345,7 @@ digest_dnskey(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_dnskey(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 48);
+       REQUIRE(type == dns_rdatatype_dnskey);
 
        UNUSED(name);
        UNUSED(type);
@@ -358,7 +358,7 @@ checkowner_dnskey(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_dnskey(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 48);
+       REQUIRE(rdata->type == dns_rdatatype_dnskey);
 
        UNUSED(rdata);
        UNUSED(owner);
index dd47c8d5e83ef1b43b8a54228274112b2933fa04..91defdb498d6fe3751393ab90977331a0439c30f 100644 (file)
@@ -36,7 +36,7 @@ fromtext_ds(ARGS_FROMTEXT) {
        unsigned char c;
        int length;
 
-       REQUIRE(type == 43);
+       REQUIRE(type == dns_rdatatype_ds);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -100,7 +100,7 @@ totext_ds(ARGS_TOTEXT) {
        char buf[sizeof("64000 ")];
        unsigned int n;
 
-       REQUIRE(rdata->type == 43);
+       REQUIRE(rdata->type == dns_rdatatype_ds);
        REQUIRE(rdata->length != 0);
 
        UNUSED(tctx);
@@ -151,7 +151,7 @@ static inline isc_result_t
 fromwire_ds(ARGS_FROMWIRE) {
        isc_region_t sr;
 
-       REQUIRE(type == 43);
+       REQUIRE(type == dns_rdatatype_ds);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -196,7 +196,7 @@ static inline isc_result_t
 towire_ds(ARGS_TOWIRE) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 43);
+       REQUIRE(rdata->type == dns_rdatatype_ds);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -212,7 +212,7 @@ compare_ds(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 43);
+       REQUIRE(rdata1->type == dns_rdatatype_ds);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -225,7 +225,7 @@ static inline isc_result_t
 fromstruct_ds(ARGS_FROMSTRUCT) {
        dns_rdata_ds_t *ds = source;
 
-       REQUIRE(type == 43);
+       REQUIRE(type == dns_rdatatype_ds);
        REQUIRE(source != NULL);
        REQUIRE(ds->common.rdtype == type);
        REQUIRE(ds->common.rdclass == rdclass);
@@ -259,7 +259,7 @@ tostruct_ds(ARGS_TOSTRUCT) {
        dns_rdata_ds_t *ds = target;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 43);
+       REQUIRE(rdata->type == dns_rdatatype_ds);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -290,7 +290,7 @@ freestruct_ds(ARGS_FREESTRUCT) {
        dns_rdata_ds_t *ds = source;
 
        REQUIRE(ds != NULL);
-       REQUIRE(ds->common.rdtype == 43);
+       REQUIRE(ds->common.rdtype == dns_rdatatype_ds);
 
        if (ds->mctx == NULL)
                return;
@@ -302,7 +302,7 @@ freestruct_ds(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_ds(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 43);
+       REQUIRE(rdata->type == dns_rdatatype_ds);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -315,7 +315,7 @@ static inline isc_result_t
 digest_ds(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 43);
+       REQUIRE(rdata->type == dns_rdatatype_ds);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -325,7 +325,7 @@ digest_ds(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_ds(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 43);
+       REQUIRE(type == dns_rdatatype_ds);
 
        UNUSED(name);
        UNUSED(type);
@@ -338,7 +338,7 @@ checkowner_ds(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_ds(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 43);
+       REQUIRE(rdata->type == dns_rdatatype_ds);
 
        UNUSED(rdata);
        UNUSED(owner);
index b25a7b7e03e4362f603ed2417b0858277a3247bf..17635526d21c661bf799b16ec0584c5ea7b1a1b8 100644 (file)
@@ -28,7 +28,7 @@ fromtext_eui48(ARGS_FROMTEXT) {
        unsigned int l0, l1, l2, l3, l4, l5;
        int n;
 
-       REQUIRE(type == 108);
+       REQUIRE(type == dns_rdatatype_eui48);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -57,7 +57,7 @@ static inline isc_result_t
 totext_eui48(ARGS_TOTEXT) {
        char buf[sizeof("xx-xx-xx-xx-xx-xx")];
 
-       REQUIRE(rdata->type == 108);
+       REQUIRE(rdata->type == dns_rdatatype_eui48);
        REQUIRE(rdata->length == 6);
 
        UNUSED(tctx);
@@ -72,7 +72,7 @@ static inline isc_result_t
 fromwire_eui48(ARGS_FROMWIRE) {
        isc_region_t sregion;
 
-       REQUIRE(type == 108);
+       REQUIRE(type == dns_rdatatype_eui48);
 
        UNUSED(type);
        UNUSED(options);
@@ -89,7 +89,7 @@ fromwire_eui48(ARGS_FROMWIRE) {
 static inline isc_result_t
 towire_eui48(ARGS_TOWIRE) {
 
-       REQUIRE(rdata->type == 108);
+       REQUIRE(rdata->type == dns_rdatatype_eui48);
        REQUIRE(rdata->length == 6);
 
        UNUSED(cctx);
@@ -104,7 +104,7 @@ compare_eui48(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 108);
+       REQUIRE(rdata1->type == dns_rdatatype_eui48);
        REQUIRE(rdata1->length == 6);
        REQUIRE(rdata2->length == 6);
 
@@ -117,7 +117,7 @@ static inline isc_result_t
 fromstruct_eui48(ARGS_FROMSTRUCT) {
        dns_rdata_eui48_t *eui48 = source;
 
-       REQUIRE(type == 108);
+       REQUIRE(type == dns_rdatatype_eui48);
        REQUIRE(source != NULL);
        REQUIRE(eui48->common.rdtype == type);
        REQUIRE(eui48->common.rdclass == rdclass);
@@ -132,7 +132,7 @@ static inline isc_result_t
 tostruct_eui48(ARGS_TOSTRUCT) {
        dns_rdata_eui48_t *eui48 = target;
 
-       REQUIRE(rdata->type == 108);
+       REQUIRE(rdata->type == dns_rdatatype_eui48);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length == 6);
 
@@ -151,7 +151,7 @@ freestruct_eui48(ARGS_FREESTRUCT) {
        dns_rdata_eui48_t *eui48 = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(eui48->common.rdtype == 108);
+       REQUIRE(eui48->common.rdtype == dns_rdatatype_eui48);
 
        return;
 }
@@ -159,7 +159,7 @@ freestruct_eui48(ARGS_FREESTRUCT) {
 static inline isc_result_t
 additionaldata_eui48(ARGS_ADDLDATA) {
 
-       REQUIRE(rdata->type == 108);
+       REQUIRE(rdata->type == dns_rdatatype_eui48);
        REQUIRE(rdata->length == 6);
 
        UNUSED(rdata);
@@ -173,7 +173,7 @@ static inline isc_result_t
 digest_eui48(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 108);
+       REQUIRE(rdata->type == dns_rdatatype_eui48);
        REQUIRE(rdata->length == 6);
 
        dns_rdata_toregion(rdata, &r);
@@ -184,7 +184,7 @@ digest_eui48(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_eui48(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 108);
+       REQUIRE(type == dns_rdatatype_eui48);
 
        UNUSED(name);
        UNUSED(type);
@@ -197,7 +197,7 @@ checkowner_eui48(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_eui48(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 108);
+       REQUIRE(rdata->type == dns_rdatatype_eui48);
        REQUIRE(rdata->length == 6);
 
        UNUSED(rdata);
index 33d2f637c8257cf9af96d1577c1014df0d4b610e..8de1170c587e5a2c2f599ca95b70952ccd8b964d 100644 (file)
@@ -28,7 +28,7 @@ fromtext_eui64(ARGS_FROMTEXT) {
        unsigned int l0, l1, l2, l3, l4, l5, l6, l7;
        int n;
 
-       REQUIRE(type == 109);
+       REQUIRE(type == dns_rdatatype_eui64);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -59,7 +59,7 @@ static inline isc_result_t
 totext_eui64(ARGS_TOTEXT) {
        char buf[sizeof("xx-xx-xx-xx-xx-xx-xx-xx")];
 
-       REQUIRE(rdata->type == 109);
+       REQUIRE(rdata->type == dns_rdatatype_eui64);
        REQUIRE(rdata->length == 8);
 
        UNUSED(tctx);
@@ -77,7 +77,7 @@ static inline isc_result_t
 fromwire_eui64(ARGS_FROMWIRE) {
        isc_region_t sregion;
 
-       REQUIRE(type == 109);
+       REQUIRE(type == dns_rdatatype_eui64);
 
        UNUSED(type);
        UNUSED(options);
@@ -94,7 +94,7 @@ fromwire_eui64(ARGS_FROMWIRE) {
 static inline isc_result_t
 towire_eui64(ARGS_TOWIRE) {
 
-       REQUIRE(rdata->type == 109);
+       REQUIRE(rdata->type == dns_rdatatype_eui64);
        REQUIRE(rdata->length == 8);
 
        UNUSED(cctx);
@@ -109,7 +109,7 @@ compare_eui64(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 109);
+       REQUIRE(rdata1->type == dns_rdatatype_eui64);
        REQUIRE(rdata1->length == 8);
        REQUIRE(rdata2->length == 8);
 
@@ -122,7 +122,7 @@ static inline isc_result_t
 fromstruct_eui64(ARGS_FROMSTRUCT) {
        dns_rdata_eui64_t *eui64 = source;
 
-       REQUIRE(type == 109);
+       REQUIRE(type == dns_rdatatype_eui64);
        REQUIRE(source != NULL);
        REQUIRE(eui64->common.rdtype == type);
        REQUIRE(eui64->common.rdclass == rdclass);
@@ -137,7 +137,7 @@ static inline isc_result_t
 tostruct_eui64(ARGS_TOSTRUCT) {
        dns_rdata_eui64_t *eui64 = target;
 
-       REQUIRE(rdata->type == 109);
+       REQUIRE(rdata->type == dns_rdatatype_eui64);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length == 8);
 
@@ -156,7 +156,7 @@ freestruct_eui64(ARGS_FREESTRUCT) {
        dns_rdata_eui64_t *eui64 = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(eui64->common.rdtype == 109);
+       REQUIRE(eui64->common.rdtype == dns_rdatatype_eui64);
 
        return;
 }
@@ -164,7 +164,7 @@ freestruct_eui64(ARGS_FREESTRUCT) {
 static inline isc_result_t
 additionaldata_eui64(ARGS_ADDLDATA) {
 
-       REQUIRE(rdata->type == 109);
+       REQUIRE(rdata->type == dns_rdatatype_eui64);
        REQUIRE(rdata->length == 8);
 
        UNUSED(rdata);
@@ -178,7 +178,7 @@ static inline isc_result_t
 digest_eui64(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 109);
+       REQUIRE(rdata->type == dns_rdatatype_eui64);
        REQUIRE(rdata->length == 8);
 
        dns_rdata_toregion(rdata, &r);
@@ -189,7 +189,7 @@ digest_eui64(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_eui64(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 109);
+       REQUIRE(type == dns_rdatatype_eui64);
 
        UNUSED(name);
        UNUSED(type);
@@ -202,7 +202,7 @@ checkowner_eui64(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_eui64(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 109);
+       REQUIRE(rdata->type == dns_rdatatype_eui64);
        REQUIRE(rdata->length == 8);
 
        UNUSED(rdata);
index e9ba59eacb6a4432675297c966d31f21b1df4ae1..8a1d1b910cf0c11142b9b278b1b64e96309f6200 100644 (file)
@@ -31,7 +31,7 @@ fromtext_gpos(ARGS_FROMTEXT) {
        isc_token_t token;
        int i;
 
-       REQUIRE(type == 27);
+       REQUIRE(type == dns_rdatatype_gpos);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -53,7 +53,7 @@ totext_gpos(ARGS_TOTEXT) {
        isc_region_t region;
        int i;
 
-       REQUIRE(rdata->type == 27);
+       REQUIRE(rdata->type == dns_rdatatype_gpos);
        REQUIRE(rdata->length != 0);
 
        UNUSED(tctx);
@@ -73,7 +73,7 @@ static inline isc_result_t
 fromwire_gpos(ARGS_FROMWIRE) {
        int i;
 
-       REQUIRE(type == 27);
+       REQUIRE(type == dns_rdatatype_gpos);
 
        UNUSED(type);
        UNUSED(dctx);
@@ -88,7 +88,7 @@ fromwire_gpos(ARGS_FROMWIRE) {
 static inline isc_result_t
 towire_gpos(ARGS_TOWIRE) {
 
-       REQUIRE(rdata->type == 27);
+       REQUIRE(rdata->type == dns_rdatatype_gpos);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -103,7 +103,7 @@ compare_gpos(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 27);
+       REQUIRE(rdata1->type == dns_rdatatype_gpos);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -116,7 +116,7 @@ static inline isc_result_t
 fromstruct_gpos(ARGS_FROMSTRUCT) {
        dns_rdata_gpos_t *gpos = source;
 
-       REQUIRE(type == 27);
+       REQUIRE(type == dns_rdatatype_gpos);
        REQUIRE(source != NULL);
        REQUIRE(gpos->common.rdtype == type);
        REQUIRE(gpos->common.rdclass == rdclass);
@@ -137,7 +137,7 @@ tostruct_gpos(ARGS_TOSTRUCT) {
        dns_rdata_gpos_t *gpos = target;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 27);
+       REQUIRE(rdata->type == dns_rdatatype_gpos);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -188,7 +188,7 @@ freestruct_gpos(ARGS_FREESTRUCT) {
        dns_rdata_gpos_t *gpos = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(gpos->common.rdtype == 27);
+       REQUIRE(gpos->common.rdtype == dns_rdatatype_gpos);
 
        if (gpos->mctx == NULL)
                return;
@@ -204,7 +204,7 @@ freestruct_gpos(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_gpos(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 27);
+       REQUIRE(rdata->type == dns_rdatatype_gpos);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -217,7 +217,7 @@ static inline isc_result_t
 digest_gpos(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 27);
+       REQUIRE(rdata->type == dns_rdatatype_gpos);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -227,7 +227,7 @@ digest_gpos(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_gpos(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 27);
+       REQUIRE(type == dns_rdatatype_gpos);
 
        UNUSED(name);
        UNUSED(type);
@@ -240,7 +240,7 @@ checkowner_gpos(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_gpos(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 27);
+       REQUIRE(rdata->type == dns_rdatatype_gpos);
 
        UNUSED(rdata);
        UNUSED(owner);
index 411d6b56866e1279d5a682ee897b25c0ea78eb9c..7dd42afe4c09b9b265e2ce1392510686c8519ced 100644 (file)
@@ -37,7 +37,7 @@ fromtext_hinfo(ARGS_FROMTEXT) {
        UNUSED(options);
        UNUSED(callbacks);
 
-       REQUIRE(type == 13);
+       REQUIRE(type == dns_rdatatype_hinfo);
 
        for (i = 0; i < 2; i++) {
                RETERR(isc_lex_getmastertoken(lexer, &token,
@@ -54,7 +54,7 @@ totext_hinfo(ARGS_TOTEXT) {
 
        UNUSED(tctx);
 
-       REQUIRE(rdata->type == 13);
+       REQUIRE(rdata->type == dns_rdatatype_hinfo);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &region);
@@ -66,7 +66,7 @@ totext_hinfo(ARGS_TOTEXT) {
 static inline isc_result_t
 fromwire_hinfo(ARGS_FROMWIRE) {
 
-       REQUIRE(type == 13);
+       REQUIRE(type == dns_rdatatype_hinfo);
 
        UNUSED(type);
        UNUSED(dctx);
@@ -82,7 +82,7 @@ towire_hinfo(ARGS_TOWIRE) {
 
        UNUSED(cctx);
 
-       REQUIRE(rdata->type == 13);
+       REQUIRE(rdata->type == dns_rdatatype_hinfo);
        REQUIRE(rdata->length != 0);
 
        return (mem_tobuffer(target, rdata->data, rdata->length));
@@ -95,7 +95,7 @@ compare_hinfo(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 13);
+       REQUIRE(rdata1->type == dns_rdatatype_hinfo);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -108,7 +108,7 @@ static inline isc_result_t
 fromstruct_hinfo(ARGS_FROMSTRUCT) {
        dns_rdata_hinfo_t *hinfo = source;
 
-       REQUIRE(type == 13);
+       REQUIRE(type == dns_rdatatype_hinfo);
        REQUIRE(source != NULL);
        REQUIRE(hinfo->common.rdtype == type);
        REQUIRE(hinfo->common.rdclass == rdclass);
@@ -127,7 +127,7 @@ tostruct_hinfo(ARGS_TOSTRUCT) {
        dns_rdata_hinfo_t *hinfo = target;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 13);
+       REQUIRE(rdata->type == dns_rdatatype_hinfo);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -176,7 +176,7 @@ freestruct_hinfo(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_hinfo(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 13);
+       REQUIRE(rdata->type == dns_rdatatype_hinfo);
 
        UNUSED(add);
        UNUSED(arg);
@@ -189,7 +189,7 @@ static inline isc_result_t
 digest_hinfo(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 13);
+       REQUIRE(rdata->type == dns_rdatatype_hinfo);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -199,7 +199,7 @@ digest_hinfo(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_hinfo(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 13);
+       REQUIRE(type == dns_rdatatype_hinfo);
 
        UNUSED(name);
        UNUSED(type);
@@ -212,7 +212,7 @@ checkowner_hinfo(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_hinfo(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 13);
+       REQUIRE(rdata->type == dns_rdatatype_hinfo);
 
        UNUSED(rdata);
        UNUSED(owner);
index eee581f26a952d5665d7711c420d30acad25a7c1..552061d57f6014b056ee88b147a8072229191b29 100644 (file)
@@ -35,7 +35,7 @@ fromtext_hip(ARGS_FROMTEXT) {
        unsigned char *start;
        size_t len;
 
-       REQUIRE(type == 55);
+       REQUIRE(type == dns_rdatatype_hip);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -126,7 +126,7 @@ totext_hip(ARGS_TOTEXT) {
        unsigned char algorithm;
        char buf[sizeof("225 ")];
 
-       REQUIRE(rdata->type == 55);
+       REQUIRE(rdata->type == dns_rdatatype_hip);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &region);
@@ -193,7 +193,7 @@ fromwire_hip(ARGS_FROMWIRE) {
        isc_uint8_t hit_len;
        isc_uint16_t key_len;
 
-       REQUIRE(type == 55);
+       REQUIRE(type == dns_rdatatype_hip);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -229,7 +229,7 @@ static inline isc_result_t
 towire_hip(ARGS_TOWIRE) {
        isc_region_t region;
 
-       REQUIRE(rdata->type == 55);
+       REQUIRE(rdata->type == dns_rdatatype_hip);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -245,7 +245,7 @@ compare_hip(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 55);
+       REQUIRE(rdata1->type == dns_rdatatype_hip);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -260,7 +260,7 @@ fromstruct_hip(ARGS_FROMSTRUCT) {
        dns_rdata_hip_t myhip;
        isc_result_t result;
 
-       REQUIRE(type == 55);
+       REQUIRE(type == dns_rdatatype_hip);
        REQUIRE(source != NULL);
        REQUIRE(hip->common.rdtype == type);
        REQUIRE(hip->common.rdclass == rdclass);
@@ -292,7 +292,7 @@ tostruct_hip(ARGS_TOSTRUCT) {
        isc_region_t region;
        dns_rdata_hip_t *hip = target;
 
-       REQUIRE(rdata->type == 55);
+       REQUIRE(rdata->type == dns_rdatatype_hip);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -369,7 +369,7 @@ additionaldata_hip(ARGS_ADDLDATA) {
        UNUSED(add);
        UNUSED(arg);
 
-       REQUIRE(rdata->type == 55);
+       REQUIRE(rdata->type == dns_rdatatype_hip);
 
        return (ISC_R_SUCCESS);
 }
@@ -378,7 +378,7 @@ static inline isc_result_t
 digest_hip(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 55);
+       REQUIRE(rdata->type == dns_rdatatype_hip);
 
        dns_rdata_toregion(rdata, &r);
        return ((digest)(arg, &r));
@@ -387,7 +387,7 @@ digest_hip(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_hip(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 55);
+       REQUIRE(type == dns_rdatatype_hip);
 
        UNUSED(name);
        UNUSED(type);
@@ -400,7 +400,7 @@ checkowner_hip(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_hip(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 55);
+       REQUIRE(rdata->type == dns_rdatatype_hip);
 
        UNUSED(rdata);
        UNUSED(owner);
@@ -459,7 +459,7 @@ casecompare_hip(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 55);
+       REQUIRE(rdata1->type == dns_rdatatype_hip);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
index 230d0d1e1e82997615dae20544fef407f4ca62b8..28c4642c1bf9ab1175b1b69315745dbecf6ac087 100644 (file)
@@ -35,7 +35,7 @@ fromtext_ipseckey(ARGS_FROMTEXT) {
        unsigned char addr6[16];
        isc_region_t region;
 
-       REQUIRE(type == 45);
+       REQUIRE(type == dns_rdatatype_ipseckey);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -124,7 +124,7 @@ totext_ipseckey(ARGS_TOTEXT) {
        unsigned short num;
        unsigned short gateway;
 
-       REQUIRE(rdata->type == 45);
+       REQUIRE(rdata->type == dns_rdatatype_ipseckey);
        REQUIRE(rdata->length >= 3);
 
        dns_name_init(&name, NULL);
@@ -207,7 +207,7 @@ fromwire_ipseckey(ARGS_FROMWIRE) {
        dns_name_t name;
        isc_region_t region;
 
-       REQUIRE(type == 45);
+       REQUIRE(type == dns_rdatatype_ipseckey);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -254,7 +254,7 @@ static inline isc_result_t
 towire_ipseckey(ARGS_TOWIRE) {
        isc_region_t region;
 
-       REQUIRE(rdata->type == 45);
+       REQUIRE(rdata->type == dns_rdatatype_ipseckey);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -270,7 +270,7 @@ compare_ipseckey(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 45);
+       REQUIRE(rdata1->type == dns_rdatatype_ipseckey);
        REQUIRE(rdata1->length >= 3);
        REQUIRE(rdata2->length >= 3);
 
@@ -286,7 +286,7 @@ fromstruct_ipseckey(ARGS_FROMSTRUCT) {
        isc_region_t region;
        isc_uint32_t n;
 
-       REQUIRE(type == 45);
+       REQUIRE(type == dns_rdatatype_ipseckey);
        REQUIRE(source != NULL);
        REQUIRE(ipseckey->common.rdtype == type);
        REQUIRE(ipseckey->common.rdclass == rdclass);
@@ -330,7 +330,7 @@ tostruct_ipseckey(ARGS_TOSTRUCT) {
        dns_name_t name;
        isc_uint32_t n;
 
-       REQUIRE(rdata->type == 45);
+       REQUIRE(rdata->type == dns_rdatatype_ipseckey);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length >= 3);
 
@@ -398,7 +398,7 @@ freestruct_ipseckey(ARGS_FREESTRUCT) {
        dns_rdata_ipseckey_t *ipseckey = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(ipseckey->common.rdtype == 45);
+       REQUIRE(ipseckey->common.rdtype == dns_rdatatype_ipseckey);
 
        if (ipseckey->mctx == NULL)
                return;
@@ -415,7 +415,7 @@ freestruct_ipseckey(ARGS_FREESTRUCT) {
 static inline isc_result_t
 additionaldata_ipseckey(ARGS_ADDLDATA) {
 
-       REQUIRE(rdata->type == 45);
+       REQUIRE(rdata->type == dns_rdatatype_ipseckey);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -428,7 +428,7 @@ static inline isc_result_t
 digest_ipseckey(ARGS_DIGEST) {
        isc_region_t region;
 
-       REQUIRE(rdata->type == 45);
+       REQUIRE(rdata->type == dns_rdatatype_ipseckey);
 
        dns_rdata_toregion(rdata, &region);
        return ((digest)(arg, &region));
@@ -437,7 +437,7 @@ digest_ipseckey(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_ipseckey(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 45);
+       REQUIRE(type == dns_rdatatype_ipseckey);
 
        UNUSED(name);
        UNUSED(type);
@@ -450,7 +450,7 @@ checkowner_ipseckey(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_ipseckey(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 45);
+       REQUIRE(rdata->type == dns_rdatatype_ipseckey);
 
        UNUSED(rdata);
        UNUSED(owner);
@@ -469,7 +469,7 @@ casecompare_ipseckey(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 45);
+       REQUIRE(rdata1->type == dns_rdatatype_ipseckey);
        REQUIRE(rdata1->length >= 3);
        REQUIRE(rdata2->length >= 3);
 
index dea36f0f658a982cf8c05fb52368c4a64af7f9e7..122388c12367e6499b8a5bb497df81160bce613b 100644 (file)
@@ -30,7 +30,7 @@ static inline isc_result_t
 fromtext_isdn(ARGS_FROMTEXT) {
        isc_token_t token;
 
-       REQUIRE(type == 20);
+       REQUIRE(type == dns_rdatatype_isdn);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -59,7 +59,7 @@ static inline isc_result_t
 totext_isdn(ARGS_TOTEXT) {
        isc_region_t region;
 
-       REQUIRE(rdata->type == 20);
+       REQUIRE(rdata->type == dns_rdatatype_isdn);
        REQUIRE(rdata->length != 0);
 
        UNUSED(tctx);
@@ -74,7 +74,7 @@ totext_isdn(ARGS_TOTEXT) {
 
 static inline isc_result_t
 fromwire_isdn(ARGS_FROMWIRE) {
-       REQUIRE(type == 20);
+       REQUIRE(type == dns_rdatatype_isdn);
 
        UNUSED(type);
        UNUSED(dctx);
@@ -91,7 +91,7 @@ static inline isc_result_t
 towire_isdn(ARGS_TOWIRE) {
        UNUSED(cctx);
 
-       REQUIRE(rdata->type == 20);
+       REQUIRE(rdata->type == dns_rdatatype_isdn);
        REQUIRE(rdata->length != 0);
 
        return (mem_tobuffer(target, rdata->data, rdata->length));
@@ -104,7 +104,7 @@ compare_isdn(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 20);
+       REQUIRE(rdata1->type == dns_rdatatype_isdn);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -117,7 +117,7 @@ static inline isc_result_t
 fromstruct_isdn(ARGS_FROMSTRUCT) {
        dns_rdata_isdn_t *isdn = source;
 
-       REQUIRE(type == 20);
+       REQUIRE(type == dns_rdatatype_isdn);
        REQUIRE(source != NULL);
        REQUIRE(isdn->common.rdtype == type);
        REQUIRE(isdn->common.rdclass == rdclass);
@@ -138,7 +138,7 @@ tostruct_isdn(ARGS_TOSTRUCT) {
        dns_rdata_isdn_t *isdn = target;
        isc_region_t r;
 
-       REQUIRE(rdata->type == 20);
+       REQUIRE(rdata->type == dns_rdatatype_isdn);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -194,7 +194,7 @@ freestruct_isdn(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_isdn(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 20);
+       REQUIRE(rdata->type == dns_rdatatype_isdn);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -207,7 +207,7 @@ static inline isc_result_t
 digest_isdn(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 20);
+       REQUIRE(rdata->type == dns_rdatatype_isdn);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -217,7 +217,7 @@ digest_isdn(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_isdn(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 20);
+       REQUIRE(type == dns_rdatatype_isdn);
 
        UNUSED(name);
        UNUSED(type);
@@ -230,7 +230,7 @@ checkowner_isdn(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_isdn(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 20);
+       REQUIRE(rdata->type == dns_rdatatype_isdn);
 
        UNUSED(rdata);
        UNUSED(owner);
index f55401e1b8acd6bc2c48b50de7e392fd7b7f53de..3b8b883d4ffb25c65cdff4f5c58d43d82df986ae 100644 (file)
@@ -38,7 +38,7 @@ fromtext_key(ARGS_FROMTEXT) {
        dns_secproto_t proto;
        dns_keyflags_t flags;
 
-       REQUIRE(type == 25);
+       REQUIRE(type == dns_rdatatype_key);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -87,7 +87,7 @@ totext_key(ARGS_TOTEXT) {
        unsigned char algorithm;
        char namebuf[DNS_NAME_FORMATSIZE];
 
-       REQUIRE(rdata->type == 25);
+       REQUIRE(rdata->type == dns_rdatatype_key);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &sr);
@@ -163,7 +163,7 @@ fromwire_key(ARGS_FROMWIRE) {
        unsigned char algorithm;
        isc_region_t sr;
 
-       REQUIRE(type == 25);
+       REQUIRE(type == dns_rdatatype_key);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -203,7 +203,7 @@ static inline isc_result_t
 towire_key(ARGS_TOWIRE) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 25);
+       REQUIRE(rdata->type == dns_rdatatype_key);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -219,7 +219,7 @@ compare_key(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 25);
+       REQUIRE(rdata1->type == dns_rdatatype_key);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -232,7 +232,7 @@ static inline isc_result_t
 fromstruct_key(ARGS_FROMSTRUCT) {
        dns_rdata_key_t *key = source;
 
-       REQUIRE(type == 25);
+       REQUIRE(type == dns_rdatatype_key);
        REQUIRE(source != NULL);
        REQUIRE(key->common.rdtype == type);
        REQUIRE(key->common.rdclass == rdclass);
@@ -258,7 +258,7 @@ tostruct_key(ARGS_TOSTRUCT) {
        dns_rdata_key_t *key = target;
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 25);
+       REQUIRE(rdata->type == dns_rdatatype_key);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -301,7 +301,7 @@ freestruct_key(ARGS_FREESTRUCT) {
        dns_rdata_key_t *key = (dns_rdata_key_t *) source;
 
        REQUIRE(source != NULL);
-       REQUIRE(key->common.rdtype == 25);
+       REQUIRE(key->common.rdtype == dns_rdatatype_key);
 
        if (key->mctx == NULL)
                return;
@@ -313,7 +313,7 @@ freestruct_key(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_key(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 25);
+       REQUIRE(rdata->type == dns_rdatatype_key);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -326,7 +326,7 @@ static inline isc_result_t
 digest_key(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 25);
+       REQUIRE(rdata->type == dns_rdatatype_key);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -336,7 +336,7 @@ digest_key(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_key(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 25);
+       REQUIRE(type == dns_rdatatype_key);
 
        UNUSED(name);
        UNUSED(type);
@@ -349,7 +349,7 @@ checkowner_key(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_key(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 25);
+       REQUIRE(rdata->type == dns_rdatatype_key);
 
        UNUSED(rdata);
        UNUSED(owner);
index 886179e0eb16dd1bd2d2da4c89e9c71d1b7b235a..3be76989f7bf39918fb33f73324ab6b05139e5d9 100644 (file)
@@ -33,7 +33,7 @@ fromtext_keydata(ARGS_FROMTEXT) {
        dns_keyflags_t flags;
        isc_uint32_t refresh, addhd, removehd;
 
-       REQUIRE(type == 65533);
+       REQUIRE(type == dns_rdatatype_keydata);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -102,7 +102,7 @@ totext_keydata(ARGS_TOTEXT) {
        char algbuf[DNS_NAME_FORMATSIZE];
        const char *keyinfo;
 
-       REQUIRE(rdata->type == 65533);
+       REQUIRE(rdata->type == dns_rdatatype_keydata);
 
        if ((tctx->flags & DNS_STYLEFLAG_KEYDATA) == 0 || rdata->length < 16)
                return (unknown_totext(rdata, tctx, target));
@@ -243,7 +243,7 @@ static inline isc_result_t
 fromwire_keydata(ARGS_FROMWIRE) {
        isc_region_t sr;
 
-       REQUIRE(type == 65533);
+       REQUIRE(type == dns_rdatatype_keydata);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -259,7 +259,7 @@ static inline isc_result_t
 towire_keydata(ARGS_TOWIRE) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 65533);
+       REQUIRE(rdata->type == dns_rdatatype_keydata);
 
        UNUSED(cctx);
 
@@ -274,7 +274,7 @@ compare_keydata(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 65533);
+       REQUIRE(rdata1->type == dns_rdatatype_keydata);
 
        dns_rdata_toregion(rdata1, &r1);
        dns_rdata_toregion(rdata2, &r2);
@@ -285,7 +285,7 @@ static inline isc_result_t
 fromstruct_keydata(ARGS_FROMSTRUCT) {
        dns_rdata_keydata_t *keydata = source;
 
-       REQUIRE(type == 65533);
+       REQUIRE(type == dns_rdatatype_keydata);
        REQUIRE(source != NULL);
        REQUIRE(keydata->common.rdtype == type);
        REQUIRE(keydata->common.rdclass == rdclass);
@@ -320,7 +320,7 @@ tostruct_keydata(ARGS_TOSTRUCT) {
        dns_rdata_keydata_t *keydata = target;
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 65533);
+       REQUIRE(rdata->type == dns_rdatatype_keydata);
        REQUIRE(target != NULL);
 
        keydata->common.rdclass = rdata->rdclass;
@@ -380,7 +380,7 @@ freestruct_keydata(ARGS_FREESTRUCT) {
        dns_rdata_keydata_t *keydata = (dns_rdata_keydata_t *) source;
 
        REQUIRE(source != NULL);
-       REQUIRE(keydata->common.rdtype == 65533);
+       REQUIRE(keydata->common.rdtype == dns_rdatatype_keydata);
 
        if (keydata->mctx == NULL)
                return;
@@ -392,7 +392,7 @@ freestruct_keydata(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_keydata(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 65533);
+       REQUIRE(rdata->type == dns_rdatatype_keydata);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -405,7 +405,7 @@ static inline isc_result_t
 digest_keydata(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 65533);
+       REQUIRE(rdata->type == dns_rdatatype_keydata);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -415,7 +415,7 @@ digest_keydata(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_keydata(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 65533);
+       REQUIRE(type == dns_rdatatype_keydata);
 
        UNUSED(name);
        UNUSED(type);
@@ -428,7 +428,7 @@ checkowner_keydata(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_keydata(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 65533);
+       REQUIRE(rdata->type == dns_rdatatype_keydata);
 
        UNUSED(rdata);
        UNUSED(owner);
index d191624ebc25e63a82f18c98c7688025ad45f7c8..a9fe7b1920f778b955194154c6346923634fef1e 100644 (file)
@@ -29,7 +29,7 @@ fromtext_l32(ARGS_FROMTEXT) {
        struct in_addr addr;
        isc_region_t region;
 
-       REQUIRE(type == 105);
+       REQUIRE(type == dns_rdatatype_l32);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -62,7 +62,7 @@ totext_l32(ARGS_TOTEXT) {
        char buf[sizeof("65000")];
        unsigned short num;
 
-       REQUIRE(rdata->type == 105);
+       REQUIRE(rdata->type == dns_rdatatype_l32);
        REQUIRE(rdata->length == 6);
 
        UNUSED(tctx);
@@ -82,7 +82,7 @@ static inline isc_result_t
 fromwire_l32(ARGS_FROMWIRE) {
        isc_region_t sregion;
 
-       REQUIRE(type == 105);
+       REQUIRE(type == dns_rdatatype_l32);
 
        UNUSED(type);
        UNUSED(options);
@@ -99,7 +99,7 @@ fromwire_l32(ARGS_FROMWIRE) {
 static inline isc_result_t
 towire_l32(ARGS_TOWIRE) {
 
-       REQUIRE(rdata->type == 105);
+       REQUIRE(rdata->type == dns_rdatatype_l32);
        REQUIRE(rdata->length == 6);
 
        UNUSED(cctx);
@@ -114,7 +114,7 @@ compare_l32(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 105);
+       REQUIRE(rdata1->type == dns_rdatatype_l32);
        REQUIRE(rdata1->length == 6);
        REQUIRE(rdata2->length == 6);
 
@@ -128,7 +128,7 @@ fromstruct_l32(ARGS_FROMSTRUCT) {
        dns_rdata_l32_t *l32 = source;
        isc_uint32_t n;
 
-       REQUIRE(type == 105);
+       REQUIRE(type == dns_rdatatype_l32);
        REQUIRE(source != NULL);
        REQUIRE(l32->common.rdtype == type);
        REQUIRE(l32->common.rdclass == rdclass);
@@ -147,7 +147,7 @@ tostruct_l32(ARGS_TOSTRUCT) {
        dns_rdata_l32_t *l32 = target;
        isc_uint32_t n;
 
-       REQUIRE(rdata->type == 105);
+       REQUIRE(rdata->type == dns_rdatatype_l32);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length == 6);
 
@@ -169,7 +169,7 @@ freestruct_l32(ARGS_FREESTRUCT) {
        dns_rdata_l32_t *l32 = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(l32->common.rdtype == 105);
+       REQUIRE(l32->common.rdtype == dns_rdatatype_l32);
 
        return;
 }
@@ -177,7 +177,7 @@ freestruct_l32(ARGS_FREESTRUCT) {
 static inline isc_result_t
 additionaldata_l32(ARGS_ADDLDATA) {
 
-       REQUIRE(rdata->type == 105);
+       REQUIRE(rdata->type == dns_rdatatype_l32);
        REQUIRE(rdata->length == 6);
 
        UNUSED(rdata);
@@ -191,7 +191,7 @@ static inline isc_result_t
 digest_l32(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 105);
+       REQUIRE(rdata->type == dns_rdatatype_l32);
        REQUIRE(rdata->length == 6);
 
        dns_rdata_toregion(rdata, &r);
@@ -202,7 +202,7 @@ digest_l32(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_l32(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 105);
+       REQUIRE(type == dns_rdatatype_l32);
 
        UNUSED(name);
        UNUSED(type);
@@ -215,7 +215,7 @@ checkowner_l32(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_l32(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 105);
+       REQUIRE(rdata->type == dns_rdatatype_l32);
        REQUIRE(rdata->length == 6);
 
        UNUSED(rdata);
index d811d29ae515a5bff235d8a477fea9011d63105b..5a2f12ba6bd1d81ffff6e4456c6788618af77652 100644 (file)
@@ -28,7 +28,7 @@ fromtext_l64(ARGS_FROMTEXT) {
        isc_token_t token;
        unsigned char locator[NS_LOCATORSZ];
 
-       REQUIRE(type == 106);
+       REQUIRE(type == dns_rdatatype_l64);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -56,7 +56,7 @@ totext_l64(ARGS_TOTEXT) {
        char buf[sizeof("xxxx:xxxx:xxxx:xxxx")];
        unsigned short num;
 
-       REQUIRE(rdata->type == 106);
+       REQUIRE(rdata->type == dns_rdatatype_l64);
        REQUIRE(rdata->length == 10);
 
        UNUSED(tctx);
@@ -81,7 +81,7 @@ static inline isc_result_t
 fromwire_l64(ARGS_FROMWIRE) {
        isc_region_t sregion;
 
-       REQUIRE(type == 106);
+       REQUIRE(type == dns_rdatatype_l64);
 
        UNUSED(type);
        UNUSED(options);
@@ -98,7 +98,7 @@ fromwire_l64(ARGS_FROMWIRE) {
 static inline isc_result_t
 towire_l64(ARGS_TOWIRE) {
 
-       REQUIRE(rdata->type == 106);
+       REQUIRE(rdata->type == dns_rdatatype_l64);
        REQUIRE(rdata->length == 10);
 
        UNUSED(cctx);
@@ -113,7 +113,7 @@ compare_l64(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 106);
+       REQUIRE(rdata1->type == dns_rdatatype_l64);
        REQUIRE(rdata1->length == 10);
        REQUIRE(rdata2->length == 10);
 
@@ -126,7 +126,7 @@ static inline isc_result_t
 fromstruct_l64(ARGS_FROMSTRUCT) {
        dns_rdata_l64_t *l64 = source;
 
-       REQUIRE(type == 106);
+       REQUIRE(type == dns_rdatatype_l64);
        REQUIRE(source != NULL);
        REQUIRE(l64->common.rdtype == type);
        REQUIRE(l64->common.rdclass == rdclass);
@@ -143,7 +143,7 @@ tostruct_l64(ARGS_TOSTRUCT) {
        isc_region_t region;
        dns_rdata_l64_t *l64 = target;
 
-       REQUIRE(rdata->type == 106);
+       REQUIRE(rdata->type == dns_rdatatype_l64);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length == 10);
 
@@ -164,7 +164,7 @@ freestruct_l64(ARGS_FREESTRUCT) {
        dns_rdata_l64_t *l64 = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(l64->common.rdtype == 106);
+       REQUIRE(l64->common.rdtype == dns_rdatatype_l64);
 
        return;
 }
@@ -172,7 +172,7 @@ freestruct_l64(ARGS_FREESTRUCT) {
 static inline isc_result_t
 additionaldata_l64(ARGS_ADDLDATA) {
 
-       REQUIRE(rdata->type == 106);
+       REQUIRE(rdata->type == dns_rdatatype_l64);
        REQUIRE(rdata->length == 10);
 
        UNUSED(rdata);
@@ -186,7 +186,7 @@ static inline isc_result_t
 digest_l64(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 106);
+       REQUIRE(rdata->type == dns_rdatatype_l64);
        REQUIRE(rdata->length == 10);
 
        dns_rdata_toregion(rdata, &r);
@@ -197,7 +197,7 @@ digest_l64(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_l64(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 106);
+       REQUIRE(type == dns_rdatatype_l64);
 
        UNUSED(name);
        UNUSED(type);
@@ -210,7 +210,7 @@ checkowner_l64(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_l64(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 106);
+       REQUIRE(rdata->type == dns_rdatatype_l64);
        REQUIRE(rdata->length == 10);
 
        UNUSED(rdata);
index 904dbb402a97e72333c4435460d3e932d1eb5d1a..73e78659139635efc8fa387dee3ef3957dfa8169 100644 (file)
@@ -50,7 +50,7 @@ fromtext_loc(ARGS_FROMTEXT) {
        unsigned long longitude;
        unsigned long altitude;
 
-       REQUIRE(type == 29);
+       REQUIRE(type == dns_rdatatype_loc);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -475,7 +475,7 @@ totext_loc(ARGS_TOTEXT) {
 
        UNUSED(tctx);
 
-       REQUIRE(rdata->type == 29);
+       REQUIRE(rdata->type == dns_rdatatype_loc);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &sr);
@@ -563,7 +563,7 @@ fromwire_loc(ARGS_FROMWIRE) {
        unsigned long latitude;
        unsigned long longitude;
 
-       REQUIRE(type == 29);
+       REQUIRE(type == dns_rdatatype_loc);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -634,7 +634,7 @@ static inline isc_result_t
 towire_loc(ARGS_TOWIRE) {
        UNUSED(cctx);
 
-       REQUIRE(rdata->type == 29);
+       REQUIRE(rdata->type == dns_rdatatype_loc);
        REQUIRE(rdata->length != 0);
 
        return (mem_tobuffer(target, rdata->data, rdata->length));
@@ -647,7 +647,7 @@ compare_loc(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 29);
+       REQUIRE(rdata1->type == dns_rdatatype_loc);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -661,7 +661,7 @@ fromstruct_loc(ARGS_FROMSTRUCT) {
        dns_rdata_loc_t *loc = source;
        isc_uint8_t c;
 
-       REQUIRE(type == 29);
+       REQUIRE(type == dns_rdatatype_loc);
        REQUIRE(source != NULL);
        REQUIRE(loc->common.rdtype == type);
        REQUIRE(loc->common.rdclass == rdclass);
@@ -706,7 +706,7 @@ tostruct_loc(ARGS_TOSTRUCT) {
        isc_region_t r;
        isc_uint8_t version;
 
-       REQUIRE(rdata->type == 29);
+       REQUIRE(rdata->type == dns_rdatatype_loc);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -743,7 +743,7 @@ freestruct_loc(ARGS_FREESTRUCT) {
        dns_rdata_loc_t *loc = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(loc->common.rdtype == 29);
+       REQUIRE(loc->common.rdtype == dns_rdatatype_loc);
 
        UNUSED(source);
        UNUSED(loc);
@@ -751,7 +751,7 @@ freestruct_loc(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_loc(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 29);
+       REQUIRE(rdata->type == dns_rdatatype_loc);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -764,7 +764,7 @@ static inline isc_result_t
 digest_loc(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 29);
+       REQUIRE(rdata->type == dns_rdatatype_loc);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -774,7 +774,7 @@ digest_loc(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_loc(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 29);
+       REQUIRE(type == dns_rdatatype_loc);
 
        UNUSED(name);
        UNUSED(type);
@@ -787,7 +787,7 @@ checkowner_loc(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_loc(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 29);
+       REQUIRE(rdata->type == dns_rdatatype_loc);
 
        UNUSED(rdata);
        UNUSED(owner);
index 732ef7fa88f5ee966583765043d35fdd2a6738c8..8f54047a4e54339ca499c0a0afe4665246fa0ccf 100644 (file)
@@ -29,7 +29,7 @@ fromtext_lp(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
 
-       REQUIRE(type == 107);
+       REQUIRE(type == dns_rdatatype_lp);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -59,7 +59,7 @@ totext_lp(ARGS_TOTEXT) {
        char buf[sizeof("64000")];
        unsigned short num;
 
-       REQUIRE(rdata->type == 107);
+       REQUIRE(rdata->type == dns_rdatatype_lp);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -83,7 +83,7 @@ fromwire_lp(ARGS_FROMWIRE) {
        dns_name_t name;
        isc_region_t sregion;
 
-       REQUIRE(type == 107);
+       REQUIRE(type == dns_rdatatype_lp);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -103,7 +103,7 @@ fromwire_lp(ARGS_FROMWIRE) {
 static inline isc_result_t
 towire_lp(ARGS_TOWIRE) {
 
-       REQUIRE(rdata->type == 107);
+       REQUIRE(rdata->type == dns_rdatatype_lp);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -118,7 +118,7 @@ compare_lp(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 107);
+       REQUIRE(rdata1->type == dns_rdatatype_lp);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -133,7 +133,7 @@ fromstruct_lp(ARGS_FROMSTRUCT) {
        dns_rdata_lp_t *lp = source;
        isc_region_t region;
 
-       REQUIRE(type == 107);
+       REQUIRE(type == dns_rdatatype_lp);
        REQUIRE(source != NULL);
        REQUIRE(lp->common.rdtype == type);
        REQUIRE(lp->common.rdclass == rdclass);
@@ -152,7 +152,7 @@ tostruct_lp(ARGS_TOSTRUCT) {
        dns_rdata_lp_t *lp = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 107);
+       REQUIRE(rdata->type == dns_rdatatype_lp);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -176,7 +176,7 @@ freestruct_lp(ARGS_FREESTRUCT) {
        dns_rdata_lp_t *lp = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(lp->common.rdtype == 107);
+       REQUIRE(lp->common.rdtype == dns_rdatatype_lp);
 
        if (lp->mctx == NULL)
                return;
@@ -192,7 +192,7 @@ additionaldata_lp(ARGS_ADDLDATA) {
        isc_region_t region;
        isc_result_t result;
 
-       REQUIRE(rdata->type == 107);
+       REQUIRE(rdata->type == dns_rdatatype_lp);
 
        dns_name_init(&name, offsets);
        dns_rdata_toregion(rdata, &region);
@@ -209,7 +209,7 @@ static inline isc_result_t
 digest_lp(ARGS_DIGEST) {
        isc_region_t region;
 
-       REQUIRE(rdata->type == 107);
+       REQUIRE(rdata->type == dns_rdatatype_lp);
 
        dns_rdata_toregion(rdata, &region);
        return ((digest)(arg, &region));
@@ -218,7 +218,7 @@ digest_lp(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_lp(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 107);
+       REQUIRE(type == dns_rdatatype_lp);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -231,7 +231,7 @@ checkowner_lp(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_lp(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 107);
+       REQUIRE(rdata->type == dns_rdatatype_lp);
 
        UNUSED(bad);
        UNUSED(owner);
@@ -249,7 +249,7 @@ casecompare_lp(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 107);
+       REQUIRE(rdata1->type == dns_rdatatype_lp);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
index 8e588fc7b8a5e746d15f05ced1868eed7480a912..4ae67d9eab592311cd132cdaf56f58048122c367 100644 (file)
@@ -30,7 +30,7 @@ fromtext_mb(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
 
-       REQUIRE(type == 7);
+       REQUIRE(type == dns_rdatatype_mb);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -53,7 +53,7 @@ totext_mb(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 7);
+       REQUIRE(rdata->type == dns_rdatatype_mb);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -71,7 +71,7 @@ static inline isc_result_t
 fromwire_mb(ARGS_FROMWIRE) {
        dns_name_t name;
 
-       REQUIRE(type == 7);
+       REQUIRE(type == dns_rdatatype_mb);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -88,7 +88,7 @@ towire_mb(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 7);
+       REQUIRE(rdata->type == dns_rdatatype_mb);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
@@ -109,7 +109,7 @@ compare_mb(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 7);
+       REQUIRE(rdata1->type == dns_rdatatype_mb);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -130,7 +130,7 @@ fromstruct_mb(ARGS_FROMSTRUCT) {
        dns_rdata_mb_t *mb = source;
        isc_region_t region;
 
-       REQUIRE(type == 7);
+       REQUIRE(type == dns_rdatatype_mb);
        REQUIRE(source != NULL);
        REQUIRE(mb->common.rdtype == type);
        REQUIRE(mb->common.rdclass == rdclass);
@@ -148,7 +148,7 @@ tostruct_mb(ARGS_TOSTRUCT) {
        dns_rdata_mb_t *mb = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 7);
+       REQUIRE(rdata->type == dns_rdatatype_mb);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -184,7 +184,7 @@ additionaldata_mb(ARGS_ADDLDATA) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 7);
+       REQUIRE(rdata->type == dns_rdatatype_mb);
 
        dns_name_init(&name, offsets);
        dns_rdata_toregion(rdata, &region);
@@ -198,7 +198,7 @@ digest_mb(ARGS_DIGEST) {
        isc_region_t r;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 7);
+       REQUIRE(rdata->type == dns_rdatatype_mb);
 
        dns_rdata_toregion(rdata, &r);
        dns_name_init(&name, NULL);
@@ -210,7 +210,7 @@ digest_mb(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_mb(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 7);
+       REQUIRE(type == dns_rdatatype_mb);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -222,7 +222,7 @@ checkowner_mb(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_mb(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 7);
+       REQUIRE(rdata->type == dns_rdatatype_mb);
 
        UNUSED(rdata);
        UNUSED(owner);
index e00f1f6ca368c5290dd0bfc50660e7c520321f0d..796a03f499b0b67d2866ccc1465f3b9969bc45c0 100644 (file)
@@ -30,7 +30,7 @@ fromtext_md(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
 
-       REQUIRE(type == 3);
+       REQUIRE(type == dns_rdatatype_md);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -53,7 +53,7 @@ totext_md(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 3);
+       REQUIRE(rdata->type == dns_rdatatype_md);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -71,7 +71,7 @@ static inline isc_result_t
 fromwire_md(ARGS_FROMWIRE) {
        dns_name_t name;
 
-       REQUIRE(type == 3);
+       REQUIRE(type == dns_rdatatype_md);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -88,7 +88,7 @@ towire_md(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 3);
+       REQUIRE(rdata->type == dns_rdatatype_md);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
@@ -109,7 +109,7 @@ compare_md(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 3);
+       REQUIRE(rdata1->type == dns_rdatatype_md);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -130,7 +130,7 @@ fromstruct_md(ARGS_FROMSTRUCT) {
        dns_rdata_md_t *md = source;
        isc_region_t region;
 
-       REQUIRE(type == 3);
+       REQUIRE(type == dns_rdatatype_md);
        REQUIRE(source != NULL);
        REQUIRE(md->common.rdtype == type);
        REQUIRE(md->common.rdclass == rdclass);
@@ -148,7 +148,7 @@ tostruct_md(ARGS_TOSTRUCT) {
        isc_region_t r;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 3);
+       REQUIRE(rdata->type == dns_rdatatype_md);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -170,7 +170,7 @@ freestruct_md(ARGS_FREESTRUCT) {
        dns_rdata_md_t *md = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(md->common.rdtype == 3);
+       REQUIRE(md->common.rdtype == dns_rdatatype_md);
 
        if (md->mctx == NULL)
                return;
@@ -185,7 +185,7 @@ additionaldata_md(ARGS_ADDLDATA) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 3);
+       REQUIRE(rdata->type == dns_rdatatype_md);
 
        dns_name_init(&name, offsets);
        dns_rdata_toregion(rdata, &region);
@@ -199,7 +199,7 @@ digest_md(ARGS_DIGEST) {
        isc_region_t r;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 3);
+       REQUIRE(rdata->type == dns_rdatatype_md);
 
        dns_rdata_toregion(rdata, &r);
        dns_name_init(&name, NULL);
@@ -211,7 +211,7 @@ digest_md(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_md(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 3);
+       REQUIRE(type == dns_rdatatype_md);
 
        UNUSED(name);
        UNUSED(type);
@@ -224,7 +224,7 @@ checkowner_md(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_md(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 3);
+       REQUIRE(rdata->type == dns_rdatatype_md);
 
        UNUSED(rdata);
        UNUSED(owner);
index a85809aef223d5a0f2e7039c09d1ec4f8ea17591..f887bb480fb55bbddfe76a2da2b3f597e1d23eef 100644 (file)
@@ -30,7 +30,7 @@ fromtext_mf(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
 
-       REQUIRE(type == 4);
+       REQUIRE(type == dns_rdatatype_mf);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -53,7 +53,7 @@ totext_mf(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 4);
+       REQUIRE(rdata->type == dns_rdatatype_mf);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -71,7 +71,7 @@ static inline isc_result_t
 fromwire_mf(ARGS_FROMWIRE) {
        dns_name_t name;
 
-       REQUIRE(type == 4);
+       REQUIRE(type == dns_rdatatype_mf);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -88,7 +88,7 @@ towire_mf(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 4);
+       REQUIRE(rdata->type == dns_rdatatype_mf);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
@@ -109,7 +109,7 @@ compare_mf(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 4);
+       REQUIRE(rdata1->type == dns_rdatatype_mf);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -130,7 +130,7 @@ fromstruct_mf(ARGS_FROMSTRUCT) {
        dns_rdata_mf_t *mf = source;
        isc_region_t region;
 
-       REQUIRE(type == 4);
+       REQUIRE(type == dns_rdatatype_mf);
        REQUIRE(source != NULL);
        REQUIRE(mf->common.rdtype == type);
        REQUIRE(mf->common.rdclass == rdclass);
@@ -148,7 +148,7 @@ tostruct_mf(ARGS_TOSTRUCT) {
        isc_region_t r;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 4);
+       REQUIRE(rdata->type == dns_rdatatype_mf);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -170,7 +170,7 @@ freestruct_mf(ARGS_FREESTRUCT) {
        dns_rdata_mf_t *mf = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(mf->common.rdtype == 4);
+       REQUIRE(mf->common.rdtype == dns_rdatatype_mf);
 
        if (mf->mctx == NULL)
                return;
@@ -184,7 +184,7 @@ additionaldata_mf(ARGS_ADDLDATA) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 4);
+       REQUIRE(rdata->type == dns_rdatatype_mf);
 
        dns_name_init(&name, offsets);
        dns_rdata_toregion(rdata, &region);
@@ -198,7 +198,7 @@ digest_mf(ARGS_DIGEST) {
        isc_region_t r;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 4);
+       REQUIRE(rdata->type == dns_rdatatype_mf);
 
        dns_rdata_toregion(rdata, &r);
        dns_name_init(&name, NULL);
@@ -210,7 +210,7 @@ digest_mf(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_mf(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 4);
+       REQUIRE(type == dns_rdatatype_mf);
 
        UNUSED(name);
        UNUSED(type);
@@ -223,7 +223,7 @@ checkowner_mf(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_mf(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 4);
+       REQUIRE(rdata->type == dns_rdatatype_mf);
 
        UNUSED(rdata);
        UNUSED(owner);
index d0af188e737376ed6a1969ed32221530e0781325..da318747a2e580cea6272c6b1c94e2dcc919df1c 100644 (file)
@@ -30,7 +30,7 @@ fromtext_mg(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
 
-       REQUIRE(type == 8);
+       REQUIRE(type == dns_rdatatype_mg);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -53,7 +53,7 @@ totext_mg(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 8);
+       REQUIRE(rdata->type == dns_rdatatype_mg);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -71,7 +71,7 @@ static inline isc_result_t
 fromwire_mg(ARGS_FROMWIRE) {
        dns_name_t name;
 
-       REQUIRE(type == 8);
+       REQUIRE(type == dns_rdatatype_mg);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -88,7 +88,7 @@ towire_mg(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 8);
+       REQUIRE(rdata->type == dns_rdatatype_mg);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
@@ -109,7 +109,7 @@ compare_mg(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 8);
+       REQUIRE(rdata1->type == dns_rdatatype_mg);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -130,7 +130,7 @@ fromstruct_mg(ARGS_FROMSTRUCT) {
        dns_rdata_mg_t *mg = source;
        isc_region_t region;
 
-       REQUIRE(type == 8);
+       REQUIRE(type == dns_rdatatype_mg);
        REQUIRE(source != NULL);
        REQUIRE(mg->common.rdtype == type);
        REQUIRE(mg->common.rdclass == rdclass);
@@ -148,7 +148,7 @@ tostruct_mg(ARGS_TOSTRUCT) {
        dns_rdata_mg_t *mg = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 8);
+       REQUIRE(rdata->type == dns_rdatatype_mg);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -170,7 +170,7 @@ freestruct_mg(ARGS_FREESTRUCT) {
        dns_rdata_mg_t *mg = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(mg->common.rdtype == 8);
+       REQUIRE(mg->common.rdtype == dns_rdatatype_mg);
 
        if (mg->mctx == NULL)
                return;
@@ -180,7 +180,7 @@ freestruct_mg(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_mg(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 8);
+       REQUIRE(rdata->type == dns_rdatatype_mg);
 
        UNUSED(add);
        UNUSED(arg);
@@ -194,7 +194,7 @@ digest_mg(ARGS_DIGEST) {
        isc_region_t r;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 8);
+       REQUIRE(rdata->type == dns_rdatatype_mg);
 
        dns_rdata_toregion(rdata, &r);
        dns_name_init(&name, NULL);
@@ -206,7 +206,7 @@ digest_mg(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_mg(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 8);
+       REQUIRE(type == dns_rdatatype_mg);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -218,7 +218,7 @@ checkowner_mg(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_mg(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 8);
+       REQUIRE(rdata->type == dns_rdatatype_mg);
 
        UNUSED(rdata);
        UNUSED(owner);
index 9e2214c98aa3c6bbacb975abc4bf099b0628c375..24b21310ad7c3d1fa2c6115b1a10d79a7b3c0ee8 100644 (file)
@@ -32,7 +32,7 @@ fromtext_minfo(ARGS_FROMTEXT) {
        int i;
        isc_boolean_t ok;
 
-       REQUIRE(type == 14);
+       REQUIRE(type == dns_rdatatype_minfo);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -66,7 +66,7 @@ totext_minfo(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 14);
+       REQUIRE(rdata->type == dns_rdatatype_minfo);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&rmail, NULL);
@@ -96,7 +96,7 @@ fromwire_minfo(ARGS_FROMWIRE) {
        dns_name_t rmail;
        dns_name_t email;
 
-       REQUIRE(type == 14);
+       REQUIRE(type == dns_rdatatype_minfo);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -118,7 +118,7 @@ towire_minfo(ARGS_TOWIRE) {
        dns_offsets_t roffsets;
        dns_offsets_t eoffsets;
 
-       REQUIRE(rdata->type == 14);
+       REQUIRE(rdata->type == dns_rdatatype_minfo);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
@@ -149,7 +149,7 @@ compare_minfo(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 14);
+       REQUIRE(rdata1->type == dns_rdatatype_minfo);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -184,7 +184,7 @@ fromstruct_minfo(ARGS_FROMSTRUCT) {
        dns_rdata_minfo_t *minfo = source;
        isc_region_t region;
 
-       REQUIRE(type == 14);
+       REQUIRE(type == dns_rdatatype_minfo);
        REQUIRE(source != NULL);
        REQUIRE(minfo->common.rdtype == type);
        REQUIRE(minfo->common.rdclass == rdclass);
@@ -205,7 +205,7 @@ tostruct_minfo(ARGS_TOSTRUCT) {
        dns_name_t name;
        isc_result_t result;
 
-       REQUIRE(rdata->type == 14);
+       REQUIRE(rdata->type == dns_rdatatype_minfo);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -239,7 +239,7 @@ freestruct_minfo(ARGS_FREESTRUCT) {
        dns_rdata_minfo_t *minfo = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(minfo->common.rdtype == 14);
+       REQUIRE(minfo->common.rdtype == dns_rdatatype_minfo);
 
        if (minfo->mctx == NULL)
                return;
@@ -251,7 +251,7 @@ freestruct_minfo(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_minfo(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 14);
+       REQUIRE(rdata->type == dns_rdatatype_minfo);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -266,7 +266,7 @@ digest_minfo(ARGS_DIGEST) {
        dns_name_t name;
        isc_result_t result;
 
-       REQUIRE(rdata->type == 14);
+       REQUIRE(rdata->type == dns_rdatatype_minfo);
 
        dns_rdata_toregion(rdata, &r);
        dns_name_init(&name, NULL);
@@ -284,7 +284,7 @@ digest_minfo(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_minfo(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 14);
+       REQUIRE(type == dns_rdatatype_minfo);
 
        UNUSED(name);
        UNUSED(type);
@@ -299,7 +299,7 @@ checknames_minfo(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 14);
+       REQUIRE(rdata->type == dns_rdatatype_minfo);
 
        UNUSED(owner);
 
index 590235d961bb4f76d2dc9a2d54d43dd7e5fe5ebd..dcad76a5ac43fd6793cb524da23ff09128ea155e 100644 (file)
@@ -30,7 +30,7 @@ fromtext_mr(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
 
-       REQUIRE(type == 9);
+       REQUIRE(type == dns_rdatatype_mr);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -53,7 +53,7 @@ totext_mr(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 9);
+       REQUIRE(rdata->type == dns_rdatatype_mr);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -71,7 +71,7 @@ static inline isc_result_t
 fromwire_mr(ARGS_FROMWIRE) {
        dns_name_t name;
 
-       REQUIRE(type == 9);
+       REQUIRE(type == dns_rdatatype_mr);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -88,7 +88,7 @@ towire_mr(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 9);
+       REQUIRE(rdata->type == dns_rdatatype_mr);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
@@ -109,7 +109,7 @@ compare_mr(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 9);
+       REQUIRE(rdata1->type == dns_rdatatype_mr);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -130,7 +130,7 @@ fromstruct_mr(ARGS_FROMSTRUCT) {
        dns_rdata_mr_t *mr = source;
        isc_region_t region;
 
-       REQUIRE(type == 9);
+       REQUIRE(type == dns_rdatatype_mr);
        REQUIRE(source != NULL);
        REQUIRE(mr->common.rdtype == type);
        REQUIRE(mr->common.rdclass == rdclass);
@@ -148,7 +148,7 @@ tostruct_mr(ARGS_TOSTRUCT) {
        dns_rdata_mr_t *mr = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 9);
+       REQUIRE(rdata->type == dns_rdatatype_mr);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -170,7 +170,7 @@ freestruct_mr(ARGS_FREESTRUCT) {
        dns_rdata_mr_t *mr = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(mr->common.rdtype == 9);
+       REQUIRE(mr->common.rdtype == dns_rdatatype_mr);
 
        if (mr->mctx == NULL)
                return;
@@ -180,7 +180,7 @@ freestruct_mr(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_mr(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 9);
+       REQUIRE(rdata->type == dns_rdatatype_mr);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -194,7 +194,7 @@ digest_mr(ARGS_DIGEST) {
        isc_region_t r;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 9);
+       REQUIRE(rdata->type == dns_rdatatype_mr);
 
        dns_rdata_toregion(rdata, &r);
        dns_name_init(&name, NULL);
@@ -206,7 +206,7 @@ digest_mr(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_mr(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 9);
+       REQUIRE(type == dns_rdatatype_mr);
 
        UNUSED(name);
        UNUSED(type);
@@ -219,7 +219,7 @@ checkowner_mr(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_mr(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 9);
+       REQUIRE(rdata->type == dns_rdatatype_mr);
 
        UNUSED(rdata);
        UNUSED(owner);
index 77eee158b7059ea182d4bb681cac254785f4d5fe..8c11a9b3230981e60a9bad501ca730d859058205 100644 (file)
@@ -53,7 +53,7 @@ fromtext_mx(ARGS_FROMTEXT) {
        isc_buffer_t buffer;
        isc_boolean_t ok;
 
-       REQUIRE(type == 15);
+       REQUIRE(type == dns_rdatatype_mx);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -98,7 +98,7 @@ totext_mx(ARGS_TOTEXT) {
        char buf[sizeof("64000")];
        unsigned short num;
 
-       REQUIRE(rdata->type == 15);
+       REQUIRE(rdata->type == dns_rdatatype_mx);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -122,7 +122,7 @@ fromwire_mx(ARGS_FROMWIRE) {
        dns_name_t name;
        isc_region_t sregion;
 
-       REQUIRE(type == 15);
+       REQUIRE(type == dns_rdatatype_mx);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -145,7 +145,7 @@ towire_mx(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 15);
+       REQUIRE(rdata->type == dns_rdatatype_mx);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
@@ -170,7 +170,7 @@ compare_mx(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 15);
+       REQUIRE(rdata1->type == dns_rdatatype_mx);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -198,7 +198,7 @@ fromstruct_mx(ARGS_FROMSTRUCT) {
        dns_rdata_mx_t *mx = source;
        isc_region_t region;
 
-       REQUIRE(type == 15);
+       REQUIRE(type == dns_rdatatype_mx);
        REQUIRE(source != NULL);
        REQUIRE(mx->common.rdtype == type);
        REQUIRE(mx->common.rdclass == rdclass);
@@ -217,7 +217,7 @@ tostruct_mx(ARGS_TOSTRUCT) {
        dns_rdata_mx_t *mx = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 15);
+       REQUIRE(rdata->type == dns_rdatatype_mx);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -241,7 +241,7 @@ freestruct_mx(ARGS_FREESTRUCT) {
        dns_rdata_mx_t *mx = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(mx->common.rdtype == 15);
+       REQUIRE(mx->common.rdtype == dns_rdatatype_mx);
 
        if (mx->mctx == NULL)
                return;
@@ -256,7 +256,7 @@ additionaldata_mx(ARGS_ADDLDATA) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 15);
+       REQUIRE(rdata->type == dns_rdatatype_mx);
 
        dns_name_init(&name, offsets);
        dns_rdata_toregion(rdata, &region);
@@ -271,7 +271,7 @@ digest_mx(ARGS_DIGEST) {
        isc_region_t r1, r2;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 15);
+       REQUIRE(rdata->type == dns_rdatatype_mx);
 
        dns_rdata_toregion(rdata, &r1);
        r2 = r1;
@@ -286,7 +286,7 @@ digest_mx(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_mx(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 15);
+       REQUIRE(type == dns_rdatatype_mx);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -299,7 +299,7 @@ checknames_mx(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 15);
+       REQUIRE(rdata->type == dns_rdatatype_mx);
 
        UNUSED(owner);
 
index d7452ac176fec43216c381bfe562b3340c2e9912..3e7e02dc1aa843a00e3e9d5f1c8f744a0116d854 100644 (file)
@@ -127,7 +127,7 @@ fromtext_naptr(ARGS_FROMTEXT) {
        isc_buffer_t buffer;
        unsigned char *regex;
 
-       REQUIRE(type == 35);
+       REQUIRE(type == dns_rdatatype_naptr);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -195,7 +195,7 @@ totext_naptr(ARGS_TOTEXT) {
        char buf[sizeof("64000")];
        unsigned short num;
 
-       REQUIRE(rdata->type == 35);
+       REQUIRE(rdata->type == dns_rdatatype_naptr);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -253,7 +253,7 @@ fromwire_naptr(ARGS_FROMWIRE) {
        isc_region_t sr;
        unsigned char *regex;
 
-       REQUIRE(type == 35);
+       REQUIRE(type == dns_rdatatype_naptr);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -300,7 +300,7 @@ towire_naptr(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 35);
+       REQUIRE(rdata->type == dns_rdatatype_naptr);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -347,7 +347,7 @@ compare_naptr(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 35);
+       REQUIRE(rdata1->type == dns_rdatatype_naptr);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -410,7 +410,7 @@ fromstruct_naptr(ARGS_FROMSTRUCT) {
        dns_rdata_naptr_t *naptr = source;
        isc_region_t region;
 
-       REQUIRE(type == 35);
+       REQUIRE(type == dns_rdatatype_naptr);
        REQUIRE(source != NULL);
        REQUIRE(naptr->common.rdtype == type);
        REQUIRE(naptr->common.rdclass == rdclass);
@@ -440,7 +440,7 @@ tostruct_naptr(ARGS_TOSTRUCT) {
        isc_result_t result;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 35);
+       REQUIRE(rdata->type == dns_rdatatype_naptr);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -508,7 +508,7 @@ freestruct_naptr(ARGS_FREESTRUCT) {
        dns_rdata_naptr_t *naptr = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(naptr->common.rdtype == 35);
+       REQUIRE(naptr->common.rdtype == dns_rdatatype_naptr);
 
        if (naptr->mctx == NULL)
                return;
@@ -532,7 +532,7 @@ additionaldata_naptr(ARGS_ADDLDATA) {
        unsigned int i, flagslen;
        char *cp;
 
-       REQUIRE(rdata->type == 35);
+       REQUIRE(rdata->type == dns_rdatatype_naptr);
 
        /*
         * Order, preference.
@@ -587,7 +587,7 @@ digest_naptr(ARGS_DIGEST) {
        isc_result_t result;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 35);
+       REQUIRE(rdata->type == dns_rdatatype_naptr);
 
        dns_rdata_toregion(rdata, &r1);
        r2 = r1;
@@ -641,7 +641,7 @@ digest_naptr(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_naptr(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 35);
+       REQUIRE(type == dns_rdatatype_naptr);
 
        UNUSED(name);
        UNUSED(type);
@@ -654,7 +654,7 @@ checkowner_naptr(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_naptr(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 35);
+       REQUIRE(rdata->type == dns_rdatatype_naptr);
 
        UNUSED(rdata);
        UNUSED(owner);
index 39f16ed6f02bfd0c869d935dec28407086ed5945..80836de350ba234d6f28e49e05e8356097b45e35 100644 (file)
@@ -28,7 +28,7 @@ fromtext_nid(ARGS_FROMTEXT) {
        isc_token_t token;
        unsigned char locator[NS_LOCATORSZ];
 
-       REQUIRE(type == 104);
+       REQUIRE(type == dns_rdatatype_nid);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -56,7 +56,7 @@ totext_nid(ARGS_TOTEXT) {
        char buf[sizeof("xxxx:xxxx:xxxx:xxxx")];
        unsigned short num;
 
-       REQUIRE(rdata->type == 104);
+       REQUIRE(rdata->type == dns_rdatatype_nid);
        REQUIRE(rdata->length != 0);
 
        UNUSED(tctx);
@@ -81,7 +81,7 @@ static inline isc_result_t
 fromwire_nid(ARGS_FROMWIRE) {
        isc_region_t sregion;
 
-       REQUIRE(type == 104);
+       REQUIRE(type == dns_rdatatype_nid);
 
        UNUSED(type);
        UNUSED(options);
@@ -98,7 +98,7 @@ fromwire_nid(ARGS_FROMWIRE) {
 static inline isc_result_t
 towire_nid(ARGS_TOWIRE) {
 
-       REQUIRE(rdata->type == 104);
+       REQUIRE(rdata->type == dns_rdatatype_nid);
        REQUIRE(rdata->length == 10);
 
        UNUSED(cctx);
@@ -113,7 +113,7 @@ compare_nid(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 104);
+       REQUIRE(rdata1->type == dns_rdatatype_nid);
        REQUIRE(rdata1->length == 10);
        REQUIRE(rdata2->length == 10);
 
@@ -126,7 +126,7 @@ static inline isc_result_t
 fromstruct_nid(ARGS_FROMSTRUCT) {
        dns_rdata_nid_t *nid = source;
 
-       REQUIRE(type == 104);
+       REQUIRE(type == dns_rdatatype_nid);
        REQUIRE(source != NULL);
        REQUIRE(nid->common.rdtype == type);
        REQUIRE(nid->common.rdclass == rdclass);
@@ -143,7 +143,7 @@ tostruct_nid(ARGS_TOSTRUCT) {
        isc_region_t region;
        dns_rdata_nid_t *nid = target;
 
-       REQUIRE(rdata->type == 104);
+       REQUIRE(rdata->type == dns_rdatatype_nid);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length == 10);
 
@@ -164,7 +164,7 @@ freestruct_nid(ARGS_FREESTRUCT) {
        dns_rdata_nid_t *nid = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(nid->common.rdtype == 104);
+       REQUIRE(nid->common.rdtype == dns_rdatatype_nid);
 
        return;
 }
@@ -172,7 +172,7 @@ freestruct_nid(ARGS_FREESTRUCT) {
 static inline isc_result_t
 additionaldata_nid(ARGS_ADDLDATA) {
 
-       REQUIRE(rdata->type == 104);
+       REQUIRE(rdata->type == dns_rdatatype_nid);
        REQUIRE(rdata->length == 10);
 
        UNUSED(rdata);
@@ -186,7 +186,7 @@ static inline isc_result_t
 digest_nid(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 104);
+       REQUIRE(rdata->type == dns_rdatatype_nid);
        REQUIRE(rdata->length == 10);
 
        dns_rdata_toregion(rdata, &r);
@@ -197,7 +197,7 @@ digest_nid(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_nid(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 104);
+       REQUIRE(type == dns_rdatatype_nid);
 
        UNUSED(name);
        UNUSED(type);
@@ -210,7 +210,7 @@ checkowner_nid(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_nid(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 104);
+       REQUIRE(rdata->type == dns_rdatatype_nid);
        REQUIRE(rdata->length == 10);
 
        UNUSED(rdata);
index 5db81e7cb39059f98766ce939c5d29cdb1f38f70..69552f90b526e9f83843ddf7e630db333507d335 100644 (file)
@@ -31,7 +31,7 @@ fromtext_ns(ARGS_FROMTEXT) {
        isc_buffer_t buffer;
        isc_boolean_t ok;
 
-       REQUIRE(type == 2);
+       REQUIRE(type == dns_rdatatype_ns);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -61,7 +61,7 @@ totext_ns(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 2);
+       REQUIRE(rdata->type == dns_rdatatype_ns);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -79,7 +79,7 @@ static inline isc_result_t
 fromwire_ns(ARGS_FROMWIRE) {
        dns_name_t name;
 
-       REQUIRE(type == 2);
+       REQUIRE(type == dns_rdatatype_ns);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -96,7 +96,7 @@ towire_ns(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 2);
+       REQUIRE(rdata->type == dns_rdatatype_ns);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
@@ -117,7 +117,7 @@ compare_ns(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 2);
+       REQUIRE(rdata1->type == dns_rdatatype_ns);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -138,7 +138,7 @@ fromstruct_ns(ARGS_FROMSTRUCT) {
        dns_rdata_ns_t *ns = source;
        isc_region_t region;
 
-       REQUIRE(type == 2);
+       REQUIRE(type == dns_rdatatype_ns);
        REQUIRE(source != NULL);
        REQUIRE(ns->common.rdtype == type);
        REQUIRE(ns->common.rdclass == rdclass);
@@ -156,7 +156,7 @@ tostruct_ns(ARGS_TOSTRUCT) {
        dns_rdata_ns_t *ns = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 2);
+       REQUIRE(rdata->type == dns_rdatatype_ns);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -192,7 +192,7 @@ additionaldata_ns(ARGS_ADDLDATA) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 2);
+       REQUIRE(rdata->type == dns_rdatatype_ns);
 
        dns_name_init(&name, offsets);
        dns_rdata_toregion(rdata, &region);
@@ -206,7 +206,7 @@ digest_ns(ARGS_DIGEST) {
        isc_region_t r;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 2);
+       REQUIRE(rdata->type == dns_rdatatype_ns);
 
        dns_rdata_toregion(rdata, &r);
        dns_name_init(&name, NULL);
@@ -218,7 +218,7 @@ digest_ns(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_ns(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 2);
+       REQUIRE(type == dns_rdatatype_ns);
 
        UNUSED(name);
        UNUSED(type);
@@ -233,7 +233,7 @@ checknames_ns(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 2);
+       REQUIRE(rdata->type == dns_rdatatype_ns);
 
        UNUSED(owner);
 
index eb4f68dca2a183d5cbb9e1b4a3b6fcf12250befc..2aec339c2453dd32fd0af3a5af4c84d457daf281 100644 (file)
@@ -53,7 +53,7 @@ fromtext_nsec3(ARGS_FROMTEXT) {
        unsigned char hashalg;
        isc_buffer_t b;
 
-       REQUIRE(type == 50);
+       REQUIRE(type == dns_rdatatype_nsec3);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -144,7 +144,7 @@ totext_nsec3(ARGS_TOTEXT) {
        isc_uint32_t iterations;
        isc_boolean_t first;
 
-       REQUIRE(rdata->type == 50);
+       REQUIRE(rdata->type == dns_rdatatype_nsec3);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &sr);
@@ -246,7 +246,7 @@ fromwire_nsec3(ARGS_FROMWIRE) {
        isc_boolean_t first = ISC_TRUE;
        unsigned int i;
 
-       REQUIRE(type == 50);
+       REQUIRE(type == dns_rdatatype_nsec3);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -318,7 +318,7 @@ static inline isc_result_t
 towire_nsec3(ARGS_TOWIRE) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 50);
+       REQUIRE(rdata->type == dns_rdatatype_nsec3);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -334,7 +334,7 @@ compare_nsec3(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 50);
+       REQUIRE(rdata1->type == dns_rdatatype_nsec3);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -349,7 +349,7 @@ fromstruct_nsec3(ARGS_FROMSTRUCT) {
        unsigned int i, len, window, lastwindow = 0;
        isc_boolean_t first = ISC_TRUE;
 
-       REQUIRE(type == 50);
+       REQUIRE(type == dns_rdatatype_nsec3);
        REQUIRE(source != NULL);
        REQUIRE(nsec3->common.rdtype == type);
        REQUIRE(nsec3->common.rdclass == rdclass);
@@ -390,7 +390,7 @@ tostruct_nsec3(ARGS_TOSTRUCT) {
        isc_region_t region;
        dns_rdata_nsec3_t *nsec3 = target;
 
-       REQUIRE(rdata->type == 50);
+       REQUIRE(rdata->type == dns_rdatatype_nsec3);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -436,7 +436,7 @@ freestruct_nsec3(ARGS_FREESTRUCT) {
        dns_rdata_nsec3_t *nsec3 = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(nsec3->common.rdtype == 50);
+       REQUIRE(nsec3->common.rdtype == dns_rdatatype_nsec3);
 
        if (nsec3->mctx == NULL)
                return;
@@ -452,7 +452,7 @@ freestruct_nsec3(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_nsec3(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 50);
+       REQUIRE(rdata->type == dns_rdatatype_nsec3);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -465,7 +465,7 @@ static inline isc_result_t
 digest_nsec3(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 50);
+       REQUIRE(rdata->type == dns_rdatatype_nsec3);
 
        dns_rdata_toregion(rdata, &r);
        return ((digest)(arg, &r));
@@ -477,7 +477,7 @@ checkowner_nsec3(ARGS_CHECKOWNER) {
        isc_buffer_t buffer;
        dns_label_t label;
 
-       REQUIRE(type == 50);
+       REQUIRE(type == dns_rdatatype_nsec3);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -498,7 +498,7 @@ checkowner_nsec3(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_nsec3(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 50);
+       REQUIRE(rdata->type == dns_rdatatype_nsec3);
 
        UNUSED(rdata);
        UNUSED(owner);
index 379a46b535428588481c0148120c7d6464e133b5..da7f8c48fa5ac8a482a23698163031ffbaccd4ae 100644 (file)
@@ -48,7 +48,7 @@ fromtext_nsec3param(ARGS_FROMTEXT) {
        unsigned int flags = 0;
        unsigned char hashalg;
 
-       REQUIRE(type == 51);
+       REQUIRE(type == dns_rdatatype_nsec3param);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -101,7 +101,7 @@ totext_nsec3param(ARGS_TOTEXT) {
        char buf[sizeof("65535 ")];
        isc_uint32_t iterations;
 
-       REQUIRE(rdata->type == 51);
+       REQUIRE(rdata->type == dns_rdatatype_nsec3param);
        REQUIRE(rdata->length != 0);
 
        UNUSED(tctx);
@@ -146,7 +146,7 @@ fromwire_nsec3param(ARGS_FROMWIRE) {
        isc_region_t sr, rr;
        unsigned int saltlen;
 
-       REQUIRE(type == 51);
+       REQUIRE(type == dns_rdatatype_nsec3param);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -174,7 +174,7 @@ static inline isc_result_t
 towire_nsec3param(ARGS_TOWIRE) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 51);
+       REQUIRE(rdata->type == dns_rdatatype_nsec3param);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -190,7 +190,7 @@ compare_nsec3param(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 51);
+       REQUIRE(rdata1->type == dns_rdatatype_nsec3param);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -203,7 +203,7 @@ static inline isc_result_t
 fromstruct_nsec3param(ARGS_FROMSTRUCT) {
        dns_rdata_nsec3param_t *nsec3param = source;
 
-       REQUIRE(type == 51);
+       REQUIRE(type == dns_rdatatype_nsec3param);
        REQUIRE(source != NULL);
        REQUIRE(nsec3param->common.rdtype == type);
        REQUIRE(nsec3param->common.rdclass == rdclass);
@@ -225,7 +225,7 @@ tostruct_nsec3param(ARGS_TOSTRUCT) {
        isc_region_t region;
        dns_rdata_nsec3param_t *nsec3param = target;
 
-       REQUIRE(rdata->type == 51);
+       REQUIRE(rdata->type == dns_rdatatype_nsec3param);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -255,7 +255,7 @@ freestruct_nsec3param(ARGS_FREESTRUCT) {
        dns_rdata_nsec3param_t *nsec3param = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(nsec3param->common.rdtype == 51);
+       REQUIRE(nsec3param->common.rdtype == dns_rdatatype_nsec3param);
 
        if (nsec3param->mctx == NULL)
                return;
@@ -267,7 +267,7 @@ freestruct_nsec3param(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_nsec3param(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 51);
+       REQUIRE(rdata->type == dns_rdatatype_nsec3param);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -280,7 +280,7 @@ static inline isc_result_t
 digest_nsec3param(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 51);
+       REQUIRE(rdata->type == dns_rdatatype_nsec3param);
 
        dns_rdata_toregion(rdata, &r);
        return ((digest)(arg, &r));
@@ -289,7 +289,7 @@ digest_nsec3param(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_nsec3param(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 51);
+       REQUIRE(type == dns_rdatatype_nsec3param);
 
        UNUSED(name);
        UNUSED(type);
@@ -302,7 +302,7 @@ checkowner_nsec3param(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_nsec3param(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 51);
+       REQUIRE(rdata->type == dns_rdatatype_nsec3param);
 
        UNUSED(rdata);
        UNUSED(owner);
index 095f42eba899dadefd830215b446ffbda872066b..84d14f1eb4a281c9f80f493523c5a41785467faf 100644 (file)
@@ -40,7 +40,7 @@ fromtext_nsec(ARGS_FROMTEXT) {
        int octet;
        int window;
 
-       REQUIRE(type == 47);
+       REQUIRE(type == dns_rdatatype_nsec);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -90,7 +90,7 @@ totext_nsec(ARGS_TOTEXT) {
        dns_name_t name;
        unsigned int window, len;
 
-       REQUIRE(rdata->type == 47);
+       REQUIRE(rdata->type == dns_rdatatype_nsec);
        REQUIRE(rdata->length != 0);
 
        UNUSED(tctx);
@@ -140,7 +140,7 @@ fromwire_nsec(ARGS_FROMWIRE) {
        isc_boolean_t first = ISC_TRUE;
        unsigned int i;
 
-       REQUIRE(type == 47);
+       REQUIRE(type == dns_rdatatype_nsec);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -198,7 +198,7 @@ towire_nsec(ARGS_TOWIRE) {
        dns_name_t name;
        dns_offsets_t offsets;
 
-       REQUIRE(rdata->type == 47);
+       REQUIRE(rdata->type == dns_rdatatype_nsec);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -218,7 +218,7 @@ compare_nsec(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 47);
+       REQUIRE(rdata1->type == dns_rdatatype_nsec);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -234,7 +234,7 @@ fromstruct_nsec(ARGS_FROMSTRUCT) {
        unsigned int i, len, window, lastwindow = 0;
        isc_boolean_t first = ISC_TRUE;
 
-       REQUIRE(type == 47);
+       REQUIRE(type == dns_rdatatype_nsec);
        REQUIRE(source != NULL);
        REQUIRE(nsec->common.rdtype == type);
        REQUIRE(nsec->common.rdclass == rdclass);
@@ -270,7 +270,7 @@ tostruct_nsec(ARGS_TOSTRUCT) {
        dns_rdata_nsec_t *nsec = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 47);
+       REQUIRE(rdata->type == dns_rdatatype_nsec);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -304,7 +304,7 @@ freestruct_nsec(ARGS_FREESTRUCT) {
        dns_rdata_nsec_t *nsec = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(nsec->common.rdtype == 47);
+       REQUIRE(nsec->common.rdtype == dns_rdatatype_nsec);
 
        if (nsec->mctx == NULL)
                return;
@@ -317,7 +317,7 @@ freestruct_nsec(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_nsec(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 47);
+       REQUIRE(rdata->type == dns_rdatatype_nsec);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -330,7 +330,7 @@ static inline isc_result_t
 digest_nsec(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 47);
+       REQUIRE(rdata->type == dns_rdatatype_nsec);
 
        dns_rdata_toregion(rdata, &r);
        return ((digest)(arg, &r));
@@ -339,7 +339,7 @@ digest_nsec(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_nsec(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 47);
+       REQUIRE(type == dns_rdatatype_nsec);
 
        UNUSED(name);
        UNUSED(type);
@@ -352,7 +352,7 @@ checkowner_nsec(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_nsec(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 47);
+       REQUIRE(rdata->type == dns_rdatatype_nsec);
 
        UNUSED(rdata);
        UNUSED(owner);
@@ -371,7 +371,7 @@ casecompare_nsec(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 47);
+       REQUIRE(rdata1->type == dns_rdatatype_nsec);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
index 8ba86fbca9b77381da1302340a521895e3e6483c..283a9d93eb4206522d4b0ef4e8d28c1b8eaa4f99 100644 (file)
@@ -26,7 +26,7 @@
 
 static inline isc_result_t
 fromtext_null(ARGS_FROMTEXT) {
-       REQUIRE(type == 10);
+       REQUIRE(type == dns_rdatatype_null);
 
        UNUSED(rdclass);
        UNUSED(type);
@@ -41,7 +41,7 @@ fromtext_null(ARGS_FROMTEXT) {
 
 static inline isc_result_t
 totext_null(ARGS_TOTEXT) {
-       REQUIRE(rdata->type == 10);
+       REQUIRE(rdata->type == dns_rdatatype_null);
 
        return (unknown_totext(rdata, tctx, target));
 }
@@ -50,7 +50,7 @@ static inline isc_result_t
 fromwire_null(ARGS_FROMWIRE) {
        isc_region_t sr;
 
-       REQUIRE(type == 10);
+       REQUIRE(type == dns_rdatatype_null);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -64,7 +64,7 @@ fromwire_null(ARGS_FROMWIRE) {
 
 static inline isc_result_t
 towire_null(ARGS_TOWIRE) {
-       REQUIRE(rdata->type == 10);
+       REQUIRE(rdata->type == dns_rdatatype_null);
 
        UNUSED(cctx);
 
@@ -78,7 +78,7 @@ compare_null(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 10);
+       REQUIRE(rdata1->type == dns_rdatatype_null);
 
        dns_rdata_toregion(rdata1, &r1);
        dns_rdata_toregion(rdata2, &r2);
@@ -89,7 +89,7 @@ static inline isc_result_t
 fromstruct_null(ARGS_FROMSTRUCT) {
        dns_rdata_null_t *null = source;
 
-       REQUIRE(type == 10);
+       REQUIRE(type == dns_rdatatype_null);
        REQUIRE(source != NULL);
        REQUIRE(null->common.rdtype == type);
        REQUIRE(null->common.rdclass == rdclass);
@@ -106,7 +106,7 @@ tostruct_null(ARGS_TOSTRUCT) {
        dns_rdata_null_t *null = target;
        isc_region_t r;
 
-       REQUIRE(rdata->type == 10);
+       REQUIRE(rdata->type == dns_rdatatype_null);
        REQUIRE(target != NULL);
 
        null->common.rdclass = rdata->rdclass;
@@ -128,7 +128,7 @@ freestruct_null(ARGS_FREESTRUCT) {
        dns_rdata_null_t *null = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(null->common.rdtype == 10);
+       REQUIRE(null->common.rdtype == dns_rdatatype_null);
 
        if (null->mctx == NULL)
                return;
@@ -144,7 +144,7 @@ additionaldata_null(ARGS_ADDLDATA) {
        UNUSED(add);
        UNUSED(arg);
 
-       REQUIRE(rdata->type == 10);
+       REQUIRE(rdata->type == dns_rdatatype_null);
 
        return (ISC_R_SUCCESS);
 }
@@ -153,7 +153,7 @@ static inline isc_result_t
 digest_null(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 10);
+       REQUIRE(rdata->type == dns_rdatatype_null);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -163,7 +163,7 @@ digest_null(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_null(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 10);
+       REQUIRE(type == dns_rdatatype_null);
 
        UNUSED(name);
        UNUSED(type);
@@ -176,7 +176,7 @@ checkowner_null(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_null(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 10);
+       REQUIRE(rdata->type == dns_rdatatype_null);
 
        UNUSED(rdata);
        UNUSED(owner);
index 4d291a8e6f6ee68fde073eac75bd19b40cc6f9d0..121c650587133bd2b30adb84bda46de691ca01d2 100644 (file)
@@ -42,7 +42,7 @@ fromtext_nxt(ARGS_FROMTEXT) {
        isc_boolean_t first = ISC_TRUE;
        long n;
 
-       REQUIRE(type == 30);
+       REQUIRE(type == dns_rdatatype_nxt);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -95,7 +95,7 @@ totext_nxt(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 30);
+       REQUIRE(rdata->type == dns_rdatatype_nxt);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -131,7 +131,7 @@ fromwire_nxt(ARGS_FROMWIRE) {
        isc_region_t sr;
        dns_name_t name;
 
-       REQUIRE(type == 30);
+       REQUIRE(type == dns_rdatatype_nxt);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -156,7 +156,7 @@ towire_nxt(ARGS_TOWIRE) {
        dns_name_t name;
        dns_offsets_t offsets;
 
-       REQUIRE(rdata->type == 30);
+       REQUIRE(rdata->type == dns_rdatatype_nxt);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -179,7 +179,7 @@ compare_nxt(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 30);
+       REQUIRE(rdata1->type == dns_rdatatype_nxt);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -201,7 +201,7 @@ fromstruct_nxt(ARGS_FROMSTRUCT) {
        dns_rdata_nxt_t *nxt = source;
        isc_region_t region;
 
-       REQUIRE(type == 30);
+       REQUIRE(type == dns_rdatatype_nxt);
        REQUIRE(source != NULL);
        REQUIRE(nxt->common.rdtype == type);
        REQUIRE(nxt->common.rdclass == rdclass);
@@ -226,7 +226,7 @@ tostruct_nxt(ARGS_TOSTRUCT) {
        dns_rdata_nxt_t *nxt = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 30);
+       REQUIRE(rdata->type == dns_rdatatype_nxt);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -260,7 +260,7 @@ freestruct_nxt(ARGS_FREESTRUCT) {
        dns_rdata_nxt_t *nxt = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(nxt->common.rdtype == 30);
+       REQUIRE(nxt->common.rdtype == dns_rdatatype_nxt);
 
        if (nxt->mctx == NULL)
                return;
@@ -273,7 +273,7 @@ freestruct_nxt(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_nxt(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 30);
+       REQUIRE(rdata->type == dns_rdatatype_nxt);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -288,7 +288,7 @@ digest_nxt(ARGS_DIGEST) {
        dns_name_t name;
        isc_result_t result;
 
-       REQUIRE(rdata->type == 30);
+       REQUIRE(rdata->type == dns_rdatatype_nxt);
 
        dns_rdata_toregion(rdata, &r);
        dns_name_init(&name, NULL);
@@ -304,7 +304,7 @@ digest_nxt(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_nxt(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 30);
+       REQUIRE(type == dns_rdatatype_nxt);
 
        UNUSED(name);
        UNUSED(type);
@@ -317,7 +317,7 @@ checkowner_nxt(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_nxt(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 30);
+       REQUIRE(rdata->type == dns_rdatatype_nxt);
 
        UNUSED(rdata);
        UNUSED(owner);
index 4ff9f710b50edc2aa5aae16167d9a798c4ac3ed0..382be7e432209c89382c0eddadceca548a59f0b1 100644 (file)
@@ -22,7 +22,7 @@
 static inline isc_result_t
 fromtext_openpgpkey(ARGS_FROMTEXT) {
 
-       REQUIRE(type == 61);
+       REQUIRE(type == dns_rdatatype_openpgpkey);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -40,7 +40,7 @@ static inline isc_result_t
 totext_openpgpkey(ARGS_TOTEXT) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 61);
+       REQUIRE(rdata->type == dns_rdatatype_openpgpkey);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &sr);
@@ -65,7 +65,7 @@ static inline isc_result_t
 fromwire_openpgpkey(ARGS_FROMWIRE) {
        isc_region_t sr;
 
-       REQUIRE(type == 61);
+       REQUIRE(type == dns_rdatatype_openpgpkey);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -86,7 +86,7 @@ static inline isc_result_t
 towire_openpgpkey(ARGS_TOWIRE) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 61);
+       REQUIRE(rdata->type == dns_rdatatype_openpgpkey);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -102,7 +102,7 @@ compare_openpgpkey(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 61);
+       REQUIRE(rdata1->type == dns_rdatatype_openpgpkey);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -115,7 +115,7 @@ static inline isc_result_t
 fromstruct_openpgpkey(ARGS_FROMSTRUCT) {
        dns_rdata_openpgpkey_t *sig = source;
 
-       REQUIRE(type == 61);
+       REQUIRE(type == dns_rdatatype_openpgpkey);
        REQUIRE(source != NULL);
        REQUIRE(sig->common.rdtype == type);
        REQUIRE(sig->common.rdclass == rdclass);
@@ -135,7 +135,7 @@ tostruct_openpgpkey(ARGS_TOSTRUCT) {
        isc_region_t sr;
        dns_rdata_openpgpkey_t *sig = target;
 
-       REQUIRE(rdata->type == 61);
+       REQUIRE(rdata->type == dns_rdatatype_openpgpkey);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -165,7 +165,7 @@ freestruct_openpgpkey(ARGS_FREESTRUCT) {
        dns_rdata_openpgpkey_t *sig = (dns_rdata_openpgpkey_t *) source;
 
        REQUIRE(source != NULL);
-       REQUIRE(sig->common.rdtype == 61);
+       REQUIRE(sig->common.rdtype == dns_rdatatype_openpgpkey);
 
        if (sig->mctx == NULL)
                return;
@@ -177,7 +177,7 @@ freestruct_openpgpkey(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_openpgpkey(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 61);
+       REQUIRE(rdata->type == dns_rdatatype_openpgpkey);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -190,7 +190,7 @@ static inline isc_result_t
 digest_openpgpkey(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 61);
+       REQUIRE(rdata->type == dns_rdatatype_openpgpkey);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -200,7 +200,7 @@ digest_openpgpkey(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_openpgpkey(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 61);
+       REQUIRE(type == dns_rdatatype_openpgpkey);
 
        UNUSED(name);
        UNUSED(type);
@@ -213,7 +213,7 @@ checkowner_openpgpkey(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_openpgpkey(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 61);
+       REQUIRE(rdata->type == dns_rdatatype_openpgpkey);
 
        UNUSED(rdata);
        UNUSED(owner);
@@ -229,7 +229,7 @@ casecompare_openpgpkey(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 61);
+       REQUIRE(rdata1->type == dns_rdatatype_openpgpkey);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
index 12e4ad29e5d803b1c4534bca92b13274cde35099..bc2de3790884d47d5613d643691da026d3c12a7f 100644 (file)
@@ -34,7 +34,7 @@ fromtext_opt(ARGS_FROMTEXT) {
         * OPT records do not have a text format.
         */
 
-       REQUIRE(type == 41);
+       REQUIRE(type == dns_rdatatype_opt);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -59,7 +59,7 @@ totext_opt(ARGS_TOTEXT) {
         * OPT records do not have a text format.
         */
 
-       REQUIRE(rdata->type == 41);
+       REQUIRE(rdata->type == dns_rdatatype_opt);
 
        dns_rdata_toregion(rdata, &r);
        while (r.length > 0) {
@@ -101,7 +101,7 @@ fromwire_opt(ARGS_FROMWIRE) {
        isc_uint16_t length;
        unsigned int total;
 
-       REQUIRE(type == 41);
+       REQUIRE(type == dns_rdatatype_opt);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -194,7 +194,7 @@ fromwire_opt(ARGS_FROMWIRE) {
 static inline isc_result_t
 towire_opt(ARGS_TOWIRE) {
 
-       REQUIRE(rdata->type == 41);
+       REQUIRE(rdata->type == dns_rdatatype_opt);
 
        UNUSED(cctx);
 
@@ -208,7 +208,7 @@ compare_opt(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 41);
+       REQUIRE(rdata1->type == dns_rdatatype_opt);
 
        dns_rdata_toregion(rdata1, &r1);
        dns_rdata_toregion(rdata2, &r2);
@@ -221,7 +221,7 @@ fromstruct_opt(ARGS_FROMSTRUCT) {
        isc_region_t region;
        isc_uint16_t length;
 
-       REQUIRE(type == 41);
+       REQUIRE(type == dns_rdatatype_opt);
        REQUIRE(source != NULL);
        REQUIRE(opt->common.rdtype == type);
        REQUIRE(opt->common.rdclass == rdclass);
@@ -251,7 +251,7 @@ tostruct_opt(ARGS_TOSTRUCT) {
        dns_rdata_opt_t *opt = target;
        isc_region_t r;
 
-       REQUIRE(rdata->type == 41);
+       REQUIRE(rdata->type == dns_rdatatype_opt);
        REQUIRE(target != NULL);
 
        opt->common.rdclass = rdata->rdclass;
@@ -274,7 +274,7 @@ freestruct_opt(ARGS_FREESTRUCT) {
        dns_rdata_opt_t *opt = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(opt->common.rdtype == 41);
+       REQUIRE(opt->common.rdtype == dns_rdatatype_opt);
 
        if (opt->mctx == NULL)
                return;
@@ -286,7 +286,7 @@ freestruct_opt(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_opt(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 41);
+       REQUIRE(rdata->type == dns_rdatatype_opt);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -302,7 +302,7 @@ digest_opt(ARGS_DIGEST) {
         * OPT records are not digested.
         */
 
-       REQUIRE(rdata->type == 41);
+       REQUIRE(rdata->type == dns_rdatatype_opt);
 
        UNUSED(rdata);
        UNUSED(digest);
@@ -314,7 +314,7 @@ digest_opt(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_opt(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 41);
+       REQUIRE(type == dns_rdatatype_opt);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -326,7 +326,7 @@ checkowner_opt(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_opt(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 41);
+       REQUIRE(rdata->type == dns_rdatatype_opt);
 
        UNUSED(rdata);
        UNUSED(owner);
@@ -344,7 +344,7 @@ isc_result_t
 dns_rdata_opt_first(dns_rdata_opt_t *opt) {
 
        REQUIRE(opt != NULL);
-       REQUIRE(opt->common.rdtype == 41);
+       REQUIRE(opt->common.rdtype == dns_rdatatype_opt);
        REQUIRE(opt->options != NULL || opt->length == 0);
 
        if (opt->length == 0)
@@ -360,7 +360,7 @@ dns_rdata_opt_next(dns_rdata_opt_t *opt) {
        isc_uint16_t length;
 
        REQUIRE(opt != NULL);
-       REQUIRE(opt->common.rdtype == 41);
+       REQUIRE(opt->common.rdtype == dns_rdatatype_opt);
        REQUIRE(opt->options != NULL && opt->length != 0);
        REQUIRE(opt->offset < opt->length);
 
@@ -381,7 +381,7 @@ dns_rdata_opt_current(dns_rdata_opt_t *opt, dns_rdata_opt_opcode_t *opcode) {
 
        REQUIRE(opt != NULL);
        REQUIRE(opcode != NULL);
-       REQUIRE(opt->common.rdtype == 41);
+       REQUIRE(opt->common.rdtype == dns_rdatatype_opt);
        REQUIRE(opt->options != NULL);
        REQUIRE(opt->offset < opt->length);
 
index d1a5ecd77cc266c00ed0fe08c288e2db52953b9a..a1475e09cfadbbc4a0aa6befe309b9227c9684f5 100644 (file)
@@ -26,7 +26,7 @@ static inline isc_result_t
 fromtext_#(ARGS_FROMTEXT) {
        isc_token_t token;
 
-       REQUIRE(type == #);
+       REQUIRE(type == dns_rdatatype_proforma.c#);
        REQUIRE(rdclass == #);
 
        RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
@@ -38,7 +38,7 @@ fromtext_#(ARGS_FROMTEXT) {
 static inline isc_result_t
 totext_#(ARGS_TOTEXT) {
 
-       REQUIRE(rdata->type == #);
+       REQUIRE(rdata->type == dns_rdatatype_proforma.c#);
        REQUIRE(rdata->rdclass == #);
        REQUIRE(rdata->length != 0);    /* XXX */
 
@@ -48,7 +48,7 @@ totext_#(ARGS_TOTEXT) {
 static inline isc_result_t
 fromwire_#(ARGS_FROMWIRE) {
 
-       REQUIRE(type == #);
+       REQUIRE(type == dns_rdatatype_proforma.c#);
        REQUIRE(rdclass == #);
 
        /* NONE or GLOBAL14 */
@@ -60,7 +60,7 @@ fromwire_#(ARGS_FROMWIRE) {
 static inline isc_result_t
 towire_#(ARGS_TOWIRE) {
 
-       REQUIRE(rdata->type == #);
+       REQUIRE(rdata->type == dns_rdatatype_proforma.c#);
        REQUIRE(rdata->rdclass == #);
        REQUIRE(rdata->length != 0);    /* XXX */
 
@@ -75,9 +75,9 @@ compare_#(ARGS_COMPARE) {
        isc_region_t r1;
        isc_region_t r2;
 
-       REQUIRE(rdata1->type == rdata2->type);
+       REQUIRE(rdata1->type == dns_rdatatype_proforma.crdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == #);
+       REQUIRE(rdata1->type == dns_rdatatype_proforma.c#);
        REQUIRE(rdata1->rdclass == #);
        REQUIRE(rdata1->length != 0);   /* XXX */
        REQUIRE(rdata2->length != 0);   /* XXX */
@@ -91,10 +91,10 @@ static inline isc_result_t
 fromstruct_#(ARGS_FROMSTRUCT) {
        dns_rdata_#_t *# = source;
 
-       REQUIRE(type == #);
+       REQUIRE(type == dns_rdatatype_proforma.c#);
        REQUIRE(rdclass == #);
        REQUIRE(source != NULL);
-       REQUIRE(#->common.rdtype == type);
+       REQUIRE(#->common.rdtype == dns_rdatatype_proforma.ctype);
        REQUIRE(#->common.rdclass == rdclass);
 
        return (ISC_R_NOTIMPLEMENTED);
@@ -103,7 +103,7 @@ fromstruct_#(ARGS_FROMSTRUCT) {
 static inline isc_result_t
 tostruct_#(ARGS_TOSTRUCT) {
 
-       REQUIRE(rdata->type == #);
+       REQUIRE(rdata->type == dns_rdatatype_proforma.c#);
        REQUIRE(rdata->rdclass == #);
        REQUIRE(rdata->length != 0);    /* XXX */
 
@@ -115,14 +115,14 @@ freestruct_#(ARGS_FREESTRUCT) {
        dns_rdata_#_t *# = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(#->common.rdtype == #);
+       REQUIRE(#->common.rdtype == dns_rdatatype_proforma.c#);
        REQUIRE(#->common.rdclass == #);
 
 }
 
 static inline isc_result_t
 additionaldata_#(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == #);
+       REQUIRE(rdata->type == dns_rdatatype_proforma.c#);
        REQUIRE(rdata->rdclass == #);
 
        (void)add;
@@ -135,7 +135,7 @@ static inline isc_result_t
 digest_#(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == #);
+       REQUIRE(rdata->type == dns_rdatatype_proforma.c#);
        REQUIRE(rdata->rdclass == #);
 
        dns_rdata_toregion(rdata, &r);
@@ -146,7 +146,7 @@ digest_#(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_#(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == #);
+       REQUIRE(type == dns_rdatatype_proforma.c#);
        REQUIRE(rdclass == #);
 
        UNUSED(name);
@@ -160,7 +160,7 @@ checkowner_#(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_#(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == #);
+       REQUIRE(rdata->type == dns_rdatatype_proforma.c#);
        REQUIRE(rdata->rdclass == #);
 
        UNUSED(rdata);
@@ -175,9 +175,9 @@ casecompare_#(ARGS_COMPARE) {
        isc_region_t r1;
        isc_region_t r2;
 
-       REQUIRE(rdata1->type == rdata2->type);
+       REQUIRE(rdata1->type == dns_rdatatype_proforma.crdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == #);
+       REQUIRE(rdata1->type == dns_rdatatype_proforma.c#);
        REQUIRE(rdata1->rdclass == #);
        REQUIRE(rdata1->length != 0);   /* XXX */
        REQUIRE(rdata2->length != 0);   /* XXX */
index a619f137a877f7119f637e8179c36ef75a70b585..f6e0480ac1530131acf6dbfb35b2e890c6f67c41 100644 (file)
@@ -30,7 +30,7 @@ fromtext_ptr(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
 
-       REQUIRE(type == 12);
+       REQUIRE(type == dns_rdatatype_ptr);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -63,7 +63,7 @@ totext_ptr(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 12);
+       REQUIRE(rdata->type == dns_rdatatype_ptr);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -81,7 +81,7 @@ static inline isc_result_t
 fromwire_ptr(ARGS_FROMWIRE) {
        dns_name_t name;
 
-       REQUIRE(type == 12);
+       REQUIRE(type == dns_rdatatype_ptr);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -98,7 +98,7 @@ towire_ptr(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 12);
+       REQUIRE(rdata->type == dns_rdatatype_ptr);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
@@ -119,7 +119,7 @@ compare_ptr(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 12);
+       REQUIRE(rdata1->type == dns_rdatatype_ptr);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -140,7 +140,7 @@ fromstruct_ptr(ARGS_FROMSTRUCT) {
        dns_rdata_ptr_t *ptr = source;
        isc_region_t region;
 
-       REQUIRE(type == 12);
+       REQUIRE(type == dns_rdatatype_ptr);
        REQUIRE(source != NULL);
        REQUIRE(ptr->common.rdtype == type);
        REQUIRE(ptr->common.rdclass == rdclass);
@@ -158,7 +158,7 @@ tostruct_ptr(ARGS_TOSTRUCT) {
        dns_rdata_ptr_t *ptr = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 12);
+       REQUIRE(rdata->type == dns_rdatatype_ptr);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -180,7 +180,7 @@ freestruct_ptr(ARGS_FREESTRUCT) {
        dns_rdata_ptr_t *ptr = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(ptr->common.rdtype == 12);
+       REQUIRE(ptr->common.rdtype == dns_rdatatype_ptr);
 
        if (ptr->mctx == NULL)
                return;
@@ -191,7 +191,7 @@ freestruct_ptr(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_ptr(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 12);
+       REQUIRE(rdata->type == dns_rdatatype_ptr);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -205,7 +205,7 @@ digest_ptr(ARGS_DIGEST) {
        isc_region_t r;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 12);
+       REQUIRE(rdata->type == dns_rdatatype_ptr);
 
        dns_rdata_toregion(rdata, &r);
        dns_name_init(&name, NULL);
@@ -217,7 +217,7 @@ digest_ptr(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_ptr(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 12);
+       REQUIRE(type == dns_rdatatype_ptr);
 
        UNUSED(name);
        UNUSED(type);
@@ -268,7 +268,7 @@ checknames_ptr(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 12);
+       REQUIRE(rdata->type == dns_rdatatype_ptr);
 
        if (rdata->rdclass != dns_rdataclass_in)
            return (ISC_TRUE);
index 3291f7bb55cd85cbf8998c9de9d7a0bf33b08747..dbab0a841a0922da42e2f8fc2dac1e6dcd1db99a 100644 (file)
@@ -32,7 +32,7 @@ fromtext_rp(ARGS_FROMTEXT) {
        int i;
        isc_boolean_t ok;
 
-       REQUIRE(type == 17);
+       REQUIRE(type == dns_rdatatype_rp);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -67,7 +67,7 @@ totext_rp(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 17);
+       REQUIRE(rdata->type == dns_rdatatype_rp);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&rmail, NULL);
@@ -96,7 +96,7 @@ fromwire_rp(ARGS_FROMWIRE) {
        dns_name_t rmail;
        dns_name_t email;
 
-       REQUIRE(type == 17);
+       REQUIRE(type == dns_rdatatype_rp);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -118,7 +118,7 @@ towire_rp(ARGS_TOWIRE) {
        dns_offsets_t roffsets;
        dns_offsets_t eoffsets;
 
-       REQUIRE(rdata->type == 17);
+       REQUIRE(rdata->type == dns_rdatatype_rp);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -148,7 +148,7 @@ compare_rp(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 17);
+       REQUIRE(rdata1->type == dns_rdatatype_rp);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -182,7 +182,7 @@ fromstruct_rp(ARGS_FROMSTRUCT) {
        dns_rdata_rp_t *rp = source;
        isc_region_t region;
 
-       REQUIRE(type == 17);
+       REQUIRE(type == dns_rdatatype_rp);
        REQUIRE(source != NULL);
        REQUIRE(rp->common.rdtype == type);
        REQUIRE(rp->common.rdclass == rdclass);
@@ -203,7 +203,7 @@ tostruct_rp(ARGS_TOSTRUCT) {
        dns_rdata_rp_t *rp = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 17);
+       REQUIRE(rdata->type == dns_rdatatype_rp);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -237,7 +237,7 @@ freestruct_rp(ARGS_FREESTRUCT) {
        dns_rdata_rp_t *rp = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(rp->common.rdtype == 17);
+       REQUIRE(rp->common.rdtype == dns_rdatatype_rp);
 
        if (rp->mctx == NULL)
                return;
@@ -249,7 +249,7 @@ freestruct_rp(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_rp(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 17);
+       REQUIRE(rdata->type == dns_rdatatype_rp);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -263,7 +263,7 @@ digest_rp(ARGS_DIGEST) {
        isc_region_t r;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 17);
+       REQUIRE(rdata->type == dns_rdatatype_rp);
 
        dns_rdata_toregion(rdata, &r);
        dns_name_init(&name, NULL);
@@ -281,7 +281,7 @@ digest_rp(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_rp(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 17);
+       REQUIRE(type == dns_rdatatype_rp);
 
        UNUSED(name);
        UNUSED(type);
@@ -296,7 +296,7 @@ checknames_rp(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 17);
+       REQUIRE(rdata->type == dns_rdatatype_rp);
 
        UNUSED(owner);
 
index d4e8767fed882a6f83beb1124d07adcc14ed9cfd..8ae9319c5cf0e5d2285917ac3e4c368bebeee407 100644 (file)
@@ -38,7 +38,7 @@ fromtext_rrsig(ARGS_FROMTEXT) {
        isc_buffer_t buffer;
        isc_uint32_t time_signed, time_expire;
 
-       REQUIRE(type == 46);
+       REQUIRE(type == dns_rdatatype_rrsig);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -161,7 +161,7 @@ totext_rrsig(ARGS_TOTEXT) {
        unsigned long foot;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 46);
+       REQUIRE(rdata->type == dns_rdatatype_rrsig);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &sr);
@@ -264,7 +264,7 @@ fromwire_rrsig(ARGS_FROMWIRE) {
        isc_region_t sr;
        dns_name_t name;
 
-       REQUIRE(type == 46);
+       REQUIRE(type == dns_rdatatype_rrsig);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -307,7 +307,7 @@ towire_rrsig(ARGS_TOWIRE) {
        dns_name_t name;
        dns_offsets_t offsets;
 
-       REQUIRE(rdata->type == 46);
+       REQUIRE(rdata->type == dns_rdatatype_rrsig);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -345,7 +345,7 @@ compare_rrsig(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 46);
+       REQUIRE(rdata1->type == dns_rdatatype_rrsig);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -358,7 +358,7 @@ static inline isc_result_t
 fromstruct_rrsig(ARGS_FROMSTRUCT) {
        dns_rdata_rrsig_t *sig = source;
 
-       REQUIRE(type == 46);
+       REQUIRE(type == dns_rdatatype_rrsig);
        REQUIRE(source != NULL);
        REQUIRE(sig->common.rdtype == type);
        REQUIRE(sig->common.rdclass == rdclass);
@@ -419,7 +419,7 @@ tostruct_rrsig(ARGS_TOSTRUCT) {
        dns_rdata_rrsig_t *sig = target;
        dns_name_t signer;
 
-       REQUIRE(rdata->type == 46);
+       REQUIRE(rdata->type == dns_rdatatype_rrsig);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -500,7 +500,7 @@ freestruct_rrsig(ARGS_FREESTRUCT) {
        dns_rdata_rrsig_t *sig = (dns_rdata_rrsig_t *) source;
 
        REQUIRE(source != NULL);
-       REQUIRE(sig->common.rdtype == 46);
+       REQUIRE(sig->common.rdtype == dns_rdatatype_rrsig);
 
        if (sig->mctx == NULL)
                return;
@@ -513,7 +513,7 @@ freestruct_rrsig(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_rrsig(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 46);
+       REQUIRE(rdata->type == dns_rdatatype_rrsig);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -525,7 +525,7 @@ additionaldata_rrsig(ARGS_ADDLDATA) {
 static inline isc_result_t
 digest_rrsig(ARGS_DIGEST) {
 
-       REQUIRE(rdata->type == 46);
+       REQUIRE(rdata->type == dns_rdatatype_rrsig);
 
        UNUSED(rdata);
        UNUSED(digest);
@@ -539,7 +539,7 @@ covers_rrsig(dns_rdata_t *rdata) {
        dns_rdatatype_t type;
        isc_region_t r;
 
-       REQUIRE(rdata->type == 46);
+       REQUIRE(rdata->type == dns_rdatatype_rrsig);
 
        dns_rdata_toregion(rdata, &r);
        type = uint16_fromregion(&r);
@@ -550,7 +550,7 @@ covers_rrsig(dns_rdata_t *rdata) {
 static inline isc_boolean_t
 checkowner_rrsig(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 46);
+       REQUIRE(type == dns_rdatatype_rrsig);
 
        UNUSED(name);
        UNUSED(type);
@@ -563,7 +563,7 @@ checkowner_rrsig(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_rrsig(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 46);
+       REQUIRE(rdata->type == dns_rdatatype_rrsig);
 
        UNUSED(rdata);
        UNUSED(owner);
@@ -582,7 +582,7 @@ casecompare_rrsig(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 46);
+       REQUIRE(rdata1->type == dns_rdatatype_rrsig);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
index 86fe2480b7998a88df854826aa91884c5d9ddb43..914919dbc25ffbe428fbf4d8378954c5fc95b6e9 100644 (file)
@@ -33,7 +33,7 @@ fromtext_rt(ARGS_FROMTEXT) {
        isc_buffer_t buffer;
        isc_boolean_t ok;
 
-       REQUIRE(type == 21);
+       REQUIRE(type == dns_rdatatype_rt);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -71,7 +71,7 @@ totext_rt(ARGS_TOTEXT) {
        char buf[sizeof("64000")];
        unsigned short num;
 
-       REQUIRE(rdata->type == 21);
+       REQUIRE(rdata->type == dns_rdatatype_rt);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -94,7 +94,7 @@ fromwire_rt(ARGS_FROMWIRE) {
        isc_region_t sregion;
        isc_region_t tregion;
 
-       REQUIRE(type == 21);
+       REQUIRE(type == dns_rdatatype_rt);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -122,7 +122,7 @@ towire_rt(ARGS_TOWIRE) {
        isc_region_t region;
        isc_region_t tr;
 
-       REQUIRE(rdata->type == 21);
+       REQUIRE(rdata->type == dns_rdatatype_rt);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -150,7 +150,7 @@ compare_rt(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 21);
+       REQUIRE(rdata1->type == dns_rdatatype_rt);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -178,7 +178,7 @@ fromstruct_rt(ARGS_FROMSTRUCT) {
        dns_rdata_rt_t *rt = source;
        isc_region_t region;
 
-       REQUIRE(type == 21);
+       REQUIRE(type == dns_rdatatype_rt);
        REQUIRE(source != NULL);
        REQUIRE(rt->common.rdtype == type);
        REQUIRE(rt->common.rdclass == rdclass);
@@ -197,7 +197,7 @@ tostruct_rt(ARGS_TOSTRUCT) {
        dns_rdata_rt_t *rt = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 21);
+       REQUIRE(rdata->type == dns_rdatatype_rt);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -222,7 +222,7 @@ freestruct_rt(ARGS_FREESTRUCT) {
        dns_rdata_rt_t *rt = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(rt->common.rdtype == 21);
+       REQUIRE(rt->common.rdtype == dns_rdatatype_rt);
 
        if (rt->mctx == NULL)
                return;
@@ -238,7 +238,7 @@ additionaldata_rt(ARGS_ADDLDATA) {
        isc_region_t region;
        isc_result_t result;
 
-       REQUIRE(rdata->type == 21);
+       REQUIRE(rdata->type == dns_rdatatype_rt);
 
        dns_name_init(&name, offsets);
        dns_rdata_toregion(rdata, &region);
@@ -260,7 +260,7 @@ digest_rt(ARGS_DIGEST) {
        isc_result_t result;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 21);
+       REQUIRE(rdata->type == dns_rdatatype_rt);
 
        dns_rdata_toregion(rdata, &r1);
        r2 = r1;
@@ -277,7 +277,7 @@ digest_rt(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_rt(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 21);
+       REQUIRE(type == dns_rdatatype_rt);
 
        UNUSED(name);
        UNUSED(type);
@@ -292,7 +292,7 @@ checknames_rt(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 21);
+       REQUIRE(rdata->type == dns_rdatatype_rt);
 
        UNUSED(owner);
 
index 86aa38a696b6650b7cb6dfc199ab916d3dbdf959..af9c7daaa49845cea27fa0730c439e6e7fdb7244 100644 (file)
@@ -38,7 +38,7 @@ fromtext_sig(ARGS_FROMTEXT) {
        isc_buffer_t buffer;
        isc_uint32_t time_signed, time_expire;
 
-       REQUIRE(type == 24);
+       REQUIRE(type == dns_rdatatype_sig);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -137,7 +137,7 @@ totext_sig(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 24);
+       REQUIRE(rdata->type == dns_rdatatype_sig);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &sr);
@@ -242,7 +242,7 @@ fromwire_sig(ARGS_FROMWIRE) {
        isc_region_t sr;
        dns_name_t name;
 
-       REQUIRE(type == 24);
+       REQUIRE(type == dns_rdatatype_sig);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -285,7 +285,7 @@ towire_sig(ARGS_TOWIRE) {
        dns_name_t name;
        dns_offsets_t offsets;
 
-       REQUIRE(rdata->type == 24);
+       REQUIRE(rdata->type == dns_rdatatype_sig);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -326,7 +326,7 @@ compare_sig(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 24);
+       REQUIRE(rdata1->type == dns_rdatatype_sig);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -363,7 +363,7 @@ static inline isc_result_t
 fromstruct_sig(ARGS_FROMSTRUCT) {
        dns_rdata_sig_t *sig = source;
 
-       REQUIRE(type == 24);
+       REQUIRE(type == dns_rdatatype_sig);
        REQUIRE(source != NULL);
        REQUIRE(sig->common.rdtype == type);
        REQUIRE(sig->common.rdclass == rdclass);
@@ -424,7 +424,7 @@ tostruct_sig(ARGS_TOSTRUCT) {
        dns_rdata_sig_t *sig = target;
        dns_name_t signer;
 
-       REQUIRE(rdata->type == 24);
+       REQUIRE(rdata->type == dns_rdatatype_sig);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -505,7 +505,7 @@ freestruct_sig(ARGS_FREESTRUCT) {
        dns_rdata_sig_t *sig = (dns_rdata_sig_t *) source;
 
        REQUIRE(source != NULL);
-       REQUIRE(sig->common.rdtype == 24);
+       REQUIRE(sig->common.rdtype == dns_rdatatype_sig);
 
        if (sig->mctx == NULL)
                return;
@@ -518,7 +518,7 @@ freestruct_sig(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_sig(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 24);
+       REQUIRE(rdata->type == dns_rdatatype_sig);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -530,7 +530,7 @@ additionaldata_sig(ARGS_ADDLDATA) {
 static inline isc_result_t
 digest_sig(ARGS_DIGEST) {
 
-       REQUIRE(rdata->type == 24);
+       REQUIRE(rdata->type == dns_rdatatype_sig);
 
        UNUSED(rdata);
        UNUSED(digest);
@@ -544,7 +544,7 @@ covers_sig(dns_rdata_t *rdata) {
        dns_rdatatype_t type;
        isc_region_t r;
 
-       REQUIRE(rdata->type == 24);
+       REQUIRE(rdata->type == dns_rdatatype_sig);
 
        dns_rdata_toregion(rdata, &r);
        type = uint16_fromregion(&r);
@@ -555,7 +555,7 @@ covers_sig(dns_rdata_t *rdata) {
 static inline isc_boolean_t
 checkowner_sig(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 24);
+       REQUIRE(type == dns_rdatatype_sig);
 
        UNUSED(name);
        UNUSED(type);
@@ -568,7 +568,7 @@ checkowner_sig(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_sig(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 24);
+       REQUIRE(rdata->type == dns_rdatatype_sig);
 
        UNUSED(rdata);
        UNUSED(owner);
index 0ee583baf0451f5e5c00c0f44fdae6c5b449d0e7..b407813811a4399bcaae72c1c62ebfddeec08c13 100644 (file)
@@ -33,7 +33,7 @@ fromtext_soa(ARGS_FROMTEXT) {
        isc_uint32_t n;
        isc_boolean_t ok;
 
-       REQUIRE(type == 6);
+       REQUIRE(type == dns_rdatatype_soa);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -97,7 +97,7 @@ totext_soa(ARGS_TOTEXT) {
        isc_boolean_t multiline;
        isc_boolean_t comm;
 
-       REQUIRE(rdata->type == 6);
+       REQUIRE(rdata->type == dns_rdatatype_soa);
        REQUIRE(rdata->length != 0);
 
        multiline = ISC_TF((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0);
@@ -165,7 +165,7 @@ fromwire_soa(ARGS_FROMWIRE) {
        isc_region_t sregion;
        isc_region_t tregion;
 
-       REQUIRE(type == 6);
+       REQUIRE(type == dns_rdatatype_soa);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -202,7 +202,7 @@ towire_soa(ARGS_TOWIRE) {
        dns_offsets_t moffsets;
        dns_offsets_t roffsets;
 
-       REQUIRE(rdata->type == 6);
+       REQUIRE(rdata->type == dns_rdatatype_soa);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_GLOBAL14);
@@ -239,7 +239,7 @@ compare_soa(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 6);
+       REQUIRE(rdata1->type == dns_rdatatype_soa);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -280,7 +280,7 @@ fromstruct_soa(ARGS_FROMSTRUCT) {
        dns_rdata_soa_t *soa = source;
        isc_region_t region;
 
-       REQUIRE(type == 6);
+       REQUIRE(type == dns_rdatatype_soa);
        REQUIRE(source != NULL);
        REQUIRE(soa->common.rdtype == type);
        REQUIRE(soa->common.rdclass == rdclass);
@@ -306,7 +306,7 @@ tostruct_soa(ARGS_TOSTRUCT) {
        dns_name_t name;
        isc_result_t result;
 
-       REQUIRE(rdata->type == 6);
+       REQUIRE(rdata->type == dns_rdatatype_soa);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -358,7 +358,7 @@ freestruct_soa(ARGS_FREESTRUCT) {
        dns_rdata_soa_t *soa = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(soa->common.rdtype == 6);
+       REQUIRE(soa->common.rdtype == dns_rdatatype_soa);
 
        if (soa->mctx == NULL)
                return;
@@ -374,7 +374,7 @@ additionaldata_soa(ARGS_ADDLDATA) {
        UNUSED(add);
        UNUSED(arg);
 
-       REQUIRE(rdata->type == 6);
+       REQUIRE(rdata->type == dns_rdatatype_soa);
 
        return (ISC_R_SUCCESS);
 }
@@ -384,7 +384,7 @@ digest_soa(ARGS_DIGEST) {
        isc_region_t r;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 6);
+       REQUIRE(rdata->type == dns_rdatatype_soa);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -404,7 +404,7 @@ digest_soa(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_soa(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 6);
+       REQUIRE(type == dns_rdatatype_soa);
 
        UNUSED(name);
        UNUSED(type);
@@ -419,7 +419,7 @@ checknames_soa(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 6);
+       REQUIRE(rdata->type == dns_rdatatype_soa);
 
        UNUSED(owner);
 
index 10e86b888f3a29b5bdb79f57be6dd62b9745b42b..d9c50a522f06b0455c35776caa9fdae65868d3eb 100644 (file)
@@ -29,7 +29,7 @@ fromtext_spf(ARGS_FROMTEXT) {
        isc_token_t token;
        int strings;
 
-       REQUIRE(type == 99);
+       REQUIRE(type == dns_rdatatype_spf);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -59,7 +59,7 @@ totext_spf(ARGS_TOTEXT) {
 
        UNUSED(tctx);
 
-       REQUIRE(rdata->type == 99);
+       REQUIRE(rdata->type == dns_rdatatype_spf);
 
        dns_rdata_toregion(rdata, &region);
 
@@ -76,7 +76,7 @@ static inline isc_result_t
 fromwire_spf(ARGS_FROMWIRE) {
        isc_result_t result;
 
-       REQUIRE(type == 99);
+       REQUIRE(type == dns_rdatatype_spf);
 
        UNUSED(type);
        UNUSED(dctx);
@@ -95,7 +95,7 @@ static inline isc_result_t
 towire_spf(ARGS_TOWIRE) {
        isc_region_t region;
 
-       REQUIRE(rdata->type == 99);
+       REQUIRE(rdata->type == dns_rdatatype_spf);
 
        UNUSED(cctx);
 
@@ -115,7 +115,7 @@ compare_spf(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 99);
+       REQUIRE(rdata1->type == dns_rdatatype_spf);
 
        dns_rdata_toregion(rdata1, &r1);
        dns_rdata_toregion(rdata2, &r2);
@@ -128,7 +128,7 @@ fromstruct_spf(ARGS_FROMSTRUCT) {
        isc_region_t region;
        isc_uint8_t length;
 
-       REQUIRE(type == 99);
+       REQUIRE(type == dns_rdatatype_spf);
        REQUIRE(source != NULL);
        REQUIRE(txt->common.rdtype == type);
        REQUIRE(txt->common.rdclass == rdclass);
@@ -155,7 +155,7 @@ tostruct_spf(ARGS_TOSTRUCT) {
        dns_rdata_spf_t *txt = target;
        isc_region_t r;
 
-       REQUIRE(rdata->type == 99);
+       REQUIRE(rdata->type == dns_rdatatype_spf);
        REQUIRE(target != NULL);
 
        txt->common.rdclass = rdata->rdclass;
@@ -178,7 +178,7 @@ freestruct_spf(ARGS_FREESTRUCT) {
        dns_rdata_spf_t *txt = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(txt->common.rdtype == 99);
+       REQUIRE(txt->common.rdtype == dns_rdatatype_spf);
 
        if (txt->mctx == NULL)
                return;
@@ -190,7 +190,7 @@ freestruct_spf(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_spf(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 99);
+       REQUIRE(rdata->type == dns_rdatatype_spf);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -203,7 +203,7 @@ static inline isc_result_t
 digest_spf(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 99);
+       REQUIRE(rdata->type == dns_rdatatype_spf);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -213,7 +213,7 @@ digest_spf(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_spf(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 99);
+       REQUIRE(type == dns_rdatatype_spf);
 
        UNUSED(name);
        UNUSED(type);
@@ -226,7 +226,7 @@ checkowner_spf(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_spf(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 99);
+       REQUIRE(rdata->type == dns_rdatatype_spf);
 
        UNUSED(rdata);
        UNUSED(owner);
index d553cd40380dc477792e71a68b6e0991573bb5ab..695ab493864c5e889263cbf6a666007f5373d2ff 100644 (file)
@@ -28,7 +28,7 @@ static inline isc_result_t
 fromtext_sshfp(ARGS_FROMTEXT) {
        isc_token_t token;
 
-       REQUIRE(type == 44);
+       REQUIRE(type == dns_rdatatype_sshfp);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -66,7 +66,7 @@ totext_sshfp(ARGS_TOTEXT) {
        char buf[sizeof("64000 ")];
        unsigned int n;
 
-       REQUIRE(rdata->type == 44);
+       REQUIRE(rdata->type == dns_rdatatype_sshfp);
        REQUIRE(rdata->length != 0);
 
        UNUSED(tctx);
@@ -109,7 +109,7 @@ static inline isc_result_t
 fromwire_sshfp(ARGS_FROMWIRE) {
        isc_region_t sr;
 
-       REQUIRE(type == 44);
+       REQUIRE(type == dns_rdatatype_sshfp);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -128,7 +128,7 @@ static inline isc_result_t
 towire_sshfp(ARGS_TOWIRE) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 44);
+       REQUIRE(rdata->type == dns_rdatatype_sshfp);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -144,7 +144,7 @@ compare_sshfp(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 44);
+       REQUIRE(rdata1->type == dns_rdatatype_sshfp);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -157,7 +157,7 @@ static inline isc_result_t
 fromstruct_sshfp(ARGS_FROMSTRUCT) {
        dns_rdata_sshfp_t *sshfp = source;
 
-       REQUIRE(type == 44);
+       REQUIRE(type == dns_rdatatype_sshfp);
        REQUIRE(source != NULL);
        REQUIRE(sshfp->common.rdtype == type);
        REQUIRE(sshfp->common.rdclass == rdclass);
@@ -176,7 +176,7 @@ tostruct_sshfp(ARGS_TOSTRUCT) {
        dns_rdata_sshfp_t *sshfp = target;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 44);
+       REQUIRE(rdata->type == dns_rdatatype_sshfp);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -205,7 +205,7 @@ freestruct_sshfp(ARGS_FREESTRUCT) {
        dns_rdata_sshfp_t *sshfp = source;
 
        REQUIRE(sshfp != NULL);
-       REQUIRE(sshfp->common.rdtype == 44);
+       REQUIRE(sshfp->common.rdtype == dns_rdatatype_sshfp);
 
        if (sshfp->mctx == NULL)
                return;
@@ -217,7 +217,7 @@ freestruct_sshfp(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_sshfp(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 44);
+       REQUIRE(rdata->type == dns_rdatatype_sshfp);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -230,7 +230,7 @@ static inline isc_result_t
 digest_sshfp(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 44);
+       REQUIRE(rdata->type == dns_rdatatype_sshfp);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -240,7 +240,7 @@ digest_sshfp(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_sshfp(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 44);
+       REQUIRE(type == dns_rdatatype_sshfp);
 
        UNUSED(name);
        UNUSED(type);
@@ -253,7 +253,7 @@ checkowner_sshfp(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_sshfp(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 44);
+       REQUIRE(rdata->type == dns_rdatatype_sshfp);
 
        UNUSED(rdata);
        UNUSED(owner);
index 0c91fd221ed886cdefbb4910ab23e5ba7b8e51f3..0f0f6e1f27326ddf4db84fb3f1854aafa2c1ebcf 100644 (file)
@@ -37,7 +37,7 @@ fromtext_tkey(ARGS_FROMTEXT) {
        long i;
        char *e;
 
-       REQUIRE(type == 249);
+       REQUIRE(type == dns_rdatatype_tkey);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -132,7 +132,7 @@ totext_tkey(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 249);
+       REQUIRE(rdata->type == dns_rdatatype_tkey);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &sr);
@@ -247,7 +247,7 @@ fromwire_tkey(ARGS_FROMWIRE) {
        unsigned long n;
        dns_name_t name;
 
-       REQUIRE(type == 249);
+       REQUIRE(type == dns_rdatatype_tkey);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -303,7 +303,7 @@ towire_tkey(ARGS_TOWIRE) {
        dns_name_t name;
        dns_offsets_t offsets;
 
-       REQUIRE(rdata->type == 249);
+       REQUIRE(rdata->type == dns_rdatatype_tkey);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -329,7 +329,7 @@ compare_tkey(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 249);
+       REQUIRE(rdata1->type == dns_rdatatype_tkey);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -353,7 +353,7 @@ static inline isc_result_t
 fromstruct_tkey(ARGS_FROMSTRUCT) {
        dns_rdata_tkey_t *tkey = source;
 
-       REQUIRE(type == 249);
+       REQUIRE(type == dns_rdatatype_tkey);
        REQUIRE(source != NULL);
        REQUIRE(tkey->common.rdtype == type);
        REQUIRE(tkey->common.rdclass == rdclass);
@@ -413,7 +413,7 @@ tostruct_tkey(ARGS_TOSTRUCT) {
        dns_name_t alg;
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 249);
+       REQUIRE(rdata->type == dns_rdatatype_tkey);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -519,7 +519,7 @@ additionaldata_tkey(ARGS_ADDLDATA) {
        UNUSED(add);
        UNUSED(arg);
 
-       REQUIRE(rdata->type == 249);
+       REQUIRE(rdata->type == dns_rdatatype_tkey);
 
        return (ISC_R_SUCCESS);
 }
@@ -530,7 +530,7 @@ digest_tkey(ARGS_DIGEST) {
        UNUSED(digest);
        UNUSED(arg);
 
-       REQUIRE(rdata->type == 249);
+       REQUIRE(rdata->type == dns_rdatatype_tkey);
 
        return (ISC_R_NOTIMPLEMENTED);
 }
@@ -538,7 +538,7 @@ digest_tkey(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_tkey(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 249);
+       REQUIRE(type == dns_rdatatype_tkey);
 
        UNUSED(name);
        UNUSED(type);
@@ -551,7 +551,7 @@ checkowner_tkey(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_tkey(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 249);
+       REQUIRE(rdata->type == dns_rdatatype_tkey);
 
        UNUSED(rdata);
        UNUSED(owner);
index b46556d35d4e2ad325e64cbcd40e041098466deb..f34c8f18c204df4f7de97d72bf11554c8fb1f899 100644 (file)
@@ -27,7 +27,7 @@ static inline isc_result_t
 fromtext_tlsa(ARGS_FROMTEXT) {
        isc_token_t token;
 
-       REQUIRE(type == 52);
+       REQUIRE(type == dns_rdatatype_tlsa);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -74,7 +74,7 @@ totext_tlsa(ARGS_TOTEXT) {
        char buf[sizeof("64000 ")];
        unsigned int n;
 
-       REQUIRE(rdata->type == 52);
+       REQUIRE(rdata->type == dns_rdatatype_tlsa);
        REQUIRE(rdata->length != 0);
 
        UNUSED(tctx);
@@ -125,7 +125,7 @@ static inline isc_result_t
 fromwire_tlsa(ARGS_FROMWIRE) {
        isc_region_t sr;
 
-       REQUIRE(type == 52);
+       REQUIRE(type == dns_rdatatype_tlsa);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -145,7 +145,7 @@ static inline isc_result_t
 towire_tlsa(ARGS_TOWIRE) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 52);
+       REQUIRE(rdata->type == dns_rdatatype_tlsa);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -161,7 +161,7 @@ compare_tlsa(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 52);
+       REQUIRE(rdata1->type == dns_rdatatype_tlsa);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -174,7 +174,7 @@ static inline isc_result_t
 fromstruct_tlsa(ARGS_FROMSTRUCT) {
        dns_rdata_tlsa_t *tlsa = source;
 
-       REQUIRE(type == 52);
+       REQUIRE(type == dns_rdatatype_tlsa);
        REQUIRE(source != NULL);
        REQUIRE(tlsa->common.rdtype == type);
        REQUIRE(tlsa->common.rdclass == rdclass);
@@ -194,7 +194,7 @@ tostruct_tlsa(ARGS_TOSTRUCT) {
        dns_rdata_tlsa_t *tlsa = target;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 52);
+       REQUIRE(rdata->type == dns_rdatatype_tlsa);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -225,7 +225,7 @@ freestruct_tlsa(ARGS_FREESTRUCT) {
        dns_rdata_tlsa_t *tlsa = source;
 
        REQUIRE(tlsa != NULL);
-       REQUIRE(tlsa->common.rdtype == 52);
+       REQUIRE(tlsa->common.rdtype == dns_rdatatype_tlsa);
 
        if (tlsa->mctx == NULL)
                return;
@@ -237,7 +237,7 @@ freestruct_tlsa(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_tlsa(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 52);
+       REQUIRE(rdata->type == dns_rdatatype_tlsa);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -250,7 +250,7 @@ static inline isc_result_t
 digest_tlsa(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 52);
+       REQUIRE(rdata->type == dns_rdatatype_tlsa);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -260,7 +260,7 @@ digest_tlsa(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_tlsa(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 52);
+       REQUIRE(type == dns_rdatatype_tlsa);
 
        UNUSED(name);
        UNUSED(type);
@@ -273,7 +273,7 @@ checkowner_tlsa(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_tlsa(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 52);
+       REQUIRE(rdata->type == dns_rdatatype_tlsa);
 
        UNUSED(rdata);
        UNUSED(owner);
index 0cbe3ea6f15aa710d6026da2f6a21ff9170843dd..6070c750967e8b6e90f522fd4385f479697245ec 100644 (file)
@@ -29,7 +29,7 @@ fromtext_txt(ARGS_FROMTEXT) {
        isc_token_t token;
        int strings;
 
-       REQUIRE(type == 16);
+       REQUIRE(type == dns_rdatatype_txt);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -66,7 +66,7 @@ totext_txt(ARGS_TOTEXT) {
 
        UNUSED(tctx);
 
-       REQUIRE(rdata->type == 16);
+       REQUIRE(rdata->type == dns_rdatatype_txt);
 
        dns_rdata_toregion(rdata, &region);
 
@@ -83,7 +83,7 @@ static inline isc_result_t
 fromwire_txt(ARGS_FROMWIRE) {
        isc_result_t result;
 
-       REQUIRE(type == 16);
+       REQUIRE(type == dns_rdatatype_txt);
 
        UNUSED(type);
        UNUSED(dctx);
@@ -102,7 +102,7 @@ static inline isc_result_t
 towire_txt(ARGS_TOWIRE) {
        isc_region_t region;
 
-       REQUIRE(rdata->type == 16);
+       REQUIRE(rdata->type == dns_rdatatype_txt);
 
        UNUSED(cctx);
 
@@ -122,7 +122,7 @@ compare_txt(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 16);
+       REQUIRE(rdata1->type == dns_rdatatype_txt);
 
        dns_rdata_toregion(rdata1, &r1);
        dns_rdata_toregion(rdata2, &r2);
@@ -135,7 +135,7 @@ fromstruct_txt(ARGS_FROMSTRUCT) {
        isc_region_t region;
        isc_uint8_t length;
 
-       REQUIRE(type == 16);
+       REQUIRE(type == dns_rdatatype_txt);
        REQUIRE(source != NULL);
        REQUIRE(txt->common.rdtype == type);
        REQUIRE(txt->common.rdclass == rdclass);
@@ -162,7 +162,7 @@ tostruct_txt(ARGS_TOSTRUCT) {
        dns_rdata_txt_t *txt = target;
        isc_region_t r;
 
-       REQUIRE(rdata->type == 16);
+       REQUIRE(rdata->type == dns_rdatatype_txt);
        REQUIRE(target != NULL);
 
        txt->common.rdclass = rdata->rdclass;
@@ -185,7 +185,7 @@ freestruct_txt(ARGS_FREESTRUCT) {
        dns_rdata_txt_t *txt = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(txt->common.rdtype == 16);
+       REQUIRE(txt->common.rdtype == dns_rdatatype_txt);
 
        if (txt->mctx == NULL)
                return;
@@ -197,7 +197,7 @@ freestruct_txt(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_txt(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 16);
+       REQUIRE(rdata->type == dns_rdatatype_txt);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -210,7 +210,7 @@ static inline isc_result_t
 digest_txt(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 16);
+       REQUIRE(rdata->type == dns_rdatatype_txt);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -220,7 +220,7 @@ digest_txt(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_txt(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 16);
+       REQUIRE(type == dns_rdatatype_txt);
 
        UNUSED(name);
        UNUSED(type);
@@ -233,7 +233,7 @@ checkowner_txt(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_txt(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 16);
+       REQUIRE(rdata->type == dns_rdatatype_txt);
 
        UNUSED(rdata);
        UNUSED(owner);
@@ -251,7 +251,7 @@ isc_result_t
 dns_rdata_txt_first(dns_rdata_txt_t *txt) {
 
        REQUIRE(txt != NULL);
-       REQUIRE(txt->common.rdtype == 16);
+       REQUIRE(txt->common.rdtype == dns_rdatatype_txt);
        REQUIRE(txt->txt != NULL || txt->txt_len == 0);
 
        if (txt->txt_len == 0)
@@ -267,7 +267,7 @@ dns_rdata_txt_next(dns_rdata_txt_t *txt) {
        isc_uint8_t length;
 
        REQUIRE(txt != NULL);
-       REQUIRE(txt->common.rdtype == 16);
+       REQUIRE(txt->common.rdtype == dns_rdatatype_txt);
        REQUIRE(txt->txt != NULL && txt->txt_len != 0);
 
        INSIST(txt->offset + 1 <= txt->txt_len);
@@ -287,7 +287,7 @@ dns_rdata_txt_current(dns_rdata_txt_t *txt, dns_rdata_txt_string_t *string) {
 
        REQUIRE(txt != NULL);
        REQUIRE(string != NULL);
-       REQUIRE(txt->common.rdtype == 16);
+       REQUIRE(txt->common.rdtype == dns_rdatatype_txt);
        REQUIRE(txt->txt != NULL);
        REQUIRE(txt->offset < txt->txt_len);
 
index c335c6751da798dd168cbbc061b63a50ecb193ac..bc9674f6431a2be37e38fd3e08c7d449c3725f49 100644 (file)
@@ -25,7 +25,7 @@
 static inline isc_result_t
 fromtext_unspec(ARGS_FROMTEXT) {
 
-       REQUIRE(type == 103);
+       REQUIRE(type == dns_rdatatype_unspec);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -39,7 +39,7 @@ fromtext_unspec(ARGS_FROMTEXT) {
 static inline isc_result_t
 totext_unspec(ARGS_TOTEXT) {
 
-       REQUIRE(rdata->type == 103);
+       REQUIRE(rdata->type == dns_rdatatype_unspec);
 
        UNUSED(tctx);
 
@@ -50,7 +50,7 @@ static inline isc_result_t
 fromwire_unspec(ARGS_FROMWIRE) {
        isc_region_t sr;
 
-       REQUIRE(type == 103);
+       REQUIRE(type == dns_rdatatype_unspec);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -65,7 +65,7 @@ fromwire_unspec(ARGS_FROMWIRE) {
 static inline isc_result_t
 towire_unspec(ARGS_TOWIRE) {
 
-       REQUIRE(rdata->type == 103);
+       REQUIRE(rdata->type == dns_rdatatype_unspec);
 
        UNUSED(cctx);
 
@@ -79,7 +79,7 @@ compare_unspec(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 103);
+       REQUIRE(rdata1->type == dns_rdatatype_unspec);
 
        dns_rdata_toregion(rdata1, &r1);
        dns_rdata_toregion(rdata2, &r2);
@@ -90,7 +90,7 @@ static inline isc_result_t
 fromstruct_unspec(ARGS_FROMSTRUCT) {
        dns_rdata_unspec_t *unspec = source;
 
-       REQUIRE(type == 103);
+       REQUIRE(type == dns_rdatatype_unspec);
        REQUIRE(source != NULL);
        REQUIRE(unspec->common.rdtype == type);
        REQUIRE(unspec->common.rdclass == rdclass);
@@ -107,7 +107,7 @@ tostruct_unspec(ARGS_TOSTRUCT) {
        dns_rdata_unspec_t *unspec = target;
        isc_region_t r;
 
-       REQUIRE(rdata->type == 103);
+       REQUIRE(rdata->type == dns_rdatatype_unspec);
        REQUIRE(target != NULL);
 
        unspec->common.rdclass = rdata->rdclass;
@@ -129,7 +129,7 @@ freestruct_unspec(ARGS_FREESTRUCT) {
        dns_rdata_unspec_t *unspec = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(unspec->common.rdtype == 103);
+       REQUIRE(unspec->common.rdtype == dns_rdatatype_unspec);
 
        if (unspec->mctx == NULL)
                return;
@@ -141,7 +141,7 @@ freestruct_unspec(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_unspec(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 103);
+       REQUIRE(rdata->type == dns_rdatatype_unspec);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -154,7 +154,7 @@ static inline isc_result_t
 digest_unspec(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 103);
+       REQUIRE(rdata->type == dns_rdatatype_unspec);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -164,7 +164,7 @@ digest_unspec(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_unspec(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 103);
+       REQUIRE(type == dns_rdatatype_unspec);
 
        UNUSED(name);
        UNUSED(type);
@@ -177,7 +177,7 @@ checkowner_unspec(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_unspec(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 103);
+       REQUIRE(rdata->type == dns_rdatatype_unspec);
 
        UNUSED(rdata);
        UNUSED(owner);
index 3ddd790847ac3c7d84fc9893a1d59e167a9edccd..5b2520e1d421c9da466f56e5be808ae71e121426 100644 (file)
@@ -25,7 +25,7 @@ static inline isc_result_t
 fromtext_uri(ARGS_FROMTEXT) {
        isc_token_t token;
 
-       REQUIRE(type == 256);
+       REQUIRE(type == dns_rdatatype_uri);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -70,7 +70,7 @@ totext_uri(ARGS_TOTEXT) {
 
        UNUSED(tctx);
 
-       REQUIRE(rdata->type == 256);
+       REQUIRE(rdata->type == dns_rdatatype_uri);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &region);
@@ -102,7 +102,7 @@ static inline isc_result_t
 fromwire_uri(ARGS_FROMWIRE) {
        isc_region_t region;
 
-       REQUIRE(type == 256);
+       REQUIRE(type == dns_rdatatype_uri);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -127,7 +127,7 @@ static inline isc_result_t
 towire_uri(ARGS_TOWIRE) {
        isc_region_t region;
 
-       REQUIRE(rdata->type == 256);
+       REQUIRE(rdata->type == dns_rdatatype_uri);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -144,7 +144,7 @@ compare_uri(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 256);
+       REQUIRE(rdata1->type == dns_rdatatype_uri);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -176,7 +176,7 @@ static inline isc_result_t
 fromstruct_uri(ARGS_FROMSTRUCT) {
        dns_rdata_uri_t *uri = source;
 
-       REQUIRE(type == 256);
+       REQUIRE(type == dns_rdatatype_uri);
        REQUIRE(source != NULL);
        REQUIRE(uri->common.rdtype == type);
        REQUIRE(uri->common.rdclass == rdclass);
@@ -206,7 +206,7 @@ tostruct_uri(ARGS_TOSTRUCT) {
        dns_rdata_uri_t *uri = target;
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 256);
+       REQUIRE(rdata->type == dns_rdatatype_uri);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -249,7 +249,7 @@ freestruct_uri(ARGS_FREESTRUCT) {
        dns_rdata_uri_t *uri = (dns_rdata_uri_t *) source;
 
        REQUIRE(source != NULL);
-       REQUIRE(uri->common.rdtype == 256);
+       REQUIRE(uri->common.rdtype == dns_rdatatype_uri);
 
        if (uri->mctx == NULL)
                return;
@@ -261,7 +261,7 @@ freestruct_uri(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_uri(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 256);
+       REQUIRE(rdata->type == dns_rdatatype_uri);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -274,7 +274,7 @@ static inline isc_result_t
 digest_uri(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 256);
+       REQUIRE(rdata->type == dns_rdatatype_uri);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -284,7 +284,7 @@ digest_uri(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_uri(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 256);
+       REQUIRE(type == dns_rdatatype_uri);
 
        UNUSED(name);
        UNUSED(type);
@@ -297,7 +297,7 @@ checkowner_uri(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_uri(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 256);
+       REQUIRE(rdata->type == dns_rdatatype_uri);
 
        UNUSED(rdata);
        UNUSED(owner);
index c5fe2d18b08cf16a5dae84c73747472c2b8e247c..8d4551b014cbf8020e5c38f46acdde5db7b018c7 100644 (file)
@@ -31,7 +31,7 @@ fromtext_x25(ARGS_FROMTEXT) {
        isc_token_t token;
        unsigned int i;
 
-       REQUIRE(type == 19);
+       REQUIRE(type == dns_rdatatype_x25);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -56,7 +56,7 @@ totext_x25(ARGS_TOTEXT) {
 
        UNUSED(tctx);
 
-       REQUIRE(rdata->type == 19);
+       REQUIRE(rdata->type == dns_rdatatype_x25);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &region);
@@ -67,7 +67,7 @@ static inline isc_result_t
 fromwire_x25(ARGS_FROMWIRE) {
        isc_region_t sr;
 
-       REQUIRE(type == 19);
+       REQUIRE(type == dns_rdatatype_x25);
 
        UNUSED(type);
        UNUSED(dctx);
@@ -84,7 +84,7 @@ static inline isc_result_t
 towire_x25(ARGS_TOWIRE) {
        UNUSED(cctx);
 
-       REQUIRE(rdata->type == 19);
+       REQUIRE(rdata->type == dns_rdatatype_x25);
        REQUIRE(rdata->length != 0);
 
        return (mem_tobuffer(target, rdata->data, rdata->length));
@@ -97,7 +97,7 @@ compare_x25(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 19);
+       REQUIRE(rdata1->type == dns_rdatatype_x25);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -111,7 +111,7 @@ fromstruct_x25(ARGS_FROMSTRUCT) {
        dns_rdata_x25_t *x25 = source;
        isc_uint8_t i;
 
-       REQUIRE(type == 19);
+       REQUIRE(type == dns_rdatatype_x25);
        REQUIRE(source != NULL);
        REQUIRE(x25->common.rdtype == type);
        REQUIRE(x25->common.rdclass == rdclass);
@@ -136,7 +136,7 @@ tostruct_x25(ARGS_TOSTRUCT) {
        dns_rdata_x25_t *x25 = target;
        isc_region_t r;
 
-       REQUIRE(rdata->type == 19);
+       REQUIRE(rdata->type == dns_rdatatype_x25);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -159,7 +159,7 @@ static inline void
 freestruct_x25(ARGS_FREESTRUCT) {
        dns_rdata_x25_t *x25 = source;
        REQUIRE(source != NULL);
-       REQUIRE(x25->common.rdtype == 19);
+       REQUIRE(x25->common.rdtype == dns_rdatatype_x25);
 
        if (x25->mctx == NULL)
                return;
@@ -171,7 +171,7 @@ freestruct_x25(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_x25(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 19);
+       REQUIRE(rdata->type == dns_rdatatype_x25);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -184,7 +184,7 @@ static inline isc_result_t
 digest_x25(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 19);
+       REQUIRE(rdata->type == dns_rdatatype_x25);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -194,7 +194,7 @@ digest_x25(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_x25(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 19);
+       REQUIRE(type == dns_rdatatype_x25);
 
        UNUSED(name);
        UNUSED(type);
@@ -207,7 +207,7 @@ checkowner_x25(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_x25(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 19);
+       REQUIRE(rdata->type == dns_rdatatype_x25);
 
        UNUSED(rdata);
        UNUSED(owner);
index 5f8a87504c0efa106fa9bd29eaf4ab305b8cf7c9..d45714f9a6ec9dd49b46f13487515c48ba64f137 100644 (file)
@@ -32,8 +32,8 @@ fromtext_hs_a(ARGS_FROMTEXT) {
        struct in_addr addr;
        isc_region_t region;
 
-       REQUIRE(type == 1);
-       REQUIRE(rdclass == 4);
+       REQUIRE(type == dns_rdatatype_a);
+       REQUIRE(rdclass == dns_rdataclass_hs);
 
        UNUSED(type);
        UNUSED(origin);
@@ -57,8 +57,8 @@ static inline isc_result_t
 totext_hs_a(ARGS_TOTEXT) {
        isc_region_t region;
 
-       REQUIRE(rdata->type == 1);
-       REQUIRE(rdata->rdclass == 4);
+       REQUIRE(rdata->type == dns_rdatatype_a);
+       REQUIRE(rdata->rdclass == dns_rdataclass_hs);
        REQUIRE(rdata->length == 4);
 
        UNUSED(tctx);
@@ -72,8 +72,8 @@ fromwire_hs_a(ARGS_FROMWIRE) {
        isc_region_t sregion;
        isc_region_t tregion;
 
-       REQUIRE(type == 1);
-       REQUIRE(rdclass == 4);
+       REQUIRE(type == dns_rdatatype_a);
+       REQUIRE(rdclass == dns_rdataclass_hs);
 
        UNUSED(type);
        UNUSED(dctx);
@@ -97,8 +97,8 @@ static inline isc_result_t
 towire_hs_a(ARGS_TOWIRE) {
        isc_region_t region;
 
-       REQUIRE(rdata->type == 1);
-       REQUIRE(rdata->rdclass == 4);
+       REQUIRE(rdata->type == dns_rdatatype_a);
+       REQUIRE(rdata->rdclass == dns_rdataclass_hs);
        REQUIRE(rdata->length == 4);
 
        UNUSED(cctx);
@@ -117,8 +117,8 @@ compare_hs_a(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 1);
-       REQUIRE(rdata1->rdclass == 4);
+       REQUIRE(rdata1->type == dns_rdatatype_a);
+       REQUIRE(rdata1->rdclass == dns_rdataclass_hs);
        REQUIRE(rdata1->length == 4);
        REQUIRE(rdata2->length == 4);
 
@@ -134,8 +134,8 @@ fromstruct_hs_a(ARGS_FROMSTRUCT) {
        dns_rdata_hs_a_t *a = source;
        isc_uint32_t n;
 
-       REQUIRE(type == 1);
-       REQUIRE(rdclass == 4);
+       REQUIRE(type == dns_rdatatype_a);
+       REQUIRE(rdclass == dns_rdataclass_hs);
        REQUIRE(source != NULL);
        REQUIRE(a->common.rdtype == type);
        REQUIRE(a->common.rdclass == rdclass);
@@ -154,8 +154,8 @@ tostruct_hs_a(ARGS_TOSTRUCT) {
        isc_uint32_t n;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 1);
-       REQUIRE(rdata->rdclass == 4);
+       REQUIRE(rdata->type == dns_rdatatype_a);
+       REQUIRE(rdata->rdclass == dns_rdataclass_hs);
        REQUIRE(rdata->length == 4);
 
        UNUSED(mctx);
@@ -180,8 +180,8 @@ freestruct_hs_a(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_hs_a(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 1);
-       REQUIRE(rdata->rdclass == 4);
+       REQUIRE(rdata->type == dns_rdatatype_a);
+       REQUIRE(rdata->rdclass == dns_rdataclass_hs);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -194,8 +194,8 @@ static inline isc_result_t
 digest_hs_a(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 1);
-       REQUIRE(rdata->rdclass == 4);
+       REQUIRE(rdata->type == dns_rdatatype_a);
+       REQUIRE(rdata->rdclass == dns_rdataclass_hs);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -205,8 +205,8 @@ digest_hs_a(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_hs_a(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 1);
-       REQUIRE(rdclass == 4);
+       REQUIRE(type == dns_rdatatype_a);
+       REQUIRE(rdclass == dns_rdataclass_hs);
 
        UNUSED(name);
        UNUSED(type);
@@ -219,8 +219,8 @@ checkowner_hs_a(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_hs_a(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 1);
-       REQUIRE(rdata->rdclass == 4);
+       REQUIRE(rdata->type == dns_rdatatype_a);
+       REQUIRE(rdata->rdclass == dns_rdataclass_hs);
 
        UNUSED(rdata);
        UNUSED(owner);
index b6ef68878e2f0ffb9a9e8269687d7e20a9e517a4..f11fccec017004742a68189390b7d5a7329af5fa 100644 (file)
@@ -37,8 +37,8 @@ fromtext_in_a6(ARGS_FROMTEXT) {
        isc_buffer_t buffer;
        isc_boolean_t ok;
 
-       REQUIRE(type == 38);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_a6);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -107,8 +107,8 @@ totext_in_a6(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 38);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a6);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &sr);
@@ -150,8 +150,8 @@ fromwire_in_a6(ARGS_FROMWIRE) {
        unsigned char mask;
        dns_name_t name;
 
-       REQUIRE(type == 38);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_a6);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -199,8 +199,8 @@ towire_in_a6(ARGS_TOWIRE) {
        unsigned char prefixlen;
        unsigned char octets;
 
-       REQUIRE(rdata->type == 38);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a6);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -232,8 +232,8 @@ compare_in_a6(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 38);
-       REQUIRE(rdata1->rdclass == 1);
+       REQUIRE(rdata1->type == dns_rdatatype_a6);
+       REQUIRE(rdata1->rdclass == dns_rdataclass_in);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -283,8 +283,8 @@ fromstruct_in_a6(ARGS_FROMSTRUCT) {
        isc_uint8_t first;
        isc_uint8_t mask;
 
-       REQUIRE(type == 38);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_a6);
+       REQUIRE(rdclass == dns_rdataclass_in);
        REQUIRE(source != NULL);
        REQUIRE(a6->common.rdtype == type);
        REQUIRE(a6->common.rdclass == rdclass);
@@ -326,8 +326,8 @@ tostruct_in_a6(ARGS_TOSTRUCT) {
        dns_name_t name;
        isc_region_t r;
 
-       REQUIRE(rdata->type == 38);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a6);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -369,8 +369,8 @@ freestruct_in_a6(ARGS_FREESTRUCT) {
        dns_rdata_in_a6_t *a6 = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(a6->common.rdclass == 1);
-       REQUIRE(a6->common.rdtype == 38);
+       REQUIRE(a6->common.rdclass == dns_rdataclass_in);
+       REQUIRE(a6->common.rdtype == dns_rdatatype_a6);
 
        if (a6->mctx == NULL)
                return;
@@ -382,8 +382,8 @@ freestruct_in_a6(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_in_a6(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 38);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a6);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -399,8 +399,8 @@ digest_in_a6(ARGS_DIGEST) {
        isc_result_t result;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 38);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a6);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        dns_rdata_toregion(rdata, &r1);
        r2 = r1;
@@ -423,8 +423,8 @@ digest_in_a6(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_in_a6(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 38);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_a6);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -438,8 +438,8 @@ checknames_in_a6(ARGS_CHECKNAMES) {
        dns_name_t name;
        unsigned int prefixlen;
 
-       REQUIRE(rdata->type == 38);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a6);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(owner);
 
index fcdcaae0545b75a61eaa020b13f06d936efe44d6..5048ad2288ccf69c16c766f66a526d4029231da0 100644 (file)
@@ -34,8 +34,8 @@ fromtext_in_a(ARGS_FROMTEXT) {
        struct in_addr addr;
        isc_region_t region;
 
-       REQUIRE(type == 1);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_a);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(origin);
@@ -59,8 +59,8 @@ static inline isc_result_t
 totext_in_a(ARGS_TOTEXT) {
        isc_region_t region;
 
-       REQUIRE(rdata->type == 1);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length == 4);
 
        UNUSED(tctx);
@@ -74,8 +74,8 @@ fromwire_in_a(ARGS_FROMWIRE) {
        isc_region_t sregion;
        isc_region_t tregion;
 
-       REQUIRE(type == 1);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_a);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(dctx);
@@ -99,8 +99,8 @@ static inline isc_result_t
 towire_in_a(ARGS_TOWIRE) {
        isc_region_t region;
 
-       REQUIRE(rdata->type == 1);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length == 4);
 
        UNUSED(cctx);
@@ -120,8 +120,8 @@ compare_in_a(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 1);
-       REQUIRE(rdata1->rdclass == 1);
+       REQUIRE(rdata1->type == dns_rdatatype_a);
+       REQUIRE(rdata1->rdclass == dns_rdataclass_in);
        REQUIRE(rdata1->length == 4);
        REQUIRE(rdata2->length == 4);
 
@@ -135,8 +135,8 @@ fromstruct_in_a(ARGS_FROMSTRUCT) {
        dns_rdata_in_a_t *a = source;
        isc_uint32_t n;
 
-       REQUIRE(type == 1);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_a);
+       REQUIRE(rdclass == dns_rdataclass_in);
        REQUIRE(source != NULL);
        REQUIRE(a->common.rdtype == type);
        REQUIRE(a->common.rdclass == rdclass);
@@ -156,8 +156,8 @@ tostruct_in_a(ARGS_TOSTRUCT) {
        isc_uint32_t n;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 1);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length == 4);
 
        UNUSED(mctx);
@@ -178,16 +178,16 @@ freestruct_in_a(ARGS_FREESTRUCT) {
        dns_rdata_in_a_t *a = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(a->common.rdtype == 1);
-       REQUIRE(a->common.rdclass == 1);
+       REQUIRE(a->common.rdtype == dns_rdatatype_a);
+       REQUIRE(a->common.rdclass == dns_rdataclass_in);
 
        UNUSED(a);
 }
 
 static inline isc_result_t
 additionaldata_in_a(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 1);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -200,8 +200,8 @@ static inline isc_result_t
 digest_in_a(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 1);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -211,8 +211,8 @@ digest_in_a(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_in_a(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 1);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_a);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -223,8 +223,8 @@ checkowner_in_a(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_in_a(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 1);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_a);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(owner);
index 3f88c4db0f2f55d0f6190b18efe19050725f3ff7..61821d426aadf0e7acffca7b855bc288877e8b3f 100644 (file)
@@ -34,8 +34,8 @@ fromtext_in_aaaa(ARGS_FROMTEXT) {
        unsigned char addr[16];
        isc_region_t region;
 
-       REQUIRE(type == 28);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_aaaa);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(origin);
@@ -62,8 +62,8 @@ totext_in_aaaa(ARGS_TOTEXT) {
 
        UNUSED(tctx);
 
-       REQUIRE(rdata->type == 28);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_aaaa);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length == 16);
 
        dns_rdata_toregion(rdata, &region);
@@ -75,8 +75,8 @@ fromwire_in_aaaa(ARGS_FROMWIRE) {
        isc_region_t sregion;
        isc_region_t tregion;
 
-       REQUIRE(type == 28);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_aaaa);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(dctx);
@@ -102,8 +102,8 @@ towire_in_aaaa(ARGS_TOWIRE) {
 
        UNUSED(cctx);
 
-       REQUIRE(rdata->type == 28);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_aaaa);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length == 16);
 
        isc_buffer_availableregion(target, &region);
@@ -121,8 +121,8 @@ compare_in_aaaa(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 28);
-       REQUIRE(rdata1->rdclass == 1);
+       REQUIRE(rdata1->type == dns_rdatatype_aaaa);
+       REQUIRE(rdata1->rdclass == dns_rdataclass_in);
        REQUIRE(rdata1->length == 16);
        REQUIRE(rdata2->length == 16);
 
@@ -135,8 +135,8 @@ static inline isc_result_t
 fromstruct_in_aaaa(ARGS_FROMSTRUCT) {
        dns_rdata_in_aaaa_t *aaaa = source;
 
-       REQUIRE(type == 28);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_aaaa);
+       REQUIRE(rdclass == dns_rdataclass_in);
        REQUIRE(source != NULL);
        REQUIRE(aaaa->common.rdtype == type);
        REQUIRE(aaaa->common.rdclass == rdclass);
@@ -152,8 +152,8 @@ tostruct_in_aaaa(ARGS_TOSTRUCT) {
        dns_rdata_in_aaaa_t *aaaa = target;
        isc_region_t r;
 
-       REQUIRE(rdata->type == 28);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_aaaa);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length == 16);
 
@@ -175,16 +175,16 @@ freestruct_in_aaaa(ARGS_FREESTRUCT) {
        dns_rdata_in_aaaa_t *aaaa = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(aaaa->common.rdclass == 1);
-       REQUIRE(aaaa->common.rdtype == 28);
+       REQUIRE(aaaa->common.rdclass == dns_rdataclass_in);
+       REQUIRE(aaaa->common.rdtype == dns_rdatatype_aaaa);
 
        UNUSED(aaaa);
 }
 
 static inline isc_result_t
 additionaldata_in_aaaa(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 28);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_aaaa);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -197,8 +197,8 @@ static inline isc_result_t
 digest_in_aaaa(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 28);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_aaaa);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -208,8 +208,8 @@ digest_in_aaaa(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_in_aaaa(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 28);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_aaaa);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -220,8 +220,8 @@ checkowner_in_aaaa(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_in_aaaa(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 28);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_aaaa);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(owner);
index 94133bae62965cddf3d524579eb4e2ae7353c1de..1af2dcc4195340311ba407395d9f99a559f66dd2 100644 (file)
@@ -35,8 +35,8 @@ fromtext_in_apl(ARGS_FROMTEXT) {
        char *cp, *ap, *slash;
        int n;
 
-       REQUIRE(type == 42);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_apl);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -120,8 +120,8 @@ totext_in_apl(ARGS_TOTEXT) {
        const char *sep = "";
        int n;
 
-       REQUIRE(rdata->type == 42);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_apl);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(tctx);
 
@@ -180,8 +180,8 @@ fromwire_in_apl(ARGS_FROMWIRE) {
        isc_uint8_t prefix;
        isc_uint8_t len;
 
-       REQUIRE(type == 42);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_apl);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(dctx);
@@ -227,8 +227,8 @@ static inline isc_result_t
 towire_in_apl(ARGS_TOWIRE) {
        UNUSED(cctx);
 
-       REQUIRE(rdata->type == 42);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_apl);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        return (mem_tobuffer(target, rdata->data, rdata->length));
 }
@@ -240,8 +240,8 @@ compare_in_apl(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 42);
-       REQUIRE(rdata1->rdclass == 1);
+       REQUIRE(rdata1->type == dns_rdatatype_apl);
+       REQUIRE(rdata1->rdclass == dns_rdataclass_in);
 
        dns_rdata_toregion(rdata1, &r1);
        dns_rdata_toregion(rdata2, &r2);
@@ -253,8 +253,8 @@ fromstruct_in_apl(ARGS_FROMSTRUCT) {
        dns_rdata_in_apl_t *apl = source;
        isc_buffer_t b;
 
-       REQUIRE(type == 42);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_apl);
+       REQUIRE(rdclass == dns_rdataclass_in);
        REQUIRE(source != NULL);
        REQUIRE(apl->common.rdtype == type);
        REQUIRE(apl->common.rdclass == rdclass);
@@ -271,8 +271,8 @@ tostruct_in_apl(ARGS_TOSTRUCT) {
        dns_rdata_in_apl_t *apl = target;
        isc_region_t r;
 
-       REQUIRE(rdata->type == 42);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_apl);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        apl->common.rdclass = rdata->rdclass;
        apl->common.rdtype = rdata->type;
@@ -294,8 +294,8 @@ freestruct_in_apl(ARGS_FREESTRUCT) {
        dns_rdata_in_apl_t *apl = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(apl->common.rdtype == 42);
-       REQUIRE(apl->common.rdclass == 1);
+       REQUIRE(apl->common.rdtype == dns_rdatatype_apl);
+       REQUIRE(apl->common.rdclass == dns_rdataclass_in);
 
        if (apl->mctx == NULL)
                return;
@@ -309,8 +309,8 @@ dns_rdata_apl_first(dns_rdata_in_apl_t *apl) {
        isc_uint32_t length;
 
        REQUIRE(apl != NULL);
-       REQUIRE(apl->common.rdtype == 42);
-       REQUIRE(apl->common.rdclass == 1);
+       REQUIRE(apl->common.rdtype == dns_rdatatype_apl);
+       REQUIRE(apl->common.rdclass == dns_rdataclass_in);
        REQUIRE(apl->apl != NULL || apl->apl_len == 0);
 
        /*
@@ -335,8 +335,8 @@ dns_rdata_apl_next(dns_rdata_in_apl_t *apl) {
        isc_uint32_t length;
 
        REQUIRE(apl != NULL);
-       REQUIRE(apl->common.rdtype == 42);
-       REQUIRE(apl->common.rdclass == 1);
+       REQUIRE(apl->common.rdtype == dns_rdatatype_apl);
+       REQUIRE(apl->common.rdclass == dns_rdataclass_in);
        REQUIRE(apl->apl != NULL || apl->apl_len == 0);
 
        /*
@@ -367,8 +367,8 @@ dns_rdata_apl_current(dns_rdata_in_apl_t *apl, dns_rdata_apl_ent_t *ent) {
        isc_uint32_t length;
 
        REQUIRE(apl != NULL);
-       REQUIRE(apl->common.rdtype == 42);
-       REQUIRE(apl->common.rdclass == 1);
+       REQUIRE(apl->common.rdtype == dns_rdatatype_apl);
+       REQUIRE(apl->common.rdclass == dns_rdataclass_in);
        REQUIRE(ent != NULL);
        REQUIRE(apl->apl != NULL || apl->apl_len == 0);
        REQUIRE(apl->offset <= apl->apl_len);
@@ -401,8 +401,8 @@ dns_rdata_apl_current(dns_rdata_in_apl_t *apl, dns_rdata_apl_ent_t *ent) {
 
 static inline isc_result_t
 additionaldata_in_apl(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 42);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_apl);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        (void)add;
        (void)arg;
@@ -414,8 +414,8 @@ static inline isc_result_t
 digest_in_apl(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 42);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_apl);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -425,8 +425,8 @@ digest_in_apl(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_in_apl(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 42);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_apl);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(name);
        UNUSED(type);
@@ -440,8 +440,8 @@ checkowner_in_apl(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_in_apl(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 42);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_apl);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(owner);
index 7575da0d193035e00f46bd9989e20f0ae0d48761..144e76ac2e8de42340f6cf642e7763df14c489f6 100644 (file)
@@ -26,8 +26,8 @@
 static inline isc_result_t
 fromtext_in_dhcid(ARGS_FROMTEXT) {
 
-       REQUIRE(type == 49);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_dhcid);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -44,8 +44,8 @@ totext_in_dhcid(ARGS_TOTEXT) {
        char buf[sizeof(" ; 64000 255 64000")];
        size_t n;
 
-       REQUIRE(rdata->type == 49);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_dhcid);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &sr);
@@ -74,8 +74,8 @@ static inline isc_result_t
 fromwire_in_dhcid(ARGS_FROMWIRE) {
        isc_region_t sr;
 
-       REQUIRE(type == 49);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_dhcid);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -94,8 +94,8 @@ static inline isc_result_t
 towire_in_dhcid(ARGS_TOWIRE) {
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 49);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_dhcid);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -111,8 +111,8 @@ compare_in_dhcid(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 49);
-       REQUIRE(rdata1->rdclass == 1);
+       REQUIRE(rdata1->type == dns_rdatatype_dhcid);
+       REQUIRE(rdata1->rdclass == dns_rdataclass_in);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -125,8 +125,8 @@ static inline isc_result_t
 fromstruct_in_dhcid(ARGS_FROMSTRUCT) {
        dns_rdata_in_dhcid_t *dhcid = source;
 
-       REQUIRE(type == 49);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_dhcid);
+       REQUIRE(rdclass == dns_rdataclass_in);
        REQUIRE(source != NULL);
        REQUIRE(dhcid->common.rdtype == type);
        REQUIRE(dhcid->common.rdclass == rdclass);
@@ -143,8 +143,8 @@ tostruct_in_dhcid(ARGS_TOSTRUCT) {
        dns_rdata_in_dhcid_t *dhcid = target;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 49);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_dhcid);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -167,8 +167,8 @@ freestruct_in_dhcid(ARGS_FREESTRUCT) {
        dns_rdata_in_dhcid_t *dhcid = source;
 
        REQUIRE(dhcid != NULL);
-       REQUIRE(dhcid->common.rdtype == 49);
-       REQUIRE(dhcid->common.rdclass == 1);
+       REQUIRE(dhcid->common.rdtype == dns_rdatatype_dhcid);
+       REQUIRE(dhcid->common.rdclass == dns_rdataclass_in);
 
        if (dhcid->mctx == NULL)
                return;
@@ -180,8 +180,8 @@ freestruct_in_dhcid(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_in_dhcid(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 49);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_dhcid);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -194,8 +194,8 @@ static inline isc_result_t
 digest_in_dhcid(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 49);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_dhcid);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -205,8 +205,8 @@ digest_in_dhcid(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_in_dhcid(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 49);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_dhcid);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(name);
        UNUSED(type);
@@ -219,8 +219,8 @@ checkowner_in_dhcid(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_in_dhcid(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 49);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_dhcid);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(owner);
index fbe3b71deaa08d449ce6350d571609d6f1ded102..75ee8c9ca4ee1bf2588985f73c4aee24f1146e8f 100644 (file)
@@ -32,8 +32,8 @@ fromtext_in_kx(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
 
-       REQUIRE(type == 36);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_kx);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -63,8 +63,8 @@ totext_in_kx(ARGS_TOTEXT) {
        char buf[sizeof("64000")];
        unsigned short num;
 
-       REQUIRE(rdata->type == 36);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_kx);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -88,8 +88,8 @@ fromwire_in_kx(ARGS_FROMWIRE) {
        dns_name_t name;
        isc_region_t sregion;
 
-       REQUIRE(type == 36);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_kx);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -112,8 +112,8 @@ towire_in_kx(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 36);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_kx);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -137,8 +137,8 @@ compare_in_kx(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 36);
-       REQUIRE(rdata1->rdclass == 1);
+       REQUIRE(rdata1->type == dns_rdatatype_kx);
+       REQUIRE(rdata1->rdclass == dns_rdataclass_in);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -166,8 +166,8 @@ fromstruct_in_kx(ARGS_FROMSTRUCT) {
        dns_rdata_in_kx_t *kx = source;
        isc_region_t region;
 
-       REQUIRE(type == 36);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_kx);
+       REQUIRE(rdclass == dns_rdataclass_in);
        REQUIRE(source != NULL);
        REQUIRE(kx->common.rdtype == type);
        REQUIRE(kx->common.rdclass == rdclass);
@@ -186,8 +186,8 @@ tostruct_in_kx(ARGS_TOSTRUCT) {
        dns_rdata_in_kx_t *kx = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 36);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_kx);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -213,8 +213,8 @@ freestruct_in_kx(ARGS_FREESTRUCT) {
        dns_rdata_in_kx_t *kx = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(kx->common.rdclass == 1);
-       REQUIRE(kx->common.rdtype == 36);
+       REQUIRE(kx->common.rdclass == dns_rdataclass_in);
+       REQUIRE(kx->common.rdtype == dns_rdatatype_kx);
 
        if (kx->mctx == NULL)
                return;
@@ -229,8 +229,8 @@ additionaldata_in_kx(ARGS_ADDLDATA) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 36);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_kx);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        dns_name_init(&name, offsets);
        dns_rdata_toregion(rdata, &region);
@@ -245,8 +245,8 @@ digest_in_kx(ARGS_DIGEST) {
        isc_region_t r1, r2;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 36);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_kx);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        dns_rdata_toregion(rdata, &r1);
        r2 = r1;
@@ -261,8 +261,8 @@ digest_in_kx(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_in_kx(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 36);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_kx);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(name);
        UNUSED(type);
@@ -275,8 +275,8 @@ checkowner_in_kx(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_in_kx(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 36);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_kx);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(owner);
index 78df645a2a1fd09ebcdad5b927e5bc66124b7642..782283783501449fe3632cd0b878a770ec7140e3 100644 (file)
@@ -32,8 +32,8 @@ fromtext_in_nsap_ptr(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
 
-       REQUIRE(type == 23);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_nsap_ptr);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -56,8 +56,8 @@ totext_in_nsap_ptr(ARGS_TOTEXT) {
        dns_name_t prefix;
        isc_boolean_t sub;
 
-       REQUIRE(rdata->type == 23);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_nsap_ptr);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -75,8 +75,8 @@ static inline isc_result_t
 fromwire_in_nsap_ptr(ARGS_FROMWIRE) {
        dns_name_t name;
 
-       REQUIRE(type == 23);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_nsap_ptr);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -93,8 +93,8 @@ towire_in_nsap_ptr(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 23);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_nsap_ptr);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -114,8 +114,8 @@ compare_in_nsap_ptr(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 23);
-       REQUIRE(rdata1->rdclass == 1);
+       REQUIRE(rdata1->type == dns_rdatatype_nsap_ptr);
+       REQUIRE(rdata1->rdclass == dns_rdataclass_in);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -136,8 +136,8 @@ fromstruct_in_nsap_ptr(ARGS_FROMSTRUCT) {
        dns_rdata_in_nsap_ptr_t *nsap_ptr = source;
        isc_region_t region;
 
-       REQUIRE(type == 23);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_nsap_ptr);
+       REQUIRE(rdclass == dns_rdataclass_in);
        REQUIRE(source != NULL);
        REQUIRE(nsap_ptr->common.rdtype == type);
        REQUIRE(nsap_ptr->common.rdclass == rdclass);
@@ -155,8 +155,8 @@ tostruct_in_nsap_ptr(ARGS_TOSTRUCT) {
        dns_rdata_in_nsap_ptr_t *nsap_ptr = target;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 23);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_nsap_ptr);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -178,8 +178,8 @@ freestruct_in_nsap_ptr(ARGS_FREESTRUCT) {
        dns_rdata_in_nsap_ptr_t *nsap_ptr = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(nsap_ptr->common.rdclass == 1);
-       REQUIRE(nsap_ptr->common.rdtype == 23);
+       REQUIRE(nsap_ptr->common.rdclass == dns_rdataclass_in);
+       REQUIRE(nsap_ptr->common.rdtype == dns_rdatatype_nsap_ptr);
 
        if (nsap_ptr->mctx == NULL)
                return;
@@ -190,8 +190,8 @@ freestruct_in_nsap_ptr(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_in_nsap_ptr(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 23);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_nsap_ptr);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -205,8 +205,8 @@ digest_in_nsap_ptr(ARGS_DIGEST) {
        isc_region_t r;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 23);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_nsap_ptr);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        dns_rdata_toregion(rdata, &r);
        dns_name_init(&name, NULL);
@@ -218,8 +218,8 @@ digest_in_nsap_ptr(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_in_nsap_ptr(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 23);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_nsap_ptr);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(name);
        UNUSED(type);
@@ -232,8 +232,8 @@ checkowner_in_nsap_ptr(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_in_nsap_ptr(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 23);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_nsap_ptr);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(owner);
index d26c4cd5863152bd14194540d0843377177ee4bc..d0e460e85fc82aeba7c12defbec6acdc84132e72 100644 (file)
@@ -35,8 +35,8 @@ fromtext_in_nsap(ARGS_FROMTEXT) {
        int digits = 0;
        unsigned char c = 0;
 
-       REQUIRE(type == 22);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_nsap);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(origin);
@@ -80,8 +80,8 @@ totext_in_nsap(ARGS_TOTEXT) {
        isc_region_t region;
        char buf[sizeof("xx")];
 
-       REQUIRE(rdata->type == 22);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_nsap);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        UNUSED(tctx);
@@ -100,8 +100,8 @@ static inline isc_result_t
 fromwire_in_nsap(ARGS_FROMWIRE) {
        isc_region_t region;
 
-       REQUIRE(type == 22);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_nsap);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(dctx);
@@ -119,8 +119,8 @@ fromwire_in_nsap(ARGS_FROMWIRE) {
 
 static inline isc_result_t
 towire_in_nsap(ARGS_TOWIRE) {
-       REQUIRE(rdata->type == 22);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_nsap);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        UNUSED(cctx);
@@ -135,8 +135,8 @@ compare_in_nsap(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 22);
-       REQUIRE(rdata1->rdclass == 1);
+       REQUIRE(rdata1->type == dns_rdatatype_nsap);
+       REQUIRE(rdata1->rdclass == dns_rdataclass_in);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -149,8 +149,8 @@ static inline isc_result_t
 fromstruct_in_nsap(ARGS_FROMSTRUCT) {
        dns_rdata_in_nsap_t *nsap = source;
 
-       REQUIRE(type == 22);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_nsap);
+       REQUIRE(rdclass == dns_rdataclass_in);
        REQUIRE(source != NULL);
        REQUIRE(nsap->common.rdtype == type);
        REQUIRE(nsap->common.rdclass == rdclass);
@@ -167,8 +167,8 @@ tostruct_in_nsap(ARGS_TOSTRUCT) {
        dns_rdata_in_nsap_t *nsap = target;
        isc_region_t r;
 
-       REQUIRE(rdata->type == 22);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_nsap);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -191,8 +191,8 @@ freestruct_in_nsap(ARGS_FREESTRUCT) {
        dns_rdata_in_nsap_t *nsap = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(nsap->common.rdclass == 1);
-       REQUIRE(nsap->common.rdtype == 22);
+       REQUIRE(nsap->common.rdclass == dns_rdataclass_in);
+       REQUIRE(nsap->common.rdtype == dns_rdatatype_nsap);
 
        if (nsap->mctx == NULL)
                return;
@@ -204,8 +204,8 @@ freestruct_in_nsap(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_in_nsap(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 22);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_nsap);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -218,8 +218,8 @@ static inline isc_result_t
 digest_in_nsap(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 22);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_nsap);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -229,8 +229,8 @@ digest_in_nsap(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_in_nsap(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 22);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_nsap);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(name);
        UNUSED(type);
@@ -243,8 +243,8 @@ checkowner_in_nsap(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_in_nsap(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 22);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_nsap);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(owner);
index a4111ad5bb76e75cff71771bd8c2828cc813f307..8ca817dddfabb1dc264bca0dfd05497401d2fb83 100644 (file)
@@ -32,8 +32,8 @@ fromtext_in_px(ARGS_FROMTEXT) {
        dns_name_t name;
        isc_buffer_t buffer;
 
-       REQUIRE(type == 26);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_px);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -79,8 +79,8 @@ totext_in_px(ARGS_TOTEXT) {
        char buf[sizeof("64000")];
        unsigned short num;
 
-       REQUIRE(rdata->type == 26);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_px);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -118,8 +118,8 @@ fromwire_in_px(ARGS_FROMWIRE) {
        dns_name_t name;
        isc_region_t sregion;
 
-       REQUIRE(type == 26);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_px);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -154,8 +154,8 @@ towire_in_px(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 26);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_px);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -192,8 +192,8 @@ compare_in_px(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 26);
-       REQUIRE(rdata1->rdclass == 1);
+       REQUIRE(rdata1->type == dns_rdatatype_px);
+       REQUIRE(rdata1->rdclass == dns_rdataclass_in);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -231,8 +231,8 @@ fromstruct_in_px(ARGS_FROMSTRUCT) {
        dns_rdata_in_px_t *px = source;
        isc_region_t region;
 
-       REQUIRE(type == 26);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_px);
+       REQUIRE(rdclass == dns_rdataclass_in);
        REQUIRE(source != NULL);
        REQUIRE(px->common.rdtype == type);
        REQUIRE(px->common.rdclass == rdclass);
@@ -254,8 +254,8 @@ tostruct_in_px(ARGS_TOSTRUCT) {
        isc_region_t region;
        isc_result_t result;
 
-       REQUIRE(rdata->type == 26);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_px);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -293,8 +293,8 @@ freestruct_in_px(ARGS_FREESTRUCT) {
        dns_rdata_in_px_t *px = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(px->common.rdclass == 1);
-       REQUIRE(px->common.rdtype == 26);
+       REQUIRE(px->common.rdclass == dns_rdataclass_in);
+       REQUIRE(px->common.rdtype == dns_rdatatype_px);
 
        if (px->mctx == NULL)
                return;
@@ -306,8 +306,8 @@ freestruct_in_px(ARGS_FREESTRUCT) {
 
 static inline isc_result_t
 additionaldata_in_px(ARGS_ADDLDATA) {
-       REQUIRE(rdata->type == 26);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_px);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(add);
@@ -322,8 +322,8 @@ digest_in_px(ARGS_DIGEST) {
        dns_name_t name;
        isc_result_t result;
 
-       REQUIRE(rdata->type == 26);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_px);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        dns_rdata_toregion(rdata, &r1);
        r2 = r1;
@@ -347,8 +347,8 @@ digest_in_px(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_in_px(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 26);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_px);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(name);
        UNUSED(type);
@@ -361,8 +361,8 @@ checkowner_in_px(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_in_px(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 26);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_px);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(owner);
index ea4f3edbcdefb1046224427b8f16bd635c650c67..f1578798248a46bfbf51d3dee1390d708e3cb52a 100644 (file)
@@ -33,8 +33,8 @@ fromtext_in_srv(ARGS_FROMTEXT) {
        isc_buffer_t buffer;
        isc_boolean_t ok;
 
-       REQUIRE(type == 33);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_srv);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -95,8 +95,8 @@ totext_in_srv(ARGS_TOTEXT) {
        char buf[sizeof("64000")];
        unsigned short num;
 
-       REQUIRE(rdata->type == 33);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_srv);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        dns_name_init(&name, NULL);
@@ -143,8 +143,8 @@ fromwire_in_srv(ARGS_FROMWIRE) {
        dns_name_t name;
        isc_region_t sr;
 
-       REQUIRE(type == 33);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_srv);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -174,7 +174,7 @@ towire_in_srv(ARGS_TOWIRE) {
        dns_offsets_t offsets;
        isc_region_t sr;
 
-       REQUIRE(rdata->type == 33);
+       REQUIRE(rdata->type == dns_rdatatype_srv);
        REQUIRE(rdata->length != 0);
 
        dns_compress_setmethods(cctx, DNS_COMPRESS_NONE);
@@ -203,8 +203,8 @@ compare_in_srv(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 33);
-       REQUIRE(rdata1->rdclass == 1);
+       REQUIRE(rdata1->type == dns_rdatatype_srv);
+       REQUIRE(rdata1->rdclass == dns_rdataclass_in);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -238,8 +238,8 @@ fromstruct_in_srv(ARGS_FROMSTRUCT) {
        dns_rdata_in_srv_t *srv = source;
        isc_region_t region;
 
-       REQUIRE(type == 33);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_srv);
+       REQUIRE(rdclass == dns_rdataclass_in);
        REQUIRE(source != NULL);
        REQUIRE(srv->common.rdtype == type);
        REQUIRE(srv->common.rdclass == rdclass);
@@ -260,8 +260,8 @@ tostruct_in_srv(ARGS_TOSTRUCT) {
        dns_rdata_in_srv_t *srv = target;
        dns_name_t name;
 
-       REQUIRE(rdata->rdclass == 1);
-       REQUIRE(rdata->type == 33);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
+       REQUIRE(rdata->type == dns_rdatatype_srv);
        REQUIRE(target != NULL);
        REQUIRE(rdata->length != 0);
 
@@ -289,8 +289,8 @@ freestruct_in_srv(ARGS_FREESTRUCT) {
        dns_rdata_in_srv_t *srv = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(srv->common.rdclass == 1);
-       REQUIRE(srv->common.rdtype == 33);
+       REQUIRE(srv->common.rdclass == dns_rdataclass_in);
+       REQUIRE(srv->common.rdtype == dns_rdatatype_srv);
 
        if (srv->mctx == NULL)
                return;
@@ -305,8 +305,8 @@ additionaldata_in_srv(ARGS_ADDLDATA) {
        dns_offsets_t offsets;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 33);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_srv);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        dns_name_init(&name, offsets);
        dns_rdata_toregion(rdata, &region);
@@ -321,8 +321,8 @@ digest_in_srv(ARGS_DIGEST) {
        isc_region_t r1, r2;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 33);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_srv);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        dns_rdata_toregion(rdata, &r1);
        r2 = r1;
@@ -337,8 +337,8 @@ digest_in_srv(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_in_srv(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 33);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_srv);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(name);
        UNUSED(type);
@@ -353,8 +353,8 @@ checknames_in_srv(ARGS_CHECKNAMES) {
        isc_region_t region;
        dns_name_t name;
 
-       REQUIRE(rdata->type == 33);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_srv);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(owner);
 
index 4587c813afab1e629579d3240a736def07848af4..b8aac0ab0d005b7b01acac95206a805a49727248 100644 (file)
@@ -77,8 +77,8 @@ fromtext_in_wks(ARGS_FROMTEXT) {
        char service[32];
        int i;
 
-       REQUIRE(type == 11);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_wks);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(origin);
@@ -171,8 +171,8 @@ totext_in_wks(ARGS_TOTEXT) {
 
        UNUSED(tctx);
 
-       REQUIRE(rdata->type == 11);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_wks);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length >= 5);
 
        dns_rdata_toregion(rdata, &sr);
@@ -204,8 +204,8 @@ fromwire_in_wks(ARGS_FROMWIRE) {
        isc_region_t sr;
        isc_region_t tr;
 
-       REQUIRE(type == 11);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_wks);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(dctx);
@@ -235,8 +235,8 @@ towire_in_wks(ARGS_TOWIRE) {
 
        UNUSED(cctx);
 
-       REQUIRE(rdata->type == 11);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_wks);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        dns_rdata_toregion(rdata, &sr);
@@ -250,8 +250,8 @@ compare_in_wks(ARGS_COMPARE) {
 
        REQUIRE(rdata1->type == rdata2->type);
        REQUIRE(rdata1->rdclass == rdata2->rdclass);
-       REQUIRE(rdata1->type == 11);
-       REQUIRE(rdata1->rdclass == 1);
+       REQUIRE(rdata1->type == dns_rdatatype_wks);
+       REQUIRE(rdata1->rdclass == dns_rdataclass_in);
        REQUIRE(rdata1->length != 0);
        REQUIRE(rdata2->length != 0);
 
@@ -265,8 +265,8 @@ fromstruct_in_wks(ARGS_FROMSTRUCT) {
        dns_rdata_in_wks_t *wks = source;
        isc_uint32_t a;
 
-       REQUIRE(type == 11);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_wks);
+       REQUIRE(rdclass == dns_rdataclass_in);
        REQUIRE(source != NULL);
        REQUIRE(wks->common.rdtype == type);
        REQUIRE(wks->common.rdclass == rdclass);
@@ -288,8 +288,8 @@ tostruct_in_wks(ARGS_TOSTRUCT) {
        isc_uint32_t n;
        isc_region_t region;
 
-       REQUIRE(rdata->type == 11);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_wks);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
        REQUIRE(rdata->length != 0);
 
        wks->common.rdclass = rdata->rdclass;
@@ -315,8 +315,8 @@ freestruct_in_wks(ARGS_FREESTRUCT) {
        dns_rdata_in_wks_t *wks = source;
 
        REQUIRE(source != NULL);
-       REQUIRE(wks->common.rdtype == 11);
-       REQUIRE(wks->common.rdclass == 1);
+       REQUIRE(wks->common.rdtype == dns_rdatatype_wks);
+       REQUIRE(wks->common.rdclass == dns_rdataclass_in);
 
        if (wks->mctx == NULL)
                return;
@@ -332,8 +332,8 @@ additionaldata_in_wks(ARGS_ADDLDATA) {
        UNUSED(add);
        UNUSED(arg);
 
-       REQUIRE(rdata->type == 11);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_wks);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        return (ISC_R_SUCCESS);
 }
@@ -342,8 +342,8 @@ static inline isc_result_t
 digest_in_wks(ARGS_DIGEST) {
        isc_region_t r;
 
-       REQUIRE(rdata->type == 11);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_wks);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        dns_rdata_toregion(rdata, &r);
 
@@ -353,8 +353,8 @@ digest_in_wks(ARGS_DIGEST) {
 static inline isc_boolean_t
 checkowner_in_wks(ARGS_CHECKOWNER) {
 
-       REQUIRE(type == 11);
-       REQUIRE(rdclass == 1);
+       REQUIRE(type == dns_rdatatype_wks);
+       REQUIRE(rdclass == dns_rdataclass_in);
 
        UNUSED(type);
        UNUSED(rdclass);
@@ -365,8 +365,8 @@ checkowner_in_wks(ARGS_CHECKOWNER) {
 static inline isc_boolean_t
 checknames_in_wks(ARGS_CHECKNAMES) {
 
-       REQUIRE(rdata->type == 11);
-       REQUIRE(rdata->rdclass == 1);
+       REQUIRE(rdata->type == dns_rdatatype_wks);
+       REQUIRE(rdata->rdclass == dns_rdataclass_in);
 
        UNUSED(rdata);
        UNUSED(owner);