Lines Matching refs:host

4   * it provides methods to map a transport address to a printable host name
7 * The result from the hostname lookup method is STRING_PARANOID when a host
8 * pretends to have someone elses name, or when a host name is available but
50 * 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:
142 void sock_hostaddr(host)
143 struct host_info *host;
146 struct sockaddr *sin = host->sin;
157 getnameinfo(sin, salen, host->addr, sizeof(host->addr),
160 struct sockaddr_in *sin = host->sin;
163 STRN_CPY(host->addr, inet_ntoa(sin->sin_addr), sizeof(host->addr));
167 /* sock_hostname - map endpoint address to host name */
169 void sock_hostname(host)
170 struct host_info *host;
173 struct sockaddr *sin = host->sin;
214 STRN_CPY(host->name, hname, sizeof(host->name));
221 if ((err = getaddrinfo(host->name, NULL, &hints, &res0)) == 0) {
223 tcpd_warn("host name/name mismatch: "
225 host->name);
226 strcpy(host->name, paranoid); /* name is bad, clobber it */
250 if (getaddrinfo(host->name, NULL, &hints, &res0) != 0) {
253 * Unable to verify that the host name matches the address. This
258 host->name,
262 || STR_NE(host->name, res0->ai_canonname))
263 && STR_NE(host->name, "localhost")) {
271 tcpd_warn("host name/name mismatch: %s != %.*s",
272 host->name, STRING_LENGTH,
309 * The host name does not map to the initial address. Perhaps
316 tcpd_warn("host name/address mismatch: %s != %.*s",
320 strcpy(host->name, paranoid); /* name is bad, clobber it */
325 struct sockaddr_in *sin = host->sin;
334 * host name/address checking code below.
340 STRN_CPY(host->name, hp->h_name, sizeof(host->name));
355 if ((hp = gethostbyname(host->name)) == 0) {
358 * Unable to verify that the host name matches the address. This
363 host->name);
365 } else if (STR_NE(host->name, hp->h_name)
366 && STR_NE(host->name, "localhost")) {
374 tcpd_warn("host name/name mismatch: %s != %.*s",
375 host->name, STRING_LENGTH, hp->h_name);
394 * The host name does not map to the initial address. Perhaps
399 tcpd_warn("host name/address mismatch: %s != %.*s",
402 strcpy(host->name, paranoid); /* name is bad, clobber it */