Lines Matching refs:host
8 * it provides methods to map a transport address to a printable host name
11 * The result from the hostname lookup method is STRING_PARANOID when a host
12 * pretends to have someone elses name, or when a host name is available but
51 * Speed up DNS lookups by terminating the host name with a dot. Should be
92 * Look up the client host address. Hal R. Brand <BRAND@addvax.llnl.gov>
93 * suggested how to get the client host info in case of UDP connections:
133 void sock_hostaddr(host)
134 struct host_info *host;
136 struct sockaddr_gen *sin = host->sin;
141 (void) inet_ntop(SGFAM(sin), SGADDRP(sin), host->addr, sizeof(host->addr));
143 STRN_CPY(host->addr, inet_ntoa(sin->sg_sin.sin_addr), sizeof(host->addr));
147 /* sock_hostname - map endpoint address to host name */
149 void sock_hostname(host)
150 struct host_info *host;
152 struct sockaddr_gen *sin = host->sin;
162 * host name/address checking code below.
168 STRN_CPY(host->name, hp->h_name, sizeof(host->name));
183 if ((hp = tcpd_gethostbyname(host->name, SGFAM(sin))) == 0) {
186 * Unable to verify that the host name matches the address. This
191 host->name);
193 } else if (STR_NE(host->name, hp->h_name)
194 && STR_NE(host->name, "localhost")) {
202 tcpd_warn("host name/name mismatch: %s != %.*s",
203 host->name, STRING_LENGTH, hp->h_name);
226 * The host name does not map to the initial address. Perhaps
230 tcpd_warn("host name/address mismatch: %s != %.*s",
238 strcpy(host->name, paranoid); /* name is bad, clobber it */