CI: astyle trying to help merge
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This commit is contained in:
@@ -261,6 +261,7 @@ int s1ap_eNB_handle_s1_setup_failure(uint32_t assoc_id,
|
|||||||
|
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_S1SetupFailureIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_S1SetupFailureIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_Cause,true);
|
S1AP_ProtocolIE_ID_id_Cause,true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
if ((ie->value.choice.Cause.present == S1AP_Cause_PR_misc) &&
|
if ((ie->value.choice.Cause.present == S1AP_Cause_PR_misc) &&
|
||||||
(ie->value.choice.Cause.choice.misc == S1AP_CauseMisc_unspecified)) {
|
(ie->value.choice.Cause.choice.misc == S1AP_CauseMisc_unspecified)) {
|
||||||
@@ -271,6 +272,7 @@ int s1ap_eNB_handle_s1_setup_failure(uint32_t assoc_id,
|
|||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
mme_desc_p->state = S1AP_ENB_STATE_WAITING;
|
mme_desc_p->state = S1AP_ENB_STATE_WAITING;
|
||||||
s1ap_handle_s1_setup_message(mme_desc_p, 0);
|
s1ap_handle_s1_setup_message(mme_desc_p, 0);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -302,6 +304,7 @@ int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
|
|||||||
|
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_S1SetupResponseIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_S1SetupResponseIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_ServedGUMMEIs, true);
|
S1AP_ProtocolIE_ID_id_ServedGUMMEIs, true);
|
||||||
|
|
||||||
/* The list of served gummei can contain at most 8 elements.
|
/* The list of served gummei can contain at most 8 elements.
|
||||||
* LTE related gummei is the first element in the list, i.e with an id of 0.
|
* LTE related gummei is the first element in the list, i.e with an id of 0.
|
||||||
*/
|
*/
|
||||||
@@ -357,14 +360,17 @@ int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
|
|||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the capacity of this MME */
|
/* Set the capacity of this MME */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_S1SetupResponseIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_S1SetupResponseIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_RelativeMMECapacity, true);
|
S1AP_ProtocolIE_ID_id_RelativeMMECapacity, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
mme_desc_p->relative_mme_capacity = ie->value.choice.RelativeMMECapacity;
|
mme_desc_p->relative_mme_capacity = ie->value.choice.RelativeMMECapacity;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Optionaly set the mme name */
|
/* Optionaly set the mme name */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_S1SetupResponseIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_S1SetupResponseIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_MMEname, false);
|
S1AP_ProtocolIE_ID_id_MMEname, false);
|
||||||
@@ -408,6 +414,7 @@ int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
|
|||||||
"MME context\n", assoc_id);
|
"MME context\n", assoc_id);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_ErrorIndicationIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_ErrorIndicationIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID, false);
|
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID, false);
|
||||||
|
|
||||||
@@ -752,16 +759,20 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
|
|||||||
/* id-MME-UE-S1AP-ID */
|
/* id-MME-UE-S1AP-ID */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_InitialContextSetupRequestIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_InitialContextSetupRequestIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID, true);
|
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
mme_ue_s1ap_id = ie->value.choice.MME_UE_S1AP_ID;
|
mme_ue_s1ap_id = ie->value.choice.MME_UE_S1AP_ID;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* id-eNB-UE-S1AP-ID */
|
/* id-eNB-UE-S1AP-ID */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_InitialContextSetupRequestIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_InitialContextSetupRequestIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID, true);
|
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
enb_ue_s1ap_id = ie->value.choice.ENB_UE_S1AP_ID;
|
enb_ue_s1ap_id = ie->value.choice.ENB_UE_S1AP_ID;
|
||||||
|
|
||||||
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
|
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
|
||||||
enb_ue_s1ap_id)) == NULL) {
|
enb_ue_s1ap_id)) == NULL) {
|
||||||
S1AP_ERROR("[SCTP %d] Received initial context setup request for non "
|
S1AP_ERROR("[SCTP %d] Received initial context setup request for non "
|
||||||
@@ -789,6 +800,7 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
|
|||||||
/* id-uEaggregateMaximumBitrate */
|
/* id-uEaggregateMaximumBitrate */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_InitialContextSetupRequestIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_InitialContextSetupRequestIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_uEaggregateMaximumBitrate, true);
|
S1AP_ProtocolIE_ID_id_uEaggregateMaximumBitrate, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
asn_INTEGER2ulong(&(ie->value.choice.UEAggregateMaximumBitrate.uEaggregateMaximumBitRateUL),
|
asn_INTEGER2ulong(&(ie->value.choice.UEAggregateMaximumBitrate.uEaggregateMaximumBitRateUL),
|
||||||
&(S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).ue_ambr.br_ul));
|
&(S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).ue_ambr.br_ul));
|
||||||
@@ -798,8 +810,10 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
|
|||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_InitialContextSetupRequestIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_InitialContextSetupRequestIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_E_RABToBeSetupListCtxtSUReq, true);
|
S1AP_ProtocolIE_ID_id_E_RABToBeSetupListCtxtSUReq, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).nb_of_e_rabs =
|
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).nb_of_e_rabs =
|
||||||
ie->value.choice.E_RABToBeSetupListCtxtSUReq.list.count;
|
ie->value.choice.E_RABToBeSetupListCtxtSUReq.list.count;
|
||||||
@@ -841,9 +855,11 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
|
|||||||
} else {/* ie != NULL */
|
} else {/* ie != NULL */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* id-UESecurityCapabilities */
|
/* id-UESecurityCapabilities */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_InitialContextSetupRequestIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_InitialContextSetupRequestIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_UESecurityCapabilities, true);
|
S1AP_ProtocolIE_ID_id_UESecurityCapabilities, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).security_capabilities.encryption_algorithms =
|
S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).security_capabilities.encryption_algorithms =
|
||||||
BIT_STRING_to_uint16(&ie->value.choice.UESecurityCapabilities.encryptionAlgorithms);
|
BIT_STRING_to_uint16(&ie->value.choice.UESecurityCapabilities.encryptionAlgorithms);
|
||||||
@@ -853,8 +869,10 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
|
|||||||
} else {/* ie != NULL */
|
} else {/* ie != NULL */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_InitialContextSetupRequestIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_InitialContextSetupRequestIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_SecurityKey, true);
|
S1AP_ProtocolIE_ID_id_SecurityKey, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
memcpy(&S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).security_key,
|
memcpy(&S1AP_INITIAL_CONTEXT_SETUP_REQ(message_p).security_key,
|
||||||
ie->value.choice.SecurityKey.buf, ie->value.choice.SecurityKey.size);
|
ie->value.choice.SecurityKey.buf, ie->value.choice.SecurityKey.size);
|
||||||
@@ -862,6 +880,7 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
|
|||||||
} else {/* ie != NULL */
|
} else {/* ie != NULL */
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -888,6 +907,7 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
|
|||||||
|
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_UEContextReleaseCommand_IEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_UEContextReleaseCommand_IEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_UE_S1AP_IDs, true);
|
S1AP_ProtocolIE_ID_id_UE_S1AP_IDs, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
switch (ie->value.choice.UE_S1AP_IDs.present) {
|
switch (ie->value.choice.UE_S1AP_IDs.present) {
|
||||||
case S1AP_UE_S1AP_IDs_PR_uE_S1AP_ID_pair:
|
case S1AP_UE_S1AP_IDs_PR_uE_S1AP_ID_pair:
|
||||||
@@ -944,6 +964,7 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
|
|||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_UEContextReleaseCommand_IEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_UEContextReleaseCommand_IEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_Cause, true);
|
S1AP_ProtocolIE_ID_id_Cause, true);
|
||||||
/* TBD */
|
/* TBD */
|
||||||
@@ -973,19 +994,23 @@ int s1ap_eNB_handle_e_rab_setup_request(uint32_t assoc_id,
|
|||||||
/* id-MME-UE-S1AP-ID */
|
/* id-MME-UE-S1AP-ID */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABSetupRequestIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABSetupRequestIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID, true);
|
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
mme_ue_s1ap_id = ie->value.choice.MME_UE_S1AP_ID;
|
mme_ue_s1ap_id = ie->value.choice.MME_UE_S1AP_ID;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* id-eNB-UE-S1AP-ID */
|
/* id-eNB-UE-S1AP-ID */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABSetupRequestIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABSetupRequestIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID, true);
|
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
enb_ue_s1ap_id = ie->value.choice.ENB_UE_S1AP_ID;
|
enb_ue_s1ap_id = ie->value.choice.ENB_UE_S1AP_ID;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
|
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
|
||||||
enb_ue_s1ap_id)) == NULL) {
|
enb_ue_s1ap_id)) == NULL) {
|
||||||
S1AP_ERROR("[SCTP %d] Received initial context setup request for non "
|
S1AP_ERROR("[SCTP %d] Received initial context setup request for non "
|
||||||
@@ -1014,6 +1039,7 @@ int s1ap_eNB_handle_e_rab_setup_request(uint32_t assoc_id,
|
|||||||
S1AP_E_RAB_SETUP_REQ(message_p).eNB_ue_s1ap_id = enb_ue_s1ap_id;
|
S1AP_E_RAB_SETUP_REQ(message_p).eNB_ue_s1ap_id = enb_ue_s1ap_id;
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABSetupRequestIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABSetupRequestIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_E_RABToBeSetupListBearerSUReq, true);
|
S1AP_ProtocolIE_ID_id_E_RABToBeSetupListBearerSUReq, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
S1AP_E_RAB_SETUP_REQ(message_p).nb_e_rabs_tosetup =
|
S1AP_E_RAB_SETUP_REQ(message_p).nb_e_rabs_tosetup =
|
||||||
ie->value.choice.E_RABToBeSetupListBearerSUReq.list.count;
|
ie->value.choice.E_RABToBeSetupListBearerSUReq.list.count;
|
||||||
@@ -1057,10 +1083,12 @@ int s1ap_eNB_handle_e_rab_setup_request(uint32_t assoc_id,
|
|||||||
S1AP_E_RAB_SETUP_REQ(message_p).e_rab_setup_params[i].qos.allocation_retention_priority.pre_emp_vulnerability =
|
S1AP_E_RAB_SETUP_REQ(message_p).e_rab_setup_params[i].qos.allocation_retention_priority.pre_emp_vulnerability =
|
||||||
item_p->e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionVulnerability;
|
item_p->e_RABlevelQoSParameters.allocationRetentionPriority.pre_emptionVulnerability;
|
||||||
} /* for i... */
|
} /* for i... */
|
||||||
|
|
||||||
itti_send_msg_to_task(TASK_RRC_ENB, ue_desc_p->eNB_instance->instance, message_p);
|
itti_send_msg_to_task(TASK_RRC_ENB, ue_desc_p->eNB_instance->instance, message_p);
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1104,6 +1132,7 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id,
|
|||||||
/* id-UEIdentityIndexValue : convert UE Identity Index value */
|
/* id-UEIdentityIndexValue : convert UE Identity Index value */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_PagingIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_PagingIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_UEIdentityIndexValue, true);
|
S1AP_ProtocolIE_ID_id_UEIdentityIndexValue, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
S1AP_PAGING_IND(message_p).ue_index_value = BIT_STRING_to_uint32(&ie->value.choice.UEIdentityIndexValue);
|
S1AP_PAGING_IND(message_p).ue_index_value = BIT_STRING_to_uint32(&ie->value.choice.UEIdentityIndexValue);
|
||||||
S1AP_DEBUG("[SCTP %d] Received Paging ue_index_value (%d)\n",
|
S1AP_DEBUG("[SCTP %d] Received Paging ue_index_value (%d)\n",
|
||||||
@@ -1113,9 +1142,11 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id,
|
|||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* id-UEPagingID */
|
/* id-UEPagingID */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_PagingIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_PagingIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_UEPagingID, true);
|
S1AP_ProtocolIE_ID_id_UEPagingID, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
/* convert UE Paging Identity */
|
/* convert UE Paging Identity */
|
||||||
if (ie->value.choice.UEPagingID.present == S1AP_UEPagingID_PR_s_TMSI) {
|
if (ie->value.choice.UEPagingID.present == S1AP_UEPagingID_PR_s_TMSI) {
|
||||||
@@ -1172,6 +1203,7 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id,
|
|||||||
/* */
|
/* */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_PagingIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_PagingIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_CNDomain, true);
|
S1AP_ProtocolIE_ID_id_CNDomain, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
/* id-CNDomain : convert cnDomain */
|
/* id-CNDomain : convert cnDomain */
|
||||||
if (ie->value.choice.CNDomain == S1AP_CNDomain_ps) {
|
if (ie->value.choice.CNDomain == S1AP_CNDomain_ps) {
|
||||||
@@ -1186,14 +1218,17 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id,
|
|||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset (&S1AP_PAGING_IND(message_p).plmn_identity[0], 0, sizeof(plmn_identity_t)*256);
|
memset (&S1AP_PAGING_IND(message_p).plmn_identity[0], 0, sizeof(plmn_identity_t)*256);
|
||||||
memset (&S1AP_PAGING_IND(message_p).tac[0], 0, sizeof(int16_t)*256);
|
memset (&S1AP_PAGING_IND(message_p).tac[0], 0, sizeof(int16_t)*256);
|
||||||
S1AP_PAGING_IND(message_p).tai_size = 0;
|
S1AP_PAGING_IND(message_p).tai_size = 0;
|
||||||
/* id-TAIList */
|
/* id-TAIList */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_PagingIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_PagingIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_TAIList, true);
|
S1AP_ProtocolIE_ID_id_TAIList, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
S1AP_INFO("[SCTP %d] Received Paging taiList: count %d\n", assoc_id, ie->value.choice.TAIList.list.count);
|
S1AP_INFO("[SCTP %d] Received Paging taiList: count %d\n", assoc_id, ie->value.choice.TAIList.list.count);
|
||||||
|
|
||||||
for (int i = 0; i < ie->value.choice.TAIList.list.count; i++) {
|
for (int i = 0; i < ie->value.choice.TAIList.list.count; i++) {
|
||||||
S1AP_TAIItem_t *item_p;
|
S1AP_TAIItem_t *item_p;
|
||||||
item_p = &(((S1AP_TAIItemIEs_t *)ie->value.choice.TAIList.list.array[i])->value.choice.TAIItem);
|
item_p = &(((S1AP_TAIItemIEs_t *)ie->value.choice.TAIList.list.array[i])->value.choice.TAIItem);
|
||||||
@@ -1250,19 +1285,23 @@ int s1ap_eNB_handle_e_rab_modify_request(uint32_t assoc_id,
|
|||||||
/* id-MME-UE-S1AP-ID */
|
/* id-MME-UE-S1AP-ID */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABModifyRequestIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABModifyRequestIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID, true);
|
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
mme_ue_s1ap_id = ie->value.choice.MME_UE_S1AP_ID;
|
mme_ue_s1ap_id = ie->value.choice.MME_UE_S1AP_ID;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* id-eNB-UE-S1AP-ID */
|
/* id-eNB-UE-S1AP-ID */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABModifyRequestIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABModifyRequestIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID, true);
|
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
enb_ue_s1ap_id = ie->value.choice.ENB_UE_S1AP_ID;
|
enb_ue_s1ap_id = ie->value.choice.ENB_UE_S1AP_ID;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
|
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
|
||||||
enb_ue_s1ap_id)) == NULL) {
|
enb_ue_s1ap_id)) == NULL) {
|
||||||
S1AP_ERROR("[SCTP %d] Received E-RAB modify request for non "
|
S1AP_ERROR("[SCTP %d] Received E-RAB modify request for non "
|
||||||
@@ -1287,6 +1326,7 @@ int s1ap_eNB_handle_e_rab_modify_request(uint32_t assoc_id,
|
|||||||
S1AP_E_RAB_MODIFY_RESP (message_p).eNB_ue_s1ap_id = enb_ue_s1ap_id;
|
S1AP_E_RAB_MODIFY_RESP (message_p).eNB_ue_s1ap_id = enb_ue_s1ap_id;
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABModifyRequestIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABModifyRequestIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_E_RABToBeModifiedListBearerModReq, true);
|
S1AP_ProtocolIE_ID_id_E_RABToBeModifiedListBearerModReq, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
for(nb_of_e_rabs_failed = 0; nb_of_e_rabs_failed < ie->value.choice.E_RABToBeModifiedListBearerModReq.list.count; nb_of_e_rabs_failed++) {
|
for(nb_of_e_rabs_failed = 0; nb_of_e_rabs_failed < ie->value.choice.E_RABToBeModifiedListBearerModReq.list.count; nb_of_e_rabs_failed++) {
|
||||||
S1AP_E_RABToBeModifiedItemBearerModReq_t *item_p;
|
S1AP_E_RABToBeModifiedItemBearerModReq_t *item_p;
|
||||||
@@ -1299,6 +1339,7 @@ int s1ap_eNB_handle_e_rab_modify_request(uint32_t assoc_id,
|
|||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
S1AP_E_RAB_MODIFY_RESP(message_p).nb_of_e_rabs_failed = nb_of_e_rabs_failed;
|
S1AP_E_RAB_MODIFY_RESP(message_p).nb_of_e_rabs_failed = nb_of_e_rabs_failed;
|
||||||
s1ap_eNB_e_rab_modify_resp(mme_desc_p->s1ap_eNB_instance->instance,
|
s1ap_eNB_e_rab_modify_resp(mme_desc_p->s1ap_eNB_instance->instance,
|
||||||
&S1AP_E_RAB_MODIFY_RESP(message_p));
|
&S1AP_E_RAB_MODIFY_RESP(message_p));
|
||||||
@@ -1313,6 +1354,7 @@ int s1ap_eNB_handle_e_rab_modify_request(uint32_t assoc_id,
|
|||||||
/* id-E-RABToBeModifiedListBearerModReq */
|
/* id-E-RABToBeModifiedListBearerModReq */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABModifyRequestIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABModifyRequestIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_E_RABToBeModifiedListBearerModReq, true);
|
S1AP_ProtocolIE_ID_id_E_RABToBeModifiedListBearerModReq, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
S1AP_E_RAB_MODIFY_REQ(message_p).nb_e_rabs_tomodify =
|
S1AP_E_RAB_MODIFY_REQ(message_p).nb_e_rabs_tomodify =
|
||||||
ie->value.choice.E_RABToBeModifiedListBearerModReq.list.count;
|
ie->value.choice.E_RABToBeModifiedListBearerModReq.list.count;
|
||||||
@@ -1348,6 +1390,7 @@ int s1ap_eNB_handle_e_rab_modify_request(uint32_t assoc_id,
|
|||||||
} else { /* of if (ie != NULL)*/
|
} else { /* of if (ie != NULL)*/
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// handle e-rab release command and send it to rrc_end
|
// handle e-rab release command and send it to rrc_end
|
||||||
@@ -1374,19 +1417,23 @@ int s1ap_eNB_handle_e_rab_release_command(uint32_t assoc_id,
|
|||||||
/* id-MME-UE-S1AP-ID */
|
/* id-MME-UE-S1AP-ID */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABReleaseCommandIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABReleaseCommandIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID, true);
|
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
mme_ue_s1ap_id = ie->value.choice.MME_UE_S1AP_ID;
|
mme_ue_s1ap_id = ie->value.choice.MME_UE_S1AP_ID;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* id-eNB-UE-S1AP-ID */
|
/* id-eNB-UE-S1AP-ID */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABReleaseCommandIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABReleaseCommandIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID, true);
|
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
enb_ue_s1ap_id = ie->value.choice.ENB_UE_S1AP_ID;
|
enb_ue_s1ap_id = ie->value.choice.ENB_UE_S1AP_ID;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
|
if ((ue_desc_p = s1ap_eNB_get_ue_context(mme_desc_p->s1ap_eNB_instance,
|
||||||
enb_ue_s1ap_id)) == NULL) {
|
enb_ue_s1ap_id)) == NULL) {
|
||||||
S1AP_ERROR("[SCTP %d] Received E-RAB release command for non existing UE context 0x%06lx\n", assoc_id,
|
S1AP_ERROR("[SCTP %d] Received E-RAB release command for non existing UE context 0x%06lx\n", assoc_id,
|
||||||
@@ -1432,6 +1479,7 @@ int s1ap_eNB_handle_e_rab_release_command(uint32_t assoc_id,
|
|||||||
/* id-E-RABToBeReleasedList */
|
/* id-E-RABToBeReleasedList */
|
||||||
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABReleaseCommandIEs_t, ie, container,
|
S1AP_FIND_PROTOCOLIE_BY_ID(S1AP_E_RABReleaseCommandIEs_t, ie, container,
|
||||||
S1AP_ProtocolIE_ID_id_E_RABToBeReleasedList, true);
|
S1AP_ProtocolIE_ID_id_E_RABToBeReleasedList, true);
|
||||||
|
|
||||||
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
if (ie != NULL) { /* checked by macro but cppcheck doesn't see it */
|
||||||
S1AP_E_RAB_RELEASE_COMMAND(message_p).nb_e_rabs_torelease = ie->value.choice.E_RABList.list.count;
|
S1AP_E_RAB_RELEASE_COMMAND(message_p).nb_e_rabs_torelease = ie->value.choice.E_RABList.list.count;
|
||||||
|
|
||||||
@@ -1444,6 +1492,7 @@ int s1ap_eNB_handle_e_rab_release_command(uint32_t assoc_id,
|
|||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
itti_send_msg_to_task(TASK_RRC_ENB, ue_desc_p->eNB_instance->instance, message_p);
|
itti_send_msg_to_task(TASK_RRC_ENB, ue_desc_p->eNB_instance->instance, message_p);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user