Commit e667c572 authored by winckel's avatar winckel

Corrected "rrc_TransactionIdentifier" in some DCCH messages.

Corrected instance number and origin task in some GENERIC_LOG messages.
-

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4518 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent c76bcd2e
...@@ -1052,7 +1052,7 @@ uint8_t do_RRCConnectionRequest(uint8_t *buffer,uint8_t *rv) { ...@@ -1052,7 +1052,7 @@ uint8_t do_RRCConnectionRequest(uint8_t *buffer,uint8_t *rv) {
} }
uint8_t do_RRCConnectionSetupComplete(uint8_t *buffer, const int dedicatedInfoNASLength, const char *dedicatedInfoNAS) { uint8_t do_RRCConnectionSetupComplete(uint8_t *buffer, const uint8_t Transaction_id, const int dedicatedInfoNASLength, const char *dedicatedInfoNAS) {
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
...@@ -1067,7 +1067,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t *buffer, const int dedicatedInfoNA ...@@ -1067,7 +1067,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t *buffer, const int dedicatedInfoNA
ul_dcch_msg.message.choice.c1.present = UL_DCCH_MessageType__c1_PR_rrcConnectionSetupComplete; ul_dcch_msg.message.choice.c1.present = UL_DCCH_MessageType__c1_PR_rrcConnectionSetupComplete;
rrcConnectionSetupComplete = &ul_dcch_msg.message.choice.c1.choice.rrcConnectionSetupComplete; rrcConnectionSetupComplete = &ul_dcch_msg.message.choice.c1.choice.rrcConnectionSetupComplete;
rrcConnectionSetupComplete->rrc_TransactionIdentifier = 0x2; rrcConnectionSetupComplete->rrc_TransactionIdentifier = Transaction_id;
rrcConnectionSetupComplete->criticalExtensions.present = RRCConnectionSetupComplete__criticalExtensions_PR_c1; rrcConnectionSetupComplete->criticalExtensions.present = RRCConnectionSetupComplete__criticalExtensions_PR_c1;
rrcConnectionSetupComplete->criticalExtensions.choice.c1.present = RRCConnectionSetupComplete__criticalExtensions__c1_PR_rrcConnectionSetupComplete_r8; rrcConnectionSetupComplete->criticalExtensions.choice.c1.present = RRCConnectionSetupComplete__criticalExtensions__c1_PR_rrcConnectionSetupComplete_r8;
...@@ -1112,7 +1112,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t *buffer, const int dedicatedInfoNA ...@@ -1112,7 +1112,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t *buffer, const int dedicatedInfoNA
} }
uint8_t do_RRCConnectionReconfigurationComplete(uint8_t *buffer) { uint8_t do_RRCConnectionReconfigurationComplete(uint8_t *buffer, const uint8_t Transaction_id) {
asn_enc_rval_t enc_rval; asn_enc_rval_t enc_rval;
...@@ -1127,7 +1127,7 @@ uint8_t do_RRCConnectionReconfigurationComplete(uint8_t *buffer) { ...@@ -1127,7 +1127,7 @@ uint8_t do_RRCConnectionReconfigurationComplete(uint8_t *buffer) {
ul_dcch_msg.message.choice.c1.present = UL_DCCH_MessageType__c1_PR_rrcConnectionReconfigurationComplete; ul_dcch_msg.message.choice.c1.present = UL_DCCH_MessageType__c1_PR_rrcConnectionReconfigurationComplete;
rrcConnectionReconfigurationComplete = &ul_dcch_msg.message.choice.c1.choice.rrcConnectionReconfigurationComplete; rrcConnectionReconfigurationComplete = &ul_dcch_msg.message.choice.c1.choice.rrcConnectionReconfigurationComplete;
rrcConnectionReconfigurationComplete->rrc_TransactionIdentifier = 0x2; rrcConnectionReconfigurationComplete->rrc_TransactionIdentifier = Transaction_id;
rrcConnectionReconfigurationComplete->criticalExtensions.present = RRCConnectionReconfigurationComplete__criticalExtensions_PR_rrcConnectionReconfigurationComplete_r8; rrcConnectionReconfigurationComplete->criticalExtensions.present = RRCConnectionReconfigurationComplete__criticalExtensions_PR_rrcConnectionReconfigurationComplete_r8;
rrcConnectionReconfigurationComplete->criticalExtensions.choice.rrcConnectionReconfigurationComplete_r8.nonCriticalExtension=NULL; rrcConnectionReconfigurationComplete->criticalExtensions.choice.rrcConnectionReconfigurationComplete_r8.nonCriticalExtension=NULL;
......
...@@ -114,12 +114,12 @@ uint8_t do_RRCConnectionRequest(uint8_t *buffer,u8 *rv); ...@@ -114,12 +114,12 @@ uint8_t do_RRCConnectionRequest(uint8_t *buffer,u8 *rv);
/** \brief Generate an RRCConnectionSetupComplete UL-DCCH-Message (UE) /** \brief Generate an RRCConnectionSetupComplete UL-DCCH-Message (UE)
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU @param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionSetupComplete(uint8_t *buffer, const int dedicatedInfoNASLength, const char *dedicatedInfoNAS); uint8_t do_RRCConnectionSetupComplete(uint8_t *buffer, const uint8_t Transaction_id, const int dedicatedInfoNASLength, const char *dedicatedInfoNAS);
/** \brief Generate an RRCConnectionReconfigurationComplete UL-DCCH-Message (UE) /** \brief Generate an RRCConnectionReconfigurationComplete UL-DCCH-Message (UE)
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU @param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionReconfigurationComplete(uint8_t *buffer); uint8_t do_RRCConnectionReconfigurationComplete(uint8_t *buffer, const uint8_t Transaction_id);
/** /**
\brief Generate an RRCConnectionSetup DL-CCCH-Message (eNB). This routine configures SRB_ToAddMod (SRB1/SRB2) and \brief Generate an RRCConnectionSetup DL-CCCH-Message (eNB). This routine configures SRB_ToAddMod (SRB1/SRB2) and
......
...@@ -452,7 +452,7 @@ void rrc_ue_generate_RRCConnectionRequest(u8 Mod_id, u32 frame, u8 eNB_index); ...@@ -452,7 +452,7 @@ void rrc_ue_generate_RRCConnectionRequest(u8 Mod_id, u32 frame, u8 eNB_index);
\param Mod_id Instance ID of UE \param Mod_id Instance ID of UE
\param frame Frame index \param frame Frame index
\param eNB_index Index of corresponding eNB/CH*/ \param eNB_index Index of corresponding eNB/CH*/
void rrc_ue_generate_RRCConnectionSetupComplete(u8 Mod_id,u32 frame,u8 eNB_index); void rrc_ue_generate_RRCConnectionSetupComplete(u8 Mod_id,u32 frame,u8 eNB_index, uint8_t Transaction_id);
/** \brief process the received rrcConnectionReconfiguration message at UE /** \brief process the received rrcConnectionReconfiguration message at UE
\param Mod_id Instance ID of UE \param Mod_id Instance ID of UE
...@@ -465,7 +465,7 @@ void rrc_ue_process_rrcConnectionReconfiguration(u8 Mod_id, u32 frame,RRCConnect ...@@ -465,7 +465,7 @@ void rrc_ue_process_rrcConnectionReconfiguration(u8 Mod_id, u32 frame,RRCConnect
\param Mod_id Instance ID of UE \param Mod_id Instance ID of UE
\param frame Frame index \param frame Frame index
\param eNB_index Index of corresponding eNB/CH*/ \param eNB_index Index of corresponding eNB/CH*/
void rrc_ue_generate_RRCConnectionReconfigurationComplete(u8 Mod_id, u32 frame, u8 eNB_index); void rrc_ue_generate_RRCConnectionReconfigurationComplete(u8 Mod_id, u32 frame, u8 eNB_index, uint8_t Transaction_id);
/** \brief Establish SRB1 based on configuration in SRB_ToAddMod structure. Configures RLC/PDCP accordingly /** \brief Establish SRB1 based on configuration in SRB_ToAddMod structure. Configures RLC/PDCP accordingly
\param Mod_id Instance ID of UE \param Mod_id Instance ID of UE
......
...@@ -269,13 +269,13 @@ static const char nas_attach_req_guti[] = ...@@ -269,13 +269,13 @@ static const char nas_attach_req_guti[] =
}; };
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
void rrc_ue_generate_RRCConnectionSetupComplete(u8 Mod_id, u32 frame, u8 eNB_index){ void rrc_ue_generate_RRCConnectionSetupComplete(u8 Mod_id, u32 frame, u8 eNB_index, uint8_t Transaction_id){
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
u8 buffer[100]; u8 buffer[100];
u8 size; u8 size;
size = do_RRCConnectionSetupComplete(buffer, sizeof(nas_attach_req_guti), nas_attach_req_guti); size = do_RRCConnectionSetupComplete(buffer, Transaction_id, sizeof(nas_attach_req_guti), nas_attach_req_guti);
LOG_I(RRC,"[UE %d][RAPROC] Frame %d : Logical Channel UL-DCCH (SRB1), Generating RRCConnectionSetupComplete (bytes%d, eNB %d)\n", LOG_I(RRC,"[UE %d][RAPROC] Frame %d : Logical Channel UL-DCCH (SRB1), Generating RRCConnectionSetupComplete (bytes%d, eNB %d)\n",
Mod_id,frame, size, eNB_index); Mod_id,frame, size, eNB_index);
...@@ -290,11 +290,11 @@ void rrc_ue_generate_RRCConnectionSetupComplete(u8 Mod_id, u32 frame, u8 eNB_ind ...@@ -290,11 +290,11 @@ void rrc_ue_generate_RRCConnectionSetupComplete(u8 Mod_id, u32 frame, u8 eNB_ind
void rrc_ue_generate_RRCConnectionReconfigurationComplete(u8 Mod_id, u32 frame, u8 eNB_index) { void rrc_ue_generate_RRCConnectionReconfigurationComplete(u8 Mod_id, u32 frame, u8 eNB_index, uint8_t Transaction_id) {
u8 buffer[32], size; u8 buffer[32], size;
size = do_RRCConnectionReconfigurationComplete(buffer); size = do_RRCConnectionReconfigurationComplete(buffer, Transaction_id);
LOG_I(RRC,"[UE %d] Frame %d : Logical Channel UL-DCCH (SRB1), Generating RRCConnectionReconfigurationComplete (bytes %d, eNB_index %d)\n", LOG_I(RRC,"[UE %d] Frame %d : Logical Channel UL-DCCH (SRB1), Generating RRCConnectionReconfigurationComplete (bytes %d, eNB_index %d)\n",
Mod_id,frame, size, eNB_index); Mod_id,frame, size, eNB_index);
...@@ -353,10 +353,10 @@ int rrc_ue_decode_ccch(u8 Mod_id, u32 frame, SRB_INFO *Srb_info, u8 eNB_index){ ...@@ -353,10 +353,10 @@ int rrc_ue_decode_ccch(u8 Mod_id, u32 frame, SRB_INFO *Srb_info, u8 eNB_index){
size_t message_string_size; size_t message_string_size;
message_string_size = strlen(message_string); message_string_size = strlen(message_string);
message_p = itti_alloc_new_message_sized (TASK_RRC_ENB, GENERIC_LOG, message_string_size); message_p = itti_alloc_new_message_sized (TASK_RRC_UE, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size); memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p); itti_send_msg_to_task(TASK_UNKNOWN, Mod_id + NB_eNB_INST, message_p);
free(message_string); free(message_string);
} }
...@@ -376,50 +376,59 @@ int rrc_ue_decode_ccch(u8 Mod_id, u32 frame, SRB_INFO *Srb_info, u8 eNB_index){ ...@@ -376,50 +376,59 @@ int rrc_ue_decode_ccch(u8 Mod_id, u32 frame, SRB_INFO *Srb_info, u8 eNB_index){
switch (dl_ccch_msg->message.choice.c1.present) { switch (dl_ccch_msg->message.choice.c1.present) {
case DL_CCCH_MessageType__c1_PR_NOTHING : case DL_CCCH_MessageType__c1_PR_NOTHING:
LOG_I(RRC, "[UE%d] Frame %d : Received PR_NOTHING on DL-CCCH-Message\n", Mod_id, frame);
LOG_I(RRC,"[UE%d] Frame %d : Received PR_NOTHING on DL-CCCH-Message\n",Mod_id,frame); rval = 0;
rval= 0; break;
break;
case DL_CCCH_MessageType__c1_PR_rrcConnectionReestablishment: case DL_CCCH_MessageType__c1_PR_rrcConnectionReestablishment:
LOG_D(RRC, "[MSC_MSG][FRAME %05d][MAC_UE][MOD %02d][][--- MAC_DATA_IND (rrcConnectionReestablishment ENB %d) --->][RRC_UE][MOD %02d][]\n", LOG_D(RRC,
frame, Mod_id+NB_eNB_INST, eNB_index, Mod_id+NB_eNB_INST); "[MSC_MSG][FRAME %05d][MAC_UE][MOD %02d][][--- MAC_DATA_IND (rrcConnectionReestablishment ENB %d) --->][RRC_UE][MOD %02d][]\n", frame, Mod_id+NB_eNB_INST, eNB_index, Mod_id+NB_eNB_INST);
LOG_I(RRC,"[UE%d] Frame %d : Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishment\n",Mod_id,frame); LOG_I(RRC,
rval= 0; "[UE%d] Frame %d : Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishment\n", Mod_id, frame);
break; rval = 0;
case DL_CCCH_MessageType__c1_PR_rrcConnectionReestablishmentReject: break;
LOG_D(RRC, "[MSC_MSG][FRAME %05d][MAC_UE][MOD %02d][][--- MAC_DATA_IND (RRCConnectionReestablishmentReject ENB %d) --->][RRC_UE][MOD %02d][]\n",
frame, Mod_id+NB_eNB_INST, eNB_index, Mod_id+NB_eNB_INST); case DL_CCCH_MessageType__c1_PR_rrcConnectionReestablishmentReject:
LOG_I(RRC,"[UE%d] Frame %d : Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishmentReject\n",Mod_id,frame); LOG_D(RRC,
rval= 0; "[MSC_MSG][FRAME %05d][MAC_UE][MOD %02d][][--- MAC_DATA_IND (RRCConnectionReestablishmentReject ENB %d) --->][RRC_UE][MOD %02d][]\n", frame, Mod_id+NB_eNB_INST, eNB_index, Mod_id+NB_eNB_INST);
break; LOG_I(RRC,
case DL_CCCH_MessageType__c1_PR_rrcConnectionReject: "[UE%d] Frame %d : Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishmentReject\n", Mod_id, frame);
LOG_D(RRC, "[MSC_MSG][FRAME %05d][MAC_UE][MOD %02d][][--- MAC_DATA_IND (rrcConnectionReject ENB %d) --->][RRC_UE][MOD %02d][]\n", rval = 0;
frame, Mod_id+NB_eNB_INST, eNB_index, Mod_id+NB_eNB_INST); break;
LOG_I(RRC,"[UE%d] Frame %d : Logical Channel DL-CCCH (SRB0), Received RRCConnectionReject \n",Mod_id,frame); case DL_CCCH_MessageType__c1_PR_rrcConnectionReject:
rval= 0; LOG_D(RRC,
break; "[MSC_MSG][FRAME %05d][MAC_UE][MOD %02d][][--- MAC_DATA_IND (rrcConnectionReject ENB %d) --->][RRC_UE][MOD %02d][]\n", frame, Mod_id+NB_eNB_INST, eNB_index, Mod_id+NB_eNB_INST);
case DL_CCCH_MessageType__c1_PR_rrcConnectionSetup:
LOG_D(RRC, "[MSC_MSG][FRAME %05d][MAC_UE][MOD %02d][][--- MAC_DATA_IND (rrcConnectionSetup ENB %d) --->][RRC_UE][MOD %02d][]\n", LOG_I(RRC,
frame, Mod_id+NB_eNB_INST, eNB_index, Mod_id+NB_eNB_INST); "[UE%d] Frame %d : Logical Channel DL-CCCH (SRB0), Received RRCConnectionReject \n", Mod_id, frame);
rval = 0;
LOG_I(RRC,"[UE%d][RAPROC] Frame %d : Logical Channel DL-CCCH (SRB0), Received RRCConnectionSetup \n",Mod_id,frame); break;
// Get configuration
case DL_CCCH_MessageType__c1_PR_rrcConnectionSetup:
// Release T300 timer LOG_D(RRC,
UE_rrc_inst[Mod_id].Info[eNB_index].T300_active=0; "[MSC_MSG][FRAME %05d][MAC_UE][MOD %02d][][--- MAC_DATA_IND (rrcConnectionSetup ENB %d) --->][RRC_UE][MOD %02d][]\n", frame, Mod_id+NB_eNB_INST, eNB_index, Mod_id+NB_eNB_INST);
rrc_ue_process_radioResourceConfigDedicated(Mod_id,frame,eNB_index,
&dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup.criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated); LOG_I(RRC,
"[UE%d][RAPROC] Frame %d : Logical Channel DL-CCCH (SRB0), Received RRCConnectionSetup \n", Mod_id, frame);
rrc_ue_generate_RRCConnectionSetupComplete(Mod_id,frame, eNB_index); // Get configuration
rval= 0; // Release T300 timer
break; UE_rrc_inst[Mod_id].Info[eNB_index].T300_active = 0;
default: rrc_ue_process_radioResourceConfigDedicated(Mod_id, frame, eNB_index,
LOG_E(RRC,"[UE%d] Frame %d : Unknown message\n",Mod_id,frame); &dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup.criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated);
rval= -1;
rrc_ue_generate_RRCConnectionSetupComplete(Mod_id, frame, eNB_index, dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup.rrc_TransactionIdentifier);
rval = 0;
break;
default:
LOG_E(RRC, "[UE%d] Frame %d : Unknown message\n", Mod_id, frame);
rval = -1;
break;
} }
} }
} }
...@@ -1128,6 +1137,7 @@ void rrc_ue_process_ueCapabilityEnquiry(uint8_t Mod_id,uint32_t frame,UECapabili ...@@ -1128,6 +1137,7 @@ void rrc_ue_process_ueCapabilityEnquiry(uint8_t Mod_id,uint32_t frame,UECapabili
ul_dcch_msg.message.present = UL_DCCH_MessageType_PR_c1; ul_dcch_msg.message.present = UL_DCCH_MessageType_PR_c1;
ul_dcch_msg.message.choice.c1.present = UL_DCCH_MessageType__c1_PR_ueCapabilityInformation; ul_dcch_msg.message.choice.c1.present = UL_DCCH_MessageType__c1_PR_ueCapabilityInformation;
ul_dcch_msg.message.choice.c1.choice.ueCapabilityInformation.rrc_TransactionIdentifier = UECapabilityEnquiry->rrc_TransactionIdentifier;
ue_CapabilityRAT_Container.rat_Type = RAT_Type_eutra; ue_CapabilityRAT_Container.rat_Type = RAT_Type_eutra;
OCTET_STRING_fromBuf(&ue_CapabilityRAT_Container.ueCapabilityRAT_Container, OCTET_STRING_fromBuf(&ue_CapabilityRAT_Container.ueCapabilityRAT_Container,
...@@ -1145,22 +1155,20 @@ void rrc_ue_process_ueCapabilityEnquiry(uint8_t Mod_id,uint32_t frame,UECapabili ...@@ -1145,22 +1155,20 @@ void rrc_ue_process_ueCapabilityEnquiry(uint8_t Mod_id,uint32_t frame,UECapabili
for (i=0;i<UECapabilityEnquiry->criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list.count;i++) { for (i=0;i<UECapabilityEnquiry->criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list.count;i++) {
if (*UECapabilityEnquiry->criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list.array[i]==RAT_Type_eutra) { if (*UECapabilityEnquiry->criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list.array[i]
// ul_dcch_msg.message.choice.c1.choice.ueCapabilityInformation.rrc_TransactionIdentifier = UECapabilityEnquiry->rrc_TransactionIdentifier; == RAT_Type_eutra) {
ASN_SEQUENCE_ADD(&ul_dcch_msg.message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list, ASN_SEQUENCE_ADD(
&ue_CapabilityRAT_Container); &ul_dcch_msg.message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list,
&ue_CapabilityRAT_Container);
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message, enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message, (void*) &ul_dcch_msg, buffer, 100);
(void*)&ul_dcch_msg,
buffer,
100);
#ifdef XER_PRINT #ifdef XER_PRINT
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
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"UECapabilityInformation Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); LOG_D(RRC,"UECapabilityInformation Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif #endif
for (i = 0; i < (enc_rval.encoded + 7) / 8; i++) for (i = 0; i < (enc_rval.encoded + 7) / 8; i++)
LOG_T(RRC, "%02x.", buffer[i]); LOG_T(RRC, "%02x.", buffer[i]);
...@@ -1383,7 +1391,7 @@ void rrc_ue_decode_dcch(u8 Mod_id,u32 frame,u8 Srb_id, u8 *Buffer,u8 eNB_index) ...@@ -1383,7 +1391,7 @@ void rrc_ue_decode_dcch(u8 Mod_id,u32 frame,u8 Srb_id, u8 *Buffer,u8 eNB_index)
message_p = itti_alloc_new_message_sized (TASK_RRC_UE, GENERIC_LOG, message_string_size); message_p = itti_alloc_new_message_sized (TASK_RRC_UE, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size); memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p); itti_send_msg_to_task(TASK_UNKNOWN, Mod_id + NB_eNB_INST, message_p);
free(message_string); free(message_string);
} }
...@@ -1397,101 +1405,125 @@ void rrc_ue_decode_dcch(u8 Mod_id,u32 frame,u8 Srb_id, u8 *Buffer,u8 eNB_index) ...@@ -1397,101 +1405,125 @@ void rrc_ue_decode_dcch(u8 Mod_id,u32 frame,u8 Srb_id, u8 *Buffer,u8 eNB_index)
switch (dl_dcch_msg->message.choice.c1.present) { switch (dl_dcch_msg->message.choice.c1.present) {
case DL_DCCH_MessageType__c1_PR_NOTHING : case DL_DCCH_MessageType__c1_PR_NOTHING:
LOG_I(RRC,"[UE %d] Frame %d : Received PR_NOTHING on DL-DCCH-Message\n",Mod_id,frame); LOG_I(RRC, "[UE %d] Frame %d : Received PR_NOTHING on DL-DCCH-Message\n", Mod_id, frame);
return; return;
case DL_DCCH_MessageType__c1_PR_csfbParametersResponseCDMA2000: case DL_DCCH_MessageType__c1_PR_csfbParametersResponseCDMA2000:
break; break;
case DL_DCCH_MessageType__c1_PR_dlInformationTransfer:
{ case DL_DCCH_MessageType__c1_PR_dlInformationTransfer: {
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
DLInformationTransfer_t *dlInformationTransfer = &dl_dcch_msg->message.choice.c1.choice.dlInformationTransfer; DLInformationTransfer_t *dlInformationTransfer = &dl_dcch_msg->message.choice.c1.choice.dlInformationTransfer;
if ((dlInformationTransfer->criticalExtensions.present == DLInformationTransfer__criticalExtensions_PR_c1) if ((dlInformationTransfer->criticalExtensions.present == DLInformationTransfer__criticalExtensions_PR_c1)
&& (dlInformationTransfer->criticalExtensions.choice.c1.present == DLInformationTransfer__criticalExtensions__c1_PR_dlInformationTransfer_r8) && (dlInformationTransfer->criticalExtensions.choice.c1.present
&& (dlInformationTransfer->criticalExtensions.choice.c1.choice.dlInformationTransfer_r8.dedicatedInfoType.present == DLInformationTransfer_r8_IEs__dedicatedInfoType_PR_dedicatedInfoNAS)) == DLInformationTransfer__criticalExtensions__c1_PR_dlInformationTransfer_r8)
{ && (dlInformationTransfer->criticalExtensions.choice.c1.choice.dlInformationTransfer_r8.dedicatedInfoType.present
/* This message hold a dedicated info NAS payload, forward it to NAS */ == DLInformationTransfer_r8_IEs__dedicatedInfoType_PR_dedicatedInfoNAS)) {
struct DLInformationTransfer_r8_IEs__dedicatedInfoType *dedicatedInfoType = /* This message hold a dedicated info NAS payload, forward it to NAS */
&dlInformationTransfer->criticalExtensions.choice.c1.choice.dlInformationTransfer_r8.dedicatedInfoType; struct DLInformationTransfer_r8_IEs__dedicatedInfoType *dedicatedInfoType =
uint32_t pdu_length; &dlInformationTransfer->criticalExtensions.choice.c1.choice.dlInformationTransfer_r8.dedicatedInfoType;
uint8_t *pdu_buffer; uint32_t pdu_length;
MessageDef *msg_p; uint8_t *pdu_buffer;
MessageDef *msg_p;
pdu_length = dedicatedInfoType->choice.dedicatedInfoNAS.size;
pdu_buffer = dedicatedInfoType->choice.dedicatedInfoNAS.buf; pdu_length = dedicatedInfoType->choice.dedicatedInfoNAS.size;
pdu_buffer = dedicatedInfoType->choice.dedicatedInfoNAS.buf;
msg_p = itti_alloc_new_message(TASK_RRC_UE, NAS_DOWNLINK_DATA_IND);
NAS_DOWNLINK_DATA_IND (msg_p).UEid = Mod_id; // TODO set the UEid to something else ? msg_p = itti_alloc_new_message(TASK_RRC_UE, NAS_DOWNLINK_DATA_IND);
NAS_DOWNLINK_DATA_IND (msg_p).nasMsg.length = pdu_length; NAS_DOWNLINK_DATA_IND(msg_p).UEid = Mod_id; // TODO set the UEid to something else ?
NAS_DOWNLINK_DATA_IND (msg_p).nasMsg.data = pdu_buffer; NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.length = pdu_length;
NAS_DOWNLINK_DATA_IND(msg_p).nasMsg.data = pdu_buffer;
itti_send_msg_to_task(TASK_NAS_UE, Mod_id + NB_eNB_INST, msg_p);
} itti_send_msg_to_task(TASK_NAS_UE, Mod_id + NB_eNB_INST, msg_p);
}
#endif #endif
break; break;
} }
case DL_DCCH_MessageType__c1_PR_handoverFromEUTRAPreparationRequest:
break;
case DL_DCCH_MessageType__c1_PR_mobilityFromEUTRACommand:
break;
case DL_DCCH_MessageType__c1_PR_rrcConnectionReconfiguration:
// first check if mobilityControlInfo is present
if (dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo
!= NULL) {
/* 36.331, 5.3.5.4 Reception of an RRCConnectionReconfiguration including the mobilityControlInfo by the UE (handover)*/
if (UE_rrc_inst[Mod_id].HandoverInfoUe.targetCellId
!= dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo->targetPhysCellId) {
LOG_W(RRC,
"[UE %d] Frame %d: Handover target (%d) is different from RSRP measured target (%d)..\n", Mod_id, frame, dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo->targetPhysCellId, UE_rrc_inst[Mod_id].HandoverInfoUe.targetCellId);
return;
}
else
if ((target_eNB_index = get_adjacent_cell_mod_id(UE_rrc_inst[Mod_id].HandoverInfoUe.targetCellId))
== 0xFF) {
LOG_W(RRC,
"[UE %d] Frame %d: Mod_id of the target eNB not found, check the network topology\n", Mod_id, frame);
return;
}
else {
LOG_I(RRC,
"[UE% d] Frame %d: Received rrcConnectionReconfiguration with mobilityControlInfo \n", Mod_id, frame);
UE_rrc_inst[Mod_id].HandoverInfoUe.measFlag = 1; // Ready to send more MeasReports if required
}
}
rrc_ue_process_rrcConnectionReconfiguration(Mod_id, frame,
&dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration, eNB_index);
if (target_eNB_index != 0xFF) {
rrc_ue_generate_RRCConnectionReconfigurationComplete(Mod_id, frame, target_eNB_index,
dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.rrc_TransactionIdentifier);
UE_rrc_inst[Mod_id].Info[eNB_index].State = RRC_HO_EXECUTION;
UE_rrc_inst[Mod_id].Info[target_eNB_index].State = RRC_RECONFIGURED;
LOG_I(RRC, "[UE %d] State = RRC_RECONFIGURED during HO (eNB %d)\n", Mod_id, target_eNB_index);
}
else {
rrc_ue_generate_RRCConnectionReconfigurationComplete(Mod_id, frame, eNB_index,
dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.rrc_TransactionIdentifier);
UE_rrc_inst[Mod_id].Info[eNB_index].State = RRC_RECONFIGURED;
LOG_I(RRC, "[UE %d] State = RRC_RECONFIGURED (eNB %d)\n", Mod_id, eNB_index);
}
break;
case DL_DCCH_MessageType__c1_PR_rrcConnectionRelease:
break;
case DL_DCCH_MessageType__c1_PR_securityModeCommand:
LOG_I(RRC, "[UE %d] Received securityModeCommand (eNB %d)\n", Mod_id, eNB_index);
rrc_ue_process_securityModeCommand(Mod_id, frame, &dl_dcch_msg->message.choice.c1.choice.securityModeCommand,
eNB_index);
break;
case DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry:
LOG_I(RRC, "[UE %d] Received Capability Enquiry (eNB %d)\n", Mod_id, eNB_index);
rrc_ue_process_ueCapabilityEnquiry(Mod_id, frame, &dl_dcch_msg->message.choice.c1.choice.ueCapabilityEnquiry,
eNB_index);
break;
case DL_DCCH_MessageType__c1_PR_counterCheck:
break;
case DL_DCCH_MessageType__c1_PR_handoverFromEUTRAPreparationRequest:
break;
case DL_DCCH_MessageType__c1_PR_mobilityFromEUTRACommand:
break;
case DL_DCCH_MessageType__c1_PR_rrcConnectionReconfiguration:
// first check if mobilityControlInfo is present
if(dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo != NULL) {
/* 36.331, 5.3.5.4 Reception of an RRCConnectionReconfiguration including the mobilityControlInfo by the UE (handover)*/
if(UE_rrc_inst[Mod_id].HandoverInfoUe.targetCellId != dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo->targetPhysCellId) {
LOG_W(RRC,"[UE %d] Frame %d: Handover target (%d) is different from RSRP measured target (%d)..\n",Mod_id, frame,
dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration.criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8.mobilityControlInfo->targetPhysCellId,UE_rrc_inst[Mod_id].HandoverInfoUe.targetCellId);
return;
} else if ((target_eNB_index=get_adjacent_cell_mod_id(UE_rrc_inst[Mod_id].HandoverInfoUe.targetCellId)) == 0xFF ){
LOG_W(RRC,"[UE %d] Frame %d: Mod_id of the target eNB not found, check the network topology\n",Mod_id, frame);
return;
} else {
LOG_I(RRC,"[UE% d] Frame %d: Received rrcConnectionReconfiguration with mobilityControlInfo \n", Mod_id, frame);
UE_rrc_inst[Mod_id].HandoverInfoUe.measFlag = 1; // Ready to send more MeasReports if required
}
}
rrc_ue_process_rrcConnectionReconfiguration(Mod_id,frame,&dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration,eNB_index);
if (target_eNB_index!=0xFF){
rrc_ue_generate_RRCConnectionReconfigurationComplete(Mod_id,frame,target_eNB_index);
UE_rrc_inst[Mod_id].Info[eNB_index].State = RRC_HO_EXECUTION;
UE_rrc_inst[Mod_id].Info[target_eNB_index].State = RRC_RECONFIGURED;
LOG_I(RRC,"[UE %d] State = RRC_RECONFIGURED during HO (eNB %d)\n",Mod_id,target_eNB_index);
}else {
rrc_ue_generate_RRCConnectionReconfigurationComplete(Mod_id,frame,eNB_index);
UE_rrc_inst[Mod_id].Info[eNB_index].State = RRC_RECONFIGURED;
LOG_I(RRC,"[UE %d] State = RRC_RECONFIGURED (eNB %d)\n",Mod_id,eNB_index);
}
break;
case DL_DCCH_MessageType__c1_PR_rrcConnectionRelease:
break;
case DL_DCCH_MessageType__c1_PR_securityModeCommand:
LOG_I(RRC,"[UE %d] Received securityModeCommand (eNB %d)\n",Mod_id,eNB_index);
rrc_ue_process_securityModeCommand(Mod_id,frame,&dl_dcch_msg->message.choice.c1.choice.securityModeCommand,eNB_index);
break;
case DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry:
LOG_I(RRC,"[UE %d] Received Capability Enquiry (eNB %d)\n",Mod_id,eNB_index);
rrc_ue_process_ueCapabilityEnquiry(Mod_id,frame,&dl_dcch_msg->message.choice.c1.choice.ueCapabilityEnquiry,eNB_index);
break;
case DL_DCCH_MessageType__c1_PR_counterCheck:
break;
#ifdef Rel10 #ifdef Rel10
case DL_DCCH_MessageType__c1_PR_ueInformationRequest_r9: case DL_DCCH_MessageType__c1_PR_ueInformationRequest_r9:
break; break;
case DL_DCCH_MessageType__c1_PR_loggedMeasurementConfiguration_r10: case DL_DCCH_MessageType__c1_PR_loggedMeasurementConfiguration_r10:
break; break;
case DL_DCCH_MessageType__c1_PR_rnReconfiguration_r10: case DL_DCCH_MessageType__c1_PR_rnReconfiguration_r10:
break; break;
#endif #endif
case DL_DCCH_MessageType__c1_PR_spare1:
case DL_DCCH_MessageType__c1_PR_spare2: case DL_DCCH_MessageType__c1_PR_spare1:
case DL_DCCH_MessageType__c1_PR_spare3: case DL_DCCH_MessageType__c1_PR_spare2:
case DL_DCCH_MessageType__c1_PR_spare4: case DL_DCCH_MessageType__c1_PR_spare3:
break; case DL_DCCH_MessageType__c1_PR_spare4:
default: break;
break;
default:
break;
} }
} }
} }
...@@ -1574,7 +1606,7 @@ int decode_BCCH_DLSCH_Message(u8 Mod_id,u32 frame,u8 eNB_index,u8 *Sdu,u8 Sdu_le ...@@ -1574,7 +1606,7 @@ int decode_BCCH_DLSCH_Message(u8 Mod_id,u32 frame,u8 eNB_index,u8 *Sdu,u8 Sdu_le
message_p = itti_alloc_new_message_sized (TASK_RRC_UE, GENERIC_LOG, message_string_size); message_p = itti_alloc_new_message_sized (TASK_RRC_UE, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size); memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p); itti_send_msg_to_task(TASK_UNKNOWN, Mod_id + NB_eNB_INST, message_p);
free(message_string); free(message_string);
} }
......
...@@ -539,13 +539,11 @@ void rrc_eNB_process_RRCConnectionSetupComplete (u8 Mod_id, ...@@ -539,13 +539,11 @@ void rrc_eNB_process_RRCConnectionSetupComplete (u8 Mod_id,
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
void rrc_eNB_generate_SecurityModeCommand (u8 Mod_id, u32 frame, u16 UE_index) void rrc_eNB_generate_SecurityModeCommand (u8 Mod_id, u32 frame, u16 UE_index)
{ {
uint8_t buffer[100]; uint8_t buffer[100];
uint8_t size; uint8_t size;
size = do_SecurityModeCommand (Mod_id, buffer, UE_index, 0, size = do_SecurityModeCommand(Mod_id, buffer, UE_index, rrc_eNB_get_next_transaction_identifier(Mod_id),
eNB_rrc_inst[Mod_id].ciphering_algorithm[UE_index], eNB_rrc_inst[Mod_id].ciphering_algorithm[UE_index], eNB_rrc_inst[Mod_id].integrity_algorithm[UE_index]);
eNB_rrc_inst[Mod_id].integrity_algorithm[UE_index]);
LOG_I (RRC, LOG_I (RRC,
"[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate SecurityModeCommand (bytes %d, UE id %d)\n", "[eNB %d] Frame %d, Logical Channel DL-DCCH, Generate SecurityModeCommand (bytes %d, UE id %d)\n",
...@@ -2295,7 +2293,9 @@ void rrc_eNB_generate_RRCConnectionSetup (u8 Mod_id, u32 frame, u16 UE_index) { ...@@ -2295,7 +2293,9 @@ void rrc_eNB_generate_RRCConnectionSetup (u8 Mod_id, u32 frame, u16 UE_index) {
find_UE_RNTI find_UE_RNTI
(Mod_id, (Mod_id,
UE_index)), UE_index)),
UE_index, 0, mac_xface->lte_frame_parms, UE_index,
rrc_eNB_get_next_transaction_identifier(Mod_id),
mac_xface->lte_frame_parms,
SRB_configList, SRB_configList,
&eNB_rrc_inst[Mod_id]. &eNB_rrc_inst[Mod_id].
physicalConfigDedicated[UE_index]); physicalConfigDedicated[UE_index]);
...@@ -2528,7 +2528,7 @@ int rrc_eNB_decode_ccch (u8 Mod_id, u32 frame, SRB_INFO * Srb_info) ...@@ -2528,7 +2528,7 @@ int rrc_eNB_decode_ccch (u8 Mod_id, u32 frame, SRB_INFO * Srb_info)
message_p = itti_alloc_new_message_sized (TASK_RRC_ENB, GENERIC_LOG, message_string_size); message_p = itti_alloc_new_message_sized (TASK_RRC_ENB, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size); memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p); itti_send_msg_to_task(TASK_UNKNOWN, Mod_id, message_p);
free(message_string); free(message_string);
} }
...@@ -2745,7 +2745,7 @@ int rrc_eNB_decode_dcch (u8 Mod_id, u32 frame, u8 Srb_id, u8 UE_index, ...@@ -2745,7 +2745,7 @@ int rrc_eNB_decode_dcch (u8 Mod_id, u32 frame, u8 Srb_id, u8 UE_index,
message_p = itti_alloc_new_message_sized (TASK_RRC_ENB, GENERIC_LOG, message_string_size); message_p = itti_alloc_new_message_sized (TASK_RRC_ENB, GENERIC_LOG, message_string_size);
memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size); memcpy(&message_p->ittiMsg.generic_log, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p); itti_send_msg_to_task(TASK_UNKNOWN, Mod_id, message_p);
free(message_string); free(message_string);
} }
......
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