tor  0.4.2.1-alpha-dev
addr_policy_st.h
1 /* Copyright (c) 2001 Matej Pfajfar.
2  * Copyright (c) 2001-2004, Roger Dingledine.
3  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4  * Copyright (c) 2007-2019, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 #ifndef TOR_ADDR_POLICY_ST_H
8 #define TOR_ADDR_POLICY_ST_H
9 
10 #include "lib/cc/torint.h"
11 #include "lib/net/address.h"
12 
14 typedef enum {
15  ADDR_POLICY_ACCEPT=1,
16  ADDR_POLICY_REJECT=2,
17 } addr_policy_action_t;
18 #define addr_policy_action_bitfield_t ENUM_BF(addr_policy_action_t)
19 
21 struct addr_policy_t {
22  int refcnt;
24  addr_policy_action_bitfield_t policy_type:2;
25  unsigned int is_private:1;
27  unsigned int is_canonical:1;
42  uint16_t prt_min;
43  uint16_t prt_max;
44 };
45 
46 #endif /* !defined(TOR_ADDR_POLICY_ST_H) */
Integer definitions used throughout Tor.
uint8_t maskbits_t
Definition: address.h:62
uint16_t prt_max
Headers for address.h.
addr_policy_action_bitfield_t policy_type
maskbits_t maskbits
unsigned int is_canonical
uint16_t prt_min
unsigned int is_private
tor_addr_t addr