unsigned int options, isc_buffer_t *target, \
dns_rdatacallbacks_t *callbacks
-#define ARGS_TOTEXT dns_rdata_t *rdata, dns_rdata_textctx_t *tctx, \
- isc_buffer_t *target
+#define CALL_FROMTEXT rdclass, type, lexer, origin, options, target, callbacks
-#define ARGS_FROMWIRE int rdclass, dns_rdatatype_t type, \
- isc_buffer_t *source, dns_decompress_t *dctx, \
- unsigned int options, isc_buffer_t *target
+#define ARGS_TOTEXT \
+ dns_rdata_t *rdata, dns_rdata_textctx_t *tctx, isc_buffer_t *target
-#define ARGS_TOWIRE dns_rdata_t *rdata, dns_compress_t *cctx, \
- isc_buffer_t *target
+#define CALL_TOTEXT rdata, tctx, target
-#define ARGS_COMPARE const dns_rdata_t *rdata1, const dns_rdata_t *rdata2
+#define ARGS_FROMWIRE \
+ int rdclass, dns_rdatatype_t type, isc_buffer_t *source, \
+ dns_decompress_t *dctx, unsigned int options, \
+ isc_buffer_t *target
-#define ARGS_FROMSTRUCT int rdclass, dns_rdatatype_t type, \
- void *source, isc_buffer_t *target
+#define CALL_FROMWIRE rdclass, type, source, dctx, options, target
-#define ARGS_TOSTRUCT const dns_rdata_t *rdata, void *target, isc_mem_t *mctx
+#define ARGS_TOWIRE \
+ dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target
+
+#define CALL_TOWIRE rdata, cctx, target
+
+#define ARGS_COMPARE const dns_rdata_t *rdata1, const dns_rdata_t *rdata2
+
+#define CALL_COMPARE rdata1, rdata2
+
+#define ARGS_FROMSTRUCT \
+ int rdclass, dns_rdatatype_t type, void *source, isc_buffer_t *target
+
+#define CALL_FROMSTRUCT rdclass, type, source, target
+
+#define ARGS_TOSTRUCT const dns_rdata_t *rdata, void *target, isc_mem_t *mctx
+
+#define CALL_TOSTRUCT rdata, target, mctx
#define ARGS_FREESTRUCT void *source
-#define ARGS_ADDLDATA dns_rdata_t *rdata, dns_additionaldatafunc_t add, \
- void *arg
+#define CALL_FREESTRUCT source
+
+#define ARGS_ADDLDATA \
+ dns_rdata_t *rdata, dns_additionaldatafunc_t add, void *arg
+
+#define CALL_ADDLDATA rdata, add, arg
+
+#define ARGS_DIGEST dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg
+
+#define CALL_DIGEST rdata, digest, arg
-#define ARGS_DIGEST dns_rdata_t *rdata, dns_digestfunc_t digest, void *arg
+#define ARGS_CHECKOWNER \
+ dns_name_t *name, dns_rdataclass_t rdclass, dns_rdatatype_t type, \
+ bool wildcard
-#define ARGS_CHECKOWNER dns_name_t *name, dns_rdataclass_t rdclass, \
- dns_rdatatype_t type, bool wildcard
+#define CALL_CHECKOWNER name, rdclass, type, wildcard
-#define ARGS_CHECKNAMES dns_rdata_t *rdata, dns_name_t *owner, dns_name_t *bad
+#define ARGS_CHECKNAMES \
+ dns_rdata_t *rdata, const dns_name_t *owner, dns_name_t *bad
+#define CALL_CHECKNAMES rdata, owner, bad
/*%
* Context structure for the totext_ functions.
REQUIRE(type == dns_rdatatype_avc);
- UNUSED(type);
- UNUSED(rdclass);
- UNUSED(origin);
- UNUSED(options);
- UNUSED(callbacks);
-
- return (generic_fromtext_txt(rdclass, type, lexer, origin, options,
- target, callbacks));
+ return (generic_fromtext_txt(CALL_FROMTEXT));
}
static inline isc_result_t
totext_avc(ARGS_TOTEXT) {
-
- UNUSED(tctx);
-
+ REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_avc);
- return (generic_totext_txt(rdata, tctx, target));
+ return (generic_totext_txt(CALL_TOTEXT));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_avc);
- UNUSED(type);
- UNUSED(dctx);
- UNUSED(rdclass);
- UNUSED(options);
-
- return (generic_fromwire_txt(rdclass, type, source, dctx, options,
- target));
+ return (generic_fromwire_txt(CALL_FROMWIRE));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_avc);
- return (generic_fromstruct_txt(rdclass, type, source, target));
+ return (generic_fromstruct_txt(CALL_FROMSTRUCT));
}
static inline isc_result_t
avc->common.rdtype = rdata->type;
ISC_LINK_INIT(&avc->common, link);
- return (generic_tostruct_txt(rdata, target, mctx));
+ return (generic_tostruct_txt(CALL_TOSTRUCT));
}
static inline void
REQUIRE(type == dns_rdatatype_cdnskey);
- return (generic_fromtext_key(rdclass, type, lexer, origin,
- options, target, callbacks));
+ return (generic_fromtext_key(CALL_FROMTEXT));
}
static inline isc_result_t
REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_cdnskey);
- return (generic_totext_key(rdata, tctx, target));
+ return (generic_totext_key(CALL_TOTEXT));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_cdnskey);
- return (generic_fromwire_key(rdclass, type, source, dctx,
- options, target));
+ return (generic_fromwire_key(CALL_FROMWIRE));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_cdnskey);
- return (generic_fromstruct_key(rdclass, type, source, target));
+ return (generic_fromstruct_key(CALL_FROMSTRUCT));
}
static inline isc_result_t
dnskey->common.rdtype = rdata->type;
ISC_LINK_INIT(&dnskey->common, link);
- return (generic_tostruct_key(rdata, target, mctx));
+ return (generic_tostruct_key(CALL_TOSTRUCT));
}
static inline void
REQUIRE(type == dns_rdatatype_cds);
- return (generic_fromtext_ds(rdclass, type, lexer, origin, options,
- target, callbacks));
+ return (generic_fromtext_ds(CALL_FROMTEXT));
}
static inline isc_result_t
totext_cds(ARGS_TOTEXT) {
-
+ REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_cds);
- return (generic_totext_ds(rdata, tctx, target));
+ return (generic_totext_ds(CALL_TOTEXT));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_cds);
- return (generic_fromwire_ds(rdclass, type, source, dctx, options,
- target));
+ return (generic_fromwire_ds(CALL_FROMWIRE));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_cds);
- return (generic_fromstruct_ds(rdclass, type, source, target));
+ return (generic_fromstruct_ds(CALL_FROMSTRUCT));
}
static inline isc_result_t
cds->common.rdtype = rdata->type;
ISC_LINK_INIT(&cds->common, link);
- return (generic_tostruct_ds(rdata, target, mctx));
+ return (generic_tostruct_ds(CALL_TOSTRUCT));
}
static inline void
REQUIRE(type == dns_rdatatype_dlv);
- return (generic_fromtext_ds(rdclass, type, lexer, origin, options,
- target, callbacks));
+ return (generic_fromtext_ds(CALL_FROMTEXT));
}
static inline isc_result_t
totext_dlv(ARGS_TOTEXT) {
-
+ REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_dlv);
- return (generic_totext_ds(rdata, tctx, target));
+ return (generic_totext_ds(CALL_TOTEXT));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_dlv);
- return (generic_fromwire_ds(rdclass, type, source, dctx, options,
- target));
+ return (generic_fromwire_ds(CALL_FROMWIRE));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_dlv);
- return (generic_fromstruct_ds(rdclass, type, source, target));
+ return (generic_fromstruct_ds(CALL_FROMSTRUCT));
}
static inline isc_result_t
dlv->common.rdtype = rdata->type;
ISC_LINK_INIT(&dlv->common, link);
- return (generic_tostruct_ds(rdata, target, mctx));
+ return (generic_tostruct_ds(CALL_TOSTRUCT));
}
static inline void
REQUIRE(type == dns_rdatatype_dnskey);
- return (generic_fromtext_key(rdclass, type, lexer, origin,
- options, target, callbacks));
+ return (generic_fromtext_key(CALL_FROMTEXT));
}
static inline isc_result_t
REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_dnskey);
- return (generic_totext_key(rdata, tctx, target));
+ return (generic_totext_key(CALL_TOTEXT));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_dnskey);
- return (generic_fromwire_key(rdclass, type, source, dctx,
- options, target));
+ return (generic_fromwire_key(CALL_FROMWIRE));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_dnskey);
- return (generic_fromstruct_key(rdclass, type, source, target));
+ return (generic_fromstruct_key(CALL_FROMSTRUCT));
}
static inline isc_result_t
dnskey->common.rdtype = rdata->type;
ISC_LINK_INIT(&dnskey->common, link);
- return (generic_tostruct_key(rdata, target, mctx));
+ return (generic_tostruct_key(CALL_TOSTRUCT));
}
static inline void
REQUIRE(type == dns_rdatatype_ds);
- return (generic_fromtext_ds(rdclass, type, lexer, origin, options,
- target, callbacks));
+ return (generic_fromtext_ds(CALL_FROMTEXT));
}
static inline isc_result_t
static inline isc_result_t
totext_ds(ARGS_TOTEXT) {
-
+ REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_ds);
- return (generic_totext_ds(rdata, tctx, target));
+ return (generic_totext_ds(CALL_TOTEXT));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_ds);
- return (generic_fromwire_ds(rdclass, type, source, dctx, options,
- target));
+ return (generic_fromwire_ds(CALL_FROMWIRE));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_ds);
- return (generic_fromstruct_ds(rdclass, type, source, target));
+ return (generic_fromstruct_ds(CALL_FROMSTRUCT));
}
static inline isc_result_t
ds->common.rdtype = rdata->type;
ISC_LINK_INIT(&ds->common, link);
- return (generic_tostruct_ds(rdata, target, mctx));
+ return (generic_tostruct_ds(CALL_TOSTRUCT));
}
static inline void
REQUIRE(type == dns_rdatatype_key);
- return (generic_fromtext_key(rdclass, type, lexer, origin,
- options, target, callbacks));
+ return (generic_fromtext_key(CALL_FROMTEXT));
}
static inline isc_result_t
REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_key);
- return (generic_totext_key(rdata, tctx, target));
+ return (generic_totext_key(CALL_TOTEXT));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_key);
- return (generic_fromwire_key(rdclass, type, source, dctx,
- options, target));
+ return (generic_fromwire_key(CALL_FROMWIRE));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_key);
- return (generic_fromstruct_key(rdclass, type, source, target));
+ return (generic_fromstruct_key(CALL_FROMSTRUCT));
}
static inline isc_result_t
key->common.rdtype = rdata->type;
ISC_LINK_INIT(&key->common, link);
- return (generic_tostruct_key(rdata, target, mctx));
+ return (generic_tostruct_key(CALL_TOSTRUCT));
}
static inline void
REQUIRE(type == dns_rdatatype_ninfo);
- UNUSED(type);
- UNUSED(rdclass);
- UNUSED(origin);
- UNUSED(options);
- UNUSED(callbacks);
-
- return (generic_fromtext_txt(rdclass, type, lexer, origin, options,
- target, callbacks));
+ return (generic_fromtext_txt(CALL_FROMTEXT));
}
static inline isc_result_t
totext_ninfo(ARGS_TOTEXT) {
-
- UNUSED(tctx);
-
+ REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_ninfo);
- return (generic_totext_txt(rdata, tctx, target));
+ return (generic_totext_txt(CALL_TOTEXT));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_ninfo);
- UNUSED(type);
- UNUSED(dctx);
- UNUSED(rdclass);
- UNUSED(options);
-
- return (generic_fromwire_txt(rdclass, type, source, dctx, options,
- target));
+ return (generic_fromwire_txt(CALL_FROMWIRE));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_ninfo);
- return (generic_fromstruct_txt(rdclass, type, source, target));
+ return (generic_fromstruct_txt(CALL_FROMSTRUCT));
}
static inline isc_result_t
ninfo->common.rdtype = rdata->type;
ISC_LINK_INIT(&ninfo->common, link);
- return (generic_tostruct_txt(rdata, target, mctx));
+ return (generic_tostruct_txt(CALL_TOSTRUCT));
}
static inline void
REQUIRE(type == dns_rdatatype_rkey);
- return (generic_fromtext_key(rdclass, type, lexer, origin,
- options, target, callbacks));
+ return (generic_fromtext_key(CALL_FROMTEXT));
}
static inline isc_result_t
REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_rkey);
- return (generic_totext_key(rdata, tctx, target));
+ return (generic_totext_key(CALL_TOTEXT));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_rkey);
- return (generic_fromwire_key(rdclass, type, source, dctx,
- options, target));
+ return (generic_fromwire_key(CALL_FROMWIRE));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_rkey);
- return (generic_fromstruct_key(rdclass, type, source, target));
+ return (generic_fromstruct_key(CALL_FROMSTRUCT));
}
static inline isc_result_t
rkey->common.rdtype = rdata->type;
ISC_LINK_INIT(&rkey->common, link);
- return (generic_tostruct_key(rdata, target, mctx));
+ return (generic_tostruct_key(CALL_TOSTRUCT));
}
static inline void
REQUIRE(type == dns_rdatatype_smimea);
- return (generic_fromtext_tlsa(rdclass, type, lexer, origin, options,
- target, callbacks));
+ return (generic_fromtext_tlsa(CALL_FROMTEXT));
}
static inline isc_result_t
totext_smimea(ARGS_TOTEXT) {
-
+ REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_smimea);
- return (generic_totext_tlsa(rdata, tctx, target));
+ return (generic_totext_tlsa(CALL_TOTEXT));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_smimea);
- return (generic_fromwire_tlsa(rdclass, type, source, dctx, options,
- target));
+ return (generic_fromwire_tlsa(CALL_FROMWIRE));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_smimea);
- return (generic_fromstruct_tlsa(rdclass, type, source, target));
+ return (generic_fromstruct_tlsa(CALL_FROMSTRUCT));
}
static inline isc_result_t
smimea->common.rdtype = rdata->type;
ISC_LINK_INIT(&smimea->common, link);
- return (generic_tostruct_tlsa(rdata, target, mctx));
+ return (generic_tostruct_tlsa(CALL_TOSTRUCT));
}
static inline void
REQUIRE(type == dns_rdatatype_spf);
- UNUSED(type);
- UNUSED(rdclass);
- UNUSED(origin);
- UNUSED(options);
- UNUSED(callbacks);
-
- return (generic_fromtext_txt(rdclass, type, lexer, origin, options,
- target, callbacks));
+ return (generic_fromtext_txt(CALL_FROMTEXT));
}
static inline isc_result_t
totext_spf(ARGS_TOTEXT) {
-
- UNUSED(tctx);
-
+ REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_spf);
- return (generic_totext_txt(rdata, tctx, target));
+ return (generic_totext_txt(CALL_TOTEXT));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_spf);
- UNUSED(type);
- UNUSED(dctx);
- UNUSED(rdclass);
- UNUSED(options);
-
- return (generic_fromwire_txt(rdclass, type, source, dctx, options,
- target));
+ return (generic_fromwire_txt(CALL_FROMWIRE));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_spf);
- return (generic_fromstruct_txt(rdclass, type, source, target));
+ return (generic_fromstruct_txt(CALL_FROMSTRUCT));
}
static inline isc_result_t
spf->common.rdtype = rdata->type;
ISC_LINK_INIT(&spf->common, link);
- return (generic_tostruct_txt(rdata, target, mctx));
+ return (generic_tostruct_txt(CALL_TOSTRUCT));
}
static inline void
REQUIRE(type == dns_rdatatype_ta);
- return (generic_fromtext_ds(rdclass, type, lexer, origin, options,
- target, callbacks));
+ return (generic_fromtext_ds(CALL_FROMTEXT));
}
static inline isc_result_t
REQUIRE(rdata->type == dns_rdatatype_ta);
- return (generic_totext_ds(rdata, tctx, target));
+ return (generic_totext_ds(CALL_TOTEXT));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_ta);
- return (generic_fromwire_ds(rdclass, type, source, dctx, options,
- target));
+ return (generic_fromwire_ds(CALL_FROMWIRE));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_ta);
- return (generic_fromstruct_ds(rdclass, type, source, target));
+ return (generic_fromstruct_ds(CALL_FROMSTRUCT));
}
static inline isc_result_t
ds->common.rdtype = rdata->type;
ISC_LINK_INIT(&ds->common, link);
- return (generic_tostruct_ds(rdata, target, mctx));
+ return (generic_tostruct_ds(CALL_TOSTRUCT));
}
static inline void
REQUIRE(type == dns_rdatatype_tlsa);
- return (generic_fromtext_tlsa(rdclass, type, lexer, origin, options,
- target, callbacks));
+ return (generic_fromtext_tlsa(CALL_FROMTEXT));
}
static inline isc_result_t
REQUIRE(rdata->type == dns_rdatatype_tlsa);
- return (generic_totext_tlsa(rdata, tctx, target));
+ return (generic_totext_tlsa(CALL_TOTEXT));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_tlsa);
- return (generic_fromwire_tlsa(rdclass, type, source, dctx, options,
- target));
+ return (generic_fromwire_tlsa(CALL_FROMWIRE));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_tlsa);
- return (generic_fromstruct_tlsa(rdclass, type, source, target));
+ return (generic_fromstruct_tlsa(CALL_FROMSTRUCT));
}
static inline isc_result_t
tlsa->common.rdtype = rdata->type;
ISC_LINK_INIT(&tlsa->common, link);
- return (generic_tostruct_tlsa(rdata, target, mctx));
+ return (generic_tostruct_tlsa(CALL_TOSTRUCT));
}
static inline void
REQUIRE(type == dns_rdatatype_txt);
- return (generic_fromtext_txt(rdclass, type, lexer, origin, options,
- target, callbacks));
+ return (generic_fromtext_txt(CALL_FROMTEXT));
}
static inline isc_result_t
totext_txt(ARGS_TOTEXT) {
-
+ REQUIRE(rdata != NULL);
REQUIRE(rdata->type == dns_rdatatype_txt);
- return (generic_totext_txt(rdata, tctx, target));
+ return (generic_totext_txt(CALL_TOTEXT));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_txt);
- return (generic_fromwire_txt(rdclass, type, source, dctx, options,
- target));
+ return (generic_fromwire_txt(CALL_FROMWIRE));
}
static inline isc_result_t
REQUIRE(type == dns_rdatatype_txt);
- return (generic_fromstruct_txt(rdclass, type, source, target));
+ return (generic_fromstruct_txt(CALL_FROMSTRUCT));
}
static inline isc_result_t
txt->common.rdtype = rdata->type;
ISC_LINK_INIT(&txt->common, link);
- return (generic_tostruct_txt(rdata, target, mctx));
+ return (generic_tostruct_txt(CALL_TOSTRUCT));
}
static inline void