summaryrefslogtreecommitdiff
path: root/src/or/transports.h
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2012-01-25 18:51:38 +0200
committerGeorge Kadianakis <desnacked@riseup.net>2012-07-03 21:26:03 +0300
commit6173d36340096fc3e188e6cc886c345981e0f303 (patch)
tree6d908f1f72169e74da40d765382859fbd285e2be /src/or/transports.h
parent46434ecf5b6f1ad88deb86fdac044c41ae4b534b (diff)
downloadtor-6173d36340096fc3e188e6cc886c345981e0f303.tar.gz
tor-6173d36340096fc3e188e6cc886c345981e0f303.zip
Move transport-related functions from circuitbuild.c to transports.c.
Move 'transport_t' to transports.h, and all transport-related functions that don't rely on 'bridge_list' to transports.c.
Diffstat (limited to 'src/or/transports.h')
-rw-r--r--src/or/transports.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/or/transports.h b/src/or/transports.h
index 02f159a5d6..f00c7c0938 100644
--- a/src/or/transports.h
+++ b/src/or/transports.h
@@ -11,6 +11,33 @@
#ifndef TOR_TRANSPORTS_H
#define TOR_TRANSPORTS_H
+/** Represents a pluggable transport used by a bridge. */
+typedef struct {
+ /** SOCKS version: One of PROXY_SOCKS4, PROXY_SOCKS5. */
+ int socks_version;
+ /** Name of pluggable transport protocol */
+ char *name;
+ /** Address of proxy */
+ tor_addr_t addr;
+ /** Port of proxy */
+ uint16_t port;
+ /** Boolean: We are re-parsing our transport list, and we are going to remove
+ * this one if we don't find it in the list of configured transports. */
+ unsigned marked_for_removal : 1;
+} transport_t;
+
+void mark_transport_list(void);
+void sweep_transport_list(void);
+void clear_transport_list(void);
+int transport_add_from_config(const tor_addr_t *addr, uint16_t port,
+ const char *name, int socks_ver);
+int transport_add(transport_t *t);
+void transport_free(transport_t *transport);
+transport_t *transport_new(const tor_addr_t *addr, uint16_t port,
+ const char *name, int socks_ver);
+transport_t *transport_get_by_name(const char *name);
+
+
void pt_kickstart_proxy(const smartlist_t *transport_list, char **proxy_argv,
int is_server);