[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Document the new functions from the refactor



commit 9b44e2e50e8209f856dd1f1e7c66618acf419be6
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Mon Jul 3 16:23:23 2017 -0400

    Document the new functions from the refactor
---
 src/or/circuitbuild.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index ee33361..bf14d49 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)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits