remove/replaced PRIVATE and EXTERN keywords
[o-du/l2.git] / src / cu_stub / cu_stub_sctp.h
index 03f273a..8cb7456 100644 (file)
 #define MAX_RETRY 5
 
 /* Global variable declaration */
-CmInetFd   lstnSockFd; /* Listening Socket file descriptor */
-CmInetFd   sockFd;     /* Socket File descriptor */
-U8   socket_type;      /* Socket type */
+uint8_t   socket_type;      /* Socket type */
 Bool nonblocking;      /* Blocking/Non-blocking socket */
 Bool connUp;           /* Is connection up */
 int  assocId;          /* Assoc Id of connected assoc */
   
-CmInetNetAddrLst localAddrLst;
-CmInetNetAddrLst remoteAddrLst;
-  
-SctpParams *sctpCfg;            /* SCTP configurations at DU */
+CuSctpParams sctpCfg;            /* SCTP configurations at DU */
+
+typedef struct
+{
+   S16              numFd;
+   uint16_t         port;   
+   uint32_t         flag;
+   Buffer           *mBuf;
+   MsgLen           bufLen; 
+   CmInetNetAddr    addr;
+   CmInetFdSet      readFd;
+   CmInetSctpSndRcvInfo   info;
+   CmInetSctpNotification ntfy;
+}sctpSockPollParams;
+
+typedef struct
+{
+   uint16_t         destPort;         /* DU PORTS */
+   uint16_t         srcPort;
+   Bool             bReadFdSet;
+   CmInetFd         sockFd;           /* Socket file descriptor */
+   CmInetAddr       peerAddr;
+   CmInetFd         lstnSockFd;       /* Listening Socket file descriptor */
+   CmInetNetAddrLst destAddrLst;      /* DU Ip address */
+   CmInetNetAddrLst localAddrLst;
+   CmInetNetAddr    destIpNetAddr;    /* DU Ip address */ 
+}CuSctpDestCb;
 
-EXTERN S16 sctpActvInit();
-EXTERN void sctpStartReq();
-EXTERN S16 sctpSend(Buffer *mBuf);
+S16 sctpActvInit();
+S16 sctpStartReq();
+S16 sctpSend(Buffer *mBuf);
+S16 sctpCfgReq();
 
+S16 fillAddrLst(CmInetNetAddrLst *addrLstPtr, SctpIpAddr *ipAddr);
+S16 fillDestNetAddr(CmInetNetAddr *destAddrPtr, SctpIpAddr *dstIpPtr);
+S16 sctpSetSockOpts(CmInetFd *sock_Fd);
+S16 sctpSockPoll();
+S16 sctpAccept(CmInetFd *lstnSock_Fd, CmInetAddr *peerAddr, CmInetFd *sock_Fd);
+S16 processPolling(sctpSockPollParams *pollParams, CmInetFd *sockFd, uint32_t *timeoutPtr, CmInetMemInfo *memInfo);
 #endif
 
 /**********************************************************************