Replace ADDR_POLICY_ACCEPT/REJECT with its own enum

svn:r4756
This commit is contained in:
Nick Mathewson
2005-08-09 05:22:23 +00:00
parent 05bced6139
commit 18abdfdf58
+5 -3
View File
@@ -687,12 +687,14 @@ struct connection_t {
typedef struct connection_t connection_t;
#define ADDR_POLICY_ACCEPT 1
#define ADDR_POLICY_REJECT 2
typedef enum {
ADDR_POLICY_ACCEPT=1,
ADDR_POLICY_REJECT=2,
} addr_policy_action_t;
/** A linked list of policy rules */
typedef struct addr_policy_t {
char policy_type; /**< One of ADDR_POLICY_ACCEPT or ADDR_POLICY_REJECT. */
addr_policy_action_t policy_type; /**< What to do when the policy matches.*/
char *string; /**< String representation of this rule. */
uint32_t addr; /**< Base address to accept or reject. */
uint32_t msk; /**< Accept/reject all addresses <b>a</b> such that