Commit d981ca64 authored by Bob Halley's avatar Bob Halley
Browse files

class to rdclass; additional data support

parent 396e149f
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: gen.c,v 1.21 1999/07/03 20:55:16 halley Exp $ */
/* $Id: gen.c,v 1.22 1999/08/02 22:18:30 halley Exp $ */
#include <config.h>
......@@ -31,39 +31,39 @@
#include <unistd.h>
#define FROMTEXTDECL "dns_rdataclass_t class, dns_rdatatype_t type, isc_lex_t *lexer, dns_name_t *origin, isc_boolean_t downcase, isc_buffer_t *target"
#define FROMTEXTARGS "class, type, lexer, origin, downcase, target"
#define FROMTEXTCLASS "class"
#define FROMTEXTDECL "dns_rdataclass_t rdclass, dns_rdatatype_t type, isc_lex_t *lexer, dns_name_t *origin, isc_boolean_t downcase, isc_buffer_t *target"
#define FROMTEXTARGS "rdclass, type, lexer, origin, downcase, target"
#define FROMTEXTCLASS "rdclass"
#define FROMTEXTTYPE "type"
#define FROMTEXTDEF "use_default = ISC_TRUE"
#define TOTEXTDECL "dns_rdata_t *rdata, dns_rdata_textctx_t *tctx, isc_buffer_t *target"
#define TOTEXTARGS "rdata, tctx, target"
#define TOTEXTCLASS "rdata->class"
#define TOTEXTCLASS "rdata->rdclass"
#define TOTEXTTYPE "rdata->type"
#define TOTEXTDEF "use_default = ISC_TRUE"
#define FROMWIREDECL "dns_rdataclass_t class, dns_rdatatype_t type, isc_buffer_t *source, dns_decompress_t *dctx, isc_boolean_t downcase, isc_buffer_t *target"
#define FROMWIREARGS "class, type, source, dctx, downcase, target"
#define FROMWIRECLASS "class"
#define FROMWIREDECL "dns_rdataclass_t rdclass, dns_rdatatype_t type, isc_buffer_t *source, dns_decompress_t *dctx, isc_boolean_t downcase, isc_buffer_t *target"
#define FROMWIREARGS "rdclass, type, source, dctx, downcase, target"
#define FROMWIRECLASS "rdclass"
#define FROMWIRETYPE "type"
#define FROMWIREDEF "use_default = ISC_TRUE"
#define TOWIREDECL "dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target"
#define TOWIREARGS "rdata, cctx, target"
#define TOWIRECLASS "rdata->class"
#define TOWIRECLASS "rdata->rdclass"
#define TOWIRETYPE "rdata->type"
#define TOWIREDEF "use_default = ISC_TRUE"
#define FROMSTRUCTDECL "dns_rdataclass_t class, dns_rdatatype_t type, void *source, isc_buffer_t *target"
#define FROMSTRUCTARGS "class, type, source, target"
#define FROMSTRUCTCLASS "class"
#define FROMSTRUCTDECL "dns_rdataclass_t rdclass, dns_rdatatype_t type, void *source, isc_buffer_t *target"
#define FROMSTRUCTARGS "rdclass, type, source, target"
#define FROMSTRUCTCLASS "rdclass"
#define FROMSTRUCTTYPE "type"
#define FROMSTRUCTDEF "use_default = ISC_TRUE"
#define TOSTRUCTDECL "dns_rdata_t *rdata, void *target, isc_mem_t *mctx"
#define TOSTRUCTARGS "rdata, target, mctx"
#define TOSTRUCTCLASS "rdata->class"
#define TOSTRUCTCLASS "rdata->rdclass"
#define TOSTRUCTTYPE "rdata->type"
#define TOSTRUCTDEF "use_default = ISC_TRUE"
......@@ -75,10 +75,17 @@
#define COMPAREDECL "dns_rdata_t *rdata1, dns_rdata_t *rdata2"
#define COMPAREARGS "rdata1, rdata2"
#define COMPARECLASS "rdata1->class"
#define COMPARECLASS "rdata1->rdclass"
#define COMPARETYPE "rdata1->type"
#define COMPAREDEF "use_default = ISC_TRUE"
#define ADDITIONALDATADECL \
"dns_rdata_t *rdata, dns_additionaldatafunc_t add, void *arg"
#define ADDITIONALDATAARGS "rdata, add, arg"
#define ADDITIONALDATACLASS "rdata->rdclass"
#define ADDITIONALDATATYPE "rdata->type"
#define ADDITIONALDATADEF "use_default = ISC_TRUE"
char copyright[] =
"/*\n\
* Copyright (C) 1998%s Internet Software Consortium.\n\
......@@ -102,13 +109,13 @@ char copyright[] =
struct cc {
struct cc *next;
int class;
int rdclass;
char classname[11];
} *classes;
struct tt {
struct tt *next;
int class;
int rdclass;
int type;
char classname[11];
char typename[11];
......@@ -178,12 +185,12 @@ doswitch(char *name, char *function, char *args,
fputs("\t\tbreak; \\\n", stdout);
subswitch = 0;
}
if (tt->class && tt->type != lasttype) {
if (tt->rdclass && tt->type != lasttype) {
fprintf(stdout, "\tcase %d: switch (%s) { \\\n" /*}*/,
tt->type, csw);
subswitch = 1;
}
if (tt->class == 0)
if (tt->rdclass == 0)
fprintf(stdout,
"\tcase %d:%s %s_%s(%s); break;",
tt->type, result, function,
......@@ -191,7 +198,7 @@ doswitch(char *name, char *function, char *args,
else
fprintf(stdout,
"\t\tcase %d:%s %s_%s_%s(%s); break;",
tt->class, result, function,
tt->rdclass, result, function,
funname(tt->classname, buf1),
funname(tt->typename, buf2), args);
fputs(" \\\n", stdout);
......@@ -226,7 +233,7 @@ dodecl(char *type, char *function, char *args) {
fputs("\n", stdout);
for (tt = types; tt ; tt = tt->next)
if (tt->class)
if (tt->rdclass)
fprintf(stdout,
"static %s %s_%s_%s(%s);\n",
type, function,
......@@ -240,7 +247,7 @@ dodecl(char *type, char *function, char *args) {
}
void
add(int class, char *classname, int type, char *typename, char *dirname) {
add(int rdclass, char *classname, int type, char *typename, char *dirname) {
struct tt *newtt = (struct tt *)malloc(sizeof *newtt);
struct tt *tt, *oldtt;
struct cc *newcc;
......@@ -250,7 +257,7 @@ add(int class, char *classname, int type, char *typename, char *dirname) {
exit(1);
newtt->next = NULL;
newtt->class = class;
newtt->rdclass = rdclass;
newtt->type = type;
strcpy(newtt->classname, classname);
strcpy(newtt->typename, typename);
......@@ -264,14 +271,14 @@ add(int class, char *classname, int type, char *typename, char *dirname) {
tt = tt->next;
}
while ((tt != NULL) && (tt->type == type) && (tt->class < class)) {
while ((tt != NULL) && (tt->type == type) && (tt->rdclass < rdclass)) {
if (strcmp(tt->typename, typename) != 0)
exit(1);
oldtt = tt;
tt = tt->next;
}
if ((tt != NULL) && (tt->type == type) && (tt->class == class))
if ((tt != NULL) && (tt->type == type) && (tt->rdclass == rdclass))
exit(1);
newtt->next = tt;
......@@ -282,21 +289,21 @@ add(int class, char *classname, int type, char *typename, char *dirname) {
/* do a class switch for this type */
if (class == 0)
if (rdclass == 0)
return;
newcc = (struct cc *)malloc(sizeof *newcc);
newcc->class = class;
newcc->rdclass = rdclass;
strcpy(newcc->classname, classname);
cc = classes;
oldcc = NULL;
while ((cc != NULL) && (cc->class < class)) {
while ((cc != NULL) && (cc->rdclass < rdclass)) {
oldcc = cc;
cc = cc->next;
}
if ((cc != NULL) && cc->class == class) {
if ((cc != NULL) && cc->rdclass == rdclass) {
free((char *)newcc);
return;
}
......@@ -309,7 +316,7 @@ add(int class, char *classname, int type, char *typename, char *dirname) {
}
void
sd(int class, char *classname, char *dir, char filetype) {
sd(int rdclass, char *classname, char *dir, char filetype) {
char buf[sizeof "0123456789_65535.h"];
char fmt[sizeof "%10[-0-9a-z]_%d.h"];
DIR *d;
......@@ -330,7 +337,7 @@ sd(int class, char *classname, char *dir, char filetype) {
sprintf(buf, "%s_%d.%c", typename, type, filetype);
if (strcmp(buf, dp->d_name) != 0)
continue;
add(class, classname, type, typename, dir);
add(rdclass, classname, type, typename, dir);
}
closedir(d);
}
......@@ -340,7 +347,7 @@ main(int argc, char **argv) {
DIR *d;
char buf[256]; /* XXX Should be max path length */
char srcdir[256]; /* XXX Should be max path length */
int class;
int rdclass;
char classname[11];
struct dirent *dp;
struct tt *tt;
......@@ -403,15 +410,15 @@ main(int argc, char **argv) {
while ((dp = readdir(d)) != NULL) {
if (sscanf(dp->d_name, "%10[0-9a-z]_%d",
classname, &class) != 2)
classname, &rdclass) != 2)
continue;
if ((class > 65535) || (class < 0))
if ((rdclass > 65535) || (rdclass < 0))
continue;
sprintf(buf, "%srdata/%s_%d", srcdir, classname, class);
sprintf(buf, "%srdata/%s_%d", srcdir, classname, rdclass);
if (strcmp(buf + 6 + strlen(srcdir), dp->d_name) != 0)
continue;
sd(class, classname, buf, filetype);
sd(rdclass, classname, buf, filetype);
}
closedir(d);
sprintf(buf, "%srdata/generic", srcdir);
......@@ -436,6 +443,7 @@ main(int argc, char **argv) {
dodecl("dns_result_t", "fromstruct", FROMSTRUCTDECL);
dodecl("dns_result_t", "tostruct", TOSTRUCTDECL);
dodecl("void", "freestruct", FREESTRUCTDECL);
dodecl("dns_result_t", "additionaldata", ADDITIONALDATADECL);
doswitch("FROMTEXTSWITCH", "fromtext", FROMTEXTARGS,
FROMTEXTTYPE, FROMTEXTCLASS, FROMTEXTDEF);
......@@ -453,6 +461,9 @@ main(int argc, char **argv) {
TOSTRUCTTYPE, TOSTRUCTCLASS, TOSTRUCTDEF);
doswitch("FREESTRUCTSWITCH", "freestruct", FREESTRUCTARGS,
FREESTRUCTTYPE, FREESTRUCTCLASS, FREESTRUCTDEF);
doswitch("ADDITIONALDATASWITCH", "additionaldata",
ADDITIONALDATAARGS, ADDITIONALDATATYPE,
ADDITIONALDATACLASS, ADDITIONALDATADEF);
fprintf(stdout, "\n#define TYPENAMES%s\n",
types != NULL ? " \\" : "");
......@@ -470,8 +481,8 @@ main(int argc, char **argv) {
classes != NULL ? " \\" : "");
for (cc = classes; cc != NULL; cc = cc->next)
fprintf(stdout, "\t{ %d, \"%s\", 0 },%s\n", cc->class,
upper(cc->classname),
fprintf(stdout, "\t{ %d, \"%s\", 0 },%s\n",
cc->rdclass, upper(cc->classname),
cc->next != NULL ? " \\" : "");
......@@ -500,7 +511,7 @@ main(int argc, char **argv) {
for (cc = classes; cc != NULL; cc = cc->next)
fprintf(stdout, "\t dns_rdataclass_%s = %d,%s\n",
funname(cc->classname, buf1),
cc->class,
cc->rdclass,
cc->next != NULL ? " \\" : "");
fprintf(stdout, "#endif /* CLASSENUM */\n");
} else if (structs) {
......
......@@ -121,7 +121,7 @@ ISC_LANG_BEGINDECLS
struct dns_rdata {
unsigned char * data;
unsigned int length;
dns_rdataclass_t class;
dns_rdataclass_t rdclass;
dns_rdatatype_t type;
ISC_LINK(dns_rdata_t) link;
};
......@@ -177,7 +177,7 @@ int dns_rdata_compare(dns_rdata_t *rdata1, dns_rdata_t *rdata2);
***/
void dns_rdata_fromregion(dns_rdata_t *rdata,
dns_rdataclass_t class, dns_rdatatype_t type,
dns_rdataclass_t rdclass, dns_rdatatype_t type,
isc_region_t *r);
/*
* Make 'rdata' refer to region 'r'.
......@@ -193,7 +193,7 @@ void dns_rdata_toregion(dns_rdata_t *rdata, isc_region_t *r);
*/
dns_result_t dns_rdata_fromwire(dns_rdata_t *rdata,
dns_rdataclass_t class, dns_rdatatype_t type,
dns_rdataclass_t rdclass, dns_rdatatype_t type,
isc_buffer_t *source,
dns_decompress_t *dctx,
isc_boolean_t downcase,
......@@ -209,7 +209,7 @@ dns_result_t dns_rdata_fromwire(dns_rdata_t *rdata,
*
* Requires:
*
* 'class' and 'type' are valid.
* 'rdclass' and 'type' are valid.
*
* 'source' is a valid binary buffer, and the active region of 'source'
* references the rdata to be processed.
......@@ -267,7 +267,7 @@ dns_result_t dns_rdata_towire(dns_rdata_t *rdata,
*/
dns_result_t dns_rdata_fromtext(dns_rdata_t *rdata,
dns_rdataclass_t class, dns_rdatatype_t type,
dns_rdataclass_t rdclass, dns_rdatatype_t type,
isc_lex_t *lexer,
dns_name_t *origin,
isc_boolean_t downcase,
......@@ -287,7 +287,7 @@ dns_result_t dns_rdata_fromtext(dns_rdata_t *rdata,
*
* Requires:
*
* 'class' and 'type' are valid.
* 'rdclass' and 'type' are valid.
*
* 'lexer' is a valid isc_lex_t.
*
......@@ -372,7 +372,8 @@ dns_result_t dns_rdata_tofmttext(dns_rdata_t *rdata, dns_name_t *origin,
*/
dns_result_t dns_rdata_fromstruct(dns_rdata_t *rdata,
dns_rdataclass_t class, dns_rdatatype_t type,
dns_rdataclass_t rdclass,
dns_rdatatype_t type,
void *source,
isc_buffer_t *target);
/*
......@@ -383,7 +384,7 @@ dns_result_t dns_rdata_fromstruct(dns_rdata_t *rdata,
*
* Requires:
*
* 'class' and 'type' are valid.
* 'rdclass' and 'type' are valid.
*
* 'source' points to a valid C struct for the class and type.
*
......@@ -438,6 +439,34 @@ isc_boolean_t dns_rdatatype_ismeta(dns_rdatatype_t type);
*
*/
dns_result_t
dns_rdata_additionaldata(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
void *arg);
/*
* Call 'add' for each name and type from 'rdata' which is subject to
* additional section processing.
*
* Requires:
*
* 'rdata' is a valid, non-empty rdata.
*
* 'add' is a valid dns_additionalfunc_t.
*
* Ensures:
*
* If successful, then add() will have been called for each name
* and type subject to additional section processing.
*
* If add() returns something other than DNS_R_SUCCESS, that result
* will be returned as the result of dns_rdata_additionaldata().
*
* Returns:
*
* DNS_R_SUCCESS
*
* Many other results are possible if not successful.
*/
ISC_LANG_ENDDECLS
#endif /* DNS_RDATA_H */
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: rdata.c,v 1.55 1999/07/24 01:01:08 halley Exp $ */
/* $Id: rdata.c,v 1.56 1999/08/02 22:18:30 halley Exp $ */
#include <config.h>
......@@ -195,7 +195,7 @@ dns_rdata_init(dns_rdata_t *rdata) {
rdata->data = NULL;
rdata->length = 0;
rdata->class = 0;
rdata->rdclass = 0;
rdata->type = 0;
ISC_LINK_INIT(rdata, link);
/* ISC_LIST_INIT(rdata->list); */
......@@ -215,8 +215,8 @@ dns_rdata_compare(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
REQUIRE(rdata1->data != NULL);
REQUIRE(rdata2->data != NULL);
if (rdata1->class != rdata2->class)
return (rdata1->class < rdata2->class ? -1 : 1);
if (rdata1->rdclass != rdata2->rdclass)
return (rdata1->rdclass < rdata2->rdclass ? -1 : 1);
if (rdata1->type != rdata2->type)
return (rdata1->type < rdata2->type ? -1 : 1);
......@@ -239,7 +239,7 @@ dns_rdata_compare(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
***/
void
dns_rdata_fromregion(dns_rdata_t *rdata, dns_rdataclass_t class,
dns_rdata_fromregion(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
dns_rdatatype_t type, isc_region_t *r)
{
......@@ -248,7 +248,7 @@ dns_rdata_fromregion(dns_rdata_t *rdata, dns_rdataclass_t class,
rdata->data = r->base;
rdata->length = r->length;
rdata->class = class;
rdata->rdclass = rdclass;
rdata->type = type;
}
......@@ -263,7 +263,7 @@ dns_rdata_toregion(dns_rdata_t *rdata, isc_region_t *r) {
}
dns_result_t
dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t class,
dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
dns_rdatatype_t type, isc_buffer_t *source,
dns_decompress_t *dctx, isc_boolean_t downcase,
isc_buffer_t *target)
......@@ -294,7 +294,7 @@ dns_rdata_fromwire(dns_rdata_t *rdata, dns_rdataclass_t class,
if (rdata && result == DNS_R_SUCCESS) {
region.length = target->used - st.used;
dns_rdata_fromregion(rdata, class, type, &region);
dns_rdata_fromregion(rdata, rdclass, type, &region);
}
if (result != DNS_R_SUCCESS) {
......@@ -335,7 +335,7 @@ dns_rdata_towire(dns_rdata_t *rdata, dns_compress_t *cctx,
}
dns_result_t
dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t class,
dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
dns_rdatatype_t type, isc_lex_t *lexer,
dns_name_t *origin, isc_boolean_t downcase,
isc_buffer_t *target, dns_rdatacallbacks_t *callbacks)
......@@ -420,7 +420,7 @@ dns_rdata_fromtext(dns_rdata_t *rdata, dns_rdataclass_t class,
if (rdata != NULL && result == DNS_R_SUCCESS) {
region.length = target->used - st.used;
dns_rdata_fromregion(rdata, class, type, &region);
dns_rdata_fromregion(rdata, rdclass, type, &region);
}
if (result != DNS_R_SUCCESS) {
*target = st;
......@@ -485,7 +485,7 @@ dns_rdata_tofmttext(dns_rdata_t *rdata, dns_name_t *origin,
}
dns_result_t
dns_rdata_fromstruct(dns_rdata_t *rdata, dns_rdataclass_t class,
dns_rdata_fromstruct(dns_rdata_t *rdata, dns_rdataclass_t rdclass,
dns_rdatatype_t type, void *source,
isc_buffer_t *target)
{
......@@ -507,7 +507,7 @@ dns_rdata_fromstruct(dns_rdata_t *rdata, dns_rdataclass_t class,
if (rdata != NULL && result == DNS_R_SUCCESS) {
region.length = target->used - st.used;
dns_rdata_fromregion(rdata, class, type, &region);
dns_rdata_fromregion(rdata, rdclass, type, &region);
}
if (result != DNS_R_SUCCESS)
*target = st;
......@@ -537,6 +537,29 @@ dns_rdata_freestruct(void *source) {
FREESTRUCTSWITCH
}
dns_result_t
dns_rdata_additionaldata(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
void *arg)
{
dns_result_t result = ISC_R_SUCCESS;
isc_boolean_t use_default = ISC_FALSE;
/*
* Call 'add' for each name and type from 'rdata' which is subject to
* additional section processing.
*/
REQUIRE(rdata != NULL);
REQUIRE(add != NULL);
ADDITIONALDATASWITCH
if (use_default)
(void)NULL;
return (result);
}
dns_result_t
dns_rdataclass_fromtext(dns_rdataclass_t *classp, isc_textregion_t *source) {
int i = 0;
......@@ -557,17 +580,17 @@ dns_rdataclass_fromtext(dns_rdataclass_t *classp, isc_textregion_t *source) {
}
dns_result_t
dns_rdataclass_totext(dns_rdataclass_t class, isc_buffer_t *target) {
dns_rdataclass_totext(dns_rdataclass_t rdclass, isc_buffer_t *target) {
int i = 0;
char buf[sizeof "65000"];
while (classes[i].name != NULL) {
if (classes[i].value == class) {
if (classes[i].value == rdclass) {
return (str_totext(classes[i].name, target));
}
i++;
}
sprintf(buf, "%u", class);
sprintf(buf, "%u", rdclass);
return (str_totext(buf, target));
}
......
......@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: tsig_250.c,v 1.12 1999/06/08 20:41:30 gson Exp $ */
/* $Id: tsig_250.c,v 1.13 1999/08/02 22:17:58 halley Exp $ */
/* draft-ietf-dnsind-tsig-07.txt */
......@@ -24,7 +24,7 @@
#include <isc/str.h>
static dns_result_t
fromtext_any_tsig(dns_rdataclass_t class, dns_rdatatype_t type,
fromtext_any_tsig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
isc_lex_t *lexer, dns_name_t *origin,
isc_boolean_t downcase, isc_buffer_t *target)
{
......@@ -35,7 +35,7 @@ fromtext_any_tsig(dns_rdataclass_t class, dns_rdatatype_t type,
char *e;
REQUIRE(type == 250);
REQUIRE(class == 255);
REQUIRE(rdclass == 255);
/* Algorithm Name */
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
......@@ -107,7 +107,7 @@ totext_any_tsig(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
unsigned short n;
REQUIRE(rdata->type == 250);
REQUIRE(rdata->class == 255);
REQUIRE(rdata->rdclass == 255);
dns_rdata_toregion(rdata, &sr);
/* Algorithm Name */
......@@ -185,7 +185,7 @@ totext_any_tsig(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx,
}
static dns_result_t
fromwire_any_tsig(dns_rdataclass_t class, dns_rdatatype_t type,
fromwire_any_tsig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
isc_buffer_t *source, dns_decompress_t *dctx,
isc_boolean_t downcase, isc_buffer_t *target)
{
......@@ -194,7 +194,7 @@ fromwire_any_tsig(dns_rdataclass_t class, dns_rdatatype_t type,
unsigned long n;
REQUIRE(type == 250);
REQUIRE(class == 255);
REQUIRE(rdclass == 255);
if (dns_decompress_edns(dctx) >= 1 || !dns_decompress_strict(dctx))
dns_decompress_setmethods(dctx, DNS_COMPRESS_ALL);
......@@ -246,7 +246,7 @@ towire_any_tsig(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target)
dns_name_t name;
REQUIRE(rdata->type == 250);
REQUIRE(rdata->class == 255);
REQUIRE(rdata->rdclass == 255);
if (dns_compress_getedns(cctx) >= 1)
dns_compress_setmethods(cctx, DNS_COMPRESS_ALL);
......@@ -270,9 +270,9 @@ compare_any_tsig(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
int result;
REQUIRE(rdata1->type == rdata2->type);
REQUIRE(rdata1->class == rdata2->class);
REQUIRE(rdata1->rdclass == rdata2->rdclass);
REQUIRE(rdata1->type == 250);
REQUIRE(rdata1->class == 255);
REQUIRE(rdata1->rdclass == 255);
dns_rdata_toregion(rdata1, &r1);
dns_rdata_toregion(rdata2, &r2);
......@@ -289,12 +289,12 @@ compare_any_tsig(dns_rdata_t *rdata1, dns_rdata_t *rdata2) {
}
static dns_result_t
fromstruct_any_tsig(dns_rdataclass_t class, dns_rdatatype_t type,
fromstruct_any_tsig(dns_rdataclass_t rdclass, dns_rdatatype_t type,
void *source, isc_buffer_t *target)
{
REQUIRE(type == 250);
REQUIRE(class == 255);
REQUIRE(rdclass == 255);
source = source;
target = target;
......@@ -306,7 +306,7 @@ static dns_result_t
tostruct_any_tsig(dns_rdata_t *rdata, void *target, isc_mem_t *mctx) {
REQUIRE(rdata->type == 250);
REQUIRE(rdata->class == 255);
REQUIRE(rdata->rdclass == 255);
target = target;
mctx = mctx;
......@@ -324,4 +324,18 @@ freestruct_any_tsig(void *source) {
REQUIRE(ISC_FALSE);
}
static dns_result_t
additionaldata_any_tsig(dns_rdata_t *rdata, dns_additionaldatafunc_t add,
void *arg)
{
REQUIRE(rdata->type == 250);
REQUIRE(rdata->rdclass == 255);
(void)add;
(void)arg;
return (DNS_R_SUCCESS);
}
#endif /* RDATA_ANY_255_TSIG_250_C */