Lines Matching refs:hent
129 struct hostent* hent, char* buf, size_t buflen, int* he) { in getanswer() argument
148 hent->h_name = NULL; in getanswer()
188 hent->h_name = bp; in getanswer()
191 qname = hent->h_name; in getanswer()
193 hent->h_addr_list = hap = addr_ptrs; in getanswer()
241 hent->h_name = bp; in getanswer()
287 hent->h_name = bp; in getanswer()
301 if (strcasecmp(hent->h_name, bp) != 0) { in getanswer()
302 LOG(DEBUG) << __func__ << ": asked for \"" << hent->h_name << "\", got \"" << bp in getanswer()
307 if (n != hent->h_length) { in getanswer()
322 hent->h_name = bp; in getanswer()
353 if (!hent->h_name) { in getanswer()
357 hent->h_name = bp; in getanswer()
360 if (hent->h_addrtype == AF_INET) pad_v4v6_hostent(hent, &bp, ep); in getanswer()
369 qlen = aliases.size() * sizeof(*hent->h_aliases); in getanswer()
371 hent->h_aliases = (char**) bp; in getanswer()
376 qlen = (n + 1) * sizeof(*hent->h_addr_list); in getanswer()
378 hent->h_addr_list = (char**) bp; in getanswer()
381 return hent; in getanswer()
530 struct hostent* netbsd_gethostent_r(FILE* hf, struct hostent* hent, char* buf, size_t buflen, in netbsd_gethostent_r() argument
576 if (hent->h_addrtype != 0 && hent->h_addrtype != af) continue; in netbsd_gethostent_r()
577 if (hent->h_length != 0 && hent->h_length != len) continue; in netbsd_gethostent_r()
591 hent->h_length = len; in netbsd_gethostent_r()
592 hent->h_addrtype = af; in netbsd_gethostent_r()
593 HENT_ARRAY(hent->h_addr_list, 1, buf, buflen); in netbsd_gethostent_r()
595 HENT_ARRAY(hent->h_aliases, anum, buf, buflen); in netbsd_gethostent_r()
596 HENT_COPY(hent->h_addr_list[0], &host_addr, hent->h_length, buf, buflen); in netbsd_gethostent_r()
597 hent->h_addr_list[1] = NULL; in netbsd_gethostent_r()
600 if (hent->h_addrtype == AF_INET) { in netbsd_gethostent_r()
604 HENT_SCOPY(hent->h_name, name, buf, buflen); in netbsd_gethostent_r()
605 for (size_t i = 0; i < anum; i++) HENT_SCOPY(hent->h_aliases[i], aliases[i], buf, buflen); in netbsd_gethostent_r()
606 hent->h_aliases[anum] = NULL; in netbsd_gethostent_r()
609 return hent; in netbsd_gethostent_r()