Lines Matching refs:hp
101 struct hostent *hp; in _hf_gethtbyname() local
118 hp = _hf_gethtbyname2(name, AF_INET6, info); in _hf_gethtbyname()
120 hp = NULL; in _hf_gethtbyname()
121 if (hp == NULL) in _hf_gethtbyname()
122 hp = _hf_gethtbyname2(name, AF_INET, info); in _hf_gethtbyname()
126 hp = _hf_gethtbyname2(name, af, info); in _hf_gethtbyname()
128 if (hp == NULL) { in _hf_gethtbyname()
141 struct hostent *hp, hent; in _hf_gethtbyname2() local
169 info->hp->h_addrtype = af; in _hf_gethtbyname2()
170 info->hp->h_length = 0; in _hf_gethtbyname2()
172 hp = netbsd_gethostent_r(hf, info->hp, info->buf, info->buflen, in _hf_gethtbyname2()
174 if (hp == NULL) { in _hf_gethtbyname2()
181 if (strcasecmp(hp->h_name, name) != 0) { in _hf_gethtbyname2()
183 for (cp = hp->h_aliases; *cp != NULL; cp++) in _hf_gethtbyname2()
190 hent.h_addrtype = af = hp->h_addrtype; in _hf_gethtbyname2()
191 hent.h_length = hp->h_length; in _hf_gethtbyname2()
193 HENT_SCOPY(hent.h_name, hp->h_name, ptr, len); in _hf_gethtbyname2()
194 for (anum = 0; hp->h_aliases[anum]; anum++) { in _hf_gethtbyname2()
197 HENT_SCOPY(aliases[anum], hp->h_aliases[anum], in _hf_gethtbyname2()
207 HENT_COPY(addr_ptrs[num], hp->h_addr_list[0], hp->h_length, ptr, in _hf_gethtbyname2()
219 hp = info->hp; in _hf_gethtbyname2()
223 hp->h_addrtype = hent.h_addrtype; in _hf_gethtbyname2()
224 hp->h_length = hent.h_length; in _hf_gethtbyname2()
226 HENT_ARRAY(hp->h_aliases, anum, ptr, len); in _hf_gethtbyname2()
227 HENT_ARRAY(hp->h_addr_list, num, ptr, len); in _hf_gethtbyname2()
230 HENT_COPY(hp->h_addr_list[i], addr_ptrs[i], hp->h_length, ptr, in _hf_gethtbyname2()
232 hp->h_addr_list[num] = NULL; in _hf_gethtbyname2()
234 HENT_SCOPY(hp->h_name, hent.h_name, ptr, len); in _hf_gethtbyname2()
237 HENT_SCOPY(hp->h_aliases[i], aliases[i], ptr, len); in _hf_gethtbyname2()
238 hp->h_aliases[anum] = NULL; in _hf_gethtbyname2()
241 return hp; in _hf_gethtbyname2()
253 struct hostent *hp; in _hf_gethtbyaddr() local
261 info->hp->h_length = va_arg(ap, int); in _hf_gethtbyaddr()
262 info->hp->h_addrtype = va_arg(ap, int); in _hf_gethtbyaddr()
270 while ((hp = netbsd_gethostent_r(hf, info->hp, info->buf, info->buflen, in _hf_gethtbyaddr()
272 if (!memcmp(hp->h_addr_list[0], addr, (size_t)hp->h_length)) in _hf_gethtbyaddr()
276 if (hp == NULL) { in _hf_gethtbyaddr()