summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-03-21 21:30:47 +0100
committerHarald Welte <laforge@gnumonks.org>2019-03-27 11:17:49 +0000
commit001b0dad5f361c0c7f5a1793da3b95ad2a28bece (patch)
treebdd45a8897ab70b10e9f69d6ab44f30296889ad7
parent0466d16d4243d96c8819b10d032d9be8d4d34d7d (diff)
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
-rw-r--r--library/BSSGP_Emulation.ttcn22
1 files changed, 21 insertions, 1 deletions
diff --git a/library/BSSGP_Emulation.ttcn b/library/BSSGP_Emulation.ttcn
index fa33f51..8988926 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));
}