12 #ifndef TOR_CONNECTION_OR_H
13 #define TOR_CONNECTION_OR_H
40 int reason,
const char *msg);
42 int reason,
const char *msg);
46 const char *id_digest,
48 channel_tls_t *chan));
70 const char *rsa_id_digest,
74 const uint8_t *rsa_peer_id,
81 #define or_handshake_state_free(state) \
82 FREE_AND_NULL(or_handshake_state_t, or_handshake_state_free_, (state))
108 #define var_cell_free(cell) FREE_AND_NULL(var_cell_t, var_cell_free_, (cell))
111 #define MIN_LINK_PROTO_FOR_WIDE_CIRC_IDS 4
112 #define MIN_LINK_PROTO_FOR_CHANNEL_PADDING 5
113 #define MAX_LINK_PROTO MIN_LINK_PROTO_FOR_CHANNEL_PADDING
120 #ifdef CONNECTION_OR_PRIVATE
132 #ifdef TOR_UNIT_TESTS
133 extern int testing__connection_or_pretend_TLSSECRET_is_supported;
or_connection_t * connection_or_connect(const tor_addr_t *_addr, uint16_t port, const char *id_digest, const ed25519_public_key_t *ed_id, channel_tls_t *chan)
int connection_or_client_learned_peer_id(or_connection_t *conn, const uint8_t *rsa_peer_id, const ed25519_public_key_t *ed_peer_id)
void connection_or_init_conn_from_address(or_connection_t *conn, const tor_addr_t *addr, uint16_t port, const char *id_digest, const ed25519_public_key_t *ed_id, int started_here)
const or_connection_t * CONST_TO_OR_CONN(const connection_t *)
void connection_or_event_status(or_connection_t *conn, or_conn_status_event_t tp, int reason)
int is_or_protocol_version_known(uint16_t version)
int connection_or_set_state_open(or_connection_t *conn)
int connection_or_reached_eof(or_connection_t *conn)
int connection_tls_continue_handshake(or_connection_t *conn)
void connection_or_notify_error(or_connection_t *conn, int reason, const char *msg)
void connection_or_write_cell_to_buf(const cell_t *cell, or_connection_t *conn)
int connection_or_process_inbuf(or_connection_t *conn)
void connection_or_clear_identity(or_connection_t *conn)
int connection_or_send_versions(or_connection_t *conn, int v3_plus)
var_cell_t * var_cell_new(uint16_t payload_len)
time_t connection_or_client_used(or_connection_t *conn)
void clear_broken_connection_map(int disable)
void or_handshake_state_free_(or_handshake_state_t *state)
void or_handshake_state_record_var_cell(or_connection_t *conn, or_handshake_state_t *state, const var_cell_t *cell, int incoming)
int var_cell_pack_header(const var_cell_t *cell, char *hdr_out, int wide_circ_ids)
int connection_or_finished_flushing(or_connection_t *conn)
void connection_or_connect_failed(or_connection_t *conn, int reason, const char *msg)
int connection_or_send_netinfo(or_connection_t *conn)
void var_cell_free_(var_cell_t *cell)
int connection_or_single_set_badness_(time_t now, or_connection_t *or_conn, int force)
int connection_tls_start_handshake(or_connection_t *conn, int receiving)
void connection_or_change_state(or_connection_t *conn, uint8_t state)
var_cell_t * var_cell_copy(const var_cell_t *src)
void or_handshake_state_record_cell(or_connection_t *conn, or_handshake_state_t *state, const cell_t *cell, int incoming)
void connection_or_about_to_close(or_connection_t *conn)
or_connection_t * TO_OR_CONN(connection_t *)
void connection_or_report_broken_states(int severity, int domain)
int connection_or_digest_is_known_relay(const char *id_digest)
int connection_or_get_num_circuits(or_connection_t *conn)
int connection_or_flushed_some(or_connection_t *conn)
int connection_or_finished_connecting(or_connection_t *conn)
void cell_pack(packed_cell_t *dest, const cell_t *src, int wide_circ_ids)
const struct ed25519_public_key_t * connection_or_get_alleged_ed25519_id(const or_connection_t *conn)
void connection_or_close_for_error(or_connection_t *orconn, int flush)
void connection_or_update_token_buckets(smartlist_t *conns, const or_options_t *options)
void connection_or_group_set_badness_(smartlist_t *group, int force)
ssize_t connection_or_num_cells_writeable(or_connection_t *conn)
int connection_init_or_handshake_state(or_connection_t *conn, int started_here)
void connection_or_block_renegotiation(or_connection_t *conn)
void connection_or_clear_identity_map(void)
void connection_or_close_normally(or_connection_t *orconn, int flush)
void connection_or_write_var_cell_to_buf(const var_cell_t *cell, or_connection_t *conn)
Header file for orconn_event.c.
#define MOCK_DECL(rv, funcname, arglist)