51 numReadParams = sscanf(pBuffer,
"%d.%d.%d.%d", &ipAddrA, &ipAddrB, &ipAddrC, &ipAddrD);
56 if ((numReadParams == 4) && (ipAddrA >= 0) && (ipAddrA <= 255) && (ipAddrB >= 0) && (ipAddrB <= 255) && (ipAddrC >= 0) && (ipAddrC <= 255) && (ipAddrD >= 0) && (ipAddrD <= 255))
95 #if SBG_CONFIG_BIG_ENDIAN == 0 sbgIpAddress sbgNetworkIpFromString(const char *pBuffer)
SBG_INLINE uint8 sbgIpAddrGetA(sbgIpAddress ipAddr)
SBG_INLINE uint8 sbgIpAddrGetB(sbgIpAddress ipAddr)
SBG_INLINE sbgIpAddress sbgIpAddr(uint8 a, uint8 b, uint8 c, uint8 d)
SBG_INLINE uint32 sbgSwap32(uint32 x)
bool sbgIpNetMaskValid(sbgIpAddress netmask)
Useful methods for Network handling such as ip addresses.
#define SBG_UNUSED_PARAMETER(x)
SBG_INLINE uint8 sbgIpAddrGetC(sbgIpAddress ipAddr)
#define SBG_ASSERT(expression)
SBG_INLINE uint8 sbgIpAddrGetD(sbgIpAddress ipAddr)
void sbgNetworkIpToString(sbgIpAddress ipAddr, char *pBuffer, size_t maxSize)
Set of functions used to swap numbers.