lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] New to lwip. How should I do with LINK_DOWN Event?


From: vincent cui
Subject: Re: [lwip-users] New to lwip. How should I do with LINK_DOWN Event?
Date: Mon, 14 Nov 2011 02:46:42 +0000

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]