From 0c4210fb65d1fe45cbd39ea078be1b09c0f52fc9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 11 Dec 2012 12:44:18 -0500 Subject: Directory guard implementation. Implements proposal 207; ticket 6526. --- src/or/entrynodes.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/or/entrynodes.h') diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h index 24f2eeffe9..ae5d2307e7 100644 --- a/src/or/entrynodes.h +++ b/src/or/entrynodes.h @@ -35,7 +35,7 @@ typedef struct entry_guard_t { * for this node already? */ unsigned int path_bias_disabled : 1; /**< Have we disabled this node because * of path bias issues? */ - unsigned int is_dir_cache : 1; /**< DOCDOC */ + unsigned int is_dir_cache : 1; /**< Is this node a directory cache? */ time_t bad_since; /**< 0 if this guard is currently usable, or the time at * which it was observed to become (according to the * directory or the user configuration) unusable. */ @@ -53,7 +53,7 @@ typedef struct entry_guard_t { entry_guard_t *entry_guard_get_by_id_digest(const char *digest); void entry_guards_changed(void); const smartlist_t *get_entry_guards(void); -int num_live_entry_guards(void); +int num_live_entry_guards(int for_directory); #endif @@ -63,6 +63,7 @@ int entry_guard_register_connect_status(const char *digest, int succeeded, void entry_nodes_should_be_added(void); int entry_list_is_constrained(const or_options_t *options); const node_t *choose_random_entry(cpath_build_state_t *state); +const node_t *choose_random_dirguard(dirinfo_type_t t); int entry_guards_parse_state(or_state_t *state, int set, char **msg); void entry_guards_update_state(or_state_t *state); int getinfo_helper_entry_guards(control_connection_t *conn, -- cgit v1.2.3-54-g00ecf