summaryrefslogtreecommitdiff
path: root/src/or/connection_edge.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-10-22 11:28:37 -0400
committerNick Mathewson <nickm@torproject.org>2012-11-14 23:16:21 -0500
commit462ebb270a10f02573b1847649db45b94c0e0fc3 (patch)
tree9382649da248ab714e64ce11c6829289e2ce5408 /src/or/connection_edge.h
parentca8843df0adb088b028b5599cd3062ea608f716b (diff)
downloadtor-462ebb270a10f02573b1847649db45b94c0e0fc3.tar.gz
tor-462ebb270a10f02573b1847649db45b94c0e0fc3.zip
Refactor begin cell parsing into its own function, with tests.
Add 'flags' argument to begin cells, per proposal 208.
Diffstat (limited to 'src/or/connection_edge.h')
-rw-r--r--src/or/connection_edge.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/or/connection_edge.h b/src/or/connection_edge.h
index b5938b3cd2..f3d10383f2 100644
--- a/src/or/connection_edge.h
+++ b/src/or/connection_edge.h
@@ -91,5 +91,20 @@ int connection_edge_update_circuit_isolation(const entry_connection_t *conn,
int dry_run);
void circuit_clear_isolation(origin_circuit_t *circ);
+#ifdef CONNECTION_EDGE_PRIVATE
+/*DOCDOC*/
+typedef struct begin_cell_t {
+ char *address;
+ uint32_t flags;
+ uint16_t port;
+ uint16_t stream_id;
+ unsigned is_begindir : 1;
+} begin_cell_t;
+
+int begin_cell_parse(const cell_t *cell, begin_cell_t *bcell,
+ uint8_t *end_reason_out);
+#endif
+
+
#endif