summaryrefslogtreecommitdiff
path: root/src/or/or.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/or.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/or.h')
-rw-r--r--src/or/or.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 49068784f9..1f2231e78c 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -2145,6 +2145,12 @@ typedef struct routerstatus_t {
uint32_t bandwidth_kb; /**< Bandwidth (capacity) of the router as reported in
* the vote/consensus, in kilobytes/sec. */
+
+ /** The consensus has guardfraction information for this router. */
+ unsigned int has_guardfraction:1;
+ /** The guardfraction value of this router. */
+ uint32_t guardfraction_percentage;
+
char *exitsummary; /**< exit policy summary -
* XXX weasel: this probably should not stay a string. */
@@ -3947,6 +3953,9 @@ typedef struct {
/** Location of bandwidth measurement file */
char *V3BandwidthsFile;
+ /** Location of guardfraction file */
+ char *GuardfractionFile;
+
/** Authority only: key=value pairs that we add to our networkstatus
* consensus vote on the 'params' line. */
char *ConsensusParams;