libosmocore/src
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
..
codec DTX: fix AMR SID-FIRST detection 2017-01-10 23:28:12 +00:00
ctrl Document ctrl_interface_setup_dynip() function 2017-02-19 08:54:27 +00:00
gb logging: centrally define ctx and filter indexes 2017-02-22 16:08:38 +00:00
gsm fix osmo_auth_gen_vec_auts: copy rand to auth vector 2017-02-22 03:12:51 +01:00
sim sim: Link to libtalloc as symbols of it are used here 2017-01-24 14:26:11 +01:00
vty logging: centrally define ctx and filter indexes 2017-02-22 16:08:38 +00:00
Makefile.am Catch-up with git version tags 2016-12-21 10:31:17 +00:00
application.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
backtrace.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
bitcomp.c bitcomp: Remove the t4 decoding from libosmocore 2016-11-10 17:07:45 +00:00
bits.c Add octet-aligned/unaligned shift functions 2016-06-20 19:02:56 +02:00
bitvec.c Add function to get uninterrupted bit run 2017-01-06 10:37:42 +00:00
conv.c misc: Doxygen tweaks: fixed some typos and minor errors 2013-02-15 13:27:59 +01:00
crc16.c add CRC16-CCITT to libosmocore 2016-12-23 22:16:08 +01:00
crcXXgen.c.tpl misc: Doxygen tweaks: fixed some typos and minor errors 2013-02-15 13:27:59 +01:00
fsm.c fsm: Add VTY introspection of osmo_fsm and their instances 2017-01-07 12:21:11 +00:00
gsmtap_util.c Remove direct logging 2017-01-06 10:12:24 +00:00
logging.c logging: centrally define ctx and filter indexes 2017-02-22 16:08:38 +00:00
logging_gsmtap.c Implement GSMTAP log target 2016-12-09 17:59:58 +01:00
logging_syslog.c doc: Fix the Doxygen section endings 2012-04-18 21:53:23 +02:00
loggingrb.c sttrb / loggingrb: Use GPLv2+ as license, not AGPLv3+ 2014-10-26 20:52:25 +01:00
macaddr.c disable various code if building for bare-iron embedded 2017-01-23 12:20:33 +00:00
msgb.c msgb: add msgb_talloc_ctx_init(), deprecate msgb_set_talloc_ctx() 2016-09-27 11:46:38 +02:00
msgfile.c msgfile: Fix warning on BSDs stdio 2015-03-18 21:54:37 +01:00
panic.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
plugin.c add some missing doxygen annotation for libosmocore functions 2013-01-11 09:43:32 +01:00
prim.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
rate_ctr.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
rbtree.c fix FSF address in sources/headers 2015-11-12 13:46:05 +01:00
select.c select: add functionality to check socket state 2017-02-07 13:39:00 +01:00
serial.c serial.c: file descriptor '0' is a valid value 2016-12-24 17:59:36 +01:00
signal.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
socket.c cosmetic: replace fprintf with LOGP 2017-02-09 16:21:01 +01:00
stat_item.c stats: Add OSMO prefix to STAT_ITEM_NOVALUE_ID 2015-12-08 10:33:15 +01:00
statistics.c core: Add difference function to osmo_counter 2015-10-29 01:10:06 +01:00
stats.c statsd: Fix compiler warning (int32_t vs. int64_t) 2016-11-11 15:24:24 +01:00
stats_statsd.c statsd: Fix compiler warning (int32_t vs. int64_t) 2016-11-11 15:24:24 +01:00
strrb.c strrb.c: Use string.h, not strings.h 2014-11-14 15:21:18 +01:00
timer.c timer: only call the callback if not NULL 2016-11-28 23:23:09 +01:00
timer_gettimeofday.c add osmo_gettimeofday as a shim around gettimeofday 2016-09-22 07:18:39 +02:00
utils.c osmo_hexparse: allow whitespace in parsed string, add ws test 2017-02-14 15:59:22 +01:00
write_queue.c wqueue: Reject messges if queue is considered full 2016-12-09 11:37:37 +01:00