[or-cvs] Replace ADDR_POLICY_ACCEPT/REJECT with its own enum

Nick Mathewson nickm at seul.org
Tue Aug 9 05:22:26 UTC 2005


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv25864/src/or

Modified Files:
	or.h 
Log Message:
Replace ADDR_POLICY_ACCEPT/REJECT with its own enum

Index: or.h
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/or.h,v
retrieving revision 1.638
retrieving revision 1.639
diff -u -d -r1.638 -r1.639
--- or.h	8 Aug 2005 21:58:48 -0000	1.638
+++ or.h	9 Aug 2005 05:22:23 -0000	1.639
@@ -687,12 +687,14 @@
 
 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



More information about the tor-commits mailing list