mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
CONFIG_NETUTILS_MDNS_STACKSIZE defaulted to DEFAULT_TASK_STACKSIZE, which resolves to as little as 2KiB on some targets. The bundled mjansson responder uses a deeper stack than that (DNS record parsing with name decompression, plus the send/receive buffers) and overflows on startup, taking the board down with a hardfault before it answers a single query. Default to 8KiB, the value that reliably runs the responder, and correct the help text, which previously claimed a 4KiB default that did not match DEFAULT_TASK_STACKSIZE. Assisted-by: Claude (Anthropic Claude Code) Signed-off-by: Ricard Rosson <ricard@groundbits.com>
81 lines
2.4 KiB
Text
81 lines
2.4 KiB
Text
config LIB_MDNS
|
|
bool "MDNS library"
|
|
default n
|
|
---help---
|
|
Enable the mDNS library. This allows calls to the library to be made.
|
|
|
|
This external library is "unlicensed" using the methodology from
|
|
http://unlicense.org
|
|
|
|
You should be sure that this license is acceptable for your usage.
|
|
|
|
By default, the "built-in" demo is added as an application that can
|
|
be run from nsh <mdns>.
|
|
|
|
This is also needed for the optional daemon that allows the demo
|
|
app's mDNS functionality to be started and stopped from user
|
|
applications. There is an associated example app
|
|
(CONFIG_EXAMPLES_MDNSD) to allow the daemon to be tried from nsh.
|
|
|
|
Ultimately, this should be used simply as a library, and neither the
|
|
demo app nor the daemon utilised. If just built as a library,the
|
|
relevant header file <mdns.h> is copied to the usual netutils
|
|
include location and can be utilised be including it:
|
|
|
|
#include <netutils/mdns.h>
|
|
|
|
if LIB_MDNS
|
|
|
|
config NETUTILS_MDNS
|
|
tristate "Enable mdns built-in demo app"
|
|
default n
|
|
---help---
|
|
Enable the author's original built-in MDNS demo app. This allows the
|
|
functionality of the library to be demonstrated. Information on using
|
|
it is available from the original git repo for this external library:
|
|
|
|
https://github.com/mjansson/mdns
|
|
|
|
if NETUTILS_MDNS
|
|
|
|
config NETUTILS_MDNS_PROGNAME
|
|
string "mDNS program name"
|
|
default "mdns"
|
|
---help---
|
|
This is the name of the program that will be used when the NSH ELF
|
|
program is installed.
|
|
|
|
config NETUTILS_MDNS_PRIORITY
|
|
int "mDNS task priority"
|
|
default 100
|
|
|
|
config NETUTILS_MDNS_STACKSIZE
|
|
int "mDNS stack size"
|
|
default 8192
|
|
---help---
|
|
Stack size for the mDNS responder task. 8KiB is adequate for
|
|
typical networks; increase it if many network devices send
|
|
queries.
|
|
|
|
config NETUTILS_MDNS_VERBOSE
|
|
bool "Enable verbose printf output from built-in mdns demo"
|
|
default y
|
|
endif
|
|
|
|
config NETUTILS_MDNS_DAEMON
|
|
tristate "Wrap mdns demo app as a daemon, which can be started/stopped"
|
|
default n
|
|
depends on NETUTILS_MDNS
|
|
---help---
|
|
This option wraps the mdns demo app as a daemon, so requires
|
|
CONFIG_NETUTILS_MDNS to be selected.
|
|
|
|
There is also an example app (CONFIG_EXAMPLES_MDNSD) to allow the
|
|
mdns daemon to be started/stopped via the NuttX shell.
|
|
|
|
config NETUTILS_MDNS_DAEMON_STOP_SIGNAL
|
|
int "Signal used to stop the MDNSD daemon"
|
|
default 22
|
|
depends on NETUTILS_MDNS_DAEMON
|
|
|
|
endif #NETUTILS_MDNS
|