Tor
0.4.7.0-alpha-dev
|
Bootstrap tracker for origin circuits. More...
#include "core/or/or.h"
#include "core/or/ocirc_event.h"
#include "feature/control/btrack_circuit.h"
#include "feature/control/control.h"
#include "lib/log/log.h"
Go to the source code of this file.
Data Structures | |
struct | btc_best_t |
Macros | |
#define | N_CIRC_EVENT_ORDER (sizeof(circ_event_order) / sizeof(circ_event_order[0])) |
Functions | |
static void | btc_reset_bests (void) |
static bool | btc_state_better (int state, const btc_best_t *best) |
static bool | btc_evtype_better (int state, const btc_best_t *best) |
static bool | btc_update_state (const ocirc_state_msg_t *msg, btc_best_t *best, const char *type) |
static bool | btc_update_evtype (const ocirc_cevent_msg_t *msg, btc_best_t *best, const char *type) |
DECLARE_SUBSCRIBE (ocirc_state, btc_state_rcvr) | |
DECLARE_SUBSCRIBE (ocirc_cevent, btc_cevent_rcvr) | |
DECLARE_SUBSCRIBE (ocirc_chan, btc_chan_rcvr) | |
static void | btc_state_rcvr (const msg_t *msg, const ocirc_state_msg_t *arg) |
static void | btc_cevent_rcvr (const msg_t *msg, const ocirc_cevent_msg_t *arg) |
static void | btc_chan_rcvr (const msg_t *msg, const ocirc_chan_msg_t *arg) |
int | btrack_circ_add_pubsub (pubsub_connector_t *connector) |
void | btrack_circ_fini (void) |
Variables | |
static btc_best_t | best_any_state = { 0, -1 } |
static btc_best_t | best_ap_state = { 0, -1 } |
static btc_best_t | best_any_evtype = { 0, -1 } |
static btc_best_t | best_ap_evtype = { 0, -1 } |
static int | circ_event_order [] |
Bootstrap tracker for origin circuits.
Track state changes of origin circuits, as published by the circuit subsystem.
Definition in file btrack_circuit.c.
|
static |
True if state is a "better" origin circuit event status than best->val
Definition at line 72 of file btrack_circuit.c.
|
static |
Reset cached "best" values
Definition at line 37 of file btrack_circuit.c.
|
static |
True if state is a "better" origin circuit state than best->val
Definition at line 47 of file btrack_circuit.c.
|
static |
GID and status of the best origin circuit we've seen so far
Definition at line 31 of file btrack_circuit.c.
Referenced by btc_reset_bests().
|
static |
GID and state of the best origin circuit we've seen so far
Definition at line 27 of file btrack_circuit.c.
Referenced by btc_reset_bests().
|
static |
GID and status of the best application circuit we've seen so far
Definition at line 33 of file btrack_circuit.c.
Referenced by btc_reset_bests().
|
static |
GID and state of the best application circuit we've seen so far
Definition at line 29 of file btrack_circuit.c.
Referenced by btc_reset_bests().
|
static |
Definine an ordering on circuit status events
The CIRC_EVENT_ constants aren't sorted in a useful order, so this array helps to decode them. This approach depends on the statuses being nonnegative and dense.
Definition at line 59 of file btrack_circuit.c.