Commit b6295efd authored by Bing-Kai Hong's avatar Bing-Kai Hong

modify the ip address struct in f1 setup req for DU

parent 185c2fd4
......@@ -51,6 +51,13 @@
// Note this should be 512 from maxval in 38.473
#define F1AP_MAX_NB_CELLS 2
typedef struct f1ap_net_ip_address_s {
unsigned ipv4:1;
unsigned ipv6:1;
char ipv4_address[16];
char ipv6_address[46];
} f1ap_net_ip_address_t;
typedef struct f1ap_cu_setup_req_s {
//
} f1ap_cu_setup_req_t;
......@@ -60,8 +67,8 @@ typedef struct f1ap_setup_req_s {
// Midhaul networking parameters
/* The eNB IP address to bind */
char CU_ipv4_address[16];
int CU_port;
f1ap_net_ip_address_t CU_f1_ip_address;
f1ap_net_ip_address_t DU_f1_ip_address;
/* Number of SCTP streams used for a mme association */
uint16_t sctp_in_streams;
......
......@@ -130,34 +130,30 @@ static uint32_t eNB_app_register(ngran_node_t node_type,uint32_t enb_id_start, u
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
{
if (node_type == ngran_eNB_DU) { // F1AP registration
// configure F1AP here for F1C
LOG_I(ENB_APP,"ngran_eNB_DU: Allocating ITTI message for F1AP_SETUP_REQ\n");
msg_p = itti_alloc_new_message (TASK_ENB_APP, F1AP_SETUP_REQ);
RCconfig_DU_F1(msg_p, enb_id);
LOG_I(ENB_APP,"[eNB %d] eNB_app_register via F1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
itti_send_msg_to_task (TASK_DU_F1, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
// configure GTPu here for F1U
// configure F1AP here for F1C
LOG_I(ENB_APP,"ngran_eNB_DU: Allocating ITTI message for F1AP_SETUP_REQ\n");
msg_p = itti_alloc_new_message (TASK_ENB_APP, F1AP_SETUP_REQ);
RCconfig_DU_F1(msg_p, enb_id);
LOG_I(ENB_APP,"[eNB %d] eNB_app_register via F1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
itti_send_msg_to_task (TASK_DU_F1, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
// configure GTPu here for F1U
}
else { // S1AP registration
/* note: there is an implicit relationship between the data structure and the message name */
msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
RCconfig_S1(msg_p, enb_id);
if (enb_id == 0) RCconfig_gtpu();
LOG_I(ENB_APP,"default drx %d\n",((S1AP_REGISTER_ENB_REQ(msg_p)).default_drx));
LOG_I(ENB_APP,"[eNB %d] eNB_app_register via S1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
itti_send_msg_to_task (TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
}
/* note: there is an implicit relationship between the data structure and the message name */
msg_p = itti_alloc_new_message (TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
RCconfig_S1(msg_p, enb_id);
if (enb_id == 0) RCconfig_gtpu();
LOG_I(ENB_APP,"default drx %d\n",((S1AP_REGISTER_ENB_REQ(msg_p)).default_drx));
LOG_I(ENB_APP,"[eNB %d] eNB_app_register via S1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
itti_send_msg_to_task (TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
}
register_enb_pending++;
}
}
......
......@@ -2375,104 +2375,115 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
// Output a list of all eNBs.
config_getlist( &ENBParamList,ENBParams,sizeof(ENBParams)/sizeof(paramdef_t),NULL);
AssertFatal(ENBParamList.paramarray[i][ENB_ENB_ID_IDX].uptr != NULL,
"eNB id %d is not defined in configuration file\n",i);
"eNB id %d is not defined in configuration file\n",i);
for (k=0; k <num_enbs ; k++) {
if (strcmp(ENBSParams[ENB_ACTIVE_ENBS_IDX].strlistptr[k], *(ENBParamList.paramarray[i][ENB_ENB_NAME_IDX].strptr) )== 0) {
paramdef_t SCTPParams[] = SCTPPARAMS_DESC;
paramdef_t NETParams[] = NETPARAMS_DESC;
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
paramdef_t SCTPParams[] = SCTPPARAMS_DESC;
paramdef_t NETParams[] = NETPARAMS_DESC;
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
F1AP_SETUP_REQ (msg_p).gNB_DU_id = *(ENBParamList.paramarray[0][ENB_ENB_ID_IDX].uptr);
LOG_I(ENB_APP,"F1AP: gNB_DU_id[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).gNB_DU_id);
LOG_I(ENB_APP,"F1AP: gNB_DU_id[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).gNB_DU_id);
F1AP_SETUP_REQ (msg_p).gNB_DU_name = strdup(*(ENBParamList.paramarray[0][ENB_ENB_NAME_IDX].strptr));
LOG_I(ENB_APP,"F1AP: gNB_DU_name[%d] %s\n",k,F1AP_SETUP_REQ (msg_p).gNB_DU_name);
F1AP_SETUP_REQ (msg_p).gNB_DU_name = strdup(*(ENBParamList.paramarray[0][ENB_ENB_NAME_IDX].strptr));
LOG_I(ENB_APP,"F1AP: gNB_DU_name[%d] %s\n",k,F1AP_SETUP_REQ (msg_p).gNB_DU_name);
F1AP_SETUP_REQ (msg_p).tac[k] = (uint16_t)atoi(*(ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].strptr));
LOG_I(ENB_APP,"F1AP: tac[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).tac[k]);
F1AP_SETUP_REQ (msg_p).tac[k] = (uint16_t)atoi(*(ENBParamList.paramarray[i][ENB_TRACKING_AREA_CODE_IDX].strptr));
LOG_I(ENB_APP,"F1AP: tac[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).tac[k]);
F1AP_SETUP_REQ (msg_p).mcc[k] = (uint16_t)atoi(*(ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX].strptr));
LOG_I(ENB_APP,"F1AP: mcc[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).mcc[k]);
F1AP_SETUP_REQ (msg_p).mcc[k] = (uint16_t)atoi(*(ENBParamList.paramarray[i][ENB_MOBILE_COUNTRY_CODE_IDX].strptr));
LOG_I(ENB_APP,"F1AP: mcc[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).mcc[k]);
F1AP_SETUP_REQ (msg_p).mnc[k] = (uint16_t)atoi(*(ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX].strptr));
LOG_I(ENB_APP,"F1AP: mnc[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).mnc[k]);
F1AP_SETUP_REQ (msg_p).mnc[k] = (uint16_t)atoi(*(ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX].strptr));
LOG_I(ENB_APP,"F1AP: mnc[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).mnc[k]);
F1AP_SETUP_REQ (msg_p).mnc_digit_length[k] = strlen(*(ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX].strptr));
LOG_I(ENB_APP,"F1AP: mnc_digit_length[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).mnc_digit_length[k]);
F1AP_SETUP_REQ (msg_p).mnc_digit_length[k] = strlen(*(ENBParamList.paramarray[i][ENB_MOBILE_NETWORK_CODE_IDX].strptr));
LOG_I(ENB_APP,"F1AP: mnc_digit_length[%d] %d\n",k,F1AP_SETUP_REQ (msg_p).mnc_digit_length[k]);
AssertFatal((F1AP_SETUP_REQ (msg_p).mnc_digit_length[k] == 2) ||
(F1AP_SETUP_REQ (msg_p).mnc_digit_length[k] == 3),
"BAD MNC DIGIT LENGTH %d",
F1AP_SETUP_REQ (msg_p).mnc_digit_length[k]);
AssertFatal((F1AP_SETUP_REQ (msg_p).mnc_digit_length[k] == 2) ||
(F1AP_SETUP_REQ (msg_p).mnc_digit_length[k] == 3),
"BAD MNC DIGIT LENGTH %d",
F1AP_SETUP_REQ (msg_p).mnc_digit_length[k]);
LOG_I(ENB_APP,"F1AP: CU_ip4_address %s\n",RC.mac[k]->eth_params_n.remote_addr);
LOG_I(ENB_APP,"FIAP: CU_ip4_address %p, strlen %d\n",F1AP_SETUP_REQ (msg_p).CU_ipv4_address,(int)strlen(RC.mac[k]->eth_params_n.remote_addr));
LOG_I(ENB_APP,"F1AP: CU_ip4_address %s\n",RC.mac[k]->eth_params_n.remote_addr);
LOG_I(ENB_APP,"FIAP: CU_ip4_address %p, strlen %d\n",F1AP_SETUP_REQ (msg_p).CU_f1_ip_address.ipv4_address,(int)strlen(RC.mac[k]->eth_params_n.remote_addr));
strcpy(F1AP_SETUP_REQ (msg_p).CU_ipv4_address,
RC.mac[k]->eth_params_n.remote_addr);
//strcpy(F1AP_SETUP_REQ (msg_p).CU_ip_address[l].ipv6_address,*(F1ParamList.paramarray[l][ENB_CU_IPV6_ADDRESS_IDX].strptr));
F1AP_SETUP_REQ (msg_p).CU_port = RC.mac[k]->eth_params_n.remote_portc;
F1AP_SETUP_REQ (msg_p).CU_f1_ip_address.ipv6 = 0;
F1AP_SETUP_REQ (msg_p).CU_f1_ip_address.ipv4 = 1;
//strcpy(F1AP_SETUP_REQ (msg_p).CU_f1_ip_address.ipv6_address, "");
strcpy(F1AP_SETUP_REQ (msg_p).CU_f1_ip_address.ipv4_address, RC.mac[k]->eth_params_n.my_addr);
LOG_I(ENB_APP,"F1AP: DU_ip4_address %s\n",RC.mac[k]->eth_params_n.my_addr);
LOG_I(ENB_APP,"FIAP: DU_ip4_address %p, strlen %d\n",F1AP_SETUP_REQ (msg_p).DU_f1_ip_address.ipv4_address,(int)strlen(RC.mac[k]->eth_params_n.my_addr));
F1AP_SETUP_REQ (msg_p).DU_f1_ip_address.ipv6 = 0;
F1AP_SETUP_REQ (msg_p).DU_f1_ip_address.ipv4 = 1;
//strcpy(F1AP_SETUP_REQ (msg_p).DU_f1_ip_address.ipv6_address, "");
strcpy(F1AP_SETUP_REQ (msg_p).DU_f1_ip_address.ipv4_address, RC.mac[k]->eth_params_n.remote_addr);
//strcpy(F1AP_SETUP_REQ (msg_p).CU_ip_address[l].ipv6_address,*(F1ParamList.paramarray[l][ENB_CU_IPV6_ADDRESS_IDX].strptr));
//F1AP_SETUP_REQ (msg_p).CU_port = RC.mac[k]->eth_params_n.remote_portc; // maybe we dont need it
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);
F1AP_SETUP_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr);
F1AP_SETUP_REQ (msg_p).sctp_out_streams = (uint16_t)*(SCTPParams[ENB_SCTP_OUTSTREAMS_IDX].uptr);
eNB_RRC_INST *rrc = RC.rrc[k];
// wait until RRC cell information is configured
int cell_info_configured=0;
do {
LOG_I(ENB_APP,"ngran_eNB_DU: Waiting for basic cell configuration\n");
usleep(100000);
pthread_mutex_lock(&rrc->cell_info_mutex);
cell_info_configured = rrc->cell_info_configured;
pthread_mutex_unlock(&rrc->cell_info_mutex);
} while (cell_info_configured ==0);
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);
F1AP_SETUP_REQ (msg_p).sctp_in_streams = (uint16_t)*(SCTPParams[ENB_SCTP_INSTREAMS_IDX].uptr);
F1AP_SETUP_REQ (msg_p).sctp_out_streams = (uint16_t)*(SCTPParams[ENB_SCTP_OUTSTREAMS_IDX].uptr);
eNB_RRC_INST *rrc = RC.rrc[k];
// wait until RRC cell information is configured
int cell_info_configured=0;
do {
LOG_I(ENB_APP,"ngran_eNB_DU: Waiting for basic cell configuration\n");
usleep(100000);
pthread_mutex_lock(&rrc->cell_info_mutex);
cell_info_configured = rrc->cell_info_configured;
pthread_mutex_unlock(&rrc->cell_info_mutex);
} while (cell_info_configured ==0);
F1AP_SETUP_REQ (msg_p).nr_pci[k] = rrc->carrier[0].physCellId;
F1AP_SETUP_REQ (msg_p).nr_cellid[k] = 0;
F1AP_SETUP_REQ (msg_p).num_ssi[k] = 0;
if (rrc->carrier[0].sib1->tdd_Config) {
LOG_I(ENB_APP,"ngran_DU: Configuring Cell %d for TDD\n",k);
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nr_arfcn = freq_to_arfcn10(rrc->carrier[0].sib1->freqBandIndicator,
rrc->carrier[0].dl_CarrierFreq);
// For LTE use scs field to carry prefix type and number of antennas
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.scs = (rrc->carrier[0].Ncp<<2)+rrc->carrier[0].p_eNB;;
// use nrb field to hold LTE N_RB_DL (0...5)
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nrb = rrc->carrier[0].mib.message.dl_Bandwidth;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nrb = rrc->carrier[0].mib.message.dl_Bandwidth;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.num_frequency_bands = 1;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nr_band[0] = rrc->carrier[0].sib1->freqBandIndicator;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.sul_active = 0;
}
else {
LOG_I(ENB_APP,"ngran_DU: Configuring Cell %d for FDD\n",k);
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_arfcn = freq_to_arfcn10(rrc->carrier[0].sib1->freqBandIndicator,
rrc->carrier[0].dl_CarrierFreq);
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nr_arfcn = F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_arfcn;
// For LTE use scs field to carry prefix type and number of antennas
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_scs = (rrc->carrier[0].Ncp<<2)+rrc->carrier[0].p_eNB;;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_scs = rrc->carrier[0].Ncp;
// use nrb field to hold LTE N_RB_DL (0...5)
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nrb = rrc->carrier[0].mib.message.dl_Bandwidth;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nrb = rrc->carrier[0].mib.message.dl_Bandwidth;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.num_frequency_bands = 1;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.nr_band[0] = rrc->carrier[0].sib1->freqBandIndicator;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.sul_active = 0;
}
F1AP_SETUP_REQ (msg_p).measurement_timing_information[k] = NULL;
F1AP_SETUP_REQ (msg_p).ranac[k] = 0;
F1AP_SETUP_REQ (msg_p).mib[k] = rrc->carrier[0].MIB;
F1AP_SETUP_REQ (msg_p).sib1[k] = rrc->carrier[0].SIB1;
break;
}
}
}
F1AP_SETUP_REQ (msg_p).nr_pci[k] = rrc->carrier[0].physCellId;
F1AP_SETUP_REQ (msg_p).nr_cellid[k] = 0;
F1AP_SETUP_REQ (msg_p).num_ssi[k] = 0;
if (rrc->carrier[0].sib1->tdd_Config) {
LOG_I(ENB_APP,"ngran_DU: Configuring Cell %d for TDD\n",k);
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nr_arfcn = freq_to_arfcn10(rrc->carrier[0].sib1->freqBandIndicator,
rrc->carrier[0].dl_CarrierFreq);
// For LTE use scs field to carry prefix type and number of antennas
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.scs = (rrc->carrier[0].Ncp<<2)+rrc->carrier[0].p_eNB;;
// use nrb field to hold LTE N_RB_DL (0...5)
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nrb = rrc->carrier[0].mib.message.dl_Bandwidth;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nrb = rrc->carrier[0].mib.message.dl_Bandwidth;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.num_frequency_bands = 1;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].tdd.nr_band[0] = rrc->carrier[0].sib1->freqBandIndicator;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.sul_active = 0;
}
else {
LOG_I(ENB_APP,"ngran_DU: Configuring Cell %d for FDD\n",k);
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_arfcn = freq_to_arfcn10(rrc->carrier[0].sib1->freqBandIndicator,
rrc->carrier[0].dl_CarrierFreq);
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nr_arfcn = F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_nr_arfcn;
// For LTE use scs field to carry prefix type and number of antennas
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.dl_scs = (rrc->carrier[0].Ncp<<2)+rrc->carrier[0].p_eNB;;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_scs = rrc->carrier[0].Ncp;
// use nrb field to hold LTE N_RB_DL (0...5)
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nrb = rrc->carrier[0].mib.message.dl_Bandwidth;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.ul_nrb = rrc->carrier[0].mib.message.dl_Bandwidth;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.num_frequency_bands = 1;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.nr_band[0] = rrc->carrier[0].sib1->freqBandIndicator;
F1AP_SETUP_REQ (msg_p).nr_mode_info[k].fdd.sul_active = 0;
}
F1AP_SETUP_REQ (msg_p).measurement_timing_information[k] = NULL;
F1AP_SETUP_REQ (msg_p).ranac[k] = 0;
F1AP_SETUP_REQ (msg_p).mib[k] = rrc->carrier[0].MIB;
F1AP_SETUP_REQ (msg_p).sib1[k] = rrc->carrier[0].SIB1;
break;
} // if
} // for
} // if
return 0;
......
......@@ -113,7 +113,7 @@ void CU_send_sctp_init_req(instance_t enb_id) {
MessageDef *message_p = NULL;
message_p = itti_alloc_new_message (TASK_CU_F1, SCTP_INIT_MSG);
message_p->ittiMsg.sctp_init.port = RC.rrc[enb_id]->eth_params_s.my_portc;
message_p->ittiMsg.sctp_init.port = F1AP_PORT_NUMBER;
message_p->ittiMsg.sctp_init.ppid = F1AP_SCTP_PPID;
message_p->ittiMsg.sctp_init.ipv4 = 1;
message_p->ittiMsg.sctp_init.ipv6 = 0;
......
......@@ -45,6 +45,9 @@
#define F1AP_UE_IDENTIFIER_NUMBER 3
#define NUMBER_OF_eNB_MAX 3
// #include "common/ran_context.h"
// extern RAN_CONTEXT_t RC;
/* This structure describes association of a DU to a CU */
typedef struct f1ap_info {
......@@ -169,11 +172,11 @@ void *F1AP_DU_task(void *arg) {
// ==============================================================================
static void du_f1ap_register(du_f1ap_instance_t *instance_p,
char *cu_ip_address,
int cu_port,
uint16_t in_streams,
uint16_t out_streams)
static void du_f1ap_register(du_f1ap_instance_t *instance_p,
f1ap_net_ip_address_t *remote_address, // CU
f1ap_net_ip_address_t *local_address, // DU
uint16_t in_streams,
uint16_t out_streams)
{
MessageDef *message_p = NULL;
......@@ -182,13 +185,21 @@ static void du_f1ap_register(du_f1ap_instance_t *instance_p,
message_p = itti_alloc_new_message(TASK_S1AP, SCTP_NEW_ASSOCIATION_REQ);
sctp_new_association_req_p = &message_p->ittiMsg.sctp_new_association_req;
sctp_new_association_req_p->port = cu_port;
sctp_new_association_req_p->ulp_cnx_id = instance_p->instance;
sctp_new_association_req_p->port = F1AP_PORT_NUMBER;
sctp_new_association_req_p->ppid = F1AP_SCTP_PPID;
sctp_new_association_req_p->in_streams = in_streams;
sctp_new_association_req_p->out_streams = out_streams;
memcpy(&sctp_new_association_req_p->remote_address,
remote_address,
sizeof(*remote_address));
memcpy(&sctp_new_association_req_p->local_address,
local_address,
sizeof(*local_address));
itti_send_msg_to_task(TASK_SCTP, instance_p->instance, message_p);
}
......@@ -227,8 +238,8 @@ void DU_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1ap_se
//}
du_f1ap_register(new_instance,
&f1ap_setup_req->CU_ipv4_address,
&f1ap_setup_req->CU_port,
&f1ap_setup_req->CU_f1_ip_address, // remote
&f1ap_setup_req->DU_f1_ip_address, // local
f1ap_setup_req->sctp_in_streams,
f1ap_setup_req->sctp_out_streams);
......
......@@ -394,23 +394,6 @@ extern int asn1_xer_print;
//Forward declaration
//struct f1ap_message_s;
typedef struct f1ap_net_ip_address_s {
unsigned ipv4:1;
unsigned ipv6:1;
char ipv4_address[16];
char ipv6_address[46];
} f1ap_net_ip_address_t;
/*typedef struct f1ap_message_s {
F1AP_ProtocolIE_ID_t id;
F1AP_Criticality_t criticality;
uint8_t direction;
union {
F1AP_F1SetupRequestIEs_t f1ap_F1SetupRequestIEs;
} msg;
} f1ap_message;*/
/** \brief Function callback prototype.
**/
typedef int (*f1ap_message_decoded_callback)(
......@@ -419,73 +402,4 @@ typedef int (*f1ap_message_decoded_callback)(
F1AP_F1AP_PDU_t *message_p
);
/** \brief Encode a successfull outcome message
\param buffer pointer to buffer in which data will be encoded
\param length pointer to the length of buffer
\param procedureCode Procedure code for the message
\param criticality Criticality of the message
\param td ASN1C type descriptor of the sptr
\param sptr Deferenced pointer to the structure to encode
@returns size in bytes encded on success or 0 on failure
**/
/*ssize_t f1ap_generate_successfull_outcome(
uint8_t **buffer,
uint32_t *length,
e_F1ap_ProcedureCode procedureCode,
F1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr);
*/
/** \brief Encode an initiating message
\param buffer pointer to buffer in which data will be encoded
\param length pointer to the length of buffer
\param procedureCode Procedure code for the message
\param criticality Criticality of the message
\param td ASN1C type descriptor of the sptr
\param sptr Deferenced pointer to the structure to encode
@returns size in bytes encded on success or 0 on failure
**/
/*ssize_t f1ap_generate_initiating_message(
uint8_t **buffer,
uint32_t *length,
e_F1ap_ProcedureCode procedureCode,
F1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr);
*/
/** \brief Encode an unsuccessfull outcome message
\param buffer pointer to buffer in which data will be encoded
\param length pointer to the length of buffer
\param procedureCode Procedure code for the message
\param criticality Criticality of the message
\param td ASN1C type descriptor of the sptr
\param sptr Deferenced pointer to the structure to encode
@returns size in bytes encded on success or 0 on failure
**/
/*ssize_t f1ap_generate_unsuccessfull_outcome(
uint8_t **buffer,
uint32_t *length,
e_F1ap_ProcedureCode procedureCode,
F1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *td,
void *sptr);
*/
/** \brief Generate a new IE
\param id Protocol ie id of the IE
\param criticality Criticality of the IE
\param type ASN1 type descriptor of the IE value
\param sptr Structure to be encoded in the value field
@returns a pointer to the newly created IE structure or NULL in case of failure
**/
/*F1ap_IE_t *f1ap_new_ie(F1ap_ProtocolIE_ID_t id,
F1ap_Criticality_t criticality,
asn_TYPE_descriptor_t *type,
void *sptr);
*/
/** \brief Handle criticality
\param criticality Criticality of the IE
@returns void
**/
//void f1ap_handle_criticality(F1ap_Criticality_t criticality);
#endif /* F1AP_COMMON_H_ */
......@@ -40,7 +40,7 @@
#define ENB_NAME "Eurecom ENB"
#define ENB_NAME_FORMAT (ENB_NAME" %u")
#define F1AP_PORT_NUMBER (3642)
#define F1AP_PORT_NUMBER (30923)
#define F1AP_SCTP_PPID (62)
#endif /* F1AP_DEFAULT_VALUES_H_ */
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