Closes ticket 26947.
--- /dev/null
+ o Minor features (in-process API):
+ - The tor_api now has a function that returns the name and version
+ of the backend implementing the API. Closes ticket 26947.
raw_free(cfg);
}
+const char *
+tor_api_get_provider_version(void)
+{
+ return "tor " VERSION;
+}
+
/* Main entry point for the Tor process. Called from main().
*
* This function is distinct from main() only so we can link main.c into
tor_main_configuration_free(cfg);
return rv;
}
-
*/
void tor_main_configuration_free(tor_main_configuration_t *cfg);
+/**
+ * Return the name and version of the software implementing the tor_api
+ * functionality. Current implementors are "tor" and "libtorrunner".
+ *
+ * Note that if you're using libtorrunner, you'll see the version of
+ * libtorrunner, not the version of Tor that it's invoking for you.
+ *
+ * Added in Tor 0.3.5.1-alpha.
+ **/
+const char *tor_api_get_provider_version(void);
+
/**
* Run the tor process, as if from the command line.
*
int tor_main(int argc, char **argv);
#endif /* !defined(TOR_API_H) */
-
static void child(const tor_main_configuration_t *cfg)
__attribute__((noreturn));
+const char *
+tor_api_get_provider_version(void)
+{
+ return "libtorrunner " VERSION;
+}
+
int
tor_run_main(const tor_main_configuration_t *cfg)
{
abort(); /* Unreachable */
}
}
-