summaryrefslogtreecommitdiff
path: root/src/or/channel.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2017-11-20 16:44:16 -0500
committerDavid Goulet <dgoulet@torproject.org>2017-11-22 15:37:59 -0500
commit46a0709261471fe7730b1c01351e216a2dbaf785 (patch)
tree52dbc6501bd857258156b179b59839433a19dda1 /src/or/channel.h
parentd165f0fd30bc9823152dad6769afab0afae2ea6d (diff)
downloadtor-46a0709261471fe7730b1c01351e216a2dbaf785.tar.gz
tor-46a0709261471fe7730b1c01351e216a2dbaf785.zip
channel: Remove incoming/outgoing queue
For the rationale, see ticket #23709. This is a pretty massive commit. Those queues were everywhere in channel.c and it turns out that it was used by lots of dead code. The channel subsystem *never* handles variable size cell (var_cell_t) or unpacked cells (cell_t). The variable ones are only handled in channeltls and outbound cells are always packed from the circuit queue so this commit removes code related to variable and unpacked cells. However, inbound cells are unpacked (cell_t), that is untouched and is handled via channel_process_cell() function. In order to make the commit compile, test have been modified but not passing at this commit. Also, many tests have been removed but better improved ones get added in future commits. This commit also adds a XXX: which indicates that the handling process of outbound cells isn't fully working. This as well is fixed in a future commit. Finally, at this commit, more dead code remains, it will be cleanup in future commits. Fixes #23709 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/channel.h')
-rw-r--r--src/or/channel.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/or/channel.h b/src/or/channel.h
index 32336fe1d2..d72f232bc8 100644
--- a/src/or/channel.h
+++ b/src/or/channel.h
@@ -268,12 +268,6 @@ struct channel_s {
*/
TOR_LIST_ENTRY(channel_s) next_with_same_id;
- /** List of incoming cells to handle */
- chan_cell_queue_t incoming_queue;
-
- /** List of queued outgoing cells */
- chan_cell_queue_t outgoing_queue;
-
/** Circuit mux for circuits sending on this channel */
circuitmux_t *cmux;
@@ -480,11 +474,6 @@ struct cell_queue_entry_s {
} u;
};
-/* Cell queue functions for benefit of test suite */
-STATIC int chan_cell_queue_len(const chan_cell_queue_t *queue);
-
-STATIC void cell_queue_entry_free(cell_queue_entry_t *q, int handed_off);
-
void channel_write_cell_generic_(channel_t *chan, const char *cell_type,
void *cell, cell_queue_entry_t *q);
#endif /* defined(CHANNEL_PRIVATE_) */
@@ -556,7 +545,7 @@ void channel_listener_queue_incoming(channel_listener_t *listener,
channel_t *incoming);
/* Incoming cell handling */
-void channel_process_cells(channel_t *chan);
+void channel_process_cell(channel_t *chan, cell_t *cell);
void channel_queue_cell(channel_t *chan, cell_t *cell);
void channel_queue_var_cell(channel_t *chan, var_cell_t *var_cell);