examples/mdnsd: Create an event-based starter for mDNS daemon#3543
Open
tmedicci wants to merge 1 commit into
Open
examples/mdnsd: Create an event-based starter for mDNS daemon#3543tmedicci wants to merge 1 commit into
tmedicci wants to merge 1 commit into
Conversation
Start the mDNS daemon based on the event of getting a new IP address for any of the system's network interfaces. This allows DHCP client to trigger the mDNS daemon after getting a new IP address, for instance. Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
eren-terzioglu
approved these changes
Jun 16, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Start the mDNS daemon based on the event of getting a new IP address for any of the system's network interfaces. This allows DHCP client to trigger the mDNS daemon after getting a new IP address, for instance.
Impact
Impact on user: Yes. Allow starting the mDNS daemon when a valid IP is available.
Impact on build: No.
Impact on hardware: No.
Impact on documentation: No.
Impact on security: No.
Impact on compatibility: No.
Testing
Taking
esp32p4-function-ev-board:ethernetas an example:Building
Running
Flash the device with
esptool:Then, detach the ethernet cable, reset the device, and check the device's serial terminal (with
picocom, for instance).Then, on NSH, set the hostname and start the
mdnsd_event:Then, attach the ethernet cable in a network that provides a DHCP server and, on NuttX, run
renew eth0to get a new IP address:Results
As soon as a new IP address is set to the
eth0, the mDNS daemon will start. Test it on the host PC: