summaryrefslogtreecommitdiff
path: root/src/or/entrynodes.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-12-25 23:30:28 -0500
committerNick Mathewson <nickm@torproject.org>2012-12-25 23:30:28 -0500
commit885e8d35c7af65b3e1e598d6f2e951ba84e65928 (patch)
tree8babd1d1ce290fd98d43cc948a90001a05ca5c93 /src/or/entrynodes.h
parent265aab298ad923425e136013f6c439b5fba32558 (diff)
parent406d59a9c93e46bcb5be0e0a5c087f4860522d56 (diff)
downloadtor-885e8d35c7af65b3e1e598d6f2e951ba84e65928.tar.gz
tor-885e8d35c7af65b3e1e598d6f2e951ba84e65928.zip
Merge remote-tracking branch 'mikeperry/209-path-bias-changes'
Diffstat (limited to 'src/or/entrynodes.h')
-rw-r--r--src/or/entrynodes.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h
index ae5d2307e7..2a9a99cfbc 100644
--- a/src/or/entrynodes.h
+++ b/src/or/entrynodes.h
@@ -31,8 +31,12 @@ typedef struct entry_guard_t {
* router, 1 if we have. */
unsigned int can_retry : 1; /**< Should we retry connecting to this entry,
* in spite of having it marked as unreachable?*/
- unsigned int path_bias_notice : 1; /**< Did we alert the user about path bias
+ unsigned int path_bias_noticed : 1; /**< Did we alert the user about path
+ * bias for this node already? */
+ unsigned int path_bias_warned : 1; /**< Did we alert the user about path bias
* for this node already? */
+ unsigned int path_bias_extreme : 1; /**< Did we alert the user about path
+ * bias 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; /**< Is this node a directory cache? */
@@ -45,9 +49,18 @@ typedef struct entry_guard_t {
time_t last_attempted; /**< 0 if we can connect to this guard, or the time
* at which we last failed to connect to it. */
- unsigned first_hops; /**< Number of first hops this guard has completed */
- unsigned circuit_successes; /**< Number of successfully built circuits using
+ double circ_attempts; /**< Number of circuits this guard has "attempted" */
+ double circ_successes; /**< Number of successfully built circuits using
* this guard as first hop. */
+ double successful_circuits_closed; /**< Number of circuits that carried
+ * streams successfully. */
+ double collapsed_circuits; /**< Number of fully built circuits that were
+ * remotely closed before any streams were
+ * attempted. */
+ double unusable_circuits; /**< Number of circuits for which streams were
+ * attempted, but none succeeded. */
+ double timeouts; /**< Number of 'right-censored' circuit timeouts for this
+ * guard. */
} entry_guard_t;
entry_guard_t *entry_guard_get_by_id_digest(const char *digest);
@@ -100,5 +113,8 @@ int find_transport_by_bridge_addrport(const tor_addr_t *addr, uint16_t port,
int validate_pluggable_transports_config(void);
+double pathbias_get_closed_count(entry_guard_t *gaurd);
+double pathbias_get_success_count(entry_guard_t *guard);
+
#endif