diff --git a/openair2/F1AP/f1ap_common.h b/openair2/F1AP/f1ap_common.h index 3dced33ac9e6d4296a9b3281b6e8a6a8b470161b..384f261de20df2152e1feb510c89f2d5c141ce03 100644 --- a/openair2/F1AP/f1ap_common.h +++ b/openair2/F1AP/f1ap_common.h @@ -419,6 +419,7 @@ inline void ASN_DEBUG(const char *fmt, ...); /** \brief Function callback prototype. **/ typedef int (*f1ap_message_decoded_callback)( + instance_t instance, uint32_t assoc_id, uint32_t stream, F1AP_F1AP_PDU_t *message_p diff --git a/openair2/F1AP/f1ap_cu_task.c b/openair2/F1AP/f1ap_cu_task.c index 742e57b4040adc7a7b776e57485ca74adef5cc68..c7deb55e166d8863380ca4057c0faa5ab1e2b22d 100644 --- a/openair2/F1AP/f1ap_cu_task.c +++ b/openair2/F1AP/f1ap_cu_task.c @@ -65,12 +65,12 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat f1ap_du_data_from_du->sctp_out_streams = sctp_new_association_resp->out_streams; } -void cu_task_handle_sctp_data_ind(sctp_data_ind_t *sctp_data_ind) { +void cu_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind) { int result; DevAssert(sctp_data_ind != NULL); - f1ap_handle_message(sctp_data_ind->assoc_id, sctp_data_ind->stream, + f1ap_handle_message(instance, sctp_data_ind->assoc_id, sctp_data_ind->stream, sctp_data_ind->buffer, sctp_data_ind->buffer_length); result = itti_free(TASK_UNKNOWN, sctp_data_ind->buffer); @@ -132,7 +132,8 @@ void *F1AP_CU_task(void *arg) { case SCTP_DATA_IND: LOG_I(CU_F1AP, "SCTP_DATA_IND\n"); - cu_task_handle_sctp_data_ind(&received_msg->ittiMsg.sctp_data_ind); + cu_task_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg), + &received_msg->ittiMsg.sctp_data_ind); break; case F1AP_SETUP_RESP: // from rrc diff --git a/openair2/F1AP/f1ap_cu_task.h b/openair2/F1AP/f1ap_cu_task.h index b12b22dc788da05a75e165021f16c356a438d0a5..60747efbcb24acccd3bf9066cc87e6b0971a6d1f 100644 --- a/openair2/F1AP/f1ap_cu_task.h +++ b/openair2/F1AP/f1ap_cu_task.h @@ -24,7 +24,7 @@ void cu_task_handle_sctp_association_ind(instance_t instance, sctp_new_association_ind_t *sctp_new_association_ind); void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp); -void cu_task_handle_sctp_data_ind(sctp_data_ind_t *sctp_data_ind); +void cu_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind); void cu_task_send_sctp_init_req(instance_t enb_id); void *F1AP_CU_task(void *arg); diff --git a/openair2/F1AP/f1ap_du_task.c b/openair2/F1AP/f1ap_du_task.c index 091428b1e722ba28310cf35b32fad9df901ebc6d..1bc49270f0ba7f087c3da49f1dfc5b14579fd0c6 100644 --- a/openair2/F1AP/f1ap_du_task.c +++ b/openair2/F1AP/f1ap_du_task.c @@ -97,13 +97,13 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat DU_send_F1_SETUP_REQUEST(instance); } -void du_task_handle_sctp_data_ind(sctp_data_ind_t *sctp_data_ind) +void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind) { int result; DevAssert(sctp_data_ind != NULL); - f1ap_handle_message(sctp_data_ind->assoc_id, sctp_data_ind->stream, + f1ap_handle_message(instance, sctp_data_ind->assoc_id, sctp_data_ind->stream, sctp_data_ind->buffer, sctp_data_ind->buffer_length); result = itti_free(TASK_UNKNOWN, sctp_data_ind->buffer); @@ -154,7 +154,8 @@ void *F1AP_DU_task(void *arg) { case SCTP_DATA_IND: // ex: any F1 incoming message for DU ends here LOG_I(DU_F1AP, "SCTP_DATA_IND\n"); - du_task_handle_sctp_data_ind(&received_msg->ittiMsg.sctp_data_ind); + du_task_handle_sctp_data_ind(ITTI_MESSAGE_GET_INSTANCE(received_msg), + &received_msg->ittiMsg.sctp_data_ind); break; case TERMINATE_MESSAGE: diff --git a/openair2/F1AP/f1ap_du_task.h b/openair2/F1AP/f1ap_du_task.h index ffae6ac339b28121d7f6147e27c25ac7bc7286a3..47d0827809e7488e25667d038a462579d955039a 100644 --- a/openair2/F1AP/f1ap_du_task.h +++ b/openair2/F1AP/f1ap_du_task.h @@ -24,7 +24,7 @@ void du_task_send_sctp_association_req(instance_t instance, f1ap_setup_req_t *f1ap_setup_req); void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_association_resp_t *sctp_new_association_resp); -void du_task_handle_sctp_data_ind(sctp_data_ind_t *sctp_data_ind); +void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind); void *F1AP_DU_task(void *arg); #endif /* DU_F1AP_TASK_H_ */ diff --git a/openair2/F1AP/f1ap_handlers.c b/openair2/F1AP/f1ap_handlers.c index 25b2234d6c0592f950dbfd42e3ef121234f36e02..62b1f3226e661daaaaac3aeb4a412f10ee67d606 100644 --- a/openair2/F1AP/f1ap_handlers.c +++ b/openair2/F1AP/f1ap_handlers.c @@ -78,7 +78,7 @@ static const char *f1ap_direction_String[] = { return(f1ap_direction_String[f1ap_dir]); } -int f1ap_handle_message(uint32_t assoc_id, int32_t stream, +int f1ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream, const uint8_t * const data, const uint32_t data_length) { F1AP_F1AP_PDU_t pdu; @@ -116,7 +116,7 @@ int f1ap_handle_message(uint32_t assoc_id, int32_t stream, /* Calling the right handler */ ret = (*f1ap_messages_callback[pdu.choice.initiatingMessage->procedureCode][pdu.present - 1]) - (assoc_id, stream, &pdu); + (instance, assoc_id, stream, &pdu); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_F1AP_F1AP_PDU, &pdu); return ret; } \ No newline at end of file diff --git a/openair2/F1AP/f1ap_handlers.h b/openair2/F1AP/f1ap_handlers.h index c3a7b7b225a6de6b9f2406688ec88bc6d137d58b..631249a324287607d7c2c3ea539f6aea85913a9d 100644 --- a/openair2/F1AP/f1ap_handlers.h +++ b/openair2/F1AP/f1ap_handlers.h @@ -33,7 +33,7 @@ #ifndef F1AP_HANDLERS_H_ #define F1AP_HANDLERS_H_ -int f1ap_handle_message(uint32_t assoc_id, int32_t stream, +int f1ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream, const uint8_t * const data, const uint32_t data_length); #endif /* F1AP_HANDLERS_H_ */