Change in osmo-ttcn3-hacks[master]: Fix/complete the partial GTPv2_CodecPort we already had

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Apr 19 17:25:29 UTC 2020


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

Change subject: Fix/complete the partial GTPv2_CodecPort we already had
......................................................................

Fix/complete the partial GTPv2_CodecPort we already had

Change-Id: Idb9f492863d31e9decffeb0d71215fe581fdd4bb
---
M library/GTPv2_CodecPort.ttcn
A library/GTPv2_CodecPort_CtrlFunct.ttcn
A library/GTPv2_CodecPort_CtrlFunctDef.cc
3 files changed, 100 insertions(+), 2 deletions(-)

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



diff --git a/library/GTPv2_CodecPort.ttcn b/library/GTPv2_CodecPort.ttcn
index 1f08f19..e9cf57e 100644
--- a/library/GTPv2_CodecPort.ttcn
+++ b/library/GTPv2_CodecPort.ttcn
@@ -12,13 +12,13 @@
 module GTPv2_CodecPort {
 	import from IPL4asp_PortType all;
 	import from IPL4asp_Types all;
-	import from GTPv2C_Types all;
+	import from GTPv2_Types all;
 
 	/* identifies a remote peer (sender or receiver) */
 	type record GtpPeer {
 		ConnectionId	connId,
 		HostName	remName,
-		PortNumber	remPort
+		IPL4asp_Types.PortNumber	remPort
 	}
 
 	/* Decoded GTP2C (Control Plane), used in send and receive direction */
diff --git a/library/GTPv2_CodecPort_CtrlFunct.ttcn b/library/GTPv2_CodecPort_CtrlFunct.ttcn
new file mode 100644
index 0000000..d68ea51
--- /dev/null
+++ b/library/GTPv2_CodecPort_CtrlFunct.ttcn
@@ -0,0 +1,43 @@
+module GTPv2_CodecPort_CtrlFunct {
+
+  import from GTPv2_CodecPort all;
+  import from IPL4asp_Types all;
+
+  external function f_IPL4_listen(
+    inout GTPv2C_PT portRef,
+    in HostName locName,
+    in PortNumber locPort,
+    in ProtoTuple proto,
+    in OptionList options := {}
+  ) return Result;
+
+  external function f_IPL4_connect(
+    inout GTPv2C_PT portRef,
+    in HostName remName,
+    in PortNumber remPort,
+    in HostName locName,
+    in PortNumber locPort,
+    in ConnectionId connId,
+    in ProtoTuple proto,
+    in OptionList options := {}
+  ) return Result;
+
+  external function f_IPL4_close(
+    inout GTPv2C_PT portRef,
+    in ConnectionId id,
+    in ProtoTuple proto := { unspecified := {} }
+  ) return Result;
+
+  external function f_IPL4_setUserData(
+    inout GTPv2C_PT portRef,
+    in ConnectionId id,
+    in UserData userData
+  ) return Result;
+
+  external function f_IPL4_getUserData(
+    inout GTPv2C_PT portRef,
+    in ConnectionId id,
+    out UserData userData
+  ) return Result;
+
+}
diff --git a/library/GTPv2_CodecPort_CtrlFunctDef.cc b/library/GTPv2_CodecPort_CtrlFunctDef.cc
new file mode 100644
index 0000000..6a68cae
--- /dev/null
+++ b/library/GTPv2_CodecPort_CtrlFunctDef.cc
@@ -0,0 +1,55 @@
+#include "IPL4asp_PortType.hh"
+#include "IPL4asp_PT.hh"
+#include "GTPv2_CodecPort.hh"
+
+namespace GTPv2__CodecPort__CtrlFunct {
+
+  IPL4asp__Types::Result f__IPL4__listen(
+    GTPv2__CodecPort::GTPv2C__PT& portRef,
+    const IPL4asp__Types::HostName& locName,
+    const IPL4asp__Types::PortNumber& locPort,
+    const IPL4asp__Types::ProtoTuple& proto,
+    const IPL4asp__Types::OptionList& options)
+  {
+    return f__IPL4__PROVIDER__listen(portRef, locName, locPort, proto, options);
+  }
+  
+  IPL4asp__Types::Result f__IPL4__connect(
+    GTPv2__CodecPort::GTPv2C__PT& portRef,
+    const IPL4asp__Types::HostName& remName,
+    const IPL4asp__Types::PortNumber& remPort,
+    const IPL4asp__Types::HostName& locName,
+    const IPL4asp__Types::PortNumber& locPort,
+    const IPL4asp__Types::ConnectionId& connId,
+    const IPL4asp__Types::ProtoTuple& proto,
+    const IPL4asp__Types::OptionList& options)
+  {
+    return f__IPL4__PROVIDER__connect(portRef, remName, remPort,
+                                      locName, locPort, connId, proto, options);
+  }
+
+  IPL4asp__Types::Result f__IPL4__close(
+    GTPv2__CodecPort::GTPv2C__PT& portRef, 
+    const IPL4asp__Types::ConnectionId& connId, 
+    const IPL4asp__Types::ProtoTuple& proto)
+  {
+      return f__IPL4__PROVIDER__close(portRef, connId, proto);
+  }
+
+  IPL4asp__Types::Result f__IPL4__setUserData(
+    GTPv2__CodecPort::GTPv2C__PT& portRef,
+    const IPL4asp__Types::ConnectionId& connId,
+    const IPL4asp__Types::UserData& userData)
+  {
+    return f__IPL4__PROVIDER__setUserData(portRef, connId, userData);
+  }
+  
+  IPL4asp__Types::Result f__IPL4__getUserData(
+    GTPv2__CodecPort::GTPv2C__PT& portRef,
+    const IPL4asp__Types::ConnectionId& connId,
+    IPL4asp__Types::UserData& userData)
+  {
+    return f__IPL4__PROVIDER__getUserData(portRef, connId, userData);
+  }
+
+}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/17866
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: Idb9f492863d31e9decffeb0d71215fe581fdd4bb
Gerrit-Change-Number: 17866
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200419/0f50f3e2/attachment.htm>


More information about the gerrit-log mailing list