diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-08-01 10:36:10 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-08-01 11:01:52 -0400 |
commit | c77fe82155c7ed862358f9869e0dcb1ba8772f83 (patch) | |
tree | 0b4ccb39f494e966c5276d05c4033e87cc569fc8 /src/feature/api/tor_api.h | |
parent | 9a89450b6d1734fb8e015093353a5d0568b41b79 (diff) | |
download | tor-c77fe82155c7ed862358f9869e0dcb1ba8772f83.tar.gz tor-c77fe82155c7ed862358f9869e0dcb1ba8772f83.zip |
Add API for creating an owning controller FD and passing it to tor_main
Diffstat (limited to 'src/feature/api/tor_api.h')
-rw-r--r-- | src/feature/api/tor_api.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/feature/api/tor_api.h b/src/feature/api/tor_api.h index 5133e3cec6..0e22ced2d7 100644 --- a/src/feature/api/tor_api.h +++ b/src/feature/api/tor_api.h @@ -49,6 +49,18 @@ tor_main_configuration_t *tor_main_configuration_new(void); int tor_main_configuration_set_command_line(tor_main_configuration_t *cfg, int argc, char *argv[]); +#ifdef _WIN32 +typedef SOCKET tor_control_socket_t; +#define INVALID_TOR_CONTROL_SOCKET INVALID_SOCKET +#else +typedef int tor_control_socket_t; +#define INVALID_TOR_CONTROL_SOCKET (-1) +#endif + +/** DOCDOC */ +tor_control_socket_t tor_main_configuration_setup_control_socket( + tor_main_configuration_t *cfg); + /** * Release all storage held in <b>cfg</b>. * |