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: Jared Grubb
Subject: [lwip-devel] [bug #20409] Add netif callback function for link change event
Date: Wed, 11 Jul 2007 18:25:44 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

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

> [ Have timers implement the events ]

That sounds like a good solution. The side effect is that the response could
be a bit slow for ARP (5 seconds), but it's "gratuitous" anyhow :)

I would suggest two flags then: LINK_UP and LINK_EVENT. LINK_UP would always
represent the current link status and is only set or cleared by driver, but
LINK_EVENT is set by driver and cleared by the appropriate timer.

The only side effect is that a timer will only really see the last event that
happened. For example, suppose LINK->NOLINK->LINK before the timer triggers.
The timer will see LINK_UP and LINK_CHANGED and assume the NOLINK->LINK is
the event it has to handle. 

* ARP doesn't care; it only fires if LINK_UP is set. 
* Would DHCP care? It could detect this by noticing that it sees LINK_UP and
LINK_EVENT but it's also currently bound. 
* Does AUTOIP care?

I havent used AUTOIP or DHCP, so I'm not sure if it's an issue. If it
matters, we could use three flags (e.g., LINK_UP, LINK_LOST, LINK_GAINED) and
let the handlers handle both events in the "proper" order. 

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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