Description
Basic Infos
- This issue complies with the issue POLICY doc.
- I have read the documentation at readthedocs and the issue is not addressed there.
- I have tested that the issue is present in current master branch (aka latest git).
- I have searched the issue tracker for a similar issue.
- If there is a stack dump, I have decoded it.
- I have filled out all fields below.
Platform
- Hardware: any
- Core Version: 3.0.x
Problem Description
Something noticed while building lwip2 here
Since #6680 (51c2a14#diff-39ab7a280ef46486a19b45c179a5a160a836d57ab164f627ade75cb92ee94d54), old lwip-bundled dhcps was extracted and rewritten into a class
Current example for SoftAP replaced the original calls with the Arduino-API-like global object:
Arduino/libraries/ESP8266WiFi/examples/StaticLease/StaticLease.ino
Lines 74 to 80 in 211606f
And the internal WiFi code is also forced to work through the wrapper:
While the original functions are still in the SDK header. Since the lwip1 code is removed, this is just a linking error for the existing programs pre 3.0.0 that use any of wifi_softap_..._dhcps_...
funcs
Arduino/tools/sdk/include/user_interface.h
Lines 385 to 395 in 211606f
I'd propose keeping the SDK API, but still have a custom class for an netif when actually warranted (maybe in cases like Ethernet?). This will also remove the need for the WiFi class code to reference the SoftAP DHCPS through an Arduino sketch-like API (...which also means, there will be no need to have headers with carefully placed externs)
cc @d-a-v
also, there is slightly more up-to-date rtos sdk implementation (which also has english comments)
https://github.com/espressif/ESP8266_RTOS_SDK/blob/master/components/lwip/apps/dhcpserver/dhcpserver.c
but, it is interesting that the esp32 variant of idf does not include any alternative to add/remove reserved mac feature
https://github.com/espressif/esp-idf/blob/master/components/lwip/include/apps/dhcpserver/dhcpserver.h