summaryrefslogtreecommitdiff
path: root/src/or/channel.h
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2012-10-30 14:39:14 -0700
committerAndrea Shepard <andrea@torproject.org>2012-10-30 14:39:14 -0700
commitbe371250305b0ac50c1fafda8acd13812894ab92 (patch)
treea3621a3f80a80d3a9139e0454bad3ee35c1f0000 /src/or/channel.h
parent03b32161bc37766864bcb099b76884099c89d837 (diff)
parent2b10e99eb093e1e5e699db355e0c54342fa693b5 (diff)
downloadtor-be371250305b0ac50c1fafda8acd13812894ab92.tar.gz
tor-be371250305b0ac50c1fafda8acd13812894ab92.zip
Merge branch 'bsd_queue' of ssh://git-rw.torproject.org/nickm/tor
Diffstat (limited to 'src/or/channel.h')
-rw-r--r--src/or/channel.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/or/channel.h b/src/or/channel.h
index d90335c194..d2106551aa 100644
--- a/src/or/channel.h
+++ b/src/or/channel.h
@@ -10,6 +10,7 @@
#define TOR_CHANNEL_H
#include "or.h"
+#include "tor_queue.h"
#include "circuitmux.h"
/* Channel handler function pointer typedefs */
@@ -17,6 +18,10 @@ typedef void (*channel_listener_fn_ptr)(channel_listener_t *, channel_t *);
typedef void (*channel_cell_handler_fn_ptr)(channel_t *, cell_t *);
typedef void (*channel_var_cell_handler_fn_ptr)(channel_t *, var_cell_t *);
+struct cell_queue_entry_s;
+SIMPLEQ_HEAD(chan_cell_queue, cell_queue_entry_s) incoming_queue;
+typedef struct chan_cell_queue chan_cell_queue_t;
+
/*
* Channel struct; see the channel_t typedef in or.h. A channel is an
* abstract interface for the OR-to-OR connection, similar to connection_or_t,
@@ -120,13 +125,13 @@ struct channel_s {
* Linked list of channels with the same identity digest, for the
* digest->channel map
*/
- channel_t *next_with_same_id, *prev_with_same_id;
+ LIST_ENTRY(channel_s) next_with_same_id;
/* List of incoming cells to handle */
- smartlist_t *incoming_queue;
+ chan_cell_queue_t incoming_queue;
/* List of queued outgoing cells */
- smartlist_t *outgoing_queue;
+ chan_cell_queue_t outgoing_queue;
/* Circuit mux for circuits sending on this channel */
circuitmux_t *cmux;
@@ -415,9 +420,7 @@ channel_t * channel_find_by_remote_digest(const char *identity_digest);
/** For things returned by channel_find_by_remote_digest(), walk the list.
*/
-
channel_t * channel_next_with_digest(channel_t *chan);
-channel_t * channel_prev_with_digest(channel_t *chan);
/*
* Metadata queries/updates