X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fric_stub%2Fric_stub_sctp.h;h=37da87890a46f17385c50ff759f237d8f76e85b8;hb=a5f35b2204dd87ebe347f11282000852b55810ad;hp=19e9b2132bba0dcc070badc3da8b1fd6c325559a;hpb=def50dc175cebc67238db5f1acd5ff322a2279bd;p=o-du%2Fl2.git diff --git a/src/ric_stub/ric_stub_sctp.h b/src/ric_stub/ric_stub_sctp.h index 19e9b2132..37da87890 100644 --- a/src/ric_stub/ric_stub_sctp.h +++ b/src/ric_stub/ric_stub_sctp.h @@ -20,13 +20,13 @@ #ifndef __RIC_SCTP_H__ #define __RIC_SCTP_H__ + #define MAX_RETRY 5 +#define MAX_IPV6_LEN 16 +#define MAX_DU_SUPPORTED 1 /* 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 */ typedef struct { @@ -52,16 +52,50 @@ typedef struct CmInetNetAddrLst destAddrLst; /* DU Ip address */ CmInetNetAddrLst localAddrLst; CmInetNetAddr destIpNetAddr; /* DU Ip address */ -}CuSctpDestCb; + Bool connUp; +}RicSctpDestCb; + +typedef struct ipAddr +{ + bool ipV4Pres; + uint32_t ipV4Addr; + bool ipV6Pres; + uint8_t ipV6Addr[MAX_IPV6_LEN]; +}SctpIpAddr; + +typedef struct sctpAssocInfo +{ + SctpIpAddr duIpAddr; + uint16_t duPort; + SctpIpAddr ricIpAddr; + uint16_t ricPort; +}SctpAssocInfo; + +typedef struct ricSctpParams +{ + uint8_t numDu; + SctpAssocInfo sctpAssoc[MAX_DU_SUPPORTED]; +}RicSctpParams; + +typedef struct sctpGlobalCb +{ + RicSctpParams sctpCfg; + uint8_t numDu; + RicSctpDestCb destCb[MAX_DU_SUPPORTED]; +}SctpGlobalCb; + +SctpGlobalCb sctpCb; -EXTERN S16 sctpActvInit(); -EXTERN S16 sctpSend(Buffer *mBuf); -S16 sctpCfgReq(); -S16 sctpStartReq(); -S16 sctpSetSockOpts(CmInetFd *sock_Fd); -S16 sctpAccept(CmInetFd *lstnSock_Fd, CmInetAddr *peerAddr, CmInetFd *sock_Fd); -S16 sctpSockPoll(); -S16 processPolling(sctpSockPollParams *pollParams, CmInetFd *sockFd, uint32_t *timeoutPtr, CmInetMemInfo *memInfo); +uint8_t sctpActvInit(); +uint8_t sctpSend(Buffer *mBuf); +uint8_t sctpCfgReq(); +uint8_t sctpStartReq(); +uint8_t sctpSetSockOpts(CmInetFd *sock_Fd); +uint8_t sctpAccept(RicSctpDestCb *destCb); +uint8_t sctpSockPoll(); +uint8_t processPolling(sctpSockPollParams *pollParams, RicSctpDestCb *destCb, uint32_t *timeoutPtr, CmInetMemInfo *memInfo); +uint8_t fillAddrLst(CmInetNetAddrLst *addrLstPtr, SctpIpAddr *ipAddr); +uint8_t fillDestNetAddr(CmInetNetAddr *destAddrPtr, SctpIpAddr *dstIpPtr); #endif