feat: migrate to ESP-NETIF and expose esp_netif handle #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR migrates the WireGuard interface from the raw lwIP netif API to
esp_netif, the officially supported network abstraction in ESP-IDF ≥ 4.4.It also exposes an
esp_netif_t* netif()accessor so that user code can subscribe to events (e.g. IP acquisition) or tweak DHCP/IPv6 settings.Motivation
esp_netif; directnetif_*calls are considered internal.esp_netifmakes it easier to:esp_event,Key changes
esp_netifinsideWireGuard::begin()and register it with lwIPesp_netif_t *netif()and a newbegin()overload that takes Subnet / GatewayTesting
Note on overlapping pull requests
I'm aware that some of the changes in this PR overlap with other pull requests that have already been submitted. If those PRs are merged first, I'm happy to re-base or split this patch so that only the remaining changes are applied.