#ifndef TOR_FEATURE_RELAY_TRANSPORT_CONFIG_H
#define TOR_FEATURE_RELAY_TRANSPORT_CONFIG_H
#ifdef HAVE_MODULE_RELAY
#include "lib/testsupport/testsupport.h"
struct or_options_t;
struct smartlist_t;
int options_validate_server_transport(const struct or_options_t *old_options,
struct or_options_t *options,
char **msg);
char *pt_get_bindaddr_from_config(const char *transport);
struct smartlist_t *pt_get_options_for_server_transport(const char *transport);
int options_act_server_transport(const struct or_options_t *old_options);
#ifdef RELAY_TRANSPORT_CONFIG_PRIVATE
STATIC struct smartlist_t *get_options_from_transport_options_line(
const char *line,
const char *transport);
#endif
#else
static inline int
options_validate_server_transport(const struct or_options_t *old_options,
struct or_options_t *options,
char **msg)
{
(void)old_options;
if (options->ServerTransportPlugin ||
options->ServerTransportListenAddr ||
options->ServerTransportOptions ||
options->ExtORPort_lines) {
*msg = tor_strdup("This tor was built with relay mode disabled. "
"It can not be configured with an ExtORPort, "
"a ServerTransportPlugin, a ServerTransportListenAddr, "
"or ServerTransportOptions.");
return -1;
}
return 0;
}
#define pt_get_bindaddr_from_config(transport) \
(((void)(transport)),NULL)
#define pt_get_options_for_server_transport(transport) \
(((void)(transport)),NULL)
#define options_validate_server_transport(old_options, options, msg) \
(((void)(old_options)),((void)(options)),((void)(msg)),0)
#define options_act_server_transport(old_options) \
(((void)(old_options)),0)
#endif
#endif