[Top][All Lists]
[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: |
Frédéric Bernon |
Subject: |
[lwip-devel] [bug #20409] Add netif callback function for link change event |
Date: |
Tue, 10 Jul 2007 18:36:00 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4 |
Follow-up Comment #9, bug #20409 (project lwip):
>I agree that the UP and DOWN are primarily for the application and stack.
But, a driver does care about UP and DOWN. For example, if the interface is
DOWN, then the driver can turn its RX and TX circuts off (to save power, for
example).
I'm not sure you have understand the problem with DHCP/AUTOIP: when the DHCP
client is negociated an ip address, the netif is "down", until the DHCP
finally bind the ip address, and it "up" the netif. If like you said, the
driver turn off its RX/TX circuits, how can DHCP client negociate with the
server?
>Driver initialization is a one-time thing, but "start" and "stop" can happen
repeatedly if the interface is brought up and down in the code.
Perhaps this is the part I misunderstood: what do you call "start" and "stop"
in this context?
>I suggested the callback function, but I think your event is much better.
When I said "event" I don't want to say "an OS event" (like semaphore,
mutex...), but a feature which have to call the "link_callback": by example,
saying you use tcpip.c, you could call tcpip_callback, or we could extend the
optionnal netifapi.c to add a function like
"netifapi_link_change/do_netifapi_link_change" on the same model than
"netifapi_dhcp_start/do_netifapi_dhcp_start"...
Since we have to support NO_SYS=0 (with or without netifapi) & NO_SYS=1, I
think the patch have to complete with such cases.
To come back with the power saving, if it's one of your goal, I think you
could use the status_callback to do it, right? And the "ARP gratuitous" can
be forced with current netif functions if your driver call ...
netif_set_down();
netif_set_up();
Of course, this is just a workaround (I think it do the job), but the idea of
a "link_callback" is always good...
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?20409>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Jared Grubb, 2007/07/09
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Frédéric Bernon, 2007/07/09
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Jared Grubb, 2007/07/09
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Frédéric Bernon, 2007/07/10
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Simon Goldschmidt, 2007/07/10
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Frédéric Bernon, 2007/07/10
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Jared Grubb, 2007/07/10
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Frédéric Bernon, 2007/07/10
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Jared Grubb, 2007/07/10
- [lwip-devel] [bug #20409] Add netif callback function for link change event,
Frédéric Bernon <=
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Jared Grubb, 2007/07/10
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Jared Grubb, 2007/07/10
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Frédéric Bernon, 2007/07/10
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Jared Grubb, 2007/07/10
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Frédéric Bernon, 2007/07/10
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Jared Grubb, 2007/07/10
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Simon Goldschmidt, 2007/07/11
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Jared Grubb, 2007/07/11
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Simon Goldschmidt, 2007/07/11
- [lwip-devel] [bug #20409] Add netif callback function for link change event, Frédéric Bernon, 2007/07/11