ESPHome 2026.8.0-dev
Loading...
Searching...
No Matches
mdns_zephyr.cpp
Go to the documentation of this file.
2#if defined(USE_ZEPHYR) && defined(USE_MDNS)
3
4#include "mdns_component.h"
5
6namespace esphome::mdns {
7
8#ifdef USE_MDNS_STORE_SERVICES
9// Zephyr has no local IP mDNS responder. When a consumer (ex. the OpenThread SRP
10// client) enables service storage, it reads the compiled records via get_services()
11// and advertises them itself. We only need to compile and store the records here.
12static void register_zephyr(MDNSComponent *, StaticVector<MDNSService, MDNS_SERVICE_COUNT> &) {}
13
14void MDNSComponent::setup() { this->setup_buffers_and_register_(register_zephyr); }
15#else
16// No responder and nothing consuming the records, so skip the boot-time compile.
18#endif
19
21
22} // namespace esphome::mdns
23
24#endif // USE_ZEPHYR && USE_MDNS
void setup_buffers_and_register_(PlatformRegisterFn platform_register)