DNS Host Name Resolution

The following figure shows the flow of DNS host name resolution.
Figure 1. DNS Resolution Sequence
Notes:
  1. 1.The host application requests to resolve hostname (for example, www.foobar.com), by calling the function gethostbyname.
  2. 2.Before calling the gethostbyname, the application must register a DNS response callback function using the function registerSocketCallback.
  3. 3.After the ATWINC15x0 DNS_Resolver module obtains the IP Address (hostIP) corresponding to the given HostName, the dnsResolveCB is called with the hostIP.
  4. 4.If an error occurs or if the DNS request encounters a time-out, the dnsResolveCB is called with IP Address value zero indicating a failure to resolve the domain name.