tor  master
Data Structures | Macros | Typedefs | Functions
transports.h File Reference

Headers for transports.c. More...

This graph shows which files directly or indirectly include this file:

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_tget_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)
 

Detailed Description

Headers for transports.c.

Typedef Documentation

◆ transport_t

typedef struct transport_t transport_t

Represents a pluggable transport used by a bridge.

Function Documentation

◆ get_transport_proxy_ports()

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mark_transport_list()

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.

◆ pt_configure_remaining_proxies()

void pt_configure_remaining_proxies ( void  )

Check if any of the managed proxies we are currently trying to configure has anything new to say.

◆ pt_free_all()

void pt_free_all ( void  )

Release all storage held by the pluggable transports subsystem.

◆ pt_get_extra_info_descriptor_string()

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.

Here is the call graph for this function:

◆ pt_get_socks_args_for_proxy_addrport()

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.

Here is the call graph for this function:

◆ pt_prepare_proxy_list_for_config_read()

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.

◆ pt_proxies_configuration_pending()

int pt_proxies_configuration_pending ( void  )

Return true if there are still unconfigured managed proxies, or proxies that need restarting.

Here is the caller graph for this function:

◆ pt_stringify_socks_args()

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.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sweep_proxy_list()

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.

◆ sweep_transport_list()

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.

◆ transport_free_()

void transport_free_ ( transport_t transport)

Free the pluggable transport struct transport.