Commit 78120fb0 authored by rmagueta's avatar rmagueta

Target gNB-DU sends the ue_context_setup_response to the gNB-CU with the new C-RNTI

parent 187b9523
...@@ -616,6 +616,12 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_ ...@@ -616,6 +616,12 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance, sctp_assoc_t assoc_
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true); F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
f1ap_ue_context_setup_resp->gNB_DU_ue_id = ie->value.choice.GNB_DU_UE_F1AP_ID; f1ap_ue_context_setup_resp->gNB_DU_ue_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
LOG_D(F1AP, "f1ap_ue_context_setup_resp->gNB_DU_ue_id is: %d \n", f1ap_ue_context_setup_resp->gNB_DU_ue_id); LOG_D(F1AP, "f1ap_ue_context_setup_resp->gNB_DU_ue_id is: %d \n", f1ap_ue_context_setup_resp->gNB_DU_ue_id);
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupResponseIEs_t, ie, container, F1AP_ProtocolIE_ID_id_C_RNTI, false);
if (ie) {
f1ap_ue_context_setup_resp->crnti = calloc(1, sizeof(uint16_t));
*f1ap_ue_context_setup_resp->crnti = ie->value.choice.C_RNTI;
}
// DUtoCURRCInformation // DUtoCURRCInformation
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupResponseIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextSetupResponseIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_DUtoCURRCInformation, true); F1AP_ProtocolIE_ID_id_DUtoCURRCInformation, true);
......
...@@ -370,15 +370,12 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(sctp_assoc_t assoc_id, f1ap_ue_context_set ...@@ -370,15 +370,12 @@ int DU_send_UE_CONTEXT_SETUP_RESPONSE(sctp_assoc_t assoc_id, f1ap_ue_context_set
/* optional */ /* optional */
/* c4. C_RNTI */ /* c4. C_RNTI */
if (0) { if (resp->crnti!=NULL) {
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextSetupResponseIEs_t, ie4); asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextSetupResponseIEs_t, ie4);
ie4->id = F1AP_ProtocolIE_ID_id_C_RNTI; ie4->id = F1AP_ProtocolIE_ID_id_C_RNTI;
ie4->criticality = F1AP_Criticality_ignore; ie4->criticality = F1AP_Criticality_ignore;
ie4->value.present = F1AP_UEContextSetupResponseIEs__value_PR_C_RNTI; ie4->value.present = F1AP_UEContextSetupResponseIEs__value_PR_C_RNTI;
//C_RNTI_TO_BIT_STRING(rntiP, &ie->value.choice.C_RNTI); ie4->value.choice.C_RNTI = *resp->crnti;
ie4->value.choice.C_RNTI=0;
AssertFatal(false, "not implemented\n");
LOG_E(F1AP,"RNTI to code!\n");
} }
/* optional */ /* optional */
......
...@@ -161,6 +161,10 @@ static void ue_context_setup_response_f1ap(const f1ap_ue_context_setup_t *req, c ...@@ -161,6 +161,10 @@ static void ue_context_setup_response_f1ap(const f1ap_ue_context_setup_t *req, c
for (int i = 0; i < f1ap_msg->drbs_to_be_setup_length; ++i) for (int i = 0; i < f1ap_msg->drbs_to_be_setup_length; ++i)
f1ap_msg->drbs_to_be_setup[i] = resp->drbs_to_be_setup[i]; f1ap_msg->drbs_to_be_setup[i] = resp->drbs_to_be_setup[i];
} }
if (resp->crnti) {
f1ap_msg->crnti = calloc(1, sizeof(uint16_t));
*f1ap_msg->crnti = *resp->crnti;
}
f1ap_msg->du_to_cu_rrc_information = malloc(sizeof(*resp->du_to_cu_rrc_information)); f1ap_msg->du_to_cu_rrc_information = malloc(sizeof(*resp->du_to_cu_rrc_information));
AssertFatal(f1ap_msg->du_to_cu_rrc_information != NULL, "out of memory\n"); AssertFatal(f1ap_msg->du_to_cu_rrc_information != NULL, "out of memory\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment