Lines Matching defs:nsec
127 dns_rdata_nsec_t *nsec = source;
132 REQUIRE(nsec->common.rdtype == type);
133 REQUIRE(nsec->common.rdclass == rdclass);
134 REQUIRE(nsec->typebits != NULL || nsec->len == 0);
139 dns_name_toregion(&nsec->next, ®ion);
142 region.base = nsec->typebits;
143 region.length = nsec->len;
145 return (mem_tobuffer(target, nsec->typebits, nsec->len));
151 dns_rdata_nsec_t *nsec = target;
158 nsec->common.rdclass = rdata->rdclass;
159 nsec->common.rdtype = rdata->type;
160 ISC_LINK_INIT(&nsec->common, link);
166 dns_name_init(&nsec->next, NULL);
167 RETERR(name_duporclone(&name, mctx, &nsec->next));
169 nsec->len = region.length;
170 nsec->typebits = mem_maybedup(mctx, region.base, region.length);
171 if (nsec->typebits == NULL)
174 nsec->mctx = mctx;
179 dns_name_free(&nsec->next, mctx);
185 dns_rdata_nsec_t *nsec = source;
188 REQUIRE(nsec->common.rdtype == dns_rdatatype_nsec);
190 if (nsec->mctx == NULL)
193 dns_name_free(&nsec->next, nsec->mctx);
194 if (nsec->typebits != NULL)
195 isc_mem_free(nsec->mctx, nsec->typebits);
196 nsec->mctx = NULL;