Lines Matching defs:doa

188 	dns_rdata_doa_t *doa = source;
192 REQUIRE(doa->common.rdtype == dns_rdatatype_doa);
193 REQUIRE(doa->common.rdclass == rdclass);
195 RETERR(uint32_tobuffer(doa->enterprise, target));
196 RETERR(uint32_tobuffer(doa->type, target));
197 RETERR(uint8_tobuffer(doa->location, target));
198 RETERR(uint8_tobuffer(doa->mediatype_len, target));
199 RETERR(mem_tobuffer(target, doa->mediatype, doa->mediatype_len));
200 return (mem_tobuffer(target, doa->data, doa->data_len));
205 dns_rdata_doa_t *doa = target;
212 doa->common.rdclass = rdata->rdclass;
213 doa->common.rdtype = rdata->type;
214 ISC_LINK_INIT(&doa->common, link);
224 doa->enterprise = uint32_fromregion(&region);
233 doa->type = uint32_fromregion(&region);
242 doa->location = uint8_fromregion(&region);
251 doa->mediatype_len = uint8_fromregion(&region);
253 INSIST(doa->mediatype_len <= region.length);
254 doa->mediatype = mem_maybedup(mctx, region.base, doa->mediatype_len);
255 if (doa->mediatype == NULL) {
258 isc_region_consume(&region, doa->mediatype_len);
263 doa->data_len = region.length;
264 doa->data = NULL;
265 if (doa->data_len > 0) {
266 doa->data = mem_maybedup(mctx, region.base, doa->data_len);
267 if (doa->data == NULL) {
270 isc_region_consume(&region, doa->data_len);
273 doa->mctx = mctx;
278 if (mctx != NULL && doa->mediatype != NULL) {
279 isc_mem_free(mctx, doa->mediatype);
286 dns_rdata_doa_t *doa = source;
289 REQUIRE(doa->common.rdtype == dns_rdatatype_doa);
291 if (doa->mctx == NULL) {
295 if (doa->mediatype != NULL) {
296 isc_mem_free(doa->mctx, doa->mediatype);
298 if (doa->data != NULL) {
299 isc_mem_free(doa->mctx, doa->data);
302 doa->mctx = NULL;