I am very glad to have written this script.
**/
#define CONFIG_PRIVATE
-#include "or/or.h"
-#include "or/bridges.h"
-#include "or/addressmap.h"
-#include "or/channel.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuitmux.h"
-#include "or/circuitmux_ewma.h"
-#include "or/circuitstats.h"
+#include "core/or/or.h"
+#include "feature/client/bridges.h"
+#include "feature/client/addressmap.h"
+#include "core/or/channel.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitmux.h"
+#include "core/or/circuitmux_ewma.h"
+#include "core/or/circuitstats.h"
#include "lib/compress/compress.h"
-#include "or/config.h"
+#include "app/config/config.h"
#include "lib/encoding/confline.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/consdiffmgr.h"
-#include "or/control.h"
-#include "or/confparse.h"
-#include "or/cpuworker.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/dircache/consdiffmgr.h"
+#include "feature/control/control.h"
+#include "app/config/confparse.h"
+#include "core/mainloop/cpuworker.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/dirserv.h"
-#include "or/dns.h"
-#include "or/dos.h"
-#include "or/entrynodes.h"
-#include "or/git_revision.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/relay.h"
-#include "or/rendclient.h"
-#include "or/rendservice.h"
-#include "or/hs_config.h"
-#include "or/rephist.h"
-#include "or/router.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/relay/dns.h"
+#include "core/or/dos.h"
+#include "feature/client/entrynodes.h"
+#include "core/or/git_revision.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 "core/or/relay.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendservice.h"
+#include "feature/hs/hs_config.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
#include "lib/sandbox/sandbox.h"
-#include "or/routerlist.h"
-#include "or/routerset.h"
-#include "or/scheduler.h"
-#include "or/statefile.h"
-#include "or/transports.h"
-#include "or/ext_orport.h"
-#include "or/voting_schedule.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerset.h"
+#include "core/or/scheduler.h"
+#include "app/config/statefile.h"
+#include "feature/client/transports.h"
+#include "feature/relay/ext_orport.h"
+#include "feature/dircommon/voting_schedule.h"
#ifdef _WIN32
#include <shlobj.h>
#endif
#include "lib/fs/conffile.h"
#include "lib/evloop/procmon.h"
-#include "or/dirauth/dirvote.h"
-#include "or/dirauth/mode.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/dirauth/mode.h"
-#include "or/connection_st.h"
-#include "or/port_cfg_st.h"
+#include "core/or/connection_st.h"
+#include "core/or/port_cfg_st.h"
#ifdef HAVE_SYSTEMD
# if defined(__COVERITY__) && !defined(__INCLUDE_LEVEL__)
#ifndef TOR_CONFIG_H
#define TOR_CONFIG_H
-#include "or/or_options_st.h"
+#include "app/config/or_options_st.h"
#include "lib/testsupport/testsupport.h"
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(DARWIN)
* specified, and a linked list of key-value pairs.
*/
-#include "or/or.h"
-#include "or/confparse.h"
-#include "or/routerset.h"
+#include "core/or/or.h"
+#include "app/config/confparse.h"
+#include "feature/nodelist/routerset.h"
#include "lib/container/bitarray.h"
#include "lib/encoding/confline.h"
*/
#define STATEFILE_PRIVATE
-#include "or/or.h"
-#include "or/circuitstats.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/connection.h"
-#include "or/control.h"
-#include "or/entrynodes.h"
-#include "or/hibernate.h"
-#include "or/main.h"
-#include "or/rephist.h"
-#include "or/router.h"
+#include "core/or/or.h"
+#include "core/or/circuitstats.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "core/mainloop/connection.h"
+#include "feature/control/control.h"
+#include "feature/client/entrynodes.h"
+#include "feature/hibernate/hibernate.h"
+#include "core/mainloop/main.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
#include "lib/sandbox/sandbox.h"
-#include "or/statefile.h"
+#include "app/config/statefile.h"
#include "lib/encoding/confline.h"
-#include "or/or_state_st.h"
+#include "app/config/or_state_st.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#ifdef _WIN32
-#include "or/or.h"
-#include "or/config.h"
-#include "or/main.h"
-#include "app/ntmain.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "core/mainloop/main.h"
+#include "app/main/ntmain.h"
#include "lib/log/win32err.h"
#include "lib/fs/winlib.h"
#include "lib/evloop/compat_libevent.h"
* rendezvous key expansion to setup end-to-end rend circuit keys.
*/
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/crypt_ops/crypto_util.h"
#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"
/* String constants used by the ntor HS protocol */
#define PROTOID "tor-hs-ntor-curve25519-sha3-256-1"
#ifndef TOR_HS_NTOR_H
#define TOR_HS_NTOR_H
-#include "or/or.h"
+#include "core/or/or.h"
struct ed25519_public_key_t;
struct curve25519_public_key_t;
struct curve25519_keypair_t;
* onion_fast.c for more information.
**/
-#include "or/or.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/config.h"
-#include "or/cpuworker.h"
+#include "core/or/or.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "app/config/config.h"
+#include "core/mainloop/cpuworker.h"
#include "lib/crypt_ops/crypto_util.h"
#include "lib/crypt_ops/crypto_dh.h"
-#include "or/networkstatus.h"
-#include "or/onion.h"
-#include "or/onion_fast.h"
-#include "or/onion_ntor.h"
-#include "or/onion_tap.h"
-#include "or/relay.h"
-#include "or/rephist.h"
-#include "or/router.h"
-
-#include "or/cell_st.h"
-#include "or/extend_info_st.h"
-#include "or/or_circuit_st.h"
+#include "feature/nodelist/networkstatus.h"
+#include "core/crypto/onion.h"
+#include "core/crypto/onion_fast.h"
+#include "core/crypto/onion_ntor.h"
+#include "core/crypto/onion_tap.h"
+#include "core/or/relay.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/extend_info_st.h"
+#include "core/or/or_circuit_st.h"
// trunnel
#include "trunnel/ed25519_cert.h"
* many RSA1024 keys.
**/
-#include "or/or.h"
-#include "or/onion_fast.h"
+#include "core/or/or.h"
+#include "core/crypto/onion_fast.h"
#include "lib/crypt_ops/crypto_hkdf.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
#include "lib/ctime/di_ops.h"
#include "lib/log/torlog.h"
#include "lib/log/util_bug.h"
-#include "or/onion_ntor.h"
+#include "core/crypto/onion_ntor.h"
#include <string.h>
* invoked from onion.c.
**/
-#include "or/or.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_dh.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/onion_tap.h"
-#include "or/rephist.h"
+#include "core/crypto/onion_tap.h"
+#include "feature/stats/rephist.h"
/*----------------------------------------------------------------------*/
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
-#include "or/circuitlist.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "core/or/circuitlist.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/hs_ntor.h" // for HS_NTOR_KEY_EXPANSION_KDF_OUT_LEN
-#include "or/relay.h"
-#include "or/relay_crypto.h"
+#include "core/crypto/hs_ntor.h" // for HS_NTOR_KEY_EXPANSION_KDF_OUT_LEN
+#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"
/** Update digest from the payload of cell. Assign integrity part to
* cell.
**/
#define CONNECTION_PRIVATE
-#include "or/or.h"
-#include "or/bridges.h"
+#include "core/or/or.h"
+#include "feature/client/bridges.h"
#include "lib/container/buffers.h"
#include "lib/tls/buffers_tls.h"
/*
#define TOR_CHANNEL_INTERNAL_
#define CONNECTION_PRIVATE
#include "lib/err/backtrace.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/control.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/directory.h"
-#include "or/dirserv.h"
-#include "or/dns.h"
-#include "or/dnsserv.h"
-#include "or/dos.h"
-#include "or/entrynodes.h"
-#include "or/ext_orport.h"
-#include "or/geoip.h"
-#include "or/main.h"
-#include "or/hibernate.h"
-#include "or/hs_common.h"
-#include "or/hs_ident.h"
-#include "or/nodelist.h"
-#include "or/proto_http.h"
-#include "or/proto_socks.h"
-#include "or/policies.h"
-#include "or/reasons.h"
-#include "or/relay.h"
-#include "or/rendclient.h"
-#include "or/rendcommon.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/transports.h"
-#include "or/routerparse.h"
+#include "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/relay/dns.h"
+#include "feature/client/dnsserv.h"
+#include "core/or/dos.h"
+#include "feature/client/entrynodes.h"
+#include "feature/relay/ext_orport.h"
+#include "feature/stats/geoip.h"
+#include "core/mainloop/main.h"
+#include "feature/hibernate/hibernate.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_ident.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/proto/proto_http.h"
+#include "core/proto/proto_socks.h"
+#include "core/or/policies.h"
+#include "core/or/reasons.h"
+#include "core/or/relay.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/client/transports.h"
+#include "feature/nodelist/routerparse.h"
#include "lib/sandbox/sandbox.h"
#include "lib/net/buffers_net.h"
#include "lib/tls/tortls.h"
#include <sys/un.h>
#endif
-#include "or/dir_connection_st.h"
-#include "or/control_connection_st.h"
-#include "or/entry_connection_st.h"
-#include "or/listener_connection_st.h"
-#include "or/or_connection_st.h"
-#include "or/port_cfg_st.h"
-#include "or/routerinfo_st.h"
-#include "or/socks_request_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "feature/control/control_connection_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/listener_connection_st.h"
+#include "core/or/or_connection_st.h"
+#include "core/or/port_cfg_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "core/or/socks_request_st.h"
static connection_t *connection_listener_new(
const struct sockaddr *listensockaddr,
* <li>and for calculating diffs and compressing them in consdiffmgr.c.
* </ul>
**/
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/connection_or.h"
-#include "or/config.h"
-#include "or/cpuworker.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/connection_or.h"
+#include "app/config/config.h"
+#include "core/mainloop/cpuworker.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/main.h"
-#include "or/onion.h"
-#include "or/rephist.h"
-#include "or/router.h"
+#include "core/mainloop/main.h"
+#include "core/crypto/onion.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
#include "lib/evloop/workqueue.h"
-#include "or/or_circuit_st.h"
+#include "core/or/or_circuit_st.h"
#include "lib/intmath/weakrng.h"
static void queue_pending_tasks(void);
**/
#define MAIN_PRIVATE
-#include "or/or.h"
-#include "or/addressmap.h"
+#include "core/or/or.h"
+#include "feature/client/addressmap.h"
#include "lib/err/backtrace.h"
-#include "or/bridges.h"
+#include "feature/client/bridges.h"
#include "lib/container/buffers.h"
#include "lib/tls/buffers_tls.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/channelpadding.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/circuitmux_ewma.h"
-#include "or/command.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/or/channelpadding.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "core/or/circuitmux_ewma.h"
+#include "core/or/command.h"
#include "lib/compress/compress.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/consdiffmgr.h"
-#include "or/control.h"
-#include "or/cpuworker.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/dircache/consdiffmgr.h"
+#include "feature/control/control.h"
+#include "core/mainloop/cpuworker.h"
#include "lib/crypt_ops/crypto_s2k.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/directory.h"
-#include "or/dirserv.h"
-#include "or/dns.h"
-#include "or/dnsserv.h"
-#include "or/dos.h"
-#include "or/entrynodes.h"
-#include "or/geoip.h"
-#include "or/hibernate.h"
-#include "or/hs_cache.h"
-#include "or/hs_circuitmap.h"
-#include "or/hs_client.h"
-#include "or/keypin.h"
-#include "or/main.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "app/ntmain.h"
-#include "or/onion.h"
-#include "or/periodic.h"
-#include "or/policies.h"
-#include "or/protover.h"
-#include "or/transports.h"
-#include "or/relay.h"
-#include "or/rendclient.h"
-#include "or/rendcommon.h"
-#include "or/rendservice.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerkeys.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/scheduler.h"
-#include "or/statefile.h"
-#include "or/status.h"
-#include "or/tor_api.h"
-#include "or/tor_api_internal.h"
+#include "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/relay/dns.h"
+#include "feature/client/dnsserv.h"
+#include "core/or/dos.h"
+#include "feature/client/entrynodes.h"
+#include "feature/stats/geoip.h"
+#include "feature/hibernate/hibernate.h"
+#include "feature/hs/hs_cache.h"
+#include "feature/hs/hs_circuitmap.h"
+#include "feature/hs/hs_client.h"
+#include "feature/dirauth/keypin.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "app/main/ntmain.h"
+#include "core/crypto/onion.h"
+#include "core/mainloop/periodic.h"
+#include "core/or/policies.h"
+#include "core/proto/protover.h"
+#include "feature/client/transports.h"
+#include "core/or/relay.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendservice.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "core/or/scheduler.h"
+#include "app/config/statefile.h"
+#include "core/or/status.h"
+#include "feature/api/tor_api.h"
+#include "feature/api/tor_api_internal.h"
#include "lib/process/waitpid.h"
-#include "or/ext_orport.h"
+#include "feature/relay/ext_orport.h"
#include "lib/memarea/memarea.h"
#include "lib/meminfo/meminfo.h"
#include "lib/osinfo/uname.h"
#include <event2/event.h>
-#include "or/dirauth/dirvote.h"
-#include "or/dirauth/mode.h"
-#include "or/dirauth/shared_random.h"
-
-#include "or/cell_st.h"
-#include "or/entry_connection_st.h"
-#include "or/networkstatus_st.h"
-#include "or/or_connection_st.h"
-#include "or/or_state_st.h"
-#include "or/port_cfg_st.h"
-#include "or/routerinfo_st.h"
-#include "or/socks_request_st.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/dirauth/mode.h"
+#include "feature/dirauth/shared_random.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/entry_connection_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "core/or/or_connection_st.h"
+#include "app/config/or_state_st.h"
+#include "core/or/port_cfg_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "core/or/socks_request_st.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
extern smartlist_t *connection_array;
/* We need the periodic_event_item_t definition. */
-#include "or/periodic.h"
+#include "core/mainloop/periodic.h"
extern periodic_event_item_t periodic_events[];
#endif
#endif /* defined(MAIN_PRIVATE) */
* that they fire. See periodic_events[] in main.c for examples.
*/
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/evloop/compat_libevent.h"
-#include "or/config.h"
-#include "or/main.h"
-#include "or/periodic.h"
+#include "app/config/config.h"
+#include "core/mainloop/main.h"
+#include "core/mainloop/periodic.h"
#include "lib/evloop/compat_libevent.h"
/** We disable any interval greater than this number of seconds, on the
**/
#include "orconfig.h"
-#include "or/address_set.h"
+#include "core/or/address_set.h"
#include "lib/net/address.h"
#include "lib/container/bloomfilt.h"
#include "lib/crypt_ops/crypto_rand.h"
/* This one's for stuff only channel.c and the test suite should see */
#define CHANNEL_PRIVATE_
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/channelpadding.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuitstats.h"
-#include "or/config.h"
-#include "or/connection_or.h" /* For var_cell_free() */
-#include "or/circuitmux.h"
-#include "or/entrynodes.h"
-#include "or/geoip.h"
-#include "or/main.h"
-#include "or/nodelist.h"
-#include "or/relay.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/scheduler.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/or/channelpadding.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitstats.h"
+#include "app/config/config.h"
+#include "core/or/connection_or.h" /* For var_cell_free() */
+#include "core/or/circuitmux.h"
+#include "feature/client/entrynodes.h"
+#include "feature/stats/geoip.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/relay.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "core/or/scheduler.h"
#include "lib/time/compat_time.h"
-#include "or/networkstatus.h"
-#include "or/rendservice.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/rend/rendservice.h"
#include "lib/evloop/timers.h"
-#include "or/cell_queue_st.h"
+#include "core/or/cell_queue_st.h"
/* Global lists of channels */
#ifndef TOR_CHANNEL_H
#define TOR_CHANNEL_H
-#include "or/or.h"
-#include "or/circuitmux.h"
+#include "core/or/or.h"
+#include "core/or/circuitmux.h"
#include "lib/container/handles.h"
#include "lib/crypt_ops/crypto_ed25519.h"
* channelpadding_channel_to_channelinfo() */
#define TOR_CHANNEL_INTERNAL_
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/channelpadding.h"
-#include "or/channeltls.h"
-#include "or/config.h"
-#include "or/networkstatus.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/channelpadding.h"
+#include "core/or/channeltls.h"
+#include "app/config/config.h"
+#include "feature/nodelist/networkstatus.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/main.h"
-#include "or/rephist.h"
-#include "or/router.h"
+#include "core/mainloop/main.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
#include "lib/time/compat_time.h"
-#include "or/rendservice.h"
+#include "feature/rend/rendservice.h"
#include "lib/evloop/timers.h"
-#include "or/cell_st.h"
-#include "or/or_connection_st.h"
+#include "core/or/cell_st.h"
+#include "core/or/or_connection_st.h"
STATIC int32_t channelpadding_get_netflow_inactive_timeout_ms(
const channel_t *);
#define CHANNELTLS_PRIVATE
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/circuitmux.h"
-#include "or/circuitmux_ewma.h"
-#include "or/command.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
-#include "or/control.h"
-#include "or/entrynodes.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/or/circuitmux.h"
+#include "core/or/circuitmux_ewma.h"
+#include "core/or/command.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
+#include "feature/client/entrynodes.h"
#include "trunnel/link_handshake.h"
-#include "or/relay.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/scheduler.h"
-#include "or/torcert.h"
-#include "or/networkstatus.h"
+#include "core/or/relay.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "core/or/scheduler.h"
+#include "feature/nodelist/torcert.h"
+#include "feature/nodelist/networkstatus.h"
#include "trunnel/channelpadding_negotiation.h"
-#include "or/channelpadding.h"
-
-#include "or/cell_st.h"
-#include "or/cell_queue_st.h"
-#include "or/extend_info_st.h"
-#include "or/or_connection_st.h"
-#include "or/or_handshake_certs_st.h"
-#include "or/or_handshake_state_st.h"
-#include "or/routerinfo_st.h"
-#include "or/var_cell_st.h"
+#include "core/or/channelpadding.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/cell_queue_st.h"
+#include "core/or/extend_info_st.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 "feature/nodelist/routerinfo_st.h"
+#include "core/or/var_cell_st.h"
#include "lib/tls/tortls.h"
#ifndef TOR_CHANNELTLS_H
#define TOR_CHANNELTLS_H
-#include "or/or.h"
-#include "or/channel.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
struct ed25519_public_key_t;
struct curve25519_public_key_t;
#ifndef CIRCUIT_ST_H
#define CIRCUIT_ST_H
-#include "or/or.h"
+#include "core/or/or.h"
-#include "or/cell_queue_st.h"
+#include "core/or/cell_queue_st.h"
struct hs_token_t;
#define CIRCUITBUILD_PRIVATE
-#include "or/or.h"
-#include "or/bridges.h"
-#include "or/channel.h"
-#include "or/circpathbias.h"
+#include "core/or/or.h"
+#include "feature/client/bridges.h"
+#include "core/or/channel.h"
+#include "feature/client/circpathbias.h"
#define CIRCUITBUILD_PRIVATE
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuitstats.h"
-#include "or/circuituse.h"
-#include "or/command.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/control.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitstats.h"
+#include "core/or/circuituse.h"
+#include "core/or/command.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/directory.h"
-#include "or/entrynodes.h"
-#include "or/hs_ntor.h"
-#include "or/main.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/onion.h"
-#include "or/onion_tap.h"
-#include "or/onion_fast.h"
-#include "or/policies.h"
-#include "or/relay.h"
-#include "or/relay_crypto.h"
-#include "or/rendcommon.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/routerset.h"
-#include "or/transports.h"
-
-#include "or/cell_st.h"
-#include "or/cpath_build_state_st.h"
-#include "or/entry_connection_st.h"
-#include "or/extend_info_st.h"
-#include "or/node_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/microdesc_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerstatus_st.h"
+#include "feature/dircache/directory.h"
+#include "feature/client/entrynodes.h"
+#include "core/crypto/hs_ntor.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/crypto/onion.h"
+#include "core/crypto/onion_tap.h"
+#include "core/crypto/onion_fast.h"
+#include "core/or/policies.h"
+#include "core/or/relay.h"
+#include "core/crypto/relay_crypto.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/routerset.h"
+#include "feature/client/transports.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/cpath_build_state_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/extend_info_st.h"
+#include "feature/nodelist/node_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "feature/nodelist/microdesc_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerstatus_st.h"
static channel_t * channel_connect_for_circuit(const tor_addr_t *addr,
uint16_t port,
#define CIRCUITLIST_PRIVATE
#include "lib/cc/torint.h" /* TOR_PRIuSZ */
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/circpathbias.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/circuitstats.h"
-#include "or/connection.h"
-#include "or/config.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "feature/client/circpathbias.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "core/or/circuitstats.h"
+#include "core/mainloop/connection.h"
+#include "app/config/config.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
#include "lib/crypt_ops/crypto_dh.h"
-#include "or/directory.h"
-#include "or/entrynodes.h"
-#include "or/main.h"
-#include "or/hs_circuit.h"
-#include "or/hs_circuitmap.h"
-#include "or/hs_ident.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/onion.h"
-#include "or/onion_fast.h"
-#include "or/policies.h"
-#include "or/relay.h"
-#include "or/relay_crypto.h"
-#include "or/rendclient.h"
-#include "or/rendcommon.h"
-#include "or/rephist.h"
-#include "or/routerlist.h"
-#include "or/routerset.h"
-#include "or/channelpadding.h"
+#include "feature/dircache/directory.h"
+#include "feature/client/entrynodes.h"
+#include "core/mainloop/main.h"
+#include "feature/hs/hs_circuit.h"
+#include "feature/hs/hs_circuitmap.h"
+#include "feature/hs/hs_ident.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/crypto/onion.h"
+#include "core/crypto/onion_fast.h"
+#include "core/or/policies.h"
+#include "core/or/relay.h"
+#include "core/crypto/relay_crypto.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/stats/rephist.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerset.h"
+#include "core/or/channelpadding.h"
#include "lib/compress/compress.h"
#include "lib/compress/compress_lzma.h"
#include "lib/compress/compress_zlib.h"
#include "ht.h"
-#include "or/cpath_build_state_st.h"
-#include "or/crypt_path_reference_st.h"
-#include "or/dir_connection_st.h"
-#include "or/edge_connection_st.h"
-#include "or/extend_info_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
+#include "core/or/cpath_build_state_st.h"
+#include "core/or/crypt_path_reference_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "core/or/edge_connection_st.h"
+#include "core/or/extend_info_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
/********* START VARIABLES **********/
#define TOR_CIRCUITLIST_H
#include "lib/testsupport/testsupport.h"
-#include "or/hs_ident.h"
+#include "feature/hs/hs_ident.h"
/** Circuit state: I'm the origin, still haven't done all my handshakes. */
#define CIRCUIT_STATE_BUILDING 0
* made to attach all existing circuits to the new policy.
**/
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/circuitlist.h"
-#include "or/circuitmux.h"
-#include "or/relay.h"
-
-#include "or/cell_queue_st.h"
-#include "or/destroy_cell_queue_st.h"
-#include "or/or_circuit_st.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitmux.h"
+#include "core/or/relay.h"
+
+#include "core/or/cell_queue_st.h"
+#include "core/or/destroy_cell_queue_st.h"
+#include "core/or/or_circuit_st.h"
/*
* Private typedefs for circuitmux.c
#ifndef TOR_CIRCUITMUX_H
#define TOR_CIRCUITMUX_H
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/testsupport/testsupport.h"
typedef struct circuitmux_policy_s circuitmux_policy_t;
#include <math.h>
-#include "or/or.h"
-#include "or/circuitmux.h"
-#include "or/circuitmux_ewma.h"
+#include "core/or/or.h"
+#include "core/or/circuitmux.h"
+#include "core/or/circuitmux_ewma.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/networkstatus.h"
-#include "or/or_options_st.h"
+#include "feature/nodelist/networkstatus.h"
+#include "app/config/or_options_st.h"
/*** EWMA parameter #defines ***/
#ifndef TOR_CIRCUITMUX_EWMA_H
#define TOR_CIRCUITMUX_EWMA_H
-#include "or/or.h"
-#include "or/circuitmux.h"
+#include "core/or/or.h"
+#include "core/or/circuitmux.h"
/* The public EWMA policy callbacks object. */
extern circuitmux_policy_t ewma_policy;
#define CIRCUITSTATS_PRIVATE
-#include "or/or.h"
-#include "or/circuitbuild.h"
-#include "or/circuitstats.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitstats.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/main.h"
-#include "or/networkstatus.h"
-#include "or/rendclient.h"
-#include "or/rendservice.h"
-#include "or/router.h"
-#include "or/statefile.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendservice.h"
+#include "feature/relay/router.h"
+#include "app/config/statefile.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
#include "lib/math/fp.h"
#include "lib/time/tvdiff.h"
#include "lib/encoding/confline.h"
-#include "or/crypt_path_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/or_state_st.h"
+#include "core/or/crypt_path_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "app/config/or_state_st.h"
#undef log
#include <math.h>
* logic in circuitstats.c.
**/
-#include "or/or.h"
-#include "or/addressmap.h"
-#include "or/bridges.h"
-#include "or/channel.h"
-#include "or/circpathbias.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuitstats.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/control.h"
-#include "or/directory.h"
-#include "or/entrynodes.h"
-#include "or/hs_common.h"
-#include "or/hs_client.h"
-#include "or/hs_circuit.h"
-#include "or/hs_ident.h"
-#include "or/hs_stats.h"
-#include "or/nodelist.h"
-#include "or/networkstatus.h"
-#include "or/policies.h"
-#include "or/rendclient.h"
-#include "or/rendcommon.h"
-#include "or/rendservice.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
+#include "core/or/or.h"
+#include "feature/client/addressmap.h"
+#include "feature/client/bridges.h"
+#include "core/or/channel.h"
+#include "feature/client/circpathbias.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitstats.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "feature/control/control.h"
+#include "feature/dircache/directory.h"
+#include "feature/client/entrynodes.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_client.h"
+#include "feature/hs/hs_circuit.h"
+#include "feature/hs/hs_ident.h"
+#include "feature/hs/hs_stats.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/networkstatus.h"
+#include "core/or/policies.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendservice.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
#include "lib/math/fp.h"
#include "lib/time/tvdiff.h"
-#include "or/cpath_build_state_st.h"
-#include "or/dir_connection_st.h"
-#include "or/entry_connection_st.h"
-#include "or/extend_info_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/socks_request_st.h"
+#include "core/or/cpath_build_state_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/extend_info_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "core/or/socks_request_st.h"
static void circuit_expire_old_circuits_clientside(void);
static void circuit_increment_failure_count(void);
* callbacks registered in command_setup_channel(),
* called when channels are created in circuitbuild.c
*/
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/command.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
-#include "or/config.h"
-#include "or/control.h"
-#include "or/cpuworker.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/command.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
+#include "app/config/config.h"
+#include "feature/control/control.h"
+#include "core/mainloop/cpuworker.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/dos.h"
-#include "or/hibernate.h"
-#include "or/nodelist.h"
-#include "or/onion.h"
-#include "or/rephist.h"
-#include "or/relay.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-
-#include "or/cell_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/var_cell_st.h"
+#include "core/or/dos.h"
+#include "feature/hibernate/hibernate.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/crypto/onion.h"
+#include "feature/stats/rephist.h"
+#include "core/or/relay.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "core/or/var_cell_st.h"
/** How many CELL_CREATE cells have we received, ever? */
uint64_t stats_n_create_cells_processed = 0;
#ifndef TOR_COMMAND_H
#define TOR_COMMAND_H
-#include "or/channel.h"
+#include "core/or/channel.h"
void command_process_cell(channel_t *chan, cell_t *cell);
void command_process_var_cell(channel_t *chan, var_cell_t *cell);
**/
#define CONNECTION_EDGE_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/err/backtrace.h"
-#include "or/addressmap.h"
+#include "feature/client/addressmap.h"
#include "lib/container/buffers.h"
-#include "or/channel.h"
-#include "or/circpathbias.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/control.h"
+#include "core/or/channel.h"
+#include "feature/client/circpathbias.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/dns.h"
-#include "or/dnsserv.h"
-#include "or/directory.h"
-#include "or/dirserv.h"
-#include "or/hibernate.h"
-#include "or/hs_common.h"
-#include "or/hs_cache.h"
-#include "or/hs_client.h"
-#include "or/hs_circuit.h"
-#include "or/main.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/proto_http.h"
-#include "or/proto_socks.h"
-#include "or/reasons.h"
-#include "or/relay.h"
-#include "or/rendclient.h"
-#include "or/rendcommon.h"
-#include "or/rendservice.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerset.h"
-#include "or/circuitbuild.h"
-
-#include "or/cell_st.h"
-#include "or/cpath_build_state_st.h"
-#include "or/dir_connection_st.h"
-#include "or/entry_connection_st.h"
-#include "or/extend_info_st.h"
-#include "or/node_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/socks_request_st.h"
+#include "feature/relay/dns.h"
+#include "feature/client/dnsserv.h"
+#include "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/hibernate/hibernate.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_cache.h"
+#include "feature/hs/hs_client.h"
+#include "feature/hs/hs_circuit.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/policies.h"
+#include "core/proto/proto_http.h"
+#include "core/proto/proto_socks.h"
+#include "core/or/reasons.h"
+#include "core/or/relay.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendservice.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerset.h"
+#include "core/or/circuitbuild.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/cpath_build_state_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/node_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "core/or/socks_request_st.h"
#include "lib/evloop/compat_libevent.h"
#ifdef HAVE_LINUX_TYPES_H
*
* This module also implements the client side of the v3 Tor link handshake,
**/
-#include "or/or.h"
-#include "or/bridges.h"
+#include "core/or/or.h"
+#include "feature/client/bridges.h"
#include "lib/container/buffers.h"
/*
* Define this so we get channel internal functions, since we're implementing
*/
#define TOR_CHANNEL_INTERNAL_
#define CONNECTION_OR_PRIVATE
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuitstats.h"
-#include "or/command.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
-#include "or/control.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitstats.h"
+#include "core/or/command.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/dirserv.h"
-#include "or/entrynodes.h"
-#include "or/geoip.h"
-#include "or/main.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/client/entrynodes.h"
+#include "feature/stats/geoip.h"
+#include "core/mainloop/main.h"
#include "trunnel/link_handshake.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/proto_cell.h"
-#include "or/reasons.h"
-#include "or/relay.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerkeys.h"
-#include "or/routerlist.h"
-#include "or/ext_orport.h"
-#include "or/scheduler.h"
-#include "or/torcert.h"
-#include "or/channelpadding.h"
-
-#include "or/cell_st.h"
-#include "or/cell_queue_st.h"
-#include "or/or_connection_st.h"
-#include "or/or_handshake_certs_st.h"
-#include "or/or_handshake_state_st.h"
-#include "or/or_state_st.h"
-#include "or/routerinfo_st.h"
-#include "or/var_cell_st.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/proto/proto_cell.h"
+#include "core/or/reasons.h"
+#include "core/or/relay.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/relay/ext_orport.h"
+#include "core/or/scheduler.h"
+#include "feature/nodelist/torcert.h"
+#include "core/or/channelpadding.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/cell_queue_st.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 "app/config/or_state_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "core/or/var_cell_st.h"
#include "lib/crypt_ops/crypto_format.h"
#include "lib/tls/tortls.h"
#ifndef CRYPT_PATH_ST_H
#define CRYPT_PATH_ST_H
-#include "or/relay_crypto_st.h"
+#include "core/or/relay_crypto_st.h"
struct crypto_dh_t;
#define CRYPT_PATH_MAGIC 0x70127012u
#define DOS_PRIVATE
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/geoip.h"
-#include "or/main.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/relay.h"
-#include "or/router.h"
+#include "feature/stats/geoip.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/relay.h"
+#include "feature/relay/router.h"
-#include "or/dos.h"
+#include "core/or/dos.h"
-#include "or/or_connection_st.h"
+#include "core/or/or_connection_st.h"
/*
* Circuit creation denial of service mitigation.
#ifndef EDGE_CONNECTION_ST_H
#define EDGE_CONNECTION_ST_H
-#include "or/or.h"
+#include "core/or/or.h"
-#include "or/connection_st.h"
+#include "core/or/connection_st.h"
/** Subtype of connection_t for an "edge connection" -- that is, an entry (ap)
* connection, or an exit. */
#ifndef ENTRY_CONNECTION_ST_H
#define ENTRY_CONNECTION_ST_H
-#include "or/edge_connection_st.h"
+#include "core/or/edge_connection_st.h"
/** Subtype of edge_connection_t for an "entry connection" -- that is, a SOCKS
* connection, a DNS request, a TransPort connection or a NATD connection */
#define ENTRY_PORT_CFG_ST_H
#include "lib/cc/torint.h"
-#include "or/or.h"
+#include "core/or/or.h"
struct entry_port_cfg_t {
/* Client port types (socks, dns, trans, natd) only: */
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/git_revision.h"
+#include "core/or/git_revision.h"
/** String describing which Tor Git repository version the source was
* built from. This string is generated by a bit of shell kludging in
#ifndef LISTENER_CONNECTION_ST_H
#define LISTENER_CONNECTION_ST_H
-#include "or/connection_st.h"
+#include "core/or/connection_st.h"
/** Subtype of connection_t; used for a listener socket. */
struct listener_connection_t {
// These, more than other includes, are for keeping the other struct
// definitions working. We should remove them when we minimize our includes.
-#include "or/entry_port_cfg_st.h"
+#include "core/or/entry_port_cfg_st.h"
struct ed25519_public_key_t;
struct curve25519_public_key_t;
#ifndef OR_CIRCUIT_ST_H
#define OR_CIRCUIT_ST_H
-#include "or/or.h"
+#include "core/or/or.h"
-#include "or/circuit_st.h"
-#include "or/crypt_path_st.h"
+#include "core/or/circuit_st.h"
+#include "core/or/crypt_path_st.h"
struct onion_queue_t;
#ifndef OR_CONNECTION_ST_H
#define OR_CONNECTION_ST_H
-#include "or/connection_st.h"
+#include "core/or/connection_st.h"
#include "lib/evloop/token_bucket.h"
struct tor_tls_t;
#ifndef ORIGIN_CIRCUIT_ST_H
#define ORIGIN_CIRCUIT_ST_H
-#include "or/or.h"
+#include "core/or/or.h"
-#include "or/circuit_st.h"
+#include "core/or/circuit_st.h"
struct onion_queue_t;
#define POLICIES_PRIVATE
-#include "or/or.h"
-#include "or/bridges.h"
-#include "or/config.h"
-#include "or/dirserv.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/router.h"
-#include "or/routerparse.h"
-#include "or/geoip.h"
+#include "core/or/or.h"
+#include "feature/client/bridges.h"
+#include "app/config/config.h"
+#include "feature/dircache/dirserv.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/routerparse.h"
+#include "feature/stats/geoip.h"
#include "ht.h"
#include "lib/encoding/confline.h"
-#include "or/addr_policy_st.h"
-#include "or/dir_server_st.h"
-#include "or/microdesc_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/dirclient/dir_server_st.h"
+#include "feature/nodelist/microdesc_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"
/** Policy that addresses for incoming SOCKS connections must match. */
static smartlist_t *socks_policy = NULL;
#ifndef PORT_CFG_ST_H
#define PORT_CFG_ST_H
-#include "or/entry_port_cfg_st.h"
-#include "or/server_port_cfg_st.h"
+#include "core/or/entry_port_cfg_st.h"
+#include "core/or/server_port_cfg_st.h"
/** Configuration for a single port that we're listening on. */
struct port_cfg_t {
* to another.
**/
-#include "or/or.h"
-#include "or/config.h"
-#include "or/reasons.h"
-#include "or/routerlist.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "core/or/reasons.h"
+#include "feature/nodelist/routerlist.h"
#include "lib/tls/tortls.h"
/***************************** Edge (stream) reasons **********************/
**/
#define RELAY_PRIVATE
-#include "or/or.h"
-#include "or/addressmap.h"
+#include "core/or/or.h"
+#include "feature/client/addressmap.h"
#include "lib/err/backtrace.h"
#include "lib/container/buffers.h"
-#include "or/channel.h"
-#include "or/circpathbias.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
+#include "core/or/channel.h"
+#include "feature/client/circpathbias.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
#include "lib/compress/compress.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/control.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/directory.h"
-#include "or/geoip.h"
-#include "or/hs_cache.h"
-#include "or/main.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/onion.h"
-#include "or/policies.h"
-#include "or/reasons.h"
-#include "or/relay.h"
-#include "or/relay_crypto.h"
-#include "or/rendcache.h"
-#include "or/rendcommon.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/scheduler.h"
-#include "or/rephist.h"
-
-#include "or/cell_st.h"
-#include "or/cell_queue_st.h"
-#include "or/cpath_build_state_st.h"
-#include "or/dir_connection_st.h"
-#include "or/destroy_cell_queue_st.h"
-#include "or/entry_connection_st.h"
-#include "or/extend_info_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/routerinfo_st.h"
-#include "or/socks_request_st.h"
+#include "feature/dircache/directory.h"
+#include "feature/stats/geoip.h"
+#include "feature/hs/hs_cache.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/crypto/onion.h"
+#include "core/or/policies.h"
+#include "core/or/reasons.h"
+#include "core/or/relay.h"
+#include "core/crypto/relay_crypto.h"
+#include "feature/rend/rendcache.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "core/or/scheduler.h"
+#include "feature/stats/rephist.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/cell_queue_st.h"
+#include "core/or/cpath_build_state_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "core/or/destroy_cell_queue_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/extend_info_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "core/or/socks_request_st.h"
#include "lib/intmath/weakrng.h"
/* Copyright (c) 2013-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
#include "lib/evloop/compat_libevent.h"
#define SCHEDULER_PRIVATE_
#define SCHEDULER_KIST_PRIVATE
-#include "or/scheduler.h"
-#include "or/main.h"
+#include "core/or/scheduler.h"
+#include "core/mainloop/main.h"
#include "lib/container/buffers.h"
#define TOR_CHANNEL_INTERNAL_
-#include "or/channeltls.h"
+#include "core/or/channeltls.h"
#include "lib/evloop/compat_libevent.h"
-#include "or/or_connection_st.h"
+#include "core/or/or_connection_st.h"
/**
* \file scheduler.c
#ifndef TOR_SCHEDULER_H
#define TOR_SCHEDULER_H
-#include "or/or.h"
-#include "or/channel.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
#include "lib/testsupport/testsupport.h"
/** Scheduler type, we build an ordered list with those values from the
#define SCHEDULER_KIST_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/container/buffers.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/networkstatus.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "feature/nodelist/networkstatus.h"
#define TOR_CHANNEL_INTERNAL_
-#include "or/channel.h"
-#include "or/channeltls.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
#define SCHEDULER_PRIVATE_
-#include "or/scheduler.h"
+#include "core/or/scheduler.h"
#include "lib/math/fp.h"
-#include "or/or_connection_st.h"
+#include "core/or/or_connection_st.h"
#define TLS_PER_CELL_OVERHEAD 29
/* Copyright (c) 2017-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
#define TOR_CHANNEL_INTERNAL_
-#include "or/channel.h"
+#include "core/or/channel.h"
#define SCHEDULER_PRIVATE_
-#include "or/scheduler.h"
+#include "core/or/scheduler.h"
/*****************************************************************************
* Other internal data
#define STATUS_PRIVATE
-#include "or/or.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/status.h"
-#include "or/nodelist.h"
-#include "or/relay.h"
-#include "or/router.h"
-#include "or/circuitlist.h"
-#include "or/main.h"
-#include "or/rephist.h"
-#include "or/hibernate.h"
-#include "or/statefile.h"
-#include "or/hs_stats.h"
-#include "or/hs_service.h"
-#include "or/dos.h"
-
-#include "or/or_state_st.h"
-#include "or/routerinfo_st.h"
+#include "core/or/or.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "core/or/status.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/relay.h"
+#include "feature/relay/router.h"
+#include "core/or/circuitlist.h"
+#include "core/mainloop/main.h"
+#include "feature/stats/rephist.h"
+#include "feature/hibernate/hibernate.h"
+#include "app/config/statefile.h"
+#include "feature/hs/hs_stats.h"
+#include "feature/hs/hs_service.h"
+#include "core/or/dos.h"
+
+#include "app/config/or_state_st.h"
+#include "feature/nodelist/routerinfo_st.h"
#include "lib/tls/tortls.h"
static void log_accounting(const time_t now, const or_options_t *options);
-#include "or/geoip.h"
+#include "feature/stats/geoip.h"
/** Return the total number of circuits. */
STATIC int
* 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/proto_cell.h"
+#include "core/proto/proto_cell.h"
-#include "or/connection_or.h"
+#include "core/or/connection_or.h"
-#include "or/var_cell_st.h"
+#include "core/or/var_cell_st.h"
/** True iff the cell command <b>command</b> is one that implies a
* variable-length cell in Tor link protocol <b>linkproto</b>. */
* 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/proto_control0.h"
+#include "core/proto/proto_control0.h"
/** Return 1 iff buf looks more like it has an (obsolete) v0 controller
* command on it than any valid v1 controller command. */
* 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/ext_orport.h"
-#include "or/proto_ext_or.h"
+#include "feature/relay/ext_orport.h"
+#include "core/proto/proto_ext_or.h"
/** The size of the header of an Extended ORPort message: 2 bytes for
* COMMAND, 2 bytes for BODYLEN */
/* See LICENSE for licensing information */
#define PROTO_HTTP_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/container/buffers.h"
-#include "or/proto_http.h"
+#include "core/proto/proto_http.h"
/** Return true if <b>cmd</b> looks like a HTTP (proxy) request. */
int
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
-#include "or/addressmap.h"
+#include "core/or/or.h"
+#include "feature/client/addressmap.h"
#include "lib/container/buffers.h"
-#include "or/connection.h"
-#include "or/control.h"
-#include "or/config.h"
+#include "core/mainloop/connection.h"
+#include "feature/control/control.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/ext_orport.h"
-#include "or/proto_socks.h"
-#include "or/reasons.h"
+#include "feature/relay/ext_orport.h"
+#include "core/proto/proto_socks.h"
+#include "core/or/reasons.h"
-#include "or/socks_request_st.h"
+#include "core/or/socks_request_st.h"
static void socks_request_set_socks5_error(socks_request_t *req,
socks5_reply_status_t reason);
#define PROTOVER_PRIVATE
-#include "or/or.h"
-#include "or/protover.h"
-#include "or/routerparse.h"
+#include "core/or/or.h"
+#include "core/proto/protover.h"
+#include "feature/nodelist/routerparse.h"
#ifndef HAVE_RUST
* and safe translation/handling between the Rust/C boundary.
*/
-#include "or/or.h"
-#include "or/protover.h"
+#include "core/or/or.h"
+#include "core/proto/protover.h"
#ifdef HAVE_RUST
* \file tor_api.c
**/
-#include "or/tor_api.h"
-#include "or/tor_api_internal.h"
+#include "feature/api/tor_api.h"
+#include "feature/api/tor_api_internal.h"
// Include this after the above headers, to insure that they don't
// depend on anything else.
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/or.h"
-#include "or/addressmap.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/connection_edge.h"
-#include "or/control.h"
-#include "or/dns.h"
-#include "or/nodelist.h"
-#include "or/routerset.h"
-
-#include "or/entry_connection_st.h"
+#include "core/or/or.h"
+#include "feature/client/addressmap.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "core/or/connection_edge.h"
+#include "feature/control/control.h"
+#include "feature/relay/dns.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/routerset.h"
+
+#include "core/or/entry_connection_st.h"
/** A client-side struct to remember requests to rewrite addresses
* to new addresses. These structs are stored in the hash table
#define TOR_BRIDGES_PRIVATE
-#include "or/or.h"
-#include "or/bridges.h"
-#include "or/circuitbuild.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/directory.h"
-#include "or/entrynodes.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerset.h"
-#include "or/transports.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/client/bridges.h"
+#include "core/or/circuitbuild.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "feature/dircache/directory.h"
+#include "feature/client/entrynodes.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/client/transports.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"
/** Information about a configured bridge. Currently this just matches the
* ones in the torrc file, but one day we may be able to learn about new
* each guard, and stored persistently in the state file.
*/
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/circpathbias.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/circuitstats.h"
-#include "or/connection_edge.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "feature/client/circpathbias.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "core/or/circuitstats.h"
+#include "core/or/connection_edge.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/entrynodes.h"
-#include "or/networkstatus.h"
-#include "or/relay.h"
+#include "feature/client/entrynodes.h"
+#include "feature/nodelist/networkstatus.h"
+#include "core/or/relay.h"
#include "lib/math/fp.h"
#include "lib/math/laplace.h"
-#include "or/cell_st.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 "core/or/cell_st.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"
static void pathbias_count_successful_close(origin_circuit_t *circ);
static void pathbias_count_collapse(origin_circuit_t *circ);
* DNS client.
**/
-#include "or/or.h"
-#include "or/dnsserv.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/control.h"
-#include "or/main.h"
-#include "or/policies.h"
-
-#include "or/control_connection_st.h"
-#include "or/entry_connection_st.h"
-#include "or/listener_connection_st.h"
-#include "or/socks_request_st.h"
+#include "core/or/or.h"
+#include "feature/client/dnsserv.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "feature/control/control.h"
+#include "core/mainloop/main.h"
+#include "core/or/policies.h"
+
+#include "feature/control/control_connection_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/listener_connection_st.h"
+#include "core/or/socks_request_st.h"
#include "lib/evloop/compat_libevent.h"
#include <event2/dns.h>
#define ENTRYNODES_PRIVATE
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/bridges.h"
-#include "or/circpathbias.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/circuitstats.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/connection.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "feature/client/bridges.h"
+#include "feature/client/circpathbias.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "core/or/circuitstats.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "core/mainloop/connection.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/directory.h"
-#include "or/entrynodes.h"
-#include "or/main.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/routerparse.h"
-#include "or/routerset.h"
-#include "or/transports.h"
-#include "or/statefile.h"
+#include "feature/dircache/directory.h"
+#include "feature/client/entrynodes.h"
+#include "core/mainloop/main.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/routerparse.h"
+#include "feature/nodelist/routerset.h"
+#include "feature/client/transports.h"
+#include "app/config/statefile.h"
#include "lib/math/fp.h"
#include "lib/encoding/confline.h"
-#include "or/node_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/or_state_st.h"
+#include "feature/nodelist/node_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "app/config/or_state_st.h"
#include "lib/crypt_ops/digestset.h"
**/
#define PT_PRIVATE
-#include "or/or.h"
-#include "or/bridges.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/circuitbuild.h"
-#include "or/transports.h"
-#include "or/router.h"
-#include "or/statefile.h"
-#include "or/connection_or.h"
-#include "or/ext_orport.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "feature/client/bridges.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/circuitbuild.h"
+#include "feature/client/transports.h"
+#include "feature/relay/router.h"
+#include "app/config/statefile.h"
+#include "core/or/connection_or.h"
+#include "feature/relay/ext_orport.h"
+#include "feature/control/control.h"
#include "lib/process/env.h"
#include "lib/process/subprocess.h"
#define CONTROL_PRIVATE
-#include "or/or.h"
-#include "or/addressmap.h"
-#include "or/bridges.h"
+#include "core/or/or.h"
+#include "feature/client/addressmap.h"
+#include "feature/client/bridges.h"
#include "lib/container/buffers.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuitstats.h"
-#include "or/circuituse.h"
-#include "or/command.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitstats.h"
+#include "core/or/circuituse.h"
+#include "core/or/command.h"
#include "lib/evloop/compat_libevent.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/control.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/directory.h"
-#include "or/dirserv.h"
-#include "or/dnsserv.h"
-#include "or/entrynodes.h"
-#include "or/geoip.h"
-#include "or/hibernate.h"
-#include "or/hs_cache.h"
-#include "or/hs_common.h"
-#include "or/hs_control.h"
-#include "or/main.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/proto_control0.h"
-#include "or/proto_http.h"
-#include "or/reasons.h"
-#include "or/rendclient.h"
-#include "or/rendcommon.h"
-#include "or/rendservice.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/shared_random_client.h"
+#include "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/client/dnsserv.h"
+#include "feature/client/entrynodes.h"
+#include "feature/stats/geoip.h"
+#include "feature/hibernate/hibernate.h"
+#include "feature/hs/hs_cache.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_control.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/policies.h"
+#include "core/proto/proto_control0.h"
+#include "core/proto/proto_http.h"
+#include "core/or/reasons.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendservice.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/hs_common/shared_random_client.h"
#include "lib/encoding/confline.h"
-#include "or/cached_dir_st.h"
-#include "or/control_connection_st.h"
-#include "or/cpath_build_state_st.h"
-#include "or/entry_connection_st.h"
-#include "or/extrainfo_st.h"
-#include "or/networkstatus_st.h"
-#include "or/node_st.h"
-#include "or/or_connection_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/microdesc_st.h"
-#include "or/rend_authorized_client_st.h"
-#include "or/rend_encoded_v2_service_descriptor_st.h"
-#include "or/rend_service_descriptor_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerlist_st.h"
-#include "or/socks_request_st.h"
+#include "feature/dircache/cached_dir_st.h"
+#include "feature/control/control_connection_st.h"
+#include "core/or/cpath_build_state_st.h"
+#include "core/or/entry_connection_st.h"
+#include "feature/nodelist/extrainfo_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/node_st.h"
+#include "core/or/or_connection_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "feature/nodelist/microdesc_st.h"
+#include "feature/rend/rend_authorized_client_st.h"
+#include "feature/rend/rend_encoded_v2_service_descriptor_st.h"
+#include "feature/rend/rend_service_descriptor_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerlist_st.h"
+#include "core/or/socks_request_st.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#ifndef CONTROL_CONNECTION_ST_H
#define CONTROL_CONNECTION_ST_H
-#include "or/or.h"
-#include "or/connection_st.h"
+#include "core/or/or.h"
+#include "core/or/connection_st.h"
/** Subtype of connection_t for an connection to a controller. */
struct control_connection_t {
*/
#define DIRCOLLATE_PRIVATE
-#include "or/dirauth/dircollate.h"
-#include "or/dirauth/dirvote.h"
+#include "feature/dirauth/dircollate.h"
+#include "feature/dirauth/dirvote.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"
static void dircollator_collate_by_ed25519(dircollator_t *dc);
#define TOR_DIRCOLLATE_H
#include "lib/testsupport/testsupport.h"
-#include "or/or.h"
+#include "core/or/or.h"
typedef struct dircollator_s dircollator_t;
/* See LICENSE for licensing information */
#define DIRVOTE_PRIVATE
-#include "or/or.h"
-#include "or/config.h"
-#include "or/dirauth/dircollate.h"
-#include "or/directory.h"
-#include "or/dirserv.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/parsecommon.h"
-#include "or/policies.h"
-#include "or/protover.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerkeys.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/entrynodes.h" /* needed for guardfraction methods */
-#include "or/torcert.h"
-#include "or/voting_schedule.h"
-
-#include "or/dirauth/dirvote.h"
-#include "or/dirauth/mode.h"
-#include "or/dirauth/shared_random_state.h"
-
-#include "or/authority_cert_st.h"
-#include "or/cached_dir_st.h"
-#include "or/dir_server_st.h"
-#include "or/document_signature_st.h"
-#include "or/microdesc_st.h"
-#include "or/networkstatus_st.h"
-#include "or/networkstatus_voter_info_st.h"
-#include "or/node_st.h"
-#include "or/ns_detached_signatures_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerlist_st.h"
-#include "or/vote_microdesc_hash_st.h"
-#include "or/vote_routerstatus_st.h"
-#include "or/vote_timing_st.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "feature/dirauth/dircollate.h"
+#include "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/parsecommon.h"
+#include "core/or/policies.h"
+#include "core/proto/protover.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/client/entrynodes.h" /* needed for guardfraction methods */
+#include "feature/nodelist/torcert.h"
+#include "feature/dircommon/voting_schedule.h"
+
+#include "feature/dirauth/dirvote.h"
+#include "feature/dirauth/mode.h"
+#include "feature/dirauth/shared_random_state.h"
+
+#include "feature/nodelist/authority_cert_st.h"
+#include "feature/dircache/cached_dir_st.h"
+#include "feature/dirclient/dir_server_st.h"
+#include "feature/nodelist/document_signature_st.h"
+#include "feature/nodelist/microdesc_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/networkstatus_voter_info_st.h"
+#include "feature/nodelist/node_st.h"
+#include "feature/dirauth/ns_detached_signatures_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerlist_st.h"
+#include "feature/dirauth/vote_microdesc_hash_st.h"
+#include "feature/nodelist/vote_routerstatus_st.h"
+#include "feature/dircommon/vote_timing_st.h"
#include "lib/container/order.h"
#include "lib/encoding/confline.h"
#include "lib/wallclock/approx_time.h"
#include "ht.h"
-#include "or/keypin.h"
+#include "feature/dirauth/keypin.h"
#include "siphash.h"
#ifdef HAVE_MODULE_DIRAUTH
-#include "or/router.h"
+#include "feature/relay/router.h"
/* Return true iff we believe ourselves to be a v3 authoritative directory
* server. */
#define SHARED_RANDOM_PRIVATE
-#include "or/or.h"
-#include "or/dirauth/shared_random.h"
-#include "or/config.h"
-#include "or/confparse.h"
+#include "core/or/or.h"
+#include "feature/dirauth/shared_random.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/networkstatus.h"
-#include "or/router.h"
-#include "or/routerkeys.h"
-#include "or/routerlist.h"
-#include "or/shared_random_client.h"
-#include "or/dirauth/shared_random_state.h"
-#include "or/voting_schedule.h"
-
-#include "or/dirauth/dirvote.h"
-#include "or/dirauth/mode.h"
-
-#include "or/authority_cert_st.h"
-#include "or/networkstatus_st.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/hs_common/shared_random_client.h"
+#include "feature/dirauth/shared_random_state.h"
+#include "feature/dircommon/voting_schedule.h"
+
+#include "feature/dirauth/dirvote.h"
+#include "feature/dirauth/mode.h"
+
+#include "feature/nodelist/authority_cert_st.h"
+#include "feature/nodelist/networkstatus_st.h"
/* String prefix of shared random values in votes/consensuses. */
static const char previous_srv_str[] = "shared-rand-previous-value";
* with "sr_" which stands for shared random.
*/
-#include "or/or.h"
+#include "core/or/or.h"
/* Protocol version */
#define SR_PROTO_VERSION 1
#define SHARED_RANDOM_STATE_PRIVATE
-#include "or/or.h"
-#include "or/config.h"
-#include "or/confparse.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/dirauth/dirvote.h"
-#include "or/networkstatus.h"
-#include "or/router.h"
-#include "or/dirauth/shared_random.h"
-#include "or/shared_random_client.h"
-#include "or/dirauth/shared_random_state.h"
-#include "or/voting_schedule.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/relay/router.h"
+#include "feature/dirauth/shared_random.h"
+#include "feature/hs_common/shared_random_client.h"
+#include "feature/dirauth/shared_random_state.h"
+#include "feature/dircommon/voting_schedule.h"
#include "lib/encoding/confline.h"
-#include "or/or_state_st.h"
+#include "app/config/or_state_st.h"
/* Default filename of the shared random state on disk. */
static const char default_fname[] = "sr-state";
#ifndef TOR_SHARED_RANDOM_STATE_H
#define TOR_SHARED_RANDOM_STATE_H
-#include "or/dirauth/shared_random.h"
+#include "feature/dirauth/shared_random.h"
/* Action that can be performed on the state for any objects. */
typedef enum {
/* Copyright (c) 2017-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include "or/or.h"
+#include "core/or/or.h"
-#include "or/config.h"
-#include "or/conscache.h"
+#include "app/config/config.h"
+#include "feature/dircache/conscache.h"
#include "lib/crypt_ops/crypto_util.h"
#include "lib/fs/storagedir.h"
#include "lib/encoding/confline.h"
#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 "or/networkstatus.h"
-#include "or/routerparse.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 "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/routerparse.h"
#include "lib/evloop/compat_libevent.h"
#include "lib/evloop/workqueue.h"
#include "lib/compress/compress.h"
#include "lib/encoding/confline.h"
-#include "or/networkstatus_st.h"
-#include "or/networkstatus_voter_info_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/networkstatus_voter_info_st.h"
/**
* Labels to apply to items in the conscache object.
#define DIRECTORY_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/err/backtrace.h"
-#include "or/bridges.h"
+#include "feature/client/bridges.h"
#include "lib/container/buffers.h"
-#include "or/circuitbuild.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/conscache.h"
-#include "or/consdiff.h"
-#include "or/consdiffmgr.h"
-#include "or/control.h"
+#include "core/or/circuitbuild.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "feature/dircache/conscache.h"
+#include "feature/dircommon/consdiff.h"
+#include "feature/dircache/consdiffmgr.h"
+#include "feature/control/control.h"
#include "lib/compress/compress.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/directory.h"
-#include "or/dirserv.h"
-#include "or/entrynodes.h"
-#include "or/fp_pair.h"
-#include "or/geoip.h"
-#include "or/hs_cache.h"
-#include "or/hs_common.h"
-#include "or/hs_control.h"
-#include "or/hs_client.h"
-#include "or/main.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/relay.h"
-#include "or/rendclient.h"
-#include "or/rendcommon.h"
-#include "or/rendservice.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/routerset.h"
+#include "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/client/entrynodes.h"
+#include "feature/dircommon/fp_pair.h"
+#include "feature/stats/geoip.h"
+#include "feature/hs/hs_cache.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_control.h"
+#include "feature/hs/hs_client.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/policies.h"
+#include "core/or/relay.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendservice.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/routerset.h"
#include "lib/encoding/confline.h"
#include "lib/crypt_ops/crypto_format.h"
#endif
#endif
-#include "or/dirauth/dirvote.h"
-#include "or/dirauth/mode.h"
-#include "or/dirauth/shared_random.h"
-
-#include "or/authority_cert_st.h"
-#include "or/cached_dir_st.h"
-#include "or/dir_connection_st.h"
-#include "or/dir_server_st.h"
-#include "or/entry_connection_st.h"
-#include "or/networkstatus_st.h"
-#include "or/node_st.h"
-#include "or/rend_service_descriptor_st.h"
-#include "or/routerinfo_st.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/dirauth/mode.h"
+#include "feature/dirauth/shared_random.h"
+
+#include "feature/nodelist/authority_cert_st.h"
+#include "feature/dircache/cached_dir_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "feature/dirclient/dir_server_st.h"
+#include "core/or/entry_connection_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/node_st.h"
+#include "feature/rend/rend_service_descriptor_st.h"
+#include "feature/nodelist/routerinfo_st.h"
/**
* \file directory.c
#ifndef TOR_DIRECTORY_H
#define TOR_DIRECTORY_H
-#include "or/hs_ident.h"
+#include "feature/hs/hs_ident.h"
enum compress_method_t;
dir_connection_t *TO_DIR_CONN(connection_t *c);
/* See LICENSE for licensing information */
#define DIRSERV_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/container/buffers.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/command.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
-#include "or/conscache.h"
-#include "or/consdiffmgr.h"
-#include "or/control.h"
-#include "or/directory.h"
-#include "or/dirserv.h"
-#include "or/hibernate.h"
-#include "or/keypin.h"
-#include "or/main.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/protover.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/routerset.h"
-#include "or/torcert.h"
-#include "or/voting_schedule.h"
-
-#include "or/dirauth/dirvote.h"
-
-#include "or/cached_dir_st.h"
-#include "or/dir_connection_st.h"
-#include "or/extrainfo_st.h"
-#include "or/microdesc_st.h"
-#include "or/node_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerlist_st.h"
-#include "or/tor_version_st.h"
-#include "or/vote_routerstatus_st.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/or/command.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
+#include "feature/dircache/conscache.h"
+#include "feature/dircache/consdiffmgr.h"
+#include "feature/control/control.h"
+#include "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/hibernate/hibernate.h"
+#include "feature/dirauth/keypin.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/policies.h"
+#include "core/proto/protover.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/routerset.h"
+#include "feature/nodelist/torcert.h"
+#include "feature/dircommon/voting_schedule.h"
+
+#include "feature/dirauth/dirvote.h"
+
+#include "feature/dircache/cached_dir_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "feature/nodelist/extrainfo_st.h"
+#include "feature/nodelist/microdesc_st.h"
+#include "feature/nodelist/node_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerlist_st.h"
+#include "core/or/tor_version_st.h"
+#include "feature/nodelist/vote_routerstatus_st.h"
#include "lib/compress/compress.h"
#include "lib/container/order.h"
#define DIR_SERVER_ST_H
#include "lib/cc/torint.h"
-#include "or/or.h"
-#include "or/routerstatus_st.h"
+#include "core/or/or.h"
+#include "feature/nodelist/routerstatus_st.h"
/** Represents information about a single trusted or fallback directory
* server. */
#define CONSDIFF_PRIVATE
-#include "or/or.h"
-#include "or/consdiff.h"
+#include "core/or/or.h"
+#include "feature/dircommon/consdiff.h"
#include "lib/memarea/memarea.h"
-#include "or/routerparse.h"
+#include "feature/nodelist/routerparse.h"
static const char* ns_diff_version = "network-status-diff-version 1";
static const char* hash_token = "hash";
#ifndef TOR_CONSDIFF_H
#define TOR_CONSDIFF_H
-#include "or/or.h"
+#include "core/or/or.h"
char *consensus_diff_generate(const char *cons1,
const char *cons2);
#ifndef DIR_CONNECTION_ST_H
#define DIR_CONNECTION_ST_H
-#include "or/connection_st.h"
+#include "core/or/connection_st.h"
struct tor_compress_state_t;
* certificate for any (ID key, signing key) pair.
**/
-#include "or/or.h"
-#include "or/fp_pair.h"
+#include "core/or/or.h"
+#include "feature/dircommon/fp_pair.h"
/* Define fp_pair_map_t structures */
**/
#define VOTING_SCHEDULE_PRIVATE
-#include "or/voting_schedule.h"
+#include "feature/dircommon/voting_schedule.h"
-#include "or/or.h"
-#include "or/config.h"
-#include "or/networkstatus.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "feature/nodelist/networkstatus.h"
-#include "or/networkstatus_st.h"
+#include "feature/nodelist/networkstatus_st.h"
/* =====
* Vote scheduling
#ifndef TOR_VOTING_SCHEDULE_H
#define TOR_VOTING_SCHEDULE_H
-#include "or/or.h"
+#include "core/or/or.h"
/** Scheduling information for a voting interval. */
typedef struct {
*/
#define HIBERNATE_PRIVATE
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/hibernate.h"
-#include "or/main.h"
-#include "or/router.h"
-#include "or/statefile.h"
+#include "feature/hibernate/hibernate.h"
+#include "core/mainloop/main.h"
+#include "feature/relay/router.h"
+#include "app/config/statefile.h"
#include "lib/evloop/compat_libevent.h"
-#include "or/or_connection_st.h"
-#include "or/or_state_st.h"
+#include "core/or/or_connection_st.h"
+#include "app/config/or_state_st.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
/* For unit tests.*/
#define HS_CACHE_PRIVATE
-#include "or/or.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_format.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/hs_ident.h"
-#include "or/hs_common.h"
-#include "or/hs_client.h"
-#include "or/hs_descriptor.h"
-#include "or/networkstatus.h"
-#include "or/rendcache.h"
+#include "feature/hs/hs_ident.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_client.h"
+#include "feature/hs/hs_descriptor.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/rend/rendcache.h"
-#include "or/hs_cache.h"
+#include "feature/hs/hs_cache.h"
-#include "or/networkstatus_st.h"
+#include "feature/nodelist/networkstatus_st.h"
static int cached_client_descriptor_has_expired(time_t now,
const hs_cache_client_descriptor_t *cached_desc);
#include <stdint.h>
-#include "or/hs_common.h"
-#include "or/hs_descriptor.h"
-#include "or/rendcommon.h"
-#include "or/torcert.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_descriptor.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/nodelist/torcert.h"
struct ed25519_public_key_t;
* \brief Hidden service API for cell creation and handling.
**/
-#include "or/or.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/rendservice.h"
-#include "or/replaycache.h"
+#include "feature/rend/rendservice.h"
+#include "feature/hs_common/replaycache.h"
-#include "or/hs_cell.h"
-#include "or/hs_ntor.h"
+#include "feature/hs/hs_cell.h"
+#include "core/crypto/hs_ntor.h"
-#include "or/origin_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
/* Trunnel. */
#include "trunnel/ed25519_cert.h"
#ifndef TOR_HS_CELL_H
#define TOR_HS_CELL_H
-#include "or/or.h"
-#include "or/hs_service.h"
+#include "core/or/or.h"
+#include "feature/hs/hs_service.h"
/* An INTRODUCE1 cell requires at least this amount of bytes (see section
* 3.2.2 of the specification). Below this value, the cell must be padded. */
#define HS_CIRCUIT_PRIVATE
-#include "or/or.h"
-#include "or/circpathbias.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "feature/client/circpathbias.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_dh.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/relay.h"
-#include "or/rendservice.h"
-#include "or/rephist.h"
-#include "or/router.h"
-
-#include "or/hs_cell.h"
-#include "or/hs_circuitmap.h"
-#include "or/hs_ident.h"
-#include "or/hs_ntor.h"
-#include "or/hs_service.h"
-#include "or/hs_circuit.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/policies.h"
+#include "core/or/relay.h"
+#include "feature/rend/rendservice.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+
+#include "feature/hs/hs_cell.h"
+#include "feature/hs/hs_circuitmap.h"
+#include "feature/hs/hs_ident.h"
+#include "core/crypto/hs_ntor.h"
+#include "feature/hs/hs_service.h"
+#include "feature/hs/hs_circuit.h"
/* Trunnel. */
#include "trunnel/ed25519_cert.h"
#include "trunnel/hs/cell_common.h"
#include "trunnel/hs/cell_establish_intro.h"
-#include "or/cpath_build_state_st.h"
-#include "or/crypt_path_st.h"
-#include "or/node_st.h"
-#include "or/origin_circuit_st.h"
+#include "core/or/cpath_build_state_st.h"
+#include "core/or/crypt_path_st.h"
+#include "feature/nodelist/node_st.h"
+#include "core/or/origin_circuit_st.h"
/* A circuit is about to become an e2e rendezvous circuit. Check
* <b>circ_purpose</b> and ensure that it's properly set. Return true iff
#ifndef TOR_HS_CIRCUIT_H
#define TOR_HS_CIRCUIT_H
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/crypt_ops/crypto_ed25519.h"
-#include "or/hs_service.h"
+#include "feature/hs/hs_service.h"
/* Cleanup function when the circuit is closed or/and freed. */
void hs_circ_cleanup(circuit_t *circ);
#define HS_CIRCUITMAP_PRIVATE
-#include "or/or.h"
-#include "or/config.h"
-#include "or/circuitlist.h"
-#include "or/hs_circuitmap.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "core/or/circuitlist.h"
+#include "feature/hs/hs_circuitmap.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"
/************************** HS circuitmap code *******************************/
#define HS_CLIENT_PRIVATE
-#include "or/or.h"
-#include "or/circpathbias.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
+#include "core/or/or.h"
+#include "feature/client/circpathbias.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
#include "lib/crypt_ops/crypto_format.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/directory.h"
-#include "or/hs_cache.h"
-#include "or/hs_cell.h"
-#include "or/hs_circuit.h"
-#include "or/hs_circuitmap.h"
-#include "or/hs_client.h"
-#include "or/hs_control.h"
-#include "or/hs_descriptor.h"
-#include "or/hs_ident.h"
-#include "or/hs_ntor.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/reasons.h"
-#include "or/rendclient.h"
-#include "or/router.h"
-#include "or/routerset.h"
-
-#include "or/cpath_build_state_st.h"
-#include "or/dir_connection_st.h"
-#include "or/entry_connection_st.h"
-#include "or/extend_info_st.h"
-#include "or/origin_circuit_st.h"
+#include "feature/dircache/directory.h"
+#include "feature/hs/hs_cache.h"
+#include "feature/hs/hs_cell.h"
+#include "feature/hs/hs_circuit.h"
+#include "feature/hs/hs_circuitmap.h"
+#include "feature/hs/hs_client.h"
+#include "feature/hs/hs_control.h"
+#include "feature/hs/hs_descriptor.h"
+#include "feature/hs/hs_ident.h"
+#include "core/crypto/hs_ntor.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/reasons.h"
+#include "feature/rend/rendclient.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerset.h"
+
+#include "core/or/cpath_build_state_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/extend_info_st.h"
+#include "core/or/origin_circuit_st.h"
/* Return a human-readable string for the client fetch status code. */
static const char *
#define TOR_HS_CLIENT_H
#include "lib/crypt_ops/crypto_ed25519.h"
-#include "or/hs_descriptor.h"
-#include "or/hs_ident.h"
+#include "feature/hs/hs_descriptor.h"
+#include "feature/hs/hs_ident.h"
/* Status code of a descriptor fetch request. */
typedef enum {
#define HS_COMMON_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
-#include "or/config.h"
-#include "or/circuitbuild.h"
+#include "app/config/config.h"
+#include "core/or/circuitbuild.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/hs_cache.h"
-#include "or/hs_common.h"
-#include "or/hs_client.h"
-#include "or/hs_ident.h"
-#include "or/hs_service.h"
-#include "or/hs_circuitmap.h"
-#include "or/policies.h"
-#include "or/rendcommon.h"
-#include "or/rendservice.h"
-#include "or/routerset.h"
-#include "or/router.h"
-#include "or/shared_random_client.h"
-#include "or/dirauth/shared_random_state.h"
-
-#include "or/edge_connection_st.h"
-#include "or/networkstatus_st.h"
-#include "or/node_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/routerstatus_st.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/hs/hs_cache.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_client.h"
+#include "feature/hs/hs_ident.h"
+#include "feature/hs/hs_service.h"
+#include "feature/hs/hs_circuitmap.h"
+#include "core/or/policies.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendservice.h"
+#include "feature/nodelist/routerset.h"
+#include "feature/relay/router.h"
+#include "feature/hs_common/shared_random_client.h"
+#include "feature/dirauth/shared_random_state.h"
+
+#include "core/or/edge_connection_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/node_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "feature/nodelist/routerstatus_st.h"
/* Trunnel */
#include "trunnel/ed25519_cert.h"
#ifndef TOR_HS_COMMON_H
#define TOR_HS_COMMON_H
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/defs/x25519_sizes.h"
struct curve25519_public_key_t;
#define HS_CONFIG_PRIVATE
-#include "or/hs_common.h"
-#include "or/hs_config.h"
-#include "or/hs_service.h"
-#include "or/rendservice.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_config.h"
+#include "feature/hs/hs_service.h"
+#include "feature/rend/rendservice.h"
#include "lib/encoding/confline.h"
-#include "or/or_options_st.h"
+#include "app/config/or_options_st.h"
/* Using the given list of services, stage them into our global state. Every
* service version are handled. This function can remove entries in the given
#ifndef TOR_HS_CONFIG_H
#define TOR_HS_CONFIG_H
-#include "or/or.h"
+#include "core/or/or.h"
/* Max value for HiddenServiceMaxStreams */
#define HS_CONFIG_MAX_STREAMS_PER_RDV_CIRCUIT 65535
* \brief Contains control port event related code.
**/
-#include "or/or.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_format.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/hs_common.h"
-#include "or/hs_control.h"
-#include "or/hs_descriptor.h"
-#include "or/hs_service.h"
-#include "or/nodelist.h"
-
-#include "or/node_st.h"
-#include "or/routerstatus_st.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_control.h"
+#include "feature/hs/hs_descriptor.h"
+#include "feature/hs/hs_service.h"
+#include "feature/nodelist/nodelist.h"
+
+#include "feature/nodelist/node_st.h"
+#include "feature/nodelist/routerstatus_st.h"
/* Send on the control port the "HS_DESC REQUESTEDÂ [...]" event.
*
#ifndef TOR_HS_CONTROL_H
#define TOR_HS_CONTROL_H
-#include "or/hs_ident.h"
+#include "feature/hs/hs_ident.h"
/* Event "HS_DESC REQUESTED [...]" */
void hs_control_desc_event_requested(const ed25519_public_key_t *onion_pk,
/* For unit tests.*/
#define HS_DESCRIPTOR_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "trunnel/ed25519_cert.h" /* Trunnel interface. */
-#include "or/hs_descriptor.h"
-#include "or/circuitbuild.h"
+#include "feature/hs/hs_descriptor.h"
+#include "core/or/circuitbuild.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/parsecommon.h"
-#include "or/rendcache.h"
-#include "or/hs_cache.h"
-#include "or/hs_config.h"
-#include "or/torcert.h" /* tor_cert_encode_ed22519() */
+#include "feature/nodelist/parsecommon.h"
+#include "feature/rend/rendcache.h"
+#include "feature/hs/hs_cache.h"
+#include "feature/hs/hs_config.h"
+#include "feature/nodelist/torcert.h" /* tor_cert_encode_ed22519() */
#include "lib/memarea/memarea.h"
#include "lib/crypt_ops/crypto_format.h"
-#include "or/extend_info_st.h"
+#include "core/or/extend_info_st.h"
/* Constant string value used for the descriptor format. */
#define str_hs_desc "hs-descriptor"
#include <stdint.h>
-#include "or/or.h"
+#include "core/or/or.h"
#include "trunnel/ed25519_cert.h" /* needed for trunnel */
-#include "or/torcert.h"
+#include "feature/nodelist/torcert.h"
/* Trunnel */
struct link_specifier_t;
**/
#include "lib/crypt_ops/crypto_util.h"
-#include "or/hs_ident.h"
+#include "feature/hs/hs_ident.h"
/* Return a newly allocated circuit identifier. The given public key is copied
* identity_pk into the identifier. */
#include "lib/crypt_ops/crypto_ed25519.h"
-#include "or/hs_common.h"
+#include "feature/hs/hs_common.h"
/* Length of the rendezvous cookie that is used to connect circuits at the
* rendezvous point. */
#define HS_INTROPOINT_PRIVATE
-#include "or/or.h"
-#include "or/config.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/relay.h"
-#include "or/rendmid.h"
-#include "or/rephist.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "core/or/relay.h"
+#include "feature/rend/rendmid.h"
+#include "feature/stats/rephist.h"
#include "lib/crypt_ops/crypto_format.h"
/* Trunnel */
#include "trunnel/hs/cell_establish_intro.h"
#include "trunnel/hs/cell_introduce1.h"
-#include "or/hs_circuitmap.h"
-#include "or/hs_descriptor.h"
-#include "or/hs_intropoint.h"
-#include "or/hs_common.h"
+#include "feature/hs/hs_circuitmap.h"
+#include "feature/hs/hs_descriptor.h"
+#include "feature/hs/hs_intropoint.h"
+#include "feature/hs/hs_common.h"
-#include "or/or_circuit_st.h"
+#include "core/or/or_circuit_st.h"
/** Extract the authentication key from an ESTABLISH_INTRO or INTRODUCE1 using
* the given <b>cell_type</b> from <b>cell</b> and place it in
#define TOR_HS_INTRO_H
#include "lib/crypt_ops/crypto_curve25519.h"
-#include "or/torcert.h"
+#include "feature/nodelist/torcert.h"
/* Authentication key type in an ESTABLISH_INTRO cell. */
typedef enum {
#define HS_SERVICE_PRIVATE
-#include "or/or.h"
-#include "or/circpathbias.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/connection.h"
+#include "core/or/or.h"
+#include "feature/client/circpathbias.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/directory.h"
-#include "or/main.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/relay.h"
-#include "or/rendservice.h"
-#include "or/router.h"
-#include "or/routerkeys.h"
-#include "or/routerlist.h"
-#include "or/shared_random_client.h"
-#include "or/statefile.h"
-
-#include "or/hs_circuit.h"
-#include "or/hs_common.h"
-#include "or/hs_config.h"
-#include "or/hs_control.h"
-#include "or/hs_descriptor.h"
-#include "or/hs_ident.h"
-#include "or/hs_intropoint.h"
-#include "or/hs_service.h"
-#include "or/hs_stats.h"
-
-#include "or/dir_connection_st.h"
-#include "or/edge_connection_st.h"
-#include "or/extend_info_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/routerstatus_st.h"
+#include "feature/dircache/directory.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/relay.h"
+#include "feature/rend/rendservice.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/hs_common/shared_random_client.h"
+#include "app/config/statefile.h"
+
+#include "feature/hs/hs_circuit.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_config.h"
+#include "feature/hs/hs_control.h"
+#include "feature/hs/hs_descriptor.h"
+#include "feature/hs/hs_ident.h"
+#include "feature/hs/hs_intropoint.h"
+#include "feature/hs/hs_service.h"
+#include "feature/hs/hs_stats.h"
+
+#include "feature/dircommon/dir_connection_st.h"
+#include "core/or/edge_connection_st.h"
+#include "core/or/extend_info_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/routerstatus_st.h"
#include "lib/encoding/confline.h"
#include "lib/crypt_ops/crypto_format.h"
#include "lib/crypt_ops/crypto_curve25519.h"
#include "lib/crypt_ops/crypto_ed25519.h"
-#include "or/replaycache.h"
+#include "feature/hs_common/replaycache.h"
-#include "or/hs_common.h"
-#include "or/hs_descriptor.h"
-#include "or/hs_ident.h"
-#include "or/hs_intropoint.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_descriptor.h"
+#include "feature/hs/hs_ident.h"
+#include "feature/hs/hs_intropoint.h"
/* Trunnel */
#include "trunnel/hs/cell_establish_intro.h"
* \brief Keeps stats about the activity of our onion service(s).
**/
-#include "or/or.h"
-#include "or/hs_stats.h"
-#include "or/hs_service.h"
+#include "core/or/or.h"
+#include "feature/hs/hs_stats.h"
+#include "feature/hs/hs_service.h"
/** Number of v3 INTRODUCE2 cells received */
static uint32_t n_introduce2_v3 = 0;
#define REPLAYCACHE_PRIVATE
-#include "or/or.h"
-#include "or/replaycache.h"
+#include "core/or/or.h"
+#include "feature/hs_common/replaycache.h"
/** Free the replaycache r and all of its entries.
*/
**/
#define SHARED_RANDOM_CLIENT_PRIVATE
-#include "or/shared_random_client.h"
+#include "feature/hs_common/shared_random_client.h"
-#include "or/config.h"
-#include "or/voting_schedule.h"
-#include "or/networkstatus.h"
+#include "app/config/config.h"
+#include "feature/dircommon/voting_schedule.h"
+#include "feature/nodelist/networkstatus.h"
#include "lib/encoding/binascii.h"
-#include "or/networkstatus_st.h"
+#include "feature/nodelist/networkstatus_st.h"
/* Convert a given srv object to a string for the control port. This doesn't
* fail and the srv object MUST be valid. */
#define TOR_SHARED_RANDOM_CLIENT_H
/* Dirauth module. */
-#include "or/dirauth/shared_random.h"
+#include "feature/dirauth/shared_random.h"
/* Helper functions. */
void sr_srv_encode(char *dst, size_t dst_len, const sr_srv_t *srv);
#ifndef AUTHORITY_CERT_ST_H
#define AUTHORITY_CERT_ST_H
-#include "or/signed_descriptor_st.h"
+#include "feature/nodelist/signed_descriptor_st.h"
/** Certificate for v3 directory protocol: binds long-term authority identity
* keys to medium-term authority signing keys. */
#ifndef EXTRAINFO_ST_H
#define EXTRAINFO_ST_H
-#include "or/signed_descriptor_st.h"
+#include "feature/nodelist/signed_descriptor_st.h"
/** Information needed to keep and cache a signed extra-info document. */
struct extrainfo_t {
* less-frequently-changing router information.
*/
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/fdio/fdio.h"
-#include "or/circuitbuild.h"
-#include "or/config.h"
-#include "or/directory.h"
-#include "or/dirserv.h"
-#include "or/entrynodes.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/routerparse.h"
-
-#include "or/microdesc_st.h"
-#include "or/networkstatus_st.h"
-#include "or/node_st.h"
-#include "or/routerstatus_st.h"
+#include "core/or/circuitbuild.h"
+#include "app/config/config.h"
+#include "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/client/entrynodes.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/routerparse.h"
+
+#include "feature/nodelist/microdesc_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "feature/nodelist/node_st.h"
+#include "feature/nodelist/routerstatus_st.h"
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
*/
#define NETWORKSTATUS_PRIVATE
-#include "or/or.h"
-#include "or/bridges.h"
-#include "or/channel.h"
-#include "or/circuitmux.h"
-#include "or/circuitmux_ewma.h"
-#include "or/circuitstats.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/consdiffmgr.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "feature/client/bridges.h"
+#include "core/or/channel.h"
+#include "core/or/circuitmux.h"
+#include "core/or/circuitmux_ewma.h"
+#include "core/or/circuitstats.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/dircache/consdiffmgr.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/directory.h"
-#include "or/dirserv.h"
-#include "or/dos.h"
-#include "or/entrynodes.h"
-#include "or/hibernate.h"
-#include "or/main.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/protover.h"
-#include "or/relay.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/scheduler.h"
-#include "or/transports.h"
-#include "or/torcert.h"
-#include "or/channelpadding.h"
-#include "or/voting_schedule.h"
-
-#include "or/dirauth/dirvote.h"
-#include "or/dirauth/mode.h"
-#include "or/dirauth/shared_random.h"
-
-#include "or/authority_cert_st.h"
-#include "or/dir_connection_st.h"
-#include "or/dir_server_st.h"
-#include "or/document_signature_st.h"
-#include "or/networkstatus_st.h"
-#include "or/networkstatus_voter_info_st.h"
-#include "or/ns_detached_signatures_st.h"
-#include "or/node_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerlist_st.h"
-#include "or/vote_microdesc_hash_st.h"
-#include "or/vote_routerstatus_st.h"
+#include "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "core/or/dos.h"
+#include "feature/client/entrynodes.h"
+#include "feature/hibernate/hibernate.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/proto/protover.h"
+#include "core/or/relay.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "core/or/scheduler.h"
+#include "feature/client/transports.h"
+#include "feature/nodelist/torcert.h"
+#include "core/or/channelpadding.h"
+#include "feature/dircommon/voting_schedule.h"
+
+#include "feature/dirauth/dirvote.h"
+#include "feature/dirauth/mode.h"
+#include "feature/dirauth/shared_random.h"
+
+#include "feature/nodelist/authority_cert_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "feature/dirclient/dir_server_st.h"
+#include "feature/nodelist/document_signature_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 "feature/nodelist/node_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerlist_st.h"
+#include "feature/dirauth/vote_microdesc_hash_st.h"
+#include "feature/nodelist/vote_routerstatus_st.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#ifndef NETWORKSTATUS_ST_H
#define NETWORKSTATUS_ST_H
-#include "or/networkstatus_sr_info_st.h"
+#include "feature/nodelist/networkstatus_sr_info_st.h"
/** Enumerates the possible seriousness values of a networkstatus document. */
typedef enum networkstatus_type_t {
#ifndef NODE_ST_H
#define NODE_ST_H
-#include "or/hsdir_index_st.h"
+#include "feature/hs/hsdir_index_st.h"
#include "lib/crypt_ops/crypto_ed25519.h"
/** A node_t represents a Tor router.
#define NODELIST_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/net/address.h"
-#include "or/address_set.h"
-#include "or/bridges.h"
-#include "or/config.h"
-#include "or/control.h"
-#include "or/dirserv.h"
-#include "or/entrynodes.h"
-#include "or/geoip.h"
-#include "or/hs_common.h"
-#include "or/hs_client.h"
-#include "or/main.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/protover.h"
-#include "or/rendservice.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/routerset.h"
-#include "or/torcert.h"
+#include "core/or/address_set.h"
+#include "feature/client/bridges.h"
+#include "app/config/config.h"
+#include "feature/control/control.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/client/entrynodes.h"
+#include "feature/stats/geoip.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_client.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/policies.h"
+#include "core/proto/protover.h"
+#include "feature/rend/rendservice.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/routerset.h"
+#include "feature/nodelist/torcert.h"
#include <string.h>
-#include "or/dirauth/mode.h"
+#include "feature/dirauth/mode.h"
-#include "or/dir_server_st.h"
-#include "or/microdesc_st.h"
-#include "or/networkstatus_st.h"
-#include "or/node_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerlist_st.h"
-#include "or/routerstatus_st.h"
+#include "feature/dirclient/dir_server_st.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/routerlist_st.h"
+#include "feature/nodelist/routerstatus_st.h"
static void nodelist_drop_node(node_t *node, int remove_from_ht);
#define node_free(val) \
* \brief Common code to parse and validate various type of descriptors.
**/
-#include "or/parsecommon.h"
+#include "feature/nodelist/parsecommon.h"
#include "lib/log/torlog.h"
#include "lib/log/util_bug.h"
#include "lib/encoding/binascii.h"
#ifndef ROUTERINFO_ST_H
#define ROUTERINFO_ST_H
-#include "or/signed_descriptor_st.h"
+#include "feature/nodelist/signed_descriptor_st.h"
struct curve25519_public_key_t;
**/
#define ROUTERLIST_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "lib/err/backtrace.h"
-#include "or/bridges.h"
+#include "feature/client/bridges.h"
#include "lib/crypt_ops/crypto_ed25519.h"
#include "lib/crypt_ops/crypto_format.h"
-#include "or/circuitstats.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/control.h"
+#include "core/or/circuitstats.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/dirserv.h"
-#include "or/entrynodes.h"
-#include "or/fp_pair.h"
-#include "or/geoip.h"
-#include "or/hibernate.h"
-#include "or/main.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/reasons.h"
-#include "or/rendcommon.h"
-#include "or/rendservice.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/routerset.h"
+#include "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/client/entrynodes.h"
+#include "feature/dircommon/fp_pair.h"
+#include "feature/stats/geoip.h"
+#include "feature/hibernate/hibernate.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/policies.h"
+#include "core/or/reasons.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendservice.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/routerset.h"
#include "lib/sandbox/sandbox.h"
-#include "or/torcert.h"
+#include "feature/nodelist/torcert.h"
#include "lib/math/fp.h"
-#include "or/dirauth/dirvote.h"
-#include "or/dirauth/mode.h"
-
-#include "or/authority_cert_st.h"
-#include "or/dir_connection_st.h"
-#include "or/dir_server_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/node_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerlist_st.h"
-#include "or/vote_routerstatus_st.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/dirauth/mode.h"
+
+#include "feature/nodelist/authority_cert_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "feature/dirclient/dir_server_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/nodelist/node_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerlist_st.h"
+#include "feature/nodelist/vote_routerstatus_st.h"
#include "lib/crypt_ops/digestset.h"
#ifndef ROUTERLIST_ST_H
#define ROUTERLIST_ST_H
-#include "or/desc_store_st.h"
+#include "feature/nodelist/desc_store_st.h"
/** Contents of a directory of onion routers. */
struct routerlist_t {
#define ROUTERPARSE_PRIVATE
-#include "or/or.h"
-#include "or/circuitstats.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "core/or/circuitstats.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_format.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/dirauth/shared_random.h"
-#include "or/dirserv.h"
-#include "or/entrynodes.h"
+#include "feature/dirauth/shared_random.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/client/entrynodes.h"
#include "lib/memarea/memarea.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/parsecommon.h"
-#include "or/policies.h"
-#include "or/protover.h"
-#include "or/rendcommon.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerkeys.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/parsecommon.h"
+#include "core/or/policies.h"
+#include "core/proto/protover.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
#include "lib/sandbox/sandbox.h"
-#include "or/shared_random_client.h"
-#include "or/torcert.h"
-#include "or/voting_schedule.h"
-
-#include "or/dirauth/dirvote.h"
-
-#include "or/addr_policy_st.h"
-#include "or/authority_cert_st.h"
-#include "or/document_signature_st.h"
-#include "or/extend_info_st.h"
-#include "or/extrainfo_st.h"
-#include "or/microdesc_st.h"
-#include "or/networkstatus_st.h"
-#include "or/networkstatus_voter_info_st.h"
-#include "or/ns_detached_signatures_st.h"
-#include "or/rend_authorized_client_st.h"
-#include "or/rend_intro_point_st.h"
-#include "or/rend_service_descriptor_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 "feature/hs_common/shared_random_client.h"
+#include "feature/nodelist/torcert.h"
+#include "feature/dircommon/voting_schedule.h"
+
+#include "feature/dirauth/dirvote.h"
+
+#include "core/or/addr_policy_st.h"
+#include "feature/nodelist/authority_cert_st.h"
+#include "feature/nodelist/document_signature_st.h"
+#include "core/or/extend_info_st.h"
+#include "feature/nodelist/extrainfo_st.h"
+#include "feature/nodelist/microdesc_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 "feature/rend/rend_authorized_client_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 "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"
#include "lib/container/bloomfilt.h"
#define ROUTERSET_PRIVATE
-#include "or/or.h"
-#include "or/bridges.h"
-#include "or/geoip.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/router.h"
-#include "or/routerparse.h"
-#include "or/routerset.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/client/bridges.h"
+#include "feature/stats/geoip.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/policies.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/routerset.h"
+
+#include "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"
/** Return a new empty routerset. */
routerset_t *
#ifndef ROUTERSTATUS_ST_H
#define ROUTERSTATUS_ST_H
-#include "or/download_status_st.h"
+#include "feature/dirclient/download_status_st.h"
/** Contents of a single router entry in a network status object.
*/
#ifndef SIGNED_DESCRIPTOR_ST_H
#define SIGNED_DESCRIPTOR_ST_H
-#include "or/download_status_st.h"
+#include "feature/dirclient/download_status_st.h"
/** Information need to cache an onion router's descriptor. */
struct signed_descriptor_t {
* that one is authority_cert_t, and it's mostly handled in routerlist.c.
*/
-#include "or/or.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/torcert.h"
+#include "feature/nodelist/torcert.h"
#include "trunnel/ed25519_cert.h"
#include "lib/log/torlog.h"
#include "trunnel/link_handshake.h"
#include "lib/tls/tortls.h"
-#include "or/or_handshake_certs_st.h"
+#include "core/or/or_handshake_certs_st.h"
/** Helper for tor_cert_create(): signs any 32 bytes, not just an ed25519
* key.
#ifndef VOTE_ROUTERSTATUS_ST_H
#define VOTE_ROUTERSTATUS_ST_H
-#include "or/routerstatus_st.h"
+#include "feature/nodelist/routerstatus_st.h"
#include "lib/defs/x25519_sizes.h"
/** The claim about a single router, made in a vote. */
#define DNS_PRIVATE
-#include "or/or.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/dns.h"
-#include "or/main.h"
-#include "or/policies.h"
-#include "or/relay.h"
-#include "or/router.h"
+#include "feature/relay/dns.h"
+#include "core/mainloop/main.h"
+#include "core/or/policies.h"
+#include "core/or/relay.h"
+#include "feature/relay/router.h"
#include "ht.h"
#include "lib/sandbox/sandbox.h"
#include "lib/evloop/compat_libevent.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"
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
void dump_dns_mem_usage(int severity);
#ifdef DNS_PRIVATE
-#include "or/dns_structs.h"
+#include "feature/relay/dns_structs.h"
MOCK_DECL(STATIC int,dns_resolve_impl,(edge_connection_t *exitconn,
int is_resolve,or_circuit_t *oncirc, char **hostname_out,
*/
#define EXT_ORPORT_PRIVATE
-#include "or/or.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
-#include "or/control.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/ext_orport.h"
-#include "or/main.h"
-#include "or/proto_ext_or.h"
+#include "feature/relay/ext_orport.h"
+#include "core/mainloop/main.h"
+#include "core/proto/proto_ext_or.h"
-#include "or/or_connection_st.h"
+#include "core/or/or_connection_st.h"
/** Allocate and return a structure capable of holding an Extended
* ORPort message of body length <b>len</b>. */
#define ROUTER_PRIVATE
-#include "or/or.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
#include "lib/crypt_ops/crypto_curve25519.h"
-#include "or/directory.h"
-#include "or/dirserv.h"
-#include "or/dns.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/protover.h"
-#include "or/relay.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerkeys.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/statefile.h"
-#include "or/torcert.h"
-#include "or/transports.h"
-#include "or/routerset.h"
-
-#include "or/dirauth/mode.h"
-
-#include "or/authority_cert_st.h"
-#include "or/crypt_path_st.h"
-#include "or/dir_connection_st.h"
-#include "or/dir_server_st.h"
-#include "or/extend_info_st.h"
-#include "or/extrainfo_st.h"
-#include "or/node_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/or_state_st.h"
-#include "or/port_cfg_st.h"
-#include "or/routerinfo_st.h"
+#include "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/relay/dns.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 "core/proto/protover.h"
+#include "core/or/relay.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "app/config/statefile.h"
+#include "feature/nodelist/torcert.h"
+#include "feature/client/transports.h"
+#include "feature/nodelist/routerset.h"
+
+#include "feature/dirauth/mode.h"
+
+#include "feature/nodelist/authority_cert_st.h"
+#include "core/or/crypt_path_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "feature/dirclient/dir_server_st.h"
+#include "core/or/extend_info_st.h"
+#include "feature/nodelist/extrainfo_st.h"
+#include "feature/nodelist/node_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "app/config/or_state_st.h"
+#include "core/or/port_cfg_st.h"
+#include "feature/nodelist/routerinfo_st.h"
#include "lib/osinfo/uname.h"
#include "lib/tls/tortls.h"
* (TODO: The keys in router.c should go here too.)
*/
-#include "or/or.h"
-#include "or/config.h"
-#include "or/router.h"
-#include "or/routerkeys.h"
-#include "or/torcert.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
+#include "feature/nodelist/torcert.h"
#include "lib/crypt_ops/crypto_pwbox.h"
#include "lib/crypt_ops/crypto_util.h"
**/
#define RENDCACHE_PRIVATE
-#include "or/rendcache.h"
+#include "feature/rend/rendcache.h"
-#include "or/config.h"
-#include "or/rephist.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/rendcommon.h"
+#include "app/config/config.h"
+#include "feature/stats/rephist.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/rend/rendcommon.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"
/** Map from service id (as generated by rend_get_service_id) to
* rend_cache_entry_t. */
#ifndef TOR_RENDCACHE_H
#define TOR_RENDCACHE_H
-#include "or/or.h"
-#include "or/rendcommon.h"
+#include "core/or/or.h"
+#include "feature/rend/rendcommon.h"
/** How old do we let hidden service descriptors get before discarding
* them as too old? */
* \brief Client code to access location-hidden services.
**/
-#include "or/or.h"
-#include "or/circpathbias.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "feature/client/circpathbias.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_dh.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/directory.h"
-#include "or/hs_circuit.h"
-#include "or/hs_client.h"
-#include "or/hs_common.h"
-#include "or/main.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/relay.h"
-#include "or/rendclient.h"
-#include "or/rendcommon.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerset.h"
+#include "feature/dircache/directory.h"
+#include "feature/hs/hs_circuit.h"
+#include "feature/hs/hs_client.h"
+#include "feature/hs/hs_common.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/relay.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerset.h"
#include "lib/encoding/confline.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/origin_circuit_st.h"
-#include "or/rend_intro_point_st.h"
-#include "or/rend_service_descriptor_st.h"
-#include "or/routerstatus_st.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 "core/or/origin_circuit_st.h"
+#include "feature/rend/rend_intro_point_st.h"
+#include "feature/rend/rend_service_descriptor_st.h"
+#include "feature/nodelist/routerstatus_st.h"
static extend_info_t *rend_client_get_random_intro_impl(
const rend_cache_entry_t *rend_query,
#ifndef TOR_RENDCLIENT_H
#define TOR_RENDCLIENT_H
-#include "or/rendcache.h"
+#include "feature/rend/rendcache.h"
void rend_client_purge_state(void);
#define RENDCOMMON_PRIVATE
-#include "or/or.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/hs_client.h"
-#include "or/hs_common.h"
-#include "or/hs_intropoint.h"
-#include "or/networkstatus.h"
-#include "or/rendclient.h"
-#include "or/rendcommon.h"
-#include "or/rendmid.h"
-#include "or/rendservice.h"
-#include "or/rephist.h"
-#include "or/replaycache.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-
-#include "or/cpath_build_state_st.h"
-#include "or/crypt_path_st.h"
-#include "or/extend_info_st.h"
-#include "or/networkstatus_st.h"
-#include "or/origin_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 "or/routerstatus_st.h"
+#include "feature/hs/hs_client.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_intropoint.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendmid.h"
+#include "feature/rend/rendservice.h"
+#include "feature/stats/rephist.h"
+#include "feature/hs_common/replaycache.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+
+#include "core/or/cpath_build_state_st.h"
+#include "core/or/crypt_path_st.h"
+#include "core/or/extend_info_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "core/or/origin_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"
+#include "feature/nodelist/routerstatus_st.h"
/** Return 0 if one and two are the same service ids, else -1 or 1 */
int
* \brief Implement introductions points and rendezvous points.
**/
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto.h"
-#include "or/dos.h"
-#include "or/relay.h"
-#include "or/rendmid.h"
-#include "or/rephist.h"
-#include "or/hs_circuitmap.h"
-#include "or/hs_intropoint.h"
-
-#include "or/or_circuit_st.h"
+#include "core/or/dos.h"
+#include "core/or/relay.h"
+#include "feature/rend/rendmid.h"
+#include "feature/stats/rephist.h"
+#include "feature/hs/hs_circuitmap.h"
+#include "feature/hs/hs_intropoint.h"
+
+#include "core/or/or_circuit_st.h"
/** Respond to an ESTABLISH_INTRO cell by checking the signed data and
* setting the circuit's purpose and service pk digest.
#define RENDSERVICE_PRIVATE
-#include "or/or.h"
-#include "or/circpathbias.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "feature/client/circpathbias.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "feature/control/control.h"
#include "lib/crypt_ops/crypto_dh.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
-#include "or/directory.h"
-#include "or/hs_common.h"
-#include "or/hs_config.h"
-#include "or/main.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/rendclient.h"
-#include "or/rendcommon.h"
-#include "or/rendservice.h"
-#include "or/router.h"
-#include "or/relay.h"
-#include "or/rephist.h"
-#include "or/replaycache.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/routerset.h"
+#include "feature/dircache/directory.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_config.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/rendcommon.h"
+#include "feature/rend/rendservice.h"
+#include "feature/relay/router.h"
+#include "core/or/relay.h"
+#include "feature/stats/rephist.h"
+#include "feature/hs_common/replaycache.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/routerset.h"
#include "lib/encoding/confline.h"
-#include "or/cpath_build_state_st.h"
-#include "or/crypt_path_st.h"
-#include "or/crypt_path_reference_st.h"
-#include "or/edge_connection_st.h"
-#include "or/extend_info_st.h"
-#include "or/networkstatus_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/rend_authorized_client_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/routerstatus_st.h"
+#include "core/or/cpath_build_state_st.h"
+#include "core/or/crypt_path_st.h"
+#include "core/or/crypt_path_reference_st.h"
+#include "core/or/edge_connection_st.h"
+#include "core/or/extend_info_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "feature/rend/rend_authorized_client_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/routerstatus_st.h"
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#ifndef TOR_RENDSERVICE_H
#define TOR_RENDSERVICE_H
-#include "or/or.h"
-#include "or/hs_service.h"
+#include "core/or/or.h"
+#include "feature/hs/hs_service.h"
typedef struct rend_intro_cell_t rend_intro_cell_t;
struct config_line_t;
*/
#define GEOIP_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "ht.h"
#include "lib/container/buffers.h"
-#include "or/config.h"
-#include "or/control.h"
-#include "or/dnsserv.h"
-#include "or/dos.h"
-#include "or/geoip.h"
-#include "or/routerlist.h"
+#include "app/config/config.h"
+#include "feature/control/control.h"
+#include "feature/client/dnsserv.h"
+#include "core/or/dos.h"
+#include "feature/stats/geoip.h"
+#include "feature/nodelist/routerlist.h"
#include "lib/container/order.h"
#include "lib/time/tvdiff.h"
#define TOR_GEOIP_H
#include "lib/testsupport/testsupport.h"
-#include "or/dos.h"
+#include "core/or/dos.h"
/** Indicates an action that we might be noting geoip statistics on.
* Note that if we're noticing CONNECT, we're a bridge, and if we're noticing
* (The "rephist" name originally stood for "reputation and history". )
**/
-#include "or/or.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
#include "lib/crypt_ops/crypto_rand.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
#include "ht.h"
-#include "or/channelpadding.h"
-#include "or/connection_or.h"
-#include "or/statefile.h"
+#include "core/or/channelpadding.h"
+#include "core/or/connection_or.h"
+#include "app/config/statefile.h"
-#include "or/networkstatus_st.h"
-#include "or/or_circuit_st.h"
-#include "or/or_state_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "core/or/or_circuit_st.h"
+#include "app/config/or_state_st.h"
#include "lib/container/bloomfilt.h"
#include "lib/container/order.h"
#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"
/* 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
/* 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
#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"
#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"
/* 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
/* 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"
#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"
#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"
#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"
/* 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"
/* 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"
/* 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"
/* 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"
/* 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 *
#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(
/* 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
/* 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,
/* 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
#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
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
/* 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
#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
#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"
/* 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"
#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"
/* 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"
#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 */
#define TOKEN_BUCKET_PRIVATE
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#include "lib/evloop/token_bucket.h"
#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"
#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)
#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"
#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);
#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"
/* See LICENSE for licensing information */
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#ifdef _WIN32
#include <direct.h>
#include <dirent.h>
#endif
-#include "or/config.h"
+#include "app/config/config.h"
#include "test/test.h"
#ifdef HAVE_SYS_STAT_H
#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;
#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"
#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 *
#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);
#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)
#define COMPAT_LIBEVENT_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#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"
#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,
/* 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"
#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"
#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"
/* 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"
/* 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)
#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,
#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"
#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"
#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>
#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,
* 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
#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() */
/* 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
#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"
#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"
#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"
#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"
/* 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
#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"
#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"
* 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
#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);
#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"
#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"
#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"
#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)
#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
#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)
#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"
#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"
#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"
#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.
#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)) { \
#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"
#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 */
#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"
#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"
#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"
#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;
/* 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"
* \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"
#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)) { \
#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. */
#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;
/* 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
#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. */
/* 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. */
#define PROCMON_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#include "lib/evloop/procmon.h"
* \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
* \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)
#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)
#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)
/* 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"
#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;
* 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"
/* 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"
#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 =
* \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"
#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
#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"
#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"
#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"
#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>
#include <fcntl.h>
#endif
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
struct testgroup_t testgroups[] = {
* 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 {
#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"
/* 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"
/* 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
/* 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"
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"
#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"
/* See LICENSE for licensing information */
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#define UTIL_PROCESS_PRIVATE
#include "orconfig.h"
-#include "or/or.h"
+#include "core/or/or.h"
#include "test/test.h"
#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"
* 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"
#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"
#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.
* functions. Don't add more dependencies!
*/
-#include "or/tor_api.h"
-#include "or/tor_api_internal.h"
+#include "feature/api/tor_api.h"
+#include "feature/api/tor_api_internal.h"
#include "orconfig.h"
#ifdef HAVE_UNISTD_H