zebra: Gather and display detailed info about clients of Zebra

The display of zebra client info is rather paltry: just the name and the FD.
For troubleshooting and general helpfulness, its useful to gather more info
about each client and display that. This patch does just that.

Signed-off-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index 6c54917..a7a6b25 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -159,7 +159,10 @@
               && newrib->type == type
               && newrib->distance != DISTANCE_INFINITY
               && zebra_check_addr (&rn->p))
-            zsend_route_multipath (ZEBRA_IPV4_ROUTE_ADD, client, &rn->p, newrib);
+	    {
+	      client->redist_v4_add_cnt++;
+              zsend_route_multipath (ZEBRA_IPV4_ROUTE_ADD, client, &rn->p, newrib);
+            }
         }
 
 #ifdef HAVE_IPV6
@@ -171,7 +174,10 @@
 	    && newrib->type == type 
 	    && newrib->distance != DISTANCE_INFINITY
 	    && zebra_check_addr (&rn->p))
-	  zsend_route_multipath (ZEBRA_IPV6_ROUTE_ADD, client, &rn->p, newrib);
+	  {
+	    client->redist_v6_add_cnt++;
+	    zsend_route_multipath (ZEBRA_IPV6_ROUTE_ADD, client, &rn->p, newrib);
+	  }
 #endif /* HAVE_IPV6 */
 }
 
@@ -188,11 +194,15 @@
           || vrf_bitmap_check (client->redist[rib->type], rib->vrf_id))
         {
           if (p->family == AF_INET)
-            zsend_route_multipath (ZEBRA_IPV4_ROUTE_ADD, client, p, rib);
-#ifdef HAVE_IPV6
+	    {
+	      client->redist_v4_add_cnt++;
+	      zsend_route_multipath (ZEBRA_IPV4_ROUTE_ADD, client, p, rib);
+	    }
           if (p->family == AF_INET6)
-            zsend_route_multipath (ZEBRA_IPV6_ROUTE_ADD, client, p, rib);
-#endif /* HAVE_IPV6 */	  
+	    {
+	      client->redist_v6_add_cnt++;
+	      zsend_route_multipath (ZEBRA_IPV6_ROUTE_ADD, client, p, rib);
+	    }
         }
     }
 }
@@ -299,7 +309,9 @@
     zlog_debug ("MESSAGE: ZEBRA_INTERFACE_DOWN %s", ifp->name);
 
   for (ALL_LIST_ELEMENTS (zebrad.client_list, node, nnode, client))
-    zsend_interface_update (ZEBRA_INTERFACE_DOWN, client, ifp);
+    {
+      zsend_interface_update (ZEBRA_INTERFACE_DOWN, client, ifp);
+    }
 }
 
 /* Interface information update. */
@@ -315,7 +327,8 @@
   for (ALL_LIST_ELEMENTS (zebrad.client_list, node, nnode, client))
     if (client->ifinfo)
       {
-        zsend_interface_add (client, ifp);
+	client->ifadd_cnt++;
+	zsend_interface_add (client, ifp);
         zsend_interface_link_params (client, ifp);
       }
 }
@@ -331,7 +344,10 @@
 
   for (ALL_LIST_ELEMENTS (zebrad.client_list, node, nnode, client))
     if (client->ifinfo)
-      zsend_interface_delete (client, ifp);
+      {
+	client->ifdel_cnt++;
+	zsend_interface_delete (client, ifp);
+      }
 }
 
 /* Interface address addition. */
@@ -360,7 +376,10 @@
 
   for (ALL_LIST_ELEMENTS (zebrad.client_list, node, nnode, client))
     if (client->ifinfo && CHECK_FLAG (ifc->conf, ZEBRA_IFC_REAL))
-      zsend_interface_address (ZEBRA_INTERFACE_ADDRESS_ADD, client, ifp, ifc);
+      {
+	client->connected_rt_add_cnt++;
+	zsend_interface_address (ZEBRA_INTERFACE_ADDRESS_ADD, client, ifp, ifc);
+      }
 }
 
 /* Interface address deletion. */
@@ -386,7 +405,10 @@
 
   for (ALL_LIST_ELEMENTS (zebrad.client_list, node, nnode, client))
     if (client->ifinfo && CHECK_FLAG (ifc->conf, ZEBRA_IFC_REAL))
-      zsend_interface_address (ZEBRA_INTERFACE_ADDRESS_DELETE, client, ifp, ifc);
+      {
+	client->connected_rt_del_cnt++;
+	zsend_interface_address (ZEBRA_INTERFACE_ADDRESS_DELETE, client, ifp, ifc);
+      }
 }
 
 /* Interface parameters update */