Lines Matching full:he

94 __copy_hostent(struct hostent *he, struct hostent *hptr, char *buf,  in __copy_hostent()  argument
105 for (i = 0; he->h_addr_list[i]; i++, nptr++) { in __copy_hostent()
106 len += he->h_length; in __copy_hostent()
108 for (i = 0; he->h_aliases[i]; i++, nptr++) { in __copy_hostent()
109 len += strlen(he->h_aliases[i]) + 1; in __copy_hostent()
111 len += strlen(he->h_name) + 1; in __copy_hostent()
120 hptr->h_addrtype = he->h_addrtype; in __copy_hostent()
121 n = hptr->h_length = he->h_length; in __copy_hostent()
128 for (i = 0; he->h_addr_list[i]; i++ , ptr++) { in __copy_hostent()
129 memcpy(cp, he->h_addr_list[i], n); in __copy_hostent()
137 n = strlen(he->h_name) + 1; in __copy_hostent()
138 strcpy(cp, he->h_name); in __copy_hostent()
144 for (i = 0 ; he->h_aliases[i]; i++) { in __copy_hostent()
145 n = strlen(he->h_aliases[i]) + 1; in __copy_hostent()
146 strcpy(cp, he->h_aliases[i]); in __copy_hostent()
435 struct hostent he; in fakeaddr() local
456 he.h_addrtype = af; in fakeaddr()
459 he.h_length = NS_INADDRSZ; in fakeaddr()
462 he.h_length = NS_IN6ADDRSZ; in fakeaddr()
469 he.h_name = hed->hostbuf; in fakeaddr()
470 he.h_aliases = hed->host_aliases; in fakeaddr()
474 he.h_addr_list = hed->h_addr_ptrs; in fakeaddr()
475 if (__copy_hostent(&he, hp, buf, buflen) != 0) { in fakeaddr()
484 gethostbyname_r(const char *name, struct hostent *he, char *buffer, in gethostbyname_r() argument
495 if (fakeaddr(name, AF_INET, he, buffer, buflen, statp) == 0) { in gethostbyname_r()
496 *result = he; in gethostbyname_r()
499 if (gethostbyname_internal(name, AF_INET6, he, buffer, buflen, in gethostbyname_r()
503 return (gethostbyname_internal(name, AF_INET, he, buffer, buflen, in gethostbyname_r()
508 gethostbyname2_r(const char *name, int af, struct hostent *he, char *buffer, in gethostbyname2_r() argument
518 return (gethostbyname_internal(name, af, he, buffer, buflen, result, in gethostbyname2_r()