lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #20409] Add netif callback function for link change ev


From: Simon Goldschmidt
Subject: [lwip-devel] [bug #20409] Add netif callback function for link change event
Date: Wed, 11 Jul 2007 07:23:37 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

Follow-up Comment #16, bug #20409 (project lwip):

> Would this be a mandatory feature of a version

The problem with not making it mandatory would be the decision of when to
send the gratuitous ARP.

> I think we could something like netif->linkstatus (on the same
> idea than netif->input) to be able to work on all design cases
> (NO_SYS=0/1 netif->with/without tcpip.c...). We could define
> inside tcpip.c a new function like tcpip_linkstatus using
> perhaps tcpip_callback or the "lock".

That would require having a new parameter in netif_add which only few people
would need! Why don't we make it more simple? For example, the network driver
execute the following code when the link is up:

SYS_ARCH_PROTECT();
netif->flags |= NETIF_FLAG_LINK_UP;
SYS_ARCH_UNPROTECT();

Then the ARP / DHCP or AUTOIP timer can appropriately react on a change from
UP to DOWN. This wouldn't require changes that are inconsistent from raw to
sequential API. Also, this doesn't require much code and thus might be
smaller.

This can also be moved into a function netif_set_link_up()/_down() to be more
robust.


About the state UP, NO LINK: when it returns to UP, LINK, dhcp should
negotiate again, shouldn't it? So we would have to set the netif state to
down when the link is down?

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?20409>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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