From 8f09f01380dc6c798782fc06bf51e90bd5f7cf40 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 25 Aug 2010 17:34:56 +0800 Subject: vty: Add a new callback to let code decide if it is a config node or not --- src/vty/command.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/vty/command.c') diff --git a/src/vty/command.c b/src/vty/command.c index bec28a0d..6a523216 100644 --- a/src/vty/command.c +++ b/src/vty/command.c @@ -141,6 +141,10 @@ static int cmp_desc(const void *p, const void *q) static int is_config(struct vty *vty) { + /* ask the application */ + if (host.app_info->is_config_node) + return host.app_info->is_config_node(vty, vty->node); + /* Assume that everything above CONFIG_NODE is a config node */ return vty->node > CONFIG_NODE; } -- cgit v1.2.3