Add configurable Wi-Fi station mDNS hostname support. Mini-Feature #1
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/* SPDX-License-Identifier: GPL-3.0-only */
|
||||
/* Versioned persistent configuration for the station mDNS hostname. */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "esp_err.h"
|
||||
|
||||
#define MDNS_CONFIG_SCHEMA_VERSION 1U
|
||||
#define MDNS_CONFIG_BLOB_SIZE 64U
|
||||
#define MDNS_CONFIG_SUFFIX_MAX_LEN 55U
|
||||
#define MDNS_CONFIG_NVS_NAMESPACE "mdns_cfg"
|
||||
#define MDNS_CONFIG_NVS_BLOB_KEY "config"
|
||||
|
||||
typedef struct {
|
||||
uint32_t schema_version;
|
||||
uint16_t blob_size;
|
||||
uint8_t suffix_len;
|
||||
uint8_t reserved;
|
||||
char suffix[MDNS_CONFIG_SUFFIX_MAX_LEN + 1U];
|
||||
} mdns_config_t;
|
||||
|
||||
void mdns_config_defaults(mdns_config_t *config);
|
||||
esp_err_t mdns_config_validate(const mdns_config_t *config);
|
||||
esp_err_t mdns_config_load(mdns_config_t *config, bool *used_stored_config);
|
||||
esp_err_t mdns_config_save(const mdns_config_t *config);
|
||||
esp_err_t mdns_config_reset_storage(void);
|
||||
Reference in New Issue
Block a user