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


Change subject: gbproxy: Register IMSI + TLLI with BSSGP_Emulation
......................................................................

gbproxy: Register IMSI + TLLI with BSSGP_Emulation

If we don't do that, the BSSGP code will not know what to route to us
and what not.

Change-Id: Ife8b8918f0eb69c6dc502d67d2566e78975c9f91
---
M gbproxy/GBProxy_Tests.ttcn
1 file changed, 23 insertions(+), 0 deletions(-)



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

diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index ff11624..47a0cd9 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -390,11 +390,19 @@
 /* first function called in every ConnHdlr */
 private function f_handler_init(void_fn fn, charstring id, BSSGP_ConnHdlrPars 
pars)
 runs on BSSGP_ConnHdlr {
+       var integer i;
        /* do some common stuff like setting up g_pars */
        g_pars := pars;

        llc := f_llc_create(false);

+       /* register for our IMSI + TLLI */
+       for (i := 0; i < sizeof(SGSN_PROC); i := i+1) {
+               f_client_register(g_pars.imsi, g_pars.tlli, SGSN_PROC[i]);
+       }
+       for (i := 0; i < sizeof(PCU_PROC); i := i+1) {
+               f_client_register(g_pars.imsi, g_pars.tlli, PCU_PROC[i]);
+       }

        g_Tguard.start(pars.t_guard);
        activate(as_Tguard());
@@ -403,6 +411,21 @@
        fn.apply(id);
 }

+private function f_client_register(hexstring imsi, OCT4 tlli, BSSGP_PROC_PT PT)
+runs on BSSGP_ConnHdlr {
+       PT.call(BSSGP_register_client:{imsi, tlli}) {
+               [] PT.getreply(BSSGP_register_client:{imsi, tlli}) {};
+       }
+}
+
+private function f_client_unregister(hexstring imsi, BSSGP_PROC_PT PT)
+runs on BSSGP_ConnHdlr {
+       PT.call(BSSGP_unregister_client:{imsi}) {
+               [] PT.getreply(BSSGP_unregister_client:{imsi}) {};
+       }
+}
+
+
 /* TODO:
    * Detach without Attach
    * SM procedures without attach / RAU

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/21168
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: Ife8b8918f0eb69c6dc502d67d2566e78975c9f91
Gerrit-Change-Number: 21168
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <lafo...@osmocom.org>
Gerrit-MessageType: newchange

Reply via email to