Merge remote-tracking branch 'origin/issue326_LOGreview' into develop_integration_2018_w35
Conflicts: cmake_targets/CMakeLists.txt openair1/PHY/LTE_TRANSPORT/dlsch_modulation.c openair1/SCHED_UE/phy_procedures_lte_ue.c openair2/LAYER2/MAC/eNB_scheduler_phytest.c
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
|
||||
#include "liblfds700.h"
|
||||
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
/*Flags showing if a mac agent has already been registered*/
|
||||
unsigned int mac_agent_registered[NUM_MAX_ENB];
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "liblfds700.h"
|
||||
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
/*Trigger boolean for RRC measurement*/
|
||||
bool triggered_rrc = false;
|
||||
|
||||
@@ -43,7 +43,7 @@ int load_NB_IoT(void) {
|
||||
RCConfig_NbIoT_f_t RCConfig;
|
||||
loader_shlibfunc_t shlib_fdesc[]=NBIOT_INTERFACE_FLIST;
|
||||
|
||||
ret=load_module_shlib(NBIOT_MODULENAME,shlib_fdesc,sizeof(shlib_fdesc)/sizeof(loader_shlibfunc_t));
|
||||
ret=load_module_shlib(NBIOT_MODULENAME,shlib_fdesc,sizeof(shlib_fdesc)/sizeof(loader_shlibfunc_t),NULL);
|
||||
if (ret) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
+55
-51
@@ -35,7 +35,7 @@
|
||||
#include "assertions.h"
|
||||
#include "common/ran_context.h"
|
||||
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
@@ -44,6 +44,8 @@
|
||||
# include "s1ap_eNB.h"
|
||||
# include "sctp_eNB_task.h"
|
||||
# include "gtpv1u_eNB_task.h"
|
||||
# else
|
||||
# define EPC_MODE_ENABLED 0
|
||||
# endif
|
||||
|
||||
//# include "x2ap_eNB.h"
|
||||
@@ -171,7 +173,7 @@ void *eNB_app_task(void *args_p)
|
||||
uint32_t enb_id_start = 0;
|
||||
uint32_t enb_id_end = enb_id_start + enb_nb;
|
||||
# if defined(ENABLE_USE_MME)
|
||||
uint32_t register_enb_pending;
|
||||
uint32_t register_enb_pending=0;
|
||||
uint32_t registered_enb;
|
||||
long enb_register_retry_timer_id;
|
||||
# endif
|
||||
@@ -215,13 +217,13 @@ void *eNB_app_task(void *args_p)
|
||||
|
||||
# if defined(ENABLE_USE_MME)
|
||||
/* Try to register each eNB */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
||||
# else
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
||||
#else
|
||||
/* Start L2L1 task */
|
||||
msg_p = itti_alloc_new_message(TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_p);
|
||||
# endif
|
||||
msg_p = itti_alloc_new_message(TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task(TASK_L2L1, INSTANCE_DEFAULT, msg_p);
|
||||
#endif
|
||||
|
||||
/* Try to register each eNB with each other */
|
||||
// x2_registered_enb = 0;
|
||||
@@ -243,66 +245,68 @@ void *eNB_app_task(void *args_p)
|
||||
LOG_I(ENB_APP, "Received %s\n", ITTI_MSG_NAME(msg_p));
|
||||
break;
|
||||
|
||||
# if defined(ENABLE_USE_MME)
|
||||
|
||||
case S1AP_REGISTER_ENB_CNF:
|
||||
LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
|
||||
# if defined(ENABLE_USE_MME)
|
||||
LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
|
||||
|
||||
DevAssert(register_enb_pending > 0);
|
||||
register_enb_pending--;
|
||||
DevAssert(register_enb_pending > 0);
|
||||
register_enb_pending--;
|
||||
|
||||
/* Check if at least eNB is registered with one MME */
|
||||
if (S1AP_REGISTER_ENB_CNF(msg_p).nb_mme > 0) {
|
||||
registered_enb++;
|
||||
}
|
||||
/* Check if at least eNB is registered with one MME */
|
||||
if (S1AP_REGISTER_ENB_CNF(msg_p).nb_mme > 0) {
|
||||
registered_enb++;
|
||||
}
|
||||
|
||||
/* Check if all register eNB requests have been processed */
|
||||
if (register_enb_pending == 0) {
|
||||
if (registered_enb == enb_nb) {
|
||||
/* If all eNB are registered, start L2L1 task */
|
||||
MessageDef *msg_init_p;
|
||||
/* Check if all register eNB requests have been processed */
|
||||
if (register_enb_pending == 0) {
|
||||
if (registered_enb == enb_nb) {
|
||||
/* If all eNB are registered, start L2L1 task */
|
||||
MessageDef *msg_init_p;
|
||||
|
||||
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, INITIALIZE_MESSAGE);
|
||||
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
|
||||
|
||||
} else {
|
||||
LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY);
|
||||
} else {
|
||||
LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
|
||||
enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY);
|
||||
|
||||
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
||||
if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
NULL, &enb_register_retry_timer_id) < 0) {
|
||||
LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
|
||||
|
||||
sleep(ENB_REGISTER_RETRY_DELAY);
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
|
||||
if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
|
||||
NULL, &enb_register_retry_timer_id) < 0) {
|
||||
LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
|
||||
|
||||
sleep(ENB_REGISTER_RETRY_DELAY);
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case S1AP_DEREGISTERED_ENB_IND:
|
||||
LOG_W(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme);
|
||||
if (EPC_MODE_ENABLED) {
|
||||
LOG_W(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
|
||||
S1AP_DEREGISTERED_ENB_IND(msg_p).nb_mme);
|
||||
|
||||
/* TODO handle recovering of registration */
|
||||
/* TODO handle recovering of registration */
|
||||
}
|
||||
break;
|
||||
|
||||
case TIMER_HAS_EXPIRED:
|
||||
LOG_I(ENB_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||
|
||||
if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) {
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
||||
}
|
||||
# if defined(ENABLE_USE_MME)
|
||||
LOG_I(ENB_APP, " Received %s: timer_id %ld\n", ITTI_MSG_NAME (msg_p), TIMER_HAS_EXPIRED(msg_p).timer_id);
|
||||
|
||||
if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) {
|
||||
/* Restart the registration process */
|
||||
registered_enb = 0;
|
||||
register_enb_pending = eNB_app_register (enb_id_start, enb_id_end);//, enb_properties_p);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
# endif
|
||||
|
||||
|
||||
default:
|
||||
LOG_E(ENB_APP, "Received unexpected message %s\n", ITTI_MSG_NAME (msg_p));
|
||||
|
||||
+42
-123
@@ -37,10 +37,12 @@
|
||||
#include "UTIL/OTG/otg_externs.h"
|
||||
#if defined(ENABLE_ITTI)
|
||||
# include "intertask_interface.h"
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# if defined(ENABLE_USE_MME)
|
||||
# include "s1ap_eNB.h"
|
||||
# include "sctp_eNB_task.h"
|
||||
# endif
|
||||
# else
|
||||
# define EPC_MODE_ENABLED 0
|
||||
# endif
|
||||
#endif
|
||||
#include "sctp_default_values.h"
|
||||
#include "SystemInformationBlockType2.h"
|
||||
@@ -198,11 +200,10 @@ void RCconfig_flexran()
|
||||
/* eNB ID from configuration, as read in by RCconfig_RRC() */
|
||||
if (!ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr) {
|
||||
// Calculate a default eNB ID
|
||||
# if defined(ENABLE_USE_MME)
|
||||
enb_id = i + (s1ap_generate_eNB_id () & 0xFFFF8);
|
||||
# else
|
||||
enb_id = i;
|
||||
# endif
|
||||
if (EPC_MODE_ENABLED)
|
||||
enb_id = i + (s1ap_generate_eNB_id () & 0xFFFF8);
|
||||
else
|
||||
enb_id = i;
|
||||
} else {
|
||||
enb_id = *(ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr);
|
||||
}
|
||||
@@ -546,32 +547,6 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
int32_t srb1_max_retx_threshold = 0;
|
||||
|
||||
int32_t my_int;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
int32_t otg_ue_id = 0;
|
||||
char* otg_app_type = NULL;
|
||||
char* otg_bg_traffic = NULL;
|
||||
char* glog_level = NULL;
|
||||
char* glog_verbosity = NULL;
|
||||
char* hw_log_level = NULL;
|
||||
char* hw_log_verbosity = NULL;
|
||||
char* phy_log_level = NULL;
|
||||
char* phy_log_verbosity = NULL;
|
||||
char* mac_log_level = NULL;
|
||||
char* mac_log_verbosity = NULL;
|
||||
char* rlc_log_level = NULL;
|
||||
char* rlc_log_verbosity = NULL;
|
||||
char* pdcp_log_level = NULL;
|
||||
char* pdcp_log_verbosity = NULL;
|
||||
char* rrc_log_level = NULL;
|
||||
char* rrc_log_verbosity = NULL;
|
||||
char* udp_log_verbosity = NULL;
|
||||
char* osa_log_level = NULL;
|
||||
char* osa_log_verbosity = NULL;
|
||||
*/
|
||||
|
||||
|
||||
// for no gcc warnings
|
||||
(void)my_int;
|
||||
@@ -591,32 +566,13 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
CCsParams[I].chkPptr = &(config_check_CCparams[I]);
|
||||
}
|
||||
/* get global parameters, defined outside any section in the config file */
|
||||
|
||||
|
||||
config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL);
|
||||
|
||||
num_enbs = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt;
|
||||
AssertFatal (i<num_enbs,
|
||||
"Failed to parse config file no %ith element in %s \n",i, ENB_CONFIG_STRING_ACTIVE_ENBS);
|
||||
|
||||
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
|
||||
|
||||
if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
} else if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) {
|
||||
asn_debug = 1;
|
||||
asn1_xer_print = 1;
|
||||
} else if (strcasecmp(*(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr) , ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) {
|
||||
asn_debug = 1;
|
||||
asn1_xer_print = 2;
|
||||
} else {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
if (num_enbs>0) {
|
||||
@@ -628,14 +584,14 @@ int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc) {
|
||||
|
||||
if (ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default eNB ID
|
||||
# if defined(ENABLE_USE_MME)
|
||||
uint32_t hash;
|
||||
|
||||
hash = s1ap_generate_eNB_id ();
|
||||
enb_id = i + (hash & 0xFFFF8);
|
||||
# else
|
||||
enb_id = i;
|
||||
# endif
|
||||
if (EPC_MODE_ENABLED) {
|
||||
uint32_t hash;
|
||||
|
||||
hash = s1ap_generate_eNB_id ();
|
||||
enb_id = i + (hash & 0xFFFF8);
|
||||
} else {
|
||||
enb_id = i;
|
||||
}
|
||||
} else {
|
||||
enb_id = *(ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr);
|
||||
}
|
||||
@@ -2255,23 +2211,9 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) {
|
||||
|
||||
/* get global parameters, defined outside any section in the config file */
|
||||
|
||||
config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL);
|
||||
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE) == 0) {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
} else if (strcasecmp( *(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr), ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO) == 0) {
|
||||
asn_debug = 1;
|
||||
asn1_xer_print = 1;
|
||||
} else if (strcasecmp(*(ENBSParams[ENB_ASN1_VERBOSITY_IDX].strptr) , ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING) == 0) {
|
||||
asn_debug = 1;
|
||||
asn1_xer_print = 2;
|
||||
} else {
|
||||
asn_debug = 0;
|
||||
asn1_xer_print = 0;
|
||||
}
|
||||
config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
AssertFatal (i<ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt,
|
||||
"Failed to parse config file %s, %uth attribute %s \n",
|
||||
@@ -2291,17 +2233,17 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) {
|
||||
if (ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr == NULL) {
|
||||
// Calculate a default eNB ID
|
||||
|
||||
# if defined(ENABLE_USE_MME)
|
||||
uint32_t hash;
|
||||
|
||||
hash = s1ap_generate_eNB_id ();
|
||||
enb_id = k + (hash & 0xFFFF8);
|
||||
# else
|
||||
enb_id = k;
|
||||
# endif
|
||||
} else {
|
||||
enb_id = *(ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr);
|
||||
}
|
||||
if (EPC_MODE_ENABLED) {
|
||||
uint32_t hash;
|
||||
|
||||
hash = s1ap_generate_eNB_id ();
|
||||
enb_id = k + (hash & 0xFFFF8);
|
||||
} else {
|
||||
enb_id = k;
|
||||
}
|
||||
} else {
|
||||
enb_id = *(ENBParamList.paramarray[k][ENB_ENB_ID_IDX].uptr);
|
||||
}
|
||||
|
||||
|
||||
// search if in active list
|
||||
@@ -2349,11 +2291,7 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) {
|
||||
strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4_address,*(S1ParamList.paramarray[l][ENB_MME_IPV4_ADDRESS_IDX].strptr));
|
||||
strcpy(S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv6_address,*(S1ParamList.paramarray[l][ENB_MME_IPV6_ADDRESS_IDX].strptr));
|
||||
|
||||
if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_ACTIVE_IDX].strptr), "yes") == 0) {
|
||||
#if defined(ENABLE_USE_MME)
|
||||
EPC_MODE_ENABLED = 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv4") == 0) {
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).mme_ip_address[l].ipv4 = 1;
|
||||
} else if (strcmp(*(S1ParamList.paramarray[l][ENB_MME_IP_ADDRESS_PREFERENCE_IDX].strptr), "ipv6") == 0) {
|
||||
@@ -2368,12 +2306,12 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) {
|
||||
// SCTP SETTING
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = SCTP_OUT_STREAMS;
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = SCTP_IN_STREAMS;
|
||||
# if defined(ENABLE_USE_MME)
|
||||
sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG);
|
||||
config_get( SCTPParams,sizeof(SCTPParams)/sizeof(paramdef_t),aprefix);
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr);
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = (uint16_t)*(SCTPParams[ENB_SCTP_OUTSTREAMS_IDX].uptr);
|
||||
#endif
|
||||
if (EPC_MODE_ENABLED) {
|
||||
sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_SCTP_CONFIG);
|
||||
config_get( SCTPParams,sizeof(SCTPParams)/sizeof(paramdef_t),aprefix);
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr);
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).sctp_out_streams = (uint16_t)*(SCTPParams[ENB_SCTP_OUTSTREAMS_IDX].uptr);
|
||||
}
|
||||
|
||||
sprintf(aprefix,"%s.[%i].%s",ENB_CONFIG_STRING_ENB_LIST,k,ENB_CONFIG_STRING_NETWORK_INTERFACES_CONFIG);
|
||||
// NETWORK_INTERFACES
|
||||
@@ -2388,28 +2326,6 @@ int RCconfig_S1(MessageDef *msg_p, uint32_t i) {
|
||||
|
||||
strcpy(S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4_address, address);
|
||||
|
||||
/*
|
||||
in_addr_t ipv4_address;
|
||||
|
||||
if (address) {
|
||||
IPV4_STR_ADDR_TO_INT_NWBO ( address, ipv4_address, "BAD IP ADDRESS FORMAT FOR eNB S1_U !\n" );
|
||||
}
|
||||
strcpy(S1AP_REGISTER_ENB_REQ (msg_p).enb_ip_address.ipv4_address, inet_ntoa(ipv4_address));
|
||||
// S1AP_REGISTER_ENB_REQ (msg_p).enb_port_for_S1U = enb_port_for_S1U;
|
||||
|
||||
|
||||
S1AP_REGISTER_ENB_REQ (msg_p).enb_interface_name_for_S1_MME = strdup(enb_interface_name_for_S1_MME);
|
||||
cidr = enb_ipv4_address_for_S1_MME;
|
||||
address = strtok(cidr, "/");
|
||||
|
||||
if (address) {
|
||||
IPV4_STR_ADDR_TO_INT_NWBO ( address, S1AP_REGISTER_ENB_REQ(msg_p).enb_ipv4_address_for_S1_MME, "BAD IP ADDRESS FORMAT FOR eNB S1_MME !\n" );
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2588,8 +2504,11 @@ void RCConfig(void) {
|
||||
printf("Getting ENBSParams\n");
|
||||
|
||||
config_get( ENBSParams,sizeof(ENBSParams)/sizeof(paramdef_t),NULL);
|
||||
# if defined(ENABLE_USE_MME)
|
||||
EPC_MODE_ENABLED = ((*ENBSParams[ENB_NOS1_IDX].uptr) == 0);
|
||||
#endif
|
||||
RC.nb_inst = ENBSParams[ENB_ACTIVE_ENBS_IDX].numelt;
|
||||
|
||||
|
||||
if (RC.nb_inst > 0) {
|
||||
RC.nb_CC = (int *)malloc((1+RC.nb_inst)*sizeof(int));
|
||||
for (int i=0;i<RC.nb_inst;i++) {
|
||||
|
||||
@@ -55,11 +55,6 @@
|
||||
|
||||
|
||||
|
||||
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
|
||||
extern int asn_debug;
|
||||
extern int asn1_xer_print;
|
||||
#endif
|
||||
|
||||
#ifdef LIBCONFIG_LONG
|
||||
#define libconfig_int long
|
||||
#else
|
||||
@@ -166,25 +161,19 @@ typedef enum {
|
||||
/* global parameters, not under a specific section */
|
||||
#define ENB_CONFIG_STRING_ASN1_VERBOSITY "Asn1_verbosity"
|
||||
#define ENB_CONFIG_STRING_ACTIVE_ENBS "Active_eNBs"
|
||||
#define ENB_CONFIG_STRING_NOS1 "noS1"
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* global configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define ENBSPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_ASN1_VERBOSITY, NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ACTIVE_ENBS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0} \
|
||||
{ENB_CONFIG_STRING_ASN1_VERBOSITY, NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ACTIVE_ENBS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0}, \
|
||||
{ENB_CONFIG_STRING_NOS1, NULL, PARAMFLAG_BOOL, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
}
|
||||
#define ENB_ASN1_VERBOSITY_IDX 0
|
||||
#define ENB_ACTIVE_ENBS_IDX 1
|
||||
|
||||
|
||||
/*
|
||||
{ENB_CONFIG_STRING_COMPONENT_CARRIERS,"", "", 0, uptr:NULL,defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE,TYPE_STRING,0}, \
|
||||
{ENB_CONFIG_STRING_CC_NODE_FUNCTION,"", "", 0, uptr:NULL,defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE,TYPE_STRING,0}, \
|
||||
{ENB_CONFIG_STRING_CC_NODE_TIMING,"", "", 0, uptr:NULL,defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE,TYPE_STRING,0}, \
|
||||
{ENB_CONFIG_STRING_CC_NODE_SYNCH_REF,"", "", 0, uptr:NULL,defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE,TYPE_STRING,0}, \
|
||||
*/
|
||||
|
||||
#define ENB_NOS1_IDX 2
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "flexran_agent_mac.h"
|
||||
#include "flexran_agent_rrc.h"
|
||||
#include "flexran_agent_pdcp.h"
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "assertions.h"
|
||||
|
||||
/* Initiation of the eNodeB agent */
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "flexran_agent_net_comm.h"
|
||||
#include "flexran_agent_ran_api.h"
|
||||
//#include "PHY/extern.h"
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
//#include "SCHED/defs.h"
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "flexran_agent_pdcp.h"
|
||||
#include "flexran_agent_timer.h"
|
||||
#include "flexran_agent_ran_api.h"
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#include "assertions.h"
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
|
||||
#include "RRC/LTE/rrc_eNB_UE_context.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "log.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
/****************************
|
||||
* get generic info from RAN
|
||||
|
||||
@@ -212,7 +212,7 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
|
||||
int sched_frame=frameP;
|
||||
int sched_subframe = (subframeP+4)%10;
|
||||
uint16_t ul_req_index;
|
||||
|
||||
|
||||
if (sched_subframe<subframeP) sched_frame++;
|
||||
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req = &mac->HI_DCI0_req[CC_id][subframeP];
|
||||
|
||||
@@ -362,16 +362,10 @@ boolean_t pdcp_data_req(
|
||||
* Ask sublayer to transmit data and check return value
|
||||
* to see if RLC succeeded
|
||||
*/
|
||||
#ifdef PDCP_MSG_PRINT
|
||||
int i=0;
|
||||
LOG_F(PDCP,"[MSG] PDCP DL %s PDU on rb_id %d\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
||||
|
||||
for (i = 0; i < pdcp_pdu_size; i++) {
|
||||
LOG_F(PDCP,"%02x ", ((uint8_t*)pdcp_pdu_p->data)[i]);
|
||||
}
|
||||
LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)pdcp_pdu_p->data,pdcp_pdu_size,
|
||||
"[MSG] PDCP DL %s PDU on rb_id %d\n",(srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
||||
|
||||
LOG_F(PDCP,"\n");
|
||||
#endif
|
||||
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,sourceL2Id
|
||||
@@ -474,17 +468,8 @@ pdcp_data_ind(
|
||||
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_IN);
|
||||
|
||||
#ifdef PDCP_MSG_PRINT
|
||||
int i=0;
|
||||
LOG_F(PDCP,"[MSG] PDCP UL %s PDU on rb_id %d\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
||||
|
||||
for (i = 0; i < sdu_buffer_sizeP; i++) {
|
||||
LOG_F(PDCP,"%02x ", ((uint8_t*)sdu_buffer_pP->data)[i]);
|
||||
}
|
||||
|
||||
LOG_F(PDCP,"\n");
|
||||
#endif
|
||||
LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)sdu_buffer_pP->data,sdu_buffer_sizeP,
|
||||
"[MSG] PDCP UL %s PDU on rb_id %d\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP);
|
||||
|
||||
#if T_TRACER
|
||||
if (ctxt_pP->enb_flag != ENB_FLAG_NO)
|
||||
|
||||
@@ -760,10 +760,10 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
0,
|
||||
MSC_AS_TIME_FMT" DATA-REQ inst %u rb %u rab %u size %u",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
pc5s_header.inst,
|
||||
pc5s_header.rb_id,
|
||||
pc5s_header->inst,
|
||||
pc5s_header->rb_id,
|
||||
rab_id,
|
||||
pc5s_header.data_size);
|
||||
pc5s_header->data_size);
|
||||
|
||||
pdcp_data_req(
|
||||
&ctxt,
|
||||
@@ -787,10 +787,10 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
|
||||
0,
|
||||
MSC_AS_TIME_FMT" DATA-REQ inst %u rb %u rab %u size %u",
|
||||
MSC_AS_TIME_ARGS(ctxt_pP),
|
||||
pc5s_header.inst,
|
||||
pc5s_header.rb_id,
|
||||
pc5s_header->inst,
|
||||
pc5s_header->rb_id,
|
||||
rab_id,
|
||||
pc5s_header.data_size);
|
||||
pc5s_header->data_size);
|
||||
LOG_D(PDCP,
|
||||
"[FRAME %5u][UE][IP][INSTANCE %u][RB %u][--- PDCP_DATA_REQ / %d Bytes ---X][PDCP][MOD %u][UE %u][RB %u] NON INSTANCIATED INSTANCE key 0x%"PRIx64", DROPPED\n",
|
||||
ctxt.frame,
|
||||
|
||||
@@ -43,9 +43,6 @@
|
||||
|
||||
#include "flexran_agent_extern.h"
|
||||
|
||||
//#define RRC_DATA_REQ_DEBUG
|
||||
//#define DEBUG_RRC 1
|
||||
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -68,10 +65,9 @@ mac_rrc_data_req(
|
||||
uint8_t sfn = (uint8_t)((frameP>>2)&0xff);
|
||||
|
||||
|
||||
#ifdef DEBUG_RRC
|
||||
int i;
|
||||
LOG_I(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%d\n",Mod_idP,Srb_id);
|
||||
#endif
|
||||
if (LOG_DEBUGFLAG(DEBUG_RRC)) {
|
||||
LOG_D(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%d\n",Mod_idP,Srb_id);
|
||||
}
|
||||
|
||||
eNB_RRC_INST *rrc;
|
||||
rrc_eNB_carrier_data_t *carrier;
|
||||
@@ -96,15 +92,15 @@ mac_rrc_data_req(
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].SIB1,
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1);
|
||||
|
||||
#ifdef DEBUG_RRC
|
||||
LOG_T(RRC,"[eNB %d] Frame %d : BCCH request => SIB 1\n",Mod_idP,frameP);
|
||||
if (LOG_DEBUGFLAG(DEBUG_RRC)) {
|
||||
LOG_T(RRC,"[eNB %d] Frame %d : BCCH request => SIB 1\n",Mod_idP,frameP);
|
||||
|
||||
for (i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1; i++) {
|
||||
LOG_T(RRC,"%x.",buffer_pP[i]);
|
||||
}
|
||||
for (int i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1; i++) {
|
||||
LOG_T(RRC,"%x.",buffer_pP[i]);
|
||||
}
|
||||
|
||||
LOG_T(RRC,"\n");
|
||||
#endif
|
||||
LOG_T(RRC,"\n");
|
||||
} /* LOG_DEBUGFLAG(DEBUG_RRC) */
|
||||
|
||||
return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB1);
|
||||
} // All RFN mod 8 transmit SIB2-3 in SF 5
|
||||
@@ -113,15 +109,15 @@ mac_rrc_data_req(
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].SIB23,
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23);
|
||||
|
||||
#ifdef DEBUG_RRC
|
||||
LOG_T(RRC,"[eNB %d] Frame %d BCCH request => SIB 2-3\n",Mod_idP,frameP);
|
||||
if (LOG_DEBUGFLAG(DEBUG_RRC)) {
|
||||
LOG_T(RRC,"[eNB %d] Frame %d BCCH request => SIB 2-3\n",Mod_idP,frameP);
|
||||
|
||||
for (i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23; i++) {
|
||||
LOG_T(RRC,"%x.",buffer_pP[i]);
|
||||
}
|
||||
for (int i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23; i++) {
|
||||
LOG_T(RRC,"%x.",buffer_pP[i]);
|
||||
}
|
||||
|
||||
LOG_T(RRC,"\n");
|
||||
#endif
|
||||
LOG_T(RRC,"\n");
|
||||
} /* LOG_DEBUGFLAG(DEBUG_RRC) */
|
||||
return(RC.rrc[Mod_idP]->carrier[CC_id].sizeof_SIB23);
|
||||
} else {
|
||||
return(0);
|
||||
@@ -193,20 +189,17 @@ mac_rrc_data_req(
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].MCCH_MESSAGE[mbsfn_sync_area],
|
||||
RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]);
|
||||
|
||||
#ifdef DEBUG_RRC
|
||||
LOG_D(RRC,"[eNB %d] Frame %d : MCCH request => MCCH_MESSAGE \n",Mod_idP,frameP);
|
||||
if (LOG_DEBUGFLAG(DEBUG_RRC)) {
|
||||
LOG_D(RRC,"[eNB %d] Frame %d : MCCH request => MCCH_MESSAGE \n",Mod_idP,frameP);
|
||||
|
||||
for (i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]; i++) {
|
||||
LOG_T(RRC,"%x.",buffer_pP[i]);
|
||||
}
|
||||
for (int i=0; i<RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]; i++) {
|
||||
LOG_T(RRC,"%x.",buffer_pP[i]);
|
||||
}
|
||||
|
||||
LOG_T(RRC,"\n");
|
||||
#endif
|
||||
LOG_T(RRC,"\n");
|
||||
} /* LOG_DEBUGFLAG(DEBUG_RRC) */
|
||||
|
||||
return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]);
|
||||
// }
|
||||
//else
|
||||
//return(0);
|
||||
return (RC.rrc[Mod_idP]->carrier[CC_id].sizeof_MCCH_MESSAGE[mbsfn_sync_area]);
|
||||
}
|
||||
|
||||
#endif // #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
#endif
|
||||
|
||||
//#define RRC_DATA_REQ_DEBUG
|
||||
//#define DEBUG_RRC 1
|
||||
|
||||
|
||||
|
||||
@@ -61,10 +60,7 @@ mac_rrc_data_req_ue(
|
||||
//--------------------------------------------------------------------------
|
||||
{
|
||||
|
||||
#ifdef DEBUG_RRC
|
||||
int i;
|
||||
LOG_I(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%d\n",Mod_idP,Srb_id);
|
||||
#endif
|
||||
LOG_D(RRC,"[eNB %d] mac_rrc_data_req to SRB ID=%d\n",Mod_idP,Srb_id);
|
||||
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
#define msg printf
|
||||
#endif
|
||||
|
||||
//#define XER_PRINT
|
||||
|
||||
typedef struct xer_sprint_string_s {
|
||||
char *string;
|
||||
@@ -1353,9 +1352,9 @@ uint8_t do_SIB23(uint8_t Mod_id,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message,
|
||||
NULL,
|
||||
(void*)bcch_message,
|
||||
@@ -1607,9 +1606,9 @@ uint8_t do_SidelinkUEInformation(uint8_t Mod_id, uint8_t *buffer, SL_Destinatio
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg);
|
||||
}
|
||||
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
|
||||
@@ -2165,9 +2164,9 @@ do_RRCConnectionSetup(
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message,
|
||||
NULL,
|
||||
(void*)&dl_ccch_msg,
|
||||
@@ -2240,9 +2239,9 @@ do_SecurityModeCommand(
|
||||
dl_dcch_msg.message.choice.c1.choice.securityModeCommand.criticalExtensions.choice.c1.choice.securityModeCommand_r8.securityConfigSMC.securityAlgorithmConfig.integrityProtAlgorithm
|
||||
= (e_SecurityAlgorithmConfig__integrityProtAlgorithm)integrityProtAlgorithm;
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message, (void*)&dl_dcch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message, (void*)&dl_dcch_msg);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message,
|
||||
NULL,
|
||||
(void*)&dl_dcch_msg,
|
||||
@@ -2320,9 +2319,9 @@ do_UECapabilityEnquiry(
|
||||
ASN_SEQUENCE_ADD(&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry.criticalExtensions.choice.c1.choice.ueCapabilityEnquiry_r8.ue_CapabilityRequest.list,
|
||||
&rat);
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message, (void*)&dl_dcch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message, (void*)&dl_dcch_msg);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message,
|
||||
NULL,
|
||||
(void*)&dl_dcch_msg,
|
||||
@@ -2539,9 +2538,9 @@ do_RRCConnectionReconfiguration(
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
return -1;
|
||||
}
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void*)&dl_dcch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void*)&dl_dcch_msg);
|
||||
}
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# if !defined(DISABLE_XER_SPRINT)
|
||||
@@ -2742,9 +2741,9 @@ do_RRCConnectionReestablishment(
|
||||
|
||||
rrcConnectionReestablishment->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r8.nonCriticalExtension = NULL;
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message,
|
||||
NULL,
|
||||
(void*)&dl_ccch_msg,
|
||||
@@ -2804,9 +2803,9 @@ do_RRCConnectionReestablishmentReject(
|
||||
// RRCConnectionReestablishmentReject
|
||||
rrcConnectionReestablishmentReject->criticalExtensions.present = RRCConnectionReestablishmentReject__criticalExtensions_PR_rrcConnectionReestablishmentReject_r8;
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message,
|
||||
NULL,
|
||||
(void*)&dl_ccch_msg,
|
||||
@@ -2867,9 +2866,9 @@ do_RRCConnectionReject(
|
||||
/* let's put a wait time of 1s for the moment */
|
||||
rrcConnectionReject->criticalExtensions.choice.c1.choice.rrcConnectionReject_r8.waitTime = 1;
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message,
|
||||
NULL,
|
||||
(void*)&dl_ccch_msg,
|
||||
@@ -3061,9 +3060,9 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
|
||||
*/
|
||||
ASN_SEQUENCE_ADD(&(*mbsfnAreaConfiguration)->pmch_InfoList_r9.list,pmch_Info_1);
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout,&asn_DEF_MCCH_Message,(void*)mcch_message);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout,&asn_DEF_MCCH_Message,(void*)mcch_message);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_MCCH_Message,
|
||||
NULL,
|
||||
(void*)mcch_message,
|
||||
@@ -3339,9 +3338,9 @@ uint8_t do_Paging(uint8_t Mod_id, uint8_t *buffer, ue_paging_identity_t ue_pagin
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
return -1;
|
||||
}
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_PCCH_Message, (void*)&pcch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_PCCH_Message, (void*)&pcch_msg);
|
||||
}
|
||||
|
||||
return((enc_rval.encoded+7)/8);
|
||||
}
|
||||
@@ -3504,9 +3503,9 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname)
|
||||
}
|
||||
|
||||
UECapability.UE_EUTRA_Capability = UE_EUTRA_Capability;
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout,&asn_DEF_UE_EUTRA_Capability,(void *)UE_EUTRA_Capability);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout,&asn_DEF_UE_EUTRA_Capability,(void *)UE_EUTRA_Capability);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_UE_EUTRA_Capability,
|
||||
NULL,
|
||||
(void*)UE_EUTRA_Capability,
|
||||
|
||||
@@ -136,7 +136,7 @@ uint8_t do_MIB_NB_IoT(
|
||||
carrier->MIB_NB_IoT,
|
||||
100);
|
||||
if(enc_rval.encoded <= 0) {
|
||||
LOG_F(RRC, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
LOG_E(RRC, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
}
|
||||
|
||||
@@ -382,9 +382,9 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
|
||||
ASN_SEQUENCE_ADD(&(*sib1_NB_IoT)->systemInfoValueTagList_r13->list,&systemInfoValueTagSI);
|
||||
|
||||
|
||||
#ifdef XER_PRINT //generate xml files
|
||||
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message);
|
||||
}
|
||||
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB,
|
||||
@@ -394,7 +394,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
|
||||
100);
|
||||
|
||||
if (enc_rval.encoded > 0){
|
||||
LOG_F(RRC,"ASN1 message encoding failed (%s, %lu)!\n",
|
||||
LOG_E(RRC,"ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
}
|
||||
|
||||
@@ -667,9 +667,9 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
|
||||
ASN_SEQUENCE_ADD(&bcch_message->message.choice.c1.choice.systemInformation_r13.criticalExtensions.choice.systemInformation_r13.sib_TypeAndInfo_r13.list,
|
||||
sib3_NB_part);
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB,
|
||||
NULL,
|
||||
(void*)bcch_message,
|
||||
@@ -887,9 +887,9 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
|
||||
rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r13.radioResourceConfigDedicated_r13.physicalConfigDedicated_r13 = physicalConfigDedicated2_NB_IoT;
|
||||
rrcConnectionSetup_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r13.radioResourceConfigDedicated_r13.mac_MainConfig_r13 = NULL;
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
|
||||
NULL,
|
||||
(void*)&dl_ccch_msg_NB_IoT,
|
||||
@@ -897,7 +897,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
|
||||
100);
|
||||
|
||||
if (enc_rval.encoded <= 0) {
|
||||
LOG_F(RRC, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
LOG_E(RRC, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
}
|
||||
|
||||
@@ -939,16 +939,16 @@ uint8_t do_SecurityModeCommand_NB_IoT(
|
||||
= (e_SecurityAlgorithmConfig__integrityProtAlgorithm)integrityProtAlgorithm;
|
||||
|
||||
//only changed "asn_DEF_DL_DCCH_Message_NB"
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB_IoT);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB_IoT);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB,
|
||||
NULL,
|
||||
(void*)&dl_dcch_msg_NB_IoT,
|
||||
buffer,
|
||||
100);
|
||||
if (enc_rval.encoded <= 0) {
|
||||
LOG_F(RRC, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
LOG_E(RRC, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
}
|
||||
|
||||
@@ -1001,16 +1001,16 @@ uint8_t do_UECapabilityEnquiry_NB_IoT(
|
||||
//no ue_CapabilityRequest (list of RAT_Type)
|
||||
|
||||
//only changed "asn_DEF_DL_DCCH_Message_NB"
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB_IoT);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB_IoT);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB,
|
||||
NULL,
|
||||
(void*)&dl_dcch_msg_NB_IoT,
|
||||
buffer,
|
||||
100);
|
||||
if (enc_rval.encoded <= 0) {
|
||||
LOG_F(RRC, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
LOG_E(RRC, "ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
}
|
||||
|
||||
@@ -1105,14 +1105,14 @@ uint16_t do_RRCConnectionReconfiguration_NB_IoT(
|
||||
buffer,
|
||||
RRC_BUF_SIZE);
|
||||
if (enc_rval.encoded <= 0) {
|
||||
LOG_F(RRC, "ASN1 message encoding failed %s, %li\n",
|
||||
LOG_E(RRC, "ASN1 message encoding failed %s, %li\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
}
|
||||
|
||||
//changed only asn_DEF_DL_DCCH_Message_NB
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout,&asn_DEF_DL_DCCH_Message_NB,(void*)&dl_dcch_msg_NB_IoT);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout,&asn_DEF_DL_DCCH_Message_NB,(void*)&dl_dcch_msg_NB_IoT);
|
||||
}
|
||||
|
||||
//#if defined(ENABLE_ITTI)
|
||||
//# if !defined(DISABLE_XER_SPRINT)...
|
||||
@@ -1143,16 +1143,16 @@ uint8_t do_RRCConnectionReestablishmentReject_NB_IoT(
|
||||
rrcConnectionReestablishmentReject->criticalExtensions.present = RRCConnectionReestablishmentReject__criticalExtensions_PR_rrcConnectionReestablishmentReject_r8;
|
||||
|
||||
//Only change in "asn_DEF_DL_CCCH_Message_NB"
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
|
||||
NULL,
|
||||
(void*)&dl_ccch_msg_NB_IoT,
|
||||
buffer,
|
||||
100);
|
||||
if (enc_rval.encoded <= 0) {
|
||||
LOG_F(RRC,"ASN1 message encoding failed (%s, %lu)!\n",
|
||||
LOG_E(RRC,"ASN1 message encoding failed (%s, %lu)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
}
|
||||
|
||||
@@ -1214,16 +1214,16 @@ uint8_t do_RRCConnectionReject_NB_IoT(
|
||||
RRCConnectionReject_NB_r13_IEs__rrc_SuspendIndication_r13_true;
|
||||
|
||||
//Only Modified "asn_DEF_DL_CCCH_Message_NB"
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT);
|
||||
}
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
|
||||
NULL,
|
||||
(void*)&dl_ccch_msg_NB_IoT,
|
||||
buffer,
|
||||
100);
|
||||
if (enc_rval.encoded <= 0) {
|
||||
LOG_F(RRC, "ASN1 message encoding failed (%s, %ld)!\n",
|
||||
LOG_E(RRC, "ASN1 message encoding failed (%s, %ld)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
}
|
||||
|
||||
@@ -1351,13 +1351,13 @@ uint8_t do_RRCConnectionReestablishment_NB_IoT(
|
||||
RRC_BUF_SIZE);
|
||||
|
||||
if (enc_rval.encoded <= 0) {
|
||||
LOG_F(RRC, "ASN1 message encoding failed (%s, %li)!\n",
|
||||
LOG_E(RRC, "ASN1 message encoding failed (%s, %li)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
}
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout,&asn_DEF_DL_CCCH_Message_NB,(void*)&dl_ccch_msg_NB_IoT);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout,&asn_DEF_DL_CCCH_Message_NB,(void*)&dl_ccch_msg_NB_IoT);
|
||||
}
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# if !defined(DISABLE_XER_SPRINT)
|
||||
|
||||
+63
-67
@@ -99,10 +99,6 @@ int send_ue_information = 0;
|
||||
// for malloc_clear
|
||||
#include "PHY/defs_UE.h"
|
||||
|
||||
//#define XER_PRINT
|
||||
|
||||
|
||||
|
||||
extern void pdcp_config_set_security(
|
||||
const protocol_ctxt_t* const ctxt_pP,
|
||||
pdcp_t * const pdcp_pP,
|
||||
@@ -733,9 +729,9 @@ int rrc_ue_decode_ccch( const protocol_ctxt_t* const ctxt_pP, const SRB_INFO* co
|
||||
(uint8_t*)Srb_info->Rx_buffer.Payload,
|
||||
100,0,0);
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout,&asn_DEF_DL_CCCH_Message,(void*)dl_ccch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout,&asn_DEF_DL_CCCH_Message,(void*)dl_ccch_msg);
|
||||
}
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# if defined(DISABLE_ITTI_XER_PRINT)
|
||||
@@ -1931,9 +1927,9 @@ rrc_ue_process_securityModeCommand(
|
||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %jd)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg);
|
||||
}
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# if !defined(DISABLE_XER_SPRINT)
|
||||
@@ -2042,9 +2038,9 @@ rrc_ue_process_ueCapabilityEnquiry(
|
||||
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %jd)!\n",
|
||||
enc_rval.failed_type->name, enc_rval.encoded);
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void*)&ul_dcch_msg);
|
||||
}
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# if !defined(DISABLE_XER_SPRINT)
|
||||
@@ -2429,9 +2425,9 @@ rrc_ue_decode_dcch(
|
||||
(uint8_t*)Buffer,
|
||||
RRC_BUF_SIZE,0,0);
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void*)dl_dcch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout,&asn_DEF_DL_DCCH_Message,(void*)dl_dcch_msg);
|
||||
}
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
# if defined(DISABLE_ITTI_XER_PRINT)
|
||||
@@ -4560,9 +4556,9 @@ int decode_MCCH_Message( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_MCCH_Message, (void*)mcch);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_MCCH_Message, (void*)mcch);
|
||||
}
|
||||
|
||||
if (mcch->message.present == MCCH_MessageType_PR_c1) {
|
||||
LOG_D(RRC,"[UE %d] Found mcch message \n",
|
||||
@@ -5578,9 +5574,9 @@ void *rrc_control_socket_thread_fct(void *arg)
|
||||
//process the message
|
||||
switch (sl_ctrl_msg_recv->type) {
|
||||
case SESSION_INIT_REQ:
|
||||
LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET)
|
||||
LOG_UI(RRC,"Received SessionInitializationRequest on socket from ProSe App (msg type: %d)\n", sl_ctrl_msg_recv->type);
|
||||
LOG_DEBUG_END
|
||||
if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){
|
||||
LOG_UI(RRC,"Received SessionInitializationRequest on socket from ProSe App (msg type: %d)\n", sl_ctrl_msg_recv->type);
|
||||
}
|
||||
//TODO: get SL_UE_STATE from lower layer
|
||||
|
||||
LOG_I(RRC,"Send UEStateInformation to ProSe App \n");
|
||||
@@ -5599,12 +5595,12 @@ LOG_DEBUG_END
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET)
|
||||
struct sidelink_ctrl_element *ptr_ctrl_msg = NULL;
|
||||
ptr_ctrl_msg = (struct sidelink_ctrl_element *) send_buf;
|
||||
LOG_UI(RRC,"[UEStateInformation] msg type: %d\n",ptr_ctrl_msg->type);
|
||||
LOG_UI(RRC,"[UEStateInformation] UE state: %d\n",ptr_ctrl_msg->sidelinkPrimitive.ue_state);
|
||||
LOG_DEBUG_END
|
||||
if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){
|
||||
struct sidelink_ctrl_element *ptr_ctrl_msg = NULL;
|
||||
ptr_ctrl_msg = (struct sidelink_ctrl_element *) send_buf;
|
||||
LOG_UI(RRC,"[UEStateInformation] msg type: %d\n",ptr_ctrl_msg->type);
|
||||
LOG_UI(RRC,"[UEStateInformation] UE state: %d\n",ptr_ctrl_msg->sidelinkPrimitive.ue_state);
|
||||
}
|
||||
/* if (enable_notification > 0) {
|
||||
//create thread to send status notification (for testing purpose, status notification will be sent e.g., every 20 seconds)
|
||||
pthread_t notification_thread;
|
||||
@@ -5619,12 +5615,12 @@ LOG_DEBUG_END
|
||||
sourceL2Id = sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.sourceL2Id;
|
||||
groupL2Id = sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupL2Id;
|
||||
|
||||
LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET)
|
||||
LOG_UI(RRC,"[GroupCommunicationEstablishReq] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type);
|
||||
LOG_UI(RRC,"[GroupCommunicationEstablishReq] source Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.sourceL2Id);
|
||||
LOG_UI(RRC,"[GroupCommunicationEstablishReq] group Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupL2Id);
|
||||
LOG_UI(RRC,"[GroupCommunicationEstablishReq] group IP Address: " IPV4_ADDR "\n",IPV4_ADDR_FORMAT(sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupIpAddress));
|
||||
LOG_DEBUG_END
|
||||
if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){
|
||||
LOG_UI(RRC,"[GroupCommunicationEstablishReq] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type);
|
||||
LOG_UI(RRC,"[GroupCommunicationEstablishReq] source Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.sourceL2Id);
|
||||
LOG_UI(RRC,"[GroupCommunicationEstablishReq] group Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupL2Id);
|
||||
LOG_UI(RRC,"[GroupCommunicationEstablishReq] group IP Address: " IPV4_ADDR "\n",IPV4_ADDR_FORMAT(sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupIpAddress));
|
||||
}
|
||||
|
||||
//store sourceL2Id/groupL2Id
|
||||
UE_rrc_inst[module_id].sourceL2Id = sourceL2Id;
|
||||
@@ -5784,20 +5780,20 @@ LOG_DEBUG_END
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET)
|
||||
struct sidelink_ctrl_element *ptr_ctrl_msg = NULL;
|
||||
ptr_ctrl_msg = (struct sidelink_ctrl_element *) send_buf;
|
||||
LOG_UI(RRC,"[GroupCommunicationEstablishResponse] msg type: %d\n",ptr_ctrl_msg->type);
|
||||
LOG_UI(RRC,"[GroupCommunicationEstablishResponse] slrb_id: %d\n",ptr_ctrl_msg->sidelinkPrimitive.slrb_id);
|
||||
LOG_DEBUG_END
|
||||
if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){
|
||||
struct sidelink_ctrl_element *ptr_ctrl_msg = NULL;
|
||||
ptr_ctrl_msg = (struct sidelink_ctrl_element *) send_buf;
|
||||
LOG_UI(RRC,"[GroupCommunicationEstablishResponse] msg type: %d\n",ptr_ctrl_msg->type);
|
||||
LOG_UI(RRC,"[GroupCommunicationEstablishResponse] slrb_id: %d\n",ptr_ctrl_msg->sidelinkPrimitive.slrb_id);
|
||||
}
|
||||
break;
|
||||
|
||||
case GROUP_COMMUNICATION_RELEASE_REQ:
|
||||
printf("-----------------------------------\n");
|
||||
LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET)
|
||||
LOG_UI(RRC,"[GroupCommunicationReleaseRequest] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type);
|
||||
LOG_UI(RRC,"[GroupCommunicationReleaseRequest] Slrb Id: %i\n",sl_ctrl_msg_recv->sidelinkPrimitive.slrb_id);
|
||||
LOG_DEBUG_END
|
||||
if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){
|
||||
LOG_UI(RRC,"[GroupCommunicationReleaseRequest] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type);
|
||||
LOG_UI(RRC,"[GroupCommunicationReleaseRequest] Slrb Id: %i\n",sl_ctrl_msg_recv->sidelinkPrimitive.slrb_id);
|
||||
}
|
||||
//reset groupL2ID from MAC LAYER
|
||||
UE_rrc_inst[module_id].groupL2Id = 0x00000000;
|
||||
sourceL2Id = UE_rrc_inst[module_id].sourceL2Id;
|
||||
@@ -5869,11 +5865,11 @@ LOG_DEBUG_END
|
||||
sourceL2Id = sl_ctrl_msg_recv->sidelinkPrimitive.direct_comm_establish_req.sourceL2Id;
|
||||
destinationL2Id = sl_ctrl_msg_recv->sidelinkPrimitive.direct_comm_establish_req.destinationL2Id;
|
||||
|
||||
LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET)
|
||||
LOG_UI(RRC,"[DirectCommunicationEstablishReq] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type);
|
||||
LOG_UI(RRC,"[DirectCommunicationEstablishReq] source Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.sourceL2Id);
|
||||
LOG_UI(RRC,"[DirectCommunicationEstablishReq] destination Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupL2Id);
|
||||
LOG_DEBUG_END
|
||||
if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){
|
||||
LOG_UI(RRC,"[DirectCommunicationEstablishReq] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type);
|
||||
LOG_UI(RRC,"[DirectCommunicationEstablishReq] source Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.sourceL2Id);
|
||||
LOG_UI(RRC,"[DirectCommunicationEstablishReq] destination Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupL2Id);
|
||||
}
|
||||
|
||||
//store sourceL2Id/destinationL2Id
|
||||
UE_rrc_inst[module_id].sourceL2Id = sourceL2Id;
|
||||
@@ -6033,27 +6029,27 @@ LOG_DEBUG_END
|
||||
}
|
||||
|
||||
|
||||
LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET)
|
||||
struct sidelink_ctrl_element *ptr_ctrl_msg = NULL;
|
||||
ptr_ctrl_msg = (struct sidelink_ctrl_element *) send_buf;
|
||||
LOG_UI(RRC,"[DirectCommunicationEstablishResponse] msg type: %d\n",ptr_ctrl_msg->type);
|
||||
LOG_UI(RRC,"[DirectCommunicationEstablishResponse] slrb_id: %d\n",ptr_ctrl_msg->sidelinkPrimitive.slrb_id);
|
||||
LOG_DEBUG_END
|
||||
if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){
|
||||
struct sidelink_ctrl_element *ptr_ctrl_msg = NULL;
|
||||
ptr_ctrl_msg = (struct sidelink_ctrl_element *) send_buf;
|
||||
LOG_UI(RRC,"[DirectCommunicationEstablishResponse] msg type: %d\n",ptr_ctrl_msg->type);
|
||||
LOG_UI(RRC,"[DirectCommunicationEstablishResponse] slrb_id: %d\n",ptr_ctrl_msg->sidelinkPrimitive.slrb_id);
|
||||
}
|
||||
break;
|
||||
|
||||
case PC5S_ESTABLISH_REQ:
|
||||
type = sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.type;
|
||||
sourceL2Id = sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.sourceL2Id;
|
||||
LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET)
|
||||
LOG_UI(RRC,"[PC5EstablishReq] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type);
|
||||
LOG_UI(RRC,"[PC5EstablishReq] type: %d\n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.type); //RX/TX
|
||||
LOG_UI(RRC,"[PC5EstablishReq] source Id: 0x%08x \n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.sourceL2Id);
|
||||
LOG_DEBUG_END
|
||||
type = sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.type;
|
||||
sourceL2Id = sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.sourceL2Id;
|
||||
if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){
|
||||
LOG_UI(RRC,"[PC5EstablishReq] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type);
|
||||
LOG_UI(RRC,"[PC5EstablishReq] type: %d\n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.type); //RX/TX
|
||||
LOG_UI(RRC,"[PC5EstablishReq] source Id: 0x%08x \n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.sourceL2Id);
|
||||
}
|
||||
if (type > 0) {
|
||||
destinationL2Id = sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.destinationL2Id;
|
||||
LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET)
|
||||
LOG_UI(RRC,"[PC5EstablishReq] destination Id: 0x%08x \n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.destinationL2Id);
|
||||
LOG_DEBUG_END
|
||||
if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){
|
||||
LOG_UI(RRC,"[PC5EstablishReq] destination Id: 0x%08x \n",sl_ctrl_msg_recv->sidelinkPrimitive.pc5s_establish_req.destinationL2Id);
|
||||
}
|
||||
}
|
||||
|
||||
//store sourceL2Id/destinationL2Id
|
||||
@@ -6264,9 +6260,9 @@ LOG_DEBUG_END
|
||||
|
||||
case PC5_DISCOVERY_MESSAGE:
|
||||
|
||||
LOG_DEBUG_BEGIN(DEBUG_CTRLSOCKET)
|
||||
if (LOG_DEBUGFLAG(DEBUG_CTRLSOCKET)){
|
||||
LOG_UI(RRC,"[PC5DiscoveryMessage] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type);
|
||||
LOG_DEBUG_END
|
||||
}
|
||||
//prepare SL_Discovery buffer
|
||||
if (UE_rrc_inst) {
|
||||
memcpy((void*)&UE_rrc_inst[module_id].SL_Discovery[0].Tx_buffer.Payload[0], (void*)&sl_ctrl_msg_recv->sidelinkPrimitive.pc5_discovery_message.payload[0], PC5_DISCOVERY_PAYLOAD_SIZE);
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
#include "rrc_eNB_UE_context.h"
|
||||
#include "common/ran_context.h"
|
||||
|
||||
#define DEBUG_RRC 1
|
||||
extern RAN_CONTEXT_t RC;
|
||||
extern UE_MAC_INST *UE_mac_inst;
|
||||
|
||||
|
||||
+175
-361
@@ -85,6 +85,8 @@
|
||||
# else
|
||||
# include "../../S1AP/s1ap_eNB.h"
|
||||
# endif
|
||||
#else
|
||||
# define EPC_MODE_ENABLED 0
|
||||
#endif
|
||||
|
||||
#include "pdcp.h"
|
||||
@@ -100,7 +102,6 @@
|
||||
|
||||
#include "SIMULATION/TOOLS/sim.h" // for taus
|
||||
|
||||
//#define XER_PRINT
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -839,11 +840,6 @@ rrc_eNB_free_UE(const module_id_t enb_mod_idP,const struct rrc_eNB_ue_context_s*
|
||||
|
||||
|
||||
protocol_ctxt_t ctxt;
|
||||
#if !defined(ENABLE_USE_MME)
|
||||
module_id_t ue_module_id;
|
||||
/* avoid gcc warnings */
|
||||
(void)ue_module_id;
|
||||
#endif
|
||||
rnti_t rnti = ue_context_pP->ue_context.rnti;
|
||||
if (enb_mod_idP >= NB_eNB_INST) {
|
||||
LOG_I(RRC, "eNB inst invalid (%d/%d) for UE %x!\n",enb_mod_idP, NB_eNB_INST,rnti);
|
||||
@@ -858,20 +854,21 @@ rrc_eNB_free_UE(const module_id_t enb_mod_idP,const struct rrc_eNB_ue_context_s*
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, enb_mod_idP, ENB_FLAG_YES, rnti, 0, 0,enb_mod_idP);
|
||||
LOG_W(RRC, "[eNB %d] Removing UE RNTI %x\n", enb_mod_idP, rnti);
|
||||
|
||||
#if defined(ENABLE_USE_MME)
|
||||
if((ue_context_pP->ue_context.ul_failure_timer >= 20000) &&
|
||||
(mac_eNB_get_rrc_status(enb_mod_idP,rnti) >= RRC_CONNECTED)) {
|
||||
LOG_I(RRC, "[eNB %d] S1AP_UE_CONTEXT_RELEASE_REQ RNTI %x\n", enb_mod_idP, rnti);
|
||||
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP, ue_context_pP, S1AP_CAUSE_RADIO_NETWORK, 21); // send cause 21: connection with ue lost
|
||||
/* From 3GPP 36300v10 p129 : 19.2.2.2.2 S1 UE Context Release Request (eNB triggered)
|
||||
* If the E-UTRAN internal reason is a radio link failure detected in the eNB, the eNB shall wait a sufficient time before
|
||||
* triggering the S1 UE Context Release Request procedure
|
||||
* in order to allow the UE to perform the NAS recovery
|
||||
* procedure, see TS 23.401 [17].
|
||||
*/
|
||||
return;
|
||||
if(EPC_MODE_ENABLED) {
|
||||
|
||||
if((ue_context_pP->ue_context.ul_failure_timer >= 20000) &&
|
||||
(mac_eNB_get_rrc_status(enb_mod_idP,rnti) >= RRC_CONNECTED)) {
|
||||
LOG_I(RRC, "[eNB %d] S1AP_UE_CONTEXT_RELEASE_REQ RNTI %x\n", enb_mod_idP, rnti);
|
||||
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP, ue_context_pP, S1AP_CAUSE_RADIO_NETWORK, 21); // send cause 21: connection with ue lost
|
||||
/* From 3GPP 36300v10 p129 : 19.2.2.2.2 S1 UE Context Release Request (eNB triggered)
|
||||
* If the E-UTRAN internal reason is a radio link failure detected in the eNB, the eNB shall wait a sufficient time before
|
||||
* triggering the S1 UE Context Release Request procedure
|
||||
* in order to allow the UE to perform the NAS recovery
|
||||
* procedure, see TS 23.401 [17].
|
||||
*/
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
// add UE info to freeList
|
||||
LOG_I(RRC, "put UE %x into freeList\n", rnti);
|
||||
put_UE_in_freelist(enb_mod_idP, rnti, 1);
|
||||
@@ -1018,17 +1015,13 @@ rrc_eNB_process_RRCConnectionSetupComplete(
|
||||
T(T_ENB_RRC_CONNECTION_SETUP_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
||||
|
||||
#if defined(ENABLE_USE_MME)
|
||||
|
||||
if (EPC_MODE_ENABLED == 1) {
|
||||
// Forward message to S1AP layer
|
||||
rrc_eNB_send_S1AP_NAS_FIRST_REQ(
|
||||
ctxt_pP,
|
||||
ue_context_pP,
|
||||
rrcConnectionSetupComplete);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
// RRC loop back (no S1AP), send SecurityModeCommand to UE
|
||||
rrc_eNB_generate_SecurityModeCommand(
|
||||
ctxt_pP,
|
||||
@@ -1058,16 +1051,8 @@ rrc_eNB_generate_SecurityModeCommand(
|
||||
ue_context_pP->ue_context.ciphering_algorithm,
|
||||
ue_context_pP->ue_context.integrity_algorithm);
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
uint16_t i=0;
|
||||
LOG_F(RRC,"[MSG] RRC Security Mode Command\n");
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size,"[MSG] RRC Security Mode Command\n");
|
||||
|
||||
LOG_I(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" Logical Channel DL-DCCH, Generate SecurityModeCommand (bytes %d)\n",
|
||||
@@ -1166,9 +1151,6 @@ rrc_eNB_generate_RRCConnectionReject(
|
||||
)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
#ifdef RRC_MSG_PRINT
|
||||
int cnt;
|
||||
#endif
|
||||
|
||||
T(T_ENB_RRC_CONNECTION_REJECT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
||||
@@ -1177,15 +1159,10 @@ rrc_eNB_generate_RRCConnectionReject(
|
||||
do_RRCConnectionReject(ctxt_pP->module_id,
|
||||
(uint8_t*) RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload);
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRCConnectionReject\n");
|
||||
|
||||
for (cnt = 0; cnt < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size; cnt++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)RC.rrc[ctxt_pP->module_id]->Srb0.Tx_buffer.Payload)[cnt]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,
|
||||
(char *)(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload),
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size,
|
||||
"[MSG] RRCConnectionReject\n");
|
||||
|
||||
MSC_LOG_TX_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
@@ -1230,17 +1207,11 @@ rrc_eNB_generate_RRCConnectionReestablishment(
|
||||
rrc_eNB_get_next_transaction_identifier(ctxt_pP->module_id),
|
||||
SRB_configList,
|
||||
&ue_context_pP->ue_context.physicalConfigDedicated);
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRCConnectionReestablishment\n");
|
||||
|
||||
for (cnt = 0; cnt < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size; cnt++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload)[cnt]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,
|
||||
(char *)(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload),
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size,
|
||||
"[MSG] RRCConnectionReestablishment\n"
|
||||
);
|
||||
// configure SRB1 for UE
|
||||
|
||||
if (*SRB_configList != NULL) {
|
||||
@@ -1356,10 +1327,6 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
struct SRB_ToAddMod *SRB2_config = NULL;
|
||||
struct DRB_ToAddMod *DRB_config = NULL;
|
||||
int i = 0;
|
||||
# if defined(ENABLE_USE_MME)
|
||||
int j = 0;
|
||||
hashtable_rc_t h_rc;
|
||||
#endif
|
||||
uint8_t buffer[RRC_BUF_SIZE];
|
||||
uint16_t size;
|
||||
MeasObjectToAddModList_t *MeasObj_list = NULL;
|
||||
@@ -1450,59 +1417,61 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
ue_context_pP->ue_context.Srb1.Active = 1;
|
||||
//ue_context_pP->ue_context.Srb2.Srb_info.Srb_id = 2;
|
||||
|
||||
# if defined(ENABLE_USE_MME)
|
||||
rrc_ue_s1ap_ids_t* rrc_ue_s1ap_ids_p = NULL;
|
||||
uint16_t ue_initial_id = ue_context_pP->ue_context.ue_initial_id;
|
||||
uint32_t eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
|
||||
eNB_RRC_INST *rrc_instance_p = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)];
|
||||
if (eNB_ue_s1ap_id > 0) {
|
||||
h_rc = hashtable_get(rrc_instance_p->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id, (void**)&rrc_ue_s1ap_ids_p);
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti;
|
||||
#if defined(ENABLE_USE_MME)
|
||||
hashtable_rc_t h_rc;
|
||||
int j;
|
||||
rrc_ue_s1ap_ids_t* rrc_ue_s1ap_ids_p = NULL;
|
||||
uint16_t ue_initial_id = ue_context_pP->ue_context.ue_initial_id;
|
||||
uint32_t eNB_ue_s1ap_id = ue_context_pP->ue_context.eNB_ue_s1ap_id;
|
||||
eNB_RRC_INST *rrc_instance_p = RC.rrc[ENB_INSTANCE_TO_MODULE_ID(ctxt_pP->instance)];
|
||||
if (eNB_ue_s1ap_id > 0) {
|
||||
h_rc = hashtable_get(rrc_instance_p->s1ap_id2_s1ap_ids, (hash_key_t)eNB_ue_s1ap_id, (void**)&rrc_ue_s1ap_ids_p);
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ue_initial_id != 0) {
|
||||
h_rc = hashtable_get(rrc_instance_p->initial_id2_s1ap_ids, (hash_key_t)ue_initial_id, (void**)&rrc_ue_s1ap_ids_p);
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti;
|
||||
if (ue_initial_id != 0) {
|
||||
h_rc = hashtable_get(rrc_instance_p->initial_id2_s1ap_ids, (hash_key_t)ue_initial_id, (void**)&rrc_ue_s1ap_ids_p);
|
||||
if (h_rc == HASH_TABLE_OK) {
|
||||
rrc_ue_s1ap_ids_p->ue_rnti = ctxt_pP->rnti;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gtpv1u_enb_create_tunnel_req_t create_tunnel_req;
|
||||
gtpv1u_enb_create_tunnel_req_t create_tunnel_req;
|
||||
|
||||
/* Save e RAB information for later */
|
||||
memset(&create_tunnel_req, 0 , sizeof(create_tunnel_req));
|
||||
/* Save e RAB information for later */
|
||||
memset(&create_tunnel_req, 0 , sizeof(create_tunnel_req));
|
||||
|
||||
for (j = 0, i = 0; i < NB_RB_MAX; i++) {
|
||||
if (ue_context_pP->ue_context.e_rab[i].status == E_RAB_STATUS_ESTABLISHED || ue_context_pP->ue_context.e_rab[i].status == E_RAB_STATUS_DONE) {
|
||||
create_tunnel_req.eps_bearer_id[j] = ue_context_pP->ue_context.e_rab[i].param.e_rab_id;
|
||||
create_tunnel_req.sgw_S1u_teid[j] = ue_context_pP->ue_context.e_rab[i].param.gtp_teid;
|
||||
for ( j = 0, i = 0; i < NB_RB_MAX; i++) {
|
||||
if (ue_context_pP->ue_context.e_rab[i].status == E_RAB_STATUS_ESTABLISHED || ue_context_pP->ue_context.e_rab[i].status == E_RAB_STATUS_DONE) {
|
||||
create_tunnel_req.eps_bearer_id[j] = ue_context_pP->ue_context.e_rab[i].param.e_rab_id;
|
||||
create_tunnel_req.sgw_S1u_teid[j] = ue_context_pP->ue_context.e_rab[i].param.gtp_teid;
|
||||
|
||||
memcpy(&create_tunnel_req.sgw_addr[j],
|
||||
&ue_context_pP->ue_context.e_rab[i].param.sgw_addr,
|
||||
sizeof(transport_layer_addr_t));
|
||||
j++;
|
||||
memcpy(&create_tunnel_req.sgw_addr[j],
|
||||
&ue_context_pP->ue_context.e_rab[i].param.sgw_addr,
|
||||
sizeof(transport_layer_addr_t));
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
create_tunnel_req.rnti = ctxt_pP->rnti; // warning put zero above
|
||||
create_tunnel_req.num_tunnels = j;
|
||||
create_tunnel_req.rnti = ctxt_pP->rnti; // warning put zero above
|
||||
create_tunnel_req.num_tunnels = j;
|
||||
|
||||
gtpv1u_update_s1u_tunnel(
|
||||
ctxt_pP->instance,
|
||||
&create_tunnel_req,
|
||||
reestablish_rnti);
|
||||
gtpv1u_update_s1u_tunnel(
|
||||
ctxt_pP->instance,
|
||||
&create_tunnel_req,
|
||||
reestablish_rnti);
|
||||
#endif
|
||||
/* Update RNTI in ue_context */
|
||||
ue_context_pP->ue_id_rnti = ctxt_pP->rnti; // here ue_id_rnti is just a key, may be something else
|
||||
ue_context_pP->ue_context.rnti = ctxt_pP->rnti;
|
||||
# if defined(ENABLE_USE_MME)
|
||||
uint8_t send_security_mode_command = FALSE;
|
||||
rrc_pdcp_config_security(
|
||||
ctxt_pP,
|
||||
ue_context_pP,
|
||||
send_security_mode_command);
|
||||
LOG_D(RRC, "set security successfully \n");
|
||||
#if defined(ENABLE_USE_MME)
|
||||
uint8_t send_security_mode_command = FALSE;
|
||||
rrc_pdcp_config_security(
|
||||
ctxt_pP,
|
||||
ue_context_pP,
|
||||
send_security_mode_command);
|
||||
LOG_D(RRC, "set security successfully \n");
|
||||
#endif
|
||||
// Measurement ID list
|
||||
MeasId_list = CALLOC(1, sizeof(*MeasId_list));
|
||||
@@ -1869,15 +1838,9 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
|
||||
, (SCellToAddMod_r10_t*)NULL
|
||||
#endif
|
||||
);
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size,
|
||||
"[MSG] RRC Connection Reconfiguration\n");
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Connection Reconfiguration\n");
|
||||
for (i = 0; i < size; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]);
|
||||
}
|
||||
LOG_F(RRC,"\n");
|
||||
////////////////////////////////////////
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
|
||||
@@ -1977,9 +1940,6 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject(
|
||||
)
|
||||
//-----------------------------------------------------------------------------
|
||||
{
|
||||
#ifdef RRC_MSG_PRINT
|
||||
int cnt;
|
||||
#endif
|
||||
int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
|
||||
if(UE_id != -1){
|
||||
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1;
|
||||
@@ -1997,15 +1957,11 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject(
|
||||
do_RRCConnectionReestablishmentReject(ctxt_pP->module_id,
|
||||
(uint8_t*) RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload);
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRCConnectionReestablishmentReject\n");
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,
|
||||
(char *)(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload),
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size,
|
||||
"[MSG] RRCConnectionReestablishmentReject\n");
|
||||
|
||||
for (cnt = 0; cnt < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size; cnt++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload)[cnt]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
|
||||
MSC_LOG_TX_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
@@ -2336,15 +2292,8 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
|
||||
#endif
|
||||
);
|
||||
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size,"[MSG] RRC Connection Reconfiguration\n");
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Connection Reconfiguration\n");
|
||||
for (i = 0; i < size; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]);
|
||||
}
|
||||
LOG_F(RRC,"\n");
|
||||
////////////////////////////////////////
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
|
||||
@@ -2606,15 +2555,8 @@ rrc_eNB_modify_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* cons
|
||||
#endif
|
||||
);
|
||||
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Connection Reconfiguration\n");
|
||||
for (i = 0; i < size; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]);
|
||||
}
|
||||
LOG_F(RRC,"\n");
|
||||
////////////////////////////////////////
|
||||
#endif
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size,
|
||||
"[MSG] RRC Connection Reconfiguration\n");
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
|
||||
@@ -2731,15 +2673,8 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_release( const protocol_
|
||||
#endif
|
||||
);
|
||||
ue_context_pP->ue_context.e_rab_release_command_flag = 1;
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Connection Reconfiguration\n");
|
||||
for (i = 0; i < size; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]);
|
||||
}
|
||||
LOG_F(RRC,"\n");
|
||||
////////////////////////////////////////
|
||||
#endif
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size,
|
||||
"[MSG] RRC Connection Reconfiguration\n");
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
/* Free all NAS PDUs */
|
||||
@@ -3460,15 +3395,8 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons
|
||||
, (SCellToAddMod_r10_t*)NULL
|
||||
#endif
|
||||
);
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Connection Reconfiguration\n");
|
||||
for (i = 0; i < size; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]);
|
||||
}
|
||||
LOG_F(RRC,"\n");
|
||||
////////////////////////////////////////
|
||||
#endif
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size,
|
||||
"[MSG] RRC Connection Reconfiguration\n");
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
|
||||
@@ -4052,15 +3980,8 @@ flexran_rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt
|
||||
, (SCellToAddMod_r10_t*)NULL
|
||||
#endif
|
||||
);
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Connection Reconfiguration\n");
|
||||
for (i = 0; i < size; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]);
|
||||
}
|
||||
LOG_F(RRC,"\n");
|
||||
////////////////////////////////////////
|
||||
#endif
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)buffer,size,
|
||||
"[MSG] RRC Connection Reconfiguration\n");
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
|
||||
@@ -5438,11 +5359,9 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
#ifdef PDCP_USE_NETLINK
|
||||
int oip_ifup = 0;
|
||||
int dest_ip_offset = 0;
|
||||
module_id_t ue_module_id = -1;
|
||||
/* avoid gcc warnings */
|
||||
(void)oip_ifup;
|
||||
(void)dest_ip_offset;
|
||||
(void)ue_module_id;
|
||||
#endif
|
||||
|
||||
uint8_t *kRRCenc = NULL;
|
||||
@@ -5585,6 +5504,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
ctxt_pP->module_id + 1); // fourth octet
|
||||
|
||||
if (oip_ifup == 0) { // interface is up --> send a config the DRB
|
||||
module_id_t ue_module_id;
|
||||
dest_ip_offset = 8;
|
||||
LOG_I(OIP,
|
||||
"[eNB %d] Config the oai%d to send/receive pkt on DRB %ld to/from the protocol stack\n",
|
||||
@@ -5754,16 +5674,10 @@ rrc_eNB_generate_RRCConnectionSetup(
|
||||
SRB_configList,
|
||||
&ue_context_pP->ue_context.physicalConfigDedicated);
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Connection Setup\n");
|
||||
|
||||
for (cnt = 0; cnt < RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size; cnt++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)RC.rrc[ctxt_pP->module_id]->Srb0.Tx_buffer.Payload)[cnt]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
//////////////////////////////////
|
||||
#endif
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,
|
||||
(char *)(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload),
|
||||
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size,
|
||||
"[MSG] RRC Connection Setup\n");
|
||||
|
||||
// configure SRB1/SRB2, PhysicalConfigDedicated, MAC_MainConfig for UE
|
||||
|
||||
@@ -6111,15 +6025,10 @@ rrc_eNB_decode_ccch(
|
||||
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_REQUEST, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Connection Reestablishment Request\n");
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)(Srb_info->Rx_buffer.Payload),
|
||||
Srb_info->Rx_buffer.payload_size,
|
||||
"[MSG] RRC Connection Reestablishment Request\n");
|
||||
|
||||
for (i = 0; i < Srb_info->Rx_buffer.payload_size; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)Srb_info->Rx_buffer.Payload)[i]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
LOG_D(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT"MAC_eNB--- MAC_DATA_IND (rrcConnectionReestablishmentRequest on SRB0) --> RRC_eNB\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
|
||||
@@ -6336,15 +6245,10 @@ rrc_eNB_decode_ccch(
|
||||
T(T_ENB_RRC_CONNECTION_REQUEST, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Connection Request\n");
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)(Srb_info->Rx_buffer.Payload),
|
||||
Srb_info->Rx_buffer.payload_size,
|
||||
"[MSG] RRC Connection Request\n");
|
||||
|
||||
for (i = 0; i < Srb_info->Rx_buffer.payload_size; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)Srb_info->Rx_buffer.Payload)[i]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
LOG_D(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT"MAC_eNB --- MAC_DATA_IND (rrcConnectionRequest on SRB0) --> RRC_eNB\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
|
||||
@@ -6631,36 +6535,7 @@ rrc_eNB_decode_dcch(
|
||||
sdu_sizeP,
|
||||
0,
|
||||
0);
|
||||
/*
|
||||
#if defined(ENABLE_ITTI)
|
||||
# if defined(DISABLE_ITTI_XER_PRINT)
|
||||
{
|
||||
MessageDef *message_p;
|
||||
|
||||
message_p = itti_alloc_new_message(TASK_RRC_ENB, RRC_UL_DCCH_MESSAGE);
|
||||
memcpy(&message_p->ittiMsg, (void *)ul_dcch_msg, sizeof(RrcUlDcchMessage));
|
||||
|
||||
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->instance, message_p);
|
||||
}
|
||||
# else
|
||||
{
|
||||
char message_string[10000];
|
||||
size_t message_string_size;
|
||||
|
||||
if ((message_string_size =
|
||||
xer_sprint(message_string, sizeof(message_string), &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg)) >= 0) {
|
||||
MessageDef *msg_p;
|
||||
|
||||
msg_p = itti_alloc_new_message_sized(TASK_RRC_ENB, RRC_UL_DCCH, message_string_size + sizeof(IttiMsgText));
|
||||
msg_p->ittiMsg.rrc_ul_dcch.size = message_string_size;
|
||||
memcpy(&msg_p->ittiMsg.rrc_ul_dcch.text, message_string, message_string_size);
|
||||
|
||||
itti_send_msg_to_task(TASK_UNKNOWN, ctxt_pP->instance, msg_p);
|
||||
}
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
*/
|
||||
{
|
||||
for (i = 0; i < sdu_sizeP; i++) {
|
||||
LOG_T(RRC, "%x.", Rx_sdu[i]);
|
||||
@@ -6714,15 +6589,9 @@ rrc_eNB_decode_dcch(
|
||||
LOG_I(RRC, "Processing RRCConnectionReconfigurationComplete UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
||||
break;
|
||||
}
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Connection Reconfiguration Complete\n");
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)(Rx_sdu),sdu_sizeP,
|
||||
"[MSG] RRC Connection Reconfiguration Complete\n");
|
||||
|
||||
for (i = 0; i < sdu_sizeP; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
MSC_RRC_UE,
|
||||
@@ -6745,42 +6614,42 @@ rrc_eNB_decode_dcch(
|
||||
RRCConnectionReconfigurationComplete__criticalExtensions_PR_rrcConnectionReconfigurationComplete_r8) {
|
||||
/*NN: revise the condition */
|
||||
/*FK: left the condition as is for the case MME is used (S1 mode) but setting dedicated_DRB = 1 otherwise (noS1 mode) so that no second RRCReconfiguration message activationg more DRB is sent as this causes problems with the nasmesh driver.*/
|
||||
#if defined(ENABLE_USE_MME)
|
||||
if (ue_context_p->ue_context.Status == RRC_RECONFIGURED){
|
||||
dedicated_DRB = 1;
|
||||
LOG_I(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
|
||||
//clear
|
||||
int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
|
||||
if(UE_id == -1){
|
||||
LOG_E(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" RRCConnectionReconfigurationComplete without rnti %x, fault\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti);
|
||||
break;
|
||||
}
|
||||
if(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag == 1){
|
||||
LOG_I(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld) C-RNTI Complete\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
|
||||
dedicated_DRB = 2;
|
||||
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0;
|
||||
}
|
||||
} else {
|
||||
dedicated_DRB = 0;
|
||||
ue_context_p->ue_context.Status = RRC_RECONFIGURED;
|
||||
LOG_I(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (default DRB, xid %ld)\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
|
||||
}
|
||||
ue_context_p->ue_context.reestablishment_xid = -1;
|
||||
#else
|
||||
dedicated_DRB = 1;
|
||||
ue_context_p->ue_context.Status = RRC_RECONFIGURED;
|
||||
LOG_I(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
|
||||
#endif
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (ue_context_p->ue_context.Status == RRC_RECONFIGURED){
|
||||
dedicated_DRB = 1;
|
||||
LOG_I(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
|
||||
//clear
|
||||
int16_t UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rnti);
|
||||
if(UE_id == -1){
|
||||
LOG_E(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" RRCConnectionReconfigurationComplete without rnti %x, fault\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ctxt_pP->rnti);
|
||||
break;
|
||||
}
|
||||
if(RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag == 1){
|
||||
LOG_I(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld) C-RNTI Complete\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
|
||||
dedicated_DRB = 2;
|
||||
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag = 0;
|
||||
}
|
||||
} else {
|
||||
dedicated_DRB = 0;
|
||||
ue_context_p->ue_context.Status = RRC_RECONFIGURED;
|
||||
LOG_I(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (default DRB, xid %ld)\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
|
||||
}
|
||||
ue_context_p->ue_context.reestablishment_xid = -1;
|
||||
} else {
|
||||
dedicated_DRB = 1;
|
||||
ue_context_p->ue_context.Status = RRC_RECONFIGURED;
|
||||
LOG_I(RRC,
|
||||
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld)\n",
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),ul_dcch_msg->message.choice.c1.choice.rrcConnectionReconfigurationComplete.rrc_TransactionIdentifier);
|
||||
}
|
||||
|
||||
rrc_eNB_process_RRCConnectionReconfigurationComplete(
|
||||
ctxt_pP,
|
||||
@@ -6795,8 +6664,7 @@ rrc_eNB_decode_dcch(
|
||||
}
|
||||
}
|
||||
#if defined(ENABLE_ITTI)
|
||||
# if defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED == 1) {
|
||||
#if defined(ENABLE_USE_MME)
|
||||
if (dedicated_DRB == 1){
|
||||
// rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(ctxt_pP,
|
||||
// ue_context_p,
|
||||
@@ -6861,14 +6729,12 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#else // establish a dedicated bearer
|
||||
if (dedicated_DRB == 0 ) {
|
||||
// ue_context_p->ue_context.e_rab[0].status = E_RAB_STATUS_ESTABLISHED;
|
||||
rrc_eNB_reconfigure_DRBs(ctxt_pP,ue_context_p);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
|
||||
@@ -6876,15 +6742,8 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
|
||||
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_COMPLETE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Connection Reestablishment Complete\n");
|
||||
|
||||
for (i = 0; i < sdu_sizeP; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
|
||||
"[MSG] RRC Connection Reestablishment Complete\n");
|
||||
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
@@ -6963,15 +6822,8 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
|
||||
LOG_I(RRC, "Processing RRCConnectionSetupComplete UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
||||
break;
|
||||
}
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Connection SetupComplete\n");
|
||||
|
||||
for (i = 0; i < sdu_sizeP; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
|
||||
"[MSG] RRC Connection SetupComplete\n");
|
||||
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
@@ -7023,15 +6875,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
|
||||
LOG_I(RRC, "Processing securityModeComplete UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
||||
break;
|
||||
}
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Security Mode Complete\n");
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
|
||||
"[MSG] RRC Security Mode Complete\n");
|
||||
|
||||
for (i = 0; i < sdu_sizeP; i++) eNB->pusch_vars[UE_id]{
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
@@ -7053,9 +6899,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||
DCCH,
|
||||
sdu_sizeP);
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg);
|
||||
}
|
||||
// confirm with PDCP about the security mode for DCCH
|
||||
//rrc_pdcp_config_req (enb_mod_idP, frameP, 1,CONFIG_ACTION_SET_SECURITY_MODE, (ue_mod_idP * NB_RB_MAX) + DCCH, 0x77);
|
||||
// continue the procedure
|
||||
@@ -7068,15 +6914,8 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
|
||||
T(T_ENB_RRC_SECURITY_MODE_FAILURE, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
|
||||
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC Security Mode Failure\n");
|
||||
|
||||
for (i = 0; i < sdu_sizeP; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
|
||||
"[MSG] RRC Security Mode Failure\n");
|
||||
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
@@ -7094,9 +6933,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||
DCCH,
|
||||
sdu_sizeP);
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg);
|
||||
}
|
||||
// cancel the security mode in PDCP
|
||||
|
||||
// followup with the remaining procedure
|
||||
@@ -7112,15 +6951,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
|
||||
LOG_I(RRC, "Processing ueCapabilityInformation UE %x, ue_context_p is NULL\n", ctxt_pP->rnti);
|
||||
break;
|
||||
}
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC UECapablility Information \n");
|
||||
|
||||
for (i = 0; i < sdu_sizeP; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
|
||||
"[MSG] RRC UECapablility Information\n");
|
||||
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
@@ -7142,9 +6975,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
|
||||
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
|
||||
DCCH,
|
||||
sdu_sizeP);
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_UL_DCCH_Message, (void *)ul_dcch_msg);
|
||||
}
|
||||
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);
|
||||
@@ -7161,9 +6994,9 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
|
||||
ul_dcch_msg->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.
|
||||
choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list.
|
||||
array[0]->ueCapabilityRAT_Container.size, 0, 0);
|
||||
#ifdef XER_PRINT
|
||||
xer_fprint(stdout, &asn_DEF_UE_EUTRA_Capability, ue_context_p->ue_context.UE_Capability);
|
||||
#endif
|
||||
if ( LOG_DEBUGFLAG(DEBUG_ASN1) ) {
|
||||
xer_fprint(stdout, &asn_DEF_UE_EUTRA_Capability, ue_context_p->ue_context.UE_Capability);
|
||||
}
|
||||
|
||||
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",
|
||||
@@ -7174,22 +7007,22 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
|
||||
ue_context_p->ue_context.UE_Capability = 0;
|
||||
}
|
||||
|
||||
#if defined(ENABLE_USE_MME)
|
||||
if (EPC_MODE_ENABLED) {
|
||||
|
||||
if (EPC_MODE_ENABLED == 1) {
|
||||
rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(ctxt_pP,
|
||||
ue_context_p,
|
||||
ul_dcch_msg);
|
||||
if (EPC_MODE_ENABLED == 1) {
|
||||
rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(ctxt_pP,
|
||||
ue_context_p,
|
||||
ul_dcch_msg);
|
||||
}
|
||||
} else {
|
||||
ue_context_p->ue_context.nb_of_e_rabs = 1;
|
||||
for (i = 0; i < ue_context_p->ue_context.nb_of_e_rabs; i++){
|
||||
ue_context_p->ue_context.e_rab[i].status = E_RAB_STATUS_NEW;
|
||||
ue_context_p->ue_context.e_rab[i].param.e_rab_id = 1+i;
|
||||
ue_context_p->ue_context.e_rab[i].param.qos.qci=9;
|
||||
}
|
||||
ue_context_p->ue_context.setup_e_rabs =ue_context_p->ue_context.nb_of_e_rabs;
|
||||
}
|
||||
#else
|
||||
ue_context_p->ue_context.nb_of_e_rabs = 1;
|
||||
for (i = 0; i < ue_context_p->ue_context.nb_of_e_rabs; i++){
|
||||
ue_context_p->ue_context.e_rab[i].status = E_RAB_STATUS_NEW;
|
||||
ue_context_p->ue_context.e_rab[i].param.e_rab_id = 1+i;
|
||||
ue_context_p->ue_context.e_rab[i].param.qos.qci=9;
|
||||
}
|
||||
ue_context_p->ue_context.setup_e_rabs =ue_context_p->ue_context.nb_of_e_rabs;
|
||||
#endif
|
||||
|
||||
rrc_eNB_generate_defaultRRCConnectionReconfiguration(ctxt_pP,
|
||||
ue_context_p,
|
||||
@@ -7212,16 +7045,8 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
|
||||
}
|
||||
|
||||
LOG_D(RRC,"[MSG] RRC UL Information Transfer \n");
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] RRC UL Information Transfer \n");
|
||||
|
||||
for (i = 0; i < sdu_sizeP; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
|
||||
"[MSG] RRC UL Information Transfer \n");
|
||||
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
@@ -7233,15 +7058,11 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
|
||||
ue_context_p->ue_context.rnti,
|
||||
sdu_sizeP);
|
||||
|
||||
#if defined(ENABLE_USE_MME)
|
||||
|
||||
if (EPC_MODE_ENABLED == 1) {
|
||||
rrc_eNB_send_S1AP_UPLINK_NAS(ctxt_pP,
|
||||
ue_context_p,
|
||||
ul_dcch_msg);
|
||||
}
|
||||
|
||||
#endif
|
||||
break;
|
||||
|
||||
case UL_DCCH_MessageType__c1_PR_counterCheckResponse:
|
||||
@@ -7307,15 +7128,8 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
|
||||
//case UL_DCCH_MessageType__messageClassExtension__c2_PR_sidelinkUEInformation_r12: //SidelinkUEInformation
|
||||
LOG_I(RRC,"THINH [UL_DCCH_MessageType__messageClassExtension_PR_c2]\n");
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
LOG_F(RRC,"[MSG] SidelinkUEInformation\n");
|
||||
|
||||
for (i = 0; i < sdu_sizeP; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)Rx_sdu)[i]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,(char *)Rx_sdu,sdu_sizeP,
|
||||
"[MSG] RRC SidelinkUEInformation \n");
|
||||
|
||||
MSC_LOG_RX_MESSAGE(
|
||||
MSC_RRC_ENB,
|
||||
|
||||
@@ -467,43 +467,20 @@ rrc_pdcp_config_security(
|
||||
&kRRCint);
|
||||
|
||||
#if !defined(USRP_REC_PLAY)
|
||||
#define DEBUG_SECURITY 1
|
||||
SET_LOG_DUMP(DEBUG_SECURITY) ;
|
||||
#endif
|
||||
|
||||
#if defined (DEBUG_SECURITY)
|
||||
#undef msg
|
||||
#define msg printf
|
||||
|
||||
if (print_keys ==1 ) {
|
||||
print_keys =0;
|
||||
int i;
|
||||
msg("\nKeNB:");
|
||||
if ( LOG_DUMPFLAG( DEBUG_SECURITY ) ) {
|
||||
if (print_keys ==1 ) {
|
||||
print_keys =0;
|
||||
|
||||
for(i = 0; i < 32; i++) {
|
||||
msg("%02x", ue_context_pP->ue_context.kenb[i]);
|
||||
LOG_DUMPMSG(RRC, DEBUG_SECURITY, ue_context_pP->ue_context.kenb, 32,"\nKeNB:" );
|
||||
LOG_DUMPMSG(RRC, DEBUG_SECURITY, kRRCenc, 32,"\nKRRCenc:" );
|
||||
LOG_DUMPMSG(RRC, DEBUG_SECURITY, kRRCint, 32,"\nKRRCint:" );
|
||||
}
|
||||
|
||||
msg("\n");
|
||||
|
||||
msg("\nKRRCenc:");
|
||||
|
||||
for(i = 0; i < 32; i++) {
|
||||
msg("%02x", kRRCenc[i]);
|
||||
}
|
||||
|
||||
msg("\n");
|
||||
|
||||
msg("\nKRRCint:");
|
||||
|
||||
for(i = 0; i < 32; i++) {
|
||||
msg("%02x", kRRCint[i]);
|
||||
}
|
||||
|
||||
msg("\n");
|
||||
|
||||
}
|
||||
|
||||
#endif //DEBUG_SECURITY
|
||||
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, DCCH, SRB_FLAG_YES);
|
||||
h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p);
|
||||
|
||||
@@ -945,16 +922,8 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
|
||||
S1AP_DOWNLINK_NAS (msg_p).nas_pdu.length,
|
||||
S1AP_DOWNLINK_NAS (msg_p).nas_pdu.buffer);
|
||||
|
||||
#ifdef RRC_MSG_PRINT
|
||||
int i=0;
|
||||
LOG_F(RRC,"[MSG] RRC DL Information Transfer\n");
|
||||
LOG_DUMPMSG(RRC,DEBUG_RRC,buffer,length,"[MSG] RRC DL Information Transfer\n");
|
||||
|
||||
for (i = 0; i < length; i++) {
|
||||
LOG_F(RRC,"%02x ", ((uint8_t*)buffer)[i]);
|
||||
}
|
||||
|
||||
LOG_F(RRC,"\n");
|
||||
#endif
|
||||
/*
|
||||
* switch UL or DL NAS message without RRC piggybacked to SRB2 if active.
|
||||
*/
|
||||
|
||||
@@ -57,7 +57,6 @@
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
extern int asn_debug;
|
||||
extern int asn1_xer_print;
|
||||
|
||||
#if defined(ENB_MODE)
|
||||
|
||||
Reference in New Issue
Block a user