forked from esp8266/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ESP8266mDNS: support AP and STA interfaces at once
Bind the UDP connection to IP_ADDR_ANY rather than a specific interface IP, so that it can receive queries from all interfaces at once. When processing a query, detect which interface it was received on, and pass this information to the reply code. Set the IP multicast interface before each transmission, so that we can route each packet to a different interface if required. These changes enable the code to respond correctly on both AP and STA interfaces at once. The original code only worked correctly for the STA interface if both were enabled. When advertizing all services, do it on both AP and STA interfaces if they're both enabled. Provide an API for the application to notify the MDNS code if the AP configuration changes (enabled, disabled, IP changed). Ideally, the WiFi core would provide an event callback for this purpose, as it does for STA changes, but it does not appear to, so the application must provide this information.
- Loading branch information
Showing
2 changed files
with
40 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters