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.
6 years, 10 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))));