tor
master
|
Headers for transports.c. More...
Go to the source code of this file.
Data Structures | |
struct | transport_t |
Macros | |
#define | transport_free(tr) FREE_AND_NULL(transport_t, transport_free_, (tr)) |
#define | pt_kickstart_client_proxy(tl, pa) pt_kickstart_proxy(tl, pa, 0) |
#define | pt_kickstart_server_proxy(tl, pa) pt_kickstart_proxy(tl, pa, 1) |
Typedefs | |
typedef struct transport_t | transport_t |
Functions | |
void | mark_transport_list (void) |
void | sweep_transport_list (void) |
MOCK_DECL (int, transport_add_from_config,(const tor_addr_t *addr, uint16_t port, const char *name, int socks_ver)) | |
void | transport_free_ (transport_t *transport) |
MOCK_DECL (transport_t *, transport_get_by_name,(const char *name)) | |
MOCK_DECL (void, pt_kickstart_proxy,(const smartlist_t *transport_list, char **proxy_argv, int is_server)) | |
void | pt_configure_remaining_proxies (void) |
int | pt_proxies_configuration_pending (void) |
char * | pt_get_extra_info_descriptor_string (void) |
void | pt_free_all (void) |
void | pt_prepare_proxy_list_for_config_read (void) |
void | sweep_proxy_list (void) |
smartlist_t * | get_transport_proxy_ports (void) |
char * | pt_stringify_socks_args (const smartlist_t *socks_args) |
char * | pt_get_socks_args_for_proxy_addrport (const tor_addr_t *addr, uint16_t port) |
Headers for transports.c.
typedef struct transport_t transport_t |
Represents a pluggable transport used by a bridge.
smartlist_t* get_transport_proxy_ports | ( | void | ) |
Return a smartlist containing the ports where our pluggable transports are listening.
XXX assume that external proxy ports have been forwarded manually
void mark_transport_list | ( | void | ) |
Mark every entry of the transport list to be removed on our next call to sweep_transport_list unless it has first been un-marked.
void pt_configure_remaining_proxies | ( | void | ) |
Check if any of the managed proxies we are currently trying to configure has anything new to say.
void pt_free_all | ( | void | ) |
Release all storage held by the pluggable transports subsystem.
char* pt_get_extra_info_descriptor_string | ( | void | ) |
Return the pluggable transport string that we should display in our extra-info descriptor. If we shouldn't display such a string, or we have nothing to display, return NULL. The string is allocated on the heap and it's the responsibility of the caller to free it.
char* pt_get_socks_args_for_proxy_addrport | ( | const tor_addr_t * | addr, |
uint16_t | port | ||
) |
Return a string of the SOCKS arguments that we should pass to the pluggable transports proxy in addr:port according to 180_pluggable_transport.txt. The string is allocated on the heap and it's the responsibility of the caller to free it after use.
void pt_prepare_proxy_list_for_config_read | ( | void | ) |
Tor will read its config. Prepare the managed proxy list so that proxies not used in the new config will shutdown, and proxies that need to spawn different transports will do so.
int pt_proxies_configuration_pending | ( | void | ) |
Return true if there are still unconfigured managed proxies, or proxies that need restarting.
char* pt_stringify_socks_args | ( | const smartlist_t * | socks_args | ) |
Stringify the SOCKS arguments in socks_args according to 180_pluggable_transport.txt. The string is allocated on the heap and it's the responsibility of the caller to free it after use.
void sweep_proxy_list | ( | void | ) |
The tor config was read. Destroy all managed proxies that were marked by a previous call to prepare_proxy_list_for_config_read() and are not used by the new config.
void sweep_transport_list | ( | void | ) |
Remove every entry of the transport list that was marked with mark_transport_list if it has not subsequently been un-marked.
void transport_free_ | ( | transport_t * | transport | ) |
Free the pluggable transport struct transport.