-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Allow dot in service name #64
Comments
Have you tried Just like stackoverflow please show the code and explain what is expected. |
Thanks for the support. I've stripped my tests down to the PTR-record for now. Yes, I have tried concatenating to the service name instead. new ServiceProfile("TST-PC", "_fmstoip-add._itxpt_http._tcp", 8085, new[] { IPAddress.Parse(cbIpAddresses.SelectedItem.ToString()) }); This results in such a PTR record:
In that case neither Avahi nor Bonjour sees the service while browsing. Whilst concatenating to the instance name... new ServiceProfile("TST-PC._fmstoip-add", "_itxpt_http._tcp", 8085, new[] { IPAddress.Parse(cbIpAddresses.SelectedItem.ToString()) }); ...results in such a PTR record:
In that case Avahi can show the service. But seemingly with the wrong name: Here is a 'good' PTR record from Avahi or Bonjour (they create the same PTR):
A 'working' publishing from Bonjour or Avahi would appear in The only obvious difference I see in net-mdns vs. Avahi|Bonjour is the Data length (net-mdns: 22, Avahi|Bonjour: 2). Why I can't say what I'm expecting yet: new ServiceProfile("TST-PC", "_itxpt_http._tcp", 8085, new[] { IPAddress.Parse(cbIpAddresses.SelectedItem.ToString()) }); ..then both Avahi and Bonjour do find the service. But as soon as I add a dot the instance name, Bonjour won't find the service at all. Avahi will, but with the wrong name as shown above. Could there be anything to the Data-length from net-mdns that confuses those clients? Sorry I'm not much of a help yet. |
The data length mismatch is most likely due to the Is it possible for you to attach the binary (or base-64 encoded) message sent by Bonjour? |
It's more than just "adding a dot". You are using DNS-SD subtypes, which was never implemented. I've now added subtype support in release v0.22.0. Try this var profile = new ServiceProfile(
"TST-PC", "_itxpt_http._tcp", 8085,
new[] { IPAddress.Parse(cbIpAddresses.SelectedItem.ToString()) });
profile.Subtypes.Add("_fmstoip-add"); Looking forward to see if this works! |
If it's subtypes, then I'm embarrassed to not have looked into the right rfc beforehand. But I'm not quite sure about the added
I can force Avahi to publish a subtype with that
And I'm glad you added support for that. But I fear that covers a different use case. Avahi publishes an extended instance name just like this: ..where the first parameter Binary pcap of Avahi publishing an extended instance name If you need the pcap dump from Bonjour, I'd like to send it to you through a private channel (Bonjour sends a bit too much of private info). |
I have to add: The subtype records would only be sent as a response to a QM specifically for that subtype. Rightfully so, but that doesn't make the service appear as |
I think the issue that net-mdns does not allow an This will also require changes to net-dns. |
Sorry I was out of reach last week. I finally found the cause of this issue after I had stripped down everything to just using net-dns and and .NET's Since this issue is remotely related to the solution from net-dns: |
I've just released v0.23.0 It contains the Thanks - Richard |
Of course! ServiceProfile z1 = new ServiceProfile("z1\\._test", "_soap._tcp", 5012); And the service does show up in both my clients (Avahi and Bonjour). Here is how Avahi discovers and resolves the published service:
I assume there is an issue with the host name in the SRV record. [edit] I moved my related discussion about it to #68 . In my opinion this specific issue (dot in instance name) is fixed and it can be closed now. |
In Bonjour, Avahi and a commit to Jmdns it is possible to not only have a typical service like:
instance._serviceType._protocol._domain
but also
instance._subinstance._serviceType._protocol._domain
I've tried that concatenation in net-mdns but then avahi won't resolve the service and Bonjour won't even find the published service (i.e. doesn't react to PTR or SRV). Upon investigation the domain-part in the PTR-record seems stripped.
In comparison that's how Bonjour advertises its service like this:
And Avahi advertises like this:
I'm gladly willing to make a PR as soon as I've figured out what causes any possibly malformed(?) packets. I've chased a lot of suspectations in
ServiceProfile()
but didn't really gain the understanding to successfully publish a serivce with a name likeTST-PC._fmstoip-add
. Can I kindly ask for any hint on this?The text was updated successfully, but these errors were encountered: