diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-08-09 05:22:23 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-08-09 05:22:23 +0000 |
commit | 18abdfdf585f0d21436c13405b16e0b7d7283ca9 (patch) | |
tree | 4eb91c7236ae11d6a4e33ce731a0e022ab4d840a /src/or/or.h | |
parent | 05bced6139ee895eb29ddfc703a8425697607e6c (diff) | |
download | tor-18abdfdf585f0d21436c13405b16e0b7d7283ca9.tar tor-18abdfdf585f0d21436c13405b16e0b7d7283ca9.tar.gz |
Replace ADDR_POLICY_ACCEPT/REJECT with its own enum
svn:r4756
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/or.h b/src/or/or.h index 9e97e09a5..77e8e10bf 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -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 |