Tor  0.4.5.0-alpha-dev
hs_ob.h
Go to the documentation of this file.
1 /* Copyright (c) 2020, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
3 
4 /**
5  * \file hs_ob.h
6  * \brief Header file for the specific code for onion balance.
7  **/
8 
9 #ifndef TOR_HS_OB_H
10 #define TOR_HS_OB_H
11 
12 #include "feature/hs/hs_service.h"
13 
14 bool hs_ob_service_is_instance(const hs_service_t *service);
15 
17 
18 struct hs_subcredential_t;
19 
20 void hs_ob_free_all(void);
21 
22 void hs_ob_refresh_keys(hs_service_t *service);
23 
24 #ifdef HS_OB_PRIVATE
25 
26 STATIC size_t compute_subcredentials(const hs_service_t *service,
27  struct hs_subcredential_t **subcredentials);
28 
29 typedef struct ob_options_t {
30  /** Magic number to identify the structure in memory. */
31  uint32_t magic_;
32  /** Master Onion Address(es). */
33  struct config_line_t *MasterOnionAddress;
34  /** Extra Lines for configuration we might not know. */
35  struct config_line_t *ExtraLines;
36 } ob_options_t;
37 
38 #endif /* defined(HS_OB_PRIVATE) */
39 
40 #endif /* !defined(TOR_HS_OB_H) */
hs_service.h
Header file containing service data for the HS subsytem.
hs_ob_service_is_instance
bool hs_ob_service_is_instance(const hs_service_t *service)
Definition: hs_ob.c:201
hs_ob_refresh_keys
void hs_ob_refresh_keys(hs_service_t *service)
Definition: hs_ob.c:364
hs_ob_free_all
void hs_ob_free_all(void)
Definition: hs_ob.c:405
hs_service_config_t
Definition: hs_service.h:198
hs_ob_parse_config_file
int hs_ob_parse_config_file(hs_service_config_t *config)
Definition: hs_ob.c:221
hs_service_t
Definition: hs_service.h:293
hs_subcredential_t
Definition: hs_ntor.h:43
config_line_t
Definition: confline.h:29
compute_subcredentials
STATIC size_t compute_subcredentials(const hs_service_t *service, hs_subcredential_t **subcredentials_out)
Definition: hs_ob.c:278
STATIC
#define STATIC
Definition: testsupport.h:32