aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-12-17 17:20:26 +0000
committerNick Mathewson <nickm@torproject.org>2008-12-17 17:20:26 +0000
commit0dc724d19c7e96b63db19990793403fdbdd0563b (patch)
tree1985537b8e9d0138c5f2900c6f479a2a8cd99cfc /src/or/or.h
parentd0e1cc6fe24e08310edb9211bac9b54ab886c958 (diff)
downloadtor-0dc724d19c7e96b63db19990793403fdbdd0563b.tar.gz
tor-0dc724d19c7e96b63db19990793403fdbdd0563b.zip
Make ALLOW_INVALID_* into an enum.
svn:r17648
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/or/or.h b/src/or/or.h
index c5165d3db3..ee4c543d89 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2072,11 +2072,14 @@ static INLINE origin_circuit_t *TO_ORIGIN_CIRCUIT(circuit_t *x)
return DOWNCAST(origin_circuit_t, x);
}
-#define ALLOW_INVALID_ENTRY 1
-#define ALLOW_INVALID_EXIT 2
-#define ALLOW_INVALID_MIDDLE 4
-#define ALLOW_INVALID_RENDEZVOUS 8
-#define ALLOW_INVALID_INTRODUCTION 16
+/** Bitfield type: things that we're willing to use invalid routers for. */
+typedef enum invalid_router_usage_t {
+ ALLOW_INVALID_ENTRY =1,
+ ALLOW_INVALID_EXIT =2,
+ ALLOW_INVALID_MIDDLE =4,
+ ALLOW_INVALID_RENDEZVOUS =8,
+ ALLOW_INVALID_INTRODUCTION=16,
+} invalid_router_usage_t;
/** An entry specifying a set of addresses and ports that should be remapped
* to another address and port before exiting this exit node. */
@@ -2146,7 +2149,8 @@ typedef struct {
/** List of "entry", "middle", "exit", "introduction", "rendezvous". */
smartlist_t *AllowInvalidNodes;
- int _AllowInvalid; /**< Bitmask; derived from AllowInvalidNodes. */
+ /** Bitmask; derived from AllowInvalidNodes. */
+ invalid_router_usage_t _AllowInvalid;
config_line_t *ExitPolicy; /**< Lists of exit policy components. */
int ExitPolicyRejectPrivate; /**< Should we not exit to local addresses? */
config_line_t *SocksPolicy; /**< Lists of socks policy components */