I will get it working in the way I need it (basic mDNS response to resolve a .local address for an appliance) and then submit it. It might benefit from a NuttX-specific example app to make it easier to understand for dimwits like me, so would include that too. With documentation :-)

On 13/05/2025 19:14, Alan C. Assis wrote:
Hi Tim,

I think everything that speeds up NuttX users development and makes user
experience easy is welcome!

Please also include some basic Documentation/ explaining how to test it on
NuttX.

BR,

Alan

On Tue, May 13, 2025 at 3:07 PM Tim Hardisty <timhardist...@gmail.com>
wrote:

I have it working as a downloaded 3rd party utility, currently into my
own personal Apps space rather than nuttx-apps. Would there be any
benefit to others if I move it to apps/netutils and submit it as a PR?
It works "out of the box" as a NuttX app or library, depending on
Kconfig settings as per Xiang Xiao's links to open-vela.

On 13/05/2025 15:20, Tim Hardisty wrote:
FANTASTIC - thanks Xiang Xiao. I love learning how to do things and
even better when I don't really have to do anything :-)

On 13/05/2025 14:27, Xiang Xiao wrote:
On Tue, May 13, 2025 at 8:07 PM Tim Hardisty <timhardist...@gmail.com>
wrote:

See Greg's response below which didn't make it to the list.

See comments inline below.

On 13/05/2025 03:13, Gregory Nutt wrote:
On 5/12/2025 11:54 AM, Tim Hardisty wrote:
I am adding mDNS/DNS-SD query responder software to my project to
allow my NuttX "appliance" to be identified as a ".local" device on
the network.

It is using public domain software here:
https://github.com/mjansson/mdns

Firstly: would this be best done as part of the kernel under the
CONFIG_NET umbrella; or as an app as a NETUTILS feature?
We have done the porting before, you can use it from here directly:
https://github.com/open-vela/external/tree/dev/mdns
https://github.com/open-vela/external_mdns

If it uses *only* standard applications interfaces, to the OS then it
is an application and should not be inside the OS.  This is for
modularity and security reasons.  If it uses both standardized
application interfaces and internal OS interfaces, then it belongs in
libs/.  If it uses *only* OS interfaces then it might be part of
the OS.

NOTE that OS and applications use a different set of interfaces with
difference calling rules from application space.  It is not portable
between the either of the two contexts without some additional
complexity and a fairly deep understanding of the OS interfaces.

Noted: but, all things being equal, would mDNS/DNS-SD be "better" in
the
OS or as an App (daemon)?

it should belong to the apps folder which is a normal library calling
POSIX
API.


Secondly: my read of the PD license is that there would be no problem
plundering the necessary code and submitting it as a NuttX feature.
Does anyone disagree - for example is an Apache license of what was
public domain software not a good/nice/allowed thing? I assume it
would be good to include a link to the original work somewhere or
other?
The ASF defines some very strict rules for the inclusion of 3rd part
code.  Make sure that any thing you want conforms to:

    * https://www.apache.org/legal/resolved.html (official version)
    * https://www.apache.org/legal/3party.html (previous version)

Thanks for the links. The original code is tagged as being under the
"unlicense.org" rules and has the necessary disclaimers I think Apache
will want.

I may end up just using the PD code as inspiration and write my own
version, in which the "problem" goes away. Otherwise I will submit as a
draft PR and will see what others have to say - the question can be
submitted if needed to the Apache folk. But I'm a way away from being
ready for that anyway!

It's fine not adding the source code to repo directly, but
downloading the
code on demand, like many other 3rd party project:
https://github.com/apache/nuttx-apps/tree/master/benchmarks/coremark

Reply via email to