esp_iot_framework  v0.2.1
© 2026 AmakeSasha, distributed under a license Apache-2.0
mDNS Extension

Network discovery and mDNS management. More...

Functions

const char * eif_get_mdns_hostname (void)
 Get the currently configured mDNS hostname. More...
 

Detailed Description

This module provides more advanced and low-level tools for working with mDNS.

Function Documentation

◆ eif_get_mdns_hostname()

const char* eif_get_mdns_hostname ( void  )

Returns the device network name used for local mDNS domain routing.

Warning
The returned pointer references the immutable internal configuration buffer owned by the core module. Do NOT attempt to explicitly free() this pointer, and do NOT modify its contents via type casting. Doing so will corrupt the core memory or cause an immediate hardfault.
Returns
const char*: Pointer to the null-terminated hostname string.

Example of use:

#include <esp_iot_framework_core_mdns.h>
void some_function(void) {
const char *hostname = eif_core_get_mdns_hostname();
if (hostname != NULL) {
// Use hostname...
} else {
// mDNS is disabled...
}
}