aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@fscked.org>2010-01-27 15:01:51 -0800
committerMike Perry <mikeperry-git@fscked.org>2010-02-22 16:52:11 -0800
commit931e073a4fe41909a35fac3659cd48d55f044817 (patch)
treec45e05768da12040f04bee6aae5c57233e54abd3 /src/or/or.h
parentdf1ef2f0f0856af71d92d333bcf2c788c2938703 (diff)
downloadtor-931e073a4fe41909a35fac3659cd48d55f044817.tar
tor-931e073a4fe41909a35fac3659cd48d55f044817.tar.gz
Implement bw weighting selection algorithm.
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 73ed10f06..428195cb2 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -4958,11 +4958,13 @@ uint32_t router_get_advertised_bandwidth_capped(routerinfo_t *router);
/** Possible ways to weight routers when choosing one randomly. See
* routerlist_sl_choose_by_bandwidth() for more information.*/
typedef enum {
- NO_WEIGHTING, WEIGHT_FOR_EXIT, WEIGHT_FOR_GUARD
+ NO_WEIGHTING, WEIGHT_FOR_EXIT, WEIGHT_FOR_MID, WEIGHT_FOR_GUARD,
+ WEIGHT_FOR_DIR
} bandwidth_weight_rule_t;
routerinfo_t *routerlist_sl_choose_by_bandwidth(smartlist_t *sl,
bandwidth_weight_rule_t rule);
-routerstatus_t *routerstatus_sl_choose_by_bandwidth(smartlist_t *sl);
+routerstatus_t *routerstatus_sl_choose_by_bandwidth(smartlist_t *sl,
+ bandwidth_weight_rule_t rule);
/** Flags to be passed to control router_choose_random_node() to indicate what
* kind of nodes to pick according to what algorithm. */