aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuituse.h
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2010-07-22 10:03:40 +0200
committerSebastian Hahn <sebastian@torproject.org>2010-07-27 07:58:14 +0200
commit01c7b60a8063580fff7ad48adac3d1905df01013 (patch)
tree193ff48b65f7d538949d950370e11fea5c86eeae /src/or/circuituse.h
parent174a88dd79ecf3b6c76d63d44bef3e47378777ee (diff)
downloadtor-01c7b60a8063580fff7ad48adac3d1905df01013.tar.gz
tor-01c7b60a8063580fff7ad48adac3d1905df01013.zip
Create circuituse.h
Diffstat (limited to 'src/or/circuituse.h')
-rw-r--r--src/or/circuituse.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/or/circuituse.h b/src/or/circuituse.h
new file mode 100644
index 0000000000..269b6c5f8f
--- /dev/null
+++ b/src/or/circuituse.h
@@ -0,0 +1,53 @@
+/* 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 circuituse.h
+ * \brief Header file for circuituse.c.
+ **/
+
+#ifndef _TOR_CIRCUITUSE_H
+#define _TOR_CIRCUITUSE_H
+
+void circuit_expire_building(time_t now);
+void circuit_remove_handled_ports(smartlist_t *needed_ports);
+int circuit_stream_is_being_handled(edge_connection_t *conn, uint16_t port,
+ int min);
+int circuit_conforms_to_options(const origin_circuit_t *circ,
+ const or_options_t *options);
+void circuit_build_needed_circs(time_t now);
+void circuit_detach_stream(circuit_t *circ, edge_connection_t *conn);
+
+void circuit_expire_old_circuits_serverside(time_t now);
+
+void reset_bandwidth_test(void);
+int circuit_enough_testing_circs(void);
+
+void circuit_has_opened(origin_circuit_t *circ);
+void circuit_build_failed(origin_circuit_t *circ);
+
+/** Flag to set when a circuit should have only a single hop. */
+#define CIRCLAUNCH_ONEHOP_TUNNEL (1<<0)
+/** Flag to set when a circuit needs to be built of high-uptime nodes */
+#define CIRCLAUNCH_NEED_UPTIME (1<<1)
+/** Flag to set when a circuit needs to be built of high-capacity nodes */
+#define CIRCLAUNCH_NEED_CAPACITY (1<<2)
+/** Flag to set when the last hop of a circuit doesn't need to be an
+ * exit node. */
+#define CIRCLAUNCH_IS_INTERNAL (1<<3)
+origin_circuit_t *circuit_launch_by_extend_info(uint8_t purpose,
+ extend_info_t *info,
+ int flags);
+origin_circuit_t *circuit_launch_by_router(uint8_t purpose,
+ routerinfo_t *exit, int flags);
+void circuit_reset_failure_count(int timeout);
+int connection_ap_handshake_attach_chosen_circuit(edge_connection_t *conn,
+ origin_circuit_t *circ,
+ crypt_path_t *cpath);
+int connection_ap_handshake_attach_circuit(edge_connection_t *conn);
+
+#endif
+