aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-04-16 17:44:33 +0000
committerNick Mathewson <nickm@torproject.org>2003-04-16 17:44:33 +0000
commit97d847b9e316178b2ccdd5c179689a223a53a63a (patch)
treed15c8718f771941a772582624a8974a9a0be500e /src/or/or.h
parent1bbea670bcb9e7ae2b0502e9affe9df28c8fd46a (diff)
downloadtor-97d847b9e316178b2ccdd5c179689a223a53a63a.tar
tor-97d847b9e316178b2ccdd5c179689a223a53a63a.tar.gz
Factor out cell packing and unpacking
svn:r240
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 5e84ec3b8..1687cae38 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -197,6 +197,11 @@ typedef struct {
unsigned char command;
unsigned char length; /* of payload if data cell, else value of sendme */
uint32_t seq; /* sequence number */
+
+ /* The following 2 fields are only set when command is CELL_DATA */
+ unsigned char topic_command;
+ uint16_t topic_id;
+
unsigned char payload[CELL_PAYLOAD_SIZE];
} cell_t;
@@ -614,6 +619,9 @@ int connection_process_cell_from_inbuf(connection_t *conn);
int connection_consider_sending_sendme(connection_t *conn, int edge_type);
int connection_finished_flushing(connection_t *conn);
+void cell_pack(char *dest, const cell_t *src);
+void cell_unpack(cell_t *dest, const char *src);
+
/********************************* connection_ap.c ****************************/
int ap_handshake_process_socks(connection_t *conn);