version 1.12.56.1, 2012/04/23 16:48:56 |
version 1.12.56.2, 2012/04/23 23:40:41 |
Line 29 struct request_info { |
|
Line 29 struct request_info { |
|
char pid[10]; /* access via eval_pid(request) */ |
char pid[10]; /* access via eval_pid(request) */ |
struct host_info client[1]; /* client endpoint info */ |
struct host_info client[1]; /* client endpoint info */ |
struct host_info server[1]; /* server endpoint info */ |
struct host_info server[1]; /* server endpoint info */ |
void (*sink)(int); /* datagram sink function or 0 */ |
void (*sink) /* datagram sink function or 0 */ |
void (*hostname)(struct host_info *); /* address to printable hostname */ |
__P((int)); |
void (*hostaddr)(struct host_info *); /* address to printable address */ |
void (*hostname) /* address to printable hostname */ |
void (*cleanup)(void); /* cleanup function or 0 */ |
__P((struct host_info *)); |
|
void (*hostaddr) /* address to printable address */ |
|
__P((struct host_info *)); |
|
void (*cleanup) /* cleanup function or 0 */ |
|
__P((void)); |
struct netconfig *config; /* netdir handle */ |
struct netconfig *config; /* netdir handle */ |
}; |
}; |
|
|
|
|
#define fromhost sock_host /* no TLI support needed */ |
#define fromhost sock_host /* no TLI support needed */ |
|
|
extern int hosts_access /* access control */ |
extern int hosts_access /* access control */ |
(struct request_info *); |
__P((struct request_info *)); |
extern int hosts_ctl /* limited interface to hosts_access */ |
extern int hosts_ctl /* limited interface to hosts_access */ |
(char *, char *, char *, char *); |
__P((char *, char *, char *, char *)); |
extern void shell_cmd /* execute shell command */ |
extern void shell_cmd /* execute shell command */ |
(char *); |
__P((char *)); |
extern char *percent_x /* do %<char> expansion */ |
extern char *percent_x /* do %<char> expansion */ |
(char *, int, char *, struct request_info *); |
__P((char *, int, char *, struct request_info *)); |
extern void rfc931 /* client name from RFC 931 daemon */ |
extern void rfc931 /* client name from RFC 931 daemon */ |
(struct sockaddr *, struct sockaddr *, char *); |
__P((struct sockaddr *, struct sockaddr *, char *)); |
extern void clean_exit /* clean up and exit */ |
extern void clean_exit /* clean up and exit */ |
(struct request_info *); |
__P((struct request_info *)); |
extern void refuse /* clean up and exit */ |
extern void refuse /* clean up and exit */ |
(struct request_info *); |
__P((struct request_info *)); |
extern char *xgets /* fgets() on steroids */ |
extern char *xgets /* fgets() on steroids */ |
(char *, int, FILE *); |
__P((char *, int, FILE *)); |
extern char *split_at /* strchr() and split */ |
extern char *split_at /* strchr() and split */ |
(char *, int); |
__P((char *, int)); |
extern int dot_quad_addr /* restricted inet_aton() */ |
extern int dot_quad_addr /* restricted inet_aton() */ |
(char *, unsigned long *); |
__P((char *, unsigned long *)); |
|
|
/* Global variables. */ |
/* Global variables. */ |
|
|
extern int allow_severity; /* for connection logging */ |
extern int allow_severity; /* for connection logging */ |
extern int deny_severity; /* for connection logging */ |
extern int deny_severity; /* for connection logging */ |
extern const char *hosts_allow_table; /* for verification mode redirection */ |
extern char *hosts_allow_table; /* for verification mode redirection */ |
extern const char *hosts_deny_table; /* for verification mode redirection */ |
extern char *hosts_deny_table; /* for verification mode redirection */ |
extern int hosts_access_verbose; /* for verbose matching mode */ |
extern int hosts_access_verbose; /* for verbose matching mode */ |
extern int rfc931_timeout; /* user lookup timeout */ |
extern int rfc931_timeout; /* user lookup timeout */ |
extern int resident; /* > 0 if resident process */ |
extern int resident; /* > 0 if resident process */ |
Line 106 extern int resident; /* > 0 if residen |
|
Line 110 extern int resident; /* > 0 if residen |
|
*/ |
*/ |
|
|
extern struct request_info *request_init /* initialize request */ |
extern struct request_info *request_init /* initialize request */ |
(struct request_info *,...); |
__P((struct request_info *,...)); |
extern struct request_info *request_set /* update request structure */ |
extern struct request_info *request_set /* update request structure */ |
(struct request_info *,...); |
__P((struct request_info *,...)); |
|
|
#define RQ_FILE 1 /* file descriptor */ |
#define RQ_FILE 1 /* file descriptor */ |
#define RQ_DAEMON 2 /* server process (argv[0]) */ |
#define RQ_DAEMON 2 /* server process (argv[0]) */ |
Line 129 extern struct request_info *request_set |
|
Line 133 extern struct request_info *request_set |
|
*/ |
*/ |
|
|
extern char *eval_user /* client user */ |
extern char *eval_user /* client user */ |
(struct request_info *); |
__P((struct request_info *)); |
extern char *eval_hostname /* printable hostname */ |
extern char *eval_hostname /* printable hostname */ |
(struct host_info *); |
__P((struct host_info *)); |
extern char *eval_hostaddr /* printable host address */ |
extern char *eval_hostaddr /* printable host address */ |
(struct host_info *); |
__P((struct host_info *)); |
extern char *eval_hostinfo /* host name or address */ |
extern char *eval_hostinfo /* host name or address */ |
(struct host_info *); |
__P((struct host_info *)); |
extern char *eval_client /* whatever is available */ |
extern char *eval_client /* whatever is available */ |
(struct request_info *); |
__P((struct request_info *)); |
extern char *eval_server /* whatever is available */ |
extern char *eval_server /* whatever is available */ |
(struct request_info *); |
__P((struct request_info *)); |
#define eval_daemon(r) ((r)->daemon) /* daemon process name */ |
#define eval_daemon(r) ((r)->daemon) /* daemon process name */ |
#define eval_pid(r) ((r)->pid) /* process id */ |
#define eval_pid(r) ((r)->pid) /* process id */ |
|
|
/* Socket-specific methods, including DNS hostname lookups. */ |
/* Socket-specific methods, including DNS hostname lookups. */ |
|
|
extern void sock_host /* look up endpoint addresses */ |
extern void sock_host /* look up endpoint addresses */ |
(struct request_info *); |
__P((struct request_info *)); |
extern void sock_hostname /* translate address to hostname */ |
extern void sock_hostname /* translate address to hostname */ |
(struct host_info *); |
__P((struct host_info *)); |
extern void sock_hostaddr /* address to printable address */ |
extern void sock_hostaddr /* address to printable address */ |
(struct host_info *); |
__P((struct host_info *)); |
#define sock_methods(r) \ |
#define sock_methods(r) \ |
{ (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; } |
{ (r)->hostname = sock_hostname; (r)->hostaddr = sock_hostaddr; } |
|
|
Line 158 extern void sock_hostaddr /* address to |
|
Line 162 extern void sock_hostaddr /* address to |
|
|
|
#if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) |
#if defined(TLI) || defined(PTX) || defined(TLI_SEQUENT) |
extern void tli_host /* look up endpoint addresses etc. */ |
extern void tli_host /* look up endpoint addresses etc. */ |
(struct request_info *); |
__P((struct request_info *)); |
#endif |
#endif |
|
|
/* |
/* |
Line 168 extern void tli_host /* look up endpoi |
|
Line 172 extern void tli_host /* look up endpoi |
|
*/ |
*/ |
|
|
extern void tcpd_warn /* report problem and proceed */ |
extern void tcpd_warn /* report problem and proceed */ |
(const char *, ...) |
__P((char *, ...)) |
__attribute__((__format__(__printf__, 1, 2))); |
__attribute__((__format__(__printf__, 1, 2))); |
extern void tcpd_jump /* report problem and jump */ |
extern void tcpd_jump /* report problem and jump */ |
(const char *, ...) |
__P((char *, ...)) |
__attribute__((__format__(__printf__, 1, 2))); |
__attribute__((__format__(__printf__, 1, 2))); |
__END_DECLS |
__END_DECLS |
|
|
struct tcpd_context { |
struct tcpd_context { |
const char *file; /* current file */ |
char *file; /* current file */ |
int line; /* current line */ |
int line; /* current line */ |
}; |
}; |
__BEGIN_DECLS |
__BEGIN_DECLS |
|
|
|
|
__BEGIN_DECLS |
__BEGIN_DECLS |
extern void process_options /* execute options */ |
extern void process_options /* execute options */ |
(char *, struct request_info *); |
__P((char *, struct request_info *)); |
extern int dry_run; /* verification flag */ |
extern int dry_run; /* verification flag */ |
extern void fix_options /* get rid of IP-level socket options */ |
extern void fix_options /* get rid of IP-level socket options */ |
(struct request_info *); |
__P((struct request_info *)); |
__END_DECLS |
__END_DECLS |