13 #define RELAY_CONFIG_PRIVATE
54 STMT_BEGIN *msg = tor_strdup(arg); return -1; STMT_END
55 #if defined(__GNUC__) && __GNUC__ <= 3
56 #define COMPLAIN(args...) \
57 STMT_BEGIN log_warn(LD_CONFIG, args); STMT_END
59 #define COMPLAIN(args, ...) \
60 STMT_BEGIN log_warn(LD_CONFIG, args, ##__VA_ARGS__); STMT_END
64 #define YES_IF_CHANGED_BOOL(opt) \
65 if (!CFG_EQ_BOOL(old_options, new_options, opt)) return 1;
66 #define YES_IF_CHANGED_INT(opt) \
67 if (!CFG_EQ_INT(old_options, new_options, opt)) return 1;
68 #define YES_IF_CHANGED_STRING(opt) \
69 if (!CFG_EQ_STRING(old_options, new_options, opt)) return 1;
70 #define YES_IF_CHANGED_LINELIST(opt) \
71 if (!CFG_EQ_LINELIST(old_options, new_options, opt)) return 1;
123 if (port->is_unix_addr)
126 if (!tor_addr_is_internal(&port->addr, 1)) {
127 log_warn(
LD_CONFIG,
"You specified a public address '%s' for %sPort. "
128 "This is not advised; this address is supposed to only be "
129 "exposed on localhost so that your pluggable transport "
130 "proxies can connect to it.",
133 } SMARTLIST_FOREACH_END(port);
158 return "<null port>";
161 static char buf[256];
162 const char *type, *addr;
164 switch (port->
type) {
179 if (port->explicit_addr) {
186 type, addr, (strlen(addr) > 0) ?
":" :
"",
209 ret &= (p1->is_group_writable == p2->is_group_writable);
210 ret &= (p1->is_world_writable == p2->is_world_writable);
211 ret &= (p1->relax_dirmode_check == p2->relax_dirmode_check);
212 ret &= (p1->explicit_addr == p2->explicit_addr);
218 ret &=
tor_memeq(&p1->server_cfg, &p2->server_cfg,
252 bool *removing = tor_calloc(smartlist_len(ports),
sizeof(
bool));
254 for (
int i = 0; i < smartlist_len(ports); ++i) {
255 const port_cfg_t *current = smartlist_get(ports, i);
265 for (
int j = 0; j < smartlist_len(ports); ++j) {
266 const port_cfg_t *next = smartlist_get(ports, j);
269 if (current == next) {
298 current->explicit_addr && next->explicit_addr) {
307 if (!current->explicit_addr && next->explicit_addr) {
312 log_warn(
LD_CONFIG,
"Configuration port %s superseded by %s",
320 for (
int i = smartlist_len(ports)-1; i >= 0; --i) {
323 port_cfg_t *current = smartlist_get(ports, i);
325 port_cfg_free(current);
339 int *n_low_ports_out)
347 if (BUG(!n_low_ports_out))
350 int n_orport_advertised = 0;
351 int n_orport_advertised_ipv4 = 0;
352 int n_orport_listeners = 0;
353 int n_dirport_advertised = 0;
354 int n_dirport_listeners = 0;
363 if (! port->server_cfg.no_advertise)
364 ++n_dirport_advertised;
365 if (! port->server_cfg.no_listen)
366 ++n_dirport_listeners;
368 if (! port->server_cfg.no_advertise) {
369 ++n_orport_advertised;
370 if (port_binds_ipv4(port))
371 ++n_orport_advertised_ipv4;
373 if (! port->server_cfg.no_listen)
374 ++n_orport_listeners;
379 if (!port->server_cfg.no_listen && port->port < 1024)
382 } SMARTLIST_FOREACH_END(port);
384 if (n_orport_advertised && !n_orport_listeners) {
385 log_warn(
LD_CONFIG,
"We are advertising an ORPort, but not actually "
386 "listening on one.");
389 if (n_orport_listeners && !n_orport_advertised) {
390 log_warn(
LD_CONFIG,
"We are listening on an ORPort, but not advertising "
391 "any ORPorts. This will keep us from building a %s "
392 "descriptor, and make us impossible to use.",
396 if (n_dirport_advertised && !n_dirport_listeners) {
397 log_warn(
LD_CONFIG,
"We are advertising a DirPort, but not actually "
398 "listening on one.");
401 if (n_dirport_advertised > 1) {
402 log_warn(
LD_CONFIG,
"Can't advertise more than one DirPort.");
405 if (n_orport_advertised && !n_orport_advertised_ipv4 &&
407 log_warn(
LD_CONFIG,
"Configured public relay to listen only on an IPv6 "
408 "address. Tor needs to listen on an IPv4 address too.");
414 const char *extra =
"";
416 extra =
", and you have disabled KeepBindCapabilities.";
418 "You have set AccountingMax to use hibernation. You have also "
419 "chosen a low DirPort or OrPort%s."
420 "This combination can make Tor stop "
421 "working when it tries to re-attach the port after a period of "
422 "hibernation. Please choose a different port or turn off "
423 "hibernation unless you know this combination will work on your "
428 *n_low_ports_out = n_low_port;
441 int *have_low_ports_out)
456 if (BUG(!have_low_ports_out))
468 CL_PORT_SERVER_OPTIONS) < 0) {
469 *msg = tor_strdup(
"Invalid ORPort configuration");
476 CL_PORT_SERVER_OPTIONS) < 0) {
477 *msg = tor_strdup(
"Invalid ORPort configuration");
484 CL_PORT_SERVER_OPTIONS|CL_PORT_WARN_NONLOCAL) < 0) {
485 *msg = tor_strdup(
"Invalid ExtORPort configuration");
492 CL_PORT_SERVER_OPTIONS) < 0) {
493 *msg = tor_strdup(
"Invalid DirPort configuration");
498 *msg = tor_strdup(
"Misconfigured server ports");
503 smartlist_free(ports);
508 if (*have_low_ports_out < 0)
509 *have_low_ports_out = (n_low_ports > 0);
512 smartlist_free(ports);
533 options->ORPort_set =
535 options->DirPort_set =
537 options->ExtORPort_set =
569 log_warn(
LD_CONFIG,
"Tor is running as a server, but you are "
570 "running %s; this probably won't work. See "
571 "https://www.torproject.org/docs/faq.html#BestOSForRelay "
572 "for details.", uname);
605 "Nickname '%s', nicknames must be between 1 and 19 characters "
606 "inclusive, and must contain only the characters [a-zA-Z0-9].",
614 "Your ContactInfo config option is not set. Please strongly "
615 "consider setting it, so we can contact you if your relay is "
616 "misconfigured, end-of-life, or something else goes wrong. "
617 "It is also possible that your relay might get rejected from "
618 "the network due to a missing valid contact address.");
622 if (ContactInfo && !
string_is_utf8(ContactInfo, strlen(ContactInfo)))
623 REJECT(
"ContactInfo config option must be UTF-8.");
643 if (!strcasecmp(
string,
"v1"))
644 log_warn(
LD_CONFIG,
"PublishServerDescriptor v1 has no effect, because "
645 "there are no v1 directory authorities anymore.");
646 else if (!strcmp(
string,
"1"))
651 else if (!strcasecmp(
string,
"v2"))
652 log_warn(
LD_CONFIG,
"PublishServerDescriptor v2 has no effect, because "
653 "there are no v2 directory authorities anymore.");
654 else if (!strcasecmp(
string,
"v3"))
656 else if (!strcasecmp(
string,
"bridge"))
658 else if (!strcasecmp(
string,
"hidserv"))
660 "PublishServerDescriptor hidserv is invalid. See "
661 "PublishHidServDescriptors.");
662 else if (!strcasecmp(
string,
"") || !strcmp(
string,
"0"))
666 } SMARTLIST_FOREACH_END(
string);
695 const char *RECOGNIZED[] = {
696 "none",
"any",
"https",
"email",
"moat"
700 if (!strcasecmp(bd, RECOGNIZED[i]))
706 while (TOR_ISALNUM(*cp) || *cp ==
'-' || *cp ==
'_')
710 log_warn(
LD_CONFIG,
"Unrecognized BridgeDistribution value %s. I'll "
711 "assume you know what you are doing...",
escaped(bd));
739 tor_asprintf(msg,
"Unrecognized value in PublishServerDescriptor");
746 REJECT(
"Bridges are not supposed to publish router descriptors to the "
747 "directory authorities. Please correct your "
748 "PublishServerDescriptor line.");
753 REJECT(
"You set BridgeDistribution, but you didn't set BridgeRelay!");
756 REJECT(
"Invalid BridgeDistribution value.");
762 if (!strcmp(pubdes,
"1") || !strcmp(pubdes,
"0"))
763 if (smartlist_len(options->PublishServerDescriptor) > 1) {
764 COMPLAIN(
"You have passed a list of multiple arguments to the "
765 "PublishServerDescriptor option that includes 0 or 1. "
766 "0 or 1 should only be used as the sole argument. "
767 "This configuration will be rejected in a future release.");
799 REJECT(
"Relays must use 'auto' for the ConnectionPadding setting.");
803 REJECT(
"Relays cannot set ReducedConnectionPadding. ");
807 REJECT(
"Relays cannot set CircuitPadding to 0. ");
811 REJECT(
"Relays cannot set ReducedCircuitPadding. ");
840 "MaxAdvertisedBandwidth", msg) < 0)
843 "RelayBandwidthRate", msg) < 0)
846 "RelayBandwidthBurst", msg) < 0)
849 "PerConnBWRate", msg) < 0)
852 "PerConnBWBurst", msg) < 0)
861 const unsigned required_min_bw =
863 RELAY_REQUIRED_MIN_BANDWIDTH : BRIDGE_REQUIRED_MIN_BANDWIDTH;
864 const char *
const optbridge =
868 "BandwidthRate is set to %d bytes/second. "
869 "For %sservers, it must be at least %u.",
876 "MaxAdvertisedBandwidth is set to %d bytes/second. "
877 "For %sservers, it must be at least %u.",
885 "RelayBandwidthRate is set to %d bytes/second. "
886 "For %sservers, it must be at least %u.",
896 REJECT(
"RelayBandwidthBurst must be at least equal "
897 "to RelayBandwidthRate.");
932 REJECT(
"Failed to parse accounting options. See logs for details.");
936 log_warn(
LD_CONFIG,
"Using accounting with a hidden service and an "
937 "ORPort is risky: your hidden service(s) and your public "
938 "address will all turn off at the same time, which may alert "
939 "observers that they are being run by the same party.");
941 "HiddenServiceDir") > 1) {
942 log_warn(
LD_CONFIG,
"Using accounting with multiple hidden services is "
943 "risky: they will all turn off at the same time, which may "
944 "alert observers that they are being run by the same party.");
948 options->AccountingRule = ACCT_MAX;
951 options->AccountingRule = ACCT_SUM;
953 options->AccountingRule = ACCT_MAX;
955 options->AccountingRule = ACCT_IN;
957 options->AccountingRule = ACCT_OUT;
959 REJECT(
"AccountingRule must be 'sum', 'max', 'in', or 'out'");
983 for (cl = lst; cl; cl = cl->next) {
984 const char *line = cl->value;
991 SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK|SPLIT_STRIP_SPACE, 0);
994 char *normalized = NULL;
1005 normalized = prepended;
1018 normalized = tor_strdup(s);
1022 next->key = tor_strdup(cl->key);
1023 next->value = normalized;
1026 *new_nicknames_next = next;
1027 new_nicknames_next = &next->next;
1028 } SMARTLIST_FOREACH_END(s);
1034 config_free_lines(new_nicknames);
1039 *normalized_out = new_nicknames;
1044 #define ONE_MEGABYTE (UINT64_C(1) << 20)
1047 #define DIRCACHE_MIN_MEM_MB 300
1048 #define DIRCACHE_MIN_MEM_BYTES (DIRCACHE_MIN_MEM_MB*ONE_MEGABYTE)
1049 #define STRINGIFY(val) #val
1061 if (total_mem == 0) {
1068 if (total_mem < DIRCACHE_MIN_MEM_BYTES) {
1070 tor_asprintf(msg,
"Running a Bridge with less than %d MB of memory "
1071 "is not recommended.", DIRCACHE_MIN_MEM_MB);
1073 tor_asprintf(msg,
"Being a directory cache (default) with less than "
1074 "%d MB of memory is not recommended and may consume "
1075 "most of the available resources. Consider disabling "
1076 "this functionality by setting the DirCache option "
1077 "to 0.", DIRCACHE_MIN_MEM_MB);
1081 if (total_mem >= DIRCACHE_MIN_MEM_BYTES) {
1082 *msg = tor_strdup(
"DirCache is disabled and we are configured as a "
1083 "relay. We will not become a Guard.");
1086 return *msg == NULL ? 0 : -1;
1112 "Tor is currently configured as a relay and a hidden service. "
1113 "That's not very secure: you should probably run your hidden service "
1114 "in a separate Tor process, at least -- see "
1115 "https://bugs.torproject.org/tpo/core/tor/8742.");
1117 if (options->
BridgeRelay && options->DirPort_set) {
1118 log_warn(
LD_CONFIG,
"Can't set a DirPort on a bridge relay; disabling "
1122 options->DirPort_set = 0;
1125 if (options->DirPort_set && !options->
DirCache) {
1126 REJECT(
"DirPort configured but DirCache disabled. DirPort requires "
1131 REJECT(
"We're a bridge but DirCache is disabled. BridgeRelay requires "
1135 if (options->
BridgeRelay == 1 && ! options->ORPort_set)
1136 REJECT(
"BridgeRelay is 1, ORPort is not set. This is an invalid "
1140 char *dircache_msg = NULL;
1142 log_warn(
LD_CONFIG,
"%s", dircache_msg);
1148 log_warn(
LD_CONFIG,
"Listing a family for a bridge relay is not "
1149 "supported: it can reveal bridge fingerprints to censors. "
1150 "You should also make sure you aren't listing this bridge's "
1151 "fingerprint in any other MyFamily.");
1154 log_warn(
LD_CONFIG,
"MyFamily is set but ContactInfo is not configured. "
1155 "ContactInfo should always be set when MyFamily option is too.");
1162 if (options->DirPort_set) {
1165 COMPLAIN(
"You have requested constrained socket buffers while also "
1166 "serving directory entries via DirPort. It is strongly "
1167 "suggested that you disable serving directory requests when "
1168 "system TCP buffer resources are scarce.");
1196 REJECT(
"SigningKeyLifetime is too short.");
1198 REJECT(
"LinkCertLifetime is too short.");
1200 REJECT(
"TestingAuthKeyLifetime is too short.");
1211 YES_IF_CHANGED_STRING(DataDirectory);
1212 YES_IF_CHANGED_INT(NumCPUs);
1213 YES_IF_CHANGED_LINELIST(ORPort_lines);
1214 YES_IF_CHANGED_BOOL(ServerDNSSearchDomains);
1215 YES_IF_CHANGED_BOOL(SafeLogging_);
1216 YES_IF_CHANGED_BOOL(ClientOnly);
1217 YES_IF_CHANGED_BOOL(LogMessageDomains);
1218 YES_IF_CHANGED_LINELIST(Logs);
1238 YES_IF_CHANGED_STRING(DataDirectory);
1239 YES_IF_CHANGED_STRING(Nickname);
1240 YES_IF_CHANGED_LINELIST(Address);
1241 YES_IF_CHANGED_LINELIST(ExitPolicy);
1242 YES_IF_CHANGED_BOOL(ExitRelay);
1243 YES_IF_CHANGED_BOOL(ExitPolicyRejectPrivate);
1244 YES_IF_CHANGED_BOOL(ExitPolicyRejectLocalInterfaces);
1245 YES_IF_CHANGED_BOOL(IPv6Exit);
1246 YES_IF_CHANGED_LINELIST(ORPort_lines);
1247 YES_IF_CHANGED_LINELIST(DirPort_lines);
1248 YES_IF_CHANGED_LINELIST(DirPort_lines);
1249 YES_IF_CHANGED_BOOL(ClientOnly);
1250 YES_IF_CHANGED_BOOL(DisableNetwork);
1251 YES_IF_CHANGED_BOOL(PublishServerDescriptor_);
1252 YES_IF_CHANGED_STRING(ContactInfo);
1253 YES_IF_CHANGED_STRING(BridgeDistribution);
1254 YES_IF_CHANGED_LINELIST(MyFamily);
1255 YES_IF_CHANGED_STRING(AccountingStart);
1256 YES_IF_CHANGED_INT(AccountingMax);
1257 YES_IF_CHANGED_INT(AccountingRule);
1258 YES_IF_CHANGED_BOOL(DirCache);
1259 YES_IF_CHANGED_BOOL(AssumeReachable);
1286 const int transition_affects_workers =
1291 if (transition_affects_workers ||
1292 (authdir_mode_v3(options) && (!old_options ||
1293 !authdir_mode_v3(old_options)))) {
1295 log_warn(
LD_BUG,
"Error initializing keys; exiting");
1301 static int cdm_initialized = 0;
1302 if (cdm_initialized == 0) {
1303 cdm_initialized = 1;
1311 if (transition_affects_workers) {
1313 "Worker-related options changed. Rotating workers.");
1314 const int server_mode_turned_on =
1316 const int dir_server_mode_turned_on =
1319 if (server_mode_turned_on || dir_server_mode_turned_on) {
1323 if (server_mode_turned_on) {
1353 log_warn(
LD_BUG,
"Error in previously validated accounting options");
1412 #define RELAY_BRIDGE_STATS_DELAY (6 * 60 * 60)
1419 time_t int_start = time(NULL);
1421 int_start += RELAY_BRIDGE_STATS_DELAY;
1425 log_info(
LD_CONFIG,
"We are acting as a bridge now. Starting new "
1426 "GeoIP stats interval%s.", was_relay ?
" in 6 "
1427 "hours from now" :
"");
1430 log_info(
LD_GENERAL,
"We are no longer acting as a bridge. "
1431 "Forgetting GeoIP stats.");
1458 bool *print_notice_out)
1460 if (BUG(!print_notice_out))
1469 time_t now = time(NULL);
1470 int print_notice = 0;
1486 if (options->ORPort_set)
1487 log_notice(
LD_CONFIG,
"Configured to measure directory request "
1488 "statistics, but no GeoIP database found. "
1489 "Please specify a GeoIP database using the "
1490 "GeoIPFile option.");
1505 log_notice(
LD_CONFIG,
"Configured to measure entry node "
1506 "statistics, but no GeoIP database found. "
1507 "Please specify a GeoIP database using the "
1508 "GeoIPFile option.");
1522 log_info(
LD_CONFIG,
"Configured to measure hidden service statistics.");
1526 *print_notice_out = 1;
1557 log_notice(
LD_CONFIG,
"Configured to measure statistics. Look for "
1558 "the *-stats files that will first be written to the "
1559 "data directory in 24 hours from now.");
1644 "DirPortFrontPage file '%s' not found. Continuing anyway.",
const char * fmt_addrport(const tor_addr_t *addr, uint16_t port)
#define fmt_and_decorate_addr(a)
static sa_family_t tor_addr_family(const tor_addr_t *a)
#define tor_addr_eq(a, b)
Header file for directory authority mode.
int config_ensure_bandwidth_cap(uint64_t *value, const char *desc, char **msg)
or_options_t * get_options_mutable(void)
const or_options_t * get_options(void)
int port_count_real_listeners(const smartlist_t *ports, int listenertype, int count_sockets)
int port_parse_config(smartlist_t *out, const config_line_t *ports, const char *portname, int listener_type, const char *defaultaddr, int defaultport, const unsigned flags)
Header file for config.c.
int config_count_key(const config_line_t *a, const char *key)
int config_lines_eq(const config_line_t *a, const config_line_t *b)
void connection_bucket_adjust(const or_options_t *options)
Header file for connection.c.
#define CONN_TYPE_DIR_LISTENER
#define CONN_TYPE_OR_LISTENER
#define CONN_TYPE_EXT_OR_LISTENER
void connection_or_update_token_buckets(smartlist_t *conns, const or_options_t *options)
Header file for connection_or.c.
void conn_stats_terminate(void)
void conn_stats_init(time_t now)
Header for feature/stats/connstats.c.
void consdiffmgr_configure(const consdiff_cfg_t *cfg)
int consdiffmgr_validate(void)
Header for consdiffmgr.c.
void cpuworkers_rotate_keyinfo(void)
Header file for cpuworker.c.
int tor_memeq(const void *a, const void *b, size_t sz)
const char * escaped(const char *s)
int geoip_is_loaded(sa_family_t family)
Header file for geoip_stats.c.
void geoip_dirreq_stats_init(time_t now)
void geoip_bridge_stats_init(time_t now)
void geoip_bridge_stats_term(void)
void geoip_entry_stats_init(time_t now)
void geoip_dirreq_stats_term(void)
void geoip_entry_stats_term(void)
int should_record_bridge_info(const or_options_t *options)
int accounting_parse_options(const or_options_t *options, int validate_only)
void configure_accounting(time_t now)
int accounting_is_enabled(const or_options_t *options)
Header file for hibernate.c.
void ip_address_changed(int on_client_conn)
smartlist_t * get_connection_array(void)
Header file for mainloop.c.
int get_total_system_memory(size_t *mem_out)
int is_legal_nickname(const char *s)
int is_legal_nickname_or_hexdigest(const char *s)
Header file for nickname.c.
Master header file for Tor-specific functionality.
#define UNNAMED_ROUTER_NICKNAME
Listener port configuration structure.
Header file for predict_ports.c.
int tor_asprintf(char **strp, const char *fmt,...)
int tor_snprintf(char *str, size_t size, const char *format,...)
STATIC void remove_duplicate_orports(smartlist_t *ports)
STATIC int check_bridge_distribution_setting(const char *bd)
static char * global_dirfrontpagecontents
int options_act_relay_bandwidth(const or_options_t *old_options)
int options_validate_relay_padding(const or_options_t *old_options, or_options_t *options, char **msg)
int options_act_relay_stats(const or_options_t *old_options, bool *print_notice_out)
void port_update_port_set_relay(or_options_t *options, const smartlist_t *ports)
int options_act_relay(const or_options_t *old_options)
int options_validate_relay_accounting(const or_options_t *old_options, or_options_t *options, char **msg)
const char * relay_get_dirportfrontpage(void)
void relay_config_free_all(void)
int options_validate_relay_bandwidth(const or_options_t *old_options, or_options_t *options, char **msg)
static int options_transition_affects_descriptor(const or_options_t *old_options, const or_options_t *new_options)
int options_validate_relay_os(const or_options_t *old_options, or_options_t *options, char **msg)
int options_act_relay_dir(const or_options_t *old_options)
static int check_and_prune_server_ports(smartlist_t *ports, const or_options_t *options, int *n_low_ports_out)
static bool port_cfg_eq(const port_cfg_t *p1, const port_cfg_t *p2)
void port_warn_nonlocal_ext_orports(const smartlist_t *ports, const char *portname)
int port_parse_ports_relay(or_options_t *options, char **msg, smartlist_t *ports_out, int *have_low_ports_out)
int options_act_relay_accounting(const or_options_t *old_options)
static int normalize_nickname_list(config_line_t **normalized_out, const config_line_t *lst, const char *name, char **msg)
void options_act_relay_stats_msg(void)
uint32_t relay_get_effective_bwrate(const or_options_t *options)
static int compute_publishserverdescriptor(or_options_t *options)
uint32_t relay_get_effective_bwburst(const or_options_t *options)
int options_validate_relay_info(const or_options_t *old_options, or_options_t *options, char **msg)
static const char * describe_portnum(int port)
int options_validate_publish_server(const or_options_t *old_options, or_options_t *options, char **msg)
int options_act_relay_dos(const or_options_t *old_options)
STATIC const char * describe_relay_port(const port_cfg_t *port)
int options_act_relay_desc(const or_options_t *old_options)
int options_act_bridge_stats(const or_options_t *old_options)
int options_validate_relay_testing(const or_options_t *old_options, or_options_t *options, char **msg)
STATIC int have_enough_mem_for_dircache(const or_options_t *options, size_t total_mem, char **msg)
int options_validate_relay_mode(const or_options_t *old_options, or_options_t *options, char **msg)
static int options_transition_affects_workers(const or_options_t *old_options, const or_options_t *new_options)
Header for feature/relay/relay_config.c.
void rep_hist_buffer_stats_term(void)
void rep_hist_hs_stats_term(void)
void rep_hist_buffer_stats_init(time_t now)
void rep_hist_exit_stats_init(time_t now)
void rep_hist_hs_stats_init(time_t now)
void rep_hist_exit_stats_term(void)
Header file for rephist.c.
void mark_my_descriptor_dirty(const char *reason)
int public_server_mode(const or_options_t *options)
int dir_server_mode(const or_options_t *options)
int server_mode(const or_options_t *options)
Header file for routermode.c.
Header file for selftest.c.
int have_capability_support(void)
void smartlist_add_all(smartlist_t *s1, const smartlist_t *s2)
smartlist_t * smartlist_new(void)
void smartlist_del_keeporder(smartlist_t *sl, int idx)
#define SMARTLIST_FOREACH_BEGIN(sl, type, var)
#define SMARTLIST_FOREACH(sl, type, var, cmd)
int smartlist_split_string(smartlist_t *sl, const char *str, const char *sep, int flags, int max)
struct smartlist_t * PublishServerDescriptor
int ReducedConnectionPadding
dirinfo_type_t PublishServerDescriptor_
struct config_line_t * MyFamily
uint64_t RelayBandwidthBurst
struct config_line_t * ORPort_lines
char * BridgeDistribution
struct config_line_t * ExtORPort_lines
int TestingAuthKeyLifetime
struct config_line_t * MyFamily_lines
int HiddenServiceStatistics
int TestingLinkCertLifetime
uint64_t RelayBandwidthRate
int TestingSigningKeySlop
uint64_t MaxAdvertisedBandwidth
int ReducedCircuitPadding
int ConnDirectionStatistics
char * AccountingRule_option
struct config_line_t * RendConfigLines
struct config_line_t * DirPort_lines
char unix_addr[FLEXIBLE_ARRAY_MEMBER]
entry_port_cfg_t entry_cfg
#define MOCK_IMPL(rv, funcname, arglist)
const char * get_uname(void)
#define IF_BUG_ONCE(cond)
int strcmpstart(const char *s1, const char *s2)
int string_is_utf8(const char *str, size_t len)