aboutsummaryrefslogtreecommitdiffstats
path: root/library/ranap/RANAP_Templates.ttcn
diff options
context:
space:
mode:
Diffstat (limited to 'library/ranap/RANAP_Templates.ttcn')
-rw-r--r--library/ranap/RANAP_Templates.ttcn584
1 files changed, 518 insertions, 66 deletions
diff --git a/library/ranap/RANAP_Templates.ttcn b/library/ranap/RANAP_Templates.ttcn
index a1b0a593..8e6c8f37 100644
--- a/library/ranap/RANAP_Templates.ttcn
+++ b/library/ranap/RANAP_Templates.ttcn
@@ -1,6 +1,8 @@
module RANAP_Templates {
import from General_Types all;
+import from Misc_Helpers all;
+import from Native_Functions all;
import from RANAP_IEs all;
import from RANAP_CommonDataTypes all;
@@ -10,6 +12,8 @@ import from RANAP_PDU_Contents all;
import from RANAP_PDU_Descriptions all;
template (value) Cause ts_RanapCause_om_intervention := { misc := 113 };
+template (value) Cause ts_RanapCause_nas_normal := { nAS := 83 };
+template (value) Cause ts_RanapCause_radio_conn_lost := { radioNetwork := 46 };
/*****************************************************************************************************
* Reset
@@ -449,7 +453,7 @@ ts_RANAP_IuReleaseRequest(template (value) Cause cause,
protocolIEs := {
{
id := id_Cause,
- criticality := reject,
+ criticality := ignore,
value_ := {
cause := cause
}
@@ -471,7 +475,7 @@ tr_RANAP_IuReleaseRequest(template Cause cause,
protocolIEs := {
{
id := id_Cause,
- criticality := reject,
+ criticality := ignore,
value_ := {
cause := cause
}
@@ -487,6 +491,24 @@ tr_RANAP_IuReleaseRequest(template Cause cause,
* RAB Release
*****************************************************************************************************/
+template (value) RAB_ID
+t_RAB_id(integer rab_id) := int2bit(rab_id, 8);
+
+template (value) TransportLayerAddress ts_RAB_TLA4(OCT4 ip) := hex2bit('350001'H & oct2hex(ip) & '00000000000000000000000000'H);
+template (value) TransportLayerAddress ts_RAB_TLA6(OCT16 ip) := hex2bit('350000'H & oct2hex(ip) & '00'H);
+function f_ts_RAB_TLA(charstring addr) return template (value) TransportLayerAddress {
+ if (f_addr_is_ipv6(addr)) {
+ var OCT16 ip6 := f_inet6_addr(addr);
+ return ts_RAB_TLA6(ip6);
+ } else {
+ var OCT4 ip4 := f_inet_addr(addr);
+ return ts_RAB_TLA4(ip4);
+ }
+}
+
+template (value) BindingID
+t_RAB_binding_port(integer prt) := int2oct(prt, 2) & '0000'O;
+
template (value) RANAP_PDU
ts_RANAP_RabReleaseRequest(template (value) RAB_ID rab_id, template (value) Cause cause,
template (omit) RAB_ReleaseRequest.protocolExtensions exts := omit) := {
@@ -522,7 +544,7 @@ ts_RANAP_RabReleaseRequest(template (value) RAB_ID rab_id, template (value) Caus
}
}
template RANAP_PDU
-tr_RANAP_RabReleaseRequest(template RAB_ID rab_id, template Cause cause,
+tr_RANAP_RabReleaseRequest(template (present) RAB_ID rab_id, template Cause cause,
template RAB_ReleaseRequest.protocolExtensions exts := *) := {
initiatingMessage := {
procedureCode := id_RAB_ReleaseRequest,
@@ -641,7 +663,6 @@ tr_RANAP_IuReleaseComplete(template Iu_ReleaseComplete.protocolIEs ies := *,
template (value) RANAP_PDU
ts_RANAP_Paging(template (value) CN_DomainIndicator dom, template (value) IMSI imsi,
- template (omit) TemporaryUE_ID temp_id := omit,
template (omit) Paging.protocolExtensions exts := omit) := {
initiatingMessage := {
procedureCode := id_Paging,
@@ -701,6 +722,47 @@ tr_RANAP_Paging(template CN_DomainIndicator dom, template IMSI imsi,
}
}
+template (value) TemporaryUE_ID ts_RANAP_TemporaryUE_ID_TMSI(octetstring tmsi) := {
+ tMSI := tmsi
+}
+
+template (value) RANAP_PDU
+ts_RANAP_Paging_temp_id(template (value) CN_DomainIndicator dom, template (value) IMSI imsi,
+ template (value) TemporaryUE_ID temp_id,
+ template (omit) Paging.protocolExtensions exts := omit) := {
+ initiatingMessage := {
+ procedureCode := id_Paging,
+ criticality := ignore,
+ value_ := {
+ paging := {
+ protocolIEs := {
+ {
+ id := id_CN_DomainIndicator,
+ criticality := ignore,
+ value_ := {
+ cN_DomainIndicator := dom
+ }
+ }, {
+ id := id_PermanentNAS_UE_ID,
+ criticality := ignore,
+ value_ := {
+ permanentNAS_UE_ID := {
+ iMSI := imsi
+ }
+ }
+ }, {
+ id := id_TemporaryUE_ID,
+ criticality := ignore,
+ value_ := {
+ temporaryUE_ID := temp_id
+ }
+ }
+ },
+ protocolExtensions := exts
+ }
+ }
+ }
+}
/*****************************************************************************************************
@@ -1239,7 +1301,7 @@ template (value) RAB_SetupOrModifyList ts_RAB_SML(template (value) RAB_ID rab_id
}
}
} }
-template RAB_SetupOrModifyList tr_RAB_SML(template RAB_ID rab_id,
+template RAB_SetupOrModifyList tr_RAB_SML(template (present) RAB_ID rab_id,
template TransportLayerAddress tla,
template BindingID binding_id) := { {
{
@@ -1271,106 +1333,496 @@ template RAB_SetupOrModifyList tr_RAB_SML(template RAB_ID rab_id,
}
} }
+/* Like ts_RAB_SML(), but more control on presence/absence of individual IEs */
+template (value) RAB_SetupOrModifyList ts_RAB_SML2(
+ template (value) RAB_ID rab_id,
+ template (omit) RAB_Parameters rab_params,
+ template (omit) UserPlaneInformation user_plane_info,
+ template (omit) TransportLayerInformation transport_layer_info
+ ) := { {
+ {
+ id := id_RAB_SetupOrModifyItem,
+ firstCriticality := reject,
+ firstValue := {
+ rAB_SetupOrModifyItemFirst := {
+ rAB_ID := rab_id,
+ nAS_SynchronisationIndicator := omit,
+ rAB_Parameters := rab_params,
+ userPlaneInformation := user_plane_info,
+ transportLayerInformation := transport_layer_info,
+ service_Handover := omit,
+ iE_Extensions := omit
+ }
+ },
+ secondCriticality := ignore,
+ secondValue := {
+ rAB_SetupOrModifyItemSecond := {
+ pDP_TypeInformation := omit,
+ dataVolumeReportingIndication := omit,
+ dl_GTP_PDU_SequenceNumber := omit,
+ ul_GTP_PDU_SequenceNumber := omit,
+ dl_N_PDU_SequenceNumber := omit,
+ ul_N_PDU_SequenceNumber := omit,
+ iE_Extensions := omit
+ }
+ }
+ }
+} }
-template (value) RANAP_PDU
-ts_RANAP_RabAssReq(template (value) RAB_SetupOrModifyList rab_sml,
- template (omit) RAB_AssignmentRequest.protocolExtensions exts := omit) := {
- initiatingMessage := {
+template (value) TransportLayerInformation ts_TLI_ps(template (value) TransportLayerAddress tla,
+ template (value) GTP_TEI gtp_tei) := {
+ transportLayerAddress := tla,
+ iuTransportAssociation := {
+ gTP_TEI := gtp_tei
+ },
+ iE_Extensions := omit
+}
+template TransportLayerInformation tr_TLI_ps(template TransportLayerAddress tla,
+ template (value) GTP_TEI gtp_tei) := {
+ transportLayerAddress := tla,
+ iuTransportAssociation := {
+ gTP_TEI := gtp_tei
+ },
+ iE_Extensions := *
+}
+
+template (value) RAB_SetupOrModifyList ts_RAB_SML_ps(template (value) RAB_ID rab_id,
+ template (value) TransportLayerAddress tla,
+ template (value) GTP_TEI gtp_tei) := { {
+ {
+ id := id_RAB_SetupOrModifyItem,
+ firstCriticality := reject,
+ firstValue := {
+ rAB_SetupOrModifyItemFirst := {
+ rAB_ID := rab_id,
+ nAS_SynchronisationIndicator := omit,
+ rAB_Parameters := ts_RabParams,
+ userPlaneInformation := ts_UserPlaneInfo,
+ transportLayerInformation := ts_TLI_ps(tla, gtp_tei),
+ service_Handover := omit,
+ iE_Extensions := omit
+ }
+ },
+ secondCriticality := ignore,
+ secondValue := {
+ rAB_SetupOrModifyItemSecond := {
+ pDP_TypeInformation := omit,
+ dataVolumeReportingIndication := omit,
+ dl_GTP_PDU_SequenceNumber := omit,
+ ul_GTP_PDU_SequenceNumber := omit,
+ dl_N_PDU_SequenceNumber := omit,
+ ul_N_PDU_SequenceNumber := omit,
+ iE_Extensions := omit
+ }
+ }
+ }
+} }
+template RAB_SetupOrModifyList tr_RAB_SML_ps(template (present) RAB_ID rab_id,
+ template TransportLayerAddress tla,
+ template (value) GTP_TEI gtp_tei) := { {
+ {
+ id := id_RAB_SetupOrModifyItem,
+ firstCriticality := reject,
+ firstValue := {
+ rAB_SetupOrModifyItemFirst := {
+ rAB_ID := rab_id,
+ nAS_SynchronisationIndicator := *,
+ rAB_Parameters := ts_RabParams,
+ userPlaneInformation := ts_UserPlaneInfo,
+ transportLayerInformation := tr_TLI_ps(tla, gtp_tei),
+ service_Handover := *,
+ iE_Extensions := *
+ }
+ },
+ secondCriticality := ignore,
+ secondValue := {
+ rAB_SetupOrModifyItemSecond := {
+ pDP_TypeInformation := omit,
+ dataVolumeReportingIndication := omit,
+ dl_GTP_PDU_SequenceNumber := omit,
+ ul_GTP_PDU_SequenceNumber := omit,
+ dl_N_PDU_SequenceNumber := omit,
+ ul_N_PDU_SequenceNumber := omit,
+ iE_Extensions := omit
+ }
+ }
+ }
+} }
+
+template (value) RAB_SetupOrModifiedList ts_RAB_SMdL(template (value) RAB_ID rab_id,
+ template (value) TransportLayerAddress tla,
+ template (value) BindingID binding_id) := { {
+ {
+ id := id_RAB_SetupOrModifiedItem,
+ criticality := ignore,
+ value_ := {
+ rAB_SetupOrModifiedItem := {
+ rAB_ID := rab_id,
+ transportLayerAddress := tla,
+ iuTransportAssociation := {
+ bindingID := binding_id
+ },
+ dl_dataVolumes := omit,
+ iE_Extensions := omit
+ }
+ }
+ }
+} }
+
+template (value) RAB_SetupOrModifiedList ts_RAB_SMdL_no_tla(template (value) RAB_ID rab_id) := { {
+ {
+ id := id_RAB_SetupOrModifiedItem,
+ criticality := ignore,
+ value_ := {
+ rAB_SetupOrModifiedItem := {
+ rAB_ID := rab_id,
+ transportLayerAddress := omit,
+ iuTransportAssociation := omit,
+ dl_dataVolumes := omit,
+ iE_Extensions := omit
+ }
+ }
+ }
+} }
+
+template (value) RAB_SetupOrModifiedList ts_RAB_SMdL_ps(template (value) RAB_ID rab_id,
+ template (value) TransportLayerAddress tla,
+ template (value) GTP_TEI gtp_tei) := { {
+ {
+ id := id_RAB_SetupOrModifiedItem,
+ criticality := ignore,
+ value_ := {
+ rAB_SetupOrModifiedItem := {
+ rAB_ID := rab_id,
+ transportLayerAddress := tla,
+ iuTransportAssociation := {
+ gTP_TEI := gtp_tei
+ },
+ dl_dataVolumes := omit,
+ iE_Extensions := omit
+ }
+ }
+ }
+} }
+
+template RAB_SetupOrModifiedList tr_RAB_SMdL(template (present) RAB_ID rab_id,
+ template TransportLayerAddress tla,
+ template BindingID binding_id) := { {
+ {
+ id := id_RAB_SetupOrModifiedItem,
+ criticality := ignore,
+ value_ := {
+ rAB_SetupOrModifiedItem := {
+ rAB_ID := rab_id,
+ transportLayerAddress := tla,
+ iuTransportAssociation := {
+ bindingID := binding_id
+ },
+ dl_dataVolumes := *,
+ iE_Extensions := *
+ }
+ }
+ }
+} }
+
+template (value) RAB_FailedList ts_RAB_FL(template (value) RAB_ID rab_id,
+ template (value) Cause cause) := { {
+ {
+ id := id_RAB_FailedItem,
+ criticality := ignore,
+ value_ := {
+ rAB_FailedItem := {
+ rAB_ID := rab_id,
+ cause := cause,
+ iE_Extensions := omit
+ }
+ }
+ }
+} }
+
+template RAB_FailedList tr_RAB_FL(template RAB_ID rab_id,
+ template Cause cause) := { {
+ {
+ id := id_RAB_FailedItem,
+ criticality := ignore,
+ value_ := {
+ rAB_FailedItem := {
+ rAB_ID := rab_id,
+ cause := cause,
+ iE_Extensions := *
+ }
+ }
+ }
+} }
+
+template (value) RAB_ReleaseList ts_RAB_RL(template (value) RAB_ID rab_id,
+ template (value) Cause cause) := { {
+ {
+ id := id_RAB_ReleaseItem,
+ criticality := ignore,
+ value_ := {
+ rAB_ReleaseItem := {
+ rAB_ID := rab_id,
+ cause := cause,
+ iE_Extensions := omit
+ }
+ }
+ }
+} }
+
+template RAB_ReleaseList tr_RAB_RL(template (present) RAB_ID rab_id,
+ template Cause cause := ?) := { {
+ {
+ id := id_RAB_ReleaseItem,
+ criticality := ignore,
+ value_ := {
+ rAB_ReleaseItem := {
+ rAB_ID := rab_id,
+ cause := cause,
+ iE_Extensions := *
+ }
+ }
+ }
+} }
+
+
+function
+ts_RANAP_RabAssReq(template (omit) RAB_SetupOrModifyList rab_sml := omit,
+ template (omit) RAB_ReleaseList rab_rl := omit,
+ template (omit) RAB_AssignmentRequest.protocolExtensions exts := omit) return template RANAP_PDU {
+ var template RANAP_PDU ret;
+ var template RAB_AssignmentRequest.protocolIEs protocolIEs := {};
+ var integer ie_pos := 0;
+
+ var template RAB_AssignmentRequest.protocolIEs protocolIEs_rab_sml;
+ var template RAB_AssignmentRequest.protocolIEs protocolIEs_rab_rl;
+
+ /* RAB-SetupOrModifyList */
+ if (istemplatekind(rab_sml, "value")) {
+ protocolIEs_rab_sml := {
+ {
+ id := id_RAB_SetupOrModifyList,
+ criticality := ignore,
+ value_ := {
+ rAB_SetupOrModifyList := rab_sml
+ }
+ }
+ };
+ protocolIEs[ie_pos] := protocolIEs_rab_sml[0];
+ ie_pos := ie_pos + 1;
+ }
+
+ /* RAB-ReleaseList */
+ if (istemplatekind(rab_rl, "value")) {
+ protocolIEs_rab_rl := {
+ {
+ id := id_RAB_ReleaseList,
+ criticality := ignore,
+ value_ := {
+ rAB_ReleaseList := rab_rl
+ }
+ }
+ };
+ protocolIEs[ie_pos] := protocolIEs_rab_rl[0];
+ ie_pos := ie_pos + 1;
+ }
+
+
+ ret.initiatingMessage := {
procedureCode := id_RAB_Assignment,
criticality := reject,
value_ := {
rAB_AssignmentRequest := {
- protocolIEs := {
- {
- id := id_RAB_SetupOrModifyList,
- criticality := reject,
- value_ := {
- rAB_SetupOrModifyList := rab_sml
- }
- }
- },
+ protocolIEs := protocolIEs,
protocolExtensions := exts
}
}
}
+
+ return ret;
}
-template RANAP_PDU
-tr_RANAP_RabAssReq(template RAB_SetupOrModifyList rab_sml,
- template RAB_AssignmentRequest.protocolExtensions exts := *) := {
- initiatingMessage := {
+
+function
+tr_RANAP_RabAssReq(template RAB_SetupOrModifyList rab_sml := omit,
+ template RAB_ReleaseList rab_rl := omit,
+ template RAB_AssignmentRequest.protocolExtensions exts := *) return template RANAP_PDU {
+ var template RANAP_PDU ret;
+ var template RAB_AssignmentRequest.protocolIEs protocolIEs := {};
+ var integer ie_pos := 0;
+
+ var template RAB_AssignmentRequest.protocolIEs protocolIEs_rab_sml;
+ var template RAB_AssignmentRequest.protocolIEs protocolIEs_rab_rl;
+
+ /* RAB-SetupOrModifyList */
+ if (not istemplatekind(rab_sml, "omit")) {
+ protocolIEs_rab_sml := {
+ {
+ id := id_RAB_SetupOrModifyList,
+ criticality := ignore,
+ value_ := {
+ rAB_SetupOrModifyList := rab_sml
+ }
+ }
+ };
+ protocolIEs[ie_pos] := protocolIEs_rab_sml[0];
+ ie_pos := ie_pos + 1;
+ }
+
+ /* RAB-ReleaseList */
+ if (not istemplatekind(rab_rl, "omit")) {
+ protocolIEs_rab_rl := {
+ {
+ id := id_RAB_ReleaseList,
+ criticality := ignore,
+ value_ := {
+ rAB_ReleaseList := rab_rl
+ }
+ }
+ };
+ protocolIEs[ie_pos] := protocolIEs_rab_rl[0];
+ ie_pos := ie_pos + 1;
+ }
+
+
+ ret.initiatingMessage := {
procedureCode := id_RAB_Assignment,
criticality := reject,
value_ := {
rAB_AssignmentRequest := {
- protocolIEs := {
- {
- id := id_RAB_SetupOrModifyList,
- criticality := ignore,
- value_ := {
- rAB_SetupOrModifyList := rab_sml
- }
- }
- },
+ protocolIEs := protocolIEs,
protocolExtensions := exts
}
}
}
+
+ return ret;
}
+function
+ts_RANAP_RabAssResp(template (omit) RAB_SetupOrModifiedList rab_sml := omit,
+ template (omit) RAB_FailedList rab_fl := omit,
+ template (omit) RAB_AssignmentResponse.protocolExtensions exts := omit) return template RANAP_PDU {
+ var template RANAP_PDU ret;
+ var template RAB_AssignmentResponse.protocolIEs protocolIEs := {};
+ var integer ie_pos := 0;
-template (value) RANAP_PDU
-ts_RANAP_RabAssResp(template (value) RAB_SetupOrModifiedList rab_sml,
- template (omit) RAB_AssignmentResponse.protocolExtensions exts := omit) := {
- outcome := {
+ var template RAB_AssignmentResponse.protocolIEs protocolIEs_rab_sml;
+ var template RAB_AssignmentResponse.protocolIEs protocolIEs_rab_fl;
+
+ /* RAB-SetupOrModifiedList */
+ if (istemplatekind(rab_sml, "value")) {
+ protocolIEs_rab_sml := {
+ {
+ id := id_RAB_SetupOrModifiedList,
+ criticality := ignore,
+ value_ := {
+ rAB_SetupOrModifiedList := rab_sml
+ }
+ }
+ }
+
+ protocolIEs[ie_pos] := protocolIEs_rab_sml[0];
+ ie_pos := ie_pos + 1;
+ }
+
+ /* TODO: RAB-ReleasedList */
+ /* TODO: RAB-QueuedList */
+
+ /* RAB-FailedList */
+ if (istemplatekind(rab_fl, "value")) {
+ protocolIEs_rab_fl := {
+ {
+ id := id_RAB_FailedList,
+ criticality := ignore,
+ value_ := {
+ rAB_FailedList := rab_fl
+ }
+ }
+ }
+
+ protocolIEs[ie_pos] := protocolIEs_rab_fl[0];
+ ie_pos := ie_pos + 1;
+ }
+
+ /* TODO: RAB-ReleaseFailedList */
+
+ ret.outcome := {
procedureCode := id_RAB_Assignment,
criticality := reject,
value_ := {
rAB_AssignmentResponse := {
- protocolIEs := {
- {
- id := id_RAB_SetupOrModifiedList,
- criticality := ignore,
- value_ := {
- rAB_SetupOrModifiedList := rab_sml
- }
- }
- /* RAB-ReleasedList */
- /* RAB-QueuedList */
- /* RAB-FailedList */
- /* RAB-ReleaseFailedList */
- },
+ protocolIEs := protocolIEs,
protocolExtensions := exts
}
}
}
+
+ return ret;
}
-template RANAP_PDU
-tr_RANAP_RabAssResp(template RAB_SetupOrModifiedList rab_sml,
- template RAB_AssignmentResponse.protocolExtensions exts := *) := {
- outcome := {
+
+function
+tr_RANAP_RabAssResp(template RAB_SetupOrModifiedList rab_sml := omit,
+ template RAB_FailedList rab_fl := omit,
+ template RAB_AssignmentResponse.protocolExtensions exts := *) return template RANAP_PDU {
+ var template RANAP_PDU ret;
+ var template RAB_AssignmentResponse.protocolIEs protocolIEs := {};
+ var integer ie_pos := 0;
+
+ var template RAB_AssignmentResponse.protocolIEs protocolIEs_rab_sml;
+ var template RAB_AssignmentResponse.protocolIEs protocolIEs_rab_fl;
+
+ /* RAB-SetupOrModifiedList */
+ if (not istemplatekind(rab_sml, "omit")) {
+ protocolIEs_rab_sml := {
+ {
+ id := id_RAB_SetupOrModifiedList,
+ criticality := ignore,
+ value_ := {
+ rAB_SetupOrModifiedList := rab_sml
+ }
+ }
+ }
+
+ protocolIEs[ie_pos] := protocolIEs_rab_sml[0];
+ ie_pos := ie_pos + 1;
+ }
+
+ /* TODO: RAB-ReleasedList */
+ /* TODO: RAB-QueuedList */
+
+ /* RAB-FailedList */
+ if (not istemplatekind(rab_fl, "omit")) {
+ protocolIEs_rab_fl := {
+ {
+ id := id_RAB_FailedList,
+ criticality := ignore,
+ value_ := {
+ rAB_FailedList := rab_fl
+ }
+ }
+ }
+
+ protocolIEs[ie_pos] := protocolIEs_rab_fl[0];
+ ie_pos := ie_pos + 1;
+ }
+
+ /* TODO: RAB-ReleaseFailedList */
+
+ protocolIEs[ie_pos] := *;
+
+ ret.outcome := {
procedureCode := id_RAB_Assignment,
criticality := reject,
value_ := {
rAB_AssignmentResponse := {
- protocolIEs := {
- {
- id := id_RAB_SetupOrModifiedList,
- criticality := ignore,
- value_ := {
- rAB_SetupOrModifiedList := rab_sml
- }
- }, *
- /* RAB-ReleasedList */
- /* RAB-QueuedList */
- /* RAB-FailedList */
- /* RAB-ReleaseFailedList */
- },
+ protocolIEs := protocolIEs,
protocolExtensions := exts
}
}
}
-}
+ return ret;
+}
/*****************************************************************************************************
*