Home | History | Annotate | Download | only in net

Lines Matching refs:hp

119 	struct hostent *hp;
136 hp = _hf_gethtbyname2(name, AF_INET6, info);
138 hp = NULL;
139 if (hp == NULL)
140 hp = _hf_gethtbyname2(name, AF_INET, info);
144 hp = _hf_gethtbyname2(name, af, info);
146 if (hp == NULL) {
156 struct hostent *hp, hent;
185 info->hp->h_addrtype = af;
186 info->hp->h_length = 0;
188 hp = gethostent_r(hf, info->hp, info->buf, info->buflen,
190 if (hp == NULL)
193 if (strcasecmp(hp->h_name, name) != 0) {
195 for (cp = hp->h_aliases; *cp != NULL; cp++)
202 hent.h_addrtype = af = hp->h_addrtype;
203 hent.h_length = hp->h_length;
205 HENT_SCOPY(hent.h_name, hp->h_name, ptr, len);
206 for (anum = 0; hp->h_aliases[anum]; anum++) {
209 HENT_SCOPY(aliases[anum], hp->h_aliases[anum],
219 HENT_COPY(addr_ptrs[num], hp->h_addr_list[0], hp->h_length, ptr,
231 hp = info->hp;
235 hp->h_addrtype = hent.h_addrtype;
236 hp->h_length = hent.h_length;
238 HENT_ARRAY(hp->h_aliases, anum, ptr, len);
239 HENT_ARRAY(hp->h_addr_list, num, ptr, len);
242 HENT_COPY(hp->h_addr_list[i], addr_ptrs[i], hp->h_length, ptr,
244 hp->h_addr_list[num] = NULL;
246 HENT_SCOPY(hp->h_name, hent.h_name, ptr, len);
249 HENT_SCOPY(hp->h_aliases[i], aliases[i], ptr, len);
250 hp->h_aliases[anum] = NULL;
253 return hp;
266 struct hostent *hp;
274 info->hp->h_length = va_arg(ap, int);
275 info->hp->h_addrtype = va_arg(ap, int);
283 while ((hp = gethostent_r(hf, info->hp, info->buf, info->buflen,
285 if (!memcmp(hp->h_addr_list[0], addr, (size_t)hp->h_length))
289 if (hp == NULL) {