Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Unable to render {include} The included page could not be found.
Unable to render {include} The included page could not be found.

DNSc_GetHostByName()

Converts the string representation of a host name to its corresponding IP address using DNS service.

Files

dns-c.h/dns-c.c

Prototype

NET_IP_ADDR DNSc_GetHostByName (CPU_CHAR *host_name);

Arguments

host_name Pointer to the string representation of a host name.

Returned Values

IP address of the host, if no errors;

NET_IP_ADDR_NONE, otherwise.

Required Configuration

None.

Notes / Warnings

This function is a simplified version of BSD socket API’s gethostbyname(). Given a domain name, this function will first query a locally maintained cache and, if no match is found, it will issue a DNS query to retrieve the host’s IP address.

Example Usage

NET_IP_ADDR dns_ip;

 

dns_ip = DNSc_GetHostByName("www.micrium.com");

  • No labels