|
@@ -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
|