#ifndef TOR_FEATURE_DIRAUTH_DIRAUTH_CONFIG_H
#define TOR_FEATURE_DIRAUTH_DIRAUTH_CONFIG_H
struct or_options_t;
#ifdef HAVE_MODULE_DIRAUTH
#include "lib/cc/torint.h"
int options_validate_dirauth_mode(const struct or_options_t *old_options,
struct or_options_t *options,
char **msg);
int options_validate_dirauth_schedule(const struct or_options_t *old_options,
struct or_options_t *options,
char **msg);
int options_validate_dirauth_testing(const struct or_options_t *old_options,
struct or_options_t *options,
char **msg);
int options_act_dirauth(const struct or_options_t *old_options);
int options_act_dirauth_mtbf(const struct or_options_t *old_options);
int options_act_dirauth_stats(const struct or_options_t *old_options,
bool *print_notice_out);
bool dirauth_should_reject_requests_under_load(void);
extern const struct config_format_t dirauth_options_fmt;
#else
static inline int
options_validate_dirauth_mode(const struct or_options_t *old_options,
struct or_options_t *options,
char **msg)
{
(void)old_options;
if (options->AuthoritativeDir) {
*msg = tor_strdup("This tor was built with dirauth mode disabled. "
"It can not be configured with AuthoritativeDir 1.");
return -1;
}
return 0;
}
#define options_validate_dirauth_schedule(old_options, options, msg) \
(((void)(old_options)),((void)(options)),((void)(msg)),0)
#define options_validate_dirauth_testing(old_options, options, msg) \
(((void)(old_options)),((void)(options)),((void)(msg)),0)
#define options_act_dirauth(old_options) \
(((void)(old_options)),0)
#define options_act_dirauth_mtbf(old_options) \
(((void)(old_options)),0)
static inline int
options_act_dirauth_stats(const struct or_options_t *old_options,
bool *print_notice_out)
{
(void)old_options;
*print_notice_out = 0;
return 0;
}
#define dirauth_should_reject_requests_under_load() (false)
#endif
#endif