summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-11-10 20:14:37 +0000
committerNick Mathewson <nickm@torproject.org>2004-11-10 20:14:37 +0000
commit954570486f6d468e9e88415d728965daae62094b (patch)
tree2d222365301f020c6874694e2e77b8393c0f5578 /src/or/or.h
parent35d0d3c050f3ce1290792f1a2906b8b29941c66d (diff)
downloadtor-954570486f6d468e9e88415d728965daae62094b.tar.gz
tor-954570486f6d468e9e88415d728965daae62094b.zip
Resolve a FIXME: use identity comparison, not nickname comparison, to
choose circuit ID types. This is important because our view of "the nickname of the router on the other side of this connection" is skewed, and depends on whether we think the other rotuer is verified--and there's no way to know whether another router thinks you are verified. For backward compatibility, we notice when the other router chooses the same circuit ID type as us (because it's running an old version), and switch our type to be polite. svn:r2797
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h
index f8eb0ab94a..b5cb1b639a 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -150,8 +150,10 @@
* In seconds. */
#define ROUTER_MAX_AGE (60*60*24)
-#define CIRC_ID_TYPE_LOWER 0
-#define CIRC_ID_TYPE_HIGHER 1
+typedef enum {
+ CIRC_ID_TYPE_LOWER=0,
+ CIRC_ID_TYPE_HIGHER=1
+} circ_id_type_t;
#define _CONN_TYPE_MIN 3
/** Type for sockets listening for OR connections. */
@@ -534,6 +536,9 @@ struct connection_t {
* add 'bandwidth' to this, capping it at 10*bandwidth.
* (OPEN ORs only)
*/
+ circ_id_type_t circ_id_type; /**< When we send CREATE cells along this
+ * connection, which half of the space should
+ * we use? */
/* Used only by DIR and AP connections: */
char rend_query[REND_SERVICE_ID_LEN+1]; /**< What rendezvous service are we