Add RR type DOA

Without rdata yet, just to pass unit tests
This commit is contained in:
Willem Toorop 2017-09-01 16:10:56 +02:00
parent 062b88c991
commit 98379bbd38
4 changed files with 8 additions and 4 deletions

View File

@ -272,6 +272,7 @@ static struct const_name_info consts_name_info[] = {
{ "GETDNS_RRTYPE_DLV", 32769 },
{ "GETDNS_RRTYPE_DNAME", 39 },
{ "GETDNS_RRTYPE_DNSKEY", 48 },
{ "GETDNS_RRTYPE_DOA", 259 },
{ "GETDNS_RRTYPE_DS", 43 },
{ "GETDNS_RRTYPE_EID", 31 },
{ "GETDNS_RRTYPE_GID", 102 },

View File

@ -437,6 +437,7 @@ typedef enum getdns_callback_type_t {
#define GETDNS_RRTYPE_URI 256
#define GETDNS_RRTYPE_CAA 257
#define GETDNS_RRTYPE_AVC 258
#define GETDNS_RRTYPE_DOA 259
#define GETDNS_RRTYPE_TA 32768
#define GETDNS_RRTYPE_DLV 32769
/** @}

View File

@ -227,6 +227,7 @@ enum gldns_enum_rr_type
GLDNS_RR_TYPE_URI = 256, /* RFC 7553 */
GLDNS_RR_TYPE_CAA = 257, /* RFC 6844 */
GLDNS_RR_TYPE_AVC = 258,
GLDNS_RR_TYPE_DOA = 259,
/** DNSSEC Trust Authorities */
GLDNS_RR_TYPE_TA = 32768,

View File

@ -920,7 +920,8 @@ static _getdns_rr_def _getdns_rr_defs[] = {
{ NULL, NULL, 0 },
{ "URI", uri_rdata, ALEN( uri_rdata) }, /* 256 - */
{ "CAA", caa_rdata, ALEN( caa_rdata) },
{ "AVC", txt_rdata, ALEN( txt_rdata) }, /* - 258 */
{ "AVC", txt_rdata, ALEN( txt_rdata) },
{ "DOA", UNKNOWN_RDATA, 0 }, /* - 259 */
{ "TA", ds_rdata, ALEN( ds_rdata) }, /* 32768 */
{ "DLV", dlv_rdata, ALEN( dlv_rdata) } /* 32769 */
};
@ -928,12 +929,12 @@ static _getdns_rr_def _getdns_rr_defs[] = {
const _getdns_rr_def *
_getdns_rr_def_lookup(uint16_t rr_type)
{
if (rr_type <= 258)
if (rr_type <= 259)
return &_getdns_rr_defs[rr_type];
else if (rr_type == 32768)
return &_getdns_rr_defs[259];
else if (rr_type == 32769)
return &_getdns_rr_defs[260];
else if (rr_type == 32769)
return &_getdns_rr_defs[261];
return _getdns_rr_defs;
}