aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty
AgeCommit message (Collapse)AuthorFilesLines
2012-08-20import vty_cmd_string_from_valstr() from osmo-btsHarald Welte1-0/+54
This function is able to generate a VTY help string based on an array of 'struct value_string'.
2012-08-02vty: Print the string using "%s", string to avoid security issuesHolger Hans Peter Freyther1-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.
2012-07-25vty: Document the .TEXT of the descriptionHolger Hans Peter Freyther1-1/+2
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-07-11correct inverted logic from commit f3ba8aAlexander Huemer1-1/+1
2012-06-30build: use LT_INIT(pic-only) instead of forcing -fPIC.0.5.2Diego Elio Pettenò1-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>
2012-06-30vty: avoid using a .data variable.Diego Elio Pettenò1-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>
2012-06-16add additional newline in vty welcome message0.4.3Harald Welte1-2/+2
2012-06-03VTY: safe version of printing VTY welcome messageHarald Welte2-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 ;)
2012-04-18doc: Fix the Doxygen section endingsSylvain Munaut4-4/+4
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
2012-03-01vty/telnet: Add function to allow binding telnet interface to custom ↵Sylvain Munaut1-35/+22
IP/Interface Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-11-12vty: Fixed vty_down_level to move down from config nodesAndreas.Eversberg1-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>
2011-11-12vty/telnet_interface: Add telnet_exit functionAndreas.Eversberg1-0/+12
This frees socket and pending connections Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-10-03vty: Provide documentation for all logging facilitiesHolger Hans Peter Freyther1-1/+10
Document all facilities in the log syslog command.
2011-10-03vty: Provide logging set-log-mask, deprecate set log maskHolger Hans Peter Freyther1-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.
2011-08-30doxygen: Add main page for all three librariesHarald Welte1-0/+38
2011-08-17doxygen: split VTY configuration in multiple filesHarald Welte2-2/+2
2011-08-17doxygen: Add (partial) VTY API documentationHarald Welte4-16/+87
2011-07-16telnet_interface: if we don't check for the return value, don't use retHarald Welte1-5/+4
2011-07-16telnet_interface: get rid of 'const' warningHarald Welte1-1/+1
2011-07-16get rid of non-ANSI function declarations missing (void)Harald Welte2-5/+5
Detected by Smatch
2011-05-22vty: print actual application name rather than always OpenBSC on connectHarald Welte1-3/+9
2011-05-08libosmocore: bump library interface version to '1' for new osmo_ namesHarald Welte1-0/+1
2011-05-07select: use namespace prefix osmo_fd* and osmo_select*Pablo Neira Ayuso1-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
2011-03-29vty: Fix a memory leak in the vty description commandHolger Hans Peter Freyther1-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.
2011-03-23include: reorganize headers file to include/osmocom/[gsm|core]0.2.0Pablo Neira Ayuso7-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>
2011-03-19vty: integration with logging framework0.1.31Pablo Neira Ayuso1-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.
2011-02-24LOGGING: Use host.app_info->name instead of FIXMEHarald Welte1-1/+4
This should put a useful syslog identity in place.
2011-02-19vty: Revert Makefile.am change for libosmocore dependencyHarald Welte1-1/+1
2011-02-18LOGGING: remove duplicated code between vty-logging and cfg-loggingHarald Welte1-123/+60
2011-02-18LOGGING: Add missing 'nat' subsystemHarald Welte1-1/+2
2011-02-18LOGGING: configure logging from the vtyHarald Welte4-23/+366
We can now configure logging to (multiple) files, stderr and syslog from the vty command line in a persistent way (config file)
2011-02-17LOGGING: Pass the log level down to the log target output functionHarald Welte1-1/+2
This will be required for mapping osmocore log levels to syslog priorities.
2011-01-22logging: Add isup,m2ua,pcap from the cellmgr.Holger Hans Peter Freyther1-1/+4
This is something that we should generate dynamically from the log_info as well. This is adding bits from the cellmgr_ng.
2011-01-03vty: Fix typo testing return value of bindSylvain Munaut1-1/+1
Thanks to playya__ (Dr. Fred) on IRC for pointing this out Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-24Use the app_info->name instead of the hostnameHarald Welte1-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.
2010-09-14vty: Add functions to access index and node0.1.20Holger Hans Peter Freyther1-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.
2010-09-11vty: Use the copyright string from the app_info.Holger Hans Peter Freyther1-3/+6
2010-09-11vty: Link osmovty to osmocore as it is using the symbolsHolger Hans Peter Freyther1-0/+1
Use SUBDIRS to build src first and the src/vty. We will need to find the right way add the dependencies.
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-29add configure option '--disable-vty' to prevent building libosmovtyHarald Welte1-0/+2
2010-05-25[VTY] Introduce "struct vty_app_info" for vty_init() functionHarald Welte2-13/+12
2010-05-25rename log_info to osmo_log_info to avoid namespace clash with appHarald Welte1-2/+2
2010-05-25Create libosmovty as library from OpenBSC VTY functionsHarald Welte8-0/+6127