Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for subtypes, serviceDomain, parentDomain and instance #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wesleytodd
Copy link

See #2, #3, #5.

I tried to make this NOT a re-write, but clearly did not succeed :)

Let me know what you think!

@mafintosh
Copy link
Owner

I'll refer this to my local mdns advisor, @watson.

@watson watson self-assigned this Jan 5, 2016
@wesleytodd wesleytodd force-pushed the v2.0.0 branch 2 times, most recently from 2d625ac to 88bc4ff Compare January 6, 2016 03:18
@wesleytodd
Copy link
Author

Ok, so some of the changes I made here are actually causing more changes for the PR to this: watson/bonjour#1

If @watson is alright with that that it will be alright to merge this, but lets wait on this until I can integrate there and @watson approves, sound good? :)

@watson
Copy link
Collaborator

watson commented Jan 8, 2016

@wesleytodd The stringify function shouldn't take more than a single optional sub-type.

If a service have two sub-types it should be advertised as 3 different PTR records. E.g. a tcp http service Named Foo with the subtypes "Bar" and "Baz" will generate the following PTR records:

  • _http._tcp.local. PTR Foo._http._tcp.local.
  • Bar._sub._http._tcp.local. PTR Foo._http._tcp.local.
  • Baz._sub._http._tcp.local. PTR Foo._http._tcp.local.

So a single record do never contain all of the sub-types.

@wesleytodd
Copy link
Author

@watson Totally forgot about that conversion we had. Agreed and will add that to my list of changes!

@watson
Copy link
Collaborator

watson commented Jan 9, 2016

@wesleytodd ups, messed up the PTR records above - the instance name is of cause not part of the PTR record names. I've updated the comment to show the full PTR records

@watson
Copy link
Collaborator

watson commented Jan 9, 2016

@wesleytodd the general rule is that you should be able to take the output parse() and give as input to stringify() and vice-versa.

Also, parse() should be able to parse the following strings:

  • _http._tcp.local.
  • _http._tcp.example.com.
  • _http._tcp.Xyz.example.com.
  • Foo\.Bar\\ Baz._http._tcp.local.
  • Foo\.Bar\\ Baz._http._tcp.example.com.
  • Foo\.Bar\\ Baz._http._tcp.Xyz.example.com.
  • Foo\.Bar\\ Baz._sub._http._tcp.local.
  • Foo\.Bar\\ Baz._sub._http._tcp.example.com.
  • Foo\.Bar\\ Baz._sub._http._tcp.Xyz.example.com.

Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants