Also mask hexadecimal without leading 0x. But take care to not match on
every letter a-f,A-F in normal words and names.
before:
10 map_rua(NffffNfNecN-example-com-RUA-N)[N]
10 map_sccp(NffffNfNecN-example-com-SCCP-N)[N]
17 map_rua(NffffNcN-example-com-RUA-N)[N]
17 map_sccp(NffffNcN-example-com-SCCP-N)[N]
18 map_rua(NffffNeNbN-example-com-RUA-N)[N]
18 map_sccp(NffffNeNbN-example-com-SCCP-N)[N]
82 map_rua(NffffNfNdN-example-com-RUA-N)[N]
82 map_sccp(NffffNfNdN-example-com-SCCP-N)[N]
85 map_rua(NffffNfN-example-com-RUA-N)[N]
85 map_sccp(NffffNfN-example-com-SCCP-N)[N]
224 struct hnbgw_context_map
after:
224 map_rua(N-example-com-RUA-N)[N]
224 map_sccp(N-example-com-SCCP-N)[N]
224 struct hnbgw_context_map
Change-Id: I1b42ce3e67c7ed2d38d3e5c9cbfa90ba185a07b7
Add priorities to ensure on_dso_load_select runs after on_dso_load_ctx.
Otherwise osmo_ctx->global (used via define OTC_GLOBAL) points to NULL
and causes a segfault in osmo_fd_lookup_table_extend.
Use numbers 101 and 102, as "0 to 100 are reserved for the
implementation" and cause an error from GCC.
Fixes: OS#5946
Fixes: c46a15d8 ("select: Optimize osmo_fd_get_by_fd")
Change-Id: Ia2518e82530b93c535f8f5105513e21559b895ba
It makes no sense to call osmo_fd_unregister() on a negative fd.
Let's also make sure we set fd to negative value after unregistering +
closing, even if the struct is going to be freed afterwards.
Change-Id: I0790a63e603028c11cc475d483c6528e4d9aa9ab
LDADD var contains both local and system libraries. Use it at the right
place (after list of local libs, before list of system libs).
Change-Id: Ifb3686f78432ac877c596004646506c540b23c53
The logic testing the and setting the define was inverted, which made it
enabled by default.
Take the chance to rename the enable flag to be "ofd" instead of
"bsc-fd" (since anyway the flag was broken).
Change-Id: I81112fa1f6ce1a8e5fe85468241ad385ed8805d3
Those restrictions were implicitly required for a while and most of the
users of this API already followed them, but just a few didn't. All
known users have now been fixed. Let's explicitly document the
restrictions imposed by the API to ease avoiding similar issues in the
future.
Change-Id: I53d95aad15b33dd66aa5c7dd11745a35c4481f33
Optimize osmo_fd_get_by_fd() from O(n) to O(k) by means of allocating
dynamically growing array.
Make use from the fact that the kernel always tries to use the smallest
possible unused value when allocating a new fd.
Change-Id: I8b71547df8bed84192cb160479fa3debf9b7eade
* $(TALLOC_CFLAGS) is already present in AM_CFLAGS,
* osmo-sim-test: do not redefine but append $(PCSC_CFLAGS).
Change-Id: I7b9af3a1a9493a432af89198e291f4523388751e
* Remove TALLOC_{CFLAGS,LIBS} - talloc is not used directly
* Keep conditional ENABLE_PSEUDOTALLOC for embedded builds
Change-Id: I18f0a65a47c37989f03928f99c4687bf8007d437
3GPP TS 44.021 specifies the format for modified V.110 frames as used
on the GSM air (radio) interface. Implement encoders and decoders for
this modified V.110 format.
Related: OS#1572
Change-Id: I60a2f2690459359437df20cf4da9043fa7c3ad11
V.110 defines a B-channel protocol for transmission of synchronous and
asynchronous serial data of V-series interfaces via terminal adapters
over ISDN.
Let's add (unoptimized but easy to debug) functions for encoding and
decoding of V.110 frames for various bit-rates.
Related: OS#1572
Change-Id: I1b5fd3847d3bfb0a0f763e0574893962ec699680
As per gnu extension doc ->
https://gcc.gnu.org/onlinedocs/gcc-6.2.0/gcc/Thread-Local.html :
".. When used with extern or static, __thread must appear immediately
after the other storage class specifier."
Change-Id: Ied1d3cf3ad2ff424bd0a2682aff29a8939b419b8
Those functions were introduced in I51b3604ba79e42c474aa17007e7e308a12afcea8
but the recent introduction of libosmocore.map didn't list them
Change-Id: I4ac14aae13ff60c110444da989761cd1e86f8925
Fixes: I13169c00a59fb59513dfc598de5a71d094492422
Use the same 32k0, 29k0, 14k4, … notation for GSM0808_DATA_RATE, as
it is already used in RSL_CMOD_CSD. As GSM0808_DATA_RATE enumes were
just added to libosmocore and aren't used yet, don't add backwards
compatible defines.
Related: OS#4393
Change-Id: Ia965cdd9f53af756e5ffaff9b8f389b5ad629969
Use the 32k0, 29k0, 14k4, … notation instead of 32000, 29000, 14400 etc
to make transparent data enums with non-transparent data enums where
this notation is already used.
Related: OS#4393
Change-Id: I7b7c8f175f349811b17a3db68a57577bd3f1d2df
Improve the test output to make it easier to confirm that the fix in an
upcoming patch (I900fda192742fa8f6dd54e9131ef1704b14cc41a) is indeed
correct.
Spell out each S0-S15 mode along with the bitmask.
Rejigger the format of printing the mr_cfg flags, so that the AMR modes
line up vertically with the S0-S15 modes.
This clearly shows that the mr_cfg <-> s15_s0 conversion is wrong.
For example, in this test only 4k75 is enabled, yet we allow configs
featuring 6 other rates:
Input:
cfg.smod=0 spare=0 icmi=0 nscb=0 ver=0
m4_75=1 ------- ------- ------- ------- ------- ------- -------
Result (fr):
S15-S0 = 0x5701 = 0b0101011100000001
S0 4.75
S8 4.75 5.90
S9 4.75 5.90 6.70
S10 4.75 5.90 6.70 7.40
S12 4.75 5.90 6.70 10.2
S14 4.75 5.90 7.95 12.2
Result (hr):
S15-S0 = 0x0701 = 0b0000011100000001
S0 4.75
S8 4.75 5.90
S9 4.75 5.90 6.70
S10 4.75 5.90 6.70 7.40
In this test, an s15_s0 featuring a configuration with 6k70 allowed does
not result in m6_70 == 1:
Input:
S15-S0 = 0x0c12 = 0b0000110000010010
S1 4.75 5.90 7.40 12.2
S4 7.40
S10 4.75 5.90 6.70 7.40
S11 4.75 5.90 6.70 7.40
Output:
cfg.smod=0 spare=0 icmi=1 nscb=0 ver=1
m4_75=1 ------- m5_90=1 ------- m7_40=1 ------- ------- m12_2=1
Almost every conversion contains errors like this.
Related: I900fda192742fa8f6dd54e9131ef1704b14cc41a
Change-Id: Iec7c491d9fadd37d9e43fbaac8e709c2029f8a8e
Provide the definitions from 3GPP TS 28.062, Table 7.11.3.1.3-2 as
generally usable API.
Likely users:
- upcoming patch to improve conversion between S0-S15 and MultiRate
config, I900fda192742fa8f6dd54e9131ef1704b14cc41a
- osmo-msc to figure out conversion between SDP AMR mode-set and 3GPP TS
48.008 Permitted Speech S0-S15.
- osmo-bsc to choose AMR modes for channel activation from cfg /
permitted speech from MSC.
Related: SYS#5066
Change-Id: Icef7dd626d3d4641c66b8dd87e2047fc0ab547d1
These should not be used, but add them for backwards compatibility with
building older versions of osmo-bsc, osmo-iuh, osmo-pcap against current
libosmocore.
Fixes: 213fc420 ("Add libosmocore.map")
Change-Id: I4cfccf3622844d0923818bb8d8ce206f70e44a0d
According to 3GPP TS 48.008 3.2.2.11, it is inverted.
0: Transparent service
1: Non-transparent service
Change-Id: I2e5786ad053ee871079b4a8d95caccd6b03b59b6
This patch adds the [de]interleaving for CSD (circuit switched data),
nominally for TCH/F 9.6, but the same is also used for TCH/F 4.8,
TCH/H 4.8, TCH/F 2.4 and TCH/F 14.4.
Related: OS#4396, OS#1572
Change-Id: I6b16c2d0d7febf3883da662b2c7fec543335de12
This patch is a preparation for the upcoming change making use of
the built-in static_assert(), which is available since C11.
When using built-in static_assert(), gcc v12.2.1 fails:
iuup.c: In function 'osmo_iuup_msgb_alloc_c':
iuup.c:194:33: error: expression in static assertion is not constant
194 | osmo_static_assert(size > IUUP_MSGB_HEADROOM_MIN_REQUIRED, iuup_msgb_alloc_headroom_bigger);
../../include/osmocom/core/utils.h:86:24: note: in definition of macro 'osmo_static_assert'
86 | static_assert((exp), "(" #exp ") failed")
| ^~~
This one is not really a *static* assert(), because it operates on the
user supplied argument 'size', which is not guaranteed to be an integer
literal. Neither it triggers a compilation failure as expected, nor
does it abort at run-time. It simply does nothing.
Change-Id: I53db679728250e0c60ed277efb18142073ffe9c4
This patch is a preparation for the upcoming change making use of
the built-in static_assert(), which is available since C11.
When using built-in static_assert(), gcc v12.2.1 fails:
include/osmocom/core/msgb.h: In function 'msgb_alloc_headroom_c':
include/osmocom/core/msgb.h:532:33: error: expression in static assertion is not constant
532 | osmo_static_assert(size >= headroom, headroom_bigger);
include/osmocom/core/utils.h:86:24: note: in definition of macro 'osmo_static_assert'
86 | static_assert((exp), "(" #exp ") failed")
| ^~~
include/osmocom/core/msgb.h: In function 'msgb_alloc_headroom':
include/osmocom/core/msgb.h:554:33: error: expression in static assertion is not constant
554 | osmo_static_assert(size >= headroom, headroom_bigger);
include/osmocom/core/utils.h:86:24: note: in definition of macro 'osmo_static_assert'
86 | static_assert((exp), "(" #exp ") failed")
| ^~~
These are not really *static* assert()s, because they operate on the
user supplied arguments 'size' and 'headroom', which are not guaranteed
to be integer literals. Neither they trigger compilation failures
as expected, nor do they abort at run-time. They simply do nothing.
Change-Id: I17ef4f3283ce20a5b452b7874c826acfb02a0123