summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-12-31 21:47:54 +0000
committerRoger Dingledine <arma@torproject.org>2004-12-31 21:47:54 +0000
commit95f3e6161b0b6182e8ed887067138da93dd0b990 (patch)
treed16b0880cd40c5e50d2ff5e50eb98464ead7545b /src/or/or.h
parent1efc0f370add3d04808891cc38bb1fff6a5f5c96 (diff)
downloadtor-95f3e6161b0b6182e8ed887067138da93dd0b990.tar.gz
tor-95f3e6161b0b6182e8ed887067138da93dd0b990.zip
require BandwidthRate to be at least 10kB/s
svn:r3232
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h
index bc4d4f093d..2bc621400a 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -1579,6 +1579,13 @@ void add_nickname_list_to_smartlist(struct smartlist_t *sl, const char *list, in
int router_nickname_is_in_list(routerinfo_t *router, const char *list);
routerinfo_t *routerlist_find_my_routerinfo(void);
int router_nickname_matches(routerinfo_t *router, const char *nickname);
+
+/** How many seconds a router must be up before we'll use it for
+ * reliability-critical node positions.
+ */
+#define ROUTER_REQUIRED_MIN_UPTIME 3600 /* an hour */
+#define ROUTER_REQUIRED_MIN_BANDWIDTH 10000
+
int router_is_unreliable_router(routerinfo_t *router, int need_uptime, int need_bw);
routerinfo_t *routerlist_sl_choose_by_bandwidth(smartlist_t *sl);
routerinfo_t *router_choose_random_node(const char *preferred,