-/**
@dir /app
@brief app: top-level entry point for Tor
The "app" directory has Tor's main entry point and configuration logic,
and is responsible for initializing and managing the other modules in
Tor.
-**/
-/**
@dir /app/config
@brief app/config: Top-level configuration code
Refactoring this module is a work in progress, see
[ticket 29211](https://trac.torproject.org/projects/tor/ticket/29211).
-**/
-/**
@dir /app/main
@brief app/main: Entry point for tor.
-**/
-/**
@dir /core
@brief core: main loop and onion routing functionality
- \refdir{core/or} -- Implements onion routing itself.
-**/
-/**
@dir /core/crypto
@brief core/crypto: Tor-specific cryptography
This module implements Tor's circuit-construction crypto and Tor's
relay crypto.
-**/
-/**
@dir /core/mainloop
@brief core/mainloop: Non-onion-routing mainloop functionality
without refactoring how the two modules call one another. Probably many
functions should be moved and refactored.
-**/
-/**
@dir core/or
@brief core/or: **Onion routing happens here!**
`scheduler.c`
: Decides which channel/circuit pair is ready to receive the next cell.
-**/
-/**
@tableofcontents
@page dataflow Data flow in the Tor process
(This logic applies to outgoing relay cells only; incoming relay cells
are processed as they arrive.)
-**/
-/**
@dir /core/proto
@brief core/proto: Protocol encoding/decoding
These functions should (but do not always) exist at a lower level than most
of the rest of core.
-**/
-/**
@dir /feature/api
@brief feature/api: In-process interface to starting/stopping Tor.
-**/
-/**
@dir /feature/client
@brief feature/client: Client-specific code
(There is also a bunch of client-specific code in other modules.)
-**/
-/**
@dir /feature/control
@brief feature/control: Controller API.
Tor while it is running. The current protocol is documented in
[control-spec.txt](https://gitweb.torproject.org/torspec.git/tree/control-spec.txt).
-**/
-/**
@dir /feature/dirauth
@brief feature/dirauth: Directory authority implementation.
[dir-spec.txt](https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt).
-**/
-/**
@dir /feature/dircache
@brief feature/dircache: Run as a directory cache server
This module handles the directory caching functionality that all relays may
provide, for serving cached directory objects to objects.
-**/
-/**
@dir /feature/dirclient
@brief feature/dirclient: Directory client implementation.
information. Currently, that is all of them, since even authorities need to
launch downloads to learn about relays that other authorities have listed.
-**/
-/**
@dir /feature/dircommon
@brief feature/dircommon: Directory client and server shared code
information about relays) and directory servers (anybody who serves such
information) share in common.
-**/
-/**
@dir /feature/dirparse
@brief feature/dirparse: Parsing Tor directory objects
all of them using a common line-oriented meta-format. This module is used by
other parts of Tor to parse them.
-**/
-/**
@dir /feature
@brief feature: domain-specific modules
role or service, such as maintaining/using an onion service, operating as a
relay or a client, or being a directory authority.
-**/
-/**
@dir /feature/hibernate
@brief feature/hibernate: Bandwidth accounting and hibernation (!)
almost out of ) is very close to the "shutting down" state. But it would be
better in the long run to make the two completely separate.
-**/
-/**
@dir /feature/hs
@brief feature/hs: v3 (current) onion service protocol
[rend-spec-v3.txt](https://gitweb.torproject.org/torspec.git/tree/rend-spec-v3.txt).
-**/
-/**
@dir /feature/hs_common
@brief feature/hs_common: Common to v2 (old) and v3 (current) onion services
-**/
-/**
@dir /feature/keymgt
@brief feature/keymgt: Store keys for relays, authorities, etc.
-**/
-/**
@dir /feature/nodelist
@brief feature/nodelist: Download and manage a list of relays
-**/
-/**
@dir /feature/relay
@brief feature/relay: Relay-specific code
(There is also a bunch of relay-specific code in other modules.)
-**/
-/**
@dir /feature/rend
@brief feature/rend: version 2 (old) hidden services
as specified in
[rend-spec-v2.txt](https://gitweb.torproject.org/torspec.git/tree/rend-spec-v2.txt).
-**/
-/**
@dir /feature/stats
@brief feature/stats: Relay statistics. Also, port prediction.
visited recently as a client, so we can make sure we have open circuits that
support them.
-**/
-/**
@dir /lib/arch
@brief lib/arch: Compatibility code for handling different CPU architectures.
-**/
-/**
@dir /lib/buf
@brief lib/buf: An efficient byte queue.
See \refdir{lib/net} for networking code that uses buf_t, and
\refdir{lib/tls} for cryptographic code that uses buf_t.
-**/
-/**
@dir /lib/cc
@brief lib/cc: Macros for managing the C compiler and language.
-**/
-/**
@dir /lib/compress
@brief lib/compress: Wraps several compression libraries
Currently supported are zlib (mandatory), zstd (optional), and lzma
(optional).
-**/
-/**
@dir /lib/conf
@brief lib/conf: Types and macros for declaring configuration options.
-**/
-/**
@dir /lib/confmgt
@brief lib/confmgt: Parse, encode, manipulate configuration files.
configuration files (config.c) to manage a set of named, typed fields,
reading and writing them to disk and to the controller.
-**/
-/**
@dir /lib/container
@brief lib/container: Hash tables, dynamic arrays, bit arrays, etc.
<!-- TODO: WRITE about bloom filters, namemaps, bit-arrays, order functions.
-->
-**/
-/**
@page certificates Certificates in Tor.
consider these documents to be an additional kind of certificate if you
want.)
-**/
-/**
@dir /lib/crypt_ops
@brief lib/crypt_ops: Cryptographic operations.
and crypto_unpwbox functions do so in a way that's likely to be
readable by future versions of Tor.
-**/
-/**
@dir /lib/ctime
@brief lib/ctime: Constant-time code to avoid side-channels.
doesn't need to be constant-time to use the fast_memeq() / fast_memneq() /
fast_memcmp() aliases instead.
-**/
-/**
@dir /lib/defs
@brief lib/defs: Lowest-level constants, used in many places.
-**/
-/**
@dir /lib/dispatch
@brief lib/dispatch: In-process message delivery.
to from more sophisticated architectures: this dispatcher is intended only
for use in improving Tor's architecture.
-**/
-/**
@dir /lib/encoding
@brief lib/encoding: Encoding data in various forms, types, and transformations
Here we have time formats (timefmt.c), quoted strings (qstring.c), C strings
(string.c) base-16/32/64 (binascii.c), and more.
-**/
-/**
@dir /lib/err
@brief lib/err: Lowest-level error handling code.
* Code that needs signal-safe error reporting.
* Higher-level error handling code.
-**/
-/**
@dir /lib/evloop
@brief lib/evloop: Low-level event loop.
loop and related functionality, in order to implement asynchronous
networking, timers, periodic events, and other scheduling tasks.
-**/
-/**
@page time_periodic Time and periodic events in Tor
implementation as its backend, which is based on a hierarchical timing
wheel algorithm. It's cool stuff; check it out.)
-**/
-/**
@dir /lib/fdio
@brief lib/fdio: Code to read/write on file descriptors.
(This module also handles sockets, on platforms where a socket is not a kind
of fd.)
-**/
-/**
@dir /lib/fs
@brief lib/fs: Files, filenames, directories, etc.
It also contains a set of convenience functions for safely writing to files,
creating directories, and so on.
-**/
-/**
@dir /lib/geoip
@brief lib/geoip: IP-to-country mapping
-**/
-/**
@dir /lib/intmath
@brief lib/intmath: Integer mathematics.
-**/
-/**
@dir /lib
@brief lib: low-level functionality.
issues among platforms, you should probably consider whether you can
put your code into lib.
-**/
-/**
@dir /lib/lock
@brief lib/lock: Simple locking support.
This module is more low-level than the rest of the threading code, since it
is needed by more intermediate-level modules.
-**/
-/**
@dir /lib/log
@brief lib/log: Log messages to files, syslogs, etc.
depends on it.
-**/
-/**
@dir /lib/malloc
@brief lib/malloc: Wrappers and utilities for memory management.
#define x_free(ptr) FREE_AND_NULL(x_t, x_free_, (ptr))
```
-**/
-/**
@dir /lib/math
@brief lib/math: Floating-point math utilities.
This module includes a bunch of floating-point compatibility code, and
implementations for several probability distributions.
-**/
-/**
@dir /lib/memarea
@brief lib/memarea: A fast arena-style allocator.
to the similarly-named malloc() functions. There is intentionally no
`memarea_free()` or `memarea_realloc()`.
-**/
-/**
@dir /lib/meminfo
@brief lib/meminfo: Inspecting malloc() usage.
Only available when malloc() provides mallinfo() or something similar.
-**/
-/**
@dir /lib/net
@brief lib/net: Low-level network-related code.
This module includes address manipulation, compatibility wrappers,
convenience functions, and so on.
-**/
-/**
@dir /lib/osinfo
@brief lib/osinfo: For inspecting the OS version and capabilities.
these checks: instead, we should have more specific checks, either at compile
time or run time, based on the observed system behavior.
-**/
-/**
@dir /lib/process
@brief lib/process: Launch and manage subprocesses.
-**/
-/**
@dir /lib/pubsub
@brief lib/pubsub: Publish-subscribe message passing.
See pubsub.c for more information.
-**/
-/**
@dir /lib/sandbox
@brief lib/sandbox: Linux seccomp2-based sandbox.
calls (like open()) in another, less restricted process, and give that
process responsibility for enforcing our sandbox rules.
-**/
-/**
@dir /lib/smartlist_core
@brief lib/smartlist_core: Minimal dynamic array implementation
the ones in lib/smartlist_core are used by the logging code, and therefore
cannot use the logging code.
-**/
-/**
@dir /lib/string
@brief lib/string: Low-level string manipulation.
Any string function high-level enough to need logging belongs in a
higher-level module.
-**/
-/**
@page strings String processing in Tor
-/**
@page initialization Initialization and shutdown
-**/
-/**
@dir /lib/subsys
@brief lib/subsys: Types for declaring a "subsystem".
these to subsystems over time; please don't add any new code that follows
this pattern.
-**/
-/**
@dir /lib/term
@brief lib/term: Terminal operations (password input).
-**/
-/**
@dir /lib/testsupport
@brief lib/testsupport: Helpers for test-only code and for function mocking.
-**/
-/**
@dir /lib/thread
@brief lib/thread: Mid-level threading.
except for low-level locks (which are in \refdir{lib/lock} and
workqueue/threadpool code (which belongs in \refdir{lib/evloop}.)
-**/
-/**
@page threading Threading in Tor
make the worker "own" all the data it needs while the work is in
progress, and to give up ownership when it's complete.
-**/
-/**
@dir /lib/time
@brief lib/time: Higher-level time functions
For "what time is it" in UTC, see \refdir{lib/wallclock}. For parsing and
encoding times and dates, see \refdir{lib/encoding}.
-**/
-/**
@dir /lib/tls
@brief lib/tls: TLS library wrappers
support in old versions of Tor, involving conditional delivery of certificate
chains (v1 link protocol) and conditional renegotiation (v2 link protocol).
-**/
-/**
@dir /lib/trace
@brief lib/trace: Function-tracing functionality API.
This module is used for adding "trace" support (low-granularity function
logging) to Tor. Right now it doesn't have many users.
-**/
-/**
@dir /lib/version
@brief lib/version: holds the current version of Tor.
-**/
-/**
@dir /lib/wallclock
@brief lib/wallclock: Inspect and manipulate the current time.
accurate, see \refdir{lib/time}. For parsing and encoding times and dates,
see \refdir{lib/encoding}.
-**/
-/**
@mainpage Tor source reference
@tableofcontents
@subpage time_periodic
-**/
-/**
@page intro A high-level overview
@tableofcontents
A 'Node' (node_t) is a view of a Tor instance's current knowledge and opinions
about a Tor relay or bridge.
-**/
-/**
@dir /tools
@brief tools: other command-line tools for use with Tor.
The "tools" directory has a few other programs that use Tor, but are not part
of the main Tor binary.
-**/