aboutsummaryrefslogtreecommitdiff
path: root/src/or/entrynodes.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-12-11 12:44:18 -0500
committerNick Mathewson <nickm@torproject.org>2012-12-25 23:14:43 -0500
commit0c4210fb65d1fe45cbd39ea078be1b09c0f52fc9 (patch)
tree92b6ea6308a219644684456e23626d0a4bdd66f1 /src/or/entrynodes.h
parent1df7289000de7ffd8676ea0f3c276ea54e8cad3c (diff)
downloadtor-0c4210fb65d1fe45cbd39ea078be1b09c0f52fc9.tar
tor-0c4210fb65d1fe45cbd39ea078be1b09c0f52fc9.tar.gz
Directory guard implementation.
Implements proposal 207; ticket 6526.
Diffstat (limited to 'src/or/entrynodes.h')
-rw-r--r--src/or/entrynodes.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h
index 24f2eeffe..ae5d2307e 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,