tor  0.4.0.0-alpha-dev
tor_api.h
Go to the documentation of this file.
1 /* Copyright (c) 2001 Matej Pfajfar.
2  * Copyright (c) 2001-2004, Roger Dingledine.
3  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4  * Copyright (c) 2007-2018, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
30 #ifndef TOR_API_H
31 #define TOR_API_H
32 
34 
39 
50  int argc, char *argv[]);
51 
52 #ifdef _WIN32
53 typedef SOCKET tor_control_socket_t;
54 #define INVALID_TOR_CONTROL_SOCKET INVALID_SOCKET
55 #else
56 typedef int tor_control_socket_t;
57 #define INVALID_TOR_CONTROL_SOCKET (-1)
58 #endif
59 
63 
71 
87 const char *tor_api_get_provider_version(void);
88 
116 
127 int tor_main(int argc, char **argv);
128 
129 #endif /* !defined(TOR_API_H) */
void tor_main_configuration_free(tor_main_configuration_t *cfg)
Definition: tor_api.c:122
int tor_main_configuration_set_command_line(tor_main_configuration_t *cfg, int argc, char *argv[])
Definition: tor_api.c:91
int tor_main(int argc, char **argv)
int tor_run_main(const tor_main_configuration_t *)
Definition: main.c:1382
tor_control_socket_t tor_main_configuration_setup_control_socket(tor_main_configuration_t *cfg)
Definition: tor_api.c:102
const char * tor_api_get_provider_version(void)
Definition: tor_api.c:139
tor_main_configuration_t * tor_main_configuration_new(void)
Definition: tor_api.c:73