|
|
|
@@ -96,12 +96,12 @@ static bool e1_decode_security_info(security_information_t *out, const E1AP_Secu
|
|
|
|
|
|
|
|
|
|
// User Plane Security Keys (M) (9.3.1.32)
|
|
|
|
|
// Encryption Key (M)
|
|
|
|
|
_E1_EQ_CHECK_INT((int)in->uPSecuritykey.encryptionKey.size, E1AP_SECURITY_KEY_SIZE);
|
|
|
|
|
_EQ_CHECK_INT((int)in->uPSecuritykey.encryptionKey.size, E1AP_SECURITY_KEY_SIZE);
|
|
|
|
|
memcpy(out->encryptionKey, in->uPSecuritykey.encryptionKey.buf, in->uPSecuritykey.encryptionKey.size);
|
|
|
|
|
// Integrity Protection Key (O)
|
|
|
|
|
if (in->uPSecuritykey.integrityProtectionKey) {
|
|
|
|
|
E1AP_IntegrityProtectionKey_t *ipKey = in->uPSecuritykey.integrityProtectionKey;
|
|
|
|
|
_E1_EQ_CHECK_INT((int)ipKey->size, E1AP_SECURITY_KEY_SIZE);
|
|
|
|
|
_EQ_CHECK_INT((int)ipKey->size, E1AP_SECURITY_KEY_SIZE);
|
|
|
|
|
memcpy(out->integrityProtectionKey, ipKey->buf, E1AP_SECURITY_KEY_SIZE);
|
|
|
|
|
} else {
|
|
|
|
|
memset(out->integrityProtectionKey, 0, E1AP_SECURITY_KEY_SIZE);
|
|
|
|
@@ -132,7 +132,7 @@ static bool e1_decode_up_tnl_info(UP_TL_information_t *out, const E1AP_UP_TNL_In
|
|
|
|
|
// GTP Tunnel
|
|
|
|
|
struct E1AP_GTPTunnel *gTPTunnel = in->choice.gTPTunnel;
|
|
|
|
|
AssertFatal(gTPTunnel != NULL, "item->nG_UL_UP_TNL_Information.choice.gTPTunnel is a mandatory IE");
|
|
|
|
|
_E1_EQ_CHECK_INT(in->present, E1AP_UP_TNL_Information_PR_gTPTunnel);
|
|
|
|
|
_EQ_CHECK_INT(in->present, E1AP_UP_TNL_Information_PR_gTPTunnel);
|
|
|
|
|
BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4(&gTPTunnel->transportLayerAddress, out->tlAddress);
|
|
|
|
|
// GTP-TEID
|
|
|
|
|
OCTET_STRING_TO_INT32(&gTPTunnel->gTP_TEID, out->teId);
|
|
|
|
@@ -178,12 +178,12 @@ static bool e1_decode_pdcp_config(bearer_context_pdcp_config_t *out, const E1AP_
|
|
|
|
|
*/
|
|
|
|
|
static bool eq_pdcp_config(const bearer_context_pdcp_config_t *a, const bearer_context_pdcp_config_t *b)
|
|
|
|
|
{
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->pDCP_SN_Size_UL, b->pDCP_SN_Size_UL);
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->pDCP_SN_Size_DL, b->pDCP_SN_Size_DL);
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->rLC_Mode, b->rLC_Mode);
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->reorderingTimer, b->reorderingTimer);
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->discardTimer, b->discardTimer);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->pDCP_Reestablishment, b->pDCP_Reestablishment);
|
|
|
|
|
_EQ_CHECK_LONG(a->pDCP_SN_Size_UL, b->pDCP_SN_Size_UL);
|
|
|
|
|
_EQ_CHECK_LONG(a->pDCP_SN_Size_DL, b->pDCP_SN_Size_DL);
|
|
|
|
|
_EQ_CHECK_LONG(a->rLC_Mode, b->rLC_Mode);
|
|
|
|
|
_EQ_CHECK_LONG(a->reorderingTimer, b->reorderingTimer);
|
|
|
|
|
_EQ_CHECK_LONG(a->discardTimer, b->discardTimer);
|
|
|
|
|
_EQ_CHECK_INT(a->pDCP_Reestablishment, b->pDCP_Reestablishment);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -211,9 +211,9 @@ static bool e1_decode_sdap_config(bearer_context_sdap_config_t *out, const E1AP_
|
|
|
|
|
*/
|
|
|
|
|
static bool eq_sdap_config(const bearer_context_sdap_config_t *a, const bearer_context_sdap_config_t *b)
|
|
|
|
|
{
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->defaultDRB, b->defaultDRB);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->sDAP_Header_UL, b->sDAP_Header_UL);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->sDAP_Header_DL, b->sDAP_Header_DL);
|
|
|
|
|
_EQ_CHECK_LONG(a->defaultDRB, b->defaultDRB);
|
|
|
|
|
_EQ_CHECK_INT(a->sDAP_Header_UL, b->sDAP_Header_UL);
|
|
|
|
|
_EQ_CHECK_INT(a->sDAP_Header_DL, b->sDAP_Header_DL);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -285,22 +285,22 @@ bool e1_decode_qos_flow_to_setup(qos_flow_to_setup_t *out, const E1AP_QoS_Flow_Q
|
|
|
|
|
*/
|
|
|
|
|
static bool eq_qos_flow(const qos_flow_to_setup_t *a, const qos_flow_to_setup_t *b)
|
|
|
|
|
{
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->qfi, b->qfi);
|
|
|
|
|
_EQ_CHECK_LONG(a->qfi, b->qfi);
|
|
|
|
|
const ngran_allocation_retention_priority_t *arp_a = &a->qos_params.alloc_reten_priority;
|
|
|
|
|
const ngran_allocation_retention_priority_t *arp_b = &b->qos_params.alloc_reten_priority;
|
|
|
|
|
_E1_EQ_CHECK_INT(arp_a->preemption_capability, arp_b->preemption_capability);
|
|
|
|
|
_E1_EQ_CHECK_INT(arp_a->preemption_vulnerability, arp_b->preemption_vulnerability);
|
|
|
|
|
_E1_EQ_CHECK_INT(arp_a->priority_level, arp_b->priority_level);
|
|
|
|
|
_EQ_CHECK_INT(arp_a->preemption_capability, arp_b->preemption_capability);
|
|
|
|
|
_EQ_CHECK_INT(arp_a->preemption_vulnerability, arp_b->preemption_vulnerability);
|
|
|
|
|
_EQ_CHECK_INT(arp_a->priority_level, arp_b->priority_level);
|
|
|
|
|
const qos_characteristics_t *qos_a = &a->qos_params.qos_characteristics;
|
|
|
|
|
const qos_characteristics_t *qos_b = &b->qos_params.qos_characteristics;
|
|
|
|
|
_E1_EQ_CHECK_INT(qos_a->qos_type, qos_b->qos_type);
|
|
|
|
|
_E1_EQ_CHECK_INT(qos_a->dynamic.fiveqi, qos_b->dynamic.fiveqi);
|
|
|
|
|
_E1_EQ_CHECK_INT(qos_a->dynamic.packet_delay_budget, qos_b->dynamic.packet_delay_budget);
|
|
|
|
|
_E1_EQ_CHECK_INT(qos_a->dynamic.packet_error_rate.per_exponent, qos_b->dynamic.packet_error_rate.per_exponent);
|
|
|
|
|
_E1_EQ_CHECK_INT(qos_a->dynamic.packet_error_rate.per_scalar, qos_b->dynamic.packet_error_rate.per_scalar);
|
|
|
|
|
_E1_EQ_CHECK_INT(qos_a->dynamic.qos_priority_level, qos_b->dynamic.qos_priority_level);
|
|
|
|
|
_E1_EQ_CHECK_INT(qos_a->non_dynamic.fiveqi, qos_b->non_dynamic.fiveqi);
|
|
|
|
|
_E1_EQ_CHECK_INT(qos_a->non_dynamic.qos_priority_level, qos_b->non_dynamic.qos_priority_level);
|
|
|
|
|
_EQ_CHECK_INT(qos_a->qos_type, qos_b->qos_type);
|
|
|
|
|
_EQ_CHECK_INT(qos_a->dynamic.fiveqi, qos_b->dynamic.fiveqi);
|
|
|
|
|
_EQ_CHECK_INT(qos_a->dynamic.packet_delay_budget, qos_b->dynamic.packet_delay_budget);
|
|
|
|
|
_EQ_CHECK_INT(qos_a->dynamic.packet_error_rate.per_exponent, qos_b->dynamic.packet_error_rate.per_exponent);
|
|
|
|
|
_EQ_CHECK_INT(qos_a->dynamic.packet_error_rate.per_scalar, qos_b->dynamic.packet_error_rate.per_scalar);
|
|
|
|
|
_EQ_CHECK_INT(qos_a->dynamic.qos_priority_level, qos_b->dynamic.qos_priority_level);
|
|
|
|
|
_EQ_CHECK_INT(qos_a->non_dynamic.fiveqi, qos_b->non_dynamic.fiveqi);
|
|
|
|
|
_EQ_CHECK_INT(qos_a->non_dynamic.qos_priority_level, qos_b->non_dynamic.qos_priority_level);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -386,10 +386,10 @@ static e1_pdcp_status_info_t decode_pdcp_status_info(const E1AP_PDCP_SN_Status_I
|
|
|
|
|
|
|
|
|
|
static bool eq_pdcp_info(const e1_pdcp_status_info_t *a, const e1_pdcp_status_info_t *b)
|
|
|
|
|
{
|
|
|
|
|
_E1_EQ_CHECK_INT(a->dl_count.hfn, b->dl_count.hfn);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->dl_count.sn, b->dl_count.sn);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->ul_count.hfn, b->ul_count.hfn);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->ul_count.sn, b->ul_count.sn);
|
|
|
|
|
_EQ_CHECK_INT(a->dl_count.hfn, b->dl_count.hfn);
|
|
|
|
|
_EQ_CHECK_INT(a->dl_count.sn, b->dl_count.sn);
|
|
|
|
|
_EQ_CHECK_INT(a->ul_count.hfn, b->ul_count.hfn);
|
|
|
|
|
_EQ_CHECK_INT(a->ul_count.sn, b->ul_count.sn);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -398,12 +398,12 @@ static bool eq_pdcp_info(const e1_pdcp_status_info_t *a, const e1_pdcp_status_in
|
|
|
|
|
*/
|
|
|
|
|
static bool eq_drb_to_setup(const DRB_nGRAN_to_setup_t *a, const DRB_nGRAN_to_setup_t *b)
|
|
|
|
|
{
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->id, b->id);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->numCellGroups, b->numCellGroups);
|
|
|
|
|
_EQ_CHECK_LONG(a->id, b->id);
|
|
|
|
|
_EQ_CHECK_INT(a->numCellGroups, b->numCellGroups);
|
|
|
|
|
for (int i = 0; i < a->numCellGroups; i++) {
|
|
|
|
|
_E1_EQ_CHECK_INT(a->cellGroupList[i], b->cellGroupList[i]);
|
|
|
|
|
_EQ_CHECK_INT(a->cellGroupList[i], b->cellGroupList[i]);
|
|
|
|
|
}
|
|
|
|
|
_E1_EQ_CHECK_INT(a->numQosFlow2Setup, b->numQosFlow2Setup);
|
|
|
|
|
_EQ_CHECK_INT(a->numQosFlow2Setup, b->numQosFlow2Setup);
|
|
|
|
|
for (int i = 0; i < a->numQosFlow2Setup; i++) {
|
|
|
|
|
if (!eq_qos_flow(&a->qosFlows[i], &b->qosFlows[i]))
|
|
|
|
|
return false;
|
|
|
|
@@ -474,13 +474,13 @@ static bool e1_decode_pdu_session_to_setup_item(pdu_session_to_setup_t *out, E1A
|
|
|
|
|
PRINT_ERROR("Missing mandatory IE item->nG_UL_UP_TNL_Information.choice.gTPTunnel\n");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
_E1_EQ_CHECK_INT(item->nG_UL_UP_TNL_Information.present, E1AP_UP_TNL_Information_PR_gTPTunnel);
|
|
|
|
|
_EQ_CHECK_INT(item->nG_UL_UP_TNL_Information.present, E1AP_UP_TNL_Information_PR_gTPTunnel);
|
|
|
|
|
CHECK_E1AP_DEC(e1_decode_up_tnl_info(&out->UP_TL_information, &item->nG_UL_UP_TNL_Information));
|
|
|
|
|
/* DRB To Setup List ( > 1 item ) */
|
|
|
|
|
E1AP_DRB_To_Setup_List_NG_RAN_t *drb2SetupList = &item->dRB_To_Setup_List_NG_RAN;
|
|
|
|
|
_E1_EQ_CHECK_GENERIC(drb2SetupList->list.count > 0, "%d", drb2SetupList->list.count, 0);
|
|
|
|
|
EQ_CHECK_GENERIC(drb2SetupList->list.count > 0, "%d", drb2SetupList->list.count, 0);
|
|
|
|
|
out->numDRB2Setup = drb2SetupList->list.count;
|
|
|
|
|
_E1_EQ_CHECK_INT(out->numDRB2Setup, 1); // can only handle one DRB per PDU session
|
|
|
|
|
_EQ_CHECK_INT(out->numDRB2Setup, 1); // can only handle one DRB per PDU session
|
|
|
|
|
for (int j = 0; j < drb2SetupList->list.count; j++) {
|
|
|
|
|
DRB_nGRAN_to_setup_t *drb = out->DRBnGRanList + j;
|
|
|
|
|
E1AP_DRB_To_Setup_Item_NG_RAN_t *drb2Setup = drb2SetupList->list.array[j];
|
|
|
|
@@ -492,7 +492,7 @@ static bool e1_decode_pdu_session_to_setup_item(pdu_session_to_setup_t *out, E1A
|
|
|
|
|
CHECK_E1AP_DEC(e1_decode_pdcp_config(&drb->pdcp_config, &drb2Setup->pDCP_Configuration));
|
|
|
|
|
// Cell Group Information (M)
|
|
|
|
|
E1AP_Cell_Group_Information_t *cellGroupList = &drb2Setup->cell_Group_Information;
|
|
|
|
|
_E1_EQ_CHECK_GENERIC(cellGroupList->list.count > 0, "%d", cellGroupList->list.count, 0);
|
|
|
|
|
EQ_CHECK_GENERIC(cellGroupList->list.count > 0, "%d", cellGroupList->list.count, 0);
|
|
|
|
|
drb->numCellGroups = cellGroupList->list.count;
|
|
|
|
|
for (int k = 0; k < cellGroupList->list.count; k++) {
|
|
|
|
|
E1AP_Cell_Group_Information_Item_t *cg2Setup = cellGroupList->list.array[k];
|
|
|
|
@@ -542,8 +542,8 @@ void free_pdu_session_to_setup_item(const pdu_session_to_setup_t *msg)
|
|
|
|
|
/** @brief Equality check for UP Transport Layer Information (3GPP TS 38.463 9.3.2.1)*/
|
|
|
|
|
static bool eq_up_tl_info(const UP_TL_information_t *a, const UP_TL_information_t *b)
|
|
|
|
|
{
|
|
|
|
|
_E1_EQ_CHECK_INT(a->tlAddress, b->tlAddress);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->teId, b->teId);
|
|
|
|
|
_EQ_CHECK_INT(a->tlAddress, b->tlAddress);
|
|
|
|
|
_EQ_CHECK_INT(a->teId, b->teId);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -552,17 +552,17 @@ static bool eq_up_tl_info(const UP_TL_information_t *a, const UP_TL_information_
|
|
|
|
|
*/
|
|
|
|
|
static bool eq_pdu_session_item(const pdu_session_to_setup_t *a, const pdu_session_to_setup_t *b)
|
|
|
|
|
{
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->sessionId, b->sessionId);
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->sessionType, b->sessionType);
|
|
|
|
|
_EQ_CHECK_LONG(a->sessionId, b->sessionId);
|
|
|
|
|
_EQ_CHECK_LONG(a->sessionType, b->sessionType);
|
|
|
|
|
eq_up_tl_info(&a->UP_TL_information, &b->UP_TL_information);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->numDRB2Setup, b->numDRB2Setup);
|
|
|
|
|
_EQ_CHECK_INT(a->numDRB2Setup, b->numDRB2Setup);
|
|
|
|
|
for (int i = 0; i < a->numDRB2Setup; i++)
|
|
|
|
|
if (!eq_drb_to_setup(&a->DRBnGRanList[i], &b->DRBnGRanList[i]))
|
|
|
|
|
return false;
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_PTR(a, b, inactivityTimer);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_PTR(a, b, inactivityTimer);
|
|
|
|
|
if (a->inactivityTimer && b->inactivityTimer)
|
|
|
|
|
_E1_EQ_CHECK_INT(*a->inactivityTimer, *b->inactivityTimer);
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_IE(a, b, dlAggregateMaxBitRate, _E1_EQ_CHECK_LONG);
|
|
|
|
|
_EQ_CHECK_INT(*a->inactivityTimer, *b->inactivityTimer);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_IE(a, b, dlAggregateMaxBitRate, _EQ_CHECK_LONG);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -660,9 +660,9 @@ bool decode_E1_bearer_context_setup_request(const E1AP_E1AP_PDU_t *pdu, e1ap_bea
|
|
|
|
|
DevAssert(pdu != NULL);
|
|
|
|
|
|
|
|
|
|
// Check message type
|
|
|
|
|
_E1_EQ_CHECK_INT(pdu->present,E1AP_E1AP_PDU_PR_initiatingMessage);
|
|
|
|
|
_E1_EQ_CHECK_LONG(pdu->choice.initiatingMessage->procedureCode, E1AP_ProcedureCode_id_bearerContextSetup);
|
|
|
|
|
_E1_EQ_CHECK_INT(pdu->choice.initiatingMessage->value.present, E1AP_InitiatingMessage__value_PR_BearerContextSetupRequest);
|
|
|
|
|
_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_initiatingMessage);
|
|
|
|
|
_EQ_CHECK_LONG(pdu->choice.initiatingMessage->procedureCode, E1AP_ProcedureCode_id_bearerContextSetup);
|
|
|
|
|
_EQ_CHECK_INT(pdu->choice.initiatingMessage->value.present, E1AP_InitiatingMessage__value_PR_BearerContextSetupRequest);
|
|
|
|
|
|
|
|
|
|
const E1AP_BearerContextSetupRequest_t *in = &pdu->choice.initiatingMessage->value.choice.BearerContextSetupRequest;
|
|
|
|
|
E1AP_BearerContextSetupRequestIEs_t *ie;
|
|
|
|
@@ -681,22 +681,22 @@ bool decode_E1_bearer_context_setup_request(const E1AP_E1AP_PDU_t *pdu, e1ap_bea
|
|
|
|
|
AssertFatal(ie != NULL, "in->protocolIEs.list.array[i] shall not be null");
|
|
|
|
|
switch (ie->id) {
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID:
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupRequestIEs__value_PR_GNB_CU_CP_UE_E1AP_ID);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupRequestIEs__value_PR_GNB_CU_CP_UE_E1AP_ID);
|
|
|
|
|
out->gNB_cu_cp_ue_id = ie->value.choice.GNB_CU_CP_UE_E1AP_ID;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_SecurityInformation:
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupRequestIEs__value_PR_SecurityInformation);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupRequestIEs__value_PR_SecurityInformation);
|
|
|
|
|
CHECK_E1AP_DEC(e1_decode_security_info(&out->secInfo, &ie->value.choice.SecurityInformation));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_UEDLAggregateMaximumBitRate:
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupRequestIEs__value_PR_BitRate);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupRequestIEs__value_PR_BitRate);
|
|
|
|
|
asn_INTEGER2long(&ie->value.choice.BitRate, &out->ueDlAggMaxBitRate);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_Serving_PLMN:
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupRequestIEs__value_PR_PLMN_Identity);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupRequestIEs__value_PR_PLMN_Identity);
|
|
|
|
|
PLMNID_TO_MCC_MNC(&ie->value.choice.PLMN_Identity,
|
|
|
|
|
out->servingPLMNid.mcc,
|
|
|
|
|
out->servingPLMNid.mnc,
|
|
|
|
@@ -704,7 +704,7 @@ bool decode_E1_bearer_context_setup_request(const E1AP_E1AP_PDU_t *pdu, e1ap_bea
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_System_BearerContextSetupRequest:
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupRequestIEs__value_PR_System_BearerContextSetupRequest);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupRequestIEs__value_PR_System_BearerContextSetupRequest);
|
|
|
|
|
E1AP_System_BearerContextSetupRequest_t *System_BearerContextSetupRequest =
|
|
|
|
|
&ie->value.choice.System_BearerContextSetupRequest;
|
|
|
|
|
switch (System_BearerContextSetupRequest->present) {
|
|
|
|
@@ -717,8 +717,8 @@ bool decode_E1_bearer_context_setup_request(const E1AP_E1AP_PDU_t *pdu, e1ap_bea
|
|
|
|
|
break;
|
|
|
|
|
case E1AP_System_BearerContextSetupRequest_PR_nG_RAN_BearerContextSetupRequest:
|
|
|
|
|
// Handle nG-RAN Bearer Context Setup Request
|
|
|
|
|
_E1_EQ_CHECK_INT(System_BearerContextSetupRequest->present,
|
|
|
|
|
E1AP_System_BearerContextSetupRequest_PR_nG_RAN_BearerContextSetupRequest);
|
|
|
|
|
_EQ_CHECK_INT(System_BearerContextSetupRequest->present,
|
|
|
|
|
E1AP_System_BearerContextSetupRequest_PR_nG_RAN_BearerContextSetupRequest);
|
|
|
|
|
AssertFatal(System_BearerContextSetupRequest->choice.nG_RAN_BearerContextSetupRequest != NULL,
|
|
|
|
|
"System_BearerContextSetupRequest->choice.nG_RAN_BearerContextSetupRequest shall not be null");
|
|
|
|
|
break;
|
|
|
|
@@ -731,10 +731,9 @@ bool decode_E1_bearer_context_setup_request(const E1AP_E1AP_PDU_t *pdu, e1ap_bea
|
|
|
|
|
(E1AP_ProtocolIE_Container_4932P19_t *)System_BearerContextSetupRequest->choice.nG_RAN_BearerContextSetupRequest;
|
|
|
|
|
E1AP_NG_RAN_BearerContextSetupRequest_t *msgNGRAN = msgNGRAN_list->list.array[0];
|
|
|
|
|
// NG-RAN
|
|
|
|
|
_E1_EQ_CHECK_INT(msgNGRAN_list->list.count, 1); // only one RAN is expected
|
|
|
|
|
_E1_EQ_CHECK_LONG(msgNGRAN->id, E1AP_ProtocolIE_ID_id_PDU_Session_Resource_To_Setup_List);
|
|
|
|
|
_E1_EQ_CHECK_INT(msgNGRAN->value.present,
|
|
|
|
|
E1AP_NG_RAN_BearerContextSetupRequest__value_PR_PDU_Session_Resource_To_Setup_List);
|
|
|
|
|
_EQ_CHECK_INT(msgNGRAN_list->list.count, 1); // only one RAN is expected
|
|
|
|
|
_EQ_CHECK_LONG(msgNGRAN->id, E1AP_ProtocolIE_ID_id_PDU_Session_Resource_To_Setup_List);
|
|
|
|
|
_EQ_CHECK_INT(msgNGRAN->value.present, E1AP_NG_RAN_BearerContextSetupRequest__value_PR_PDU_Session_Resource_To_Setup_List);
|
|
|
|
|
// PDU Session Resource To Setup List (9.3.3.2 of 3GPP TS 38.463)
|
|
|
|
|
E1AP_PDU_Session_Resource_To_Setup_List_t *pdu2SetupList = &msgNGRAN->value.choice.PDU_Session_Resource_To_Setup_List;
|
|
|
|
|
out->numPDUSessions = pdu2SetupList->list.count;
|
|
|
|
@@ -791,18 +790,18 @@ e1ap_bearer_setup_req_t cp_bearer_context_setup_request(const e1ap_bearer_setup_
|
|
|
|
|
bool eq_bearer_context_setup_request(const e1ap_bearer_setup_req_t *a, const e1ap_bearer_setup_req_t *b)
|
|
|
|
|
{
|
|
|
|
|
// Primitive data types
|
|
|
|
|
_E1_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->secInfo.cipheringAlgorithm, b->secInfo.cipheringAlgorithm);
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->secInfo.integrityProtectionAlgorithm, b->secInfo.integrityProtectionAlgorithm);
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->ueDlAggMaxBitRate, b->ueDlAggMaxBitRate);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->numPDUSessions, b->numPDUSessions);
|
|
|
|
|
_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_EQ_CHECK_LONG(a->secInfo.cipheringAlgorithm, b->secInfo.cipheringAlgorithm);
|
|
|
|
|
_EQ_CHECK_LONG(a->secInfo.integrityProtectionAlgorithm, b->secInfo.integrityProtectionAlgorithm);
|
|
|
|
|
_EQ_CHECK_LONG(a->ueDlAggMaxBitRate, b->ueDlAggMaxBitRate);
|
|
|
|
|
_EQ_CHECK_INT(a->numPDUSessions, b->numPDUSessions);
|
|
|
|
|
// PLMN
|
|
|
|
|
_E1_EQ_CHECK_INT(a->servingPLMNid.mcc, b->servingPLMNid.mcc);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->servingPLMNid.mnc, b->servingPLMNid.mnc);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->servingPLMNid.mnc_digit_length, b->servingPLMNid.mnc_digit_length);
|
|
|
|
|
_EQ_CHECK_INT(a->servingPLMNid.mcc, b->servingPLMNid.mcc);
|
|
|
|
|
_EQ_CHECK_INT(a->servingPLMNid.mnc, b->servingPLMNid.mnc);
|
|
|
|
|
_EQ_CHECK_INT(a->servingPLMNid.mnc_digit_length, b->servingPLMNid.mnc_digit_length);
|
|
|
|
|
// Security Keys
|
|
|
|
|
_E1_EQ_CHECK_STR(a->secInfo.encryptionKey, b->secInfo.encryptionKey);
|
|
|
|
|
_E1_EQ_CHECK_STR(a->secInfo.integrityProtectionKey, b->secInfo.integrityProtectionKey);
|
|
|
|
|
_EQ_CHECK_STR(a->secInfo.encryptionKey, b->secInfo.encryptionKey);
|
|
|
|
|
_EQ_CHECK_STR(a->secInfo.integrityProtectionKey, b->secInfo.integrityProtectionKey);
|
|
|
|
|
// PDU Sessions
|
|
|
|
|
if (a->numPDUSessions != b->numPDUSessions)
|
|
|
|
|
return false;
|
|
|
|
@@ -810,10 +809,10 @@ bool eq_bearer_context_setup_request(const e1ap_bearer_setup_req_t *a, const e1a
|
|
|
|
|
if (!eq_pdu_session_item(&a->pduSession[i], &b->pduSession[i]))
|
|
|
|
|
return false;
|
|
|
|
|
// Check optional IEs
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_PTR(a, b, inactivityTimerUE);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_PTR(a, b, inactivityTimerUE);
|
|
|
|
|
if (a->inactivityTimerUE && b->inactivityTimerUE)
|
|
|
|
|
_E1_EQ_CHECK_INT(*a->inactivityTimerUE, *b->inactivityTimerUE);
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_IE(a, b, ueDlMaxIPBitRate, _E1_EQ_CHECK_LONG);
|
|
|
|
|
_EQ_CHECK_INT(*a->inactivityTimerUE, *b->inactivityTimerUE);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_IE(a, b, ueDlMaxIPBitRate, _EQ_CHECK_LONG);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -969,9 +968,9 @@ E1AP_E1AP_PDU_t *encode_E1_bearer_context_setup_response(const e1ap_bearer_setup
|
|
|
|
|
bool decode_E1_bearer_context_setup_response(const E1AP_E1AP_PDU_t *pdu, e1ap_bearer_setup_resp_t *out)
|
|
|
|
|
{
|
|
|
|
|
// Check message type
|
|
|
|
|
_E1_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_successfulOutcome);
|
|
|
|
|
_E1_EQ_CHECK_LONG(pdu->choice.successfulOutcome->procedureCode, E1AP_ProcedureCode_id_bearerContextSetup);
|
|
|
|
|
_E1_EQ_CHECK_INT(pdu->choice.successfulOutcome->value.present, E1AP_SuccessfulOutcome__value_PR_BearerContextSetupResponse);
|
|
|
|
|
_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_successfulOutcome);
|
|
|
|
|
_EQ_CHECK_LONG(pdu->choice.successfulOutcome->procedureCode, E1AP_ProcedureCode_id_bearerContextSetup);
|
|
|
|
|
_EQ_CHECK_INT(pdu->choice.successfulOutcome->value.present, E1AP_SuccessfulOutcome__value_PR_BearerContextSetupResponse);
|
|
|
|
|
|
|
|
|
|
const E1AP_BearerContextSetupResponse_t *in = &pdu->choice.successfulOutcome->value.choice.BearerContextSetupResponse;
|
|
|
|
|
E1AP_BearerContextSetupResponseIEs_t *ie;
|
|
|
|
@@ -985,27 +984,27 @@ bool decode_E1_bearer_context_setup_response(const E1AP_E1AP_PDU_t *pdu, e1ap_be
|
|
|
|
|
|
|
|
|
|
switch (ie->id) {
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID:
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupResponseIEs__value_PR_GNB_CU_CP_UE_E1AP_ID);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupResponseIEs__value_PR_GNB_CU_CP_UE_E1AP_ID);
|
|
|
|
|
out->gNB_cu_cp_ue_id = ie->value.choice.GNB_CU_CP_UE_E1AP_ID;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID:
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupResponseIEs__value_PR_GNB_CU_UP_UE_E1AP_ID);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupResponseIEs__value_PR_GNB_CU_UP_UE_E1AP_ID);
|
|
|
|
|
out->gNB_cu_up_ue_id = ie->value.choice.GNB_CU_UP_UE_E1AP_ID;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_System_BearerContextSetupResponse:
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupResponseIEs__value_PR_System_BearerContextSetupResponse);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextSetupResponseIEs__value_PR_System_BearerContextSetupResponse);
|
|
|
|
|
switch (ie->value.choice.System_BearerContextSetupResponse.present) {
|
|
|
|
|
case E1AP_System_BearerContextSetupResponse_PR_nG_RAN_BearerContextSetupResponse: {
|
|
|
|
|
E1AP_ProtocolIE_Container_4932P22_t *msgNGRAN_list =
|
|
|
|
|
(E1AP_ProtocolIE_Container_4932P22_t *)
|
|
|
|
|
ie->value.choice.System_BearerContextSetupResponse.choice.nG_RAN_BearerContextSetupResponse;
|
|
|
|
|
_E1_EQ_CHECK_INT(msgNGRAN_list->list.count, 1);
|
|
|
|
|
_EQ_CHECK_INT(msgNGRAN_list->list.count, 1);
|
|
|
|
|
E1AP_NG_RAN_BearerContextSetupResponse_t *msgNGRAN = msgNGRAN_list->list.array[0];
|
|
|
|
|
_E1_EQ_CHECK_LONG(msgNGRAN->id, E1AP_ProtocolIE_ID_id_PDU_Session_Resource_Setup_List);
|
|
|
|
|
_E1_EQ_CHECK_INT(msgNGRAN->value.present,
|
|
|
|
|
E1AP_NG_RAN_BearerContextSetupResponse__value_PR_PDU_Session_Resource_Setup_List);
|
|
|
|
|
_EQ_CHECK_LONG(msgNGRAN->id, E1AP_ProtocolIE_ID_id_PDU_Session_Resource_Setup_List);
|
|
|
|
|
_EQ_CHECK_INT(msgNGRAN->value.present,
|
|
|
|
|
E1AP_NG_RAN_BearerContextSetupResponse__value_PR_PDU_Session_Resource_Setup_List);
|
|
|
|
|
E1AP_PDU_Session_Resource_Setup_List_t *pduSetupList = &msgNGRAN->value.choice.PDU_Session_Resource_Setup_List;
|
|
|
|
|
out->numPDUSessions = pduSetupList->list.count;
|
|
|
|
|
for (int i = 0; i < pduSetupList->list.count; i++) {
|
|
|
|
@@ -1069,34 +1068,34 @@ e1ap_bearer_setup_resp_t cp_bearer_context_setup_response(const e1ap_bearer_setu
|
|
|
|
|
bool eq_bearer_context_setup_response(const e1ap_bearer_setup_resp_t *a, const e1ap_bearer_setup_resp_t *b)
|
|
|
|
|
{
|
|
|
|
|
// Check basic members
|
|
|
|
|
_E1_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->numPDUSessions, b->numPDUSessions);
|
|
|
|
|
_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id);
|
|
|
|
|
_EQ_CHECK_INT(a->numPDUSessions, b->numPDUSessions);
|
|
|
|
|
// Check PDU Sessions Setup
|
|
|
|
|
if (a->numPDUSessions != b->numPDUSessions)
|
|
|
|
|
return false;
|
|
|
|
|
for (int i = 0; i < a->numPDUSessions; i++) {
|
|
|
|
|
const pdu_session_setup_t *ps_a = &a->pduSession[i];
|
|
|
|
|
const pdu_session_setup_t *ps_b = &b->pduSession[i];
|
|
|
|
|
_E1_EQ_CHECK_LONG(ps_a->id, ps_b->id);
|
|
|
|
|
_EQ_CHECK_LONG(ps_a->id, ps_b->id);
|
|
|
|
|
eq_up_tl_info(&ps_a->tl_info, &ps_b->tl_info);
|
|
|
|
|
_E1_EQ_CHECK_INT(ps_a->numDRBSetup, ps_b->numDRBSetup);
|
|
|
|
|
_E1_EQ_CHECK_INT(ps_a->numDRBFailed, ps_b->numDRBFailed);
|
|
|
|
|
_EQ_CHECK_INT(ps_a->numDRBSetup, ps_b->numDRBSetup);
|
|
|
|
|
_EQ_CHECK_INT(ps_a->numDRBFailed, ps_b->numDRBFailed);
|
|
|
|
|
// Check DRB Setup
|
|
|
|
|
for (int j = 0; j < ps_a->numDRBSetup; j++) {
|
|
|
|
|
const DRB_nGRAN_setup_t *drb_a = &ps_a->DRBnGRanList[j];
|
|
|
|
|
const DRB_nGRAN_setup_t *drb_b = &ps_b->DRBnGRanList[j];
|
|
|
|
|
_E1_EQ_CHECK_LONG(drb_a->id, drb_b->id);
|
|
|
|
|
_E1_EQ_CHECK_INT(drb_a->numUpParam, drb_b->numUpParam);
|
|
|
|
|
_E1_EQ_CHECK_INT(drb_a->numQosFlowSetup, drb_b->numQosFlowSetup);
|
|
|
|
|
_EQ_CHECK_LONG(drb_a->id, drb_b->id);
|
|
|
|
|
_EQ_CHECK_INT(drb_a->numUpParam, drb_b->numUpParam);
|
|
|
|
|
_EQ_CHECK_INT(drb_a->numQosFlowSetup, drb_b->numQosFlowSetup);
|
|
|
|
|
}
|
|
|
|
|
// Check DRB Failed
|
|
|
|
|
for (int j = 0; j < ps_a->numDRBFailed; j++) {
|
|
|
|
|
const DRB_nGRAN_failed_t *drbf_a = &ps_a->DRBnGRanFailedList[j];
|
|
|
|
|
const DRB_nGRAN_failed_t *drbf_b = &ps_b->DRBnGRanFailedList[j];
|
|
|
|
|
_E1_EQ_CHECK_LONG(drbf_a->id, drbf_b->id);
|
|
|
|
|
_E1_EQ_CHECK_INT(drbf_a->cause.type, drbf_b->cause.type);
|
|
|
|
|
_E1_EQ_CHECK_INT(drbf_a->cause.value, drbf_b->cause.value);
|
|
|
|
|
_EQ_CHECK_LONG(drbf_a->id, drbf_b->id);
|
|
|
|
|
_EQ_CHECK_INT(drbf_a->cause.type, drbf_b->cause.type);
|
|
|
|
|
_EQ_CHECK_INT(drbf_a->cause.value, drbf_b->cause.value);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
@@ -1163,10 +1162,10 @@ E1AP_E1AP_PDU_t *encode_E1_bearer_context_setup_failure(const e1ap_bearer_contex
|
|
|
|
|
bool decode_E1_bearer_context_setup_failure(e1ap_bearer_context_setup_failure_t *out, const E1AP_E1AP_PDU_t *pdu)
|
|
|
|
|
{
|
|
|
|
|
DevAssert(pdu != NULL);
|
|
|
|
|
_E1_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_unsuccessfulOutcome);
|
|
|
|
|
_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_unsuccessfulOutcome);
|
|
|
|
|
E1AP_UnsuccessfulOutcome_t *type = pdu->choice.unsuccessfulOutcome;
|
|
|
|
|
_E1_EQ_CHECK_LONG(type->procedureCode, E1AP_ProcedureCode_id_bearerContextSetup);
|
|
|
|
|
_E1_EQ_CHECK_INT(type->value.present, E1AP_UnsuccessfulOutcome__value_PR_BearerContextSetupFailure);
|
|
|
|
|
_EQ_CHECK_LONG(type->procedureCode, E1AP_ProcedureCode_id_bearerContextSetup);
|
|
|
|
|
_EQ_CHECK_INT(type->value.present, E1AP_UnsuccessfulOutcome__value_PR_BearerContextSetupFailure);
|
|
|
|
|
const E1AP_BearerContextSetupFailure_t *in = &type->value.choice.BearerContextSetupFailure;
|
|
|
|
|
|
|
|
|
|
// Check mandatory IEs first
|
|
|
|
@@ -1210,10 +1209,10 @@ e1ap_bearer_context_setup_failure_t cp_bearer_context_setup_failure(const e1ap_b
|
|
|
|
|
/** @brief Bearer Context Setup Failure equality check */
|
|
|
|
|
bool eq_bearer_context_setup_failure(const e1ap_bearer_context_setup_failure_t *a, const e1ap_bearer_context_setup_failure_t *b)
|
|
|
|
|
{
|
|
|
|
|
_E1_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_IE(a, b, gNB_cu_up_ue_id, _E1_EQ_CHECK_INT);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->cause.type, b->cause.type);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->cause.value, b->cause.value);
|
|
|
|
|
_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_IE(a, b, gNB_cu_up_ue_id, _EQ_CHECK_INT);
|
|
|
|
|
_EQ_CHECK_INT(a->cause.type, b->cause.type);
|
|
|
|
|
_EQ_CHECK_INT(a->cause.value, b->cause.value);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1271,10 +1270,10 @@ E1AP_E1AP_PDU_t *encode_e1_bearer_context_release_command(const e1ap_bearer_rele
|
|
|
|
|
bool decode_e1_bearer_context_release_command(e1ap_bearer_release_cmd_t *out, const E1AP_E1AP_PDU_t *pdu)
|
|
|
|
|
{
|
|
|
|
|
DevAssert(pdu != NULL);
|
|
|
|
|
_E1_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_initiatingMessage);
|
|
|
|
|
_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_initiatingMessage);
|
|
|
|
|
E1AP_InitiatingMessage_t *type = pdu->choice.initiatingMessage;
|
|
|
|
|
_E1_EQ_CHECK_LONG(type->procedureCode, E1AP_ProcedureCode_id_bearerContextRelease);
|
|
|
|
|
_E1_EQ_CHECK_INT(type->value.present, E1AP_InitiatingMessage__value_PR_BearerContextReleaseCommand);
|
|
|
|
|
_EQ_CHECK_LONG(type->procedureCode, E1AP_ProcedureCode_id_bearerContextRelease);
|
|
|
|
|
_EQ_CHECK_INT(type->value.present, E1AP_InitiatingMessage__value_PR_BearerContextReleaseCommand);
|
|
|
|
|
const E1AP_BearerContextReleaseCommand_t *in = &type->value.choice.BearerContextReleaseCommand;
|
|
|
|
|
|
|
|
|
|
// Check mandatory IEs
|
|
|
|
@@ -1297,7 +1296,7 @@ bool decode_e1_bearer_context_release_command(e1ap_bearer_release_cmd_t *out, co
|
|
|
|
|
out->cause = e1_decode_cause_ie(&ie->value.choice.Cause);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
PRINT_ERROR("%s decoding failure: IE %ld is invalid\n", __func__, ie->id)
|
|
|
|
|
PRINT_ERROR("%s decoding failure: IE %ld is invalid\n", __func__, ie->id);
|
|
|
|
|
return false;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@@ -1308,10 +1307,10 @@ bool decode_e1_bearer_context_release_command(e1ap_bearer_release_cmd_t *out, co
|
|
|
|
|
/** @brief Bearer Context Release Command equality check */
|
|
|
|
|
bool eq_bearer_context_release_command(const e1ap_bearer_release_cmd_t *a, const e1ap_bearer_release_cmd_t *b)
|
|
|
|
|
{
|
|
|
|
|
_E1_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->cause.type, b->cause.type);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->cause.value, b->cause.value);
|
|
|
|
|
_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id);
|
|
|
|
|
_EQ_CHECK_INT(a->cause.type, b->cause.type);
|
|
|
|
|
_EQ_CHECK_INT(a->cause.value, b->cause.value);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1366,10 +1365,10 @@ E1AP_E1AP_PDU_t *encode_e1_bearer_context_release_complete(const e1ap_bearer_rel
|
|
|
|
|
bool decode_e1_bearer_context_release_complete(e1ap_bearer_release_cplt_t *out, const E1AP_E1AP_PDU_t *pdu)
|
|
|
|
|
{
|
|
|
|
|
DevAssert(pdu != NULL);
|
|
|
|
|
_E1_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_successfulOutcome);
|
|
|
|
|
_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_successfulOutcome);
|
|
|
|
|
E1AP_SuccessfulOutcome_t *type = pdu->choice.successfulOutcome;
|
|
|
|
|
_E1_EQ_CHECK_LONG(type->procedureCode, E1AP_ProcedureCode_id_bearerContextRelease);
|
|
|
|
|
_E1_EQ_CHECK_INT(type->value.present, E1AP_SuccessfulOutcome__value_PR_BearerContextReleaseComplete);
|
|
|
|
|
_EQ_CHECK_LONG(type->procedureCode, E1AP_ProcedureCode_id_bearerContextRelease);
|
|
|
|
|
_EQ_CHECK_INT(type->value.present, E1AP_SuccessfulOutcome__value_PR_BearerContextReleaseComplete);
|
|
|
|
|
const E1AP_BearerContextReleaseComplete_t *in = &type->value.choice.BearerContextReleaseComplete;
|
|
|
|
|
|
|
|
|
|
// Check mandatory IEs
|
|
|
|
@@ -1388,7 +1387,7 @@ bool decode_e1_bearer_context_release_complete(e1ap_bearer_release_cplt_t *out,
|
|
|
|
|
out->gNB_cu_up_ue_id = ie->value.choice.GNB_CU_UP_UE_E1AP_ID;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
PRINT_ERROR("%s decoding failure: IE %ld is not handled or invalid\n", __func__, ie->id)
|
|
|
|
|
PRINT_ERROR("%s decoding failure: IE %ld is not handled or invalid\n", __func__, ie->id);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@@ -1398,8 +1397,8 @@ bool decode_e1_bearer_context_release_complete(e1ap_bearer_release_cplt_t *out,
|
|
|
|
|
/** @brief Bearer Context Release Complete equality check */
|
|
|
|
|
bool eq_bearer_context_release_complete(const e1ap_bearer_release_cplt_t *a, const e1ap_bearer_release_cplt_t *b)
|
|
|
|
|
{
|
|
|
|
|
_E1_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id);
|
|
|
|
|
_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1669,13 +1668,13 @@ static bool e1_decode_pdu_session_to_setup_mod_item(pdu_session_to_setup_t *out,
|
|
|
|
|
// Security Indication (M)
|
|
|
|
|
CHECK_E1AP_DEC(e1_decode_security_indication(&out->securityIndication, &item->securityIndication));
|
|
|
|
|
/* NG UL UP Transport Layer Information (M) */
|
|
|
|
|
_E1_EQ_CHECK_INT(item->nG_UL_UP_TNL_Information.present, E1AP_UP_TNL_Information_PR_gTPTunnel);
|
|
|
|
|
_EQ_CHECK_INT(item->nG_UL_UP_TNL_Information.present, E1AP_UP_TNL_Information_PR_gTPTunnel);
|
|
|
|
|
CHECK_E1AP_DEC(e1_decode_up_tnl_info(&out->UP_TL_information, &item->nG_UL_UP_TNL_Information));
|
|
|
|
|
/* DRB To Setup List ( > 1 item ) */
|
|
|
|
|
const E1AP_DRB_To_Setup_Mod_List_NG_RAN_t *drb2SetupList = &item->dRB_To_Setup_Mod_List_NG_RAN;
|
|
|
|
|
_E1_EQ_CHECK_GENERIC(drb2SetupList->list.count > 0, "%d", drb2SetupList->list.count, 0);
|
|
|
|
|
EQ_CHECK_GENERIC(drb2SetupList->list.count > 0, "%d", drb2SetupList->list.count, 0);
|
|
|
|
|
out->numDRB2Setup = drb2SetupList->list.count;
|
|
|
|
|
_E1_EQ_CHECK_INT(out->numDRB2Setup, 1); // can only handle one DRB per PDU session
|
|
|
|
|
_EQ_CHECK_INT(out->numDRB2Setup, 1); // can only handle one DRB per PDU session
|
|
|
|
|
for (int j = 0; j < drb2SetupList->list.count; j++) {
|
|
|
|
|
DRB_nGRAN_to_setup_t *drb = out->DRBnGRanList + j;
|
|
|
|
|
const E1AP_DRB_To_Setup_Mod_Item_NG_RAN_t *drb2Setup = drb2SetupList->list.array[j];
|
|
|
|
@@ -1687,7 +1686,7 @@ static bool e1_decode_pdu_session_to_setup_mod_item(pdu_session_to_setup_t *out,
|
|
|
|
|
CHECK_E1AP_DEC(e1_decode_pdcp_config(&drb->pdcp_config, &drb2Setup->pDCP_Configuration));
|
|
|
|
|
// Cell Group Information (M)
|
|
|
|
|
const E1AP_Cell_Group_Information_t *cellGroupList = &drb2Setup->cell_Group_Information;
|
|
|
|
|
_E1_EQ_CHECK_GENERIC(cellGroupList->list.count > 0, "%d", cellGroupList->list.count, 0);
|
|
|
|
|
EQ_CHECK_GENERIC(cellGroupList->list.count > 0, "%d", cellGroupList->list.count, 0);
|
|
|
|
|
drb->numCellGroups = cellGroupList->list.count;
|
|
|
|
|
for (int k = 0; k < cellGroupList->list.count; k++) {
|
|
|
|
|
const E1AP_Cell_Group_Information_Item_t *cg2Setup = cellGroupList->list.array[k];
|
|
|
|
@@ -1774,10 +1773,10 @@ bool decode_E1_bearer_context_mod_request(const E1AP_E1AP_PDU_t *pdu, e1ap_beare
|
|
|
|
|
{
|
|
|
|
|
DevAssert(pdu != NULL);
|
|
|
|
|
// Validate message type
|
|
|
|
|
_E1_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_initiatingMessage);
|
|
|
|
|
_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_initiatingMessage);
|
|
|
|
|
const E1AP_InitiatingMessage_t *im = pdu->choice.initiatingMessage;
|
|
|
|
|
_E1_EQ_CHECK_LONG(im->procedureCode, E1AP_ProcedureCode_id_bearerContextModification);
|
|
|
|
|
_E1_EQ_CHECK_INT(im->value.present, E1AP_InitiatingMessage__value_PR_BearerContextModificationRequest);
|
|
|
|
|
_EQ_CHECK_LONG(im->procedureCode, E1AP_ProcedureCode_id_bearerContextModification);
|
|
|
|
|
_EQ_CHECK_INT(im->value.present, E1AP_InitiatingMessage__value_PR_BearerContextModificationRequest);
|
|
|
|
|
|
|
|
|
|
const E1AP_BearerContextModificationRequest_t *in = &im->value.choice.BearerContextModificationRequest;
|
|
|
|
|
E1AP_BearerContextModificationRequestIEs_t *ie = NULL;
|
|
|
|
@@ -1794,12 +1793,12 @@ bool decode_E1_bearer_context_mod_request(const E1AP_E1AP_PDU_t *pdu, e1ap_beare
|
|
|
|
|
|
|
|
|
|
switch (ie->id) {
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID:
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextModificationRequestIEs__value_PR_GNB_CU_CP_UE_E1AP_ID);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextModificationRequestIEs__value_PR_GNB_CU_CP_UE_E1AP_ID);
|
|
|
|
|
out->gNB_cu_cp_ue_id = ie->value.choice.GNB_CU_CP_UE_E1AP_ID;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID:
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextModificationRequestIEs__value_PR_GNB_CU_UP_UE_E1AP_ID);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextModificationRequestIEs__value_PR_GNB_CU_UP_UE_E1AP_ID);
|
|
|
|
|
out->gNB_cu_up_ue_id = ie->value.choice.GNB_CU_UP_UE_E1AP_ID;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
@@ -1819,7 +1818,7 @@ bool decode_E1_bearer_context_mod_request(const E1AP_E1AP_PDU_t *pdu, e1ap_beare
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_BearerContextStatusChange:
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextModificationRequestIEs__value_PR_BearerContextStatusChange);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextModificationRequestIEs__value_PR_BearerContextStatusChange);
|
|
|
|
|
if (ie->value.choice.BearerContextStatusChange == E1AP_BearerContextStatusChange_suspend) {
|
|
|
|
|
out->bearerContextStatus = malloc_or_fail(sizeof(*out->bearerContextStatus));
|
|
|
|
|
*out->bearerContextStatus = BEARER_SUSPEND;
|
|
|
|
@@ -1836,8 +1835,8 @@ bool decode_E1_bearer_context_mod_request(const E1AP_E1AP_PDU_t *pdu, e1ap_beare
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_System_BearerContextModificationRequest: {
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present,
|
|
|
|
|
E1AP_BearerContextModificationRequestIEs__value_PR_System_BearerContextModificationRequest);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present,
|
|
|
|
|
E1AP_BearerContextModificationRequestIEs__value_PR_System_BearerContextModificationRequest);
|
|
|
|
|
E1AP_System_BearerContextModificationRequest_t *modReq = &ie->value.choice.System_BearerContextModificationRequest;
|
|
|
|
|
DevAssert(ie->value.choice.System_BearerContextModificationRequest.choice.nG_RAN_BearerContextModificationRequest != NULL);
|
|
|
|
|
// System IE can contain either UTRAN or NG-RAN
|
|
|
|
@@ -1860,9 +1859,9 @@ bool decode_E1_bearer_context_mod_request(const E1AP_E1AP_PDU_t *pdu, e1ap_beare
|
|
|
|
|
E1AP_NG_RAN_BearerContextModificationRequest_t *msgNGRAN = msgNGRAN_list->list.array[i];
|
|
|
|
|
switch (msgNGRAN->id) {
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_PDU_Session_Resource_To_Setup_Mod_List:
|
|
|
|
|
_E1_EQ_CHECK_LONG(msgNGRAN->id, E1AP_ProtocolIE_ID_id_PDU_Session_Resource_To_Setup_Mod_List);
|
|
|
|
|
_E1_EQ_CHECK_INT(msgNGRAN->value.present,
|
|
|
|
|
E1AP_NG_RAN_BearerContextModificationRequest__value_PR_PDU_Session_Resource_To_Setup_Mod_List);
|
|
|
|
|
_EQ_CHECK_LONG(msgNGRAN->id, E1AP_ProtocolIE_ID_id_PDU_Session_Resource_To_Setup_Mod_List);
|
|
|
|
|
_EQ_CHECK_INT(msgNGRAN->value.present,
|
|
|
|
|
E1AP_NG_RAN_BearerContextModificationRequest__value_PR_PDU_Session_Resource_To_Setup_Mod_List);
|
|
|
|
|
E1AP_PDU_Session_Resource_To_Setup_Mod_List_t *setupList =
|
|
|
|
|
&msgNGRAN->value.choice.PDU_Session_Resource_To_Setup_Mod_List;
|
|
|
|
|
// PDU Session Resource To Modify List
|
|
|
|
@@ -1876,8 +1875,8 @@ bool decode_E1_bearer_context_mod_request(const E1AP_E1AP_PDU_t *pdu, e1ap_beare
|
|
|
|
|
break;
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_PDU_Session_Resource_To_Modify_List:
|
|
|
|
|
/* PDU Session Resource To Modify List (see 9.3.3.11 of TS 38.463) */
|
|
|
|
|
_E1_EQ_CHECK_INT(msgNGRAN->value.present,
|
|
|
|
|
E1AP_NG_RAN_BearerContextModificationRequest__value_PR_PDU_Session_Resource_To_Modify_List);
|
|
|
|
|
_EQ_CHECK_INT(msgNGRAN->value.present,
|
|
|
|
|
E1AP_NG_RAN_BearerContextModificationRequest__value_PR_PDU_Session_Resource_To_Modify_List);
|
|
|
|
|
E1AP_PDU_Session_Resource_To_Modify_List_t *modList = &msgNGRAN->value.choice.PDU_Session_Resource_To_Modify_List;
|
|
|
|
|
out->numPDUSessionsMod = modList->list.count;
|
|
|
|
|
// Loop through all PDU sessions
|
|
|
|
@@ -1887,8 +1886,8 @@ bool decode_E1_bearer_context_mod_request(const E1AP_E1AP_PDU_t *pdu, e1ap_beare
|
|
|
|
|
break;
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_PDU_Session_Resource_To_Remove_List:
|
|
|
|
|
/* PDU Session Resource To Remove List (see 9.3.3.12 of TS 38.463) */
|
|
|
|
|
_E1_EQ_CHECK_INT(msgNGRAN->value.present,
|
|
|
|
|
E1AP_NG_RAN_BearerContextModificationRequest__value_PR_PDU_Session_Resource_To_Remove_List);
|
|
|
|
|
_EQ_CHECK_INT(msgNGRAN->value.present,
|
|
|
|
|
E1AP_NG_RAN_BearerContextModificationRequest__value_PR_PDU_Session_Resource_To_Remove_List);
|
|
|
|
|
E1AP_PDU_Session_Resource_To_Remove_List_t *remList = &msgNGRAN->value.choice.PDU_Session_Resource_To_Remove_List;
|
|
|
|
|
out->numPDUSessionsRem = remList->list.count;
|
|
|
|
|
// Loop through all PDU sessions to remove
|
|
|
|
@@ -1980,9 +1979,9 @@ e1ap_bearer_mod_req_t cp_bearer_context_mod_request(const e1ap_bearer_mod_req_t
|
|
|
|
|
/** @brief Equality check for Security Indication IE (3GPP TS 38.463 9.3.1.23) */
|
|
|
|
|
static bool eq_security_ind(security_indication_t *a, security_indication_t *b)
|
|
|
|
|
{
|
|
|
|
|
_E1_EQ_CHECK_INT(a->confidentialityProtectionIndication, b->confidentialityProtectionIndication);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->integrityProtectionIndication, b->integrityProtectionIndication);
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->maxIPrate, b->maxIPrate);
|
|
|
|
|
_EQ_CHECK_INT(a->confidentialityProtectionIndication, b->confidentialityProtectionIndication);
|
|
|
|
|
_EQ_CHECK_INT(a->integrityProtectionIndication, b->integrityProtectionIndication);
|
|
|
|
|
_EQ_CHECK_LONG(a->maxIPrate, b->maxIPrate);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -1991,29 +1990,29 @@ static bool eq_security_ind(security_indication_t *a, security_indication_t *b)
|
|
|
|
|
*/
|
|
|
|
|
static bool eq_drb_to_mod(const DRB_nGRAN_to_mod_t *a, const DRB_nGRAN_to_mod_t *b)
|
|
|
|
|
{
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->id, b->id);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->numQosFlowsMod, b->numQosFlowsMod);
|
|
|
|
|
_EQ_CHECK_LONG(a->id, b->id);
|
|
|
|
|
_EQ_CHECK_INT(a->numQosFlowsMod, b->numQosFlowsMod);
|
|
|
|
|
for (int i = 0; i < a->numQosFlowsMod; i++) {
|
|
|
|
|
if (!eq_qos_flow(&a->qosFlows[i], &b->qosFlows[i]))
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
_E1_EQ_CHECK_INT(a->numDlUpParam, b->numDlUpParam);
|
|
|
|
|
_EQ_CHECK_INT(a->numDlUpParam, b->numDlUpParam);
|
|
|
|
|
for (int i = 0; i < a->numDlUpParam; i++) {
|
|
|
|
|
_E1_EQ_CHECK_INT(a->DlUpParamList[i].cell_group_id, b->DlUpParamList[i].cell_group_id);
|
|
|
|
|
_EQ_CHECK_INT(a->DlUpParamList[i].cell_group_id, b->DlUpParamList[i].cell_group_id);
|
|
|
|
|
if (!eq_up_tl_info(&a->DlUpParamList[i].tl_info, &b->DlUpParamList[i].tl_info))
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_PTR(a, b, pdcp_config);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_PTR(a, b, pdcp_config);
|
|
|
|
|
if (a->pdcp_config && b->pdcp_config) {
|
|
|
|
|
if (!eq_pdcp_config(a->pdcp_config, b->pdcp_config))
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_PTR(a, b, sdap_config);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_PTR(a, b, sdap_config);
|
|
|
|
|
if (a->sdap_config && b->sdap_config) {
|
|
|
|
|
if (!eq_sdap_config(a->sdap_config, b->sdap_config))
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_PTR(a, b, pdcp_status);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_PTR(a, b, pdcp_status);
|
|
|
|
|
if (a->pdcp_status && b->pdcp_status) {
|
|
|
|
|
if (!eq_pdcp_info(a->pdcp_status, b->pdcp_status))
|
|
|
|
|
return false;
|
|
|
|
@@ -2024,26 +2023,26 @@ static bool eq_drb_to_mod(const DRB_nGRAN_to_mod_t *a, const DRB_nGRAN_to_mod_t
|
|
|
|
|
/** @brief Equality check for PDU session item to modify */
|
|
|
|
|
static bool eq_pdu_session_to_mod_item(const pdu_session_to_mod_t *a, const pdu_session_to_mod_t *b)
|
|
|
|
|
{
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->sessionId, b->sessionId);
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_PTR(a, b, UP_TL_information);
|
|
|
|
|
_EQ_CHECK_LONG(a->sessionId, b->sessionId);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_PTR(a, b, UP_TL_information);
|
|
|
|
|
if (a->UP_TL_information && b->UP_TL_information) {
|
|
|
|
|
if (!eq_up_tl_info(a->UP_TL_information, b->UP_TL_information))
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
_E1_EQ_CHECK_INT(a->numDRB2Setup, b->numDRB2Setup);
|
|
|
|
|
_EQ_CHECK_INT(a->numDRB2Setup, b->numDRB2Setup);
|
|
|
|
|
for (int i = 0; i < a->numDRB2Setup; i++) {
|
|
|
|
|
if (!eq_drb_to_setup(&a->DRBnGRanList[i], &b->DRBnGRanList[i]))
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->numDRB2Modify, b->numDRB2Modify);
|
|
|
|
|
_EQ_CHECK_LONG(a->numDRB2Modify, b->numDRB2Modify);
|
|
|
|
|
for (int i = 0; i < a->numDRB2Modify; i++) {
|
|
|
|
|
if (!eq_drb_to_mod(&a->DRBnGRanModList[i], &b->DRBnGRanModList[i]))
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_PTR(a, b, securityIndication);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->n_drb_to_remove, b->n_drb_to_remove);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_PTR(a, b, securityIndication);
|
|
|
|
|
_EQ_CHECK_INT(a->n_drb_to_remove, b->n_drb_to_remove);
|
|
|
|
|
for (int r = 0; r < a->n_drb_to_remove; r++) {
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->drbs_to_remove[r].id, b->drbs_to_remove[r].id);
|
|
|
|
|
_EQ_CHECK_LONG(a->drbs_to_remove[r].id, b->drbs_to_remove[r].id);
|
|
|
|
|
}
|
|
|
|
|
if (a->securityIndication && b->securityIndication) {
|
|
|
|
|
if (!eq_security_ind(a->securityIndication, b->securityIndication))
|
|
|
|
@@ -2058,24 +2057,24 @@ static bool eq_pdu_session_to_mod_item(const pdu_session_to_mod_t *a, const pdu_
|
|
|
|
|
bool eq_bearer_context_mod_request(const e1ap_bearer_mod_req_t *a, const e1ap_bearer_mod_req_t *b)
|
|
|
|
|
{
|
|
|
|
|
// basic members
|
|
|
|
|
_E1_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->numPDUSessions, b->numPDUSessions);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->numPDUSessionsMod, b->numPDUSessionsMod);
|
|
|
|
|
_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id);
|
|
|
|
|
_EQ_CHECK_INT(a->numPDUSessions, b->numPDUSessions);
|
|
|
|
|
_EQ_CHECK_INT(a->numPDUSessionsMod, b->numPDUSessionsMod);
|
|
|
|
|
// Security Info
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_PTR(a, b, secInfo);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_PTR(a, b, secInfo);
|
|
|
|
|
if (a->secInfo && b->secInfo) {
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->secInfo->cipheringAlgorithm, b->secInfo->cipheringAlgorithm);
|
|
|
|
|
_E1_EQ_CHECK_LONG(a->secInfo->integrityProtectionAlgorithm, b->secInfo->integrityProtectionAlgorithm);
|
|
|
|
|
_E1_EQ_CHECK_STR(a->secInfo->encryptionKey, b->secInfo->encryptionKey);
|
|
|
|
|
_E1_EQ_CHECK_STR(a->secInfo->integrityProtectionKey, b->secInfo->integrityProtectionKey);
|
|
|
|
|
_EQ_CHECK_LONG(a->secInfo->cipheringAlgorithm, b->secInfo->cipheringAlgorithm);
|
|
|
|
|
_EQ_CHECK_LONG(a->secInfo->integrityProtectionAlgorithm, b->secInfo->integrityProtectionAlgorithm);
|
|
|
|
|
_EQ_CHECK_STR(a->secInfo->encryptionKey, b->secInfo->encryptionKey);
|
|
|
|
|
_EQ_CHECK_STR(a->secInfo->integrityProtectionKey, b->secInfo->integrityProtectionKey);
|
|
|
|
|
}
|
|
|
|
|
// Bearer Context Status (O)
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_IE(a, b, bearerContextStatus, _E1_EQ_CHECK_INT);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_IE(a, b, bearerContextStatus, _EQ_CHECK_INT);
|
|
|
|
|
// Inactivity Timer (O)
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_PTR(a, b, inactivityTimer);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_PTR(a, b, inactivityTimer);
|
|
|
|
|
if (a->inactivityTimer && b->inactivityTimer)
|
|
|
|
|
_E1_EQ_CHECK_INT(*a->inactivityTimer, *b->inactivityTimer);
|
|
|
|
|
_EQ_CHECK_INT(*a->inactivityTimer, *b->inactivityTimer);
|
|
|
|
|
// Activity Notification Level (O)
|
|
|
|
|
// PDU Sessions
|
|
|
|
|
if (a->numPDUSessions != b->numPDUSessions)
|
|
|
|
@@ -2092,13 +2091,13 @@ bool eq_bearer_context_mod_request(const e1ap_bearer_mod_req_t *a, const e1ap_be
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
// PDU Sessions to Remove
|
|
|
|
|
_E1_EQ_CHECK_INT(a->numPDUSessionsRem, b->numPDUSessionsRem);
|
|
|
|
|
_EQ_CHECK_INT(a->numPDUSessionsRem, b->numPDUSessionsRem);
|
|
|
|
|
for (int i = 0; i < a->numPDUSessionsRem; i++) {
|
|
|
|
|
const pdu_session_to_remove_t *pduRemA = &a->pduSessionRem[i];
|
|
|
|
|
const pdu_session_to_remove_t *pduRemB = &b->pduSessionRem[i];
|
|
|
|
|
_E1_EQ_CHECK_LONG(pduRemA->sessionId, pduRemB->sessionId);
|
|
|
|
|
_E1_EQ_CHECK_INT(pduRemA->cause.type, pduRemB->cause.type);
|
|
|
|
|
_E1_EQ_CHECK_INT(pduRemA->cause.value, pduRemB->cause.value);
|
|
|
|
|
_EQ_CHECK_LONG(pduRemA->sessionId, pduRemB->sessionId);
|
|
|
|
|
_EQ_CHECK_INT(pduRemA->cause.type, pduRemB->cause.type);
|
|
|
|
|
_EQ_CHECK_INT(pduRemA->cause.value, pduRemB->cause.value);
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@@ -2324,10 +2323,10 @@ static qos_flow_failed_t decode_qos_flow_failed_item(const E1AP_QoS_Flow_Failed_
|
|
|
|
|
bool decode_E1_bearer_context_mod_response(e1ap_bearer_modif_resp_t *out, const E1AP_E1AP_PDU_t *pdu)
|
|
|
|
|
{
|
|
|
|
|
DevAssert(pdu != NULL);
|
|
|
|
|
_E1_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_successfulOutcome);
|
|
|
|
|
_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_successfulOutcome);
|
|
|
|
|
E1AP_SuccessfulOutcome_t *type = pdu->choice.successfulOutcome;
|
|
|
|
|
_E1_EQ_CHECK_LONG(type->procedureCode, E1AP_ProcedureCode_id_bearerContextModification);
|
|
|
|
|
_E1_EQ_CHECK_INT(type->value.present, E1AP_SuccessfulOutcome__value_PR_BearerContextModificationResponse);
|
|
|
|
|
_EQ_CHECK_LONG(type->procedureCode, E1AP_ProcedureCode_id_bearerContextModification);
|
|
|
|
|
_EQ_CHECK_INT(type->value.present, E1AP_SuccessfulOutcome__value_PR_BearerContextModificationResponse);
|
|
|
|
|
const E1AP_BearerContextModificationResponse_t *in = &type->value.choice.BearerContextModificationResponse;
|
|
|
|
|
// Check mandatory IEs first
|
|
|
|
|
E1AP_BearerContextModificationResponseIEs_t *ie;
|
|
|
|
@@ -2339,28 +2338,30 @@ bool decode_E1_bearer_context_mod_response(e1ap_bearer_modif_resp_t *out, const
|
|
|
|
|
switch (ie->id) {
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_gNB_CU_CP_UE_E1AP_ID:
|
|
|
|
|
// gNB-CU-CP UE E1AP ID (M)
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextModificationResponseIEs__value_PR_GNB_CU_CP_UE_E1AP_ID);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextModificationResponseIEs__value_PR_GNB_CU_CP_UE_E1AP_ID);
|
|
|
|
|
out->gNB_cu_cp_ue_id = ie->value.choice.GNB_CU_CP_UE_E1AP_ID;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_gNB_CU_UP_UE_E1AP_ID:
|
|
|
|
|
// gNB-CU-UP UE E1AP ID (M)
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextModificationResponseIEs__value_PR_GNB_CU_UP_UE_E1AP_ID);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextModificationResponseIEs__value_PR_GNB_CU_UP_UE_E1AP_ID);
|
|
|
|
|
out->gNB_cu_up_ue_id = ie->value.choice.GNB_CU_UP_UE_E1AP_ID;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case E1AP_ProtocolIE_ID_id_System_BearerContextModificationResponse:
|
|
|
|
|
// CHOICE System (O)
|
|
|
|
|
_E1_EQ_CHECK_INT(ie->value.present, E1AP_BearerContextModificationResponseIEs__value_PR_System_BearerContextModificationResponse);
|
|
|
|
|
_EQ_CHECK_INT(ie->value.present,
|
|
|
|
|
E1AP_BearerContextModificationResponseIEs__value_PR_System_BearerContextModificationResponse);
|
|
|
|
|
// NG-RAN System
|
|
|
|
|
E1AP_System_BearerContextModificationResponse_t *system = &ie->value.choice.System_BearerContextModificationResponse;
|
|
|
|
|
_E1_EQ_CHECK_INT(system->present, E1AP_System_BearerContextModificationResponse_PR_nG_RAN_BearerContextModificationResponse);
|
|
|
|
|
_EQ_CHECK_INT(system->present, E1AP_System_BearerContextModificationResponse_PR_nG_RAN_BearerContextModificationResponse);
|
|
|
|
|
// NG-RAN List
|
|
|
|
|
E1AP_ProtocolIE_Container_4932P29_t *msgNGRAN_list = (E1AP_ProtocolIE_Container_4932P29_t *)system->choice.nG_RAN_BearerContextModificationResponse;
|
|
|
|
|
_E1_EQ_CHECK_INT(msgNGRAN_list->list.count, 1);
|
|
|
|
|
_EQ_CHECK_INT(msgNGRAN_list->list.count, 1);
|
|
|
|
|
E1AP_NG_RAN_BearerContextModificationResponse_t *msgNGRAN = msgNGRAN_list->list.array[0];
|
|
|
|
|
_E1_EQ_CHECK_LONG(msgNGRAN->id, E1AP_ProtocolIE_ID_id_PDU_Session_Resource_Modified_List);
|
|
|
|
|
_E1_EQ_CHECK_INT(msgNGRAN->value.present, E1AP_NG_RAN_BearerContextModificationResponse__value_PR_PDU_Session_Resource_Modified_List);
|
|
|
|
|
_EQ_CHECK_LONG(msgNGRAN->id, E1AP_ProtocolIE_ID_id_PDU_Session_Resource_Modified_List);
|
|
|
|
|
_EQ_CHECK_INT(msgNGRAN->value.present,
|
|
|
|
|
E1AP_NG_RAN_BearerContextModificationResponse__value_PR_PDU_Session_Resource_Modified_List);
|
|
|
|
|
// PDU Session Resource Modified list (O)
|
|
|
|
|
E1AP_PDU_Session_Resource_Modified_List_t *list = &msgNGRAN->value.choice.PDU_Session_Resource_Modified_List;
|
|
|
|
|
out->numPDUSessionsMod = list->list.count;
|
|
|
|
@@ -2501,36 +2502,36 @@ bool eq_bearer_context_mod_response(const e1ap_bearer_modif_resp_t *a, const e1a
|
|
|
|
|
if (!a || !b) return false; // Null-check both inputs
|
|
|
|
|
|
|
|
|
|
// Basic members
|
|
|
|
|
_E1_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->numPDUSessionsMod, b->numPDUSessionsMod);
|
|
|
|
|
_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id);
|
|
|
|
|
_EQ_CHECK_INT(a->numPDUSessionsMod, b->numPDUSessionsMod);
|
|
|
|
|
|
|
|
|
|
// PDU Session Modified List
|
|
|
|
|
for (int i = 0; i < a->numPDUSessionsMod; i++) {
|
|
|
|
|
const pdu_session_modif_t *pduA = &a->pduSessionMod[i];
|
|
|
|
|
const pdu_session_modif_t *pduB = &b->pduSessionMod[i];
|
|
|
|
|
|
|
|
|
|
_E1_EQ_CHECK_LONG(pduA->id, pduB->id);
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_IE(pduA, pduB, confidentialityProtectionIndication, _E1_EQ_CHECK_INT);
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_IE(pduA, pduB, integrityProtectionIndication, _E1_EQ_CHECK_INT);
|
|
|
|
|
_EQ_CHECK_LONG(pduA->id, pduB->id);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_IE(pduA, pduB, confidentialityProtectionIndication, _EQ_CHECK_INT);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_IE(pduA, pduB, integrityProtectionIndication, _EQ_CHECK_INT);
|
|
|
|
|
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_PTR(pduA, pduB, ng_DL_UP_TL_info);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_PTR(pduA, pduB, ng_DL_UP_TL_info);
|
|
|
|
|
if (pduA->ng_DL_UP_TL_info && pduB->ng_DL_UP_TL_info) {
|
|
|
|
|
if (!eq_up_tl_info(pduA->ng_DL_UP_TL_info, pduB->ng_DL_UP_TL_info))
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DRB Modified List
|
|
|
|
|
_E1_EQ_CHECK_INT(pduA->numDRBModified, pduB->numDRBModified);
|
|
|
|
|
_EQ_CHECK_INT(pduA->numDRBModified, pduB->numDRBModified);
|
|
|
|
|
for (int j = 0; j < pduA->numDRBModified; j++) {
|
|
|
|
|
const DRB_nGRAN_modified_t *drbModA = &pduA->DRBnGRanModList[j];
|
|
|
|
|
const DRB_nGRAN_modified_t *drbModB = &pduB->DRBnGRanModList[j];
|
|
|
|
|
_E1_EQ_CHECK_LONG(drbModA->id, drbModB->id);
|
|
|
|
|
_E1_EQ_CHECK_INT(drbModA->numQosFlowSetup, drbModB->numQosFlowSetup);
|
|
|
|
|
_EQ_CHECK_LONG(drbModA->id, drbModB->id);
|
|
|
|
|
_EQ_CHECK_INT(drbModA->numQosFlowSetup, drbModB->numQosFlowSetup);
|
|
|
|
|
for (int j = 0; j < drbModA->numQosFlowSetup; j++) {
|
|
|
|
|
_E1_EQ_CHECK_LONG(drbModA->qosFlows[j].qfi, drbModB->qosFlows[j].qfi);
|
|
|
|
|
_EQ_CHECK_LONG(drbModA->qosFlows[j].qfi, drbModB->qosFlows[j].qfi);
|
|
|
|
|
}
|
|
|
|
|
_E1_EQ_CHECK_OPTIONAL_PTR(drbModA, drbModB, pdcp_status);
|
|
|
|
|
_EQ_CHECK_OPTIONAL_PTR(drbModA, drbModB, pdcp_status);
|
|
|
|
|
if (drbModA->pdcp_status && drbModB->pdcp_status) {
|
|
|
|
|
if (!eq_pdcp_info(drbModA->pdcp_status, drbModB->pdcp_status))
|
|
|
|
|
return false;
|
|
|
|
@@ -2538,32 +2539,32 @@ bool eq_bearer_context_mod_response(const e1ap_bearer_modif_resp_t *a, const e1a
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DRB Failed to Modify List
|
|
|
|
|
_E1_EQ_CHECK_INT(pduA->numDRBFailedToMod, pduB->numDRBFailedToMod);
|
|
|
|
|
_EQ_CHECK_INT(pduA->numDRBFailedToMod, pduB->numDRBFailedToMod);
|
|
|
|
|
for (int j = 0; j < pduA->numDRBFailedToMod; j++) {
|
|
|
|
|
_E1_EQ_CHECK_LONG(pduA->DRBnGRanFailedModList[j].id, pduB->DRBnGRanFailedModList[j].id);
|
|
|
|
|
_E1_EQ_CHECK_INT(pduA->DRBnGRanFailedModList[j].cause.value, pduB->DRBnGRanFailedModList[j].cause.value);
|
|
|
|
|
_E1_EQ_CHECK_INT(pduA->DRBnGRanFailedModList[j].cause.type, pduB->DRBnGRanFailedModList[j].cause.type);
|
|
|
|
|
_EQ_CHECK_LONG(pduA->DRBnGRanFailedModList[j].id, pduB->DRBnGRanFailedModList[j].id);
|
|
|
|
|
_EQ_CHECK_INT(pduA->DRBnGRanFailedModList[j].cause.value, pduB->DRBnGRanFailedModList[j].cause.value);
|
|
|
|
|
_EQ_CHECK_INT(pduA->DRBnGRanFailedModList[j].cause.type, pduB->DRBnGRanFailedModList[j].cause.type);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DRB Setup List
|
|
|
|
|
_E1_EQ_CHECK_INT(pduA->numDRBSetup, pduB->numDRBSetup);
|
|
|
|
|
_EQ_CHECK_INT(pduA->numDRBSetup, pduB->numDRBSetup);
|
|
|
|
|
for (int j = 0; j < pduA->numDRBSetup; j++) {
|
|
|
|
|
const DRB_nGRAN_setup_t *drbSetupA = &pduA->DRBnGRanSetupList[j];
|
|
|
|
|
const DRB_nGRAN_setup_t *drbSetupB = &pduB->DRBnGRanSetupList[j];
|
|
|
|
|
|
|
|
|
|
_E1_EQ_CHECK_LONG(drbSetupA->id, drbSetupB->id);
|
|
|
|
|
_E1_EQ_CHECK_INT(drbSetupA->numQosFlowSetup, drbSetupB->numQosFlowSetup);
|
|
|
|
|
_EQ_CHECK_LONG(drbSetupA->id, drbSetupB->id);
|
|
|
|
|
_EQ_CHECK_INT(drbSetupA->numQosFlowSetup, drbSetupB->numQosFlowSetup);
|
|
|
|
|
for (int j = 0; j < drbSetupA->numQosFlowSetup; j++) {
|
|
|
|
|
_E1_EQ_CHECK_LONG(drbSetupA->qosFlows[j].qfi, drbSetupB->qosFlows[j].qfi);
|
|
|
|
|
_EQ_CHECK_LONG(drbSetupA->qosFlows[j].qfi, drbSetupB->qosFlows[j].qfi);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// DRB Failed to Setup List
|
|
|
|
|
_E1_EQ_CHECK_INT(pduA->numDRBFailed, pduB->numDRBFailed);
|
|
|
|
|
_EQ_CHECK_INT(pduA->numDRBFailed, pduB->numDRBFailed);
|
|
|
|
|
for (int j = 0; j < pduA->numDRBFailed; j++) {
|
|
|
|
|
_E1_EQ_CHECK_LONG(pduA->DRBnGRanFailedList[j].id, pduB->DRBnGRanFailedList[j].id);
|
|
|
|
|
_E1_EQ_CHECK_INT(pduA->DRBnGRanFailedList[j].cause.value, pduB->DRBnGRanFailedList[j].cause.value);
|
|
|
|
|
_E1_EQ_CHECK_INT(pduA->DRBnGRanFailedList[j].cause.type, pduB->DRBnGRanFailedList[j].cause.type);
|
|
|
|
|
_EQ_CHECK_LONG(pduA->DRBnGRanFailedList[j].id, pduB->DRBnGRanFailedList[j].id);
|
|
|
|
|
_EQ_CHECK_INT(pduA->DRBnGRanFailedList[j].cause.value, pduB->DRBnGRanFailedList[j].cause.value);
|
|
|
|
|
_EQ_CHECK_INT(pduA->DRBnGRanFailedList[j].cause.type, pduB->DRBnGRanFailedList[j].cause.type);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@@ -2627,10 +2628,10 @@ struct E1AP_E1AP_PDU *encode_E1_bearer_context_mod_failure(const e1ap_bearer_con
|
|
|
|
|
bool decode_E1_bearer_context_mod_failure(e1ap_bearer_context_mod_failure_t *out, const E1AP_E1AP_PDU_t *pdu)
|
|
|
|
|
{
|
|
|
|
|
DevAssert(pdu != NULL);
|
|
|
|
|
_E1_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_unsuccessfulOutcome);
|
|
|
|
|
_EQ_CHECK_INT(pdu->present, E1AP_E1AP_PDU_PR_unsuccessfulOutcome);
|
|
|
|
|
E1AP_UnsuccessfulOutcome_t *type = pdu->choice.unsuccessfulOutcome;
|
|
|
|
|
_E1_EQ_CHECK_LONG(type->procedureCode, E1AP_ProcedureCode_id_bearerContextModification);
|
|
|
|
|
_E1_EQ_CHECK_INT(type->value.present, E1AP_UnsuccessfulOutcome__value_PR_BearerContextModificationFailure);
|
|
|
|
|
_EQ_CHECK_LONG(type->procedureCode, E1AP_ProcedureCode_id_bearerContextModification);
|
|
|
|
|
_EQ_CHECK_INT(type->value.present, E1AP_UnsuccessfulOutcome__value_PR_BearerContextModificationFailure);
|
|
|
|
|
const E1AP_BearerContextModificationFailure_t *in = &type->value.choice.BearerContextModificationFailure;
|
|
|
|
|
// Check mandatory IEs first
|
|
|
|
|
E1AP_BearerContextModificationFailureIEs_t *ie;
|
|
|
|
@@ -2671,10 +2672,10 @@ bool eq_E1_bearer_context_mod_failure(const e1ap_bearer_context_mod_failure_t *a
|
|
|
|
|
{
|
|
|
|
|
if (!a || !b)
|
|
|
|
|
return false; // Null-check both inputs
|
|
|
|
|
_E1_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->cause.type, b->cause.type);
|
|
|
|
|
_E1_EQ_CHECK_INT(a->cause.value, b->cause.value);
|
|
|
|
|
_EQ_CHECK_INT(a->gNB_cu_cp_ue_id, b->gNB_cu_cp_ue_id);
|
|
|
|
|
_EQ_CHECK_INT(a->gNB_cu_up_ue_id, b->gNB_cu_up_ue_id);
|
|
|
|
|
_EQ_CHECK_INT(a->cause.type, b->cause.type);
|
|
|
|
|
_EQ_CHECK_INT(a->cause.value, b->cause.value);
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|