Lines Matching refs:cp
135 BOUNDS_CHECK(cp, x); \
136 cp += (x); \
148 const u_char* cp; in getanswer() local
189 cp = answer->buf; in getanswer()
193 n = dn_expand(answer->buf, eom, cp, bp, (int) (ep - bp)); in getanswer()
213 while (ancount-- > 0 && cp < eom && !had_error) { in getanswer()
214 n = dn_expand(answer->buf, eom, cp, bp, (int) (ep - bp)); in getanswer()
219 cp += n; /* name */ in getanswer()
220 BOUNDS_CHECK(cp, 3 * INT16SZ + INT32SZ); in getanswer()
221 int type = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in getanswer()
222 cp += INT16SZ; /* type */ in getanswer()
223 int cl = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in getanswer()
224 cp += INT16SZ + INT32SZ; /* class, TTL */ in getanswer()
225 n = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in getanswer()
226 cp += INT16SZ; /* len */ in getanswer()
227 BOUNDS_CHECK(cp, n); in getanswer()
228 erdata = cp + n; in getanswer()
231 cp += n; in getanswer()
235 n = dn_expand(answer->buf, eom, cp, tbuf, (int) sizeof tbuf); in getanswer()
240 cp += n; in getanswer()
241 if (cp != erdata) goto no_recovery; in getanswer()
262 n = dn_expand(answer->buf, eom, cp, tbuf, (int) sizeof tbuf); in getanswer()
267 cp += n; in getanswer()
268 if (cp != erdata) goto no_recovery; in getanswer()
284 cp += n; in getanswer()
292 cp += n; in getanswer()
295 n = dn_expand(answer->buf, eom, cp, bp, (int) (ep - bp)); in getanswer()
300 cp += n; in getanswer()
301 if (cp != erdata) goto no_recovery; in getanswer()
320 cp += n; in getanswer()
324 cp += n; in getanswer()
329 memcpy(&in6, cp, NS_IN6ADDRSZ); in getanswer()
331 cp += n; in getanswer()
354 cp += n; in getanswer()
357 (void) memcpy(*hap++ = bp, cp, (size_t) n); in getanswer()
359 cp += n; in getanswer()
360 if (cp != erdata) goto no_recovery; in getanswer()
438 for (const char* cp = name;; ++cp) { in gethostbyname_internal_real() local
439 if (!*cp) { in gethostbyname_internal_real()
440 if (*--cp == '.') break; in gethostbyname_internal_real()
448 if (!isdigit((u_char) *cp) && *cp != '.') break; in gethostbyname_internal_real()
452 for (const char* cp = name;; ++cp) { in gethostbyname_internal_real() local
453 if (!*cp) { in gethostbyname_internal_real()
454 if (*--cp == '.') break; in gethostbyname_internal_real()
462 if (!isxdigit((u_char) *cp) && *cp != ':' && *cp != '.') break; in gethostbyname_internal_real()
564 char* cp; in netbsd_gethostent_r() local
594 if (!(cp = strpbrk(p, "#\n"))) { in netbsd_gethostent_r()
597 *cp = '\0'; in netbsd_gethostent_r()
598 if (!(cp = strpbrk(p, " \t"))) continue; in netbsd_gethostent_r()
599 *cp++ = '\0'; in netbsd_gethostent_r()
622 while (*cp == ' ' || *cp == '\t') cp++; in netbsd_gethostent_r()
623 if ((cp = strpbrk(name = cp, " \t")) != NULL) *cp++ = '\0'; in netbsd_gethostent_r()
624 while (cp && *cp) { in netbsd_gethostent_r()
625 if (*cp == ' ' || *cp == '\t') { in netbsd_gethostent_r()
626 cp++; in netbsd_gethostent_r()
629 aliases.push_back(cp); in netbsd_gethostent_r()
630 if ((cp = strpbrk(cp, " \t")) != NULL) *cp++ = '\0'; in netbsd_gethostent_r()