Commit 417c7beb authored by Robert Schmidt's avatar Robert Schmidt

add UE_Capability to type eNB_RRC_UE_t and read it when received

parent faa1d219
...@@ -396,6 +396,8 @@ typedef struct eNB_RRC_UE_s { ...@@ -396,6 +396,8 @@ typedef struct eNB_RRC_UE_s {
HANDOVER_INFO* handover_info; HANDOVER_INFO* handover_info;
MeasResults_t* measResults; MeasResults_t* measResults;
UE_EUTRA_Capability_t* UE_Capability;
#if defined(ENABLE_SECURITY) #if defined(ENABLE_SECURITY)
/* KeNB as derived from KASME received from EPC */ /* KeNB as derived from KASME received from EPC */
uint8_t kenb[32]; uint8_t kenb[32];
......
...@@ -4994,7 +4994,6 @@ rrc_eNB_decode_dcch( ...@@ -4994,7 +4994,6 @@ rrc_eNB_decode_dcch(
asn_dec_rval_t dec_rval; asn_dec_rval_t dec_rval;
//UL_DCCH_Message_t uldcchmsg; //UL_DCCH_Message_t uldcchmsg;
UL_DCCH_Message_t *ul_dcch_msg = NULL; //&uldcchmsg; UL_DCCH_Message_t *ul_dcch_msg = NULL; //&uldcchmsg;
UE_EUTRA_Capability_t *UE_EUTRA_Capability = NULL;
int i; int i;
struct rrc_eNB_ue_context_s* ue_context_p = NULL; struct rrc_eNB_ue_context_s* ue_context_p = NULL;
...@@ -5385,18 +5384,33 @@ rrc_eNB_decode_dcch( ...@@ -5385,18 +5384,33 @@ rrc_eNB_decode_dcch(
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg); xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg);
#endif #endif
LOG_I(RRC, "got UE capabilities for UE %x\n", ctxt_pP->rnti); LOG_I(RRC, "got UE capabilities for UE %x\n", ctxt_pP->rnti);
if (ue_context_p->ue_context.UE_Capability) {
LOG_I(RRC, "freeing old UE capabilities for UE %x\n", ctxt_pP->rnti);
asn_DEF_UE_EUTRA_Capability.free_struct(&asn_DEF_UE_EUTRA_Capability,
ue_context_p->ue_context.UE_Capability, 0);
ue_context_p->ue_context.UE_Capability = 0;
}
dec_rval = uper_decode(NULL, dec_rval = uper_decode(NULL,
&asn_DEF_UE_EUTRA_Capability, &asn_DEF_UE_EUTRA_Capability,
(void **)&UE_EUTRA_Capability, (void **)&ue_context_p->ue_context.UE_Capability,
ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions. ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.
choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list. choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list.
array[0]->ueCapabilityRAT_Container.buf, array[0]->ueCapabilityRAT_Container.buf,
ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions. ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.
choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list. choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list.
array[0]->ueCapabilityRAT_Container.size, 0, 0); array[0]->ueCapabilityRAT_Container.size, 0, 0);
//#ifdef XER_PRINT #ifdef XER_PRINT
//xer_fprint(stdout, &asn_DEF_UE_EUTRA_Capability, (void *)UE_EUTRA_Capability); xer_fprint(stdout, &asn_DEF_UE_EUTRA_Capability, ue_context_p->ue_context.UE_Capability);
//#endif #endif
if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0)) {
LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Failed to decode UE capabilities (%zu bytes)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
dec_rval.consumed);
asn_DEF_UE_EUTRA_Capability.free_struct(&asn_DEF_UE_EUTRA_Capability,
ue_context_p->ue_context.UE_Capability, 0);
ue_context_p->ue_context.UE_Capability = 0;
}
#if defined(ENABLE_USE_MME) #if defined(ENABLE_USE_MME)
......
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