add a VTY command which shows a specific HNB
Add the 'show hnb NAME' VTY command which displays just
one specific HNB, addressed by its identity string.
This augments the functionality provided by 'show hnb all'.
Change-Id: Iab12aa4ab090b72c472358b84daf6919b30747f6
Related: OS#2774
diff --git a/src/hnbgw.c b/src/hnbgw.c
index cd6104b..e40996f 100644
--- a/src/hnbgw.c
+++ b/src/hnbgw.c
@@ -105,6 +105,19 @@
return NULL;
}
+struct hnb_context *hnb_context_by_identity_info(struct hnb_gw *gw, const char *identity_info)
+{
+ struct hnb_context *hnb;
+
+ llist_for_each_entry(hnb, &gw->hnb_list, list) {
+ if (strcmp(identity_info, hnb->identity_info) == 0)
+ return hnb;
+ }
+
+ return NULL;
+}
+
+
unsigned hnb_contexts(const struct hnb_gw *gw)
{
unsigned num_ctx = 0;