-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Nick Thomas
Sent: 28 August 2008 14:38
To: [email protected]
Subject: [lwip-users] DNS. Howto Discover DNS Server?



> Hi,

> I notice that dns.c uses #define DNS_SERVER_ADDRESS to use a hard coded
DNS.

> Is there a way to 'discover' the nearest DNS?

> DHCP discovers my NetGear router, and obtains an IP address OK, and I can
> use this routers IP address as DNS_SERVER_ADDRESS and DNS works.
> So, is it possible to dynamically use the discovered DHCP server IP
address
> as the the DNS server, without any hardcoding?

> Or is this not the right approach.

I now see the I can discover the DNS servers. There is some code in
dhcp_handle_ack() which gives me chance to save upto two DNS server IP
address returned.
Which might give me a DNS IP address of 62.31.144.39 (for example). But, my
local IP address is 192.168.0.7.
Now when it comes to use this DNS to resolve google.co.uk (for example) I
notice that the ip_route function cannot find a network interface because my
netmask is blocking access to the DNS server!


Regards

Nick


-----------------------------
Nick Thomas
Email: [EMAIL PROTECTED]



_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.138 / Virus Database: 270.6.10/1638 - Release Date: 8/27/2008
7:06 PM





_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to