diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2010-07-22 10:50:34 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2010-07-27 07:58:15 +0200 |
commit | 0d33120c26cc4e9c7705d003e215a53143b41df7 (patch) | |
tree | ad3273dc44edee17663fe0c65a8e0ba286944026 /src/or/connection_or.h | |
parent | 78b6a4650b8ea90d99e49aff2a2c20df461bb127 (diff) | |
download | tor-0d33120c26cc4e9c7705d003e215a53143b41df7.tar.gz tor-0d33120c26cc4e9c7705d003e215a53143b41df7.zip |
Create connection_or.h
Diffstat (limited to 'src/or/connection_or.h')
-rw-r--r-- | src/or/connection_or.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/or/connection_or.h b/src/or/connection_or.h new file mode 100644 index 0000000000..8e3723c154 --- /dev/null +++ b/src/or/connection_or.h @@ -0,0 +1,59 @@ +/* Copyright (c) 2001 Matej Pfajfar. + * Copyright (c) 2001-2004, Roger Dingledine. + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2010, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +/** + * \file connection_or.h + * \brief Header file for connection_or.c. + **/ + +#ifndef _TOR_CONNECTION_OR_H +#define _TOR_CONNECTION_OR_H + +void connection_or_remove_from_identity_map(or_connection_t *conn); +void connection_or_clear_identity_map(void); +or_connection_t *connection_or_get_for_extend(const char *digest, + const tor_addr_t *target_addr, + const char **msg_out, + int *launch_out); +void connection_or_set_bad_connections(void); + +int connection_or_reached_eof(or_connection_t *conn); +int connection_or_process_inbuf(or_connection_t *conn); +int connection_or_flushed_some(or_connection_t *conn); +int connection_or_finished_flushing(or_connection_t *conn); +int connection_or_finished_connecting(or_connection_t *conn); +int connection_or_digest_is_known_relay(const char *id_digest); + +void connection_or_connect_failed(or_connection_t *conn, + int reason, const char *msg); +or_connection_t *connection_or_connect(const tor_addr_t *addr, uint16_t port, + const char *id_digest); + +int connection_tls_start_handshake(or_connection_t *conn, int receiving); +int connection_tls_continue_handshake(or_connection_t *conn); + +void or_handshake_state_free(or_handshake_state_t *state); +int connection_or_set_state_open(or_connection_t *conn); +void connection_or_write_cell_to_buf(const cell_t *cell, + or_connection_t *conn); +void connection_or_write_var_cell_to_buf(const var_cell_t *cell, + or_connection_t *conn); +int connection_or_send_destroy(circid_t circ_id, or_connection_t *conn, + int reason); +int connection_or_send_netinfo(or_connection_t *conn); +int connection_or_send_cert(or_connection_t *conn); +int connection_or_send_link_auth(or_connection_t *conn); +int connection_or_compute_link_auth_hmac(or_connection_t *conn, + char *hmac_out); +int is_or_protocol_version_known(uint16_t version); + +void cell_pack(packed_cell_t *dest, const cell_t *src); +void var_cell_pack_header(const var_cell_t *cell, char *hdr_out); +var_cell_t *var_cell_new(uint16_t payload_len); +void var_cell_free(var_cell_t *cell); + +#endif + |