tor  0.4.2.1-alpha-dev
Macros | Functions | Variables
hs_dos.c File Reference
#include "core/or/or.h"
#include "app/config/config.h"
#include "core/or/circuitlist.h"
#include "feature/hs/hs_circuitmap.h"
#include "feature/nodelist/networkstatus.h"
#include "feature/relay/routermode.h"
#include "lib/evloop/token_bucket.h"
#include "feature/hs/hs_dos.h"

Go to the source code of this file.

Macros

#define HS_DOS_PRIVATE
 
#define HS_DOS_INTRODUCE_DEFAULT_CELL_RATE_PER_SEC   25
 
#define HS_DOS_INTRODUCE_DEFAULT_CELL_BURST_PER_SEC   200
 
#define HS_DOS_INTRODUCE_ENABLED_DEFAULT   0
 

Functions

STATIC uint32_t get_intro2_enable_consensus_param (const networkstatus_t *ns)
 
STATIC uint32_t get_intro2_rate_consensus_param (const networkstatus_t *ns)
 
STATIC uint32_t get_intro2_burst_consensus_param (const networkstatus_t *ns)
 
static void update_intro_circuits (void)
 
static void set_consensus_parameters (const networkstatus_t *ns)
 
void hs_dos_setup_default_intro2_defenses (or_circuit_t *circ)
 
void hs_dos_consensus_has_changed (const networkstatus_t *ns)
 
bool hs_dos_can_send_intro2 (or_circuit_t *s_intro_circ)
 
void hs_dos_init (void)
 

Variables

static uint32_t consensus_param_introduce_rate_per_sec
 
static uint32_t consensus_param_introduce_burst_per_sec
 
static uint32_t consensus_param_introduce_defense_enabled
 

Detailed Description

Implement denial of service mitigation for the onion service subsystem.

This module defenses:

Definition in file hs_dos.c.

Variable Documentation

◆ consensus_param_introduce_burst_per_sec

uint32_t consensus_param_introduce_burst_per_sec
static
Initial value:
=
HS_DOS_INTRODUCE_DEFAULT_CELL_BURST_PER_SEC

Definition at line 53 of file hs_dos.c.

◆ consensus_param_introduce_defense_enabled

uint32_t consensus_param_introduce_defense_enabled
static
Initial value:
=
HS_DOS_INTRODUCE_ENABLED_DEFAULT

Definition at line 55 of file hs_dos.c.

◆ consensus_param_introduce_rate_per_sec

uint32_t consensus_param_introduce_rate_per_sec
static
Initial value:
=
HS_DOS_INTRODUCE_DEFAULT_CELL_RATE_PER_SEC

Definition at line 51 of file hs_dos.c.