Change in osmo-ttcn3-hacks[master]: BSGSP_Emulation: Route STATUS to GLOBAL port for both SIG and PTP

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Jan 17 16:37:24 UTC 2021


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22256 )


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

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

Change-Id: I6573562c0e7638f153798ee178c7c69d07c26756
Related: OS#4951
---
M library/BSSGP_Emulation.ttcnpp
M library/Osmocom_Gb_Types.ttcn
2 files changed, 17 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/56/22256/1

diff --git a/library/BSSGP_Emulation.ttcnpp b/library/BSSGP_Emulation.ttcnpp
index 5c825d6..7996f96 100644
--- a/library/BSSGP_Emulation.ttcnpp
+++ b/library/BSSGP_Emulation.ttcnpp
@@ -1,7 +1,7 @@
 module BSSGP_Emulation {
 
 /* BSSGP Emulation in TTCN-3
- * (C) 2018-2020 Harald Welte <laforge at gnumonks.org>
+ * (C) 2018-2021 Harald Welte <laforge at gnumonks.org>
  * All rights reserved.
  *
  * Released under the terms of GNU General Public License, Version 2 or
@@ -306,7 +306,7 @@
 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 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 @@
 		}
 	}
 
+	[] 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);
diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn
index 589108f..f97b9b0 100644
--- a/library/Osmocom_Gb_Types.ttcn
+++ b/library/Osmocom_Gb_Types.ttcn
@@ -1427,7 +1427,7 @@
 	}
 
 	/* 10.4.14 */
-	template PDU_BSSGP ts_BSSGP_STATUS(template BssgpBvci bvci, template BssgpCause cause,
+	template PDU_BSSGP ts_BSSGP_STATUS(template (omit) BssgpBvci bvci, template BssgpCause cause,
 					   PDU_BSSGP pdu) := {
 		pDU_BSSGP_STATUS := {
 			bssgpPduType := '41'O,
@@ -1443,12 +1443,12 @@
 			}
 		}
 	}
-	template PDU_BSSGP tr_BSSGP_STATUS(template BVCI bvci := ?, template BssgpCause cause := ?,
+	template PDU_BSSGP tr_BSSGP_STATUS(template BssgpBvci bvci := ?, template BssgpCause cause := ?,
 					   template octetstring pdu := ?) := {
 		pDU_BSSGP_STATUS := {
 			bssgpPduType := '41'O,
 			cause := t_BSSGP_CAUSE(cause),
-			bVCI := bvci,
+			bVCI := t_BSSGP_BVCI(bvci),
 			pDU_in_Error := {
 				iEI := '15'O,
 				ext := '1'B,

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22256
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6573562c0e7638f153798ee178c7c69d07c26756
Gerrit-Change-Number: 22256
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210117/2eea73e8/attachment.htm>


More information about the gerrit-log mailing list