summaryrefslogtreecommitdiffstats
path: root/include/osmocom/vty
Commit message (Collapse)AuthorAgeFilesLines
* vty: Make a reservation for the osmo-sip-connectorHolger Hans Peter Freyther2016-03-311-0/+1
| | | | | The osmo-sip-connector is a new application and is a MNCC to SIP bridge. It is not implementing transcoding or RTP proxying at all.
* vty: add ctrl section for Control interface bind addressNeels Hofmeyr2016-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This may seem like overkill for a mere const char * config item, but it makes the Control interface VTY commands reusable in any main() scope (inspired by libosmo-abis' VTY config). Add API functions ctrl_vty_init() and ctrl_vty_get_bind_addr(), in new files src/ctrl/control_vty.c and include/osmocom/ctrl/control_vty.h, compiled and/or installed dependent on ENABLE_VTY. Using these functions allows configuring a static const char* with the VTY commands ctrl bind A.B.C.D which callers shall subsequently use to bind the Control interface to a specific local interface address, by passing the return value of ctrl_vty_get_bind_addr() to control_interface_setup(). Add CTRL_NODE to enum node_type, "eating" RESERVED4_NODE to heed that comment on avoiding ABI changes.
* vty: add bind command for telnet vty lineNeels Hofmeyr2016-02-251-0/+3
| | | | | | | | | | | | | | | | | | | | Add VTY command line vty bind A.B.C.D The command merely stores the configured IP-address, which can then be used by the calling main program to set the telnet port of the VTY line. (Commits in openbsc and osmo-iuh will follow up on this.) Add function vty_get_bind_addr() to publish the address in the vty.h API. Add static vty_bind_addr to store. For allocation/freeing reasons, a NULL address defaults to 127.0.0.1. BTW, I decided against allowing keywords 'any' and 'localhost' in place of an actual IP address to make sure a written config is always identical to the parsed config.
* Add CSCN ctrl port defsNeels Hofmeyr2016-02-151-0/+1
|
* add vty port nr for osmo-cscnNeels Hofmeyr2016-02-101-0/+1
|
* fix FSF address in sources/headersJaroslav Škarvada2015-11-123-6/+6
| | | | Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
* stats/vty: Add selective show stats commandJacob Erlbeck2015-08-221-0/+2
| | | | | | | | | | | | | | | | Currently there is only the 'show stats' command which shows all counter and stat_item values. This can lead to many lines of output if there are per-subscriber rate counters. The new command added by this commit allows it to only show groups of a certain level (class_id), similar to the 'level' configuration command for stats reporter. The new command is show stats level (global|peer|subscriber) Sponsored-by: On-Waves ehf
* gtphub: add OSMO_VTY_PORT_GTPHUB.Neels Hofmeyr2015-11-021-0/+1
| | | | | | This is for gtphub, being developed in openbsc.git. Sponsored-by: On-Waves ehi
* fix some typosNeels Hofmeyr2015-11-021-1/+1
| | | | Sponsored-by: On-Waves ehi
* vty: Add reserved nodes to enum node_typeJacob Erlbeck2015-11-021-0/+9
| | | | | | | | | | | | | Currently every time a node is added to enum node_type, this constitutes an ABI change, since _LAST_OSMOVTY_NODE will get incremented accordingly. In this case, every project that adds new node type based on that value will have to be recompiled. This commit adds 4 spare node type values, which can be replaced one-by-one by new real types until they are exhausted to avoid this kind of ABI change. Sponsored-by: On-Waves ehf
* stats: Add osmo_ name prefix to identifiersJacob Erlbeck2015-11-022-2/+2
| | | | | | | | | | Since the the stat_item and stats functions and data types are meant to be exported, they get an osmo_ prefix. Sponsored-by: On-Waves ehf [hfreyther: Prepended the enum values too. This was requested by Jacob]
* stats/vty: Add stats configurationJacob Erlbeck2015-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | This commit provides stats configuration similar to the log configuration. The following vty commands are added to the config node: stats reporter statsd Create/Modify a statsd reporter no stats reporter statsd Remove a statsd reporter To actually configure a reporter, the config-stats node is entered when the "stats reporter" command has succeeded. The following new vty commands are available there: local-ip ADDR Set the IP address to which we bind locally no local-ip Do not bind to a certain IP address remote-ip ADDR Set the remote IP address to which we connect remote-port <1-65535> Set the remote port to which we connect prefix PREFIX Set the item/counter name prefix no prefix Do not use a prefix enable Enable the reporter disable Disable the reporter Sponsored-by: On-Waves ehf
* stats/vty: Add stats_vty.cJacob Erlbeck2015-10-291-0/+3
| | | | | | | | | | | | | This file will contain the VTY code related to statistics. This commit adds a minimal file with just as single VTY command: - show stats This command shows all statistical values To enable this and future commands, the main program needs to call stats_vty_add_cmds(). Sponsored-by: On-Waves ehf
* stat/vty: Add vty_out_statistics_full to show all statisticsJacob Erlbeck2015-10-281-0/+2
| | | | | | | This functions shows the state of all osmo_counters, stat_item groups, and counter groups. Sponsored-by: On-Waves ehf
* stats: Add vty_out_stat_item_groupJacob Erlbeck2015-10-281-1/+5
| | | | | | This functions dumps a whole stat item group to the VTY. Sponsored-by: On-Waves ehf
* vty: Change API to have node installation be done by intHolger Hans Peter Freyther2015-08-052-6/+6
| | | | | | | | | | | | | | | | 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, ^~~~~~~~~
* vty: Check with the application before writing the configHolger Hans Peter Freyther2014-12-041-0/+2
| | | | | | | | | 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
* remove references to u_char type, use 'unsigned char' insteadHarald Welte2014-11-142-2/+2
| | | | ... u_char not being defined on Nuttx.
* add port number 4238 for BTS control interfaceHarald Welte2014-08-241-0/+1
|
* new <osmocom/vty/ports.h> file listing VTY tcp portsHarald Welte2014-08-211-0/+14
| | | | imported from http://openbsc.osmocom.org/trac/wiki/PortNumbers
* include: Switch to #pragma once patternSylvain Munaut2014-06-167-27/+7
| | | | Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* vty: Make vty_event dispatch signals and use it in the testcaseHolger Hans Peter Freyther2013-10-101-0/+14
| | | | | | | | | The testcase didn't work on Ubuntu 12.04 because vty_create will directly call vty_event (e.g. not through the plt). This means that the approach to override vty_event in the testcase failed. Use the signal interface of libosmocore and make the testcase use it. The signals can be generally useful as well.
* vty: Add vty_install_default() and use for the vty nodesJacob Erlbeck2013-09-081-0/+5
| | | | | | | | | | | 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
* logging: Make sure to install standard "end" command in VTY nodeHarald Welte2012-10-221-0/+1
| | | | | When you are in the config-log VTY node, you expect "end" to work like in any other sub-node of config.
* vty: Include osmocom/core/utils.h for the value_string structHolger Hans Peter Freyther2012-09-111-0/+1
|
* import vty_cmd_string_from_valstr() from osmo-btsHarald Welte2012-08-201-0/+5
| | | | | This function is able to generate a VTY help string based on an array of 'struct value_string'.
* VTY: Allow to compile vty.h and command.h headers with C++Andreas Eversberg2012-07-122-3/+11
|
* build: simplify headers management and remove recursionDiego Elio Pettenò2012-06-301-4/+0
| | | | | | | | | | | | There is no real reason to keep the include directory a multi-level recursion, so instead declare everything within include (so that we can use proper nobase_ declarations) and be it. Please note that since we removed the sub-Makefile.am, ./configure will not create the directory structure for us on out-of-tree builds, so we have to make sure the directory we're generating to exists first. Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
* add library VTY nodes for NS and BSSGPHarald Welte2012-06-161-0/+2
|
* doc: Fix the Doxygen section endingsSylvain Munaut2012-04-183-3/+3
| | | | 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-0/+3
|
* vty/telnet: Add function to allow binding telnet interface to custom ↵Sylvain Munaut2012-03-011-0/+1
| | | | | | IP/Interface Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* vty: Fixed vty_down_level to move down from config nodesAndreas.Eversberg2011-11-121-0/+1
| | | | | | | | | 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/+2
| | | | | | | This frees socket and pending connections Written-by: Andreas Eversberg <jolly@eversberg.eu> Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
* add missing declarations of cfg_description_cmd to vty/vty.hHarald Welte2011-09-041-0/+3
|
* doxygen: split VTY configuration in multiple filesHarald Welte2011-08-172-2/+2
|
* doxygen: Add (partial) VTY API documentationHarald Welte2011-08-173-70/+122
|
* vty: Increase the number of arguments one can have in VTY commandsHolger Hans Peter Freyther2011-07-241-1/+1
| | | | | | | | For some interactive commands (e.g. sending a SMS in OpenBSC) we are using the "NAME." arg definition. For the usecase of sending SMS it is not enough to only allow about 13 spaces. Increase the limit. Original patch is coming from Dennis Wehrle.
* make sure we don't have namespace clashes between libraries and appsHarald Welte2011-07-191-2/+2
| | | | | | | | * All loging prefixes in libraries should be DL like DLINP * All signals / subsystems should be called S_L_* SS_L_* * All command nodes should be called L_*_NODE This makes sure existinc code still compiles as expected
* vty: reserve nodes for libosmo-abisPablo Neira Ayuso2011-07-181-0/+3
| | | | | This patch reserves E1INP_NODE and IPA_NODE for libosmo-abis VTY interfaces.
* get rid of non-ANSI function declarations missing (void)Harald Welte2011-07-161-1/+1
| | | | Detected by Smatch
* select: use namespace prefix osmo_fd* and osmo_select*Pablo Neira Ayuso2011-05-071-1/+1
| | | | | | | | | 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: move vty_out_rate_ctr_group prototype to osmocom/vty/misc.hPablo Neira Ayuso2011-03-282-1/+11
| | | | Before this patch, it was in osmocom/core/rate_ctr.h
* include: reorganize headers file to include/osmocom/[gsm|core]Pablo Neira Ayuso2011-03-231-2/+2
| | | | | | | | | | | | 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-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: remove duplicated code between vty-logging and cfg-loggingHarald Welte2011-02-181-0/+2
|
* LOGGING: configure logging from the vtyHarald Welte2011-02-181-0/+1
| | | | | We can now configure logging to (multiple) files, stderr and syslog from the vty command line in a persistent way (config file)
* vty: Add functions to access index and nodeHolger Hans Peter Freyther2010-09-141-0/+2
| | | | | | 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: Make the talloc ctx extern void* to avoid duplicate symbolsHolger Hans Peter Freyther2010-08-311-1/+1
|
* vty: Add a new callback to let code decide if it is a config node or notHolger Hans Peter Freyther2010-08-261-0/+1
|