From 22f34710d9e4d237ae72fb1dd835c261c0652d87 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Fri, 2 Oct 2020 02:34:39 +0200 Subject: ns2: vty: on `show ns` add information of NS binds Change-Id: I6cef42749555e577d5573f2ed8b8bce4cf842a98 --- src/gb/gprs_ns2_vty.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/gb/gprs_ns2_vty.c') diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c index 824466ba..3decf4e9 100644 --- a/src/gb/gprs_ns2_vty.c +++ b/src/gb/gprs_ns2_vty.c @@ -303,10 +303,21 @@ static void dump_nse(struct vty *vty, const struct gprs_ns2_nse *nse, bool stats } } +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); } -- cgit v1.2.3