From 5ee48d47a73691001746541e15b3dc5a89fa37eb Mon Sep 17 00:00:00 2001 From: George Kadianakis Date: Thu, 29 Jan 2015 14:54:47 +0000 Subject: 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. --- src/or/or.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/or/or.h') 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; -- cgit v1.2.3-54-g00ecf