Lines Matching defs:hp
91 struct hostent *hp;
108 hp = _hf_gethtbyname2(name, AF_INET6, info);
110 hp = NULL;
111 if (hp == NULL)
112 hp = _hf_gethtbyname2(name, AF_INET, info);
116 hp = _hf_gethtbyname2(name, af, info);
118 if (hp == NULL) {
130 struct hostent *hp, hent;
159 info->hp->h_addrtype = af;
160 info->hp->h_length = 0;
162 hp = netbsd_gethostent_r(hf, info->hp, info->buf, info->buflen,
164 if (hp == NULL) {
171 if (strcasecmp(hp->h_name, name) != 0) {
173 for (cp = hp->h_aliases; *cp != NULL; cp++)
180 hent.h_addrtype = af = hp->h_addrtype;
181 hent.h_length = hp->h_length;
183 HENT_SCOPY(hent.h_name, hp->h_name, ptr, len);
184 for (anum = 0; hp->h_aliases[anum]; anum++) {
187 HENT_SCOPY(aliases[anum], hp->h_aliases[anum],
197 HENT_COPY(addr_ptrs[num], hp->h_addr_list[0], hp->h_length, ptr,
209 hp = info->hp;
213 hp->h_addrtype = hent.h_addrtype;
214 hp->h_length = hent.h_length;
216 HENT_ARRAY(hp->h_aliases, anum, ptr, len);
217 HENT_ARRAY(hp->h_addr_list, num, ptr, len);
220 HENT_COPY(hp->h_addr_list[i], addr_ptrs[i], hp->h_length, ptr,
222 hp->h_addr_list[num] = NULL;
224 HENT_SCOPY(hp->h_name, hent.h_name, ptr, len);
227 HENT_SCOPY(hp->h_aliases[i], aliases[i], ptr, len);
228 hp->h_aliases[anum] = NULL;
231 return hp;
244 struct hostent *hp;
252 info->hp->h_length = va_arg(ap, int);
253 info->hp->h_addrtype = va_arg(ap, int);
261 while ((hp = netbsd_gethostent_r(hf, info->hp, info->buf, info->buflen,
263 if (!memcmp(hp->h_addr_list[0], addr, (size_t)hp->h_length))
267 if (hp == NULL) {