From 001b0dad5f361c0c7f5a1793da3b95ad2a28bece Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 21 Mar 2019 21:30:47 +0100 Subject: BSSGP_Emulation: Handle incoming BVCI=0 messages Like BVCI=PTP, the BVCI=0 messages must be dispatched by their TLLI, but using the BSSGP_SP_SIG port instead of BSSGP_SP. Change-Id: Ic456d43ec07600162991698ec3d75d36785b2fb8 --- library/BSSGP_Emulation.ttcn | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn index fa33f516..89889268 100644 --- a/library/BSSGP_Emulation.ttcn +++ b/library/BSSGP_Emulation.ttcn @@ -532,7 +532,7 @@ altstep as_unblocked() runs on BSSGP_CT { BSSGP_SP.send(f_dec_bssgp(udi.bssgp)) to vc_conn; } - /* Any other BSSGP message: If it has TLLi, route to component; otherwise broadcast */ + /* Any other PTP BSSGP message: If it has TLLi, route to component; otherwise broadcast */ [] BSCP.receive(f_BnsUdInd(?, g_cfg.bvci)) -> value udi { var BssgpDecoded dec := f_dec_bssgp(udi.bssgp); var template OCT4 tlli := f_bssgp_get_tlli(udi.bssgp); @@ -551,6 +551,26 @@ altstep as_unblocked() runs on BSSGP_CT { } } + /* Any other SIG BSSGP message: If it has TLLi, route to component; otherwise broadcast */ + [] BSCP.receive(f_BnsUdInd(?, 0)) -> value udi { + var BssgpDecoded dec := f_dec_bssgp(udi.bssgp); + var template OCT4 tlli := f_bssgp_get_tlli(udi.bssgp); + if (isvalue(tlli)) { + vc_conn := f_tbl_comp_by_tlli(valueof(tlli)); + BSSGP_SP_SIG.send(dec) to vc_conn; + } else { + log("No TLLI: Broadcasting ", dec); + /* broadcast this message to all components */ + // TITAN DOESN'T DO THIS, *SIGH*: "BSSGP_SP.send(dec) to all component;" + for (var integer i := 0; i < sizeof(ClientTable); i := i+1) { + if (isbound(ClientTable[i].comp_ref)) { + BSSGP_SP_SIG.send(dec) to ClientTable[i].comp_ref; + } + } + } + } + + [] BSSGP_SP_SIG.receive(PDU_BSSGP:?)-> value bs_pdu sender vc_conn { BSCP.send(f_BnsUdReq(bs_pdu, 0)); } -- cgit v1.2.3