aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--library/GTP_Emulation.ttcn14
1 files changed, 8 insertions, 6 deletions
diff --git a/library/GTP_Emulation.ttcn b/library/GTP_Emulation.ttcn
index b67e828c..4ea293c6 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 gtpu_bind_ip,
- PortNumber gtpu_bind_port,
+ HostName gtpu_bind_ip optional,
+ PortNumber gtpu_bind_port optional,
boolean sgsn_role
};
@@ -168,10 +168,12 @@ private function f_init(GtpEmulationCfg cfg) runs on GTP_Emulation_CT {
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);