• Home
  • Raw
  • Download

Lines Matching refs:aptr

144 static const unsigned char *display_question(const unsigned char *aptr,
147 static const unsigned char *display_rr(const unsigned char *aptr,
392 const unsigned char *aptr; in callback() local
441 aptr = abuf + HFIXEDSZ; in callback()
444 aptr = display_question(aptr, abuf, alen); in callback()
445 if (aptr == NULL) in callback()
453 aptr = display_rr(aptr, abuf, alen); in callback()
454 if (aptr == NULL) in callback()
462 aptr = display_rr(aptr, abuf, alen); in callback()
463 if (aptr == NULL) in callback()
471 aptr = display_rr(aptr, abuf, alen); in callback()
472 if (aptr == NULL) in callback()
477 static const unsigned char *display_question(const unsigned char *aptr, in display_question() argument
486 status = ares_expand_name(aptr, abuf, alen, &name, &len); in display_question()
489 aptr += len; in display_question()
494 if (aptr + QFIXEDSZ > abuf + alen) in display_question()
501 type = DNS_QUESTION_TYPE(aptr); in display_question()
502 dnsclass = DNS_QUESTION_CLASS(aptr); in display_question()
503 aptr += QFIXEDSZ; in display_question()
513 return aptr; in display_question()
516 static const unsigned char *display_rr(const unsigned char *aptr, in display_rr() argument
530 status = ares_expand_name(aptr, abuf, alen, &name.as_char, &len); in display_rr()
533 aptr += len; in display_rr()
538 if (aptr + RRFIXEDSZ > abuf + alen) in display_rr()
546 type = DNS_RR_TYPE(aptr); in display_rr()
547 dnsclass = DNS_RR_CLASS(aptr); in display_rr()
548 ttl = DNS_RR_TTL(aptr); in display_rr()
549 dlen = DNS_RR_LEN(aptr); in display_rr()
550 aptr += RRFIXEDSZ; in display_rr()
551 if (aptr + dlen > abuf + alen) in display_rr()
576 status = ares_expand_name(aptr, abuf, alen, &name.as_char, &len); in display_rr()
585 p = aptr; in display_rr()
587 if (p + len + 1 > aptr + dlen) in display_rr()
596 if (p + len + 1 > aptr + dlen) in display_rr()
607 p = aptr; in display_rr()
627 printf("\t%d", (int)DNS__16BIT(aptr)); in display_rr()
628 status = ares_expand_name(aptr + 2, abuf, alen, &name.as_char, &len); in display_rr()
639 p = aptr; in display_rr()
652 if (p + 20 > aptr + dlen) in display_rr()
663 p = aptr; in display_rr()
664 while (p < aptr + dlen) in display_rr()
667 if (p + len + 1 > aptr + dlen) in display_rr()
680 p = aptr; in display_rr()
711 printf("\t%s", ares_inet_ntop(AF_INET,aptr,addr,sizeof(addr))); in display_rr()
718 printf("\t%s", ares_inet_ntop(AF_INET6,aptr,addr,sizeof(addr))); in display_rr()
730 printf("\t%d", (int)DNS__16BIT(aptr)); in display_rr()
731 printf(" %d", (int)DNS__16BIT(aptr + 2)); in display_rr()
732 printf(" %d", (int)DNS__16BIT(aptr + 4)); in display_rr()
734 status = ares_expand_name(aptr + 6, abuf, alen, &name.as_char, &len); in display_rr()
746 printf("\t%d ", (int)DNS__16BIT(aptr)); in display_rr()
747 printf("%d \t\t", (int)DNS__16BIT(aptr+2)); in display_rr()
748 p = aptr +4; in display_rr()
755 printf("\t%d", (int)DNS__16BIT(aptr)); /* order */ in display_rr()
756 printf(" %d\n", (int)DNS__16BIT(aptr + 2)); /* preference */ in display_rr()
758 p = aptr + 4; in display_rr()
801 return aptr + dlen; in display_rr()