Lines Matching refs:cp
155 cp += (x); \
156 if (cp > eom) { \
175 const u_char *cp; in getanswer() local
212 cp = answer->buf; in getanswer()
218 n = dn_expand(answer->buf, eom, cp, bp, ep - bp); in getanswer()
247 while (ancount-- > 0 && cp < eom && !had_error) { in getanswer()
248 n = dn_expand(answer->buf, eom, cp, bp, ep - bp); in getanswer()
253 cp += n; /* name */ in getanswer()
254 BOUNDS_CHECK(cp, 3 * INT16SZ + INT32SZ); in getanswer()
255 type = _getshort(cp); in getanswer()
256 cp += INT16SZ; /* type */ in getanswer()
257 class = _getshort(cp); in getanswer()
258 cp += INT16SZ + INT32SZ; /* class, TTL */ in getanswer()
259 n = _getshort(cp); in getanswer()
260 cp += INT16SZ; /* len */ in getanswer()
261 BOUNDS_CHECK(cp, n); in getanswer()
262 erdata = cp + n; in getanswer()
265 cp += n; in getanswer()
271 n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf); in getanswer()
276 cp += n; in getanswer()
277 if (cp != erdata) { in getanswer()
301 n = dn_expand(answer->buf, eom, cp, tbuf, sizeof tbuf); in getanswer()
306 cp += n; in getanswer()
307 if (cp != erdata) { in getanswer()
328 cp += n; in getanswer()
336 cp += n; in getanswer()
339 n = dn_expand(answer->buf, eom, cp, bp, ep - bp); in getanswer()
345 cp += n; in getanswer()
346 if (cp != erdata) { in getanswer()
384 cp += n; in getanswer()
388 cp += n; in getanswer()
393 memcpy(&in6, cp, IN6ADDRSZ); in getanswer()
395 cp += n; in getanswer()
419 cp += n; in getanswer()
422 (void)memcpy(*hap++ = bp, cp, (size_t)n); in getanswer()
424 cp += n; in getanswer()
425 if (cp != erdata) { in getanswer()
520 const char *cp; in gethostbyname_internal() local
556 if (!strchr(name, '.') && (cp = __hostalias(name))) in gethostbyname_internal()
557 name = cp; in gethostbyname_internal()
564 for (cp = name;; ++cp) { in gethostbyname_internal()
565 if (!*cp) { in gethostbyname_internal()
566 if (*--cp == '.') in gethostbyname_internal()
593 if (!isdigit((u_char) *cp) && *cp != '.') in gethostbyname_internal()
598 for (cp = name;; ++cp) { in gethostbyname_internal()
599 if (!*cp) { in gethostbyname_internal()
600 if (*--cp == '.') in gethostbyname_internal()
625 if (!isxdigit((u_char) *cp) && *cp != ':' && *cp != '.') in gethostbyname_internal()
723 char *cp, **q; in _gethtent() local
738 if (!(cp = strpbrk(p, "#\n"))) in _gethtent()
740 *cp = '\0'; in _gethtent()
741 if (!(cp = strpbrk(p, " \t"))) in _gethtent()
743 *cp++ = '\0'; in _gethtent()
774 while (*cp == ' ' || *cp == '\t') in _gethtent()
775 cp++; in _gethtent()
776 rs->host.h_name = cp; in _gethtent()
778 if ((cp = strpbrk(cp, " \t")) != NULL) in _gethtent()
779 *cp++ = '\0'; in _gethtent()
780 while (cp && *cp) { in _gethtent()
781 if (*cp == ' ' || *cp == '\t') { in _gethtent()
782 cp++; in _gethtent()
786 *q++ = cp; in _gethtent()
787 if ((cp = strpbrk(cp, " \t")) != NULL) in _gethtent()
788 *cp++ = '\0'; in _gethtent()
836 char *tmpbuf, *ptr, **cp; in _gethtbyname2() local
850 for (cp = p->h_aliases; *cp != NULL; cp++) in _gethtbyname2()
851 if (strcasecmp(*cp, name) == 0) in _gethtbyname2()
853 if (*cp == NULL) continue; in _gethtbyname2()
863 for (cp = p->h_aliases; *cp != NULL; cp++) in _gethtbyname2()
864 bufsize += strlen(*cp) + 1; in _gethtbyname2()
874 for (cp = p->h_aliases; *cp != NULL; cp++) { in _gethtbyname2()
875 src = *cp; in _gethtbyname2()
903 cp = rs->host_aliases; in _gethtbyname2()
905 *cp++ = ptr; in _gethtbyname2()
909 *cp = NULL; in _gethtbyname2()
912 cp = rs->h_addr_ptrs; in _gethtbyname2()
914 *cp++ = ptr; in _gethtbyname2()
917 *cp = NULL; in _gethtbyname2()