mdnsd
mdnsd copied to clipboard
Explain `mdnsctl publish` behaviour more fully in manpage
The manpage gives a brief example of using mdnsctl
to publish a service. The example is perhaps a little too brief.
From the name, and from the (of course, only roughly standardised) behaviour of other fooctl
tools on various unixes, I expected that the mdnsctl publish
command would communicate with the running daemon, adjust its configuration, and exit. The manpage, and its publish
example, did not make me think otherwise. When I saw the process ‘hanging’, I went to the mdnsctl
source to confirm that the main()
did indeed intend to be in a forever-loop.
Looking at closed issue #6 , I can see that I am not the only one to be confused about this.
It would be good if the manpage (i) gave a slightly fuller explanation, which mentioned that the process is supposed to ‘hang’, that (ii) it's useful to redirect the output, and that (iii) there will indeed be one process per published service, by design.
I played with this a bit, and managed to publish SMB shares with mdnsctl
. It worked when using VLC on Linux to use the published shares. The commands I used for this were:
# For mDNS
# (Using a service name with a space character in it didn't work for VLC discovery)
doas mdnsctl publish "my-smb" _smb tcp 445 ""
# For ZeroConf
doas mdnsctl publish "my smb" smb tcp 445 ""
The manpage gives a brief example of using mdnsctl to publish a service. The example is perhaps a little too brief.
I agree, I'm accepting diffs for the manpage. I've been busy with life/work lately and didn't have much time to put into mdnsd, but soon I will.
I'll nag you again when my own issue lists are of zero length (translation: no rush!)