/*******************************************************************************
        dns.c
        Z-World, 2000

        Demonstration of how to look up an IP address through a DNS
        server.
*******************************************************************************/

#define MY_IP_ADDRESS 	"10.10.6.105"
#define MY_NETMASK 		"255.255.255.0"
#define MY_GATEWAY		"10.10.6.19"
#define MY_NAMESERVER	"10.10.6.1"

#memmap xmem
#use dcrtcp.lib

main()
{
	longword ip;
	char buffer[20];
	
	sock_init();

	ip=resolve("www.rabbitsemiconductor.com");
	if(ip==0)
		printf("couldn’t find www.rabbitsemiconductor.com\n");
	else
		printf("%s is www.rabbitsemiconductor.com's address.\n",inet_ntoa(buffer,ip));
}
