summaryrefslogtreecommitdiff
path: root/src/or/circuitbuild.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-10-26 13:30:23 -0400
committerNick Mathewson <nickm@torproject.org>2016-10-26 13:30:23 -0400
commit8a38d053a09615c8d9009571ba639bfcbd1d4fe2 (patch)
tree9d3168a96bec49971d79d5eb5ed423e132cc192a /src/or/circuitbuild.c
parent9c8dbcd0d676e9092da75c7bdae75679c9d753e3 (diff)
downloadtor-8a38d053a09615c8d9009571ba639bfcbd1d4fe2.tar.gz
tor-8a38d053a09615c8d9009571ba639bfcbd1d4fe2.zip
Continue the module documentation effort with circuitbuild and circuituse
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r--src/or/circuitbuild.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 873d2ec4a3..961c16691e 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -9,6 +9,20 @@
*
* \brief Implements the details of building circuits (by chosing paths,
* constructing/sending create/extend cells, and so on).
+ *
+ * On the client side, this module handles launching circuits. Circuit
+ * launches are srtarted from circuit_establish_circuit(), called from
+ * circuit_launch_by_extend_info()). To choose the path the circuit will
+ * take, onion_extend_cpath() calls into a maze of node selection functions.
+ *
+ * Once the circuit is ready to be launched, the first hop is treated as a
+ * special case with circuit_handle_first_hop(), since it might need to open a
+ * channel. As the channel opens, and later as CREATED and RELAY_EXTENDED
+ * cells arrive, the client will invoke circuit_send_next_onion_skin() to send
+ * CREATE or RELAY_EXTEND cells.
+ *
+ * On the server side, this module also handles the logic of responding to
+ * RELAY_EXTEND requests, using circuit_extend().
**/
#define CIRCUITBUILD_PRIVATE