|
From: | Menon, Deepa |
Subject: | [lwip-users] Integrate DNS into LWIP main code |
Date: | Mon, 1 Jun 2009 17:45:10 +0530 |
Hi, I want to start DNS client in my web server application and
get a netbios name ‘ABC’ for my server. I have added dns.c in my project. I have DHCP
implemented in the application but I am struggling to start the DNS application. Can anyone please help me by providing a method to start the
DNS application along with DHCP. I am using the following settings to start DHCP and get an
IP address for the embedded web server in my application. 1
Following two lines are added in lwipopts.h
file. #define
LWIP_DHCP
1
#define DHCP_DOES_ARP_CHECK 1 2.
Following code is added to after lwIP_Init():
#ifdef LWIP_DHCP dhcp_start(&EMAC_if); while
(EMAC_if.ip_addr.addr == 0) { sys_msleep(DHCP_FINE_TIMER_MSECS); dhcp_fine_tmr(); mscnt
+= DHCP_FINE_TIMER_MSECS; if
(mscnt >= DHCP_COARSE_TIMER_SECS*1000) { dhcp_coarse_tmr(); mscnt
= 0; }
}
#endif Thanks, Deepa M Honeywell Technologies |
[Prev in Thread] | Current Thread | [Next in Thread] |