Lines Matching defs:host
11 * it provides methods to map a transport address to a printable host name
14 * The result from the hostname lookup method is STRING_PARANOID when a host
15 * pretends to have someone elses name, or when a host name is available but
54 * Speed up DNS lookups by terminating the host name with a dot. Should be
95 * Look up the client host address. Hal R. Brand <BRAND@addvax.llnl.gov>
96 * suggested how to get the client host info in case of UDP connections:
136 void sock_hostaddr(host)
137 struct host_info *host;
139 struct sockaddr_gen *sin = host->sin;
144 (void) inet_ntop(SGFAM(sin), SGADDRP(sin), host->addr, sizeof(host->addr));
146 STRN_CPY(host->addr, inet_ntoa(sin->sg_sin.sin_addr), sizeof(host->addr));
150 /* sock_hostname - map endpoint address to host name */
152 void sock_hostname(host)
153 struct host_info *host;
155 struct sockaddr_gen *sin = host->sin;
165 * host name/address checking code below.
171 STRN_CPY(host->name, hp->h_name, sizeof(host->name));
186 if ((hp = tcpd_gethostbyname(host->name, SGFAM(sin))) == 0) {
189 * Unable to verify that the host name matches the address. This
194 host->name);
196 } else if (STR_NE(host->name, hp->h_name)
197 && STR_NE(host->name, "localhost")) {
205 tcpd_warn("host name/name mismatch: %s != %.*s",
206 host->name, STRING_LENGTH, hp->h_name);
229 * The host name does not map to the initial address. Perhaps
233 tcpd_warn("host name/address mismatch: %s != %.*s",
241 strcpy(host->name, paranoid); /* name is bad, clobber it */