|
From: | Walter Saegesser |
Subject: | [lwip-users] DHCP, switch to static IP if no answer |
Date: | Wed, 22 Jun 2011 14:36:42 +0200 |
In the current project DHCP is enabled by default, assuming that in most cases there is a DHCP server around. But what, if not. 1. How can I realize there is no answer from a DHCP server? Do I have to wait for some time, say a minute, and then check whether the netif IP address is still 0? Or is there a better and more convenient way? (I’m working with netconn API). 2. Assuming I have detected the failure, what do I have to do to switch to a static default IP (and GW, and mask)? Would this be the correct code? dhcp_stop ( &mNetIf ); Thanks a lot. Walter _______________________________________________ R&D - Software This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. [Delta Energy Systems] ******************************************************************************************************************************** |
[Prev in Thread] | Current Thread | [Next in Thread] |