Tor 0.4.9.0-alpha-dev
Data Structures | Enumerations | Functions
relay_metrics.h File Reference

Header for feature/relay/relay_metrics.c. More...

#include "lib/container/smartlist.h"
#include "lib/metrics/metrics_common.h"

Go to the source code of this file.

Data Structures

struct  relay_metrics_entry_t
 

Enumerations

enum  relay_metrics_key_t {
  RELAY_METRICS_NUM_OOM_BYTES , RELAY_METRICS_NUM_ONIONSKINS , RELAY_METRICS_NUM_SOCKETS , RELAY_METRICS_NUM_GLOBAL_RW_LIMIT ,
  RELAY_METRICS_NUM_DNS , RELAY_METRICS_NUM_DNS_ERRORS , RELAY_METRICS_NUM_TCP_EXHAUSTION , RELAY_METRICS_CONN_COUNTERS ,
  RELAY_METRICS_CONN_GAUGES , RELAY_METRICS_NUM_STREAMS , RELAY_METRICS_CC_COUNTERS , RELAY_METRICS_CC_GAUGES ,
  RELAY_METRICS_NUM_DOS , RELAY_METRICS_NUM_TRAFFIC , RELAY_METRICS_RELAY_FLAGS , RELAY_METRICS_NUM_CIRCUITS ,
  RELAY_METRICS_SIGNING_CERT_EXPIRY , RELAY_METRICS_NUM_EST_REND , RELAY_METRICS_NUM_EST_INTRO , RELAY_METRICS_NUM_INTRO1_CELLS ,
  RELAY_METRICS_NUM_REND1_CELLS , RELAY_METRICS_CIRC_DESTROY_CELL , RELAY_METRICS_CIRC_PROTO_VIOLATION , RELAY_METRICS_CIRC_DROP_CELL
}
 
enum  est_intro_action_t {
  EST_INTRO_SUCCESS , EST_INTRO_MALFORMED , EST_INTRO_UNSUITABLE_CIRCUIT , EST_INTRO_CIRCUIT_DEAD ,
  EST_INTRO_ACTION_COUNT
}
 
enum  est_rend_action_t {
  EST_REND_SUCCESS , EST_REND_UNSUITABLE_CIRCUIT , EST_REND_SINGLE_HOP , EST_REND_MALFORMED ,
  EST_REND_DUPLICATE_COOKIE , EST_REND_CIRCUIT_DEAD , EST_REND_ACTION_COUNT
}
 
enum  intro1_action_t {
  INTRO1_SUCCESS , INTRO1_CIRCUIT_DEAD , INTRO1_MALFORMED , INTRO1_UNKNOWN_SERVICE ,
  INTRO1_RATE_LIMITED , INTRO1_CIRCUIT_REUSED , INTRO1_SINGLE_HOP , INTRO1_ACTION_COUNT
}
 
enum  rend1_action_t {
  REND1_SUCCESS , REND1_UNSUITABLE_CIRCUIT , REND1_MALFORMED , REND1_UNKNOWN_COOKIE ,
  REND1_CIRCUIT_DEAD , REND1_ACTION_COUNT
}
 

Functions

void relay_metrics_init (void)
 
void relay_metrics_free (void)
 
const smartlist_trelay_metrics_get_stores (void)
 
void relay_increment_est_intro_action (est_intro_action_t)
 
void relay_increment_est_rend_action (est_rend_action_t)
 
void relay_increment_intro1_action (intro1_action_t)
 
void relay_increment_rend1_action (rend1_action_t)
 

Detailed Description

Header for feature/relay/relay_metrics.c.

Definition in file relay_metrics.h.

Enumeration Type Documentation

◆ est_intro_action_t

enum est_intro_action_t

Definition at line 89 of file relay_metrics.h.

◆ est_rend_action_t

enum est_rend_action_t

Definition at line 100 of file relay_metrics.h.

◆ intro1_action_t

enum intro1_action_t

Definition at line 113 of file relay_metrics.h.

◆ relay_metrics_key_t

Metrics key for each reported metrics. This key is also used as an index in the base_metrics array.

Enumerator
RELAY_METRICS_NUM_OOM_BYTES 

Number of OOM invocation.

RELAY_METRICS_NUM_ONIONSKINS 

Number of onionskines handled.

RELAY_METRICS_NUM_SOCKETS 

Number of sockets.

RELAY_METRICS_NUM_GLOBAL_RW_LIMIT 

Number of global connection rate limit.

RELAY_METRICS_NUM_DNS 

Number of DNS queries.

RELAY_METRICS_NUM_DNS_ERRORS 

Number of DNS query errors.

RELAY_METRICS_NUM_TCP_EXHAUSTION 

Number of TCP exhaustion reached.

RELAY_METRICS_CONN_COUNTERS 

Connections counters (always going up).

RELAY_METRICS_CONN_GAUGES 

Connections gauges.

RELAY_METRICS_NUM_STREAMS 

Number of streams.

RELAY_METRICS_CC_COUNTERS 

Congestion control counters.

RELAY_METRICS_CC_GAUGES 

Congestion control gauges.

RELAY_METRICS_NUM_DOS 

Denial of Service defenses subsystem.

RELAY_METRICS_NUM_TRAFFIC 

Denial of Service defenses subsystem.

RELAY_METRICS_RELAY_FLAGS 

Relay flags.

RELAY_METRICS_NUM_CIRCUITS 

Numer of circuits.

RELAY_METRICS_SIGNING_CERT_EXPIRY 

Timestamp at which the current online keys will expire.

RELAY_METRICS_NUM_EST_REND 

Number of times we received an EST_REND cell

RELAY_METRICS_NUM_EST_INTRO 

Number of times we received an EST_INTRO cell

RELAY_METRICS_NUM_INTRO1_CELLS 

Number of times we received an INTRO1 cell

RELAY_METRICS_NUM_REND1_CELLS 

Number of times we received a REND1 cell

RELAY_METRICS_CIRC_DESTROY_CELL 

Number of circuit closed by receiving a DESTROY cell.

RELAY_METRICS_CIRC_PROTO_VIOLATION 

Number of circuits closed due to protocol violation.

RELAY_METRICS_CIRC_DROP_CELL 

Number of drop cell seen.

Definition at line 17 of file relay_metrics.h.

◆ rend1_action_t

enum rend1_action_t

Definition at line 127 of file relay_metrics.h.

Function Documentation

◆ relay_increment_est_intro_action()

void relay_increment_est_intro_action ( est_intro_action_t  action)

Definition at line 1090 of file relay_metrics.c.

◆ relay_increment_est_rend_action()

void relay_increment_est_rend_action ( est_rend_action_t  action)

Definition at line 1126 of file relay_metrics.c.

◆ relay_increment_intro1_action()

void relay_increment_intro1_action ( intro1_action_t  action)

Definition at line 1163 of file relay_metrics.c.

◆ relay_increment_rend1_action()

void relay_increment_rend1_action ( rend1_action_t  action)

Definition at line 1201 of file relay_metrics.c.

◆ relay_metrics_free()

void relay_metrics_free ( void  )

Free the relay metrics.

Definition at line 1331 of file relay_metrics.c.

◆ relay_metrics_get_stores()

const smartlist_t * relay_metrics_get_stores ( void  )

Return a list of all the relay metrics stores. This is the function attached to the .get_metrics() member of the subsys_t.

Definition at line 1298 of file relay_metrics.c.

◆ relay_metrics_init()

void relay_metrics_init ( void  )

Initialize the relay metrics.

Definition at line 1321 of file relay_metrics.c.