aboutsummaryrefslogtreecommitdiff
path: root/src/feature/control/control.h
diff options
context:
space:
mode:
authorTaylor Yu <catalyst@torproject.org>2018-12-17 09:31:16 -0600
committerNick Mathewson <nickm@torproject.org>2018-12-21 14:15:35 -0500
commit85542ee5a0b37bf5b572b9beeda3cb8038ecd88e (patch)
treeb89e4f059e60abbfe6cc71448e3a48c20f3cd7b7 /src/feature/control/control.h
parent936c93e562deaba62f0d32f7e7fda770c5604318 (diff)
downloadtor-85542ee5a0b37bf5b572b9beeda3cb8038ecd88e.tar.gz
tor-85542ee5a0b37bf5b572b9beeda3cb8038ecd88e.zip
The big bootstrap phase redefinition
Redefine the set of bootstrap phases to allow display of finer-grained progress in the early connection stages of connecting to a relay. This includes adding intermediate phases for proxy and PT connections. Also add a separate new phase to indicate obtaining enough directory info to build circuits so we can report that independently of actually initiating an ORCONN to build the first application circuit. Previously, we would claim to be connecting to a relay when we had merely finished obtaining directory info. Part of ticket 27167.
Diffstat (limited to 'src/feature/control/control.h')
-rw-r--r--src/feature/control/control.h41
1 files changed, 33 insertions, 8 deletions
diff --git a/src/feature/control/control.h b/src/feature/control/control.h
index 8180c4b603..08d8924e2d 100644
--- a/src/feature/control/control.h
+++ b/src/feature/control/control.h
@@ -51,17 +51,42 @@ typedef enum buildtimeout_set_event_t {
typedef enum {
BOOTSTRAP_STATUS_UNDEF=-1,
BOOTSTRAP_STATUS_STARTING=0,
- BOOTSTRAP_STATUS_CONN_DIR=5,
- BOOTSTRAP_STATUS_HANDSHAKE_DIR=10,
- BOOTSTRAP_STATUS_ONEHOP_CREATE=15,
- BOOTSTRAP_STATUS_REQUESTING_STATUS=20,
- BOOTSTRAP_STATUS_LOADING_STATUS=25,
+
+ /* Initial connection to any relay */
+
+ BOOTSTRAP_STATUS_CONN_PT=1,
+ BOOTSTRAP_STATUS_CONN_DONE_PT=2,
+ BOOTSTRAP_STATUS_CONN_PROXY=3,
+ BOOTSTRAP_STATUS_CONN_DONE_PROXY=4,
+ BOOTSTRAP_STATUS_CONN=5,
+ BOOTSTRAP_STATUS_CONN_DONE=10,
+ BOOTSTRAP_STATUS_HANDSHAKE=14,
+ BOOTSTRAP_STATUS_HANDSHAKE_DONE=15,
+
+ /* Loading directory info */
+
+ BOOTSTRAP_STATUS_ONEHOP_CREATE=20,
+ BOOTSTRAP_STATUS_REQUESTING_STATUS=25,
+ BOOTSTRAP_STATUS_LOADING_STATUS=30,
BOOTSTRAP_STATUS_LOADING_KEYS=40,
BOOTSTRAP_STATUS_REQUESTING_DESCRIPTORS=45,
BOOTSTRAP_STATUS_LOADING_DESCRIPTORS=50,
- BOOTSTRAP_STATUS_CONN_OR=80,
- BOOTSTRAP_STATUS_HANDSHAKE_OR=85,
- BOOTSTRAP_STATUS_CIRCUIT_CREATE=90,
+ BOOTSTRAP_STATUS_ENOUGH_DIRINFO=75,
+
+ /* Connecting to a relay for AP circuits */
+
+ BOOTSTRAP_STATUS_AP_CONN_PT=76,
+ BOOTSTRAP_STATUS_AP_CONN_DONE_PT=77,
+ BOOTSTRAP_STATUS_AP_CONN_PROXY=78,
+ BOOTSTRAP_STATUS_AP_CONN_DONE_PROXY=79,
+ BOOTSTRAP_STATUS_AP_CONN=80,
+ BOOTSTRAP_STATUS_AP_CONN_DONE=85,
+ BOOTSTRAP_STATUS_AP_HANDSHAKE=89,
+ BOOTSTRAP_STATUS_AP_HANDSHAKE_DONE=90,
+
+ /* Creating AP circuits */
+
+ BOOTSTRAP_STATUS_CIRCUIT_CREATE=95,
BOOTSTRAP_STATUS_DONE=100
} bootstrap_status_t;