Merge pull request #497 from rretanubun/make-mdns-console-kcconfig

feat(mdns): Make including mdns_console KConfig (IDFGH-11988)
This commit is contained in:
david-cermak
2024-03-20 09:39:34 +01:00
committed by GitHub
2 changed files with 13 additions and 1 deletions

View File

@ -4,6 +4,12 @@ else()
set(MDNS_NETWORKING "mdns_networking_lwip.c") set(MDNS_NETWORKING "mdns_networking_lwip.c")
endif() endif()
if(CONFIG_MDNS_ENABLE_CONSOLE_CLI)
set(MDNS_CONSOLE "mdns_console.c")
else()
set(MDNS_CONSOLE "")
endif()
idf_build_get_property(target IDF_TARGET) idf_build_get_property(target IDF_TARGET)
if(${target} STREQUAL "linux") if(${target} STREQUAL "linux")
set(dependencies esp_netif_linux esp_timer esp_system) set(dependencies esp_netif_linux esp_timer esp_system)
@ -11,7 +17,7 @@ if(${target} STREQUAL "linux")
else() else()
set(dependencies lwip console esp_netif) set(dependencies lwip console esp_netif)
set(private_dependencies esp_timer esp_wifi) set(private_dependencies esp_timer esp_wifi)
set(srcs "mdns.c" ${MDNS_NETWORKING} "mdns_console.c") set(srcs "mdns.c" ${MDNS_NETWORKING} ${MDNS_CONSOLE})
endif() endif()
idf_component_register( idf_component_register(

View File

@ -100,6 +100,12 @@ menu "mDNS"
help help
Enable for the library to log received and sent mDNS packets to stdout. Enable for the library to log received and sent mDNS packets to stdout.
config MDNS_ENABLE_CONSOLE_CLI
bool "Enable Command Line Interface on device console"
default y
help
Enable for the console cli to be available on the device.
config MDNS_RESPOND_REVERSE_QUERIES config MDNS_RESPOND_REVERSE_QUERIES
bool "Enable responding to IPv4 reverse queries" bool "Enable responding to IPv4 reverse queries"
default n default n