summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-04-11 10:48:46 -0400
committerNick Mathewson <nickm@torproject.org>2018-04-11 10:48:46 -0400
commit0c8f901ee7c3cfd2351e7f6e723998226fabe190 (patch)
tree57a5e659ec646857bed9c741d8d1fc4a3cea2122 /src/or/or.h
parent6bdfaa8b244ca3e10e57f6d99616af1d5f68fa67 (diff)
parentf9ba0c65467fe80f65b3789365cfac874198a337 (diff)
downloadtor-0c8f901ee7c3cfd2351e7f6e723998226fabe190.tar.gz
tor-0c8f901ee7c3cfd2351e7f6e723998226fabe190.zip
Merge branch 'maint-0.3.3'
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 541b709d89..b845443947 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -586,6 +586,14 @@ typedef enum {
/** True iff the circuit_t c is actually an or_circuit_t */
#define CIRCUIT_IS_ORCIRC(c) (((circuit_t *)(c))->magic == OR_CIRCUIT_MAGIC)
+/** True iff this circuit purpose should count towards the global
+ * pending rate limit (set by MaxClientCircuitsPending). We count all
+ * general purpose circuits, as well as the first step of client onion
+ * service connections (HSDir gets). */
+#define CIRCUIT_PURPOSE_COUNTS_TOWARDS_MAXPENDING(p) \
+ ((p) == CIRCUIT_PURPOSE_C_GENERAL || \
+ (p) == CIRCUIT_PURPOSE_C_HSDIR_GET)
+
/** How many circuits do we want simultaneously in-progress to handle
* a given stream? */
#define MIN_CIRCUITS_HANDLING_STREAM 2