summaryrefslogtreecommitdiff
path: root/other/bootstrap_daemon/src/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'other/bootstrap_daemon/src/config.h')
-rw-r--r--other/bootstrap_daemon/src/config.h30
1 files changed, 16 insertions, 14 deletions
diff --git a/other/bootstrap_daemon/src/config.h b/other/bootstrap_daemon/src/config.h
index 91f9c43f..13cf929a 100644
--- a/other/bootstrap_daemon/src/config.h
+++ b/other/bootstrap_daemon/src/config.h
@@ -27,24 +27,26 @@
27 27
28#include "../../../toxcore/DHT.h" 28#include "../../../toxcore/DHT.h"
29 29
30// Gets general config options 30/**
31// 31 * Gets general config options from the config file.
32// Important: you are responsible for freeing `pid_file_path` and `keys_file_path` 32 *
33// also, iff `tcp_relay_ports_count` > 0, then you are responsible for freeing `tcp_relay_ports` 33 * Important: You are responsible for freeing `pid_file_path` and `keys_file_path`
34// and also `motd` iff `enable_motd` is set 34 * also, iff `tcp_relay_ports_count` > 0, then you are responsible for freeing `tcp_relay_ports`
35// 35 * and also `motd` iff `enable_motd` is set.
36// returns 1 on success 36 *
37// 0 on failure, doesn't modify any data pointed by arguments 37 * @return 1 on success,
38 38 * 0 on failure, doesn't modify any data pointed by arguments.
39 */
39int get_general_config(const char *cfg_file_path, char **pid_file_path, char **keys_file_path, int *port, int *enable_ipv6, 40int get_general_config(const char *cfg_file_path, char **pid_file_path, char **keys_file_path, int *port, int *enable_ipv6,
40 int *enable_ipv4_fallback, int *enable_lan_discovery, int *enable_tcp_relay, uint16_t **tcp_relay_ports, 41 int *enable_ipv4_fallback, int *enable_lan_discovery, int *enable_tcp_relay, uint16_t **tcp_relay_ports,
41 int *tcp_relay_port_count, int *enable_motd, char **motd); 42 int *tcp_relay_port_count, int *enable_motd, char **motd);
42 43
43// Bootstraps nodes listed in the config file 44/**
44// 45 * Bootstraps off nodes listed in the config file.
45// returns 1 on success, some or no bootstrap nodes were added 46 *
46// 0 on failure, a error accured while parsing config file 47 * @return 1 on success, some or no bootstrap nodes were added
47 48 * 0 on failure, a error accured while parsing config file.
49 */
48int bootstrap_from_config(const char *cfg_file_path, DHT *dht, int enable_ipv6); 50int bootstrap_from_config(const char *cfg_file_path, DHT *dht, int enable_ipv6);
49 51
50#endif // CONFIG_H 52#endif // CONFIG_H