jblackarty <[email protected]> wrote: > 1. How to make driver to be notified when application sets it's interface > up/down ? It's needed to remove unnecessary system load by disabling > transmit path in hardware. There are LWIP_NETIF_STATUS_CALLBACK and > LWIP_NETIF_LINK_CALLBACK capabilities exist but seems that they > intended to be used by application rather then by driver.
There's currently no way to do that, as DHCP starts on a netif that is down and sets it to up only after getting a correct IP address. In my opinion however, this is not optimal and it should be changed to make DHCP work more like on linux (i.e. start on an up interface only and make routing check for '0.0.0.0' IP address). We could then add a callback function into the netif driver to inform it of the administrative status. > 3. Removing network interface doesn't inform driver. It causes driver > to continue input of incoming packets with invalid netif. (However, > resolving > issue #1 could resolve this one too.) This has already been implemented in git master: when LWIP_NETIF_REMOVE_CALLBACK==1 (default is 0), you can set a 'removed' callback per netif with netif_set_remove_callback(). Simon _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
