aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2023-03-22WIP: 3GPP TS 29.018 definitions for Gs interfacelaforge/gsHarald Welte4-1/+226
Change-Id: I4730f15142276fbdf5678c99d24b19cc9a9a76b1
2023-03-22WIP: PIN validationHarald Welte1-7/+20
Change-Id: I3d8441d6dcd94b8b11bb1fbcee56c754bca9aefe
2023-03-17isdn: fix identical operands in v110_adapt_IR8000_to_2400()Vadim Yanitskiy1-1/+2
Change-Id: I7df8b214e813cbd14726d5043f666547353e2947 Fixes: CID#310966
2023-03-17tests/v110: assert(user_data_chunk_bits) in test_ra1()Vadim Yanitskiy1-1/+4
Coverity warns that osmo_v110_sync_ra1_get_user_data_chunk_bitlen() may return a negative value, which is used as loop boundary. Even though this is unlikely, let's add an assert(). Change-Id: I0fc0e0bac74bd96351030432ef1b140b727acb0d Fixes: CID#310968
2023-03-17gsmtap: add missing entries to gsmtap_type_names[]Vadim Yanitskiy1-0/+4
Change-Id: I67dc578c62f89039f35856da1f29caab4b5db1d8 Fixes: fae779ac5 "GSMTAP: Import changes from Wireshark" Fixes: f9b1e5556 "gsmtap.h: Introduce new GSMTAP type for LTE NAS messages" Fixes: 161d42a61 "gsmtap: Add definitions for E1/T1 payload (LAPD, TRAU, FR) in GSMTAP"
2023-03-15New osmo-gsmtap-logsend utilityHarald Welte4-1/+144
This utility can be used to "pipe" stdin or some file as log lines via GSMTAP logging. Change-Id: Ida96e87d84e0c349c5069edc67fec1c3cf19d1ab
2023-03-14error log: osmo_sock_init2_multiaddr() v4/v6 mixNeels Hofmeyr2-5/+9
Provide some more information for the error case when local and remote addresses mix v4 and v6. Change-Id: I0fd12b08e0788ce3af6dc519ff8c82ad196a115f
2023-03-14contrib/talloc_count.sh: improve hexadecimal maskingNeels Hofmeyr1-0/+1
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
2023-03-14fix 'make vty-test' for --disable-external-tests --enable-gbNeels Hofmeyr1-1/+1
Change-Id: I80ac270bfb563a769a7746d8fbceac09e267ce03
2023-03-14fix 'make vty-test' for --disable-gbNeels Hofmeyr1-0/+5
Change-Id: Ib6aec784d3b20cd56cb6bfab9ff17da35a282406
2023-03-14on_dso_load_select: run after on_dso_load_ctxOliver Smith2-3/+4
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
2023-03-14logging.c: Sanitize calls to osmo_fd_unregister()Pau Espin Pedrol1-2/+3
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
2023-03-14tests/Makefile.am: Move LDADD to right positionPau Espin Pedrol1-67/+77
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
2023-03-14tests/Makefile.am: Drop duplicated libosmogb.la in LDADDPau Espin Pedrol1-2/+2
Change-Id: I20e815ba5dc473c644e1098f2347b183f215a51a
2023-03-14tests/Makefile.am: Move system libs at the end of listPau Espin Pedrol1-10/+15
Change-Id: Iad6b9e39e3587849ccfd475899cbd610bf7145cd
2023-03-14select.c: osmo_fd_unregister(): Avoid assert hit with old buggy users of the APIPau Espin Pedrol1-3/+15
Change-Id: If77b84d603a42a216d550d9708eb62f645634a61
2023-03-14configure.ac: Fix typo in enable flag descriptionPau Espin Pedrol1-1/+1
Change-Id: Ida390c50379a429a4b42434e32954eeb832a11ff
2023-03-14configure.ac: Fix logic enabling osmo_fd fd checksPau Espin Pedrol1-3/+3
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
2023-03-14select.c: Clarify osmo_fd_unregister() can only be called on registered osmo_fdsPau Espin Pedrol1-0/+1
Change-Id: I5e397e121f2fe2254c7f4b474e6eefd7aebe7a83
2023-03-14select.c: Clarify osmo_fd_(un)register() API expectations of registered fdPau Espin Pedrol1-0/+6
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
2023-03-13select: Optimize osmo_fd_get_by_fdPau Espin Pedrol1-8/+44
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
2023-03-11utils/osmo-stat-dummy/Makefile.am: drop empty variablesVadim Yanitskiy1-2/+2
Change-Id: I1b9497900b0eebd77fd226f52a9050cdbd9e6cdc
2023-03-11utils/Makefile.am: do not overwrite AM_CFLAGSVadim Yanitskiy1-3/+1
* $(TALLOC_CFLAGS) is already present in AM_CFLAGS, * osmo-sim-test: do not redefine but append $(PCSC_CFLAGS). Change-Id: I7b9af3a1a9493a432af89198e291f4523388751e
2023-03-11utils/Makefile.am: remove duplicate libosmogsm.laVadim Yanitskiy1-1/+1
It's already listed in $(LDADD), no need to append it again. Change-Id: I03f5f4330e828a938dafd93b9fdb576afb2b7f12
2023-03-11coding: clean up Makefile.amVadim Yanitskiy1-4/+3
* Remove TALLOC_{CFLAGS,LIBS} - talloc is not used directly * Keep conditional ENABLE_PSEUDOTALLOC for embedded builds Change-Id: I18f0a65a47c37989f03928f99c4687bf8007d437
2023-03-10logging: Unregister osmo_fd before closing fdPau Espin Pedrol1-1/+1
Change-Id: I0754ac3110b63d2a380068010830af6c85b0a653
2023-03-09cosmetic: stats_tcp: Fix typo in commentPau Espin Pedrol1-2/+4
Take the chance to shorten a bit the lengthy lines Change-Id: I3215dea7e3198b728745a779ad1b6ebfa3795cb5
2023-03-08gsm_08_58: Document IPAC RTP CSD modes in at least a few wordsHarald Welte1-4/+4
Let's clarify what those modes mean Change-Id: I77fc7b24ccd387f54a7c7edad666737252af6bd9
2023-03-08gsm: TS 44.021 modified V.110 frame encoding/decoding supportHarald Welte9-1/+458
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
2023-03-08isdn: Add V.110 encoder/decoderHarald Welte11-1/+1030
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
2023-03-07logging: remove log_initialized(void)Eric1-1/+0
This function does not exist, and was apparently accidentally added (?) to the header. Change-Id: I479ef8484506ff27918df9fbf6cbeda8b304bbaa
2023-03-07fix _thread orderEric2-2/+2
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
2023-03-07gsm0502: add burst length definitions from chapter 5.2Vadim Yanitskiy1-0/+30
Change-Id: I1c38ccc2b64ba9046bb3b1221d99cc55ec493802 Related: OS#1572
2023-03-06Makefile.am: Make libraries depend on .map filesHarald Welte6-0/+7
Without this, an update to the .map file doesn't re-trigger a re-link of the library. Change-Id: If0ea6f41730a28b04562d45efa6ca376abaf3f6b
2023-03-06gsm: gsm_gsmtime2fn(): constify paramPau Espin Pedrol2-2/+2
Change-Id: Ib29d5a8e7dcf50fb086f967857b0afa076573163
2023-03-05libosmocore.map: Add two missing entries for gsmtap*2() APIHarald Welte1-0/+2
Those functions were introduced in I51b3604ba79e42c474aa17007e7e308a12afcea8 but the recent introduction of libosmocore.map didn't list them Change-Id: I4ac14aae13ff60c110444da989761cd1e86f8925 Fixes: I13169c00a59fb59513dfc598de5a71d094492422
2023-03-03gsm0808: make CSD enum values consistent with RSLOliver Smith2-25/+25
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
2023-03-03rsl: RSL_CMOD_CSD_T: make enum values consistentOliver Smith1-7/+14
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
2023-03-03rsl: put values for Channel Mode into enumsOliver Smith1-41/+49
Related: OS#4393 Change-Id: I25bfd02aa1428a35492b20376a31635a442e545f
2023-03-02Add osmo_sockaddr_size() to return the size of the variant usedDaniel Willmann1-0/+23
Change-Id: I952b6bb752441fe019fc18f89bce4bbfbe58994a
2023-02-28improve test output for gsm0808_sc_cfg_from_gsm48_mr_cfg()Neels Hofmeyr2-424/+468
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
2023-02-28add gsm0808_amr_modes_from_cfgNeels Hofmeyr3-0/+122
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
2023-02-28doxygen: fix various typos in commands \param and \returnsVadim Yanitskiy11-14/+14
Change-Id: If87cec3739449c6a54e24fb2cb81e746d8244da2
2023-02-28doxygen: remove documentation for non-existent paramsVadim Yanitskiy1-3/+1
Change-Id: I8b1be37c8fdaa824637d306bdb40a3b78616f614
2023-02-28contrib/struct_endianness.py: simplify file extension checkVadim Yanitskiy1-1/+1
Change-Id: Iaf7194fdfc3772973f9a9c806d375a9a56ff57c8
2023-02-28libosmocore.map: add tall_{ctr/msgb}_ctxOliver Smith1-0/+2
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
2023-02-28GSMTAP: add missing parameter docstringsMax1-2/+4
Change-Id: I774b89e0358bdcf7c71c7fd9c9940f634a7d3822
2023-02-27Add libosmocore.mapDaniel Willmann3-1/+573
Generated with: nm src/core/.libs/libosmocore.so --defined-only |grep " T \| D \| B " | cut -c 20- >> src/core/libosmocore.map Change-Id: I13169c00a59fb59513dfc598de5a71d094492422
2023-02-27gsm0808_enc/dec_channel_type: fix transparent flagOliver Smith2-7/+7
According to 3GPP TS 48.008 3.2.2.11, it is inverted. 0: Transparent service 1: Non-transparent service Change-Id: I2e5786ad053ee871079b4a8d95caccd6b03b59b6
2023-02-27Interleaving for CSDHarald Welte2-0/+54
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