dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34087 )
Change subject: GTP_Templates: add template restriction qualifiers ......................................................................
GTP_Templates: add template restriction qualifiers
The GTP Templates lack the template restriction qualifiers (present, value, omit) in many places.
Related: OS#6095 Change-Id: Ic439b4ae85b417fde0ddfb8fa00758d6486b57c8 --- M library/GTP_Templates.ttcn 1 file changed, 150 insertions(+), 145 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/87/34087/1
diff --git a/library/GTP_Templates.ttcn b/library/GTP_Templates.ttcn index f6fda36..35d4d83 100644 --- a/library/GTP_Templates.ttcn +++ b/library/GTP_Templates.ttcn @@ -64,7 +64,7 @@ }
/* generalized GTP-C receive template */ - template PDU_GTPC tr_GTP1C_PDU(template OCT1 msg_type, template OCT4 teid, template GTPC_PDUs pdu := ?) := { + template (present) PDU_GTPC tr_GTP1C_PDU(template OCT1 msg_type, template OCT4 teid, template GTPC_PDUs pdu := ?) := { /* N-PDU Number flag (PN) shall be set to '0'. A GTP-C receiver shall not return an * error if this flag is set to '1'. */ pn_bit := '0'B, @@ -84,7 +84,7 @@ }
/* generalized GTP-C send template */ - template PDU_GTPC ts_GTP1C_PDU(OCT1 msg_type, OCT4 teid, GTPC_PDUs pdu, uint16_t seq_nr) := { + template (value) PDU_GTPC ts_GTP1C_PDU(OCT1 msg_type, OCT4 teid, GTPC_PDUs pdu, uint16_t seq_nr) := { /* N-PDU Number flag (PN) shall be set to '0'. A GTP-C receiver shall not return an * error if this flag is set to '1'. */ pn_bit := '0'B, @@ -109,18 +109,18 @@ }
/* recovery IE */ - template Recovery_gtpc ts_Recovery(OCT1 restart_counter) := { + template (value) Recovery_gtpc ts_Recovery(OCT1 restart_counter) := { type_gtpc := '0E'O, restartCounter := restart_counter }
- template Recovery_gtpc tr_Recovery(template OCT1 restart_counter) := { + template (present) Recovery_gtpc tr_Recovery(template OCT1 restart_counter) := { type_gtpc := '0E'O, restartCounter := restart_counter }
/* IMEI(SV) IE TS 29.060 7.7.53 */ - template IMEISV_gtpc ts_IMEISV(template (value) OCT8 imeisv) := { + template (value) IMEISV_gtpc ts_IMEISV(template (value) OCT8 imeisv) := { type_gtpc := '9A'O, lengthf := 8, imeisv := imeisv @@ -133,7 +133,7 @@ return ts_IMEISV(imeisv); }
- template IMEISV_gtpc tr_IMEISV(template (present) OCT8 imeisv) := { + template (present) IMEISV_gtpc tr_IMEISV(template (present) OCT8 imeisv) := { type_gtpc := '9A'O, lengthf := 8, imeisv := imeisv @@ -176,7 +176,7 @@ }
/* Charging Characteristics IE TS 29.060 7.7.23 */ - template ChargingCharacteristics_GTPC ts_ChargingCharacteristics(template (value) OCT2 chargingChar) := { + template (value) ChargingCharacteristics_GTPC ts_ChargingCharacteristics(template (value) OCT2 chargingChar) := { type_gtpc := '1A'O, chargingChar := chargingChar } @@ -188,22 +188,22 @@ return ts_ChargingCharacteristics(chargingChar); }
- template ChargingCharacteristics_GTPC tr_ChargingCharacteristics(template (present) OCT2 chargingChar) := { + template (present) ChargingCharacteristics_GTPC tr_ChargingCharacteristics(template (present) OCT2 chargingChar) := { type_gtpc := '1A'O, chargingChar := chargingChar }
/* template matching reception of GTP-C unit-data */ - template Gtp1cUnitdata tr_GTPC_MsgType(template GtpPeer peer, template OCT1 msg_type, template OCT4 teid, template GTPC_PDUs pdus := ?) := { + template (present) Gtp1cUnitdata tr_GTPC_MsgType(template GtpPeer peer, template OCT1 msg_type, template OCT4 teid, template GTPC_PDUs pdus := ?) := { peer := peer, gtpc := tr_GTP1C_PDU(msg_type, teid, pdus) }
/* template matching reception of GTP-C echo-request */ - template Gtp1cUnitdata tr_GTPC_PING(template GtpPeer peer) := tr_GTPC_MsgType(peer, echoRequest, '00000000'O); + template (present) Gtp1cUnitdata tr_GTPC_PING(template GtpPeer peer) := tr_GTPC_MsgType(peer, echoRequest, '00000000'O);
- template GTPC_PDUs tr_EchoRespPDU(template OCT1 restart_counter) := { + template (present) GTPC_PDUs tr_EchoRespPDU(template OCT1 restart_counter) := { echoResponse := { recovery := tr_Recovery(restart_counter), private_extension_gtpc := * @@ -211,9 +211,9 @@ }
/* template matching reception of GTP-C echo-response */ - template Gtp1cUnitdata tr_GTPC_PONG(template GtpPeer peer) := tr_GTPC_MsgType(peer, echoResponse, '00000000'O, tr_EchoRespPDU(?)); + template (present) Gtp1cUnitdata tr_GTPC_PONG(template GtpPeer peer) := tr_GTPC_MsgType(peer, echoResponse, '00000000'O, tr_EchoRespPDU(?));
- template GTPC_PDUs ts_EchoRespPDU(OCT1 restart_counter) := { + template (value) GTPC_PDUs ts_EchoRespPDU(OCT1 restart_counter) := { echoResponse := { recovery := ts_Recovery(restart_counter), private_extension_gtpc := omit @@ -221,19 +221,19 @@ }
/* master template for senidng a GTP-C echo response */ - template Gtp1cUnitdata ts_GTPC_PONG(GtpPeer peer, uint16_t seq, OCT1 rest_ctr) := { + template (value) Gtp1cUnitdata ts_GTPC_PONG(GtpPeer peer, uint16_t seq, OCT1 rest_ctr) := { peer := peer, gtpc := ts_GTP1C_PDU(echoResponse, '00000000'O, valueof(ts_EchoRespPDU(rest_ctr)), seq) }
- template GTPC_PDUs ts_EchoReqPDU := { + template (value) GTPC_PDUs ts_EchoReqPDU := { echoRequest := { private_extension_gtpc := omit } }
/* master template for sending a GTP-C echo request */ - template Gtp1cUnitdata ts_GTPC_PING(GtpPeer peer, uint16_t seq) := { + template (value) Gtp1cUnitdata ts_GTPC_PING(GtpPeer peer, uint16_t seq) := { peer := peer, gtpc := ts_GTP1C_PDU(echoRequest, '00000000'O, valueof(ts_EchoReqPDU), seq) } @@ -288,7 +288,7 @@ } } template EndUserAddress t_EuaIPv4Dyn := t_EuaIPv4(omit); - template EndUserAddress tr_EuaIPv4(template OCT4 ip_addr) modifies t_EuaIPv4 := { + template (present) EndUserAddress tr_EuaIPv4(template OCT4 ip_addr) modifies t_EuaIPv4 := { endUserAddress := { endUserAddressIPv4 := { lengthf := f_eua_ipv4_len(ip_addr) @@ -309,7 +309,7 @@ } } template EndUserAddress t_EuaIPv6Dyn := t_EuaIPv6(omit); - template EndUserAddress tr_EuaIPv6(template OCT16 ip_addr) modifies t_EuaIPv6 := { + template (present) EndUserAddress tr_EuaIPv6(template OCT16 ip_addr) modifies t_EuaIPv6 := { endUserAddress := { endUserAddressIPv6 := { lengthf := f_eua_ipv6_len(ip_addr) @@ -332,7 +332,7 @@ } } template EndUserAddress t_EuaIPv4Dynv6Dyn := t_EuaIPv4v6(omit, omit); - template EndUserAddress tr_EuaIPv4v6(template OCT4 ip_addr4, template OCT16 ip_addr6) modifies t_EuaIPv4v6 := { + template (present) EndUserAddress tr_EuaIPv4v6(template OCT4 ip_addr4, template OCT16 ip_addr6) modifies t_EuaIPv4v6 := { endUserAddress := { endUserAddressIPv4andIPv6 := { lengthf := f_eua_ipv4v6_len(ip_addr4, ip_addr6) @@ -340,25 +340,25 @@ } }
- template AccessPointName ts_APN(octetstring apn) := { + template (value) AccessPointName ts_APN(octetstring apn) := { type_gtpc := '83'O, lengthf := lengthof(apn), apn_value := apn }
- template GSN_Address_GTPC ts_GsnAddr(octetstring ip_addr) := { + template (value) GSN_Address_GTPC ts_GsnAddr(octetstring ip_addr) := { type_gtpc := '85'O, lengthf := lengthof(ip_addr), addressf := ip_addr }
- template MSISDN ts_Msisdn(octetstring msisdn) := { + template (value) MSISDN ts_Msisdn(octetstring msisdn) := { type_gtpc := '86'O, lengthf := lengthof(msisdn), msisdn := msisdn }
- template QualityOfServiceProfile ts_QosDefault := { + template (value) QualityOfServiceProfile ts_QosDefault := { type_gtpc := '87'O, lengthf := 17, allocRetensionPrio := '00'O, @@ -393,7 +393,7 @@ } }
- template IMSI_gtpc ts_Imsi(hexstring digits) := { + template (value) IMSI_gtpc ts_Imsi(hexstring digits) := { type_gtpc := '02'O, digits := digits, padding := 'F'H @@ -429,15 +429,15 @@ cI_value := cI_value }
- template GTPC_PDUs ts_CreatePdpPDU(hexstring imsi, OCT1 restart_ctr, OCT4 teid_data, OCT4 teid_ctrl, - BIT4 nsapi, EndUserAddress eua, octetstring apn, - octetstring sgsn_ip_sign, octetstring sgsn_ip_data, - octetstring msisdn, template ProtConfigOptions pco := omit, - template (omit) OCT1 ratType := omit, - template (omit) UserLocationInformation uli := omit, - template (omit) OCT2 charging_char := omit, - template (omit) OCT8 imeisv := omit, - template(omit) MS_TimeZone ms_tz := omit) := { + template (value) GTPC_PDUs ts_CreatePdpPDU(hexstring imsi, OCT1 restart_ctr, OCT4 teid_data, OCT4 teid_ctrl, + BIT4 nsapi, EndUserAddress eua, octetstring apn, + octetstring sgsn_ip_sign, octetstring sgsn_ip_data, + octetstring msisdn, template (omit) ProtConfigOptions pco := omit, + template (omit) OCT1 ratType := omit, + template (omit) UserLocationInformation uli := omit, + template (omit) OCT2 charging_char := omit, + template (omit) OCT8 imeisv := omit, + template(omit) MS_TimeZone ms_tz := omit) := { createPDPContextRequest := { imsi := ts_Imsi(imsi), rai := omit, @@ -493,17 +493,17 @@ } }
- template Gtp1cUnitdata ts_GTPC_CreatePDP(GtpPeer peer, uint16_t seq, hexstring imsi, - OCT1 restart_ctr, OCT4 teid_data, - OCT4 teid_ctrl, BIT4 nsapi, EndUserAddress eua, - octetstring apn, octetstring sgsn_ip_sign, - octetstring sgsn_ip_data, octetstring msisdn, - template ProtConfigOptions pco := omit, - template (omit) OCT1 ratType := omit, - template (omit) UserLocationInformation uli := omit, - template (omit) OCT2 charging_char := omit, - template (omit) OCT8 imeisv := omit, - template(omit) MS_TimeZone ms_tz := omit) := { + template (value) Gtp1cUnitdata ts_GTPC_CreatePDP(GtpPeer peer, uint16_t seq, hexstring imsi, + OCT1 restart_ctr, OCT4 teid_data, + OCT4 teid_ctrl, BIT4 nsapi, EndUserAddress eua, + octetstring apn, octetstring sgsn_ip_sign, + octetstring sgsn_ip_data, octetstring msisdn, + template (omit) ProtConfigOptions pco := omit, + template (omit) OCT1 ratType := omit, + template (omit) UserLocationInformation uli := omit, + template (omit) OCT2 charging_char := omit, + template (omit) OCT8 imeisv := omit, + template(omit) MS_TimeZone ms_tz := omit) := { peer := peer, gtpc := ts_GTP1C_PDU(createPDPContextRequest, '00000000'O, valueof(ts_CreatePdpPDU(imsi, restart_ctr, teid_data, teid_ctrl, @@ -513,12 +513,12 @@ }
- template GTPC_PDUs ts_UpdatePdpPDU(hexstring imsi, OCT1 restart_ctr, OCT4 teid_data, OCT4 teid_ctrl, - BIT4 nsapi, - octetstring sgsn_ip_sign, octetstring sgsn_ip_data, - template ProtConfigOptions pco := omit, - template (omit) OCT1 ratType := omit, - template (omit) UserLocationInformation uli := omit) := { + template (value) GTPC_PDUs ts_UpdatePdpPDU(hexstring imsi, OCT1 restart_ctr, OCT4 teid_data, OCT4 teid_ctrl, + BIT4 nsapi, + octetstring sgsn_ip_sign, octetstring sgsn_ip_data, + template (omit) ProtConfigOptions pco := omit, + template (omit) OCT1 ratType := omit, + template (omit) UserLocationInformation uli := omit) := { updatePDPContextRequest := { updatePDPContextRequestSGSN := { imsi := ts_Imsi(imsi), @@ -565,13 +565,13 @@ } }
- template Gtp1cUnitdata ts_GTPC_UpdatePDP(GtpPeer peer, OCT4 teid, uint16_t seq, hexstring imsi, - OCT1 restart_ctr, OCT4 teid_data, - OCT4 teid_ctrl, BIT4 nsapi, octetstring sgsn_ip_sign, - octetstring sgsn_ip_data, - template ProtConfigOptions pco := omit, - template (omit) OCT1 ratType := omit, - template (omit) UserLocationInformation uli := omit) := { + template (value) Gtp1cUnitdata ts_GTPC_UpdatePDP(GtpPeer peer, OCT4 teid, uint16_t seq, hexstring imsi, + OCT1 restart_ctr, OCT4 teid_data, + OCT4 teid_ctrl, BIT4 nsapi, octetstring sgsn_ip_sign, + octetstring sgsn_ip_data, + template (omit) ProtConfigOptions pco := omit, + template (omit) OCT1 ratType := omit, + template (omit) UserLocationInformation uli := omit) := { peer := peer, gtpc := ts_GTP1C_PDU(updatePDPContextRequest, teid, valueof(ts_UpdatePdpPDU(imsi, restart_ctr, teid_data, teid_ctrl, @@ -580,23 +580,23 @@ }
- template NSAPI_GTPC ts_NSAPI(BIT4 nsapi) := { + template (value) NSAPI_GTPC ts_NSAPI(BIT4 nsapi) := { type_gtpc := '14'O, nsapi := nsapi, unused := '0000'B }
- template ReorderingRequired ts_ReorderReq(boolean req := false) := { + template (value) ReorderingRequired ts_ReorderReq(boolean req := false) := { type_gtpc := '08'O, reordreq := bool2bit(req), spare := '0000000'B }
- template GTPC_PDUs ts_CreatePdpRespPDU(OCT1 cause, OCT4 teid_data, OCT4 teid_ctrl, BIT4 nsapi, - octetstring ggsn_ip_sign, octetstring ggsn_ip_data, - OCT4 chg_id, template EndUserAddress eua := omit, - template Recovery_gtpc recovery := omit, - template ProtConfigOptions pco := omit) := { + template (value) GTPC_PDUs ts_CreatePdpRespPDU(OCT1 cause, OCT4 teid_data, OCT4 teid_ctrl, BIT4 nsapi, + octetstring ggsn_ip_sign, octetstring ggsn_ip_data, + OCT4 chg_id, template (omit) EndUserAddress eua := omit, + template (omit) Recovery_gtpc recovery := omit, + template (omit) ProtConfigOptions pco := omit) := { createPDPContextResponse := { cause := { '00'O, cause }, reorderingRequired := ts_ReorderReq(false), @@ -634,14 +634,14 @@ } }
- template Gtp1cUnitdata ts_GTPC_CreatePdpResp(GtpPeer peer, uint16_t seq, OCT4 teid, - OCT1 cause, - OCT4 teid_ctrl, OCT4 teid_data, - BIT4 nsapi, octetstring ggsn_ip_sign, - octetstring ggsn_ip_data, OCT4 chg_id, - template EndUserAddress eua := omit, - template Recovery_gtpc recovery := omit, - template ProtConfigOptions pco := omit) := { + template (value) Gtp1cUnitdata ts_GTPC_CreatePdpResp(GtpPeer peer, uint16_t seq, OCT4 teid, + OCT1 cause, + OCT4 teid_ctrl, OCT4 teid_data, + BIT4 nsapi, octetstring ggsn_ip_sign, + octetstring ggsn_ip_data, OCT4 chg_id, + template (omit) EndUserAddress eua := omit, + template (omit) Recovery_gtpc recovery := omit, + template (omit) ProtConfigOptions pco := omit) := { peer := peer, gtpc := ts_GTP1C_PDU(createPDPContextResponse, teid, valueof(ts_CreatePdpRespPDU(cause, teid_data, teid_ctrl, nsapi, @@ -650,7 +650,7 @@ }
/* PCO send base template */ - template ProtConfigOptions ts_PCO := { + template (value) ProtConfigOptions ts_PCO := { type_gtpc := '84'O, lengthf := 0, configProtocol := '000'B, @@ -659,7 +659,7 @@ protocols := {} } /* PCO receive base template */ - template ProtConfigOptions tr_PCO := { + template (present) ProtConfigOptions tr_PCO := { type_gtpc := '84'O, lengthf := ?, configProtocol := '000'B, @@ -668,18 +668,18 @@ protocols := {} }
- template ProtConfigOptions ts_PCO_IPv6_DNS modifies ts_PCO := { + template (value) ProtConfigOptions ts_PCO_IPv6_DNS modifies ts_PCO := { protocols := { { protocolID := '0003'O, lengthProtoID := 0, protoIDContents := ''O } } } - template ProtConfigOptions tr_PCO_IPv6_DNS_resp(template OCT16 contents) modifies tr_PCO := { + template (present) ProtConfigOptions tr_PCO_IPv6_DNS_resp(template OCT16 contents) modifies tr_PCO := { protocols := { *, { protocolID := '0003'O, lengthProtoID := 16, protoIDContents := contents }, * } }
- template ProtConfigOptions ts_PCO_IPv4_DNS_IPCP modifies ts_PCO := { + template (value) ProtConfigOptions ts_PCO_IPv4_DNS_IPCP modifies ts_PCO := { protocols := { /* dummy PAP entry to check if our parser in the GGSN can properly iterate over * the list of protocols, see Change-Id Icc2e6716c33d78d3c3e000f529806228d8aa155e */ @@ -689,7 +689,7 @@ } }
- template ProtConfigOptions ts_PCO_IPv4_PRI_DNS_IPCP modifies ts_PCO := { + template (value) ProtConfigOptions ts_PCO_IPv4_PRI_DNS_IPCP modifies ts_PCO := { protocols := { /* dummy PAP entry to check if our parser can cope with a single primary DNS entry * see Change-Id Icffde89f9bc5d8fcadf6e2dd6c0b4de03440edd5 and OS#3288 */ @@ -698,7 +698,7 @@ enc_IpcpPacket(valueof(ts_IPCP_ReqDNS_Primary)) } } } - template ProtConfigOptions ts_PCO_IPv4_SEC_DNS_IPCP modifies ts_PCO := { + template (value) ProtConfigOptions ts_PCO_IPv4_SEC_DNS_IPCP modifies ts_PCO := { protocols := { /* dummy PAP entry to check if our parser can cope with a single secondary DNS entry * see Change-Id Icffde89f9bc5d8fcadf6e2dd6c0b4de03440edd5 and OS#3288 */ @@ -707,7 +707,7 @@ enc_IpcpPacket(valueof(ts_IPCP_ReqDNS_Secondary)) } } } - template ProtConfigOptions ts_PCO_IPv4_SEPARATE_DNS_IPCP modifies ts_PCO := { + template (value) ProtConfigOptions ts_PCO_IPv4_SEPARATE_DNS_IPCP modifies ts_PCO := { protocols := { /* dummy PAP entry to check if our parser can cope with a primary and secondary DNS * in separate IPCP containers OS#3381 */ @@ -719,33 +719,33 @@ } }
- template ProtocolElement tr_PCO_Proto(OCT2 prot_id) := { + template (present) ProtocolElement tr_PCO_Proto(OCT2 prot_id) := { protocolID := prot_id, lengthProtoID := ?, protoIDContents := ? } - template ProtocolElement ts_PCOelem_PAP_broken := { + template (value) ProtocolElement ts_PCOelem_PAP_broken := { protocolID := 'C023'O, lengthProtoID := 60, /* PPP Password Authentication Protocol containing incorrect Peer-Id-Length set to 4 (6-7 should be the valid one), see OS#3914. */ protoIDContents := '0100003c'O & '0444435338323700bc1c08087c1508083e00790000150808fd06000001000000000000000000000000000000000000000000000000000000'O } - template ProtConfigOptions ts_PCO_PAP_IPv4_DNS modifies ts_PCO := { + template (value) ProtConfigOptions ts_PCO_PAP_IPv4_DNS modifies ts_PCO := { protocols := { ts_PCOelem_PAP_broken, { protocolID := '8021'O, lengthProtoID := 16, protoIDContents := enc_IpcpPacket(valueof(ts_IPCP_ReqDNS)) } } } - template ProtConfigOptions tr_PCO_Contains(OCT2 prot_id) modifies tr_PCO := { + template (present) ProtConfigOptions tr_PCO_Contains(OCT2 prot_id) modifies tr_PCO := { protocols := { *, tr_PCO_Proto(prot_id), * } }
- template ProtConfigOptions ts_PCO_IPv4_DNS_CONT modifies ts_PCO := { + template (value) ProtConfigOptions ts_PCO_IPv4_DNS_CONT modifies ts_PCO := { protocols := { { protocolID := '000d'O, lengthProtoID := 0, protoIDContents := ''O } } } - template ProtConfigOptions tr_PCO_IPv4_DNS_CONT_resp(template OCT4 contents) modifies tr_PCO := { + template (present) ProtConfigOptions tr_PCO_IPv4_DNS_CONT_resp(template OCT4 contents) modifies tr_PCO := { protocols := { *, { protocolID := '000d'O, lengthProtoID := 4, protoIDContents := contents }, * } @@ -768,42 +768,42 @@ return ''O; }
- template IpcpPacket tr_IPCP(template LcpCode code, template uint8_t identifier, + template (present) IpcpPacket tr_IPCP(template LcpCode code, template uint8_t identifier, template IpcpOptionList opts) := { code := code, identifier := identifier, len := ?, options := opts } - template IpcpOption tr_IPCP_PrimaryDns(template OCT4 addr) := { + template (present) IpcpOption tr_IPCP_PrimaryDns(template OCT4 addr) := { code := IPCP_OPT_PrimaryDNS, len := 6, data := addr } - template IpcpOption tr_IPCP_SecondaryDns(template OCT4 addr) := { + template (present) IpcpOption tr_IPCP_SecondaryDns(template OCT4 addr) := { code := IPCP_OPT_SecondaryDNS, len := 6, data := addr } - template IpcpPacket tr_IPCP_Ack_DNS(template uint8_t identifier := ?, template OCT4 dns1 := ?, + template (present) IpcpPacket tr_IPCP_Ack_DNS(template uint8_t identifier := ?, template OCT4 dns1 := ?, template OCT4 dns2 := ?) := tr_IPCP(LCP_Configure_Ack, identifier, { *, tr_IPCP_PrimaryDns(dns1), *, tr_IPCP_SecondaryDns(dns2), * });
- template IpcpPacket ts_IPCP(LcpCode code, uint8_t identifier, template IpcpOptionList opts) := { + template (value) IpcpPacket ts_IPCP(LcpCode code, uint8_t identifier, template (value) IpcpOptionList opts) := { code := code, identifier := identifier, len := 0, /* overwritten */ options := opts } - template IpcpPacket ts_IPCP_ReqDNS(uint8_t identifier := 0) := + template (value) IpcpPacket ts_IPCP_ReqDNS(uint8_t identifier := 0) := ts_IPCP(LCP_Configure_Request, identifier, { tr_IPCP_PrimaryDns('00000000'O), tr_IPCP_SecondaryDns('00000000'O) });
- template IpcpPacket ts_IPCP_ReqDNS_Primary(uint8_t identifier := 0) := + template (value) IpcpPacket ts_IPCP_ReqDNS_Primary(uint8_t identifier := 0) := ts_IPCP(LCP_Configure_Request, identifier, { tr_IPCP_PrimaryDns('00000000'O) }); - template IpcpPacket ts_IPCP_ReqDNS_Secondary(uint8_t identifier := 0) := + template (value) IpcpPacket ts_IPCP_ReqDNS_Secondary(uint8_t identifier := 0) := ts_IPCP(LCP_Configure_Request, identifier, { tr_IPCP_SecondaryDns('00000000'O) });
@@ -819,7 +819,7 @@ return ret; }
- template GTPC_PDUs ts_DeletePdpPDU(BIT4 nsapi, template (omit) BIT1 teardown_ind) := { + template (value) GTPC_PDUs ts_DeletePdpPDU(BIT4 nsapi, template (omit) BIT1 teardown_ind) := { deletePDPContextRequest := { cause := omit, tearDownIndicator := f_teardown_ind_IE(teardown_ind), @@ -837,15 +837,15 @@ } }
- template Gtp1cUnitdata ts_GTPC_DeletePDP(GtpPeer peer, uint16_t seq, OCT4 teid, - BIT4 nsapi, template (omit) BIT1 teardown_ind) := { + template (value) Gtp1cUnitdata ts_GTPC_DeletePDP(GtpPeer peer, uint16_t seq, OCT4 teid, + BIT4 nsapi, template (omit) BIT1 teardown_ind) := { peer := peer, gtpc := ts_GTP1C_PDU(deletePDPContextRequest, teid, valueof(ts_DeletePdpPDU(nsapi, teardown_ind)), seq) }
- template GTPC_PDUs ts_DeletePdpRespPDU(OCT1 cause, - template ProtConfigOptions pco := omit) := { + template (value) GTPC_PDUs ts_DeletePdpRespPDU(OCT1 cause, + template (omit) ProtConfigOptions pco := omit) := { deletePDPContextResponse := { cause := { '00'O, cause }, protConfigOptions := pco, @@ -856,9 +856,9 @@ } }
- template Gtp1cUnitdata ts_GTPC_DeletePdpResp(GtpPeer peer, uint16_t seq, OCT4 teid, - OCT1 cause, - template ProtConfigOptions pco := omit) := { + template (value) Gtp1cUnitdata ts_GTPC_DeletePdpResp(GtpPeer peer, uint16_t seq, OCT4 teid, + OCT1 cause, + template (omit) ProtConfigOptions pco := omit) := { peer := peer, gtpc := ts_GTP1C_PDU(deletePDPContextResponse, teid, valueof(ts_DeletePdpRespPDU(cause, pco)), seq) @@ -903,7 +903,7 @@ }, rIMProtocolVersionNumber := int2oct(ver, 1) } - function tr_GTPC_Cell_Identifier_V(template GTP_CellId cid) return template Cell_Identifier_V_GTPC { + function tr_GTPC_Cell_Identifier_V(template GTP_CellId cid) return template (present) Cell_Identifier_V_GTPC { var template Cell_Identifier_V_GTPC ret := { mccDigit1 := ?, mccDigit2 := ?, @@ -915,11 +915,7 @@ rac := ?, cI_value := ? } - if (istemplatekind(cid, "omit")) { - return omit; - } else if (istemplatekind(cid, "*")) { - return *; - } else if (istemplatekind(cid, "?")) { + if (istemplatekind(cid, "?")) { return ?; } if (isvalue(cid) and isvalue(cid.ra_id) and isvalue(cid.ra_id.lai)) { @@ -954,10 +950,10 @@ rac := int2oct(cid.ra_id.rac, 1), cI_value := int2oct(cid.cell_id, 2) } - template RIM_Routing_Address_GTPC t_GTPC_RIM_Routing_Address_cid(GTP_CellId cid) := { - cell_Identifier := ts_GTPC_Cell_Identifier_V(cid) + template (value) RIM_Routing_Address_GTPC t_GTPC_RIM_Routing_Address_cid(GTP_CellId cid) := { + cell_Identifier := ts_GTPC_Cell_Identifier_V(cid) } - function tr_GTPC_ENB_Identifier(template GTP_CellId cid, template integer tac, template octetstring gnbid) return template ENB_Identifier { + function tr_GTPC_ENB_Identifier(template GTP_CellId cid, template integer tac, template octetstring gnbid) return template (present) ENB_Identifier { var template ENB_Identifier ret := { mccDigit1 := ?, mccDigit2 := ?, @@ -968,11 +964,7 @@ tAC := ?, globalENB_ID := ? } - if (istemplatekind(cid, "omit") and istemplatekind(tac, "omit") and istemplatekind(gnbid, "omit")) { - return omit; - } else if (istemplatekind(cid, "*") and istemplatekind(tac, "*") and istemplatekind(gnbid, "*")) { - return *; - } else if (istemplatekind(cid, "?") and istemplatekind(tac, "?") and istemplatekind(gnbid, "?")) { + if (istemplatekind(cid, "?") and istemplatekind(tac, "?") and istemplatekind(gnbid, "?")) { return ?; } if (isvalue(cid) and isvalue(cid.ra_id) and isvalue(cid.ra_id.lai)) { @@ -1004,10 +996,10 @@ tAC := int2oct(tac, 2), globalENB_ID := gnbid } - template RIM_Routing_Address_GTPC t_GTPC_RIM_Routing_Address_enbid(GTP_CellId cid, integer tac, octetstring gnbid) := { - eNB_Identifier := ts_GTPC_ENB_Identifier(cid, tac, gnbid) + template (value) RIM_Routing_Address_GTPC t_GTPC_RIM_Routing_Address_enbid(GTP_CellId cid, integer tac, octetstring gnbid) := { + eNB_Identifier := ts_GTPC_ENB_Identifier(cid, tac, gnbid) } - template RIM_Routing_Information_GTPC + template (present) RIM_Routing_Information_GTPC tr_GTPC_RIM_Routing_Information(HEX1 addr_discr, template RIM_Routing_Address_GTPC addr) := { iEI := '54'O, ext := '1'B, @@ -1030,7 +1022,7 @@ rIM_Routing_Address := addr } /* 3GPP TS 48.018 11.3.63.1.1 */ - template RAN_Information_Request_Application_Container_NACC_GTPC + template (present) RAN_Information_Request_Application_Container_NACC_GTPC tr_GTPC_RAN_Information_Request_Application_Container_NACC(template GTP_CellId cid) := { iEI := '4D'O, ext := '1'B, @@ -1049,7 +1041,7 @@ reporting_Cell_Identifier := ts_GTPC_Cell_Identifier_V(cid) } /* 3GPP TS 48.018 11.3.63.1 */ - template RAN_Information_Request_Application_Container_GTPC + template (present) RAN_Information_Request_Application_Container_GTPC tru_GTPC_RAN_Information_Request_Application_Container_NACC(template GTP_CellId cid) := { nacc := tr_GTPC_RAN_Information_Request_Application_Container_NACC(cid) } @@ -1058,7 +1050,7 @@ nacc := ts_GTPC_RAN_Information_Request_Application_Container_NACC(cid) } /* 3GPP TS 48.018 11.3.63.2.1 */ - template RAN_Information_Application_Container_NACC_GTPC + template (present) RAN_Information_Application_Container_NACC_GTPC tr_GTPC_RAN_Information_Application_Container_NACC(template GTP_CellId cid, boolean psi_type, integer si_psi_num, octetstring si_psi) := { iEI := '4E'O, ext := '1'B, @@ -1112,7 +1104,7 @@ source_Cell_Identifier := src, rIM_Container := cont } - template PDU_BSSGP_RAN_INFORMATION_REQUEST_GTPC + template (present) PDU_BSSGP_RAN_INFORMATION_REQUEST_GTPC tr_GTPC_RAN_Information_Request(template RIM_Routing_Information_GTPC dest := ?, template RIM_Routing_Information_GTPC src := ?, template RAN_Information_Request_RIM_Container_GTPC cont := ?) := { @@ -1129,7 +1121,7 @@ pDU_BSSGP_RAN_INFORMATION_REQUEST := pdu } } - template RANTransparentContainer tr_RANTransparentContainer_RAN_INFO_REQ(template PDU_BSSGP_RAN_INFORMATION_REQUEST_GTPC pdu := ?) := { + template (present) RANTransparentContainer tr_RANTransparentContainer_RAN_INFO_REQ(template PDU_BSSGP_RAN_INFORMATION_REQUEST_GTPC pdu := ?) := { type_gtpc := '90'O, lengthf := ?, rANTransparentContainerField := { @@ -1138,7 +1130,7 @@ }
/* RAN_Information */ - template ApplContainer_or_ApplErrContainer_NACC_GTPC + template (present) ApplContainer_or_ApplErrContainer_NACC_GTPC tru_GTPC_ApplContainer_NACC(GTP_CellId cid, boolean psi_type, integer si_psi_num, octetstring si_psi) := { application_Container := tr_GTPC_RAN_Information_Application_Container_NACC(cid, psi_type, si_psi_num, si_psi) } @@ -1146,7 +1138,7 @@ tsu_GTPC_ApplContainer_NACC(GTP_CellId cid, boolean psi_type, integer si_psi_num, octetstring si_psi) := { application_Container := ts_GTPC_RAN_Information_Application_Container_NACC(cid, psi_type, si_psi_num, si_psi) } - template ApplContainer_or_ApplErrContainer_GTPC + template (present) ApplContainer_or_ApplErrContainer_GTPC tru_GTPC_ApplContainer_or_ApplErrContainer_NACC(template ApplContainer_or_ApplErrContainer_NACC_GTPC cont) := { nacc := cont } @@ -1154,7 +1146,7 @@ tsu_GTPC_ApplContainer_or_ApplErrContainer_NACC(template (value) ApplContainer_or_ApplErrContainer_NACC_GTPC cont) := { nacc := cont } - template RAN_Information_RIM_Container_GTPC + template (present) RAN_Information_RIM_Container_GTPC tr_GTPC_RAN_Information_RIM_Container(template RIM_Application_Identity_GTPC app_id, template RIM_Sequence_Number_GTPC seq, template RIM_PDU_Indications_GTPC ind, @@ -1192,7 +1184,7 @@ applContainer_or_ApplErrContainer := app_cont, sON_TransferApplicationIdentity := son_app_id } - template PDU_BSSGP_RAN_INFORMATION_GTPC + template (present) PDU_BSSGP_RAN_INFORMATION_GTPC tr_GTPC_RAN_Information(template RIM_Routing_Information_GTPC dest, template RIM_Routing_Information_GTPC src, template RAN_Information_RIM_Container_GTPC cont) := { @@ -1210,7 +1202,7 @@ source_Cell_Identifier := src, rIM_Container := cont } - template RANTransparentContainer tr_RANTransparentContainer_RAN_INFO(template PDU_BSSGP_RAN_INFORMATION_GTPC pdu) := { + template (present) RANTransparentContainer tr_RANTransparentContainer_RAN_INFO(template PDU_BSSGP_RAN_INFORMATION_GTPC pdu) := { type_gtpc := '90'O, lengthf := ?, rANTransparentContainerField := { @@ -1225,7 +1217,7 @@ } }
- template RANTransparentContainer tr_RANTransparentContainer(template RANTransparentContainerField rANTransparentContainerField) := { + template (present) RANTransparentContainer tr_RANTransparentContainer(template RANTransparentContainerField rANTransparentContainerField) := { type_gtpc := '90'O, lengthf := ?, rANTransparentContainerField := rANTransparentContainerField @@ -1235,7 +1227,7 @@ lengthf := 0, /* overwritten */ rANTransparentContainerField := rANTransparentContainerField } - template GTPC_PDUs tr_RANInfoRelay(template RANTransparentContainer transparentContainer) := { + template (present) GTPC_PDUs tr_RANInfoRelay(template RANTransparentContainer transparentContainer) := { ranInformationRelay := { transparentContainer := transparentContainer, rIM_RoutingAddress := *, @@ -1253,7 +1245,7 @@ private_extension_gtpc := omit } } - template Gtp1cUnitdata + template (present) Gtp1cUnitdata tr_GTPC_RANInfoRelay(template GtpPeer peer, template RANTransparentContainer transparentContainer) := { peer := peer, @@ -1269,7 +1261,7 @@ }
- template RAN_Information_Request_RIM_Container_GTPC + template (present) RAN_Information_Request_RIM_Container_GTPC tr_GTPC_RAN_Information_Request_RIM_Container(template RIM_Application_Identity_GTPC app_id := ?, template RIM_Sequence_Number_GTPC seq := ?, template RIM_PDU_Indications_GTPC ind := ?, @@ -1291,7 +1283,7 @@
/* GTP-U */
- template PDU_GTPU tr_GTP1U_PDU(template OCT1 msg_type, template OCT4 teid, template GTPU_IEs ies := ?) := { + template (present) PDU_GTPU tr_GTP1U_PDU(template OCT1 msg_type, template OCT4 teid, template GTPU_IEs ies := ?) := { pn_bit := ?, s_bit := ?, e_bit := ?, @@ -1354,15 +1346,15 @@ gtpu_IEs := ies }
- template Gtp1uUnitdata tr_GTPU_MsgType(template GtpPeer peer, template OCT1 msg_type, template OCT4 teid) := { + template (present) Gtp1uUnitdata tr_GTPU_MsgType(template GtpPeer peer, template OCT1 msg_type, template OCT4 teid) := { peer := peer, gtpu := tr_GTP1U_PDU(msg_type, teid) }
/* 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 (present) Gtp1uUnitdata tr_GTPU_PING(template GtpPeer peer) := tr_GTPU_MsgType(peer, echoRequest, '00000000'O); + template (present) 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) := { @@ -1370,12 +1362,12 @@ data := data } } - template Gtp1uUnitdata tr_GTPU_GPDU(template GtpPeer peer, template OCT4 teid, template octetstring data := ?) := { + template (present) Gtp1uUnitdata tr_GTPU_GPDU(template GtpPeer peer, template OCT4 teid, template octetstring data := ?) := { peer := peer, gtpu := tr_GTP1U_PDU('FF'O, teid, t_GPDU(data)) }
- template GTPU_IEs ts_UEchoReqPDU := { + template (present) GTPU_IEs ts_UEchoReqPDU := { echoRequest_IEs := { private_extension_gtpu := omit } @@ -1398,23 +1390,23 @@ }
/* master template for sending a GTP-U echo response */ - template Gtp1uUnitdata ts_GTPU_PONG(GtpPeer peer, uint16_t seq, OCT1 rest_ctr) := { + template (present) Gtp1uUnitdata ts_GTPU_PONG(GtpPeer peer, uint16_t seq, OCT1 rest_ctr) := { peer := peer, gtpu := ts_GTP1U_PDU(echoResponse, seq, '00000000'O, valueof(ts_UEchoRespPDU(rest_ctr))) }
- template GSNAddress_gtpu ts_UGsnAddr(octetstring ip_addr) := { + template (value) 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) := { + template (value) TeidDataI_gtpu ts_UteidDataI(OCT4 teid) := { type_gtpu := '10'O, teidDataI := teid }
- template GTPU_IEs ts_UErrorIndication(OCT4 teid, octetstring gsn_addr) := { + template (value) GTPU_IEs ts_UErrorIndication(OCT4 teid, octetstring gsn_addr) := { errorIndication_IEs := { teidDataI_gtpu := ts_UteidDataI(teid), gSNAddress_gtpu := ts_UGsnAddr(gsn_addr), @@ -1423,13 +1415,13 @@ }
/* master template for sending a GTP-U Error indication */ - template Gtp1uUnitdata ts_GTPU_ErrorIndication(GtpPeer peer, uint16_t seq, OCT4 teid, octetstring gsn_addr) := { + template (value) 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) := { + template (value) Gtp1uUnitdata ts_GTP1U_GPDU(GtpPeer peer, template (omit) uint16_t seq, OCT4 teid, octetstring data) := { peer := peer, gtpu := ts_GTP1U_PDU('FF'O, seq, teid, { g_PDU_IEs := { data := data }}) }