+4675. [cleanup] Don't use C++ keyword class. [RT #45726]
+
4674. [func] "dig +sigchase", and related options "+topdown" and
"+trusted-keys", have been removed. Use "delv" for
queries with DNSSEC validation. [RT #42793]
}
static json_object *
-addzone(char *name, char *class, const char *ztype,
+addzone(char *name, char *classname, const char *ztype,
isc_uint32_t serial, isc_boolean_t add_serial)
{
json_object *node = json_object_new_object();
return (NULL);
json_object_object_add(node, "name", json_object_new_string(name));
- json_object_object_add(node, "class", json_object_new_string(class));
+ json_object_object_add(node, "class",
+ json_object_new_string(classname));
if (add_serial)
json_object_object_add(node, "serial",
json_object_new_int64(serial));
zone_jsonrender(dns_zone_t *zone, void *arg) {
isc_result_t result = ISC_R_SUCCESS;
char buf[1024 + 32]; /* sufficiently large for zone name and class */
- char class[1024 + 32]; /* sufficiently large for zone name and class */
+ char classbuf[64]; /* sufficiently large for class */
char *zone_name_only = NULL;
char *class_only = NULL;
dns_rdataclass_t rdclass;
zone_name_only = buf;
rdclass = dns_zone_getclass(zone);
- dns_rdataclass_format(rdclass, class, sizeof(class));
- class_only = class;
+ dns_rdataclass_format(rdclass, classbuf, sizeof(classbuf));
+ class_only = classbuf;
if (dns_zone_getserial2(zone, &serial) != ISC_R_SUCCESS)
zoneobj = addzone(zone_name_only, class_only,
#include <tests/t_api.h>
static isc_result_t
-t_create(const char *db_type, const char *origin, const char *class,
+t_create(const char *db_type, const char *origin, const char *classname,
const char *model, isc_mem_t *mctx, dns_db_t **db)
{
int len;
return(dns_result);
}
- DE_CONST(class, region.base);
- region.length = strlen(class);
+ DE_CONST(classname, region.base);
+ region.length = strlen(classname);
dns_result = dns_rdataclass_fromtext(&rdataclass, ®ion);
if (dns_result != ISC_R_SUCCESS) {
t_info("dns_rdataclass_fromtext failed %s\n",
char *db_type;
char *origin;
char *model;
- char *class;
+ char *db_class;
char *expected_load_result;
char *findname;
char *find_type;
db_type = T_ARG(1);
origin = T_ARG(2);
model = T_ARG(3);
- class = T_ARG(4);
+ db_class = T_ARG(4);
expected_load_result = T_ARG(5);
findname = T_ARG(6);
find_type = T_ARG(7);
return(T_UNRESOLVED);
}
- dns_result = t_create(db_type, origin, class, model, mctx, &db);
+ dns_result = t_create(db_type, origin, db_class, model, mctx, &db);
if (dns_result != ISC_R_SUCCESS) {
isc_hash_destroy();
isc_entropy_detach(&ectx);
"dns_db_iscache(db) returns ISC_TRUE.";
static int
-t_dns_db_zc_x(char *filename, char *db_type, char *origin, char *class,
+t_dns_db_zc_x(char *filename, char *db_type, char *origin, char *db_class,
dns_dbtype_t dbtype, isc_boolean_t(*cf)(dns_db_t *),
isc_boolean_t exp_result)
{
return(T_UNRESOLVED);
}
- textregion.base = class;
- textregion.length = strlen(class);
+ textregion.base = db_class;
+ textregion.length = strlen(db_class);
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
if (dns_result != ISC_R_SUCCESS) {
t_info("dns_rdataclass_fromtext failed %s\n",
t_dns_db_class(char **av) {
char *filename;
- char *class;
+ char *db_class;
int result;
isc_result_t dns_result;
isc_textregion_t textregion;
filename = T_ARG(0);
- class = T_ARG(1);
+ db_class = T_ARG(1);
db = NULL;
mctx = NULL;
ectx = NULL;
t_info("testing with database %s and class %s\n",
- filename, class);
+ filename, db_class);
- textregion.base = class;
- textregion.length = strlen(class);
+ textregion.base = db_class;
+ textregion.length = strlen(db_class);
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
if (dns_result != ISC_R_SUCCESS) {
t_info("dns_rdataclass_fromtext failed %s\n",
return(T_UNRESOLVED);
}
- dns_result = t_create("rbt", ".", class, "isc_true", mctx, &db);
+ dns_result = t_create("rbt", ".", db_class, "isc_true", mctx, &db);
if (dns_result != ISC_R_SUCCESS) {
t_info("t_create failed %s\n",
dns_result_totext(dns_result));
dns_rdataclass_format(db_rdataclass,
classbuf, sizeof(classbuf));
t_info("dns_db_class returned %s, expected %s\n",
- classbuf, class);
+ classbuf, db_class);
result = T_FAIL;
}
char *filename;
char *db_type;
char *origin;
- char *class;
+ char *db_class;
char *model;
char *findname;
char *findtype;
filename = T_ARG(0);
db_type = T_ARG(1);
origin = T_ARG(2);
- class = T_ARG(3);
+ db_class = T_ARG(3);
model = T_ARG(4);
findname = T_ARG(5);
findtype = T_ARG(6);
return(T_UNRESOLVED);
}
- dns_result = t_create(db_type, origin, class, model, mctx, &db);
+ dns_result = t_create(db_type, origin, db_class, model, mctx, &db);
if (dns_result != ISC_R_SUCCESS) {
isc_hash_destroy();
isc_entropy_detach(&ectx);
char *filename;
char *db_type;
char *origin;
- char *class;
+ char *db_class;
char *model;
char *newname;
char *newtype;
filename = T_ARG(0);
db_type = T_ARG(1);
origin = T_ARG(2);
- class = T_ARG(3);
+ db_class = T_ARG(3);
model = T_ARG(4);
newname = T_ARG(5);
newtype = T_ARG(6);
return(T_UNRESOLVED);
}
- dns_result = t_create(db_type, origin, class, model, mctx, &db);
+ dns_result = t_create(db_type, origin, db_class, model, mctx, &db);
if (dns_result != ISC_R_SUCCESS) {
isc_hash_destroy();
isc_entropy_detach(&ectx);
return(T_UNRESOLVED);
}
- textregion.base = class;
- textregion.length = strlen(class);
+ textregion.base = db_class;
+ textregion.length = strlen(db_class);
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
if (dns_result != ISC_R_SUCCESS) {
t_info("dns_rdataclass_fromtext failed %s\n",
char *filename;
char *db_type;
char *origin;
- char *class;
+ char *db_class;
char *model;
char *new_name;
char *new_type;
filename = T_ARG(0);
db_type = T_ARG(1);
origin = T_ARG(2);
- class = T_ARG(3);
+ db_class = T_ARG(3);
model = T_ARG(4);
new_name = T_ARG(5);
new_type = T_ARG(6);
return(T_UNRESOLVED);
}
- dns_result = t_create(db_type, origin, class, model, mctx, &db);
+ dns_result = t_create(db_type, origin, db_class, model, mctx, &db);
if (dns_result != ISC_R_SUCCESS) {
isc_hash_destroy();
isc_entropy_detach(&ectx);
return(T_UNRESOLVED);
}
- textregion.base = class;
- textregion.length = strlen(class);
+ textregion.base = db_class;
+ textregion.length = strlen(db_class);
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
if (dns_result != ISC_R_SUCCESS) {
t_info("dns_rdataclass_fromtext failed %s\n",
char *filename;
char *db_type;
char *origin;
- char *class;
+ char *db_class;
char *model;
char *new_name;
char *new_type;
filename = T_ARG(0);
db_type = T_ARG(1);
origin = T_ARG(2);
- class = T_ARG(3);
+ db_class = T_ARG(3);
model = T_ARG(4);
new_name = T_ARG(5);
new_type = T_ARG(6);
return(T_UNRESOLVED);
}
- dns_result = t_create(db_type, origin, class, model, mctx, &db);
+ dns_result = t_create(db_type, origin, db_class, model, mctx, &db);
if (dns_result != ISC_R_SUCCESS) {
isc_hash_destroy();
isc_entropy_detach(&ectx);
return(T_UNRESOLVED);
}
- textregion.base = class;
- textregion.length = strlen(class);
+ textregion.base = db_class;
+ textregion.length = strlen(db_class);
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
if (dns_result != ISC_R_SUCCESS) {
t_info("dns_rdataclass_fromtext failed %s\n",
char *filename;
char *db_type;
char *origin;
- char *class;
+ char *db_class;
char *existing_name;
char *node_xtime;
char *find_xtime;
filename = T_ARG(0);
db_type = T_ARG(1);
origin = T_ARG(2);
- class = T_ARG(3);
+ db_class = T_ARG(3);
existing_name = T_ARG(4);
node_xtime = T_ARG(5);
find_xtime = T_ARG(6);
}
db = NULL;
- dns_result = t_create(db_type, origin, class, "cache", mctx, &db);
+ dns_result = t_create(db_type, origin, db_class, "cache", mctx, &db);
if (dns_result != ISC_R_SUCCESS) {
isc_hash_destroy();
isc_entropy_detach(&ectx);
char *filename;
char *db_type;
char *origin;
- char *class;
+ char *db_class;
char *model;
char *find_name;
char *find_type;
filename = T_ARG(0);
db_type = T_ARG(1);
origin = T_ARG(2);
- class = T_ARG(3);
+ db_class = T_ARG(3);
model = T_ARG(4);
find_name = T_ARG(5);
find_type = T_ARG(6);
return(T_UNRESOLVED);
}
- dns_result = t_create(db_type, origin, class, model, mctx, &db);
+ dns_result = t_create(db_type, origin, db_class, model, mctx, &db);
if (dns_result != ISC_R_SUCCESS) {
isc_mem_destroy(&mctx);
return(T_UNRESOLVED);
char *filename;
char *db_type;
char *origin;
- char *class;
+ char *db_class;
char *model;
char *newname;
filename = T_ARG(0);
db_type = T_ARG(1);
origin = T_ARG(2);
- class = T_ARG(3);
+ db_class = T_ARG(3);
model = T_ARG(4);
newname = T_ARG(5);
return(T_UNRESOLVED);
}
- dns_result = t_create(db_type, origin, class, model, mctx, &db);
+ dns_result = t_create(db_type, origin, db_class, model, mctx, &db);
if (dns_result != ISC_R_SUCCESS) {
isc_hash_destroy();
isc_entropy_detach(&ectx);
}
static int
-test_master(char *testfile, char *origin, char *class, isc_result_t exp_result)
+test_master(char *testfile, char *origin, char *db_class,
+ isc_result_t exp_result)
{
int result;
int len;
dns_rdatacallbacks_init_stdio(&callbacks);
callbacks.add = t1_add_callback;
- textregion.base = class;
- textregion.length = strlen(class);
+ textregion.base = db_class;
+ textregion.length = strlen(db_class);
dns_result = dns_rdataclass_fromtext(&rdataclass, &textregion);
if (dns_result != ISC_R_SUCCESS) {
&rdataset);
if (result != ISC_R_SUCCESS) {
char cname[DNS_NAME_FORMATSIZE];
- char type[DNS_RDATATYPE_FORMATSIZE];
- char class[DNS_RDATACLASS_FORMATSIZE];
+ char typebuf[DNS_RDATATYPE_FORMATSIZE];
+ char classbuf[DNS_RDATACLASS_FORMATSIZE];
dns_name_format(name, cname,
DNS_NAME_FORMATSIZE);
- dns_rdataclass_format(rdataset.rdclass, class,
- sizeof(class));
- dns_rdatatype_format(rdataset.type, type,
- sizeof(type));
+ dns_rdataclass_format(rdataset.rdclass,
+ classbuf,
+ sizeof(classbuf));
+ dns_rdatatype_format(rdataset.type, typebuf,
+ sizeof(typebuf));
isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
DNS_LOGMODULE_MASTER,
ISC_LOG_WARNING,
"catz: unknown record in catalog "
"zone - %s %s %s(%s) - ignoring",
- cname, class, type,
+ cname, classbuf, typebuf,
isc_result_totext(result));
}
dns_rdataset_disassociate(&rdataset);
fctx->res->rdclass != rdataset->rdclass ||
!dns_name_equal(&fctx->name, name)) {
char namebuf[DNS_NAME_FORMATSIZE];
- char class[DNS_RDATACLASS_FORMATSIZE];
- char type[DNS_RDATATYPE_FORMATSIZE];
+ char classbuf[DNS_RDATACLASS_FORMATSIZE];
+ char typebuf[DNS_RDATATYPE_FORMATSIZE];
dns_name_format(name, namebuf, sizeof(namebuf));
- dns_rdataclass_format(rdataset->rdclass, class, sizeof(class));
- dns_rdatatype_format(rdataset->type, type, sizeof(type));
+ dns_rdataclass_format(rdataset->rdclass, classbuf,
+ sizeof(classbuf));
+ dns_rdatatype_format(rdataset->type, typebuf, sizeof(typebuf));
log_formerr(fctx, "question section mismatch: got %s/%s/%s",
- namebuf, class, type);
+ namebuf, classbuf, typebuf);
return (DNS_R_FORMERR);
}
oid * data, size_t * size);
static int
der_get_tag(const unsigned char *p, size_t len,
- Der_class * class, Der_type * type,
+ Der_class * xclass, Der_type * type,
int *tag, size_t * size);
static int
der_match_tag(const unsigned char *p, size_t len,
- Der_class class, Der_type type,
+ Der_class xclass, Der_type type,
int tag, size_t * size);
static int
der_match_tag_and_length(const unsigned char *p, size_t len,
- Der_class class, Der_type type, int tag,
+ Der_class xclass, Der_type type, int tag,
size_t * length_ret, size_t * size);
static int
der_put_oid(unsigned char *p, size_t len,
const oid * data, size_t * size);
static int
-der_put_tag(unsigned char *p, size_t len, Der_class class, Der_type type,
+der_put_tag(unsigned char *p, size_t len, Der_class xclass, Der_type type,
int tag, size_t *);
static int
der_put_length_and_tag(unsigned char *, size_t, size_t,
static int
der_get_tag(const unsigned char *p, size_t len,
- Der_class *class, Der_type *type,
+ Der_class *xclass, Der_type *type,
int *tag, size_t *size)
{
if (len < 1U)
return (ASN1_OVERRUN);
- *class = (Der_class) (((*p) >> 6) & 0x03);
+ *xclass = (Der_class) (((*p) >> 6) & 0x03);
*type = (Der_type) (((*p) >> 5) & 0x01);
*tag = (*p) & 0x1F;
if (size)
static int
der_match_tag(const unsigned char *p, size_t len,
- Der_class class, Der_type type,
+ Der_class xclass, Der_type type,
int tag, size_t *size)
{
size_t l;
e = der_get_tag(p, len, &thisclass, &thistype, &thistag, &l);
if (e)
return (e);
- if (class != thisclass || type != thistype)
+ if (xclass != thisclass || type != thistype)
return (ASN1_BAD_ID);
if (tag > thistag)
return (ASN1_MISPLACED_FIELD);
static int
der_match_tag_and_length(const unsigned char *p, size_t len,
- Der_class class, Der_type type, int tag,
+ Der_class xclass, Der_type type, int tag,
size_t *length_ret, size_t *size)
{
size_t l, ret = 0;
int e;
- e = der_match_tag(p, len, class, type, tag, &l);
+ e = der_match_tag(p, len, xclass, type, tag, &l);
if (e)
return (e);
p += l;
}
static int
-der_put_tag(unsigned char *p, size_t len, Der_class class, Der_type type,
+der_put_tag(unsigned char *p, size_t len, Der_class xclass, Der_type type,
int tag, size_t *size)
{
if (len < 1U)
return (ASN1_OVERFLOW);
- *p = (class << 6) | (type << 5) | tag; /* XXX */
+ *p = (xclass << 6) | (type << 5) | tag; /* XXX */
*size = 1;
return (0);
}
static int
der_put_length_and_tag(unsigned char *p, size_t len, size_t len_val,
- Der_class class, Der_type type, int tag, size_t *size)
+ Der_class xclass, Der_type type, int tag, size_t *size)
{
size_t ret = 0;
size_t l;
p -= l;
len -= l;
ret += l;
- e = der_put_tag(p, len, class, type, tag, &l);
+ e = der_put_tag(p, len, xclass, type, tag, &l);
if (e)
return (e);
p -= l;
#endif
void
-t_assert(const char *component, int anum, int class, const char *what, ...)
+t_assert(const char *component, int anum, int tclass, const char *what, ...)
ISC_FORMAT_PRINTF(4, 5);
void
}
void
-t_assert(const char *component, int anum, int class, const char *what, ...) {
+t_assert(const char *component, int anum, int tclass, const char *what, ...) {
va_list args;
char buf[T_BIGBUF];
- (void)printf("T:%s:%d:%s\n", component, anum, class == T_REQUIRED ?
+ (void)printf("T:%s:%d:%s\n", component, anum, tclass == T_REQUIRED ?
"A" : "C");
/*