diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-04-06 05:33:32 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-04-06 05:33:32 +0000 |
commit | b7cdcf34622eff7e2d805452e94883e8bd94f5d6 (patch) | |
tree | 0dfc4c1e18c0f15dc3f73255dbbb26d4096ff281 /src/or/or.h | |
parent | 712d05c19a8730e9a34118b68d8a78f767cbb285 (diff) | |
download | tor-b7cdcf34622eff7e2d805452e94883e8bd94f5d6.tar tor-b7cdcf34622eff7e2d805452e94883e8bd94f5d6.tar.gz |
Hopefully, this will make ORs much faster, and not break them: keep a big splay tree of (circid,orconn)->circuit mappings to make circuit_get_by_circid_conn much faster.
svn:r4020
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/or.h b/src/or/or.h index b555ffd37..1233ee721 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1165,9 +1165,13 @@ void onion_append_to_cpath(crypt_path_t **head_ptr, crypt_path_t *new_hop); /********************************* circuitlist.c ***********************/ extern const char *circuit_state_to_string[]; +enum which_conn_changed_t { P_CONN_CHANGED=1, N_CONN_CHANGED=0 }; +void circuit_set_circid_orconn(circuit_t *circ, uint16_t id, + connection_t *conn, + enum which_conn_changed_t which); void circuit_close_all_marked(void); circuit_t *circuit_new(uint16_t p_circ_id, connection_t *p_conn); -circuit_t *circuit_get_by_circ_id_conn(uint16_t circ_id, connection_t *conn); +circuit_t *circuit_get_by_circid_orconn(uint16_t circ_id, connection_t *conn); circuit_t *circuit_get_by_conn(connection_t *conn); circuit_t *circuit_get_by_global_id(uint32_t id); circuit_t *circuit_get_by_rend_query_and_purpose(const char *rend_query, uint8_t purpose); |