ggsn: Test GTP-U Echo Request/Response
Change-Id: Id92180be948ee3f5246c7befec666698a1b074f3
diff --git a/library/GTP_Templates.ttcn b/library/GTP_Templates.ttcn
index 8f6098a..0a9c5e9 100644
--- a/library/GTP_Templates.ttcn
+++ b/library/GTP_Templates.ttcn
@@ -1121,7 +1121,7 @@
}
/* generalized GTP-U send template */
- template PDU_GTPU ts_GTP1U_PDU(OCT1 msg_type, template (omit) uint16_t seq, OCT4 teid, GTPU_IEs ies) := {
+ template (value) PDU_GTPU ts_GTP1U_PDU(OCT1 msg_type, template (omit) uint16_t seq, OCT4 teid, GTPU_IEs ies) := {
/* N-PDU Number flag (PN): the GTP-U header contains a meaningful N-PDU Number field if the PN
* flag is set to 1. */
pn_bit := '0'B, /* we assume the encoder overwrites this if an optional part is given */
@@ -1153,8 +1153,9 @@
}
- /* template matching reception of GTP-U echo-request */
+ /* template matching reception of GTP-U echo-request/response */
template Gtp1uUnitdata tr_GTPU_PING(template GtpPeer peer) := tr_GTPU_MsgType(peer, echoRequest, '00000000'O);
+ template Gtp1uUnitdata tr_GTPU_PONG(template GtpPeer peer) := tr_GTPU_MsgType(peer, echoResponse, '00000000'O);
/* template matching reception of GTP-U GPDU */
template GTPU_IEs t_GPDU(template octetstring data) := {
@@ -1167,6 +1168,18 @@
gtpu := tr_GTP1U_PDU('FF'O, teid, t_GPDU(data))
}
+ template GTPU_IEs ts_UEchoReqPDU := {
+ echoRequest_IEs := {
+ private_extension_gtpu := omit
+ }
+ }
+
+ /* master template for sending a GTP-C echo request */
+ template (value) Gtp1uUnitdata ts_GTPU_PING(GtpPeer peer, uint16_t seq) := {
+ peer := peer,
+ gtpu := ts_GTP1U_PDU(echoRequest, seq, '00000000'O, valueof(ts_UEchoReqPDU))
+ }
+
template GTPU_IEs ts_UEchoRespPDU(OCT1 restart_counter) := {
echoResponse_IEs := {
recovery_gtpu := {