summaryrefslogtreecommitdiffstats
path: root/src/vty/vty.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther2010-09-13 20:24:03 +0200
committerHolger Hans Peter Freyther2010-09-13 20:24:03 +0200
commit08aaded3b88dfe1da70a2923932c909e389d265e (patch)
treeb8bc7c92b3259706cef083413dda0a1b742bfb04 /src/vty/vty.c
parentvty: Use the copyright string from the app_info. (diff)
downloadlibosmocore-08aaded3b88dfe1da70a2923932c909e389d265e.tar.gz
libosmocore-08aaded3b88dfe1da70a2923932c909e389d265e.tar.xz
libosmocore-08aaded3b88dfe1da70a2923932c909e389d265e.zip
vty: Add functions to access index and node
It is easier to call these two functions from bindings than wrapping the vty structure and figuring out the alignment of the enum on all different ABIs.
Diffstat (limited to 'src/vty/vty.c')
-rw-r--r--src/vty/vty.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vty/vty.c b/src/vty/vty.c
index ff17abf..5c5a908 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) {