diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-11-27 22:39:46 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-11-27 22:39:46 -0500 |
commit | a28df3fb6713043e801fb5fcf5019fc0539b5066 (patch) | |
tree | c67fce712d60ac0ff073b0c59bb4b06e7dae04b4 /src/or/circuitmux.h | |
parent | 3d2366c676233c30133928940b4bc19d8f25f193 (diff) | |
parent | 12b6c7df4aaf3224bc5649ef69a06dccc58ae961 (diff) | |
download | tor-a28df3fb6713043e801fb5fcf5019fc0539b5066.tar.gz tor-a28df3fb6713043e801fb5fcf5019fc0539b5066.zip |
Merge remote-tracking branch 'andrea/cmux_refactor_configurable_threshold'
Conflicts:
src/or/or.h
src/test/Makefile.nmake
Diffstat (limited to 'src/or/circuitmux.h')
-rw-r--r-- | src/or/circuitmux.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/or/circuitmux.h b/src/or/circuitmux.h index eade2486a2..53092cd66c 100644 --- a/src/or/circuitmux.h +++ b/src/or/circuitmux.h @@ -57,6 +57,9 @@ struct circuitmux_policy_s { /* Choose a circuit */ circuit_t * (*pick_active_circuit)(circuitmux_t *cmux, circuitmux_policy_data_t *pol_data); + /* Optional: channel comparator for use by the scheduler */ + int (*cmp_cmux)(circuitmux_t *cmux_1, circuitmux_policy_data_t *pol_data_1, + circuitmux_t *cmux_2, circuitmux_policy_data_t *pol_data_2); }; /* @@ -105,7 +108,8 @@ void circuitmux_free(circuitmux_t *cmux); /* Policy control */ void circuitmux_clear_policy(circuitmux_t *cmux); -const circuitmux_policy_t * circuitmux_get_policy(circuitmux_t *cmux); +MOCK_DECL(const circuitmux_policy_t *, + circuitmux_get_policy, (circuitmux_t *cmux)); void circuitmux_set_policy(circuitmux_t *cmux, const circuitmux_policy_t *pol); @@ -117,7 +121,7 @@ int circuitmux_is_circuit_attached(circuitmux_t *cmux, circuit_t *circ); int circuitmux_is_circuit_active(circuitmux_t *cmux, circuit_t *circ); unsigned int circuitmux_num_cells_for_circuit(circuitmux_t *cmux, circuit_t *circ); -unsigned int circuitmux_num_cells(circuitmux_t *cmux); +MOCK_DECL(unsigned int, circuitmux_num_cells, (circuitmux_t *cmux)); unsigned int circuitmux_num_circuits(circuitmux_t *cmux); unsigned int circuitmux_num_active_circuits(circuitmux_t *cmux); @@ -148,5 +152,9 @@ void circuitmux_append_destroy_cell(channel_t *chan, void circuitmux_mark_destroyed_circids_usable(circuitmux_t *cmux, channel_t *chan); +/* Optional interchannel comparisons for scheduling */ +MOCK_DECL(int, circuitmux_compare_muxes, + (circuitmux_t *cmux_1, circuitmux_t *cmux_2)); + #endif /* TOR_CIRCUITMUX_H */ |