aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-12-26 22:08:12 -0500
committerNick Mathewson <nickm@torproject.org>2013-01-03 13:03:41 -0500
commitb9fb01721a38c2b850f7a0120adc621a9d34b772 (patch)
tree8fc04dcc28f0febf2cbe67f9a832224ce0a3dc42 /src/or/or.h
parentb0b3c14c11afe55cd71f9c1b8a89d9e5a65c9799 (diff)
downloadtor-b9fb01721a38c2b850f7a0120adc621a9d34b772.tar.gz
tor-b9fb01721a38c2b850f7a0120adc621a9d34b772.zip
Use a TAILQ, not a singly-linked queue, for the onion queue.
This makes removing items from the middle of the queue into an O(1) operation, which could prove important as we let onionqueues grow longer. Doing this actually makes the code slightly smaller, too.
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 7db5a52f34..01205ee66f 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2988,6 +2988,8 @@ typedef struct origin_circuit_t {
} origin_circuit_t;
+struct onion_queue_t;
+
/** An or_circuit_t holds information needed to implement a circuit at an
* OR. */
typedef struct or_circuit_t {
@@ -3001,6 +3003,9 @@ typedef struct or_circuit_t {
* cells to p_chan. NULL if we have no cells pending, or if we're not
* linked to an OR connection. */
struct circuit_t *prev_active_on_p_chan;
+ /** Pointer to an entry on the onion queue, if this circuit is waiting for a
+ * chance to give an onionskin to a cpuworker. Used only in onion.c */
+ struct onion_queue_t *onionqueue_entry;
/** The circuit_id used in the previous (backward) hop of this circuit. */
circid_t p_circ_id;