+/*******************************************************************
+ *
+ * @brief checks for valid readFd and process the InetSctpRecvMsg
+ * during polling
+ *
+ * @details
+ *
+ * Function : processPolling
+ *
+ * Functionality:
+ * checks for valid readFd and process the InetSctpRecvMsg
+ * during polling
+ *
+ * @params[in] Params required for polling
+ * @params[in] SockFd for file descriptor
+ * @params[in] timeoutPtr indicates the timeout value
+ * @params[in] MemInfo indicates memory region
+ *
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+
+S16 processPolling(sctpSockPollParams *pollParams, CmInetFd *sockFd, U32 *timeoutPtr, CmInetMemInfo *memInfo)
+{
+ U16 ret = ROK;
+ CM_INET_FD_SET(sockFd, &pollParams->readFd);
+ ret = cmInetSelect(&pollParams->readFd, NULLP, timeoutPtr, &pollParams->numFd);
+ if(CM_INET_FD_ISSET(sockFd, &pollParams->readFd))
+ {
+ CM_INET_FD_CLR(sockFd, &pollParams->readFd);
+ ret = cmInetSctpRecvMsg(sockFd, &pollParams->addr, &pollParams->port, memInfo, &pollParams->mBuf, &pollParams->bufLen, &pollParams->info, &pollParams->flag, &pollParams->ntfy);
+ if(connUp & (ret != ROK))
+ {
+ f1Params.bReadFdSet = RFAILED;
+ }
+ else
+ {
+ if(((pollParams->flag & CM_INET_SCTP_MSG_NOTIFICATION) != 0) && (ret == ROK))
+ {
+ ret = sctpNtfyHdlr(&pollParams->ntfy);
+ if(ret != ROK)
+ {
+ DU_LOG("\nSCTP : Failed to process sctp notify msg\n");
+ }
+ }
+ else if(connUp & (pollParams->port == f1Params.destPort))
+ {
+ F1APMsgHdlr(pollParams->mBuf);
+ SPutMsg(pollParams->mBuf);
+ }
+ else
+ {
+ SPutMsg(pollParams->mBuf);
+ }
+ }
+ }
+ RETVALUE(ROK);