Commit 28640d1d authored by Bob Halley's avatar Bob Halley
Browse files

add dns_rdataset_isassociated

parent f56a8f6b
...@@ -153,6 +153,19 @@ dns_rdataset_disassociate(dns_rdataset_t *rdataset); ...@@ -153,6 +153,19 @@ dns_rdataset_disassociate(dns_rdataset_t *rdataset);
* 'rdataset' is a valid, disassociated rdataset. * 'rdataset' is a valid, disassociated rdataset.
*/ */
isc_boolean_t
dns_rdataset_isassociated(dns_rdataset_t *rdataset);
/*
* Is 'rdataset' associated?
*
* Requires:
* 'rdataset' is a valid rdataset.
*
* Returns:
* ISC_TRUE 'rdataset' is associated.
* ISC_FALSE 'rdataset' is not associated.
*/
void void
dns_rdataset_makequestion(dns_rdataset_t *rdataset, dns_rdataclass_t rdclass, dns_rdataset_makequestion(dns_rdataset_t *rdataset, dns_rdataclass_t rdclass,
dns_rdatatype_t type); dns_rdatatype_t type);
......
...@@ -101,6 +101,20 @@ dns_rdataset_disassociate(dns_rdataset_t *rdataset) { ...@@ -101,6 +101,20 @@ dns_rdataset_disassociate(dns_rdataset_t *rdataset) {
rdataset->private5 = NULL; rdataset->private5 = NULL;
} }
isc_boolean_t
dns_rdataset_isassociated(dns_rdataset_t *rdataset) {
/*
* Is 'rdataset' associated?
*/
REQUIRE(DNS_RDATASET_VALID(rdataset));
if (rdataset->methods != NULL)
return (ISC_TRUE);
return (ISC_FALSE);
}
static void static void
question_disassociate(dns_rdataset_t *rdataset) { question_disassociate(dns_rdataset_t *rdataset) {
(void)rdataset; (void)rdataset;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment