Files
openairinterface5g/openair3/SCTP/sctp_eNB_itti_messaging.c
Robert Schmidt 8107939f08 Change OAI license to CSSL v1.0 (and others)
- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
  scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly

For automated changes based on OAI PL v1.1:

    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
    perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml

The rest (cmake, files with missing license, cmake) manually.
2026-03-27 16:36:37 +01:00

95 lines
3.3 KiB
C

/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
#include "intertask_interface.h"
#include "sctp_common.h"
#include "sctp_eNB_itti_messaging.h"
int sctp_itti_send_init_msg_multi_cnf(task_id_t task_id, instance_t instance, int multi_sd)
{
MessageDef *message_p;
sctp_init_msg_multi_cnf_t *sctp_init_msg_multi_cnf_p;
message_p = itti_alloc_new_message(TASK_SCTP, 0, SCTP_INIT_MSG_MULTI_CNF);
sctp_init_msg_multi_cnf_p = &message_p->ittiMsg.sctp_init_msg_multi_cnf;
sctp_init_msg_multi_cnf_p->multi_sd = multi_sd;
return itti_send_msg_to_task(task_id, instance, message_p);
}
int sctp_itti_send_new_message_ind(task_id_t task_id,
instance_t instance,
sctp_assoc_t assoc_id,
uint8_t *buffer,
uint32_t buffer_length,
uint16_t stream)
{
MessageDef *message_p;
sctp_data_ind_t *sctp_data_ind_p;
message_p = itti_alloc_new_message(TASK_SCTP, 0, SCTP_DATA_IND);
sctp_data_ind_p = &message_p->ittiMsg.sctp_data_ind;
sctp_data_ind_p->buffer = itti_malloc(TASK_SCTP, task_id, sizeof(uint8_t) * buffer_length);
/* Copy the buffer */
memcpy((void *)sctp_data_ind_p->buffer, (void *)buffer, buffer_length);
sctp_data_ind_p->stream = stream;
sctp_data_ind_p->buffer_length = buffer_length;
sctp_data_ind_p->assoc_id = assoc_id;
return itti_send_msg_to_task(task_id, instance, message_p);
}
int sctp_itti_send_association_resp(task_id_t task_id,
instance_t instance,
sctp_assoc_t assoc_id,
uint16_t cnx_id,
sctp_state_e state,
uint16_t out_streams,
uint16_t in_streams)
{
MessageDef *message_p;
sctp_new_association_resp_t *sctp_new_association_resp_p;
message_p = itti_alloc_new_message(TASK_SCTP, 0, SCTP_NEW_ASSOCIATION_RESP);
sctp_new_association_resp_p = &message_p->ittiMsg.sctp_new_association_resp;
sctp_new_association_resp_p->in_streams = in_streams;
sctp_new_association_resp_p->out_streams = out_streams;
sctp_new_association_resp_p->sctp_state = state;
sctp_new_association_resp_p->assoc_id = assoc_id;
sctp_new_association_resp_p->ulp_cnx_id = cnx_id;
return itti_send_msg_to_task(task_id, instance, message_p);
}
int sctp_itti_send_association_ind(task_id_t task_id,
instance_t instance,
sctp_assoc_t assoc_id,
uint16_t port,
uint16_t out_streams,
uint16_t in_streams)
{
MessageDef *message_p;
sctp_new_association_ind_t *sctp_new_association_ind_p;
message_p = itti_alloc_new_message(TASK_SCTP, 0, SCTP_NEW_ASSOCIATION_IND);
sctp_new_association_ind_p = &message_p->ittiMsg.sctp_new_association_ind;
sctp_new_association_ind_p->assoc_id = assoc_id;
sctp_new_association_ind_p->port = port;
sctp_new_association_ind_p->out_streams = out_streams;
sctp_new_association_ind_p->in_streams = in_streams;
return itti_send_msg_to_task(task_id, instance, message_p);
}