Lines Matching refs:cp

119         BOUNDS_CHECK(cp, x); \
120 cp += (x); \
131 const uint8_t* cp; in getanswer() local
173 cp = answer->buf; in getanswer()
177 n = dn_expand(answer->buf, eom, cp, bp, (int) (ep - bp)); in getanswer()
197 while (ancount-- > 0 && cp < eom && !had_error) { in getanswer()
198 n = dn_expand(answer->buf, eom, cp, bp, (int) (ep - bp)); in getanswer()
203 cp += n; /* name */ in getanswer()
204 BOUNDS_CHECK(cp, 3 * INT16SZ + INT32SZ); in getanswer()
205 int type = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in getanswer()
206 cp += INT16SZ; /* type */ in getanswer()
207 int cl = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in getanswer()
208 cp += INT16SZ + INT32SZ; /* class, TTL */ in getanswer()
209 n = ntohs(*reinterpret_cast<const uint16_t*>(cp)); in getanswer()
210 cp += INT16SZ; /* len */ in getanswer()
211 BOUNDS_CHECK(cp, n); in getanswer()
212 erdata = cp + n; in getanswer()
215 cp += n; in getanswer()
219 n = dn_expand(answer->buf, eom, cp, tbuf, (int) sizeof tbuf); in getanswer()
224 cp += n; in getanswer()
225 if (cp != erdata) goto no_recovery; in getanswer()
246 n = dn_expand(answer->buf, eom, cp, tbuf, (int) sizeof tbuf); in getanswer()
251 cp += n; in getanswer()
252 if (cp != erdata) goto no_recovery; in getanswer()
268 cp += n; in getanswer()
276 cp += n; in getanswer()
279 n = dn_expand(answer->buf, eom, cp, bp, (int) (ep - bp)); in getanswer()
284 cp += n; in getanswer()
285 if (cp != erdata) goto no_recovery; in getanswer()
304 cp += n; in getanswer()
308 cp += n; in getanswer()
313 memcpy(&in6, cp, NS_IN6ADDRSZ); in getanswer()
315 cp += n; in getanswer()
338 cp += n; in getanswer()
341 (void) memcpy(*hap++ = bp, cp, (size_t) n); in getanswer()
343 cp += n; in getanswer()
344 if (cp != erdata) goto no_recovery; in getanswer()
417 for (const char* cp = name;; ++cp) { in resolv_gethostbyname() local
418 if (!*cp) { in resolv_gethostbyname()
419 if (*--cp == '.') break; in resolv_gethostbyname()
427 if (!isdigit((uint8_t)*cp) && *cp != '.') break; in resolv_gethostbyname()
431 for (const char* cp = name;; ++cp) { in resolv_gethostbyname() local
432 if (!*cp) { in resolv_gethostbyname()
433 if (*--cp == '.') break; in resolv_gethostbyname()
441 if (!isxdigit((uint8_t)*cp) && *cp != ':' && *cp != '.') break; in resolv_gethostbyname()
531 char* cp; in netbsd_gethostent_r() local
558 if (!(cp = strpbrk(p, "#\n"))) { in netbsd_gethostent_r()
561 *cp = '\0'; in netbsd_gethostent_r()
562 if (!(cp = strpbrk(p, " \t"))) continue; in netbsd_gethostent_r()
563 *cp++ = '\0'; in netbsd_gethostent_r()
577 while (*cp == ' ' || *cp == '\t') cp++; in netbsd_gethostent_r()
578 if ((cp = strpbrk(name = cp, " \t")) != NULL) *cp++ = '\0'; in netbsd_gethostent_r()
579 while (cp && *cp) { in netbsd_gethostent_r()
580 if (*cp == ' ' || *cp == '\t') { in netbsd_gethostent_r()
581 cp++; in netbsd_gethostent_r()
584 aliases.push_back(cp); in netbsd_gethostent_r()
585 if ((cp = strpbrk(cp, " \t")) != NULL) *cp++ = '\0'; in netbsd_gethostent_r()