Tor  0.4.7.0-alpha-dev
Macros | Functions | Variables
btrack_orconn_cevent.c File Reference

Emit bootstrap status events for OR connections. More...

#include <stdbool.h>
#include "core/or/or.h"
#include "core/or/orconn_event.h"
#include "feature/control/btrack_orconn.h"
#include "feature/control/btrack_orconn_cevent.h"
#include "feature/control/control_events.h"

Go to the source code of this file.

Functions

static bool using_pt (const bt_orconn_t *bto)
 
static bool using_proxy (const bt_orconn_t *bto)
 
void bto_cevent_anyconn (const bt_orconn_t *bto)
 
void bto_cevent_apconn (const bt_orconn_t *bto)
 
void bto_cevent_reset (void)
 

Variables

static bool bto_first_orconn = false
 

Detailed Description

Emit bootstrap status events for OR connections.

We do some decoding of the raw OR_CONN_STATE_* values. For example, OR_CONN_STATE_CONNECTING means the first TCP connect() completing, regardless of whether it's directly to a relay instead of a proxy or a PT.

Definition in file btrack_orconn_cevent.c.

Function Documentation

◆ bto_cevent_anyconn()

void bto_cevent_anyconn ( const bt_orconn_t *  bto)

Emit control events when we have updated our idea of the best state that any OR connection has reached.

Do some decoding of the ORCONN states depending on whether a PT or a proxy is in use.

Definition at line 63 of file btrack_orconn_cevent.c.

Referenced by bto_update_bests().

◆ bto_cevent_apconn()

void bto_cevent_apconn ( const bt_orconn_t *  bto)

Emit control events when we have updated our idea of the best state that any application circuit OR connection has reached.

Do some decoding of the ORCONN states depending on whether a PT or a proxy is in use.

Definition at line 114 of file btrack_orconn_cevent.c.

Referenced by bto_update_bests().

◆ bto_cevent_reset()

void bto_cevent_reset ( void  )

Forget that we completed our first OR connection

Definition at line 158 of file btrack_orconn_cevent.c.

Referenced by btrack_orconn_fini().

◆ using_proxy()

static bool using_proxy ( const bt_orconn_t *  bto)
static

Is the ORCONN using a non-PT proxy?

Definition at line 42 of file btrack_orconn_cevent.c.

◆ using_pt()

static bool using_pt ( const bt_orconn_t *  bto)
static

Is the ORCONN using a pluggable transport?

Definition at line 35 of file btrack_orconn_cevent.c.

Referenced by bto_cevent_anyconn(), and bto_cevent_apconn().

Variable Documentation

◆ bto_first_orconn

bool bto_first_orconn = false
static

Have we completed our first OR connection?

Block display of application circuit progress until we do, to avoid some misleading behavior of jumping to high progress.

Definition at line 31 of file btrack_orconn_cevent.c.

Referenced by bto_cevent_apconn(), and bto_cevent_reset().