ns2: vty: on `show ns` add information of NS binds
Change-Id: I6cef42749555e577d5573f2ed8b8bce4cf842a98
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 824466b..3decf4e 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -303,10 +303,21 @@
}
}
+static void dump_bind(struct vty *vty, const struct gprs_ns2_vc_bind *bind, bool stats)
+{
+ if (bind->dump_vty)
+ bind->dump_vty(bind, vty, stats);
+}
+
static void dump_ns(struct vty *vty, const struct gprs_ns2_inst *nsi, bool stats, bool persistent_only)
{
+ struct gprs_ns2_vc_bind *bind;
struct gprs_ns2_nse *nse;
+ llist_for_each_entry(bind, &nsi->binding, list) {
+ dump_bind(vty, bind, stats);
+ }
+
llist_for_each_entry(nse, &nsi->nse, list) {
dump_nse(vty, nse, stats, persistent_only);
}