Lines Matching refs:rdataset
32 #include <dns/rdataset.h>
57 copy_rdataset(dns_rdataset_t *rdataset, isc_buffer_t *buffer) {
64 * Copy the rdataset count to the buffer.
69 count = dns_rdataset_count(rdataset);
73 result = dns_rdataset_first(rdataset);
75 dns_rdataset_current(rdataset, &rdata);
92 result = dns_rdataset_next(rdataset);
128 dns_rdataset_t *rdataset;
141 * rdataset, and store it in 'cache' at 'node'.
176 for (rdataset = ISC_LIST_HEAD(name->list);
177 rdataset != NULL;
178 rdataset = ISC_LIST_NEXT(rdataset, link)) {
179 if ((rdataset->attributes &
182 type = rdataset->type;
184 type = rdataset->covers;
188 if (ttl > rdataset->ttl)
189 ttl = rdataset->ttl;
190 if (trust > rdataset->trust)
191 trust = rdataset->trust;
208 rdataset->type);
210 (unsigned char)rdataset->trust);
212 * Copy the rdataset into the buffer.
214 result = copy_rdataset(rdataset,
244 * negative cache rdataset. In particular, we have no SOA.
250 * We will now build a suitable negative cache rdataset that
326 dns_ncache_towire(dns_rdataset_t *rdataset, dns_compress_t *cctx,
339 * Convert the negative caching rdataset 'rdataset' to wire format,
344 REQUIRE(rdataset != NULL);
345 REQUIRE(rdataset->type == 0);
346 REQUIRE((rdataset->attributes & DNS_RDATASETATTR_NEGATIVE) != 0);
351 result = dns_rdataset_first(rdataset);
353 dns_rdataset_current(rdataset, &rdata);
380 rdata.rdclass = rdataset->rdclass;
406 isc_buffer_putuint16(target, rdataset->rdclass);
407 isc_buffer_putuint32(target, rdataset->ttl);
435 result = dns_rdataset_next(rdataset);
455 rdataset_disassociate(dns_rdataset_t *rdataset) {
456 UNUSED(rdataset);
460 rdataset_first(dns_rdataset_t *rdataset) {
461 unsigned char *raw = rdataset->private3;
466 rdataset->private5 = NULL;
476 rdataset->privateuint4 = count;
477 rdataset->private5 = raw;
483 rdataset_next(dns_rdataset_t *rdataset) {
488 count = rdataset->privateuint4;
492 rdataset->privateuint4 = count;
493 raw = rdataset->private5;
496 rdataset->private5 = raw;
502 rdataset_current(dns_rdataset_t *rdataset, dns_rdata_t *rdata) {
503 unsigned char *raw = rdataset->private5;
511 dns_rdata_fromregion(rdata, rdataset->rdclass, rdataset->type, &r);
526 rdataset_count(dns_rdataset_t *rdataset) {
527 unsigned char *raw = rdataset->private3;
536 rdataset_settrust(dns_rdataset_t *rdataset, dns_trust_t trust) {
537 unsigned char *raw = rdataset->private3;
562 dns_rdatatype_t type, dns_rdataset_t *rdataset)
577 REQUIRE(!dns_rdataset_isassociated(rdataset));
614 rdataset->methods = &rdataset_methods;
615 rdataset->rdclass = ncacherdataset->rdclass;
616 rdataset->type = type;
617 rdataset->covers = 0;
618 rdataset->ttl = ncacherdataset->ttl;
619 rdataset->trust = trust;
620 rdataset->private1 = NULL;
621 rdataset->private2 = NULL;
623 rdataset->private3 = remaining.base;
628 rdataset->privateuint4 = 0;
629 rdataset->private5 = NULL;
630 rdataset->private6 = NULL;
636 dns_rdatatype_t covers, dns_rdataset_t *rdataset)
654 REQUIRE(!dns_rdataset_isassociated(rdataset));
697 dns_rdata_fromregion(&rdata, rdataset->rdclass,
716 rdataset->methods = &rdataset_methods;
717 rdataset->rdclass = ncacherdataset->rdclass;
718 rdataset->type = dns_rdatatype_rrsig;
719 rdataset->covers = covers;
720 rdataset->ttl = ncacherdataset->ttl;
721 rdataset->trust = trust;
722 rdataset->private1 = NULL;
723 rdataset->private2 = NULL;
725 rdataset->private3 = remaining.base;
730 rdataset->privateuint4 = 0;
731 rdataset->private5 = NULL;
732 rdataset->private6 = NULL;
738 dns_rdataset_t *rdataset)
754 REQUIRE(!dns_rdataset_isassociated(rdataset));
773 rdataset->methods = &rdataset_methods;
774 rdataset->rdclass = ncacherdataset->rdclass;
775 rdataset->type = type;
788 dns_rdata_fromregion(&rdata, rdataset->rdclass,
789 rdataset->type, &sigregion);
791 rdataset->covers = rrsig.covered;
793 rdataset->covers = 0;
794 rdataset->ttl = ncacherdataset->ttl;
795 rdataset->trust = trust;
796 rdataset->private1 = NULL;
797 rdataset->private2 = NULL;
799 rdataset->private3 = remaining.base;
804 rdataset->privateuint4 = 0;
805 rdataset->private5 = NULL;
806 rdataset->private6 = NULL;