浏览代码

Replace ADDR_POLICY_ACCEPT/REJECT with its own enum

svn:r4756
Nick Mathewson 20 年之前
父节点
当前提交
18abdfdf58
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/or/or.h

+ 5 - 3
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