summaryrefslogtreecommitdiff
path: root/src/or/channel.h
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2014-01-21 20:51:21 -0800
committerAndrea Shepard <andrea@torproject.org>2014-09-30 23:09:15 -0700
commitbbb06b73cd46d8e603b9a5b99f2cdd28e31888eb (patch)
treeae86a48748502e124125ea26a2efa3381a0f519b /src/or/channel.h
parent5992a69deee324fb91f5f2995e145edd2c0560d2 (diff)
downloadtor-bbb06b73cd46d8e603b9a5b99f2cdd28e31888eb.tar.gz
tor-bbb06b73cd46d8e603b9a5b99f2cdd28e31888eb.zip
Expose some channel cell queue stuff to the test suite
Diffstat (limited to 'src/or/channel.h')
-rw-r--r--src/or/channel.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/or/channel.h b/src/or/channel.h
index 023c39d0dd..ba6d66b350 100644
--- a/src/or/channel.h
+++ b/src/or/channel.h
@@ -354,6 +354,34 @@ void channel_set_cmux_policy_everywhere(circuitmux_policy_t *pol);
#ifdef TOR_CHANNEL_INTERNAL_
+#ifdef CHANNEL_PRIVATE_
+/* Cell queue structure (here rather than channel.c for test suite use) */
+
+typedef struct cell_queue_entry_s cell_queue_entry_t;
+struct cell_queue_entry_s {
+ TOR_SIMPLEQ_ENTRY(cell_queue_entry_s) next;
+ enum {
+ CELL_QUEUE_FIXED,
+ CELL_QUEUE_VAR,
+ CELL_QUEUE_PACKED
+ } type;
+ union {
+ struct {
+ cell_t *cell;
+ } fixed;
+ struct {
+ var_cell_t *var_cell;
+ } var;
+ struct {
+ packed_cell_t *packed_cell;
+ } packed;
+ } u;
+};
+
+/* Cell queue functions for benefit of test suite */
+STATIC int chan_cell_queue_len(const chan_cell_queue_t *queue);
+#endif
+
/* Channel operations for subclasses and internal use only */
/* Initialize a newly allocated channel - do this first in subclass