From 629dfe5efa571481c6797cb3c6497648d54caf88 Mon Sep 17 00:00:00 2001
From: Lionel Gauthier <lionel.gauthier@eurecom.fr>
Date: Thu, 26 Jun 2014 12:35:50 +0000
Subject: [PATCH] git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5443
 818b1a75-f10b-46b9-bf7c-635c3b92a50f

---
 openair2/COMMON/sctp_messages_def.h   |  4 +++-
 openair2/COMMON/sctp_messages_types.h | 27 +++++++++++++++++++++++++++
 2 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/openair2/COMMON/sctp_messages_def.h b/openair2/COMMON/sctp_messages_def.h
index 4c3450e18d..c872a0fcfa 100644
--- a/openair2/COMMON/sctp_messages_def.h
+++ b/openair2/COMMON/sctp_messages_def.h
@@ -3,4 +3,6 @@ MESSAGE_DEF(SCTP_NEW_ASSOCIATION_RESP, MESSAGE_PRIORITY_MED, sctp_new_associatio
 MESSAGE_DEF(SCTP_NEW_ASSOCIATION_IND , MESSAGE_PRIORITY_MED, sctp_new_association_ind_t          , sctp_new_association_ind)
 MESSAGE_DEF(SCTP_REGISTER_UPPER_LAYER, MESSAGE_PRIORITY_MED, sctp_listener_register_upper_layer_t, sctp_listener_register_upper_layer)
 MESSAGE_DEF(SCTP_DATA_REQ,             MESSAGE_PRIORITY_MED, sctp_data_req_t                     , sctp_data_req)
-MESSAGE_DEF(SCTP_DATA_IND,             MESSAGE_PRIORITY_MED, sctp_data_ind_t                     , sctp_data_ind)
\ No newline at end of file
+MESSAGE_DEF(SCTP_DATA_IND,             MESSAGE_PRIORITY_MED, sctp_data_ind_t                     , sctp_data_ind)
+MESSAGE_DEF(SCTP_INIT_MSG,             MESSAGE_PRIORITY_MED, sctp_init_t                         , sctp_init)
+MESSAGE_DEF(SCTP_CLOSE_ASSOCIATION,    MESSAGE_PRIORITY_MAX, sctp_close_association_t            , sctp_close_association)
diff --git a/openair2/COMMON/sctp_messages_types.h b/openair2/COMMON/sctp_messages_types.h
index 32e9e678f2..2696f8c154 100644
--- a/openair2/COMMON/sctp_messages_types.h
+++ b/openair2/COMMON/sctp_messages_types.h
@@ -1,6 +1,14 @@
 #ifndef SCTP_MESSAGES_TYPES_H_
 #define SCTP_MESSAGES_TYPES_H_
 
+#define SCTP_NEW_ASSOCIATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_req
+#define SCTP_NEW_ASSOCIATION_RESP(mSGpTR)(mSGpTR)->ittiMsg.sctp_new_association_resp
+#define SCTP_NEW_ASSOCIATION_IND(mSGpTR) (mSGpTR)->ittiMsg.sctp_new_association_ind
+#define SCTP_DATA_IND(mSGpTR)            (mSGpTR)->ittiMsg.sctp_data_ind
+#define SCTP_DATA_REQ(mSGpTR)            (mSGpTR)->ittiMsg.sctp_data_req
+#define SCTP_INIT_MSG(mSGpTR)            (mSGpTR)->ittiMsg.sctp_init
+#define SCTP_CLOSE_ASSOCIATION(mSGpTR)   (mSGpTR)->ittiMsg.sctp_close_association
+
 enum sctp_state_e {
     SCTP_STATE_CLOSED,
     SCTP_STATE_SHUTDOWN,
@@ -62,6 +70,25 @@ typedef struct sctp_data_ind_s {
     uint16_t  stream;
 } sctp_data_ind_t;
 
+typedef struct sctp_init_s {
+    /* Request usage of ipv4 */
+    unsigned  ipv4:1;
+    /* Request usage of ipv6 */
+    unsigned  ipv6:1;
+    uint8_t   nb_ipv4_addr;
+    uint32_t  ipv4_address[10];
+    uint8_t   nb_ipv6_addr;
+    char     *ipv6_address[10];
+    uint16_t  port;
+    uint32_t  ppid;
+} sctp_init_t;
+
+
+typedef struct sctp_close_association_s {
+    uint32_t  assoc_id;
+} sctp_close_association_t;
+
+
 typedef sctp_data_ind_t sctp_data_req_t;
 
 typedef struct sctp_listener_register_upper_layer_s {
-- 
GitLab