From 0d53666108318435391de2696ba88d277e2b4211 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 8 Feb 2021 13:10:17 +0100 Subject: sua: per-ssn DUNA/DAVA notification Unlike M3UA, in SUA a DUNA/DAVA message can contain not just the point code that became available / unavailable, but it can also include a SSN. In that case, it is just the SSN that became available/unavailable, and not the entire point code. Hence, a N-STATE.ind and not a N-PCSTATE.ind must be delivered to the SCCP user. Change-Id: Ie9a45b905bc17e7b695e15fe12ba4bbadcd032bf --- src/sccp_scmg.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'src/sccp_scmg.c') diff --git a/src/sccp_scmg.c b/src/sccp_scmg.c index 0e3905d..ed16fe7 100644 --- a/src/sccp_scmg.c +++ b/src/sccp_scmg.c @@ -36,6 +36,45 @@ #include "xua_internal.h" #include "sccp_internal.h" +/* ITU-T Q.714 5.3.3 Subsystem allowed */ +void sccp_scmg_rx_ssn_allowed(struct osmo_sccp_instance *inst, uint32_t dpc, uint32_t ssn, uint32_t smi) +{ + struct osmo_scu_state_param state; + /* 1) Instruct the translation function to update the translation tables */ + /* 2) Mark as "allowed" the status of that subsystem. */ + /* 3) Initiate a local broadcast of "User-in-service" information for the allowed subsystem */ + state = (struct osmo_scu_state_param) { + .affected_pc = dpc, + .affected_ssn = ssn, + .user_in_service = true, + .ssn_multiplicity_ind = smi, + }; + sccp_lbcs_local_bcast_state(inst, &state); + /* 4) Discontinue the subsystem status test if such a test was in progress */ + /* 5) Initiate a broadcast of Subsystem-Allowed messages to concerned signalling points. */ +} + +/* ITU-T Q.714 5.3.2 Subsystem prohibited */ +void sccp_scmg_rx_ssn_prohibited(struct osmo_sccp_instance *inst, uint32_t dpc, uint32_t ssn, uint32_t smi) +{ + struct osmo_scu_state_param state; + /* 1) instruct the translation function to update the translation tables */ + /* 2) mark as "prohibited" the status of that subsystem */ + /* 3) initiate a local broadcast of "User-out-of-service" information */ + state = (struct osmo_scu_state_param) { + .affected_pc = dpc, + .affected_ssn = ssn, + .user_in_service = false, + .ssn_multiplicity_ind = smi, + }; + sccp_lbcs_local_bcast_state(inst, &state); + + /* 4) initiate the subsystem status test procedure if the prohibited subsystem is not local */ + /* 5) initiate a broadcast of Subsystem-Prohibited messages to concerned SP */ + /* 6) cancel "ignore subsystem status test" and the associated timer if in progress and if + * the newly prohibited subsystem resides at the local node. */ +} + /*! brief MTP -> SNM (MTP-PAUSE.ind) - inability to providing MTP service Q.714 5.2.2 */ void sccp_scmg_rx_mtp_pause(struct osmo_sccp_instance *inst, uint32_t dpc) { -- cgit v1.2.3