merge, compile ok, regular exe ok, ocp-gnb not

This commit is contained in:
laurent
2020-04-10 18:21:37 +02:00
274 changed files with 29669 additions and 20208 deletions
+5 -4
View File
@@ -95,14 +95,15 @@ typedef enum {
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
#ifdef LOG_E
# define LOG_TRACE(s, x, args...) \
do { \
switch (s) { \
case ERROR: LOG_E(NAS, " %s:%d " x "\n", __FILE__, __LINE__, ##args); break; \
case WARNING: LOG_W(NAS, " %s:%d " x "\n", __FILE__, __LINE__, ##args); break; \
case INFO: LOG_I(NAS, " %s:%d " x "\n", __FILE__, __LINE__, ##args); break; \
default: LOG_D(NAS, " %s:%d " x "\n", __FILE__, __LINE__, ##args); break; \
case ERROR: LOG_E(NAS, " %s:%d " x "\n", __FILENAME__, __LINE__, ##args); break; \
case WARNING: LOG_W(NAS, " %s:%d " x "\n", __FILENAME__, __LINE__, ##args); break; \
case INFO: LOG_I(NAS, " %s:%d " x "\n", __FILENAME__, __LINE__, ##args); break; \
default: LOG_D(NAS, " %s:%d " x "\n", __FILENAME__, __LINE__, ##args); break; \
} \
} while (0)
+1 -1
View File
@@ -80,6 +80,7 @@ bool parse_plmn_param(config_setting_t *plmn_setting, plmn_conf_param_t *conf) {
bool parse_plmns(config_setting_t *all_plmn_setting, networks_t *networks) {
config_setting_t *plmn_setting = NULL;
char plmn[100];
int size = 0;
size = config_setting_length(all_plmn_setting);
@@ -92,7 +93,6 @@ bool parse_plmns(config_setting_t *all_plmn_setting, networks_t *networks) {
for (int i = 0; i < networks->size; i++) {
network_t *network = &networks->items[i];
char plmn[100];
sprintf(plmn, "%s%d", PLMN, i);
plmn_setting = config_setting_get_member(all_plmn_setting, plmn);
if (plmn_setting == NULL) {
+1 -1
View File
@@ -13,6 +13,7 @@ bool parse_config_file(const char *output_dir, const char *conf_filename, int ou
config_setting_t *root_setting = NULL;
config_setting_t *ue_setting = NULL;
config_setting_t *all_plmn_setting = NULL;
char user[100];
config_t cfg;
networks_t networks;;
@@ -46,7 +47,6 @@ bool parse_config_file(const char *output_dir, const char *conf_filename, int ou
user_plmns_t user_plmns;
char user[100];
sprintf(user, "%s%d", UE, i);
ue_setting = config_setting_get_member(root_setting, user);
+1 -1
View File
@@ -286,7 +286,7 @@ int emm_proc_security_mode_command(nas_user_t *user, int native_ksi, int ksi,
user->emm_data->security->selected_algorithms.encryption = seea;
user->emm_data->security->selected_algorithms.integrity = seia;
#if defined(NAS_BUILT_IN_UE)
nas_itti_kenb_refresh_req(security_data->kenb.value);
nas_itti_kenb_refresh_req(security_data->kenb.value, user->ueid);
#endif
}
+2 -2
View File
@@ -100,7 +100,7 @@ int nas_itti_protected_msg(const char *buffer, const nas_message_t *msg, const i
extern unsigned char NB_eNB_INST;
int nas_itti_kenb_refresh_req(const Byte_t kenb[32]) {
int nas_itti_kenb_refresh_req(const Byte_t kenb[32], int user_id) {
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_NAS_UE, NAS_KENB_REFRESH_REQ);
memcpy(NAS_KENB_REFRESH_REQ(message_p).kenb, kenb, sizeof(NAS_KENB_REFRESH_REQ(message_p).kenb));
@@ -125,7 +125,7 @@ int nas_itti_kenb_refresh_req(const Byte_t kenb[32]) {
kenb[20], kenb[21], kenb[22], kenb[23],
kenb[24], kenb[25], kenb[26], kenb[27],
kenb[28], kenb[29], kenb[30], kenb[31]);
return itti_send_msg_to_task(TASK_RRC_UE, NB_eNB_INST + 0 /* TODO to be virtualized */, message_p);
return itti_send_msg_to_task(TASK_RRC_UE, NB_eNB_INST + user_id, message_p);
}
int nas_itti_cell_info_req(const plmn_t plmnID, const Byte_t rat, int user_id) {
+1 -1
View File
@@ -48,7 +48,7 @@ int nas_itti_protected_msg(
# if defined(NAS_BUILT_IN_UE)
int nas_itti_kenb_refresh_req(const Byte_t kenb[32]);
int nas_itti_kenb_refresh_req(const Byte_t kenb[32], int user_id);
int nas_itti_cell_info_req(const plmn_t plmnID, const Byte_t rat, int user_id);
+8 -2
View File
@@ -116,8 +116,14 @@ do { \
#define INT16_TO_OCTET_STRING(x, aSN) \
do { \
(aSN)->buf = calloc(2, sizeof(uint8_t)); \
(aSN)->size = 2; \
INT16_TO_BUFFER(x, (aSN)->buf); \
INT16_TO_BUFFER(x, ((aSN)->buf)); \
(aSN)->size = 2; \
} while(0)
#define INT16_TO_BIT_STRING(x, aSN) \
do { \
INT16_TO_OCTET_STRING(x, aSN); \
(aSN)->bits_unused = 0; \
} while(0)
#define INT8_TO_OCTET_STRING(x, aSN) \