Lines Matching refs:buf
134 u_char buf[MAXPACKET]; member
218 res_state res, struct hostent *hent, char *buf, size_t buflen, int *he) in getanswer() argument
241 eom = answer->buf + anslen; in getanswer()
262 bp = buf; in getanswer()
263 ep = buf + buflen; in getanswer()
264 cp = answer->buf; in getanswer()
269 n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp)); in getanswer()
294 n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp)); in getanswer()
315 n = dn_expand(answer->buf, eom, cp, tbuf, in getanswer()
344 n = dn_expand(answer->buf, eom, cp, tbuf, in getanswer()
381 n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp)); in getanswer()
527 gethostbyname_r(const char *name, struct hostent *hp, char *buf, size_t buflen, in gethostbyname_r() argument
540 *result = gethostbyname_internal(name, AF_INET6, res, hp, buf, buflen, errorp, in gethostbyname_r()
547 *result = gethostbyname_internal(name, AF_INET, res, hp, buf, buflen, errorp, in gethostbyname_r()
554 gethostbyname2_r(const char *name, int af, struct hostent *hp, char *buf, in gethostbyname2_r() argument
563 *result = gethostbyname_internal(name, af, res, hp, buf, buflen, errorp, in gethostbyname2_r()
572 char buf[4]; in android_read_hostent() local
573 if (fread(buf, 1, sizeof(buf), proxy) != sizeof(buf)) return NULL; in android_read_hostent()
577 int result_code = strtol(buf, NULL, 10); in android_read_hostent()
675 gethostbyname_internal_real(const char *name, int af, res_state res, struct hostent *hp, char *buf, in gethostbyname_internal_real() argument
756 info.buf = buf; in gethostbyname_internal_real()
769 HENT_ARRAY(hp->h_addr_list, 1, buf, buflen); in gethostbyname_internal_real()
770 HENT_ARRAY(hp->h_aliases, 0, buf, buflen); in gethostbyname_internal_real()
776 if (inet_pton(af, name, buf) <= 0) { in gethostbyname_internal_real()
780 hp->h_addr_list[0] = buf; in gethostbyname_internal_real()
782 buf += size; in gethostbyname_internal_real()
784 HENT_SCOPY(hp->h_name, name, buf, buflen); in gethostbyname_internal_real()
786 map_v4v6_hostent(hp, &buf, buf + buflen); in gethostbyname_internal_real()
824 int gethostbyaddr_r(const void *addr, socklen_t len, int af, struct hostent *hp, char *buf, in gethostbyaddr_r() argument
828 addr, len, af, hp, buf, buflen, h_errnop, &NETCONTEXT_UNSET); in gethostbyaddr_r()
834 char *buf, size_t buflen, int *he, in android_gethostbyaddrfornetcontext_real() argument
882 info.buf = buf; in android_gethostbyaddrfornetcontext_real()
903 char buf[INET6_ADDRSTRLEN]; //big enough for IPv4 and IPv6 in android_gethostbyaddrfornetcontext_proxy_internal() local
904 const char * addrStr = inet_ntop(af, addr, buf, sizeof(buf)); in android_gethostbyaddrfornetcontext_proxy_internal()
929 netbsd_gethostent_r(FILE *hf, struct hostent *hent, char *buf, size_t buflen, int *he) in netbsd_gethostent_r() argument
984 map_v4v6_address(buf, buf); in netbsd_gethostent_r()
1018 HENT_ARRAY(hent->h_addr_list, 1, buf, buflen); in netbsd_gethostent_r()
1020 HENT_ARRAY(hent->h_aliases, anum, buf, buflen); in netbsd_gethostent_r()
1021 HENT_COPY(hent->h_addr_list[0], &host_addr, hent->h_length, buf, in netbsd_gethostent_r()
1025 HENT_SCOPY(hent->h_name, name, buf, buflen); in netbsd_gethostent_r()
1027 HENT_SCOPY(hent->h_aliases[i], aliases[i], buf, buflen); in netbsd_gethostent_r()
1139 querybuf *buf; in _dns_gethtbyname() local
1164 buf = malloc(sizeof(*buf)); in _dns_gethtbyname()
1165 if (buf == NULL) { in _dns_gethtbyname()
1171 free(buf); in _dns_gethtbyname()
1174 n = res_nsearch(res, name, C_IN, type, buf->buf, (int)sizeof(buf->buf)); in _dns_gethtbyname()
1176 free(buf); in _dns_gethtbyname()
1181 hp = getanswer(buf, n, name, type, res, info->hp, info->buf, in _dns_gethtbyname()
1183 free(buf); in _dns_gethtbyname()
1203 querybuf *buf; in _dns_gethtbyaddr() local
1250 buf = malloc(sizeof(*buf)); in _dns_gethtbyaddr()
1251 if (buf == NULL) { in _dns_gethtbyaddr()
1257 free(buf); in _dns_gethtbyaddr()
1261 n = res_nquery(res, qbuf, C_IN, T_PTR, buf->buf, (int)sizeof(buf->buf)); in _dns_gethtbyaddr()
1263 free(buf); in _dns_gethtbyaddr()
1268 hp = getanswer(buf, n, qbuf, T_PTR, res, info->hp, info->buf, in _dns_gethtbyaddr()
1270 free(buf); in _dns_gethtbyaddr()
1284 blen = (size_t)(bf - info->buf); in _dns_gethtbyaddr()
1407 ptr = info->buf; in _yp_hostent()