Lines Matching refs:cp
460 if (cp + n > end) { \
466 static u_char *php_parserr(u_char *cp, u_char *end, querybuf *answer, int type_to_fetch, int store,… in php_parserr() argument
478 n = dn_expand(answer->qb2, end, cp, name, sizeof(name) - 2); in php_parserr()
482 cp += n; in php_parserr()
485 GETSHORT(type, cp); in php_parserr()
486 GETSHORT(class, cp); in php_parserr()
487 GETLONG(ttl, cp); in php_parserr()
488 GETSHORT(dlen, cp); in php_parserr()
495 cp += dlen; in php_parserr()
496 return cp; in php_parserr()
500 cp += dlen; in php_parserr()
501 return cp; in php_parserr()
513 add_assoc_stringl(subarray, "data", (char*) cp, (uint32_t) dlen); in php_parserr()
514 cp += dlen; in php_parserr()
515 return cp; in php_parserr()
522 snprintf(name, sizeof(name), "%d.%d.%d.%d", cp[0], cp[1], cp[2], cp[3]); in php_parserr()
524 cp += dlen; in php_parserr()
529 GETSHORT(n, cp); in php_parserr()
546 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
550 cp += n; in php_parserr()
557 n = *cp & 0xFF; in php_parserr()
558 cp++; in php_parserr()
560 add_assoc_stringl(subarray, "cpu", (char*)cp, n); in php_parserr()
561 cp += n; in php_parserr()
563 n = *cp & 0xFF; in php_parserr()
564 cp++; in php_parserr()
566 add_assoc_stringl(subarray, "os", (char*)cp, n); in php_parserr()
567 cp += n; in php_parserr()
574 n = *cp & 0xFF; in php_parserr()
576 cp++; in php_parserr()
579 n = *cp & 0xFF; in php_parserr()
580 cp++; in php_parserr()
582 add_assoc_stringl(subarray, "tag", (char*)cp, n); in php_parserr()
583 cp += n; in php_parserr()
589 add_assoc_stringl(subarray, "value", (char*)cp, n); in php_parserr()
590 cp += n; in php_parserr()
604 n = cp[l1]; in php_parserr()
610 memcpy(ZSTR_VAL(tp) + l2 , cp + l1 + 1, n); in php_parserr()
611 add_next_index_stringl(&entries, (char *) cp + l1 + 1, n); in php_parserr()
618 cp += dlen; in php_parserr()
626 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) -2); in php_parserr()
630 cp += n; in php_parserr()
632 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) -2); in php_parserr()
636 cp += n; in php_parserr()
639 GETLONG(n, cp); in php_parserr()
641 GETLONG(n, cp); in php_parserr()
643 GETLONG(n, cp); in php_parserr()
645 GETLONG(n, cp); in php_parserr()
647 GETLONG(n, cp); in php_parserr()
654 GETSHORT(s, cp); in php_parserr()
685 p = cp; in php_parserr()
688 n = ((int)cp[0]) & 0xFF; in php_parserr()
689 cp++; in php_parserr()
700 if (cp[0] != 0) { in php_parserr()
706 sprintf((char*)tp, "%x", cp[0] & 0xFF); in php_parserr()
720 cp++; in php_parserr()
724 GETSHORT(s, cp); in php_parserr()
752 if (cp < p + dlen) { in php_parserr()
753 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
757 cp += n; in php_parserr()
764 GETSHORT(n, cp); in php_parserr()
766 GETSHORT(n, cp); in php_parserr()
768 GETSHORT(n, cp); in php_parserr()
770 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
774 cp += n; in php_parserr()
780 GETSHORT(n, cp); in php_parserr()
782 GETSHORT(n, cp); in php_parserr()
786 n = (cp[0] & 0xFF); in php_parserr()
787 cp++; in php_parserr()
789 add_assoc_stringl(subarray, "flags", (char*)cp, n); in php_parserr()
790 cp += n; in php_parserr()
793 n = (cp[0] & 0xFF); in php_parserr()
794 cp++; in php_parserr()
796 add_assoc_stringl(subarray, "services", (char*)cp, n); in php_parserr()
797 cp += n; in php_parserr()
800 n = (cp[0] & 0xFF); in php_parserr()
801 cp++; in php_parserr()
803 add_assoc_stringl(subarray, "regex", (char*)cp, n); in php_parserr()
804 cp += n; in php_parserr()
806 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
810 cp += n; in php_parserr()
816 cp += dlen; in php_parserr()
820 return cp; in php_parserr()
843 u_char *cp = NULL, *end = NULL; in PHP_FUNCTION() local
1003 cp = answer.qb2 + HFIXEDSZ; in PHP_FUNCTION()
1013 n = dn_skipname(cp, end); in PHP_FUNCTION()
1020 cp += n + QFIXEDSZ; in PHP_FUNCTION()
1024 while (an-- && cp && cp < end) { in PHP_FUNCTION()
1027 cp = php_parserr(cp, end, &answer, type_to_fetch, store_results, raw, &retval); in PHP_FUNCTION()
1037 while (ns-- > 0 && cp && cp < end) { in PHP_FUNCTION()
1040 cp = php_parserr(cp, end, &answer, DNS_T_ANY, authns != NULL, raw, &retval); in PHP_FUNCTION()
1049 while (ar-- > 0 && cp && cp < end) { in PHP_FUNCTION()
1052 cp = php_parserr(cp, end, &answer, DNS_T_ANY, 1, raw, &retval); in PHP_FUNCTION()
1075 u_char *cp, *end; in PHP_FUNCTION() local
1125 cp = answer.qb2 + HFIXEDSZ; in PHP_FUNCTION()
1127 for (qdc = ntohs((unsigned short)hp->qdcount); qdc--; cp += i + QFIXEDSZ) { in PHP_FUNCTION()
1128 if ((i = dn_skipname(cp, end)) < 0 ) { in PHP_FUNCTION()
1134 while (--count >= 0 && cp < end) { in PHP_FUNCTION()
1135 if ((i = dn_skipname(cp, end)) < 0 ) { in PHP_FUNCTION()
1139 cp += i; in PHP_FUNCTION()
1140 GETSHORT(type, cp); in PHP_FUNCTION()
1141 cp += INT16SZ + INT32SZ; in PHP_FUNCTION()
1142 GETSHORT(i, cp); in PHP_FUNCTION()
1144 cp += i; in PHP_FUNCTION()
1147 GETSHORT(weight, cp); in PHP_FUNCTION()
1148 if ((i = dn_expand(answer.qb2, end, cp, buf, sizeof(buf)-1)) < 0) { in PHP_FUNCTION()
1152 cp += i; in PHP_FUNCTION()