ESPHome 2026.1.0-dev
Loading...
Searching...
No Matches
mdns_host.cpp
Go to the documentation of this file.
2#if defined(USE_HOST) && defined(USE_MDNS)
3
6#include "esphome/core/log.h"
7#include "mdns_component.h"
8
9namespace esphome::mdns {
10
12#ifdef USE_MDNS_STORE_SERVICES
13#ifdef USE_API
15 char *mac_ptr = this->mac_address_;
16#else
17 char *mac_ptr = nullptr;
18#endif
19 this->compile_records_(this->services_, mac_ptr);
20#endif
21 // Host platform doesn't have actual mDNS implementation
22}
23
25
26} // namespace esphome::mdns
27
28#endif
void compile_records_(StaticVector< MDNSService, MDNS_SERVICE_COUNT > &services, char *mac_address_buf)
char mac_address_[MAC_ADDRESS_BUFFER_SIZE]
Fixed buffer for MAC address (only needed when services are stored)
StaticVector< MDNSService, MDNS_SERVICE_COUNT > services_
void get_mac_address_into_buffer(std::span< char, MAC_ADDRESS_BUFFER_SIZE > buf)
Get the device MAC address into the given buffer, in lowercase hex notation.
Definition helpers.cpp:704