From 6765c6b9590a46159e1fcde0a282b027e32d571f Mon Sep 17 00:00:00 2001 From: rennoch Date: Mon, 20 Mar 2017 16:15:34 +0000 Subject: [PATCH] new IEs: UESecurityCapabilities and securityKey --- ttcn3/LibS1AP/LibS1AP_Templates.ttcn | 66 ++++++++++++++++++++++++---- ttcn3/S1AP_TCFunctions.ttcn | 4 +- 2 files changed, 61 insertions(+), 9 deletions(-) diff --git a/ttcn3/LibS1AP/LibS1AP_Templates.ttcn b/ttcn3/LibS1AP/LibS1AP_Templates.ttcn index 816a1dc..6859175 100644 --- a/ttcn3/LibS1AP/LibS1AP_Templates.ttcn +++ b/ttcn3/LibS1AP/LibS1AP_Templates.ttcn @@ -119,12 +119,16 @@ module LibS1AP_Templates { in template (value) MME_UE_S1AP_ID p_MME_value, in template (value) ENB_UE_S1AP_ID p_eNB_value, in template (value) UEAggregateMaximumBitrate p_uEAggregateMaximumBitrate, - in template (value) RecordOf_E_RABToBeSetupItemBearerSUReq p_RecordOf_E_RABToBeSetupItem_value + in template (value) RecordOf_E_RABToBeSetupItemBearerSUReq p_RecordOf_E_RABToBeSetupItem_value, + in template (value) UESecurityCapabilities p_uESecurityCapabilities, + in template (value) SecurityKey p_SecurityKey ) := { m_MME_UE_S1AP_ID(p_MME_value), m_eNB_UE_S1AP_ID(p_eNB_value), m_UE_aggregate_maximum_bitrate_IE(p_uEAggregateMaximumBitrate), - m_E_RABToBeSetupList(p_RecordOf_E_RABToBeSetupItem_value) + m_E_RABToBeSetupList(p_RecordOf_E_RABToBeSetupItem_value), + m_UE_securityCapabilities_IE(p_uESecurityCapabilities), + m_securityKey_IE(p_SecurityKey) } // End of template m_InitialContextSetupReqIEs }// End of group Context_management_group @@ -1879,8 +1883,8 @@ module LibS1AP_Templates { /** * @desc Send template for UE aggregate maxmum bitrate IE - * @param p_cause UEAggregateMaximumBitrate value - * @see ETSI TS 136 413 V13.4.0 Clause 9.2.1.3 Cause + * @param p_value UEAggregateMaximumBitrate value + * @see ETSI TS 136 413 V13.4.0 Clause 9.2.1.20 UEAggregateMaximumBitrate */ template (value) ProtocolIE m_UE_aggregate_maximum_bitrate_IE( in template (value) UEAggregateMaximumBitrate p_value, @@ -1890,6 +1894,34 @@ module LibS1AP_Templates { criticality := p_criticality, value_ := {UEAggregateMaximumBitrate := valueof(p_value)} } // End of template m_UE_aggregate_maximum_bitrate_IE + + /** + * @desc Send template for UE security Capabilities IE + * @param p_value UESecurityCapabilities value + * @see ETSI TS 136 413 V13.4.0 Clause 9.2.1.40 UESecurityCapabilities + */ + template (value) ProtocolIE m_UE_securityCapabilities_IE( + in template (value) UESecurityCapabilities p_value, + in template (value) ProtocolIE.criticality p_criticality := reject + ) := { + id := S1AP_Constants.id_UESecurityCapabilities, + criticality := p_criticality, + value_ := {UESecurityCapabilities := valueof(p_value)} + } // End of template m_UE_securityCapabilities_IE + + /** + * @desc Send template for security key IE + * @param p_value UESecurityCapabilities value + * @see ETSI TS 136 413 V13.4.0 Clause 9.2.1.41 Security Key + */ + template (value) ProtocolIE m_securityKey_IE( + in template (value) SecurityKey p_value, + in template (value) ProtocolIE.criticality p_criticality := reject + ) := { + id := S1AP_Constants.id_SecurityKey, + criticality := p_criticality, + value_ := {SecurityKey := valueof(p_value)} + } // End of template m_securityKey_IE group E_RAB_IEsend { @@ -2744,13 +2776,16 @@ module LibS1AP_Templates { */ template(value) E_RABToBeSetupItemBearerSUReq m_E_RABToBeSetupItemBearerSUReq( in E_RAB_ID p_e_RAB_ID := 0, - in template (value) E_RABLevelQoSParameters p_e_RABlevelQoSParameters := m_e_RABlevelQoSParameters + in template (value) E_RABLevelQoSParameters p_e_RABlevelQoSParameters := m_e_RABlevelQoSParameters, + in template (value) TransportLayerAddress p_transportLayerAddress := '0'B, + in template (value) GTP_TEID p_gTP_TEID := '00000000'O, + in template (value) NAS_PDU p_nAS_PDU := '0000'O ) := { e_RAB_ID := p_e_RAB_ID, e_RABlevelQoSParameters := valueof(p_e_RABlevelQoSParameters), - transportLayerAddress := '0'B, - gTP_TEID := '00000000'O, - nAS_PDU := '0000'O, + transportLayerAddress := p_transportLayerAddress, + gTP_TEID := p_gTP_TEID, + nAS_PDU := p_nAS_PDU, iE_Extensions := omit } // End of template m_E_RABToBeSetupItemBearerSUReq @@ -2805,7 +2840,22 @@ module LibS1AP_Templates { iE_Extensions := omit } + /** + * @desc + */ + template(value) UESecurityCapabilities m_UESecurityCapabilities + (EncryptionAlgorithms p_encryptionAlgorithms, + IntegrityProtectionAlgorithms p_integrityProtectionAlgorithms) := { + encryptionAlgorithms := p_encryptionAlgorithms, + integrityProtectionAlgorithms := + p_integrityProtectionAlgorithms, + iE_Extensions := omit + } + /** + * @desc + */ + template(value) SecurityKey m_securityKey := oct2bit('012345678901234567890123456789AB'O); // 32 octets = 256 bits group Management_group { diff --git a/ttcn3/S1AP_TCFunctions.ttcn b/ttcn3/S1AP_TCFunctions.ttcn index 1d70ffc..c13205a 100644 --- a/ttcn3/S1AP_TCFunctions.ttcn +++ b/ttcn3/S1AP_TCFunctions.ttcn @@ -236,7 +236,9 @@ module S1AP_TCFunctions { -, m_e_RABlevelQoSParameters (5) - )} + )}, + m_UESecurityCapabilities('0101010101010101'B,'0101010101010101'B), + m_securityKey )); f_recv_E_RABSetupResponse(mw_E_RABSetupResIEs(