Tor  0.4.7.0-alpha-dev
hs_ob.h
Go to the documentation of this file.
1 /* Copyright (c) 2020-2021, 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) */
STATIC size_t compute_subcredentials(const hs_service_t *service, hs_subcredential_t **subcredentials_out)
Definition: hs_ob.c:278
void hs_ob_free_all(void)
Definition: hs_ob.c:406
void hs_ob_refresh_keys(hs_service_t *service)
Definition: hs_ob.c:365
bool hs_ob_service_is_instance(const hs_service_t *service)
Definition: hs_ob.c:201
int hs_ob_parse_config_file(hs_service_config_t *config)
Definition: hs_ob.c:221
Header file containing service data for the HS subsystem.
#define STATIC
Definition: testsupport.h:32