diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-20 09:35:05 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-20 09:35:05 -0400 |
commit | 0dab29ce1069c2ebec22a75669aa8242fdc15882 (patch) | |
tree | c4db0ff4bef4870ac94c1d38135e4c0bf94d47d9 /src/or | |
parent | 257b28077676f6d8a3c0d2beef37a9414c747de9 (diff) | |
download | tor-0dab29ce1069c2ebec22a75669aa8242fdc15882.tar.gz tor-0dab29ce1069c2ebec22a75669aa8242fdc15882.zip |
Run rectify_include_paths.py
Diffstat (limited to 'src/or')
172 files changed, 1965 insertions, 1965 deletions
diff --git a/src/or/addressmap.c b/src/or/addressmap.c index 566dc032a1..9ca2326273 100644 --- a/src/or/addressmap.c +++ b/src/or/addressmap.c @@ -15,18 +15,18 @@ #define ADDRESSMAP_PRIVATE -#include "or.h" -#include "addressmap.h" -#include "circuituse.h" -#include "config.h" -#include "connection_edge.h" -#include "control.h" -#include "crypto_rand.h" -#include "dns.h" -#include "nodelist.h" -#include "routerset.h" - -#include "entry_connection_st.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 "common/crypto_rand.h" +#include "or/dns.h" +#include "or/nodelist.h" +#include "or/routerset.h" + +#include "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 diff --git a/src/or/addressmap.h b/src/or/addressmap.h index b73915446b..0d53e77772 100644 --- a/src/or/addressmap.h +++ b/src/or/addressmap.h @@ -7,7 +7,7 @@ #ifndef TOR_ADDRESSMAP_H #define TOR_ADDRESSMAP_H -#include "testsupport.h" +#include "common/testsupport.h" void addressmap_init(void); void addressmap_clear_excluded_trackexithosts(const or_options_t *options); diff --git a/src/or/authority_cert_st.h b/src/or/authority_cert_st.h index c8fbc52381..19c3fda2de 100644 --- a/src/or/authority_cert_st.h +++ b/src/or/authority_cert_st.h @@ -7,7 +7,7 @@ #ifndef AUTHORITY_CERT_ST_H #define AUTHORITY_CERT_ST_H -#include "signed_descriptor_st.h" +#include "or/signed_descriptor_st.h" /** Certificate for v3 directory protocol: binds long-term authority identity * keys to medium-term authority signing keys. */ diff --git a/src/or/bridges.c b/src/or/bridges.c index e7e16dda62..ca0a13f2a0 100644 --- a/src/or/bridges.c +++ b/src/or/bridges.c @@ -13,24 +13,24 @@ #define TOR_BRIDGES_PRIVATE -#include "or.h" -#include "bridges.h" -#include "circuitbuild.h" -#include "config.h" -#include "connection.h" -#include "directory.h" -#include "entrynodes.h" -#include "nodelist.h" -#include "policies.h" -#include "router.h" -#include "routerlist.h" -#include "routerset.h" -#include "transports.h" - -#include "extend_info_st.h" -#include "node_st.h" -#include "routerinfo_st.h" -#include "routerstatus_st.h" +#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" /** 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 diff --git a/src/or/channel.c b/src/or/channel.c index 8ed36900d9..2cf5b8a2a7 100644 --- a/src/or/channel.c +++ b/src/or/channel.c @@ -57,30 +57,30 @@ /* This one's for stuff only channel.c and the test suite should see */ #define CHANNEL_PRIVATE_ -#include "or.h" -#include "channel.h" -#include "channeltls.h" -#include "channelpadding.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuitstats.h" -#include "config.h" -#include "connection_or.h" /* For var_cell_free() */ -#include "circuitmux.h" -#include "entrynodes.h" -#include "geoip.h" -#include "main.h" -#include "nodelist.h" -#include "relay.h" -#include "rephist.h" -#include "router.h" -#include "routerlist.h" -#include "scheduler.h" -#include "compat_time.h" -#include "networkstatus.h" -#include "rendservice.h" - -#include "cell_queue_st.h" +#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 "common/compat_time.h" +#include "or/networkstatus.h" +#include "or/rendservice.h" + +#include "or/cell_queue_st.h" /* Global lists of channels */ diff --git a/src/or/channel.h b/src/or/channel.h index 57d010b362..44b752e2c5 100644 --- a/src/or/channel.h +++ b/src/or/channel.h @@ -9,10 +9,10 @@ #ifndef TOR_CHANNEL_H #define TOR_CHANNEL_H -#include "or.h" -#include "circuitmux.h" -#include "timers.h" -#include "handles.h" +#include "or/or.h" +#include "or/circuitmux.h" +#include "common/timers.h" +#include "common/handles.h" /* Channel handler function pointer typedefs */ typedef void (*channel_listener_fn_ptr)(channel_listener_t *, channel_t *); diff --git a/src/or/channelpadding.c b/src/or/channelpadding.c index 889506414e..190f54f298 100644 --- a/src/or/channelpadding.c +++ b/src/or/channelpadding.c @@ -8,23 +8,23 @@ * channelpadding_channel_to_channelinfo() */ #define TOR_CHANNEL_INTERNAL_ -#include "or.h" -#include "channel.h" -#include "channelpadding.h" -#include "channeltls.h" -#include "config.h" -#include "networkstatus.h" -#include "connection.h" -#include "connection_or.h" -#include "crypto_rand.h" -#include "main.h" -#include "rephist.h" -#include "router.h" -#include "compat_time.h" -#include "rendservice.h" - -#include "cell_st.h" -#include "or_connection_st.h" +#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 "common/crypto_rand.h" +#include "or/main.h" +#include "or/rephist.h" +#include "or/router.h" +#include "common/compat_time.h" +#include "or/rendservice.h" + +#include "or/cell_st.h" +#include "or/or_connection_st.h" STATIC int32_t channelpadding_get_netflow_inactive_timeout_ms( const channel_t *); diff --git a/src/or/channelpadding.h b/src/or/channelpadding.h index fb8d812e94..7eddbdbe2d 100644 --- a/src/or/channelpadding.h +++ b/src/or/channelpadding.h @@ -11,7 +11,7 @@ #ifndef TOR_CHANNELPADDING_H #define TOR_CHANNELPADDING_H -#include "channelpadding_negotiation.h" +#include "trunnel/channelpadding_negotiation.h" #define CHANNELPADDING_TOR2WEB_PARAM "nf_pad_tor2web" #define CHANNELPADDING_TOR2WEB_DEFAULT 1 diff --git a/src/or/channeltls.c b/src/or/channeltls.c index 4bbfd4832b..5258935aee 100644 --- a/src/or/channeltls.c +++ b/src/or/channeltls.c @@ -38,36 +38,36 @@ #define CHANNELTLS_PRIVATE -#include "or.h" -#include "channel.h" -#include "channeltls.h" -#include "circuitmux.h" -#include "circuitmux_ewma.h" -#include "command.h" -#include "config.h" -#include "connection.h" -#include "connection_or.h" -#include "control.h" -#include "entrynodes.h" -#include "link_handshake.h" -#include "relay.h" -#include "rephist.h" -#include "router.h" -#include "routerlist.h" -#include "scheduler.h" -#include "torcert.h" -#include "networkstatus.h" -#include "channelpadding_negotiation.h" -#include "channelpadding.h" - -#include "cell_st.h" -#include "cell_queue_st.h" -#include "extend_info_st.h" -#include "or_connection_st.h" -#include "or_handshake_certs_st.h" -#include "or_handshake_state_st.h" -#include "routerinfo_st.h" -#include "var_cell_st.h" +#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 "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 "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" /** How many CELL_PADDING cells have we received, ever? */ uint64_t stats_n_padding_cells_processed = 0; diff --git a/src/or/channeltls.h b/src/or/channeltls.h index 72788b5066..be74127c9a 100644 --- a/src/or/channeltls.h +++ b/src/or/channeltls.h @@ -9,8 +9,8 @@ #ifndef TOR_CHANNELTLS_H #define TOR_CHANNELTLS_H -#include "or.h" -#include "channel.h" +#include "or/or.h" +#include "or/channel.h" #define BASE_CHAN_TO_TLS(c) (channel_tls_from_base((c))) #define TLS_CHAN_TO_BASE(c) (channel_tls_to_base((c))) diff --git a/src/or/circpathbias.c b/src/or/circpathbias.c index 489a433828..ace29c4a06 100644 --- a/src/or/circpathbias.c +++ b/src/or/circpathbias.c @@ -21,25 +21,25 @@ * each guard, and stored persistently in the state file. */ -#include "or.h" -#include "channel.h" -#include "circpathbias.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "circuitstats.h" -#include "connection_edge.h" -#include "config.h" -#include "crypto_rand.h" -#include "entrynodes.h" -#include "networkstatus.h" -#include "relay.h" - -#include "cell_st.h" -#include "cpath_build_state_st.h" -#include "crypt_path_st.h" -#include "extend_info_st.h" -#include "origin_circuit_st.h" +#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 "common/crypto_rand.h" +#include "or/entrynodes.h" +#include "or/networkstatus.h" +#include "or/relay.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" static void pathbias_count_successful_close(origin_circuit_t *circ); static void pathbias_count_collapse(origin_circuit_t *circ); diff --git a/src/or/circuit_st.h b/src/or/circuit_st.h index 9657782ed2..0ace64f3ee 100644 --- a/src/or/circuit_st.h +++ b/src/or/circuit_st.h @@ -7,9 +7,9 @@ #ifndef CIRCUIT_ST_H #define CIRCUIT_ST_H -#include "or.h" +#include "or/or.h" -#include "cell_queue_st.h" +#include "or/cell_queue_st.h" /** * A circuit is a path over the onion routing diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index fcd08d83f5..f527082773 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -27,54 +27,54 @@ #define CIRCUITBUILD_PRIVATE -#include "or.h" -#include "bridges.h" -#include "channel.h" -#include "circpathbias.h" +#include "or/or.h" +#include "or/bridges.h" +#include "or/channel.h" +#include "or/circpathbias.h" #define CIRCUITBUILD_PRIVATE -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuitstats.h" -#include "circuituse.h" -#include "command.h" -#include "config.h" -#include "confparse.h" -#include "connection.h" -#include "connection_edge.h" -#include "connection_or.h" -#include "control.h" -#include "crypto_rand.h" -#include "directory.h" -#include "entrynodes.h" -#include "hs_ntor.h" -#include "main.h" -#include "microdesc.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "onion.h" -#include "onion_tap.h" -#include "onion_fast.h" -#include "policies.h" -#include "relay.h" -#include "relay_crypto.h" -#include "rendcommon.h" -#include "rephist.h" -#include "router.h" -#include "routerlist.h" -#include "routerparse.h" -#include "routerset.h" -#include "transports.h" - -#include "cell_st.h" -#include "cpath_build_state_st.h" -#include "entry_connection_st.h" -#include "extend_info_st.h" -#include "node_st.h" -#include "or_circuit_st.h" -#include "origin_circuit_st.h" -#include "microdesc_st.h" -#include "routerinfo_st.h" -#include "routerstatus_st.h" +#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 "common/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" static channel_t * channel_connect_for_circuit(const tor_addr_t *addr, uint16_t port, diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 99ce65448d..c3d017bf8d 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -51,54 +51,54 @@ * logic, which was originally circuit-focused. **/ #define CIRCUITLIST_PRIVATE -#include "torint.h" /* TOR_PRIuSZ */ - -#include "or.h" -#include "channel.h" -#include "circpathbias.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "circuitstats.h" -#include "connection.h" -#include "config.h" -#include "connection_edge.h" -#include "connection_or.h" -#include "control.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "directory.h" -#include "entrynodes.h" -#include "main.h" -#include "hs_circuit.h" -#include "hs_circuitmap.h" -#include "hs_ident.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "onion.h" -#include "onion_fast.h" -#include "policies.h" -#include "relay.h" -#include "relay_crypto.h" -#include "rendclient.h" -#include "rendcommon.h" -#include "rephist.h" -#include "routerlist.h" -#include "routerset.h" -#include "channelpadding.h" -#include "compress_lzma.h" -#include "compress_zlib.h" -#include "compress_zstd.h" +#include "common/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 "common/crypto_rand.h" +#include "common/crypto_util.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 "common/compress_lzma.h" +#include "common/compress_zlib.h" +#include "common/compress_zstd.h" #include "ht.h" -#include "cpath_build_state_st.h" -#include "crypt_path_reference_st.h" -#include "dir_connection_st.h" -#include "edge_connection_st.h" -#include "extend_info_st.h" -#include "or_circuit_st.h" -#include "origin_circuit_st.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" /********* START VARIABLES **********/ diff --git a/src/or/circuitlist.h b/src/or/circuitlist.h index 2885a073b8..9f80c3efde 100644 --- a/src/or/circuitlist.h +++ b/src/or/circuitlist.h @@ -12,8 +12,8 @@ #ifndef TOR_CIRCUITLIST_H #define TOR_CIRCUITLIST_H -#include "testsupport.h" -#include "hs_ident.h" +#include "common/testsupport.h" +#include "or/hs_ident.h" /** Convert a circuit_t* to a pointer to the enclosing or_circuit_t. Assert * if the cast is impossible. */ diff --git a/src/or/circuitmux.c b/src/or/circuitmux.c index 80f65f0aa0..31f9281ebb 100644 --- a/src/or/circuitmux.c +++ b/src/or/circuitmux.c @@ -69,15 +69,15 @@ * made to attach all existing circuits to the new policy. **/ -#include "or.h" -#include "channel.h" -#include "circuitlist.h" -#include "circuitmux.h" -#include "relay.h" - -#include "cell_queue_st.h" -#include "destroy_cell_queue_st.h" -#include "or_circuit_st.h" +#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" /* * Private typedefs for circuitmux.c diff --git a/src/or/circuitmux.h b/src/or/circuitmux.h index 1af73340e0..68bcbf6e75 100644 --- a/src/or/circuitmux.h +++ b/src/or/circuitmux.h @@ -9,8 +9,8 @@ #ifndef TOR_CIRCUITMUX_H #define TOR_CIRCUITMUX_H -#include "or.h" -#include "testsupport.h" +#include "or/or.h" +#include "common/testsupport.h" typedef struct circuitmux_policy_s circuitmux_policy_t; typedef struct circuitmux_policy_data_s circuitmux_policy_data_t; diff --git a/src/or/circuitmux_ewma.c b/src/or/circuitmux_ewma.c index 631dc7c3ae..3b144e7d98 100644 --- a/src/or/circuitmux_ewma.c +++ b/src/or/circuitmux_ewma.c @@ -34,11 +34,11 @@ #include <math.h> -#include "or.h" -#include "circuitmux.h" -#include "circuitmux_ewma.h" -#include "crypto_rand.h" -#include "networkstatus.h" +#include "or/or.h" +#include "or/circuitmux.h" +#include "or/circuitmux_ewma.h" +#include "common/crypto_rand.h" +#include "or/networkstatus.h" /*** EWMA parameter #defines ***/ diff --git a/src/or/circuitmux_ewma.h b/src/or/circuitmux_ewma.h index c0c94101a0..1214b0264b 100644 --- a/src/or/circuitmux_ewma.h +++ b/src/or/circuitmux_ewma.h @@ -9,8 +9,8 @@ #ifndef TOR_CIRCUITMUX_EWMA_H #define TOR_CIRCUITMUX_EWMA_H -#include "or.h" -#include "circuitmux.h" +#include "or/or.h" +#include "or/circuitmux.h" /* The public EWMA policy callbacks object. */ extern circuitmux_policy_t ewma_policy; diff --git a/src/or/circuitstats.c b/src/or/circuitstats.c index 202de567b5..ebd082306d 100644 --- a/src/or/circuitstats.c +++ b/src/or/circuitstats.c @@ -25,24 +25,24 @@ #define CIRCUITSTATS_PRIVATE -#include "or.h" -#include "circuitbuild.h" -#include "circuitstats.h" -#include "config.h" -#include "confparse.h" -#include "control.h" -#include "crypto_rand.h" -#include "main.h" -#include "networkstatus.h" -#include "rendclient.h" -#include "rendservice.h" -#include "router.h" -#include "statefile.h" -#include "circuitlist.h" -#include "circuituse.h" - -#include "crypt_path_st.h" -#include "origin_circuit_st.h" +#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 "common/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 "or/crypt_path_st.h" +#include "or/origin_circuit_st.h" #undef log #include <math.h> diff --git a/src/or/circuituse.c b/src/or/circuituse.c index e46d1459b3..0ba3f34b40 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -27,43 +27,43 @@ * logic in circuitstats.c. **/ -#include "or.h" -#include "addressmap.h" -#include "bridges.h" -#include "channel.h" -#include "circpathbias.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuitstats.h" -#include "circuituse.h" -#include "config.h" -#include "connection.h" -#include "connection_edge.h" -#include "control.h" -#include "directory.h" -#include "entrynodes.h" -#include "hs_common.h" -#include "hs_client.h" -#include "hs_circuit.h" -#include "hs_ident.h" -#include "hs_stats.h" -#include "nodelist.h" -#include "networkstatus.h" -#include "policies.h" -#include "rendclient.h" -#include "rendcommon.h" -#include "rendservice.h" -#include "rephist.h" -#include "router.h" -#include "routerlist.h" - -#include "cpath_build_state_st.h" -#include "dir_connection_st.h" -#include "entry_connection_st.h" -#include "extend_info_st.h" -#include "or_circuit_st.h" -#include "origin_circuit_st.h" -#include "socks_request_st.h" +#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 "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" static void circuit_expire_old_circuits_clientside(void); static void circuit_increment_failure_count(void); diff --git a/src/or/command.c b/src/or/command.c index 0c92927ec0..dd8e7d6f3e 100644 --- a/src/or/command.c +++ b/src/or/command.c @@ -36,30 +36,30 @@ * callbacks registered in command_setup_channel(), * called when channels are created in circuitbuild.c */ -#include "or.h" -#include "channel.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "command.h" -#include "connection.h" -#include "connection_or.h" -#include "config.h" -#include "control.h" -#include "cpuworker.h" -#include "crypto_util.h" -#include "dos.h" -#include "hibernate.h" -#include "nodelist.h" -#include "onion.h" -#include "rephist.h" -#include "relay.h" -#include "router.h" -#include "routerlist.h" - -#include "cell_st.h" -#include "or_circuit_st.h" -#include "origin_circuit_st.h" -#include "var_cell_st.h" +#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 "common/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" /** How many CELL_CREATE cells have we received, ever? */ uint64_t stats_n_create_cells_processed = 0; diff --git a/src/or/command.h b/src/or/command.h index 5bdfa92fd8..864a5b2fd0 100644 --- a/src/or/command.h +++ b/src/or/command.h @@ -12,7 +12,7 @@ #ifndef TOR_COMMAND_H #define TOR_COMMAND_H -#include "channel.h" +#include "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); diff --git a/src/or/config.c b/src/or/config.c index 401c57f697..8c6e2382fb 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -60,64 +60,64 @@ **/ #define CONFIG_PRIVATE -#include "or.h" -#include "bridges.h" -#include "compat.h" -#include "addressmap.h" -#include "channel.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuitmux.h" -#include "circuitmux_ewma.h" -#include "circuitstats.h" -#include "compress.h" -#include "config.h" -#include "connection.h" -#include "connection_edge.h" -#include "connection_or.h" -#include "consdiffmgr.h" -#include "control.h" -#include "confparse.h" -#include "cpuworker.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "dirserv.h" -#include "dns.h" -#include "dos.h" -#include "entrynodes.h" -#include "git_revision.h" -#include "geoip.h" -#include "hibernate.h" -#include "main.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "policies.h" -#include "relay.h" -#include "rendclient.h" -#include "rendservice.h" -#include "hs_config.h" -#include "rephist.h" -#include "router.h" -#include "sandbox.h" -#include "util.h" -#include "routerlist.h" -#include "routerset.h" -#include "scheduler.h" -#include "statefile.h" -#include "transports.h" -#include "ext_orport.h" -#include "voting_schedule.h" +#include "or/or.h" +#include "or/bridges.h" +#include "common/compat.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 "common/compress.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 "or/confparse.h" +#include "or/cpuworker.h" +#include "common/crypto_rand.h" +#include "common/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 "common/sandbox.h" +#include "common/util.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" #ifdef _WIN32 #include <shlobj.h> #endif -#include "procmon.h" +#include "common/procmon.h" -#include "dirauth/dirvote.h" -#include "dirauth/mode.h" +#include "or/dirauth/dirvote.h" +#include "or/dirauth/mode.h" -#include "connection_st.h" -#include "port_cfg_st.h" +#include "or/connection_st.h" +#include "or/port_cfg_st.h" #ifdef HAVE_SYSTEMD # if defined(__COVERITY__) && !defined(__INCLUDE_LEVEL__) diff --git a/src/or/config.h b/src/or/config.h index 4e901651dd..a94cd77538 100644 --- a/src/or/config.h +++ b/src/or/config.h @@ -12,7 +12,7 @@ #ifndef TOR_CONFIG_H #define TOR_CONFIG_H -#include "testsupport.h" +#include "common/testsupport.h" #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(DARWIN) #define KERNEL_MAY_SUPPORT_IPFW diff --git a/src/or/confparse.c b/src/or/confparse.c index 78fc581c7c..e88c4f72d8 100644 --- a/src/or/confparse.c +++ b/src/or/confparse.c @@ -22,9 +22,9 @@ * specified, and a linked list of key-value pairs. */ -#include "or.h" -#include "confparse.h" -#include "routerset.h" +#include "or/or.h" +#include "or/confparse.h" +#include "or/routerset.h" static uint64_t config_parse_memunit(const char *s, int *ok); static int config_parse_msec_interval(const char *s, int *ok); diff --git a/src/or/connection.c b/src/or/connection.c index 8915e46cc0..267719881f 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -55,54 +55,54 @@ **/ #define CONNECTION_PRIVATE -#include "or.h" -#include "bridges.h" -#include "buffers.h" -#include "buffers_tls.h" +#include "or/or.h" +#include "or/bridges.h" +#include "common/buffers.h" +#include "common/buffers_tls.h" /* * Define this so we get channel internal functions, since we're implementing * part of a subclass (channel_tls_t). */ #define TOR_CHANNEL_INTERNAL_ #define CONNECTION_PRIVATE -#include "backtrace.h" -#include "channel.h" -#include "channeltls.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "config.h" -#include "connection.h" -#include "connection_edge.h" -#include "connection_or.h" -#include "control.h" -#include "crypto_util.h" -#include "directory.h" -#include "dirserv.h" -#include "dns.h" -#include "dnsserv.h" -#include "dos.h" -#include "entrynodes.h" -#include "ext_orport.h" -#include "geoip.h" -#include "main.h" -#include "hibernate.h" -#include "hs_common.h" -#include "hs_ident.h" -#include "nodelist.h" -#include "proto_http.h" -#include "proto_socks.h" -#include "policies.h" -#include "reasons.h" -#include "relay.h" -#include "rendclient.h" -#include "rendcommon.h" -#include "rephist.h" -#include "router.h" -#include "routerlist.h" -#include "transports.h" -#include "routerparse.h" -#include "sandbox.h" +#include "common/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 "common/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 "common/sandbox.h" #ifdef HAVE_PWD_H #include <pwd.h> @@ -113,14 +113,14 @@ #include <sys/un.h> #endif -#include "dir_connection_st.h" -#include "control_connection_st.h" -#include "entry_connection_st.h" -#include "listener_connection_st.h" -#include "or_connection_st.h" -#include "port_cfg_st.h" -#include "routerinfo_st.h" -#include "socks_request_st.h" +#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" static connection_t *connection_listener_new( const struct sockaddr *listensockaddr, diff --git a/src/or/connection.h b/src/or/connection.h index 7cfd4c51ce..7fcf710215 100644 --- a/src/or/connection.h +++ b/src/or/connection.h @@ -15,7 +15,7 @@ listener_connection_t *TO_LISTENER_CONN(connection_t *); /* XXXX For buf_datalen in inline function */ -#include "buffers.h" +#include "common/buffers.h" const char *conn_type_to_string(int type); const char *conn_state_to_string(int type, int state); diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index b351a2442b..125709786d 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -55,57 +55,57 @@ **/ #define CONNECTION_EDGE_PRIVATE -#include "or.h" - -#include "backtrace.h" - -#include "addressmap.h" -#include "buffers.h" -#include "channel.h" -#include "circpathbias.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "config.h" -#include "connection.h" -#include "connection_edge.h" -#include "connection_or.h" -#include "control.h" -#include "crypto_util.h" -#include "dns.h" -#include "dnsserv.h" -#include "directory.h" -#include "dirserv.h" -#include "hibernate.h" -#include "hs_common.h" -#include "hs_cache.h" -#include "hs_client.h" -#include "hs_circuit.h" -#include "main.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "policies.h" -#include "proto_http.h" -#include "proto_socks.h" -#include "reasons.h" -#include "relay.h" -#include "rendclient.h" -#include "rendcommon.h" -#include "rendservice.h" -#include "rephist.h" -#include "router.h" -#include "routerlist.h" -#include "routerset.h" -#include "circuitbuild.h" - -#include "cell_st.h" -#include "cpath_build_state_st.h" -#include "dir_connection_st.h" -#include "entry_connection_st.h" -#include "extend_info_st.h" -#include "node_st.h" -#include "or_circuit_st.h" -#include "origin_circuit_st.h" -#include "socks_request_st.h" +#include "or/or.h" + +#include "common/backtrace.h" + +#include "or/addressmap.h" +#include "common/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 "common/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" #ifdef HAVE_LINUX_TYPES_H #include <linux/types.h> diff --git a/src/or/connection_edge.h b/src/or/connection_edge.h index d8607af5a0..9d480aec2e 100644 --- a/src/or/connection_edge.h +++ b/src/or/connection_edge.h @@ -12,7 +12,7 @@ #ifndef TOR_CONNECTION_EDGE_H #define TOR_CONNECTION_EDGE_H -#include "testsupport.h" +#include "common/testsupport.h" edge_connection_t *TO_EDGE_CONN(connection_t *); entry_connection_t *TO_ENTRY_CONN(connection_t *); diff --git a/src/or/connection_or.c b/src/or/connection_or.c index 772a774233..aff5f105a1 100644 --- a/src/or/connection_or.c +++ b/src/or/connection_or.c @@ -20,54 +20,54 @@ * * This module also implements the client side of the v3 Tor link handshake, **/ -#include "or.h" -#include "bridges.h" -#include "buffers.h" +#include "or/or.h" +#include "or/bridges.h" +#include "common/buffers.h" /* * Define this so we get channel internal functions, since we're implementing * part of a subclass (channel_tls_t). */ #define TOR_CHANNEL_INTERNAL_ #define CONNECTION_OR_PRIVATE -#include "channel.h" -#include "channeltls.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuitstats.h" -#include "command.h" -#include "config.h" -#include "connection.h" -#include "connection_or.h" -#include "control.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "dirserv.h" -#include "entrynodes.h" -#include "geoip.h" -#include "main.h" -#include "link_handshake.h" -#include "microdesc.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "proto_cell.h" -#include "reasons.h" -#include "relay.h" -#include "rephist.h" -#include "router.h" -#include "routerkeys.h" -#include "routerlist.h" -#include "ext_orport.h" -#include "scheduler.h" -#include "torcert.h" -#include "channelpadding.h" - -#include "cell_st.h" -#include "cell_queue_st.h" -#include "or_connection_st.h" -#include "or_handshake_certs_st.h" -#include "or_handshake_state_st.h" -#include "routerinfo_st.h" -#include "var_cell_st.h" +#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 "common/crypto_rand.h" +#include "common/crypto_util.h" +#include "or/dirserv.h" +#include "or/entrynodes.h" +#include "or/geoip.h" +#include "or/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/routerinfo_st.h" +#include "or/var_cell_st.h" static int connection_tls_finish_handshake(or_connection_t *conn); static int connection_or_launch_v3_or_handshake(or_connection_t *conn); diff --git a/src/or/conscache.c b/src/or/conscache.c index 48ff49120c..5bfd78a786 100644 --- a/src/or/conscache.c +++ b/src/or/conscache.c @@ -1,12 +1,12 @@ /* Copyright (c) 2017-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ -#include "or.h" +#include "or/or.h" -#include "config.h" -#include "conscache.h" -#include "crypto_util.h" -#include "storagedir.h" +#include "or/config.h" +#include "or/conscache.h" +#include "common/crypto_util.h" +#include "common/storagedir.h" #define CCE_MAGIC 0x17162253 diff --git a/src/or/conscache.h b/src/or/conscache.h index 738516d1c9..20af6402c5 100644 --- a/src/or/conscache.h +++ b/src/or/conscache.h @@ -4,7 +4,7 @@ #ifndef TOR_CONSCACHE_H #define TOR_CONSCACHE_H -#include "handles.h" +#include "common/handles.h" typedef struct consensus_cache_entry_t consensus_cache_entry_t; typedef struct consensus_cache_t consensus_cache_t; diff --git a/src/or/consdiff.c b/src/or/consdiff.c index 1001d30fb3..59e27c0aeb 100644 --- a/src/or/consdiff.c +++ b/src/or/consdiff.c @@ -38,10 +38,10 @@ #define CONSDIFF_PRIVATE -#include "or.h" -#include "consdiff.h" -#include "memarea.h" -#include "routerparse.h" +#include "or/or.h" +#include "or/consdiff.h" +#include "common/memarea.h" +#include "or/routerparse.h" static const char* ns_diff_version = "network-status-diff-version 1"; static const char* hash_token = "hash"; diff --git a/src/or/consdiff.h b/src/or/consdiff.h index 23c006860a..3f73b8536c 100644 --- a/src/or/consdiff.h +++ b/src/or/consdiff.h @@ -5,7 +5,7 @@ #ifndef TOR_CONSDIFF_H #define TOR_CONSDIFF_H -#include "or.h" +#include "or/or.h" char *consensus_diff_generate(const char *cons1, const char *cons2); diff --git a/src/or/consdiffmgr.c b/src/or/consdiffmgr.c index abb8f55839..7732cd1093 100644 --- a/src/or/consdiffmgr.c +++ b/src/or/consdiffmgr.c @@ -13,18 +13,18 @@ #define CONSDIFFMGR_PRIVATE -#include "or.h" -#include "config.h" -#include "conscache.h" -#include "consdiff.h" -#include "consdiffmgr.h" -#include "cpuworker.h" -#include "networkstatus.h" -#include "routerparse.h" -#include "workqueue.h" - -#include "networkstatus_st.h" -#include "networkstatus_voter_info_st.h" +#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 "common/workqueue.h" + +#include "or/networkstatus_st.h" +#include "or/networkstatus_voter_info_st.h" /** * Labels to apply to items in the conscache object. diff --git a/src/or/control.c b/src/or/control.c index 181667b3b7..8d6da9c099 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -35,77 +35,77 @@ #define CONTROL_PRIVATE -#include "or.h" -#include "addressmap.h" -#include "bridges.h" -#include "buffers.h" -#include "channel.h" -#include "channeltls.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuitstats.h" -#include "circuituse.h" -#include "command.h" -#include "compat_libevent.h" -#include "config.h" -#include "confparse.h" -#include "connection.h" -#include "connection_edge.h" -#include "connection_or.h" -#include "control.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "directory.h" -#include "dirserv.h" -#include "dnsserv.h" -#include "entrynodes.h" -#include "geoip.h" -#include "hibernate.h" -#include "hs_cache.h" -#include "hs_common.h" -#include "hs_control.h" -#include "main.h" -#include "microdesc.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "policies.h" -#include "proto_control0.h" -#include "proto_http.h" -#include "reasons.h" -#include "rendclient.h" -#include "rendcommon.h" -#include "rendservice.h" -#include "rephist.h" -#include "router.h" -#include "routerlist.h" -#include "routerparse.h" -#include "shared_random_client.h" - -#include "cached_dir_st.h" -#include "control_connection_st.h" -#include "cpath_build_state_st.h" -#include "entry_connection_st.h" -#include "extrainfo_st.h" -#include "networkstatus_st.h" -#include "node_st.h" -#include "or_connection_st.h" -#include "or_circuit_st.h" -#include "origin_circuit_st.h" -#include "microdesc_st.h" -#include "rend_authorized_client_st.h" -#include "rend_encoded_v2_service_descriptor_st.h" -#include "rend_service_descriptor_st.h" -#include "routerinfo_st.h" -#include "routerlist_st.h" -#include "socks_request_st.h" +#include "or/or.h" +#include "or/addressmap.h" +#include "or/bridges.h" +#include "common/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 "common/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 "common/crypto_rand.h" +#include "common/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 "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" #ifndef _WIN32 #include <pwd.h> #include <sys/resource.h> #endif -#include "crypto_s2k.h" -#include "procmon.h" +#include "common/crypto_s2k.h" +#include "common/procmon.h" /** Yield true iff <b>s</b> is the state of a control_connection_t that has * finished authentication and is accepting commands. */ diff --git a/src/or/control_connection_st.h b/src/or/control_connection_st.h index bd2b848577..4f8ab25d99 100644 --- a/src/or/control_connection_st.h +++ b/src/or/control_connection_st.h @@ -7,8 +7,8 @@ #ifndef CONTROL_CONNECTION_ST_H #define CONTROL_CONNECTION_ST_H -#include "or.h" -#include "connection_st.h" +#include "or/or.h" +#include "or/connection_st.h" /** Subtype of connection_t for an connection to a controller. */ struct control_connection_t { diff --git a/src/or/cpuworker.c b/src/or/cpuworker.c index 6f3f8c2f12..18b8adab86 100644 --- a/src/or/cpuworker.c +++ b/src/or/cpuworker.c @@ -17,22 +17,22 @@ * <li>and for calculating diffs and compressing them in consdiffmgr.c. * </ul> **/ -#include "or.h" -#include "channel.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "connection_or.h" -#include "config.h" -#include "cpuworker.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "main.h" -#include "onion.h" -#include "rephist.h" -#include "router.h" -#include "workqueue.h" - -#include "or_circuit_st.h" +#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 "common/crypto_rand.h" +#include "common/crypto_util.h" +#include "or/main.h" +#include "or/onion.h" +#include "or/rephist.h" +#include "or/router.h" +#include "common/workqueue.h" + +#include "or/or_circuit_st.h" static void queue_pending_tasks(void); diff --git a/src/or/crypt_path_st.h b/src/or/crypt_path_st.h index ebad872172..88b4085acb 100644 --- a/src/or/crypt_path_st.h +++ b/src/or/crypt_path_st.h @@ -7,7 +7,7 @@ #ifndef CRYPT_PATH_ST_H #define CRYPT_PATH_ST_H -#include "relay_crypto_st.h" +#include "or/relay_crypto_st.h" /** Holds accounting information for a single step in the layered encryption * performed by a circuit. Used only at the client edge of a circuit. */ diff --git a/src/or/dir_connection_st.h b/src/or/dir_connection_st.h index 5b79dfcb6c..f68266ca2e 100644 --- a/src/or/dir_connection_st.h +++ b/src/or/dir_connection_st.h @@ -7,7 +7,7 @@ #ifndef DIR_CONNECTION_ST_H #define DIR_CONNECTION_ST_H -#include "connection_st.h" +#include "or/connection_st.h" /** Subtype of connection_t for an "directory connection" -- that is, an HTTP * connection to retrieve or serve directory material. */ diff --git a/src/or/dir_server_st.h b/src/or/dir_server_st.h index 0c2e905fb9..8fdb04a7de 100644 --- a/src/or/dir_server_st.h +++ b/src/or/dir_server_st.h @@ -7,9 +7,9 @@ #ifndef DIR_SERVER_ST_H #define DIR_SERVER_ST_H -#include "torint.h" -#include "or.h" -#include "routerstatus_st.h" +#include "common/torint.h" +#include "or/or.h" +#include "or/routerstatus_st.h" /** Represents information about a single trusted or fallback directory * server. */ diff --git a/src/or/dirauth/dircollate.c b/src/or/dirauth/dircollate.c index 52d2f838e6..246977dcc8 100644 --- a/src/or/dirauth/dircollate.c +++ b/src/or/dirauth/dircollate.c @@ -22,11 +22,11 @@ */ #define DIRCOLLATE_PRIVATE -#include "dircollate.h" -#include "dirvote.h" +#include "or/dirauth/dircollate.h" +#include "or/dirauth/dirvote.h" -#include "networkstatus_st.h" -#include "vote_routerstatus_st.h" +#include "or/networkstatus_st.h" +#include "or/vote_routerstatus_st.h" static void dircollator_collate_by_ed25519(dircollator_t *dc); diff --git a/src/or/dirauth/dircollate.h b/src/or/dirauth/dircollate.h index 7dc949760f..1d403b20f2 100644 --- a/src/or/dirauth/dircollate.h +++ b/src/or/dirauth/dircollate.h @@ -12,8 +12,8 @@ #ifndef TOR_DIRCOLLATE_H #define TOR_DIRCOLLATE_H -#include "testsupport.h" -#include "or.h" +#include "common/testsupport.h" +#include "or/or.h" typedef struct dircollator_s dircollator_t; diff --git a/src/or/dirauth/dirvote.c b/src/or/dirauth/dirvote.c index bd62109e03..a9429a9116 100644 --- a/src/or/dirauth/dirvote.c +++ b/src/or/dirauth/dirvote.c @@ -4,44 +4,44 @@ /* See LICENSE for licensing information */ #define DIRVOTE_PRIVATE -#include "or.h" -#include "config.h" -#include "dircollate.h" -#include "directory.h" -#include "dirserv.h" -#include "microdesc.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "parsecommon.h" -#include "policies.h" -#include "protover.h" -#include "rephist.h" -#include "router.h" -#include "routerkeys.h" -#include "routerlist.h" -#include "routerparse.h" -#include "entrynodes.h" /* needed for guardfraction methods */ -#include "torcert.h" -#include "voting_schedule.h" - -#include "dirauth/dirvote.h" -#include "dirauth/mode.h" -#include "dirauth/shared_random_state.h" - -#include "authority_cert_st.h" -#include "cached_dir_st.h" -#include "dir_server_st.h" -#include "document_signature_st.h" -#include "microdesc_st.h" -#include "networkstatus_st.h" -#include "networkstatus_voter_info_st.h" -#include "node_st.h" -#include "ns_detached_signatures_st.h" -#include "routerinfo_st.h" -#include "routerlist_st.h" -#include "vote_microdesc_hash_st.h" -#include "vote_routerstatus_st.h" -#include "vote_timing_st.h" +#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" /** * \file dirvote.c diff --git a/src/or/dirauth/mode.h b/src/or/dirauth/mode.h index 462d81d1bd..17c35aff64 100644 --- a/src/or/dirauth/mode.h +++ b/src/or/dirauth/mode.h @@ -11,7 +11,7 @@ #ifdef HAVE_MODULE_DIRAUTH -#include "router.h" +#include "or/router.h" /* Return true iff we believe ourselves to be a v3 authoritative directory * server. */ diff --git a/src/or/dirauth/shared_random.c b/src/or/dirauth/shared_random.c index a577b2fb2f..0860efacad 100644 --- a/src/or/dirauth/shared_random.c +++ b/src/or/dirauth/shared_random.c @@ -87,26 +87,26 @@ #define SHARED_RANDOM_PRIVATE -#include "or.h" -#include "shared_random.h" -#include "config.h" -#include "confparse.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "networkstatus.h" -#include "router.h" -#include "routerkeys.h" -#include "routerlist.h" -#include "shared_random_client.h" -#include "shared_random_state.h" -#include "util.h" -#include "voting_schedule.h" - -#include "dirauth/dirvote.h" -#include "dirauth/mode.h" - -#include "authority_cert_st.h" -#include "networkstatus_st.h" +#include "or/or.h" +#include "or/dirauth/shared_random.h" +#include "or/config.h" +#include "or/confparse.h" +#include "common/crypto_rand.h" +#include "common/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 "common/util.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" /* String prefix of shared random values in votes/consensuses. */ static const char previous_srv_str[] = "shared-rand-previous-value"; diff --git a/src/or/dirauth/shared_random.h b/src/or/dirauth/shared_random.h index e2597f354d..93bab99f71 100644 --- a/src/or/dirauth/shared_random.h +++ b/src/or/dirauth/shared_random.h @@ -10,7 +10,7 @@ * with "sr_" which stands for shared random. */ -#include "or.h" +#include "or/or.h" /* Protocol version */ #define SR_PROTO_VERSION 1 diff --git a/src/or/dirauth/shared_random_state.c b/src/or/dirauth/shared_random_state.c index a7047536c3..9bea02e820 100644 --- a/src/or/dirauth/shared_random_state.c +++ b/src/or/dirauth/shared_random_state.c @@ -10,17 +10,17 @@ #define SHARED_RANDOM_STATE_PRIVATE -#include "or.h" -#include "config.h" -#include "confparse.h" -#include "crypto_util.h" -#include "dirauth/dirvote.h" -#include "networkstatus.h" -#include "router.h" -#include "shared_random.h" -#include "shared_random_client.h" -#include "shared_random_state.h" -#include "voting_schedule.h" +#include "or/or.h" +#include "or/config.h" +#include "or/confparse.h" +#include "common/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" /* Default filename of the shared random state on disk. */ static const char default_fname[] = "sr-state"; diff --git a/src/or/dirauth/shared_random_state.h b/src/or/dirauth/shared_random_state.h index b0e7cc4c27..a8ac0134cc 100644 --- a/src/or/dirauth/shared_random_state.h +++ b/src/or/dirauth/shared_random_state.h @@ -4,7 +4,7 @@ #ifndef TOR_SHARED_RANDOM_STATE_H #define TOR_SHARED_RANDOM_STATE_H -#include "shared_random.h" +#include "or/dirauth/shared_random.h" /* Action that can be performed on the state for any objects. */ typedef enum { diff --git a/src/or/directory.c b/src/or/directory.c index e7616881e9..e008ac7f7e 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -5,44 +5,44 @@ #define DIRECTORY_PRIVATE -#include "or.h" -#include "backtrace.h" -#include "bridges.h" -#include "buffers.h" -#include "circuitbuild.h" -#include "config.h" -#include "connection.h" -#include "connection_edge.h" -#include "conscache.h" -#include "consdiff.h" -#include "consdiffmgr.h" -#include "control.h" -#include "compat.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "directory.h" -#include "dirserv.h" -#include "entrynodes.h" -#include "fp_pair.h" -#include "geoip.h" -#include "hs_cache.h" -#include "hs_common.h" -#include "hs_control.h" -#include "hs_client.h" -#include "main.h" -#include "microdesc.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "policies.h" -#include "relay.h" -#include "rendclient.h" -#include "rendcommon.h" -#include "rendservice.h" -#include "rephist.h" -#include "router.h" -#include "routerlist.h" -#include "routerparse.h" -#include "routerset.h" +#include "or/or.h" +#include "common/backtrace.h" +#include "or/bridges.h" +#include "common/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 "common/compat.h" +#include "common/crypto_rand.h" +#include "common/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" #if defined(EXPORTMALLINFO) && defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) #if !defined(OpenBSD) @@ -50,19 +50,19 @@ #endif #endif -#include "dirauth/dirvote.h" -#include "dirauth/mode.h" -#include "dirauth/shared_random.h" - -#include "authority_cert_st.h" -#include "cached_dir_st.h" -#include "dir_connection_st.h" -#include "dir_server_st.h" -#include "entry_connection_st.h" -#include "networkstatus_st.h" -#include "node_st.h" -#include "rend_service_descriptor_st.h" -#include "routerinfo_st.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/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" /** * \file directory.c diff --git a/src/or/directory.h b/src/or/directory.h index 9008df0f58..5cf8892ace 100644 --- a/src/or/directory.h +++ b/src/or/directory.h @@ -12,7 +12,7 @@ #ifndef TOR_DIRECTORY_H #define TOR_DIRECTORY_H -#include "hs_ident.h" +#include "or/hs_ident.h" dir_connection_t *TO_DIR_CONN(connection_t *c); int directories_have_accepted_server_descriptor(void); diff --git a/src/or/dirserv.c b/src/or/dirserv.c index eaea502627..077135841f 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -4,47 +4,47 @@ /* See LICENSE for licensing information */ #define DIRSERV_PRIVATE -#include "or.h" -#include "buffers.h" -#include "config.h" -#include "confparse.h" -#include "channel.h" -#include "channeltls.h" -#include "command.h" -#include "connection.h" -#include "connection_or.h" -#include "conscache.h" -#include "consdiffmgr.h" -#include "control.h" -#include "directory.h" -#include "dirserv.h" -#include "hibernate.h" -#include "keypin.h" -#include "main.h" -#include "microdesc.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "policies.h" -#include "protover.h" -#include "rephist.h" -#include "router.h" -#include "routerlist.h" -#include "routerparse.h" -#include "routerset.h" -#include "torcert.h" -#include "voting_schedule.h" - -#include "dirauth/dirvote.h" - -#include "cached_dir_st.h" -#include "dir_connection_st.h" -#include "extrainfo_st.h" -#include "microdesc_st.h" -#include "node_st.h" -#include "routerinfo_st.h" -#include "routerlist_st.h" -#include "tor_version_st.h" -#include "vote_routerstatus_st.h" +#include "or/or.h" +#include "common/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" /** * \file dirserv.c diff --git a/src/or/dirserv.h b/src/or/dirserv.h index 61f4af4b50..a8d5ac616b 100644 --- a/src/or/dirserv.h +++ b/src/or/dirserv.h @@ -12,7 +12,7 @@ #ifndef TOR_DIRSERV_H #define TOR_DIRSERV_H -#include "testsupport.h" +#include "common/testsupport.h" /** What fraction (1 over this number) of the relay ID space do we * (as a directory authority) launch connections to at each reachability diff --git a/src/or/dns.c b/src/or/dns.c index 8536fc8e90..3f5d39b41d 100644 --- a/src/or/dns.c +++ b/src/or/dns.c @@ -49,24 +49,24 @@ #define DNS_PRIVATE -#include "or.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "config.h" -#include "connection.h" -#include "connection_edge.h" -#include "control.h" -#include "crypto_rand.h" -#include "dns.h" -#include "main.h" -#include "policies.h" -#include "relay.h" -#include "router.h" +#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 "common/crypto_rand.h" +#include "or/dns.h" +#include "or/main.h" +#include "or/policies.h" +#include "or/relay.h" +#include "or/router.h" #include "ht.h" -#include "sandbox.h" +#include "common/sandbox.h" -#include "edge_connection_st.h" -#include "or_circuit_st.h" +#include "or/edge_connection_st.h" +#include "or/or_circuit_st.h" #include <event2/event.h> #include <event2/dns.h> diff --git a/src/or/dns.h b/src/or/dns.h index d742083635..12853205ff 100644 --- a/src/or/dns.h +++ b/src/or/dns.h @@ -41,7 +41,7 @@ void dns_reset_correctness_checks(void); void dump_dns_mem_usage(int severity); #ifdef DNS_PRIVATE -#include "dns_structs.h" +#include "or/dns_structs.h" MOCK_DECL(STATIC int,dns_resolve_impl,(edge_connection_t *exitconn, int is_resolve,or_circuit_t *oncirc, char **hostname_out, diff --git a/src/or/dnsserv.c b/src/or/dnsserv.c index 3f2867feb1..ce1746fe27 100644 --- a/src/or/dnsserv.c +++ b/src/or/dnsserv.c @@ -21,19 +21,19 @@ * DNS client. **/ -#include "or.h" -#include "dnsserv.h" -#include "config.h" -#include "connection.h" -#include "connection_edge.h" -#include "control.h" -#include "main.h" -#include "policies.h" - -#include "control_connection_st.h" -#include "entry_connection_st.h" -#include "listener_connection_st.h" -#include "socks_request_st.h" +#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 <event2/dns.h> #include <event2/dns_compat.h> diff --git a/src/or/dos.c b/src/or/dos.c index f0b441c34e..5f4142b0e9 100644 --- a/src/or/dos.c +++ b/src/or/dos.c @@ -8,21 +8,21 @@ #define DOS_PRIVATE -#include "or.h" -#include "channel.h" -#include "config.h" -#include "connection_or.h" -#include "crypto_rand.h" -#include "geoip.h" -#include "main.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "relay.h" -#include "router.h" - -#include "dos.h" - -#include "or_connection_st.h" +#include "or/or.h" +#include "or/channel.h" +#include "or/config.h" +#include "or/connection_or.h" +#include "common/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 "or/dos.h" + +#include "or/or_connection_st.h" /* * Circuit creation denial of service mitigation. diff --git a/src/or/edge_connection_st.h b/src/or/edge_connection_st.h index 6b3814353e..d58e1c2b8c 100644 --- a/src/or/edge_connection_st.h +++ b/src/or/edge_connection_st.h @@ -7,9 +7,9 @@ #ifndef EDGE_CONNECTION_ST_H #define EDGE_CONNECTION_ST_H -#include "or.h" +#include "or/or.h" -#include "connection_st.h" +#include "or/connection_st.h" /** Subtype of connection_t for an "edge connection" -- that is, an entry (ap) * connection, or an exit. */ diff --git a/src/or/entry_connection_st.h b/src/or/entry_connection_st.h index ade427f1f4..2f9676088c 100644 --- a/src/or/entry_connection_st.h +++ b/src/or/entry_connection_st.h @@ -7,7 +7,7 @@ #ifndef ENTRY_CONNECTION_ST_H #define ENTRY_CONNECTION_ST_H -#include "edge_connection_st.h" +#include "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 */ diff --git a/src/or/entry_port_cfg_st.h b/src/or/entry_port_cfg_st.h index 78e0b3eb16..45dd844c46 100644 --- a/src/or/entry_port_cfg_st.h +++ b/src/or/entry_port_cfg_st.h @@ -7,8 +7,8 @@ #ifndef ENTRY_PORT_CFG_ST_H #define ENTRY_PORT_CFG_ST_H -#include "torint.h" -#include "or.h" +#include "common/torint.h" +#include "or/or.h" struct entry_port_cfg_t { /* Client port types (socks, dns, trans, natd) only: */ diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c index 604b79140a..6d13efda90 100644 --- a/src/or/entrynodes.c +++ b/src/or/entrynodes.c @@ -112,35 +112,35 @@ #define ENTRYNODES_PRIVATE -#include "or.h" -#include "channel.h" -#include "bridges.h" -#include "circpathbias.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "circuitstats.h" -#include "config.h" -#include "confparse.h" -#include "connection.h" -#include "control.h" -#include "crypto_rand.h" -#include "directory.h" -#include "entrynodes.h" -#include "main.h" -#include "microdesc.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "policies.h" -#include "router.h" -#include "routerlist.h" -#include "routerparse.h" -#include "routerset.h" -#include "transports.h" -#include "statefile.h" - -#include "node_st.h" -#include "origin_circuit_st.h" +#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 "common/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 "or/node_st.h" +#include "or/origin_circuit_st.h" /** A list of existing guard selection contexts. */ static smartlist_t *guard_contexts = NULL; diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h index f26e905fd2..e56d4632b6 100644 --- a/src/or/entrynodes.h +++ b/src/or/entrynodes.h @@ -12,7 +12,7 @@ #ifndef TOR_ENTRYNODES_H #define TOR_ENTRYNODES_H -#include "handles.h" +#include "common/handles.h" /* Forward declare for guard_selection_t; entrynodes.c has the real struct */ typedef struct guard_selection_s guard_selection_t; diff --git a/src/or/ext_orport.c b/src/or/ext_orport.c index 00c750975e..d84f263aa6 100644 --- a/src/or/ext_orport.c +++ b/src/or/ext_orport.c @@ -17,19 +17,19 @@ */ #define EXT_ORPORT_PRIVATE -#include "or.h" -#include "connection.h" -#include "connection_or.h" -#include "control.h" -#include "config.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "ext_orport.h" -#include "main.h" -#include "proto_ext_or.h" -#include "util.h" - -#include "or_connection_st.h" +#include "or/or.h" +#include "or/connection.h" +#include "or/connection_or.h" +#include "or/control.h" +#include "or/config.h" +#include "common/crypto_rand.h" +#include "common/crypto_util.h" +#include "or/ext_orport.h" +#include "or/main.h" +#include "or/proto_ext_or.h" +#include "common/util.h" + +#include "or/or_connection_st.h" /** Allocate and return a structure capable of holding an Extended * ORPort message of body length <b>len</b>. */ diff --git a/src/or/extrainfo_st.h b/src/or/extrainfo_st.h index 041a932da7..f91bba7b68 100644 --- a/src/or/extrainfo_st.h +++ b/src/or/extrainfo_st.h @@ -7,7 +7,7 @@ #ifndef EXTRAINFO_ST_H #define EXTRAINFO_ST_H -#include "signed_descriptor_st.h" +#include "or/signed_descriptor_st.h" /** Information needed to keep and cache a signed extra-info document. */ struct extrainfo_t { diff --git a/src/or/fp_pair.c b/src/or/fp_pair.c index e437562fc3..1d7b751c23 100644 --- a/src/or/fp_pair.c +++ b/src/or/fp_pair.c @@ -17,8 +17,8 @@ * certificate for any (ID key, signing key) pair. **/ -#include "or.h" -#include "fp_pair.h" +#include "or/or.h" +#include "or/fp_pair.h" /* Define fp_pair_map_t structures */ diff --git a/src/or/geoip.c b/src/or/geoip.c index 533468a2de..634ee707b4 100644 --- a/src/or/geoip.c +++ b/src/or/geoip.c @@ -28,15 +28,15 @@ */ #define GEOIP_PRIVATE -#include "or.h" +#include "or/or.h" #include "ht.h" -#include "buffers.h" -#include "config.h" -#include "control.h" -#include "dnsserv.h" -#include "dos.h" -#include "geoip.h" -#include "routerlist.h" +#include "common/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" static void init_geoip_countries(void); diff --git a/src/or/geoip.h b/src/or/geoip.h index c3b51c6630..8a5dd701e0 100644 --- a/src/or/geoip.h +++ b/src/or/geoip.h @@ -12,8 +12,8 @@ #ifndef TOR_GEOIP_H #define TOR_GEOIP_H -#include "testsupport.h" -#include "dos.h" +#include "common/testsupport.h" +#include "or/dos.h" #ifdef GEOIP_PRIVATE STATIC int geoip_parse_entry(const char *line, sa_family_t family); diff --git a/src/or/git_revision.c b/src/or/git_revision.c index cd63ed8302..be6f67423c 100644 --- a/src/or/git_revision.c +++ b/src/or/git_revision.c @@ -3,7 +3,7 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ -#include "git_revision.h" +#include "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 diff --git a/src/or/hibernate.c b/src/or/hibernate.c index 36534516bd..595b839574 100644 --- a/src/or/hibernate.c +++ b/src/or/hibernate.c @@ -28,21 +28,21 @@ hibernating, phase 2: */ #define HIBERNATE_PRIVATE -#include "or.h" -#include "channel.h" -#include "channeltls.h" -#include "config.h" -#include "connection.h" -#include "connection_edge.h" -#include "connection_or.h" -#include "control.h" -#include "crypto_rand.h" -#include "hibernate.h" -#include "main.h" -#include "router.h" -#include "statefile.h" - -#include "or_connection_st.h" +#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 "common/crypto_rand.h" +#include "or/hibernate.h" +#include "or/main.h" +#include "or/router.h" +#include "or/statefile.h" + +#include "or/or_connection_st.h" /** Are we currently awake, asleep, running out of bandwidth, or shutting * down? */ diff --git a/src/or/hibernate.h b/src/or/hibernate.h index b31dfb8fd9..cdef33543a 100644 --- a/src/or/hibernate.h +++ b/src/or/hibernate.h @@ -12,7 +12,7 @@ #ifndef TOR_HIBERNATE_H #define TOR_HIBERNATE_H -#include "testsupport.h" +#include "common/testsupport.h" int accounting_parse_options(const or_options_t *options, int validate_only); MOCK_DECL(int, accounting_is_enabled, (const or_options_t *options)); diff --git a/src/or/hs_cache.c b/src/or/hs_cache.c index 3170f7196c..c16a42a482 100644 --- a/src/or/hs_cache.c +++ b/src/or/hs_cache.c @@ -9,19 +9,19 @@ /* For unit tests.*/ #define HS_CACHE_PRIVATE -#include "or.h" -#include "config.h" -#include "crypto_util.h" -#include "hs_ident.h" -#include "hs_common.h" -#include "hs_client.h" -#include "hs_descriptor.h" -#include "networkstatus.h" -#include "rendcache.h" - -#include "hs_cache.h" - -#include "networkstatus_st.h" +#include "or/or.h" +#include "or/config.h" +#include "common/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 "or/hs_cache.h" + +#include "or/networkstatus_st.h" static int cached_client_descriptor_has_expired(time_t now, const hs_cache_client_descriptor_t *cached_desc); diff --git a/src/or/hs_cache.h b/src/or/hs_cache.h index 03cea8412b..5ca158781b 100644 --- a/src/or/hs_cache.h +++ b/src/or/hs_cache.h @@ -11,11 +11,11 @@ #include <stdint.h> -#include "crypto_ed25519.h" -#include "hs_common.h" -#include "hs_descriptor.h" -#include "rendcommon.h" -#include "torcert.h" +#include "common/crypto_ed25519.h" +#include "or/hs_common.h" +#include "or/hs_descriptor.h" +#include "or/rendcommon.h" +#include "or/torcert.h" /* This is the maximum time an introduction point state object can stay in the * client cache in seconds (2 mins or 120 seconds). */ diff --git a/src/or/hs_cell.c b/src/or/hs_cell.c index f108407895..40ec4ba9e7 100644 --- a/src/or/hs_cell.c +++ b/src/or/hs_cell.c @@ -6,24 +6,24 @@ * \brief Hidden service API for cell creation and handling. **/ -#include "or.h" -#include "config.h" -#include "crypto_util.h" -#include "rendservice.h" -#include "replaycache.h" -#include "util.h" +#include "or/or.h" +#include "or/config.h" +#include "common/crypto_util.h" +#include "or/rendservice.h" +#include "or/replaycache.h" +#include "common/util.h" -#include "hs_cell.h" -#include "hs_ntor.h" +#include "or/hs_cell.h" +#include "or/hs_ntor.h" -#include "origin_circuit_st.h" +#include "or/origin_circuit_st.h" /* Trunnel. */ -#include "ed25519_cert.h" -#include "hs/cell_common.h" -#include "hs/cell_establish_intro.h" -#include "hs/cell_introduce1.h" -#include "hs/cell_rendezvous.h" +#include "trunnel/ed25519_cert.h" +#include "trunnel/hs/cell_common.h" +#include "trunnel/hs/cell_establish_intro.h" +#include "trunnel/hs/cell_introduce1.h" +#include "trunnel/hs/cell_rendezvous.h" /* Compute the MAC of an INTRODUCE cell in mac_out. The encoded_cell param is * the cell content up to the ENCRYPTED section of length encoded_cell_len. diff --git a/src/or/hs_cell.h b/src/or/hs_cell.h index 5c6f64350e..4a522810c6 100644 --- a/src/or/hs_cell.h +++ b/src/or/hs_cell.h @@ -9,8 +9,8 @@ #ifndef TOR_HS_CELL_H #define TOR_HS_CELL_H -#include "or.h" -#include "hs_service.h" +#include "or/or.h" +#include "or/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. */ diff --git a/src/or/hs_circuit.c b/src/or/hs_circuit.c index d0c2d75204..36a9820446 100644 --- a/src/or/hs_circuit.c +++ b/src/or/hs_circuit.c @@ -7,36 +7,36 @@ #define HS_CIRCUIT_PRIVATE -#include "or.h" -#include "circpathbias.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "config.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "nodelist.h" -#include "policies.h" -#include "relay.h" -#include "rendservice.h" -#include "rephist.h" -#include "router.h" - -#include "hs_cell.h" -#include "hs_ident.h" -#include "hs_ntor.h" -#include "hs_service.h" -#include "hs_circuit.h" +#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 "common/crypto_rand.h" +#include "common/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_ident.h" +#include "or/hs_ntor.h" +#include "or/hs_service.h" +#include "or/hs_circuit.h" /* Trunnel. */ -#include "ed25519_cert.h" -#include "hs/cell_common.h" -#include "hs/cell_establish_intro.h" - -#include "cpath_build_state_st.h" -#include "crypt_path_st.h" -#include "node_st.h" -#include "origin_circuit_st.h" +#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" /* 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 diff --git a/src/or/hs_circuit.h b/src/or/hs_circuit.h index 9ea42b3167..fbf11d1cc8 100644 --- a/src/or/hs_circuit.h +++ b/src/or/hs_circuit.h @@ -9,10 +9,10 @@ #ifndef TOR_HS_CIRCUIT_H #define TOR_HS_CIRCUIT_H -#include "or.h" -#include "crypto_ed25519.h" +#include "or/or.h" +#include "common/crypto_ed25519.h" -#include "hs_service.h" +#include "or/hs_service.h" /* Cleanup function when the circuit is closed or/and freed. */ void hs_circ_cleanup(circuit_t *circ); diff --git a/src/or/hs_circuitmap.c b/src/or/hs_circuitmap.c index 7f9b7e3cf2..21db652492 100644 --- a/src/or/hs_circuitmap.c +++ b/src/or/hs_circuitmap.c @@ -13,13 +13,13 @@ #define HS_CIRCUITMAP_PRIVATE -#include "or.h" -#include "config.h" -#include "circuitlist.h" -#include "hs_circuitmap.h" +#include "or/or.h" +#include "or/config.h" +#include "or/circuitlist.h" +#include "or/hs_circuitmap.h" -#include "or_circuit_st.h" -#include "origin_circuit_st.h" +#include "or/or_circuit_st.h" +#include "or/origin_circuit_st.h" /************************** HS circuitmap code *******************************/ diff --git a/src/or/hs_client.c b/src/or/hs_client.c index 01d7f8cb90..331793c1fa 100644 --- a/src/or/hs_client.c +++ b/src/or/hs_client.c @@ -8,38 +8,38 @@ #define HS_CLIENT_PRIVATE -#include "or.h" -#include "circpathbias.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "config.h" -#include "connection.h" -#include "connection_edge.h" -#include "container.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "directory.h" -#include "hs_cache.h" -#include "hs_cell.h" -#include "hs_circuit.h" -#include "hs_client.h" -#include "hs_control.h" -#include "hs_descriptor.h" -#include "hs_ident.h" -#include "hs_ntor.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "reasons.h" -#include "rendclient.h" -#include "router.h" -#include "routerset.h" - -#include "cpath_build_state_st.h" -#include "dir_connection_st.h" -#include "entry_connection_st.h" -#include "extend_info_st.h" -#include "origin_circuit_st.h" +#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 "common/container.h" +#include "common/crypto_rand.h" +#include "common/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_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" /* Return a human-readable string for the client fetch status code. */ static const char * diff --git a/src/or/hs_client.h b/src/or/hs_client.h index 3854aadeb1..f7fca0b00e 100644 --- a/src/or/hs_client.h +++ b/src/or/hs_client.h @@ -9,9 +9,9 @@ #ifndef TOR_HS_CLIENT_H #define TOR_HS_CLIENT_H -#include "crypto_ed25519.h" -#include "hs_descriptor.h" -#include "hs_ident.h" +#include "common/crypto_ed25519.h" +#include "or/hs_descriptor.h" +#include "or/hs_ident.h" /* Status code of a descriptor fetch request. */ typedef enum { diff --git a/src/or/hs_common.c b/src/or/hs_common.c index 3586ce1ba9..51d74bf5af 100644 --- a/src/or/hs_common.c +++ b/src/or/hs_common.c @@ -11,36 +11,36 @@ #define HS_COMMON_PRIVATE -#include "or.h" - -#include "config.h" -#include "circuitbuild.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "hs_cache.h" -#include "hs_common.h" -#include "hs_client.h" -#include "hs_ident.h" -#include "hs_service.h" -#include "hs_circuitmap.h" -#include "policies.h" -#include "rendcommon.h" -#include "rendservice.h" -#include "routerset.h" -#include "router.h" -#include "shared_random_client.h" -#include "dirauth/shared_random_state.h" - -#include "edge_connection_st.h" -#include "networkstatus_st.h" -#include "node_st.h" -#include "origin_circuit_st.h" -#include "routerstatus_st.h" +#include "or/or.h" + +#include "or/config.h" +#include "or/circuitbuild.h" +#include "common/crypto_rand.h" +#include "common/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" /* Trunnel */ -#include "ed25519_cert.h" +#include "trunnel/ed25519_cert.h" /* Ed25519 Basepoint value. Taken from section 5 of * https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03 */ diff --git a/src/or/hs_common.h b/src/or/hs_common.h index 82b1f3908a..6d60d7799f 100644 --- a/src/or/hs_common.h +++ b/src/or/hs_common.h @@ -9,10 +9,10 @@ #ifndef TOR_HS_COMMON_H #define TOR_HS_COMMON_H -#include "or.h" +#include "or/or.h" /* Trunnel */ -#include "ed25519_cert.h" +#include "trunnel/ed25519_cert.h" /* Protocol version 2. Use this instead of hardcoding "2" in the code base, * this adds a clearer semantic to the value when used. */ diff --git a/src/or/hs_config.c b/src/or/hs_config.c index a8ca549445..c8ce5b43fa 100644 --- a/src/or/hs_config.c +++ b/src/or/hs_config.c @@ -25,10 +25,10 @@ #define HS_CONFIG_PRIVATE -#include "hs_common.h" -#include "hs_config.h" -#include "hs_service.h" -#include "rendservice.h" +#include "or/hs_common.h" +#include "or/hs_config.h" +#include "or/hs_service.h" +#include "or/rendservice.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 diff --git a/src/or/hs_config.h b/src/or/hs_config.h index c8800d33ee..461d58d384 100644 --- a/src/or/hs_config.h +++ b/src/or/hs_config.h @@ -9,7 +9,7 @@ #ifndef TOR_HS_CONFIG_H #define TOR_HS_CONFIG_H -#include "or.h" +#include "or/or.h" /* Max value for HiddenServiceMaxStreams */ #define HS_CONFIG_MAX_STREAMS_PER_RDV_CIRCUIT 65535 diff --git a/src/or/hs_control.c b/src/or/hs_control.c index 399a1d9bfb..fc828d0721 100644 --- a/src/or/hs_control.c +++ b/src/or/hs_control.c @@ -6,17 +6,17 @@ * \brief Contains control port event related code. **/ -#include "or.h" -#include "control.h" -#include "crypto_util.h" -#include "hs_common.h" -#include "hs_control.h" -#include "hs_descriptor.h" -#include "hs_service.h" -#include "nodelist.h" - -#include "node_st.h" -#include "routerstatus_st.h" +#include "or/or.h" +#include "or/control.h" +#include "common/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" /* Send on the control port the "HS_DESC REQUESTEDÂ [...]" event. * diff --git a/src/or/hs_control.h b/src/or/hs_control.h index 936e0c01b6..040ce4a793 100644 --- a/src/or/hs_control.h +++ b/src/or/hs_control.h @@ -9,7 +9,7 @@ #ifndef TOR_HS_CONTROL_H #define TOR_HS_CONTROL_H -#include "hs_ident.h" +#include "or/hs_ident.h" /* Event "HS_DESC REQUESTED [...]" */ void hs_control_desc_event_requested(const ed25519_public_key_t *onion_pk, diff --git a/src/or/hs_descriptor.c b/src/or/hs_descriptor.c index 9b814e3055..feec0e66d4 100644 --- a/src/or/hs_descriptor.c +++ b/src/or/hs_descriptor.c @@ -55,19 +55,19 @@ /* For unit tests.*/ #define HS_DESCRIPTOR_PRIVATE -#include "or.h" -#include "ed25519_cert.h" /* Trunnel interface. */ -#include "hs_descriptor.h" -#include "circuitbuild.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "parsecommon.h" -#include "rendcache.h" -#include "hs_cache.h" -#include "hs_config.h" -#include "torcert.h" /* tor_cert_encode_ed22519() */ - -#include "extend_info_st.h" +#include "or/or.h" +#include "trunnel/ed25519_cert.h" /* Trunnel interface. */ +#include "or/hs_descriptor.h" +#include "or/circuitbuild.h" +#include "common/crypto_rand.h" +#include "common/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 "or/extend_info_st.h" /* Constant string value used for the descriptor format. */ #define str_hs_desc "hs-descriptor" diff --git a/src/or/hs_descriptor.h b/src/or/hs_descriptor.h index def50997c9..8a2df95277 100644 --- a/src/or/hs_descriptor.h +++ b/src/or/hs_descriptor.h @@ -11,13 +11,13 @@ #include <stdint.h> -#include "or.h" -#include "address.h" -#include "container.h" -#include "crypto.h" -#include "crypto_ed25519.h" -#include "ed25519_cert.h" /* needed for trunnel */ -#include "torcert.h" +#include "or/or.h" +#include "common/address.h" +#include "common/container.h" +#include "common/crypto.h" +#include "common/crypto_ed25519.h" +#include "trunnel/ed25519_cert.h" /* needed for trunnel */ +#include "or/torcert.h" /* Trunnel */ struct link_specifier_t; diff --git a/src/or/hs_ident.c b/src/or/hs_ident.c index ff33d8d065..d3d11393f0 100644 --- a/src/or/hs_ident.c +++ b/src/or/hs_ident.c @@ -7,8 +7,8 @@ * subsytem. **/ -#include "crypto_util.h" -#include "hs_ident.h" +#include "common/crypto_util.h" +#include "or/hs_ident.h" /* Return a newly allocated circuit identifier. The given public key is copied * identity_pk into the identifier. */ diff --git a/src/or/hs_ident.h b/src/or/hs_ident.h index cd50f77959..476cdc19ee 100644 --- a/src/or/hs_ident.h +++ b/src/or/hs_ident.h @@ -21,9 +21,9 @@ #ifndef TOR_HS_IDENT_H #define TOR_HS_IDENT_H -#include "crypto_ed25519.h" +#include "common/crypto_ed25519.h" -#include "hs_common.h" +#include "or/hs_common.h" /* Length of the rendezvous cookie that is used to connect circuits at the * rendezvous point. */ diff --git a/src/or/hs_intropoint.c b/src/or/hs_intropoint.c index 430f2ce4b0..6c0729b050 100644 --- a/src/or/hs_intropoint.c +++ b/src/or/hs_intropoint.c @@ -8,26 +8,26 @@ #define HS_INTROPOINT_PRIVATE -#include "or.h" -#include "config.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "relay.h" -#include "rendmid.h" -#include "rephist.h" +#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" /* Trunnel */ -#include "ed25519_cert.h" -#include "hs/cell_common.h" -#include "hs/cell_establish_intro.h" -#include "hs/cell_introduce1.h" +#include "trunnel/ed25519_cert.h" +#include "trunnel/hs/cell_common.h" +#include "trunnel/hs/cell_establish_intro.h" +#include "trunnel/hs/cell_introduce1.h" -#include "hs_circuitmap.h" -#include "hs_descriptor.h" -#include "hs_intropoint.h" -#include "hs_common.h" +#include "or/hs_circuitmap.h" +#include "or/hs_descriptor.h" +#include "or/hs_intropoint.h" +#include "or/hs_common.h" -#include "or_circuit_st.h" +#include "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 diff --git a/src/or/hs_intropoint.h b/src/or/hs_intropoint.h index 68b9178b00..77e41647be 100644 --- a/src/or/hs_intropoint.h +++ b/src/or/hs_intropoint.h @@ -9,8 +9,8 @@ #ifndef TOR_HS_INTRO_H #define TOR_HS_INTRO_H -#include "crypto_curve25519.h" -#include "torcert.h" +#include "common/crypto_curve25519.h" +#include "or/torcert.h" /* Authentication key type in an ESTABLISH_INTRO cell. */ typedef enum { @@ -55,8 +55,8 @@ void hs_intropoint_clear(hs_intropoint_t *ip); #ifdef HS_INTROPOINT_PRIVATE -#include "hs/cell_establish_intro.h" -#include "hs/cell_introduce1.h" +#include "trunnel/hs/cell_establish_intro.h" +#include "trunnel/hs/cell_introduce1.h" STATIC int verify_establish_intro_cell(const trn_cell_establish_intro_t *out, diff --git a/src/or/hs_ntor.c b/src/or/hs_ntor.c index 76ff3c9ace..61e1474aad 100644 --- a/src/or/hs_ntor.c +++ b/src/or/hs_ntor.c @@ -24,9 +24,9 @@ * rendezvous key expansion to setup end-to-end rend circuit keys. */ -#include "or.h" -#include "crypto_util.h" -#include "hs_ntor.h" +#include "or/or.h" +#include "common/crypto_util.h" +#include "or/hs_ntor.h" /* String constants used by the ntor HS protocol */ #define PROTOID "tor-hs-ntor-curve25519-sha3-256-1" diff --git a/src/or/hs_ntor.h b/src/or/hs_ntor.h index bfd6745b27..cc4afd536b 100644 --- a/src/or/hs_ntor.h +++ b/src/or/hs_ntor.h @@ -4,7 +4,7 @@ #ifndef TOR_HS_NTOR_H #define TOR_HS_NTOR_H -#include "or.h" +#include "or/or.h" /* Output length of KDF for key expansion */ #define HS_NTOR_KEY_EXPANSION_KDF_OUT_LEN \ diff --git a/src/or/hs_service.c b/src/or/hs_service.c index af7369e17f..722cc7fc5a 100644 --- a/src/or/hs_service.c +++ b/src/or/hs_service.c @@ -8,49 +8,49 @@ #define HS_SERVICE_PRIVATE -#include "or.h" -#include "circpathbias.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "config.h" -#include "connection.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "directory.h" -#include "main.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "relay.h" -#include "rendservice.h" -#include "router.h" -#include "routerkeys.h" -#include "routerlist.h" -#include "shared_random_client.h" -#include "statefile.h" - -#include "hs_circuit.h" -#include "hs_common.h" -#include "hs_config.h" -#include "hs_control.h" -#include "hs_descriptor.h" -#include "hs_ident.h" -#include "hs_intropoint.h" -#include "hs_service.h" -#include "hs_stats.h" - -#include "dir_connection_st.h" -#include "edge_connection_st.h" -#include "extend_info_st.h" -#include "networkstatus_st.h" -#include "node_st.h" -#include "origin_circuit_st.h" -#include "routerstatus_st.h" +#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 "common/crypto_rand.h" +#include "common/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/routerstatus_st.h" /* Trunnel */ -#include "ed25519_cert.h" -#include "hs/cell_common.h" -#include "hs/cell_establish_intro.h" +#include "trunnel/ed25519_cert.h" +#include "trunnel/hs/cell_common.h" +#include "trunnel/hs/cell_establish_intro.h" /* Helper macro. Iterate over every service in the global map. The var is the * name of the service pointer. */ diff --git a/src/or/hs_service.h b/src/or/hs_service.h index 8bc2201d01..32db63bd2e 100644 --- a/src/or/hs_service.h +++ b/src/or/hs_service.h @@ -9,17 +9,17 @@ #ifndef TOR_HS_SERVICE_H #define TOR_HS_SERVICE_H -#include "crypto_curve25519.h" -#include "crypto_ed25519.h" -#include "replaycache.h" +#include "common/crypto_curve25519.h" +#include "common/crypto_ed25519.h" +#include "or/replaycache.h" -#include "hs_common.h" -#include "hs_descriptor.h" -#include "hs_ident.h" -#include "hs_intropoint.h" +#include "or/hs_common.h" +#include "or/hs_descriptor.h" +#include "or/hs_ident.h" +#include "or/hs_intropoint.h" /* Trunnel */ -#include "hs/cell_establish_intro.h" +#include "trunnel/hs/cell_establish_intro.h" /* When loading and configuring a service, this is the default version it will * be configured for as it is possible that no HiddenServiceVersion is diff --git a/src/or/hs_stats.c b/src/or/hs_stats.c index 1e2a96945b..c8a99b19d4 100644 --- a/src/or/hs_stats.c +++ b/src/or/hs_stats.c @@ -6,9 +6,9 @@ * \brief Keeps stats about the activity of our onion service(s). **/ -#include "or.h" -#include "hs_stats.h" -#include "hs_service.h" +#include "or/or.h" +#include "or/hs_stats.h" +#include "or/hs_service.h" /** Number of v3 INTRODUCE2 cells received */ static uint32_t n_introduce2_v3 = 0; diff --git a/src/or/keypin.c b/src/or/keypin.c index fa6b412d5c..4026460281 100644 --- a/src/or/keypin.c +++ b/src/or/keypin.c @@ -11,17 +11,17 @@ #define KEYPIN_PRIVATE #include "orconfig.h" -#include "compat.h" -#include "crypto_digest.h" -#include "crypto_format.h" -#include "di_ops.h" +#include "common/compat.h" +#include "common/crypto_digest.h" +#include "common/crypto_format.h" +#include "common/di_ops.h" #include "ht.h" -#include "keypin.h" +#include "or/keypin.h" #include "siphash.h" -#include "torint.h" -#include "torlog.h" -#include "util.h" -#include "util_format.h" +#include "common/torint.h" +#include "common/torlog.h" +#include "common/util.h" +#include "common/util_format.h" #ifdef HAVE_UNISTD_H #include <unistd.h> diff --git a/src/or/keypin.h b/src/or/keypin.h index 98434d26df..b8b9ff5972 100644 --- a/src/or/keypin.h +++ b/src/or/keypin.h @@ -4,7 +4,7 @@ #ifndef TOR_KEYPIN_H #define TOR_KEYPIN_H -#include "testsupport.h" +#include "common/testsupport.h" int keypin_check_and_add(const uint8_t *rsa_id_digest, const uint8_t *ed25519_id_key, diff --git a/src/or/listener_connection_st.h b/src/or/listener_connection_st.h index 5138783924..7b5aafcb58 100644 --- a/src/or/listener_connection_st.h +++ b/src/or/listener_connection_st.h @@ -7,7 +7,7 @@ #ifndef LISTENER_CONNECTION_ST_H #define LISTENER_CONNECTION_ST_H -#include "connection_st.h" +#include "or/connection_st.h" /** Subtype of connection_t; used for a listener socket. */ struct listener_connection_t { diff --git a/src/or/main.c b/src/or/main.c index b87644f968..a1d7a5e9a0 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -47,88 +47,88 @@ **/ #define MAIN_PRIVATE -#include "or.h" -#include "addressmap.h" -#include "backtrace.h" -#include "bridges.h" -#include "buffers.h" -#include "buffers_tls.h" -#include "channel.h" -#include "channeltls.h" -#include "channelpadding.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "circuitmux_ewma.h" -#include "command.h" -#include "compress.h" -#include "config.h" -#include "confparse.h" -#include "connection.h" -#include "connection_edge.h" -#include "connection_or.h" -#include "consdiffmgr.h" -#include "control.h" -#include "cpuworker.h" -#include "crypto_s2k.h" -#include "crypto_rand.h" -#include "directory.h" -#include "dirserv.h" -#include "dns.h" -#include "dnsserv.h" -#include "dos.h" -#include "entrynodes.h" -#include "geoip.h" -#include "hibernate.h" -#include "hs_cache.h" -#include "hs_circuitmap.h" -#include "hs_client.h" -#include "keypin.h" -#include "main.h" -#include "microdesc.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "ntmain.h" -#include "onion.h" -#include "periodic.h" -#include "policies.h" -#include "protover.h" -#include "transports.h" -#include "relay.h" -#include "rendclient.h" -#include "rendcommon.h" -#include "rendservice.h" -#include "rephist.h" -#include "router.h" -#include "routerkeys.h" -#include "routerlist.h" -#include "routerparse.h" -#include "scheduler.h" -#include "statefile.h" -#include "status.h" -#include "tor_api.h" -#include "tor_api_internal.h" -#include "util_process.h" -#include "ext_orport.h" +#include "or/or.h" +#include "or/addressmap.h" +#include "common/backtrace.h" +#include "or/bridges.h" +#include "common/buffers.h" +#include "common/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 "common/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 "common/crypto_s2k.h" +#include "common/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 "or/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 "common/util_process.h" +#include "or/ext_orport.h" #ifdef USE_DMALLOC #include <dmalloc.h> #endif -#include "memarea.h" -#include "sandbox.h" +#include "common/memarea.h" +#include "common/sandbox.h" #include <event2/event.h> -#include "dirauth/dirvote.h" -#include "dirauth/mode.h" -#include "dirauth/shared_random.h" - -#include "cell_st.h" -#include "entry_connection_st.h" -#include "networkstatus_st.h" -#include "or_connection_st.h" -#include "port_cfg_st.h" -#include "routerinfo_st.h" -#include "socks_request_st.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/port_cfg_st.h" +#include "or/routerinfo_st.h" +#include "or/socks_request_st.h" #ifdef HAVE_SYSTEMD # if defined(__COVERITY__) && !defined(__INCLUDE_LEVEL__) diff --git a/src/or/main.h b/src/or/main.h index 4739d1684b..214a9b3b0a 100644 --- a/src/or/main.h +++ b/src/or/main.h @@ -112,7 +112,7 @@ STATIC int get_my_roles(const or_options_t *options); extern smartlist_t *connection_array; /* We need the periodic_event_item_t definition. */ -#include "periodic.h" +#include "or/periodic.h" extern periodic_event_item_t periodic_events[]; #endif #endif /* defined(MAIN_PRIVATE) */ diff --git a/src/or/microdesc.c b/src/or/microdesc.c index 31e2a2bd1c..d29d2c300e 100644 --- a/src/or/microdesc.c +++ b/src/or/microdesc.c @@ -8,24 +8,24 @@ * less-frequently-changing router information. */ -#include "or.h" -#include "circuitbuild.h" -#include "config.h" -#include "directory.h" -#include "dirserv.h" -#include "entrynodes.h" -#include "microdesc.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "policies.h" -#include "router.h" -#include "routerlist.h" -#include "routerparse.h" - -#include "microdesc_st.h" -#include "networkstatus_st.h" -#include "node_st.h" -#include "routerstatus_st.h" +#include "or/or.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" /** A data structure to hold a bunch of cached microdescriptors. There are * two active files in the cache: a "cache file" that we mmap, and a "journal diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index 5a2dbdcbc4..649d146d45 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -37,55 +37,55 @@ */ #define NETWORKSTATUS_PRIVATE -#include "or.h" -#include "bridges.h" -#include "channel.h" -#include "circuitmux.h" -#include "circuitmux_ewma.h" -#include "circuitstats.h" -#include "config.h" -#include "connection.h" -#include "connection_or.h" -#include "consdiffmgr.h" -#include "control.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "directory.h" -#include "dirserv.h" -#include "dos.h" -#include "entrynodes.h" -#include "hibernate.h" -#include "main.h" -#include "microdesc.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "protover.h" -#include "relay.h" -#include "router.h" -#include "routerlist.h" -#include "routerparse.h" -#include "scheduler.h" -#include "transports.h" -#include "torcert.h" -#include "channelpadding.h" -#include "voting_schedule.h" - -#include "dirauth/dirvote.h" -#include "dirauth/mode.h" -#include "dirauth/shared_random.h" - -#include "authority_cert_st.h" -#include "dir_connection_st.h" -#include "dir_server_st.h" -#include "document_signature_st.h" -#include "networkstatus_st.h" -#include "networkstatus_voter_info_st.h" -#include "ns_detached_signatures_st.h" -#include "node_st.h" -#include "routerinfo_st.h" -#include "routerlist_st.h" -#include "vote_microdesc_hash_st.h" -#include "vote_routerstatus_st.h" +#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_or.h" +#include "or/consdiffmgr.h" +#include "or/control.h" +#include "common/crypto_rand.h" +#include "common/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" /** Most recently received and validated v3 "ns"-flavored consensus network * status. */ diff --git a/src/or/networkstatus.h b/src/or/networkstatus.h index 42cfa5b9b8..97b90dab61 100644 --- a/src/or/networkstatus.h +++ b/src/or/networkstatus.h @@ -12,7 +12,7 @@ #ifndef TOR_NETWORKSTATUS_H #define TOR_NETWORKSTATUS_H -#include "testsupport.h" +#include "common/testsupport.h" void networkstatus_reset_warnings(void); void networkstatus_reset_download_failures(void); diff --git a/src/or/networkstatus_st.h b/src/or/networkstatus_st.h index 0a564ae0e4..4fc04a5aa7 100644 --- a/src/or/networkstatus_st.h +++ b/src/or/networkstatus_st.h @@ -7,7 +7,7 @@ #ifndef NETWORKSTATUS_ST_H #define NETWORKSTATUS_ST_H -#include "networkstatus_sr_info_st.h" +#include "or/networkstatus_sr_info_st.h" /** A common structure to hold a v3 network status vote, or a v3 network * status consensus. */ diff --git a/src/or/node_st.h b/src/or/node_st.h index f8772cbadd..cc777003d8 100644 --- a/src/or/node_st.h +++ b/src/or/node_st.h @@ -7,7 +7,7 @@ #ifndef NODE_ST_H #define NODE_ST_H -#include "hsdir_index_st.h" +#include "or/hsdir_index_st.h" /** A node_t represents a Tor router. * diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 5ad91227a8..561ac9fdaa 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -40,41 +40,41 @@ #define NODELIST_PRIVATE -#include "or.h" -#include "address.h" -#include "address_set.h" -#include "bridges.h" -#include "config.h" -#include "control.h" -#include "dirserv.h" -#include "entrynodes.h" -#include "geoip.h" -#include "hs_common.h" -#include "hs_client.h" -#include "main.h" -#include "microdesc.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "policies.h" -#include "protover.h" -#include "rendservice.h" -#include "router.h" -#include "routerlist.h" -#include "routerparse.h" -#include "routerset.h" -#include "torcert.h" +#include "or/or.h" +#include "common/address.h" +#include "common/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 <string.h> -#include "dirauth/mode.h" +#include "or/dirauth/mode.h" -#include "dir_server_st.h" -#include "microdesc_st.h" -#include "networkstatus_st.h" -#include "node_st.h" -#include "routerinfo_st.h" -#include "routerlist_st.h" -#include "routerstatus_st.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" static void nodelist_drop_node(node_t *node, int remove_from_ht); #define node_free(val) \ diff --git a/src/or/ntmain.c b/src/or/ntmain.c index 8b9adb0eeb..72ab5d9d58 100644 --- a/src/or/ntmain.c +++ b/src/or/ntmain.c @@ -19,10 +19,10 @@ #ifdef _WIN32 -#include "or.h" -#include "config.h" -#include "main.h" -#include "ntmain.h" +#include "or/or.h" +#include "or/config.h" +#include "or/main.h" +#include "or/ntmain.h" #include <windows.h> #define GENSRV_SERVICENAME "tor" diff --git a/src/or/onion.c b/src/or/onion.c index c2bb3940c5..27e05c7cc7 100644 --- a/src/or/onion.c +++ b/src/or/onion.c @@ -62,27 +62,27 @@ * onion_fast.c for more information. **/ -#include "or.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "config.h" -#include "cpuworker.h" -#include "crypto_util.h" -#include "networkstatus.h" -#include "onion.h" -#include "onion_fast.h" -#include "onion_ntor.h" -#include "onion_tap.h" -#include "relay.h" -#include "rephist.h" -#include "router.h" - -#include "cell_st.h" -#include "extend_info_st.h" -#include "or_circuit_st.h" +#include "or/or.h" +#include "or/circuitbuild.h" +#include "or/circuitlist.h" +#include "or/config.h" +#include "or/cpuworker.h" +#include "common/crypto_util.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" // trunnel -#include "ed25519_cert.h" +#include "trunnel/ed25519_cert.h" /** Type for a linked list of circuits that are waiting for a free CPU worker * to process a waiting onion handshake. */ diff --git a/src/or/onion_fast.c b/src/or/onion_fast.c index 84377f6f0d..7d92de038c 100644 --- a/src/or/onion_fast.c +++ b/src/or/onion_fast.c @@ -27,10 +27,10 @@ * many RSA1024 keys. **/ -#include "or.h" -#include "onion_fast.h" -#include "crypto_rand.h" -#include "crypto_util.h" +#include "or/or.h" +#include "or/onion_fast.h" +#include "common/crypto_rand.h" +#include "common/crypto_util.h" /** Release all state held in <b>victim</b>. */ void diff --git a/src/or/onion_ntor.c b/src/or/onion_ntor.c index c8c96e21b0..d44933a2bd 100644 --- a/src/or/onion_ntor.c +++ b/src/or/onion_ntor.c @@ -21,13 +21,13 @@ #include "orconfig.h" #define ONION_NTOR_PRIVATE -#include "crypto.h" -#include "crypto_hkdf.h" -#include "crypto_digest.h" -#include "crypto_util.h" -#include "onion_ntor.h" -#include "torlog.h" -#include "util.h" +#include "common/crypto.h" +#include "common/crypto_hkdf.h" +#include "common/crypto_digest.h" +#include "common/crypto_util.h" +#include "or/onion_ntor.h" +#include "common/torlog.h" +#include "common/util.h" /** Free storage held in an ntor handshake state. */ void diff --git a/src/or/onion_ntor.h b/src/or/onion_ntor.h index e90657e888..3acb1eb626 100644 --- a/src/or/onion_ntor.h +++ b/src/or/onion_ntor.h @@ -4,9 +4,9 @@ #ifndef TOR_ONION_NTOR_H #define TOR_ONION_NTOR_H -#include "torint.h" -#include "crypto_curve25519.h" -#include "di_ops.h" +#include "common/torint.h" +#include "common/crypto_curve25519.h" +#include "common/di_ops.h" /** State to be maintained by a client between sending an ntor onionskin * and receiving a reply. */ diff --git a/src/or/onion_tap.c b/src/or/onion_tap.c index 06dc7c93e4..0f9fe31be4 100644 --- a/src/or/onion_tap.c +++ b/src/or/onion_tap.c @@ -27,12 +27,12 @@ * invoked from onion.c. **/ -#include "or.h" -#include "config.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "onion_tap.h" -#include "rephist.h" +#include "or/or.h" +#include "or/config.h" +#include "common/crypto_rand.h" +#include "common/crypto_util.h" +#include "or/onion_tap.h" +#include "or/rephist.h" /*----------------------------------------------------------------------*/ diff --git a/src/or/or.h b/src/or/or.h index b9935ed2cc..dc6d353cd9 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -26,7 +26,7 @@ #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> /* FreeBSD needs this to know what version it is */ #endif -#include "torint.h" +#include "common/torint.h" #ifdef HAVE_SYS_FCNTL_H #include <sys/fcntl.h> #endif @@ -66,29 +66,29 @@ #include <windows.h> #endif /* defined(_WIN32) */ -#include "crypto.h" -#include "crypto_format.h" -#include "crypto_dh.h" -#include "crypto_hkdf.h" -#include "tortls.h" -#include "torlog.h" -#include "container.h" -#include "compress.h" -#include "address.h" -#include "compat_libevent.h" +#include "common/crypto.h" +#include "common/crypto_format.h" +#include "common/crypto_dh.h" +#include "common/crypto_hkdf.h" +#include "common/tortls.h" +#include "common/torlog.h" +#include "common/container.h" +#include "common/compress.h" +#include "common/address.h" +#include "common/compat_libevent.h" #include "ht.h" -#include "confline.h" -#include "replaycache.h" -#include "crypto_curve25519.h" -#include "crypto_ed25519.h" +#include "common/confline.h" +#include "or/replaycache.h" +#include "common/crypto_curve25519.h" +#include "common/crypto_ed25519.h" #include "tor_queue.h" -#include "token_bucket.h" -#include "util_format.h" -#include "hs_circuitmap.h" +#include "common/token_bucket.h" +#include "common/util_format.h" +#include "or/hs_circuitmap.h" // These, more than other includes, are for keeping the other struct // definitions working. We should remove them when we minimize our includes. -#include "entry_port_cfg_st.h" +#include "or/entry_port_cfg_st.h" /* These signals are defined to help handle_control_signal work. */ diff --git a/src/or/or_circuit_st.h b/src/or/or_circuit_st.h index 7416219503..158a5314ef 100644 --- a/src/or/or_circuit_st.h +++ b/src/or/or_circuit_st.h @@ -7,10 +7,10 @@ #ifndef OR_CIRCUIT_ST_H #define OR_CIRCUIT_ST_H -#include "or.h" +#include "or/or.h" -#include "circuit_st.h" -#include "crypt_path_st.h" +#include "or/circuit_st.h" +#include "or/crypt_path_st.h" struct onion_queue_t; diff --git a/src/or/or_connection_st.h b/src/or/or_connection_st.h index a043c63f42..eba2721c37 100644 --- a/src/or/or_connection_st.h +++ b/src/or/or_connection_st.h @@ -7,7 +7,7 @@ #ifndef OR_CONNECTION_ST_H #define OR_CONNECTION_ST_H -#include "connection_st.h" +#include "or/connection_st.h" /** Subtype of connection_t for an "OR connection" -- that is, one that speaks * cells over TLS. */ diff --git a/src/or/origin_circuit_st.h b/src/or/origin_circuit_st.h index de25b67d70..fa41214d41 100644 --- a/src/or/origin_circuit_st.h +++ b/src/or/origin_circuit_st.h @@ -7,9 +7,9 @@ #ifndef ORIGIN_CIRCUIT_ST_H #define ORIGIN_CIRCUIT_ST_H -#include "or.h" +#include "or/or.h" -#include "circuit_st.h" +#include "or/circuit_st.h" struct onion_queue_t; diff --git a/src/or/parsecommon.c b/src/or/parsecommon.c index 8a8b7f6b13..09c7d665fe 100644 --- a/src/or/parsecommon.c +++ b/src/or/parsecommon.c @@ -6,9 +6,9 @@ * \brief Common code to parse and validate various type of descriptors. **/ -#include "parsecommon.h" -#include "torlog.h" -#include "util_format.h" +#include "or/parsecommon.h" +#include "common/torlog.h" +#include "common/util_format.h" #define MIN_ANNOTATION A_PURPOSE #define MAX_ANNOTATION A_UNKNOWN_ diff --git a/src/or/parsecommon.h b/src/or/parsecommon.h index fdcd2838e7..bfd5c58b8e 100644 --- a/src/or/parsecommon.h +++ b/src/or/parsecommon.h @@ -9,9 +9,9 @@ #ifndef TOR_PARSECOMMON_H #define TOR_PARSECOMMON_H -#include "container.h" -#include "crypto.h" -#include "memarea.h" +#include "common/container.h" +#include "common/crypto.h" +#include "common/memarea.h" /** Enumeration of possible token types. The ones starting with K_ correspond * to directory 'keywords'. A_ is for an annotation, R or C is related to diff --git a/src/or/periodic.c b/src/or/periodic.c index 57967ccdf3..d379325f50 100644 --- a/src/or/periodic.c +++ b/src/or/periodic.c @@ -11,11 +11,11 @@ * that they fire. See periodic_events[] in main.c for examples. */ -#include "or.h" -#include "compat_libevent.h" -#include "config.h" -#include "main.h" -#include "periodic.h" +#include "or/or.h" +#include "common/compat_libevent.h" +#include "or/config.h" +#include "or/main.h" +#include "or/periodic.h" /** We disable any interval greater than this number of seconds, on the * grounds that it is probably an absolute time mistakenly passed in as a diff --git a/src/or/policies.c b/src/or/policies.c index 150635580c..0f52d6bf15 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -17,25 +17,25 @@ #define POLICIES_PRIVATE -#include "or.h" -#include "bridges.h" -#include "config.h" -#include "dirserv.h" -#include "microdesc.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "policies.h" -#include "router.h" -#include "routerparse.h" -#include "geoip.h" +#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 "ht.h" -#include "dir_server_st.h" -#include "microdesc_st.h" -#include "node_st.h" -#include "port_cfg_st.h" -#include "routerinfo_st.h" -#include "routerstatus_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" /** Policy that addresses for incoming SOCKS connections must match. */ static smartlist_t *socks_policy = NULL; diff --git a/src/or/port_cfg_st.h b/src/or/port_cfg_st.h index 4a1aa5dbd3..86a3b963bc 100644 --- a/src/or/port_cfg_st.h +++ b/src/or/port_cfg_st.h @@ -7,8 +7,8 @@ #ifndef PORT_CFG_ST_H #define PORT_CFG_ST_H -#include "entry_port_cfg_st.h" -#include "server_port_cfg_st.h" +#include "or/entry_port_cfg_st.h" +#include "or/server_port_cfg_st.h" /** Configuration for a single port that we're listening on. */ struct port_cfg_t { diff --git a/src/or/proto_cell.c b/src/or/proto_cell.c index b27368911c..af0862a971 100644 --- a/src/or/proto_cell.c +++ b/src/or/proto_cell.c @@ -4,13 +4,13 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ -#include "or.h" -#include "buffers.h" -#include "proto_cell.h" +#include "or/or.h" +#include "common/buffers.h" +#include "or/proto_cell.h" -#include "connection_or.h" +#include "or/connection_or.h" -#include "var_cell_st.h" +#include "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>. */ diff --git a/src/or/proto_control0.c b/src/or/proto_control0.c index 9b4f7384c9..5d83b11cb9 100644 --- a/src/or/proto_control0.c +++ b/src/or/proto_control0.c @@ -4,9 +4,9 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ -#include "or.h" -#include "buffers.h" -#include "proto_control0.h" +#include "or/or.h" +#include "common/buffers.h" +#include "or/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. */ diff --git a/src/or/proto_ext_or.c b/src/or/proto_ext_or.c index 3e793f6e04..495b489bc4 100644 --- a/src/or/proto_ext_or.c +++ b/src/or/proto_ext_or.c @@ -4,10 +4,10 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ -#include "or.h" -#include "buffers.h" -#include "ext_orport.h" -#include "proto_ext_or.h" +#include "or/or.h" +#include "common/buffers.h" +#include "or/ext_orport.h" +#include "or/proto_ext_or.h" /** The size of the header of an Extended ORPort message: 2 bytes for * COMMAND, 2 bytes for BODYLEN */ diff --git a/src/or/proto_http.c b/src/or/proto_http.c index 3c8f108c95..45f763b2af 100644 --- a/src/or/proto_http.c +++ b/src/or/proto_http.c @@ -5,9 +5,9 @@ /* See LICENSE for licensing information */ #define PROTO_HTTP_PRIVATE -#include "or.h" -#include "buffers.h" -#include "proto_http.h" +#include "or/or.h" +#include "common/buffers.h" +#include "or/proto_http.h" /** Return true if <b>cmd</b> looks like a HTTP (proxy) request. */ int diff --git a/src/or/proto_socks.c b/src/or/proto_socks.c index d908cd84f2..d113bc9cab 100644 --- a/src/or/proto_socks.c +++ b/src/or/proto_socks.c @@ -4,17 +4,17 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ -#include "or.h" -#include "addressmap.h" -#include "buffers.h" -#include "control.h" -#include "config.h" -#include "crypto_util.h" -#include "ext_orport.h" -#include "proto_socks.h" -#include "reasons.h" - -#include "socks_request_st.h" +#include "or/or.h" +#include "or/addressmap.h" +#include "common/buffers.h" +#include "or/control.h" +#include "or/config.h" +#include "common/crypto_util.h" +#include "or/ext_orport.h" +#include "or/proto_socks.h" +#include "or/reasons.h" + +#include "or/socks_request_st.h" static void socks_request_set_socks5_error(socks_request_t *req, socks5_reply_status_t reason); diff --git a/src/or/protover.c b/src/or/protover.c index 1dbb43007f..3a106a50e8 100644 --- a/src/or/protover.c +++ b/src/or/protover.c @@ -23,9 +23,9 @@ #define PROTOVER_PRIVATE -#include "or.h" -#include "protover.h" -#include "routerparse.h" +#include "or/or.h" +#include "or/protover.h" +#include "or/routerparse.h" #ifndef HAVE_RUST diff --git a/src/or/protover.h b/src/or/protover.h index 30b61ff59c..6236ed133c 100644 --- a/src/or/protover.h +++ b/src/or/protover.h @@ -9,7 +9,7 @@ #ifndef TOR_PROTOVER_H #define TOR_PROTOVER_H -#include "container.h" +#include "common/container.h" /** The first version of Tor that included "proto" entries in its * descriptors. Authorities should use this to decide whether to diff --git a/src/or/protover_rust.c b/src/or/protover_rust.c index f9743491c8..bd2f88b98e 100644 --- a/src/or/protover_rust.c +++ b/src/or/protover_rust.c @@ -7,8 +7,8 @@ * and safe translation/handling between the Rust/C boundary. */ -#include "or.h" -#include "protover.h" +#include "or/or.h" +#include "or/protover.h" #ifdef HAVE_RUST diff --git a/src/or/reasons.c b/src/or/reasons.c index 4082c8d0b2..b9b7a7db8b 100644 --- a/src/or/reasons.c +++ b/src/or/reasons.c @@ -14,9 +14,9 @@ * to another. **/ -#include "or.h" -#include "config.h" -#include "reasons.h" +#include "or/or.h" +#include "or/config.h" +#include "or/reasons.h" /***************************** Edge (stream) reasons **********************/ diff --git a/src/or/relay.c b/src/or/relay.c index a60e5d6019..143580a310 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -46,53 +46,53 @@ **/ #define RELAY_PRIVATE -#include "or.h" -#include "addressmap.h" -#include "backtrace.h" -#include "buffers.h" -#include "channel.h" -#include "circpathbias.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "compress.h" -#include "config.h" -#include "connection.h" -#include "connection_edge.h" -#include "connection_or.h" -#include "control.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "directory.h" -#include "geoip.h" -#include "hs_cache.h" -#include "main.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "onion.h" -#include "policies.h" -#include "reasons.h" -#include "relay.h" -#include "relay_crypto.h" -#include "rendcache.h" -#include "rendcommon.h" -#include "router.h" -#include "routerlist.h" -#include "routerparse.h" -#include "scheduler.h" -#include "rephist.h" - -#include "cell_st.h" -#include "cell_queue_st.h" -#include "cpath_build_state_st.h" -#include "dir_connection_st.h" -#include "destroy_cell_queue_st.h" -#include "entry_connection_st.h" -#include "extend_info_st.h" -#include "or_circuit_st.h" -#include "origin_circuit_st.h" -#include "routerinfo_st.h" -#include "socks_request_st.h" +#include "or/or.h" +#include "or/addressmap.h" +#include "common/backtrace.h" +#include "common/buffers.h" +#include "or/channel.h" +#include "or/circpathbias.h" +#include "or/circuitbuild.h" +#include "or/circuitlist.h" +#include "or/circuituse.h" +#include "common/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 "common/crypto_rand.h" +#include "common/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" static edge_connection_t *relay_lookup_conn(circuit_t *circ, cell_t *cell, cell_direction_t cell_direction, diff --git a/src/or/relay_crypto.c b/src/or/relay_crypto.c index 82ff9aca88..5179984e7d 100644 --- a/src/or/relay_crypto.c +++ b/src/or/relay_crypto.c @@ -4,17 +4,17 @@ * Copyright (c) 2007-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ -#include "or.h" -#include "circuitlist.h" -#include "config.h" -#include "crypto_util.h" -#include "hs_ntor.h" // for HS_NTOR_KEY_EXPANSION_KDF_OUT_LEN -#include "relay.h" -#include "relay_crypto.h" - -#include "cell_st.h" -#include "or_circuit_st.h" -#include "origin_circuit_st.h" +#include "or/or.h" +#include "or/circuitlist.h" +#include "or/config.h" +#include "common/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 "or/cell_st.h" +#include "or/or_circuit_st.h" +#include "or/origin_circuit_st.h" /** Update digest from the payload of cell. Assign integrity part to * cell. diff --git a/src/or/rendcache.c b/src/or/rendcache.c index 1d1223883e..c18920154e 100644 --- a/src/or/rendcache.c +++ b/src/or/rendcache.c @@ -7,17 +7,17 @@ **/ #define RENDCACHE_PRIVATE -#include "rendcache.h" +#include "or/rendcache.h" -#include "config.h" -#include "rephist.h" -#include "routerlist.h" -#include "routerparse.h" -#include "rendcommon.h" +#include "or/config.h" +#include "or/rephist.h" +#include "or/routerlist.h" +#include "or/routerparse.h" +#include "or/rendcommon.h" -#include "extend_info_st.h" -#include "rend_intro_point_st.h" -#include "rend_service_descriptor_st.h" +#include "or/extend_info_st.h" +#include "or/rend_intro_point_st.h" +#include "or/rend_service_descriptor_st.h" /** Map from service id (as generated by rend_get_service_id) to * rend_cache_entry_t. */ diff --git a/src/or/rendcache.h b/src/or/rendcache.h index 12af720cf3..bb075409ec 100644 --- a/src/or/rendcache.h +++ b/src/or/rendcache.h @@ -9,8 +9,8 @@ #ifndef TOR_RENDCACHE_H #define TOR_RENDCACHE_H -#include "or.h" -#include "rendcommon.h" +#include "or/or.h" +#include "or/rendcommon.h" /** How old do we let hidden service descriptors get before discarding * them as too old? */ diff --git a/src/or/rendclient.c b/src/or/rendclient.c index f1c410dfb3..6fde0ba266 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -7,41 +7,41 @@ * \brief Client code to access location-hidden services. **/ -#include "or.h" -#include "circpathbias.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "config.h" -#include "connection.h" -#include "connection_edge.h" -#include "control.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "directory.h" -#include "hs_circuit.h" -#include "hs_client.h" -#include "hs_common.h" -#include "main.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "relay.h" -#include "rendclient.h" -#include "rendcommon.h" -#include "rephist.h" -#include "router.h" -#include "routerlist.h" -#include "routerset.h" - -#include "cpath_build_state_st.h" -#include "crypt_path_st.h" -#include "dir_connection_st.h" -#include "entry_connection_st.h" -#include "extend_info_st.h" -#include "origin_circuit_st.h" -#include "rend_intro_point_st.h" -#include "rend_service_descriptor_st.h" -#include "routerstatus_st.h" +#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 "common/crypto_rand.h" +#include "common/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 "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" static extend_info_t *rend_client_get_random_intro_impl( const rend_cache_entry_t *rend_query, diff --git a/src/or/rendclient.h b/src/or/rendclient.h index 2d32a3b8f4..77395d6cb8 100644 --- a/src/or/rendclient.h +++ b/src/or/rendclient.h @@ -12,7 +12,7 @@ #ifndef TOR_RENDCLIENT_H #define TOR_RENDCLIENT_H -#include "rendcache.h" +#include "or/rendcache.h" void rend_client_purge_state(void); diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index ab064af708..2c1caa6ce5 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -10,36 +10,36 @@ #define RENDCOMMON_PRIVATE -#include "or.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "config.h" -#include "control.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "hs_client.h" -#include "hs_common.h" -#include "hs_intropoint.h" -#include "networkstatus.h" -#include "rendclient.h" -#include "rendcommon.h" -#include "rendmid.h" -#include "rendservice.h" -#include "rephist.h" -#include "router.h" -#include "routerlist.h" -#include "routerparse.h" - -#include "cpath_build_state_st.h" -#include "crypt_path_st.h" -#include "extend_info_st.h" -#include "networkstatus_st.h" -#include "origin_circuit_st.h" -#include "rend_encoded_v2_service_descriptor_st.h" -#include "rend_intro_point_st.h" -#include "rend_service_descriptor_st.h" -#include "routerstatus_st.h" +#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 "common/crypto_rand.h" +#include "common/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/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" /** Return 0 if one and two are the same service ids, else -1 or 1 */ int diff --git a/src/or/rendmid.c b/src/or/rendmid.c index a6e987dc43..77a5347125 100644 --- a/src/or/rendmid.c +++ b/src/or/rendmid.c @@ -7,20 +7,20 @@ * \brief Implement introductions points and rendezvous points. **/ -#include "or.h" -#include "channel.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "config.h" -#include "crypto.h" -#include "dos.h" -#include "relay.h" -#include "rendmid.h" -#include "rephist.h" -#include "hs_circuitmap.h" -#include "hs_intropoint.h" - -#include "or_circuit_st.h" +#include "or/or.h" +#include "or/channel.h" +#include "or/circuitlist.h" +#include "or/circuituse.h" +#include "or/config.h" +#include "common/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" /** Respond to an ESTABLISH_INTRO cell by checking the signed data and * setting the circuit's purpose and service pk digest. diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 89088153bd..21a5a4e03b 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -9,45 +9,45 @@ #define RENDSERVICE_PRIVATE -#include "or.h" -#include "circpathbias.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "config.h" -#include "control.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "directory.h" -#include "hs_common.h" -#include "hs_config.h" -#include "main.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "policies.h" -#include "rendclient.h" -#include "rendcommon.h" -#include "rendservice.h" -#include "router.h" -#include "relay.h" -#include "rephist.h" -#include "replaycache.h" -#include "routerlist.h" -#include "routerparse.h" -#include "routerset.h" - -#include "cpath_build_state_st.h" -#include "crypt_path_st.h" -#include "crypt_path_reference_st.h" -#include "edge_connection_st.h" -#include "extend_info_st.h" -#include "networkstatus_st.h" -#include "origin_circuit_st.h" -#include "rend_authorized_client_st.h" -#include "rend_encoded_v2_service_descriptor_st.h" -#include "rend_intro_point_st.h" -#include "rend_service_descriptor_st.h" -#include "routerstatus_st.h" +#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 "common/crypto_rand.h" +#include "common/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 "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" struct rend_service_t; static origin_circuit_t *find_intro_circuit(rend_intro_point_t *intro, diff --git a/src/or/rendservice.h b/src/or/rendservice.h index a4d7700787..b2644d8b40 100644 --- a/src/or/rendservice.h +++ b/src/or/rendservice.h @@ -12,8 +12,8 @@ #ifndef TOR_RENDSERVICE_H #define TOR_RENDSERVICE_H -#include "or.h" -#include "hs_service.h" +#include "or/or.h" +#include "or/hs_service.h" typedef struct rend_intro_cell_s rend_intro_cell_t; diff --git a/src/or/rephist.c b/src/or/rephist.c index d401e0b3e2..c7a0a25563 100644 --- a/src/or/rephist.c +++ b/src/or/rephist.c @@ -74,23 +74,23 @@ * (The "rephist" name originally stood for "reputation and history". ) **/ -#include "or.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "config.h" -#include "crypto_rand.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "rephist.h" -#include "router.h" -#include "routerlist.h" +#include "or/or.h" +#include "or/circuitlist.h" +#include "or/circuituse.h" +#include "or/config.h" +#include "common/crypto_rand.h" +#include "or/networkstatus.h" +#include "or/nodelist.h" +#include "or/rephist.h" +#include "or/router.h" +#include "or/routerlist.h" #include "ht.h" -#include "channelpadding.h" -#include "connection_or.h" -#include "statefile.h" +#include "or/channelpadding.h" +#include "or/connection_or.h" +#include "or/statefile.h" -#include "networkstatus_st.h" -#include "or_circuit_st.h" +#include "or/networkstatus_st.h" +#include "or/or_circuit_st.h" static void bw_arrays_init(void); static void predicted_ports_alloc(void); diff --git a/src/or/replaycache.c b/src/or/replaycache.c index fd09b9f402..b5cc6a2823 100644 --- a/src/or/replaycache.c +++ b/src/or/replaycache.c @@ -21,8 +21,8 @@ #define REPLAYCACHE_PRIVATE -#include "or.h" -#include "replaycache.h" +#include "or/or.h" +#include "or/replaycache.h" /** Free the replaycache r and all of its entries. */ diff --git a/src/or/router.c b/src/or/router.c index 53dc7e836e..4f162ceac1 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -6,49 +6,49 @@ #define ROUTER_PRIVATE -#include "or.h" -#include "circuitbuild.h" -#include "circuitlist.h" -#include "circuituse.h" -#include "config.h" -#include "connection.h" -#include "control.h" -#include "crypto_rand.h" -#include "crypto_util.h" -#include "crypto_curve25519.h" -#include "directory.h" -#include "dirserv.h" -#include "dns.h" -#include "geoip.h" -#include "hibernate.h" -#include "main.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "policies.h" -#include "protover.h" -#include "relay.h" -#include "rephist.h" -#include "router.h" -#include "routerkeys.h" -#include "routerlist.h" -#include "routerparse.h" -#include "statefile.h" -#include "torcert.h" -#include "transports.h" -#include "routerset.h" - -#include "dirauth/mode.h" - -#include "authority_cert_st.h" -#include "crypt_path_st.h" -#include "dir_connection_st.h" -#include "dir_server_st.h" -#include "extend_info_st.h" -#include "extrainfo_st.h" -#include "node_st.h" -#include "origin_circuit_st.h" -#include "port_cfg_st.h" -#include "routerinfo_st.h" +#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 "common/crypto_rand.h" +#include "common/crypto_util.h" +#include "common/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/port_cfg_st.h" +#include "or/routerinfo_st.h" /** * \file router.c diff --git a/src/or/router.h b/src/or/router.h index d4cf82d59e..4a383ac420 100644 --- a/src/or/router.h +++ b/src/or/router.h @@ -12,7 +12,7 @@ #ifndef TOR_ROUTER_H #define TOR_ROUTER_H -#include "testsupport.h" +#include "common/testsupport.h" #define TOR_ROUTERINFO_ERROR_NO_EXT_ADDR (-1) #define TOR_ROUTERINFO_ERROR_CANNOT_PARSE (-2) diff --git a/src/or/routerinfo_st.h b/src/or/routerinfo_st.h index c9f9894390..feb3b41fc6 100644 --- a/src/or/routerinfo_st.h +++ b/src/or/routerinfo_st.h @@ -7,7 +7,7 @@ #ifndef ROUTERINFO_ST_H #define ROUTERINFO_ST_H -#include "signed_descriptor_st.h" +#include "or/signed_descriptor_st.h" /** Information about another onion router in the network. */ struct routerinfo_t { diff --git a/src/or/routerkeys.c b/src/or/routerkeys.c index 3fab049df7..6bf066fbb4 100644 --- a/src/or/routerkeys.c +++ b/src/or/routerkeys.c @@ -14,13 +14,13 @@ * (TODO: The keys in router.c should go here too.) */ -#include "or.h" -#include "config.h" -#include "crypto_util.h" -#include "router.h" -#include "crypto_pwbox.h" -#include "routerkeys.h" -#include "torcert.h" +#include "or/or.h" +#include "or/config.h" +#include "common/crypto_util.h" +#include "or/router.h" +#include "common/crypto_pwbox.h" +#include "or/routerkeys.h" +#include "or/torcert.h" #define ENC_KEY_HEADER "Boxed Ed25519 key" #define ENC_KEY_TAG "master" diff --git a/src/or/routerkeys.h b/src/or/routerkeys.h index 764f7513ab..2339495d40 100644 --- a/src/or/routerkeys.h +++ b/src/or/routerkeys.h @@ -4,7 +4,7 @@ #ifndef TOR_ROUTERKEYS_H #define TOR_ROUTERKEYS_H -#include "crypto_ed25519.h" +#include "common/crypto_ed25519.h" #define INIT_ED_KEY_CREATE (1u<<0) #define INIT_ED_KEY_REPLACE (1u<<1) diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 8bdfbeee1a..9ab01f4b39 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -91,51 +91,51 @@ **/ #define ROUTERLIST_PRIVATE -#include "or.h" -#include "backtrace.h" -#include "bridges.h" -#include "crypto_ed25519.h" -#include "circuitstats.h" -#include "config.h" -#include "connection.h" -#include "control.h" -#include "crypto_rand.h" -#include "directory.h" -#include "dirserv.h" -#include "entrynodes.h" -#include "fp_pair.h" -#include "geoip.h" -#include "hibernate.h" -#include "main.h" -#include "microdesc.h" -#include "networkstatus.h" -#include "nodelist.h" -#include "policies.h" -#include "reasons.h" -#include "rendcommon.h" -#include "rendservice.h" -#include "rephist.h" -#include "router.h" -#include "routerlist.h" -#include "routerparse.h" -#include "routerset.h" -#include "sandbox.h" -#include "torcert.h" - -#include "dirauth/dirvote.h" -#include "dirauth/mode.h" - -#include "authority_cert_st.h" -#include "dir_connection_st.h" -#include "dir_server_st.h" -#include "document_signature_st.h" -#include "extrainfo_st.h" -#include "networkstatus_st.h" -#include "networkstatus_voter_info_st.h" -#include "node_st.h" -#include "routerinfo_st.h" -#include "routerlist_st.h" -#include "vote_routerstatus_st.h" +#include "or/or.h" +#include "common/backtrace.h" +#include "or/bridges.h" +#include "common/crypto_ed25519.h" +#include "or/circuitstats.h" +#include "or/config.h" +#include "or/connection.h" +#include "or/control.h" +#include "common/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 "common/sandbox.h" +#include "or/torcert.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" // #define DEBUG_ROUTERLIST diff --git a/src/or/routerlist.h b/src/or/routerlist.h index eb6a658fbf..a90c26b444 100644 --- a/src/or/routerlist.h +++ b/src/or/routerlist.h @@ -11,7 +11,7 @@ #ifndef TOR_ROUTERLIST_H #define TOR_ROUTERLIST_H -#include "testsupport.h" +#include "common/testsupport.h" int get_n_authorities(dirinfo_type_t type); int trusted_dirs_reload_certs(void); diff --git a/src/or/routerlist_st.h b/src/or/routerlist_st.h index 123c0ab639..0b94a4dfcd 100644 --- a/src/or/routerlist_st.h +++ b/src/or/routerlist_st.h @@ -7,7 +7,7 @@ #ifndef ROUTERLIST_ST_H #define ROUTERLIST_ST_H -#include "desc_store_st.h" +#include "or/desc_store_st.h" /** Contents of a directory of onion routers. */ struct routerlist_t { diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 20fb6d1700..48b1828172 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -55,48 +55,48 @@ #define ROUTERPARSE_PRIVATE -#include "or.h" -#include "circuitstats.h" -#include "config.h" -#include "crypto_util.h" -#include "dirauth/shared_random.h" -#include "dirserv.h" -#include "entrynodes.h" -#include "memarea.h" -#include "microdesc.h" -#include "networkstatus.h" -#include "parsecommon.h" -#include "policies.h" -#include "protover.h" -#include "rendcommon.h" -#include "rephist.h" -#include "router.h" -#include "routerkeys.h" -#include "routerlist.h" -#include "routerparse.h" -#include "sandbox.h" -#include "shared_random_client.h" -#include "torcert.h" -#include "voting_schedule.h" - -#include "dirauth/dirvote.h" - -#include "authority_cert_st.h" -#include "document_signature_st.h" -#include "extend_info_st.h" -#include "extrainfo_st.h" -#include "microdesc_st.h" -#include "networkstatus_st.h" -#include "networkstatus_voter_info_st.h" -#include "ns_detached_signatures_st.h" -#include "rend_authorized_client_st.h" -#include "rend_intro_point_st.h" -#include "rend_service_descriptor_st.h" -#include "routerinfo_st.h" -#include "routerlist_st.h" -#include "tor_version_st.h" -#include "vote_microdesc_hash_st.h" -#include "vote_routerstatus_st.h" +#include "or/or.h" +#include "or/circuitstats.h" +#include "or/config.h" +#include "common/crypto_util.h" +#include "or/dirauth/shared_random.h" +#include "or/dirserv.h" +#include "or/entrynodes.h" +#include "common/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 "common/sandbox.h" +#include "or/shared_random_client.h" +#include "or/torcert.h" +#include "or/voting_schedule.h" + +#include "or/dirauth/dirvote.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" #undef log #include <math.h> diff --git a/src/or/routerset.c b/src/or/routerset.c index d08db8f4ba..231ae152a5 100644 --- a/src/or/routerset.c +++ b/src/or/routerset.c @@ -27,19 +27,19 @@ #define ROUTERSET_PRIVATE -#include "or.h" -#include "bridges.h" -#include "geoip.h" -#include "nodelist.h" -#include "policies.h" -#include "router.h" -#include "routerparse.h" -#include "routerset.h" - -#include "extend_info_st.h" -#include "node_st.h" -#include "routerinfo_st.h" -#include "routerstatus_st.h" +#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/extend_info_st.h" +#include "or/node_st.h" +#include "or/routerinfo_st.h" +#include "or/routerstatus_st.h" /** Return a new empty routerset. */ routerset_t * diff --git a/src/or/routerstatus_st.h b/src/or/routerstatus_st.h index 9d749ddb64..3de4a40ae4 100644 --- a/src/or/routerstatus_st.h +++ b/src/or/routerstatus_st.h @@ -7,7 +7,7 @@ #ifndef ROUTERSTATUS_ST_H #define ROUTERSTATUS_ST_H -#include "download_status_st.h" +#include "or/download_status_st.h" /** Contents of a single router entry in a network status object. */ diff --git a/src/or/scheduler.c b/src/or/scheduler.c index 90c81eb053..5190100261 100644 --- a/src/or/scheduler.c +++ b/src/or/scheduler.c @@ -1,19 +1,19 @@ /* Copyright (c) 2013-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ -#include "or.h" -#include "config.h" +#include "or/or.h" +#include "or/config.h" -#include "compat_libevent.h" +#include "common/compat_libevent.h" #define SCHEDULER_PRIVATE_ #define SCHEDULER_KIST_PRIVATE -#include "scheduler.h" -#include "main.h" -#include "buffers.h" +#include "or/scheduler.h" +#include "or/main.h" +#include "common/buffers.h" #define TOR_CHANNEL_INTERNAL_ -#include "channeltls.h" +#include "or/channeltls.h" -#include "or_connection_st.h" +#include "or/or_connection_st.h" /** * \file scheduler.c diff --git a/src/or/scheduler.h b/src/or/scheduler.h index 24e85b21a3..37c192fea9 100644 --- a/src/or/scheduler.h +++ b/src/or/scheduler.h @@ -9,9 +9,9 @@ #ifndef TOR_SCHEDULER_H #define TOR_SCHEDULER_H -#include "or.h" -#include "channel.h" -#include "testsupport.h" +#include "or/or.h" +#include "or/channel.h" +#include "common/testsupport.h" /** Scheduler type, we build an ordered list with those values from the * parsed strings in Schedulers. The reason to do such a thing is so we can diff --git a/src/or/scheduler_kist.c b/src/or/scheduler_kist.c index 796bdf6ab4..6f07458d44 100644 --- a/src/or/scheduler_kist.c +++ b/src/or/scheduler_kist.c @@ -3,18 +3,18 @@ #define SCHEDULER_KIST_PRIVATE -#include "or.h" -#include "buffers.h" -#include "config.h" -#include "connection.h" -#include "networkstatus.h" +#include "or/or.h" +#include "common/buffers.h" +#include "or/config.h" +#include "or/connection.h" +#include "or/networkstatus.h" #define TOR_CHANNEL_INTERNAL_ -#include "channel.h" -#include "channeltls.h" +#include "or/channel.h" +#include "or/channeltls.h" #define SCHEDULER_PRIVATE_ -#include "scheduler.h" +#include "or/scheduler.h" -#include "or_connection_st.h" +#include "or/or_connection_st.h" #define TLS_PER_CELL_OVERHEAD 29 diff --git a/src/or/scheduler_vanilla.c b/src/or/scheduler_vanilla.c index 0400d77d71..0346af2ada 100644 --- a/src/or/scheduler_vanilla.c +++ b/src/or/scheduler_vanilla.c @@ -1,12 +1,12 @@ /* Copyright (c) 2017-2018, The Tor Project, Inc. */ /* See LICENSE for licensing information */ -#include "or.h" -#include "config.h" +#include "or/or.h" +#include "or/config.h" #define TOR_CHANNEL_INTERNAL_ -#include "channel.h" +#include "or/channel.h" #define SCHEDULER_PRIVATE_ -#include "scheduler.h" +#include "or/scheduler.h" /***************************************************************************** * Other internal data diff --git a/src/or/shared_random_client.c b/src/or/shared_random_client.c index e34c6e9a8b..f0b13a171e 100644 --- a/src/or/shared_random_client.c +++ b/src/or/shared_random_client.c @@ -9,15 +9,15 @@ **/ #define SHARED_RANDOM_CLIENT_PRIVATE -#include "shared_random_client.h" +#include "or/shared_random_client.h" -#include "config.h" -#include "voting_schedule.h" -#include "networkstatus.h" -#include "util.h" -#include "util_format.h" +#include "or/config.h" +#include "or/voting_schedule.h" +#include "or/networkstatus.h" +#include "common/util.h" +#include "common/util_format.h" -#include "networkstatus_st.h" +#include "or/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. */ diff --git a/src/or/shared_random_client.h b/src/or/shared_random_client.h index aa71eb0d97..079829496c 100644 --- a/src/or/shared_random_client.h +++ b/src/or/shared_random_client.h @@ -10,7 +10,7 @@ #define TOR_SHARED_RANDOM_CLIENT_H /* Dirauth module. */ -#include "dirauth/shared_random.h" +#include "or/dirauth/shared_random.h" /* Helper functions. */ void sr_srv_encode(char *dst, size_t dst_len, const sr_srv_t *srv); diff --git a/src/or/signed_descriptor_st.h b/src/or/signed_descriptor_st.h index 92990ab5d2..90cd4a2703 100644 --- a/src/or/signed_descriptor_st.h +++ b/src/or/signed_descriptor_st.h @@ -7,7 +7,7 @@ #ifndef SIGNED_DESCRIPTOR_ST_H #define SIGNED_DESCRIPTOR_ST_H -#include "download_status_st.h" +#include "or/download_status_st.h" /** Information need to cache an onion router's descriptor. */ struct signed_descriptor_t { diff --git a/src/or/statefile.c b/src/or/statefile.c index 5b30228b94..53a25e13f2 100644 --- a/src/or/statefile.c +++ b/src/or/statefile.c @@ -29,19 +29,19 @@ */ #define STATEFILE_PRIVATE -#include "or.h" -#include "circuitstats.h" -#include "config.h" -#include "confparse.h" -#include "connection.h" -#include "control.h" -#include "entrynodes.h" -#include "hibernate.h" -#include "main.h" -#include "rephist.h" -#include "router.h" -#include "sandbox.h" -#include "statefile.h" +#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 "common/sandbox.h" +#include "or/statefile.h" /** A list of state-file "abbreviations," for compatibility. */ static config_abbrev_t state_abbrevs_[] = { diff --git a/src/or/status.c b/src/or/status.c index 4f1d92cc2a..d0b3bc5536 100644 --- a/src/or/status.c +++ b/src/or/status.c @@ -14,26 +14,26 @@ #define STATUS_PRIVATE -#include "or.h" -#include "circuituse.h" -#include "config.h" -#include "status.h" -#include "nodelist.h" -#include "relay.h" -#include "router.h" -#include "circuitlist.h" -#include "main.h" -#include "rephist.h" -#include "hibernate.h" -#include "statefile.h" -#include "hs_stats.h" -#include "hs_service.h" -#include "dos.h" - -#include "routerinfo_st.h" +#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/routerinfo_st.h" static void log_accounting(const time_t now, const or_options_t *options); -#include "geoip.h" +#include "or/geoip.h" /** Return the total number of circuits. */ STATIC int diff --git a/src/or/status.h b/src/or/status.h index f75e8f9995..840ec11986 100644 --- a/src/or/status.h +++ b/src/or/status.h @@ -4,7 +4,7 @@ #ifndef TOR_STATUS_H #define TOR_STATUS_H -#include "testsupport.h" +#include "common/testsupport.h" int log_heartbeat(time_t now); diff --git a/src/or/tor_api.c b/src/or/tor_api.c index 9d3355f31c..efedf2dc78 100644 --- a/src/or/tor_api.c +++ b/src/or/tor_api.c @@ -8,8 +8,8 @@ * \file tor_api.c **/ -#include "tor_api.h" -#include "tor_api_internal.h" +#include "or/tor_api.h" +#include "or/tor_api_internal.h" // Include this after the above headers, to insure that they don't // depend on anything else. diff --git a/src/or/torcert.c b/src/or/torcert.c index 688b3486b1..a6bbe4231d 100644 --- a/src/or/torcert.c +++ b/src/or/torcert.c @@ -25,17 +25,17 @@ * that one is authority_cert_t, and it's mostly handled in routerlist.c. */ -#include "or.h" -#include "config.h" -#include "crypto_util.h" -#include "torcert.h" -#include "ed25519_cert.h" -#include "torlog.h" -#include "util.h" -#include "compat.h" -#include "link_handshake.h" - -#include "or_handshake_certs_st.h" +#include "or/or.h" +#include "or/config.h" +#include "common/crypto_util.h" +#include "or/torcert.h" +#include "trunnel/ed25519_cert.h" +#include "common/torlog.h" +#include "common/util.h" +#include "common/compat.h" +#include "trunnel/link_handshake.h" + +#include "or/or_handshake_certs_st.h" /** Helper for tor_cert_create(): signs any 32 bytes, not just an ed25519 * key. diff --git a/src/or/torcert.h b/src/or/torcert.h index cf61ac8302..cba3d3622b 100644 --- a/src/or/torcert.h +++ b/src/or/torcert.h @@ -4,7 +4,7 @@ #ifndef TORCERT_H_INCLUDED #define TORCERT_H_INCLUDED -#include "crypto_ed25519.h" +#include "common/crypto_ed25519.h" #define SIGNED_KEY_TYPE_ED25519 0x01 diff --git a/src/or/transports.c b/src/or/transports.c index e2deb31ea5..b88c42cbb9 100644 --- a/src/or/transports.c +++ b/src/or/transports.c @@ -90,17 +90,17 @@ **/ #define PT_PRIVATE -#include "or.h" -#include "bridges.h" -#include "config.h" -#include "circuitbuild.h" -#include "transports.h" -#include "util.h" -#include "router.h" -#include "statefile.h" -#include "connection_or.h" -#include "ext_orport.h" -#include "control.h" +#include "or/or.h" +#include "or/bridges.h" +#include "or/config.h" +#include "or/circuitbuild.h" +#include "or/transports.h" +#include "common/util.h" +#include "or/router.h" +#include "or/statefile.h" +#include "or/connection_or.h" +#include "or/ext_orport.h" +#include "or/control.h" static process_environment_t * create_managed_proxy_environment(const managed_proxy_t *mp); diff --git a/src/or/vote_routerstatus_st.h b/src/or/vote_routerstatus_st.h index fcd0a993f8..7ec0c962fe 100644 --- a/src/or/vote_routerstatus_st.h +++ b/src/or/vote_routerstatus_st.h @@ -7,7 +7,7 @@ #ifndef VOTE_ROUTERSTATUS_ST_H #define VOTE_ROUTERSTATUS_ST_H -#include "routerstatus_st.h" +#include "or/routerstatus_st.h" /** The claim about a single router, made in a vote. */ struct vote_routerstatus_t { diff --git a/src/or/voting_schedule.c b/src/or/voting_schedule.c index b53d88672c..6edde3f229 100644 --- a/src/or/voting_schedule.c +++ b/src/or/voting_schedule.c @@ -9,13 +9,13 @@ **/ #define VOTING_SCHEDULE_PRIVATE -#include "voting_schedule.h" +#include "or/voting_schedule.h" -#include "or.h" -#include "config.h" -#include "networkstatus.h" +#include "or/or.h" +#include "or/config.h" +#include "or/networkstatus.h" -#include "networkstatus_st.h" +#include "or/networkstatus_st.h" /* ===== * Vote scheduling diff --git a/src/or/voting_schedule.h b/src/or/voting_schedule.h index 6758477fa2..0f27d36d52 100644 --- a/src/or/voting_schedule.h +++ b/src/or/voting_schedule.h @@ -9,7 +9,7 @@ #ifndef TOR_VOTING_SCHEDULE_H #define TOR_VOTING_SCHEDULE_H -#include "or.h" +#include "or/or.h" /** Scheduling information for a voting interval. */ typedef struct { |