pespin submitted this change.
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(-)
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 change 37589. To unsubscribe, or for help writing mail filters, visit settings.