Lines Matching defs:isdn
118 dns_rdata_isdn_t *isdn = source;
122 REQUIRE(isdn->common.rdtype == type);
123 REQUIRE(isdn->common.rdclass == rdclass);
128 RETERR(uint8_tobuffer(isdn->isdn_len, target));
129 RETERR(mem_tobuffer(target, isdn->isdn, isdn->isdn_len));
130 if (isdn->subaddress == NULL)
132 RETERR(uint8_tobuffer(isdn->subaddress_len, target));
133 return (mem_tobuffer(target, isdn->subaddress, isdn->subaddress_len));
138 dns_rdata_isdn_t *isdn = target;
145 isdn->common.rdclass = rdata->rdclass;
146 isdn->common.rdtype = rdata->type;
147 ISC_LINK_INIT(&isdn->common, link);
151 isdn->isdn_len = uint8_fromregion(&r);
153 isdn->isdn = mem_maybedup(mctx, r.base, isdn->isdn_len);
154 if (isdn->isdn == NULL)
156 isc_region_consume(&r, isdn->isdn_len);
159 isdn->subaddress_len = 0;
160 isdn->subaddress = NULL;
162 isdn->subaddress_len = uint8_fromregion(&r);
164 isdn->subaddress = mem_maybedup(mctx, r.base,
165 isdn->subaddress_len);
166 if (isdn->subaddress == NULL)
170 isdn->mctx = mctx;
174 if (mctx != NULL && isdn->isdn != NULL)
175 isc_mem_free(mctx, isdn->isdn);
181 dns_rdata_isdn_t *isdn = source;
185 if (isdn->mctx == NULL)
188 if (isdn->isdn != NULL)
189 isc_mem_free(isdn->mctx, isdn->isdn);
190 if (isdn->subaddress != NULL)
191 isc_mem_free(isdn->mctx, isdn->subaddress);
192 isdn->mctx = NULL;