BSGSP_Emulation: Route STATUS to GLOBAL port for both SIG and PTP

Change-Id: I6573562c0e7638f153798ee178c7c69d07c26756
Related: OS#4951
This commit is contained in:
Harald Welte 2021-01-17 13:46:57 +01:00
parent 3148a9618f
commit f536524b07
1 changed files with 14 additions and 2 deletions

View File

@ -1,7 +1,7 @@
module BSSGP_Emulation {
/* BSSGP Emulation in TTCN-3
* (C) 2018-2020 Harald Welte <laforge@gnumonks.org>
* (C) 2018-2021 Harald Welte <laforge@gnumonks.org>
* All rights reserved.
*
* Released under the terms of GNU General Public License, Version 2 or
@ -306,7 +306,7 @@ altstep as_sig_wait_reset() runs on BSSGP_CT {
private template PDU_BSSGP tr_GLOBAL_SIG := (
{pDU_BSSGP_SUSPEND:=?}, {pDU_BSSGP_SUSPEND_ACK:=?}, {pDU_BSSGP_SUSPEND_NACK:=?},
{pDU_BSSGP_RESUME:=?}, {pDU_BSSGP_RESUME_ACK:=?}, {pDU_BSSGP_RESUME_NACK:=?},
{pDU_BSSGP_SGSN_INVOKE_TRACE:=?}, {pDU_BSSGP_OVERLOAD:=?}
{pDU_BSSGP_SGSN_INVOKE_TRACE:=?}, {pDU_BSSGP_OVERLOAD:=?}, {pDU_BSSGP_STATUS:=?}
);
/* BSSGP messages that should arrive on the RIM port */
@ -784,6 +784,10 @@ type record LLC_Entity {
};
type record length(16) of LLC_Entity LLC_Entities;
private template PDU_BSSGP tr_GLOBAL_PTP := (
{pDU_BSSGP_STATUS:=?}
);
function f_llc_create(boolean sgsn_role := false) return LLC_Entities {
var LLC_Entities llc;
for (var integer i := 0; i < 16; i := i+1) {
@ -1141,6 +1145,14 @@ private altstep as_ptp_unblocked() runs on BSSGP_BVC_CT {
}
}
[] BVC.receive(tr_ptp_BnsUdInd(tr_GLOBAL_PTP, g_cfg.bvci)) -> value udi {
if (GLOBAL.checkstate("Connected")) {
GLOBAL.send(udi.bssgp);
} else {
setverdict(fail, "Received BSSGP STATUS ", udi.bssgp);
}
}
/* Any other PTP BSSGP message: If it has TLLI, route to component; otherwise broadcast */
[] BVC.receive(tr_ptp_BnsUdInd(?, g_cfg.bvci)) -> value udi {
var BssgpDecoded dec := f_dec_bssgp(udi.bssgp);