X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcu_stub%2Fcu_stub_sctp.h;h=8cb745615495a435027e1e36a56a96cb73bdacfd;hb=65443172dd60a6ea312bd3a15959dbf54ad7f045;hp=4cd30bf78b193843db77f3b5984aef24f80e18d8;hpb=d349ae65e1495488772f87e5cfa1ae71d9eab075;p=o-du%2Fl2.git diff --git a/src/cu_stub/cu_stub_sctp.h b/src/cu_stub/cu_stub_sctp.h index 4cd30bf78..8cb745615 100644 --- a/src/cu_stub/cu_stub_sctp.h +++ b/src/cu_stub/cu_stub_sctp.h @@ -30,11 +30,51 @@ #define MAX_RETRY 5 -EXTERN S16 sctpActvInit(Ent entity, Inst inst, Region region, Reason reason); -EXTERN S16 sctpActvTsk(Pst *pst, Buffer *mBuf); -EXTERN void sctpStartReq(); -EXTERN S16 sctpOutMsgSend(Buffer *mBuf); +/* Global variable declaration */ +uint8_t socket_type; /* Socket type */ +Bool nonblocking; /* Blocking/Non-blocking socket */ +Bool connUp; /* Is connection up */ +int assocId; /* Assoc Id of connected assoc */ + +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; + +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 /**********************************************************************