26 lines
1.1 KiB
C
26 lines
1.1 KiB
C
// File: include/net_mdns.h
|
|
#pragma once
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include "esp_err.h"
|
|
#include "mdns.h"
|
|
|
|
esp_err_t net_mdns_autostart_init(const char* hostname, const char* instance_name);
|
|
bool net_mdns_is_running(void);
|
|
bool net_mdns_wait_started(uint32_t timeout_ms);
|
|
esp_err_t net_mdns_add_service(const char* service, const char* proto,
|
|
uint16_t port, mdns_txt_item_t* txt, size_t txt_count);
|
|
|
|
bool net_mdns_find_service_url(const char* service, const char* proto,
|
|
int enforce_port, const char* txt_key, const char* txt_value,
|
|
uint32_t timeout_ms, int max_results,
|
|
char* url_out, size_t url_out_size);
|
|
|
|
void net_mdns_stop(void);
|
|
|
|
// --- NEU: Auto-Discover + NVS persistieren ---
|
|
esp_err_t net_mdns_autodiscover_and_store(const char *service, const char *proto,
|
|
int enforce_port,
|
|
const char *txt_key, const char *txt_value,
|
|
uint32_t timeout_ms);
|