aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2023-03-20WIP: MTP2 IAC + LSC FSMlaforge/m2paHarald Welte7-0/+1156
Change-Id: I1392b8b2f85c70f3783af655d5906a86a8b9a9c1
2023-03-20WIP: M2PAHarald Welte3-0/+766
Change-Id: Icd0f9464447a98031c3ee093e2b8362f52eab47d
2023-03-13tests: use -no-install libtool flag to avoid ./lt-* scriptsVadim Yanitskiy6-3/+7
This option should be used for any executables which are used only for testing, or for generating other files and are consequently never installed. By specifying this option, we are telling Libtool that the executable it links will only ever be executed from where it is built in the build tree. Libtool is usually able to considerably speed up the link process for such executables. Change-Id: I9758aaaa56b2453f33f90400342ebd1fd412ec3a
2023-03-13tests/*/Makefile.am: -Wall is not a preprocessor flagVadim Yanitskiy5-5/+6
Change-Id: I1a143636dfc5d4ea85938472fd367ac88e3cc4ae
2023-03-13{examples,stp}/Makefile.am: fix typo in $(COVERAGE_[C]FLAGS)Vadim Yanitskiy2-2/+2
Change-Id: I8dc7119765df97f44a6f2c5d6eecec847fcc46dc
2023-03-13sccp: Introduce APIs to get/set osmo_sccp_instance priv data pointerPau Espin Pedrol2-0/+12
The field already exists in the struct, but it's not really used anywhere internally yet (and was not available externally). Let's make it available to users of the API, similar to osmo_sccp_user_{get,set}_priv(). This way apps can easily store per-sccp-instance state. Change-Id: I5643e6b14590b1478b3c8dabc8a7a619f5505409
2023-03-10Implement sccp_instance->connections as rbtreePau Espin Pedrol3-15/+58
As a result we move from: INSERT=O(1) SEARCH=O(n) REMOVE=O(1) to: INSERT=O(log(N)) SEARCH=O(log(N)) REMOVE=O(log(N)) So we get rid of O(n) complexity every time we need to find a conn object based on conn_id. When a big number of SCCP conns is handled, this saves a lot of CPU time every time a conn needs to be looked up, for instance each time a message is received. For instance, given 1500 SCCP conns, searching is ~10 steps while it took 1500 steps beforehand. Morever, since when creating a new conn_id the code looks if it exists prior to it, that means in practice inserting used to took O(n), while now it takes O(log(N)). Change-Id: I28ac67038207e2fad89ea291629cec5b2f912461
2023-03-10cosmetic: sccp.h: Fix trailing whitespacePau Espin Pedrol1-1/+1
Change-Id: I6b9cb5acffdf690f65e14dbdda7213b2e75c7ee1
2023-03-10sccp_scpc.c: Simplify conn_create()Pau Espin Pedrol1-7/+6
Drop local variable with no real use, dereference sccp_instance pointer once instead of potentially thousands of times. Change-Id: Iee333fb38d7a37877c37c1de9719a6b67d9e8ed3
2023-03-10Avoid allocating conn_id 0x00FFFFFFPau Espin Pedrol1-3/+15
The 0x00FFFFFF source local reference is reserved in M3UA/SCCP, hence avoid allocating a conn_id with that value since later on when reused as a source local reference it would fail to be encoded. Change-Id: Ifcf710ef6024286a1cc3473d6ea3f858552b9926
2023-02-28Transition to use of 'telnet_init_default'arehbein3-4/+3
Related: OS#5809 Change-Id: Icc57c68337d55c6594c1c36e9bf41624d11dab0a
2023-02-24mtp_pcap: remove unused static_assert() macro definitionVadim Yanitskiy1-2/+0
Change-Id: Ib0419a2de3aa09a2e1fba1fc2628f12295d83bda
2023-02-22fixup for: add osmo_scu_prim_name_c() / _buf()Neels Hofmeyr3-9/+16
I would like to tweak the names for the recently added functions, so that they are more clear -- quickly before we release it or anyone uses these. Depends: libosmocore I9f43428af654a5674ac3035fe4db1394aac7a7af Related: I4c1998fd7fee7282d107846dae2cff4b5ceb3a7b Change-Id: If381f537ab91af1feef7f0e51921217f27e18e6a
2023-02-21SS7: do not attempt transfer if AS is downMax3-0/+19
The attempt to route message via AS which is down will fail anyway: let's make it explicit. Add osmo_ss7_as_down() and use it to check AS state before transferring the message. Change-Id: I0d5f3b6265e7fdaa79e32fbc30f829ef79e7dad1
2023-02-20Run struct_endianness.pyOliver Smith2-7/+7
Ensure there is no diff to prepare to run this in CI. Related: OS#5884 Change-Id: I3909fd5a406e21f348ad8c1d5adc267551bfe2b2
2023-02-18add osmo_scu_prim_name_c() / _buf()Neels Hofmeyr2-4/+21
Add non-legacy string functions for osmo_scu_prim_name in the form of _buf() and _c() signatures. So far there is only osmo_scu_prim_name() using a static buffer. Implement that using osmo_scu_prim_name_buf(). Change-Id: I4c1998fd7fee7282d107846dae2cff4b5ceb3a7b
2023-02-18sccp_scmg: ignore PCSTATE.indicationNeels Hofmeyr1-0/+3
Silence the error log for PCSTATE.indication prims. When running the HNBGW_Tests.ttcn suite, the osmo-hnbgw LOGL_ERROR is spammed with messages like: DLSCCP ERROR unsupported SCCP user primitive N-PCSTATE.indication (sccp_scmg.c:298) Add this prim to scmg_prim_cb() to just log on DEBUG that it is ignored. Related: OS#5679 Change-Id: I5fd38afea94f48ed2f2fcd2d9baa8ec22a571b6b
2023-02-07Bump version: 1.6.0.20-8b67-dirty → 1.7.01.7.0Pau Espin Pedrol5-12/+44
Change-Id: I431dc58d5c4adfcb2c4ff19a95b31853618034b5
2022-12-10cosmetic: fix typo in comment2023q1Harald Welte1-1/+1
Change-Id: I2e2b5ec36da9b50dcf13a0d7f497a9ca16e6a7a3
2022-12-10SCOC: dump SUA header when logging "mismatching remote pc"Harald Welte1-1/+2
Provide some more information in the logs when this happens Change-Id: Idd889b57e8f842e22e5ed54bea0821dcec0cd8ce
2022-11-23sccp: Validate local references > 0x00fffffe are not usedPau Espin Pedrol1-14/+52
SUA allows references of 4 bytes, but SCCP/M3UA doesn't. SUA: RFC3868 sec 3.10.4: The source reference number is a 4 octet long integer. This isallocated by the source SUA instance. M3UA/SCCP: ITU-T Q.713 sec 3.3: The "source local reference" parameter field is a three-octet field containing a reference number which is generated and used by the local node to identify the connection section after the connection section is set up. The coding "all ones" is reserved for future use. Related: SYS#6211 Change-Id: Ia547346bdae54a032d2198ecd4972fb3f8dd073e
2022-11-11contrib/jenkins.sh: add missing 'make check'Oliver Smith1-0/+1
Change-Id: I09b7e2223d19c9e055ecddf3b2690cdea26b9be7
2022-11-11tests: fix old-style function definitionOliver Smith2-2/+2
Fix for: xua_test.c:575:6: error: old-style function definition [-Werror=old-style-definition] Change-Id: Iccc942f9f25fb091045d906eb8be658b54c58529
2022-11-03Add -Werror=implicit-int -Werror=int-conversion -Werror=old-style-definitionHarald Welte1-0/+1
... if --enable-werror is used Change-Id: If344ef88121111db5365b8cee3cf3cd1283303c1
2022-09-09Set working directory in systemd service fileMax1-0/+2
By default systemd will execute service with root directory (or home directory for user instance) which might result in attempts to create files in unexpected place. Let's set it to 'osmocom' subdir of state directory (/var/lib for system instance) instead. Related: OS#4821 Change-Id: If21e3471ec129892ff8b410db30d8ce0e4014e05
2022-09-07SIGTRAN: cache Optional Data for SCCP CR/CC/RLSDMax1-13/+130
The length limit of optional Data parameter is 130 bytes according to ITU-T Rec Q.713 §4.2..§4.5. If we receive CR, CC or RLSD message with bigger data - cache it if necessary and send via separate DT1 message after connection becomes active. Fixes: OS#5579 Change-Id: I0033faf9da393418930252233ce74d62cd1cef8a
2022-09-07SIGTRAN: arrange the comments in the encoder to match the specMax1-4/+8
Related: OS#5579 Change-Id: Ib986137057856afb8725541d912db210a9a46294
2022-08-22examples: update vty codeMax1-9/+11
* document optional data parameter * use argc to check for optional parameter presence Related: OS#5579 Change-Id: I52d0823b7843aa61594e728a0fac19d884ff78fe
2022-08-22SIGTRAN: add osmo_sccp_tx_disconn_data() helperMax3-6/+24
SCCP RLSD message might have up to 130 bytes of optional data according to ITU-T Rec Q.713 §4.5 - add helper which allows sending it and use it in example code. Related: OS#5579 Change-Id: I92ae22d2cab5863245fba3d904a300055fda34fe
2022-08-22SIGTRAN: error if attempting to send exceedingly big dataMax2-0/+8
Previously DT1 message sent via osmo_sccp_tx_data() was silently truncating data if it was over 256 bytes. Let's fail explicitly and let caller handle this. Related: OS#5579 Change-Id: I8a67bc40080eb1405ab3b0df874e3ea20941a850
2022-08-22SIGTRAN: add function to check connection existenceMax4-6/+36
Add convenience helper to check if particular connection ID exists and use it to properly report errors when attempting to send messages over non-existent connections. Change-Id: Iffedf55b4c292ee6b2f97bcdeef6dc13c050ce01
2022-08-22SIGTRAN: don't advance FSM on failed connection requestMax1-6/+14
Return proper error code from packet encoding routine and check for it before switching FSM state as it creates confusing mismatch with actual protocol state. Related: OS#5579 Change-Id: I8431c77632014e2551d1da779afddffcd1bb541c
2022-08-21Add basic readme for example codeMax1-0/+21
Related: OS#5579 Change-Id: I4c76a48a76ca9afc960ea2f08229bacc79b6fe77
2022-08-21[cosmetic] sccp_scoc.c: constify function parametersMax3-4/+4
Related: OS#5579 Change-Id: I398e3efa3e097de8907617cfdf363e1d3b96f666
2022-08-18SCCP: Log more data on CR size errorMax1-3/+5
Related: OS#5579 Change-Id: I4d7fc44fde5b900907ec5ebec0450040a764802a
2022-08-17SCCP: enforce optional data length limitsMax2-2/+29
Limit length of optional Data parameter to 130 bytes to conform with ITU-T Rec Q.713 §4.2..§4.5 while receiving SCCP messages. Related: OS#5579 Change-Id: Icc3bd0a71b29cf61a259c5d97e7dd85beb4397bd
2022-08-17cosmetic: improve usage help of example codeMax1-3/+3
* document -C option for example server * move misplaced comma * drop empty #define from example code Change-Id: I342dc227afbfe6c3540eb3285677c568d2fe3166
2022-06-29xua_snm: assert to guard against NULL ptrPau Espin Pedrol1-0/+2
This is similarly done for same IE in other functions, so let's do it here too in order to make coverity happy, and avoid random access ptr probably ending up in obscure crash. Fixes: Coverity CID#272994 Change-Id: I72059ffaa608bb4f5c4bd274645878e0b31ed6e0
2022-06-28Bump version: 1.5.0.20-e9cc-dirty → 1.6.01.6.0Pau Espin Pedrol6-13/+46
Change-Id: Ibe4efb64b8de506a007559e2fcf13cc9dc0d9d60
2022-06-17update git URLs (git -> https; gitea)2022q2Harald Welte5-8/+7
Change-Id: Idac4924a077b5389e85efaf62081589fc3de06ad
2022-06-17[cosmetic] sccp_scoc: Fix typo in commentHarald Welte1-1/+1
Change-Id: I26168658b58250f58c3616e51010b969df8029a4
2022-06-16[cosmetic] sccp_scoc.c: fix comments about corresponding SCCP msg typesHarald Welte1-2/+2
Change-Id: I0d7a81f72147f8022ddadfe28d04679097dfa492
2022-05-05M3UA/SUA: Implement handling of SCON (signaling congestion)Harald Welte4-0/+139
If we receive any M3UA/SUA SNM SCON mesasages, distribute them to any other active ASP to make everyone aware of the congestion situation. This makes STP_Tests_M3UA.TC_ssnm_distribution_scon pass and hence should turn the entire osmo-stp test suite "green" Change-Id: Iac7aeba980fbbd8b58f8872a29ba10745eb0a730
2022-04-13tests: use 'check_PROGRAMS' instead of 'noinst_PROGRAMS'Vadim Yanitskiy6-6/+6
When using 'check_PROGRAMS', autoconf/automake generates smarter Makefiles, so that the test programs are not being compiled during the normal 'make all', but only during 'make check'. Change-Id: Icca22778831b043358acf0482948dbff32a11256
2022-03-29Add ss7 instances to osmo_ss7_instances in creation order2022q1Pau Espin Pedrol2-5/+5
Otherwise when configuring ss7 instances in numerical order in the VTY and then printing the VTY configuration they end up ordered this way: cs7 instance 2 cs7 instance 1 cs7 instance 0 Related: SYS#5912 Change-Id: Id4d0a20cc5b0811b505b2d1051d496f8bd17d54c
2022-02-24sccp_demo_user: enable stats / rate_counter timersHarald Welte1-0/+4
Change-Id: I135704d401de2cf439e51882e22323b31db14a2a
2022-02-24sccp_demo_user: Allow user to specify logmask on command lineHarald Welte1-3/+8
Change-Id: Ie1cf37b3501e26330b038b7ee17a5273d81c92d8
2022-02-24sccp_demo_user: make sure the command-line specified point codes are usedHarald Welte3-2/+7
Change-Id: I983066199e5d8f056895fdad370e3b4439b4dba4
2022-02-24sccp_demo_user: Add 'show stats' to VTYHarald Welte1-0/+2
this allows us to inspect statistics of the demo user via VTY Change-Id: Ica48d4e0c9cedb9adb94ae08c5201207b8836e1c
2022-02-21sccp_demo_user: Add command line argument to specify protocol (m3ua/ipa)Harald Welte1-6/+15
Change-Id: Iecb03df43709903b1cfe248e68d6624b995c563d