diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-21 17:23:25 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-11-30 14:42:53 -0500 |
commit | dbbaa515183e250e20c40fa7b4c00df9487058fa (patch) | |
tree | ad7047ded85f1c231ff158e6aad8201824a72148 /src/or/circuitbuild.h | |
parent | de617a471442342fc2abafdde4e250fd31eb45ac (diff) | |
download | tor-dbbaa515183e250e20c40fa7b4c00df9487058fa.tar.gz tor-dbbaa515183e250e20c40fa7b4c00df9487058fa.zip |
Use the new guard notification/selection APIs throughout Tor
This patch doesn't cover every case; omitted cases are marked with
"XXXX prop271", as usual. It leaves both the old interface and the
new interface for guard status notification, since they don't
actually work in the same way: the new API wants to be told when a
circuit has failed or succeeded, whereas the old API wants to know
when a channel has failed or succeeded.
I ran into some trouble with directory guard stuff, since when we
pick the directory guard, we don't actually have a circuit to
associate it with. I solved that by allowing guard states to be
associated with directory connections, not just circuits.
Diffstat (limited to 'src/or/circuitbuild.h')
-rw-r--r-- | src/or/circuitbuild.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/circuitbuild.h b/src/or/circuitbuild.h index 56f66a19d6..2c83a16550 100644 --- a/src/or/circuitbuild.h +++ b/src/or/circuitbuild.h @@ -64,8 +64,12 @@ int extend_info_has_preferred_onion_key(const extend_info_t* ei); const node_t *build_state_get_exit_node(cpath_build_state_t *state); const char *build_state_get_exit_nickname(cpath_build_state_t *state); +struct circuit_guard_state_t; + const node_t *choose_good_entry_server(uint8_t purpose, - cpath_build_state_t *state); + cpath_build_state_t *state, + struct circuit_guard_state_t **guard_state_out); +void circuit_upgrade_circuits_from_guard_wait(void); #ifdef CIRCUITBUILD_PRIVATE STATIC circid_t get_unique_circ_id_by_chan(channel_t *chan); |