Go to the documentation of this file.
12 #ifndef TOR_RENDSERVICE_H
13 #define TOR_RENDSERVICE_H
30 ssize_t ciphertext_len;
33 ssize_t plaintext_len;
65 #ifdef RENDSERVICE_PRIVATE
68 typedef struct rend_service_t {
72 int dir_group_readable;
91 time_t intro_period_started;
93 int n_intro_circuits_launched;
95 unsigned int n_intro_points_wanted;
101 time_t next_upload_time;
108 replaycache_t *accepted_intro_dh_parts;
111 int allow_unknown_ports;
115 int max_streams_per_circuit;
118 int max_streams_close_circuit;
122 #define rend_service_free(s) \
123 FREE_AND_NULL(rend_service_t, rend_service_free_, (s))
124 STATIC char *rend_service_sos_poison_path(
const rend_service_t *service);
126 const rend_service_t *s,
129 const rend_service_t *s,
131 #ifdef TOR_UNIT_TESTS
135 STATIC void rend_service_prune_list_impl_(
void);
143 int rend_config_service(
const struct hs_opts_t *hs_opts,
146 void rend_service_prune_list(
void);
147 void rend_service_free_staging_list(
void);
149 int rend_service_key_on_disk(
const char *directory_path);
159 const uint8_t *request,
163 const uint8_t *request,
169 #define rend_service_free_intro(req) do { \
170 rend_service_free_intro_(req); \
179 ssize_t rend_service_encode_establish_intro_cell(
char *cell_body_out,
180 size_t cell_body_out_len,
182 const char *rend_circ_nonce);
190 void rend_service_init(
void);
196 #define rend_service_port_config_free(p) \
197 FREE_AND_NULL(rend_service_port_config_t, rend_service_port_config_free_, \
201 #define rend_authorized_client_free(client) \
202 FREE_AND_NULL(rend_authorized_client_t, rend_authorized_client_free_, \
207 int max_streams_per_circuit,
208 int max_streams_close_circuit,
211 char **service_id_out);
216 const char *service_id,
int seconds_valid);
219 int rend_service_allow_non_anonymous_connection(
const or_options_t *options);
220 int rend_service_reveal_startup_time(
const or_options_t *options);
221 int rend_service_non_anonymous_mode_enabled(
const or_options_t *options);
rend_intro_cell_t * rend_service_begin_parse_intro(const uint8_t *request, size_t request_len, uint8_t type, char **err_msg_out)
int rend_service_receive_introduction(origin_circuit_t *circuit, const uint8_t *request, size_t request_len)
void rend_service_intro_has_opened(origin_circuit_t *circuit)
Header file containing service data for the HS subsystem.
void rend_service_rendezvous_has_opened(origin_circuit_t *circuit)
STATIC int rend_service_poison_new_single_onion_dir(const rend_service_t *s, const or_options_t *options)
int rend_service_decrypt_intro(rend_intro_cell_t *request, crypto_pk_t *key, char **err_msg_out)
#define REND_SERVICE_ID_LEN_BASE32
void rend_service_dump_stats(int severity)
void rend_consider_services_intro_points(time_t now)
int rend_service_load_all_keys(const smartlist_t *service_list)
int rend_service_intro_established(origin_circuit_t *circuit, const uint8_t *request, size_t request_len)
void rend_service_port_config_free_(rend_service_port_config_t *p)
void rend_service_relaunch_rendezvous(origin_circuit_t *oldcirc)
hs_service_add_ephemeral_status_t
void rend_consider_services_upload(time_t now)
void rend_service_free_all(void)
void rend_authorized_client_free_(rend_authorized_client_t *client)
rend_service_port_config_t * rend_service_parse_port_config(const char *string, const char *sep, char **err_msg_out)
STATIC void rend_service_free_(rend_service_t *service)
void rend_consider_descriptor_republication(void)
int rend_service_validate_intro_late(const rend_intro_cell_t *intro, char **err_msg_out)
void rend_hsdir_routers_changed(void)
int rend_num_services(void)
int rend_service_set_connection_addr_port(edge_connection_t *conn, origin_circuit_t *circ)
int rend_service_del_ephemeral(const char *service_id)
STATIC int rend_service_verify_single_onion_poison(const rend_service_t *s, const or_options_t *options)
void directory_post_to_hs_dir(rend_service_descriptor_t *renddesc, smartlist_t *descs, smartlist_t *hs_dirs, const char *service_id, int seconds_valid)
int rend_service_parse_intro_plaintext(rend_intro_cell_t *intro, char **err_msg_out)
void rend_service_free_intro_(rend_intro_cell_t *request)
hs_service_add_ephemeral_status_t rend_service_add_ephemeral(crypto_pk_t *pk, smartlist_t *ports, int max_streams_per_circuit, int max_streams_close_circuit, rend_auth_type_t auth_type, smartlist_t *auth_clients, char **service_id_out)
void rend_services_add_filenames_to_lists(smartlist_t *open_lst, smartlist_t *stat_lst)
void rend_service_desc_has_uploaded(const rend_data_t *rend_data)
Master header file for Tor-specific functionality.