diff options
Diffstat (limited to 'src/or/circuitstats.h')
-rw-r--r-- | src/or/circuitstats.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/or/circuitstats.h b/src/or/circuitstats.h index 86116cb7f8..5fe80acfea 100644 --- a/src/or/circuitstats.h +++ b/src/or/circuitstats.h @@ -73,6 +73,21 @@ int circuit_build_times_network_check_live(const circuit_build_times_t *cbt); void circuit_build_times_network_circ_success(circuit_build_times_t *cbt); #ifdef CIRCUITSTATS_PRIVATE +/** Information about the state of our local network connection */ +typedef struct { + /** The timestamp we last completed a TLS handshake or received a cell */ + time_t network_last_live; + /** If the network is not live, how many timeouts has this caused? */ + int nonlive_timeouts; + /** Circular array of circuits that have made it to the first hop. Slot is + * 1 if circuit timed out, 0 if circuit succeeded */ + int8_t *timeouts_after_firsthop; + /** Number of elements allocated for the above array */ + int num_recent_circs; + /** Index into circular array. */ + int after_firsthop_idx; +} network_liveness_t; + /** Structure for circuit build times history */ struct circuit_build_times_s { /** The circular array of recorded build times in milliseconds */ |