summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-07-03 00:13:41 -0400
committerNick Mathewson <nickm@torproject.org>2011-07-03 00:13:41 -0400
commit6053e11ee6540750a68a7c59a1b91727f7e10952 (patch)
treeec4893214c3552adb9f6203deb80be9a41e6f0d1 /src/or/or.h
parent72125389979af60b659dc469159ea9be397a2ffa (diff)
downloadtor-6053e11ee6540750a68a7c59a1b91727f7e10952.tar.gz
tor-6053e11ee6540750a68a7c59a1b91727f7e10952.zip
Refactor the interfaces of transport/proxy lookup fns
Returning a tristate is needless here; we can just use the yielded transport/proxy_type field to tell whether there's a proxy, and have the return indicate success/failure. Also, store the proxy_type in the or_connection_t rather than letting it get out of sync if a configuration reload happens between launching the or_connection and deciding what to say with it.
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 72d311b430..d1817d47f8 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -230,6 +230,8 @@ typedef enum {
#define PROXY_CONNECT 1
#define PROXY_SOCKS4 2
#define PROXY_SOCKS5 3
+/* !!!! If there is ever a PROXY_* type over 2, we must grow the proxy_type
+ * field in or_connection_t */
/* pluggable transports proxy type */
#define PROXY_PLUGGABLE 4
@@ -1097,6 +1099,7 @@ typedef struct or_connection_t {
* router itself has a problem.
*/
unsigned int is_bad_for_new_circs:1;
+ unsigned int proxy_type:2; /**< One of PROXY_NONE...PROXY_SOCKS5 */
uint8_t link_proto; /**< What protocol version are we using? 0 for
* "none negotiated yet." */
circid_t next_circ_id; /**< Which circ_id do we try to use next on