gprs_ns2_vty: make the `show ns entities` and `show ns binds` look similiar
`show ns binds` prints a count of NSVCs. Add the same line
to `show ns entities`.
Change-Id: I15c58a1c0fe94dda728afb29e7e5ca41e3fa8966
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 6d34e5a..9309e9e 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -1869,6 +1869,7 @@
static void dump_nse(struct vty *vty, const struct gprs_ns2_nse *nse, bool stats, bool persistent_only)
{
struct gprs_ns2_vc *nsvc;
+ unsigned int nsvcs = 0;
if (persistent_only && !nse->persistent)
return;
@@ -1877,6 +1878,10 @@
nse->alive ? "ALIVE" : "DEAD", VTY_NEWLINE);
ns2_sns_dump_vty(vty, " ", nse, stats);
+ llist_for_each_entry(nsvc, &nse->nsvc, list) {
+ nsvcs++;
+ }
+ vty_out(vty, " %u NS-VC:%s", nsvcs, VTY_NEWLINE);
llist_for_each_entry(nsvc, &nse->nsvc, list)
ns2_vty_dump_nsvc(vty, nsvc, stats);
}