This function asks DNS for domain name resolution and gets an IP address.

Syntax

int SyncGetIp(
  unsigned char * hostName, 
  SOCKET sock, 
  unsigned int *ipAddress
);

Parameters

hostName
[in] Specify the domain name.
sock
[in] Socket descriptor
ipAddress
[out] Specify the pointer to get the IP address.

Return value

The following values will be returned.
ValueDescription
SOCK_ERR_NO_ERROR Succeeded
M2M_ERR_SLEEP_FAIL Initialize with SysWLANInit function.
Other than the above Failed

Remarks

Request domain name resolution from DNS and get an IP address.

Requirements

Header file:
lib.h
Library file:
libSTARTUPOPH5000.a

Last updated: 2020/10/14