aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/or/or.h b/src/or/or.h
index ac9634748e..c8616beba3 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1648,6 +1648,18 @@ typedef struct routerstatus_t {
} routerstatus_t;
+/** DOCDOC */
+typedef struct short_policy_entry_t {
+ uint16_t min_port, max_port;
+} short_policy_entry_t;
+
+/** DOCDOC */
+typedef struct short_policy_t {
+ unsigned int is_accept : 1;
+ unsigned int n_entries : 31;
+ short_policy_entry_t entries[1];
+} short_policy_t;
+
/** A microdescriptor is the smallest amount of information needed to build a
* circuit through a router. They are generated by the directory authorities,
* using information from the uploaded routerinfo documents. They are not
@@ -1689,9 +1701,8 @@ typedef struct microdesc_t {
crypto_pk_env_t *onion_pkey;
/** As routerinfo_t.family */
smartlist_t *family;
- /** Encoded exit policy summary */
- char *exitsummary; /**< exit policy summary -
- * XXX this probably should not stay a string. */
+ /** Exit policy summary */
+ short_policy_t *exit_policy;
} microdesc_t;
/** A node_t represents a Tor router.
@@ -3444,7 +3455,7 @@ typedef enum {
ADDR_POLICY_PROBABLY_ACCEPTED=1,
/** Part of the address was unknown, but as far as we can tell, it was
* rejected. */
- ADDR_POLICY_PROBABLY_REJECTED=2
+ ADDR_POLICY_PROBABLY_REJECTED=2,
} addr_policy_result_t;
/********************************* rephist.c ***************************/