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 20:57:44 +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 #26, bug #20409 (project lwip):

The reason for a flag LINK_WAS_DOWN is that if the link changes fast, a timer
function might only see UP and UP again, not the DOWN in between. Thus seeing
no change, it wouldn't do anything.

As such, I don't know if it is enough to let the timers deal with such a
flag. You'd need one LINK_WAS_DOWN flag for every protocol or else one will
set it back and the others won't see it.

I think netif_set_up can stay like it is and the gratuitous ARP can be sent
there, as long as we make sure the interface is enabled again. For that, we
could set the netif DOWN if the link is down and UP when the link is back
(from dhcp or autoip; or from hand when static IPs are used). That way, the
gratuitous ARP will be sent when the link is back.

The only problem I see there is that the ARP timer is too slow...

And since other timers are either slow, too, or produce processor load while
the link is not changed, a callback might be better after all...

This brings us back to the old question of having a define that tells us
whether lwIP is running multithreaded or standalone! The only other solution
would be to include locking in the whole core which does nothing in
standalone / raw mode.

    _______________________________________________________

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]