Tor  0.4.7.0-alpha-dev
Functions
hs_ob.h File Reference

Header file for the specific code for onion balance. More...

#include "feature/hs/hs_service.h"

Go to the source code of this file.

Functions

bool hs_ob_service_is_instance (const hs_service_t *service)
 
int hs_ob_parse_config_file (hs_service_config_t *config)
 
void hs_ob_free_all (void)
 
void hs_ob_refresh_keys (hs_service_t *service)
 

Detailed Description

Header file for the specific code for onion balance.

Definition in file hs_ob.h.

Function Documentation

◆ hs_ob_free_all()

void hs_ob_free_all ( void  )

Free any memory allocated by the onionblance subsystem.

Definition at line 406 of file hs_ob.c.

Referenced by hs_free_all().

◆ hs_ob_parse_config_file()

int hs_ob_parse_config_file ( hs_service_config_t config)

Read and parse the config file at fname on disk. The service config object is populated with the options if any.

Return 1 on success else 0. This is to follow the "ok" convention in hs_config.c.

Definition at line 221 of file hs_ob.c.

◆ hs_ob_refresh_keys()

void hs_ob_refresh_keys ( hs_service_t service)

If we are an Onionbalance instance, refresh our keys.

If we are not an Onionbalance instance or we are not ready to do so, this is a NOP.

This function is called every time we build a new descriptor. That's because we want our Onionbalance keys to always use up-to-date subcredentials both for the instance (ourselves) and for the onionbalance frontend.

Definition at line 365 of file hs_ob.c.

◆ hs_ob_service_is_instance()

bool hs_ob_service_is_instance ( const hs_service_t service)

Return true iff the given service is configured as an onion balance instance. To satisfy that condition, there must at least be one master ed25519 public key configured.

Definition at line 201 of file hs_ob.c.

Referenced by get_subcredential_for_handling_intro2_cell(), and hs_ob_refresh_keys().