Lines Matching defs:he

42 	struct hostent *he = gethostbyname(name);
52 if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0)
59 if (he == NULL)
62 return (copy_hostent(he, hptr, HOST_R_COPY));
69 struct hostent *he = gethostbyaddr(addr, len, type);
79 if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0)
86 if (he == NULL)
89 return (copy_hostent(he, hptr, HOST_R_COPY));
101 struct hostent *he = gethostent();
111 if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0)
118 if (he == NULL)
121 return (copy_hostent(he, hptr, HOST_R_COPY));
159 copy_hostent(struct hostent *he, struct hostent *hptr, HOST_R_COPY_ARGS) {
168 for (i = 0; he->h_addr_list[i]; i++, nptr++) {
169 len += he->h_length;
171 for (i = 0; he->h_aliases[i]; i++, nptr++) {
172 len += strlen(he->h_aliases[i]) + 1;
174 len += strlen(he->h_name) + 1;
183 hptr->h_addrtype = he->h_addrtype;
184 n = hptr->h_length = he->h_length;
191 for (i = 0; he->h_addr_list[i]; i++ , ptr++) {
192 memcpy(cp, he->h_addr_list[i], n);
200 n = strlen(he->h_name) + 1;
201 strcpy(cp, he->h_name);
207 for (i = 0 ; he->h_aliases[i]; i++) {
208 n = strlen(he->h_aliases[i]) + 1;
209 strcpy(cp, he->h_aliases[i]);
219 copy_hostent(struct hostent *he, struct hostent *hptr, HOST_R_COPY_ARGS) {
224 hptr->h_addrtype = he->h_addrtype;
225 n = hptr->h_length = he->h_length;
232 while (he->h_addr_list[i] && i < (_MAXADDRS)) {
234 memcpy(cp, he->h_addr_list[i], n);
245 if ((n = strlen(he->h_name) + 1) < (eob - cp)) {
246 strcpy(cp, he->h_name);
256 while (he->h_aliases[i] && i < (_MAXALIASES-1)) {
257 if ((n = strlen(he->h_aliases[i]) + 1) < (eob - cp)) {
258 strcpy(cp, he->h_aliases[i]);