pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37589?usp=email )


Change subject: library/GTP_Emulation: Make GTPv1C port optional
......................................................................

library/GTP_Emulation: Make GTPv1C port optional

The port is not needed when emulating HNBGW, since the setup of GTPv1U
happens through RAB-ASsReq/resp.

Change-Id: I3ffb54d0cb8b3a81ed5235feaaac6d989baf6e0d
---
M library/GTP_Emulation.ttcn
1 file changed, 20 insertions(+), 6 deletions(-)



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

diff --git a/library/GTP_Emulation.ttcn b/library/GTP_Emulation.ttcn
index afe4217..aa620ed 100644
--- a/library/GTP_Emulation.ttcn
+++ b/library/GTP_Emulation.ttcn
@@ -30,8 +30,8 @@
 const integer GTP1U_PORT := 2152;

 type record GtpEmulationCfg {
-       HostName gtpc_bind_ip,
-       PortNumber gtpc_bind_port,
+       HostName gtpc_bind_ip optional,
+       PortNumber gtpc_bind_port optional,
        HostName gtpu_bind_ip optional,
        PortNumber gtpu_bind_port optional,
        boolean sgsn_role
@@ -213,10 +213,12 @@
 private function f_init(GtpEmulationCfg cfg) runs on GTP_Emulation_CT {
        var Result res;

-       map(self:GTPC, system:GTPC);
-       res := GTPv1C_CodecPort_CtrlFunct.f_IPL4_listen(GTPC, cfg.gtpc_bind_ip,
-                                                    cfg.gtpc_bind_port, 
{udp:={}});
-       g_gtpc_id := res.connId;
+       if (isvalue(cfg.gtpc_bind_ip) and isvalue(cfg.gtpc_bind_port)) {
+               map(self:GTPC, system:GTPC);
+               res := GTPv1C_CodecPort_CtrlFunct.f_IPL4_listen(GTPC, 
cfg.gtpc_bind_ip,
+                                                       cfg.gtpc_bind_port, 
{udp:={}});
+               g_gtpc_id := res.connId;
+       }

        if (isvalue(cfg.gtpu_bind_ip) and isvalue(cfg.gtpu_bind_port)) {
                map(self:GTPU, system:GTPU);

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37589?usp=email
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: I3ffb54d0cb8b3a81ed5235feaaac6d989baf6e0d
Gerrit-Change-Number: 37589
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to