$NetBSD: patch-ab,v 1.2 2005/05/26 02:25:22 markd Exp $ --- tcpd.h.orig 2000-08-22 05:59:52.000000000 +1200 +++ tcpd.h @@ -8,6 +8,7 @@ #define STRING_LENGTH 128 /* hosts, users, processes */ +#include #include #include @@ -136,7 +137,11 @@ extern void fromhost(); /* get/validat #define fromhost sock_host /* no TLI support needed */ #endif +#ifdef __STDC__ +extern int hosts_access(struct request_info *); /* access control */ +#else extern int hosts_access(); /* access control */ +#endif extern void shell_cmd(); /* execute shell command */ extern char *percent_x(); /* do % expansion */ extern void rfc931(); /* client name from RFC 931 daemon */ @@ -195,20 +200,35 @@ extern struct request_info *request_set( * host_info structures serve as caches for the lookup results. */ +#ifdef __STDC__ +extern char *eval_user(struct request_info *); /* client user */ +extern char *eval_hostname(struct host_info *); /* printable hostname */ +extern char *eval_hostaddr(struct host_info *); /* printable host address */ +extern char *eval_hostinfo(struct host_info *); /* host name or address */ +extern char *eval_client(struct request_info *); /* whatever is available */ +extern char *eval_server(struct request_info *); /* whatever is available */ +#else extern char *eval_user(); /* client user */ extern char *eval_hostname(); /* printable hostname */ extern char *eval_hostaddr(); /* printable host address */ extern char *eval_hostinfo(); /* host name or address */ extern char *eval_client(); /* whatever is available */ extern char *eval_server(); /* whatever is available */ +#endif #define eval_daemon(r) ((r)->daemon) /* daemon process name */ #define eval_pid(r) ((r)->pid) /* process id */ /* Socket-specific methods, including DNS hostname lookups. */ +#ifdef __STDC__ +extern void sock_host(struct request_info *); /* look up endpoint addresses */ +extern void sock_hostname(struct host_info *); /* translate address to hostname */ +extern void sock_hostaddr(struct host_info *); /* address to printable address */ +#else extern void sock_host(); /* look up endpoint addresses */ extern void sock_hostname(); /* translate address to hostname */ extern void sock_hostaddr(); /* address to printable address */ +#endif #define sock_methods(r) \ { (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; }