2020-01-09 14:51:56 -05:00
|
|
|
/* Copyright (c) 2020, The Tor Project, Inc. */
|
|
|
|
/* See LICENSE for licensing information */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \file hs_ob.h
|
|
|
|
* \brief Header file for the specific code for onion balance.
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef TOR_HS_OB_H
|
|
|
|
#define TOR_HS_OB_H
|
|
|
|
|
2020-02-26 16:45:33 -05:00
|
|
|
#include "feature/hs/hs_service.h"
|
2020-01-09 14:51:56 -05:00
|
|
|
|
2020-01-14 12:54:56 -05:00
|
|
|
bool hs_ob_service_is_instance(const hs_service_t *service);
|
|
|
|
|
2020-01-09 14:51:56 -05:00
|
|
|
int hs_ob_parse_config_file(hs_service_config_t *config);
|
|
|
|
|
2020-01-16 18:27:25 -05:00
|
|
|
struct hs_subcredential_t;
|
2020-01-27 17:06:36 +02:00
|
|
|
|
|
|
|
void hs_ob_free_all(void);
|
|
|
|
|
|
|
|
void hs_ob_refresh_keys(hs_service_t *service);
|
2020-01-09 15:18:32 -05:00
|
|
|
|
2020-01-09 14:51:56 -05:00
|
|
|
#ifdef HS_OB_PRIVATE
|
|
|
|
|
2020-01-27 17:06:36 +02:00
|
|
|
STATIC size_t compute_subcredentials(const hs_service_t *service,
|
|
|
|
struct hs_subcredential_t **subcredentials);
|
|
|
|
|
2020-01-09 14:51:56 -05:00
|
|
|
typedef struct ob_options_t {
|
|
|
|
/** Magic number to identify the structure in memory. */
|
|
|
|
uint32_t magic_;
|
|
|
|
/** Master Onion Address(es). */
|
|
|
|
struct config_line_t *MasterOnionAddress;
|
|
|
|
/** Extra Lines for configuration we might not know. */
|
|
|
|
struct config_line_t *ExtraLines;
|
|
|
|
} ob_options_t;
|
|
|
|
|
|
|
|
#endif /* defined(HS_OB_PRIVATE) */
|
|
|
|
|
|
|
|
#endif /* !defined(TOR_HS_OB_H) */
|