aboutsummaryrefslogtreecommitdiff
path: root/src/or/channel.h
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2013-10-29 02:13:53 -0700
committerAndrea Shepard <andrea@torproject.org>2014-09-30 22:48:26 -0700
commit2efbab2aaf98d8f8f0df504efd4fdd0fac77d354 (patch)
tree2099658b3d71719d09c16db6590453ebb6f94b95 /src/or/channel.h
parent472b62bfe4edb2f5e332c997be2ec69bdf590660 (diff)
downloadtor-2efbab2aaf98d8f8f0df504efd4fdd0fac77d354.tar.gz
tor-2efbab2aaf98d8f8f0df504efd4fdd0fac77d354.zip
Provide generic mechanism for scheduler to query writeable cells on a channel
Diffstat (limited to 'src/or/channel.h')
-rw-r--r--src/or/channel.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/channel.h b/src/or/channel.h
index 148199235a..28b5ab0ccf 100644
--- a/src/or/channel.h
+++ b/src/or/channel.h
@@ -110,7 +110,9 @@ struct channel_s {
int (*matches_extend_info)(channel_t *, extend_info_t *);
/** Check if this channel matches a target address when extending */
int (*matches_target)(channel_t *, const tor_addr_t *);
- /** Write a cell to an open channel */
+ /* Ask the lower layer how many cells can be written */
+ int (*num_cells_writeable)(channel_t *);
+ /* Write a cell to an open channel */
int (*write_cell)(channel_t *, cell_t *);
/** Write a packed cell to an open channel */
int (*write_packed_cell)(channel_t *, packed_cell_t *);
@@ -465,6 +467,9 @@ void channel_listener_dump_statistics(channel_listener_t *chan_l,
void channel_listener_dump_transport_statistics(channel_listener_t *chan_l,
int severity);
+/* Flow control queries */
+int channel_num_cells_writeable(channel_t *chan);
+
/* Timestamp queries */
time_t channel_when_created(channel_t *chan);
time_t channel_when_last_active(channel_t *chan);