summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-07-18 13:46:40 +0200
committerHarald Welte <laforge@gnumonks.org>2018-07-21 17:54:35 +0000
commitf3e25384d79a9ce9a34736eeefe09702e6699f2a (patch)
tree9d91e25229486595f9e140f77b1604454f8bc219 /library
parent8be4d1920dd0132678d075b6750700a7667dea77 (diff)
lib: gtp: Add templates to send ErrorIndiciation
Diffstat (limited to 'library')
-rw-r--r--library/GTP_Templates.ttcn25
1 files changed, 25 insertions, 0 deletions
diff --git a/library/GTP_Templates.ttcn b/library/GTP_Templates.ttcn
index a9d2394..d0a87e3 100644
--- a/library/GTP_Templates.ttcn
+++ b/library/GTP_Templates.ttcn
@@ -667,6 +667,31 @@ module GTP_Templates {
gtpu := ts_GTP1U_PDU(echoResponse, seq, '00000000'O, valueof(ts_UEchoRespPDU(rest_ctr)))
}
+ template GSNAddress_gtpu ts_UGsnAddr(octetstring ip_addr) := {
+ type_gtpu := '85'O,
+ lengthf := lengthof(ip_addr),
+ gSNAddressValue := ip_addr
+ }
+
+ template TeidDataI_gtpu ts_UteidDataI(OCT4 teid) := {
+ type_gtpu := '10'O,
+ teidDataI := teid
+ }
+
+ template GTPU_IEs ts_UErrorIndication(OCT4 teid, octetstring gsn_addr) := {
+ errorIndication_IEs := {
+ teidDataI_gtpu := ts_UteidDataI(teid),
+ gSNAddress_gtpu := ts_UGsnAddr(gsn_addr),
+ private_extension_gtpu := omit
+ }
+ }
+
+ /* master template for sending a GTP-U Error indication */
+ template Gtp1uUnitdata ts_GTPU_ErrorIndication(GtpPeer peer, uint16_t seq, OCT4 teid, octetstring gsn_addr) := {
+ peer := peer,
+ gtpu := ts_GTP1U_PDU('1A'O, seq, '00000000'O, valueof(ts_UErrorIndication(teid, gsn_addr)))
+ }
+
/* master template for sending a GTP-U user plane data */
template Gtp1uUnitdata ts_GTP1U_GPDU(GtpPeer peer, template (omit) uint16_t seq, OCT4 teid, octetstring data) := {
peer := peer,