summaryrefslogtreecommitdiffstats
path: root/src/vty
Commit message (Collapse)AuthorAgeFilesLines
* vty: Do better filtering of arguments, optional args particularlySylvain Munaut2013-01-031-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>
* build: Don't use the deprecated INCLUDES in the various Makefile.amSylvain Munaut2012-12-111-2/+1
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* logging: Make sure to install standard "end" command in VTY nodeHarald Welte2012-10-221-0/+2
| | | | | When you are in the config-log VTY node, you expect "end" to work like in any other sub-node of config.
* logging: Don't forget to save "logging filter all 1"Harald Welte2012-10-221-0/+4
| | | | | | | Prior to this fix, a persistent file or syslog log configuration didn't work across an application re-start, as the "logging filter all 1" was never saved and thus no messages were logged.
* vty: Address compiler warning about the const qualifierHolger Hans Peter Freyther2012-09-111-1/+1
| | | | | vty.c: In function 'vty_out_newline': vty.c:294:12: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
* vty: Address compiler warning about tolowerHolger Hans Peter Freyther2012-09-111-0/+1
| | | | | | | Include ctype.h to have a declaration of tolower. utils.c: In function 'vty_cmd_string_from_valstr': utils.c:95:6: warning: implicit declaration of function 'tolower' [-Wimplicit-function-declaration]
* import vty_cmd_string_from_valstr() from osmo-btsHarald Welte2012-08-201-0/+54
| | | | | This function is able to generate a VTY help string based on an array of 'struct value_string'.
* vty: Print the string using "%s", string to avoid security issuesHolger Hans Peter Freyther2012-08-021-1/+1
| | | | | | The Mandriva GCC is more strict about handling format strings, the copyright string might contain escape sequences and then any memory could be read.
* vty: Document the .TEXT of the descriptionHolger Hans Peter Freyther2012-07-251-1/+2
|
* vty: Add xsd and a command that can generate the documentation.Holger Hans Peter Freyther2012-07-251-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.
* correct inverted logic from commit f3ba8aAlexander Huemer2012-07-111-1/+1
|
* build: use LT_INIT(pic-only) instead of forcing -fPIC.Diego Elio Pettenò2012-06-301-1/+1
| | | | | | | | This actually allows for the user to override the decision and at the same time supports compilers that might not be able to use -fPIC at all. Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
* vty: avoid using a .data variable.Diego Elio Pettenò2012-06-301-7/+7
| | | | | | | | no_password_check was the only initialized, non-relocated data in the set of libraries, inverting its logic let us keep it in .bss (non-initialized data, which is mapped to the zero page). Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
* add additional newline in vty welcome messageHarald Welte2012-06-161-2/+2
|
* VTY: safe version of printing VTY welcome messageHarald Welte2012-06-032-19/+11
| | | | | | | | | | | | | | | | | | | | The old method used raw writes to the telnet FD, which is bad for several reasons: a) we don't know if we can actually write that many bytes to the socket at the given time b) the socket is still in blocking mode, so we could stall the entire process c) there may be weird interaction with the buffered writes of the vty_out Now, the print_welcome() functionality has moved to vty_hello() instead, where we can use normal vty_out() in buffered mode. This commit is expected to fix the garbled welcome message on arm-eglibc targets. It might still be a good idea to migrate the entire telnet interface to libtelnet - but at some later time ;)
* doc: Fix the Doxygen section endingsSylvain Munaut2012-04-184-4/+4
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* vty: Add a function to write the current config to a file.Holger Hans Peter Freyther2012-03-281-46/+130
|
* vty/telnet: Add function to allow binding telnet interface to custom ↵Sylvain Munaut2012-03-011-35/+22
| | | | | | IP/Interface Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* vty: Fixed vty_down_level to move down from config nodesAndreas.Eversberg2011-11-121-3/+5
| | | | | | | | | When using ^D at config nodes above the CONFIG_NODE, the go_parent_cb function is used to go down by one node. This is equivalent to "exit" command. Written-by: Andreas.Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* vty/telnet_interface: Add telnet_exit functionAndreas.Eversberg2011-11-121-0/+12
| | | | | | | This frees socket and pending connections Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* vty: Provide documentation for all logging facilitiesHolger Hans Peter Freyther2011-10-031-1/+10
| | | | Document all facilities in the log syslog command.
* vty: Provide logging set-log-mask, deprecate set log maskHolger Hans Peter Freyther2011-10-031-2/+12
| | | | | | There are no other commands on the set, log and mask level, create a simple set-log-mask command and deprecate the old way.
* doxygen: Add main page for all three librariesHarald Welte2011-08-301-0/+38
|
* doxygen: split VTY configuration in multiple filesHarald Welte2011-08-172-2/+2
|
* doxygen: Add (partial) VTY API documentationHarald Welte2011-08-174-16/+87
|
* telnet_interface: if we don't check for the return value, don't use retHarald Welte2011-07-161-5/+4
|
* telnet_interface: get rid of 'const' warningHarald Welte2011-07-161-1/+1
|
* get rid of non-ANSI function declarations missing (void)Harald Welte2011-07-162-5/+5
| | | | Detected by Smatch
* vty: print actual application name rather than always OpenBSC on connectHarald Welte2011-05-221-3/+9
|
* libosmocore: bump library interface version to '1' for new osmo_ namesHarald Welte2011-05-081-0/+1
|
* select: use namespace prefix osmo_fd* and osmo_select*Pablo Neira Ayuso2011-05-071-9/+9
| | | | | | | | | Summary of changes: s/struct bsc_fd/struct osmo_fd/g s/bsc_register_fd/osmo_fd_register/g s/bsc_unregister_fd/osmo_fd_unregister/g s/bsc_select_main/osmo_select_main/g
* vty: Fix a memory leak in the vty description commandHolger Hans Peter Freyther2011-03-291-0/+2
| | | | | | Before assigning a new string, free the previous one. This assume that it was allocated with talloc which should be true for the osmocom users.
* include: reorganize headers file to include/osmocom/[gsm|core]Pablo Neira Ayuso2011-03-237-14/+14
| | | | | | | | | | | | 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>
* vty: integration with logging frameworkPablo Neira Ayuso2011-03-191-49/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logging categories are registered by the applications, like osmo-nitb, during startup. Thus, the VTY have to provide the logging commands according to the logging categories that the application has registered. Before this patch, the VTY contained the logging categories hardcoded. Thus, any change in the logging categories by the application would not be shown by the VTY. So far, this was not a problem because all applications used the same logging categories. However, according to what Harald told me, this may be a problem in the future. This patch resolve the lack of integration between the logging framework and the VTY by generating the VTY logging commands from the logging categories registered. Since this patch changes one function of the libosmocore API, it follows another patch for the openbsc application to get in sync with the new function layout. I have reworked and renamed the functions: * log_vty_category_string() * log_vty_level_string() to provide the new ones that generate the exact output that VTY requires. This patch does not release the memory allocated by talloc_zero_size() to store the VTY strings for the commands and the description. I found no exit function that can clean up resources that were allocated.
* LOGGING: Use host.app_info->name instead of FIXMEHarald Welte2011-02-241-1/+4
| | | | This should put a useful syslog identity in place.
* vty: Revert Makefile.am change for libosmocore dependencyHarald Welte2011-02-191-1/+1
|
* LOGGING: remove duplicated code between vty-logging and cfg-loggingHarald Welte2011-02-181-123/+60
|
* LOGGING: Add missing 'nat' subsystemHarald Welte2011-02-181-1/+2
|
* LOGGING: configure logging from the vtyHarald Welte2011-02-184-23/+366
| | | | | We can now configure logging to (multiple) files, stderr and syslog from the vty command line in a persistent way (config file)
* LOGGING: Pass the log level down to the log target output functionHarald Welte2011-02-171-1/+2
| | | | This will be required for mapping osmocore log levels to syslog priorities.
* logging: Add isup,m2ua,pcap from the cellmgr.Holger Hans Peter Freyther2011-01-221-1/+4
| | | | | This is something that we should generate dynamically from the log_info as well. This is adding bits from the cellmgr_ng.
* vty: Fix typo testing return value of bindSylvain Munaut2011-01-031-1/+1
| | | | | | Thanks to playya__ (Dr. Fred) on IRC for pointing this out Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* Use the app_info->name instead of the hostnameHarald Welte2010-12-241-1/+1
| | | | | | This makes more sense in case you run BCS, SGSN and other components on the same host. Having multiple telnet sessions with the same prompt can otherwise be confusing.
* vty: Add functions to access index and nodeHolger Hans Peter Freyther2010-09-141-0/+9
| | | | | | 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.
* vty: Use the copyright string from the app_info.Holger Hans Peter Freyther2010-09-111-3/+6
|
* vty: Link osmovty to osmocore as it is using the symbolsHolger Hans Peter Freyther2010-09-111-0/+1
| | | | | Use SUBDIRS to build src first and the src/vty. We will need to find the right way add the dependencies.
* vty: Everything <= CONFIG_NODE is not a child of configHolger Hans Peter Freyther2010-09-041-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.
* vty: Handle nodes part of the lib in the lib, for the rest call the callbackHolger Hans Peter Freyther2010-08-261-5/+7
|
* vty: Add a new callback to let code decide if it is a config node or notHolger Hans Peter Freyther2010-08-261-0/+4
|
* vty: Move the assumption of the config nodes into a functionHolger Hans Peter Freyther2010-08-261-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.