Tor  0.4.7.0-alpha-dev
Data Fields
circpad_machine_spec_t Struct Reference

#include <circuitpadding.h>

Data Fields

const char * name
 
circpad_machine_num_t machine_num
 
unsigned machine_index: 1
 
unsigned should_negotiate_end: 1
 
unsigned is_origin_side: 1
 
unsigned target_hopnum: 3
 
unsigned manage_circ_lifetime: 1
 
circpad_machine_conditions_t conditions
 
uint16_t allowed_padding_count
 
uint8_t max_padding_percent
 
circpad_state_tstates
 
circpad_statenum_t num_states
 

Detailed Description

Global state machine structure from the consensus

Definition at line 623 of file circuitpadding.h.

Field Documentation

◆ allowed_padding_count

uint16_t allowed_padding_count

How many padding cells can be sent before we apply overhead limits? XXX: Note that we can only allow up to 64k of padding cells on an otherwise quiet circuit. Is this enough? It's 33MB.

Definition at line 664 of file circuitpadding.h.

Referenced by circpad_machine_reached_padding_limit().

◆ conditions

This machine only kills fascists if the following conditions are met.

Definition at line 659 of file circuitpadding.h.

Referenced by circpad_machine_conditions_keep().

◆ is_origin_side

unsigned is_origin_side

Origin side or relay side

Definition at line 639 of file circuitpadding.h.

Referenced by circpad_machine_spec_transitioned_to_end().

◆ machine_index

unsigned machine_index

Which machine index slot should this machine go into in the array on the circuit_t

Definition at line 632 of file circuitpadding.h.

Referenced by circpad_machine_spec_transitioned_to_end().

◆ machine_num

circpad_machine_num_t machine_num

◆ manage_circ_lifetime

unsigned manage_circ_lifetime

If this flag is enabled, don't close circuits that use this machine even if another part of Tor wants to close this circuit.

If this flag is set, the circuitpadding subsystem will close circuits the moment the machine transitions to the END state, and only if the circuit has already been asked to be closed by another part of Tor.

Circuits that should have been closed but were kept open by a padding machine are re-purposed to CIRCUIT_PURPOSE_C_CIRCUIT_PADDING, hence machines should take that purpose into account if they are filtering circuits by purpose.

Definition at line 656 of file circuitpadding.h.

◆ max_padding_percent

uint8_t max_padding_percent

Padding percent cap: Stop padding if we exceed this percent overhead. 0 means no limit. Overhead is defined as percent of total traffic, so that we can use 0..100 here. This is the same definition as used in Prop#265.

Definition at line 670 of file circuitpadding.h.

Referenced by circpad_machine_reached_padding_limit().

◆ num_states

circpad_statenum_t num_states

Number of states this machine has (ie: length of the states array). XXX: This field is not needed other than for safety.

Definition at line 678 of file circuitpadding.h.

Referenced by padding_machine_is_valid().

◆ should_negotiate_end

unsigned should_negotiate_end

Send a padding negotiate to shut down machine at end state?

Definition at line 635 of file circuitpadding.h.

Referenced by circpad_machine_spec_transitioned_to_end().

◆ states

circpad_state_t* states

State array: indexed by circpad_statenum_t

Definition at line 673 of file circuitpadding.h.

Referenced by machine_spec_free_(), and padding_machine_is_valid().

◆ target_hopnum

unsigned target_hopnum

Which hop in the circuit should we send padding to/from? 1-indexed (ie: hop #1 is guard, #2 middle, #3 exit).

Definition at line 643 of file circuitpadding.h.

Referenced by circpad_add_matching_machines(), circpad_machine_spec_transitioned_to_end(), circpad_padding_is_from_expected_hop(), and circpad_shutdown_old_machines().


The documentation for this struct was generated from the following file: