Added code to handle the "FilterDefaultDeny" directive. The filter_set_default_policy() function is used to select the default policy (either default allow or default deny) for the filtering code. Also, the two filtering functions now support the policy code.

This commit is contained in:
Robert James Kaes committed 2002-06-07 18:36:22 +00:00
1 parent ff56e32e8e
commit 7e1de2012c
2 files changed
+50 -14

No files matched your search

+8 -1
View File
@@ -1,4 +1,4 @@
/* $Id: filter.h,v 1.4 2002-05-27 01:56:22 rjkaes Exp $
/* $Id: filter.h,v 1.5 2002-06-07 18:36:21 rjkaes Exp $
*
* See 'filter.c' for a detailed description.
*
@@ -18,9 +18,16 @@
#ifndef _TINYPROXY_FILTER_H_
#define _TINYPROXY_FILTER_H_
typedef enum {
FILTER_DEFAULT_ALLOW,
FILTER_DEFAULT_DENY,
} filter_policy_t;
extern void filter_init(void);
extern void filter_destroy(void);
extern int filter_domain(const char *host);
extern int filter_url(const char *url);
extern void filter_set_default_policy(filter_policy_t policy);
#endif