pespin submitted this change.

View Change


Approvals: osmith: Looks good to me, approved Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve
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.

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I3ffb54d0cb8b3a81ed5235feaaac6d989baf6e0d
Gerrit-Change-Number: 37589
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann@sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged