laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33714 )

Change subject: GTP_Emulation: make GTPU optional
......................................................................

GTP_Emulation: make GTPU optional

When using the GTP_Emulation connection handler one has to configure a
GTPC and a GTPU link. However in some situations (e.g. when testing the
Gn interface of an 5g MME) only GTPC may be required. So lets make the
GTPU link optional.

Related: OS#5760
Change-Id: I509a229fcaf02ea5149df42816af27bba46d3bff
---
M library/GTP_Emulation.ttcn
1 file changed, 23 insertions(+), 6 deletions(-)

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




diff --git a/library/GTP_Emulation.ttcn b/library/GTP_Emulation.ttcn
index b67e828..4ea293c 100644
--- a/library/GTP_Emulation.ttcn
+++ b/library/GTP_Emulation.ttcn
@@ -30,8 +30,8 @@
 type record GtpEmulationCfg {
        HostName gtpc_bind_ip,
        PortNumber gtpc_bind_port,
-       HostName gtpu_bind_ip,
-       PortNumber gtpu_bind_port,
+       HostName gtpu_bind_ip optional,
+       PortNumber gtpu_bind_port optional,
        boolean sgsn_role
 };

@@ -168,10 +168,12 @@
                                                     cfg.gtpc_bind_port, 
{udp:={}});
        g_gtpc_id := res.connId;

-       map(self:GTPU, system:GTPU);
-       res := GTP_CodecPort_CtrlFunct.f_GTPU_listen(GTPU, cfg.gtpu_bind_ip,
-                                                    cfg.gtpu_bind_port, 
{udp:={}});
-       g_gtpu_id := res.connId;
+       if (isvalue(cfg.gtpu_bind_ip) and isvalue(cfg.gtpu_bind_port)) {
+               map(self:GTPU, system:GTPU);
+               res := GTP_CodecPort_CtrlFunct.f_GTPU_listen(GTPU, 
cfg.gtpu_bind_ip,
+                                                            
cfg.gtpu_bind_port, {udp:={}});
+               g_gtpu_id := res.connId;
+       }

        g_restart_ctr := f_rnd_octstring(1);
        g_c_seq_nr := f_rnd_int(65535);

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33714
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: I509a229fcaf02ea5149df42816af27bba46d3bff
Gerrit-Change-Number: 33714
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to