diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2013-09-06 16:52:00 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2013-09-08 10:49:52 +0200 |
commit | 0c987bd83b2b23f3f125c74f4a653c2fd2ae8c92 (patch) | |
tree | 0b87b424c5a44bc5f6d4655bc5987084270621fd /include | |
parent | 7eed0538ae79394a10ac9667a798237457ac2373 (diff) |
vty: Add vty_install_default() and use for the vty nodes
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
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/vty/command.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h index 8fbb4824..b3b30291 100644 --- a/include/osmocom/vty/command.h +++ b/include/osmocom/vty/command.h @@ -340,6 +340,11 @@ void install_element(enum node_type, struct cmd_element *); void install_element_ve(struct cmd_element *cmd); void sort_node(void); +/* This is similar to install_default() but it also creates + * 'exit' and 'end' commands. + */ +void vty_install_default(enum node_type); + /* Concatenates argv[shift] through argv[argc-1] into a single NUL-terminated string with a space between each element (allocated using XMALLOC(MTYPE_TMP)). Returns NULL if shift >= argc. */ |