| ▼ app | App: top-level entry point for Tor |
| ► config | App/config: Top-level configuration code |
| auth_dirs.inc | |
| config.c | Code to interpret the user's configuration of Tor |
| config.h | Header file for config.c |
| fallback_dirs.inc | |
| or_options_st.h | The or_options_t structure, which represents Tor's configuration |
| or_state_st.h | The or_state_t structure, which represents Tor's state file |
| quiet_level.c | Code to handle default logging level (quiet/hush/normal) |
| quiet_level.h | Declare the quiet_level enumeration and global |
| resolve_addr.c | Implement resolving address functions |
| resolve_addr.h | Header file for resolve_addr.c |
| statefile.c | Handles parsing and encoding the persistent 'state' file that carries miscellaneous persistent state between Tor invocations |
| statefile.h | Header for statefile.c |
| testnet.inc | |
| tor_cmdline_mode.h | Declare the tor_cmdline_mode_t enumeration |
| ► main | App/main: Entry point for tor |
| main.c | Invocation module. Initializes subsystems and runs the main loop |
| main.h | Header file for main.c |
| ntmain.c | Entry points for running/configuring Tor as a Windows Service |
| ntmain.h | Header file for ntmain.c |
| risky_options.c | List compile-time options that might make Tor less reliable |
| risky_options.h | Header for risky_options.c |
| shutdown.c | Code to free global resources used by Tor |
| shutdown.h | Header file for shutdown.c |
| subsysmgr.c | Manager for Tor's subsystems |
| subsysmgr.h | Header for subsysmgr.c |
| subsystem_list.c | List of Tor's subsystems |
| tor_main.c | Stub module containing a main() function |
| ▼ core | Core: main loop and onion routing functionality |
| ► crypto | Core/crypto: Tor-specific cryptography |
| hs_ntor.c | Implements the ntor variant used in Tor hidden services |
| hs_ntor.h | Header for hs_ntor.c |
| onion_crypto.c | Functions to handle different kinds of circuit extension crypto |
| onion_crypto.h | Header file for onion_crypto.c |
| onion_fast.c | Functions implement the CREATE_FAST circuit handshake |
| onion_fast.h | Header file for onion_fast.c |
| onion_ntor.c | Implementation for the ntor handshake |
| onion_ntor.h | Header for onion_ntor.c |
| onion_tap.c | Functions to implement the original Tor circuit extension handshake (a.k.a TAP) |
| onion_tap.h | Header file for onion_tap.c |
| relay_crypto.c | |
| relay_crypto.h | Header for relay_crypto.c |
| ► mainloop | Core/mainloop: Non-onion-routing mainloop functionality |
| connection.c | General high-level functions to handle reading and writing on connections |
| connection.h | Header file for connection.c |
| cpuworker.c | Uses the workqueue/threadpool code to farm CPU-intensive activities out to subprocesses |
| cpuworker.h | Header file for cpuworker.c |
| mainloop.c | Toplevel module. Handles signals, multiplexes between connections, implements main loop, and drives scheduled events |
| mainloop.h | Header file for mainloop.c |
| mainloop_pubsub.c | Connect the publish-subscribe code to the main-loop |
| mainloop_pubsub.h | Header for mainloop_pubsub.c |
| mainloop_state.inc | Declare configuration options for the crypto_ops module |
| mainloop_state_st.h | Declare a state structure for mainloop-relevant fields |
| mainloop_sys.c | Declare the "mainloop" subsystem |
| mainloop_sys.h | Header for mainloop_sys.c |
| netstatus.c | Track whether the network is disabled, dormant, etc |
| netstatus.h | Header for netstatus.c |
| periodic.c | Generic backend for handling periodic events |
| periodic.h | Header for periodic.c |
| ► or | Core/or: Onion routing happens here! |
| addr_policy_st.h | Address policy structures |
| address_set.c | Implementation for a set of addresses |
| address_set.h | Types to handle sets of addresses |
| cell_queue_st.h | Cell queue structures |
| cell_st.h | Fixed-size cell structure |
| channel.c | OR/OP-to-OR channel abstraction layer. A channel's job is to transfer cells from Tor instance to Tor instance. Currently, there is only one implementation of the channel abstraction: in channeltls.c |
| channel.h | Header file for channel.c |
| channelpadding.c | Link-level padding code |
| channelpadding.h | |
| channeltls.c | A concrete subclass of channel_t using or_connection_t to transfer cells between Tor instances |
| channeltls.h | Header file for channeltls.c |
| circuit_st.h | Base circuit structure |
| circuitbuild.c | Implements the details of building circuits (by choosing paths, constructing/sending create/extend cells, and so on) |
| circuitbuild.h | Header file for circuitbuild.c |
| circuitlist.c | Manage global structures that list and index circuits, and look up circuits within them |
| circuitlist.h | Header file for circuitlist.c |
| circuitmux.c | Circuit mux/cell selection abstraction |
| circuitmux.h | Header file for circuitmux.c |
| circuitmux_ewma.c | EWMA circuit selection as a circuitmux_t policy |
| circuitmux_ewma.h | Header file for circuitmux_ewma.c |
| circuitpadding.c | Circuit-level padding implementation |
| circuitpadding.h | Header file for circuitpadding.c |
| circuitpadding_machines.c | Circuit padding state machines |
| circuitpadding_machines.h | Header file for circuitpadding_machines.c |
| circuitstats.c | Maintains and analyzes statistics about circuit built times, so we can tell how long we may need to wait for a fast circuit to be constructed |
| circuitstats.h | Header file for circuitstats.c |
| circuituse.c | Launch the right sort of circuits and attach the right streams to them |
| circuituse.h | Header file for circuituse.c |
| command.c | Functions for processing incoming cells |
| command.h | Header file for command.c |
| connection_edge.c | Handle edge streams |
| connection_edge.h | Header file for connection_edge.c |
| connection_or.c | Functions to handle OR connections, TLS handshaking, and cells on the network |
| connection_or.h | Header file for connection_or.c |
| connection_st.h | Base connection structure |
| cpath_build_state_st.h | Circuit-build-stse structure |
| crypt_path.c | Functions dealing with layered circuit encryption. This file aims to provide an API around the crypt_path_t structure which holds crypto information about a specific hop of a circuit |
| crypt_path.h | Header file for crypt_path.c |
| crypt_path_reference_st.h | Reference-counting structure for crypt_path_t |
| crypt_path_st.h | Path structures for origin circuits |
| destroy_cell_queue_st.h | Destroy-cell queue structures |
| dos.c | |
| dos.h | |
| dos_config.c | Code to interpret the user's configuration of DoS module |
| dos_config.h | Header for core/or/dos_config.c |
| dos_options.inc | Declare configuration options for the DoS module |
| dos_options_st.h | Structure dos_options_t to hold options for the DoS subsystem |
| dos_sys.c | Subsystem definitions for DOS module |
| dos_sys.h | Header for core/or/dos_sys.c |
| edge_connection_st.h | Edge-connection structure |
| entry_connection_st.h | Entry connection structure |
| entry_port_cfg_st.h | Configuration structure for client ports |
| extend_info_st.h | Extend-info structure |
| extendinfo.c | Functions for creating and using extend_info_t objects |
| extendinfo.h | Header for core/or/extendinfo.c |
| half_edge_st.h | Half-open connection structure |
| listener_connection_st.h | Listener connection structure |
| lttng_circuit.inc | LTTng tracing probe declaration for the circuit subsystem. It is in this .inc file due to the non C standard syntax and the way we guard the header with the LTTng specific TRACEPOINT_HEADER_MULTI_READ |
| ocirc_event.c | Publish state change messages for origin circuits |
| ocirc_event.h | Header file for ocirc_event.c |
| onion.c | Functions to queue create cells, and parse and create the CREATE cell and its allies |
| onion.h | Header file for onion.c |
| or.h | Master header file for Tor-specific functionality |
| or_circuit_st.h | |
| or_connection_st.h | OR connection structure |
| or_handshake_certs_st.h | OR handshake certs structure |
| or_handshake_state_st.h | OR handshake state structure |
| or_periodic.c | Periodic callbacks for the onion routing subsystem |
| or_periodic.h | Header for core/or/or_periodic.c |
| or_sys.c | Subsystem definitions for OR module |
| or_sys.h | Header for core/or/or_sys.c |
| orconn_event.c | Publish state change messages for OR connections |
| orconn_event.h | Header file for orconn_event.c |
| origin_circuit_st.h | Origin circuit structure |
| policies.c | Code to parse and use address policies and exit policies |
| policies.h | Header file for policies.c |
| port_cfg_st.h | Listener port configuration structure |
| protover.c | Versioning information for different pieces of the Tor protocol |
| protover.h | Headers and type declarations for protover.c |
| protover_rust.c | |
| reasons.c | Convert circuit, stream, and orconn error reasons to and/or from strings and errno values |
| reasons.h | Header file for reasons.c |
| relay.c | Handle relay cell encryption/decryption, plus packaging and receiving from circuits, plus queuing on circuits |
| relay.h | Header file for relay.c |
| relay_crypto_st.h | Relay-cell encryption state structure |
| scheduler.c | Channel scheduling system: decides which channels should send and receive when |
| scheduler.h | Header file for scheduler*.c |
| scheduler_kist.c | Implements the KIST cell scheduler |
| scheduler_vanilla.c | "Vanilla" (pre-KIST) cell scheduler code |
| sendme.c | Code that is related to SENDME cells both in terms of creating/parsing cells and handling the content |
| sendme.h | Header file for sendme.c |
| server_port_cfg_st.h | Configuration structure for server ports |
| socks_request_st.h | Client request structure |
| status.c | Collect status information and log heartbeat messages |
| status.h | Header for status.c |
| tor_version_st.h | Parsed Tor version structure |
| trace_probes_circuit.c | Tracepoint provider source file for the circuit subsystem. Probes are generated within this C file for LTTng-UST |
| trace_probes_circuit.h | |
| var_cell_st.h | Variable-length cell structure |
| versions.c | Code to manipulate, parse, and compare Tor versions |
| versions.h | Header file for versions.c |
| ► proto | Core/proto: Protocol encoding/decoding |
| proto_cell.c | Decodes Tor cells from buffers |
| proto_cell.h | Header for proto_cell.c |
| proto_control0.c | Code to detect the obsolete v0 control protocol |
| proto_control0.h | Header for proto_control0.c |
| proto_ext_or.c | Parsing/encoding for the extended OR protocol |
| proto_ext_or.h | Header for proto_ext_or.c |
| proto_haproxy.c | |
| proto_haproxy.h | |
| proto_http.c | Parse a subset of the HTTP protocol |
| proto_http.h | Header for proto_http.c |
| proto_socks.c | Implementations for SOCKS4 and SOCKS5 protocols |
| proto_socks.h | Header for proto_socks.c |
| ▼ ext | Externally maintained code |
| ► curve25519_donna | |
| curve25519-donna-c64.c | |
| curve25519-donna.c | |
| ► keccak-tiny | |
| keccak-tiny-unrolled.c | |
| keccak-tiny.c | |
| keccak-tiny.h | |
| ► mulodi | |
| mulodi4.c | |
| ► timeouts | |
| ► bench | |
| bench-heap.c | |
| bench-llrb.c | |
| bench-wheel.c | |
| bench.c | |
| bench.h | |
| ► lua | |
| timeout-lua.c | |
| test-timeout.c | |
| timeout-bitops.c | |
| timeout-debug.h | |
| timeout.c | |
| timeout.h | |
| ► trunnel | |
| trunnel-impl.h | |
| trunnel.c | |
| trunnel.h | |
| byteorder.h | |
| csiphash.c | |
| getdelim.c | |
| ht.h | |
| OpenBSD_malloc_Linux.c | |
| readpassphrase.c | |
| siphash.h | |
| strlcat.c | |
| strlcpy.c | |
| tinytest.c | |
| tinytest.h | |
| tinytest_demo.c | |
| tinytest_macros.h | |
| tor_queue.h | |
| tor_readpassphrase.h | |
| ▼ feature | Feature: domain-specific modules |
| ► api | Feature/api: In-process interface to starting/stopping Tor |
| tor_api.c | |
| tor_api.h | Public C API for the Tor network service |
| tor_api_internal.h | Internal declarations for in-process Tor API |
| ► client | Feature/client: Client-specific code |
| addressmap.c | The addressmap module manages the processes by which we rewrite addresses in client requess. It handles the MapAddress controller and torrc commands, and the TrackHostExits feature, and the client-side DNS cache (deprecated) |
| addressmap.h | Header for addressmap.c |
| bridges.c | Code to manage bridges and bridge selection |
| bridges.h | Header file for circuitbuild.c |
| circpathbias.c | Code to track success/failure rates of circuits built through different tor nodes, in an attempt to detect attacks where an attacker deliberately causes circuits to fail until the client choses a path they like |
| circpathbias.h | |
| dnsserv.c | Implements client-side DNS proxy server code |
| dnsserv.h | Header file for dnsserv.c |
| entrynodes.c | Code to manage our fixed first nodes for various functions |
| entrynodes.h | Header file for circuitbuild.c |
| proxymode.c | Determine whether we are trying to be a proxy |
| proxymode.h | Header file for proxymode.c |
| transports.c | Pluggable Transports related code |
| transports.h | Headers for transports.c |
| ► control | Feature/control: Controller API |
| btrack.c | Bootstrap trackers |
| btrack_circuit.c | Bootstrap tracker for origin circuits |
| btrack_circuit.h | Header file for btrack_circuit.c |
| btrack_orconn.c | Bootstrap tracker for OR connections |
| btrack_orconn.h | Header file for btrack_orconn.c |
| btrack_orconn_cevent.c | Emit bootstrap status events for OR connections |
| btrack_orconn_cevent.h | Header file for btrack_orconn_cevent.c |
| btrack_orconn_maps.c | Hash map implementation for btrack_orconn.c |
| btrack_orconn_maps.h | Header file for btrack_orconn_maps.c |
| btrack_sys.h | Declare subsystem object for the bootstrap tracker susbystem |
| control.c | Implementation for Tor's control-socket interface |
| control.h | Header file for control.c |
| control_auth.c | Authentication for Tor's control-socket interface |
| control_auth.h | Header file for control_auth.c |
| control_bootstrap.c | Provide bootstrap progress events for the control port |
| control_cmd.c | Implement various commands for Tor's control-socket interface |
| control_cmd.h | Header file for control_cmd.c |
| control_cmd_args_st.h | Definition for control_cmd_args_t |
| control_connection_st.h | Controller connection structure |
| control_events.c | Implement the event-reporting part of the controller API |
| control_events.h | Header file for control_events.c |
| control_fmt.c | Formatting functions for controller data |
| control_fmt.h | Header file for control_fmt.c |
| control_getinfo.c | Implementation for miscellaneous controller getinfo commands |
| control_getinfo.h | |
| control_hs.c | Implement commands for Tor's control-socket interface that are related to onion services |
| control_hs.h | |
| control_proto.c | Formatting functions for controller data |
| control_proto.h | Header file for control_proto.c |
| getinfo_geoip.c | GEOIP-related controller GETINFO commands |
| getinfo_geoip.h | Header for getinfo_geoip.c |
| ► dirauth | Feature/dirauth: Directory authority implementation |
| authmode.c | What kind of directory authority are we? |
| authmode.h | Header file for directory authority mode |
| bridgeauth.c | Bridge authority code |
| bridgeauth.h | Header for bridgeauth.c |
| bwauth.c | Code to read and apply bandwidth authority data |
| bwauth.h | Header file for bwauth.c |
| dirauth_config.c | Code to interpret the user's configuration of Tor's directory authority module |
| dirauth_config.h | Header for feature/dirauth/dirauth_config.c |
| dirauth_options.inc | Declare configuration options for the crypto_ops module |
| dirauth_options_st.h | Structure dirauth_options_t to hold directory authority options |
| dirauth_periodic.c | Peridoic events for directory authorities |
| dirauth_periodic.h | Header for dirauth_periodic.c |
| dirauth_stub.c | Stub declarations for use when dirauth module is disabled |
| dirauth_sys.c | Directory authority subsystem declarations |
| dirauth_sys.h | Header for dirauth_sys.c |
| dircollate.c | Collation code for figuring out which identities to vote for in the directory voting process |
| dircollate.h | Header file for dircollate.c |
| dirvote.c | Functions to compute directory consensus, and schedule voting |
| dirvote.h | Header file for dirvote.c |
| dsigs_parse.c | |
| dsigs_parse.h | Code to parse and validate detached-signature objects |
| guardfraction.c | |
| guardfraction.h | Header file for guardfraction.c |
| keypin.c | Functions and structures for associating routers' RSA key fingerprints with their ED25519 keys |
| keypin.h | Header for keypin.c |
| ns_detached_signatures_st.h | Detached consensus signatures structure |
| process_descs.c | Make decisions about uploaded descriptors |
| process_descs.h | Header file for process_descs.c |
| reachability.c | Router reachability testing; run by authorities to tell who is running |
| reachability.h | Header file for reachability.c |
| recommend_pkg.c | Code related to the recommended-packages subsystem |
| recommend_pkg.h | Header file for recommend_pkg.c |
| shared_random.c | Functions and data structure needed to accomplish the shared random protocol as defined in proposal #250 |
| shared_random.h | This file contains ABI/API of the shared random protocol defined in proposal #250. Every public functions and data structure are namespaced with "sr_" which stands for shared random |
| shared_random_state.c | Functions and data structures for the state of the random protocol as defined in proposal #250 |
| shared_random_state.h | Header for shared_random_state.c |
| vote_microdesc_hash_st.h | Microdescriptor-hash voting structure |
| voteflags.c | Authority code for deciding the performance thresholds for flags, and assigning flags to routers |
| voteflags.h | Header file for voteflags.c |
| voting_schedule.c | Compute information about our voting schedule as a directory authority |
| voting_schedule.h | Header file for voting_schedule.c |
| ► dircache | Feature/dircache: Run as a directory cache server |
| cached_dir_st.h | Cached large directory object structure |
| conscache.c | Consensus and diff on-disk cache |
| conscache.h | Header for conscache.c |
| consdiffmgr.c | Consensus diff manager functions |
| consdiffmgr.h | Header for consdiffmgr.c |
| dircache.c | Cache directories and serve them to clients |
| dircache.h | Header file for dircache.c |
| dircache_stub.c | Stub declarations for use when dircache module is disabled |
| dirserv.c | Directory server core implementation. Manages directory contents and generates directory documents |
| dirserv.h | Header file for dirserv.c |
| ► dirclient | Feature/dirclient: Directory client implementation |
| dir_server_st.h | Trusted/fallback directory server structure |
| dirclient.c | Download directory information |
| dirclient.h | Header file for dirclient.c |
| dirclient_modes.c | Functions to answer questions about how we'd like to behave as a directory client |
| dirclient_modes.h | Header for feature/dirclient/dirclient_modes.c |
| dlstatus.c | Track status and retry schedule of a downloadable object |
| dlstatus.h | Header file for dlstatus.c |
| download_status_st.h | Directory download status/schedule structure |
| ► dircommon | Feature/dircommon: Directory client and server shared code |
| consdiff.c | Consensus diff implementation, including both the generation and the application of diffs in a minimal ed format |
| consdiff.h | Header for consdiff.c |
| dir_connection_st.h | Client/server directory connection structure |
| directory.c | Code to send and fetch information from directory authorities and caches via HTTP |
| directory.h | Header file for directory.c |
| fp_pair.c | Manages data structures for associating pairs of fingerprints. Used to handle combinations of identity/signing-key fingerprints for authorities |
| fp_pair.h | Header file for fp_pair.c |
| vote_timing_st.h | Directory voting schedule structure |
| ► dirparse | Feature/dirparse: Parsing Tor directory objects |
| authcert_members.h | List of tokens common to V3 authority certificates and V3 consensuses |
| authcert_parse.c | Authority certificate parsing |
| authcert_parse.h | Header file for authcert_parse.c |
| microdesc_parse.c | Code to parse and validate microdescriptors |
| microdesc_parse.h | Header file for microdesc_parse.c |
| ns_parse.c | |
| ns_parse.h | Header file for ns_parse.c |
| parsecommon.c | Common code to parse and validate various type of descriptors |
| parsecommon.h | Header file for parsecommon.c |
| policy_parse.c | Code to parse address policies |
| policy_parse.h | Header file for policy_parse.c |
| routerparse.c | Code to parse and validate consensus documents and votes |
| routerparse.h | Header file for routerparse.c |
| sigcommon.c | Shared hashing, signing, and signature-checking code for directory objects |
| sigcommon.h | Header file for sigcommon.c |
| signing.c | Code to sign directory objects |
| signing.h | Header file for signing.c |
| unparseable.c | Dump unparseable objects to disk |
| unparseable.h | Header file for unparseable.c |
| ► hibernate | Feature/hibernate: Bandwidth accounting and hibernation (!) |
| hibernate.c | Functions to close listeners, stop allowing new circuits, etc in preparation for closing down or going dormant; and to track bandwidth and time intervals to know when to hibernate and when to stop hibernating |
| hibernate.h | Header file for hibernate.c |
| ► hs | Feature/hs: v3 (current) onion service protocol |
| hs_cache.c | Handle hidden service descriptor caches |
| hs_cache.h | Header file for hs_cache.c |
| hs_cell.c | Hidden service API for cell creation and handling |
| hs_cell.h | Header file containing cell data for the whole HS subsystem |
| hs_circuit.c | |
| hs_circuit.h | Header file containing circuit data for the whole HS subsystem |
| hs_circuitmap.c | Hidden service circuitmap: A hash table that maps binary tokens to introduction and rendezvous circuits; it's used: (a) by relays acting as intro points and rendezvous points (b) by hidden services to find intro and rend circuits and (c) by HS clients to find rendezvous circuits |
| hs_circuitmap.h | Header file for hs_circuitmap.c |
| hs_client.c | Implement next generation hidden service client functionality |
| hs_client.h | Header file containing client data for the HS subsystem |
| hs_common.c | Contains code shared between different HS protocol version as well as useful data structures and accessors used by other subsystems |
| hs_common.h | Header file containing common data for the whole HS subsystem |
| hs_config.c | Implement hidden service configuration subsystem |
| hs_config.h | Header file containing configuration ABI/API for the HS subsystem |
| hs_control.c | Contains control port event related code |
| hs_control.h | Header file containing control port event related code |
| hs_descriptor.c | Handle hidden service descriptor encoding/decoding |
| hs_descriptor.h | Header file for hs_descriptor.c |
| hs_dos.c | Implement denial of service mitigation for the onion service subsystem |
| hs_dos.h | Header file containing denial of service defenses for the HS subsystem for all versions |
| hs_ident.c | Contains circuit and connection identifier code for the whole HS subsystem |
| hs_ident.h | Header file containing circuit and connection identifier data for the whole HS subsystem |
| hs_intropoint.c | Implement next generation introductions point functionality |
| hs_intropoint.h | Header file for hs_intropoint.c |
| hs_metrics.c | Onion service metrics exposed through the MetricsPort |
| hs_metrics.h | Header for feature/hs/hs_metrics.c |
| hs_metrics_entry.c | Defines the metrics entry that are collected by an onion service |
| hs_metrics_entry.h | Header for feature/hs/hs_metrics_entry.c |
| hs_ob.c | Implement Onion Balance specific code |
| hs_ob.h | Header file for the specific code for onion balance |
| hs_options.inc | |
| hs_opts_st.h | |
| hs_service.c | Implement next generation hidden service functionality |
| hs_service.h | Header file containing service data for the HS subsystem |
| hs_stats.c | Keeps stats about the activity of our onion service(s) |
| hs_stats.h | Header file for hs_stats.c |
| hs_sys.c | Setup and tear down the HS subsystem |
| hs_sys.h | Header for feature/hs/hs_sys.c |
| hsdir_index_st.h | HS directory index structure |
| ► hs_common | Feature/hs_common: Common to v2 (old) and v3 (current) onion services |
| replaycache.c | Self-scrubbing replay cache for rendservice.c |
| replaycache.h | Header file for replaycache.c |
| shared_random_client.c | This file contains functions that are from the shared random subsystem but used by many part of tor. The full feature is built as part of the dirauth module |
| shared_random_client.h | Header file for shared_random_client.c |
| ► keymgt | Feature/keymgt: Store keys for relays, authorities, etc |
| loadkey.c | Read keys from disk, creating as needed |
| loadkey.h | Header file for loadkey.c |
| ► metrics | |
| metrics.c | Metrics subsystem |
| metrics.h | Header for feature/metrics/metrics.c |
| metrics_sys.c | Setup and tear down the metrics subsystem |
| metrics_sys.h | Header for feature/metrics/metrics_sys.c |
| ► nodelist | Feature/nodelist: Download and manage a list of relays |
| authcert.c | Code to maintain directory authorities' certificates |
| authcert.h | Header file for authcert.c |
| authority_cert_st.h | Authority certificate structure |
| desc_store_st.h | Routerinfo/extrainfo storage structure |
| describe.c | Format short descriptions of relays |
| describe.h | Header file for describe.c |
| dirlist.c | Code to maintain our lists of directory authorities and fallback directories |
| dirlist.h | Header file for dirlist.c |
| document_signature_st.h | Authority signature structure |
| extrainfo_st.h | A relay's extra-info structure |
| fmt_routerstatus.c | |
| fmt_routerstatus.h | Format routerstatus entries for controller, vote, or consensus |
| microdesc.c | Implements microdescriptors – an abbreviated description of less-frequently-changing router information |
| microdesc.h | Header file for microdesc.c |
| microdesc_st.h | Microdescriptor structure |
| networkstatus.c | Functions and structures for handling networkstatus documents as a client or as a directory cache |
| networkstatus.h | Header file for networkstatus.c |
| networkstatus_sr_info_st.h | Shared-randomness structure |
| networkstatus_st.h | Networkstatus consensus/vote structure |
| networkstatus_voter_info_st.h | Single consensus voter structure |
| nickname.c | Check and manipulate relay nicknames |
| nickname.h | Header file for nickname.c |
| node_select.c | Code to choose nodes randomly based on restrictions and weighted probabilities |
| node_select.h | Header file for node_select.c |
| node_st.h | Node information structure |
| nodefamily.c | Code to manipulate encoded, reference-counted node families. We use these tricks to save space, since these families would otherwise require a large number of tiny allocations |
| nodefamily.h | Header file for nodefamily.c |
| nodefamily_st.h | Compact node-family structure |
| nodelist.c | Structures and functions for tracking what we know about the routers on the Tor network, and correlating information from networkstatus, routerinfo, and microdescs |
| nodelist.h | Header file for nodelist.c |
| routerinfo.c | Manipulate full router descriptors |
| routerinfo.h | Header file for routerinfo.c |
| routerinfo_st.h | Router descriptor structure |
| routerlist.c | Code to maintain and access the global list of routerinfos for known servers |
| routerlist.h | Header file for routerlist.c |
| routerlist_st.h | Router descriptor list structure |
| routerset.c | Functions and structures to handle set-type selection of routers by name, ID, address, etc |
| routerset.h | Header file for routerset.c |
| routerstatus_st.h | Routerstatus (consensus entry) structure |
| signed_descriptor_st.h | Descriptor/extrainfo signature structure |
| torcert.c | Implementation for ed25519-signed certificates as used in the Tor protocol |
| torcert.h | Header for torcert.c |
| vote_routerstatus_st.h | Routerstatus (vote entry) structure |
| ► relay | Feature/relay: Relay-specific code |
| circuitbuild_relay.c | Implements the details of exteding circuits (by relaying extend cells as create cells, and answering create cells) |
| circuitbuild_relay.h | Header for feature/relay/circuitbuild_relay.c |
| dns.c | Implements a local cache for DNS results for Tor servers. This is implemented as a wrapper around Adam Langley's eventdns.c code. (We can't just use gethostbyname() and friends because we really need to be nonblocking.) |
| dns.h | Header file for dns.c |
| dns_structs.h | Structures used in dns.c. Exposed to dns.c, and to the unit tests that declare DNS_PRIVATE |
| ext_orport.c | Code implementing the Extended ORPort |
| ext_orport.h | Header for ext_orport.c |
| onion_queue.c | Functions to queue create cells for processing |
| onion_queue.h | Header file for onion_queue.c |
| relay_config.c | Code to interpret the user's configuration of Tor's relay module |
| relay_config.h | Header for feature/relay/relay_config.c |
| relay_find_addr.c | Implement mechanism for a relay to find its address |
| relay_find_addr.h | Header file for relay_find_addr.c |
| relay_handshake.c | Functions to implement the relay-only parts of our connection handshake |
| relay_handshake.h | Header for feature/relay/relay_handshake.c |
| relay_metrics.c | Relay metrics exposed through the MetricsPort |
| relay_metrics.h | Header for feature/relay/relay_metrics.c |
| relay_periodic.c | Periodic functions for the relay subsystem |
| relay_periodic.h | Header for feature/relay/relay_periodic.c |
| relay_stub.c | Stub declarations for use when relay module is disabled |
| relay_sys.c | Subsystem definitions for the relay module |
| relay_sys.h | Header for feature/relay/relay_sys.c |
| router.c | Miscellaneous relay functionality, including RSA key maintenance, generating and uploading server descriptors, picking an address to advertise, and so on |
| router.h | Header file for router.c |
| routerkeys.c | Functions and structures to handle generating and maintaining the set of keypairs necessary to be an OR |
| routerkeys.h | Header for routerkeys.c |
| routermode.c | Check if we're running as a relay/cache |
| routermode.h | Header file for routermode.c |
| selftest.c | Relay self-testing |
| selftest.h | Header file for selftest.c |
| transport_config.c | Code to interpret the user's configuration of Tor's server pluggable transports |
| transport_config.h | Header for feature/relay/transport_config.c |
| ► rend | |
| rendcommon.c | Rendezvous implementation: shared code between introducers, services, clients, and rendezvous points |
| rendcommon.h | Header file for rendcommon.c |
| rendmid.c | Implement introductions points and rendezvous points |
| rendmid.h | Header file for rendmid.c |
| ► stats | Feature/stats: Relay statistics. Also, port prediction |
| bw_array_st.h | Declaration for bw_array_t structure and related constants |
| bwhist.c | Tracking for relay bandwidth history |
| bwhist.h | Header for feature/stats/bwhist.c |
| connstats.c | Count bidirectional vs one-way connections |
| connstats.h | Header for feature/stats/connstats.c |
| geoip_stats.c | |
| geoip_stats.h | Header file for geoip_stats.c |
| predict_ports.c | Remember what ports we've needed so we can have circuits ready |
| predict_ports.h | Header file for predict_ports.c |
| rephist.c | Basic history and performance-tracking functionality |
| rephist.h | Header file for rephist.c |
| ▼ lib | Lib: low-level functionality |
| ► arch | Lib/arch: Compatibility code for handling different CPU architectures |
| bytes.h | Inline functions for reading and writing multibyte values from the middle of strings, and for manipulating byte order |
| ► buf | Lib/buf: An efficient byte queue |
| buffers.c | Implements a generic buffer interface |
| buffers.h | Header file for buffers.c |
| ► cc | Lib/cc: Macros for managing the C compiler and language |
| compat_compiler.h | Utility macros to handle different features and behavior in different compilers |
| ctassert.h | Compile-time assertions: CTASSERT(expression) |
| tokpaste.h | Token-pasting macros |
| torint.h | Integer definitions used throughout Tor |
| ► compress | Lib/compress: Wraps several compression libraries |
| compress.c | Common compression API implementation |
| compress.h | Headers for compress.c |
| compress_buf.c | Working with compressed data in buffers |
| compress_lzma.c | Compression backend for LZMA |
| compress_lzma.h | Header for compress_lzma.c |
| compress_none.c | Compression backend for identity compression |
| compress_none.h | Header for compress_none.c |
| compress_sys.h | Declare subsystem object for the compress module |
| compress_zlib.c | Compression backend for gzip and zlib |
| compress_zlib.h | Header for compress_zlib.c |
| compress_zstd.c | Compression backend for Zstandard |
| compress_zstd.h | Header for compress_zstd.c |
| ► conf | Lib/conf: Types and macros for declaring configuration options |
| confdecl.h | Macros for generating a configuration struct from a list of its individual fields |
| confmacros.h | Macro definitions for declaring configuration variables |
| conftesting.h | Macro and type declarations for testing |
| conftypes.h | Types used to specify configurable options |
| ► confmgt | Lib/confmgt: Parse, encode, manipulate configuration files |
| confmgt.c | Back-end for parsing and generating key-value files, used to implement the torrc file format and the state file |
| confmgt.h | Header for confmgt.c |
| structvar.c | Functions to manipulate named and typed elements of a structure |
| structvar.h | Header for lib/confmgt/structvar.c |
| type_defs.c | Definitions for various low-level configuration types |
| type_defs.h | Header for lib/confmgt/type_defs.c |
| typedvar.c | Functions for accessing a pointer as an object of a given type |
| typedvar.h | Header for lib/confmgt/typedvar.c |
| unitparse.c | Functions for parsing values with units from a configuration file |
| unitparse.h | Header for lib/confmgt/unitparse.c |
| var_type_def_st.h | Structure declarations for typedvar type definitions |
| ► container | Lib/container: Hash tables, dynamic arrays, bit arrays, etc |
| bitarray.h | Implements a variable-sized (but non-resizeable) bit-array |
| bloomfilt.c | Uses bitarray_t to implement a bloom filter |
| bloomfilt.h | Header for bloomfilt.c |
| handles.h | Macros for C weak-handle implementation |
| map.c | Hash-table implementations of a string-to-void* map, and of a digest-to-void* map |
| map.h | Headers for map.c |
| namemap.c | Mappings between identifiers and 16-bit ints |
| namemap.h | Header for namemap.c |
| namemap_st.h | Internal declarations for namemap structure |
| order.c | Functions for finding the n'th element of an array |
| order.h | Header for order.c |
| smartlist.c | Higher-level functions for the "smartlist" resizeable array abstraction |
| smartlist.h | Header for smartlist.c |
| ► crypt_ops | Lib/crypt_ops: Cryptographic operations |
| aes.h | Headers for aes.c |
| aes_nss.c | Use NSS to implement AES_CTR |
| aes_openssl.c | Use OpenSSL to implement AES_CTR |
| compat_openssl.h | |
| crypto_cipher.c | Symmetric cryptography (low-level) with AES |
| crypto_cipher.h | Headers for crypto_cipher.c |
| crypto_curve25519.c | Wrapper code for a curve25519 implementation |
| crypto_curve25519.h | Header for crypto_curve25519.c |
| crypto_dh.c | Block of functions related with DH utilities and operations. over Z_p. We aren't using this for any new crypto – EC is more efficient |
| crypto_dh.h | Headers for crypto_dh.c |
| crypto_dh_nss.c | NSS implementation of Diffie-Hellman over Z_p |
| crypto_dh_openssl.c | Implement Tor's Z_p diffie-hellman stuff for OpenSSL |
| crypto_digest.c | Block of functions related with digest and xof utilities and operations |
| crypto_digest.h | Headers for crypto_digest.c |
| crypto_digest_nss.c | Block of functions related with digest and xof utilities and operations (NSS specific implementations) |
| crypto_digest_openssl.c | Block of functions related with digest and xof utilities and operations (OpenSSL specific implementations) |
| crypto_ed25519.c | Wrapper code for an ed25519 implementation |
| crypto_ed25519.h | Header for crypto_ed25519.c |
| crypto_format.c | Formatting and parsing code for crypto-related data structures |
| crypto_format.h | Header for crypto_format.c |
| crypto_hkdf.c | Block of functions related with HKDF utilities and operations |
| crypto_hkdf.h | Headers for crypto_hkdf.h |
| crypto_init.c | Initialize and shut down Tor's crypto library and subsystem |
| crypto_init.h | Headers for crypto_init.c |
| crypto_nss_mgt.c | Manage the NSS library (if used) |
| crypto_nss_mgt.h | Headers for crypto_nss_mgt.c |
| crypto_ope.c | A rudimentary order-preserving encryption scheme |
| crypto_ope.h | Header for crypto_ope.c |
| crypto_openssl_mgt.c | Block of functions related to operations from OpenSSL |
| crypto_openssl_mgt.h | Headers for crypto_openssl_mgt.c |
| crypto_options.inc | Declare configuration options for the crypto_ops module |
| crypto_options_st.h | Header for lib/crypt_ops/crypto_options_st.c |
| crypto_pwbox.c | Code for encrypting secrets in a password-protected form and saving them to disk |
| crypto_pwbox.h | Header for crypto_pwbox.c |
| crypto_rand.c | Functions for initialising and seeding (pseudo-)random number generators, and working with randomness |
| crypto_rand.h | Common functions for using (pseudo-)random number generators |
| crypto_rand_fast.c | A fast strong PRNG for use when our underlying cryptographic library's PRNG isn't fast enough |
| crypto_rand_numeric.c | Functions for retrieving uniformly distributed numbers from our PRNGs |
| crypto_rsa.c | Block of functions related with RSA utilities and operations |
| crypto_rsa.h | Headers for crypto_rsa.c |
| crypto_rsa_nss.c | |
| crypto_rsa_openssl.c | |
| crypto_s2k.c | Functions for deriving keys from human-readable passphrases |
| crypto_s2k.h | Header for crypto_s2k.c |
| crypto_sys.h | Declare subsystem object for the crypto module |
| crypto_util.c | Common cryptographic utilities |
| crypto_util.h | Common functions for cryptographic routines |
| digestset.c | Implementation for a set of digests |
| digestset.h | Types to handle sets of digests, based on bloom filters |
| ► ctime | Lib/ctime: Constant-time code to avoid side-channels |
| di_ops.c | Functions for data-independent operations |
| di_ops.h | Headers for di_ops.c |
| ► defs | Lib/defs: Lowest-level constants, used in many places |
| dh_sizes.h | Definitions for sizes of Diffie-Hellman groups elements in Z_p |
| digest_sizes.h | Definitions for common sizes of cryptographic digests |
| logging_types.h | Global definition for types used by logging systems |
| time.h | Definitions for timing-related constants |
| x25519_sizes.h | Definitions for sizes of x25519 keys and elements |
| ► dispatch | Lib/dispatch: In-process message delivery |
| dispatch.h | Low-level APIs for message-passing system |
| dispatch_cfg.c | Create and configure a dispatch_cfg_t |
| dispatch_cfg.h | Header for distpach_cfg.c |
| dispatch_cfg_st.h | Declarations for dispatch-configuration types |
| dispatch_core.c | Core module for sending and receiving messages |
| dispatch_naming.c | Name-to-ID maps for our message dispatch system |
| dispatch_naming.h | Header for dispatch_naming.c |
| dispatch_new.c | Code to construct a dispatch_t from a dispatch_cfg_t |
| dispatch_st.h | Private structures used for the dispatcher module |
| msgtypes.h | Types used for messages in the dispatcher code |
| ► encoding | Lib/encoding: Encoding data in various forms, types, and transformations |
| binascii.c | Miscellaneous functions for encoding and decoding various things in base{16,32,64} |
| binascii.h | Header for binascii.c |
| confline.c | Functions to manipulate a linked list of key-value pairs, of the type used in Tor's configuration files |
| confline.h | Header for confline.c |
| cstring.c | Decode data that has been written as a C literal |
| cstring.h | Header for cstring.c |
| keyval.c | Handle data encoded as a key=value pair |
| keyval.h | Header for keyval.c |
| kvline.c | Manipulating lines of key-value pairs |
| kvline.h | Header for kvline.c |
| pem.c | Implement a trivial version of PEM encoding, for use with NSS |
| pem.h | Header for pem.c |
| qstring.c | Implement QuotedString parsing |
| qstring.h | Header for qstring.c |
| time_fmt.c | Encode and decode time in various formats |
| time_fmt.h | Header for time_fmt.c |
| ► err | Lib/err: Lowest-level error handling code |
| backtrace.c | Functions to produce backtraces on bugs, crashes, or assertion failures |
| backtrace.h | Header for backtrace.c |
| torerr.c | Handling code for unrecoverable emergencies, at a lower level than the logging code |
| torerr.h | Headers for torerr.c |
| torerr_sys.c | Subsystem object for the error handling subsystem |
| torerr_sys.h | Declare subsystem object for torerr.c |
| ► evloop | Lib/evloop: Low-level event loop |
| compat_libevent.c | Wrappers and utility functions for Libevent |
| compat_libevent.h | Header for compat_libevent.c |
| evloop_sys.c | Subsystem definition for the event loop module |
| evloop_sys.h | Declare subsystem object for the event loop module |
| procmon.c | Process-termination monitor functions |
| procmon.h | Headers for procmon.c |
| timers.c | Wrapper around William Ahern's fast hierarchical timer wheel implementation, to tie it in with a libevent backend |
| timers.h | Header for timers.c |
| token_bucket.c | Functions to use and manipulate token buckets, used for rate-limiting on connections and globally |
| token_bucket.h | Headers for token_bucket.c |
| workqueue.c | Implements worker threads, queues of work for them, and mechanisms for them to send answers back to the main thread |
| workqueue.h | Header for workqueue.c |
| ► fdio | Lib/fdio: Code to read/write on file descriptors |
| fdio.c | Low-level compatibility wrappers for fd-based IO |
| fdio.h | Header for fdio.c |
| ► fs | Lib/fs: Files, filenames, directories, etc |
| conffile.c | |
| conffile.h | Read configuration files from disk, with full include support |
| dir.c | Read directories, and create directories with restrictive permissions |
| dir.h | Header for dir.c |
| files.c | |
| files.h | Wrappers for reading and writing data to files on disk |
| freespace.c | Find the available disk space on the current volume |
| lockfile.c | Implements lock files to prevent two Tor processes from using the same data directory at the same time |
| lockfile.h | Header for lockfile.c |
| mmap.c | Cross-platform support for mapping files into our address space |
| mmap.h | Header for mmap.c |
| path.c | Manipulate strings that contain filesystem paths |
| path.h | Header for path.c |
| storagedir.c | An abstraction for a directory full of similar files |
| storagedir.h | Header for storagedir.c |
| userdb.c | Access the POSIX user database |
| userdb.h | Header for userdb.c |
| winlib.c | Find and load windows system libraries |
| winlib.h | Header for winlib.c |
| ► geoip | Lib/geoip: IP-to-country mapping |
| country.h | Country type for geoip |
| geoip.c | Functions related to maintaining an IP-to-country database; to summarizing client connections by country to entry guards, bridges, and directory servers; and for statistics on answering network status requests |
| geoip.h | Header file for geoip.c |
| ► intmath | Lib/intmath: Integer mathematics |
| addsub.c | Helpers for addition and subtraction |
| addsub.h | Header for addsub.c |
| bits.c | Count the bits in an integer, manipulate powers of 2, etc |
| bits.h | Header for bits.c |
| cmp.h | Macro definitions for MIN, MAX, and CLAMP |
| logic.h | Macros for comparing the boolean value of integers |
| muldiv.c | Integer math related to multiplication, division, and rounding |
| muldiv.h | Header for muldiv.c |
| weakrng.c | A weak but fast PRNG based on a linear congruential generator |
| weakrng.h | Header for weakrng.c |
| ► llharden | Lib/llharden: low-level unconditional process hardening |
| winprocess_sys.c | Subsystem object for windows process setup |
| winprocess_sys.h | Declare subsystem object for winprocess.c |
| ► lock | Lib/lock: Simple locking support |
| compat_mutex.c | Portable wrapper for platform mutex implementations |
| compat_mutex.h | Header for compat_mutex.c |
| compat_mutex_pthreads.c | Implement the tor_mutex API using pthread_mutex_t |
| compat_mutex_winthreads.c | Implement the tor_mutex API using CRITICAL_SECTION |
| ► log | Lib/log: Log messages to files, syslogs, etc |
| escape.c | Escape untrusted strings before sending them to the log |
| escape.h | Header for escape.c |
| log.c | Functions to send messages to log files or the console |
| log.h | Headers for log.c |
| log_sys.c | Setup and tear down the logging module |
| log_sys.h | Declare subsystem object for the logging module |
| ratelim.c | Summarize similar messages that would otherwise flood the logs |
| ratelim.h | Summarize similar messages that would otherwise flood the logs |
| util_bug.c | |
| util_bug.h | Macros to manage assertions, fatal and non-fatal |
| win32err.c | Convert windows error codes to useful C strings |
| win32err.h | Header for win32err.c |
| ► malloc | Lib/malloc: Wrappers and utilities for memory management |
| malloc.c | Wrappers for C malloc code, and replacements for items that may be missing |
| malloc.h | Headers for util_malloc.c |
| map_anon.c | Manage anonymous mappings |
| map_anon.h | Headers for map_anon.c |
| ► math | Lib/math: Floating-point math utilities |
| fp.c | Basic floating-point compatibility and convenience code |
| fp.h | Header for fp.c |
| laplace.c | Implements a Laplace distribution, used for adding noise to things |
| laplace.h | Header for laplace.c |
| prob_distr.c | Implements various probability distributions. Almost all code is courtesy of Riastradh |
| prob_distr.h | Header for prob_distr.c |
| ► memarea | Lib/memarea: A fast arena-style allocator |
| memarea.c | Implementation for memarea_t, an allocator for allocating lots of small objects that will be freed all at once |
| memarea.h | Header for memarea.c |
| ► meminfo | Lib/meminfo: Inspecting system memory availability |
| meminfo.c | Functions to query total memory, and access meta-information about the allocator |
| meminfo.h | Header for meminfo.c |
| ► metrics | Lib/metrics: Metrics collection API |
| metrics_common.c | Common code for the metrics library |
| metrics_common.h | Header for lib/metrics/metrics_common.c |
| metrics_store.c | Metrics interface to store them based on specific store type and get their MetricsPort output |
| metrics_store.h | Header for lib/metrics/metrics_store.c |
| metrics_store_entry.c | Metrics store entry which contains the gathered data |
| metrics_store_entry.h | Header for lib/metrics/metrics_store_entry.c |
| prometheus.c | Metrics format driver for Prometheus data model |
| prometheus.h | Header for feature/metrics/prometheus.c |
| ► net | Lib/net: Low-level network-related code |
| address.c | Functions to use and manipulate the tor_addr_t structure |
| address.h | Headers for address.h |
| alertsock.c | Use a socket to alert the main thread from a worker thread |
| alertsock.h | Header for alertsock.c |
| buffers_net.c | Read and write data on a buf_t object |
| buffers_net.h | Header file for buffers_net.c |
| gethostname.c | Mockable wrapper for gethostname() |
| gethostname.h | Header for gethostname.c |
| inaddr.c | Convert in_addr and in6_addr to and from strings |
| inaddr.h | Header for inaddr.c |
| inaddr_st.h | Define in6_addr, its members, and related types on platforms that lack it |
| nettypes.h | Declarations for types used throughout the Tor networking system |
| network_sys.c | Subsystem object for networking setup |
| network_sys.h | Declare subsystem object for the network module |
| resolve.c | Use the libc DNS resolver to convert hostnames into addresses |
| resolve.h | Header for resolve.c |
| socket.c | Compatibility and utility functions for working with network sockets |
| socket.h | Header for socket.c |
| socketpair.c | Replacement socketpair() for systems that lack it |
| socketpair.h | Header for socketpair.c |
| socks5_status.h | Status codes used by the SOCKS5 protocol |
| ► osinfo | Lib/osinfo: For inspecting the OS version and capabilities |
| libc.c | Functions to get the name and version of the system libc |
| libc.h | Header for lib/osinfo/libc.c |
| uname.c | Look up a description of the operating system |
| uname.h | Header for uname.c |
| ► process | Lib/process: Launch and manage subprocesses |
| daemon.c | Run the tor process in the background (unix only) |
| daemon.h | Header for daemon.c |
| env.c | Inspect and manipulate the environment variables |
| env.h | Header for env.c |
| pidfile.c | Record this process's PID to disk |
| pidfile.h | Header for pidfile.c |
| process.c | Module for working with other processes |
| process.h | Header for process.c |
| process_sys.c | Subsystem object for process setup |
| process_sys.h | Declare subsystem object for the process module |
| process_unix.c | Module for working with Unix processes |
| process_unix.h | Header for process_unix.c |
| process_win32.c | Module for working with Windows processes |
| process_win32.h | Header for process_win32.c |
| restrict.c | Drop privileges from the current process |
| restrict.h | Header for restrict.c |
| setuid.c | Change the user ID after Tor has started (Unix only) |
| setuid.h | Header for setuid.c |
| waitpid.c | Convenience structures for handlers for handling waitpid() |
| waitpid.h | Headers for waitpid.c |
| ► pubsub | Lib/pubsub: Publish-subscribe message passing |
| pub_binding_st.h | Declaration of pub_binding_t |
| pubsub.h | Header for OO publish-subscribe functionality |
| pubsub_build.c | Construct a dispatch_t in safer, more OO way |
| pubsub_build.h | Header used for constructing the OO publish-subscribe facility |
| pubsub_builder_st.h | Private structures used for configuring dispatchers and messages |
| pubsub_check.c | Enforce various requirements on a pubsub_builder |
| pubsub_connect.h | Header for functions that add relationships to a pubsub builder |
| pubsub_flags.h | Flags that can be set on publish/subscribe messages |
| pubsub_macros.h | Macros to help with the publish/subscribe dispatch API |
| pubsub_publish.c | Header for functions to publish using a pub_binding_t |
| pubsub_publish.h | Header for pubsub_publish.c |
| ► sandbox | Lib/sandbox: Linux seccomp2-based sandbox |
| linux_syscalls.inc | |
| sandbox.c | Code to enable sandboxing |
| sandbox.h | Header file for sandbox.c |
| ► smartlist_core | Lib/smartlist_core: Minimal dynamic array implementation |
| smartlist_core.c | Implements the core functionality of a smartlist (a resizeable dynamic array). For more functionality and helper functions, see the container library |
| smartlist_core.h | Top-level declarations for the smartlist_t dynamic array type |
| smartlist_foreach.h | Macros for iterating over the elements of a smartlist_t |
| smartlist_split.c | Split a string into a smartlist_t of substrings |
| smartlist_split.h | Header for smartlist_split.c |
| ► string | Lib/string: Low-level string manipulation |
| compat_ctype.c | Locale-independent character-type inspection (backend) |
| compat_ctype.h | Locale-independent character-type inspection (header) |
| compat_string.c | Useful string-processing functions that some platforms don't provide |
| compat_string.h | Header for compat_string.c |
| parse_int.c | Convert strings into the integers they encode, with bounds checking |
| parse_int.h | Header for parse_int.c |
| printf.c | Compatibility wrappers around snprintf and its friends |
| printf.h | Header for printf.c |
| scanf.c | Locale-independent minimal implementation of sscanf() |
| scanf.h | Header for scanf.c |
| util_string.c | Non-standard string functions used throughout Tor |
| util_string.h | Header for util_string.c |
| ► subsys | Lib/subsys: Types for declaring a "subsystem" |
| subsys.h | Types used to declare a subsystem |
| ► term | Lib/term: Terminal operations (password input) |
| getpass.c | Cross-platform wrapper to read passphrases from the terminal |
| getpass.h | Header for getpass.c |
| ► testsupport | Lib/testsupport: Helpers for test-only code and for function mocking |
| testsupport.h | Macros to implement mocking and selective exposure for the test code |
| ► thread | Lib/thread: Mid-level threading |
| compat_pthreads.c | Implementation for the pthreads-based multithreading backend functions |
| compat_threads.c | Cross-platform threading and inter-thread communication logic. (Platform-specific parts are written in the other compat_*threads modules.) |
| compat_winthreads.c | Implementation for the windows-based multithreading backend functions |
| numcpus.c | Compute the number of CPUs configured on this system |
| numcpus.h | Header for numcpus.c |
| thread_sys.h | Declare subsystem object for threads library |
| threads.h | Header for threads.c |
| ► time | Lib/time: Higher-level time functions |
| compat_time.c | Portable wrappers for finding out the current time, running timers, etc |
| compat_time.h | Functions and types for monotonic times |
| time_sys.c | Subsystem object for monotime setup |
| time_sys.h | Declare subsystem object for the time module |
| tvdiff.c | Compute the difference between timevals, in various units |
| tvdiff.h | Header for tvdiff.c |
| ► tls | Lib/tls: TLS library wrappers |
| buffers_tls.c | Read and write data on a tor_tls_t connection from a buf_t object |
| buffers_tls.h | Header for buffers_tls.c |
| ciphers.inc | |
| nss_countbytes.c | A PRFileDesc layer to let us count the number of bytes bytes actually written on a PRFileDesc |
| nss_countbytes.h | Header for nss_countbytes.c, which lets us count the number of bytes actually written on a PRFileDesc |
| tortls.c | Shared functionality for our TLS backends |
| tortls.h | Headers for tortls.c |
| tortls_internal.h | Declare internal functions for lib/tls |
| tortls_nss.c | Wrapper functions to present a consistent interface to TLS and SSL X.509 functions from NSS |
| tortls_openssl.c | |
| tortls_st.h | Structure declarations for internal TLS types |
| tortls_sys.h | Declare subsystem object for the tortls module |
| x509.c | |
| x509.h | Headers for tortls.c |
| x509_internal.h | |
| x509_nss.c | Wrapper functions to present a consistent interface to X.509 functions from NSS |
| x509_openssl.c | Wrapper functions to present a consistent interface to X.509 functions |
| ► trace | Lib/trace: Function-tracing functionality API |
| ► lttng | |
| lttng.h | Header file for lttng.c |
| ► usdt | |
| usdt.h | |
| debug.h | Macros for debugging our event-trace support |
| events.h | Header file for Tor tracing instrumentation definition |
| trace.c | Common functions for event-tracing implementation |
| trace.h | Header for trace.c |
| trace_stub.c | Stub declarations for use when trace library is disabled |
| trace_sys.c | |
| trace_sys.h | |
| ► version | Lib/version: holds the current version of Tor |
| git_revision.c | Strings to describe the current Git commit |
| git_revision.h | Header for git_revision.c |
| torversion.h | Header for version.c |
| version.c | Functions to get the version of Tor |
| ► wallclock | Lib/wallclock: Inspect and manipulate the current time |
| approx_time.c | Cache the last result of time(), for performance and testing |
| approx_time.h | Header for approx_time.c |
| time_to_tm.c | Convert to struct tm, portably |
| time_to_tm.h | Header for time_to_tm.c |
| timeval.h | Declarations for timeval-related macros that some platforms are missing |
| tor_gettimeofday.c | Implementat gettimeofday() for windows, and other platforms without it |
| tor_gettimeofday.h | Header for tor_gettimeofday.c |
| wallclock_sys.h | Declare subsystem object for the wallclock module |
| ▼ tools | Tools: other command-line tools for use with Tor |
| tor-gencert.c | |
| tor-print-ed-signing-cert.c | |
| tor-resolve.c | |
| tor_runner.c | Experimental module to emulate tor_run_main() API with fork+exec |
| ▼ win32 | |
| orconfig.h | |