Tor  0.4.7.0-alpha-dev
Typedefs | Functions
hs_circuitmap.h File Reference

Header file for hs_circuitmap.c. More...

Go to the source code of this file.

Typedefs

typedef struct hs_token_t hs_token_t
 

Functions

typedef HT_HEAD (hs_circuitmap_ht, circuit_t) hs_circuitmap_ht
 
struct or_circuit_ths_circuitmap_get_intro_circ_v3_relay_side (const struct ed25519_public_key_t *auth_key)
 
struct or_circuit_ths_circuitmap_get_rend_circ_relay_side (const uint8_t *cookie)
 
void hs_circuitmap_register_rend_circ_relay_side (struct or_circuit_t *circ, const uint8_t *cookie)
 
void hs_circuitmap_register_intro_circ_v3_relay_side (struct or_circuit_t *circ, const struct ed25519_public_key_t *auth_key)
 
smartlist_ths_circuitmap_get_all_intro_circ_relay_side (void)
 
struct origin_circuit_ths_circuitmap_get_intro_circ_v3_service_side (const struct ed25519_public_key_t *auth_key)
 
struct origin_circuit_ths_circuitmap_get_rend_circ_service_side (const uint8_t *cookie)
 
struct origin_circuit_ths_circuitmap_get_rend_circ_client_side (const uint8_t *cookie)
 
struct origin_circuit_ths_circuitmap_get_established_rend_circ_client_side (const uint8_t *cookie)
 
void hs_circuitmap_register_intro_circ_v3_service_side (struct origin_circuit_t *circ, const struct ed25519_public_key_t *auth_key)
 
void hs_circuitmap_register_rend_circ_service_side (struct origin_circuit_t *circ, const uint8_t *cookie)
 
void hs_circuitmap_register_rend_circ_client_side (struct origin_circuit_t *circ, const uint8_t *cookie)
 
void hs_circuitmap_remove_circuit (struct circuit_t *circ)
 
void hs_circuitmap_init (void)
 
void hs_circuitmap_free_all (void)
 

Detailed Description

Header file for hs_circuitmap.c.

Definition in file hs_circuitmap.h.

Function Documentation

◆ hs_circuitmap_free_all()

void hs_circuitmap_free_all ( void  )

Public function: Free all memory allocated by the global HS circuitmap.

Definition at line 551 of file hs_circuitmap.c.

Referenced by hs_free_all().

◆ hs_circuitmap_get_all_intro_circ_relay_side()

smartlist_t* hs_circuitmap_get_all_intro_circ_relay_side ( void  )

Public function: Return v3 introduction circuit to this relay. Always return a newly allocated list for which it is the caller's responsibility to free it.

Definition at line 280 of file hs_circuitmap.c.

Referenced by update_intro_circuits().

◆ hs_circuitmap_get_established_rend_circ_client_side()

struct origin_circuit_t* hs_circuitmap_get_established_rend_circ_client_side ( const uint8_t *  cookie)

Public function: Return client-side established rendezvous circuit with rendezvous cookie. It will look for circuits with the following purposes:

a) CIRCUIT_PURPOSE_C_REND_READY: Established rend circuit (received RENDEZVOUS_ESTABLISHED). Waiting for RENDEZVOUS2 from service, and for INTRODUCE_ACK from intro point.

b) CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED: Established rend circuit and introduce circuit acked. Waiting for RENDEZVOUS2 from service.

c) CIRCUIT_PURPOSE_C_REND_JOINED: Established rend circuit and received RENDEZVOUS2 from service.

Return NULL if no such circuit is found in the circuitmap.

Definition at line 447 of file hs_circuitmap.c.

Referenced by hs_circuitmap_get_rend_circ_client_side().

◆ hs_circuitmap_get_intro_circ_v3_relay_side()

struct or_circuit_t* hs_circuitmap_get_intro_circ_v3_relay_side ( const struct ed25519_public_key_t auth_key)

Public HS circuitmap API: Public relay-side API:

◆ hs_circuitmap_get_intro_circ_v3_service_side()

struct origin_circuit_t* hs_circuitmap_get_intro_circ_v3_service_side ( const struct ed25519_public_key_t auth_key)

Public service-side API:

◆ hs_circuitmap_get_rend_circ_client_side()

struct origin_circuit_t* hs_circuitmap_get_rend_circ_client_side ( const uint8_t *  cookie)

Public function: Return client-side rendezvous circuit with rendezvous cookie. It will look for circuits with the following purposes:

a) CIRCUIT_PURPOSE_C_REND_READY: Established rend circuit (received RENDEZVOUS_ESTABLISHED). Waiting for RENDEZVOUS2 from service, and for INTRODUCE_ACK from intro point.

b) CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED: Established rend circuit and introduce circuit acked. Waiting for RENDEZVOUS2 from service.

c) CIRCUIT_PURPOSE_C_REND_JOINED: Established rend circuit and received RENDEZVOUS2 from service.

d) CIRCUIT_PURPOSE_C_ESTABLISH_REND: Rend circuit open but not yet established.

Return NULL if no such circuit is found in the circuitmap.

Definition at line 416 of file hs_circuitmap.c.

◆ hs_circuitmap_get_rend_circ_relay_side()

struct or_circuit_t* hs_circuitmap_get_rend_circ_relay_side ( const uint8_t *  cookie)

Public function: Return rendezvous circuit to this relay with rendezvous cookie. Return NULL if no such circuit is found in the circuitmap.

Definition at line 317 of file hs_circuitmap.c.

◆ hs_circuitmap_get_rend_circ_service_side()

struct origin_circuit_t* hs_circuitmap_get_rend_circ_service_side ( const uint8_t *  cookie)

Public function: Return rendezvous circuit originating from this hidden service with rendezvous cookie. Return NULL if no such circuit is found in the circuitmap.

Definition at line 379 of file hs_circuitmap.c.

◆ hs_circuitmap_init()

void hs_circuitmap_init ( void  )

Public function: Initialize the global HS circuitmap.

Definition at line 541 of file hs_circuitmap.c.

Referenced by hs_init().

◆ hs_circuitmap_register_rend_circ_client_side()

void hs_circuitmap_register_rend_circ_client_side ( origin_circuit_t or_circ,
const uint8_t *  cookie 
)

Public function: Register rendezvous circuit with key cookie to the client-side circuitmap.

Definition at line 498 of file hs_circuitmap.c.

◆ hs_circuitmap_register_rend_circ_relay_side()

void hs_circuitmap_register_rend_circ_relay_side ( or_circuit_t circ,
const uint8_t *  cookie 
)

Public relay-side setters: Public function: Register rendezvous circuit with key cookie to the circuitmap.

Definition at line 329 of file hs_circuitmap.c.

◆ hs_circuitmap_register_rend_circ_service_side()

void hs_circuitmap_register_rend_circ_service_side ( origin_circuit_t circ,
const uint8_t *  cookie 
)

Public function: Register rendezvous circuit with key cookie to the circuitmap.

Definition at line 487 of file hs_circuitmap.c.

◆ hs_circuitmap_remove_circuit()

void hs_circuitmap_remove_circuit ( circuit_t circ)

Public function: Remove this circuit from the HS circuitmap. Clear its HS token, and remove it from the hashtable.

Definition at line 515 of file hs_circuitmap.c.

Referenced by hs_circ_cleanup_on_close(), hs_circ_cleanup_on_free(), hs_circ_cleanup_on_repurpose(), and hs_circuitmap_register_impl().