BSSGP_Emulation: Introduce a GLOBAL port in the BSSGP_CT

The per-NSE BSSGP_CT gets a new GLOBAL port which is used for procedures
that are not specific to one BVC, such as the SUSPEND/RESUME related
PDUs, which all are on the signalling BVC without any BVCI in the BSSGP.

Change-Id: I40d973d80709f5d56f59247e8647b52754f09bc8
This commit is contained in:
Harald Welte 2020-11-24 18:15:02 +01:00
parent 7462a59ed9
commit 57de220cdb
1 changed files with 17 additions and 0 deletions

View File

@ -233,6 +233,10 @@ type component BSSGP_CT {
/* control by the user */
port BSSGP_CT_PROC_PT PROC;
/* global port for procedures without any relation to a BVC
* (currently only) SUSPEND/RESUME */
port BSSGP_SP_PT GLOBAL;
var BssgpConfig g_cfg;
/* Signaling BVC (BVCI=0) */
@ -286,12 +290,18 @@ altstep as_sig_wait_reset() runs on BSSGP_CT {
}
}
private template PDU_BSSGP tr_GLOBAL := (
{pDU_BSSGP_SUSPEND:=?}, {pDU_BSSGP_SUSPEND_ACK:=?}, {pDU_BSSGP_SUSPEND_NACK:=?},
{pDU_BSSGP_RESUME:=?}, {pDU_BSSGP_RESUME_ACK:=?}, {pDU_BSSGP_RESUME_NACK:=?}
);
/* We are in BVC_S_UNBLOCKED state */
altstep as_sig_unblocked() runs on BSSGP_CT {
var BSSGP_BVC_CT bvc_comp_ref;
var BSSGP_Client_CT vc_conn;
var NsUnitdataIndication udi;
var NsUnitdataRequest udr;
var PDU_BSSGP bssgp;
/* Messages PTP BVCI in BVCI field of NS: dispatch by that */
[] BSCP.receive(f_BnsUdInd(?, (2..65535))) -> value udi {
@ -306,6 +316,9 @@ altstep as_sig_unblocked() runs on BSSGP_CT {
}
/* Messages with BVCI = 0 (Signaling) in BVCI field of NS */
[] BSCP.receive(f_BnsUdInd(tr_GLOBAL, 0)) -> value udi {
GLOBAL.send(udi.bssgp);
}
/* Route based on PTP BVCI in payload/IE of signaling PDU */
[] BSCP.receive(f_BnsUdInd(?, 0)) -> value udi {
@ -354,6 +367,10 @@ altstep as_sig_unblocked() runs on BSSGP_CT {
udr.nsei := g_cfg.nsei;
BSCP.send(udr);
}
[] GLOBAL.receive(tr_GLOBAL) -> value bssgp {
BSCP.send(f_BnsUdReq(bssgp, 0, 0));
}
}
/* We are in BVC_S_WAIT_NS_ALIVE_UNBLOCKED (only happens in BSS role) */