mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Move network_liveness_t into circuitstats.h and make it private
This type is only used in one place and never exposed.
This commit is contained in:
parent
e13f59416c
commit
ad52fe7e88
@ -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 */
|
||||
|
15
src/or/or.h
15
src/or/or.h
@ -3733,21 +3733,6 @@ int32_t circuit_build_times_initial_timeout(void);
|
||||
#error "RECENT_CIRCUITS is set too low."
|
||||
#endif
|
||||
|
||||
/** 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;
|
||||
|
||||
typedef struct circuit_build_times_s circuit_build_times_t;
|
||||
|
||||
/********************************* config.c ***************************/
|
||||
|
Loading…
Reference in New Issue
Block a user