Lines Matching refs:cp
443 if (cp + n > end) { \
449 static uint8_t *php_parserr(uint8_t *cp, uint8_t *end, querybuf *answer, int type_to_fetch, int sto… in php_parserr() argument
461 n = dn_expand(answer->qb2, end, cp, name, sizeof(name) - 2); in php_parserr()
465 cp += n; in php_parserr()
468 GETSHORT(type, cp); in php_parserr()
469 GETSHORT(class, cp); in php_parserr()
470 GETLONG(ttl, cp); in php_parserr()
471 GETSHORT(dlen, cp); in php_parserr()
478 cp += dlen; in php_parserr()
479 return cp; in php_parserr()
483 cp += dlen; in php_parserr()
484 return cp; in php_parserr()
496 add_assoc_stringl(subarray, "data", (char*) cp, (uint32_t) dlen); in php_parserr()
497 cp += dlen; in php_parserr()
498 return cp; in php_parserr()
505 snprintf(name, sizeof(name), "%d.%d.%d.%d", cp[0], cp[1], cp[2], cp[3]); in php_parserr()
507 cp += dlen; in php_parserr()
512 GETSHORT(n, cp); in php_parserr()
529 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
533 cp += n; in php_parserr()
540 n = *cp & 0xFF; in php_parserr()
541 cp++; in php_parserr()
543 add_assoc_stringl(subarray, "cpu", (char*)cp, n); in php_parserr()
544 cp += n; in php_parserr()
546 n = *cp & 0xFF; in php_parserr()
547 cp++; in php_parserr()
549 add_assoc_stringl(subarray, "os", (char*)cp, n); in php_parserr()
550 cp += n; in php_parserr()
557 n = *cp & 0xFF; in php_parserr()
559 cp++; in php_parserr()
562 n = *cp & 0xFF; in php_parserr()
563 cp++; in php_parserr()
565 add_assoc_stringl(subarray, "tag", (char*)cp, n); in php_parserr()
566 cp += n; in php_parserr()
572 add_assoc_stringl(subarray, "value", (char*)cp, n); in php_parserr()
573 cp += n; in php_parserr()
587 n = cp[l1]; in php_parserr()
593 memcpy(ZSTR_VAL(tp) + l2 , cp + l1 + 1, n); in php_parserr()
594 add_next_index_stringl(&entries, (char *) cp + l1 + 1, n); in php_parserr()
601 cp += dlen; in php_parserr()
609 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) -2); in php_parserr()
613 cp += n; in php_parserr()
615 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) -2); in php_parserr()
619 cp += n; in php_parserr()
622 GETLONG(n, cp); in php_parserr()
624 GETLONG(n, cp); in php_parserr()
626 GETLONG(n, cp); in php_parserr()
628 GETLONG(n, cp); in php_parserr()
630 GETLONG(n, cp); in php_parserr()
637 GETSHORT(s, cp); in php_parserr()
668 p = cp; in php_parserr()
671 n = ((int)cp[0]) & 0xFF; in php_parserr()
672 cp++; in php_parserr()
683 if (cp[0] != 0) { in php_parserr()
689 snprintf((char*)tp, sizeof(name) - (tp - (uint8_t *) name), "%x", cp[0] & 0xFF); in php_parserr()
703 cp++; in php_parserr()
707 GETSHORT(s, cp); in php_parserr()
735 if (cp < p + dlen) { in php_parserr()
736 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
740 cp += n; in php_parserr()
747 GETSHORT(n, cp); in php_parserr()
749 GETSHORT(n, cp); in php_parserr()
751 GETSHORT(n, cp); in php_parserr()
753 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
757 cp += n; in php_parserr()
763 GETSHORT(n, cp); in php_parserr()
765 GETSHORT(n, cp); in php_parserr()
769 n = (cp[0] & 0xFF); in php_parserr()
770 cp++; in php_parserr()
772 add_assoc_stringl(subarray, "flags", (char*)cp, n); in php_parserr()
773 cp += n; in php_parserr()
776 n = (cp[0] & 0xFF); in php_parserr()
777 cp++; in php_parserr()
779 add_assoc_stringl(subarray, "services", (char*)cp, n); in php_parserr()
780 cp += n; in php_parserr()
783 n = (cp[0] & 0xFF); in php_parserr()
784 cp++; in php_parserr()
786 add_assoc_stringl(subarray, "regex", (char*)cp, n); in php_parserr()
787 cp += n; in php_parserr()
789 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
793 cp += n; in php_parserr()
799 cp += dlen; in php_parserr()
803 return cp; in php_parserr()
826 uint8_t *cp = NULL, *end = NULL; in PHP_FUNCTION() local
986 cp = answer.qb2 + HFIXEDSZ; in PHP_FUNCTION()
996 n = dn_skipname(cp, end); in PHP_FUNCTION()
1003 cp += n + QFIXEDSZ; in PHP_FUNCTION()
1007 while (an-- && cp && cp < end) { in PHP_FUNCTION()
1010 cp = php_parserr(cp, end, &answer, type_to_fetch, store_results, raw, &retval); in PHP_FUNCTION()
1020 while (ns-- > 0 && cp && cp < end) { in PHP_FUNCTION()
1023 cp = php_parserr(cp, end, &answer, DNS_T_ANY, authns != NULL, raw, &retval); in PHP_FUNCTION()
1032 while (ar-- > 0 && cp && cp < end) { in PHP_FUNCTION()
1035 cp = php_parserr(cp, end, &answer, DNS_T_ANY, 1, raw, &retval); in PHP_FUNCTION()
1058 uint8_t *cp, *end; in PHP_FUNCTION() local
1108 cp = answer.qb2 + HFIXEDSZ; in PHP_FUNCTION()
1110 for (qdc = ntohs((unsigned short)hp->qdcount); qdc--; cp += i + QFIXEDSZ) { in PHP_FUNCTION()
1111 if ((i = dn_skipname(cp, end)) < 0 ) { in PHP_FUNCTION()
1117 while (--count >= 0 && cp < end) { in PHP_FUNCTION()
1118 if ((i = dn_skipname(cp, end)) < 0 ) { in PHP_FUNCTION()
1122 cp += i; in PHP_FUNCTION()
1123 GETSHORT(type, cp); in PHP_FUNCTION()
1124 cp += INT16SZ + INT32SZ; in PHP_FUNCTION()
1125 GETSHORT(i, cp); in PHP_FUNCTION()
1127 cp += i; in PHP_FUNCTION()
1130 GETSHORT(weight, cp); in PHP_FUNCTION()
1131 if ((i = dn_expand(answer.qb2, end, cp, buf, sizeof(buf)-1)) < 0) { in PHP_FUNCTION()
1135 cp += i; in PHP_FUNCTION()