Lines Matching refs:cp
425 if (cp + n > end) { \
431 static u_char *php_parserr(u_char *cp, u_char *end, querybuf *answer, int type_to_fetch, int store,… in php_parserr() argument
443 n = dn_expand(answer->qb2, end, cp, name, sizeof(name) - 2); in php_parserr()
447 cp += n; in php_parserr()
450 GETSHORT(type, cp); in php_parserr()
451 GETSHORT(class, cp); in php_parserr()
452 GETLONG(ttl, cp); in php_parserr()
453 GETSHORT(dlen, cp); in php_parserr()
460 cp += dlen; in php_parserr()
461 return cp; in php_parserr()
465 cp += dlen; in php_parserr()
466 return cp; in php_parserr()
478 add_assoc_stringl(subarray, "data", (char*) cp, (uint32_t) dlen); in php_parserr()
479 cp += dlen; in php_parserr()
480 return cp; in php_parserr()
487 snprintf(name, sizeof(name), "%d.%d.%d.%d", cp[0], cp[1], cp[2], cp[3]); in php_parserr()
489 cp += dlen; in php_parserr()
494 GETSHORT(n, cp); in php_parserr()
511 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
515 cp += n; in php_parserr()
522 n = *cp & 0xFF; in php_parserr()
523 cp++; in php_parserr()
525 add_assoc_stringl(subarray, "cpu", (char*)cp, n); in php_parserr()
526 cp += n; in php_parserr()
528 n = *cp & 0xFF; in php_parserr()
529 cp++; in php_parserr()
531 add_assoc_stringl(subarray, "os", (char*)cp, n); in php_parserr()
532 cp += n; in php_parserr()
539 n = *cp & 0xFF; in php_parserr()
541 cp++; in php_parserr()
544 n = *cp & 0xFF; in php_parserr()
545 cp++; in php_parserr()
547 add_assoc_stringl(subarray, "tag", (char*)cp, n); in php_parserr()
548 cp += n; in php_parserr()
554 add_assoc_stringl(subarray, "value", (char*)cp, n); in php_parserr()
555 cp += n; in php_parserr()
569 n = cp[l1]; in php_parserr()
575 memcpy(ZSTR_VAL(tp) + l2 , cp + l1 + 1, n); in php_parserr()
576 add_next_index_stringl(&entries, (char *) cp + l1 + 1, n); in php_parserr()
583 cp += dlen; in php_parserr()
591 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) -2); in php_parserr()
595 cp += n; in php_parserr()
597 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) -2); in php_parserr()
601 cp += n; in php_parserr()
604 GETLONG(n, cp); in php_parserr()
606 GETLONG(n, cp); in php_parserr()
608 GETLONG(n, cp); in php_parserr()
610 GETLONG(n, cp); in php_parserr()
612 GETLONG(n, cp); in php_parserr()
619 GETSHORT(s, cp); in php_parserr()
650 p = cp; in php_parserr()
653 n = ((int)cp[0]) & 0xFF; in php_parserr()
654 cp++; in php_parserr()
665 if (cp[0] != 0) { in php_parserr()
671 sprintf((char*)tp, "%x", cp[0] & 0xFF); in php_parserr()
685 cp++; in php_parserr()
689 GETSHORT(s, cp); in php_parserr()
717 if (cp < p + dlen) { in php_parserr()
718 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
722 cp += n; in php_parserr()
729 GETSHORT(n, cp); in php_parserr()
731 GETSHORT(n, cp); in php_parserr()
733 GETSHORT(n, cp); in php_parserr()
735 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
739 cp += n; in php_parserr()
745 GETSHORT(n, cp); in php_parserr()
747 GETSHORT(n, cp); in php_parserr()
751 n = (cp[0] & 0xFF); in php_parserr()
752 cp++; in php_parserr()
754 add_assoc_stringl(subarray, "flags", (char*)cp, n); in php_parserr()
755 cp += n; in php_parserr()
758 n = (cp[0] & 0xFF); in php_parserr()
759 cp++; in php_parserr()
761 add_assoc_stringl(subarray, "services", (char*)cp, n); in php_parserr()
762 cp += n; in php_parserr()
765 n = (cp[0] & 0xFF); in php_parserr()
766 cp++; in php_parserr()
768 add_assoc_stringl(subarray, "regex", (char*)cp, n); in php_parserr()
769 cp += n; in php_parserr()
771 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
775 cp += n; in php_parserr()
781 cp += dlen; in php_parserr()
785 return cp; in php_parserr()
808 u_char *cp = NULL, *end = NULL; in PHP_FUNCTION() local
964 cp = answer.qb2 + HFIXEDSZ; in PHP_FUNCTION()
974 n = dn_skipname(cp, end); in PHP_FUNCTION()
981 cp += n + QFIXEDSZ; in PHP_FUNCTION()
985 while (an-- && cp && cp < end) { in PHP_FUNCTION()
988 cp = php_parserr(cp, end, &answer, type_to_fetch, store_results, raw, &retval); in PHP_FUNCTION()
998 while (ns-- > 0 && cp && cp < end) { in PHP_FUNCTION()
1001 cp = php_parserr(cp, end, &answer, DNS_T_ANY, authns != NULL, raw, &retval); in PHP_FUNCTION()
1010 while (ar-- > 0 && cp && cp < end) { in PHP_FUNCTION()
1013 cp = php_parserr(cp, end, &answer, DNS_T_ANY, 1, raw, &retval); in PHP_FUNCTION()
1037 u_char *cp, *end; in PHP_FUNCTION() local
1083 cp = answer.qb2 + HFIXEDSZ; in PHP_FUNCTION()
1085 for (qdc = ntohs((unsigned short)hp->qdcount); qdc--; cp += i + QFIXEDSZ) { in PHP_FUNCTION()
1086 if ((i = dn_skipname(cp, end)) < 0 ) { in PHP_FUNCTION()
1092 while (--count >= 0 && cp < end) { in PHP_FUNCTION()
1093 if ((i = dn_skipname(cp, end)) < 0 ) { in PHP_FUNCTION()
1097 cp += i; in PHP_FUNCTION()
1098 GETSHORT(type, cp); in PHP_FUNCTION()
1099 cp += INT16SZ + INT32SZ; in PHP_FUNCTION()
1100 GETSHORT(i, cp); in PHP_FUNCTION()
1102 cp += i; in PHP_FUNCTION()
1105 GETSHORT(weight, cp); in PHP_FUNCTION()
1106 if ((i = dn_expand(answer.qb2, end, cp, buf, sizeof(buf)-1)) < 0) { in PHP_FUNCTION()
1110 cp += i; in PHP_FUNCTION()