Explorar o código

Merge branch 'split_or_directory'

Nick Mathewson %!s(int64=5) %!d(string=hai) anos
pai
achega
8b0920bb6f
Modificáronse 100 ficheiros con 1369 adicións e 1100 borrados
  1. 9 10
      .gitignore
  2. 350 348
      Doxyfile.in
  3. 7 7
      Makefile.am
  4. 1 1
      configure.ac
  5. 0 1
      contrib/include.am
  6. 0 95
      contrib/win32build/package_nsis-mingw.sh
  7. 3 3
      doc/HACKING/HelpfulTools.md
  8. 13 13
      doc/HACKING/Module.md
  9. 1 1
      doc/HACKING/Tracing.md
  10. 1 1
      scripts/maint/checkOptionDocs.pl.in
  11. 2 1
      scripts/maint/fallback.whitelist
  12. 4 4
      scripts/maint/updateFallbackDirs.py
  13. 1 1
      scripts/test/coverage
  14. 0 0
      src/app/config/auth_dirs.inc
  15. 45 45
      src/app/config/config.c
  16. 1 1
      src/app/config/config.h
  17. 3 3
      src/app/config/confparse.c
  18. 0 0
      src/app/config/confparse.h
  19. 0 0
      src/app/config/fallback_dirs.inc
  20. 0 0
      src/app/config/or_options_st.h
  21. 0 0
      src/app/config/or_state_st.h
  22. 13 13
      src/app/config/statefile.c
  23. 0 0
      src/app/config/statefile.h
  24. 38 0
      src/app/include.am
  25. 4 4
      src/app/main/ntmain.c
  26. 0 0
      src/app/main/ntmain.h
  27. 0 0
      src/app/main/tor_main.c
  28. 2 2
      src/core/crypto/hs_ntor.c
  29. 1 1
      src/core/crypto/hs_ntor.h
  30. 17 17
      src/core/crypto/onion.c
  31. 0 0
      src/core/crypto/onion.h
  32. 2 2
      src/core/crypto/onion_fast.c
  33. 0 0
      src/core/crypto/onion_fast.h
  34. 1 1
      src/core/crypto/onion_ntor.c
  35. 0 0
      src/core/crypto/onion_ntor.h
  36. 4 4
      src/core/crypto/onion_tap.c
  37. 0 0
      src/core/crypto/onion_tap.h
  38. 9 9
      src/core/crypto/relay_crypto.c
  39. 0 0
      src/core/crypto/relay_crypto.h
  40. 326 0
      src/core/include.am
  41. 45 45
      src/core/mainloop/connection.c
  42. 0 0
      src/core/mainloop/connection.h
  43. 12 12
      src/core/mainloop/cpuworker.c
  44. 0 0
      src/core/mainloop/cpuworker.h
  45. 68 68
      src/core/mainloop/main.c
  46. 1 1
      src/core/mainloop/main.h
  47. 4 4
      src/core/mainloop/periodic.c
  48. 0 0
      src/core/mainloop/periodic.h
  49. 0 0
      src/core/or/addr_policy_st.h
  50. 1 1
      src/core/or/address_set.c
  51. 0 0
      src/core/or/address_set.h
  52. 0 0
      src/core/or/cell_queue_st.h
  53. 0 0
      src/core/or/cell_st.h
  54. 22 22
      src/core/or/channel.c
  55. 2 2
      src/core/or/channel.h
  56. 14 14
      src/core/or/channelpadding.c
  57. 0 0
      src/core/or/channelpadding.h
  58. 28 28
      src/core/or/channeltls.c
  59. 2 2
      src/core/or/channeltls.h
  60. 2 2
      src/core/or/circuit_st.h
  61. 46 46
      src/core/or/circuitbuild.c
  62. 0 0
      src/core/or/circuitbuild.h
  63. 38 38
      src/core/or/circuitlist.c
  64. 1 1
      src/core/or/circuitlist.h
  65. 9 9
      src/core/or/circuitmux.c
  66. 1 1
      src/core/or/circuitmux.h
  67. 5 5
      src/core/or/circuitmux_ewma.c
  68. 2 2
      src/core/or/circuitmux_ewma.h
  69. 17 17
      src/core/or/circuitstats.c
  70. 0 0
      src/core/or/circuitstats.h
  71. 36 36
      src/core/or/circuituse.c
  72. 0 0
      src/core/or/circuituse.h
  73. 23 23
      src/core/or/command.c
  74. 1 1
      src/core/or/command.h
  75. 46 46
      src/core/or/connection_edge.c
  76. 0 0
      src/core/or/connection_edge.h
  77. 39 39
      src/core/or/connection_or.c
  78. 0 0
      src/core/or/connection_or.h
  79. 0 0
      src/core/or/connection_st.h
  80. 0 0
      src/core/or/cpath_build_state_st.h
  81. 0 0
      src/core/or/crypt_path_reference_st.h
  82. 1 1
      src/core/or/crypt_path_st.h
  83. 0 0
      src/core/or/destroy_cell_queue_st.h
  84. 13 13
      src/core/or/dos.c
  85. 0 0
      src/core/or/dos.h
  86. 2 2
      src/core/or/edge_connection_st.h
  87. 1 1
      src/core/or/entry_connection_st.h
  88. 1 1
      src/core/or/entry_port_cfg_st.h
  89. 0 0
      src/core/or/extend_info_st.h
  90. 2 3
      src/core/or/git_revision.c
  91. 0 0
      src/core/or/git_revision.h
  92. 1 1
      src/core/or/listener_connection_st.h
  93. 1 1
      src/core/or/or.h
  94. 3 3
      src/core/or/or_circuit_st.h
  95. 1 1
      src/core/or/or_connection_st.h
  96. 0 0
      src/core/or/or_handshake_certs_st.h
  97. 0 0
      src/core/or/or_handshake_state_st.h
  98. 2 2
      src/core/or/origin_circuit_st.h
  99. 18 18
      src/core/or/policies.c
  100. 0 0
      src/core/or/policies.h

+ 9 - 10
.gitignore

@@ -206,16 +206,15 @@ uptime-*.json
 /src/lib/libtor-wallclock.a
 /src/lib/libtor-wallclock.a
 /src/lib/libtor-wallclock-testing.a
 /src/lib/libtor-wallclock-testing.a
 
 
-# /src/or/
-/src/or/Makefile
-/src/or/Makefile.in
-/src/or/tor
-/src/or/tor.exe
-/src/or/tor-cov
-/src/or/tor-cov.exe
-/src/or/libtor-app.a
-/src/or/libtor-app-testing.a
-/src/or/libtor.lib
+# /src/tor
+/src/core/libtor-app.a
+/src/core/libtor-app-testing.a
+
+# /src/app
+/src/app/tor
+/src/app/tor.exe
+/src/app/tor-cov
+/src/app/tor-cov.exe
 
 
 # /src/rust
 # /src/rust
 /src/rust/.cargo/config
 /src/rust/.cargo/config

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 350 - 348
Doxyfile.in


+ 7 - 7
Makefile.am

@@ -25,9 +25,9 @@ AM_CFLAGS=@TOR_SYSTEMD_CFLAGS@ @CFLAGS_BUGTRAP@ @TOR_LZMA_CFLAGS@ @TOR_ZSTD_CFLA
 SHELL=@SHELL@
 SHELL=@SHELL@
 
 
 if COVERAGE_ENABLED
 if COVERAGE_ENABLED
-TESTING_TOR_BINARY=$(top_builddir)/src/or/tor-cov$(EXEEXT)
+TESTING_TOR_BINARY=$(top_builddir)/src/app/tor-cov$(EXEEXT)
 else
 else
-TESTING_TOR_BINARY=$(top_builddir)/src/or/tor$(EXEEXT)
+TESTING_TOR_BINARY=$(top_builddir)/src/app/tor$(EXEEXT)
 endif
 endif
 
 
 if USE_RUST
 if USE_RUST
@@ -108,7 +108,7 @@ TOR_CRYPTO_TESTING_LIBS = \
 
 
 # All static libraries used to link tor.
 # All static libraries used to link tor.
 TOR_INTERNAL_LIBS = \
 TOR_INTERNAL_LIBS = \
-	src/or/libtor-app.a \
+	src/core/libtor-app.a \
 	src/lib/libtor-compress.a \
 	src/lib/libtor-compress.a \
 	src/lib/libtor-evloop.a \
 	src/lib/libtor-evloop.a \
 	$(TOR_CRYPTO_LIBS) \
 	$(TOR_CRYPTO_LIBS) \
@@ -119,7 +119,7 @@ TOR_INTERNAL_LIBS = \
 # Variants of the above for linking the testing variant of tor (for coverage
 # Variants of the above for linking the testing variant of tor (for coverage
 # and tests)
 # and tests)
 TOR_INTERNAL_TESTING_LIBS = \
 TOR_INTERNAL_TESTING_LIBS = \
-	src/or/libtor-app-testing.a \
+	src/core/libtor-app-testing.a \
 	src/lib/libtor-compress-testing.a \
 	src/lib/libtor-compress-testing.a \
 	src/lib/libtor-evloop-testing.a \
 	src/lib/libtor-evloop-testing.a \
 	$(TOR_CRYPTO_TESTING_LIBS) \
 	$(TOR_CRYPTO_TESTING_LIBS) \
@@ -302,10 +302,10 @@ coverage-html-full: all
 check-spaces:
 check-spaces:
 if USE_PERL
 if USE_PERL
 	$(PERL) $(top_srcdir)/scripts/maint/checkSpace.pl -C \
 	$(PERL) $(top_srcdir)/scripts/maint/checkSpace.pl -C \
-		$(top_srcdir)/src/common/*.[ch] \
 		$(top_srcdir)/src/lib/*/*.[ch] \
 		$(top_srcdir)/src/lib/*/*.[ch] \
-		$(top_srcdir)/src/or/*.[ch] \
-		$(top_srcdir)/src/or/*/*.[ch] \
+		$(top_srcdir)/src/core/*/*.[ch] \
+		$(top_srcdir)/src/feature/*/*.[ch] \
+		$(top_srcdir)/src/app/*/*.[ch] \
 		$(top_srcdir)/src/test/*.[ch] \
 		$(top_srcdir)/src/test/*.[ch] \
 		$(top_srcdir)/src/test/*/*.[ch] \
 		$(top_srcdir)/src/test/*/*.[ch] \
 		$(top_srcdir)/src/tools/*.[ch]
 		$(top_srcdir)/src/tools/*.[ch]

+ 1 - 1
configure.ac

@@ -5,7 +5,7 @@ dnl See LICENSE for licensing information
 
 
 AC_PREREQ([2.63])
 AC_PREREQ([2.63])
 AC_INIT([tor],[0.3.5.0-alpha-dev])
 AC_INIT([tor],[0.3.5.0-alpha-dev])
-AC_CONFIG_SRCDIR([src/or/main.c])
+AC_CONFIG_SRCDIR([src/app/main/tor_main.c])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_MACRO_DIR([m4])
 
 
 # "foreign" means we don't follow GNU package layout standards
 # "foreign" means we don't follow GNU package layout standards

+ 0 - 1
contrib/include.am

@@ -10,7 +10,6 @@ EXTRA_DIST+= \
 	contrib/operator-tools/linux-tor-prio.sh	\
 	contrib/operator-tools/linux-tor-prio.sh	\
 	contrib/operator-tools/tor-exit-notice.html	\
 	contrib/operator-tools/tor-exit-notice.html	\
 	contrib/or-tools/exitlist			\
 	contrib/or-tools/exitlist			\
-	contrib/win32build/package_nsis-mingw.sh	\
 	contrib/win32build/tor-mingw.nsi.in		\
 	contrib/win32build/tor-mingw.nsi.in		\
 	contrib/win32build/tor.ico			\
 	contrib/win32build/tor.ico			\
 	contrib/win32build/tor.nsi.in
 	contrib/win32build/tor.nsi.in

+ 0 - 95
contrib/win32build/package_nsis-mingw.sh

@@ -1,95 +0,0 @@
-#!/bin/sh
-#
-# ===============================================================================
-# package_nsis-ming.sh is distributed under this license:
-
-# Copyright (c) 2006-2007 Andrew Lewman
-# Copyright (c) 2008 The Tor Project, Inc.
-
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-
-#     * Neither the names of the copyright owners nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# ===============================================================================
-
-# Script to package a Tor installer on win32.  This script assumes that
-# you have already built Tor, that you are running msys/mingw, and that
-# you know what you are doing.
-
-# Start in the tor source directory after you've compiled tor.exe
-# This means start as ./contrib/win32build/package_nsis-mingw.sh
-
-rm -rf win_tmp
-mkdir win_tmp
-mkdir win_tmp/bin
-mkdir win_tmp/contrib
-mkdir win_tmp/doc
-mkdir win_tmp/doc/spec
-mkdir win_tmp/doc/design-paper
-mkdir win_tmp/doc/contrib
-mkdir win_tmp/src
-mkdir win_tmp/src/config
-mkdir win_tmp/tmp
-
-cp src/or/tor.exe win_tmp/bin/
-cp src/tools/tor-resolve.exe win_tmp/bin/
-cp contrib/win32build/tor.ico win_tmp/bin/
-cp src/config/geoip win_tmp/bin/
-strip win_tmp/bin/*.exe
-
-# There is no man2html in mingw.  
-# Maybe we should add this into make dist instead.
-# One has to do this manually and cp it do the tor-source/doc dir
-#man2html doc/tor.1.in > win_tmp/tmp/tor-reference.html
-#man2html doc/tor-resolve.1 > win_tmp/tmp/tor-resolve.html
-
-clean_newlines() {
-    perl -pe 's/^\n$/\r\n/mg; s/([^\r])\n$/\1\r\n/mg;' $1 >$2
-}
-
-clean_localstatedir() {
-    perl -pe 's/^\n$/\r\n/mg; s/([^\r])\n$/\1\r\n/mg; s{\@LOCALSTATEDIR\@/(lib|log)/tor/}{C:\\Documents and Settings\\Application Data\\Tor\\}' $1 >$2
-}
-
-for fn in address-spec.txt bridges-spec.txt control-spec.txt dir-spec.txt path-spec.txt rend-spec.txt socks-extensions.txt tor-spec.txt version-spec.txt; do
-    clean_newlines doc/spec/$fn win_tmp/doc/spec/$fn
-done
-
-for fn in HACKING tor-gencert.html tor.html torify.html tor-resolve.html; do
-    clean_newlines doc/$fn win_tmp/doc/$fn
-done
-
-for fn in README ChangeLog LICENSE; do
-    clean_newlines $fn win_tmp/$fn
-done
-
-clean_localstatedir src/config/torrc.sample.in win_tmp/src/config/torrc.sample
-
-cp contrib/win32build/tor-mingw.nsi.in win_tmp/contrib/
-
-cd win_tmp
-makensis.exe contrib/tor-mingw.nsi.in
-

+ 3 - 3
doc/HACKING/HelpfulTools.md

@@ -28,7 +28,7 @@ Jenkins
 Valgrind
 Valgrind
 --------
 --------
 
 
-    valgrind --leak-check=yes --error-limit=no --show-reachable=yes src/or/tor
+    valgrind --leak-check=yes --error-limit=no --show-reachable=yes src/app/tor
 
 
 (Note that if you get a zillion openssl warnings, you will also need to
 (Note that if you get a zillion openssl warnings, you will also need to
 pass `--undef-value-errors=no` to valgrind, or rebuild your openssl
 pass `--undef-value-errors=no` to valgrind, or rebuild your openssl
@@ -232,10 +232,10 @@ Beforehand, install google-perftools.
 Now you can run Tor with profiling enabled, and use the pprof utility to look at
 Now you can run Tor with profiling enabled, and use the pprof utility to look at
 performance! See the gperftools manual for more info, but basically:
 performance! See the gperftools manual for more info, but basically:
 
 
-2. Run `env CPUPROFILE=/tmp/profile src/or/tor -f <path/torrc>`. The profile file
+2. Run `env CPUPROFILE=/tmp/profile src/app/tor -f <path/torrc>`. The profile file
    is not written to until Tor finishes execuction.
    is not written to until Tor finishes execuction.
 
 
-3. Run `pprof src/or/tor /tm/profile` to start the REPL.
+3. Run `pprof src/app/tor /tm/profile` to start the REPL.
 
 
 Generating and analyzing a callgraph
 Generating and analyzing a callgraph
 ------------------------------------
 ------------------------------------

+ 13 - 13
doc/HACKING/Module.md

@@ -12,9 +12,9 @@ Currently, there is only one module:
 
 
   - Directory Authority subsystem (dirauth)
   - Directory Authority subsystem (dirauth)
 
 
-It is located in its own directory in `src/or/dirauth/`. To disable it, one
-need to pass `--disable-module-dirauth` at configure time. All modules are
-currently enabled by default.
+It is located in its own directory in `src/feature/dirauth/`. To disable it,
+one need to pass `--disable-module-dirauth` at configure time. All modules
+are currently enabled by default.
 
 
 ## Build System ##
 ## Build System ##
 
 
@@ -32,10 +32,10 @@ The changes to the build system are pretty straightforward.
    the C code to conditionally compile things for your module. And the
    the C code to conditionally compile things for your module. And the
    `BUILD_MODULE_<name>` is also defined for automake files (e.g: include.am).
    `BUILD_MODULE_<name>` is also defined for automake files (e.g: include.am).
 
 
-3. In the `src/or/include.am` file, locate the `MODULE_DIRAUTH_SOURCES` value.
-   You need to create your own `_SOURCES` variable for your module and then
-   conditionally add the it to `LIBTOR_A_SOURCES` if you should build the
-   module.
+3. In the `src/core/include.am` file, locate the `MODULE_DIRAUTH_SOURCES`
+   value.  You need to create your own `_SOURCES` variable for your module
+   and then conditionally add the it to `LIBTOR_A_SOURCES` if you should
+   build the module.
 
 
    It is then **very** important to add your SOURCES variable to
    It is then **very** important to add your SOURCES variable to
    `src_or_libtor_testing_a_SOURCES` so the tests can build it.
    `src_or_libtor_testing_a_SOURCES` so the tests can build it.
@@ -51,7 +51,7 @@ always build everything in order to tests everything.
 ## Coding ##
 ## Coding ##
 
 
 As mentioned above, a module must be isolated in its own directory (name of
 As mentioned above, a module must be isolated in its own directory (name of
-the module) in `src/or/`.
+the module) in `src/feature/`.
 
 
 There are couples of "rules" you want to follow:
 There are couples of "rules" you want to follow:
 
 
@@ -87,10 +87,10 @@ There are couples of "rules" you want to follow:
   making the code much more difficult to follow/understand.
   making the code much more difficult to follow/understand.
 
 
 * It is possible that you end up with code that needs to be used by the rest
 * It is possible that you end up with code that needs to be used by the rest
-  of the code base but is still part of your module. As a good example, if you
-  look at `src/or/shared_random_client.c`: it contains code needed by the hidden
-  service subsystem but mainly related to the shared random subsystem very
-  specific to the dirauth module.
+  of the code base but is still part of your module. As a good example, if
+  you look at `src/feature/shared_random_client.c`: it contains code needed
+  by the hidden service subsystem but mainly related to the shared random
+  subsystem very specific to the dirauth module.
 
 
   This is fine but try to keep it as lean as possible and never use the same
   This is fine but try to keep it as lean as possible and never use the same
   filename as the one in the module. For example, this is a bad idea and
   filename as the one in the module. For example, this is a bad idea and
@@ -102,7 +102,7 @@ There are couples of "rules" you want to follow:
 * When you include headers from the module, **always** use the full module
 * When you include headers from the module, **always** use the full module
   path in your statement. Example:
   path in your statement. Example:
 
 
-  `#include "dirauth/dirvote.h"`
+  `#include "feature/dirauth/dirvote.h"`
 
 
   The main reason is that we do **not** add the module include path by default
   The main reason is that we do **not** add the module include path by default
   so it needs to be specified. But also, it helps our human brain understand
   so it needs to be specified. But also, it helps our human brain understand

+ 1 - 1
doc/HACKING/Tracing.md

@@ -69,7 +69,7 @@ configure option:
 ## Instrument Tor ##
 ## Instrument Tor ##
 
 
 This is pretty easy. Let's say you want to add a trace event in
 This is pretty easy. Let's say you want to add a trace event in
-`src/or/rendcache.c`, you only have to add this include statement:
+`src/feature/rend/rendcache.c`, you only have to add this include statement:
 
 
 	#include "trace/events.h"
 	#include "trace/events.h"
 
 

+ 1 - 1
scripts/maint/checkOptionDocs.pl.in

@@ -7,7 +7,7 @@ my %torrcSampleOptions = ();
 my %manPageOptions = ();
 my %manPageOptions = ();
 
 
 # Load the canonical list as actually accepted by Tor.
 # Load the canonical list as actually accepted by Tor.
-open(F, "@abs_top_builddir@/src/or/tor --list-torrc-options |") or die;
+open(F, "@abs_top_builddir@/src/app/tor --list-torrc-options |") or die;
 while (<F>) {
 while (<F>) {
     next if m!\[notice\] Tor v0\.!;
     next if m!\[notice\] Tor v0\.!;
     if (m!^([A-Za-z0-9_]+)!) {
     if (m!^([A-Za-z0-9_]+)!) {

+ 2 - 1
scripts/maint/fallback.whitelist

@@ -12,7 +12,8 @@
 
 
 # To replace this list with the hard-coded fallback list (for testing), use
 # To replace this list with the hard-coded fallback list (for testing), use
 # a command similar to:
 # a command similar to:
-#   cat src/or/fallback_dirs.inc | grep \" | grep -v weight | tr -d '\n' | \
+#   cat src/app/config/fallback_dirs.inc | grep \" | grep -v weight | \
+#   tr -d '\n' | \
 #   sed 's/"" / /g' | sed 's/""/"/g' | tr \" '\n' | grep -v '^$' \
 #   sed 's/"" / /g' | sed 's/""/"/g' | tr \" '\n' | grep -v '^$' \
 #   > scripts/maint/fallback.whitelist
 #   > scripts/maint/fallback.whitelist
 #
 #

+ 4 - 4
scripts/maint/updateFallbackDirs.py

@@ -3,11 +3,11 @@
 # Usage:
 # Usage:
 #
 #
 # Regenerate the list:
 # Regenerate the list:
-# scripts/maint/updateFallbackDirs.py > src/or/fallback_dirs.inc 2> fallback_dirs.log
+# scripts/maint/updateFallbackDirs.py > src/app/config/fallback_dirs.inc 2> fallback_dirs.log
 #
 #
 # Check the existing list:
 # Check the existing list:
 # scripts/maint/updateFallbackDirs.py check_existing > fallback_dirs.inc.ok 2> fallback_dirs.log
 # scripts/maint/updateFallbackDirs.py check_existing > fallback_dirs.inc.ok 2> fallback_dirs.log
-# mv fallback_dirs.inc.ok src/or/fallback_dirs.inc
+# mv fallback_dirs.inc.ok src/app/config/fallback_dirs.inc
 #
 #
 # This script should be run from a stable, reliable network connection,
 # This script should be run from a stable, reliable network connection,
 # with no other network activity (and not over tor).
 # with no other network activity (and not over tor).
@@ -112,7 +112,7 @@ DOWNLOAD_MICRODESC_CONSENSUS = True
 # expired consensus. This makes them fail the download check.
 # expired consensus. This makes them fail the download check.
 # We use a tolerance of 0, so that 0.2.x series relays also fail the download
 # We use a tolerance of 0, so that 0.2.x series relays also fail the download
 # check if they serve an expired consensus.
 # check if they serve an expired consensus.
-CONSENSUS_EXPIRY_TOLERANCE = 0 
+CONSENSUS_EXPIRY_TOLERANCE = 0
 
 
 # Output fallback name, flags, bandwidth, and ContactInfo in a C comment?
 # Output fallback name, flags, bandwidth, and ContactInfo in a C comment?
 OUTPUT_COMMENTS = True if OUTPUT_CANDIDATES else False
 OUTPUT_COMMENTS = True if OUTPUT_CANDIDATES else False
@@ -161,7 +161,7 @@ BLACKLIST_EXCLUDES_WHITELIST_ENTRIES = True
 
 
 WHITELIST_FILE_NAME = 'scripts/maint/fallback.whitelist'
 WHITELIST_FILE_NAME = 'scripts/maint/fallback.whitelist'
 BLACKLIST_FILE_NAME = 'scripts/maint/fallback.blacklist'
 BLACKLIST_FILE_NAME = 'scripts/maint/fallback.blacklist'
-FALLBACK_FILE_NAME  = 'src/or/fallback_dirs.inc'
+FALLBACK_FILE_NAME  = 'src/app/config/fallback_dirs.inc'
 
 
 # The number of bytes we'll read from a filter file before giving up
 # The number of bytes we'll read from a filter file before giving up
 MAX_LIST_FILE_SIZE = 1024 * 1024
 MAX_LIST_FILE_SIZE = 1024 * 1024

+ 1 - 1
scripts/test/coverage

@@ -7,7 +7,7 @@
 
 
 dst=$1
 dst=$1
 
 
-for fn in src/or/*.c src/or/*/*.c src/common/*.c src/lib/*/*.c; do
+for fn in src/core/*/*.c src/feature/*/*.c src/app/*/*.c src/lib/*/*.c; do
     BN=`basename $fn`
     BN=`basename $fn`
     DN=`dirname $fn`
     DN=`dirname $fn`
     F=`echo $BN | sed -e 's/\.c$//;'`
     F=`echo $BN | sed -e 's/\.c$//;'`

+ 0 - 0
src/or/auth_dirs.inc → src/app/config/auth_dirs.inc


+ 45 - 45
src/or/config.c → src/app/config/config.c

@@ -60,52 +60,52 @@
  **/
  **/
 
 
 #define CONFIG_PRIVATE
 #define CONFIG_PRIVATE
-#include "or/or.h"
-#include "or/bridges.h"
-#include "or/addressmap.h"
-#include "or/channel.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuitmux.h"
-#include "or/circuitmux_ewma.h"
-#include "or/circuitstats.h"
+#include "core/or/or.h"
+#include "feature/client/bridges.h"
+#include "feature/client/addressmap.h"
+#include "core/or/channel.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitmux.h"
+#include "core/or/circuitmux_ewma.h"
+#include "core/or/circuitstats.h"
 #include "lib/compress/compress.h"
 #include "lib/compress/compress.h"
-#include "or/config.h"
+#include "app/config/config.h"
 #include "lib/encoding/confline.h"
 #include "lib/encoding/confline.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/consdiffmgr.h"
-#include "or/control.h"
-#include "or/confparse.h"
-#include "or/cpuworker.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/dircache/consdiffmgr.h"
+#include "feature/control/control.h"
+#include "app/config/confparse.h"
+#include "core/mainloop/cpuworker.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_util.h"
-#include "or/dirserv.h"
-#include "or/dns.h"
-#include "or/dos.h"
-#include "or/entrynodes.h"
-#include "or/git_revision.h"
-#include "or/geoip.h"
-#include "or/hibernate.h"
-#include "or/main.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/relay.h"
-#include "or/rendclient.h"
-#include "or/rendservice.h"
-#include "or/hs_config.h"
-#include "or/rephist.h"
-#include "or/router.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/relay/dns.h"
+#include "core/or/dos.h"
+#include "feature/client/entrynodes.h"
+#include "core/or/git_revision.h"
+#include "feature/stats/geoip.h"
+#include "feature/hibernate/hibernate.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/policies.h"
+#include "core/or/relay.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendservice.h"
+#include "feature/hs/hs_config.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
 #include "lib/sandbox/sandbox.h"
 #include "lib/sandbox/sandbox.h"
-#include "or/routerlist.h"
-#include "or/routerset.h"
-#include "or/scheduler.h"
-#include "or/statefile.h"
-#include "or/transports.h"
-#include "or/ext_orport.h"
-#include "or/voting_schedule.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerset.h"
+#include "core/or/scheduler.h"
+#include "app/config/statefile.h"
+#include "feature/client/transports.h"
+#include "feature/relay/ext_orport.h"
+#include "feature/dircommon/voting_schedule.h"
 #ifdef _WIN32
 #ifdef _WIN32
 #include <shlobj.h>
 #include <shlobj.h>
 #endif
 #endif
@@ -133,11 +133,11 @@
 #include "lib/fs/conffile.h"
 #include "lib/fs/conffile.h"
 #include "lib/evloop/procmon.h"
 #include "lib/evloop/procmon.h"
 
 
-#include "or/dirauth/dirvote.h"
-#include "or/dirauth/mode.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/dirauth/mode.h"
 
 
-#include "or/connection_st.h"
-#include "or/port_cfg_st.h"
+#include "core/or/connection_st.h"
+#include "core/or/port_cfg_st.h"
 
 
 #ifdef HAVE_SYSTEMD
 #ifdef HAVE_SYSTEMD
 #   if defined(__COVERITY__) && !defined(__INCLUDE_LEVEL__)
 #   if defined(__COVERITY__) && !defined(__INCLUDE_LEVEL__)

+ 1 - 1
src/or/config.h → src/app/config/config.h

@@ -12,7 +12,7 @@
 #ifndef TOR_CONFIG_H
 #ifndef TOR_CONFIG_H
 #define TOR_CONFIG_H
 #define TOR_CONFIG_H
 
 
-#include "or/or_options_st.h"
+#include "app/config/or_options_st.h"
 #include "lib/testsupport/testsupport.h"
 #include "lib/testsupport/testsupport.h"
 
 
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(DARWIN)
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(DARWIN)

+ 3 - 3
src/or/confparse.c → src/app/config/confparse.c

@@ -21,9 +21,9 @@
  * specified, and a linked list of key-value pairs.
  * specified, and a linked list of key-value pairs.
  */
  */
 
 
-#include "or/or.h"
-#include "or/confparse.h"
-#include "or/routerset.h"
+#include "core/or/or.h"
+#include "app/config/confparse.h"
+#include "feature/nodelist/routerset.h"
 
 
 #include "lib/container/bitarray.h"
 #include "lib/container/bitarray.h"
 #include "lib/encoding/confline.h"
 #include "lib/encoding/confline.h"

+ 0 - 0
src/or/confparse.h → src/app/config/confparse.h


+ 0 - 0
src/or/fallback_dirs.inc → src/app/config/fallback_dirs.inc


+ 0 - 0
src/or/or_options_st.h → src/app/config/or_options_st.h


+ 0 - 0
src/or/or_state_st.h → src/app/config/or_state_st.h


+ 13 - 13
src/or/statefile.c → src/app/config/statefile.c

@@ -29,22 +29,22 @@
  */
  */
 
 
 #define STATEFILE_PRIVATE
 #define STATEFILE_PRIVATE
-#include "or/or.h"
-#include "or/circuitstats.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/connection.h"
-#include "or/control.h"
-#include "or/entrynodes.h"
-#include "or/hibernate.h"
-#include "or/main.h"
-#include "or/rephist.h"
-#include "or/router.h"
+#include "core/or/or.h"
+#include "core/or/circuitstats.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "core/mainloop/connection.h"
+#include "feature/control/control.h"
+#include "feature/client/entrynodes.h"
+#include "feature/hibernate/hibernate.h"
+#include "core/mainloop/main.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
 #include "lib/sandbox/sandbox.h"
 #include "lib/sandbox/sandbox.h"
-#include "or/statefile.h"
+#include "app/config/statefile.h"
 #include "lib/encoding/confline.h"
 #include "lib/encoding/confline.h"
 
 
-#include "or/or_state_st.h"
+#include "app/config/or_state_st.h"
 
 
 #ifdef HAVE_UNISTD_H
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #include <unistd.h>

+ 0 - 0
src/or/statefile.h → src/app/config/statefile.h


+ 38 - 0
src/app/include.am

@@ -0,0 +1,38 @@
+
+bin_PROGRAMS+= src/app/tor
+
+if COVERAGE_ENABLED
+noinst_PROGRAMS+= src/app/tor-cov
+endif
+
+noinst_HEADERS += \
+	src/app/main/ntmain.h
+
+src_app_tor_SOURCES = src/app/main/tor_main.c
+if BUILD_NT_SERVICES
+src_app_tor_SOURCES += src/app/main/ntmain.c
+endif
+
+# -L flags need to go in LDFLAGS. -l flags need to go in LDADD.
+# This seems to matter nowhere but on windows, but I assure you that it
+# matters a lot there, and is quite hard to debug if you forget to do it.
+
+src_app_tor_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
+src_app_tor_LDADD = $(TOR_INTERNAL_LIBS) \
+	$(rust_ldadd) \
+	@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
+	@TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ \
+	@CURVE25519_LIBS@ @TOR_SYSTEMD_LIBS@ \
+	@TOR_LZMA_LIBS@ @TOR_ZSTD_LIBS@
+
+if COVERAGE_ENABLED
+src_app_tor_cov_SOURCES = $(src_app_tor_SOURCES)
+src_app_tor_cov_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
+src_app_tor_cov_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
+src_app_tor_cov_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ @TOR_LDFLAGS_libevent@
+src_app_tor_cov_LDADD = $(TOR_INTERNAL_TESTING_LIBS) \
+	@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \
+	@TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_GDI@ \
+	@CURVE25519_LIBS@ @TOR_SYSTEMD_LIBS@ \
+	@TOR_LZMA_LIBS@ @TOR_ZSTD_LIBS@
+endif

+ 4 - 4
src/or/ntmain.c → src/app/main/ntmain.c

@@ -19,10 +19,10 @@
 
 
 #ifdef _WIN32
 #ifdef _WIN32
 
 
-#include "or/or.h"
-#include "or/config.h"
-#include "or/main.h"
-#include "or/ntmain.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
+#include "core/mainloop/main.h"
+#include "app/main/ntmain.h"
 #include "lib/log/win32err.h"
 #include "lib/log/win32err.h"
 #include "lib/fs/winlib.h"
 #include "lib/fs/winlib.h"
 #include "lib/evloop/compat_libevent.h"
 #include "lib/evloop/compat_libevent.h"

+ 0 - 0
src/or/ntmain.h → src/app/main/ntmain.h


+ 0 - 0
src/or/tor_main.c → src/app/main/tor_main.c


+ 2 - 2
src/or/hs_ntor.c → src/core/crypto/hs_ntor.c

@@ -24,11 +24,11 @@
  *  rendezvous key expansion to setup end-to-end rend circuit keys.
  *  rendezvous key expansion to setup end-to-end rend circuit keys.
  */
  */
 
 
-#include "or/or.h"
+#include "core/or/or.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_curve25519.h"
 #include "lib/crypt_ops/crypto_curve25519.h"
 #include "lib/crypt_ops/crypto_ed25519.h"
 #include "lib/crypt_ops/crypto_ed25519.h"
-#include "or/hs_ntor.h"
+#include "core/crypto/hs_ntor.h"
 
 
 /* String constants used by the ntor HS protocol */
 /* String constants used by the ntor HS protocol */
 #define PROTOID "tor-hs-ntor-curve25519-sha3-256-1"
 #define PROTOID "tor-hs-ntor-curve25519-sha3-256-1"

+ 1 - 1
src/or/hs_ntor.h → src/core/crypto/hs_ntor.h

@@ -4,7 +4,7 @@
 #ifndef TOR_HS_NTOR_H
 #ifndef TOR_HS_NTOR_H
 #define TOR_HS_NTOR_H
 #define TOR_HS_NTOR_H
 
 
-#include "or/or.h"
+#include "core/or/or.h"
 struct ed25519_public_key_t;
 struct ed25519_public_key_t;
 struct curve25519_public_key_t;
 struct curve25519_public_key_t;
 struct curve25519_keypair_t;
 struct curve25519_keypair_t;

+ 17 - 17
src/or/onion.c → src/core/crypto/onion.c

@@ -62,25 +62,25 @@
  * onion_fast.c for more information.
  * onion_fast.c for more information.
  **/
  **/
 
 
-#include "or/or.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/config.h"
-#include "or/cpuworker.h"
+#include "core/or/or.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "app/config/config.h"
+#include "core/mainloop/cpuworker.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_dh.h"
 #include "lib/crypt_ops/crypto_dh.h"
-#include "or/networkstatus.h"
-#include "or/onion.h"
-#include "or/onion_fast.h"
-#include "or/onion_ntor.h"
-#include "or/onion_tap.h"
-#include "or/relay.h"
-#include "or/rephist.h"
-#include "or/router.h"
-
-#include "or/cell_st.h"
-#include "or/extend_info_st.h"
-#include "or/or_circuit_st.h"
+#include "feature/nodelist/networkstatus.h"
+#include "core/crypto/onion.h"
+#include "core/crypto/onion_fast.h"
+#include "core/crypto/onion_ntor.h"
+#include "core/crypto/onion_tap.h"
+#include "core/or/relay.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/extend_info_st.h"
+#include "core/or/or_circuit_st.h"
 
 
 // trunnel
 // trunnel
 #include "trunnel/ed25519_cert.h"
 #include "trunnel/ed25519_cert.h"

+ 0 - 0
src/or/onion.h → src/core/crypto/onion.h


+ 2 - 2
src/or/onion_fast.c → src/core/crypto/onion_fast.c

@@ -27,8 +27,8 @@
  * many RSA1024 keys.
  * many RSA1024 keys.
  **/
  **/
 
 
-#include "or/or.h"
-#include "or/onion_fast.h"
+#include "core/or/or.h"
+#include "core/crypto/onion_fast.h"
 #include "lib/crypt_ops/crypto_hkdf.h"
 #include "lib/crypt_ops/crypto_hkdf.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_util.h"

+ 0 - 0
src/or/onion_fast.h → src/core/crypto/onion_fast.h


+ 1 - 1
src/or/onion_ntor.c → src/core/crypto/onion_ntor.c

@@ -29,7 +29,7 @@
 #include "lib/ctime/di_ops.h"
 #include "lib/ctime/di_ops.h"
 #include "lib/log/torlog.h"
 #include "lib/log/torlog.h"
 #include "lib/log/util_bug.h"
 #include "lib/log/util_bug.h"
-#include "or/onion_ntor.h"
+#include "core/crypto/onion_ntor.h"
 
 
 #include <string.h>
 #include <string.h>
 
 

+ 0 - 0
src/or/onion_ntor.h → src/core/crypto/onion_ntor.h


+ 4 - 4
src/or/onion_tap.c → src/core/crypto/onion_tap.c

@@ -27,13 +27,13 @@
  * invoked from onion.c.
  * invoked from onion.c.
  **/
  **/
 
 
-#include "or/or.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "app/config/config.h"
 #include "lib/crypt_ops/crypto_dh.h"
 #include "lib/crypt_ops/crypto_dh.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_util.h"
-#include "or/onion_tap.h"
-#include "or/rephist.h"
+#include "core/crypto/onion_tap.h"
+#include "feature/stats/rephist.h"
 
 
 /*----------------------------------------------------------------------*/
 /*----------------------------------------------------------------------*/
 
 

+ 0 - 0
src/or/onion_tap.h → src/core/crypto/onion_tap.h


+ 9 - 9
src/or/relay_crypto.c → src/core/crypto/relay_crypto.c

@@ -4,18 +4,18 @@
  * Copyright (c) 2007-2018, The Tor Project, Inc. */
  * Copyright (c) 2007-2018, The Tor Project, Inc. */
 /* See LICENSE for licensing information */
 /* See LICENSE for licensing information */
 
 
-#include "or/or.h"
-#include "or/circuitlist.h"
-#include "or/config.h"
+#include "core/or/or.h"
+#include "core/or/circuitlist.h"
+#include "app/config/config.h"
 #include "lib/crypt_ops/crypto.h"
 #include "lib/crypt_ops/crypto.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_util.h"
-#include "or/hs_ntor.h" // for HS_NTOR_KEY_EXPANSION_KDF_OUT_LEN
-#include "or/relay.h"
-#include "or/relay_crypto.h"
+#include "core/crypto/hs_ntor.h" // for HS_NTOR_KEY_EXPANSION_KDF_OUT_LEN
+#include "core/or/relay.h"
+#include "core/crypto/relay_crypto.h"
 
 
-#include "or/cell_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
+#include "core/or/cell_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
 
 
 /** Update digest from the payload of cell. Assign integrity part to
 /** Update digest from the payload of cell. Assign integrity part to
  * cell.
  * cell.

+ 0 - 0
src/or/relay_crypto.h → src/core/crypto/relay_crypto.h


+ 326 - 0
src/core/include.am

@@ -0,0 +1,326 @@
+
+noinst_LIBRARIES += \
+	src/core/libtor-app.a
+if UNITTESTS_ENABLED
+noinst_LIBRARIES += \
+	src/core/libtor-app-testing.a
+endif
+
+LIBTOR_APP_A_SOURCES = 				\
+	src/app/config/config.c			\
+	src/app/config/confparse.c		\
+	src/app/config/statefile.c		\
+	src/core/crypto/hs_ntor.c		\
+	src/core/crypto/onion.c			\
+	src/core/crypto/onion_fast.c		\
+	src/core/crypto/onion_ntor.c		\
+	src/core/crypto/onion_tap.c		\
+	src/core/crypto/relay_crypto.c		\
+	src/core/mainloop/connection.c		\
+	src/core/mainloop/cpuworker.c		\
+	src/core/mainloop/main.c		\
+	src/core/mainloop/periodic.c		\
+	src/core/or/address_set.c		\
+	src/core/or/channel.c			\
+	src/core/or/channelpadding.c		\
+	src/core/or/channeltls.c		\
+	src/core/or/circuitbuild.c		\
+	src/core/or/circuitlist.c		\
+	src/core/or/circuitmux.c		\
+	src/core/or/circuitmux_ewma.c		\
+	src/core/or/circuitstats.c		\
+	src/core/or/circuituse.c		\
+	src/core/or/command.c			\
+	src/core/or/connection_edge.c		\
+	src/core/or/connection_or.c		\
+	src/core/or/dos.c			\
+	src/core/or/git_revision.c		\
+	src/core/or/policies.c			\
+	src/core/or/protover.c			\
+	src/core/or/reasons.c			\
+	src/core/or/relay.c			\
+	src/core/or/scheduler.c			\
+	src/core/or/scheduler_kist.c		\
+	src/core/or/scheduler_vanilla.c		\
+	src/core/or/status.c			\
+	src/core/proto/proto_cell.c		\
+	src/core/proto/proto_control0.c		\
+	src/core/proto/proto_ext_or.c		\
+	src/core/proto/proto_http.c		\
+	src/core/proto/proto_socks.c		\
+	src/core/proto/protover_rust.c		\
+	src/feature/api/tor_api.c		\
+	src/feature/client/addressmap.c		\
+	src/feature/client/bridges.c		\
+	src/feature/client/circpathbias.c	\
+	src/feature/client/dnsserv.c		\
+	src/feature/client/entrynodes.c		\
+	src/feature/client/transports.c		\
+	src/feature/control/control.c		\
+	src/feature/dirauth/keypin.c		\
+	src/feature/dircache/conscache.c	\
+	src/feature/dircache/consdiffmgr.c	\
+	src/feature/dircache/directory.c	\
+	src/feature/dircache/dirserv.c		\
+	src/feature/dircommon/consdiff.c	\
+	src/feature/dircommon/fp_pair.c		\
+	src/feature/dircommon/voting_schedule.c	\
+	src/feature/hibernate/hibernate.c	\
+	src/feature/hs/hs_cache.c		\
+	src/feature/hs/hs_cell.c		\
+	src/feature/hs/hs_circuit.c		\
+	src/feature/hs/hs_circuitmap.c		\
+	src/feature/hs/hs_client.c		\
+	src/feature/hs/hs_common.c		\
+	src/feature/hs/hs_config.c		\
+	src/feature/hs/hs_control.c		\
+	src/feature/hs/hs_descriptor.c		\
+	src/feature/hs/hs_ident.c		\
+	src/feature/hs/hs_intropoint.c		\
+	src/feature/hs/hs_service.c		\
+	src/feature/hs/hs_stats.c		\
+	src/feature/hs_common/replaycache.c	\
+	src/feature/hs_common/shared_random_client.c	\
+	src/feature/nodelist/microdesc.c	\
+	src/feature/nodelist/networkstatus.c	\
+	src/feature/nodelist/nodelist.c		\
+	src/feature/nodelist/parsecommon.c	\
+	src/feature/nodelist/routerlist.c	\
+	src/feature/nodelist/routerparse.c	\
+	src/feature/nodelist/routerset.c	\
+	src/feature/nodelist/torcert.c		\
+	src/feature/relay/dns.c			\
+	src/feature/relay/ext_orport.c		\
+	src/feature/relay/router.c		\
+	src/feature/relay/routerkeys.c		\
+	src/feature/rend/rendcache.c		\
+	src/feature/rend/rendclient.c		\
+	src/feature/rend/rendcommon.c		\
+	src/feature/rend/rendmid.c		\
+	src/feature/rend/rendservice.c		\
+	src/feature/stats/geoip.c		\
+	src/feature/stats/rephist.c
+
+#
+# Modules are conditionnally compiled in tor starting here. We add the C files
+# only if the modules has been enabled at configure time. We always add the
+# source files of every module to libtor-testing.a so we can build the unit
+# tests for everything. See the UNITTESTS_ENABLED branch below.
+#
+LIBTOR_APP_TESTING_A_SOURCES = $(LIBTOR_APP_A_SOURCES)
+
+# The Directory Authority module.
+MODULE_DIRAUTH_SOURCES = 					\
+	src/feature/dirauth/dircollate.c			\
+	src/feature/dirauth/dirvote.c				\
+	src/feature/dirauth/shared_random.c			\
+	src/feature/dirauth/shared_random_state.c
+
+if BUILD_MODULE_DIRAUTH
+LIBTOR_APP_A_SOURCES += $(MODULE_DIRAUTH_SOURCES)
+endif
+
+src_core_libtor_app_a_SOURCES = $(LIBTOR_APP_A_SOURCES)
+if UNITTESTS_ENABLED
+
+# Add the sources of the modules that are needed for tests to work here.
+LIBTOR_APP_TESTING_A_SOURCES += $(MODULE_DIRAUTH_SOURCES)
+
+src_core_libtor_app_testing_a_SOURCES = $(LIBTOR_APP_TESTING_A_SOURCES)
+else
+src_core_libtor_app_testing_a_SOURCES =
+endif
+
+src/core/or/git_revision.$(OBJEXT) \
+  src/core/or/src_core_libtor_app_testing_a-git_revision.$(OBJEXT): \
+	micro-revision.i
+
+AM_CPPFLAGS += -DSHARE_DATADIR="\"$(datadir)\""		\
+		-DLOCALSTATEDIR="\"$(localstatedir)\""	\
+		-DBINDIR="\"$(bindir)\""
+
+src_core_libtor_app_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS)
+src_core_libtor_app_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS)
+
+noinst_HEADERS +=					\
+	src/app/config/config.h				\
+	src/app/config/confparse.h			\
+	src/app/config/or_options_st.h			\
+	src/app/config/or_state_st.h			\
+	src/app/config/statefile.h			\
+	src/app/main/ntmain.h				\
+	src/core/crypto/hs_ntor.h			\
+	src/core/crypto/onion.h				\
+	src/core/crypto/onion_fast.h			\
+	src/core/crypto/onion_ntor.h			\
+	src/core/crypto/onion_tap.h			\
+	src/core/crypto/relay_crypto.h			\
+	src/core/mainloop/connection.h			\
+	src/core/mainloop/cpuworker.h			\
+	src/core/mainloop/main.h			\
+	src/core/mainloop/periodic.h			\
+	src/core/or/addr_policy_st.h			\
+	src/core/or/address_set.h			\
+	src/core/or/cell_queue_st.h			\
+	src/core/or/cell_st.h				\
+	src/core/or/channel.h				\
+	src/core/or/channelpadding.h			\
+	src/core/or/channeltls.h			\
+	src/core/or/circuit_st.h			\
+	src/core/or/circuitbuild.h			\
+	src/core/or/circuitlist.h			\
+	src/core/or/circuitmux.h			\
+	src/core/or/circuitmux_ewma.h			\
+	src/core/or/circuitstats.h			\
+	src/core/or/circuituse.h			\
+	src/core/or/command.h				\
+	src/core/or/connection_edge.h			\
+	src/core/or/connection_or.h			\
+	src/core/or/connection_st.h			\
+	src/core/or/cpath_build_state_st.h		\
+	src/core/or/crypt_path_reference_st.h		\
+	src/core/or/crypt_path_st.h			\
+	src/core/or/destroy_cell_queue_st.h		\
+	src/core/or/dos.h				\
+	src/core/or/edge_connection_st.h		\
+	src/core/or/entry_connection_st.h		\
+	src/core/or/entry_port_cfg_st.h			\
+	src/core/or/extend_info_st.h			\
+	src/core/or/git_revision.h			\
+	src/core/or/listener_connection_st.h		\
+	src/core/or/or.h				\
+	src/core/or/or_circuit_st.h			\
+	src/core/or/or_connection_st.h			\
+	src/core/or/or_handshake_certs_st.h		\
+	src/core/or/or_handshake_state_st.h		\
+	src/core/or/origin_circuit_st.h			\
+	src/core/or/policies.h				\
+	src/core/or/port_cfg_st.h			\
+	src/core/or/protover.h				\
+	src/core/or/reasons.h				\
+	src/core/or/relay.h				\
+	src/core/or/relay_crypto_st.h			\
+	src/core/or/scheduler.h				\
+	src/core/or/server_port_cfg_st.h		\
+	src/core/or/socks_request_st.h			\
+	src/core/or/status.h				\
+	src/core/or/tor_version_st.h			\
+	src/core/or/var_cell_st.h			\
+	src/core/proto/proto_cell.h			\
+	src/core/proto/proto_control0.h			\
+	src/core/proto/proto_ext_or.h			\
+	src/core/proto/proto_http.h			\
+	src/core/proto/proto_socks.h			\
+	src/feature/api/tor_api_internal.h		\
+	src/feature/client/addressmap.h			\
+	src/feature/client/bridges.h			\
+	src/feature/client/circpathbias.h		\
+	src/feature/client/dnsserv.h			\
+	src/feature/client/entrynodes.h			\
+	src/feature/client/transports.h			\
+	src/feature/control/control.h			\
+	src/feature/control/control_connection_st.h	\
+	src/feature/dirauth/dircollate.h		\
+	src/feature/dirauth/dirvote.h			\
+	src/feature/dirauth/keypin.h			\
+	src/feature/dirauth/mode.h			\
+	src/feature/dirauth/ns_detached_signatures_st.h	\
+	src/feature/dirauth/shared_random.h		\
+	src/feature/dirauth/shared_random_state.h	\
+	src/feature/dirauth/vote_microdesc_hash_st.h	\
+	src/feature/dircache/cached_dir_st.h		\
+	src/feature/dircache/conscache.h		\
+	src/feature/dircache/consdiffmgr.h		\
+	src/feature/dircache/directory.h		\
+	src/feature/dircache/dirserv.h			\
+	src/feature/dirclient/dir_server_st.h		\
+	src/feature/dirclient/download_status_st.h	\
+	src/feature/dircommon/consdiff.h		\
+	src/feature/dircommon/dir_connection_st.h	\
+	src/feature/dircommon/fp_pair.h			\
+	src/feature/dircommon/vote_timing_st.h		\
+	src/feature/dircommon/voting_schedule.h		\
+	src/feature/hibernate/hibernate.h		\
+	src/feature/hs/hs_cache.h			\
+	src/feature/hs/hs_cell.h			\
+	src/feature/hs/hs_circuit.h			\
+	src/feature/hs/hs_circuitmap.h			\
+	src/feature/hs/hs_client.h			\
+	src/feature/hs/hs_common.h			\
+	src/feature/hs/hs_config.h			\
+	src/feature/hs/hs_control.h			\
+	src/feature/hs/hs_descriptor.h			\
+	src/feature/hs/hs_ident.h			\
+	src/feature/hs/hs_intropoint.h			\
+	src/feature/hs/hs_service.h			\
+	src/feature/hs/hs_stats.h			\
+	src/feature/hs/hsdir_index_st.h			\
+	src/feature/hs_common/replaycache.h		\
+	src/feature/hs_common/shared_random_client.h	\
+	src/feature/nodelist/authority_cert_st.h	\
+	src/feature/nodelist/desc_store_st.h		\
+	src/feature/nodelist/document_signature_st.h	\
+	src/feature/nodelist/extrainfo_st.h		\
+	src/feature/nodelist/microdesc.h		\
+	src/feature/nodelist/microdesc_st.h		\
+	src/feature/nodelist/networkstatus.h		\
+	src/feature/nodelist/networkstatus_sr_info_st.h	\
+	src/feature/nodelist/networkstatus_st.h		\
+	src/feature/nodelist/networkstatus_voter_info_st.h	\
+	src/feature/nodelist/node_st.h			\
+	src/feature/nodelist/nodelist.h			\
+	src/feature/nodelist/parsecommon.h		\
+	src/feature/nodelist/routerinfo_st.h		\
+	src/feature/nodelist/routerlist.h		\
+	src/feature/nodelist/routerlist_st.h		\
+	src/feature/nodelist/routerparse.h		\
+	src/feature/nodelist/routerset.h		\
+	src/feature/nodelist/routerstatus_st.h		\
+	src/feature/nodelist/signed_descriptor_st.h	\
+	src/feature/nodelist/torcert.h			\
+	src/feature/nodelist/vote_routerstatus_st.h	\
+	src/feature/relay/dns.h				\
+	src/feature/relay/dns_structs.h			\
+	src/feature/relay/ext_orport.h			\
+	src/feature/relay/router.h			\
+	src/feature/relay/routerkeys.h			\
+	src/feature/rend/rend_authorized_client_st.h	\
+	src/feature/rend/rend_encoded_v2_service_descriptor_st.h	\
+	src/feature/rend/rend_intro_point_st.h		\
+	src/feature/rend/rend_service_descriptor_st.h	\
+	src/feature/rend/rendcache.h			\
+	src/feature/rend/rendclient.h			\
+	src/feature/rend/rendcommon.h			\
+	src/feature/rend/rendmid.h			\
+	src/feature/rend/rendservice.h			\
+	src/feature/stats/geoip.h			\
+	src/feature/stats/rephist.h
+
+noinst_HEADERS +=			\
+	src/app/config/auth_dirs.inc	\
+	src/app/config/fallback_dirs.inc
+
+# This may someday want to be an installed file?
+noinst_HEADERS += src/feature/api/tor_api.h
+
+micro-revision.i: FORCE
+	$(AM_V_at)rm -f micro-revision.tmp; \
+	if test -r "$(top_srcdir)/.git" && \
+			test -x "`which git 2>&1;true`"; then \
+		HASH="`cd "$(top_srcdir)" && git rev-parse --short=16 HEAD`"; \
+		echo \"$$HASH\" > micro-revision.tmp; \
+	fi; \
+	if test ! -f micro-revision.tmp; then \
+		if test ! -f micro-revision.i; then \
+			echo '""' > micro-revision.i; \
+		fi; \
+	elif test ! -f micro-revision.i || \
+			test x"`cat micro-revision.tmp`" != x"`cat micro-revision.i`"; then \
+		mv micro-revision.tmp micro-revision.i; \
+	fi; \
+	rm -f micro-revision.tmp; \
+	true
+
+CLEANFILES+= micro-revision.i micro-revision.tmp
+
+FORCE:

+ 45 - 45
src/or/connection.c → src/core/mainloop/connection.c

@@ -55,8 +55,8 @@
  **/
  **/
 
 
 #define CONNECTION_PRIVATE
 #define CONNECTION_PRIVATE
-#include "or/or.h"
-#include "or/bridges.h"
+#include "core/or/or.h"
+#include "feature/client/bridges.h"
 #include "lib/container/buffers.h"
 #include "lib/container/buffers.h"
 #include "lib/tls/buffers_tls.h"
 #include "lib/tls/buffers_tls.h"
 /*
 /*
@@ -66,42 +66,42 @@
 #define TOR_CHANNEL_INTERNAL_
 #define TOR_CHANNEL_INTERNAL_
 #define CONNECTION_PRIVATE
 #define CONNECTION_PRIVATE
 #include "lib/err/backtrace.h"
 #include "lib/err/backtrace.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/control.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_util.h"
-#include "or/directory.h"
-#include "or/dirserv.h"
-#include "or/dns.h"
-#include "or/dnsserv.h"
-#include "or/dos.h"
-#include "or/entrynodes.h"
-#include "or/ext_orport.h"
-#include "or/geoip.h"
-#include "or/main.h"
-#include "or/hibernate.h"
-#include "or/hs_common.h"
-#include "or/hs_ident.h"
-#include "or/nodelist.h"
-#include "or/proto_http.h"
-#include "or/proto_socks.h"
-#include "or/policies.h"
-#include "or/reasons.h"
-#include "or/relay.h"
-#include "or/rendclient.h"
-#include "or/rendcommon.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/transports.h"
-#include "or/routerparse.h"
+#include "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/relay/dns.h"
+#include "feature/client/dnsserv.h"
+#include "core/or/dos.h"
+#include "feature/client/entrynodes.h"
+#include "feature/relay/ext_orport.h"
+#include "feature/stats/geoip.h"
+#include "core/mainloop/main.h"
+#include "feature/hibernate/hibernate.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_ident.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/proto/proto_http.h"
+#include "core/proto/proto_socks.h"
+#include "core/or/policies.h"
+#include "core/or/reasons.h"
+#include "core/or/relay.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/client/transports.h"
+#include "feature/nodelist/routerparse.h"
 #include "lib/sandbox/sandbox.h"
 #include "lib/sandbox/sandbox.h"
 #include "lib/net/buffers_net.h"
 #include "lib/net/buffers_net.h"
 #include "lib/tls/tortls.h"
 #include "lib/tls/tortls.h"
@@ -124,14 +124,14 @@
 #include <sys/un.h>
 #include <sys/un.h>
 #endif
 #endif
 
 
-#include "or/dir_connection_st.h"
-#include "or/control_connection_st.h"
-#include "or/entry_connection_st.h"
-#include "or/listener_connection_st.h"
-#include "or/or_connection_st.h"
-#include "or/port_cfg_st.h"
-#include "or/routerinfo_st.h"
-#include "or/socks_request_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "feature/control/control_connection_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/listener_connection_st.h"
+#include "core/or/or_connection_st.h"
+#include "core/or/port_cfg_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "core/or/socks_request_st.h"
 
 
 static connection_t *connection_listener_new(
 static connection_t *connection_listener_new(
                                const struct sockaddr *listensockaddr,
                                const struct sockaddr *listensockaddr,

+ 0 - 0
src/or/connection.h → src/core/mainloop/connection.h


+ 12 - 12
src/or/cpuworker.c → src/core/mainloop/cpuworker.c

@@ -17,22 +17,22 @@
  *      <li>and for calculating diffs and compressing them in consdiffmgr.c.
  *      <li>and for calculating diffs and compressing them in consdiffmgr.c.
  *  </ul>
  *  </ul>
  **/
  **/
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/connection_or.h"
-#include "or/config.h"
-#include "or/cpuworker.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/connection_or.h"
+#include "app/config/config.h"
+#include "core/mainloop/cpuworker.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_util.h"
-#include "or/main.h"
-#include "or/onion.h"
-#include "or/rephist.h"
-#include "or/router.h"
+#include "core/mainloop/main.h"
+#include "core/crypto/onion.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
 #include "lib/evloop/workqueue.h"
 #include "lib/evloop/workqueue.h"
 
 
-#include "or/or_circuit_st.h"
+#include "core/or/or_circuit_st.h"
 #include "lib/intmath/weakrng.h"
 #include "lib/intmath/weakrng.h"
 
 
 static void queue_pending_tasks(void);
 static void queue_pending_tasks(void);

+ 0 - 0
src/or/cpuworker.h → src/core/mainloop/cpuworker.h


+ 68 - 68
src/or/main.c → src/core/mainloop/main.c

@@ -47,69 +47,69 @@
  **/
  **/
 
 
 #define MAIN_PRIVATE
 #define MAIN_PRIVATE
-#include "or/or.h"
-#include "or/addressmap.h"
+#include "core/or/or.h"
+#include "feature/client/addressmap.h"
 #include "lib/err/backtrace.h"
 #include "lib/err/backtrace.h"
-#include "or/bridges.h"
+#include "feature/client/bridges.h"
 #include "lib/container/buffers.h"
 #include "lib/container/buffers.h"
 #include "lib/tls/buffers_tls.h"
 #include "lib/tls/buffers_tls.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/channelpadding.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/circuitmux_ewma.h"
-#include "or/command.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/or/channelpadding.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "core/or/circuitmux_ewma.h"
+#include "core/or/command.h"
 #include "lib/compress/compress.h"
 #include "lib/compress/compress.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/consdiffmgr.h"
-#include "or/control.h"
-#include "or/cpuworker.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/dircache/consdiffmgr.h"
+#include "feature/control/control.h"
+#include "core/mainloop/cpuworker.h"
 #include "lib/crypt_ops/crypto_s2k.h"
 #include "lib/crypt_ops/crypto_s2k.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_rand.h"
-#include "or/directory.h"
-#include "or/dirserv.h"
-#include "or/dns.h"
-#include "or/dnsserv.h"
-#include "or/dos.h"
-#include "or/entrynodes.h"
-#include "or/geoip.h"
-#include "or/hibernate.h"
-#include "or/hs_cache.h"
-#include "or/hs_circuitmap.h"
-#include "or/hs_client.h"
-#include "or/keypin.h"
-#include "or/main.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "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 "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/relay/dns.h"
+#include "feature/client/dnsserv.h"
+#include "core/or/dos.h"
+#include "feature/client/entrynodes.h"
+#include "feature/stats/geoip.h"
+#include "feature/hibernate/hibernate.h"
+#include "feature/hs/hs_cache.h"
+#include "feature/hs/hs_circuitmap.h"
+#include "feature/hs/hs_client.h"
+#include "feature/dirauth/keypin.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "app/main/ntmain.h"
+#include "core/crypto/onion.h"
+#include "core/mainloop/periodic.h"
+#include "core/or/policies.h"
+#include "core/or/protover.h"
+#include "feature/client/transports.h"
+#include "core/or/relay.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendservice.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "core/or/scheduler.h"
+#include "app/config/statefile.h"
+#include "core/or/status.h"
+#include "feature/api/tor_api.h"
+#include "feature/api/tor_api_internal.h"
 #include "lib/process/waitpid.h"
 #include "lib/process/waitpid.h"
-#include "or/ext_orport.h"
+#include "feature/relay/ext_orport.h"
 #include "lib/memarea/memarea.h"
 #include "lib/memarea/memarea.h"
 #include "lib/meminfo/meminfo.h"
 #include "lib/meminfo/meminfo.h"
 #include "lib/osinfo/uname.h"
 #include "lib/osinfo/uname.h"
@@ -123,18 +123,18 @@
 
 
 #include <event2/event.h>
 #include <event2/event.h>
 
 
-#include "or/dirauth/dirvote.h"
-#include "or/dirauth/mode.h"
-#include "or/dirauth/shared_random.h"
-
-#include "or/cell_st.h"
-#include "or/entry_connection_st.h"
-#include "or/networkstatus_st.h"
-#include "or/or_connection_st.h"
-#include "or/or_state_st.h"
-#include "or/port_cfg_st.h"
-#include "or/routerinfo_st.h"
-#include "or/socks_request_st.h"
+#include "feature/dirauth/dirvote.h"
+#include "feature/dirauth/mode.h"
+#include "feature/dirauth/shared_random.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/entry_connection_st.h"
+#include "feature/nodelist/networkstatus_st.h"
+#include "core/or/or_connection_st.h"
+#include "app/config/or_state_st.h"
+#include "core/or/port_cfg_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "core/or/socks_request_st.h"
 
 
 #ifdef HAVE_UNISTD_H
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #include <unistd.h>

+ 1 - 1
src/or/main.h → src/core/mainloop/main.h

@@ -114,7 +114,7 @@ STATIC int get_my_roles(const or_options_t *options);
 extern smartlist_t *connection_array;
 extern smartlist_t *connection_array;
 
 
 /* We need the periodic_event_item_t definition. */
 /* We need the periodic_event_item_t definition. */
-#include "or/periodic.h"
+#include "core/mainloop/periodic.h"
 extern periodic_event_item_t periodic_events[];
 extern periodic_event_item_t periodic_events[];
 #endif
 #endif
 #endif /* defined(MAIN_PRIVATE) */
 #endif /* defined(MAIN_PRIVATE) */

+ 4 - 4
src/or/periodic.c → src/core/mainloop/periodic.c

@@ -11,11 +11,11 @@
  * that they fire.  See periodic_events[] in main.c for examples.
  * that they fire.  See periodic_events[] in main.c for examples.
  */
  */
 
 
-#include "or/or.h"
+#include "core/or/or.h"
 #include "lib/evloop/compat_libevent.h"
 #include "lib/evloop/compat_libevent.h"
-#include "or/config.h"
-#include "or/main.h"
-#include "or/periodic.h"
+#include "app/config/config.h"
+#include "core/mainloop/main.h"
+#include "core/mainloop/periodic.h"
 #include "lib/evloop/compat_libevent.h"
 #include "lib/evloop/compat_libevent.h"
 
 
 /** We disable any interval greater than this number of seconds, on the
 /** We disable any interval greater than this number of seconds, on the

+ 0 - 0
src/or/periodic.h → src/core/mainloop/periodic.h


+ 0 - 0
src/or/addr_policy_st.h → src/core/or/addr_policy_st.h


+ 1 - 1
src/or/address_set.c → src/core/or/address_set.c

@@ -11,7 +11,7 @@
  **/
  **/
 
 
 #include "orconfig.h"
 #include "orconfig.h"
-#include "or/address_set.h"
+#include "core/or/address_set.h"
 #include "lib/net/address.h"
 #include "lib/net/address.h"
 #include "lib/container/bloomfilt.h"
 #include "lib/container/bloomfilt.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_rand.h"

+ 0 - 0
src/or/address_set.h → src/core/or/address_set.h


+ 0 - 0
src/or/cell_queue_st.h → src/core/or/cell_queue_st.h


+ 0 - 0
src/or/cell_st.h → src/core/or/cell_st.h


+ 22 - 22
src/or/channel.c → src/core/or/channel.c

@@ -57,31 +57,31 @@
 /* This one's for stuff only channel.c and the test suite should see */
 /* This one's for stuff only channel.c and the test suite should see */
 #define CHANNEL_PRIVATE_
 #define CHANNEL_PRIVATE_
 
 
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/channelpadding.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuitstats.h"
-#include "or/config.h"
-#include "or/connection_or.h" /* For var_cell_free() */
-#include "or/circuitmux.h"
-#include "or/entrynodes.h"
-#include "or/geoip.h"
-#include "or/main.h"
-#include "or/nodelist.h"
-#include "or/relay.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/scheduler.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/or/channelpadding.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitstats.h"
+#include "app/config/config.h"
+#include "core/or/connection_or.h" /* For var_cell_free() */
+#include "core/or/circuitmux.h"
+#include "feature/client/entrynodes.h"
+#include "feature/stats/geoip.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/relay.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "core/or/scheduler.h"
 #include "lib/time/compat_time.h"
 #include "lib/time/compat_time.h"
-#include "or/networkstatus.h"
-#include "or/rendservice.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/rend/rendservice.h"
 #include "lib/evloop/timers.h"
 #include "lib/evloop/timers.h"
 
 
-#include "or/cell_queue_st.h"
+#include "core/or/cell_queue_st.h"
 
 
 /* Global lists of channels */
 /* Global lists of channels */
 
 

+ 2 - 2
src/or/channel.h → src/core/or/channel.h

@@ -9,8 +9,8 @@
 #ifndef TOR_CHANNEL_H
 #ifndef TOR_CHANNEL_H
 #define TOR_CHANNEL_H
 #define TOR_CHANNEL_H
 
 
-#include "or/or.h"
-#include "or/circuitmux.h"
+#include "core/or/or.h"
+#include "core/or/circuitmux.h"
 #include "lib/container/handles.h"
 #include "lib/container/handles.h"
 #include "lib/crypt_ops/crypto_ed25519.h"
 #include "lib/crypt_ops/crypto_ed25519.h"
 
 

+ 14 - 14
src/or/channelpadding.c → src/core/or/channelpadding.c

@@ -8,24 +8,24 @@
  * channelpadding_channel_to_channelinfo() */
  * channelpadding_channel_to_channelinfo() */
 #define TOR_CHANNEL_INTERNAL_
 #define TOR_CHANNEL_INTERNAL_
 
 
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/channelpadding.h"
-#include "or/channeltls.h"
-#include "or/config.h"
-#include "or/networkstatus.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/channelpadding.h"
+#include "core/or/channeltls.h"
+#include "app/config/config.h"
+#include "feature/nodelist/networkstatus.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_rand.h"
-#include "or/main.h"
-#include "or/rephist.h"
-#include "or/router.h"
+#include "core/mainloop/main.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
 #include "lib/time/compat_time.h"
 #include "lib/time/compat_time.h"
-#include "or/rendservice.h"
+#include "feature/rend/rendservice.h"
 #include "lib/evloop/timers.h"
 #include "lib/evloop/timers.h"
 
 
-#include "or/cell_st.h"
-#include "or/or_connection_st.h"
+#include "core/or/cell_st.h"
+#include "core/or/or_connection_st.h"
 
 
 STATIC int32_t channelpadding_get_netflow_inactive_timeout_ms(
 STATIC int32_t channelpadding_get_netflow_inactive_timeout_ms(
                                                            const channel_t *);
                                                            const channel_t *);

+ 0 - 0
src/or/channelpadding.h → src/core/or/channelpadding.h


+ 28 - 28
src/or/channeltls.c → src/core/or/channeltls.c

@@ -38,36 +38,36 @@
 
 
 #define CHANNELTLS_PRIVATE
 #define CHANNELTLS_PRIVATE
 
 
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/circuitmux.h"
-#include "or/circuitmux_ewma.h"
-#include "or/command.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
-#include "or/control.h"
-#include "or/entrynodes.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/or/circuitmux.h"
+#include "core/or/circuitmux_ewma.h"
+#include "core/or/command.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
+#include "feature/client/entrynodes.h"
 #include "trunnel/link_handshake.h"
 #include "trunnel/link_handshake.h"
-#include "or/relay.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/scheduler.h"
-#include "or/torcert.h"
-#include "or/networkstatus.h"
+#include "core/or/relay.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "core/or/scheduler.h"
+#include "feature/nodelist/torcert.h"
+#include "feature/nodelist/networkstatus.h"
 #include "trunnel/channelpadding_negotiation.h"
 #include "trunnel/channelpadding_negotiation.h"
-#include "or/channelpadding.h"
-
-#include "or/cell_st.h"
-#include "or/cell_queue_st.h"
-#include "or/extend_info_st.h"
-#include "or/or_connection_st.h"
-#include "or/or_handshake_certs_st.h"
-#include "or/or_handshake_state_st.h"
-#include "or/routerinfo_st.h"
-#include "or/var_cell_st.h"
+#include "core/or/channelpadding.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/cell_queue_st.h"
+#include "core/or/extend_info_st.h"
+#include "core/or/or_connection_st.h"
+#include "core/or/or_handshake_certs_st.h"
+#include "core/or/or_handshake_state_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "core/or/var_cell_st.h"
 
 
 #include "lib/tls/tortls.h"
 #include "lib/tls/tortls.h"
 
 

+ 2 - 2
src/or/channeltls.h → src/core/or/channeltls.h

@@ -9,8 +9,8 @@
 #ifndef TOR_CHANNELTLS_H
 #ifndef TOR_CHANNELTLS_H
 #define TOR_CHANNELTLS_H
 #define TOR_CHANNELTLS_H
 
 
-#include "or/or.h"
-#include "or/channel.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
 
 
 struct ed25519_public_key_t;
 struct ed25519_public_key_t;
 struct curve25519_public_key_t;
 struct curve25519_public_key_t;

+ 2 - 2
src/or/circuit_st.h → src/core/or/circuit_st.h

@@ -7,9 +7,9 @@
 #ifndef CIRCUIT_ST_H
 #ifndef CIRCUIT_ST_H
 #define CIRCUIT_ST_H
 #define CIRCUIT_ST_H
 
 
-#include "or/or.h"
+#include "core/or/or.h"
 
 
-#include "or/cell_queue_st.h"
+#include "core/or/cell_queue_st.h"
 
 
 struct hs_token_t;
 struct hs_token_t;
 
 

+ 46 - 46
src/or/circuitbuild.c → src/core/or/circuitbuild.c

@@ -27,54 +27,54 @@
 
 
 #define CIRCUITBUILD_PRIVATE
 #define CIRCUITBUILD_PRIVATE
 
 
-#include "or/or.h"
-#include "or/bridges.h"
-#include "or/channel.h"
-#include "or/circpathbias.h"
+#include "core/or/or.h"
+#include "feature/client/bridges.h"
+#include "core/or/channel.h"
+#include "feature/client/circpathbias.h"
 #define CIRCUITBUILD_PRIVATE
 #define CIRCUITBUILD_PRIVATE
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuitstats.h"
-#include "or/circuituse.h"
-#include "or/command.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/control.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitstats.h"
+#include "core/or/circuituse.h"
+#include "core/or/command.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_rand.h"
-#include "or/directory.h"
-#include "or/entrynodes.h"
-#include "or/hs_ntor.h"
-#include "or/main.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/onion.h"
-#include "or/onion_tap.h"
-#include "or/onion_fast.h"
-#include "or/policies.h"
-#include "or/relay.h"
-#include "or/relay_crypto.h"
-#include "or/rendcommon.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerparse.h"
-#include "or/routerset.h"
-#include "or/transports.h"
-
-#include "or/cell_st.h"
-#include "or/cpath_build_state_st.h"
-#include "or/entry_connection_st.h"
-#include "or/extend_info_st.h"
-#include "or/node_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/microdesc_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerstatus_st.h"
+#include "feature/dircache/directory.h"
+#include "feature/client/entrynodes.h"
+#include "core/crypto/hs_ntor.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/crypto/onion.h"
+#include "core/crypto/onion_tap.h"
+#include "core/crypto/onion_fast.h"
+#include "core/or/policies.h"
+#include "core/or/relay.h"
+#include "core/crypto/relay_crypto.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/nodelist/routerset.h"
+#include "feature/client/transports.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/cpath_build_state_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/extend_info_st.h"
+#include "feature/nodelist/node_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "feature/nodelist/microdesc_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerstatus_st.h"
 
 
 static channel_t * channel_connect_for_circuit(const tor_addr_t *addr,
 static channel_t * channel_connect_for_circuit(const tor_addr_t *addr,
                                             uint16_t port,
                                             uint16_t port,

+ 0 - 0
src/or/circuitbuild.h → src/core/or/circuitbuild.h


+ 38 - 38
src/or/circuitlist.c → src/core/or/circuitlist.c

@@ -53,40 +53,40 @@
 #define CIRCUITLIST_PRIVATE
 #define CIRCUITLIST_PRIVATE
 #include "lib/cc/torint.h"  /* TOR_PRIuSZ */
 #include "lib/cc/torint.h"  /* TOR_PRIuSZ */
 
 
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/circpathbias.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/circuitstats.h"
-#include "or/connection.h"
-#include "or/config.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "feature/client/circpathbias.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "core/or/circuitstats.h"
+#include "core/mainloop/connection.h"
+#include "app/config/config.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_dh.h"
 #include "lib/crypt_ops/crypto_dh.h"
-#include "or/directory.h"
-#include "or/entrynodes.h"
-#include "or/main.h"
-#include "or/hs_circuit.h"
-#include "or/hs_circuitmap.h"
-#include "or/hs_ident.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/onion.h"
-#include "or/onion_fast.h"
-#include "or/policies.h"
-#include "or/relay.h"
-#include "or/relay_crypto.h"
-#include "or/rendclient.h"
-#include "or/rendcommon.h"
-#include "or/rephist.h"
-#include "or/routerlist.h"
-#include "or/routerset.h"
-#include "or/channelpadding.h"
+#include "feature/dircache/directory.h"
+#include "feature/client/entrynodes.h"
+#include "core/mainloop/main.h"
+#include "feature/hs/hs_circuit.h"
+#include "feature/hs/hs_circuitmap.h"
+#include "feature/hs/hs_ident.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/crypto/onion.h"
+#include "core/crypto/onion_fast.h"
+#include "core/or/policies.h"
+#include "core/or/relay.h"
+#include "core/crypto/relay_crypto.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/stats/rephist.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerset.h"
+#include "core/or/channelpadding.h"
 #include "lib/compress/compress.h"
 #include "lib/compress/compress.h"
 #include "lib/compress/compress_lzma.h"
 #include "lib/compress/compress_lzma.h"
 #include "lib/compress/compress_zlib.h"
 #include "lib/compress/compress_zlib.h"
@@ -95,13 +95,13 @@
 
 
 #include "ht.h"
 #include "ht.h"
 
 
-#include "or/cpath_build_state_st.h"
-#include "or/crypt_path_reference_st.h"
-#include "or/dir_connection_st.h"
-#include "or/edge_connection_st.h"
-#include "or/extend_info_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
+#include "core/or/cpath_build_state_st.h"
+#include "core/or/crypt_path_reference_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "core/or/edge_connection_st.h"
+#include "core/or/extend_info_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
 
 
 /********* START VARIABLES **********/
 /********* START VARIABLES **********/
 
 

+ 1 - 1
src/or/circuitlist.h → src/core/or/circuitlist.h

@@ -13,7 +13,7 @@
 #define TOR_CIRCUITLIST_H
 #define TOR_CIRCUITLIST_H
 
 
 #include "lib/testsupport/testsupport.h"
 #include "lib/testsupport/testsupport.h"
-#include "or/hs_ident.h"
+#include "feature/hs/hs_ident.h"
 
 
 /** Circuit state: I'm the origin, still haven't done all my handshakes. */
 /** Circuit state: I'm the origin, still haven't done all my handshakes. */
 #define CIRCUIT_STATE_BUILDING 0
 #define CIRCUIT_STATE_BUILDING 0

+ 9 - 9
src/or/circuitmux.c → src/core/or/circuitmux.c

@@ -69,15 +69,15 @@
  *     made to attach all existing circuits to the new policy.
  *     made to attach all existing circuits to the new policy.
  **/
  **/
 
 
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/circuitlist.h"
-#include "or/circuitmux.h"
-#include "or/relay.h"
-
-#include "or/cell_queue_st.h"
-#include "or/destroy_cell_queue_st.h"
-#include "or/or_circuit_st.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitmux.h"
+#include "core/or/relay.h"
+
+#include "core/or/cell_queue_st.h"
+#include "core/or/destroy_cell_queue_st.h"
+#include "core/or/or_circuit_st.h"
 
 
 /*
 /*
  * Private typedefs for circuitmux.c
  * Private typedefs for circuitmux.c

+ 1 - 1
src/or/circuitmux.h → src/core/or/circuitmux.h

@@ -9,7 +9,7 @@
 #ifndef TOR_CIRCUITMUX_H
 #ifndef TOR_CIRCUITMUX_H
 #define TOR_CIRCUITMUX_H
 #define TOR_CIRCUITMUX_H
 
 
-#include "or/or.h"
+#include "core/or/or.h"
 #include "lib/testsupport/testsupport.h"
 #include "lib/testsupport/testsupport.h"
 
 
 typedef struct circuitmux_policy_s circuitmux_policy_t;
 typedef struct circuitmux_policy_s circuitmux_policy_t;

+ 5 - 5
src/or/circuitmux_ewma.c → src/core/or/circuitmux_ewma.c

@@ -34,12 +34,12 @@
 
 
 #include <math.h>
 #include <math.h>
 
 
-#include "or/or.h"
-#include "or/circuitmux.h"
-#include "or/circuitmux_ewma.h"
+#include "core/or/or.h"
+#include "core/or/circuitmux.h"
+#include "core/or/circuitmux_ewma.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_rand.h"
-#include "or/networkstatus.h"
-#include "or/or_options_st.h"
+#include "feature/nodelist/networkstatus.h"
+#include "app/config/or_options_st.h"
 
 
 /*** EWMA parameter #defines ***/
 /*** EWMA parameter #defines ***/
 
 

+ 2 - 2
src/or/circuitmux_ewma.h → src/core/or/circuitmux_ewma.h

@@ -9,8 +9,8 @@
 #ifndef TOR_CIRCUITMUX_EWMA_H
 #ifndef TOR_CIRCUITMUX_EWMA_H
 #define TOR_CIRCUITMUX_EWMA_H
 #define TOR_CIRCUITMUX_EWMA_H
 
 
-#include "or/or.h"
-#include "or/circuitmux.h"
+#include "core/or/or.h"
+#include "core/or/circuitmux.h"
 
 
 /* The public EWMA policy callbacks object. */
 /* The public EWMA policy callbacks object. */
 extern circuitmux_policy_t ewma_policy;
 extern circuitmux_policy_t ewma_policy;

+ 17 - 17
src/or/circuitstats.c → src/core/or/circuitstats.c

@@ -25,28 +25,28 @@
 
 
 #define CIRCUITSTATS_PRIVATE
 #define CIRCUITSTATS_PRIVATE
 
 
-#include "or/or.h"
-#include "or/circuitbuild.h"
-#include "or/circuitstats.h"
-#include "or/config.h"
-#include "or/confparse.h"
-#include "or/control.h"
+#include "core/or/or.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitstats.h"
+#include "app/config/config.h"
+#include "app/config/confparse.h"
+#include "feature/control/control.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_rand.h"
-#include "or/main.h"
-#include "or/networkstatus.h"
-#include "or/rendclient.h"
-#include "or/rendservice.h"
-#include "or/router.h"
-#include "or/statefile.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendservice.h"
+#include "feature/relay/router.h"
+#include "app/config/statefile.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
 #include "lib/math/fp.h"
 #include "lib/math/fp.h"
 #include "lib/time/tvdiff.h"
 #include "lib/time/tvdiff.h"
 #include "lib/encoding/confline.h"
 #include "lib/encoding/confline.h"
 
 
-#include "or/crypt_path_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/or_state_st.h"
+#include "core/or/crypt_path_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "app/config/or_state_st.h"
 
 
 #undef log
 #undef log
 #include <math.h>
 #include <math.h>

+ 0 - 0
src/or/circuitstats.h → src/core/or/circuitstats.h


+ 36 - 36
src/or/circuituse.c → src/core/or/circuituse.c

@@ -27,45 +27,45 @@
  * logic in circuitstats.c.
  * logic in circuitstats.c.
  **/
  **/
 
 
-#include "or/or.h"
-#include "or/addressmap.h"
-#include "or/bridges.h"
-#include "or/channel.h"
-#include "or/circpathbias.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuitstats.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/control.h"
-#include "or/directory.h"
-#include "or/entrynodes.h"
-#include "or/hs_common.h"
-#include "or/hs_client.h"
-#include "or/hs_circuit.h"
-#include "or/hs_ident.h"
-#include "or/hs_stats.h"
-#include "or/nodelist.h"
-#include "or/networkstatus.h"
-#include "or/policies.h"
-#include "or/rendclient.h"
-#include "or/rendcommon.h"
-#include "or/rendservice.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
+#include "core/or/or.h"
+#include "feature/client/addressmap.h"
+#include "feature/client/bridges.h"
+#include "core/or/channel.h"
+#include "feature/client/circpathbias.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitstats.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "feature/control/control.h"
+#include "feature/dircache/directory.h"
+#include "feature/client/entrynodes.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_client.h"
+#include "feature/hs/hs_circuit.h"
+#include "feature/hs/hs_ident.h"
+#include "feature/hs/hs_stats.h"
+#include "feature/nodelist/nodelist.h"
+#include "feature/nodelist/networkstatus.h"
+#include "core/or/policies.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendservice.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
 #include "lib/math/fp.h"
 #include "lib/math/fp.h"
 #include "lib/time/tvdiff.h"
 #include "lib/time/tvdiff.h"
 
 
-#include "or/cpath_build_state_st.h"
-#include "or/dir_connection_st.h"
-#include "or/entry_connection_st.h"
-#include "or/extend_info_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/socks_request_st.h"
+#include "core/or/cpath_build_state_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/extend_info_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "core/or/socks_request_st.h"
 
 
 static void circuit_expire_old_circuits_clientside(void);
 static void circuit_expire_old_circuits_clientside(void);
 static void circuit_increment_failure_count(void);
 static void circuit_increment_failure_count(void);

+ 0 - 0
src/or/circuituse.h → src/core/or/circuituse.h


+ 23 - 23
src/or/command.c → src/core/or/command.c

@@ -36,30 +36,30 @@
  *   callbacks registered in command_setup_channel(),
  *   callbacks registered in command_setup_channel(),
  *   called when channels are created in circuitbuild.c
  *   called when channels are created in circuitbuild.c
  */
  */
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/command.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
-#include "or/config.h"
-#include "or/control.h"
-#include "or/cpuworker.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/command.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
+#include "app/config/config.h"
+#include "feature/control/control.h"
+#include "core/mainloop/cpuworker.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_util.h"
-#include "or/dos.h"
-#include "or/hibernate.h"
-#include "or/nodelist.h"
-#include "or/onion.h"
-#include "or/rephist.h"
-#include "or/relay.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-
-#include "or/cell_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/var_cell_st.h"
+#include "core/or/dos.h"
+#include "feature/hibernate/hibernate.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/crypto/onion.h"
+#include "feature/stats/rephist.h"
+#include "core/or/relay.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "core/or/var_cell_st.h"
 
 
 /** How many CELL_CREATE cells have we received, ever? */
 /** How many CELL_CREATE cells have we received, ever? */
 uint64_t stats_n_create_cells_processed = 0;
 uint64_t stats_n_create_cells_processed = 0;

+ 1 - 1
src/or/command.h → src/core/or/command.h

@@ -12,7 +12,7 @@
 #ifndef TOR_COMMAND_H
 #ifndef TOR_COMMAND_H
 #define TOR_COMMAND_H
 #define TOR_COMMAND_H
 
 
-#include "or/channel.h"
+#include "core/or/channel.h"
 
 
 void command_process_cell(channel_t *chan, cell_t *cell);
 void command_process_cell(channel_t *chan, cell_t *cell);
 void command_process_var_cell(channel_t *chan, var_cell_t *cell);
 void command_process_var_cell(channel_t *chan, var_cell_t *cell);

+ 46 - 46
src/or/connection_edge.c → src/core/or/connection_edge.c

@@ -55,57 +55,57 @@
  **/
  **/
 #define CONNECTION_EDGE_PRIVATE
 #define CONNECTION_EDGE_PRIVATE
 
 
-#include "or/or.h"
+#include "core/or/or.h"
 
 
 #include "lib/err/backtrace.h"
 #include "lib/err/backtrace.h"
 
 
-#include "or/addressmap.h"
+#include "feature/client/addressmap.h"
 #include "lib/container/buffers.h"
 #include "lib/container/buffers.h"
-#include "or/channel.h"
-#include "or/circpathbias.h"
-#include "or/circuitlist.h"
-#include "or/circuituse.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_edge.h"
-#include "or/connection_or.h"
-#include "or/control.h"
+#include "core/or/channel.h"
+#include "feature/client/circpathbias.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuituse.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_edge.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_util.h"
-#include "or/dns.h"
-#include "or/dnsserv.h"
-#include "or/directory.h"
-#include "or/dirserv.h"
-#include "or/hibernate.h"
-#include "or/hs_common.h"
-#include "or/hs_cache.h"
-#include "or/hs_client.h"
-#include "or/hs_circuit.h"
-#include "or/main.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/proto_http.h"
-#include "or/proto_socks.h"
-#include "or/reasons.h"
-#include "or/relay.h"
-#include "or/rendclient.h"
-#include "or/rendcommon.h"
-#include "or/rendservice.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerlist.h"
-#include "or/routerset.h"
-#include "or/circuitbuild.h"
-
-#include "or/cell_st.h"
-#include "or/cpath_build_state_st.h"
-#include "or/dir_connection_st.h"
-#include "or/entry_connection_st.h"
-#include "or/extend_info_st.h"
-#include "or/node_st.h"
-#include "or/or_circuit_st.h"
-#include "or/origin_circuit_st.h"
-#include "or/socks_request_st.h"
+#include "feature/relay/dns.h"
+#include "feature/client/dnsserv.h"
+#include "feature/dircache/directory.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/hibernate/hibernate.h"
+#include "feature/hs/hs_common.h"
+#include "feature/hs/hs_cache.h"
+#include "feature/hs/hs_client.h"
+#include "feature/hs/hs_circuit.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/policies.h"
+#include "core/proto/proto_http.h"
+#include "core/proto/proto_socks.h"
+#include "core/or/reasons.h"
+#include "core/or/relay.h"
+#include "feature/rend/rendclient.h"
+#include "feature/rend/rendcommon.h"
+#include "feature/rend/rendservice.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/nodelist/routerset.h"
+#include "core/or/circuitbuild.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/cpath_build_state_st.h"
+#include "feature/dircommon/dir_connection_st.h"
+#include "core/or/entry_connection_st.h"
+#include "core/or/extend_info_st.h"
+#include "feature/nodelist/node_st.h"
+#include "core/or/or_circuit_st.h"
+#include "core/or/origin_circuit_st.h"
+#include "core/or/socks_request_st.h"
 #include "lib/evloop/compat_libevent.h"
 #include "lib/evloop/compat_libevent.h"
 
 
 #ifdef HAVE_LINUX_TYPES_H
 #ifdef HAVE_LINUX_TYPES_H

+ 0 - 0
src/or/connection_edge.h → src/core/or/connection_edge.h


+ 39 - 39
src/or/connection_or.c → src/core/or/connection_or.c

@@ -20,8 +20,8 @@
  *
  *
  * This module also implements the client side of the v3 Tor link handshake,
  * This module also implements the client side of the v3 Tor link handshake,
  **/
  **/
-#include "or/or.h"
-#include "or/bridges.h"
+#include "core/or/or.h"
+#include "feature/client/bridges.h"
 #include "lib/container/buffers.h"
 #include "lib/container/buffers.h"
 /*
 /*
  * Define this so we get channel internal functions, since we're implementing
  * Define this so we get channel internal functions, since we're implementing
@@ -29,46 +29,46 @@
  */
  */
 #define TOR_CHANNEL_INTERNAL_
 #define TOR_CHANNEL_INTERNAL_
 #define CONNECTION_OR_PRIVATE
 #define CONNECTION_OR_PRIVATE
-#include "or/channel.h"
-#include "or/channeltls.h"
-#include "or/circuitbuild.h"
-#include "or/circuitlist.h"
-#include "or/circuitstats.h"
-#include "or/command.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
-#include "or/control.h"
+#include "core/or/channel.h"
+#include "core/or/channeltls.h"
+#include "core/or/circuitbuild.h"
+#include "core/or/circuitlist.h"
+#include "core/or/circuitstats.h"
+#include "core/or/command.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
+#include "feature/control/control.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_util.h"
 #include "lib/crypt_ops/crypto_util.h"
-#include "or/dirserv.h"
-#include "or/entrynodes.h"
-#include "or/geoip.h"
-#include "or/main.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/client/entrynodes.h"
+#include "feature/stats/geoip.h"
+#include "core/mainloop/main.h"
 #include "trunnel/link_handshake.h"
 #include "trunnel/link_handshake.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/proto_cell.h"
-#include "or/reasons.h"
-#include "or/relay.h"
-#include "or/rephist.h"
-#include "or/router.h"
-#include "or/routerkeys.h"
-#include "or/routerlist.h"
-#include "or/ext_orport.h"
-#include "or/scheduler.h"
-#include "or/torcert.h"
-#include "or/channelpadding.h"
-
-#include "or/cell_st.h"
-#include "or/cell_queue_st.h"
-#include "or/or_connection_st.h"
-#include "or/or_handshake_certs_st.h"
-#include "or/or_handshake_state_st.h"
-#include "or/or_state_st.h"
-#include "or/routerinfo_st.h"
-#include "or/var_cell_st.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/proto/proto_cell.h"
+#include "core/or/reasons.h"
+#include "core/or/relay.h"
+#include "feature/stats/rephist.h"
+#include "feature/relay/router.h"
+#include "feature/relay/routerkeys.h"
+#include "feature/nodelist/routerlist.h"
+#include "feature/relay/ext_orport.h"
+#include "core/or/scheduler.h"
+#include "feature/nodelist/torcert.h"
+#include "core/or/channelpadding.h"
+
+#include "core/or/cell_st.h"
+#include "core/or/cell_queue_st.h"
+#include "core/or/or_connection_st.h"
+#include "core/or/or_handshake_certs_st.h"
+#include "core/or/or_handshake_state_st.h"
+#include "app/config/or_state_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "core/or/var_cell_st.h"
 #include "lib/crypt_ops/crypto_format.h"
 #include "lib/crypt_ops/crypto_format.h"
 
 
 #include "lib/tls/tortls.h"
 #include "lib/tls/tortls.h"

+ 0 - 0
src/or/connection_or.h → src/core/or/connection_or.h


+ 0 - 0
src/or/connection_st.h → src/core/or/connection_st.h


+ 0 - 0
src/or/cpath_build_state_st.h → src/core/or/cpath_build_state_st.h


+ 0 - 0
src/or/crypt_path_reference_st.h → src/core/or/crypt_path_reference_st.h


+ 1 - 1
src/or/crypt_path_st.h → src/core/or/crypt_path_st.h

@@ -7,7 +7,7 @@
 #ifndef CRYPT_PATH_ST_H
 #ifndef CRYPT_PATH_ST_H
 #define CRYPT_PATH_ST_H
 #define CRYPT_PATH_ST_H
 
 
-#include "or/relay_crypto_st.h"
+#include "core/or/relay_crypto_st.h"
 struct crypto_dh_t;
 struct crypto_dh_t;
 
 
 #define CRYPT_PATH_MAGIC 0x70127012u
 #define CRYPT_PATH_MAGIC 0x70127012u

+ 0 - 0
src/or/destroy_cell_queue_st.h → src/core/or/destroy_cell_queue_st.h


+ 13 - 13
src/or/dos.c → src/core/or/dos.c

@@ -8,22 +8,22 @@
 
 
 #define DOS_PRIVATE
 #define DOS_PRIVATE
 
 
-#include "or/or.h"
-#include "or/channel.h"
-#include "or/config.h"
-#include "or/connection.h"
-#include "or/connection_or.h"
+#include "core/or/or.h"
+#include "core/or/channel.h"
+#include "app/config/config.h"
+#include "core/mainloop/connection.h"
+#include "core/or/connection_or.h"
 #include "lib/crypt_ops/crypto_rand.h"
 #include "lib/crypt_ops/crypto_rand.h"
-#include "or/geoip.h"
-#include "or/main.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/relay.h"
-#include "or/router.h"
+#include "feature/stats/geoip.h"
+#include "core/mainloop/main.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/relay.h"
+#include "feature/relay/router.h"
 
 
-#include "or/dos.h"
+#include "core/or/dos.h"
 
 
-#include "or/or_connection_st.h"
+#include "core/or/or_connection_st.h"
 
 
 /*
 /*
  * Circuit creation denial of service mitigation.
  * Circuit creation denial of service mitigation.

+ 0 - 0
src/or/dos.h → src/core/or/dos.h


+ 2 - 2
src/or/edge_connection_st.h → src/core/or/edge_connection_st.h

@@ -7,9 +7,9 @@
 #ifndef EDGE_CONNECTION_ST_H
 #ifndef EDGE_CONNECTION_ST_H
 #define EDGE_CONNECTION_ST_H
 #define EDGE_CONNECTION_ST_H
 
 
-#include "or/or.h"
+#include "core/or/or.h"
 
 
-#include "or/connection_st.h"
+#include "core/or/connection_st.h"
 
 
 /** Subtype of connection_t for an "edge connection" -- that is, an entry (ap)
 /** Subtype of connection_t for an "edge connection" -- that is, an entry (ap)
  * connection, or an exit. */
  * connection, or an exit. */

+ 1 - 1
src/or/entry_connection_st.h → src/core/or/entry_connection_st.h

@@ -7,7 +7,7 @@
 #ifndef ENTRY_CONNECTION_ST_H
 #ifndef ENTRY_CONNECTION_ST_H
 #define ENTRY_CONNECTION_ST_H
 #define ENTRY_CONNECTION_ST_H
 
 
-#include "or/edge_connection_st.h"
+#include "core/or/edge_connection_st.h"
 
 
 /** Subtype of edge_connection_t for an "entry connection" -- that is, a SOCKS
 /** Subtype of edge_connection_t for an "entry connection" -- that is, a SOCKS
  * connection, a DNS request, a TransPort connection or a NATD connection */
  * connection, a DNS request, a TransPort connection or a NATD connection */

+ 1 - 1
src/or/entry_port_cfg_st.h → src/core/or/entry_port_cfg_st.h

@@ -8,7 +8,7 @@
 #define ENTRY_PORT_CFG_ST_H
 #define ENTRY_PORT_CFG_ST_H
 
 
 #include "lib/cc/torint.h"
 #include "lib/cc/torint.h"
-#include "or/or.h"
+#include "core/or/or.h"
 
 
 struct entry_port_cfg_t {
 struct entry_port_cfg_t {
   /* Client port types (socks, dns, trans, natd) only: */
   /* Client port types (socks, dns, trans, natd) only: */

+ 0 - 0
src/or/extend_info_st.h → src/core/or/extend_info_st.h


+ 2 - 3
src/or/git_revision.c → src/core/or/git_revision.c

@@ -3,15 +3,14 @@
  * Copyright (c) 2007-2018, The Tor Project, Inc. */
  * Copyright (c) 2007-2018, The Tor Project, Inc. */
 /* See LICENSE for licensing information */
 /* See LICENSE for licensing information */
 
 
-#include "or/git_revision.h"
+#include "core/or/git_revision.h"
 
 
 /** String describing which Tor Git repository version the source was
 /** String describing which Tor Git repository version the source was
  * built from.  This string is generated by a bit of shell kludging in
  * built from.  This string is generated by a bit of shell kludging in
- * src/or/include.am, and is usually right.
+ * src/core/include.am, and is usually right.
  */
  */
 const char tor_git_revision[] =
 const char tor_git_revision[] =
 #ifndef _MSC_VER
 #ifndef _MSC_VER
 #include "micro-revision.i"
 #include "micro-revision.i"
 #endif
 #endif
   "";
   "";
-

+ 0 - 0
src/or/git_revision.h → src/core/or/git_revision.h


+ 1 - 1
src/or/listener_connection_st.h → src/core/or/listener_connection_st.h

@@ -7,7 +7,7 @@
 #ifndef LISTENER_CONNECTION_ST_H
 #ifndef LISTENER_CONNECTION_ST_H
 #define LISTENER_CONNECTION_ST_H
 #define LISTENER_CONNECTION_ST_H
 
 
-#include "or/connection_st.h"
+#include "core/or/connection_st.h"
 
 
 /** Subtype of connection_t; used for a listener socket. */
 /** Subtype of connection_t; used for a listener socket. */
 struct listener_connection_t {
 struct listener_connection_t {

+ 1 - 1
src/or/or.h → src/core/or/or.h

@@ -69,7 +69,7 @@
 
 
 // These, more than other includes, are for keeping the other struct
 // These, more than other includes, are for keeping the other struct
 // definitions working. We should remove them when we minimize our includes.
 // definitions working. We should remove them when we minimize our includes.
-#include "or/entry_port_cfg_st.h"
+#include "core/or/entry_port_cfg_st.h"
 
 
 struct ed25519_public_key_t;
 struct ed25519_public_key_t;
 struct curve25519_public_key_t;
 struct curve25519_public_key_t;

+ 3 - 3
src/or/or_circuit_st.h → src/core/or/or_circuit_st.h

@@ -7,10 +7,10 @@
 #ifndef OR_CIRCUIT_ST_H
 #ifndef OR_CIRCUIT_ST_H
 #define OR_CIRCUIT_ST_H
 #define OR_CIRCUIT_ST_H
 
 
-#include "or/or.h"
+#include "core/or/or.h"
 
 
-#include "or/circuit_st.h"
-#include "or/crypt_path_st.h"
+#include "core/or/circuit_st.h"
+#include "core/or/crypt_path_st.h"
 
 
 struct onion_queue_t;
 struct onion_queue_t;
 
 

+ 1 - 1
src/or/or_connection_st.h → src/core/or/or_connection_st.h

@@ -7,7 +7,7 @@
 #ifndef OR_CONNECTION_ST_H
 #ifndef OR_CONNECTION_ST_H
 #define OR_CONNECTION_ST_H
 #define OR_CONNECTION_ST_H
 
 
-#include "or/connection_st.h"
+#include "core/or/connection_st.h"
 #include "lib/evloop/token_bucket.h"
 #include "lib/evloop/token_bucket.h"
 
 
 struct tor_tls_t;
 struct tor_tls_t;

+ 0 - 0
src/or/or_handshake_certs_st.h → src/core/or/or_handshake_certs_st.h


+ 0 - 0
src/or/or_handshake_state_st.h → src/core/or/or_handshake_state_st.h


+ 2 - 2
src/or/origin_circuit_st.h → src/core/or/origin_circuit_st.h

@@ -7,9 +7,9 @@
 #ifndef ORIGIN_CIRCUIT_ST_H
 #ifndef ORIGIN_CIRCUIT_ST_H
 #define ORIGIN_CIRCUIT_ST_H
 #define ORIGIN_CIRCUIT_ST_H
 
 
-#include "or/or.h"
+#include "core/or/or.h"
 
 
-#include "or/circuit_st.h"
+#include "core/or/circuit_st.h"
 
 
 struct onion_queue_t;
 struct onion_queue_t;
 
 

+ 18 - 18
src/or/policies.c → src/core/or/policies.c

@@ -17,27 +17,27 @@
 
 
 #define POLICIES_PRIVATE
 #define POLICIES_PRIVATE
 
 
-#include "or/or.h"
-#include "or/bridges.h"
-#include "or/config.h"
-#include "or/dirserv.h"
-#include "or/microdesc.h"
-#include "or/networkstatus.h"
-#include "or/nodelist.h"
-#include "or/policies.h"
-#include "or/router.h"
-#include "or/routerparse.h"
-#include "or/geoip.h"
+#include "core/or/or.h"
+#include "feature/client/bridges.h"
+#include "app/config/config.h"
+#include "feature/dircache/dirserv.h"
+#include "feature/nodelist/microdesc.h"
+#include "feature/nodelist/networkstatus.h"
+#include "feature/nodelist/nodelist.h"
+#include "core/or/policies.h"
+#include "feature/relay/router.h"
+#include "feature/nodelist/routerparse.h"
+#include "feature/stats/geoip.h"
 #include "ht.h"
 #include "ht.h"
 #include "lib/encoding/confline.h"
 #include "lib/encoding/confline.h"
 
 
-#include "or/addr_policy_st.h"
-#include "or/dir_server_st.h"
-#include "or/microdesc_st.h"
-#include "or/node_st.h"
-#include "or/port_cfg_st.h"
-#include "or/routerinfo_st.h"
-#include "or/routerstatus_st.h"
+#include "core/or/addr_policy_st.h"
+#include "feature/dirclient/dir_server_st.h"
+#include "feature/nodelist/microdesc_st.h"
+#include "feature/nodelist/node_st.h"
+#include "core/or/port_cfg_st.h"
+#include "feature/nodelist/routerinfo_st.h"
+#include "feature/nodelist/routerstatus_st.h"
 
 
 /** Policy that addresses for incoming SOCKS connections must match. */
 /** Policy that addresses for incoming SOCKS connections must match. */
 static smartlist_t *socks_policy = NULL;
 static smartlist_t *socks_policy = NULL;

+ 0 - 0
src/or/policies.h → src/core/or/policies.h


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio