/* added !(defined(CMINETFLATBUF) */
#if (!(defined(WIN32)) && !(defined(CMINETFLATBUF)))
/* Added another function parameter */
-PRIVATE S16 buildRecvBuf ARGS((CmInetMemInfo *info, MsgLen len,
+static S16 buildRecvBuf ARGS((CmInetMemInfo *info, MsgLen len,
CmInetIovec rxArr[], Buffer *dBuf[], uint16_t maxSize,
struct msghdr *msg, Bool isStrmMsg));
-PRIVATE S16 buildRecvMsg ARGS((CmInetMemInfo *info, CmInetIovec rxArr[],
+static S16 buildRecvMsg ARGS((CmInetMemInfo *info, CmInetIovec rxArr[],
S16 numBduf, MsgLen msgLen, Buffer *dBufs[],
Buffer **mPtr));
/* cm_inet_c_001.main_50 - Added parameter to get length of dbufs packed for partial
* send handling
*/
-PRIVATE S16 buildSendIovec ARGS((Buffer *mBuf, MsgLen msgLen,
+static S16 buildSendIovec ARGS((Buffer *mBuf, MsgLen msgLen,
CmInetIovec txArr[], S16 numDBuf,
S16 *numIovElems, uint32_t *strtEndDBufNum,
MsgLen *ioLen));
#ifdef IPV6_SUPPORTED
#ifdef IPV6_OPTS_SUPPORTED
-PRIVATE S16 cmInet6BuildSendHBHOpts ARGS((CmInetIpv6HBHHdrArr *hbhOptsArr,
+static S16 cmInet6BuildSendHBHOpts ARGS((CmInetIpv6HBHHdrArr *hbhOptsArr,
uint8_t *cmsgBuf, uint32_t *curMsgIdx,
uint8_t hdrId));
-PRIVATE S16 cmInet6BuildSendRouteOpts ARGS((CmInetIpv6RtHdr *rtOptsArr,
+static S16 cmInet6BuildSendRouteOpts ARGS((CmInetIpv6RtHdr *rtOptsArr,
uint8_t *cmsgBuf, uint32_t *curMsgIdx));
-PRIVATE S16 cmInet6BuildRecvRtHdr ARGS((uint8_t *cmsgData, uint32_t rtDataLen,
+static S16 cmInet6BuildRecvRtHdr ARGS((uint8_t *cmsgData, uint32_t rtDataLen,
CmInetIpv6RtHdr0 *rtHdr0,
CmInetIpv6RtHdr *rtOptsArr,
CmInetMemInfo *info));
-PRIVATE S16 cmInet6BuildRecvHopOptsArr ARGS((uint8_t *cmsgData, uint32_t hbhDataLen,
+static S16 cmInet6BuildRecvHopOptsArr ARGS((uint8_t *cmsgData, uint32_t hbhDataLen,
CmInetIpv6HBHHdrArr *hbhOptsArr,
uint8_t hdrId, CmInetMemInfo *info));
-PRIVATE S16 cmInet6GetHopLimitValue ARGS((uint8_t *cmsgData, uint32_t hopLimitDataLen,
+static S16 cmInet6GetHopLimitValue ARGS((uint8_t *cmsgData, uint32_t hopLimitDataLen,
CmInetIpv6HdrParm *ipv6HdrParam));
#ifdef SS_LINUX
-PRIVATE S16 cmInetBuildSendHoplimit ARGS((uint32_t hoplimit, uint8_t *cmsgBuf,
+static S16 cmInetBuildSendHoplimit ARGS((uint32_t hoplimit, uint8_t *cmsgBuf,
uint32_t *curMsgIdx));
#endif /* SS_LINUX */
#ifdef LOCAL_INTF
-PRIVATE S16 cmInet6BuildSendPktinfo ARGS((CmInetIpAddr6 *srcAddr,
+static S16 cmInet6BuildSendPktinfo ARGS((CmInetIpAddr6 *srcAddr,
uint8_t *cmsgBuf, uint32_t *curMsgIdx,
uint8_t protType));
#endif /* LOCAL_INTF */
*/
#ifdef ANSI
-PRIVATE S16 buildRecvBuf
+static S16 buildRecvBuf
(
CmInetMemInfo *info, /* buffer allocation info */
MsgLen len, /* message length */
Bool isStrmMsg /* Is a TCP message */
)
#else
-PRIVATE S16 buildRecvBuf(info, len, rxArr, dBuf, maxSize, msg, isStrmMsg)
+static S16 buildRecvBuf(info, len, rxArr, dBuf, maxSize, msg, isStrmMsg)
CmInetMemInfo *info; /* buffer allocation info */
MsgLen len; /* message length */
CmInetIovec rxArr[]; /* gather array */
*/
#ifdef ANSI
-PRIVATE S16 buildRecvMsg
+static S16 buildRecvMsg
(
CmInetMemInfo *info, /* buffer allocation info */
CmInetIovec rxArr[], /* scatter array */
Buffer **mPtr /* message built from dBufs */
)
#else
-PRIVATE S16 buildRecvMsg(info, rxArr, numBuf, msgLen, dBufs, mPtr)
+static S16 buildRecvMsg(info, rxArr, numBuf, msgLen, dBufs, mPtr)
CmInetMemInfo *info; /* buffer allocation info */
CmInetIovec rxArr[]; /* scatter array */
S16 numBuf; /* number of allocated dBufs */
*
*/
#ifdef ANSI
-PRIVATE S16 buildSendIovec
+static S16 buildSendIovec
(
Buffer *mBuf, /* Message buffer */
MsgLen msgLen, /* Length of mBuf */
MsgLen *ioLen /* cm_inet_c_001.main_50 - Len of dbuf packed into IO-vector */
)
#else
-PRIVATE S16 buildSendIovec(mBuf, msgLen, txArr, numDBufs, numIovElems,
+static S16 buildSendIovec(mBuf, msgLen, txArr, numDBufs, numIovElems,
strtEndDBufNum,ioLen)
Buffer *mBuf; /* Message buffer */
MsgLen msgLen; /* Length of mBuf */
*/
#ifdef ANSI
-PRIVATE S16 cmInet4FillTos
+static S16 cmInet4FillTos
(
uint8_t tos, /* tos value to be filled in ipheader */
uint8_t *cmsgBuf, /* flat buffer where to build ext hdrs */
uint32_t *curMsgIdx /* idx in cmsgBuf where HBH/Dest ext hdr ends */
)
#else
-PRIVATE S16 cmInet4FillTos(tos, cmsgBuf, curMsgIdx, protType)
+static S16 cmInet4FillTos(tos, cmsgBuf, curMsgIdx, protType)
uint8_t tos; /* tos value to be filled in ipheader */
uint8_t *cmsgBuf; /* flat buffer where to build ext hdrs */
uint32_t *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
#ifdef NTL_LIB
{
- extern int ntl_hLib;
+ int ntl_hLib;
if ( sockFd->fd >= 0xD001)
ret = ntl_sendmsg(ntl_hLib, sockFd->fd, &msg, 0);
else
#ifdef NTL_LIB
{
- extern int ntl_hLib;
+ int ntl_hLib;
if ( sockFd->fd >= 0xD001)
ret = ntl_sendmsg(ntl_hLib, sockFd->fd, &msg, 0);
else
*/
#ifdef ANSI
-PRIVATE S16 cmInet6BuildSendPktinfo
+static S16 cmInet6BuildSendPktinfo
(
CmInetIpAddr6 *srcAddr, /* src ip addr to set on outgoing packet */
uint8_t *cmsgBuf, /* flat buffer where to build ext hdrs */
uint8_t protType /* whether IPv4/IPv6 socket */
)
#else
-PRIVATE S16 cmInet6BuildSendPktinfo(srcAddr, cmsgBuf, curMsgIdx, protType)
+static S16 cmInet6BuildSendPktinfo(srcAddr, cmsgBuf, curMsgIdx, protType)
CmInetIpAddr6 *srcAddr; /* src ip addr to set on outgoing packet */
uint8_t *cmsgBuf; /* flat buffer where to build ext hdrs */
uint32_t *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
*/
#ifdef ANSI
-PRIVATE S16 cmInetBuildSendHoplimit
+static S16 cmInetBuildSendHoplimit
(
uint32_t hoplimit, /* the hoplimit value to be set on outgoing packet */
uint8_t *cmsgBuf, /* flat buffer where to build ext hdrs */
uint32_t *curMsgIdx /* idx in cmsgBuf where HBH/Dest ext hdr ends */
)
#else
-PRIVATE S16 cmInetBuildSendHoplimit(hoplimit, cmsgBuf, curMsgIdx)
+static S16 cmInetBuildSendHoplimit(hoplimit, cmsgBuf, curMsgIdx)
uint32_t hoplimit; /* the hoplimit value to be sent on outgoing packet */
uint8_t *cmsgBuf; /* flat buffer where to build ext hdrs */
uint32_t *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
*/
#ifdef ANSI
-PRIVATE S16 cmInet6BuildSendHBHOpts
+static S16 cmInet6BuildSendHBHOpts
(
CmInetIpv6HBHHdrArr *hbhOptsArr,/* IPv6 extensions headers HBH/Dest opts */
uint8_t *cmsgBuf, /* flat buffer where to build ext hdrs */
uint8_t hdrId /* 0: HBH hdr, 1:Dest Hdr */
)
#else
-PRIVATE S16 cmInet6BuildSendHBHOpts(hbhOptsArr, cmsgBuf, curMsgIdx, hdrId)
+static S16 cmInet6BuildSendHBHOpts(hbhOptsArr, cmsgBuf, curMsgIdx, hdrId)
CmInetIpv6HBHHdrArr *hbhOptsArr;/* IPv6 extensions headers HBH/Dest opts */
uint8_t *cmsgBuf; /* flat buffer where to build ext hdrs */
uint32_t *curMsgIdx; /* idx in cmsgBuf where HBH/Dest ext hdr ends */
*/
#ifdef ANSI
-PRIVATE S16 cmInet6BuildSendRouteOpts
+static S16 cmInet6BuildSendRouteOpts
(
CmInetIpv6RtHdr *rtOptsArr, /* IPv6 destination options array */
uint8_t *cmsgBuf, /* flat buffer where to build ext hdrs */
uint32_t *curMsgIdx /* idx in cmsgBuf where to start building RT hdr */
)
#else
-PRIVATE S16 cmInet6BuildSendRouteOpts(rtOptsArr, cmsgBuf, curMsgIdx)
+static S16 cmInet6BuildSendRouteOpts(rtOptsArr, cmsgBuf, curMsgIdx)
CmInetIpv6RtHdr *rtOptsArr; /* IPv6 destination options array */
uint8_t *cmsgBuf; /* flat buffer where to build ext hdrs */
uint32_t *curMsgIdx; /* idx in cmsgBuf where to start building RT hd */
*/
#ifdef ANSI
-PRIVATE S16 cmInet6BuildRecvHopOptsArr
+static S16 cmInet6BuildRecvHopOptsArr
(
uint8_t *cmsgData, /* flat buffer where to build ext hdrs */
uint32_t hbhDataLen, /* byte len of cmsghdr + hbh ancil data */
CmInetMemInfo *info /* Memory information */
)
#else
-PRIVATE S16 cmInet6BuildRecvHopOptsArr(cmsgData, hbhDataLen, hbhOptsArr, hdrId,
+static S16 cmInet6BuildRecvHopOptsArr(cmsgData, hbhDataLen, hbhOptsArr, hdrId,
info)
uint8_t *cmsgData; /* flat buffer where to build ext hdrs */
uint32_t hbhDataLen; /* byte len of cmsghdr + hbh ancil data */
*/
#ifdef ANSI
-PRIVATE S16 cmInet6BuildRecvRtHdr
+static S16 cmInet6BuildRecvRtHdr
(
uint8_t *cmsgData, /* flat buffer where to build Route hdr */
uint32_t rtDataLen, /* byte len of cmsghdr struc+rtHdr ancil data */
CmInetMemInfo *info /* Memory information */
)
#else
-PRIVATE S16 cmInet6BuildRecvRtHdr(cmsgData, rtDataLen, rtHdr0, rtOptsArr, info)
+static S16 cmInet6BuildRecvRtHdr(cmsgData, rtDataLen, rtHdr0, rtOptsArr, info)
uint8_t *cmsgData; /* flat buffer where to build Route hdr */
uint32_t rtDataLen; /* byte len of cmsghdr struc+rtHdr ancil data */
CmInetIpv6RtHdr0 *rtHdr0; /* rtHeader0 struct that precedes IPV6 addrss */
*/
#ifdef ANSI
-PRIVATE S16 cmInet6GetHopLimitValue
+static S16 cmInet6GetHopLimitValue
(
uint8_t *cmsgData, /* flat buffer where to build ext hdrs */
uint32_t hopLimitDataLen, /* byte len of cmsghdr + hbh ancil data */
CmInetIpv6HdrParm *ipv6HdrParam /* ipv6 header parameters */
)
#else
-PRIVATE S16 cmInet6GetHopLimitValue(cmsgData, hopLimitDataLen, ipv6HdrParam)
+static S16 cmInet6GetHopLimitValue(cmsgData, hopLimitDataLen, ipv6HdrParam)
uint8_t *cmsgData; /* flat buffer where to build ext hdrs */
uint32_t hopLimitDataLen; /* byte len of cmsghdr + hbh ancil data */
CmInetIpv6HdrParm *ipv6HdrParam; /* ipv6 header parameters */
/* disable the IP_OPTIONS for Router Alert. */
#ifdef WIN32
ret = setsockopt(sockFd->fd, level, IP_OPTIONS,
- (CONSTANT char *)&disableOpt, sizeof(int));
+ (const char *)&disableOpt, sizeof(int));
#else
ret = setsockopt(sockFd->fd, level, IP_OPTIONS, NULL, 0);
#endif /* WIN32 */
(char *)&lpEnable, sizeof(lpEnable));
#else
ret = setsockopt(sockFd->fd, level, IP_MULTICAST_LOOP,
- (CONSTANT char *)&lpEnable, sizeof(lpEnable));
+ (const char *)&lpEnable, sizeof(lpEnable));
#endif /* SS_VW */
}
else
(char *)&lpDisable, sizeof(lpDisable));
#else
ret = setsockopt(sockFd->fd, level, IP_MULTICAST_LOOP,
- (CONSTANT char *)&lpDisable, sizeof(lpDisable));
+ (const char *)&lpDisable, sizeof(lpDisable));
#endif /* SS_VW */
}
break;
case CM_INET_OPT_MCAST_TTL:
optVal = (uint32_t*)value;
- /* remove CONSTANT in setsockopt for VW */
+ /* remove const in setsockopt for VW */
#ifdef SS_VW
ret = setsockopt(sockFd->fd, level, IP_MULTICAST_TTL,
(char *)optVal, sizeof(uint8_t));
#else
ret = setsockopt(sockFd->fd, level, IP_MULTICAST_TTL,
- (CONSTANT char *)optVal, sizeof(uint8_t));
+ (const char *)optVal, sizeof(uint8_t));
#endif /* SS_VW */
break;
#endif /* SUNOS || WIN32 || SS_PS || SS_VW_MCAST || HPOS */
#ifdef ANSI
S32 cmInetGetAddrInfo
(
-CONSTANT S8 *node, /* Network addr which has to be resolved */
-CONSTANT S8 *service, /* Sets the port number in network addr */
-CONSTANT CmInetAddrInfo *hints, /* Specifies preferred socket type or protocol */
+const S8 *node, /* Network addr which has to be resolved */
+const S8 *service, /* Sets the port number in network addr */
+const CmInetAddrInfo *hints, /* Specifies preferred socket type or protocol */
CmInetAddrInfo **res /* Link list of addrInfo structure */
)
#else
S32 cmInetGetAddrInfo(node,service,hints,res)
-CONSTANT S8 *node; /* Network addr which has to be resolved */
-CONSTANT S8 *service; /* Sets the port number in network addr */
-CONSTANT CmInetAddrInfo *hints; /* Specifies preferred socket type or protocol */
+const S8 *node; /* Network addr which has to be resolved */
+const S8 *service; /* Sets the port number in network addr */
+const CmInetAddrInfo *hints; /* Specifies preferred socket type or protocol */
CmInetAddrInfo **res; /* Link list of addrInfo structure */
#endif
{