[Epic-ID: ODUHIGH-463][Task-ID: ODUHIGH-496] Create setup with 2 GNB with SCTP associ... 76/10476/5
authorlal.harshita <Harshita.Lal@radisys.com>
Wed, 15 Feb 2023 12:45:55 +0000 (18:15 +0530)
committerlal.harshita <Harshita.Lal@radisys.com>
Tue, 21 Feb 2023 05:11:55 +0000 (10:41 +0530)
Signed-off-by: lal.harshita <Harshita.Lal@radisys.com>
Change-Id: I70e75ee0ff1fc696527a79a06ee5a8776fe54ae9
Signed-off-by: lal.harshita <Harshita.Lal@radisys.com>
src/cu_stub/cu_f1ap_msg_hdl.c
src/cu_stub/cu_stub.c
src/cu_stub/cu_stub.h
src/cu_stub/cu_stub_sctp.c
src/cu_stub/cu_stub_sctp.h

index 4f1858e..42aa147 100644 (file)
@@ -177,7 +177,7 @@ S16 SendF1APMsg(Region region, Pool pool, uint32_t duId)
       {
          ODU_PRINT_MSG(mBuf, 0,0);
 
-         if(sctpSend(duId, mBuf) != ROK)
+         if(sctpSend(F1_INTERFACE, duId, mBuf) != ROK)
          {
             DU_LOG("\nERROR  -->  F1AP : SCTP Send failed");
             ODU_PUT_MSG_BUF(mBuf);
index 619b077..df86911 100644 (file)
@@ -133,8 +133,8 @@ uint8_t tst()
 
 void readCuCfg()
 {
-   uint8_t  numDu;
-   uint32_t ipv4_du, ipv4_cu;
+   uint8_t  numDu, *numRemoteCu;
+   uint32_t ipv4_du, ipv4_cu, ipv4_remote_cu;
 
    DU_LOG("\nDEBUG  -->  CU_STUB : Reading CU configurations");
 
@@ -179,13 +179,15 @@ void readCuCfg()
 
    cuCb.cuCfgParams.sctpParams.localIpAddr.ipV4Addr = ipv4_cu;
    cuCb.cuCfgParams.sctpParams.localIpAddr.ipV6Pres = false;
-   cuCb.cuCfgParams.sctpParams.f1SctpPort = F1_SCTP_PORT;
+
+   /* SCTP and EGTP configuration for F1 Interface */
+   cuCb.cuCfgParams.sctpParams.f1SctpInfo.port = F1_SCTP_PORT;
 
    cuCb.cuCfgParams.egtpParams.localIp.ipV4Pres = TRUE;
    cuCb.cuCfgParams.egtpParams.localIp.ipV4Addr = ipv4_cu;
    cuCb.cuCfgParams.egtpParams.localPort = F1_EGTP_PORT;
 
-   cuCb.cuCfgParams.sctpParams.numDestNode = 0;
+   cuCb.cuCfgParams.sctpParams.f1SctpInfo.numDestNode = 0;
    cuCb.cuCfgParams.egtpParams.numDu = 0;
 
    numDu = 0;
@@ -196,9 +198,9 @@ void readCuCfg()
       cmInetAddr((S8*)REMOTE_IP_DU[numDu], &ipv4_du);
       
       /* SCTP Parameters */
-      cuCb.cuCfgParams.sctpParams.destCb[numDu].destIpAddr.ipV4Addr = ipv4_du;
-      cuCb.cuCfgParams.sctpParams.destCb[numDu].destIpAddr.ipV6Pres = false;
-      cuCb.cuCfgParams.sctpParams.destCb[numDu].destPort = F1_SCTP_PORT;
+      cuCb.cuCfgParams.sctpParams.f1SctpInfo.destCb[numDu].destIpAddr.ipV4Addr = ipv4_du;
+      cuCb.cuCfgParams.sctpParams.f1SctpInfo.destCb[numDu].destIpAddr.ipV6Pres = false;
+      cuCb.cuCfgParams.sctpParams.f1SctpInfo.destCb[numDu].destPort = F1_SCTP_PORT;
 
       /* EGTP Parameters */
       cuCb.cuCfgParams.egtpParams.dstCfg[numDu].dstIp.ipV4Pres = TRUE;
@@ -212,7 +214,26 @@ void readCuCfg()
    cuCb.cuCfgParams.egtpParams.currTunnelId = cuCb.cuCfgParams.egtpParams.minTunnelId;
    cuCb.cuCfgParams.egtpParams.maxTunnelId = MAX_TEID;
    cuCb.cuCfgParams.egtpParams.numDu = numDu;
-   cuCb.cuCfgParams.sctpParams.numDestNode = numDu;
+   cuCb.cuCfgParams.sctpParams.f1SctpInfo.numDestNode = numDu;
+
+   /* SCTP configuration for Xn interface */
+   cuCb.cuCfgParams.sctpParams.xnSctpInfo.port = XN_SCTP_PORT;
+   cuCb.cuCfgParams.sctpParams.xnSctpInfo.localNodeType = LOCAL_NODE_TYPE;
+   numRemoteCu = &cuCb.cuCfgParams.sctpParams.xnSctpInfo.numDestNode;   
+   (*numRemoteCu) = 0;
+   while((*numRemoteCu) < NUM_XN_ASSOC)
+   {
+      /* Remote CU IP address */
+      memset(&ipv4_remote_cu, 0, sizeof(uint32_t));
+      cmInetAddr((S8*)REMOTE_IP_CU[*numRemoteCu], &ipv4_remote_cu);
+
+      /* SCTP Parameters */
+      cuCb.cuCfgParams.sctpParams.xnSctpInfo.destCb[*numRemoteCu].destIpAddr.ipV4Addr = ipv4_remote_cu;
+      cuCb.cuCfgParams.sctpParams.xnSctpInfo.destCb[*numRemoteCu].destIpAddr.ipV6Pres = false;
+      cuCb.cuCfgParams.sctpParams.xnSctpInfo.destCb[*numRemoteCu].destPort = XN_SCTP_PORT;
+
+      (*numRemoteCu)++;
+   }
 #endif
 
    /*PLMN*/
@@ -270,6 +291,32 @@ void initiateInterDuHandover(uint32_t sourceDuId, uint32_t targetDuId, uint32_t
     BuildAndSendUeContextModificationReq(sourceDuId, ueCb, QUERY_CONFIG);
 }
 
+
+/*******************************************************************
+ *
+ * @brief Initiates inter CU handover
+ *
+ * @details
+ *
+ *    Function : initiateInterCuHandover
+ *
+ *    Functionality: Initiates the first procedure of inter-CU
+ *    handover
+ *
+ * @params[in] Source CU Id
+ *             Target CU Id
+ *             UE Id to be handed off 
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+void initiateInterCuHandover(uint32_t sourceCuId, uint32_t targetCuId, uint32_t ueId)
+{
+    DU_LOG("\nINFO  --> CU_STUB: Inter-CU Handover Started for ueId [%d] from CU ID [%d] to CU ID [%d]", \
+          ueId, sourceCuId, targetCuId);
+    //TODO : First message of HO procedure to be triggered here. Changes to be done in next commit.
+}
+
 /*******************************************************************
  *
  * @brief start Dl data
@@ -401,16 +448,34 @@ void *cuConsoleHandler(void *args)
       /* Start Handover procedure towards DU when 'h' is received from console input */
       else if(ch == 'h')
       {
-         uint32_t sourceDuId, targetDuId, ueId;
+         HandoverType hoType;
+         uint32_t sourceId, targetId, ueId;
 
-         DU_LOG("\nEnter Source DU ID for Inter-DU Handover");
-         scanf("%d", &sourceDuId);
-         DU_LOG("\nEnter Target DU ID for Inter-DU Handover");
-         scanf("%d", &targetDuId);
-         DU_LOG("\nEnter DU UE F1AP ID to be handed over");
-         scanf("%d", &ueId);
+         DU_LOG("\n\nChoose the type of handover to initiate : \nEnter 1 for Inter-CU Handover over Xn interface\nEnter 2 for Inter-DU Handover\n");
+         scanf("%d", &hoType);
 
-         initiateInterDuHandover(sourceDuId, targetDuId, ueId);
+         if(hoType == Xn_Based_Inter_CU_HO)
+         {
+            DU_LOG("\nEnter Source CU ID for Inter-CU Handover : ");
+            scanf("%d", &sourceId);
+            DU_LOG("\nEnter Target CU ID for Inter-CU Handover : ");
+            scanf("%d", &targetId);
+            DU_LOG("\nEnter CU UE F1AP ID to be handed over : ");
+            scanf("%d", &ueId);
+
+            initiateInterCuHandover(sourceId, targetId, ueId);
+         }
+         else if(hoType == Inter_DU_HO)
+         {
+            DU_LOG("\nEnter Source DU ID for Inter-DU Handover : ");
+            scanf("%d", &sourceId);
+            DU_LOG("\nEnter Target DU ID for Inter-DU Handover : ");
+            scanf("%d", &targetId);
+            DU_LOG("\nEnter DU UE F1AP ID to be handed over : ");
+            scanf("%d", &ueId);
+
+            initiateInterDuHandover(sourceId, targetId, ueId);
+         }
       }
       /* Start Idle mode paging when 'p' is received from console input */
       else if(ch == 'p')
index 4c51a82..a0239a4 100644 (file)
 #define F1_SCTP_PORT 38472  /* As per the spec 38.472, the registered port number for F1AP is 38472 */
 #define NUM_F1_ASSOC 1  
 #define REMOTE_IP_DU (char*[]){"192.168.130.81", "192.168.130.83"}
+
+#define XN_SCTP_PORT 38422 /* As per 3GPP TS 38.422, The SCTP Destination Port number value assigned by IANA to be used for XnAP is 38422 */
+#define NUM_XN_ASSOC 0
+#define REMOTE_IP_CU (char*[]){"192.168.130.84"}
+#define LOCAL_NODE_TYPE SERVER
 #endif
 
 #define F1_EGTP_PORT 2152 /* As per the spec 29.281, the registered port number for GTP-U is 2152 */
 #define DRX_TO_BE_RELEASE true 
 #endif
 
+typedef enum
+{
+  Xn_Based_Inter_CU_HO = 1,
+  Inter_DU_HO
+}HandoverType;
+
 typedef enum
 {
    CELL_INACTIVE,
index 07b462c..e9bd0d6 100644 (file)
@@ -107,12 +107,25 @@ uint8_t sctpCfgReq()
    fillAddrLst(&sctpCb.localAddrLst, &sctpCb.sctpCfg.localIpAddr);
    memset(&sctpCb.f1LstnSockFd, -1, sizeof(CmInetFd));
 
-   for(destIdx=0; destIdx < sctpCb.sctpCfg.numDestNode; destIdx++)
+   for(destIdx=0; destIdx < sctpCb.sctpCfg.f1SctpInfo.numDestNode; destIdx++)
    {
-      sctpCb.assocCb[assocIdx].destPort = sctpCb.sctpCfg.destCb[destIdx].destPort;
+      sctpCb.assocCb[assocIdx].intf = F1_INTERFACE;
+      sctpCb.assocCb[assocIdx].destPort = sctpCb.sctpCfg.f1SctpInfo.destCb[destIdx].destPort;
       sctpCb.assocCb[assocIdx].bReadFdSet = ROK;
       memset(&sctpCb.assocCb[assocIdx].sockFd, -1, sizeof(CmInetFd));
-      fillDestNetAddr(&sctpCb.assocCb[assocIdx].destIpNetAddr, &sctpCb.sctpCfg.destCb[destIdx].destIpAddr);
+      fillDestNetAddr(&sctpCb.assocCb[assocIdx].destIpNetAddr, &sctpCb.sctpCfg.f1SctpInfo.destCb[destIdx].destIpAddr);
+      assocIdx++;
+   }
+
+   sctpCb.localXnNodeType = sctpCb.sctpCfg.xnSctpInfo.localNodeType;
+   for(destIdx=0; destIdx < sctpCb.sctpCfg.xnSctpInfo.numDestNode; destIdx++)
+   {
+      sctpCb.assocCb[assocIdx].intf = XN_INTERFACE;
+      sctpCb.assocCb[assocIdx].destId = CU_ID + destIdx +1;
+      sctpCb.assocCb[assocIdx].destPort = sctpCb.sctpCfg.xnSctpInfo.destCb[destIdx].destPort;
+      sctpCb.assocCb[assocIdx].bReadFdSet = ROK;
+      memset(&sctpCb.assocCb[assocIdx].sockFd, -1, sizeof(CmInetFd));
+      fillDestNetAddr(&sctpCb.assocCb[assocIdx].destIpNetAddr, &sctpCb.sctpCfg.xnSctpInfo.destCb[destIdx].destIpAddr);
       assocIdx++;
    }
    sctpCb.numAssoc = assocIdx;
@@ -192,16 +205,92 @@ uint8_t sctpStartReq()
 {
    uint8_t assocIdx;
    uint8_t ret = ROK;
+   CmInetFd sockFd;
 
    socket_type = CM_INET_STREAM;
 
-   if(sctpCb.numAssoc)
+   /* Establish SCTP association at XN interface */
+   if(sctpCb.sctpCfg.xnSctpInfo.numDestNode)
+   {
+      if(sctpCb.localXnNodeType == SERVER)
+      {
+         if((ret = cmInetSocket(socket_type, &sctpCb.xnLstnSockFd, IPPROTO_SCTP) != ROK))
+         {   
+            DU_LOG("\nERROR  -->  SCTP : Socket[%d] coudnt open for listening", sctpCb.f1LstnSockFd.fd);
+         }   
+         else if((ret = cmInetSctpBindx(&sctpCb.xnLstnSockFd, &sctpCb.localAddrLst, sctpCb.sctpCfg.xnSctpInfo.port)) != ROK)
+         {   
+            DU_LOG("\nERROR  -->  SCTP: Binding failed at CU");
+         }   
+         else if(ret = cmInetListen(&sctpCb.xnLstnSockFd, 1) != ROK)
+         {   
+            DU_LOG("\nERROR  -->  SCTP : Listening on socket failed");
+            cmInetClose(&sctpCb.xnLstnSockFd);
+            return RFAILED;
+         }   
+         else
+         {   
+            for(assocIdx=0; assocIdx < sctpCb.numAssoc; assocIdx++)
+            {   
+               if(sctpCb.assocCb[assocIdx].intf == XN_INTERFACE)
+               {   
+                  if((ret = sctpAccept(&sctpCb.xnLstnSockFd, &sctpCb.assocCb[assocIdx])) != ROK)
+                  {
+                     DU_LOG("\nERROR  -->  SCTP: Unable to accept the connection at CU");
+                  }
+               }
+            }
+         }
+      }
+      else if(sctpCb.localXnNodeType == CLIENT)
+      {
+         for(assocIdx=0; assocIdx < sctpCb.numAssoc; assocIdx++)
+         {
+            if(sctpCb.assocCb[assocIdx].intf == XN_INTERFACE)
+            {
+               if((ret = cmInetSocket(socket_type, &sctpCb.assocCb[assocIdx].sockFd, IPPROTO_SCTP)) != ROK)
+               {   
+                  DU_LOG("\nERROR  -->  SCTP : Failed while opening a socket in ODU");
+               }   
+               else if((ret = cmInetSctpBindx(&sctpCb.assocCb[assocIdx].sockFd, &sctpCb.localAddrLst, sctpCb.sctpCfg.xnSctpInfo.port)) != ROK)
+               {   
+                  DU_LOG("\nERROR  -->  SCTP:  Failed during Binding in ODU");
+               }   
+               else if((ret = sctpSetSockOpts(&sctpCb.assocCb[assocIdx].sockFd)) != ROK)
+               {   
+                  DU_LOG("\nERROR  -->  SCTP : Failed to set Socket Opt in ODU");
+               }    
+               else
+               {   
+                  if(ret != ROK)
+                  {   
+                     DU_LOG("\nERROR  -->  SCTP : Failed while establishing Req at DU");
+                     ret = RFAILED;
+                  }   
+                  else 
+                  {   
+                     ret = cmInetSctpConnectx(&sctpCb.assocCb[assocIdx].sockFd, &sctpCb.assocCb[assocIdx].destIpNetAddr, \
+                              &sctpCb.assocCb[assocIdx].destAddrLst, sctpCb.assocCb[assocIdx].destPort);
+                     /* 115 error_code indicates that Operation is in progress and hence ignored if SctpConnect failed due to this */
+                     if(ret == 18)    
+                     {
+                        ret = ROK; 
+                     }
+                  }   
+               }
+            }
+         }
+      }
+   }
+
+   /* Establish SCTP association at F1 interface */
+   if(sctpCb.sctpCfg.f1SctpInfo.numDestNode)
    {
       if((ret = cmInetSocket(socket_type, &sctpCb.f1LstnSockFd, IPPROTO_SCTP) != ROK))
       {
          DU_LOG("\nERROR  -->  SCTP : Socket[%d] coudnt open for listening", sctpCb.f1LstnSockFd.fd);
       } 
-      else if((ret = cmInetSctpBindx(&sctpCb.f1LstnSockFd, &sctpCb.localAddrLst, sctpCb.sctpCfg.f1SctpPort)) != ROK)
+      else if((ret = cmInetSctpBindx(&sctpCb.f1LstnSockFd, &sctpCb.localAddrLst, sctpCb.sctpCfg.f1SctpInfo.port)) != ROK)
       {
          DU_LOG("\nERROR  -->  SCTP: Binding failed at CU");
       }
@@ -215,9 +304,12 @@ uint8_t sctpStartReq()
       {
          for(assocIdx=0; assocIdx < sctpCb.numAssoc; assocIdx++)
          {
-            if((ret = sctpAccept(&sctpCb.assocCb[assocIdx])) != ROK)
+            if(sctpCb.assocCb[assocIdx].intf == F1_INTERFACE)
             {
-               DU_LOG("\nERROR  -->  SCTP: Unable to accept the connection at CU");
+               if((ret = sctpAccept(&sctpCb.f1LstnSockFd, &sctpCb.assocCb[assocIdx])) != ROK)
+               {
+                  DU_LOG("\nERROR  -->  SCTP: Unable to accept the connection at CU");
+               }
             }
          }
       }
@@ -232,6 +324,7 @@ uint8_t sctpStartReq()
    }
    return (ret);
 }
+
 /*******************************************************************
  *
  * @brief Sets socket options as per requirement
@@ -287,7 +380,7 @@ uint8_t sctpSetSockOpts(CmInetFd *sock_Fd)
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t sctpAccept(CuSctpAssocCb *assocCb)
+uint8_t sctpAccept(CmInetFd *lstnSockFd, CuSctpAssocCb *assocCb)
 {
    uint8_t  ret;
 
@@ -295,7 +388,7 @@ uint8_t sctpAccept(CuSctpAssocCb *assocCb)
 
    while(!assocCb->connUp)
    {
-      ret = cmInetAccept(&sctpCb.f1LstnSockFd, &assocCb->peerAddr, &assocCb->sockFd);
+      ret = cmInetAccept(lstnSockFd, &assocCb->peerAddr, &assocCb->sockFd);
       if (ret == ROKDNA)
       {
          continue;
@@ -422,11 +515,11 @@ uint8_t sctpSockPoll()
    Buffer        *egtpBuf;
    MsgLen        egtpBufLen;
    CmInetMemInfo memInfo;
-   sctpSockPollParams f1PollParams;
+   sctpSockPollParams pollParams;
    uint64_t      numMsgRcvd = 0;
    CmInetAddr    fromAddr;
 
-   memset(&f1PollParams, 0, sizeof(sctpSockPollParams));
+   memset(&pollParams, 0, sizeof(sctpSockPollParams));
     
 
    /* All sockets are non-blocking */
@@ -435,14 +528,14 @@ uint8_t sctpSockPoll()
    memInfo.region = CU_APP_MEM_REG;
    memInfo.pool   = CU_POOL;
    
-   CM_INET_FD_ZERO(&f1PollParams.readFd);
+   CM_INET_FD_ZERO(&pollParams.readFd);
 
    while(1)
    {
       /* Receiving SCTP data */
       for(assocIdx = 0; assocIdx < sctpCb.numAssoc; assocIdx++)
       {
-         if((ret = processPolling(&f1PollParams, &sctpCb.assocCb[assocIdx], timeoutPtr, &memInfo)) != ROK)
+         if((ret = processPolling(&pollParams, &sctpCb.assocCb[assocIdx], timeoutPtr, &memInfo)) != ROK)
          {
             DU_LOG("\nERROR  -->  SCTP : Failed to RecvMsg for F1 at CU\n");
          }
@@ -517,9 +610,16 @@ uint8_t processPolling(sctpSockPollParams *pollParams, CuSctpAssocCb *assocCb, u
                DU_LOG("\nERROR  -->  SCTP : Failed to process sctp notify msg\n");
             }
          }
-         else if(assocCb->connUp)
+         else if(assocCb->connUp && assocCb->intf == F1_INTERFACE)
          {  
-            F1APMsgHdlr(&assocCb->duId, pollParams->mBuf);
+            F1APMsgHdlr(&assocCb->destId, pollParams->mBuf);
+            ODU_PUT_MSG_BUF(pollParams->mBuf);
+         }
+         else if(assocCb->connUp && assocCb->intf == XN_INTERFACE)
+         {
+            //TODO : Handler for messages on XN interface to be added in future commits
+            DU_LOG("\nDEBUG  -->  SCTP : Received message at XN interface");
+            ODU_PRINT_MSG(pollParams->mBuf, 0,0);
             ODU_PUT_MSG_BUF(pollParams->mBuf);
          }
          else
@@ -547,7 +647,7 @@ uint8_t processPolling(sctpSockPollParams *pollParams, CuSctpAssocCb *assocCb, u
  *         RFAILED - failure
  *
  * ****************************************************************/
-uint8_t sctpSend(uint32_t duId, Buffer *mBuf)
+uint8_t sctpSend(InterfaceType intf, uint32_t destId, Buffer *mBuf)
 {
    uint8_t          ret = ROK, assocIdx = 0;
    MsgLen           len = 0;          /* number of actually sent octets */
@@ -559,7 +659,7 @@ uint8_t sctpSend(uint32_t duId, Buffer *mBuf)
 
    for(assocIdx=0; assocIdx < sctpCb.numAssoc; assocIdx++)
    {
-      if(sctpCb.assocCb[assocIdx].duId == duId)
+      if((sctpCb.assocCb[assocIdx].intf == intf) && (sctpCb.assocCb[assocIdx].destId == destId))
       {
          ret = cmInetSctpSendMsg(&sctpCb.assocCb[assocIdx].sockFd, &sctpCb.assocCb[assocIdx].destIpNetAddr, \
                   sctpCb.assocCb[assocIdx].destPort, &memInfo, mBuf, &len, 0, FALSE, 0, 0/*SCT_PROTID_NONE*/, RWOULDBLOCK);
@@ -572,7 +672,7 @@ uint8_t sctpSend(uint32_t duId, Buffer *mBuf)
          return ROK;
       }
    }
-   DU_LOG("\nERROR  -->  SCTP : DU ID [%d] not found in SCTP DestCb list. Failed to send message", duId);
+   DU_LOG("\nERROR  -->  SCTP : Dest ID [%d] at Interface [%d] not found in SCTP DestCb list. Failed to send message", destId, intf);
    return RFAILED;
 } /* End of sctpSend */
 
index 548c29a..d812814 100644 (file)
 #define MAX_RETRY 5
 #define MAX_IPV6_LEN 16
 #define MAX_DU_SUPPORTED 2
-#define MAX_ASSOC_SUPPORTED MAX_DU_SUPPORTED
+#define MAX_REMOTE_CU_SUPPORTED 1
+#define MAX_ASSOC_SUPPORTED (MAX_DU_SUPPORTED + MAX_REMOTE_CU_SUPPORTED)
 
 /* Global variable declaration */
 uint8_t   socket_type;      /* Socket type */
 
+typedef enum
+{
+   F1_INTERFACE,
+   XN_INTERFACE
+}InterfaceType;
+
+typedef enum
+{
+   SERVER,
+   CLIENT
+}NodeType;
+
 typedef struct
 {
    S16              numFd;
@@ -44,13 +57,14 @@ typedef struct
 
 typedef struct
 {
-   uint32_t         duId;
+   InterfaceType    intf;             /* F1 or Xn Interface */
+   uint32_t         destId;           /* For F1 interface, this is DU ID. For Xn, this is remote CU ID */
    uint16_t         destPort;         /* DU PORTS */
    Bool             bReadFdSet;
    CmInetFd         sockFd;           /* Socket file descriptor */
    CmInetAddr       peerAddr;
-   CmInetNetAddrLst destAddrLst;      /* DU Ip address */
-   CmInetNetAddr    destIpNetAddr;    /* DU Ip address */ 
+   CmInetNetAddrLst destAddrLst;      /* Remote IP address list */
+   CmInetNetAddr    destIpNetAddr;    /* Remote IP network address */ 
    Bool             connUp;           /* Is connection up */
 }CuSctpAssocCb;
 
@@ -68,12 +82,19 @@ typedef struct sctpDestInfo
    uint16_t    destPort;
 }SctpDestInfo;
 
+typedef struct sctpCfgPerIntf
+{
+   uint16_t       port;
+   NodeType       localNodeType; /* Local node acts as Server or client while establishing SCTP assoc */
+   uint8_t        numDestNode; 
+   SctpDestInfo   destCb[MAX_ASSOC_SUPPORTED];
+}SctpCfgPerIntf;
+
 typedef struct cuSctpParams
 {
    SctpIpAddr     localIpAddr;
-   uint16_t       f1SctpPort;
-   uint8_t        numDestNode;
-   SctpDestInfo   destCb[MAX_DU_SUPPORTED];
+   SctpCfgPerIntf f1SctpInfo;
+   SctpCfgPerIntf xnSctpInfo;
 }CuSctpParams;
 
 typedef struct
@@ -81,6 +102,8 @@ typedef struct
    CuSctpParams     sctpCfg;
    CmInetNetAddrLst localAddrLst;
    CmInetFd         f1LstnSockFd;       /* Listening Socket file descriptor for F1 association */
+   CmInetFd         xnLstnSockFd;       /* Listening Socket file descriptor for Xn association */
+   NodeType         localXnNodeType;    /* Local node acts as Server or client while establishing SCTP assoc at Xn interface */
    uint8_t          numAssoc;
    CuSctpAssocCb    assocCb[MAX_ASSOC_SUPPORTED];
 }SctpGlobalCb;
@@ -89,14 +112,14 @@ SctpGlobalCb sctpCb;
 
 uint8_t sctpActvInit();
 uint8_t sctpStartReq();
-uint8_t sctpSend(uint32_t duId, Buffer *mBuf);
+uint8_t sctpSend(InterfaceType intf, uint32_t destId, Buffer *mBuf);
 uint8_t sctpCfgReq();
 
 uint8_t fillAddrLst(CmInetNetAddrLst *addrLstPtr, SctpIpAddr *ipAddr);
 uint8_t fillDestNetAddr(CmInetNetAddr *destAddrPtr, SctpIpAddr *dstIpPtr);
 uint8_t sctpSetSockOpts(CmInetFd *sock_Fd);
 uint8_t sctpSockPoll();
-uint8_t sctpAccept(CuSctpAssocCb *assocCb);
+uint8_t sctpAccept(CmInetFd *lstnSockFd, CuSctpAssocCb *assocCb);
 uint8_t processPolling(sctpSockPollParams *pollParams, CuSctpAssocCb *assocCb, uint32_t *timeoutPtr, CmInetMemInfo *memInfo);
 #endif