Commit d236d92a authored by Robert Schmidt's avatar Robert Schmidt

Add SRBID to Release Command and encode/decode for F1AP

parent 1268b27c
......@@ -425,6 +425,7 @@ typedef struct f1ap_ue_context_release_s {
long cause_value;
uint8_t *rrc_container;
int rrc_container_length;
int srb_id;
} f1ap_ue_context_release_req_t, f1ap_ue_context_release_cmd_t,
f1ap_ue_context_release_cplt_t;
......
......@@ -900,6 +900,13 @@ int CU_send_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
ie4->value.present = F1AP_UEContextReleaseCommandIEs__value_PR_RRCContainer;
OCTET_STRING_fromBuf(&ie4->value.choice.RRCContainer, (const char *)cmd->rrc_container,
cmd->rrc_container_length);
// conditionally have SRBID if RRC Container
asn1cSequenceAdd(out->protocolIEs.list, F1AP_UEContextReleaseCommandIEs_t, ie5);
ie5->id = F1AP_ProtocolIE_ID_id_SRBID;
ie5->criticality = F1AP_Criticality_ignore;
ie5->value.present = F1AP_UEContextReleaseCommandIEs__value_PR_SRBID;
ie5->value.choice.SRBID = cmd->srb_id;
}
/* encode */
......
......@@ -680,8 +680,16 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_RRCContainer, false);
f1ap_ue_context_release_cmd->rrc_container = malloc(ie->value.choice.RRCContainer.size);
memcpy(f1ap_ue_context_release_cmd->rrc_container, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
if (ie != NULL) {
f1ap_ue_context_release_cmd->rrc_container = malloc(ie->value.choice.RRCContainer.size);
AssertFatal(f1ap_ue_context_release_cmd->rrc_container != NULL, "out of memory\n");
memcpy(f1ap_ue_context_release_cmd->rrc_container, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
f1ap_ue_context_release_cmd->rrc_container_length = ie->value.choice.RRCContainer.size;
// conditionally have SRB ID if there is RRC container
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container, F1AP_ProtocolIE_ID_id_SRBID, true);
f1ap_ue_context_release_cmd->srb_id = ie->value.choice.SRBID;
}
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_Cause, true);
......
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