feat(mdns): Add configuration to enable/disable mDNS

This commit is contained in:
Dong Heng
2018-10-11 14:11:45 +08:00
parent f6166d555e
commit 6ab1ff4b36
7 changed files with 16 additions and 3 deletions

View File

@ -1,6 +1,6 @@
set(COMPONENT_SRCS "mdns.c"
"mdns_console.c"
"mdns_networking.c")
set(COMPONENT_SRCS "src/mdns.c"
"src/mdns_console.c"
"src/mdns_networking.c")
set(COMPONENT_ADD_INCLUDEDIRS "include")
set(COMPONENT_PRIV_INCLUDEDIRS "private_include")
set(COMPONENT_REQUIRES lwip mbedtls console tcpip_adapter)

View File

@ -1,9 +1,17 @@
menu "mDNS"
config ENABLE_MDNS
bool "Enable mDNS"
default n
select LWIP_IPV6
help
Enable this option and then mDNS is to be used.
config MDNS_MAX_SERVICES
int "Max number of services"
range 1 64
default 10
depends on ENABLE_MDNS
help
Services take up a certain amount of memory, and allowing fewer
services to be open at the same time conserves memory. Specify

View File

@ -1,2 +1,6 @@
COMPONENT_ADD_INCLUDEDIRS := include
COMPONENT_PRIV_INCLUDEDIRS := private_include
ifdef CONFIG_ENABLE_MDNS
COMPONENT_SRCDIRS := src
endif

View File

@ -0,0 +1 @@
CONFIG_ENABLE_MDNS=y