summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-07-03 16:23:23 -0400
committerRoger Dingledine <arma@torproject.org>2017-07-03 16:54:41 -0400
commit9b44e2e50e8209f856dd1f1e7c66618acf419be6 (patch)
tree59a91e0f75dc7ae9fec61275a3ffaf905dc1ce35 /src/or
parent2814b86875964aedd1fb62a13510073c23f05cd5 (diff)
downloadtor-9b44e2e50e8209f856dd1f1e7c66618acf419be6.tar.gz
tor-9b44e2e50e8209f856dd1f1e7c66618acf419be6.zip
Document the new functions from the refactor
Diffstat (limited to 'src/or')
-rw-r--r--src/or/circuitbuild.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index ee33361840..bf14d495bf 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -942,6 +942,12 @@ circuit_send_next_onion_skin(origin_circuit_t *circ)
}
}
+/**
+ * Called from circuit_send_next_onion_skin() when we find ourselves connected
+ * to the first hop in <b>circ</b>: Send a CREATE or CREATE2 or CREATE_FAST
+ * cell to that hop. Return 0 on success; -reason on failure (if the circuit
+ * should be torn down).
+ */
static int
circuit_send_first_onion_skin(origin_circuit_t *circ)
{
@@ -1003,6 +1009,12 @@ circuit_send_first_onion_skin(origin_circuit_t *circ)
return 0;
}
+/**
+ * Called from circuit_send_next_onion_skin() when we find that we have no
+ * more hops: mark the circuit as finished, and perform the necessary
+ * bookkeeping. Return 0 on success; -reason on failure (if the circuit
+ * should be torn down).
+ */
static int
circuit_build_no_more_hops(origin_circuit_t *circ)
{
@@ -1109,6 +1121,12 @@ circuit_build_no_more_hops(origin_circuit_t *circ)
return 0;
}
+/**
+ * Called from circuit_send_next_onion_skin() when we find that we have a hop
+ * other than the first that we need to extend to: use <b>hop</b>'s
+ * information to extend the circuit another step. Return 0 on success;
+ * -reason on failure (if the circuit should be torn down).
+ */
static int
circuit_send_intermediate_onion_skin(origin_circuit_t *circ,
crypt_path_t *hop)