lwip/netif struct has two places to store user's data
* netif->state (1 void*) but that might be occupied in special cases
* netif->client_dtat (n void*s) but that must be enabled in opts.h
This commit stores esp_netif_t* primarily in state, but if any special
netif is enabled in menuconfig (bridgeif, pppos), it uses netif->client_data.
This commit also fixes incorrect esp_netif that is attached to
IP_EVENT_GOT_IP6 event posted by pppos interfaces in:
c585618b97/components/esp_netif/lwip/esp_netif_lwip_ppp.c (L114)
Closes https://github.com/espressif/esp-idf/issues/9345
Fix dependency tree so that lwip doesn't depend on any specific network
interface component.
Network interface drivers shall depend on esp_netif.
esp_netif shall depend on lwip (but not on any specific interface
driver) -- it optionally depends on vfs and esp_eth (need ethernet
header for L2/bridge mode)
ESP_RETURN_ON_FALSE(a, err_code, ...) macro
Will print and return err_code
if (unlikely(!(a)))
so "a" needs to state what we expect to be TRUE
which in this case means:
mld6_leavegroup_netif(...) == ERR_OK
This commit updates the visibility of various header files and cleans up
some unnecessary inclusions. Also, this commit removes certain header
include paths which were maintained for backward compatibility.
* Extended storage for staipassigned events to pass client's MAC address.
* Added client's MAC to dhcp server callback
* Posting the staipassigned events with clients IP and MAC address
Make use of lwip_netif pointer for setting the default interface in lwip,
since the is a generic pointer used in I/O functions wheras the former is always the type.
More importantly the netif_handle could be set to another context ptr
used in I/O functions, as as for the SLIP netif.
This change fixes the issue of incorrect settings of a default interface
if any SLIP netif is involved.
Closes https://github.com/espressif/esp-idf/issues/7246
Added lwIP hooks which could be optionally overwritten in the
application code. These three options are provided in Kconfig:
* NONE: No hook support
* DEFAULT: Default implementation is provided. If IDF doesn't
have a specific hook implementation, an empty stub is provided, which
could be overwritten by strong implementation in application code.
* CUSTOM: Hooks are declared only to be implemented in application code.
Merges https://github.com/espressif/esp-idf/pull/6034
When setting hostname using esp_netif_set_hostname_api() failed for some reason, the netif pointer might be freed while lwip pointer stil point to that location and could be used. Fixed by moving the freeing and string duplication to the block where lwip hostname is set.
Closes https://github.com/espressif/esp-idf/issues/6048