Update copyrights to 2021, using "make update-copyright"
[tor.git] / src / feature / hs / hs_ob.h
blob6586ae8d4e3d80c76089476c20a29b7d224a4ef4
1 /* Copyright (c) 2020-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
4 /**
5 * \file hs_ob.h
6 * \brief Header file for the specific code for onion balance.
7 **/
9 #ifndef TOR_HS_OB_H
10 #define TOR_HS_OB_H
12 #include "feature/hs/hs_service.h"
14 bool hs_ob_service_is_instance(const hs_service_t *service);
16 int hs_ob_parse_config_file(hs_service_config_t *config);
18 struct hs_subcredential_t;
20 void hs_ob_free_all(void);
22 void hs_ob_refresh_keys(hs_service_t *service);
24 #ifdef HS_OB_PRIVATE
26 STATIC size_t compute_subcredentials(const hs_service_t *service,
27 struct hs_subcredential_t **subcredentials);
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;
38 #endif /* defined(HS_OB_PRIVATE) */
40 #endif /* !defined(TOR_HS_OB_H) */