Commit Graph

10 Commits

Author SHA1 Message Date
Harald Welte fde19ed579 logging: Introduce DLBSSGP logging constant
Historically, BSSGP uses a non-constant, user-configurable integer
varieable for the logging sub-system.  Let's replace this with a
statically-allocated library logging constant.

This is required if we want to use the subsystem number in e.g.
static initialized for osmo_fsm.log_subsys.

Change-Id: I506190aae9217c0956e4b5764d1a0c0772268e93
2020-12-09 22:50:01 +01:00
Daniel Willmann 751977be6f ns2: Add log filtering by NSE/NSEI, fix NSVC filter on receive
NSVC filtering was only implemented on sending messages, this also adds
log_set_context() calls to  ns2_recv_vc()
Filtering by NSE is implemented similar to NSVC.

Change-Id: I63c0e85f82f5d08c5a6f535da94b8648498439d2
Related: SYS#5232
2020-12-03 15:14:18 +01:00
Alexander Couzens 3b688835b0 gb/common_vty: use void *
As long the filter doesn't look into the nsvc/bvc structs
there is no need to use the type.
Further it allows to use the same code for NS1 and NS2.

Change-Id: I9b9a70f382a94f1d41142060d5db569f9df865ac
2020-09-07 07:50:58 +00:00
Harald Welte e08da97570 Fix/Update copyright notices; Add SPDX annotation
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-11-13 01:35:12 +09:00
Neels Hofmeyr 607275c30b gb: drop special vty exit commands, use vty_install_default()
L_NS_NODE and L_BSSGP_NODE had specialized 'exit' and 'end' vty commands, but
all they do is return to the CONFIG and ENABLE_NODEs like the default 'exit'
and 'end' commands. Drop them and use the default 'exit' and 'end' cmds.

Examining BSSGP and NS node behavior in osmo-sgsn exhibited identical list and
exit/end behavior before and after this patch.

Prepares for an upcoming commit incorporating vty_install_default() into
install_node(), see I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b: this patch
changes to the default commands, the upcoming change implies them.

Change-Id: I5b0de066b4249d482c22620d5b1bcb03f381293c
2017-09-27 14:04:08 +00:00
Neels Hofmeyr 17518fe393 doxygen: unify use of \file across the board
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-06-23 00:18:23 +00:00
Neels Hofmeyr 8b86cd76cf logging.h: fixup: shorter names for LOGGING_FILTER_* and LOGGING_CTX_*
My recent logging patch was merged to master a bit too soon. Accomodate the
request for naming that matches the general "LOG" prefix instead of "LOGGING".

libosmocore will not be backwards-compatible with the few commits from
change-id I5c343630020f4b108099696fd96c2111614c8067 up to this one. This and
following commits are backwards compatible with those before that short window.

See also:
* openbsc change-id Ib2ec5e4884aa90f48051ee2f832af557aa525991
* osmo-pcu change-id I4db4a668f2be07f3d55f848d38d1b490d8a7a685

Change-Id: I424fe3f12ea620338902b2bb8230544bde3f1a93
2017-02-23 18:08:12 +01:00
Neels Hofmeyr 812ba6dc63 logging: centrally define ctx and filter indexes
It is too easy for calling code to use the same filter and context indexes for
different filters and structs. For example, openbsc's IMSI filter and libgb's
GPRS_BVC filter both fall on index 1 even though there are plenty more indexes
to choose from. To alleviate this, have one central definition here, sort of
like ports.h does for VTY and CTRL port numbers.

Add static asserts to make sure the indexes fit in the available array and bit
mask space.

Calling code like openbsc.git and osmo-pcu need adjustments and/or should move
to using these enum values instead of their local definitions.

Taking this opportunity to also prepare for a split of struct gsm_subscriber in
openbsc into bsc_subsciber and vlr_subscriber with appropriate separate filter
index constants for both subscriber types.

Include previous LOG_FILTER_ALL in the LOGGING_FILTER_* enum, and replace its
use by (1 << LOGGING_FILTER_ALL).

Change-Id: I5c343630020f4b108099696fd96c2111614c8067
2017-02-22 16:08:38 +00:00
Harald Welte 7fa89c2e88 Change license of libosmogb from AGPLv3+ to GPLv2+
The copyright holders Harald Welte, Holger Freyther, Andreas Eversberg
and sysmocom - s.f.m.c. GmbH (represented by Holger and Harald) agree
that the license of libosmogb should be GPLv2+ and not AGPLv3+.

The reason the source files stated AGPLv3+ is due to the history, as
they were moved from OpenBSC to libosmocore at the time we needed to use
them from osmo-pcu.  It was an oversight back then to not re-license
them accordingly.
2014-10-26 20:50:19 +01:00
Harald Welte 641f7cee5d libosmogb: move files to proper location and fix build 2012-06-17 23:05:26 +08:00