summaryrefslogtreecommitdiff
path: root/rr.c
diff options
context:
space:
mode:
authorMatthijs Mekking <matje@NLnetLabs.nl>2009-11-12 16:18:19 +0100
committerMatthijs Mekking <matje@NLnetLabs.nl>2009-11-12 16:18:19 +0100
commit235b7130f79580717a36b18413948b1955fc3e08 (patch)
treef794561c455dac56b6a9cb0fd683c0a8d55c4d4b /rr.c
parent78b34e7c0a7032a9124d3a3241984c95a70448ac (diff)
downloadldns-235b7130f79580717a36b18413948b1955fc3e08.tar.gz
rdlen == 0 does not imple question rr
Diffstat (limited to 'rr.c')
-rw-r--r--rr.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/rr.c b/rr.c
index 48275b51..f397249c 100644
--- a/rr.c
+++ b/rr.c
@@ -30,6 +30,7 @@ ldns_rr_new(void)
}
ldns_rr_set_owner(rr, NULL);
+ ldns_rr_set_question(rr, false);
ldns_rr_set_rd_count(rr, 0);
rr->_rdata_fields = NULL;
ldns_rr_set_class(rr, LDNS_RR_CLASS_IN);
@@ -56,6 +57,8 @@ ldns_rr_new_frm_type(ldns_rr_type t)
rr->_rdata_fields[i] = NULL;
}
+ ldns_rr_set_owner(rr, NULL);
+ ldns_rr_set_question(rr, false);
/* set the count to minimum */
ldns_rr_set_rd_count(rr, ldns_rr_descriptor_minimum(desc));
ldns_rr_set_class(rr, LDNS_RR_CLASS_IN);
@@ -324,6 +327,8 @@ ldns_rr_new_frm_str_internal(ldns_rr **newrr, const char *str,
}
LDNS_FREE(owner);
+ ldns_rr_set_question(new, question);
+
ldns_rr_set_ttl(new, ttl_val);
LDNS_FREE(ttl);
@@ -650,6 +655,12 @@ ldns_rr_set_owner(ldns_rr *rr, ldns_rdf *owner)
}
void
+ldns_rr_set_question(ldns_rr *rr, bool question)
+{
+ rr->_rr_question = question;
+}
+
+void
ldns_rr_set_ttl(ldns_rr *rr, uint32_t ttl)
{
rr->_ttl = ttl;
@@ -753,6 +764,12 @@ ldns_rr_owner(const ldns_rr *rr)
return rr->_owner;
}
+bool
+ldns_rr_is_question(const ldns_rr *rr)
+{
+ return rr->_rr_question;
+}
+
uint32_t
ldns_rr_ttl(const ldns_rr *rr)
{