Lines Matching full:hp
46 static struct hostent *dup_hostent(struct hostent *hp) in dup_hostent() argument
57 for (count = 0; hp->h_addr_list[count] != 0; count++) in dup_hostent()
61 + (hp->h_length + sizeof(char *)) * count)) == 0) { in dup_hostent()
66 hb->host.h_length = hp->h_length; in dup_hostent()
71 for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) { in dup_hostent()
72 hb->host.h_addr_list[count] = data + hp->h_length * count; in dup_hostent()
73 memcpy(hb->host.h_addr_list[count], addr, hp->h_length); in dup_hostent()
119 struct hostent *hp; in find_inet_addr() local
143 if ((hp = gethostbyname(host)) == 0) { in find_inet_addr()
147 if (hp->h_addrtype != AF_INET) { in find_inet_addr()
148 tcpd_warn("%d: not an internet host", hp->h_addrtype); in find_inet_addr()
151 if (STR_NE(host, hp->h_name)) { in find_inet_addr()
153 tcpd_warn("(official name: %.*s)", STRING_LENGTH, hp->h_name); in find_inet_addr()
155 return (dup_hostent(hp)); in find_inet_addr()
166 struct addrinfo *hp, *res; local
169 struct hostent *hp; local
174 if ((hp = find_inet_addr(host)) == 0)
184 for (res = hp, count = 0; res; res = res->ai_next, count++) {
187 for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) {
203 freeaddrinfo(hp);
205 free((char *) hp);