SCTP assoc_id: Make it sctp_assoc_t, project-wide
This commit is contained in:
@@ -19,11 +19,13 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include "queue.h"
|
||||
|
||||
#ifndef SCTP_ENB_DEFS_H_
|
||||
#define SCTP_ENB_DEFS_H_
|
||||
|
||||
#include "queue.h"
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/sctp.h>
|
||||
|
||||
typedef struct sctp_queue_item_s {
|
||||
/* Pair of stream on which we received this packet */
|
||||
uint16_t local_stream;
|
||||
@@ -32,7 +34,7 @@ typedef struct sctp_queue_item_s {
|
||||
uint16_t remote_port;
|
||||
/* Remote address */
|
||||
uint32_t remote_addr;
|
||||
uint32_t assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
|
||||
/* PPID used for the packet */
|
||||
uint32_t ppid;
|
||||
@@ -52,7 +54,7 @@ typedef struct {
|
||||
/* Unique SCTP association ID (Local to host), used to distinguish
|
||||
* associations between MME and eNB.
|
||||
*/
|
||||
int32_t assoc_id;
|
||||
sctp_assoc_t assoc_id;
|
||||
|
||||
/* Current remote port used for transmission */
|
||||
uint16_t remote_port;
|
||||
|
||||
@@ -38,9 +38,12 @@ int sctp_itti_send_init_msg_multi_cnf(task_id_t task_id, instance_t instance, in
|
||||
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,
|
||||
uint32_t assoc_id, uint8_t *buffer,
|
||||
uint32_t buffer_length, uint16_t stream)
|
||||
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;
|
||||
@@ -61,10 +64,13 @@ int sctp_itti_send_new_message_ind(task_id_t task_id, instance_t instance,
|
||||
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,
|
||||
int32_t assoc_id,
|
||||
uint16_t cnx_id, enum sctp_state_e state,
|
||||
uint16_t out_streams, uint16_t in_streams)
|
||||
int sctp_itti_send_association_resp(task_id_t task_id,
|
||||
instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
uint16_t cnx_id,
|
||||
enum 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;
|
||||
@@ -82,9 +88,12 @@ int sctp_itti_send_association_resp(task_id_t task_id, instance_t instance,
|
||||
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,
|
||||
int32_t assoc_id, uint16_t port,
|
||||
uint16_t out_streams, uint16_t in_streams)
|
||||
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;
|
||||
|
||||
@@ -24,18 +24,26 @@
|
||||
|
||||
int sctp_itti_send_init_msg_multi_cnf(task_id_t task_id, instance_t instance, int multi_sd);
|
||||
|
||||
int sctp_itti_send_new_message_ind(task_id_t task_id, instance_t instance,
|
||||
uint32_t assoc_id, uint8_t *buffer,
|
||||
uint32_t buffer_length, uint16_t stream);
|
||||
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);
|
||||
|
||||
int sctp_itti_send_association_resp(task_id_t task_id, instance_t instance,
|
||||
int32_t assoc_id,
|
||||
uint16_t cnx_id, enum sctp_state_e state,
|
||||
uint16_t out_streams, uint16_t in_streams);
|
||||
|
||||
int sctp_itti_send_association_ind(task_id_t task_id, instance_t instance,
|
||||
int32_t assoc_id, uint16_t port,
|
||||
uint16_t out_streams, uint16_t in_streams);
|
||||
int sctp_itti_send_association_resp(task_id_t task_id,
|
||||
instance_t instance,
|
||||
sctp_assoc_t assoc_id,
|
||||
uint16_t cnx_id,
|
||||
enum sctp_state_e state,
|
||||
uint16_t out_streams,
|
||||
uint16_t in_streams);
|
||||
|
||||
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);
|
||||
|
||||
#endif /* SCTP_ITTI_MESSAGING_H_ */
|
||||
|
||||
@@ -77,7 +77,7 @@ typedef struct sctp_cnx_list_elm_s {
|
||||
uint16_t in_streams; ///< Number of input streams negociated for this connection
|
||||
uint16_t out_streams; ///< Number of output streams negotiated for this connection
|
||||
uint16_t ppid; ///< Payload protocol Identifier
|
||||
int32_t assoc_id; ///< SCTP association id for the connection (note4debug host byte order)
|
||||
sctp_assoc_t assoc_id; ///< SCTP association id for the connection (note4debug host byte order)
|
||||
uint32_t messages_recv; ///< Number of messages received on this connection
|
||||
uint32_t messages_sent; ///< Number of messages sent on this connection
|
||||
task_id_t task_id; ///< Task id of the task who asked for this connection
|
||||
@@ -93,7 +93,7 @@ static STAILQ_HEAD(sctp_cnx_list_head, sctp_cnx_list_elm_s) sctp_cnx_list;
|
||||
static uint16_t sctp_nb_cnx = 0;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
struct sctp_cnx_list_elm_s *sctp_get_cnx(int32_t assoc_id, int sd)
|
||||
struct sctp_cnx_list_elm_s *sctp_get_cnx(sctp_assoc_t assoc_id, int sd)
|
||||
{
|
||||
struct sctp_cnx_list_elm_s *elm;
|
||||
|
||||
@@ -225,7 +225,7 @@ sctp_handle_new_association_req_multi(
|
||||
int ns;
|
||||
int sd;
|
||||
|
||||
int32_t assoc_id = 0;
|
||||
sctp_assoc_t assoc_id = 0;
|
||||
|
||||
struct sctp_cnx_list_elm_s *sctp_cnx = NULL;
|
||||
enum sctp_connection_type_e connection_type = SCTP_TYPE_CLIENT;
|
||||
@@ -362,7 +362,7 @@ sctp_handle_new_association_req(
|
||||
const sctp_new_association_req_t * const sctp_new_association_req_p)
|
||||
{
|
||||
int sd = 0;
|
||||
int32_t assoc_id = 0;
|
||||
sctp_assoc_t assoc_id = 0;
|
||||
|
||||
struct sctp_event_subscribe events={0};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user