Change in ...osmo-ttcn3-hacks[master]: RAN_Emulation: Support for PS domain

2019-08-18 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/13854 )

Change subject: RAN_Emulation: Support for PS domain
..

RAN_Emulation: Support for PS domain

So far, the RAN_Emulation only supported the CS domain, and not PS. Let's
change that so we can start having IuPS related tests.

Change-Id: I7ba4662e5a7ba31a2582b0c133b3140c8057678f
---
M library/RAN_Emulation.ttcnpp
1 file changed, 92 insertions(+), 14 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index 207adcd..891de09 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -101,6 +101,17 @@
PDU_ML3_NW_MS   dtap
 }

+type record PDU_DTAP_PS_MO {
+   OCT1dlci optional,
+   boolean skip_seq_patching optional,
+   PDU_L3_MS_SGSN  dtap
+}
+
+type record PDU_DTAP_PS_MT {
+   OCT1dlci optional,
+   PDU_L3_SGSN_MS  dtap
+}
+
 template PDU_DTAP_MT ts_PDU_DTAP_MT(template PDU_ML3_NW_MS dtap, template OCT1 
dlci := omit) := {
dlci := dlci,
dtap := dtap
@@ -123,6 +134,29 @@
dtap := dtap
 }

+template (value) PDU_DTAP_PS_MT ts_PDU_DTAP_PS_MT(template (value) 
PDU_L3_SGSN_MS dtap, template (omit) OCT1 dlci := omit) := {
+   dlci := dlci,
+   dtap := dtap
+}
+
+template (value) PDU_DTAP_PS_MO ts_PDU_DTAP_PS_MO(template (value) 
PDU_L3_MS_SGSN dtap, template (value) OCT1 dlci := '00'O,
+ boolean skip_seq_patching := 
false) := {
+   dlci := dlci,
+   skip_seq_patching := skip_seq_patching,
+   dtap := dtap
+}
+
+template PDU_DTAP_PS_MT tr_PDU_DTAP_PS_MT(template PDU_L3_SGSN_MS dtap, 
template OCT1 dlci := *) := {
+   dlci := dlci,
+   dtap := dtap
+}
+
+template PDU_DTAP_PS_MO tr_PDU_DTAP_PS_MO(template PDU_L3_MS_SGSN dtap, 
template OCT1 dlci := *) := {
+   dlci := dlci,
+   skip_seq_patching := ?,
+   dtap := dtap
+}
+
 /* port between individual per-connection components and this dispatcher */
 type port RAN_Conn_PT message {
inout
@@ -142,6 +176,7 @@
 #endif
/* direct DTAP messages from/to clients */
PDU_DTAP_MO, PDU_DTAP_MT,
+   PDU_DTAP_PS_MO, PDU_DTAP_PS_MT,
/* misc indications / requests between SCCP and client */
RAN_Conn_Prim;
 } with { extension "internal" };
@@ -562,24 +597,46 @@
var template (omit) OCT1 dlci := fake_dlci_from_sapi(sapi);
if (g_ran_ops.role_ms) {
/* we are the MS, so any message to us must be MT */
-   var PDU_DTAP_MT mt := {
-   dlci := omit,
-   dtap := dec_PDU_ML3_NW_MS(valueof(l3))
-   };
-   if (isvalue(dlci)) {
-   mt.dlci := valueof(dlci)
+   if (g_ran_ops.ps_domain) {
+   var PDU_DTAP_PS_MT mt := {
+   dlci := omit,
+   dtap := dec_PDU_L3_SGSN_MS(valueof(l3))
+   };
+   if (isvalue(dlci)) {
+   mt.dlci := valueof(dlci);
+   }
+   CLIENT.send(mt) to client;
+   } else {
+   var PDU_DTAP_MT mt := {
+   dlci := omit,
+   dtap := dec_PDU_ML3_NW_MS(valueof(l3))
+   };
+   if (isvalue(dlci)) {
+   mt.dlci := valueof(dlci)
+   }
+   CLIENT.send(mt) to client;
}
-   CLIENT.send(mt) to client;
} else {
/* we are the Network, so any message to us must be MO 
*/
-   var PDU_DTAP_MO mo := {
-   dlci := omit,
-   dtap := dec_PDU_ML3_MS_NW(valueof(l3))
-   };
-   if (isvalue(dlci)) {
-   mo.dlci := valueof(dlci)
+   if (g_ran_ops.ps_domain) {
+   var PDU_DTAP_PS_MO mo := {
+   dlci := omit,
+   dtap := dec_PDU_L3_MS_SGSN(valueof(l3))
+   };
+   if (isvalue(dlci)) {
+   mo.dlci := valueof(dlci);
+   }
+  

Change in ...osmo-ttcn3-hacks[master]: RAN_Emulation: Support for PS domain

2019-08-13 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/13854 )

Change subject: RAN_Emulation: Support for PS domain
..


Patch Set 4: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/13854
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: I7ba4662e5a7ba31a2582b0c133b3140c8057678f
Gerrit-Change-Number: 13854
Gerrit-PatchSet: 4
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Tue, 13 Aug 2019 10:51:41 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: RAN_Emulation: Support for PS domain

2019-08-13 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/13854 )

Change subject: RAN_Emulation: Support for PS domain
..


Set Ready For Review


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/13854
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: I7ba4662e5a7ba31a2582b0c133b3140c8057678f
Gerrit-Change-Number: 13854
Gerrit-PatchSet: 4
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: lynxis lazus 
Gerrit-Comment-Date: Tue, 13 Aug 2019 10:48:22 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-ttcn3-hacks[master]: RAN_Emulation: Support for PS domain

2019-05-02 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/13854


Change subject: RAN_Emulation: Support for PS domain
..

RAN_Emulation: Support for PS domain

So far, the RAN_Emulation only supported the CS domain, and not PS. Let's
change that so we can start having IuPS related tests.

Change-Id: I7ba4662e5a7ba31a2582b0c133b3140c8057678f
---
M library/RAN_Emulation.ttcnpp
1 file changed, 92 insertions(+), 14 deletions(-)



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

diff --git a/library/RAN_Emulation.ttcnpp b/library/RAN_Emulation.ttcnpp
index d6d74e2..7c5a18d 100644
--- a/library/RAN_Emulation.ttcnpp
+++ b/library/RAN_Emulation.ttcnpp
@@ -88,6 +88,17 @@
PDU_ML3_NW_MS   dtap
 }

+type record PDU_DTAP_PS_MO {
+   OCT1dlci optional,
+   boolean skip_seq_patching optional,
+   PDU_L3_MS_SGSN  dtap
+}
+
+type record PDU_DTAP_PS_MT {
+   OCT1dlci optional,
+   PDU_L3_SGSN_MS  dtap
+}
+
 template PDU_DTAP_MT ts_PDU_DTAP_MT(template PDU_ML3_NW_MS dtap, template OCT1 
dlci := omit) := {
dlci := dlci,
dtap := dtap
@@ -110,6 +121,29 @@
dtap := dtap
 }

+template (value) PDU_DTAP_PS_MT ts_PDU_DTAP_PS_MT(template (value) 
PDU_L3_SGSN_MS dtap, template (omit) OCT1 dlci := omit) := {
+   dlci := dlci,
+   dtap := dtap
+}
+
+template (value) PDU_DTAP_PS_MO ts_PDU_DTAP_PS_MO(template (value) 
PDU_L3_MS_SGSN dtap, template (value) OCT1 dlci := '00'O,
+ boolean skip_seq_patching := 
false) := {
+   dlci := dlci,
+   skip_seq_patching := skip_seq_patching,
+   dtap := dtap
+}
+
+template PDU_DTAP_PS_MT tr_PDU_DTAP_PS_MT(template PDU_L3_SGSN_MS dtap, 
template OCT1 dlci := *) := {
+   dlci := dlci,
+   dtap := dtap
+}
+
+template PDU_DTAP_PS_MO tr_PDU_DTAP_PS_MO(template PDU_L3_MS_SGSN dtap, 
template OCT1 dlci := *) := {
+   dlci := dlci,
+   skip_seq_patching := ?,
+   dtap := dtap
+}
+
 /* port between individual per-connection components and this dispatcher */
 type port RAN_Conn_PT message {
inout
@@ -129,6 +163,7 @@
 #endif
/* direct DTAP messages from/to clients */
PDU_DTAP_MO, PDU_DTAP_MT,
+   PDU_DTAP_PS_MO, PDU_DTAP_PS_MT,
/* misc indications / requests between SCCP and client */
RAN_Conn_Prim;
 } with { extension "internal" };
@@ -536,24 +571,46 @@
var template (omit) OCT1 dlci := fake_dlci_from_sapi(sapi);
if (g_ran_ops.role_ms) {
/* we are the MS, so any message to us must be MT */
-   var PDU_DTAP_MT mt := {
-   dlci := omit,
-   dtap := dec_PDU_ML3_NW_MS(valueof(l3))
-   };
-   if (isvalue(dlci)) {
-   mt.dlci := valueof(dlci)
+   if (g_ran_ops.ps_domain) {
+   var PDU_DTAP_PS_MT mt := {
+   dlci := omit,
+   dtap := dec_PDU_L3_SGSN_MS(valueof(l3))
+   };
+   if (isvalue(dlci)) {
+   mt.dlci := valueof(dlci);
+   }
+   CLIENT.send(mt) to client;
+   } else {
+   var PDU_DTAP_MT mt := {
+   dlci := omit,
+   dtap := dec_PDU_ML3_NW_MS(valueof(l3))
+   };
+   if (isvalue(dlci)) {
+   mt.dlci := valueof(dlci)
+   }
+   CLIENT.send(mt) to client;
}
-   CLIENT.send(mt) to client;
} else {
/* we are the Network, so any message to us must be MO 
*/
-   var PDU_DTAP_MO mo := {
-   dlci := omit,
-   dtap := dec_PDU_ML3_MS_NW(valueof(l3))
-   };
-   if (isvalue(dlci)) {
-   mo.dlci := valueof(dlci)
+   if (g_ran_ops.ps_domain) {
+   var PDU_DTAP_PS_MO mo := {
+   dlci := omit,
+   dtap := dec_PDU_L3_MS_SGSN(valueof(l3))
+   };
+   if (isvalue(dlci)) {
+   mo.dlci := valueof(dlci);
+   }
+