• Home
  • Raw
  • Download

Lines Matching refs:ansp

283 static unsigned char *skip_name(unsigned char *ansp, HEADER *header, size_t plen, int extrabytes)  in skip_name()  argument
289 if (!CHECK_LEN(header, ansp, plen, 1)) in skip_name()
292 label_type = (*ansp) & 0xc0; in skip_name()
297 ansp += 2; in skip_name()
307 if (!CHECK_LEN(header, ansp, plen, 2)) in skip_name()
310 if (((*ansp++) & 0x3f) != 1) in skip_name()
313 count = *(ansp++); /* Bits in bitstring */ in skip_name()
316 ansp += 32; in skip_name()
318 ansp += ((count-1)>>3)+1; in skip_name()
322 unsigned int len = (*ansp++) & 0x3f; in skip_name()
324 if (!ADD_RDLEN(header, ansp, plen, len)) in skip_name()
332 if (!CHECK_LEN(header, ansp, plen, extrabytes)) in skip_name()
335 return ansp; in skip_name()
341 unsigned char *ansp = (unsigned char *)(header+1); in skip_questions() local
345 if (!(ansp = skip_name(ansp, header, plen, 4))) in skip_questions()
347 ansp += 4; /* class and type */ in skip_questions()
350 return ansp; in skip_questions()
353 static unsigned char *skip_section(unsigned char *ansp, int count, HEADER *header, size_t plen) in skip_section() argument
359 if (!(ansp = skip_name(ansp, header, plen, 10))) in skip_section()
361 ansp += 8; /* type, class, TTL */ in skip_section()
362 GETSHORT(rdlen, ansp); in skip_section()
363 if (!ADD_RDLEN(header, ansp, plen, rdlen)) in skip_section()
367 return ansp; in skip_section()
420 unsigned char *ansp = skip_questions(header, plen); in resize_packet() local
423 if (!ansp) in resize_packet()
426 …if (!(ansp = skip_section(ansp, ntohs(header->ancount) + ntohs(header->nscount) + ntohs(header->ar… in resize_packet()
434 memmove(ansp, pheader, hlen); in resize_packet()
436 ansp += hlen; in resize_packet()
439 return ansp - (unsigned char *)header; in resize_packet()
450 unsigned char *ansp = (unsigned char *)(header+1); in find_pseudoheader() local
462 if (!(ansp = skip_name(ansp, header, plen, 4))) in find_pseudoheader()
465 GETSHORT(type, ansp); in find_pseudoheader()
466 GETSHORT(class, ansp); in find_pseudoheader()
475 if (!(ansp = skip_questions(header, plen))) in find_pseudoheader()
482 if (!(ansp = skip_section(ansp, ntohs(header->ancount) + ntohs(header->nscount), header, plen))) in find_pseudoheader()
487 unsigned char *save, *start = ansp; in find_pseudoheader()
488 if (!(ansp = skip_name(ansp, header, plen, 10))) in find_pseudoheader()
491 GETSHORT(type, ansp); in find_pseudoheader()
492 save = ansp; in find_pseudoheader()
493 GETSHORT(class, ansp); in find_pseudoheader()
494 ansp += 4; /* TTL */ in find_pseudoheader()
495 GETSHORT(rdlen, ansp); in find_pseudoheader()
496 if (!ADD_RDLEN(header, ansp, plen, rdlen)) in find_pseudoheader()
501 *len = ansp - start; in find_pseudoheader()
1134 unsigned char *p, *ansp, *pheader; in answer_request() local
1184 if (!(ansp = skip_questions(header, qlen))) in answer_request()
1215 if (add_resource_record(header, limit, &trunc, nameoffset, &ansp, in answer_request()
1254 if (add_resource_record(header, limit, &trunc, nameoffset, &ansp, in answer_request()
1268 add_resource_record(header, limit, &trunc, nameoffset, &ansp, in answer_request()
1301 if (add_resource_record(header, limit, &trunc, nameoffset, &ansp, in answer_request()
1342 if (add_resource_record(header, limit, &trunc, nameoffset, &ansp, in answer_request()
1368 if (add_resource_record(header, limit, &trunc, nameoffset, &ansp, in answer_request()
1410 if (add_resource_record(header, limit, &trunc, nameoffset, &ansp, in answer_request()
1447 if (add_resource_record(header, limit, &trunc, nameoffset, &ansp, in answer_request()
1468 if (add_resource_record(header, limit, &trunc, nameoffset, &ansp, daemon->local_ttl, in answer_request()
1485 if (add_resource_record(header, limit, &trunc, nameoffset, &ansp, daemon->local_ttl, NULL, in answer_request()
1505 if (add_resource_record(header, limit, &trunc, nameoffset, &ansp, daemon->local_ttl, in answer_request()
1534 if (add_resource_record(header, limit, &trunc, nameoffset, &ansp, daemon->local_ttl, in answer_request()
1584 if (add_resource_record(header, limit, NULL, rec->offset, &ansp, in answer_request()
1603 return ansp - (unsigned char *)header; in answer_request()