/* Function called every time we received something on SCTP */ int s1ap_sctp_recv_callback(uint32_t assocId, uint32_t stream, uint8_t *buffer, uint32_t length) { s1ap_message message; if (s1ap_eNB_decode_pdu(&message, buffer, length) < 0) return -1; return s1ap_eNB_handle_message(assocId, stream, &message); }
static void s1ap_eNB_handle_sctp_data_ind(sctp_data_ind_t *sctp_data_ind) { int result; DevAssert(sctp_data_ind != NULL); #if defined(TEST_S1C_MME) mme_test_s1_notify_sctp_data_ind(sctp_data_ind->assoc_id, sctp_data_ind->stream, sctp_data_ind->buffer, sctp_data_ind->buffer_length); #else s1ap_eNB_handle_message(sctp_data_ind->assoc_id, sctp_data_ind->stream, sctp_data_ind->buffer, sctp_data_ind->buffer_length); #endif result = itti_free(TASK_UNKNOWN, sctp_data_ind->buffer); AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result); }