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: Tue, 10 Jul 2007 19:20:06 +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 #10, bug #20409 (project lwip):

> when the DHCP client is negociated an ip address, the netif is "down"

I haven't used the DHCP module at all. Now I understand what you mean. So,
instead of 4 states, there are 6. Let's agree on the states the application,
stack, and driver should understand (correct them if wrong, I'm just doing
this off the top of my head):

UP = application is allowed to use this interface
DOWN = application is not allowed to use this interface

LINK = driver is able to RX and TX
NO LINK = driver cannot RX and TX

STARTED = driver is active and running
STOPPED = driver has been initialized, but is inactive

In this definition, there would be the following:
(DOWN,NO LINK,STOPPED) All off, driver circuits maybe powered down
(DOWN,NO LINK,STARTED) Driver running but no link found (yet)
(DOWN, LINK  ,STARTED) Driver ready to go. DHCP would neogtiate here.
( UP , LINK  ,STARTED) All good.
( UP ,NO LINK,STARTED) Lost link. Driver returns error on transmit. Perhaps
DHCP would bring down?

The following states would not be allowed:
(DOWN, LINK  ,STOPPED) Stopped implies no link
( UP , LINK  ,STOPPED) UP & STOPPED is invalid
( UP ,NO LINK,STOPPED) UP & STOPPED is invalid

What do you think of this much?

    _______________________________________________________

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]