37 #ifndef __SL_NET_UTILS_H__ 38 #define __SL_NET_UTILS_H__ 65 #define SLNETUTIL_IPV4_VAL(add_3,add_2,add_1,add_0) ((((uint32_t)add_3 << 24) & 0xFF000000) | (((uint32_t)add_2 << 16) & 0xFF0000) | (((uint32_t)add_1 << 8) & 0xFF00) | ((uint32_t)add_0 & 0xFF) ) 159 int32_t
SlNetUtil_getHostByName(uint32_t ifBitmap,
char *name,
const uint16_t nameLen, uint32_t **ipAddr, uint16_t *ipAddrLen,
const uint8_t family);
303 int32_t
SlNetUtil_inetPton(int16_t addrFamily,
const char *strAddr,
void *binaryAddr);
const char * SlNetUtil_inetNtop(int16_t addrFamily, const void *binaryAddr, char *strAddr, SlNetSocklen_t strAddrLen)
Converts IP address in binary representation to string representation.
uint16_t SlNetSocklen_t
The SlNetSocklen_t is used for declaring the socket length parameter.
Definition: slnetsock.h:545
uint16_t SlNetUtil_htons(uint16_t val)
Reorder the bytes of a 16-bit unsigned value.
int32_t SlNetUtil_inetPton(int16_t addrFamily, const char *strAddr, void *binaryAddr)
Converts IP address in string representation to binary representation.
int32_t SlNetutil_init(int32_t flags)
Initialize the slnetutil module.
uint32_t SlNetUtil_ntohl(uint32_t val)
Reorder the bytes of a 32-bit unsigned value.
uint32_t SlNetUtil_htonl(uint32_t val)
Reorder the bytes of a 32-bit unsigned value.
uint16_t SlNetUtil_ntohs(uint16_t val)
Reorder the bytes of a 16-bit unsigned value.
int32_t SlNetUtil_getHostByName(uint32_t ifBitmap, char *name, const uint16_t nameLen, uint32_t **ipAddr, uint16_t *ipAddrLen, const uint8_t family)
Get host IP by name Obtain the IP Address of machine on network, by machine name. ...