#ifndef INADDR_NONE
#define INADDR_NONE (-1) /* XXX should be 0xffffffff */
#endif
/* Application-specific. */
#include "tcpd.h"
#include "scaffold.h"
/*
* These are referenced by the options module and by rfc931.c.
*/
int allow_severity = SEVERITY;
int deny_severity = LOG_WARNING;
extern int rfc931_timeout; /* = RFC931_TIMEOUT; */
/* find_inet_addr - find all addresses for this host, result to free() */
struct addrinfo *find_inet_addr(char *host, int flags)
{
struct addrinfo hints, *res;
int error;
count = 0;
for (res = res0; res; res = res->ai_next) {
count++;
if (res->ai_addrlen > sizeof(ss))
continue;
memcpy(&ss, res->ai_addr, res->ai_addrlen);
/*
* Force host name and address conversions. Use the request structure
* as a cache. Detect hostname lookup problems. Any name/name or
* name/address conflicts will be reported while eval_hostname() does
* its job.
*/
request_set(&request, RQ_CLIENT_ADDR, "", RQ_CLIENT_NAME, "", 0);
if (STR_EQ(eval_hostname(request.client), unknown))
tcpd_warn("host address %s->name lookup failed",
eval_hostaddr(request.client));
}
freeaddrinfo(res0);
return (count);
}
/* dummy function to intercept the real shell_cmd() */
/* ARGSUSED */
void shell_cmd(char *command)
{
if (hosts_access_verbose)
printf("command: %s", command);
}
/* dummy function to intercept the real clean_exit() */