40#define BTRACK_ORCONN_PRIVATE
73 if (bto->state < best->state)
79 if (bto->state > best->state) {
80 log_info(
LD_BTRACK,
"ORCONN BEST_%s state %d->%d gid=%"PRIu64, type,
81 best->state, bto->state, bto->gid);
82 best->state = bto->state;
124 log_debug(
LD_BTRACK,
"ORCONN gid=%"PRIu64
" chan=%"PRIu64
125 " proxy_type=%d state=%d",
128 bto->state = arg->
state;
143 case OR_CONN_EVENT_FAILED:
144 case OR_CONN_EVENT_CLOSED:
145 log_info(
LD_BTRACK,
"ORCONN DELETE gid=%"PRIu64
" status=%d reason=%d",
165 if (!bto->is_orig || (bto->is_onehop && !arg->
onehop)) {
166 log_debug(
LD_BTRACK,
"ORCONN LAUNCH chan=%"PRIu64
" onehop=%d",
171 bto->is_onehop =
false;
static bool bto_update_best(const bt_orconn_t *bto, bto_best_t *best, const char *type)
int btrack_orconn_init(void)
static bto_best_t best_any
static void bto_chan_rcvr(const msg_t *msg, const ocirc_chan_msg_t *arg)
static void bto_state_rcvr(const msg_t *msg, const orconn_state_msg_t *arg)
static void bto_status_rcvr(const msg_t *msg, const orconn_status_msg_t *arg)
static bto_best_t best_ap
void btrack_orconn_fini(void)
static void bto_reset_bests(void)
static void bto_update_bests(const bt_orconn_t *bto)
Header file for btrack_orconn.c.
void bto_cevent_reset(void)
void bto_cevent_anyconn(const bt_orconn_t *bto)
void bto_cevent_apconn(const bt_orconn_t *bto)
Header file for btrack_orconn_cevent.c.
void bto_clear_maps(void)
bt_orconn_t * bto_find_or_new(uint64_t gid, uint64_t chan)
void bto_delete(uint64_t gid)
Header file for btrack_orconn_maps.c.
Header file for ocirc_event.c.
Master header file for Tor-specific functionality.
Header file for orconn_event.c.
Header for OO publish-subscribe functionality.
struct pubsub_connector_t pubsub_connector_t
#define DISPATCH_ADD_SUB(connector, channel, messagename)
#define DECLARE_SUBSCRIBE(messagename, hookfn)