Lines Matching refs:cp
429 if (cp + n > end) { \
435 static u_char *php_parserr(u_char *cp, u_char *end, querybuf *answer, int type_to_fetch, int store,… in php_parserr() argument
447 n = dn_expand(answer->qb2, end, cp, name, sizeof(name) - 2); in php_parserr()
451 cp += n; in php_parserr()
454 GETSHORT(type, cp); in php_parserr()
455 GETSHORT(class, cp); in php_parserr()
456 GETLONG(ttl, cp); in php_parserr()
457 GETSHORT(dlen, cp); in php_parserr()
464 cp += dlen; in php_parserr()
465 return cp; in php_parserr()
469 cp += dlen; in php_parserr()
470 return cp; in php_parserr()
482 add_assoc_stringl(subarray, "data", (char*) cp, (uint32_t) dlen); in php_parserr()
483 cp += dlen; in php_parserr()
484 return cp; in php_parserr()
491 snprintf(name, sizeof(name), "%d.%d.%d.%d", cp[0], cp[1], cp[2], cp[3]); in php_parserr()
493 cp += dlen; in php_parserr()
498 GETSHORT(n, cp); in php_parserr()
515 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
519 cp += n; in php_parserr()
526 n = *cp & 0xFF; in php_parserr()
527 cp++; in php_parserr()
529 add_assoc_stringl(subarray, "cpu", (char*)cp, n); in php_parserr()
530 cp += n; in php_parserr()
532 n = *cp & 0xFF; in php_parserr()
533 cp++; in php_parserr()
535 add_assoc_stringl(subarray, "os", (char*)cp, n); in php_parserr()
536 cp += n; in php_parserr()
543 n = *cp & 0xFF; in php_parserr()
545 cp++; in php_parserr()
548 n = *cp & 0xFF; in php_parserr()
549 cp++; in php_parserr()
551 add_assoc_stringl(subarray, "tag", (char*)cp, n); in php_parserr()
552 cp += n; in php_parserr()
558 add_assoc_stringl(subarray, "value", (char*)cp, n); in php_parserr()
559 cp += n; in php_parserr()
573 n = cp[l1]; in php_parserr()
579 memcpy(ZSTR_VAL(tp) + l2 , cp + l1 + 1, n); in php_parserr()
580 add_next_index_stringl(&entries, (char *) cp + l1 + 1, n); in php_parserr()
587 cp += dlen; in php_parserr()
595 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) -2); in php_parserr()
599 cp += n; in php_parserr()
601 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) -2); in php_parserr()
605 cp += n; in php_parserr()
608 GETLONG(n, cp); in php_parserr()
610 GETLONG(n, cp); in php_parserr()
612 GETLONG(n, cp); in php_parserr()
614 GETLONG(n, cp); in php_parserr()
616 GETLONG(n, cp); in php_parserr()
623 GETSHORT(s, cp); in php_parserr()
654 p = cp; in php_parserr()
657 n = ((int)cp[0]) & 0xFF; in php_parserr()
658 cp++; in php_parserr()
669 if (cp[0] != 0) { in php_parserr()
675 sprintf((char*)tp, "%x", cp[0] & 0xFF); in php_parserr()
689 cp++; in php_parserr()
693 GETSHORT(s, cp); in php_parserr()
721 if (cp < p + dlen) { in php_parserr()
722 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
726 cp += n; in php_parserr()
733 GETSHORT(n, cp); in php_parserr()
735 GETSHORT(n, cp); in php_parserr()
737 GETSHORT(n, cp); in php_parserr()
739 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
743 cp += n; in php_parserr()
749 GETSHORT(n, cp); in php_parserr()
751 GETSHORT(n, cp); in php_parserr()
755 n = (cp[0] & 0xFF); in php_parserr()
756 cp++; in php_parserr()
758 add_assoc_stringl(subarray, "flags", (char*)cp, n); in php_parserr()
759 cp += n; in php_parserr()
762 n = (cp[0] & 0xFF); in php_parserr()
763 cp++; in php_parserr()
765 add_assoc_stringl(subarray, "services", (char*)cp, n); in php_parserr()
766 cp += n; in php_parserr()
769 n = (cp[0] & 0xFF); in php_parserr()
770 cp++; in php_parserr()
772 add_assoc_stringl(subarray, "regex", (char*)cp, n); in php_parserr()
773 cp += n; in php_parserr()
775 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
779 cp += n; in php_parserr()
785 cp += dlen; in php_parserr()
789 return cp; in php_parserr()
812 u_char *cp = NULL, *end = NULL; in PHP_FUNCTION() local
968 cp = answer.qb2 + HFIXEDSZ; in PHP_FUNCTION()
978 n = dn_skipname(cp, end); in PHP_FUNCTION()
985 cp += n + QFIXEDSZ; in PHP_FUNCTION()
989 while (an-- && cp && cp < end) { in PHP_FUNCTION()
992 cp = php_parserr(cp, end, &answer, type_to_fetch, store_results, raw, &retval); in PHP_FUNCTION()
1002 while (ns-- > 0 && cp && cp < end) { in PHP_FUNCTION()
1005 cp = php_parserr(cp, end, &answer, DNS_T_ANY, authns != NULL, raw, &retval); in PHP_FUNCTION()
1014 while (ar-- > 0 && cp && cp < end) { in PHP_FUNCTION()
1017 cp = php_parserr(cp, end, &answer, DNS_T_ANY, 1, raw, &retval); in PHP_FUNCTION()
1041 u_char *cp, *end; in PHP_FUNCTION() local
1089 cp = (u_char *)&ans + HFIXEDSZ; in PHP_FUNCTION()
1091 for (qdc = ntohs((unsigned short)hp->qdcount); qdc--; cp += i + QFIXEDSZ) { in PHP_FUNCTION()
1092 if ((i = dn_skipname(cp, end)) < 0 ) { in PHP_FUNCTION()
1098 while (--count >= 0 && cp < end) { in PHP_FUNCTION()
1099 if ((i = dn_skipname(cp, end)) < 0 ) { in PHP_FUNCTION()
1103 cp += i; in PHP_FUNCTION()
1104 GETSHORT(type, cp); in PHP_FUNCTION()
1105 cp += INT16SZ + INT32SZ; in PHP_FUNCTION()
1106 GETSHORT(i, cp); in PHP_FUNCTION()
1108 cp += i; in PHP_FUNCTION()
1111 GETSHORT(weight, cp); in PHP_FUNCTION()
1112 if ((i = dn_expand(ans, end, cp, buf, sizeof(buf)-1)) < 0) { in PHP_FUNCTION()
1116 cp += i; in PHP_FUNCTION()