Commit 01c7b60a authored by Sebastian Hahn's avatar Sebastian Hahn
Browse files

Create circuituse.h

parent 174a88dd
......@@ -14,6 +14,7 @@
#include "or.h"
#include "circuitbuild.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "router.h"
#include "routerlist.h"
#include "crypto.h"
......
......@@ -12,6 +12,7 @@
#include "or.h"
#include "circuitbuild.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "rendclient.h"
#include "rendcommon.h"
#include "routerlist.h"
......
......@@ -12,6 +12,7 @@
#include "or.h"
#include "circuitbuild.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "rendclient.h"
#include "rendcommon.h"
#include "rendservice.h"
......
/* 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
......@@ -14,6 +14,7 @@
#include "buffers.h"
#include "circuitbuild.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "dnsserv.h"
#include "geoip.h"
#include "rendclient.h"
......
......@@ -12,6 +12,7 @@
#include "or.h"
#include "buffers.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "dnsserv.h"
#include "rendclient.h"
#include "rendcommon.h"
......
......@@ -14,6 +14,7 @@
#include "buffers.h"
#include "circuitbuild.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "dnsserv.h"
#include "geoip.h"
#include "router.h"
......
......@@ -13,6 +13,7 @@
#include "or.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "router.h"
#include "ht.h"
#ifdef HAVE_EVENT2_DNS_H
......
......@@ -15,6 +15,7 @@
#include "buffers.h"
#include "circuitbuild.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "dnsserv.h"
#include "geoip.h"
#include "rendclient.h"
......
......@@ -3055,45 +3055,6 @@ typedef struct {
double close_ms;
} circuit_build_times_t;
/********************************* circuituse.c ************************/
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);
/********************************* command.c ***************************/
void command_process_cell(cell_t *cell, or_connection_t *conn);
......
......@@ -10,6 +10,7 @@
#include "or.h"
#include "circuitbuild.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "rendclient.h"
#include "rendcommon.h"
#include "routerlist.h"
......
......@@ -10,6 +10,7 @@
#include "or.h"
#include "circuitbuild.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "rendclient.h"
#include "rendcommon.h"
#include "rendservice.h"
......
......@@ -11,6 +11,7 @@
#include "or.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "router.h"
#include "routerlist.h"
#include "ht.h"
......
......@@ -8,6 +8,7 @@
#include "or.h"
#include "circuitlist.h"
#include "circuituse.h"
#include "geoip.h"
#include "router.h"
#include "routerlist.h"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment