aboutsummaryrefslogtreecommitdiff
path: root/src/or/channel.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-01-23 16:30:44 -0500
committerMike Perry <mikeperry-git@torproject.org>2017-02-21 20:58:25 -0500
commit515e1f663ad4a5f1023ef2d2bbcb2de0152d0a47 (patch)
tree6b45c3e4e6650cf56bf6043018e62767ff60c3f8 /src/or/channel.h
parentefa5bbaba07d20d1aacff7d1d2a5fe08a6ec2d72 (diff)
downloadtor-515e1f663ad4a5f1023ef2d2bbcb2de0152d0a47.tar.gz
tor-515e1f663ad4a5f1023ef2d2bbcb2de0152d0a47.zip
Add an O(1) map from channel->global_identifier to channel
Diffstat (limited to 'src/or/channel.h')
-rw-r--r--src/or/channel.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/or/channel.h b/src/or/channel.h
index 26aa93b5e2..0b8f599895 100644
--- a/src/or/channel.h
+++ b/src/or/channel.h
@@ -34,11 +34,14 @@ struct channel_s {
/** Magic number for type-checking cast macros */
uint32_t magic;
+ /** List entry for hashtable for global-identifier lookup. */
+ HT_ENTRY(channel_s) gidmap_node;
+
/** Current channel state */
channel_state_t state;
/** Globally unique ID number for a channel over the lifetime of a Tor
- * process.
+ * process. This may not be 0.
*/
uint64_t global_identifier;