aboutsummaryrefslogtreecommitdiff
path: root/src/or/dirserv.h
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2015-01-29 14:54:47 +0000
committerNick Mathewson <nickm@torproject.org>2015-02-18 09:09:32 -0500
commit5ee48d47a73691001746541e15b3dc5a89fa37eb (patch)
treefd0f616cba64e66b9597b337ff039232e4a8c8de /src/or/dirserv.h
parenta3de2dfde6a92c0fe7ca755aa7bc1aa046c463a8 (diff)
downloadtor-5ee48d47a73691001746541e15b3dc5a89fa37eb.tar.gz
tor-5ee48d47a73691001746541e15b3dc5a89fa37eb.zip
Parse Guardfraction file and apply results to routerstatuses.
Parse the file just before voting and apply its information to the provided vote_routerstatus_t. This follows the same logic as when dirauths parse bwauth files.
Diffstat (limited to 'src/or/dirserv.h')
-rw-r--r--src/or/dirserv.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/or/dirserv.h b/src/or/dirserv.h
index d4ce54260c..7ee5445ff9 100644
--- a/src/or/dirserv.h
+++ b/src/or/dirserv.h
@@ -123,10 +123,17 @@ STATIC int dirserv_query_measured_bw_cache_kb(const char *node_id,
long *bw_out,
time_t *as_of_out);
STATIC int dirserv_has_measured_bw(const char *node_id);
+
+STATIC int
+dirserv_read_guardfraction_file_from_str(const char *guardfraction_file_str,
+ smartlist_t *vote_routerstatuses);
#endif
int dirserv_read_measured_bandwidths(const char *from_file,
smartlist_t *routerstatuses);
+int dirserv_read_guardfraction_file(const char *fname,
+ smartlist_t *vote_routerstatuses);
+
#endif