diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h index e5a9d0d7c..8035585d7 100644 --- a/include/osmocom/vty/vty.h +++ b/include/osmocom/vty/vty.h @@ -155,6 +155,8 @@ int vty_config_unlock (struct vty *); int vty_shell (struct vty *); int vty_shell_serv (struct vty *); void vty_hello (struct vty *); +void *vty_current_index(struct vty *); +int vty_current_node(struct vty *vty); extern void *tall_vty_ctx; #endif diff --git a/src/vty/vty.c b/src/vty/vty.c index ff17abf61..5c5a908d4 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -248,6 +248,15 @@ int vty_out_newline(struct vty *vty) return 0; } +void *vty_current_index(struct vty *vty) +{ + return vty->index; +} +int vty_current_node(struct vty *vty) +{ + return vty->node; +} + int vty_config_lock(struct vty *vty) { if (vty_config == 0) {