Lines Matching refs:hp
44 static struct hostent *dup_hostent(hp)
45 struct hostent *hp;
56 for (count = 0; hp->h_addr_list[count] != 0; count++)
60 + (hp->h_length + sizeof(char *)) * count)) == 0) {
65 hb->host.h_addrtype = hp->h_addrtype;;
66 hb->host.h_length = hp->h_length;
71 for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) {
72 hb->host.h_addr_list[count] = data + hp->h_length * count;
73 memcpy(hb->host.h_addr_list[count], addr, hp->h_length);
84 struct hostent *hp;
107 if ((hp = tcpd_gethostbyname(host, 0)) == 0) {
111 if (!VALID_ADDRTYPE(hp->h_addrtype)) {
112 tcpd_warn("%d: not an internet host", hp->h_addrtype);
115 if (STR_NE(host, hp->h_name)) {
117 tcpd_warn("(official name: %.*s)", STRING_LENGTH, hp->h_name);
119 return (dup_hostent(hp));
129 struct hostent *hp;
133 if ((hp = find_inet_addr(host)) == 0)
138 sin.sg_family = hp->h_addrtype;
140 for (count = 0; (addr = hp->h_addr_list[count]) != 0; count++) {
154 free((char *) hp);