aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-25 17:57:58 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-25 17:57:58 -0400
commit4f0bc0c8f56f4179482c21bf3122b67ee2fe26d1 (patch)
tree9f3063311db1e31e5e457f2854ff03cbcee74623 /src/app
parent3ff58e47d211d8649202c093f00934011effed1b (diff)
downloadtor-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/app')
-rw-r--r--src/app/config/config.c79
-rw-r--r--src/app/main/main.c73
2 files changed, 78 insertions, 74 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c
index 65899b6400..91e2758650 100644
--- a/src/app/config/config.c
+++ b/src/app/config/config.c
@@ -60,62 +60,65 @@
#define CONFIG_PRIVATE
#include "core/or/or.h"
-#include "feature/client/bridges.h"
-#include "feature/client/addressmap.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "app/config/statefile.h"
+#include "app/main/main.h"
+#include "core/mainloop/connection.h"
+#include "core/mainloop/cpuworker.h"
+#include "core/mainloop/mainloop.h"
+#include "core/mainloop/netstatus.h"
#include "core/or/channel.h"
#include "core/or/circuitbuild.h"
#include "core/or/circuitlist.h"
#include "core/or/circuitmux.h"
#include "core/or/circuitmux_ewma.h"
#include "core/or/circuitstats.h"
-#include "lib/compress/compress.h"
-#include "app/config/config.h"
-#include "lib/encoding/confline.h"
-#include "core/mainloop/connection.h"
#include "core/or/connection_edge.h"
#include "core/or/connection_or.h"
-#include "feature/dircache/consdiffmgr.h"
+#include "core/or/dos.h"
+#include "core/or/policies.h"
+#include "core/or/relay.h"
+#include "core/or/scheduler.h"
+#include "feature/client/addressmap.h"
+#include "feature/client/bridges.h"
+#include "feature/client/entrynodes.h"
+#include "feature/client/transports.h"
#include "feature/control/control.h"
-#include "app/config/confparse.h"
-#include "core/mainloop/cpuworker.h"
-#include "lib/crypt_ops/crypto_rand.h"
-#include "lib/crypt_ops/crypto_util.h"
-#include "lib/crypt_ops/crypto_init.h"
-#ifdef ENABLE_NSS
-#include "lib/crypt_ops/crypto_nss_mgt.h"
-#else
-#include "lib/crypt_ops/crypto_openssl_mgt.h"
-#endif
#include "feature/dirauth/bwauth.h"
-#include "feature/dircache/dirserv.h"
#include "feature/dirauth/guardfraction.h"
-#include "feature/relay/dns.h"
-#include "core/or/dos.h"
-#include "feature/client/entrynodes.h"
-#include "lib/log/git_revision.h"
-#include "feature/stats/geoip.h"
+#include "feature/dircache/consdiffmgr.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/dircommon/voting_schedule.h"
#include "feature/hibernate/hibernate.h"
-#include "app/main/main.h"
-#include "core/mainloop/mainloop.h"
+#include "feature/hs/hs_config.h"
+#include "feature/nodelist/dirlist.h"
#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nickname.h"
#include "feature/nodelist/nodelist.h"
-#include "core/or/policies.h"
-#include "core/or/relay.h"
+#include "feature/nodelist/routerset.h"
+#include "feature/relay/dns.h"
+#include "feature/relay/ext_orport.h"
+#include "feature/relay/routermode.h"
#include "feature/rend/rendclient.h"
#include "feature/rend/rendservice.h"
-#include "feature/hs/hs_config.h"
+#include "feature/stats/geoip.h"
#include "feature/stats/rephist.h"
-#include "feature/relay/router.h"
-#include "feature/relay/routermode.h"
-#include "lib/sandbox/sandbox.h"
-#include "feature/nodelist/dirlist.h"
-#include "feature/nodelist/routerset.h"
-#include "core/or/scheduler.h"
-#include "app/config/statefile.h"
-#include "feature/client/transports.h"
-#include "feature/relay/ext_orport.h"
-#include "feature/dircommon/voting_schedule.h"
+#include "lib/compress/compress.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/log/git_revision.h"
#include "lib/net/resolve.h"
+#include "lib/sandbox/sandbox.h"
+
+#ifdef ENABLE_NSS
+#include "lib/crypt_ops/crypto_nss_mgt.h"
+#else
+#include "lib/crypt_ops/crypto_openssl_mgt.h"
+#endif
+
#ifdef _WIN32
#include <shlobj.h>
#endif
diff --git a/src/app/main/main.c b/src/app/main/main.c
index 6c7312f676..90bc8c510f 100644
--- a/src/app/main/main.c
+++ b/src/app/main/main.c
@@ -11,63 +11,64 @@
#include "core/or/or.h"
-#include "feature/client/addressmap.h"
-#include "lib/err/backtrace.h"
-#include "feature/client/bridges.h"
-#include "lib/container/buffers.h"
+#include "app/config/config.h"
+#include "app/config/statefile.h"
+#include "app/main/main.h"
+#include "app/main/ntmain.h"
+#include "core/mainloop/connection.h"
+#include "core/mainloop/cpuworker.h"
+#include "core/mainloop/mainloop.h"
+#include "core/mainloop/netstatus.h"
#include "core/or/channel.h"
-#include "core/or/channeltls.h"
#include "core/or/channelpadding.h"
+#include "core/or/channeltls.h"
#include "core/or/circuitlist.h"
#include "core/or/circuitmux_ewma.h"
#include "core/or/command.h"
-#include "lib/compress/compress.h"
-#include "app/config/config.h"
-#include "core/mainloop/connection.h"
#include "core/or/connection_edge.h"
#include "core/or/connection_or.h"
-#include "feature/dircache/consdiffmgr.h"
+#include "core/or/policies.h"
+#include "core/or/protover.h"
+#include "core/or/relay.h"
+#include "core/or/scheduler.h"
+#include "core/or/status.h"
+#include "feature/api/tor_api.h"
+#include "feature/api/tor_api_internal.h"
+#include "feature/client/addressmap.h"
+#include "feature/client/bridges.h"
+#include "feature/client/entrynodes.h"
+#include "feature/client/transports.h"
#include "feature/control/control.h"
-#include "core/mainloop/cpuworker.h"
-#include "lib/crypt_ops/crypto_s2k.h"
-#include "lib/crypt_ops/crypto_rand.h"
-#include "feature/dircache/dirserv.h"
#include "feature/dirauth/bwauth.h"
+#include "feature/dirauth/keypin.h"
#include "feature/dirauth/process_descs.h"
-#include "feature/relay/dns.h"
-#include "feature/relay/routermode.h"
-#include "feature/client/entrynodes.h"
-#include "feature/stats/geoip.h"
+#include "feature/dircache/consdiffmgr.h"
+#include "feature/dircache/dirserv.h"
#include "feature/hibernate/hibernate.h"
#include "feature/hs/hs_cache.h"
-#include "feature/dirauth/keypin.h"
-#include "app/main/main.h"
-#include "core/mainloop/mainloop.h"
+#include "feature/nodelist/authcert.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/nodelist.h"
-#include "app/main/ntmain.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/relay/dns.h"
+#include "feature/relay/ext_orport.h"
#include "feature/relay/onion_queue.h"
-#include "core/or/policies.h"
-#include "core/or/protover.h"
-#include "feature/client/transports.h"
-#include "core/or/relay.h"
+#include "feature/relay/routerkeys.h"
+#include "feature/relay/routermode.h"
#include "feature/rend/rendcache.h"
#include "feature/rend/rendclient.h"
#include "feature/rend/rendservice.h"
+#include "feature/stats/geoip.h"
#include "feature/stats/rephist.h"
-#include "feature/relay/router.h"
-#include "feature/relay/routerkeys.h"
-#include "feature/nodelist/authcert.h"
-#include "feature/nodelist/routerlist.h"
-#include "feature/nodelist/routerparse.h"
-#include "core/or/scheduler.h"
-#include "app/config/statefile.h"
-#include "core/or/status.h"
-#include "feature/api/tor_api.h"
-#include "feature/api/tor_api_internal.h"
+#include "lib/compress/compress.h"
+#include "lib/container/buffers.h"
+#include "lib/crypt_ops/crypto_rand.h"
+#include "lib/crypt_ops/crypto_s2k.h"
+#include "lib/err/backtrace.h"
#include "lib/process/waitpid.h"
-#include "feature/relay/ext_orport.h"
+
#include "lib/meminfo/meminfo.h"
#include "lib/osinfo/uname.h"
#include "lib/sandbox/sandbox.h"