Commit 4cdc0138 authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'feature-127-protocol-split' of...

Merge branch 'feature-127-protocol-split' of https://gitlab.eurecom.fr/oai/openairinterface5g into feature-127-protocol-split

Conflicts:
	cmake_targets/tools/build_helper
parents 05c7681b 461bfa5f
......@@ -80,7 +80,6 @@ typedef struct mme_ip_address_s {
} mme_ip_address_t;
typedef struct cu_params {
const char *local_interface;
const char *local_ipv4_address;
const uint16_t local_port;
const char *remote_ipv4_address;
......
......@@ -150,10 +150,10 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
// NR cellID
BIT_STRING_TO_NR_CELL_IDENTITY(&served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity,
F1AP_SETUP_REQ(message_p).nr_cellid[i]);
LOG_D(CU_F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %d\n", assoc_id,
LOG_D(CU_F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %llu\n", assoc_id,
F1AP_SETUP_REQ(message_p).mcc[i],
F1AP_SETUP_REQ(message_p).mnc[i],
F1AP_SETUP_REQ(message_p).nr_cellid[i]);
(long long unsigned int)F1AP_SETUP_REQ(message_p).nr_cellid[i]);
LOG_D(CU_F1AP, "nr_cellId : %x %x %x %x %x\n",
served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[0],
served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[1],
......@@ -335,11 +335,12 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t));
LOG_D(CU_F1AP, "SI %d: ");
LOG_D(CU_F1AP, "SI %d: ",i);
for (int n=0;n<f1ap_setup_resp->SI_container_length[i][0];n++) LOG_D(CU_F1AP, "%2x ",f1ap_setup_resp->SI_container[i][0][n]);
LOG_D(CU_F1AP, "\n");
OCTET_STRING_fromBuf(&gNB_CUSystemInformation->sImessage,
f1ap_setup_resp->SI_container[i][0], f1ap_setup_resp->SI_container_length[i][0]);
(const char*)f1ap_setup_resp->SI_container[i][0],
f1ap_setup_resp->SI_container_length[i][0]);
LOG_D(CU_F1AP, "f1ap_setup_resp->SI_container_length = %d \n" , f1ap_setup_resp->SI_container_length[0][0]);
cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation;
......@@ -350,7 +351,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
ASN_SEQUENCE_ADD(&p_160P9_t.list,
cells_to_be_activated_list_itemExtIEs);
cells_to_be_activated_list_item.iE_Extensions = &p_160P9_t;
cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_160P9_t;
}
/* ADD */
......
......@@ -73,7 +73,6 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
F1AP_InitialULRRCMessageTransferIEs_t *ie;
rnti_t rnti;
uint8_t *ccch_sdu;
sdu_size_t ccch_sdu_len;
int CC_id =0;
......@@ -135,7 +134,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
break;
}
}
AssertFatal(rrc_inst>=0,"couldn't find an RRC instance for nr_cell %ll\n",nr_cellid);
AssertFatal(rrc_inst>=0,"couldn't find an RRC instance for nr_cell %llu\n",(unsigned long long int)nr_cellid);
int f1ap_uid = f1ap_add_ue(&f1ap_cu_ue[rrc_inst], rrc_inst, CC_id, 0, rnti);
if (f1ap_uid < 0 ) {
......@@ -193,8 +192,8 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID;
ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_cu_ue[instance],f1ap_dl_rrc->rnti);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
LOG_I(CU_F1AP, "Setting GNB_CU_UE_F1AP_ID %d associated with UE RNTI %x (instance %d)\n",
ie->value.choice.GNB_CU_UE_F1AP_ID, f1ap_dl_rrc->rnti, instance);
LOG_I(CU_F1AP, "Setting GNB_CU_UE_F1AP_ID %llu associated with UE RNTI %x (instance %d)\n",
(unsigned long long int)ie->value.choice.GNB_CU_UE_F1AP_ID, f1ap_dl_rrc->rnti, instance);
/* mandatory */
......@@ -205,7 +204,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_cu_ue[instance],f1ap_dl_rrc->rnti); //f1ap_dl_rrc->gNB_DU_ue_id; // TODO: f1ap_dl_rrc->gNB_DU_ue_id
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
LOG_I(CU_F1AP, "GNB_DU_UE_F1AP_ID %d associated with UE RNTI %x \n", ie->value.choice.GNB_DU_UE_F1AP_ID, f1ap_dl_rrc->rnti);
LOG_I(CU_F1AP, "GNB_DU_UE_F1AP_ID %llu associated with UE RNTI %x \n", (unsigned long long int)ie->value.choice.GNB_DU_UE_F1AP_ID, f1ap_dl_rrc->rnti);
/* optional */
/* c3. oldgNB_DU_UE_F1AP_ID */
......@@ -245,7 +244,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
ie->id = F1AP_ProtocolIE_ID_id_RRCContainer;
ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_RRCContainer;
OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, f1ap_dl_rrc->rrc_container, f1ap_dl_rrc->rrc_container_length);
OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, (const char*)f1ap_dl_rrc->rrc_container, f1ap_dl_rrc->rrc_container_length);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* optional */
......@@ -287,20 +286,13 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
LOG_D(CU_F1AP, "CU_handle_UL_RRC_MESSAGE_TRANSFER \n");
MessageDef *message_p;
F1AP_ULRRCMessageTransfer_t *container;
F1AP_ULRRCMessageTransferIEs_t *ie;
uint8_t *buffer;
uint32_t len;
uint64_t cu_ue_f1ap_id;
uint64_t du_ue_f1ap_id;
uint64_t srb_id;
int executeDuplication;
sdu_size_t ccch_sdu_len;
uint64_t subscriberProfileIDforRFP;
uint64_t rAT_FrequencySelectionPriority;
DevAssert(pdu != NULL);
......
......@@ -68,7 +68,6 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
/* setup parameters for F1U and start the server */
const cudu_params_t params = {
.local_interface = NULL, /* is not used */
.local_ipv4_address = RC.rrc[instance]->eth_params_s.my_addr,
.local_port = RC.rrc[instance]->eth_params_s.my_portd,
.remote_ipv4_address = RC.rrc[instance]->eth_params_s.remote_addr,
......
......@@ -174,7 +174,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
//MCC_MNC_TO_PLMNID(208, 95, 2, &nRCGI.pLMN_Identity);
NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[i], &nRCGI.nRCellIdentity);
LOG_D(DU_F1AP, "nRCellIdentity (%llx): %x.%x.%x.%x.%x\n",f1ap_du_data->nr_cellid[i],
LOG_D(DU_F1AP, "nRCellIdentity (%llx): %x.%x.%x.%x.%x\n",(long long unsigned int)f1ap_du_data->nr_cellid[i],
nRCGI.nRCellIdentity.buf[0],
nRCGI.nRCellIdentity.buf[1],
nRCGI.nRCellIdentity.buf[2],
......@@ -188,7 +188,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
/* - fiveGS_TAC */
OCTET_STRING_fromBuf(&served_cell_information.fiveGS_TAC,
&f1ap_du_data->tac[i],
(const char*)&f1ap_du_data->tac[i],
3);
/* - Configured_EPS_TAC */
......@@ -379,11 +379,11 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
F1AP_GNB_DU_System_Information_t *gNB_DU_System_Information = (F1AP_GNB_DU_System_Information_t *)calloc(1, sizeof(F1AP_GNB_DU_System_Information_t));
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018
f1ap_du_data->mib[i],//f1ap_du_data->mib,
(const char*)f1ap_du_data->mib[i],//f1ap_du_data->mib,
f1ap_du_data->mib_length[i]);
OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, // sept. 2018
f1ap_du_data->sib1[i],
(const char*)f1ap_du_data->sib1[i],
f1ap_du_data->sib1_length[i]);
gnb_du_served_cells_item.gNB_DU_System_Information = gNB_DU_System_Information; //
......
......@@ -100,7 +100,6 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
/* setup parameters for F1U and start the server */
const cudu_params_t params = {
.local_interface = NULL, /* is not used */
.local_ipv4_address = RC.mac[instance]->eth_params_n.my_addr,
.local_port = RC.mac[instance]->eth_params_n.my_portd,
.remote_ipv4_address = RC.mac[instance]->eth_params_n.remote_addr,
......
......@@ -51,7 +51,6 @@ void close_proto_agent(void)
int main(int argc, char *argv[])
{
const cudu_params_t params = {
.local_interface = "lo",
.local_ipv4_address = "192.168.12.45",
.local_port = 6464,
.remote_ipv4_address = "192.168.12.45",
......
......@@ -52,7 +52,6 @@ void close_proto_agent(void)
int main(int argc, char *argv[])
{
const cudu_params_t params = {
.local_interface = "lo",
.local_ipv4_address = "192.168.12.45",
.local_port = 6465,
.remote_ipv4_address = "192.168.12.45",
......
......@@ -59,7 +59,6 @@ int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p)
{
int channel_id;
DevAssert(p->local_interface);
DevAssert(p->local_ipv4_address);
DevAssert(p->local_port > 1024); // "unprivileged" port
DevAssert(p->remote_ipv4_address);
......
......@@ -13,9 +13,9 @@ eNBs =
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_country_code = "001";
mobile_network_code = "93";
mobile_network_code = "01";
nr_cellid = 12345678L
......@@ -60,9 +60,9 @@ MACRLCs = (
num_cc = 1;
tr_s_preference = "local_L1";
tr_n_preference = "f1";
local_n_if_name = "lo";
remote_n_address = "127.0.0.2";
local_n_address = "127.0.0.1";
local_n_if_name = "vlan203";
remote_n_address = "192.168.203.16";
local_n_address = "192.168.203.242";
local_n_portc = 60000;
remote_n_portc = 60001;
local_n_portd = 60010;
......@@ -79,9 +79,9 @@ L1s = (
RUs = (
{
local_if_name = "lo";
remote_address = "127.0.0.2";
local_address = "127.0.0.1";
local_if_name = "enp4s0f1";
local_address = "192.168.41.3";
remote_address = "192.168.41.1";
local_portc = 50000;
remote_portc = 50000;
local_portd = 50001;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment