[PATCH] osmo-ttcn3-hacks[master]: BSSMAP_Emulation: Introduce new MSC_CONN_PRIM_CONF_IND

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Jan 22 02:01:46 UTC 2018


Review at  https://gerrit.osmocom.org/5967

BSSMAP_Emulation: Introduce new MSC_CONN_PRIM_CONF_IND

If the ConnHdlr initiates an outbound connection, it needs to know
once that connection is established if it wants to send further
data. Transform the N-CONNECT.confirm into a MSC_CONN_PRIM_CONF_IND
and send it to the ConnHdlr.

Make use of it from the MSC_Tests when issuing a Complete L3 Info.

Change-Id: I7293a9f4993d13c90316224eb9f13e10130388ef
---
M library/BSSMAP_Emulation.ttcn
M msc_tests/BSC_ConnectionHandler.ttcn
2 files changed, 13 insertions(+), 1 deletion(-)


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

diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn
index dce8eb0..e7a432c 100644
--- a/library/BSSMAP_Emulation.ttcn
+++ b/library/BSSMAP_Emulation.ttcn
@@ -55,7 +55,9 @@
 	/* SCCP tell us that connection was released */
 	MSC_CONN_PRIM_DISC_IND,
 	/* we tell SCCP to release connection */
-	MSC_CONN_PRIM_DISC_REQ
+	MSC_CONN_PRIM_DISC_REQ,
+	/* Connection confirmed indication */
+	MSC_CONN_PRIM_CONF_IND
 }
 
 type record BSSAP_Conn_Req {
@@ -420,6 +422,9 @@
 
 		/* SCCP -> Client: connection confirm for outbound connection */
 		[] BSSAP.receive(BSSAP_N_CONNECT_cfm:?) -> value conn_cfm {
+			vc_conn := f_comp_by_conn_id(conn_cfm.connectionId);
+			var BSSAP_Conn_Prim prim := MSC_CONN_PRIM_CONF_IND;
+			CLIENT.send(prim) to vc_conn;
 			/* handle user payload */
 			if (ispresent(conn_cfm.userData)) {
 				f_handle_userData(vc_conn, conn_cfm.userData);
diff --git a/msc_tests/BSC_ConnectionHandler.ttcn b/msc_tests/BSC_ConnectionHandler.ttcn
index 15a460b..2d6036f 100644
--- a/msc_tests/BSC_ConnectionHandler.ttcn
+++ b/msc_tests/BSC_ConnectionHandler.ttcn
@@ -93,6 +93,13 @@
 	var octetstring l3_enc := enc_PDU_ML3_MS_NW(l3);
 	BSSAP.send(ts_BSSAP_Conn_Req(g_pars.sccp_addr_peer, g_pars.sccp_addr_own,
 				     valueof(ts_BSSMAP_ComplL3(g_pars.cell_id, l3_enc))));
+	alt {
+	[] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_CONF_IND) {}
+	[] BSSAP.receive(BSSAP_Conn_Prim:MSC_CONN_PRIM_DISC_IND) {
+			setverdict(fail, "DISC.ind from SCCP");
+			self.stop;
+		}
+	}
 }
 
 /* helper function to fully establish a dedicated channel */

-- 
To view, visit https://gerrit.osmocom.org/5967
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7293a9f4993d13c90316224eb9f13e10130388ef
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list