Lines Matching refs:cp
427 if (cp + n > end) { \
433 static u_char *php_parserr(u_char *cp, u_char *end, querybuf *answer, int type_to_fetch, int store,… in php_parserr() argument
445 n = dn_expand(answer->qb2, end, cp, name, sizeof(name) - 2); in php_parserr()
449 cp += n; in php_parserr()
452 GETSHORT(type, cp); in php_parserr()
453 GETSHORT(class, cp); in php_parserr()
454 GETLONG(ttl, cp); in php_parserr()
455 GETSHORT(dlen, cp); in php_parserr()
458 cp += dlen; in php_parserr()
459 return cp; in php_parserr()
463 cp += dlen; in php_parserr()
464 return cp; in php_parserr()
476 add_assoc_stringl(*subarray, "data", (char*) cp, (uint) dlen, 1); in php_parserr()
477 cp += dlen; in php_parserr()
478 return cp; in php_parserr()
485 snprintf(name, sizeof(name), "%d.%d.%d.%d", cp[0], cp[1], cp[2], cp[3]); in php_parserr()
487 cp += dlen; in php_parserr()
492 GETSHORT(n, cp); in php_parserr()
509 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
513 cp += n; in php_parserr()
520 n = *cp & 0xFF; in php_parserr()
521 cp++; in php_parserr()
523 add_assoc_stringl(*subarray, "cpu", (char*)cp, n, 1); in php_parserr()
524 cp += n; in php_parserr()
526 n = *cp & 0xFF; in php_parserr()
527 cp++; in php_parserr()
529 add_assoc_stringl(*subarray, "os", (char*)cp, n, 1); in php_parserr()
530 cp += n; in php_parserr()
544 n = cp[l1]; in php_parserr()
550 memcpy(tp + l2 , cp + l1 + 1, n); in php_parserr()
551 add_next_index_stringl(entries, cp + l1 + 1, n, 1); in php_parserr()
557 cp += dlen; in php_parserr()
565 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) -2); in php_parserr()
569 cp += n; in php_parserr()
571 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) -2); in php_parserr()
575 cp += n; in php_parserr()
578 GETLONG(n, cp); in php_parserr()
580 GETLONG(n, cp); in php_parserr()
582 GETLONG(n, cp); in php_parserr()
584 GETLONG(n, cp); in php_parserr()
586 GETLONG(n, cp); in php_parserr()
593 GETSHORT(s, cp); in php_parserr()
624 p = cp; in php_parserr()
627 n = ((int)cp[0]) & 0xFF; in php_parserr()
628 cp++; in php_parserr()
639 if (cp[0] != 0) { in php_parserr()
645 sprintf((char*)tp, "%x", cp[0] & 0xFF); in php_parserr()
659 cp++; in php_parserr()
663 GETSHORT(s, cp); in php_parserr()
691 if (cp < p + dlen) { in php_parserr()
692 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
696 cp += n; in php_parserr()
703 GETSHORT(n, cp); in php_parserr()
705 GETSHORT(n, cp); in php_parserr()
707 GETSHORT(n, cp); in php_parserr()
709 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
713 cp += n; in php_parserr()
719 GETSHORT(n, cp); in php_parserr()
721 GETSHORT(n, cp); in php_parserr()
725 n = (cp[0] & 0xFF); in php_parserr()
726 cp++; in php_parserr()
728 add_assoc_stringl(*subarray, "flags", (char*)cp, n, 1); in php_parserr()
729 cp += n; in php_parserr()
732 n = (cp[0] & 0xFF); in php_parserr()
733 cp++; in php_parserr()
735 add_assoc_stringl(*subarray, "services", (char*)cp, n, 1); in php_parserr()
736 cp += n; in php_parserr()
739 n = (cp[0] & 0xFF); in php_parserr()
740 cp++; in php_parserr()
742 add_assoc_stringl(*subarray, "regex", (char*)cp, n, 1); in php_parserr()
743 cp += n; in php_parserr()
745 n = dn_expand(answer->qb2, end, cp, name, (sizeof name) - 2); in php_parserr()
749 cp += n; in php_parserr()
755 cp += dlen; in php_parserr()
759 return cp; in php_parserr()
782 u_char *cp = NULL, *end = NULL; in PHP_FUNCTION() local
914 cp = answer.qb2 + HFIXEDSZ; in PHP_FUNCTION()
924 n = dn_skipname(cp, end); in PHP_FUNCTION()
931 cp += n + QFIXEDSZ; in PHP_FUNCTION()
935 while (an-- && cp && cp < end) { in PHP_FUNCTION()
938 cp = php_parserr(cp, end, &answer, type_to_fetch, store_results, raw, &retval); in PHP_FUNCTION()
948 while (ns-- > 0 && cp && cp < end) { in PHP_FUNCTION()
951 cp = php_parserr(cp, end, &answer, DNS_T_ANY, authns != NULL, raw, &retval); in PHP_FUNCTION()
960 while (ar-- > 0 && cp && cp < end) { in PHP_FUNCTION()
963 cp = php_parserr(cp, end, &answer, DNS_T_ANY, 1, raw, &retval); in PHP_FUNCTION()
987 u_char *cp, *end; in PHP_FUNCTION() local
1032 cp = (u_char *)&ans + HFIXEDSZ; in PHP_FUNCTION()
1034 for (qdc = ntohs((unsigned short)hp->qdcount); qdc--; cp += i + QFIXEDSZ) { in PHP_FUNCTION()
1035 if ((i = dn_skipname(cp, end)) < 0 ) { in PHP_FUNCTION()
1041 while (--count >= 0 && cp < end) { in PHP_FUNCTION()
1042 if ((i = dn_skipname(cp, end)) < 0 ) { in PHP_FUNCTION()
1046 cp += i; in PHP_FUNCTION()
1047 GETSHORT(type, cp); in PHP_FUNCTION()
1048 cp += INT16SZ + INT32SZ; in PHP_FUNCTION()
1049 GETSHORT(i, cp); in PHP_FUNCTION()
1051 cp += i; in PHP_FUNCTION()
1054 GETSHORT(weight, cp); in PHP_FUNCTION()
1055 if ((i = dn_expand(ans, end, cp, buf, sizeof(buf)-1)) < 0) { in PHP_FUNCTION()
1059 cp += i; in PHP_FUNCTION()