Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 6 months ago.
set dns server
Hi all, I am trying to set a dns server, can any one help me out in it. I have tried the following piece of code, but no luck
ip4_addr_set_u32(&primaryDnsServer, ipaddr_addr("a.b.c.d")); dns_setserver(0, &primaryDnsServer); ip_addr = dns_getserver(0); printf("dns server: %s\n", inet_ntoa(*((struct in_addr*)&(ip_addr))));
done :)
and dont forget to connect to network before setting the dns configurations
posted by zain aftab 22 Sep 2014