tor  0.4.1.0-alpha-dev
Data Structures | Macros | Typedefs | Enumerations | Functions
hs_service.h File Reference
#include "lib/crypt_ops/crypto_curve25519.h"
#include "lib/crypt_ops/crypto_ed25519.h"
#include "feature/hs_common/replaycache.h"
#include "feature/hs/hs_common.h"
#include "feature/hs/hs_descriptor.h"
#include "feature/hs/hs_ident.h"
#include "feature/hs/hs_intropoint.h"
#include "trunnel/hs/cell_establish_intro.h"

Go to the source code of this file.

Data Structures

struct  hs_service_intro_point_t
 
struct  hs_service_intropoints_t
 
struct  hs_service_descriptor_t
 
struct  hs_service_keys_t
 
struct  hs_service_authorized_client_t
 
struct  hs_service_config_t
 
struct  hs_service_state_t
 
struct  hs_service_t
 

Macros

#define HS_SERVICE_DEFAULT_VERSION   HS_VERSION_THREE
 
#define HS_SERVICE_NEXT_UPLOAD_TIME_MIN   (60 * 60)
 
#define HS_SERVICE_NEXT_UPLOAD_TIME_MAX   (120 * 60)
 
#define hs_service_free(s)   FREE_AND_NULL(hs_service_t, hs_service_free_, (s))
 

Typedefs

typedef struct hs_service_intro_point_t hs_service_intro_point_t
 
typedef struct hs_service_intropoints_t hs_service_intropoints_t
 
typedef struct hs_service_descriptor_t hs_service_descriptor_t
 
typedef struct hs_service_keys_t hs_service_keys_t
 
typedef struct hs_service_authorized_client_t hs_service_authorized_client_t
 
typedef struct hs_service_config_t hs_service_config_t
 
typedef struct hs_service_state_t hs_service_state_t
 
typedef struct hs_service_t hs_service_t
 

Enumerations

enum  hs_circuit_id_protocol_t { HS_CIRCUIT_ID_PROTOCOL_NONE, HS_CIRCUIT_ID_PROTOCOL_HAPROXY }
 

Functions

typedef HT_HEAD (hs_service_ht, hs_service_t) hs_service_ht
 
void hs_service_init (void)
 
void hs_service_free_all (void)
 
hs_service_ths_service_new (const or_options_t *options)
 
void hs_service_free_ (hs_service_t *service)
 
 MOCK_DECL (unsigned int, hs_service_get_num_services,(void))
 
void hs_service_stage_services (const smartlist_t *service_list)
 
int hs_service_load_all_keys (void)
 
int hs_service_get_version_from_key (const hs_service_t *service)
 
void hs_service_lists_fnames_for_sandbox (smartlist_t *file_list, smartlist_t *dir_list)
 
int hs_service_set_conn_addr_port (const origin_circuit_t *circ, edge_connection_t *conn)
 
void hs_service_map_has_changed (void)
 
void hs_service_dir_info_changed (void)
 
void hs_service_run_scheduled_events (time_t now)
 
void hs_service_circuit_has_opened (origin_circuit_t *circ)
 
int hs_service_receive_intro_established (origin_circuit_t *circ, const uint8_t *payload, size_t payload_len)
 
int hs_service_receive_introduce2 (origin_circuit_t *circ, const uint8_t *payload, size_t payload_len)
 
void hs_service_intro_circ_has_closed (origin_circuit_t *circ)
 
char * hs_service_lookup_current_desc (const ed25519_public_key_t *pk)
 
hs_service_add_ephemeral_status_t hs_service_add_ephemeral (ed25519_secret_key_t *sk, smartlist_t *ports, int max_streams_per_rdv_circuit, int max_streams_close_circuit, char **address_out)
 
int hs_service_del_ephemeral (const char *address)
 
void hs_service_upload_desc_to_dir (const char *encoded_desc, const uint8_t version, const ed25519_public_key_t *identity_pk, const ed25519_public_key_t *blinded_pk, const routerstatus_t *hsdir_rs)
 
hs_circuit_id_protocol_t hs_service_exports_circuit_id (const ed25519_public_key_t *pk)
 

Detailed Description

Header file containing service data for the HS subsytem.

Definition in file hs_service.h.

Typedef Documentation

◆ hs_service_authorized_client_t

Service side configuration of client authorization.

Enumeration Type Documentation

◆ hs_circuit_id_protocol_t

Which protocol to use for exporting HS client circuit ID.

Enumerator
HS_CIRCUIT_ID_PROTOCOL_NONE 

Don't expose the circuit id.

HS_CIRCUIT_ID_PROTOCOL_HAPROXY 

Use the HAProxy proxy protocol.

Definition at line 181 of file hs_service.h.

Function Documentation

◆ hs_service_exports_circuit_id()

hs_circuit_id_protocol_t hs_service_exports_circuit_id ( const ed25519_public_key_t pk)

Does the service with identity pubkey pk export the circuit IDs of its clients?

Definition at line 3750 of file hs_service.c.