[PATCH] osmo-ttcn3-hacks[master]: BSSMAP_Emulation: Parameter to skip seq no patching

daniel gerrit-no-reply at lists.osmocom.org
Tue Feb 6 16:31:26 UTC 2018


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

BSSMAP_Emulation: Parameter to skip seq no patching

This is needed to check that duplicated messages will actually be thrown
away by the MSC.

Change-Id: I0a6914067ec8daa8903f0ef0c877f178cfd61659
---
M library/BSSMAP_Emulation.ttcn
M msc/BSC_ConnectionHandler.ttcn
2 files changed, 9 insertions(+), 5 deletions(-)


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

diff --git a/library/BSSMAP_Emulation.ttcn b/library/BSSMAP_Emulation.ttcn
index b1567f3..6ec396f 100644
--- a/library/BSSMAP_Emulation.ttcn
+++ b/library/BSSMAP_Emulation.ttcn
@@ -70,6 +70,7 @@
 /* similar to PDU_BSSAP with DTAP, but DTAP is already decoded! */
 type record PDU_DTAP_MO {
 	OCT1			dlci optional,
+	boolean			skip_seq_patching optional,
 	PDU_ML3_MS_NW		dtap
 }
 
@@ -84,8 +85,9 @@
 	dtap := dtap
 }
 
-template PDU_DTAP_MO ts_PDU_DTAP_MO(template PDU_ML3_MS_NW dtap, template OCT1 dlci := '00'O) := {
+template PDU_DTAP_MO ts_PDU_DTAP_MO(template PDU_ML3_MS_NW dtap, template OCT1 dlci := '00'O, boolean skip_seq_patching := false) := {
 	dlci := dlci,
+	skip_seq_patching := skip_seq_patching,
 	dtap := dtap
 }
 
@@ -573,7 +575,9 @@
 			/* convert from decoded DTAP to encoded DTAP */
 			var octetstring l3_enc := enc_PDU_ML3_MS_NW(dtap_mo.dtap);
 			/* patch correct L3 send sequence number N(SD) into l3_enc */
-			f_ML3_patch_seq(ConnectionTable[idx], dtap_mo.dtap, l3_enc);
+			if (dtap_mo.skip_seq_patching == false) {
+				f_ML3_patch_seq(ConnectionTable[idx], dtap_mo.dtap, l3_enc);
+			}
 			bssap := valueof(ts_BSSAP_DTAP(l3_enc, dtap_mo.dlci));
 			BSSAP.send(ts_BSSAP_DATA_req(ConnectionTable[idx].sccp_conn_id, bssap));
 			}
diff --git a/msc/BSC_ConnectionHandler.ttcn b/msc/BSC_ConnectionHandler.ttcn
index b81f61f..fa0216a 100644
--- a/msc/BSC_ConnectionHandler.ttcn
+++ b/msc/BSC_ConnectionHandler.ttcn
@@ -546,7 +546,7 @@
 	/* Send DTMF */
 	dtmf_dtap := ts_ML3_MO_CC_START_DTMF(cpars.transaction_id, "2");
 	dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(2, 2);
-	BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap));
+	BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true));
 	T.start;
 	alt {
 	[] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) {}
@@ -556,7 +556,7 @@
 		}
 	}
 
-	BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap));
+	BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true));
 	T.start;
 	alt {
 	[] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "2")) {
@@ -568,7 +568,7 @@
 
 	dtmf_dtap := ts_ML3_MO_CC_START_DTMF(cpars.transaction_id, "3");
 	dtmf_dtap.msgs.cc.startDTMF.nsd := int2bit(3, 2);
-	BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap))
+	BSSAP.send(ts_PDU_DTAP_MO(dtmf_dtap, '00'O, true));
 	alt {
 	[] MNCC.receive(tr_MNCC_START_DTMF_ind(cpars.mncc_callref, "3")) { }
 	[] T.timeout {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a6914067ec8daa8903f0ef0c877f178cfd61659
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Owner: daniel <dwillmann at sysmocom.de>


More information about the gerrit-log mailing list