1 #ifndef LIGHTNING_COMMON_CONFIGDIR_H 2 #define LIGHTNING_COMMON_CONFIGDIR_H 3 #include "config.h" 4 #include <ccan/tal/tal.h> 5 6 /* Put things we're going to get rid of behind this, so testers can catch 7 * them early. */ 8 extern bool deprecated_apis; 9 10 /* Helper for options which are tal() strings. */ 11 char *opt_set_talstr(const char *arg, char **p); 12 13 /* Initial options setup */ 14 void setup_option_allocators(void); 15 16 /* Parse minimal config options and files */ 17 void initial_config_opts(const tal_t *ctx, 18 int argc, char *argv[], 19 char **config_filename, 20 char **config_basedir, 21 char **config_netdir, 22 char **rpc_filename); 23 24 /* If they specify --conf, we just read that. 25 * Otherwise, we read basedir/config (toplevel), and basedir/<network>/config 26 * (network-level) */ 27 void parse_config_files(const char *config_filename, 28 const char *config_basedir, 29 bool early); 30 31 /* For listconfigs to detect. */ 32 bool is_restricted_ignored(const void *fn); 33 bool is_restricted_print_if_nonnull(const void *fn); 34 35 #endif /* LIGHTNING_COMMON_CONFIGDIR_H */ 36