From 18abdfdf585f0d21436c13405b16e0b7d7283ca9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 9 Aug 2005 05:22:23 +0000 Subject: [PATCH] Replace ADDR_POLICY_ACCEPT/REJECT with its own enum svn:r4756 --- src/or/or.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/or/or.h b/src/or/or.h index 9e97e09a57..77e8e10bf3 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 a such that