Back to index

tor  0.2.3.19-rc
circuituse.h
Go to the documentation of this file.
00001 /* Copyright (c) 2001 Matej Pfajfar.
00002  * Copyright (c) 2001-2004, Roger Dingledine.
00003  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
00004  * Copyright (c) 2007-2012, The Tor Project, Inc. */
00005 /* See LICENSE for licensing information */
00006 
00012 #ifndef _TOR_CIRCUITUSE_H
00013 #define _TOR_CIRCUITUSE_H
00014 
00015 void circuit_expire_building(void);
00016 void circuit_remove_handled_ports(smartlist_t *needed_ports);
00017 int circuit_stream_is_being_handled(entry_connection_t *conn, uint16_t port,
00018                                     int min);
00019 #if 0
00020 int circuit_conforms_to_options(const origin_circuit_t *circ,
00021                                 const or_options_t *options);
00022 #endif
00023 void circuit_build_needed_circs(time_t now);
00024 void circuit_detach_stream(circuit_t *circ, edge_connection_t *conn);
00025 
00026 void circuit_expire_old_circuits_serverside(time_t now);
00027 
00028 void reset_bandwidth_test(void);
00029 int circuit_enough_testing_circs(void);
00030 
00031 void circuit_has_opened(origin_circuit_t *circ);
00032 void circuit_try_attaching_streams(origin_circuit_t *circ);
00033 void circuit_build_failed(origin_circuit_t *circ);
00034 
00036 #define CIRCLAUNCH_ONEHOP_TUNNEL  (1<<0)
00037 
00038 #define CIRCLAUNCH_NEED_UPTIME    (1<<1)
00039 
00040 #define CIRCLAUNCH_NEED_CAPACITY  (1<<2)
00041 
00043 #define CIRCLAUNCH_IS_INTERNAL    (1<<3)
00044 origin_circuit_t *circuit_launch_by_extend_info(uint8_t purpose,
00045                                                 extend_info_t *info,
00046                                                 int flags);
00047 origin_circuit_t *circuit_launch(uint8_t purpose, int flags);
00048 void circuit_reset_failure_count(int timeout);
00049 int connection_ap_handshake_attach_chosen_circuit(entry_connection_t *conn,
00050                                                   origin_circuit_t *circ,
00051                                                   crypt_path_t *cpath);
00052 int connection_ap_handshake_attach_circuit(entry_connection_t *conn);
00053 
00054 void circuit_change_purpose(circuit_t *circ, uint8_t new_purpose);
00055 
00056 int hostname_in_track_host_exits(const or_options_t *options,
00057                                  const char *address);
00058 
00059 #endif
00060