lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15396


Change subject: sgsn: extend f_routing_area_update() to support Iu
......................................................................

sgsn: extend f_routing_area_update() to support Iu

Allow Iu tests to use f_routing_area_update()

Change-Id: Ic03952a04c00a4fc437ef39c5ee046549c122c8b
---
M sgsn/SGSN_Tests.ttcn
1 file changed, 28 insertions(+), 5 deletions(-)



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

diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 6e82c56..d210182 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -2355,22 +2355,45 @@
        f_cleanup();
 }

-private function f_routing_area_update(RoutingAreaIdentificationV ra, integer 
bssgp := 0) runs on BSSGP_ConnHdlr {
+friend function f_routing_area_update(RoutingAreaIdentificationV ra, integer 
bssgp := 0, boolean send_ptmsi := false) runs on BSSGP_ConnHdlr {
        var PDU_L3_SGSN_MS l3_mt;
+       var PDU_DTAP_PS_MT mt;
+       var template OCT4 p_tmsi := omit;

+       if (send_ptmsi) {
+               p_tmsi := g_pars.p_tmsi;
+       }
        /* then send RAU */
-       f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, g_pars.ra, 
false, omit, omit), bssgp);
+       f_send_l3(ts_GMM_RAU_REQ(f_mi_get_lv(), GPRS_UPD_T_RA, g_pars.ra, 
false, omit, omit, p_tmsi), bssgp, initial := true);
        alt {
-       [] BSSGP[bssgp].receive(tr_GMM_RAU_ACCEPT) -> value l3_mt {
+       [is_gb(bssgp)] BSSGP[bssgp].receive(tr_GMM_RAU_ACCEPT) -> value l3_mt {
                
f_process_rau_accept(l3_mt.msgs.gprs_mm.routingAreaUpdateAccept, bssgp);
                f_send_l3(ts_GMM_RAU_COMPL, bssgp);
                setverdict(pass);
                }
-       [] BSSGP[bssgp].receive(tr_GMM_RAU_REJECT) {
+       [is_iu(bssgp)] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_RAU_ACCEPT)) -> 
value mt {
+               
f_process_rau_accept(mt.dtap.msgs.gprs_mm.routingAreaUpdateAccept, bssgp);
+               f_send_l3(ts_GMM_RAU_COMPL, bssgp);
+               setverdict(pass);
+               }
+
+       [is_gb(bssgp)] BSSGP[bssgp].receive(tr_GMM_RAU_REJECT) {
                setverdict(fail, "Unexpected RAU Reject");
                mtc.stop;
                }
-       [] BSSGP[bssgp].receive { repeat; }
+       [is_iu(bssgp)] BSSAP.receive(tr_PDU_DTAP_PS_MT(tr_GMM_RAU_REJECT)) {
+               setverdict(fail, "Unexpected RAU Reject");
+               mtc.stop;
+               }
+
+       [is_iu(bssgp)] BSSAP.receive(tr_RANAP_SecurityModeCmd(uia_algs := ?, 
uia_key := oct2bit(g_pars.vec.ik),
+                                                               key_sts := ?)) {
+                       var IntegrityProtectionAlgorithm uia_chosen := 0; 
/*standard_UMTS_integrity_algorithm_UIA1;*/
+                       BSSAP.send(ts_RANAP_SecurityModeComplete(uia_chosen));
+                       
//BSSAP.receive(tr_RANAP_CommonId(imsi_hex2oct(g_pars.imsi)));
+               }
+       [is_gb(bssgp)] BSSGP[bssgp].receive { repeat; }
+       [is_iu(bssgp)] BSSAP.receive { repeat; }
        }
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15396
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: Ic03952a04c00a4fc437ef39c5ee046549c122c8b
Gerrit-Change-Number: 15396
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lyn...@fe80.eu>
Gerrit-MessageType: newchange

Reply via email to