Resoving a DNS address

Hi
I am trying to figure out how to get the arduino to resolve the same url every time using the following libraries; http://gkaindl.com/software/arduino-ethernet

No I cannot upgrade to V1 of the IDE as it require rewriting 200 lines of code. The example they give is using a serial read fir the resolve can someone help me just try and resolve say google.com thanks.

No I cannot upgrade to V1 of the IDE as it require rewriting 200 lines of code.

Over 190 of them will not need to change, most likely.

he example they give is using a serial read fir the resolve can someone help me just try and resolve say google.com

No, it most certainly does not. What is sent over the serial port is the name of the host to resolve, such as "google.com".

sorry thats what I meant, what I am trying to do is that instead of waiting for the data over serial for the hostname it knows the hostname and will resolve it and spit out the IP

what I am trying to do is that instead of waiting for the data over serial for the hostname it knows the hostname and will resolve it and spit out the IP

So? Do that. What's stopping you?

DNSError resolveHostName(const char* hostName, byte ipAddr[4]);

resolveHostName() looks up the host specified in the first argument and puts its IP address into the the memory pointed to by the second argument (4 bytes). It will block your sketch until the name has been resolved, an error has been reported by the DNS server or a timeout of 5 seconds has elapsed.

Is there some problem with this function? It is in your library.

so to use
DNSError resolveHostName(const char* hostName, byte ipAddr[4]);

I would define the hostname with say
const char* hostName = "google.com"
then where i want to use ipAddr i just place it in there like in?

Udp.sendPacket( packetBuffer,NTP_PACKET_SIZE, ipAddr, 123)

Without any error checking:

byte thisIP[4];
char outBuf[32];

resolveHostName("www.google.com",thisIP);
sprintf(outBuf,"%u.%u.%u.%u",thisIP[0],thisIP[1],thisIP[2],thisIP[3]);
Serial.println(outBuf);