aboutsummaryrefslogtreecommitdiff
path: root/src/feature/dirauth/voteflags.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-20 08:09:35 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-20 11:07:42 -0400
commitb54a5e704ff4d3585bdd8459b83d4c522d070fba (patch)
treef0b6b54b67438528f5adecf2cc16cc6e435891af /src/feature/dirauth/voteflags.h
parent08e3b88f0774fedb41a6b1c170a710dd12a7cb90 (diff)
downloadtor-b54a5e704ff4d3585bdd8459b83d4c522d070fba.tar.gz
tor-b54a5e704ff4d3585bdd8459b83d4c522d070fba.zip
Split most of dirserv.c into several new modules
In dirauth: * bwauth.c reads and uses bandwidth files * guardfraction.c reads and uses the guardfraction file * reachability.c tests relay reachability * recommend_pkg.c handles the recommended-packages lines. * recv_descs.c handles fingerprint files and processing incoming routerinfos that relays upload to us * voteflag.c computes flag thresholds and sets those thresholds on routerstatuses when computing votes In control: * fmt_serverstatus.c generates the ancient "v1 server status" format that controllers expect. In nodelist: * routerstatus_fmt.c formats routerstatus entries for a consensus, a vote, or for the controller.
Diffstat (limited to 'src/feature/dirauth/voteflags.h')
-rw-r--r--src/feature/dirauth/voteflags.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/feature/dirauth/voteflags.h b/src/feature/dirauth/voteflags.h
new file mode 100644
index 0000000000..2f0e061ea4
--- /dev/null
+++ b/src/feature/dirauth/voteflags.h
@@ -0,0 +1,31 @@
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2018, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file voteflags.h
+ * \brief Header file for voteflags.c
+ **/
+
+#ifndef TOR_VOTEFLAGS_H
+#define TOR_VOTEFLAGS_H
+
+void dirserv_set_router_is_running(routerinfo_t *router, time_t now);
+char *dirserv_get_flag_thresholds_line(void);
+void dirserv_compute_bridge_flag_thresholds(void);
+int running_long_enough_to_decide_unreachable(void);
+
+void set_routerstatus_from_routerinfo(routerstatus_t *rs,
+ node_t *node,
+ routerinfo_t *ri, time_t now,
+ int listbadexits);
+
+void dirserv_compute_performance_thresholds(digestmap_t *omit_as_sybil);
+
+#ifdef VOTEFLAGS_PRIVATE
+STATIC void dirserv_set_routerstatus_testing(routerstatus_t *rs);
+#endif
+
+#endif