Split GTP_CodecPort/GTP_Templates into C and U variants
The Types are already split in the dependent modules in GTPC_Types and
GTPU_Types.
There's no point in keeping them together in the same file since those 2
protocols are mostly independent.
Furthermore, testsuites using GTPv2C + GTPv1U don't need GTPv1C.
Change-Id: Ic15c9a2e92828cbafb4dda7355ee534107051e2d
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 0824d6e..64ba981 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -42,11 +42,13 @@
import from RANAP_PDU_Descriptions all;
import from RANAP_IEs all;
-import from GTP_Emulation all;
-import from GTP_Templates all;
-import from GTP_CodecPort all;
+import from GTPv1C_CodecPort all;
+import from GTPv1U_CodecPort all;
import from GTPC_Types all;
import from GTPU_Types all;
+import from GTPv1C_Templates all;
+import from GTPv1U_Templates all;
+import from GTP_Emulation all;
import from LLC_Types all;
import from LLC_Templates all;
@@ -1550,12 +1552,13 @@
runs on BSSGP_ConnHdlr {
var Gtp1cUnitdata g_ud;
var integer seq_nr := 23;
- var GtpPeer peer := valueof(ts_GtpPeerC(apars.sgsn_ip_c));
BSSGP[ran_index].clear;
if (error_ind) {
+ var Gtp1uPeer peer := valueof(ts_GtpPeerU(apars.sgsn_ip_c));
GTP.send(ts_GTPU_ErrorIndication(peer, 0 /* seq */, apars.ggsn_tei_u, apars.ggsn_ip_u));
} else {
+ var Gtp1cPeer peer := valueof(ts_GtpPeerC(apars.sgsn_ip_c));
GTP.send(ts_GTPC_DeletePDP(peer, seq_nr, apars.sgsn_tei_c, apars.nsapi, '1'B));
}
@@ -1650,20 +1653,20 @@
sgsn_ip_u := omit
}
-template (value) GtpPeer ts_GtpPeerU(octetstring ip) := {
+template (value) Gtp1uPeer ts_GtpPeerU(octetstring ip) := {
connId := 1,
remName := f_inet_ntoa(ip),
remPort := GTP1U_PORT
}
-template (value) GtpPeer ts_GtpPeerC(octetstring ip) := {
+template (value) Gtp1cPeer ts_GtpPeerC(octetstring ip) := {
connId := 1,
remName := f_inet_ntoa(ip),
remPort := GTP1C_PORT
}
private function f_gtpu_send(inout PdpActPars apars, octetstring payload) runs on BSSGP_ConnHdlr {
- var GtpPeer peer := valueof(ts_GtpPeerU(apars.sgsn_ip_u));
+ var Gtp1uPeer peer := valueof(ts_GtpPeerU(apars.sgsn_ip_u));
GTP.send(ts_GTP1U_GPDU(peer, 0 /*seq*/, apars.sgsn_tei_u, payload));
}
@@ -1734,7 +1737,7 @@
private function f_gtpu_xceive_mo(inout PdpActPars apars, octetstring payload, integer ran_index := 0, uint9_t n_u := 0)
runs on BSSGP_ConnHdlr {
/* Send PDU via SNDCP/LLC/BSSGP/NS via simulated MS/PCU to the SGSN */
- var GtpPeer peer := valueof(ts_GtpPeerU(apars.sgsn_ip_u));
+ var Gtp1uPeer peer := valueof(ts_GtpPeerU(apars.sgsn_ip_u));
var PDU_SN sndcp := valueof(ts_SN_UD(apars.nsapi, payload));
BSSGP[ran_index].send(ts_LLC_UI(enc_PDU_SN(sndcp), apars.sapi, '0'B, n_u));
/* Expect PDU via GTP from SGSN on simulated GGSN */
@@ -2049,7 +2052,6 @@
var Gtp1cUnitdata g_ud;
var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip));
var integer seq_nr := 23;
- var GtpPeer peer;
/* first perform regular attach */
f_TC_attach(id);
@@ -2089,7 +2091,7 @@
private function f_TC_attach_pdp_act_deact_mt_t3395_expire(charstring id) runs on BSSGP_ConnHdlr {
var PdpActPars apars := valueof(t_PdpActPars(mp_ggsn_ip));
var integer seq_nr := 23;
- var GtpPeer peer;
+ var Gtp1cPeer peer;
var integer i;
/* first perform regular attach */
@@ -2193,7 +2195,7 @@
/* Now perform an MT DeleteCtxReq and emulate GGSN didn't receive response and sends a duplicated DeleteCtxReq */
BSSGP[0].clear;
- var GtpPeer peer := valueof(ts_GtpPeerC(apars.sgsn_ip_c));
+ var Gtp1cPeer peer := valueof(ts_GtpPeerC(apars.sgsn_ip_c));
g_delete_req := ts_GTPC_DeletePDP(peer, seq_nr, apars.sgsn_tei_c, apars.nsapi, '1'B);
GTP.send(g_delete_req);
alt {
@@ -3469,7 +3471,7 @@
/* connect RIM related port */
connect(vc_GTP:CLIENT_DEFAULT, self:GTPC);
- var GtpPeer peer := {
+ var Gtp1cPeer peer := {
connId := 1,
remName := mp_sgsn_gtp_ip,
remPort := GTP1C_PORT
@@ -3651,7 +3653,7 @@
var octetstring payload := f_rnd_octstring(200);
var PDU_SN sndcp := valueof(ts_SN_UD(apars.nsapi, payload));
BSSGP[1].send(ts_LLC_UI(enc_PDU_SN(sndcp), apars.sapi, '0'B, 1));
- var GtpPeer peer := valueof(ts_GtpPeerU(apars.sgsn_ip_u));
+ var Gtp1uPeer peer := valueof(ts_GtpPeerU(apars.sgsn_ip_u));
timer T := 2.0;
T.start;
alt {