Initialize SoftAP DhcpServer object on demand by mcspr · Pull Request #8546 · esp8266/Arduino

added 10 commits

April 19, 2022 20:05
Remove dependency on global ctor, and just construct the object when
someone asks us to do it. Only dependency right now is netif_git, which
is expected to be initialized by the lwip code some time before
dhcps_start happens.

Removing ip_info from begin(), since we never reference later on.
Also removing the specific check for netif id and simplify the ctors.

Update tests and recover old nonos-sdk dhcps functions that were not implemented.

d-a-v

more... arduino'ish? we ahve object as namespace, plus everything else
related to softAP is there
redundant includes, redundant mock impl (out-of-scope here to fix)

@mcspr

@mcspr

@mcspr

@mcspr

@mcspr

@mcspr

@mcspr mcspr deleted the dhcps-init-tweaks branch

January 7, 2023 00:18

vidplace7 added a commit to vidplace7/esphome that referenced this pull request

Jan 16, 2023

hasenradball pushed a commit to hasenradball/Arduino that referenced this pull request

Nov 18, 2024
* Initialize SoftAP DhcpServer object on demand

Remove dependency on global ctor, and just construct the object when
someone asks us to do it. Only dependency right now is netif_git, which
is expected to be initialized by the lwip code some time before
dhcps_start happens.

Removing ip_info from begin(), since we never reference later on.
Also removing the specific check for netif id and simplify the ctors.

Update tests and recover old nonos-sdk dhcps functions that were not implemented.

* nonos helpers have a separate header

* wifi ap needs this anyway, simplify sketch includes

* missing example

* existing name :/

* trying to fix header dependency

* restyle

* not a c header

* no need to init

* move dhcp server getter to WiFi

more... arduino'ish? we ahve object as namespace, plus everything else
related to softAP is there
redundant includes, redundant mock impl (out-of-scope here to fix)

* ...move things back, still expose as WiFi method

* review fix

* include -nonos header in wifi lib though

* no more lwip include

* style

* need mock dhcpserver instance