From 08aaded3b88dfe1da70a2923932c909e389d265e Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 14 Sep 2010 02:24:03 +0800 Subject: 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. --- src/vty/vty.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/vty') diff --git a/src/vty/vty.c b/src/vty/vty.c index ff17abf6..5c5a908d 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) { -- cgit v1.2.3