]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Adding proto_dump_all() function
authorPavel Machek <pavel@ucw.cz>
Thu, 9 Jul 1998 19:36:52 +0000 (19:36 +0000)
committerPavel Machek <pavel@ucw.cz>
Thu, 9 Jul 1998 19:36:52 +0000 (19:36 +0000)
nest/proto.c
nest/protocol.h

index f0c4fc632f44d060d44fcc1f5ce3d06cfb2dd473..478eb77bb38c74a8cc3c0b1e820bbf2226ac4a1e 100644 (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
 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);
 }
index 7fe187164b7091060926977d2ed2615db5811aac..a42f565dd4c7f84c4443d4a4919907f9b4052b67 100644 (file)
@@ -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