diff options
author | Nick Mathewson <nickm@torproject.org> | 2013-06-14 01:45:46 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2013-06-14 01:45:46 -0400 |
commit | 8b6d0bd99cf233560f7e704a35e4f64a5271bfb1 (patch) | |
tree | 2fd141a96400eacb06b2744b7ca78cea2cf7c997 /src/or/or.h | |
parent | 82fea1b0dffe2cb808e997b891106651d6a7bb97 (diff) | |
parent | 79cdf81ec12c4f692db7c88e5f94a8419dfcea62 (diff) | |
download | tor-8b6d0bd99cf233560f7e704a35e4f64a5271bfb1.tar.gz tor-8b6d0bd99cf233560f7e704a35e4f64a5271bfb1.zip |
Merge branch 'circuit_queue_cap-0.2.4-squashed' into maint-0.2.4
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h index ab5e3aaad9..935da538a1 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -541,6 +541,8 @@ typedef enum { #define CIRCUIT_PURPOSE_IS_ESTABLISHED_REND(p) \ ((p) == CIRCUIT_PURPOSE_C_REND_JOINED || \ (p) == CIRCUIT_PURPOSE_S_REND_JOINED) +/** True iff the circuit_t c is actually an or_circuit_t */ +#define CIRCUIT_IS_ORCIRC(c) (((circuit_t *)(c))->magic == OR_CIRCUIT_MAGIC) /** How many circuits do we want simultaneously in-progress to handle * a given stream? */ @@ -818,6 +820,13 @@ typedef enum { /** Amount to increment a stream window when we get a stream SENDME. */ #define STREAMWINDOW_INCREMENT 50 +/** Maximum number of queued cells on a circuit for which we are the + * midpoint before we give up and kill it. This must be >= circwindow + * to avoid killing innocent circuits, and >= circwindow*2 to give + * leaky-pipe a chance for being useful someday. + */ +#define ORCIRC_MAX_MIDDLE_CELLS (21*(CIRCWINDOW_START_MAX)/10) + /* Cell commands. These values are defined in tor-spec.txt. */ #define CELL_PADDING 0 #define CELL_CREATE 1 |