From: Pavel Machek Date: Thu, 9 Jul 1998 19:36:52 +0000 (+0000) Subject: Adding proto_dump_all() function X-Git-Tag: v1.2.0~1861 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87d2be86e5f8af0e2f01e7fb711bd282e29e376b;p=thirdparty%2Fbird.git Adding proto_dump_all() function --- diff --git a/nest/proto.c b/nest/proto.c index f0c4fc632..478eb77bb 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -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 protos_init(void) { @@ -84,6 +99,7 @@ protos_init(void) debug("Initializing protocols\n"); init_list(&protocol_list); 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) p->init(p); } diff --git a/nest/protocol.h b/nest/protocol.h index 7fe187164..a42f565dd 100644 --- a/nest/protocol.h +++ b/nest/protocol.h @@ -35,6 +35,7 @@ void protos_init(void); void protos_preconfig(void); void protos_postconfig(void); void protos_start(void); +void protos_dump_all(void); extern list protocol_list; @@ -43,6 +44,7 @@ extern list protocol_list; */ extern struct protocol proto_device; +extern struct protocol proto_rip; /* * Routing Protocol Instance