pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37645?usp=email ) Change subject: library/GTPv1U_Templates: Mark parameters as templates ...................................................................... library/GTPv1U_Templates: Mark parameters as templates Change-Id: I278f7dbc64704c1ba2b8a75d6f540ac52b067598 --- M library/GTPv1U_Templates.ttcn 1 file changed, 32 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/45/37645/1 diff --git a/library/GTPv1U_Templates.ttcn b/library/GTPv1U_Templates.ttcn index a31e1d2..f53035a 100644 --- a/library/GTPv1U_Templates.ttcn +++ b/library/GTPv1U_Templates.ttcn @@ -55,7 +55,10 @@ } /* generalized GTP-U send template */ - template (value) 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(template (value) OCT1 msg_type, + template (omit) uint16_t seq, + template (value) OCT4 teid, + template (value) 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 */ @@ -113,12 +116,13 @@ } /* master template for sending a GTP-C echo request */ - template (value) Gtp1uUnitdata ts_GTPU_PING(Gtp1uPeer peer, uint16_t seq) := { + template (value) Gtp1uUnitdata ts_GTPU_PING(template (value) Gtp1uPeer peer, + template (value) uint16_t seq) := { peer := peer, gtpu := ts_GTP1U_PDU('01'O, seq, '00000000'O, valueof(ts_UEchoReqPDU)) } - template GTPU_IEs ts_UEchoRespPDU(OCT1 restart_counter) := { + template GTPU_IEs ts_UEchoRespPDU(template (value) OCT1 restart_counter) := { echoResponse_IEs := { recovery_gtpu := { type_gtpu := '00'O, /* we assume encoder fixes? */ @@ -129,23 +133,26 @@ } /* master template for sending a GTP-U echo response */ - template (present) Gtp1uUnitdata ts_GTPU_PONG(Gtp1uPeer peer, uint16_t seq, OCT1 rest_ctr) := { + template (present) Gtp1uUnitdata ts_GTPU_PONG(template (value) Gtp1uPeer peer, + template (value) uint16_t seq, + template (value) OCT1 rest_ctr) := { peer := peer, gtpu := ts_GTP1U_PDU('02'O, seq, '00000000'O, valueof(ts_UEchoRespPDU(rest_ctr))) } - template (value) GSNAddress_gtpu ts_UGsnAddr(octetstring ip_addr) := { + template (value) GSNAddress_gtpu ts_UGsnAddr(template (value) octetstring ip_addr) := { type_gtpu := '85'O, - lengthf := lengthof(ip_addr), + lengthf := lengthof(valueof(ip_addr)), gSNAddressValue := ip_addr } - template (value) TeidDataI_gtpu ts_UteidDataI(OCT4 teid) := { + template (value) TeidDataI_gtpu ts_UteidDataI(template (value) OCT4 teid) := { type_gtpu := '10'O, teidDataI := teid } - template (value) GTPU_IEs ts_UErrorIndication(OCT4 teid, octetstring gsn_addr) := { + template (value) GTPU_IEs ts_UErrorIndication(template (value) OCT4 teid, + template (value) octetstring gsn_addr) := { errorIndication_IEs := { teidDataI_gtpu := ts_UteidDataI(teid), gSNAddress_gtpu := ts_UGsnAddr(gsn_addr), @@ -154,13 +161,19 @@ } /* master template for sending a GTP-U Error indication */ - template (value) Gtp1uUnitdata ts_GTPU_ErrorIndication(Gtp1uPeer peer, uint16_t seq, OCT4 teid, octetstring gsn_addr) := { + template (value) Gtp1uUnitdata ts_GTPU_ErrorIndication(template (value) Gtp1uPeer peer, + template (value) uint16_t seq, + template (value) OCT4 teid, + template (value) 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 (value) Gtp1uUnitdata ts_GTP1U_GPDU(Gtp1uPeer peer, template (omit) uint16_t seq, OCT4 teid, octetstring data) := { + template (value) Gtp1uUnitdata ts_GTP1U_GPDU(template (value) Gtp1uPeer peer, + template (omit) uint16_t seq, + template (value) OCT4 teid, + template (value) octetstring data) := { peer := peer, gtpu := ts_GTP1U_PDU('FF'O, seq, teid, { g_PDU_IEs := { data := data }}) } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/37645?usp=email 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: I278f7dbc64704c1ba2b8a75d6f540ac52b067598 Gerrit-Change-Number: 37645 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-MessageType: newchange