Commit Graph

25 Commits

Author SHA1 Message Date
Pau Espin b9be6767ab server: Add vty command file-permission-mask
Related: SYS#5792
Change-Id: I78e0b56b38de438ee5fb679ae41c65b02ea2e722
2022-01-12 17:44:38 +01:00
Harald Welte 8b73a2a530 vty: call telnet_init_dynif() after config file is read
In case the config file specifies a vty bind address, we must read
it before we start the telnet server.

Change-Id: I44561754d4beaad5c74cb66994ca4ef38960ea78
2021-04-24 16:09:09 +02:00
Harald Welte dd1389c3d3 use telnet_init_dynif() to allow VTY bind to non-loopack address
Prior to this patch, you could configure 'bind 1.2.3.4' in the
config file, but the telnet interface still binds to 127.0.0.1.

Change-Id: I9b86b2cf6949917c55ea15277619cfa2b745185d
2021-04-24 13:00:41 +02:00
Harald Welte b0b2a2d542 add "--version" to osmo-pcap-client and -server
Change-Id: Ib82ee1a784a657f7274d78ba5f7a8afe6cfab395
2021-04-18 14:24:15 +02:00
Vadim Yanitskiy ff3f4b3bef vty_{client,server}_init(): remove unused argument
Change-Id: I65256c8602e91bcdbe5fe9e532b6ce7d347d3980
2021-04-16 20:30:18 +02:00
Vadim Yanitskiy d59783e601 vty: register commands for talloc context introspection
Change-Id: I3774cfd483102993340bd6e96f8512af61085679
2021-04-16 19:36:29 +02:00
Joachim Steiger 52f06fd54b manuals: generate VTY reference for osmo-pcap-{client,server}
Change-Id: I28353f51de798535a3bb6efdc6c2da443d96ddfb
Tweaked-By: Vadim Yanitskiy <vyanitskiy@sysmocom.de>
2021-04-16 19:29:31 +02:00
Pau Espin 716a4db54c main: generate coredump and exit upon SIGABRT received
Previous code relied on abort() switching sigaction to SIG_FDL +
retriggering SIGABRT in case the signal handler returns, which would
then generate the coredump + terminate the process.
However, if a SIGABRT is received from somewhere else (kill -SIGABRT),
then the process would print the talloc report and continue running,
which is not desired.

Fixes: OS#4865
Change-Id: I39367aa480445fe961dcfa308789b3fc0cf759a1
2020-11-25 19:11:43 +01:00
Pau Espin 210ed934bb Remove undefined param passed to {logging,osmo_stats}_vty_add_cmds
Since March 15th 2017, libosmocore API logging_vty_add_cmds() had its
parameter removed (c65c5b4ea075ef6cef11fff9442ae0b15c1d6af7). However,
definition in C file doesn't contain "(void)", which means number of
parameters is undefined and thus compiler doesn't complain. Let's remove
parameters from all callers before enforcing "(void)" on it.
API osmo_stats_vty_add_cmds never had a param list but has seem problem
(no "void"), so some users decided to pass a parameter to it.

Change-Id: I2e1ab7005514f1a06cac03e967aa5c8ea472e671
Related: OS#4138
2019-08-05 16:28:11 +02:00
Pau Espin a82aaef507 server: Add pcap snaplen VTY cmd
Change-Id: I8fdcdc1a58926ec66a1dc5dc7a5e57ed4dceb4b4
2018-10-08 20:20:43 +02:00
Pau Espin f10c57801a Replace '.' in counter names with ':'
The '.' is illegal character in counter names, as they are exported
via CTRL interface, where '.' has a special meaning that cannot be
used by strings comprising the variable name.

Change-Id: Icec5338d3242137980fa05d2c7ae2db940afb542
2018-10-08 20:20:43 +02:00
Pau Espin dc27ca85aa Drop osmo_init_logging and use osmo_init_logging2
Change-Id: Ib1c38f6134b3c1988477caa0f2c281b1ef01d5e0
2018-10-08 13:29:52 +02:00
Pau Espin 5f3c30c40c server: Properly name main talloc ctx
Change-Id: I810417d84c6a6ebcbc4b75a9bc41607bb0637228
2018-10-08 13:29:52 +02:00
Harald Welte 2aea8704f3 Use TCP port numbers for VTY that don't overlap with other Osmocom Software
osmo-pcap for historical reasons uses the same port numbers as
OsmoPCU and OsmoBTS.  This leads to problems when wanting to run related
software together on one system.  Let's break the historical assumptions
and start with non-overlapping port numbers that are allocated/assigned
from https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers

Change-Id: I638ac0534517931d0987ce9f72f5db4f5b6c16b7
2017-07-21 15:18:02 +02:00
Holger Hans Peter Freyther cf29fd7069 server: Add vty interface for the TLS configuration
Make the priority configurable, load DH params, allow to specify
certificates or anonymous operations.

Change-Id: I8ec3c0f8e1ee2089e1b7dacd9de842260930032f
2016-09-08 16:17:02 +02:00
Holger Hans Peter Freyther 9ea4da4bbb server: Introduce tls mode for the server
Using tls priority of NORMAL:+ANON-ECDH:+ANON-DH already allows a
client to connect to a server and protect the data using tls.

Generate the dh params on load (and do that for the client right
now as well) but that will go away soon.

Change-Id: Ifa2ad24c0a631573c259a3bf94b91a946ad9ec9d
2016-09-08 16:17:01 +02:00
Holger Hans Peter Freyther 99526a6ad0 server: Add global and per client counters and begin to count
Add the basics for getting a picture what a client and the server
is doing. We need to create unique descriptions as the code is
working with names and not numbers for clients.

Change-Id: I4a9be5bdd815d280cccf0199efc2ca79fc77d393
2016-08-19 19:23:00 +02:00
Holger Hans Peter Freyther 918be51338 server: Fail if the telnet interface can not be bound
Change-Id: Ibd14da3e7f62065f5d28d4a90d2b55eed609b64f
2016-08-18 18:37:13 +02:00
Holger Hans Peter Freyther 6e938eda1c stats: Initialize the stats(d) backend in the client/server
Initialize the stats backend allowing key performance indicators
to be pushed out of the system.

Change-Id: Id652b60d230f705b927e49d81cd3731432156c7e
2016-08-13 10:36:58 +02:00
Holger Hans Peter Freyther cae1b7c960 misc: Remove process.h include, osmo_daemonize is in application.h now 2011-07-19 17:56:52 +02:00
Daniel Willmann c7401c6c23 server: Register signal handler to reopen logfiles on SIGHUP 2011-07-19 17:56:07 +02:00
Holger Hans Peter Freyther 7309a906d0 osmo-pcap-server: Write the pcap files to disk, roll them over 2011-06-01 14:09:26 +02:00
Holger Hans Peter Freyther 88c07f2b7e osmo-pcap-server: Prepare a file limit, initialize the base path 2011-06-01 14:02:54 +02:00
Holger Hans Peter Freyther 9f6127f592 osmo-pcap-server: Work on the generic VTY interface for the server
Work on being able to configure clients that are allowed to
connect to the server.
2011-05-31 23:42:48 +02:00
Holger Hans Peter Freyther 13619dd235 osmo-pcap-server: Start with the skeleton of the pcap server 2011-05-31 23:42:48 +02:00