summaryrefslogtreecommitdiff
path: root/src/common/util.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-07-06 17:08:24 -0400
committerNick Mathewson <nickm@torproject.org>2011-07-19 01:58:45 -0400
commit773bfaf91ebe1ef80f37d473714a11f962e753fb (patch)
tree0c115b831f478d641b051d7be0cae8e5c5216c8b /src/common/util.h
parent1d3c8c1f74e9f80317a70c3b7d9372dee87dd373 (diff)
downloadtor-773bfaf91ebe1ef80f37d473714a11f962e753fb.tar.gz
tor-773bfaf91ebe1ef80f37d473714a11f962e753fb.zip
Implement stream isolation
This is the meat of proposal 171: we change circuit_is_acceptable() to require that the connection is compatible with every connection that has been linked to the circuit; we update circuit_is_better to prefer attaching streams to circuits in the way that decreases the circuits' usefulness the least; and we update link_apconn_to_circ() to do the appropriate bookkeeping.
Diffstat (limited to 'src/common/util.h')
-rw-r--r--src/common/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/util.h b/src/common/util.h
index 6496c42db8..de06c3c5fa 100644
--- a/src/common/util.h
+++ b/src/common/util.h
@@ -160,6 +160,7 @@ uint64_t round_to_power_of_2(uint64_t u64);
unsigned round_to_next_multiple_of(unsigned number, unsigned divisor);
uint32_t round_uint32_to_next_multiple_of(uint32_t number, uint32_t divisor);
uint64_t round_uint64_to_next_multiple_of(uint64_t number, uint64_t divisor);
+int n_bits_set_u8(uint8_t v);
/* Compute the CEIL of <b>a</b> divided by <b>b</b>, for nonnegative <b>a</b>
* and positive <b>b</b>. Works on integer types only. Not defined if a+b can