0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-09 12:48:43 +00:00

Adding proto_dump_all() function

This commit is contained in:
Pavel Machek 1998-07-09 19:36:52 +00:00
parent cf3527e2f4
commit 87d2be86e5
2 changed files with 18 additions and 0 deletions

View File

@ -76,6 +76,21 @@ protos_start(void)
} }
} }
void
protos_dump_all(void)
{
struct proto *p;
debug("Protocols:\n");
WALK_LIST(p, proto_list)
{
debug(" protocol %s:\n", p->name);
if (p->dump)
p->dump(p);
}
}
void void
protos_init(void) protos_init(void)
{ {
@ -84,6 +99,7 @@ protos_init(void)
debug("Initializing protocols\n"); debug("Initializing protocols\n");
init_list(&protocol_list); init_list(&protocol_list);
add_tail(&protocol_list, &proto_device.n); add_tail(&protocol_list, &proto_device.n);
add_tail(&protocol_list, &proto_rip.n); /* HACK: We should really read this from config */
WALK_LIST(p, protocol_list) WALK_LIST(p, protocol_list)
p->init(p); p->init(p);
} }

View File

@ -35,6 +35,7 @@ void protos_init(void);
void protos_preconfig(void); void protos_preconfig(void);
void protos_postconfig(void); void protos_postconfig(void);
void protos_start(void); void protos_start(void);
void protos_dump_all(void);
extern list protocol_list; extern list protocol_list;
@ -43,6 +44,7 @@ extern list protocol_list;
*/ */
extern struct protocol proto_device; extern struct protocol proto_device;
extern struct protocol proto_rip;
/* /*
* Routing Protocol Instance * Routing Protocol Instance