-extern config_t *config;
-extern int debug_lvl;
-extern int timeout;
-extern int upstreamindex;
-extern int sighup;
-extern char *configfilename;
+extern void init_configuration(avl_tree_t **);
+extern void exit_configuration(avl_tree_t **);
+extern config_t *new_config(void) __attribute__ ((__malloc__));
+extern void free_config(config_t *);
+extern void config_add(avl_tree_t *, config_t *);
+extern config_t *lookup_config(avl_tree_t *, char *);
+extern config_t *lookup_config_next(avl_tree_t *, const config_t *);
+extern bool get_config_bool(const config_t *, bool *);
+extern bool get_config_int(const config_t *, int *);
+extern bool get_config_string(const config_t *, char **);
+extern bool get_config_address(const config_t *, struct addrinfo **);
+extern bool get_config_subnet(const config_t *, struct subnet_t **);