diff options
author | George Kadianakis <desnacked@gmail.com> | 2011-07-18 02:19:38 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@gmail.com> | 2011-07-18 02:19:38 +0200 |
commit | d8c04c7ea52bc1ffbeec60d614970eccab3c9b4f (patch) | |
tree | 33edfacfdbb0ca51d4f737b8d24e31f9713acd10 /src/or/transports.h | |
parent | 86b20e0d8ac0cc87cf85e34666d6cd25a9657521 (diff) | |
download | tor-d8c04c7ea52bc1ffbeec60d614970eccab3c9b4f.tar.gz tor-d8c04c7ea52bc1ffbeec60d614970eccab3c9b4f.zip |
Renamed pluggable_transports.[ch] to transports.[ch].
Diffstat (limited to 'src/or/transports.h')
-rw-r--r-- | src/or/transports.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/or/transports.h b/src/or/transports.h new file mode 100644 index 0000000000..80d5429e70 --- /dev/null +++ b/src/or/transports.h @@ -0,0 +1,59 @@ +/* Copyright (c) 2003-2004, Roger Dingledine + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2011, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +/** + * \file pluggable_transpots.h + * \brief Headers for pluggable_transpots.c + **/ + +#ifndef TOR_PLUGGABLE_TRANSPORTS_H +#define TOR_PLUGGABLE_TRANSPORTS_H + +int pt_managed_launch_proxy(const char *method, + char **proxy_argv, int is_server); + +#define pt_managed_launch_client_proxy(m, pa) \ + pt_managed_launch_proxy(m, pa, 0) +#define pt_managed_launch_server_proxy(m, pa) \ + pt_managed_launch_proxy(m, pa, 1) + +void pt_configure_remaining_proxies(void); + +int pt_proxies_configuration_pending(void); + +void pt_free_all(void); + +#ifdef PT_PRIVATE +/** State of the managed proxy configuration protocol. */ +enum pt_proto_state { + PT_PROTO_INFANT, /* was just born */ + PT_PROTO_ACCEPTING_METHODS, /* accepting methods */ + PT_PROTO_CONFIGURED, /* configured successfully */ + PT_PROTO_COMPLETED, /* configure and registered its transports */ + PT_PROTO_BROKEN +}; + +/** Structure containing information of a managed proxy. */ +typedef struct { + enum pt_proto_state conf_state; /* the current configuration state */ + int conf_protocol; /* the configuration protocol version used */ + + FILE *stdout; /* a stream to its stdout + (closed in managed_proxy_destroy()) */ + + smartlist_t *transports; /* list of transports this proxy spawns */ +} managed_proxy_t; + +int parse_cmethod_line(char *line, managed_proxy_t *mp); +int parse_smethod_line(char *line, managed_proxy_t *mp); + +int parse_version(char *line, managed_proxy_t *mp); +void parse_env_error(char *line); +void handle_proxy_line(char *line, managed_proxy_t *mp); + +#endif + +#endif + |