49 return state > best->val;
60 [CIRC_EVENT_FAILED] = -1,
61 [CIRC_EVENT_CLOSED] = -1,
62 [CIRC_EVENT_LAUNCHED] = 1,
63 [CIRC_EVENT_EXTENDED] = 2,
64 [CIRC_EVENT_BUILT] = 3,
66 #define N_CIRC_EVENT_ORDER \
67 (sizeof(circ_event_order) / sizeof(circ_event_order[0]))
79 tor_assert(state >= 0 && (
unsigned)state < N_CIRC_EVENT_ORDER);
80 tor_assert(best->val >= 0 && (
unsigned)best->val < N_CIRC_EVENT_ORDER);
89 log_info(
LD_BTRACK,
"CIRC BEST_%s state %d->%d gid=%"PRIu32, type,
92 best->val = msg->
state;
103 log_info(
LD_BTRACK,
"CIRC BEST_%s evtype %d->%d gid=%"PRIu32, type,
105 best->gid = msg->
gid;
120 log_debug(
LD_BTRACK,
"CIRC gid=%"PRIu32
" state=%d onehop=%d",
133 log_debug(
LD_BTRACK,
"CIRC gid=%"PRIu32
" evtype=%d reason=%d onehop=%d",
146 log_debug(
LD_BTRACK,
"CIRC gid=%"PRIu32
" chan=%"PRIu64
" onehop=%d",
163 btrack_circ_fini(
void)
static btc_best_t best_ap_evtype
static int circ_event_order[]
static btc_best_t best_ap_state
static bool btc_state_better(int state, const btc_best_t *best)
static btc_best_t best_any_evtype
static btc_best_t best_any_state
static bool btc_evtype_better(int state, const btc_best_t *best)
static void btc_reset_bests(void)
Header file for btrack_circuit.c.
Header file for control.c.
Header file for ocirc_event.c.
Master header file for Tor-specific functionality.
struct pubsub_connector_t pubsub_connector_t
#define DISPATCH_ADD_SUB(connector, channel, messagename)
#define DECLARE_SUBSCRIBE(messagename, hookfn)