mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
doc/HACKING/design: address comments from ahf
This commit is contained in:
parent
358436592b
commit
1332d3b6fa
@ -56,38 +56,38 @@ will be scheduled.
|
|||||||
The codebase is divided into a few top-level subdirectories, each of
|
The codebase is divided into a few top-level subdirectories, each of
|
||||||
which contains several sub-modules.
|
which contains several sub-modules.
|
||||||
|
|
||||||
src/ext -- Code maintained elsewhere that we include in the Tor
|
* `src/ext` -- Code maintained elsewhere that we include in the Tor
|
||||||
source distribution.
|
source distribution.
|
||||||
|
|
||||||
src/lib -- Lower-level utility code, not necessarily tor-specific.
|
* src/lib` -- Lower-level utility code, not necessarily tor-specific.
|
||||||
|
|
||||||
src/trunnel -- Automatically generated code (from the Trunnel)
|
* `src/trunnel` -- Automatically generated code (from the Trunnel
|
||||||
tool: used to parse and encode binary formats.
|
tool): used to parse and encode binary formats.
|
||||||
|
|
||||||
src/core -- Networking code that is implements the central parts of
|
* `src/core` -- Networking code that is implements the central parts of
|
||||||
the Tor protocol and main loop.
|
the Tor protocol and main loop.
|
||||||
|
|
||||||
src/feature -- Aspects of Tor (like directory management, running a
|
* `src/feature` -- Aspects of Tor (like directory management, running a
|
||||||
relay, running a directory authorities, managing a list of nodes,
|
relay, running a directory authorities, managing a list of nodes,
|
||||||
running and using onion services) that are built on top of the
|
running and using onion services) that are built on top of the
|
||||||
mainloop code.
|
mainloop code.
|
||||||
|
|
||||||
src/app -- Highest-level functionality; responsible for setting up
|
* `src/app` -- Highest-level functionality; responsible for setting up
|
||||||
and configuring the Tor project, making sure all the lower-level
|
and configuring the Tor daemon, making sure all the lower-level
|
||||||
modules start up when required, and so on.
|
modules start up when required, and so on.
|
||||||
|
|
||||||
src/tools -- Binaries other than Tor that we produce. Currently this
|
* `src/tools` -- Binaries other than Tor that we produce. Currently this
|
||||||
is tor-resolve, tor-gencert, and the tor_runner.o helper module.
|
is tor-resolve, tor-gencert, and the tor_runner.o helper module.
|
||||||
|
|
||||||
src/test -- unit tests, regression tests, and a few integration
|
* `src/test` -- unit tests, regression tests, and a few integration
|
||||||
tests.
|
tests.
|
||||||
|
|
||||||
In theory, the above parts of the codebase are sorted from highest-level
|
In theory, the above parts of the codebase are sorted from highest-level to
|
||||||
to lowest-level, where high-level code is only allowed to invoke
|
lowest-level, where high-level code is only allowed to invoke lower-level
|
||||||
lower-level code, and lower-level code never includes or depends on code
|
code, and lower-level code never includes or depends on code of a higher
|
||||||
of a higher level. In practice, this refactoring is incomplete: The
|
level. In practice, this refactoring is incomplete: The modules in `src/lib`
|
||||||
modules in src/lib are well-factored, but there are many "upward
|
are well-factored, but there are many layer violations ("upward
|
||||||
dependencies" in src/core and src/feature. We aim to eliminate those
|
dependencies") in `src/core` and `src/feature`. We aim to eliminate those
|
||||||
over time.
|
over time.
|
||||||
|
|
||||||
### Some key high-level abstractions ###
|
### Some key high-level abstractions ###
|
||||||
|
@ -85,9 +85,9 @@ level):
|
|||||||
code is specifically written to avoid having to log, because the
|
code is specifically written to avoid having to log, because the
|
||||||
logging module depends on it.
|
logging module depends on it.
|
||||||
|
|
||||||
* `lib/container` -- General purpose containers, including dynamic arrays,
|
* `lib/container` -- General purpose containers, including dynamic arrays
|
||||||
hashtables, bit arrays, weak-reference-like "handles", bloom
|
("smartlists"), hashtables, bit arrays, weak-reference-like "handles",
|
||||||
filters, and a bit more.
|
bloom filters, and a bit more.
|
||||||
|
|
||||||
* `lib/trace` -- A general-purpose API for introducing
|
* `lib/trace` -- A general-purpose API for introducing
|
||||||
function-tracing functionality into Tor. Currently not much used.
|
function-tracing functionality into Tor. Currently not much used.
|
||||||
|
Loading…
Reference in New Issue
Block a user