Merge remote-tracking branch 'public/bug10063'

This commit is contained in:
Nick Mathewson 2013-10-31 14:43:20 -04:00
commit 9bcd93a364
12 changed files with 1576 additions and 1529 deletions

1537
src/or/circpathbias.c Normal file

File diff suppressed because it is too large Load Diff

29
src/or/circpathbias.h Normal file
View File

@ -0,0 +1,29 @@
/* Copyright (c) 2001 Matej Pfajfar.
* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2013, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* \file circuitbuild.h
* \brief Header file for circuitbuild.c.
**/
#ifndef TOR_CIRCPATHBIAS_H
#define TOR_CIRCPATHBIAS_H
double pathbias_get_extreme_rate(const or_options_t *options);
double pathbias_get_extreme_use_rate(const or_options_t *options);
int pathbias_get_dropguards(const or_options_t *options);
void pathbias_count_timeout(origin_circuit_t *circ);
void pathbias_count_build_success(origin_circuit_t *circ);
int pathbias_count_build_attempt(origin_circuit_t *circ);
int pathbias_check_close(origin_circuit_t *circ, int reason);
int pathbias_check_probe_response(circuit_t *circ, const cell_t *cell);
void pathbias_count_use_attempt(origin_circuit_t *circ);
void pathbias_mark_use_success(origin_circuit_t *circ);
void pathbias_mark_use_rollback(origin_circuit_t *circ);
const char *pathbias_state_to_string(path_state_t state);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -57,16 +57,6 @@ const char *build_state_get_exit_nickname(cpath_build_state_t *state);
const node_t *choose_good_entry_server(uint8_t purpose, const node_t *choose_good_entry_server(uint8_t purpose,
cpath_build_state_t *state); cpath_build_state_t *state);
double pathbias_get_extreme_rate(const or_options_t *options);
double pathbias_get_extreme_use_rate(const or_options_t *options);
int pathbias_get_dropguards(const or_options_t *options);
void pathbias_count_timeout(origin_circuit_t *circ);
int pathbias_check_close(origin_circuit_t *circ, int reason);
int pathbias_check_probe_response(circuit_t *circ, const cell_t *cell);
void pathbias_count_use_attempt(origin_circuit_t *circ);
void pathbias_mark_use_success(origin_circuit_t *circ);
void pathbias_mark_use_rollback(origin_circuit_t *circ);
const char *pathbias_state_to_string(path_state_t state);
#endif #endif

View File

@ -11,6 +11,7 @@
#define CIRCUITLIST_PRIVATE #define CIRCUITLIST_PRIVATE
#include "or.h" #include "or.h"
#include "channel.h" #include "channel.h"
#include "circpathbias.h"
#include "circuitbuild.h" #include "circuitbuild.h"
#include "circuitlist.h" #include "circuitlist.h"
#include "circuituse.h" #include "circuituse.h"

View File

@ -12,6 +12,7 @@
#include "or.h" #include "or.h"
#include "addressmap.h" #include "addressmap.h"
#include "channel.h" #include "channel.h"
#include "circpathbias.h"
#include "circuitbuild.h" #include "circuitbuild.h"
#include "circuitlist.h" #include "circuitlist.h"
#include "circuitstats.h" #include "circuitstats.h"

View File

@ -14,6 +14,7 @@
#include "addressmap.h" #include "addressmap.h"
#include "buffers.h" #include "buffers.h"
#include "channel.h" #include "channel.h"
#include "circpathbias.h"
#include "circuitlist.h" #include "circuitlist.h"
#include "circuituse.h" #include "circuituse.h"
#include "config.h" #include "config.h"

View File

@ -13,6 +13,7 @@
**/ **/
#include "or.h" #include "or.h"
#include "circpathbias.h"
#include "circuitbuild.h" #include "circuitbuild.h"
#include "circuitstats.h" #include "circuitstats.h"
#include "config.h" #include "config.h"

View File

@ -34,6 +34,7 @@ LIBTOR_A_SOURCES = \
src/or/buffers.c \ src/or/buffers.c \
src/or/channel.c \ src/or/channel.c \
src/or/channeltls.c \ src/or/channeltls.c \
src/or/circpathbias.c \
src/or/circuitbuild.c \ src/or/circuitbuild.c \
src/or/circuitlist.c \ src/or/circuitlist.c \
src/or/circuitmux.c \ src/or/circuitmux.c \
@ -134,6 +135,7 @@ ORHEADERS = \
src/or/buffers.h \ src/or/buffers.h \
src/or/channel.h \ src/or/channel.h \
src/or/channeltls.h \ src/or/channeltls.h \
src/or/circpathbias.h \
src/or/circuitbuild.h \ src/or/circuitbuild.h \
src/or/circuitlist.h \ src/or/circuitlist.h \
src/or/circuitmux.h \ src/or/circuitmux.h \

View File

@ -15,6 +15,7 @@
#include "addressmap.h" #include "addressmap.h"
#include "buffers.h" #include "buffers.h"
#include "channel.h" #include "channel.h"
#include "circpathbias.h"
#include "circuitbuild.h" #include "circuitbuild.h"
#include "circuitlist.h" #include "circuitlist.h"
#include "circuituse.h" #include "circuituse.h"

View File

@ -8,6 +8,7 @@
**/ **/
#include "or.h" #include "or.h"
#include "circpathbias.h"
#include "circuitbuild.h" #include "circuitbuild.h"
#include "circuitlist.h" #include "circuitlist.h"
#include "circuituse.h" #include "circuituse.h"

View File

@ -10,6 +10,7 @@
#define RENDSERVICE_PRIVATE #define RENDSERVICE_PRIVATE
#include "or.h" #include "or.h"
#include "circpathbias.h"
#include "circuitbuild.h" #include "circuitbuild.h"
#include "circuitlist.h" #include "circuitlist.h"
#include "circuituse.h" #include "circuituse.h"