diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-25 17:57:58 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-25 17:57:58 -0400 |
commit | 4f0bc0c8f56f4179482c21bf3122b67ee2fe26d1 (patch) | |
tree | 9f3063311db1e31e5e457f2854ff03cbcee74623 /src/feature/relay | |
parent | 3ff58e47d211d8649202c093f00934011effed1b (diff) | |
download | tor-4f0bc0c8f56f4179482c21bf3122b67ee2fe26d1.tar.gz tor-4f0bc0c8f56f4179482c21bf3122b67ee2fe26d1.zip |
Revise things that had included router.h before
Make them only include the headers that they needed, and sort their
headers while we're at it.
Diffstat (limited to 'src/feature/relay')
-rw-r--r-- | src/feature/relay/dns.c | 18 | ||||
-rw-r--r-- | src/feature/relay/router.c | 63 | ||||
-rw-r--r-- | src/feature/relay/router.h | 4 | ||||
-rw-r--r-- | src/feature/relay/selftest.c | 2 |
4 files changed, 44 insertions, 43 deletions
diff --git a/src/feature/relay/dns.c b/src/feature/relay/dns.c index 52488ff94d..bc507d47f6 100644 --- a/src/feature/relay/dns.c +++ b/src/feature/relay/dns.c @@ -50,26 +50,28 @@ #define DNS_PRIVATE #include "core/or/or.h" -#include "core/or/circuitlist.h" -#include "core/or/circuituse.h" #include "app/config/config.h" #include "core/mainloop/connection.h" -#include "core/or/connection_edge.h" -#include "feature/control/control.h" -#include "lib/crypt_ops/crypto_rand.h" -#include "feature/relay/dns.h" #include "core/mainloop/mainloop.h" +#include "core/mainloop/netstatus.h" +#include "core/or/circuitlist.h" +#include "core/or/circuituse.h" +#include "core/or/connection_edge.h" #include "core/or/policies.h" #include "core/or/relay.h" +#include "feature/control/control.h" +#include "feature/relay/dns.h" #include "feature/relay/router.h" #include "feature/relay/routermode.h" -#include "ht.h" -#include "lib/sandbox/sandbox.h" +#include "lib/crypt_ops/crypto_rand.h" #include "lib/evloop/compat_libevent.h" +#include "lib/sandbox/sandbox.h" #include "core/or/edge_connection_st.h" #include "core/or/or_circuit_st.h" +#include "ht.h" + #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif diff --git a/src/feature/relay/router.c b/src/feature/relay/router.c index 05e3fb3b23..adec40e544 100644 --- a/src/feature/relay/router.c +++ b/src/feature/relay/router.c @@ -7,43 +7,50 @@ #define ROUTER_PRIVATE #include "core/or/or.h" -#include "core/or/circuitbuild.h" -#include "core/or/circuitlist.h" -#include "core/or/circuituse.h" #include "app/config/config.h" -#include "core/mainloop/connection.h" -#include "feature/control/control.h" -#include "lib/crypt_ops/crypto_rand.h" -#include "lib/crypt_ops/crypto_util.h" -#include "lib/crypt_ops/crypto_curve25519.h" -#include "feature/dircommon/directory.h" -#include "feature/dirclient/dirclient.h" -#include "feature/dircache/dirserv.h" -#include "feature/dirauth/process_descs.h" -#include "feature/relay/dns.h" -#include "feature/stats/geoip.h" -#include "feature/hibernate/hibernate.h" +#include "app/config/statefile.h" #include "app/main/main.h" +#include "core/mainloop/connection.h" #include "core/mainloop/mainloop.h" -#include "feature/nodelist/networkstatus.h" -#include "feature/nodelist/nodelist.h" +#include "core/mainloop/netstatus.h" +#include "core/or/circuitbuild.h" +#include "core/or/circuitlist.h" +#include "core/or/circuituse.h" #include "core/or/policies.h" #include "core/or/protover.h" #include "core/or/relay.h" +#include "feature/client/transports.h" +#include "feature/control/control.h" +#include "feature/dirauth/process_descs.h" +#include "feature/dircache/dirserv.h" +#include "feature/dirclient/dirclient.h" +#include "feature/dircommon/directory.h" +#include "feature/hibernate/hibernate.h" #include "feature/keymgt/loadkey.h" -#include "feature/stats/rephist.h" -#include "feature/relay/router.h" -#include "feature/relay/routerkeys.h" -#include "feature/relay/routermode.h" -#include "feature/relay/selftest.h" #include "feature/nodelist/authcert.h" #include "feature/nodelist/dirlist.h" +#include "feature/nodelist/networkstatus.h" +#include "feature/nodelist/nickname.h" +#include "feature/nodelist/nodelist.h" #include "feature/nodelist/routerlist.h" #include "feature/nodelist/routerparse.h" -#include "app/config/statefile.h" -#include "feature/nodelist/torcert.h" -#include "feature/client/transports.h" #include "feature/nodelist/routerset.h" +#include "feature/nodelist/torcert.h" +#include "feature/relay/dns.h" +#include "feature/relay/router.h" +#include "feature/relay/routerkeys.h" +#include "feature/relay/routermode.h" +#include "feature/relay/selftest.h" +#include "feature/stats/geoip.h" +#include "feature/stats/rephist.h" +#include "lib/crypt_ops/crypto_curve25519.h" +#include "lib/crypt_ops/crypto_format.h" +#include "lib/crypt_ops/crypto_init.h" +#include "lib/crypt_ops/crypto_rand.h" +#include "lib/crypt_ops/crypto_util.h" +#include "lib/encoding/confline.h" +#include "lib/osinfo/uname.h" +#include "lib/tls/tortls.h" #include "feature/dirauth/authmode.h" @@ -59,12 +66,6 @@ #include "core/or/port_cfg_st.h" #include "feature/nodelist/routerinfo_st.h" -#include "lib/osinfo/uname.h" -#include "lib/tls/tortls.h" -#include "lib/encoding/confline.h" -#include "lib/crypt_ops/crypto_format.h" -#include "lib/crypt_ops/crypto_init.h" - /** * \file router.c * \brief Miscellaneous relay functionality, including RSA key maintenance, diff --git a/src/feature/relay/router.h b/src/feature/relay/router.h index a9c7ac3fd5..4575172afb 100644 --- a/src/feature/relay/router.h +++ b/src/feature/relay/router.h @@ -13,10 +13,6 @@ #define TOR_ROUTER_H #include "lib/testsupport/testsupport.h" -#include "feature/nodelist/describe.h" -#include "feature/nodelist/nickname.h" -#include "feature/nodelist/routerinfo.h" -#include "core/mainloop/netstatus.h" struct curve25519_keypair_t; struct ed25519_keypair_t; diff --git a/src/feature/relay/selftest.c b/src/feature/relay/selftest.c index 789870d294..26205aad0f 100644 --- a/src/feature/relay/selftest.c +++ b/src/feature/relay/selftest.c @@ -19,6 +19,7 @@ #include "app/config/config.h" #include "core/mainloop/connection.h" #include "core/mainloop/mainloop.h" +#include "core/mainloop/netstatus.h" #include "core/or/circuitbuild.h" #include "core/or/circuitlist.h" #include "core/or/circuituse.h" @@ -29,6 +30,7 @@ #include "feature/dirclient/dirclient.h" #include "feature/dircommon/directory.h" #include "feature/nodelist/authority_cert_st.h" +#include "feature/nodelist/routerinfo.h" #include "feature/nodelist/routerinfo_st.h" #include "feature/nodelist/routerlist.h" // but... #include "feature/nodelist/routerset.h" |