Pass the NSSAI config via F1
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <netinet/sctp.h>
|
||||
#include "rlc.h"
|
||||
#include "s1ap_messages_types.h"
|
||||
#include "ngap_messages_types.h"
|
||||
|
||||
//-------------------------------------------------------------------------------------------//
|
||||
// Defines to access message fields.
|
||||
@@ -290,6 +291,7 @@ typedef struct f1ap_drb_to_be_setup_s {
|
||||
f1ap_up_tnl_t up_dl_tnl[2];
|
||||
uint8_t up_dl_tnl_length;
|
||||
rlc_mode_t rlc_mode;
|
||||
nssai_t nssai;
|
||||
} f1ap_drb_to_be_setup_t;
|
||||
|
||||
typedef struct f1ap_srb_to_be_setup_s {
|
||||
|
||||
@@ -398,15 +398,12 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
|
||||
/* 12.1.2.2 sNSSAI */
|
||||
{
|
||||
/* sST */
|
||||
OCTET_STRING_fromBuf(&DRB_Information->sNSSAI.sST, "1", 1);
|
||||
OCTET_STRING_fromBuf(&DRB_Information->sNSSAI.sST, (char *)&f1ap_ue_context_setup_req->drbs_to_be_setup[i].nssai.sst, 1);
|
||||
|
||||
/* OPTIONAL */
|
||||
/* sD */
|
||||
if (0) {
|
||||
asn1cCalloc(DRB_Information->sNSSAI.sD, tmp);
|
||||
OCTET_STRING_fromBuf(tmp, "asdsa1d32sa1d31asd31as",
|
||||
strlen("asdsa1d32sa1d31asd31as"));
|
||||
}
|
||||
const uint32_t sd = (f1ap_ue_context_setup_req->drbs_to_be_setup[i].nssai.sd & 0xffffff);
|
||||
if (sd != 0xffffff)
|
||||
OCTET_STRING_fromBuf(DRB_Information->sNSSAI.sD, (char *)&sd, 3);
|
||||
}
|
||||
|
||||
/* OPTIONAL */
|
||||
@@ -1313,16 +1310,12 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
|
||||
/* 12.1.2.2 sNSSAI */
|
||||
{
|
||||
/* sST */
|
||||
|
||||
OCTET_STRING_fromBuf(&DRB_Information->sNSSAI.sST, "1", 1);
|
||||
OCTET_STRING_fromBuf(&DRB_Information->sNSSAI.sST, (char *)&f1ap_ue_context_modification_req->drbs_to_be_setup[i].nssai.sst, 1);
|
||||
|
||||
/* OPTIONAL */
|
||||
/* sD */
|
||||
if (0) {
|
||||
asn1cCalloc(DRB_Information->sNSSAI.sD, tmp);
|
||||
OCTET_STRING_fromBuf(tmp, "asdsa1d32sa1d31asd31as",
|
||||
strlen("asdsa1d32sa1d31asd31as"));
|
||||
}
|
||||
const uint32_t sd = (f1ap_ue_context_modification_req->drbs_to_be_setup[i].nssai.sd & 0xffffff);
|
||||
if (sd != 0xffffff)
|
||||
OCTET_STRING_fromBuf(DRB_Information->sNSSAI.sD, (char *)&sd, 3);
|
||||
}
|
||||
|
||||
/* OPTIONAL */
|
||||
|
||||
@@ -879,6 +879,27 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, sctp_assoc_t
|
||||
drb_p->rlc_mode = RLC_MODE_TM;
|
||||
break;
|
||||
}
|
||||
|
||||
if (drbs_tobesetupmod_item_p->qoSInformation.present == F1AP_QoSInformation_PR_eUTRANQoS) {
|
||||
AssertFatal(false, "Decode of eUTRANQoS is not implemented yet");
|
||||
} // EUTRAN QoS Information
|
||||
else {
|
||||
/* 12.1.2 DRB_Information */
|
||||
if (drbs_tobesetupmod_item_p->qoSInformation.present == F1AP_QoSInformation_PR_choice_extension) {
|
||||
F1AP_QoSInformation_ExtIEs_t *ie =
|
||||
(F1AP_QoSInformation_ExtIEs_t *)drbs_tobesetupmod_item_p->qoSInformation.choice.choice_extension;
|
||||
if (ie->id == F1AP_ProtocolIE_ID_id_DRB_Information && ie->criticality == F1AP_Criticality_reject
|
||||
&& ie->value.present == F1AP_QoSInformation_ExtIEs__value_PR_DRB_Information) {
|
||||
F1AP_DRB_Information_t *DRB_Information = &ie->value.choice.DRB_Information;
|
||||
/* S-NSSAI */
|
||||
OCTET_STRING_TO_INT8(&DRB_Information->sNSSAI.sST, drb_p->nssai.sst);
|
||||
if (DRB_Information->sNSSAI.sD != NULL)
|
||||
memcpy((uint8_t *)&drb_p->nssai.sd, DRB_Information->sNSSAI.sD->buf, 3);
|
||||
else
|
||||
drb_p->nssai.sd = 0xffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user