Lines Matching refs:rdataset
32 #include <dns/rdataset.h>
73 dns_rdataset_t *rdataset)
76 * Make 'rdataset' refer to the rdata in 'rdatalist'.
80 REQUIRE(DNS_RDATASET_VALID(rdataset));
81 REQUIRE(! dns_rdataset_isassociated(rdataset));
83 rdataset->methods = &methods;
84 rdataset->rdclass = rdatalist->rdclass;
85 rdataset->type = rdatalist->type;
86 rdataset->covers = rdatalist->covers;
87 rdataset->ttl = rdatalist->ttl;
88 rdataset->trust = 0;
89 rdataset->private1 = rdatalist;
90 rdataset->private2 = NULL;
91 rdataset->private3 = NULL;
92 rdataset->privateuint4 = 0;
93 rdataset->private5 = NULL;
99 dns_rdatalist_fromrdataset(dns_rdataset_t *rdataset,
102 REQUIRE(rdatalist != NULL && rdataset != NULL);
103 *rdatalist = rdataset->private1;
109 isc__rdatalist_disassociate(dns_rdataset_t *rdataset) {
110 UNUSED(rdataset);
114 isc__rdatalist_first(dns_rdataset_t *rdataset) {
117 rdatalist = rdataset->private1;
118 rdataset->private2 = ISC_LIST_HEAD(rdatalist->rdata);
120 if (rdataset->private2 == NULL)
127 isc__rdatalist_next(dns_rdataset_t *rdataset) {
130 REQUIRE(rdataset != NULL);
132 rdata = rdataset->private2;
136 rdataset->private2 = ISC_LIST_NEXT(rdata, link);
138 if (rdataset->private2 == NULL)
145 isc__rdatalist_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata) {
148 REQUIRE(rdataset != NULL);
150 list_rdata = rdataset->private2;
171 isc__rdatalist_count(dns_rdataset_t *rdataset) {
176 REQUIRE(rdataset != NULL);
178 rdatalist = rdataset->private1;
190 isc__rdatalist_addnoqname(dns_rdataset_t *rdataset, dns_name_t *name) {
196 REQUIRE(rdataset != NULL);
202 if (rdset->rdclass != rdataset->rdclass)
225 ttl = rdataset->ttl;
230 rdataset->ttl = neg->ttl = negsig->ttl = ttl;
231 rdataset->attributes |= DNS_RDATASETATTR_NOQNAME;
232 rdataset->private6 = name;
237 isc__rdatalist_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name,
240 dns_rdataclass_t rdclass = rdataset->rdclass;
243 dns_name_t *noqname = rdataset->private6;
245 REQUIRE(rdataset != NULL);
246 REQUIRE((rdataset->attributes & DNS_RDATASETATTR_NOQNAME) != 0);
250 for (rdataset = ISC_LIST_HEAD(noqname->list);
251 rdataset != NULL;
252 rdataset = ISC_LIST_NEXT(rdataset, link))
254 if (rdataset->rdclass != rdclass)
256 if (rdataset->type == dns_rdatatype_nsec ||
257 rdataset->type == dns_rdatatype_nsec3)
258 tneg = rdataset;
263 for (rdataset = ISC_LIST_HEAD(noqname->list);
264 rdataset != NULL;
265 rdataset = ISC_LIST_NEXT(rdataset, link))
267 if (rdataset->type == dns_rdatatype_rrsig &&
268 rdataset->covers == tneg->type)
269 tnegsig = rdataset;
281 isc__rdatalist_addclosest(dns_rdataset_t *rdataset, dns_name_t *name) {
287 REQUIRE(rdataset != NULL);
293 if (rdset->rdclass != rdataset->rdclass)
316 ttl = rdataset->ttl;
321 rdataset->ttl = neg->ttl = negsig->ttl = ttl;
322 rdataset->attributes |= DNS_RDATASETATTR_CLOSEST;
323 rdataset->private7 = name;
328 isc__rdatalist_getclosest(dns_rdataset_t *rdataset, dns_name_t *name,
331 dns_rdataclass_t rdclass = rdataset->rdclass;
334 dns_name_t *closest = rdataset->private7;
336 REQUIRE(rdataset != NULL);
337 REQUIRE((rdataset->attributes & DNS_RDATASETATTR_CLOSEST) != 0);
341 for (rdataset = ISC_LIST_HEAD(closest->list);
342 rdataset != NULL;
343 rdataset = ISC_LIST_NEXT(rdataset, link))
345 if (rdataset->rdclass != rdclass)
347 if (rdataset->type == dns_rdatatype_nsec ||
348 rdataset->type == dns_rdatatype_nsec3)
349 tneg = rdataset;
354 for (rdataset = ISC_LIST_HEAD(closest->list);
355 rdataset != NULL;
356 rdataset = ISC_LIST_NEXT(rdataset, link))
358 if (rdataset->type == dns_rdatatype_rrsig &&
359 rdataset->covers == tneg->type)
360 tnegsig = rdataset;