-
-extern config_t *add_config_val(config_t **, int, char *);
-extern int read_config_file(config_t **, const char *);
-extern const config_t *get_config_val(config_t *, which_t type);
-extern void clear_config();
-extern int read_server_config(void);
-extern FILE *ask_and_safe_open(const char*, const char*);
-
-#endif /* __TINC_CONF_H__ */
+extern list_t *cmdline_conf;
+
+extern void init_configuration(avl_tree_t **config_tree);
+extern void exit_configuration(avl_tree_t **config_tree);
+extern config_t *new_config(void) __attribute__((__malloc__));
+extern void free_config(config_t *cfg);
+extern void config_add(avl_tree_t *config_tree, config_t *cfg);
+extern config_t *lookup_config(const avl_tree_t *config_tree, char *variable);
+extern config_t *lookup_config_next(const avl_tree_t *config_tree, const config_t *cfg);
+extern bool get_config_bool(const config_t *cfg, bool *result);
+extern bool get_config_int(const config_t *cfg, int *result);
+extern bool get_config_string(const config_t *cfg, char **result);
+extern bool get_config_address(const config_t *cfg, struct addrinfo **result);
+extern bool get_config_subnet(const config_t *cfg, struct subnet_t **result);
+
+extern config_t *parse_config_line(char *line, const char *fname, int lineno);
+extern bool read_config_file(avl_tree_t *config_tree, const char *fname);
+extern void read_config_options(avl_tree_t *config_tree, const char *prefix);
+extern bool read_server_config(void);
+extern bool read_connection_config(struct connection_t *c);
+extern FILE *ask_and_open(const char *fname, const char *what);
+
+#endif