Subject: [dnssd] service instance names

From: Tom Pusateri <[email-masked]>
Date: Mon, 16 Dec 2013 16:24:46 -0500

Quick question about service names:

RFC 6763 describes the general format of service instance names in Section 4.1:

Service Instance Name = <Instance> . <Service> . <Domain>

In looking at an example from an iPhone, I see:

934406fa._sub._apple-mobdev2._tcp.local.

Is the service _apple-mobdev2 and the instance 934406fa._sub?

Or is the service _sub._apple-mobdev2 and the instance 934406fa?

Are there any restrictions on service names like they can't contain a '.'?

Thanks,
Tom

---

From: Tom Pusateri <[email-masked]>
Date: Mon, 16 Dec 2013 16:38:44 -0500

Reading further it looks like RFC 6763 answers my question for me.

Instance names can contain '.'. Service names must only have two labels with the 2nd label being either _udp or _tcp.

So in my case, the instance name is 934406fa._sub and the service name is _apple-mobdev2._tcp

Thanks,
Tom

On Dec 16, 2013, at 4:24 PM, Tom Pusateri <[email-masked]> wrote:

> _______________________________________________
> dnssd mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/dnssd

---

From: Andrew Sullivan <[email-masked]>
Date: Mon, 16 Dec 2013 16:42:53 -0500

> Is the service _apple-mobdev2 and the instance 934406fa._sub?

My reading is that it's this one.  The _sub label is an indication of
subtyping of the service.  See section 7.1.

> Are there any restrictions on service names like they can't contain a '.'?

Well, they _won't_ contain a '.', except in the presentation format
where they always appear with a '.' (because the service name is two
labels long).  The labels in the service names are constructed out of
IANA-registered names for protocols and services, so I believe they'll
all be ASCII and will generally follow LDH+underscore rules.

The end of Section 7.1 is quite clear that the subtype string can
include any UTF-8 at all, which means that things like "_Andrew's ∆.
printers" are allowed.  The document isn't perfectly clear, but
presumably it wants the dot to be escaped in the same way that it
would be for Instances, documented in section 4.3.

Best regards,

A

-- 
Andrew Sullivan
[email-masked]

---

From: Kerry Lynn <[email-masked]>
Date: Mon, 16 Dec 2013 22:13:19 -0500

On Mon, Dec 16, 2013 at 4:42 PM, Andrew Sullivan <[email-masked]>wrote:

> Tom, I'm guessing this is the name (left side) of a PTR record.  The entire
substring "934406fa._sub._apple-mobdev2._tcp" is the <Service> part.
"934406fa" is a subtype of the "_apple-mobdev2" service type.  The
<Instance> part will be the value (right side) of the PTR record.  To
summarize, PTR records are identified by <Service>.<Domain> names
while SRV and TXT records are identified by <Instance>.<Service>.<Domain>
names.

> Right.  Service name format is discussed in RFC 2782.

> printers" are allowed.

To quote RFC 6763 section 7.1: "Subtype strings are not required to
begin with an underscore, though they often do."

> The document isn't perfectly clear, but
> I agree.

Regards, -K-