From 50fe90edf3deab409ea7887c131bfe6ce89fa556 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 16 Jan 2000 16:44:50 +0000 Subject: First attempt on dynamic reconfiguration. There are still lots of bugs and problems to solve, but the hardest part works. --- conf/conf.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'conf/conf.h') diff --git a/conf/conf.h b/conf/conf.h index b0a3811..7d13ae9 100644 --- a/conf/conf.h +++ b/conf/conf.h @@ -1,7 +1,7 @@ /* * BIRD Internet Routing Daemon -- Configuration File Handling * - * (c) 1998--1999 Martin Mares + * (c) 1998--2000 Martin Mares * * Can be freely distributed and used under the terms of the GNU GPL. */ @@ -26,17 +26,27 @@ struct config { char *file_name; /* Name of configuration file */ struct symbol **sym_hash; /* Lexer: symbol hash table */ struct symbol **sym_fallback; /* Lexer: fallback symbol hash table */ + int obstacle_count; /* Number of items blocking freeing of this config */ }; -extern struct config *config, *new_config; /* Please don't use these variables in protocols. Use proto_config->global instead. */ +extern struct config *config; /* Currently active configuration */ +extern struct config *new_config; /* Configuration being parsed */ +extern struct config *old_config; /* Old configuration when reconfiguration is in progress */ +extern struct config *future_config; /* New config held here if recon requested during recon */ struct config *config_alloc(byte *name); int config_parse(struct config *); int cli_parse(struct config *); void config_free(struct config *); -void config_commit(struct config *); +int config_commit(struct config *); void cf_error(char *msg, ...) NORET; +void config_add_obstacle(struct config *); +void config_del_obstacle(struct config *); + +#define CONF_DONE 0 +#define CONF_PROGRESS 1 +#define CONF_QUEUED 2 /* Pools */ @@ -87,6 +97,6 @@ int cf_parse(void); /* Sysdep hooks */ void sysdep_preconfig(struct config *); -void sysdep_commit(struct config *); +int sysdep_commit(struct config *, struct config *); #endif -- cgit v1.2.3