aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty/command.c
AgeCommit message (Collapse)AuthorFilesLines
2015-11-12vty: Don't call exit() but rather use OSMO_ASSERT()Harald Welte1-15/+4
This was pointed out by Jaroslav Skarvada during fedora packaging, and he has a valid point...
2015-11-12fix FSF address in sources/headersJaroslav Škarvada1-2/+2
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2015-08-05vty: Change API to have node installation be done by intHolger Hans Peter Freyther1-4/+4
We are mixing enums and hope that no short-enums are used. This is leading to a lot compiler warnings generated by clang. Change the API to work with integers. Porting: The go_parent_cb implementations in the applications need to be fixed. The API change leads to a compile time warning. Fixes: abis_om2000_vty.c:46:2: warning: implicit conversion from enumeration type 'enum bsc_vty_node' to different enumeration type 'enum node_type' [-Wenum-conversion] OM2K_NODE, ^~~~~~~~~
2014-12-04vty: Check with the application before writing the configHolger Hans Peter Freyther1-0/+9
For the BSC/NITB application we see that people modify the band without modifying the ARFCN. This creates an unbootable config. Using the new hook the BSC/NITB can check if the config is consistent and prevent the config file being written. Related: SYS#739
2013-09-11vty: Allow vty_go_parent() in all nodes.Jacob Erlbeck1-5/+25
This patch removes an assertion of node > CONFIG_NODE and changes the function to handle all nodes properly. For the sake of completeness, the generic 'exit' command implementation is extended to work properly with all nodes, too.
2013-09-10vty: Replace 'enum node_type' by 'int' for last_nodeJacob Erlbeck1-1/+1
In this case the last_node variable may hold values that are not in enum node_type, so int is used instead.
2013-09-08vty: Add vty_install_default() and use for the vty nodesJacob Erlbeck1-4/+14
This adds the vty_install_default() function that is basically the install_default() function plus the registration of the commands 'exit' and 'end'. The latter is only provided in subnodes of ENABLED_NODE and CONFIG_NONE. The VTY test program is extended to check these commands. Ticket: OW#952
2013-09-08vty: Refactored vty_go_parent(), 'end' and 'exit'Jacob Erlbeck1-22/+35
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-08vty: Rename is_config() to is_config_child()Jacob Erlbeck1-3/+3
The function is_config() returns 0 for CONFIG_NODE. Since that node is a config node, the function is renamed to resolve this.
2013-07-03vty: Attempt to fix various meam leaks in the VTY lookup codeHolger Hans Peter Freyther1-0/+3
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-02-12VTY: don't show HIDDEN or DEPRECATED vty commands in ? completionHarald Welte1-0/+3
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-12vty/command.c: Cosmetic cleanupHarald Welte1-82/+81
this is just changing some of the code to reduce the way too high level of indentation and thus improve readability.
2013-01-03vty: Do better filtering of arguments, optional args particularlySylvain Munaut1-208/+143
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>
2012-07-25vty: Add xsd and a command that can generate the documentation.Holger Hans Peter Freyther1-0/+148
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-04-18doc: Fix the Doxygen section endingsSylvain Munaut1-1/+1
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2012-03-28vty: Add a function to write the current config to a file.Holger Hans Peter Freyther1-46/+130
2011-08-17doxygen: split VTY configuration in multiple filesHarald Welte1-1/+1
2011-08-17doxygen: Add (partial) VTY API documentationHarald Welte1-9/+21
2011-07-16get rid of non-ANSI function declarations missing (void)Harald Welte1-1/+1
Detected by Smatch
2011-03-23include: reorganize headers file to include/osmocom/[gsm|core]0.2.0Pablo Neira Ayuso1-1/+1
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-02-18LOGGING: configure logging from the vtyHarald Welte1-0/+4
We can now configure logging to (multiple) files, stderr and syslog from the vty command line in a persistent way (config file)
2010-09-04vty: Everything <= CONFIG_NODE is not a child of configHolger Hans Peter Freyther1-2/+2
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-08-26vty: Handle nodes part of the lib in the lib, for the rest call the callback0.1.19Holger Hans Peter Freyther1-5/+7
2010-08-26vty: Add a new callback to let code decide if it is a config node or notHolger Hans Peter Freyther1-0/+4
2010-08-26vty: Move the assumption of the config nodes into a functionHolger Hans Peter Freyther1-3/+9
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-07-13[VTY] add support for numeric ranges with negative numbersAndreas Eversberg1-31/+67
This enables us to do something like <-128-127> as a numeric range.
2010-05-25[VTY] Introduce "struct vty_app_info" for vty_init() functionHarald Welte1-8/+9
2010-05-25Create libosmovty as library from OpenBSC VTY functionsHarald Welte1-0/+3176