summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-10-01 21:59:09 +0000
committerNick Mathewson <nickm@torproject.org>2006-10-01 21:59:09 +0000
commit57ffca883d586c0b7e20eea2460587b409f9b302 (patch)
treec308225bb41ec570809042c114a89b9982fef11c /src/or/or.h
parent219ad6395cea5403857c3adf1b938741dba79c4f (diff)
downloadtor-57ffca883d586c0b7e20eea2460587b409f9b302.tar.gz
tor-57ffca883d586c0b7e20eea2460587b409f9b302.zip
r8826@totoro: nickm | 2006-10-01 17:58:45 -0400
Disprefer exit nodes for entry, middle positions (fixes bug 200). Also, switch to using a uint64_t to hold "total bandwidth for all nodes" under consideration; crypt_rand_int would have died at 2GB/s network capacity. svn:r8571
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/or.h b/src/or/or.h
index f434f53098..4fe16012e7 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -918,6 +918,7 @@ typedef struct {
unsigned int is_fast:1; /** Do we think this is a fast OR? */
unsigned int is_stable:1; /** Do we think this is a stable OR? */
unsigned int is_possible_guard:1; /**< Do we think this is an OK guard? */
+ unsigned int is_exit:1; /**< Do we think this is an OK exit? */
/** Tor can use this desc for circuit-building. */
#define ROUTER_PURPOSE_GENERAL 0
@@ -2562,13 +2563,15 @@ routerinfo_t *router_find_exact_exit_enclave(const char *address,
int router_is_unreliable(routerinfo_t *router, int need_uptime,
int need_capacity, int need_guard);
uint32_t router_get_advertised_bandwidth(routerinfo_t *router);
-routerinfo_t *routerlist_sl_choose_by_bandwidth(smartlist_t *sl);
+routerinfo_t *routerlist_sl_choose_by_bandwidth(smartlist_t *sl, int for_exit);
+
routerinfo_t *router_choose_random_node(const char *preferred,
const char *excluded,
smartlist_t *excludedsmartlist,
int need_uptime, int need_bandwidth,
int need_guard,
- int allow_invalid, int strict);
+ int allow_invalid, int strict,
+ int weight_for_exit);
routerinfo_t *router_get_by_nickname(const char *nickname,
int warn_if_unnamed);
routerinfo_t *router_get_by_hexdigest(const char *hexdigest);