diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-20 08:09:35 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-20 11:07:42 -0400 |
commit | b54a5e704ff4d3585bdd8459b83d4c522d070fba (patch) | |
tree | f0b6b54b67438528f5adecf2cc16cc6e435891af /src/test | |
parent | 08e3b88f0774fedb41a6b1c170a710dd12a7cb90 (diff) | |
download | tor-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/test')
-rw-r--r-- | src/test/test_dir.c | 12 | ||||
-rw-r--r-- | src/test/test_guardfraction.c | 5 |
2 files changed, 11 insertions, 6 deletions
diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 363539ce4d..b2c3f4426c 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -6,17 +6,19 @@ #include "orconfig.h" #include <math.h> +#define BWAUTH_PRIVATE #define CONFIG_PRIVATE #define CONTROL_PRIVATE #define DIRSERV_PRIVATE #define DIRVOTE_PRIVATE -#define ROUTER_PRIVATE -#define ROUTERLIST_PRIVATE -#define ROUTERPARSE_PRIVATE #define HIBERNATE_PRIVATE #define NETWORKSTATUS_PRIVATE #define NODE_SELECT_PRIVATE #define RELAY_PRIVATE +#define ROUTERLIST_PRIVATE +#define ROUTERPARSE_PRIVATE +#define ROUTER_PRIVATE +#define VOTEFLAGS_PRIVATE #include "core/or/or.h" #include "feature/client/bridges.h" @@ -29,8 +31,12 @@ #include "lib/crypt_ops/crypto_format.h" #include "lib/crypt_ops/crypto_rand.h" #include "feature/dircache/directory.h" +#include "feature/dirauth/bwauth.h" #include "feature/dircache/dirserv.h" +#include "feature/dirauth/process_descs.h" #include "feature/dirauth/dirvote.h" +#include "feature/dirauth/recommend_pkg.h" +#include "feature/dirauth/voteflags.h" #include "feature/client/entrynodes.h" #include "feature/dircommon/fp_pair.h" #include "feature/hibernate/hibernate.h" diff --git a/src/test/test_guardfraction.c b/src/test/test_guardfraction.c index f45a723295..7d4a959bb4 100644 --- a/src/test/test_guardfraction.c +++ b/src/test/test_guardfraction.c @@ -1,14 +1,14 @@ /* Copyright (c) 2014-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ -#define DIRSERV_PRIVATE +#define GUARDFRACTION_PRIVATE #define ROUTERPARSE_PRIVATE #define NETWORKSTATUS_PRIVATE #include "orconfig.h" #include "core/or/or.h" #include "app/config/config.h" -#include "feature/dircache/dirserv.h" +#include "feature/dirauth/guardfraction.h" #include "feature/client/entrynodes.h" #include "feature/nodelist/routerparse.h" #include "feature/nodelist/networkstatus.h" @@ -422,4 +422,3 @@ struct testcase_t guardfraction_tests[] = { END_OF_TESTCASES }; - |