Re: [PR] netutils: add mDNS library support [nuttx-apps]
xiaoxiang781216 merged PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
xiaoxiang781216 commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2115806386 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,83 @@ +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 . + + 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 is copied to the usual netutils + include location and can be utilised be including it: + + #include + +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 DEFAULT_TASK_STACKSIZE + ---help--- + The default (4KiB) is adequate for simple networks but this will + most likely need to be increased if there are many network devices + attached that could 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. + +if NETUTILS_MDNS_DAEMON Review Comment: it's simple if you just have one item inside the condition block. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2115513824 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,83 @@ +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 . + + 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 is copied to the usual netutils + include location and can be utilised be including it: + + #include + +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 DEFAULT_TASK_STACKSIZE + ---help--- + The default (4KiB) is adequate for simple networks but this will + most likely need to be increased if there are many network devices + attached that could 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. + +if NETUTILS_MDNS_DAEMON Review Comment: I understand what you suggest, but it seems to me it ia just a different way of doing the same thing, not a "better" way? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2115810907 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,83 @@ +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 . + + 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 is copied to the usual netutils + include location and can be utilised be including it: + + #include + +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 DEFAULT_TASK_STACKSIZE + ---help--- + The default (4KiB) is adequate for simple networks but this will + most likely need to be increased if there are many network devices + attached that could 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. + +if NETUTILS_MDNS_DAEMON Review Comment: OK - there was more than 1 at one time, but there isn't now. It's sort of a moot point - there are other instances like this in the repo already, and it's not "wrong". But I will change it as it does seem neater. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
xiaoxiang781216 commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2115002731 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,83 @@ +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 . + + 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 is copied to the usual netutils + include location and can be utilised be including it: + + #include + +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 DEFAULT_TASK_STACKSIZE + ---help--- + The default (4KiB) is adequate for simple networks but this will + most likely need to be increased if there are many network devices + attached that could 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. + +if NETUTILS_MDNS_DAEMON Review Comment: here is my suggestion: ``` config NETUTILS_MDNS_DAEMON_STOP_SIGNAL int "Signal used to stop the MDNSD daemon" depends on NETUTILS_MDNS_DAEMON default 22 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2113623220 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,83 @@ +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 . + + 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 is copied to the usual netutils + include location and can be utilised be including it: + + #include + +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 DEFAULT_TASK_STACKSIZE + ---help--- + The default (4KiB) is adequate for simple networks but this will + most likely need to be increased if there are many network devices + attached that could 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. + +if NETUTILS_MDNS_DAEMON Review Comment: Does it still need a `depends on` even if though it's only presented as a result of the `if NETUTILS_MDNS_DAEMON`? Why is` depends on `preferable, please? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2113623220 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,83 @@ +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 . + + 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 is copied to the usual netutils + include location and can be utilised be including it: + + #include + +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 DEFAULT_TASK_STACKSIZE + ---help--- + The default (4KiB) is adequate for simple networks but this will + most likely need to be increased if there are many network devices + attached that could 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. + +if NETUTILS_MDNS_DAEMON Review Comment: Does it still need a `depends on` even if though it's only presented as a result of the `if NETUTILS_MDNS_DAEMON`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
xiaoxiang781216 commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2113378076 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,83 @@ +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 . + + 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 is copied to the usual netutils + include location and can be utilised be including it: + + #include + +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 DEFAULT_TASK_STACKSIZE + ---help--- + The default (4KiB) is adequate for simple networks but this will + most likely need to be increased if there are many network devices + attached that could 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. + +if NETUTILS_MDNS_DAEMON Review Comment: My mean let NETUTILS_MDNS_DAEMON_STOP_SIGNAL depends on NETUTILS_MDNS_DAEMON -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2112507570 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,83 @@ +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 . + + 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 is copied to the usual netutils + include location and can be utilised be including it: + + #include + +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 DEFAULT_TASK_STACKSIZE + ---help--- + The default (4KiB) is adequate for simple networks but this will + most likely need to be increased if there are many network devices + attached that could 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. + +if NETUTILS_MDNS_DAEMON Review Comment: > change to depends on But it is a `depends on` already? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
xiaoxiang781216 commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2112421035 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,83 @@ +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 . + + 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 is copied to the usual netutils + include location and can be utilised be including it: + + #include + +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 DEFAULT_TASK_STACKSIZE + ---help--- + The default (4KiB) is adequate for simple networks but this will + most likely need to be increased if there are many network devices + attached that could 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. + +if NETUTILS_MDNS_DAEMON Review Comment: change to depends on -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r211200 ## netutils/mdns/Kconfig: ## @@ -4,78 +4,80 @@ config LIB_MDNS ---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. + This external library is "unlicensed" using the methodology from Review Comment: Oops...hmmm...now I will have my usual battle with undoing squashed commits to get it right. Doh! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
xiaoxiang781216 commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2111997671 ## netutils/mdns/Kconfig: ## @@ -4,78 +4,80 @@ config LIB_MDNS ---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. + This external library is "unlicensed" using the methodology from Review Comment: please move all changes in netutils/mdns to the first patch -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2111567567 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,81 @@ +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 +ne run from nsh . + +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 is copied to the usual netutils +include location and can be utilised be including it: + +#include + +if LIB_MDNS + +config NETUTILS_MDNS_DAEMON +tristate "Allows mdns to be run as a daemon and started/stopped" +default n +select NETUTILS_MDNS +---help--- +The daemon wraps the mdns demo app as a daemon, so automatically +selects NETUTILS_MDNS + +if NETUTILS_MDNS_DAEMON Review Comment: Done ## netutils/mdns/Kconfig: ## @@ -0,0 +1,81 @@ +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 +ne run from nsh . + +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 is copied to the usual netutils +include location and can be utilised be including it: + +#include + +if LIB_MDNS + +config NETUTILS_MDNS_DAEMON +tristate "Allows mdns to be run as a daemon and started/stopped" +default n +select NETUTILS_MDNS Review Comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2111565743 ## netutils/mdns/Makefile: ## @@ -0,0 +1,110 @@ + +# netutils/mdns/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + + +include $(APPDIR)/Make.defs + +# mDNS application + + +# Flags + + +MDNS_URL ?= "https://github.com/mjansson/mdns/archive"; + +MDNS_VERSION = main +MDNS_ZIP = $(MDNS_VERSION).zip + +MDNS_UNPACKNAME = mdns +UNPACK ?= unzip -q -o + +VPATH += $(MDNS_UNPACKNAME) +VPATH += $(MDNS_UNPACKNAME)$(DELIM)posix +DEPPATH += --dep-path $(MDNS_UNPACKNAME) +DEPPATH += --dep-path $(MDNS_UNPACKNAME)$(DELIM)posix + +CFLAGS += -Wno-strict-prototypes -Wno-undef -Wno-format + +APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)netutils + + +# Targets + + +$(MDNS_ZIP): + @echo "Downloading: $(MDNS_URL)/$(MDNS_ZIP)" + $(Q) curl -O -L $(MDNS_URL)/$(MDNS_ZIP) + +$(MDNS_UNPACKNAME): $(MDNS_ZIP) + @echo "Unpacking: $(MDNS_ZIP) -> $(MDNS_UNPACKNAME)" + $(Q) $(UNPACK) $(MDNS_ZIP) + $(Q) mv mdns-$(MDNS_VERSION) $(MDNS_UNPACKNAME) +ifeq ($(CONFIG_NETUTILS_MDNS),) Review Comment: Have updated to always copy the file. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
xiaoxiang781216 commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2106272281 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,81 @@ +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 +ne run from nsh . + +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 is copied to the usual netutils +include location and can be utilised be including it: + +#include + +if LIB_MDNS + +config NETUTILS_MDNS_DAEMON +tristate "Allows mdns to be run as a daemon and started/stopped" +default n +select NETUTILS_MDNS +---help--- +The daemon wraps the mdns demo app as a daemon, so automatically +selects NETUTILS_MDNS + +if NETUTILS_MDNS_DAEMON + +config NETUTILS_MDNS_DAEMON_STOP_SIGNAL + int "Signal used to stop the MDNSD daemon" + default 22 + +endif + +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 + +There is also an example app (CONFIG_EXAMPLES_MDNSD) to allow the +mdns daemon to be tried via the NuttX shell. + +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 DEFAULT_TASK_STACKSIZE +---help--- +The default (4KiB) is adequate for simple networks but this will +most likely need to be increased if there are many network devices +attached that could send queries. + +config NETUTILS_MDNS_VERBOSE Review Comment: Ok -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2106158903 ## netutils/mdns/Makefile: ## @@ -0,0 +1,110 @@ + +# netutils/mdns/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + + +include $(APPDIR)/Make.defs + +# mDNS application + + +# Flags + + +MDNS_URL ?= "https://github.com/mjansson/mdns/archive"; + +MDNS_VERSION = main +MDNS_ZIP = $(MDNS_VERSION).zip + +MDNS_UNPACKNAME = mdns +UNPACK ?= unzip -q -o + +VPATH += $(MDNS_UNPACKNAME) +VPATH += $(MDNS_UNPACKNAME)$(DELIM)posix +DEPPATH += --dep-path $(MDNS_UNPACKNAME) +DEPPATH += --dep-path $(MDNS_UNPACKNAME)$(DELIM)posix + +CFLAGS += -Wno-strict-prototypes -Wno-undef -Wno-format + +APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)netutils + + +# Targets + + +$(MDNS_ZIP): + @echo "Downloading: $(MDNS_URL)/$(MDNS_ZIP)" + $(Q) curl -O -L $(MDNS_URL)/$(MDNS_ZIP) + +$(MDNS_UNPACKNAME): $(MDNS_ZIP) + @echo "Unpacking: $(MDNS_ZIP) -> $(MDNS_UNPACKNAME)" + $(Q) $(UNPACK) $(MDNS_ZIP) + $(Q) mv mdns-$(MDNS_VERSION) $(MDNS_UNPACKNAME) +ifeq ($(CONFIG_NETUTILS_MDNS),) Review Comment: Should we really be adding apps/netutils/mdns/mdns to the apps include path? I can't remember if disabling the demo app and daemon, then a make, will copy the header as needed. I'll check and if it doesn't, I will change it to always copy the file. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2106157782 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,81 @@ +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 +ne run from nsh . + +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 is copied to the usual netutils +include location and can be utilised be including it: + +#include + +if LIB_MDNS + +config NETUTILS_MDNS_DAEMON +tristate "Allows mdns to be run as a daemon and started/stopped" +default n +select NETUTILS_MDNS +---help--- +The daemon wraps the mdns demo app as a daemon, so automatically +selects NETUTILS_MDNS + +if NETUTILS_MDNS_DAEMON + +config NETUTILS_MDNS_DAEMON_STOP_SIGNAL + int "Signal used to stop the MDNSD daemon" + default 22 + +endif + +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 + +There is also an example app (CONFIG_EXAMPLES_MDNSD) to allow the +mdns daemon to be tried via the NuttX shell. + +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 DEFAULT_TASK_STACKSIZE +---help--- +The default (4KiB) is adequate for simple networks but this will +most likely need to be increased if there are many network devices +attached that could send queries. + +config NETUTILS_MDNS_VERBOSE Review Comment: Just to 100% check that you do mean `NETUTILS_MDNS_VERBOSE` in line 77? This is used in the patch script: ``` #if defined(MDNS_FUZZING) #define recvfrom(sock, buffer, capacity, flags, src_addr, addrlen) ((mdns_ssize_t)capacity) -#define printf +#endif +#if defined(MDNS_FUZZING) || !defined(CONFIG_NETUTILS_MDNS_VERBOSE) +#define printf(...) #endif ``` By the way - how do you quote the git changes with the + and -, in green, when you're reviewing? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
xiaoxiang781216 commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2106061765 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,81 @@ +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 +ne run from nsh . + +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 is copied to the usual netutils +include location and can be utilised be including it: + +#include + +if LIB_MDNS + +config NETUTILS_MDNS_DAEMON +tristate "Allows mdns to be run as a daemon and started/stopped" +default n +select NETUTILS_MDNS Review Comment: yes, it's better to depends on NETUTILS_MDNS ## netutils/mdns/Makefile: ## @@ -0,0 +1,110 @@ + +# netutils/mdns/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + + +include $(APPDIR)/Make.defs + +# mDNS application + + +# Flags + + +MDNS_URL ?= "https://github.com/mjansson/mdns/archive"; + +MDNS_VERSION = main +MDNS_ZIP = $(MDNS_VERSION).zip + +MDNS_UNPACKNAME = mdns +UNPACK ?= unzip -q -o + +VPATH += $(MDNS_UNPACKNAME) +VPATH += $(MDNS_UNPACKNAME)$(DELIM)posix +DEPPATH += --dep-path $(MDNS_UNPACKNAME) +DEPPATH += --dep-path $(MDNS_UNPACKNAME)$(DELIM)posix + +CFLAGS += -Wno-strict-prototypes -Wno-undef -Wno-format + +APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)netutils + + +# Targets + + +$(MDNS_ZIP): + @echo "Downloading: $(MDNS_URL)/$(MDNS_ZIP)" + $(Q) curl -O -L $(MDNS_URL)/$(MDNS_ZIP) + +$(MDNS_UNPACKNAME): $(MDNS_ZIP) + @echo "Unpacking: $(MDNS_ZIP) -> $(MDNS_UNPACKNAME)" + $(Q) $(UNPACK) $(MDNS_ZIP) + $(Q) mv mdns-$(MDNS_VERSION) $(MDNS_UNPACKNAME) +ifeq ($(CONFIG_NETUTILS_MDNS),) Review Comment: yes, I think either always copy the header file or add mdns to the search patch at the user site. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
xiaoxiang781216 commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2106061317 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,81 @@ +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 +ne run from nsh . + +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 is copied to the usual netutils +include location and can be utilised be including it: + +#include + +if LIB_MDNS + +config NETUTILS_MDNS_DAEMON +tristate "Allows mdns to be run as a daemon and started/stopped" +default n +select NETUTILS_MDNS +---help--- +The daemon wraps the mdns demo app as a daemon, so automatically +selects NETUTILS_MDNS + +if NETUTILS_MDNS_DAEMON + +config NETUTILS_MDNS_DAEMON_STOP_SIGNAL + int "Signal used to stop the MDNSD daemon" + default 22 + +endif + +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 + +There is also an example app (CONFIG_EXAMPLES_MDNSD) to allow the +mdns daemon to be tried via the NuttX shell. + +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 DEFAULT_TASK_STACKSIZE +---help--- +The default (4KiB) is adequate for simple networks but this will +most likely need to be increased if there are many network devices +attached that could send queries. + +config NETUTILS_MDNS_VERBOSE Review Comment: no code reference this symbol -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2105860904 ## netutils/mdns/Makefile: ## @@ -0,0 +1,110 @@ + +# netutils/mdns/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + + +include $(APPDIR)/Make.defs + +# mDNS application + + +# Flags + + +MDNS_URL ?= "https://github.com/mjansson/mdns/archive"; + +MDNS_VERSION = main +MDNS_ZIP = $(MDNS_VERSION).zip + +MDNS_UNPACKNAME = mdns +UNPACK ?= unzip -q -o + +VPATH += $(MDNS_UNPACKNAME) +VPATH += $(MDNS_UNPACKNAME)$(DELIM)posix +DEPPATH += --dep-path $(MDNS_UNPACKNAME) +DEPPATH += --dep-path $(MDNS_UNPACKNAME)$(DELIM)posix + +CFLAGS += -Wno-strict-prototypes -Wno-undef -Wno-format + +APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)netutils + + +# Targets + + +$(MDNS_ZIP): + @echo "Downloading: $(MDNS_URL)/$(MDNS_ZIP)" + $(Q) curl -O -L $(MDNS_URL)/$(MDNS_ZIP) + +$(MDNS_UNPACKNAME): $(MDNS_ZIP) + @echo "Unpacking: $(MDNS_ZIP) -> $(MDNS_UNPACKNAME)" + $(Q) $(UNPACK) $(MDNS_ZIP) + $(Q) mv mdns-$(MDNS_VERSION) $(MDNS_UNPACKNAME) +ifeq ($(CONFIG_NETUTILS_MDNS),) Review Comment: Well...if my logic is right, if you have the daemon you must have the demo app (CONFIG_NETUTILS_MDNS). If you just want to have the libary, you don't want the demo app: so then we copy the header. But, to be honest, we could just copy the header anyway? Originally I moved it unconditionally and used the patch to change the header file location in the unpacked mdns.c but then erred on the side of caution to make minimal changes with the patch? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2105860904 ## netutils/mdns/Makefile: ## @@ -0,0 +1,110 @@ + +# netutils/mdns/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + + +include $(APPDIR)/Make.defs + +# mDNS application + + +# Flags + + +MDNS_URL ?= "https://github.com/mjansson/mdns/archive"; + +MDNS_VERSION = main +MDNS_ZIP = $(MDNS_VERSION).zip + +MDNS_UNPACKNAME = mdns +UNPACK ?= unzip -q -o + +VPATH += $(MDNS_UNPACKNAME) +VPATH += $(MDNS_UNPACKNAME)$(DELIM)posix +DEPPATH += --dep-path $(MDNS_UNPACKNAME) +DEPPATH += --dep-path $(MDNS_UNPACKNAME)$(DELIM)posix + +CFLAGS += -Wno-strict-prototypes -Wno-undef -Wno-format + +APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)netutils + + +# Targets + + +$(MDNS_ZIP): + @echo "Downloading: $(MDNS_URL)/$(MDNS_ZIP)" + $(Q) curl -O -L $(MDNS_URL)/$(MDNS_ZIP) + +$(MDNS_UNPACKNAME): $(MDNS_ZIP) + @echo "Unpacking: $(MDNS_ZIP) -> $(MDNS_UNPACKNAME)" + $(Q) $(UNPACK) $(MDNS_ZIP) + $(Q) mv mdns-$(MDNS_VERSION) $(MDNS_UNPACKNAME) +ifeq ($(CONFIG_NETUTILS_MDNS),) Review Comment: Well...if my logic is right, if you have the daemon you must have the demo app (CONFIG_NETUTILS_MDNS). If you just want to have the libary, you don't want the demo app: so then we copy the header. And, for the daemon, the heaser is included as the "local" instance: `#include "netutils/mdnsd.h"` But, to be honest, we could just copy the header anyway? Originally I moved it unconditionally and used the patch to change the header file location in the unpacked mdns.c but then erred on the side of caution to make minimal changes with the patch? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2105858227 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,81 @@ +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 +ne run from nsh . + +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 is copied to the usual netutils +include location and can be utilised be including it: + +#include + +if LIB_MDNS + +config NETUTILS_MDNS_DAEMON +tristate "Allows mdns to be run as a daemon and started/stopped" +default n +select NETUTILS_MDNS +---help--- +The daemon wraps the mdns demo app as a daemon, so automatically +selects NETUTILS_MDNS + +if NETUTILS_MDNS_DAEMON + +config NETUTILS_MDNS_DAEMON_STOP_SIGNAL + int "Signal used to stop the MDNSD daemon" + default 22 + +endif + +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 + +There is also an example app (CONFIG_EXAMPLES_MDNSD) to allow the +mdns daemon to be tried via the NuttX shell. + +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 DEFAULT_TASK_STACKSIZE +---help--- +The default (4KiB) is adequate for simple networks but this will +most likely need to be increased if there are many network devices +attached that could send queries. + +config NETUTILS_MDNS_VERBOSE Review Comment: Sorry - don't follow you? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
TimJTi commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2105857460 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,81 @@ +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 +ne run from nsh . + +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 is copied to the usual netutils +include location and can be utilised be including it: + +#include + +if LIB_MDNS + +config NETUTILS_MDNS_DAEMON +tristate "Allows mdns to be run as a daemon and started/stopped" +default n +select NETUTILS_MDNS Review Comment: Because it simply spawns the built in "demo" so you can't have the daemon without the demo app registered as an app - or, at least, it seemed to need it for me?. But, perhaps it should be a "depends on" instead? ## netutils/mdns/Kconfig: ## @@ -0,0 +1,81 @@ +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 +ne run from nsh . + +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 is copied to the usual netutils +include location and can be utilised be including it: + +#include + +if LIB_MDNS + +config NETUTILS_MDNS_DAEMON +tristate "Allows mdns to be run as a daemon and started/stopped" +default n +select NETUTILS_MDNS +---help--- +The daemon wraps the mdns demo app as a daemon, so automatically +selects NETUTILS_MDNS + +if NETUTILS_MDNS_DAEMON Review Comment: Agreed 👍 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
Re: [PR] netutils: add mDNS library support [nuttx-apps]
xiaoxiang781216 commented on code in PR #3081: URL: https://github.com/apache/nuttx-apps/pull/3081#discussion_r2105851272 ## netutils/mdns/Kconfig: ## @@ -0,0 +1,81 @@ +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 +ne run from nsh . + +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 is copied to the usual netutils +include location and can be utilised be including it: + +#include + +if LIB_MDNS + +config NETUTILS_MDNS_DAEMON +tristate "Allows mdns to be run as a daemon and started/stopped" +default n +select NETUTILS_MDNS +---help--- +The daemon wraps the mdns demo app as a daemon, so automatically +selects NETUTILS_MDNS + +if NETUTILS_MDNS_DAEMON + +config NETUTILS_MDNS_DAEMON_STOP_SIGNAL + int "Signal used to stop the MDNSD daemon" + default 22 + +endif + +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 + +There is also an example app (CONFIG_EXAMPLES_MDNSD) to allow the +mdns daemon to be tried via the NuttX shell. + +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 DEFAULT_TASK_STACKSIZE +---help--- +The default (4KiB) is adequate for simple networks but this will +most likely need to be increased if there are many network devices +attached that could send queries. + +config NETUTILS_MDNS_VERBOSE Review Comment: remove, no user? ## netutils/mdns/Makefile: ## @@ -0,0 +1,110 @@ + +# netutils/mdns/Makefile +# +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# + + +include $(APPDIR)/Make.defs + +# mDNS application + + +# Flags + + +MDNS_URL ?= "https://github.com/mjansson/mdns/archive"; + +MDNS_VERSION = main +MDNS_ZIP = $(MDNS_VERSION).zip + +MDNS_UNPACKNAME = mdns +UNPACK ?= unzip -q -o + +VPATH += $(MDNS_UNPACKNAME) +VPATH += $(MDNS_UNPACKNAME)$(DELIM)posix +DEPPATH += --dep-path $(MDNS_UNPACKNAME) +DEPPATH += --dep-path $(MDNS_UNPACKNAME)$(DELIM)posix + +CFLAGS += -Wno-strict-prototypes -Wno-undef -Wno-format + +APPS_INCDIR = $(APPDIR)$(DELIM)include$(DELIM)netutils + +###
