]> git.proxmox.com Git - mirror_frr.git/commitdiff
pimd: Start abstraction of zclient data structure for pim_zebra.c
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 9 Dec 2016 16:05:08 +0000 (11:05 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 30 Jan 2017 15:04:05 +0000 (10:04 -0500)
Start the abstraction of the zclient data structure out from a
global variable for the entire program to a global variable
to the pim_zebra.c file.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_cmd.c
pimd/pim_zebra.c
pimd/pim_zebra.h

index 7e60232bacdfe1791efb748cd8fe989d9f847fcd..7dc1aeccb958d7c27fd8247da2a95354d7f1edd7 100644 (file)
@@ -2825,15 +2825,8 @@ DEFUN (show_ip_multicast,
   }
 
   vty_out(vty, "%s", VTY_NEWLINE);
-  vty_out(vty, "Zclient update socket: ");
-  if (qpim_zclient_update) {
-    vty_out(vty, "%d failures=%d%s", qpim_zclient_update->sock,
-           qpim_zclient_update->fail, VTY_NEWLINE);
-  }
-  else {
-    vty_out(vty, "<null zclient>%s", VTY_NEWLINE);
-  }
 
+  pim_zebra_zclient_update (vty);
   pim_zlookup_show_ip_multicast (vty);
 
   vty_out(vty, "%s", VTY_NEWLINE);
index b21da624d61fe95af8226e8af024168c79b5404b..e1a23ab4a3e25c081a842bd25f0315e66c1f3f3a 100644 (file)
@@ -1232,3 +1232,17 @@ void pim_forward_stop(struct pim_ifchannel *ch)
          ch->interface,
          PIM_OIF_FLAG_PROTO_PIM);
 }
+
+void
+pim_zebra_zclient_update (struct vty *vty)
+{
+  vty_out(vty, "Zclient update socket: ");
+
+  if (qpim_zclient_update) {
+    vty_out(vty, "%d failures=%d%s", qpim_zclient_update->sock,
+           qpim_zclient_update->fail, VTY_NEWLINE);
+  }
+  else {
+    vty_out(vty, "<null zclient>%s", VTY_NEWLINE);
+  }
+}
index 0c302efbd51cd1af36d2d0b7e94ea214d8785fbe..476185def17a75d91e140696a724a87a42a4a8ad 100644 (file)
@@ -25,6 +25,7 @@
 #include "pim_ifchannel.h"
 
 void pim_zebra_init(char *zebra_sock_path);
+void pim_zebra_zclient_update (struct vty *vty);
 
 void pim_scan_individual_oil (struct channel_oil *c_oil);
 void pim_scan_oil(void);