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: Frédéric Bernon
Subject: [lwip-devel] [bug #20409] Add netif callback function for link change event
Date: Tue, 10 Jul 2007 17:08:07 +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 #7, bug #20409 (project lwip):

>When I wrote the driver I assumed that was what status_callback was for? 

In current code, netif's "up" & "down" can't be see like "enable
send&receive" and "disable send&receive". By example, this is the DHCP client
which call "netif_set_up" when it binds an ip address. But to do that, it have
to be able to communicate with the DHCP server. So, that's why, to my point of
view, current "up" and "down" have only a sense for the stack & the
application, not for driver.

>In any case, I feel uncomfortable with making it the driver's responsibility
to run DHCP, AUTOIP, or ARP, as these are things that should be managed higher
up. 

But isn't it what do netif_link_change_callback in your patch file (for ARP)?
But we could say it's not directly the driver which have to do that, but the
"event" signaled by the driver. To be clear (my english is not very good),
the code for DHCP/AUTOIP/ARP doesn't have to be in the driver file, but in
netif.c to mark the link is up, and in dhcp/autoip timers to handle that
(perhaps is would work by default, but delay could be long)...

>Do we need three callbacks? 
To my point of view, yes for the first, but using tcpip_callback or locking
the core (this callback is the one you propose), yes for the second one (this
could be the current status_callback, but with perhaps some parameters to
notify the kind of event), but I'm not sure for the third (due to the DHCP
problem, which is the same for AUTOIP).

>I hate to go overboard on callbacks...
Not sure to understand...





    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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