diff options
Diffstat (limited to 'conf')
-rw-r--r-- | conf/Makefile | 2 | ||||
-rw-r--r-- | conf/conf.c | 7 | ||||
-rw-r--r-- | conf/conf.h | 6 |
3 files changed, 10 insertions, 5 deletions
diff --git a/conf/Makefile b/conf/Makefile index e5828538..cc2b13c6 100644 --- a/conf/Makefile +++ b/conf/Makefile @@ -3,6 +3,8 @@ obj := $(src-o-files) $(all-daemon) +tests_objs := $(tests_objs) $(src-o-files) + ifdef DEBUG BISON_DEBUG=-t #FLEX_DEBUG=-d diff --git a/conf/conf.c b/conf/conf.c index b6f41b2c..3ae85cb2 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -49,12 +49,10 @@ #include "nest/route.h" #include "nest/protocol.h" #include "nest/iface.h" -#include "lib/resource.h" -#include "lib/string.h" #include "lib/event.h" #include "sysdep/unix/timer.h" #include "conf/conf.h" -#include "filter/filter.h" + static jmp_buf conf_jmpbuf; @@ -85,7 +83,7 @@ int undo_available; /* Undo was not requested from last reconfiguration */ * further use. Returns a pointer to the structure. */ struct config * -config_alloc(const byte *name) +config_alloc(const char *name) { pool *p = rp_new(&root_pool, "Config"); linpool *l = lp_new(p, 4080); @@ -96,6 +94,7 @@ config_alloc(const byte *name) char *ndup = lp_allocu(l, nlen); memcpy(ndup, name, nlen); + init_list(&c->tests); c->mrtdump_file = -1; /* Hack, this should be sysdep-specific */ c->pool = p; c->mem = l; diff --git a/conf/conf.h b/conf/conf.h index 593a5f13..cb5ade47 100644 --- a/conf/conf.h +++ b/conf/conf.h @@ -9,6 +9,8 @@ #ifndef _BIRD_CONF_H_ #define _BIRD_CONF_H_ +#include "sysdep/config.h" +#include "lib/ip.h" #include "lib/resource.h" #include "sysdep/unix/timer.h" @@ -21,6 +23,7 @@ struct config { list protos; /* Configured protocol instances (struct proto_config) */ list tables; /* Configured routing tables (struct rtable_config) */ list logfiles; /* Configured log files (sysdep) */ + list tests; /* Configured unit tests */ int mrtdump_file; /* Configured MRTDump file (sysdep, fd in unix) */ char *syslog_name; /* Name used for syslog (NULL -> no syslog) */ @@ -60,7 +63,7 @@ struct config { extern struct config *config; /* Currently active configuration */ extern struct config *new_config; /* Configuration being parsed */ -struct config *config_alloc(const byte *name); +struct config *config_alloc(const char *name); int config_parse(struct config *); int cli_parse(struct config *); void config_free(struct config *); @@ -161,6 +164,7 @@ static inline int cf_symbol_is_constant(struct symbol *sym) /* Parser */ +extern char *cf_text; int cf_parse(void); /* Sysdep hooks */ |