summaryrefslogtreecommitdiff
path: root/src/or/dirserv.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-01 13:43:11 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-01 15:20:37 -0400
commit6da0311d2cc71d6d0732c8432eea38cd1819aa86 (patch)
tree98ce8cdfc60f6bf4c57885b0f1fe43369d15b492 /src/or/dirserv.h
parent1743dac078f2e060f3f6c7194deae90a2175fe92 (diff)
downloadtor-6da0311d2cc71d6d0732c8432eea38cd1819aa86.tar.gz
tor-6da0311d2cc71d6d0732c8432eea38cd1819aa86.zip
Extract various enums and tiny structs from or.h
These all have a logical header to go in.
Diffstat (limited to 'src/or/dirserv.h')
-rw-r--r--src/or/dirserv.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/or/dirserv.h b/src/or/dirserv.h
index 7ecb0088de..3b4a646094 100644
--- a/src/or/dirserv.h
+++ b/src/or/dirserv.h
@@ -16,6 +16,21 @@ struct ed25519_public_key_t;
#include "lib/testsupport/testsupport.h"
+/** An enum to describe what format we're generating a routerstatus line in.
+ */
+typedef enum {
+ /** For use in a v2 opinion */
+ NS_V2,
+ /** For use in a consensus networkstatus document (ns flavor) */
+ NS_V3_CONSENSUS,
+ /** For use in a vote networkstatus document */
+ NS_V3_VOTE,
+ /** For passing to the controlport in response to a GETINFO request */
+ NS_CONTROL_PORT,
+ /** For use in a consensus networkstatus document (microdesc flavor) */
+ NS_V3_CONSENSUS_MICRODESC
+} routerstatus_format_type_t;
+
/** What fraction (1 over this number) of the relay ID space do we
* (as a directory authority) launch connections to at each reachability
* test? */