aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo_ss7_hmrt.c
AgeCommit message (Collapse)AuthorFilesLines
2023-02-21SS7: do not attempt transfer if AS is downMax1-0/+6
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
2021-11-15stp: Add basic RX/TX rate counters on AS and ASP levelHarald Welte1-0/+3
This adds some very basic rx/px rate counters to the SS7 AS and ASP OsmoSTP> show rate-counters SIGTRAN Application Server 0 (as-rkm-1): rx:msu:total: 86078 (1888/s 86078/m 0/h 0/d) tx:msu:total: 0 (0/s 0/m 0/h 0/d) SIGTRAN Application Server Process 0 (asp-dyn-0): rx:packets:total: 86081 (1888/s 86081/m 0/h 0/d) tx:packets:total: 5 (0/s 5/m 0/h 0/d) Change-Id: Idb811ca81adfe47152d484f6b981e661dc569e15
2017-12-24cosmetic: hmrt_message_for_routing(): use osmo_ss7_route_name()Neels Hofmeyr1-12/+19
Change-Id: Iae524c38cd91383a59c64bf7919d94ba7ff350bd
2017-12-24add osmo_ss7_route_name()Neels Hofmeyr1-0/+59
There is a naming dilemma: though the osmo_ prefix is now reserved for libosmocore, all surrounding API already has the osmo_ prefix. This will be used by osmo-hnbgw's VTY 'show cnlink' command. Change-Id: Ia0d15a2814b08bc3f052a1ed12dbb68bade55309
2017-11-13Add SPDX-License-Identifier + missing copyright statementsHarald Welte1-0/+20
Change-Id: I113232bbeaa7a835871df7f9b883ba573d8a2534
2017-06-25add/tweak various logging to help figure out complex routingNeels Hofmeyr1-3/+20
Add function osmo_ss7_point_code_print2() to be able to print two point codes in the same log message. Change signatures of two static functions to aid logging: add invalid ref arg to sccp_scoc_rx_inval_src_ref(), pass conn instead of inst to sccp_scoc_rx_inval_opc(). Change-Id: Ia3243606d6cad7721f7da7f6caba2caa90ae2bbd
2017-04-27m3ua_to_xfer_ind(): don't use data_ie without checking it existsHarald Welte1-1/+1
Change-Id: I5f7551e49c1b4ea417bee3516da1b2ece5ee0699 Fixes: coverity CID#166941
2017-04-27deliver_to_mtp_user(): Fix null pointer dereferenceHarald Welte1-1/+1
We had used + derefernced the 'prim' pointer before checking its validity. Change-Id: I0ca5026091e91926924b297f9342bda5f9fd38c9 Fixes: coverity CID#166946
2017-04-18Add IPA/SCCPlite support as SIGTRAN alternativeHarald Welte1-0/+2
This tries as good as possible to fit the IPA/SCCPlite stacking into the existing SIGTRAN/SS7 code architecture/model. To the user, the IPA protocol looks like yet another protocol on the same level as the choice between SUA and M3AU. On the inside, things are obviously quite different. We need to handle TCP with IPA framing instead of SCTP for both server and client. We also implement an alternative "ASP FSM" for IPA, which takes care of the CCM handshake (ID_REQ/ID_RESP/ID_ACK/ID_ACK2) for both client and server mode. In server mode, we use the 'unit name' as identifier to look up the AS, similar to how we use a routing context to look up the AS in the xUA case. We also have to bypass activating the default layer manager in the simple client to make sure we don't run into even more complexity. What's missing right now is some way to manually override/set the point codes. As IPA/SCCPlite is missing any routing label, we currently simply generate one with SPC=0/DPC=0, which will obviously not work in most configurations. Change-Id: I9098574cddeba10fcf8f1b6c196a7069a6805c56
2017-04-15m3ua: Generalize + Export function to generate MTP-TRANSFER xua_msgHarald Welte1-16/+1
Change-Id: If82956317ec703341514ad81057eceb3d0714f47
2017-04-10sigtran: fix various memory leaks (msgb and xua_msg)Harald Welte1-2/+8
The general rule for 'struct xua_msg' is now that it is free'd by the function that also allocates it in the first place. Any downstream consumer of the xua_msg may interpret it, but not hold any references or free() it. Change-Id: I708505d129da5824c69b31a13a9c93201929bada
2017-04-10Add new 'osmo_ss7' SS7 core code with M3UA, ASP/AS FSM, ...Harald Welte1-0/+219
This is what aims to be a rather complete/proper implementation of the SIGTRAN + SS7 protocol suite. It has proper abstraction between the layers with primitives, finite state machines for things like the AS and ASP state machines, support for point code routing, etc. What's not implemented at this point: * re-integration of pre-existing SUA (pending) * actual MTP2 and physical E1/T1 link support * different trafic modes like broadcast/fail-over/load-balance Change-Id: I375eb80f01acc013094851d91d1d3333ebc12bc7