Lines Matching defs:txt

136 	dns_rdata_txt_t *txt = source;
141 REQUIRE(txt->common.rdtype == type);
142 REQUIRE(txt->common.rdclass == rdclass);
143 REQUIRE(txt->txt != NULL && txt->txt_len != 0);
148 region.base = txt->txt;
149 region.length = txt->txt_len;
158 return (mem_tobuffer(target, txt->txt, txt->txt_len));
163 dns_rdata_txt_t *txt = target;
167 REQUIRE(txt->common.rdclass == rdata->rdclass);
168 REQUIRE(txt->common.rdtype == rdata->type);
169 REQUIRE(!ISC_LINK_LINKED(&txt->common, link));
172 txt->txt_len = r.length;
173 txt->txt = mem_maybedup(mctx, r.base, r.length);
174 if (txt->txt == NULL)
177 txt->offset = 0;
178 txt->mctx = mctx;
184 dns_rdata_txt_t *txt = source;
188 if (txt->mctx == NULL)
191 if (txt->txt != NULL)
192 isc_mem_free(txt->mctx, txt->txt);
193 txt->mctx = NULL;
206 dns_rdata_txt_t *txt = target;
211 txt->common.rdclass = rdata->rdclass;
212 txt->common.rdtype = rdata->type;
213 ISC_LINK_INIT(&txt->common, link);
220 dns_rdata_txt_t *txt = source;
223 REQUIRE(txt->common.rdtype == dns_rdatatype_txt);
281 generic_txt_first(dns_rdata_txt_t *txt) {
283 REQUIRE(txt != NULL);
284 REQUIRE(txt->txt != NULL || txt->txt_len == 0);
286 if (txt->txt_len == 0)
289 txt->offset = 0;
294 generic_txt_next(dns_rdata_txt_t *txt) {
298 REQUIRE(txt != NULL);
299 REQUIRE(txt->txt != NULL && txt->txt_len != 0);
301 INSIST(txt->offset + 1 <= txt->txt_len);
302 r.base = txt->txt + txt->offset;
303 r.length = txt->txt_len - txt->offset;
305 INSIST(txt->offset + 1 + length <= txt->txt_len);
306 txt->offset = txt->offset + 1 + length;
307 if (txt->offset == txt->txt_len)
313 generic_txt_current(dns_rdata_txt_t *txt, dns_rdata_txt_string_t *string) {
316 REQUIRE(txt != NULL);
318 REQUIRE(txt->txt != NULL);
319 REQUIRE(txt->offset < txt->txt_len);
321 INSIST(txt->offset + 1 <= txt->txt_len);
322 r.base = txt->txt + txt->offset;
323 r.length = txt->txt_len - txt->offset;
328 INSIST(txt->offset + 1 + string->length <= txt->txt_len);
334 dns_rdata_txt_first(dns_rdata_txt_t *txt) {
336 REQUIRE(txt != NULL);
337 REQUIRE(txt->common.rdtype == dns_rdatatype_txt);
339 return (generic_txt_first(txt));
343 dns_rdata_txt_next(dns_rdata_txt_t *txt) {
345 REQUIRE(txt != NULL);
346 REQUIRE(txt->common.rdtype == dns_rdatatype_txt);
348 return (generic_txt_next(txt));
352 dns_rdata_txt_current(dns_rdata_txt_t *txt, dns_rdata_txt_string_t *string) {
354 REQUIRE(txt != NULL);
355 REQUIRE(txt->common.rdtype == dns_rdatatype_txt);
357 return (generic_txt_current(txt, string));