Files
openairinterface5g/openair-cn/SCTP/sctp_itti_messaging.c
T
Cedric Roux c67aafd2a6 - Fixed origin task id of sctp date req message
- Unified structures names
- Added nas ul data ind between S1AP and NAS
- Fixed indentation of NAS files

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4554 818b1a75-f10b-46b9-bf7c-635c3b92a50f
2013-12-02 12:51:30 +00:00

58 lines
1.8 KiB
C

#include <string.h>
#include "intertask_interface.h"
#include "sctp_itti_messaging.h"
int sctp_itti_send_new_association(uint32_t assoc_id, uint16_t instreams,
uint16_t outstreams)
{
MessageDef *message_p;
sctp_new_peer_t *sctp_new_peer_p;
message_p = itti_alloc_new_message(TASK_SCTP, SCTP_NEW_ASSOCIATION);
sctp_new_peer_p = &message_p->ittiMsg.sctp_new_peer;
sctp_new_peer_p->assoc_id = assoc_id;
sctp_new_peer_p->instreams = instreams;
sctp_new_peer_p->outstreams = outstreams;
return itti_send_msg_to_task(TASK_S1AP, INSTANCE_DEFAULT, message_p);
}
int sctp_itti_send_new_message_ind(int n, uint8_t *buffer, uint32_t assoc_id,
uint16_t stream,
uint16_t instreams, uint16_t outstreams)
{
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_SCTP, SCTP_DATA_IND);
SCTP_DATA_IND(message_p).buffer = malloc(sizeof(uint8_t) * n);
memcpy((void *)SCTP_DATA_IND(message_p).buffer, (void *)buffer, n);
SCTP_DATA_IND(message_p).stream = stream;
SCTP_DATA_IND(message_p).buf_length = n;
SCTP_DATA_IND(message_p).assoc_id = assoc_id;
SCTP_DATA_IND(message_p).instreams = instreams;
SCTP_DATA_IND(message_p).outstreams = outstreams;
return itti_send_msg_to_task(TASK_S1AP, INSTANCE_DEFAULT, message_p);
}
int sctp_itti_send_com_down_ind(uint32_t assoc_id)
{
MessageDef *message_p;
sctp_close_association_t *sctp_close_association_p;
message_p = itti_alloc_new_message(TASK_SCTP, SCTP_CLOSE_ASSOCIATION);
sctp_close_association_p = &message_p->ittiMsg.sctp_close_association;
sctp_close_association_p->assoc_id = assoc_id;
return itti_send_msg_to_task(TASK_S1AP, INSTANCE_DEFAULT, message_p);
}