Lines Matching refs:apl

253 	dns_rdata_in_apl_t *apl = source;
259 REQUIRE(apl->common.rdtype == type);
260 REQUIRE(apl->common.rdclass == rdclass);
261 REQUIRE(apl->apl != NULL || apl->apl_len == 0);
263 isc_buffer_init(&b, apl->apl, apl->apl_len);
264 isc_buffer_add(&b, apl->apl_len);
265 isc_buffer_setactive(&b, apl->apl_len);
271 dns_rdata_in_apl_t *apl = target;
277 apl->common.rdclass = rdata->rdclass;
278 apl->common.rdtype = rdata->type;
279 ISC_LINK_INIT(&apl->common, link);
282 apl->apl_len = r.length;
283 apl->apl = mem_maybedup(mctx, r.base, r.length);
284 if (apl->apl == NULL)
287 apl->offset = 0;
288 apl->mctx = mctx;
294 dns_rdata_in_apl_t *apl = source;
297 REQUIRE(apl->common.rdtype == 42);
298 REQUIRE(apl->common.rdclass == 1);
300 if (apl->mctx == NULL)
302 if (apl->apl != NULL)
303 isc_mem_free(apl->mctx, apl->apl);
304 apl->mctx = NULL;
308 dns_rdata_apl_first(dns_rdata_in_apl_t *apl) {
311 REQUIRE(apl != NULL);
312 REQUIRE(apl->common.rdtype == 42);
313 REQUIRE(apl->common.rdclass == 1);
314 REQUIRE(apl->apl != NULL || apl->apl_len == 0);
319 if (apl->apl == NULL)
325 INSIST(apl->apl_len > 3U);
326 length = apl->apl[apl->offset + 3] & 0x7f;
327 INSIST(length <= apl->apl_len);
329 apl->offset = 0;
334 dns_rdata_apl_next(dns_rdata_in_apl_t *apl) {
337 REQUIRE(apl != NULL);
338 REQUIRE(apl->common.rdtype == 42);
339 REQUIRE(apl->common.rdclass == 1);
340 REQUIRE(apl->apl != NULL || apl->apl_len == 0);
345 if (apl->apl == NULL || apl->offset == apl->apl_len)
351 INSIST(apl->offset < apl->apl_len);
352 INSIST(apl->apl_len > 3U);
353 INSIST(apl->offset <= apl->apl_len - 4U);
354 length = apl->apl[apl->offset + 3] & 0x7f;
359 INSIST(length + apl->offset <= apl->apl_len);
361 apl->offset += apl->apl[apl->offset + 3] & 0x7f;
362 return ((apl->offset >= apl->apl_len) ? ISC_R_SUCCESS : ISC_R_NOMORE);
366 dns_rdata_apl_current(dns_rdata_in_apl_t *apl, dns_rdata_apl_ent_t *ent) {
369 REQUIRE(apl != NULL);
370 REQUIRE(apl->common.rdtype == 42);
371 REQUIRE(apl->common.rdclass == 1);
373 REQUIRE(apl->apl != NULL || apl->apl_len == 0);
374 REQUIRE(apl->offset <= apl->apl_len);
376 if (apl->offset == apl->apl_len)
382 INSIST(apl->apl_len > 3U);
383 INSIST(apl->offset <= apl->apl_len - 4U);
384 length = apl->apl[apl->offset + 3] & 0x7f;
389 INSIST(length + apl->offset <= apl->apl_len);
391 ent->family = (apl->apl[apl->offset] << 8) + apl->apl[apl->offset + 1];
392 ent->prefix = apl->apl[apl->offset + 2];
393 ent->length = apl->apl[apl->offset + 3] & 0x7f;
394 ent->negative = ISC_TF((apl->apl[apl->offset + 3] & 0x80) != 0);
396 ent->data = &apl->apl[apl->offset + 4];