Change in osmo-ttcn3-hacks[master]: gbproxy: Register IMSI + TLLI with BSSGP_Emulation

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

daniel gerrit-no-reply at lists.osmocom.org
Mon Nov 16 19:14:24 UTC 2020


daniel has submitted this change. ( 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(-)

Approvals:
  daniel: Looks good to me, approved
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/gbproxy/GBProxy_Tests.ttcn b/gbproxy/GBProxy_Tests.ttcn
index 5d312f7..64827aa 100644
--- a/gbproxy/GBProxy_Tests.ttcn
+++ b/gbproxy/GBProxy_Tests.ttcn
@@ -396,11 +396,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());
@@ -409,6 +417,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: 6
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201116/e3908033/attachment.htm>


More information about the gerrit-log mailing list