summaryrefslogtreecommitdiff
path: root/src/feature/nodelist
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/feature/nodelist
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/feature/nodelist')
-rw-r--r--src/feature/nodelist/describe.c2
-rw-r--r--src/feature/nodelist/networkstatus.c48
-rw-r--r--src/feature/nodelist/node_select.c3
-rw-r--r--src/feature/nodelist/nodelist.c27
-rw-r--r--src/feature/nodelist/routerlist.c12
-rw-r--r--src/feature/nodelist/routerparse.c33
-rw-r--r--src/feature/nodelist/routerset.c6
7 files changed, 70 insertions, 61 deletions
diff --git a/src/feature/nodelist/describe.c b/src/feature/nodelist/describe.c
index 0ef9e3e7f7..6df3da1965 100644
--- a/src/feature/nodelist/describe.c
+++ b/src/feature/nodelist/describe.c
@@ -11,7 +11,7 @@
#include "core/or/or.h"
#include "feature/nodelist/describe.h"
-#include "feature/relay/router.h"
+#include "feature/nodelist/routerinfo.h"
#include "core/or/extend_info_st.h"
#include "feature/nodelist/node_st.h"
diff --git a/src/feature/nodelist/networkstatus.c b/src/feature/nodelist/networkstatus.c
index 40457ef689..67b5a1d046 100644
--- a/src/feature/nodelist/networkstatus.c
+++ b/src/feature/nodelist/networkstatus.c
@@ -38,45 +38,47 @@
#define NETWORKSTATUS_PRIVATE
#include "core/or/or.h"
-#include "feature/client/bridges.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/mainloop/mainloop.h"
+#include "core/mainloop/netstatus.h"
#include "core/or/channel.h"
+#include "core/or/channelpadding.h"
#include "core/or/circuitmux.h"
#include "core/or/circuitmux_ewma.h"
#include "core/or/circuitstats.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/dos.h"
+#include "core/or/protover.h"
+#include "core/or/relay.h"
+#include "core/or/scheduler.h"
+#include "feature/client/bridges.h"
+#include "feature/client/entrynodes.h"
+#include "feature/client/transports.h"
#include "feature/control/control.h"
-#include "lib/crypt_ops/crypto_rand.h"
-#include "lib/crypt_ops/crypto_util.h"
-#include "feature/dircommon/directory.h"
+#include "feature/dirauth/reachability.h"
+#include "feature/dircache/consdiffmgr.h"
+#include "feature/dircache/dirserv.h"
#include "feature/dirclient/dirclient.h"
#include "feature/dirclient/dlstatus.h"
-#include "feature/dircache/dirserv.h"
-#include "feature/dirauth/reachability.h"
-#include "core/or/dos.h"
-#include "feature/client/entrynodes.h"
+#include "feature/dircommon/directory.h"
+#include "feature/dircommon/voting_schedule.h"
#include "feature/hibernate/hibernate.h"
-#include "core/mainloop/mainloop.h"
-#include "feature/nodelist/microdesc.h"
-#include "feature/nodelist/networkstatus.h"
-#include "feature/nodelist/nodelist.h"
-#include "core/or/protover.h"
-#include "core/or/relay.h"
-#include "feature/relay/routermode.h"
#include "feature/nodelist/authcert.h"
#include "feature/nodelist/dirlist.h"
+#include "feature/nodelist/fmt_routerstatus.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
#include "feature/nodelist/node_select.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/routerinfo.h"
#include "feature/nodelist/routerlist.h"
#include "feature/nodelist/routerparse.h"
-#include "core/or/scheduler.h"
-#include "feature/client/transports.h"
#include "feature/nodelist/torcert.h"
-#include "core/or/channelpadding.h"
-#include "feature/dircommon/voting_schedule.h"
-#include "feature/nodelist/fmt_routerstatus.h"
+#include "feature/relay/routermode.h"
+#include "lib/crypt_ops/crypto_rand.h"
+#include "lib/crypt_ops/crypto_util.h"
#include "feature/dirauth/dirvote.h"
#include "feature/dirauth/authmode.h"
diff --git a/src/feature/nodelist/node_select.c b/src/feature/nodelist/node_select.c
index 6d58705ccb..04a24de9a1 100644
--- a/src/feature/nodelist/node_select.c
+++ b/src/feature/nodelist/node_select.c
@@ -18,8 +18,9 @@
#include "core/or/policies.h"
#include "core/or/reasons.h"
#include "feature/client/entrynodes.h"
-#include "feature/dircommon/directory.h"
#include "feature/dirclient/dirclient.h"
+#include "feature/dircommon/directory.h"
+#include "feature/nodelist/describe.h"
#include "feature/nodelist/dirlist.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
diff --git a/src/feature/nodelist/nodelist.c b/src/feature/nodelist/nodelist.c
index b5ded356ba..e3b77d562c 100644
--- a/src/feature/nodelist/nodelist.c
+++ b/src/feature/nodelist/nodelist.c
@@ -41,31 +41,32 @@
#define NODELIST_PRIVATE
#include "core/or/or.h"
-#include "lib/net/address.h"
+#include "app/config/config.h"
+#include "core/mainloop/mainloop.h"
+#include "core/mainloop/netstatus.h"
#include "core/or/address_set.h"
+#include "core/or/policies.h"
+#include "core/or/protover.h"
#include "feature/client/bridges.h"
-#include "app/config/config.h"
+#include "feature/client/entrynodes.h"
#include "feature/control/control.h"
-#include "feature/dircache/dirserv.h"
#include "feature/dirauth/process_descs.h"
-#include "feature/client/entrynodes.h"
-#include "feature/stats/geoip.h"
-#include "feature/hs/hs_common.h"
+#include "feature/dircache/dirserv.h"
#include "feature/hs/hs_client.h"
-#include "core/mainloop/mainloop.h"
+#include "feature/hs/hs_common.h"
+#include "feature/nodelist/describe.h"
+#include "feature/nodelist/dirlist.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
-#include "feature/nodelist/nodelist.h"
-#include "core/or/policies.h"
-#include "core/or/protover.h"
-#include "feature/rend/rendservice.h"
-#include "feature/relay/router.h"
-#include "feature/nodelist/dirlist.h"
#include "feature/nodelist/node_select.h"
+#include "feature/nodelist/nodelist.h"
#include "feature/nodelist/routerlist.h"
#include "feature/nodelist/routerparse.h"
#include "feature/nodelist/routerset.h"
#include "feature/nodelist/torcert.h"
+#include "feature/rend/rendservice.h"
+#include "feature/stats/geoip.h"
+#include "lib/net/address.h"
#include <string.h>
diff --git a/src/feature/nodelist/routerlist.c b/src/feature/nodelist/routerlist.c
index 2bd6e5c6fb..20956d8cca 100644
--- a/src/feature/nodelist/routerlist.c
+++ b/src/feature/nodelist/routerlist.c
@@ -69,18 +69,20 @@
#include "feature/client/bridges.h"
#include "feature/control/control.h"
#include "feature/dirauth/authmode.h"
-#include "feature/dircommon/directory.h"
-#include "feature/dirclient/dirclient.h"
+#include "feature/dirauth/process_descs.h"
+#include "feature/dirauth/reachability.h"
#include "feature/dircache/dirserv.h"
+#include "feature/dirclient/dirclient.h"
#include "feature/dirclient/dlstatus.h"
-#include "feature/dirauth/reachability.h"
-#include "feature/dirauth/process_descs.h"
+#include "feature/dircommon/directory.h"
#include "feature/nodelist/authcert.h"
+#include "feature/nodelist/describe.h"
#include "feature/nodelist/dirlist.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
-#include "feature/nodelist/nodelist.h"
#include "feature/nodelist/node_select.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/routerinfo.h"
#include "feature/nodelist/routerlist.h"
#include "feature/nodelist/routerparse.h"
#include "feature/nodelist/routerset.h"
diff --git a/src/feature/nodelist/routerparse.c b/src/feature/nodelist/routerparse.c
index a72cf98f56..c12f411e87 100644
--- a/src/feature/nodelist/routerparse.c
+++ b/src/feature/nodelist/routerparse.c
@@ -56,29 +56,32 @@
#define ROUTERPARSE_PRIVATE
#include "core/or/or.h"
-#include "core/or/circuitstats.h"
#include "app/config/config.h"
-#include "lib/crypt_ops/crypto_format.h"
-#include "lib/crypt_ops/crypto_util.h"
-#include "feature/dirauth/shared_random.h"
+#include "core/or/circuitstats.h"
+#include "core/or/policies.h"
+#include "core/or/protover.h"
#include "feature/client/entrynodes.h"
-#include "lib/memarea/memarea.h"
+#include "feature/dirauth/shared_random.h"
+#include "feature/dircommon/voting_schedule.h"
+#include "feature/hs_common/shared_random_client.h"
+#include "feature/nodelist/authcert.h"
+#include "feature/nodelist/describe.h"
#include "feature/nodelist/microdesc.h"
#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nickname.h"
#include "feature/nodelist/parsecommon.h"
-#include "core/or/policies.h"
-#include "core/or/protover.h"
-#include "feature/rend/rendcommon.h"
-#include "feature/stats/rephist.h"
-#include "feature/relay/router.h"
-#include "feature/relay/routerkeys.h"
+#include "feature/nodelist/routerinfo.h"
#include "feature/nodelist/routerlist.h"
#include "feature/nodelist/routerparse.h"
-#include "feature/nodelist/authcert.h"
-#include "lib/sandbox/sandbox.h"
-#include "feature/hs_common/shared_random_client.h"
#include "feature/nodelist/torcert.h"
-#include "feature/dircommon/voting_schedule.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/stats/rephist.h"
+#include "lib/crypt_ops/crypto_format.h"
+#include "lib/crypt_ops/crypto_util.h"
+#include "lib/memarea/memarea.h"
+#include "lib/sandbox/sandbox.h"
#include "feature/dirauth/dirvote.h"
diff --git a/src/feature/nodelist/routerset.c b/src/feature/nodelist/routerset.c
index cd42697748..08124835ae 100644
--- a/src/feature/nodelist/routerset.c
+++ b/src/feature/nodelist/routerset.c
@@ -28,13 +28,13 @@ n * Copyright (c) 2001-2004, Roger Dingledine.
#define ROUTERSET_PRIVATE
#include "core/or/or.h"
+#include "core/or/policies.h"
#include "feature/client/bridges.h"
-#include "feature/stats/geoip.h"
+#include "feature/nodelist/nickname.h"
#include "feature/nodelist/nodelist.h"
-#include "core/or/policies.h"
-#include "feature/relay/router.h"
#include "feature/nodelist/routerparse.h"
#include "feature/nodelist/routerset.h"
+#include "feature/stats/geoip.h"
#include "core/or/addr_policy_st.h"
#include "core/or/extend_info_st.h"