diff options
author | Roger Dingledine <arma@torproject.org> | 2004-03-31 22:02:13 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-03-31 22:02:13 +0000 |
commit | a0b0d169816f819b2c59f56c9503380755fc35dc (patch) | |
tree | 3645d5cb53302d9f5e0d9fe53f40d014603db60a /src/or/or.h | |
parent | 28adda81e6b035d9a592378b9635535bb0b673b6 (diff) | |
download | tor-a0b0d169816f819b2c59f56c9503380755fc35dc.tar tor-a0b0d169816f819b2c59f56c9503380755fc35dc.tar.gz |
Add an ap_bridge function to do a socketpair and skip socks.
This allows us to do a directory connection *through* tor just
as if we're doing it as an application.
Make ap_conns tolerate it when the application sends stuff before
The socks handshake is done (it just buffers it).
Tell directory_initiate_command the length of the payload (because
it might include nuls).
Add a directory_has_arrived function to, for example, start building
the rendezvous service descriptor.
svn:r1412
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/or/or.h b/src/or/or.h index 84ca3e048..0f93a5426 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -793,16 +793,18 @@ void relay_header_unpack(relay_header_t *dest, const char *src); int connection_edge_process_inbuf(connection_t *conn); int connection_edge_destroy(uint16_t circ_id, connection_t *conn); int connection_edge_end(connection_t *conn, char reason, crypt_path_t *cpath_layer); - -int connection_edge_send_command(connection_t *fromconn, circuit_t *circ, int relay_command, - void *payload, int payload_len, crypt_path_t *cpath_layer); - -int connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ, connection_t *conn, - int edge_type, crypt_path_t *layer_hint); +int connection_edge_send_command(connection_t *fromconn, circuit_t *circ, + int relay_command, void *payload, + int payload_len, crypt_path_t *cpath_layer); +int connection_edge_process_relay_cell(cell_t *cell, circuit_t *circ, + connection_t *conn, int edge_type, + crypt_path_t *layer_hint); int connection_edge_finished_flushing(connection_t *conn); int connection_edge_package_raw_inbuf(connection_t *conn); +int connection_ap_make_bridge(char *address, uint16_t port); + void connection_ap_handshake_socks_reply(connection_t *conn, char *reply, int replylen, char success); @@ -843,7 +845,8 @@ int assign_to_cpuworker(connection_t *cpuworker, unsigned char question_type, /********************************* directory.c ***************************/ -void directory_initiate_command(routerinfo_t *router, int purpose, const char *payload); +void directory_initiate_command(routerinfo_t *router, int purpose, + const char *payload, int payload_len); int connection_dir_process_inbuf(connection_t *conn); int connection_dir_finished_flushing(connection_t *conn); @@ -874,6 +877,8 @@ int connection_is_writing(connection_t *conn); void connection_stop_writing(connection_t *conn); void connection_start_writing(connection_t *conn); +void directory_has_arrived(void); + int main(int argc, char *argv[]); /********************************* onion.c ***************************/ |