aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-05 16:34:59 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-05 17:15:50 -0400
commitef486e3c029efe8cb18886eea52f20af766f9daa (patch)
tree78a7553311e67f5911c102d5e7ca9b0f1eacae25 /src/test
parent63b4ea22af8e8314dd718f02046de5f4b91edf9d (diff)
downloadtor-ef486e3c029efe8cb18886eea52f20af766f9daa.tar.gz
tor-ef486e3c029efe8cb18886eea52f20af766f9daa.zip
Fix every include path changed in the previous commit (automated)
I am very glad to have written this script.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/bench.c18
-rw-r--r--src/test/fuzz/fuzz_consensus.c8
-rw-r--r--src/test/fuzz/fuzz_descriptor.c8
-rw-r--r--src/test/fuzz/fuzz_diff.c4
-rw-r--r--src/test/fuzz/fuzz_diff_apply.c4
-rw-r--r--src/test/fuzz/fuzz_extrainfo.c8
-rw-r--r--src/test/fuzz/fuzz_hsdescv2.c6
-rw-r--r--src/test/fuzz/fuzz_hsdescv3.c6
-rw-r--r--src/test/fuzz/fuzz_http.c10
-rw-r--r--src/test/fuzz/fuzz_http_connect.c14
-rw-r--r--src/test/fuzz/fuzz_iptsv2.c8
-rw-r--r--src/test/fuzz/fuzz_microdesc.c6
-rw-r--r--src/test/fuzz/fuzz_vrs.c12
-rw-r--r--src/test/fuzz/fuzzing_common.c4
-rw-r--r--src/test/hs_test_helpers.c6
-rw-r--r--src/test/hs_test_helpers.h2
-rw-r--r--src/test/log_test_helpers.h2
-rw-r--r--src/test/rend_test_helpers.c10
-rw-r--r--src/test/rend_test_helpers.h2
-rw-r--r--src/test/test.c44
-rw-r--r--src/test/test_accounting.c10
-rw-r--r--src/test/test_addr.c4
-rw-r--r--src/test/test_address.c2
-rw-r--r--src/test/test_address_set.c24
-rw-r--r--src/test/test_bridges.c8
-rw-r--r--src/test/test_bt_cl.c2
-rw-r--r--src/test/test_buffers.c6
-rw-r--r--src/test/test_bwmgt.c2
-rw-r--r--src/test/test_cell_formats.c28
-rw-r--r--src/test/test_cell_queue.c14
-rw-r--r--src/test/test_channel.c30
-rw-r--r--src/test/test_channelpadding.c26
-rw-r--r--src/test/test_channeltls.c16
-rw-r--r--src/test/test_checkdir.c4
-rw-r--r--src/test/test_circuitbuild.c10
-rw-r--r--src/test/test_circuitlist.c16
-rw-r--r--src/test/test_circuitmux.c14
-rw-r--r--src/test/test_circuitstats.c24
-rw-r--r--src/test/test_circuituse.c18
-rw-r--r--src/test/test_compat_libevent.c2
-rw-r--r--src/test/test_config.c66
-rw-r--r--src/test/test_connection.c34
-rw-r--r--src/test/test_conscache.c6
-rw-r--r--src/test/test_consdiff.c4
-rw-r--r--src/test/test_consdiffmgr.c18
-rw-r--r--src/test/test_containers.c4
-rw-r--r--src/test/test_controller.c26
-rw-r--r--src/test/test_controller_events.c16
-rw-r--r--src/test/test_crypto.c2
-rw-r--r--src/test/test_crypto_slow.c2
-rw-r--r--src/test/test_dir.c70
-rw-r--r--src/test/test_dir_common.c22
-rw-r--r--src/test/test_dir_common.h6
-rw-r--r--src/test/test_dir_handle_get.c52
-rw-r--r--src/test/test_dns.c14
-rw-r--r--src/test/test_dos.c26
-rw-r--r--src/test/test_entryconn.c22
-rw-r--r--src/test/test_entrynodes.c52
-rw-r--r--src/test/test_extorport.c16
-rw-r--r--src/test/test_geoip.c6
-rw-r--r--src/test/test_guardfraction.c20
-rw-r--r--src/test/test_helpers.c28
-rw-r--r--src/test/test_helpers.h2
-rw-r--r--src/test/test_hs.c28
-rw-r--r--src/test/test_hs_cache.c16
-rw-r--r--src/test/test_hs_cell.c6
-rw-r--r--src/test/test_hs_client.c52
-rw-r--r--src/test/test_hs_common.c42
-rw-r--r--src/test/test_hs_config.c10
-rw-r--r--src/test/test_hs_control.c18
-rw-r--r--src/test/test_hs_descriptor.c6
-rw-r--r--src/test/test_hs_intropoint.c22
-rw-r--r--src/test/test_hs_ntor.c2
-rw-r--r--src/test/test_hs_ntor_cl.c6
-rw-r--r--src/test/test_hs_service.c64
-rw-r--r--src/test/test_introduce.c4
-rw-r--r--src/test/test_keypin.c4
-rw-r--r--src/test/test_link_handshake.c28
-rw-r--r--src/test/test_logging.c4
-rw-r--r--src/test/test_mainloop.c4
-rw-r--r--src/test/test_microdesc.c26
-rw-r--r--src/test/test_nodelist.c20
-rw-r--r--src/test/test_ntor_cl.c4
-rw-r--r--src/test/test_oom.c18
-rw-r--r--src/test/test_oos.c16
-rw-r--r--src/test/test_options.c14
-rw-r--r--src/test/test_periodic_event.c12
-rw-r--r--src/test/test_policy.c20
-rw-r--r--src/test/test_procmon.c2
-rw-r--r--src/test/test_proto_http.c4
-rw-r--r--src/test/test_proto_misc.c14
-rw-r--r--src/test/test_protover.c6
-rw-r--r--src/test/test_pt.c16
-rw-r--r--src/test/test_relay.c14
-rw-r--r--src/test/test_relaycell.c26
-rw-r--r--src/test/test_relaycrypt.c16
-rw-r--r--src/test/test_rendcache.c24
-rw-r--r--src/test/test_replay.c4
-rw-r--r--src/test/test_router.c10
-rw-r--r--src/test/test_routerkeys.c10
-rw-r--r--src/test/test_routerlist.c50
-rw-r--r--src/test/test_routerset.c24
-rw-r--r--src/test/test_scheduler.c14
-rw-r--r--src/test/test_shared_random.c32
-rw-r--r--src/test/test_slow.c2
-rw-r--r--src/test/test_socks.c10
-rw-r--r--src/test/test_status.c28
-rw-r--r--src/test/test_storagedir.c2
-rw-r--r--src/test/test_switch_id.c2
-rw-r--r--src/test/test_threads.c2
-rw-r--r--src/test/test_tortls.c6
-rw-r--r--src/test/test_util.c8
-rw-r--r--src/test/test_util_format.c2
-rw-r--r--src/test/test_util_process.c2
-rw-r--r--src/test/test_voting_schedule.c4
-rw-r--r--src/test/test_workqueue.c4
-rw-r--r--src/test/testing_common.c12
-rw-r--r--src/test/testing_rsakeys.c2
118 files changed, 877 insertions, 877 deletions
diff --git a/src/test/bench.c b/src/test/bench.c
index ced04fffd7..7919a4224f 100644
--- a/src/test/bench.c
+++ b/src/test/bench.c
@@ -10,27 +10,27 @@
#include "orconfig.h"
-#include "or/or.h"
-#include "or/onion_tap.h"
-#include "or/relay_crypto.h"
+#include "core/or/or.h"
+#include "core/crypto/onion_tap.h"
+#include "core/crypto/relay_crypto.h"
#include <openssl/opensslv.h>
#include <openssl/evp.h>
#include <openssl/ec.h>
#include <openssl/ecdh.h>
#include <openssl/obj_mac.h>
-#include "or/circuitlist.h"
-#include "or/config.h"
+#include "core/or/circuitlist.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_curve25519.h"
#include "lib/crypt_ops/crypto_dh.h"
-#include "or/onion_ntor.h"
+#include "core/crypto/onion_ntor.h"
#include "lib/crypt_ops/crypto_ed25519.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/consdiff.h"
+#include "feature/dircommon/consdiff.h"
#include "lib/compress/compress.h"
-#include "or/cell_st.h"
-#include "or/or_circuit_st.h"
+#include "core/or/cell_st.h"
+#include "core/or/or_circuit_st.h"
#include "lib/crypt_ops/digestset.h"
diff --git a/src/test/fuzz/fuzz_consensus.c b/src/test/fuzz/fuzz_consensus.c
index 81a3101545..b170fd33d8 100644
--- a/src/test/fuzz/fuzz_consensus.c
+++ b/src/test/fuzz/fuzz_consensus.c
@@ -1,11 +1,11 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE
-#include "or/or.h"
-#include "or/routerparse.h"
-#include "or/networkstatus.h"
+#include "core/or/or.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/networkstatus.h"
#include "lib/crypt_ops/crypto_ed25519.h"
-#include "or/networkstatus_st.h"
+#include "feature/nodelist/networkstatus_st.h"
#include "test/fuzz/fuzzing.h"
static void
diff --git a/src/test/fuzz/fuzz_descriptor.c b/src/test/fuzz/fuzz_descriptor.c
index d28793fdf3..5a56f4081a 100644
--- a/src/test/fuzz/fuzz_descriptor.c
+++ b/src/test/fuzz/fuzz_descriptor.c
@@ -1,10 +1,10 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE
-#include "or/or.h"
-#include "or/routerparse.h"
-#include "or/routerlist.h"
-#include "or/routerkeys.h"
+#include "core/or/or.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/relay/routerkeys.h"
#include "test/fuzz/fuzzing.h"
static int
diff --git a/src/test/fuzz/fuzz_diff.c b/src/test/fuzz/fuzz_diff.c
index eb5fc27e08..1079856fdb 100644
--- a/src/test/fuzz/fuzz_diff.c
+++ b/src/test/fuzz/fuzz_diff.c
@@ -4,8 +4,8 @@
#define CONSDIFF_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
-#include "or/consdiff.h"
+#include "core/or/or.h"
+#include "feature/dircommon/consdiff.h"
#include "test/fuzz/fuzzing.h"
diff --git a/src/test/fuzz/fuzz_diff_apply.c b/src/test/fuzz/fuzz_diff_apply.c
index 76789fabcd..165d0e6126 100644
--- a/src/test/fuzz/fuzz_diff_apply.c
+++ b/src/test/fuzz/fuzz_diff_apply.c
@@ -4,8 +4,8 @@
#define CONSDIFF_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
-#include "or/consdiff.h"
+#include "core/or/or.h"
+#include "feature/dircommon/consdiff.h"
#include "test/fuzz/fuzzing.h"
diff --git a/src/test/fuzz/fuzz_extrainfo.c b/src/test/fuzz/fuzz_extrainfo.c
index 274ecc7866..6c88f80122 100644
--- a/src/test/fuzz/fuzz_extrainfo.c
+++ b/src/test/fuzz/fuzz_extrainfo.c
@@ -1,10 +1,10 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE
-#include "or/or.h"
-#include "or/routerparse.h"
-#include "or/routerlist.h"
-#include "or/routerkeys.h"
+#include "core/or/or.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/relay/routerkeys.h"
#include "test/fuzz/fuzzing.h"
static void
diff --git a/src/test/fuzz/fuzz_hsdescv2.c b/src/test/fuzz/fuzz_hsdescv2.c
index 7fd86f40b1..fd5da41635 100644
--- a/src/test/fuzz/fuzz_hsdescv2.c
+++ b/src/test/fuzz/fuzz_hsdescv2.c
@@ -1,9 +1,9 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE
-#include "or/or.h"
-#include "or/routerparse.h"
-#include "or/rendcommon.h"
+#include "core/or/or.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/rend/rendcommon.h"
#include "lib/crypt_ops/crypto_ed25519.h"
#include "test/fuzz/fuzzing.h"
diff --git a/src/test/fuzz/fuzz_hsdescv3.c b/src/test/fuzz/fuzz_hsdescv3.c
index de574ac26d..4ec8db0a87 100644
--- a/src/test/fuzz/fuzz_hsdescv3.c
+++ b/src/test/fuzz/fuzz_hsdescv3.c
@@ -4,11 +4,11 @@
#define ROUTERPARSE_PRIVATE
#define HS_DESCRIPTOR_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "trunnel/ed25519_cert.h" /* Trunnel interface. */
#include "lib/crypt_ops/crypto_ed25519.h"
-#include "or/hs_descriptor.h"
-#include "or/routerparse.h"
+#include "feature/hs/hs_descriptor.h"
+#include "feature/nodelist/routerparse.h"
#include "test/fuzz/fuzzing.h"
diff --git a/src/test/fuzz/fuzz_http.c b/src/test/fuzz/fuzz_http.c
index 772f2099b6..61dc2144b4 100644
--- a/src/test/fuzz/fuzz_http.c
+++ b/src/test/fuzz/fuzz_http.c
@@ -6,15 +6,15 @@
#define BUFFERS_PRIVATE
#define DIRECTORY_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/err/backtrace.h"
#include "lib/container/buffers.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/directory.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "feature/dircache/directory.h"
#include "lib/log/torlog.h"
-#include "or/dir_connection_st.h"
+#include "feature/dircommon/dir_connection_st.h"
#include "test/fuzz/fuzzing.h"
diff --git a/src/test/fuzz/fuzz_http_connect.c b/src/test/fuzz/fuzz_http_connect.c
index bf0a9deba6..184bb52ee2 100644
--- a/src/test/fuzz/fuzz_http_connect.c
+++ b/src/test/fuzz/fuzz_http_connect.c
@@ -6,17 +6,17 @@
#define BUFFERS_PRIVATE
#define CONNECTION_EDGE_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/err/backtrace.h"
#include "lib/container/buffers.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/proto_socks.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/proto/proto_socks.h"
#include "lib/log/torlog.h"
-#include "or/entry_connection_st.h"
-#include "or/socks_request_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/socks_request_st.h"
#include "test/fuzz/fuzzing.h"
diff --git a/src/test/fuzz/fuzz_iptsv2.c b/src/test/fuzz/fuzz_iptsv2.c
index e4ec7fffce..a3082f4d0e 100644
--- a/src/test/fuzz/fuzz_iptsv2.c
+++ b/src/test/fuzz/fuzz_iptsv2.c
@@ -1,12 +1,12 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE
-#include "or/or.h"
-#include "or/routerparse.h"
-#include "or/rendcommon.h"
+#include "core/or/or.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/rend/rendcommon.h"
#include "lib/crypt_ops/crypto_ed25519.h"
-#include "or/rend_service_descriptor_st.h"
+#include "feature/rend/rend_service_descriptor_st.h"
#include "test/fuzz/fuzzing.h"
diff --git a/src/test/fuzz/fuzz_microdesc.c b/src/test/fuzz/fuzz_microdesc.c
index a7fe1bb66d..fa9676372d 100644
--- a/src/test/fuzz/fuzz_microdesc.c
+++ b/src/test/fuzz/fuzz_microdesc.c
@@ -1,9 +1,9 @@
/* Copyright (c) 2016-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE
-#include "or/or.h"
-#include "or/routerparse.h"
-#include "or/microdesc.h"
+#include "core/or/or.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/microdesc.h"
#include "lib/crypt_ops/crypto_ed25519.h"
#include "test/fuzz/fuzzing.h"
diff --git a/src/test/fuzz/fuzz_vrs.c b/src/test/fuzz/fuzz_vrs.c
index 7d28ef1c7a..8c96851b1f 100644
--- a/src/test/fuzz/fuzz_vrs.c
+++ b/src/test/fuzz/fuzz_vrs.c
@@ -2,14 +2,14 @@
/* See LICENSE for licensing information */
#define ROUTERPARSE_PRIVATE
#define NETWORKSTATUS_PRIVATE
-#include "or/or.h"
-#include "or/routerparse.h"
+#include "core/or/or.h"
+#include "feature/nodelist/routerparse.h"
#include "lib/memarea/memarea.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
-#include "or/networkstatus_st.h"
-#include "or/vote_routerstatus_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/vote_routerstatus_st.h"
#include "lib/crypt_ops/crypto_ed25519.h"
#include "test/fuzz/fuzzing.h"
diff --git a/src/test/fuzz/fuzzing_common.c b/src/test/fuzz/fuzzing_common.c
index c947ebfceb..0b3483bf66 100644
--- a/src/test/fuzz/fuzzing_common.c
+++ b/src/test/fuzz/fuzzing_common.c
@@ -2,9 +2,9 @@
/* See LICENSE for licensing information */
#define CRYPTO_ED25519_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/err/backtrace.h"
-#include "or/config.h"
+#include "app/config/config.h"
#include "test/fuzz/fuzzing.h"
#include "lib/compress/compress.h"
#include "lib/crypt_ops/crypto.h"
diff --git a/src/test/hs_test_helpers.c b/src/test/hs_test_helpers.c
index cb7b1fe1b7..afe3eafa2f 100644
--- a/src/test/hs_test_helpers.c
+++ b/src/test/hs_test_helpers.c
@@ -1,12 +1,12 @@
/* Copyright (c) 2017-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/crypt_ops/crypto_ed25519.h"
#include "test/test.h"
-#include "or/torcert.h"
+#include "feature/nodelist/torcert.h"
-#include "or/hs_common.h"
+#include "feature/hs/hs_common.h"
#include "test/hs_test_helpers.h"
hs_desc_intro_point_t *
diff --git a/src/test/hs_test_helpers.h b/src/test/hs_test_helpers.h
index 5c0262207a..b7c2714769 100644
--- a/src/test/hs_test_helpers.h
+++ b/src/test/hs_test_helpers.h
@@ -5,7 +5,7 @@
#define TOR_HS_TEST_HELPERS_H
#include "trunnel/ed25519_cert.h"
-#include "or/hs_descriptor.h"
+#include "feature/hs/hs_descriptor.h"
/* Set of functions to help build and test descriptors. */
hs_desc_intro_point_t *hs_helper_build_intro_point(
diff --git a/src/test/log_test_helpers.h b/src/test/log_test_helpers.h
index 7c38504527..fc9768c125 100644
--- a/src/test/log_test_helpers.h
+++ b/src/test/log_test_helpers.h
@@ -1,7 +1,7 @@
/* Copyright (c) 2014-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
+#include "core/or/or.h"
#ifndef TOR_LOG_TEST_HELPERS_H
#define TOR_LOG_TEST_HELPERS_H
diff --git a/src/test/rend_test_helpers.c b/src/test/rend_test_helpers.c
index 31af58c278..85a679a967 100644
--- a/src/test/rend_test_helpers.c
+++ b/src/test/rend_test_helpers.c
@@ -1,15 +1,15 @@
/* Copyright (c) 2014-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "test/test.h"
-#include "or/rendcommon.h"
+#include "feature/rend/rendcommon.h"
#include "test/rend_test_helpers.h"
-#include "or/extend_info_st.h"
-#include "or/rend_intro_point_st.h"
-#include "or/rend_service_descriptor_st.h"
+#include "core/or/extend_info_st.h"
+#include "feature/rend/rend_intro_point_st.h"
+#include "feature/rend/rend_service_descriptor_st.h"
void
generate_desc(int time_diff, rend_encoded_v2_service_descriptor_t **desc,
diff --git a/src/test/rend_test_helpers.h b/src/test/rend_test_helpers.h
index aca675b2a4..103e143ec6 100644
--- a/src/test/rend_test_helpers.h
+++ b/src/test/rend_test_helpers.h
@@ -1,7 +1,7 @@
/* Copyright (c) 2014-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
+#include "core/or/or.h"
#ifndef TOR_REND_TEST_HELPERS_H
#define TOR_REND_TEST_HELPERS_H
diff --git a/src/test/test.c b/src/test/test.c
index d6be5ea2e7..2addeec968 100644
--- a/src/test/test.c
+++ b/src/test/test.c
@@ -12,7 +12,7 @@
#include "lib/crypt_ops/crypto_dh.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/or_state_st.h"
+#include "app/config/or_state_st.h"
#include <stdio.h>
#ifdef HAVE_FCNTL_H
@@ -42,34 +42,34 @@
long int lround(double x);
double fabs(double x);
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/err/backtrace.h"
#include "lib/container/buffers.h"
-#include "or/circuitlist.h"
-#include "or/circuitstats.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitstats.h"
#include "lib/compress/compress.h"
-#include "or/config.h"
-#include "or/connection_edge.h"
-#include "or/rendcommon.h"
-#include "or/rendcache.h"
+#include "app/config/config.h"
+#include "core/or/connection_edge.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendcache.h"
#include "test/test.h"
-#include "or/main.h"
+#include "core/mainloop/main.h"
#include "lib/memarea/memarea.h"
-#include "or/onion.h"
-#include "or/onion_ntor.h"
-#include "or/onion_fast.h"
-#include "or/onion_tap.h"
-#include "or/policies.h"
-#include "or/rephist.h"
-#include "or/routerparse.h"
-#include "or/statefile.h"
+#include "core/crypto/onion.h"
+#include "core/crypto/onion_ntor.h"
+#include "core/crypto/onion_fast.h"
+#include "core/crypto/onion_tap.h"
+#include "core/or/policies.h"
+#include "feature/stats/rephist.h"
+#include "feature/nodelist/routerparse.h"
+#include "app/config/statefile.h"
#include "lib/crypt_ops/crypto_curve25519.h"
-#include "or/extend_info_st.h"
-#include "or/or_circuit_st.h"
-#include "or/rend_encoded_v2_service_descriptor_st.h"
-#include "or/rend_intro_point_st.h"
-#include "or/rend_service_descriptor_st.h"
+#include "core/or/extend_info_st.h"
+#include "core/or/or_circuit_st.h"
+#include "feature/rend/rend_encoded_v2_service_descriptor_st.h"
+#include "feature/rend/rend_intro_point_st.h"
+#include "feature/rend/rend_service_descriptor_st.h"
/** Run unit tests for the onion handshake code. */
static void
diff --git a/src/test/test_accounting.c b/src/test/test_accounting.c
index 7b9511dc20..7721a9eb99 100644
--- a/src/test/test_accounting.c
+++ b/src/test/test_accounting.c
@@ -1,15 +1,15 @@
/* Copyright (c) 2014-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#define HIBERNATE_PRIVATE
-#include "or/hibernate.h"
-#include "or/config.h"
+#include "feature/hibernate/hibernate.h"
+#include "app/config/config.h"
#define STATEFILE_PRIVATE
-#include "or/statefile.h"
+#include "app/config/statefile.h"
-#include "or/or_state_st.h"
+#include "app/config/or_state_st.h"
#define NS_MODULE accounting
diff --git a/src/test/test_addr.c b/src/test/test_addr.c
index 1069e25b43..9ab921c5b6 100644
--- a/src/test/test_addr.c
+++ b/src/test/test_addr.c
@@ -5,10 +5,10 @@
#define ADDRESSMAP_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "test/test.h"
-#include "or/addressmap.h"
+#include "feature/client/addressmap.h"
#include "test/log_test_helpers.h"
#ifdef HAVE_SYS_UN_H
diff --git a/src/test/test_address.c b/src/test/test_address.c
index 52ca5137e6..abe7c2c0ad 100644
--- a/src/test/test_address.c
+++ b/src/test/test_address.c
@@ -23,7 +23,7 @@
#include <net/if.h>
#endif /* defined(HAVE_IFCONF_TO_SMARTLIST) */
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/net/address.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
diff --git a/src/test/test_address_set.c b/src/test/test_address_set.c
index ec4e6b7e87..f231740011 100644
--- a/src/test/test_address_set.c
+++ b/src/test/test_address_set.c
@@ -1,19 +1,19 @@
/* Copyright (c) 2017-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/address_set.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/routerlist.h"
-#include "or/torcert.h"
-
-#include "or/microdesc_st.h"
-#include "or/networkstatus_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerstatus_st.h"
+#include "core/or/address_set.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/torcert.h"
+
+#include "feature/nodelist/microdesc_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerstatus_st.h"
#include "test/test.h"
diff --git a/src/test/test_bridges.c b/src/test/test_bridges.c
index 685027c0e0..bdab148901 100644
--- a/src/test/test_bridges.c
+++ b/src/test/test_bridges.c
@@ -11,11 +11,11 @@
#include <stdbool.h>
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/net/address.h"
-#include "or/bridges.h"
-#include "or/config.h"
-#include "or/transports.h"
+#include "feature/client/bridges.h"
+#include "app/config/config.h"
+#include "feature/client/transports.h"
/* Test suite stuff */
#include "test/test.h"
diff --git a/src/test/test_bt_cl.c b/src/test/test_bt_cl.c
index 3f7b0a203a..716cff36e0 100644
--- a/src/test/test_bt_cl.c
+++ b/src/test/test_bt_cl.c
@@ -7,7 +7,7 @@
/* To prevent 'assert' from going away. */
#undef TOR_COVERAGE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/err/backtrace.h"
#include "lib/log/torlog.h"
diff --git a/src/test/test_buffers.c b/src/test/test_buffers.c
index 604f1422c1..477066f699 100644
--- a/src/test/test_buffers.c
+++ b/src/test/test_buffers.c
@@ -5,14 +5,14 @@
#define BUFFERS_PRIVATE
#define PROTO_HTTP_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/container/buffers.h"
#include "lib/tls/buffers_tls.h"
#include "lib/tls/tortls.h"
#include "lib/compress/compress.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/proto_http.h"
-#include "or/proto_socks.h"
+#include "core/proto/proto_http.h"
+#include "core/proto/proto_socks.h"
#include "test/test.h"
/** Run unit tests for buffers.c */
diff --git a/src/test/test_bwmgt.c b/src/test/test_bwmgt.c
index 4cfca6c776..7aa053f6c3 100644
--- a/src/test/test_bwmgt.c
+++ b/src/test/test_bwmgt.c
@@ -8,7 +8,7 @@
#define TOKEN_BUCKET_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#include "lib/evloop/token_bucket.h"
diff --git a/src/test/test_cell_formats.c b/src/test/test_cell_formats.c
index da5e5defd1..2753c42191 100644
--- a/src/test/test_cell_formats.c
+++ b/src/test/test_cell_formats.c
@@ -7,21 +7,21 @@
#define CONNECTION_EDGE_PRIVATE
#define RELAY_PRIVATE
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/onion.h"
-#include "or/onion_tap.h"
-#include "or/onion_fast.h"
-#include "or/onion_ntor.h"
-#include "or/relay.h"
-
-#include "or/cell_st.h"
-#include "or/cell_queue_st.h"
-#include "or/var_cell_st.h"
+#include "core/crypto/onion.h"
+#include "core/crypto/onion_tap.h"
+#include "core/crypto/onion_fast.h"
+#include "core/crypto/onion_ntor.h"
+#include "core/or/relay.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/cell_queue_st.h"
+#include "core/or/var_cell_st.h"
#include "test/test.h"
diff --git a/src/test/test_cell_queue.c b/src/test/test_cell_queue.c
index 3369511afc..d74bb9c622 100644
--- a/src/test/test_cell_queue.c
+++ b/src/test/test_cell_queue.c
@@ -3,15 +3,15 @@
#define CIRCUITLIST_PRIVATE
#define RELAY_PRIVATE
-#include "or/or.h"
-#include "or/circuitlist.h"
-#include "or/relay.h"
+#include "core/or/or.h"
+#include "core/or/circuitlist.h"
+#include "core/or/relay.h"
#include "test/test.h"
-#include "or/cell_st.h"
-#include "or/cell_queue_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
+#include "core/or/cell_st.h"
+#include "core/or/cell_queue_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
static void
test_cq_manip(void *arg)
diff --git a/src/test/test_channel.c b/src/test/test_channel.c
index 53c133ecb0..26af8de917 100644
--- a/src/test/test_channel.c
+++ b/src/test/test_channel.c
@@ -3,28 +3,28 @@
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_PRIVATE_
-#include "or/or.h"
-#include "or/channel.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
/* For channel_note_destroy_not_pending */
#define CIRCUITLIST_PRIVATE
-#include "or/circuitlist.h"
-#include "or/circuitmux.h"
-#include "or/circuitmux_ewma.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitmux.h"
+#include "core/or/circuitmux_ewma.h"
/* For var_cell_free */
-#include "or/connection_or.h"
+#include "core/or/connection_or.h"
#include "lib/crypt_ops/crypto_rand.h"
/* For packed_cell stuff */
#define RELAY_PRIVATE
-#include "or/relay.h"
+#include "core/or/relay.h"
/* For init/free stuff */
-#include "or/scheduler.h"
-#include "or/networkstatus.h"
-
-#include "or/cell_st.h"
-#include "or/networkstatus_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/routerstatus_st.h"
-#include "or/var_cell_st.h"
+#include "core/or/scheduler.h"
+#include "feature/nodelist/networkstatus.h"
+
+#include "core/or/cell_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "feature/nodelist/routerstatus_st.h"
+#include "core/or/var_cell_st.h"
/* Test suite stuff */
#include "test/log_test_helpers.h"
diff --git a/src/test/test_channelpadding.c b/src/test/test_channelpadding.c
index ff2ab8daab..5d696b8b80 100644
--- a/src/test/test_channelpadding.c
+++ b/src/test/test_channelpadding.c
@@ -5,28 +5,28 @@
#define MAIN_PRIVATE
#define NETWORKSTATUS_PRIVATE
#define TOR_TIMERS_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#include "lib/testsupport/testsupport.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/channelpadding.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/or/channelpadding.h"
#include "lib/evloop/compat_libevent.h"
-#include "or/config.h"
+#include "app/config/config.h"
#include "lib/time/compat_time.h"
-#include "or/main.h"
-#include "or/networkstatus.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/networkstatus.h"
#include "test/log_test_helpers.h"
#include "lib/tls/tortls.h"
#include "lib/evloop/timers.h"
#include "lib/container/buffers.h"
-#include "or/cell_st.h"
-#include "or/networkstatus_st.h"
-#include "or/or_connection_st.h"
-#include "or/routerstatus_st.h"
+#include "core/or/cell_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "core/or/or_connection_st.h"
+#include "feature/nodelist/routerstatus_st.h"
int channelpadding_get_netflow_inactive_timeout_ms(channel_t *chan);
int64_t channelpadding_compute_time_until_pad_for_netflow(channel_t *chan);
diff --git a/src/test/test_channeltls.c b/src/test/test_channeltls.c
index ad2b443cf2..787a30a85d 100644
--- a/src/test/test_channeltls.c
+++ b/src/test/test_channeltls.c
@@ -6,19 +6,19 @@
#include <math.h>
#define TOR_CHANNEL_INTERNAL_
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/net/address.h"
#include "lib/container/buffers.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
-#include "or/config.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
+#include "app/config/config.h"
/* For init/free stuff */
-#include "or/scheduler.h"
+#include "core/or/scheduler.h"
#include "lib/tls/tortls.h"
-#include "or/or_connection_st.h"
+#include "core/or/or_connection_st.h"
/* Test suite stuff */
#include "test/test.h"
diff --git a/src/test/test_checkdir.c b/src/test/test_checkdir.c
index a80c6ebd3a..652e308ed8 100644
--- a/src/test/test_checkdir.c
+++ b/src/test/test_checkdir.c
@@ -2,7 +2,7 @@
/* See LICENSE for licensing information */
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#ifdef _WIN32
#include <direct.h>
@@ -10,7 +10,7 @@
#include <dirent.h>
#endif
-#include "or/config.h"
+#include "app/config/config.h"
#include "test/test.h"
#ifdef HAVE_SYS_STAT_H
diff --git a/src/test/test_circuitbuild.c b/src/test/test_circuitbuild.c
index c09133c549..02eadecd98 100644
--- a/src/test/test_circuitbuild.c
+++ b/src/test/test_circuitbuild.c
@@ -5,15 +5,15 @@
#define CIRCUITBUILD_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
-#include "or/config.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
+#include "app/config/config.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
-#include "or/extend_info_st.h"
+#include "core/or/extend_info_st.h"
/* Dummy nodes smartlist for testing */
static smartlist_t dummy_nodes;
diff --git a/src/test/test_circuitlist.c b/src/test/test_circuitlist.c
index 4aa7c596ee..8dd7f5f5a9 100644
--- a/src/test/test_circuitlist.c
+++ b/src/test/test_circuitlist.c
@@ -5,17 +5,17 @@
#define CIRCUITBUILD_PRIVATE
#define CIRCUITLIST_PRIVATE
#define HS_CIRCUITMAP_PRIVATE
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuitmux_ewma.h"
-#include "or/hs_circuitmap.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitmux_ewma.h"
+#include "feature/hs/hs_circuitmap.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
#include "lib/container/bitarray.h"
diff --git a/src/test/test_circuitmux.c b/src/test/test_circuitmux.c
index c2fd1ae68a..1d46f8de0d 100644
--- a/src/test/test_circuitmux.c
+++ b/src/test/test_circuitmux.c
@@ -5,15 +5,15 @@
#define CIRCUITMUX_PRIVATE
#define CIRCUITMUX_EWMA_PRIVATE
#define RELAY_PRIVATE
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/circuitmux.h"
-#include "or/circuitmux_ewma.h"
-#include "or/relay.h"
-#include "or/scheduler.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/circuitmux.h"
+#include "core/or/circuitmux_ewma.h"
+#include "core/or/relay.h"
+#include "core/or/scheduler.h"
#include "test/test.h"
-#include "or/destroy_cell_queue_st.h"
+#include "core/or/destroy_cell_queue_st.h"
/* XXXX duplicated function from test_circuitlist.c */
static channel_t *
diff --git a/src/test/test_circuitstats.c b/src/test/test_circuitstats.c
index 94ba6ed448..c3cfad88da 100644
--- a/src/test/test_circuitstats.c
+++ b/src/test/test_circuitstats.c
@@ -6,21 +6,21 @@
#define CIRCUITLIST_PRIVATE
#define CHANNEL_PRIVATE_
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
-#include "or/config.h"
-#include "or/circuitlist.h"
-#include "or/circuitbuild.h"
-#include "or/circuitstats.h"
-#include "or/circuituse.h"
-#include "or/channel.h"
-
-#include "or/cpath_build_state_st.h"
-#include "or/crypt_path_st.h"
-#include "or/extend_info_st.h"
-#include "or/origin_circuit_st.h"
+#include "app/config/config.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitstats.h"
+#include "core/or/circuituse.h"
+#include "core/or/channel.h"
+
+#include "core/or/cpath_build_state_st.h"
+#include "core/or/crypt_path_st.h"
+#include "core/or/extend_info_st.h"
+#include "core/or/origin_circuit_st.h"
void test_circuitstats_timeout(void *arg);
void test_circuitstats_hoplen(void *arg);
diff --git a/src/test/test_circuituse.c b/src/test/test_circuituse.c
index 2524e43c68..720adeac84 100644
--- a/src/test/test_circuituse.c
+++ b/src/test/test_circuituse.c
@@ -5,17 +5,17 @@
#define CIRCUITLIST_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#include "test/test_helpers.h"
-#include "or/config.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/circuitbuild.h"
-#include "or/nodelist.h"
-
-#include "or/cpath_build_state_st.h"
-#include "or/origin_circuit_st.h"
+#include "app/config/config.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "core/or/circuitbuild.h"
+#include "feature/nodelist/nodelist.h"
+
+#include "core/or/cpath_build_state_st.h"
+#include "core/or/origin_circuit_st.h"
static void
test_circuit_is_available_for_use_ret_false_when_marked_for_close(void *arg)
diff --git a/src/test/test_compat_libevent.c b/src/test/test_compat_libevent.c
index 1262a3140e..3f505d013b 100644
--- a/src/test/test_compat_libevent.c
+++ b/src/test/test_compat_libevent.c
@@ -3,7 +3,7 @@
#define COMPAT_LIBEVENT_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
diff --git a/src/test/test_config.c b/src/test/test_config.c
index c7623d0c85..f7d3a6fbb2 100644
--- a/src/test/test_config.c
+++ b/src/test/test_config.c
@@ -8,44 +8,44 @@
#define CONFIG_PRIVATE
#define PT_PRIVATE
#define ROUTERSET_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/net/address.h"
-#include "or/addressmap.h"
-#include "or/bridges.h"
-#include "or/circuitmux_ewma.h"
-#include "or/circuitbuild.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
+#include "feature/client/addressmap.h"
+#include "feature/client/bridges.h"
+#include "core/or/circuitmux_ewma.h"
+#include "core/or/circuitbuild.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
#include "test/test.h"
-#include "or/connection_or.h"
-#include "or/control.h"
-#include "or/cpuworker.h"
-#include "or/dirserv.h"
-#include "or/dirauth/dirvote.h"
-#include "or/dns.h"
-#include "or/entrynodes.h"
-#include "or/transports.h"
-#include "or/ext_orport.h"
-#include "or/geoip.h"
-#include "or/hibernate.h"
-#include "or/main.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/rendclient.h"
-#include "or/rendservice.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerset.h"
-#include "or/statefile.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
+#include "core/mainloop/cpuworker.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/relay/dns.h"
+#include "feature/client/entrynodes.h"
+#include "feature/client/transports.h"
+#include "feature/relay/ext_orport.h"
+#include "feature/stats/geoip.h"
+#include "feature/hibernate/hibernate.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/policies.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendservice.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerset.h"
+#include "app/config/statefile.h"
#include "test/test_helpers.h"
-#include "or/dir_server_st.h"
-#include "or/port_cfg_st.h"
-#include "or/routerinfo_st.h"
+#include "feature/dirclient/dir_server_st.h"
+#include "core/or/port_cfg_st.h"
+#include "feature/nodelist/routerinfo_st.h"
#include "lib/fs/conffile.h"
#include "lib/meminfo/meminfo.h"
diff --git a/src/test/test_connection.c b/src/test/test_connection.c
index 674e2284e6..c423c6573f 100644
--- a/src/test/test_connection.c
+++ b/src/test/test_connection.c
@@ -7,29 +7,29 @@
#define MAIN_PRIVATE
#define CONNECTION_OR_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/hs_common.h"
-#include "or/main.h"
-#include "or/microdesc.h"
-#include "or/nodelist.h"
-#include "or/networkstatus.h"
-#include "or/rendcache.h"
-#include "or/directory.h"
-#include "or/connection_or.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "feature/hs/hs_common.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/rend/rendcache.h"
+#include "feature/dircache/directory.h"
+#include "core/or/connection_or.h"
#include "test/test_connection.h"
#include "test/test_helpers.h"
-#include "or/dir_connection_st.h"
-#include "or/entry_connection_st.h"
-#include "or/node_st.h"
-#include "or/or_connection_st.h"
-#include "or/routerinfo_st.h"
-#include "or/socks_request_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "core/or/entry_connection_st.h"
+#include "feature/nodelist/node_st.h"
+#include "core/or/or_connection_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "core/or/socks_request_st.h"
static void * test_conn_get_basic_setup(const struct testcase_t *tc);
static int test_conn_get_basic_teardown(const struct testcase_t *tc,
diff --git a/src/test/test_conscache.c b/src/test/test_conscache.c
index 3d3a50297b..b5cbd72515 100644
--- a/src/test/test_conscache.c
+++ b/src/test/test_conscache.c
@@ -1,9 +1,9 @@
/* Copyright (c) 2017-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
-#include "or/config.h"
-#include "or/conscache.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "feature/dircache/conscache.h"
#include "lib/encoding/confline.h"
#include "test/test.h"
diff --git a/src/test/test_consdiff.c b/src/test/test_consdiff.c
index 38947a225b..b836befd22 100644
--- a/src/test/test_consdiff.c
+++ b/src/test/test_consdiff.c
@@ -4,10 +4,10 @@
#define CONSDIFF_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
-#include "or/consdiff.h"
+#include "feature/dircommon/consdiff.h"
#include "lib/memarea/memarea.h"
#include "test/log_test_helpers.h"
diff --git a/src/test/test_consdiffmgr.c b/src/test/test_consdiffmgr.c
index 959075903f..6c0601b504 100644
--- a/src/test/test_consdiffmgr.c
+++ b/src/test/test_consdiffmgr.c
@@ -3,20 +3,20 @@
#define CONSDIFFMGR_PRIVATE
-#include "or/or.h"
-#include "or/config.h"
-#include "or/conscache.h"
-#include "or/consdiff.h"
-#include "or/consdiffmgr.h"
-#include "or/cpuworker.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "feature/dircache/conscache.h"
+#include "feature/dircommon/consdiff.h"
+#include "feature/dircache/consdiffmgr.h"
+#include "core/mainloop/cpuworker.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/networkstatus.h"
-#include "or/routerparse.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/routerparse.h"
#include "lib/evloop/workqueue.h"
#include "lib/compress/compress.h"
#include "lib/encoding/confline.h"
-#include "or/networkstatus_st.h"
+#include "feature/nodelist/networkstatus_st.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
diff --git a/src/test/test_containers.c b/src/test/test_containers.c
index 5c712a9b16..717eb0892a 100644
--- a/src/test/test_containers.c
+++ b/src/test/test_containers.c
@@ -4,9 +4,9 @@
/* See LICENSE for licensing information */
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/fp_pair.h"
+#include "feature/dircommon/fp_pair.h"
#include "test/test.h"
#include "lib/container/bitarray.h"
diff --git a/src/test/test_controller.c b/src/test/test_controller.c
index 54c2e0a2ec..2ded04619c 100644
--- a/src/test/test_controller.c
+++ b/src/test/test_controller.c
@@ -2,23 +2,23 @@
/* See LICENSE for licensing information */
#define CONTROL_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/crypt_ops/crypto_ed25519.h"
-#include "or/bridges.h"
-#include "or/control.h"
-#include "or/entrynodes.h"
-#include "or/hs_common.h"
-#include "or/networkstatus.h"
-#include "or/rendservice.h"
-#include "or/routerlist.h"
-#include "or/nodelist.h"
+#include "feature/client/bridges.h"
+#include "feature/control/control.h"
+#include "feature/client/entrynodes.h"
+#include "feature/hs/hs_common.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/rend/rendservice.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/nodelist.h"
#include "test/test.h"
#include "test/test_helpers.h"
-#include "or/control_connection_st.h"
-#include "or/download_status_st.h"
-#include "or/microdesc_st.h"
-#include "or/node_st.h"
+#include "feature/control/control_connection_st.h"
+#include "feature/dirclient/download_status_st.h"
+#include "feature/nodelist/microdesc_st.h"
+#include "feature/nodelist/node_st.h"
static void
test_add_onion_helper_keyarg_v3(void *arg)
diff --git a/src/test/test_controller_events.c b/src/test/test_controller_events.c
index 33a45a99cc..e935b70428 100644
--- a/src/test/test_controller_events.c
+++ b/src/test/test_controller_events.c
@@ -4,16 +4,16 @@
#define CONNECTION_PRIVATE
#define TOR_CHANNEL_INTERNAL_
#define CONTROL_PRIVATE
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/circuitlist.h"
-#include "or/connection.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/or/circuitlist.h"
+#include "core/mainloop/connection.h"
+#include "feature/control/control.h"
#include "test/test.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
static void
add_testing_cell_stats_entry(circuit_t *circ, uint8_t command,
diff --git a/src/test/test_crypto.c b/src/test/test_crypto.c
index 2e38dfc279..2124e22196 100644
--- a/src/test/test_crypto.c
+++ b/src/test/test_crypto.c
@@ -6,7 +6,7 @@
#include "orconfig.h"
#define CRYPTO_CURVE25519_PRIVATE
#define CRYPTO_RAND_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#include "lib/crypt_ops/aes.h"
#include "siphash.h"
diff --git a/src/test/test_crypto_slow.c b/src/test/test_crypto_slow.c
index 7c1dfa0a93..88b31ad9af 100644
--- a/src/test/test_crypto_slow.c
+++ b/src/test/test_crypto_slow.c
@@ -5,7 +5,7 @@
#include "orconfig.h"
#define CRYPTO_S2K_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#include "lib/crypt_ops/crypto_curve25519.h"
#include "lib/crypt_ops/crypto_ed25519.h"
diff --git a/src/test/test_dir.c b/src/test/test_dir.c
index a86b2a9f67..bda56b3a8e 100644
--- a/src/test/test_dir.c
+++ b/src/test/test_dir.c
@@ -17,51 +17,51 @@
#define NETWORKSTATUS_PRIVATE
#define RELAY_PRIVATE
-#include "or/or.h"
-#include "or/bridges.h"
-#include "or/connection.h"
-#include "or/confparse.h"
-#include "or/config.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "feature/client/bridges.h"
+#include "core/mainloop/connection.h"
+#include "app/config/confparse.h"
+#include "app/config/config.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_ed25519.h"
#include "lib/crypt_ops/crypto_format.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/directory.h"
-#include "or/dirserv.h"
-#include "or/dirauth/dirvote.h"
-#include "or/entrynodes.h"
-#include "or/fp_pair.h"
-#include "or/hibernate.h"
+#include "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/client/entrynodes.h"
+#include "feature/dircommon/fp_pair.h"
+#include "feature/hibernate/hibernate.h"
#include "lib/memarea/memarea.h"
#include "lib/osinfo/uname.h"
-#include "or/networkstatus.h"
-#include "or/router.h"
-#include "or/routerkeys.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/routerset.h"
-#include "or/dirauth/shared_random_state.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/routerset.h"
+#include "feature/dirauth/shared_random_state.h"
#include "test/test.h"
#include "test/test_dir_common.h"
-#include "or/torcert.h"
-#include "or/relay.h"
+#include "feature/nodelist/torcert.h"
+#include "core/or/relay.h"
#include "test/log_test_helpers.h"
-#include "or/voting_schedule.h"
+#include "feature/dircommon/voting_schedule.h"
#include "lib/compress/compress.h"
-#include "or/addr_policy_st.h"
-#include "or/authority_cert_st.h"
-#include "or/document_signature_st.h"
-#include "or/extrainfo_st.h"
-#include "or/networkstatus_st.h"
-#include "or/networkstatus_voter_info_st.h"
-#include "or/ns_detached_signatures_st.h"
-#include "or/port_cfg_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerlist_st.h"
-#include "or/tor_version_st.h"
-#include "or/vote_microdesc_hash_st.h"
-#include "or/vote_routerstatus_st.h"
+#include "core/or/addr_policy_st.h"
+#include "feature/nodelist/authority_cert_st.h"
+#include "feature/nodelist/document_signature_st.h"
+#include "feature/nodelist/extrainfo_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/networkstatus_voter_info_st.h"
+#include "feature/dirauth/ns_detached_signatures_st.h"
+#include "core/or/port_cfg_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerlist_st.h"
+#include "core/or/tor_version_st.h"
+#include "feature/dirauth/vote_microdesc_hash_st.h"
+#include "feature/nodelist/vote_routerstatus_st.h"
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
diff --git a/src/test/test_dir_common.c b/src/test/test_dir_common.c
index a758421cde..e65e2b0111 100644
--- a/src/test/test_dir_common.c
+++ b/src/test/test_dir_common.c
@@ -6,19 +6,19 @@
#include "orconfig.h"
#define DIRVOTE_PRIVATE
#include "test/test.h"
-#include "or/or.h"
-#include "or/dirauth/dirvote.h"
-#include "or/nodelist.h"
-#include "or/routerlist.h"
+#include "core/or/or.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/routerlist.h"
#include "test/test_dir_common.h"
-#include "or/voting_schedule.h"
+#include "feature/dircommon/voting_schedule.h"
-#include "or/authority_cert_st.h"
-#include "or/networkstatus_st.h"
-#include "or/networkstatus_voter_info_st.h"
-#include "or/routerinfo_st.h"
-#include "or/vote_microdesc_hash_st.h"
-#include "or/vote_routerstatus_st.h"
+#include "feature/nodelist/authority_cert_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/networkstatus_voter_info_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/dirauth/vote_microdesc_hash_st.h"
+#include "feature/nodelist/vote_routerstatus_st.h"
void dir_common_setup_vote(networkstatus_t **vote, time_t now);
networkstatus_t * dir_common_add_rs_and_parse(networkstatus_t *vote,
diff --git a/src/test/test_dir_common.h b/src/test/test_dir_common.h
index 7d5f55afe6..1e90228edb 100644
--- a/src/test/test_dir_common.h
+++ b/src/test/test_dir_common.h
@@ -3,9 +3,9 @@
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
-#include "or/networkstatus.h"
-#include "or/routerparse.h"
+#include "core/or/or.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/routerparse.h"
#define TEST_DIR_ROUTER_ID_1 3
#define TEST_DIR_ROUTER_ID_2 5
diff --git a/src/test/test_dir_handle_get.c b/src/test/test_dir_handle_get.c
index 90ca7d357c..571b0386e2 100644
--- a/src/test/test_dir_handle_get.c
+++ b/src/test/test_dir_handle_get.c
@@ -9,37 +9,37 @@
#define CONFIG_PRIVATE
#define RENDCACHE_PRIVATE
-#include "or/or.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/consdiffmgr.h"
-#include "or/directory.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "feature/dircache/consdiffmgr.h"
+#include "feature/dircache/directory.h"
#include "test/test.h"
#include "lib/compress/compress.h"
-#include "or/rendcommon.h"
-#include "or/rendcache.h"
-#include "or/router.h"
-#include "or/routerlist.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendcache.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
#include "test/rend_test_helpers.h"
-#include "or/microdesc.h"
+#include "feature/nodelist/microdesc.h"
#include "test/test_helpers.h"
-#include "or/nodelist.h"
-#include "or/entrynodes.h"
-#include "or/routerparse.h"
-#include "or/networkstatus.h"
-#include "or/proto_http.h"
-#include "or/geoip.h"
-#include "or/dirserv.h"
-#include "or/dirauth/dirvote.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/client/entrynodes.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/networkstatus.h"
+#include "core/proto/proto_http.h"
+#include "feature/stats/geoip.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/dirauth/dirvote.h"
#include "test/log_test_helpers.h"
-#include "or/voting_schedule.h"
-
-#include "or/dir_connection_st.h"
-#include "or/dir_server_st.h"
-#include "or/networkstatus_st.h"
-#include "or/rend_encoded_v2_service_descriptor_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerlist_st.h"
+#include "feature/dircommon/voting_schedule.h"
+
+#include "feature/dircommon/dir_connection_st.h"
+#include "feature/dirclient/dir_server_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/rend/rend_encoded_v2_service_descriptor_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerlist_st.h"
#ifdef _WIN32
/* For mkdir() */
diff --git a/src/test/test_dns.c b/src/test/test_dns.c
index 1407a5c47e..8369f844f6 100644
--- a/src/test/test_dns.c
+++ b/src/test/test_dns.c
@@ -1,18 +1,18 @@
/* Copyright (c) 2015-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#define DNS_PRIVATE
-#include "or/dns.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/router.h"
+#include "feature/relay/dns.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "feature/relay/router.h"
-#include "or/edge_connection_st.h"
-#include "or/or_circuit_st.h"
+#include "core/or/edge_connection_st.h"
+#include "core/or/or_circuit_st.h"
#define NS_MODULE dns
diff --git a/src/test/test_dos.c b/src/test/test_dos.c
index 4ba24292ca..b411e7b38a 100644
--- a/src/test/test_dos.c
+++ b/src/test/test_dos.c
@@ -5,20 +5,20 @@
#define TOR_CHANNEL_INTERNAL_
#define CIRCUITLIST_PRIVATE
-#include "or/or.h"
-#include "or/dos.h"
-#include "or/circuitlist.h"
+#include "core/or/or.h"
+#include "core/or/dos.h"
+#include "core/or/circuitlist.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/geoip.h"
-#include "or/channel.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/routerlist.h"
-
-#include "or/networkstatus_st.h"
-#include "or/or_connection_st.h"
-#include "or/routerstatus_st.h"
+#include "feature/stats/geoip.h"
+#include "core/or/channel.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/routerlist.h"
+
+#include "feature/nodelist/networkstatus_st.h"
+#include "core/or/or_connection_st.h"
+#include "feature/nodelist/routerstatus_st.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
diff --git a/src/test/test_entryconn.c b/src/test/test_entryconn.c
index b23f12087e..bec70090e6 100644
--- a/src/test/test_entryconn.c
+++ b/src/test/test_entryconn.c
@@ -6,21 +6,21 @@
#define CONNECTION_PRIVATE
#define CONNECTION_EDGE_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
-#include "or/addressmap.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/nodelist.h"
+#include "feature/client/addressmap.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "feature/nodelist/nodelist.h"
-#include "or/hs_cache.h"
-#include "or/rendcache.h"
+#include "feature/hs/hs_cache.h"
+#include "feature/rend/rendcache.h"
-#include "or/entry_connection_st.h"
-#include "or/socks_request_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/socks_request_st.h"
#include "lib/encoding/confline.h"
diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c
index 9c35cdaaf2..cafdeb6863 100644
--- a/src/test/test_entrynodes.c
+++ b/src/test/test_entrynodes.c
@@ -10,35 +10,35 @@
#define ROUTERLIST_PRIVATE
#define DIRECTORY_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
-#include "or/bridges.h"
-#include "or/circuitlist.h"
-#include "or/circuitbuild.h"
-#include "or/config.h"
-#include "or/confparse.h"
+#include "feature/client/bridges.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitbuild.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/directory.h"
-#include "or/entrynodes.h"
-#include "or/nodelist.h"
-#include "or/networkstatus.h"
-#include "or/policies.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/routerset.h"
-#include "or/statefile.h"
-
-#include "or/cpath_build_state_st.h"
-#include "or/crypt_path_st.h"
-#include "or/dir_connection_st.h"
-#include "or/microdesc_st.h"
-#include "or/networkstatus_st.h"
-#include "or/node_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/or_state_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerstatus_st.h"
+#include "feature/dircache/directory.h"
+#include "feature/client/entrynodes.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/networkstatus.h"
+#include "core/or/policies.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/routerset.h"
+#include "app/config/statefile.h"
+
+#include "core/or/cpath_build_state_st.h"
+#include "core/or/crypt_path_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "feature/nodelist/microdesc_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/node_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "app/config/or_state_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerstatus_st.h"
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
diff --git a/src/test/test_extorport.c b/src/test/test_extorport.c
index 4ddef4e43b..ff987563c6 100644
--- a/src/test/test_extorport.c
+++ b/src/test/test_extorport.c
@@ -4,17 +4,17 @@
#define CONNECTION_PRIVATE
#define EXT_ORPORT_PRIVATE
#define MAIN_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/container/buffers.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
-#include "or/config.h"
-#include "or/control.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
+#include "app/config/config.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/ext_orport.h"
-#include "or/main.h"
+#include "feature/relay/ext_orport.h"
+#include "core/mainloop/main.h"
-#include "or/or_connection_st.h"
+#include "core/or/or_connection_st.h"
#include "test/test.h"
diff --git a/src/test/test_geoip.c b/src/test/test_geoip.c
index 9aa46786ed..9df8ea7988 100644
--- a/src/test/test_geoip.c
+++ b/src/test/test_geoip.c
@@ -8,9 +8,9 @@
/* These macros pull in declarations for some functions and structures that
* are typically file-private. */
#define GEOIP_PRIVATE
-#include "or/or.h"
-#include "or/config.h"
-#include "or/geoip.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "feature/stats/geoip.h"
#include "test/test.h"
/* Record odd numbered fake-IPs using ipv6, even numbered fake-IPs
diff --git a/src/test/test_guardfraction.c b/src/test/test_guardfraction.c
index 3c293e378b..f45a723295 100644
--- a/src/test/test_guardfraction.c
+++ b/src/test/test_guardfraction.c
@@ -6,16 +6,16 @@
#define NETWORKSTATUS_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
-#include "or/config.h"
-#include "or/dirserv.h"
-#include "or/entrynodes.h"
-#include "or/routerparse.h"
-#include "or/networkstatus.h"
-
-#include "or/networkstatus_st.h"
-#include "or/vote_microdesc_hash_st.h"
-#include "or/vote_routerstatus_st.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/client/entrynodes.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/networkstatus.h"
+
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/dirauth/vote_microdesc_hash_st.h"
+#include "feature/nodelist/vote_routerstatus_st.h"
#include "test/test.h"
#include "test/test_helpers.h"
diff --git a/src/test/test_helpers.c b/src/test/test_helpers.c
index 6d410af526..c666bca59a 100644
--- a/src/test/test_helpers.c
+++ b/src/test/test_helpers.c
@@ -12,24 +12,24 @@
#define MAIN_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/container/buffers.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/connection.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "core/mainloop/connection.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/main.h"
-#include "or/nodelist.h"
-#include "or/relay.h"
-#include "or/routerlist.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/relay.h"
+#include "feature/nodelist/routerlist.h"
#include "lib/encoding/confline.h"
-#include "or/cell_st.h"
-#include "or/connection_st.h"
-#include "or/node_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/routerlist_st.h"
+#include "core/or/cell_st.h"
+#include "core/or/connection_st.h"
+#include "feature/nodelist/node_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "feature/nodelist/routerlist_st.h"
#include "test/test.h"
#include "test/test_helpers.h"
@@ -41,7 +41,7 @@ DISABLE_GCC_WARNING(overlength-strings)
* at large. */
#endif
#include "test_descriptors.inc"
-#include "or/circuitlist.h"
+#include "core/or/circuitlist.h"
#ifdef HAVE_CFLAG_WOVERLENGTH_STRINGS
ENABLE_GCC_WARNING(overlength-strings)
#endif
diff --git a/src/test/test_helpers.h b/src/test/test_helpers.h
index c6339d97fa..3196c93e6b 100644
--- a/src/test/test_helpers.h
+++ b/src/test/test_helpers.h
@@ -4,7 +4,7 @@
#ifndef TOR_TEST_HELPERS_H
#define TOR_TEST_HELPERS_H
-#include "or/or.h"
+#include "core/or/or.h"
const char *get_yesterday_date_str(void);
diff --git a/src/test/test_hs.c b/src/test/test_hs.c
index b17e8cf21f..135df8e9f3 100644
--- a/src/test/test_hs.c
+++ b/src/test/test_hs.c
@@ -12,21 +12,21 @@
#define RENDSERVICE_PRIVATE
#define HS_SERVICE_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
-#include "or/control.h"
-#include "or/config.h"
-#include "or/hs_common.h"
-#include "or/rendcommon.h"
-#include "or/rendservice.h"
-#include "or/routerlist.h"
-#include "or/routerset.h"
-#include "or/circuitbuild.h"
-
-#include "or/node_st.h"
-#include "or/rend_encoded_v2_service_descriptor_st.h"
-#include "or/rend_intro_point_st.h"
-#include "or/routerinfo_st.h"
+#include "feature/control/control.h"
+#include "app/config/config.h"
+#include "feature/hs/hs_common.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendservice.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerset.h"
+#include "core/or/circuitbuild.h"
+
+#include "feature/nodelist/node_st.h"
+#include "feature/rend/rend_encoded_v2_service_descriptor_st.h"
+#include "feature/rend/rend_intro_point_st.h"
+#include "feature/nodelist/routerinfo_st.h"
#include "test/test_helpers.h"
diff --git a/src/test/test_hs_cache.c b/src/test/test_hs_cache.c
index c22cc46386..c1a69af829 100644
--- a/src/test/test_hs_cache.c
+++ b/src/test/test_hs_cache.c
@@ -11,16 +11,16 @@
#define HS_CACHE_PRIVATE
#include "trunnel/ed25519_cert.h"
-#include "or/hs_cache.h"
-#include "or/rendcache.h"
-#include "or/directory.h"
-#include "or/networkstatus.h"
-#include "or/connection.h"
-#include "or/proto_http.h"
+#include "feature/hs/hs_cache.h"
+#include "feature/rend/rendcache.h"
+#include "feature/dircache/directory.h"
+#include "feature/nodelist/networkstatus.h"
+#include "core/mainloop/connection.h"
+#include "core/proto/proto_http.h"
#include "lib/crypt_ops/crypto_format.h"
-#include "or/dir_connection_st.h"
-#include "or/networkstatus_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "feature/nodelist/networkstatus_st.h"
#include "test/hs_test_helpers.h"
#include "test/test_helpers.h"
diff --git a/src/test/test_hs_cell.c b/src/test/test_hs_cell.c
index 4bb3c3f77d..b47929e8eb 100644
--- a/src/test/test_hs_cell.c
+++ b/src/test/test_hs_cell.c
@@ -15,9 +15,9 @@
#include "lib/crypt_ops/crypto_ed25519.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/hs_cell.h"
-#include "or/hs_intropoint.h"
-#include "or/hs_service.h"
+#include "feature/hs/hs_cell.h"
+#include "feature/hs/hs_intropoint.h"
+#include "feature/hs/hs_service.h"
/* Trunnel. */
#include "trunnel/hs/cell_establish_intro.h"
diff --git a/src/test/test_hs_client.c b/src/test/test_hs_client.c
index 1458c358d2..57da03ca28 100644
--- a/src/test/test_hs_client.c
+++ b/src/test/test_hs_client.c
@@ -20,34 +20,34 @@
#include "test/rend_test_helpers.h"
#include "test/hs_test_helpers.h"
-#include "or/config.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto.h"
#include "lib/crypt_ops/crypto_dh.h"
-#include "or/channeltls.h"
-#include "or/directory.h"
-#include "or/main.h"
-#include "or/nodelist.h"
-#include "or/routerset.h"
-
-#include "or/hs_circuit.h"
-#include "or/hs_circuitmap.h"
-#include "or/hs_client.h"
-#include "or/hs_ident.h"
-#include "or/hs_cache.h"
-#include "or/circuitlist.h"
-#include "or/circuitbuild.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/networkstatus.h"
-
-#include "or/cpath_build_state_st.h"
-#include "or/crypt_path_st.h"
-#include "or/dir_connection_st.h"
-#include "or/entry_connection_st.h"
-#include "or/extend_info_st.h"
-#include "or/networkstatus_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/socks_request_st.h"
+#include "core/or/channeltls.h"
+#include "feature/dircache/directory.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/routerset.h"
+
+#include "feature/hs/hs_circuit.h"
+#include "feature/hs/hs_circuitmap.h"
+#include "feature/hs/hs_client.h"
+#include "feature/hs/hs_ident.h"
+#include "feature/hs/hs_cache.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitbuild.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "feature/nodelist/networkstatus.h"
+
+#include "core/or/cpath_build_state_st.h"
+#include "core/or/crypt_path_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/extend_info_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "core/or/socks_request_st.h"
static int
mock_connection_ap_handshake_send_begin(entry_connection_t *ap_conn)
diff --git a/src/test/test_hs_common.c b/src/test/test_hs_common.c
index 4c39570e30..f17cc8aeb3 100644
--- a/src/test/test_hs_common.c
+++ b/src/test/test_hs_common.c
@@ -16,29 +16,29 @@
#include "test/log_test_helpers.h"
#include "test/hs_test_helpers.h"
-#include "or/connection_edge.h"
+#include "core/or/connection_edge.h"
#include "lib/crypt_ops/crypto_format.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/hs_common.h"
-#include "or/hs_client.h"
-#include "or/hs_service.h"
-#include "or/config.h"
-#include "or/networkstatus.h"
-#include "or/directory.h"
-#include "or/dirauth/dirvote.h"
-#include "or/nodelist.h"
-#include "or/routerlist.h"
-#include "or/statefile.h"
-#include "or/circuitlist.h"
-#include "or/dirauth/shared_random.h"
-#include "or/voting_schedule.h"
-
-#include "or/microdesc_st.h"
-#include "or/networkstatus_st.h"
-#include "or/node_st.h"
-#include "or/or_state_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerstatus_st.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_client.h"
+#include "feature/hs/hs_service.h"
+#include "app/config/config.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/dircache/directory.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/routerlist.h"
+#include "app/config/statefile.h"
+#include "core/or/circuitlist.h"
+#include "feature/dirauth/shared_random.h"
+#include "feature/dircommon/voting_schedule.h"
+
+#include "feature/nodelist/microdesc_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/node_st.h"
+#include "app/config/or_state_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerstatus_st.h"
/** Test the validation of HS v3 addresses */
static void
diff --git a/src/test/test_hs_config.c b/src/test/test_hs_config.c
index 33ad09313c..498d2df197 100644
--- a/src/test/test_hs_config.c
+++ b/src/test/test_hs_config.c
@@ -13,11 +13,11 @@
#include "test/test_helpers.h"
#include "test/log_test_helpers.h"
-#include "or/config.h"
-#include "or/hs_common.h"
-#include "or/hs_config.h"
-#include "or/hs_service.h"
-#include "or/rendservice.h"
+#include "app/config/config.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_config.h"
+#include "feature/hs/hs_service.h"
+#include "feature/rend/rendservice.h"
static int
helper_config_service(const char *conf, int validate_only)
diff --git a/src/test/test_hs_control.c b/src/test/test_hs_control.c
index 6e5e783372..48402030bf 100644
--- a/src/test/test_hs_control.c
+++ b/src/test/test_hs_control.c
@@ -8,16 +8,16 @@
#define CONTROL_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
-#include "or/control.h"
-#include "or/config.h"
-#include "or/hs_common.h"
-#include "or/hs_control.h"
-#include "or/nodelist.h"
-
-#include "or/node_st.h"
-#include "or/routerstatus_st.h"
+#include "feature/control/control.h"
+#include "app/config/config.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_control.h"
+#include "feature/nodelist/nodelist.h"
+
+#include "feature/nodelist/node_st.h"
+#include "feature/nodelist/routerstatus_st.h"
#include "lib/crypt_ops/crypto_format.h"
#include "test/test_helpers.h"
diff --git a/src/test/test_hs_descriptor.c b/src/test/test_hs_descriptor.c
index a017facd2c..9a7e66eaea 100644
--- a/src/test/test_hs_descriptor.c
+++ b/src/test/test_hs_descriptor.c
@@ -13,10 +13,10 @@
#include "lib/crypt_ops/crypto_digest.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "trunnel/ed25519_cert.h"
-#include "or/or.h"
-#include "or/hs_descriptor.h"
+#include "core/or/or.h"
+#include "feature/hs/hs_descriptor.h"
#include "test/test.h"
-#include "or/torcert.h"
+#include "feature/nodelist/torcert.h"
#include "test/hs_test_helpers.h"
#include "test/test_helpers.h"
diff --git a/src/test/test_hs_intropoint.c b/src/test/test_hs_intropoint.c
index 2445a8fcf1..7da376471b 100644
--- a/src/test/test_hs_intropoint.c
+++ b/src/test/test_hs_intropoint.c
@@ -15,20 +15,20 @@
#include "test/log_test_helpers.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/or.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
+#include "core/or/or.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
#include "ht.h"
-#include "or/relay.h"
-#include "or/rendservice.h"
+#include "core/or/relay.h"
+#include "feature/rend/rendservice.h"
-#include "or/hs_cell.h"
-#include "or/hs_circuitmap.h"
-#include "or/hs_common.h"
-#include "or/hs_intropoint.h"
-#include "or/hs_service.h"
+#include "feature/hs/hs_cell.h"
+#include "feature/hs/hs_circuitmap.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_intropoint.h"
+#include "feature/hs/hs_service.h"
-#include "or/or_circuit_st.h"
+#include "core/or/or_circuit_st.h"
/* Trunnel. */
#include "trunnel/hs/cell_establish_intro.h"
diff --git a/src/test/test_hs_ntor.c b/src/test/test_hs_ntor.c
index c524409003..eeb0491657 100644
--- a/src/test/test_hs_ntor.c
+++ b/src/test/test_hs_ntor.c
@@ -12,7 +12,7 @@
#include "lib/crypt_ops/crypto_curve25519.h"
#include "lib/crypt_ops/crypto_ed25519.h"
-#include "or/hs_ntor.h"
+#include "core/crypto/hs_ntor.h"
/* Test the HS ntor handshake. Simulate the sending of an encrypted INTRODUCE1
* cell, and verify the proper derivation of decryption keys on the other end.
diff --git a/src/test/test_hs_ntor_cl.c b/src/test/test_hs_ntor_cl.c
index 8643897db5..03e34968be 100644
--- a/src/test/test_hs_ntor_cl.c
+++ b/src/test/test_hs_ntor_cl.c
@@ -13,13 +13,13 @@
#include <stdlib.h>
#define ONION_NTOR_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/crypt_ops/crypto.h"
#include "lib/crypt_ops/crypto_curve25519.h"
#include "lib/crypt_ops/crypto_ed25519.h"
#include "lib/crypt_ops/crypto_format.h"
-#include "or/hs_ntor.h"
-#include "or/onion_ntor.h"
+#include "core/crypto/hs_ntor.h"
+#include "core/crypto/onion_ntor.h"
#define N_ARGS(n) STMT_BEGIN { \
if (argc < (n)) { \
diff --git a/src/test/test_hs_service.c b/src/test/test_hs_service.c
index e81a5eff4f..8074d260a4 100644
--- a/src/test/test_hs_service.c
+++ b/src/test/test_hs_service.c
@@ -28,39 +28,39 @@
#include "test/rend_test_helpers.h"
#include "test/hs_test_helpers.h"
-#include "or/or.h"
-#include "or/config.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/dirauth/dirvote.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/relay.h"
-#include "or/routerparse.h"
-#include "or/hs_common.h"
-#include "or/hs_config.h"
-#include "or/hs_ident.h"
-#include "or/hs_intropoint.h"
-#include "or/hs_ntor.h"
-#include "or/hs_circuit.h"
-#include "or/hs_circuitmap.h"
-#include "or/hs_service.h"
-#include "or/hs_client.h"
-#include "or/main.h"
-#include "or/rendservice.h"
-#include "or/statefile.h"
-#include "or/dirauth/shared_random_state.h"
-#include "or/voting_schedule.h"
-
-#include "or/cpath_build_state_st.h"
-#include "or/crypt_path_st.h"
-#include "or/networkstatus_st.h"
-#include "or/node_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/or_state_st.h"
-#include "or/routerinfo_st.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/relay.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_config.h"
+#include "feature/hs/hs_ident.h"
+#include "feature/hs/hs_intropoint.h"
+#include "core/crypto/hs_ntor.h"
+#include "feature/hs/hs_circuit.h"
+#include "feature/hs/hs_circuitmap.h"
+#include "feature/hs/hs_service.h"
+#include "feature/hs/hs_client.h"
+#include "core/mainloop/main.h"
+#include "feature/rend/rendservice.h"
+#include "app/config/statefile.h"
+#include "feature/dirauth/shared_random_state.h"
+#include "feature/dircommon/voting_schedule.h"
+
+#include "core/or/cpath_build_state_st.h"
+#include "core/or/crypt_path_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/node_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "app/config/or_state_st.h"
+#include "feature/nodelist/routerinfo_st.h"
/* Trunnel */
#include "trunnel/hs/cell_establish_intro.h"
diff --git a/src/test/test_introduce.c b/src/test/test_introduce.c
index f62c7f8808..cdfb70bdff 100644
--- a/src/test/test_introduce.c
+++ b/src/test/test_introduce.c
@@ -3,11 +3,11 @@
#include "orconfig.h"
#include "lib/crypt_ops/crypto.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#define RENDSERVICE_PRIVATE
-#include "or/rendservice.h"
+#include "feature/rend/rendservice.h"
static uint8_t v0_test_plaintext[] =
/* 20 bytes of rendezvous point nickname */
diff --git a/src/test/test_keypin.c b/src/test/test_keypin.c
index e7897a8473..9af12ff548 100644
--- a/src/test/test_keypin.c
+++ b/src/test/test_keypin.c
@@ -3,8 +3,8 @@
#include "orconfig.h"
#define KEYPIN_PRIVATE
-#include "or/or.h"
-#include "or/keypin.h"
+#include "core/or/or.h"
+#include "feature/dirauth/keypin.h"
#include "test/test.h"
diff --git a/src/test/test_link_handshake.c b/src/test/test_link_handshake.c
index 515fdc50a7..e0d12fb472 100644
--- a/src/test/test_link_handshake.c
+++ b/src/test/test_link_handshake.c
@@ -8,21 +8,21 @@
#define TOR_CHANNEL_INTERNAL_
#define TORTLS_PRIVATE
-#include "or/or.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
-#include "or/channeltls.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
+#include "core/or/channeltls.h"
#include "trunnel/link_handshake.h"
-#include "or/router.h"
-#include "or/routerkeys.h"
-#include "or/scheduler.h"
-#include "or/torcert.h"
-
-#include "or/or_connection_st.h"
-#include "or/or_handshake_certs_st.h"
-#include "or/or_handshake_state_st.h"
-#include "or/var_cell_st.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
+#include "core/or/scheduler.h"
+#include "feature/nodelist/torcert.h"
+
+#include "core/or/or_connection_st.h"
+#include "core/or/or_handshake_certs_st.h"
+#include "core/or/or_handshake_state_st.h"
+#include "core/or/var_cell_st.h"
#include "lib/tls/tortls.h"
diff --git a/src/test/test_logging.c b/src/test/test_logging.c
index 48cdf2e6bc..2e3b8800ac 100644
--- a/src/test/test_logging.c
+++ b/src/test/test_logging.c
@@ -4,8 +4,8 @@
#define CONFIG_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
#include "lib/err/torerr.h"
#include "lib/log/torlog.h"
#include "test/test.h"
diff --git a/src/test/test_mainloop.c b/src/test/test_mainloop.c
index 469820b591..f85c224ae9 100644
--- a/src/test/test_mainloop.c
+++ b/src/test/test_mainloop.c
@@ -9,8 +9,8 @@
#include "test/test.h"
#include "test/log_test_helpers.h"
-#include "or/or.h"
-#include "or/main.h"
+#include "core/or/or.h"
+#include "core/mainloop/main.h"
static const uint64_t BILLION = 1000000000;
diff --git a/src/test/test_microdesc.c b/src/test/test_microdesc.c
index 2038f54984..ec4779ead1 100644
--- a/src/test/test_microdesc.c
+++ b/src/test/test_microdesc.c
@@ -2,21 +2,21 @@
/* See LICENSE for licensing information */
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
-#include "or/config.h"
+#include "app/config/config.h"
#define DIRVOTE_PRIVATE
-#include "or/dirauth/dirvote.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/torcert.h"
-
-#include "or/microdesc_st.h"
-#include "or/networkstatus_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerstatus_st.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/torcert.h"
+
+#include "feature/nodelist/microdesc_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerstatus_st.h"
#include "test/test.h"
diff --git a/src/test/test_nodelist.c b/src/test/test_nodelist.c
index 1dc8bc2d24..cdd5e95cf0 100644
--- a/src/test/test_nodelist.c
+++ b/src/test/test_nodelist.c
@@ -6,17 +6,17 @@
* \brief Unit tests for nodelist related functions.
**/
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/torcert.h"
-
-#include "or/microdesc_st.h"
-#include "or/networkstatus_st.h"
-#include "or/node_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerstatus_st.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/torcert.h"
+
+#include "feature/nodelist/microdesc_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/node_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerstatus_st.h"
#include "test/test.h"
diff --git a/src/test/test_ntor_cl.c b/src/test/test_ntor_cl.c
index 5711a9116a..744b42c9d9 100644
--- a/src/test/test_ntor_cl.c
+++ b/src/test/test_ntor_cl.c
@@ -6,10 +6,10 @@
#include <stdlib.h>
#define ONION_NTOR_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/crypt_ops/crypto.h"
#include "lib/crypt_ops/crypto_curve25519.h"
-#include "or/onion_ntor.h"
+#include "core/crypto/onion_ntor.h"
#define N_ARGS(n) STMT_BEGIN { \
if (argc < (n)) { \
diff --git a/src/test/test_oom.c b/src/test/test_oom.c
index 6c3ee1a27b..313a6b3114 100644
--- a/src/test/test_oom.c
+++ b/src/test/test_oom.c
@@ -7,21 +7,21 @@
#define BUFFERS_PRIVATE
#define CIRCUITLIST_PRIVATE
#define CONNECTION_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/container/buffers.h"
-#include "or/circuitlist.h"
+#include "core/or/circuitlist.h"
#include "lib/evloop/compat_libevent.h"
-#include "or/connection.h"
-#include "or/config.h"
+#include "core/mainloop/connection.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/relay.h"
+#include "core/or/relay.h"
#include "test/test.h"
#include "test/test_helpers.h"
-#include "or/cell_st.h"
-#include "or/entry_connection_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
+#include "core/or/cell_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
/* small replacement mock for circuit_mark_for_close_ to avoid doing all
* the other bookkeeping that comes with marking circuits. */
diff --git a/src/test/test_oos.c b/src/test/test_oos.c
index f101390d67..5f9942d8ae 100644
--- a/src/test/test_oos.c
+++ b/src/test/test_oos.c
@@ -5,16 +5,16 @@
#define CONNECTION_PRIVATE
-#include "or/or.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
-#include "or/directory.h"
-#include "or/main.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
+#include "feature/dircache/directory.h"
+#include "core/mainloop/main.h"
#include "test/test.h"
-#include "or/dir_connection_st.h"
-#include "or/or_connection_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "core/or/or_connection_st.h"
static or_options_t mock_options;
diff --git a/src/test/test_options.c b/src/test/test_options.c
index f2aaf30c23..396965401e 100644
--- a/src/test/test_options.c
+++ b/src/test/test_options.c
@@ -4,22 +4,22 @@
/* See LICENSE for licensing information */
#define CONFIG_PRIVATE
-#include "or/or.h"
-#include "or/confparse.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "app/config/confparse.h"
+#include "app/config/config.h"
#include "test/test.h"
-#include "or/geoip.h"
+#include "feature/stats/geoip.h"
#define ROUTERSET_PRIVATE
-#include "or/routerset.h"
-#include "or/main.h"
+#include "feature/nodelist/routerset.h"
+#include "core/mainloop/main.h"
#include "test/log_test_helpers.h"
#include "lib/sandbox/sandbox.h"
#include "lib/memarea/memarea.h"
#include "lib/osinfo/uname.h"
#include "lib/encoding/confline.h"
-#include "or/policies.h"
+#include "core/or/policies.h"
#include "test/test_helpers.h"
#define NS_MODULE test_options
diff --git a/src/test/test_periodic_event.c b/src/test/test_periodic_event.c
index b353cf87a3..03ba3df793 100644
--- a/src/test/test_periodic_event.c
+++ b/src/test/test_periodic_event.c
@@ -14,12 +14,12 @@
#include "test/test.h"
#include "test/test_helpers.h"
-#include "or/or.h"
-#include "or/config.h"
-#include "or/hibernate.h"
-#include "or/hs_service.h"
-#include "or/main.h"
-#include "or/periodic.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "feature/hibernate/hibernate.h"
+#include "feature/hs/hs_service.h"
+#include "core/mainloop/main.h"
+#include "core/mainloop/periodic.h"
/** Helper function: This is replaced in some tests for the event callbacks so
* we don't actually go into the code path of those callbacks. */
diff --git a/src/test/test_policy.c b/src/test/test_policy.c
index a6906af41f..4b1adc91f0 100644
--- a/src/test/test_policy.c
+++ b/src/test/test_policy.c
@@ -1,21 +1,21 @@
/* Copyright (c) 2013-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
+#include "core/or/or.h"
#define CONFIG_PRIVATE
-#include "or/config.h"
-#include "or/router.h"
-#include "or/routerparse.h"
+#include "app/config/config.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerparse.h"
#define POLICIES_PRIVATE
-#include "or/policies.h"
+#include "core/or/policies.h"
#include "lib/encoding/confline.h"
#include "test/test.h"
-#include "or/addr_policy_st.h"
-#include "or/node_st.h"
-#include "or/port_cfg_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerstatus_st.h"
+#include "core/or/addr_policy_st.h"
+#include "feature/nodelist/node_st.h"
+#include "core/or/port_cfg_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerstatus_st.h"
/* Helper: assert that short_policy parses and writes back out as itself,
or as <b>expected</b> if that's provided. */
diff --git a/src/test/test_procmon.c b/src/test/test_procmon.c
index e2915d0fb4..2c7918f580 100644
--- a/src/test/test_procmon.c
+++ b/src/test/test_procmon.c
@@ -3,7 +3,7 @@
#define PROCMON_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#include "lib/evloop/procmon.h"
diff --git a/src/test/test_proto_http.c b/src/test/test_proto_http.c
index 57bfe24633..1cfa0a752c 100644
--- a/src/test/test_proto_http.c
+++ b/src/test/test_proto_http.c
@@ -6,10 +6,10 @@
* \brief Tests for our HTTP protocol parser code
*/
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#include "lib/container/buffers.h"
-#include "or/proto_http.h"
+#include "core/proto/proto_http.h"
#include "test/log_test_helpers.h"
#define S(str) str, sizeof(str)-1
diff --git a/src/test/test_proto_misc.c b/src/test/test_proto_misc.c
index 7f066e14ad..1fcb763421 100644
--- a/src/test/test_proto_misc.c
+++ b/src/test/test_proto_misc.c
@@ -6,16 +6,16 @@
* \brief Test our smaller buffer-based protocol functions
*/
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#include "lib/container/buffers.h"
-#include "or/connection_or.h"
-#include "or/ext_orport.h"
-#include "or/proto_cell.h"
-#include "or/proto_control0.h"
-#include "or/proto_ext_or.h"
+#include "core/or/connection_or.h"
+#include "feature/relay/ext_orport.h"
+#include "core/proto/proto_cell.h"
+#include "core/proto/proto_control0.h"
+#include "core/proto/proto_ext_or.h"
-#include "or/var_cell_st.h"
+#include "core/or/var_cell_st.h"
static void
test_proto_var_cell(void *arg)
diff --git a/src/test/test_protover.c b/src/test/test_protover.c
index f17f68ced2..a90ff5a08c 100644
--- a/src/test/test_protover.c
+++ b/src/test/test_protover.c
@@ -6,10 +6,10 @@
#include "orconfig.h"
#include "test/test.h"
-#include "or/protover.h"
+#include "core/proto/protover.h"
-#include "or/or.h"
-#include "or/connection_or.h"
+#include "core/or/or.h"
+#include "core/or/connection_or.h"
static void
test_protover_parse(void *arg)
diff --git a/src/test/test_pt.c b/src/test/test_pt.c
index 189cb25846..dea3791da2 100644
--- a/src/test/test_pt.c
+++ b/src/test/test_pt.c
@@ -9,18 +9,18 @@
#define STATEFILE_PRIVATE
#define CONTROL_PRIVATE
#define SUBPROCESS_PRIVATE
-#include "or/or.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/control.h"
-#include "or/transports.h"
-#include "or/circuitbuild.h"
-#include "or/statefile.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "feature/control/control.h"
+#include "feature/client/transports.h"
+#include "core/or/circuitbuild.h"
+#include "app/config/statefile.h"
#include "test/test.h"
#include "lib/process/subprocess.h"
#include "lib/encoding/confline.h"
-#include "or/or_state_st.h"
+#include "app/config/or_state_st.h"
static void
reset_mp(managed_proxy_t *mp)
diff --git a/src/test/test_relay.c b/src/test/test_relay.c
index fe5795d11d..25084fab37 100644
--- a/src/test/test_relay.c
+++ b/src/test/test_relay.c
@@ -1,17 +1,17 @@
/* Copyright (c) 2014-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
+#include "core/or/or.h"
#define CIRCUITBUILD_PRIVATE
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
#define RELAY_PRIVATE
-#include "or/relay.h"
+#include "core/or/relay.h"
/* For init/free stuff */
-#include "or/scheduler.h"
+#include "core/or/scheduler.h"
-#include "or/cell_st.h"
-#include "or/or_circuit_st.h"
+#include "core/or/cell_st.h"
+#include "core/or/or_circuit_st.h"
/* Test suite stuff */
#include "test/test.h"
diff --git a/src/test/test_relaycell.c b/src/test/test_relaycell.c
index 9f314b7704..eb30cab0ec 100644
--- a/src/test/test_relaycell.c
+++ b/src/test/test_relaycell.c
@@ -5,22 +5,22 @@
#define RELAY_PRIVATE
#define CIRCUITLIST_PRIVATE
-#include "or/or.h"
-#include "or/main.h"
-#include "or/config.h"
-#include "or/connection.h"
+#include "core/or/or.h"
+#include "core/mainloop/main.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
#include "lib/crypt_ops/crypto.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/connection_edge.h"
-#include "or/relay.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/connection_edge.h"
+#include "core/or/relay.h"
#include "test/test.h"
-#include "or/cell_st.h"
-#include "or/crypt_path_st.h"
-#include "or/entry_connection_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/socks_request_st.h"
+#include "core/or/cell_st.h"
+#include "core/or/crypt_path_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "core/or/socks_request_st.h"
static int srm_ncalls;
static entry_connection_t *srm_conn;
diff --git a/src/test/test_relaycrypt.c b/src/test/test_relaycrypt.c
index 7f0ca06983..c3cfb7d10b 100644
--- a/src/test/test_relaycrypt.c
+++ b/src/test/test_relaycrypt.c
@@ -3,17 +3,17 @@
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
-#include "or/circuitbuild.h"
+#include "core/or/or.h"
+#include "core/or/circuitbuild.h"
#define CIRCUITLIST_PRIVATE
-#include "or/circuitlist.h"
+#include "core/or/circuitlist.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/relay.h"
-#include "or/relay_crypto.h"
+#include "core/or/relay.h"
+#include "core/crypto/relay_crypto.h"
-#include "or/cell_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
+#include "core/or/cell_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
#include "test/test.h"
diff --git a/src/test/test_rendcache.c b/src/test/test_rendcache.c
index 3d606aac0d..394e28d785 100644
--- a/src/test/test_rendcache.c
+++ b/src/test/test_rendcache.c
@@ -2,21 +2,21 @@
/* See LICENSE for licensing information */
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#define RENDCACHE_PRIVATE
-#include "or/rendcache.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/config.h"
-#include "or/hs_common.h"
-
-#include "or/extend_info_st.h"
-#include "or/rend_encoded_v2_service_descriptor_st.h"
-#include "or/rend_intro_point_st.h"
-#include "or/rend_service_descriptor_st.h"
-#include "or/routerinfo_st.h"
+#include "feature/rend/rendcache.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "app/config/config.h"
+#include "feature/hs/hs_common.h"
+
+#include "core/or/extend_info_st.h"
+#include "feature/rend/rend_encoded_v2_service_descriptor_st.h"
+#include "feature/rend/rend_intro_point_st.h"
+#include "feature/rend/rend_service_descriptor_st.h"
+#include "feature/nodelist/routerinfo_st.h"
#include "test/rend_test_helpers.h"
#include "test/log_test_helpers.h"
diff --git a/src/test/test_replay.c b/src/test/test_replay.c
index 7f9c0b09e4..bca3a6660a 100644
--- a/src/test/test_replay.c
+++ b/src/test/test_replay.c
@@ -4,8 +4,8 @@
#define REPLAYCACHE_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
-#include "or/replaycache.h"
+#include "core/or/or.h"
+#include "feature/hs_common/replaycache.h"
#include "test/test.h"
static const char *test_buffer =
diff --git a/src/test/test_router.c b/src/test/test_router.c
index 6e9424a3ad..a398c7497b 100644
--- a/src/test/test_router.c
+++ b/src/test/test_router.c
@@ -7,14 +7,14 @@
* \brief Unittests for code in src/or/router.c
**/
-#include "or/or.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_curve25519.h"
#include "lib/crypt_ops/crypto_ed25519.h"
-#include "or/router.h"
-#include "or/routerlist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
-#include "or/routerinfo_st.h"
+#include "feature/nodelist/routerinfo_st.h"
/* Test suite stuff */
#include "test/test.h"
diff --git a/src/test/test_routerkeys.c b/src/test/test_routerkeys.c
index 2a761ad6e1..1a1bf63ba0 100644
--- a/src/test/test_routerkeys.c
+++ b/src/test/test_routerkeys.c
@@ -5,13 +5,13 @@
#include "orconfig.h"
#define ROUTER_PRIVATE
-#include "or/or.h"
-#include "or/config.h"
-#include "or/router.h"
-#include "or/routerkeys.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
#include "lib/crypt_ops/crypto.h"
#include "lib/crypt_ops/crypto_format.h"
-#include "or/torcert.h"
+#include "feature/nodelist/torcert.h"
#include "test/test.h"
#ifdef _WIN32
diff --git a/src/test/test_routerlist.c b/src/test/test_routerlist.c
index b25a0be9a4..89d1f4f90f 100644
--- a/src/test/test_routerlist.c
+++ b/src/test/test_routerlist.c
@@ -13,32 +13,32 @@
#define NETWORKSTATUS_PRIVATE
#define ROUTERLIST_PRIVATE
#define TOR_UNIT_TESTING
-#include "or/or.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/directory.h"
-#include "or/dirauth/dirvote.h"
-#include "or/entrynodes.h"
-#include "or/hibernate.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerset.h"
-#include "or/routerparse.h"
-#include "or/dirauth/shared_random.h"
-#include "or/statefile.h"
-
-#include "or/authority_cert_st.h"
-#include "or/dir_connection_st.h"
-#include "or/networkstatus_st.h"
-#include "or/node_st.h"
-#include "or/or_state_st.h"
-#include "or/routerstatus_st.h"
+#include "feature/dircache/directory.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/client/entrynodes.h"
+#include "feature/hibernate/hibernate.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/policies.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerset.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/dirauth/shared_random.h"
+#include "app/config/statefile.h"
+
+#include "feature/nodelist/authority_cert_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/node_st.h"
+#include "app/config/or_state_st.h"
+#include "feature/nodelist/routerstatus_st.h"
#include "lib/encoding/confline.h"
#include "lib/container/buffers.h"
diff --git a/src/test/test_routerset.c b/src/test/test_routerset.c
index ea8b43498e..2017ef0050 100644
--- a/src/test/test_routerset.c
+++ b/src/test/test_routerset.c
@@ -3,18 +3,18 @@
#define ROUTERSET_PRIVATE
-#include "or/or.h"
-#include "or/geoip.h"
-#include "or/routerset.h"
-#include "or/routerparse.h"
-#include "or/policies.h"
-#include "or/nodelist.h"
-
-#include "or/addr_policy_st.h"
-#include "or/extend_info_st.h"
-#include "or/node_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerstatus_st.h"
+#include "core/or/or.h"
+#include "feature/stats/geoip.h"
+#include "feature/nodelist/routerset.h"
+#include "feature/nodelist/routerparse.h"
+#include "core/or/policies.h"
+#include "feature/nodelist/nodelist.h"
+
+#include "core/or/addr_policy_st.h"
+#include "core/or/extend_info_st.h"
+#include "feature/nodelist/node_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerstatus_st.h"
#include "test/test.h"
diff --git a/src/test/test_scheduler.c b/src/test/test_scheduler.c
index 555a2a6bfd..2d562299ab 100644
--- a/src/test/test_scheduler.c
+++ b/src/test/test_scheduler.c
@@ -8,15 +8,15 @@
#define SCHEDULER_KIST_PRIVATE
#define TOR_CHANNEL_INTERNAL_
#define CHANNEL_PRIVATE_
-#include "or/or.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
#include "lib/evloop/compat_libevent.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/connection.h"
-#include "or/networkstatus.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/mainloop/connection.h"
+#include "feature/nodelist/networkstatus.h"
#define SCHEDULER_PRIVATE_
-#include "or/scheduler.h"
+#include "core/or/scheduler.h"
/* Test suite stuff */
#include "test/test.h"
diff --git a/src/test/test_shared_random.c b/src/test/test_shared_random.c
index 1b4fdc8992..ccf051606f 100644
--- a/src/test/test_shared_random.c
+++ b/src/test/test_shared_random.c
@@ -6,25 +6,25 @@
#define CONFIG_PRIVATE
#define DIRVOTE_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
-#include "or/config.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/dirauth/dirvote.h"
-#include "or/dirauth/shared_random.h"
-#include "or/dirauth/shared_random_state.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/dirauth/shared_random.h"
+#include "feature/dirauth/shared_random_state.h"
#include "test/log_test_helpers.h"
-#include "or/networkstatus.h"
-#include "or/router.h"
-#include "or/routerkeys.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/shared_random_client.h"
-#include "or/voting_schedule.h"
-
-#include "or/dir_server_st.h"
-#include "or/networkstatus_st.h"
-#include "or/or_state_st.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/hs_common/shared_random_client.h"
+#include "feature/dircommon/voting_schedule.h"
+
+#include "feature/dirclient/dir_server_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "app/config/or_state_st.h"
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
diff --git a/src/test/test_slow.c b/src/test/test_slow.c
index 951851ec07..0b665363ab 100644
--- a/src/test/test_slow.c
+++ b/src/test/test_slow.c
@@ -15,7 +15,7 @@
#include <fcntl.h>
#endif
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
struct testgroup_t testgroups[] = {
diff --git a/src/test/test_socks.c b/src/test/test_socks.c
index 0a01bf6431..e064cc8db1 100644
--- a/src/test/test_socks.c
+++ b/src/test/test_socks.c
@@ -3,14 +3,14 @@
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/container/buffers.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/proto_socks.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/proto/proto_socks.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
-#include "or/socks_request_st.h"
+#include "core/or/socks_request_st.h"
#include "lib/net/socks5_status.h"
typedef struct socks_test_data_t {
diff --git a/src/test/test_status.c b/src/test/test_status.c
index c92ba48e2f..3cc23955ad 100644
--- a/src/test/test_status.c
+++ b/src/test/test_status.c
@@ -11,24 +11,24 @@
#include <float.h>
#include <math.h>
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/log/torlog.h"
#include "tor_queue.h"
-#include "or/status.h"
-#include "or/circuitlist.h"
-#include "or/config.h"
-#include "or/hibernate.h"
-#include "or/rephist.h"
-#include "or/relay.h"
-#include "or/router.h"
-#include "or/main.h"
-#include "or/nodelist.h"
-#include "or/statefile.h"
+#include "core/or/status.h"
+#include "core/or/circuitlist.h"
+#include "app/config/config.h"
+#include "feature/hibernate/hibernate.h"
+#include "feature/stats/rephist.h"
+#include "core/or/relay.h"
+#include "feature/relay/router.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/nodelist.h"
+#include "app/config/statefile.h"
#include "lib/tls/tortls.h"
-#include "or/origin_circuit_st.h"
-#include "or/or_state_st.h"
-#include "or/routerinfo_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "app/config/or_state_st.h"
+#include "feature/nodelist/routerinfo_st.h"
#include "test/test.h"
diff --git a/src/test/test_storagedir.c b/src/test/test_storagedir.c
index efb6a0027a..68cee418ad 100644
--- a/src/test/test_storagedir.c
+++ b/src/test/test_storagedir.c
@@ -1,7 +1,7 @@
/* Copyright (c) 2017-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/fs/storagedir.h"
#include "lib/encoding/confline.h"
diff --git a/src/test/test_switch_id.c b/src/test/test_switch_id.c
index 95801822f9..d8a1d15e4e 100644
--- a/src/test/test_switch_id.c
+++ b/src/test/test_switch_id.c
@@ -1,7 +1,7 @@
/* Copyright (c) 2015-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/process/setuid.h"
#ifdef HAVE_SYS_CAPABILITY_H
diff --git a/src/test/test_threads.c b/src/test/test_threads.c
index e698e4f618..f0a4dd2057 100644
--- a/src/test/test_threads.c
+++ b/src/test/test_threads.c
@@ -4,7 +4,7 @@
/* See LICENSE for licensing information */
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/thread/threads.h"
#include "test/test.h"
diff --git a/src/test/test_tortls.c b/src/test/test_tortls.c
index 9ae9d4dfbd..2b40ed72d9 100644
--- a/src/test/test_tortls.c
+++ b/src/test/test_tortls.c
@@ -30,11 +30,11 @@ DISABLE_GCC_WARNING(redundant-decls)
ENABLE_GCC_WARNING(redundant-decls)
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/log/torlog.h"
-#include "or/config.h"
+#include "app/config/config.h"
#include "lib/tls/tortls.h"
-#include "or/or_state_st.h"
+#include "app/config/or_state_st.h"
#include "test/test.h"
#include "test/log_test_helpers.h"
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 60cd7ad66a..99fee4c5a5 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -12,11 +12,11 @@
#define SOCKET_PRIVATE
#define SUBPROCESS_PRIVATE
#include "lib/testsupport/testsupport.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/container/buffers.h"
-#include "or/config.h"
-#include "or/control.h"
-#include "or/transports.h"
+#include "app/config/config.h"
+#include "feature/control/control.h"
+#include "feature/client/transports.h"
#include "lib/crypt_ops/crypto_format.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "test/test.h"
diff --git a/src/test/test_util_format.c b/src/test/test_util_format.c
index ea42d8dd5a..85d8a8e62e 100644
--- a/src/test/test_util_format.c
+++ b/src/test/test_util_format.c
@@ -2,7 +2,7 @@
/* See LICENSE for licensing information */
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
diff --git a/src/test/test_util_process.c b/src/test/test_util_process.c
index 9dce520d04..44c4da9169 100644
--- a/src/test/test_util_process.c
+++ b/src/test/test_util_process.c
@@ -3,7 +3,7 @@
#define UTIL_PROCESS_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
diff --git a/src/test/test_voting_schedule.c b/src/test/test_voting_schedule.c
index b5df596436..c3a581cf21 100644
--- a/src/test/test_voting_schedule.c
+++ b/src/test/test_voting_schedule.c
@@ -3,8 +3,8 @@
#include "orconfig.h"
-#include "or/or.h"
-#include "or/voting_schedule.h"
+#include "core/or/or.h"
+#include "feature/dircommon/voting_schedule.h"
#include "test/test.h"
diff --git a/src/test/test_workqueue.c b/src/test/test_workqueue.c
index 2cb42734c4..4550bad1f0 100644
--- a/src/test/test_workqueue.c
+++ b/src/test/test_workqueue.c
@@ -3,9 +3,9 @@
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/thread/threads.h"
-#include "or/onion.h"
+#include "core/crypto/onion.h"
#include "lib/evloop/workqueue.h"
#include "lib/crypt_ops/crypto_curve25519.h"
#include "lib/crypt_ops/crypto_rand.h"
diff --git a/src/test/testing_common.c b/src/test/testing_common.c
index b0514f85ec..3880bca9c5 100644
--- a/src/test/testing_common.c
+++ b/src/test/testing_common.c
@@ -10,17 +10,17 @@
#define MAIN_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
-#include "or/control.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "feature/control/control.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_dh.h"
#include "lib/crypt_ops/crypto_ed25519.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/rephist.h"
+#include "feature/stats/rephist.h"
#include "lib/err/backtrace.h"
#include "test/test.h"
-#include "or/channelpadding.h"
-#include "or/main.h"
+#include "core/or/channelpadding.h"
+#include "core/mainloop/main.h"
#include "lib/compress/compress.h"
#include "lib/evloop/compat_libevent.h"
diff --git a/src/test/testing_rsakeys.c b/src/test/testing_rsakeys.c
index 087a14e649..a8c9ce4ce8 100644
--- a/src/test/testing_rsakeys.c
+++ b/src/test/testing_rsakeys.c
@@ -5,7 +5,7 @@
#include "lib/crypt_ops/crypto_rand.h"
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
/** Define this if unit tests spend too much time generating public keys.