summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2013-01-28 16:16:45 -0800
committerAndrea Shepard <andrea@torproject.org>2013-01-28 16:16:45 -0800
commit123daffb600cb1b581bee9dd576a980a06926f9c (patch)
tree07952acab822f5a86a7d47752ac0f50116a405f8 /src/or/or.h
parentdfbd19df418347d833df650e68367c96a3aa37ad (diff)
parenta78542f0c30a6d8a25b3a8c92fec61c04c3feeaf (diff)
downloadtor-123daffb600cb1b581bee9dd576a980a06926f9c.tar.gz
tor-123daffb600cb1b581bee9dd576a980a06926f9c.zip
Merge branch 'bug7802' of ssh://git-rw.torproject.org/mikeperry/tor
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h32
1 files changed, 28 insertions, 4 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 251512dd31..cfcddba3b2 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2839,6 +2839,15 @@ typedef enum {
PATH_STATE_BUILD_ATTEMPTED = 1,
/** This circuit has been completely built */
PATH_STATE_BUILD_SUCCEEDED = 2,
+ /** Did we try to attach any SOCKS streams or hidserv introductions to
+ * this circuit?
+ *
+ * Note: If we ever implement end-to-end stream timing through test
+ * stream probes (#5707), we must *not* set this for those probes
+ * (or any other automatic streams) because the adversary could
+ * just tag at a later point.
+ */
+ PATH_STATE_USE_ATTEMPTED = 3,
/** Did any SOCKS streams or hidserv introductions actually succeed on
* this circuit?
*
@@ -2847,13 +2856,20 @@ typedef enum {
* (or any other automatic streams) because the adversary could
* just tag at a later point.
*/
- PATH_STATE_USE_SUCCEEDED = 3,
+ PATH_STATE_USE_SUCCEEDED = 4,
/**
* This is a special state to indicate that we got a corrupted
* relay cell on a circuit and we don't intend to probe it.
*/
- PATH_STATE_USE_FAILED = 4,
+ PATH_STATE_USE_FAILED = 5,
+
+ /**
+ * This is a special state to indicate that we already counted
+ * the circuit. Used to guard against potential state machine
+ * violations.
+ */
+ PATH_STATE_ALREADY_COUNTED = 6,
} path_state_t;
/** An origin_circuit_t holds data necessary to build and use a circuit.
@@ -2998,7 +3014,6 @@ typedef struct origin_circuit_t {
* ISO_STREAM. */
uint64_t associated_isolated_stream_global_id;
/**@}*/
-
} origin_circuit_t;
struct onion_queue_t;
@@ -3913,7 +3928,16 @@ typedef struct {
int PathBiasScaleThreshold;
int PathBiasScaleFactor;
int PathBiasMultFactor;
- int PathBiasUseCloseCounts;
+ /** @} */
+
+ /**
+ * Parameters for path-bias use detection
+ * @{
+ */
+ int PathBiasUseThreshold;
+ double PathBiasNoticeUseRate;
+ double PathBiasExtremeUseRate;
+ int PathBiasScaleUseThreshold;
/** @} */
int IPv6Exit; /**< Do we support exiting to IPv6 addresses? */