Lines Matching refs:host

53 	struct hostent host;
69 memset((char *) &hb->host, 0, sizeof(hb->host));
70 hb->host.h_length = hp->h_length;
71 hb->host.h_addr_list = hb->addr_list;
72 hb->host.h_addr_list[count] = 0;
73 data = (char *) (hb->host.h_addr_list + count + 1);
76 hb->host.h_addr_list[count] = data + hp->h_length * count;
77 memcpy(hb->host.h_addr_list[count], addr, hp->h_length);
79 return (&hb->host);
83 /* find_inet_addr - find all addresses for this host, result to free() */
86 struct addrinfo *find_inet_addr(host)
87 char *host;
95 if (getaddrinfo(host, NULL, &hints, &res) == 0)
102 if (getaddrinfo(host, NULL, &hints, &res) != 0) {
103 tcpd_warn("%s: host not found", host);
107 tcpd_warn("%d: not an internet host", res->ai_family);
112 tcpd_warn("%s: hostname alias", host);
114 } else if (STR_NE(host, res->ai_canonname)) {
115 tcpd_warn("%s: hostname alias", host);
121 struct hostent *find_inet_addr(host)
122 char *host;
132 if ((addr.s_addr = dot_quad_addr(host)) != INADDR_NONE) {
140 * Map host name to a series of addresses. Watch out for non-internet
145 if (NOT_INADDR(host) == 0) {
146 tcpd_warn("%s: not an internet address", host);
149 if ((hp = gethostbyname(host)) == 0) {
150 tcpd_warn("%s: host not found", host);
154 tcpd_warn("%d: not an internet host", hp->h_addrtype);
157 if (STR_NE(host, hp->h_name)) {
158 tcpd_warn("%s: hostname alias", host);
167 int check_dns(host)
168 char *host;
181 if ((hp = find_inet_addr(host)) == 0)
199 * Force host name and address conversions. Use the request structure
206 tcpd_warn("host address %s->name lookup failed",