Subject: [core] format of id and n link params

From: Peter Bigot <[email-masked]>
Date: Thu, 15 Jul 2010 21:42:04 -0500

In coap-01 section 6.1, the id link param is defined to have a value
conforming to "integer", but "integer" is not defined in the grammar in that
section, nor in RFC5234, nor in nottingham-http-link-header, that I can
find.

The descriptive text says "e.g. UUID", but UUIDs are rarely expressed in
text as (decimal) integers.

What is the structure of the id link parameter?  If it's an ASCII decimal
integer, is there a limit on its magnitude?

Similarly, "string" as used for the instance name link parameter should be
clarified.  Section 6.2 says it "can be considered the 'Instance' part of a
DNS-SD name", but that's not very rigorous.  If that's the intent,
cheshire-dnsext-dns-sd section 7.2 implies it has a 63-byte length
limitation, and if one follows the reference trail long enough, one might
conclude it's a "character-string" as defined in RFC1035 section 5.1.  But
I'm not sure that's what we want, as it allows arbitrary characters to
appear within double quotes, which might make tokenizing the link value
unnecessarily painful.

Peter

---

From: Peter Bigot <[email-masked]>
Date: Sat, 17 Jul 2010 12:46:40 -0500

In response to my own question, the following proposed clarifications:

I believe 6.2 needs to be more resolute about whether the n= attribute is
intended to be the "Instance" part of a DNS-SD name, and what to do about
non-default "Service" and "Domain" parts.  This has syntactic and semantic
impact.

Syntactically, if it is such a name, it technically may comprise 1 to 63
octets with values above 0x1f, including commas, semicolons, and dots.
Suggest providing a grammar rule for "string" that is more restricted in
allowed characters.  Perhaps:

    string         = 1*( ptokenchar | SP )

A length limitation is also required for its use in n=.

The current text of 6.2 suggests default values for "Service" and "Domain"
and implies different values may be provided, but does not describe how to
determine their presence or absence given that dot is a valid character
within a DNS label.  Suggest adding an attribute sd= which, if present, must
provide the "Service" and "Domain" per section 7 of
[I-D.cheshire-dnsext-dns-sd], excluding the terminating root label.  If
absent, the value of the sd= attribute is assumed to be "_coap._udp.local".
I hold no opinion on whether this should be split into sds= and sdd= to
allow independent specification of "Service" (default "_coap._udp") and
"Domain" (default "local").

For parmname, reference [I-D.reschke-rfc2231-in-http] or explicitly define
it:

     parmname      = 1*attr-char
     attr-char     = ALPHA / DIGIT
                   / "!" / "#" / "$" / "&" / "+" / "-" / "."
                   / "^" / "_" / "`" / "|" / "~"
                   ; token except ( "*" / "'" / "%" )

I suspect a length limitation SHOULD be suggested for parmname, as the
implementation must be able to use these as keys.

Suggest that id= be defined to have a value conforming to string, rather
like ETag in that it is not interpretable but different in that it is not
limited to 4 octets in length.  Unless there's a particular need for it to
be an integer for ordinal comparisons in some use case?

Peter