aboutsummaryrefslogtreecommitdiffstats
path: root/src/hnbgw_vty.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-10-13 16:58:04 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-10-27 14:01:25 +0200
commitc510fc29fcf4999de8ba4992dd305968909ed69b (patch)
tree8771c8d20d5e3e28a7640cc673a23e9e944409b2 /src/hnbgw_vty.c
parent9153de649826d7e7e7382c21f5228a2779a76c82 (diff)
hnbgw: vty: set explicit go_parent_cb
A second level of depth will be added to the hnbgw node soon, which will need explicit go-parent logic. Change-Id: I8d1c18a396c215e8425ae49872b5c73316087d7d
Diffstat (limited to 'src/hnbgw_vty.c')
-rw-r--r--src/hnbgw_vty.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c
index ff75aea..a458c76 100644
--- a/src/hnbgw_vty.c
+++ b/src/hnbgw_vty.c
@@ -54,6 +54,27 @@ DEFUN(cfg_hnbgw_iuh, cfg_hnbgw_iuh_cmd,
return CMD_SUCCESS;
}
+int hnbgw_vty_go_parent(struct vty *vty)
+{
+ switch (vty->node) {
+ case IUH_NODE:
+ vty->node = HNBGW_NODE;
+ vty->index = NULL;
+ break;
+ default:
+ case HNBGW_NODE:
+ vty->node = CONFIG_NODE;
+ vty->index = NULL;
+ break;
+ case CONFIG_NODE:
+ vty->node = ENABLE_NODE;
+ vty->index = NULL;
+ break;
+ }
+
+ return vty->node;
+}
+
static void vty_dump_hnb_info(struct vty *vty, struct hnb_context *hnb)
{
struct hnbgw_context_map *map;