Commit Graph

71 Commits

Author SHA1 Message Date
Jacob Erlbeck 7eed0538ae vty: Refactored vty_go_parent(), 'end' and 'exit'
Put all 'exit' logic into vty_go_parent() and replace the
implementations of 'exit' and 'end' by generic ones that use
vty_go_parent().
2013-09-08 10:49:03 +02:00
Jacob Erlbeck 2442e09658 vty: Rename is_config() to is_config_child()
The function is_config() returns 0 for CONFIG_NODE. Since that node
is a config node, the function is renamed to resolve this.
2013-09-08 10:33:24 +02:00
Holger Hans Peter Freyther 047213b01e vty: Attempt to fix various meam leaks in the VTY lookup code
These routines were not freeing vectors used for the lookup. On
review it is fixing another path not detected by coverity.

The danger is a double free in tab completion now. It is difficult
to test this.

Fixes: Coverity CID 23037, CID 23038
2013-07-03 10:00:06 +02:00
Harald Welte d17aa59c3e VTY: don't show HIDDEN or DEPRECATED vty commands in ? completion
This hides HIDDEN or DEPRECATED commands from showing up when the
full list of commands is inquired with '?' at any given point in the
command tree.  Only if the hidden/deprecated command is already typed
in partially, then it will still tab-complete.
2013-02-12 11:11:34 +01:00
Harald Welte 80d30fe803 vty/command.c: Cosmetic cleanup
this is just changing some of the code to reduce the way too high level
of indentation and thus improve readability.
2013-02-12 11:08:57 +01:00
Sylvain Munaut 4d8eea48f2 vty: Do better filtering of arguments, optional args particularly
This is essentially http://patchwork.diac24.net/patch/271/ forward
ported to libosmovty

Original-by: Paul Jakma <paul@quagga.net>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2013-01-03 22:34:26 +01:00
Holger Hans Peter Freyther 8297c819e9 vty: Add xsd and a command that can generate the documentation.
When building the doxygen documentation do not remove the other
VTY documentation files in the doc/vty folder. Create a command
that can be installed to dump all nodes and commands as XML on
the given VTY. Create a schema for the XML file and a XSL-T script
that can merge the generated file with additional information.
2012-07-25 11:58:58 +02:00
Sylvain Munaut dca7d2caaa doc: Fix the Doxygen section endings
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-04-18 21:53:23 +02:00
Holger Hans Peter Freyther 738f13395d vty: Add a function to write the current config to a file. 2012-03-28 17:53:27 +02:00
Harald Welte e881b1b9eb doxygen: split VTY configuration in multiple files 2011-08-17 18:52:30 +02:00
Harald Welte 7acb30c69b doxygen: Add (partial) VTY API documentation 2011-08-17 17:14:12 +02:00
Harald Welte 95b2b47b26 get rid of non-ANSI function declarations missing (void)
Detected by Smatch
2011-07-16 12:03:46 +02:00
Pablo Neira Ayuso 8341934844 include: reorganize headers file to include/osmocom/[gsm|core]
This patch moves all GSM-specific definitions to include/osmocom/gsm.
Moreover, the headers in include/osmocore/ have been moved to
include/osmocom/core.

This has been proposed by Harald Welte and Sylvain Munaunt.

Tested with `make distcheck'.

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 18:09:28 +01:00
Harald Welte 2822296ddb LOGGING: configure logging from the vty
We can now configure logging to (multiple) files, stderr and syslog
from the vty command line in a persistent way (config file)
2011-02-18 20:37:04 +01:00
Holger Hans Peter Freyther 8304b1e3e9 vty: Everything <= CONFIG_NODE is not a child of config
The method should be renamed to is child of config node
as it was comparing if vty->node > CONFIG_NODE. This is
fixing an assert in go_to_parent as we tried to find a
parent for the CONFIG_NODE.
2010-09-04 11:22:45 +08:00
Holger Hans Peter Freyther 3e85e8dba9 vty: Handle nodes part of the lib in the lib, for the rest call the callback 2010-08-26 15:00:52 +08:00
Holger Hans Peter Freyther 8f09f01380 vty: Add a new callback to let code decide if it is a config node or not 2010-08-26 15:00:52 +08:00
Holger Hans Peter Freyther 50cfb780d2 vty: Move the assumption of the config nodes into a function
Move the assumption that something is a child of the CONFIG_NODE
into a new function. The next step will be to use something else
for that.
2010-08-26 15:00:52 +08:00
Andreas Eversberg 33f0fc3c95 [VTY] add support for numeric ranges with negative numbers
This enables us to do something like <-128-127> as a numeric range.
2010-07-13 13:50:39 +02:00
Harald Welte 237f6241f2 [VTY] Introduce "struct vty_app_info" for vty_init() function 2010-05-25 23:38:19 +02:00
Harald Welte 3fb0b6f26e Create libosmovty as library from OpenBSC VTY functions 2010-05-25 22:28:39 +02:00