aboutsummaryrefslogtreecommitdiff
path: root/src/or/entrynodes.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-11-21 17:14:04 -0500
committerNick Mathewson <nickm@torproject.org>2016-11-30 14:42:53 -0500
commit1fd0a547bb6af73cbc32be06ffbf6233eb9050a6 (patch)
tree005f2a26edc6a5c82d1b8f255ba448532e049c5a /src/or/entrynodes.h
parent8dc6048c02806e8d30740c5a2a0dd11476909ce4 (diff)
downloadtor-1fd0a547bb6af73cbc32be06ffbf6233eb9050a6.tar.gz
tor-1fd0a547bb6af73cbc32be06ffbf6233eb9050a6.zip
New function to tell the guard module "We're on the net!"
(Call it whenever we read a cell.)
Diffstat (limited to 'src/or/entrynodes.h')
-rw-r--r--src/or/entrynodes.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h
index 5b3aa66a26..7119d547b1 100644
--- a/src/or/entrynodes.h
+++ b/src/or/entrynodes.h
@@ -283,6 +283,13 @@ struct circuit_guard_state_t {
};
#endif
+/* Common entry points for old and new guard code */
+void guards_update_all(void);
+const node_t *guards_choose_guard(cpath_build_state_t *state,
+ circuit_guard_state_t **guard_state_out);
+const node_t *guards_choose_dirguard(dirinfo_type_t info,
+ circuit_guard_state_t **guard_state_out);
+
#if 1
/* XXXX NM I would prefer that all of this stuff be private to
* entrynodes.c. */
@@ -313,12 +320,15 @@ int entry_guard_pick_for_circuit(guard_selection_t *gs,
circuit_guard_state_t **guard_state_out);
int entry_guard_succeeded(guard_selection_t *gs,
circuit_guard_state_t **guard_state_p);
-int entry_guard_failed(guard_selection_t *gs,
+void entry_guard_failed(guard_selection_t *gs,
circuit_guard_state_t **guard_state_p);
+void entry_guard_chan_failed(guard_selection_t *gs,
+ channel_t *chan);
void entry_guards_update_all(guard_selection_t *gs);
int entry_guards_upgrade_waiting_circuits(guard_selection_t *gs,
smartlist_t *all_circuits,
smartlist_t *newly_complete_out);
+void entry_guards_note_internet_connectivity(guard_selection_t *gs);
/* Used by bridges.c only. */
void add_bridge_as_entry_guard(guard_selection_t *gs,