List all valid options that are scheduled to become obsolete in a
future version. (This is a warning, not a promise.)
+[[opt-list-modules]] **--list-modules**::
+ For each optional module, list whether or not it has been compiled
+ into Tor. (Any module not listed is not optional in this version of Tor.)
+
[[opt-version]] **--version**::
Display Tor version and exit.
{ "--quiet", TAKES_NO_ARGUMENT },
{ "--hush", TAKES_NO_ARGUMENT },
{ "--version", TAKES_NO_ARGUMENT },
+ { "--list-modules", TAKES_NO_ARGUMENT },
{ "--library-versions", TAKES_NO_ARGUMENT },
{ "-h", TAKES_NO_ARGUMENT },
{ "--help", TAKES_NO_ARGUMENT },
}
}
+/** Print all compile-time modules and their enabled/disabled status. */
+static void
+list_enabled_modules(void)
+{
+ printf("%s: %s\n", "dirauth", have_module_dirauth() ? "yes" : "no");
+}
+
/** Last value actually set by resolve_my_address. */
static uint32_t last_resolved_addr = 0;
return 1;
}
+ if (config_line_find(cmdline_only_options, "--list-modules")) {
+ list_enabled_modules();
+ return 1;
+ }
+
if (config_line_find(cmdline_only_options, "--library-versions")) {
printf("Tor version %s. \n", get_version());
printf("Library versions\tCompiled\t\tRuntime\n");
return authdir_mode(options) && options->V3AuthoritativeDir != 0;
}
+#define have_module_dirauth() (1)
+
#else /* HAVE_MODULE_DIRAUTH */
#define authdir_mode(options) (((void)(options)),0)
#define authdir_mode_bridge(options) (((void)(options)),0)
#define authdir_mode_v3(options) (((void)(options)),0)
+#define have_module_dirauth() (0)
+
#endif /* HAVE_MODULE_DIRAUTH */
#endif /* TOR_MODE_H */