mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Moved initialization of protocol list to proto.c.
Added sysdep configuration hooks.
This commit is contained in:
parent
a9c986f981
commit
7c0cc76ed7
@ -31,7 +31,6 @@ config_alloc(byte *name)
|
|||||||
|
|
||||||
c->pool = p;
|
c->pool = p;
|
||||||
cfg_mem = c->mem = l;
|
cfg_mem = c->mem = l;
|
||||||
init_list(&c->protos);
|
|
||||||
c->file_name = cfg_strdup(name);
|
c->file_name = cfg_strdup(name);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
@ -45,6 +44,7 @@ config_parse(struct config *c)
|
|||||||
if (setjmp(conf_jmpbuf))
|
if (setjmp(conf_jmpbuf))
|
||||||
return 0;
|
return 0;
|
||||||
cf_lex_init(0);
|
cf_lex_init(0);
|
||||||
|
sysdep_preconfig(c);
|
||||||
protos_preconfig(c);
|
protos_preconfig(c);
|
||||||
rt_preconfig(c);
|
rt_preconfig(c);
|
||||||
cf_parse();
|
cf_parse();
|
||||||
@ -80,6 +80,7 @@ void
|
|||||||
config_commit(struct config *c)
|
config_commit(struct config *c)
|
||||||
{
|
{
|
||||||
config = c;
|
config = c;
|
||||||
|
sysdep_commit(c);
|
||||||
rt_commit(c);
|
rt_commit(c);
|
||||||
protos_commit(c);
|
protos_commit(c);
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ struct config {
|
|||||||
linpool *mem; /* Linear pool containing configuration data */
|
linpool *mem; /* Linear pool containing configuration data */
|
||||||
list protos; /* Configured protocol instances (struct proto_config) */
|
list protos; /* Configured protocol instances (struct proto_config) */
|
||||||
list tables; /* Configured routing tables (struct rtable_config) */
|
list tables; /* Configured routing tables (struct rtable_config) */
|
||||||
|
list logfiles; /* Configured log fils (sysdep) */
|
||||||
struct rtable_config *master_rtc; /* Configuration of master routing table */
|
struct rtable_config *master_rtc; /* Configuration of master routing table */
|
||||||
u32 router_id; /* Our Router ID */
|
u32 router_id; /* Our Router ID */
|
||||||
char *err_msg; /* Parser error message */
|
char *err_msg; /* Parser error message */
|
||||||
@ -83,4 +84,9 @@ void cf_pop_scope(void);
|
|||||||
|
|
||||||
int cf_parse(void);
|
int cf_parse(void);
|
||||||
|
|
||||||
|
/* Sysdep hooks */
|
||||||
|
|
||||||
|
void sysdep_preconfig(struct config *);
|
||||||
|
void sysdep_commit(struct config *);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -155,6 +155,7 @@ protos_preconfig(struct config *c)
|
|||||||
init_list(&inactive_proto_list);
|
init_list(&inactive_proto_list);
|
||||||
init_list(&initial_proto_list);
|
init_list(&initial_proto_list);
|
||||||
init_list(&flush_proto_list);
|
init_list(&flush_proto_list);
|
||||||
|
init_list(&c->protos);
|
||||||
debug("Protocol preconfig:");
|
debug("Protocol preconfig:");
|
||||||
WALK_LIST(p, protocol_list)
|
WALK_LIST(p, protocol_list)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user