Hello,
Maybe you shoud set LWIP_DHCP_AUTOIP_COOP as 1 if you want to use DHCP & autoIP simultaneously. If LWIP_DHCP_AUTOIP_COOP is set, DHCP will shutdown autoIP, and only restart it if DHCP fails.
2011-11-14 10:46:42,"vincent cui" <address@hidden> wrote:
>Simen:
>
>I check the netif_set_link_up functioin
>#if LWIP_DHCP
> if (netif->dhcp) {
> dhcp_network_changed(netif);
> }
>#endif /* LWIP_DHCP */
>
>#if LWIP_AUTOIP
> if (netif->autoip) {
> autoip_network_changed(netif);
> }
>#endif /* LWIP_AUTOIP */
>
>It seems DHCP and AUTOIP will be restarted at same time .
>
>Vincent Cui
>Sr. Firmware Engineer
>Mobile: +8613255150315
>Tel: +86 21 34612525x6104
>Fax: +86 21 34619770
>E-Mail: address@hidden
>Shanghai EnLogic Electric Technology Co., Ltd.
>Address: 1104-1106, Building A, No.391, Guiping Road, Xuhui District, Shanghai, 200233
>
>
>-----Original Message-----
>From: address@hidden [mailto:address@hidden On Behalf Of Simon Goldschmidt
>Sent: 2011年11月12日 2:01
>To: Mailing list for lwIP users
>Subject: Re: [lwip-users] New to lwip. How should I do with LINK_DOWN Event?
>
>"east3" <address@hidden> wrote:
>
>> Hello,
>> I am writing a driver for my NIC, but I do not know how to do with link down event.
>> My driver return ERR_IF from netif->linkoutput when link is down, and it seems work.
>> But is this the correct way?
>
>Yes, that's correct. Additionally, you should call netif_set_link_up and netif_set_link_down when the link comes or goes. This ensures that on turning link, DHCP or AutoIP are restarted.
>
>Simon
>_______________________________________________
>lwip-users mailing list
>address@hidden
>https://lists.nongnu.org/mailman/listinfo/lwip-users
>_______________________________________________
>lwip-users mailing list
>address@hidden
>https://lists.nongnu.org/mailman/listinfo/lwip-users