Tor  0.4.7.0-alpha-dev
Functions
hs_dos.h File Reference

Header file containing denial of service defenses for the HS subsystem for all versions. More...

#include "core/or/or_circuit_st.h"
#include "feature/nodelist/networkstatus_st.h"

Go to the source code of this file.

Functions

void hs_dos_init (void)
 
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_setup_default_intro2_defenses (or_circuit_t *circ)
 
uint64_t hs_dos_get_intro2_rejected_count (void)
 

Detailed Description

Header file containing denial of service defenses for the HS subsystem for all versions.

Definition in file hs_dos.h.

Function Documentation

◆ hs_dos_can_send_intro2()

bool hs_dos_can_send_intro2 ( or_circuit_t s_intro_circ)

Return true iff an INTRODUCE2 cell can be sent on the given service introduction circuit.

Definition at line 166 of file hs_dos.c.

◆ hs_dos_consensus_has_changed()

void hs_dos_consensus_has_changed ( const networkstatus_t ns)

Called when the consensus has changed. We might have new consensus parameters to look at.

Definition at line 152 of file hs_dos.c.

◆ hs_dos_get_intro2_rejected_count()

uint64_t hs_dos_get_intro2_rejected_count ( void  )

Return rolling count of rejected INTRO2.

Definition at line 218 of file hs_dos.c.

◆ hs_dos_init()

void hs_dos_init ( void  )

Initialize the onion service Denial of Service subsystem.

Definition at line 225 of file hs_dos.c.

◆ hs_dos_setup_default_intro2_defenses()

void hs_dos_setup_default_intro2_defenses ( or_circuit_t circ)

Initialize the INTRODUCE2 token bucket for the DoS defenses using the consensus/default values. We might get a cell extension that changes those later but if we don't, the default or consensus parameters are used.

Definition at line 137 of file hs_dos.c.