Lines Matching refs:he
38 struct hostent *he = gethostbyname(name); in gethostbyname_r() local
48 if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0) in gethostbyname_r()
55 if (he == NULL) in gethostbyname_r()
58 return (copy_hostent(he, hptr, HOST_R_COPY)); in gethostbyname_r()
65 struct hostent *he = gethostbyaddr(addr, len, type); in gethostbyaddr_r() local
75 if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0) in gethostbyaddr_r()
82 if (he == NULL) in gethostbyaddr_r()
85 return (copy_hostent(he, hptr, HOST_R_COPY)); in gethostbyaddr_r()
97 struct hostent *he = gethostent(); in gethostent_r() local
107 if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0) in gethostent_r()
114 if (he == NULL) in gethostent_r()
117 return (copy_hostent(he, hptr, HOST_R_COPY)); in gethostent_r()
155 copy_hostent(struct hostent *he, struct hostent *hptr, HOST_R_COPY_ARGS) { in copy_hostent() argument
164 for (i = 0; he->h_addr_list[i]; i++, nptr++) { in copy_hostent()
165 len += he->h_length; in copy_hostent()
167 for (i = 0; he->h_aliases[i]; i++, nptr++) { in copy_hostent()
168 len += strlen(he->h_aliases[i]) + 1; in copy_hostent()
170 len += strlen(he->h_name) + 1; in copy_hostent()
179 hptr->h_addrtype = he->h_addrtype; in copy_hostent()
180 n = hptr->h_length = he->h_length; in copy_hostent()
187 for (i = 0; he->h_addr_list[i]; i++ , ptr++) { in copy_hostent()
188 memcpy(cp, he->h_addr_list[i], n); in copy_hostent()
196 n = strlen(he->h_name) + 1; in copy_hostent()
197 strcpy(cp, he->h_name); in copy_hostent()
203 for (i = 0 ; he->h_aliases[i]; i++) { in copy_hostent()
204 n = strlen(he->h_aliases[i]) + 1; in copy_hostent()
205 strcpy(cp, he->h_aliases[i]); in copy_hostent()
215 copy_hostent(struct hostent *he, struct hostent *hptr, HOST_R_COPY_ARGS) { in copy_hostent() argument
220 hptr->h_addrtype = he->h_addrtype; in copy_hostent()
221 n = hptr->h_length = he->h_length; in copy_hostent()
228 while (he->h_addr_list[i] && i < (_MAXADDRS)) { in copy_hostent()
230 memcpy(cp, he->h_addr_list[i], n); in copy_hostent()
241 if ((n = strlen(he->h_name) + 1) < (eob - cp)) { in copy_hostent()
242 strcpy(cp, he->h_name); in copy_hostent()
252 while (he->h_aliases[i] && i < (_MAXALIASES-1)) { in copy_hostent()
253 if ((n = strlen(he->h_aliases[i]) + 1) < (eob - cp)) { in copy_hostent()
254 strcpy(cp, he->h_aliases[i]); in copy_hostent()