aboutsummaryrefslogtreecommitdiffstats
path: root/src/ctrl/control_vty.c
AgeCommit message (Collapse)AuthorFilesLines
2022-12-20ctrl: add optional port to bind commandMax1-2/+11
So far ctrl interface did not allow to specify port to bind to. Let's fix this and make it consistent with the way vty bind works. N. B: the functions which ignore port configured via vty are marked as deprecated, the sw which uses them should be ported to either newly added ctrl_init_default() or simplified ctrl_interface_setup() The similar change for vty interface will be addressed via separate patch series. Related: OS#5809 Change-Id: I0fd87fd41fd3ac975273968d24f477daa3cd3aa9
2021-12-14treewide: remove FSF addressOliver Smith1-4/+0
Remove the paragraph about writing to the Free Software Foundation's mailing address. The FSF has changed addresses in the past, and may do so again. In 2021 this is not useful, let's rather have a bit less boilerplate at the start of source files. Change-Id: I5050285e75cf120407a1d883e99b3c4bcae8ffd7
2020-10-06vty: use install_lib_element() and install_lib_element_ve()Vadim Yanitskiy1-2/+2
See https://lists.osmocom.org/pipermail/openbsc/2020-October/013278.html. Change-Id: Ic541126ffd4975daf87199abfafb465e2055e44f Related: SYS#4937
2017-11-13Fix/Update copyright notices; Add SPDX annotationHarald Welte1-1/+3
Let's fix some erroneous/accidential references to wrong license, update copyright information where applicable and introduce a SPDX-License-Identifier to all files. Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
2017-09-27vty: install 'exit', 'end',... commands on *all* nodesNeels Hofmeyr1-1/+0
In many callers of the VTY API, we are lacking the vty_install_default() step at certain node levels. This creates nodes that lack the 'exit' command, and hence the only way to exit such a node is to restart the telnet session. Historically, the VTY looked for missing commands on the immediate parent node, and hence possibly found the parent's 'exit' command when the local node was missing it. That is why we so far did not notice the missing default commands. Furthermore, some callers call install_default() instead of vty_install_default(). Only vty_install_default() also includes the 'exit' and 'end' commands. There is no reason why there are two sets of default commands. To end this confusion, to catch all missing 'exit' commands and to prevent this from re-appearing in the future, simply *always* install all default commands implicitly when calling install_node(). In cmd_init(), there are some top-level nodes that apparently do not want the default commands installed. Keep those the way they are, by changing the invocation to new install_node_bare() ({VIEW,AUTH,AUTH_ENABLE}_NODE). Make both install_default() and vty_install_default() no-ops so that users of the API may still call them without harm. Do not yet deprecate yet, which follows in Icf5d83f641e838cebcccc635a043e94ba352abff. Drop all invocations to these two functions found in libosmocore. Change-Id: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b
2017-08-28vty: 'ctrl' node: add missing default commands like list,exit,endNeels Hofmeyr1-0/+1
Change-Id: I72569ed767b6a4d792b2867d02caa65520e27cd3
2017-06-23doxygen: unify use of \file across the boardNeels Hofmeyr1-2/+3
Considering the various styles and implications found in the sources, edit scores of files to follow the same API doc guidelines around the doxygen grouping and the \file tag. Many files now show a short description in the generated API doc that was so far only available as C comment. The guidelines and reasoning behind it is documented at https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation In some instances, remove file comments and add to the corresponding group instead, to be shared among several files (e.g. bitvec). Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
2017-01-15Always include <osmocom/core/talloc.h> and not <talloc.h>Harald Welte1-1/+1
In EMBEDDED builds we don't have a system-wide talloc Change-Id: Icc526016bda45b36e584afee8669996752d6d89c
2016-02-25vty: add ctrl section for Control interface bind addressNeels Hofmeyr1-0/+88
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.