Lines Matching refs:cp
206 BOUNDS_CHECK(cp, x); \
207 cp += (x); \
221 const u_char *cp; in getanswer() local
264 cp = answer->buf; in getanswer()
269 n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp)); in getanswer()
293 while (ancount-- > 0 && cp < eom && !had_error) { in getanswer()
294 n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp)); in getanswer()
299 cp += n; /* name */ in getanswer()
300 BOUNDS_CHECK(cp, 3 * INT16SZ + INT32SZ); in getanswer()
301 type = _getshort(cp); in getanswer()
302 cp += INT16SZ; /* type */ in getanswer()
303 class = _getshort(cp); in getanswer()
304 cp += INT16SZ + INT32SZ; /* class, TTL */ in getanswer()
305 n = _getshort(cp); in getanswer()
306 cp += INT16SZ; /* len */ in getanswer()
307 BOUNDS_CHECK(cp, n); in getanswer()
308 erdata = cp + n; in getanswer()
311 cp += n; in getanswer()
315 n = dn_expand(answer->buf, eom, cp, tbuf, in getanswer()
321 cp += n; in getanswer()
322 if (cp != erdata) in getanswer()
344 n = dn_expand(answer->buf, eom, cp, tbuf, in getanswer()
350 cp += n; in getanswer()
351 if (cp != erdata) in getanswer()
370 cp += n; in getanswer()
378 cp += n; in getanswer()
381 n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp)); in getanswer()
387 cp += n; in getanswer()
388 if (cp != erdata) in getanswer()
421 cp += n; in getanswer()
425 cp += n; in getanswer()
430 memcpy(&in6, cp, NS_IN6ADDRSZ); in getanswer()
432 cp += n; in getanswer()
457 cp += n; in getanswer()
460 (void)memcpy(*hap++ = bp, cp, (size_t)n); in getanswer()
462 cp += n; in getanswer()
463 if (cp != erdata) in getanswer()
678 const char *cp; in gethostbyname_internal_real() local
714 if (!strchr(name, '.') && (cp = res_hostalias(res, name, in gethostbyname_internal_real()
716 name = cp; in gethostbyname_internal_real()
723 for (cp = name;; ++cp) { in gethostbyname_internal_real()
724 if (!*cp) { in gethostbyname_internal_real()
725 if (*--cp == '.') in gethostbyname_internal_real()
734 if (!isdigit((u_char) *cp) && *cp != '.') in gethostbyname_internal_real()
739 for (cp = name;; ++cp) { in gethostbyname_internal_real()
740 if (!*cp) { in gethostbyname_internal_real()
741 if (*--cp == '.') in gethostbyname_internal_real()
750 if (!isxdigit((u_char) *cp) && *cp != ':' && *cp != '.') in gethostbyname_internal_real()
932 char *cp, **q; in netbsd_gethostent_r() local
966 if (!(cp = strpbrk(p, "#\n"))) { in netbsd_gethostent_r()
969 *cp = '\0'; in netbsd_gethostent_r()
970 if (!(cp = strpbrk(p, " \t"))) in netbsd_gethostent_r()
972 *cp++ = '\0'; in netbsd_gethostent_r()
1000 while (*cp == ' ' || *cp == '\t') in netbsd_gethostent_r()
1001 cp++; in netbsd_gethostent_r()
1002 if ((cp = strpbrk(name = cp, " \t")) != NULL) in netbsd_gethostent_r()
1003 *cp++ = '\0'; in netbsd_gethostent_r()
1005 while (cp && *cp) { in netbsd_gethostent_r()
1006 if (*cp == ' ' || *cp == '\t') { in netbsd_gethostent_r()
1007 cp++; in netbsd_gethostent_r()
1010 addalias(q, cp, aliases, maxaliases); in netbsd_gethostent_r()
1011 if ((cp = strpbrk(cp, " \t")) != NULL) in netbsd_gethostent_r()
1012 *cp++ = '\0'; in netbsd_gethostent_r()
1316 char *cp, **q, *ptr; in _yp_hostent() local
1347 cp = strpbrk(p, " \t"); in _yp_hostent()
1348 if (cp == NULL) in _yp_hostent()
1350 *cp++ = '\0'; in _yp_hostent()
1356 while (cp && *cp) { in _yp_hostent()
1357 if (*cp == '\n') { in _yp_hostent()
1358 cp++; in _yp_hostent()
1361 cp++; in _yp_hostent()
1367 while (*cp == ' ' || *cp == '\t') in _yp_hostent()
1368 cp++; in _yp_hostent()
1369 p = cp; in _yp_hostent()
1370 cp = strpbrk(p, " \t\n"); in _yp_hostent()
1371 if (cp != NULL) { in _yp_hostent()
1372 if (*cp == '\n') in _yp_hostent()
1374 *cp++ = '\0'; in _yp_hostent()
1382 p = cp; in _yp_hostent()
1386 while (cp && *cp) { in _yp_hostent()
1387 if (*cp == ' ' || *cp == '\t') { in _yp_hostent()
1388 cp++; in _yp_hostent()
1391 if (*cp == '\n') { in _yp_hostent()
1392 cp++; in _yp_hostent()
1395 addalias(q, cp, aliases, maxaliases); in _yp_hostent()
1396 cp = strpbrk(cp, " \t"); in _yp_hostent()
1397 if (cp != NULL) in _yp_hostent()
1398 *cp++ = '\0'; in _yp_hostent()