modify the ip address struct in f1 setup req for DU
This commit is contained in:
@@ -51,6 +51,13 @@
|
|||||||
// Note this should be 512 from maxval in 38.473
|
// Note this should be 512 from maxval in 38.473
|
||||||
#define F1AP_MAX_NB_CELLS 2
|
#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 {
|
typedef struct f1ap_cu_setup_req_s {
|
||||||
//
|
//
|
||||||
} f1ap_cu_setup_req_t;
|
} f1ap_cu_setup_req_t;
|
||||||
@@ -60,8 +67,8 @@ typedef struct f1ap_setup_req_s {
|
|||||||
// Midhaul networking parameters
|
// Midhaul networking parameters
|
||||||
|
|
||||||
/* The eNB IP address to bind */
|
/* The eNB IP address to bind */
|
||||||
char CU_ipv4_address[16];
|
f1ap_net_ip_address_t CU_f1_ip_address;
|
||||||
int CU_port;
|
f1ap_net_ip_address_t DU_f1_ip_address;
|
||||||
|
|
||||||
/* Number of SCTP streams used for a mme association */
|
/* Number of SCTP streams used for a mme association */
|
||||||
uint16_t sctp_in_streams;
|
uint16_t sctp_in_streams;
|
||||||
|
|||||||
@@ -130,7 +130,6 @@ 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++) {
|
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
|
||||||
{
|
{
|
||||||
if (node_type == ngran_eNB_DU) { // F1AP registration
|
if (node_type == ngran_eNB_DU) { // F1AP registration
|
||||||
|
|
||||||
// configure F1AP here for F1C
|
// configure F1AP here for F1C
|
||||||
LOG_I(ENB_APP,"ngran_eNB_DU: Allocating ITTI message for F1AP_SETUP_REQ\n");
|
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);
|
msg_p = itti_alloc_new_message (TASK_ENB_APP, F1AP_SETUP_REQ);
|
||||||
@@ -154,10 +153,7 @@ static uint32_t eNB_app_register(ngran_node_t node_type,uint32_t enb_id_start, u
|
|||||||
itti_send_msg_to_task (TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
itti_send_msg_to_task (TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
register_enb_pending++;
|
register_enb_pending++;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2407,12 +2407,23 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
|
|||||||
F1AP_SETUP_REQ (msg_p).mnc_digit_length[k]);
|
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,"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,"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));
|
||||||
|
|
||||||
|
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_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));
|
//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_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);
|
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);
|
config_get( SCTPParams,sizeof(SCTPParams)/sizeof(paramdef_t),aprefix);
|
||||||
@@ -2470,9 +2481,9 @@ int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i) {
|
|||||||
F1AP_SETUP_REQ (msg_p).sib1[k] = rrc->carrier[0].SIB1;
|
F1AP_SETUP_REQ (msg_p).sib1[k] = rrc->carrier[0].SIB1;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
} // if
|
||||||
}
|
} // for
|
||||||
}
|
} // if
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ void CU_send_sctp_init_req(instance_t enb_id) {
|
|||||||
MessageDef *message_p = NULL;
|
MessageDef *message_p = NULL;
|
||||||
|
|
||||||
message_p = itti_alloc_new_message (TASK_CU_F1, SCTP_INIT_MSG);
|
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.ppid = F1AP_SCTP_PPID;
|
||||||
message_p->ittiMsg.sctp_init.ipv4 = 1;
|
message_p->ittiMsg.sctp_init.ipv4 = 1;
|
||||||
message_p->ittiMsg.sctp_init.ipv6 = 0;
|
message_p->ittiMsg.sctp_init.ipv6 = 0;
|
||||||
|
|||||||
+17
-6
@@ -45,6 +45,9 @@
|
|||||||
#define F1AP_UE_IDENTIFIER_NUMBER 3
|
#define F1AP_UE_IDENTIFIER_NUMBER 3
|
||||||
#define NUMBER_OF_eNB_MAX 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 */
|
/* This structure describes association of a DU to a CU */
|
||||||
typedef struct f1ap_info {
|
typedef struct f1ap_info {
|
||||||
|
|
||||||
@@ -170,8 +173,8 @@ void *F1AP_DU_task(void *arg) {
|
|||||||
// ==============================================================================
|
// ==============================================================================
|
||||||
|
|
||||||
static void du_f1ap_register(du_f1ap_instance_t *instance_p,
|
static void du_f1ap_register(du_f1ap_instance_t *instance_p,
|
||||||
char *cu_ip_address,
|
f1ap_net_ip_address_t *remote_address, // CU
|
||||||
int cu_port,
|
f1ap_net_ip_address_t *local_address, // DU
|
||||||
uint16_t in_streams,
|
uint16_t in_streams,
|
||||||
uint16_t out_streams)
|
uint16_t out_streams)
|
||||||
{
|
{
|
||||||
@@ -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);
|
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 = &message_p->ittiMsg.sctp_new_association_req;
|
||||||
|
sctp_new_association_req_p->ulp_cnx_id = instance_p->instance;
|
||||||
sctp_new_association_req_p->port = cu_port;
|
sctp_new_association_req_p->port = F1AP_PORT_NUMBER;
|
||||||
sctp_new_association_req_p->ppid = F1AP_SCTP_PPID;
|
sctp_new_association_req_p->ppid = F1AP_SCTP_PPID;
|
||||||
|
|
||||||
sctp_new_association_req_p->in_streams = in_streams;
|
sctp_new_association_req_p->in_streams = in_streams;
|
||||||
sctp_new_association_req_p->out_streams = out_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);
|
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,
|
du_f1ap_register(new_instance,
|
||||||
&f1ap_setup_req->CU_ipv4_address,
|
&f1ap_setup_req->CU_f1_ip_address, // remote
|
||||||
&f1ap_setup_req->CU_port,
|
&f1ap_setup_req->DU_f1_ip_address, // local
|
||||||
f1ap_setup_req->sctp_in_streams,
|
f1ap_setup_req->sctp_in_streams,
|
||||||
f1ap_setup_req->sctp_out_streams);
|
f1ap_setup_req->sctp_out_streams);
|
||||||
|
|
||||||
|
|||||||
@@ -394,23 +394,6 @@ extern int asn1_xer_print;
|
|||||||
//Forward declaration
|
//Forward declaration
|
||||||
//struct f1ap_message_s;
|
//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.
|
/** \brief Function callback prototype.
|
||||||
**/
|
**/
|
||||||
typedef int (*f1ap_message_decoded_callback)(
|
typedef int (*f1ap_message_decoded_callback)(
|
||||||
@@ -419,73 +402,4 @@ typedef int (*f1ap_message_decoded_callback)(
|
|||||||
F1AP_F1AP_PDU_t *message_p
|
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_ */
|
#endif /* F1AP_COMMON_H_ */
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
#define ENB_NAME "Eurecom ENB"
|
#define ENB_NAME "Eurecom ENB"
|
||||||
#define ENB_NAME_FORMAT (ENB_NAME" %u")
|
#define ENB_NAME_FORMAT (ENB_NAME" %u")
|
||||||
|
|
||||||
#define F1AP_PORT_NUMBER (3642)
|
#define F1AP_PORT_NUMBER (30923)
|
||||||
#define F1AP_SCTP_PPID (62)
|
#define F1AP_SCTP_PPID (62)
|
||||||
|
|
||||||
#endif /* F1AP_DEFAULT_VALUES_H_ */
|
#endif /* F1AP_DEFAULT_VALUES_H_ */
|
||||||
|
|||||||
Reference in New Issue
Block a user