Subject: Re: [core] .well-known/core examples

From: "Rahman, Akbar" <[email-masked]>
Date: Thu, 22 May 2014 17:48:58 -0400

Hi Sachin,

For your question: 

>When the client will get this response, since ip_address/hostname and
port number is missing from the URI reference, should client assume that
the host  is the machine sending the response back and port number is
the default coap port i.e. 5683?

You can see part of the answer  to your question in the 2nd paragraph of
http://tools.ietf.org/html/rfc6690#section-5 which was right before the
example 1 that you quoted.  Specifically, it says in that paragraph:

   Note that the default relation type for this

   link format is "hosts" in links with no rel= target attribute.  Thus,

   the links in this example tell that the Origin server from which

   /.well-known/core was requested (the context) hosts the resources

   /sensors/temp and /sensors/light (each a target).

In other words, this means that the resources 

</sensors/temp>,

</sensors/light>

are located at the "Uri-Host" and the "Uri-Port"  that the GET Request
was sent to (i.e. Origin Server).  These terms are defined in:

http://tools.ietf.org/html/draft-ietf-core-coap-18#section-5.10.1 

also it is instructive to look at:

http://tools.ietf.org/html/draft-ietf-core-coap-18#appendix-B

 

Best Regards,

Akbar

From: core [mailto:[email-masked]] On Behalf Of Agrawal, Sachin
Sent: Thursday, May 22, 2014 2:52 AM
To: [email-masked]
Subject: [core] .well-known/core examples

Hi All,

I am trying to understand the examples mentioned in RFC 6690 (Section
5).

1)

REQ: GET /.well-known/core

RES: 2.05 Content

</sensors/temp>;if="sensor",

</sensors/light>;if="sensor"

When the client will get this response, since ip_address/hostname and
port number is missing from the URI reference, should client assume that
the host  is the machine sending the response back and port number is
the default coap port i.e. 5683?

What happens if the client receives this response through a Proxy?

2)

Also, another client may send this response to above query too:

REQ: GET /.well-known/core

RES: 2.05 Content

<coap://192.168.1.25:9900/sensors/temp>;if="sensor",

<coap://192.168.1.25:9901/sensors/light>;if="sensor"

In above scenario, client will retrieve the hostname and port number
from the URI reference provided in the payload of Link Format. Please
confirm?

Thanks

Sachin

---

From: "Agrawal, Sachin" <[email-masked]>
Date: Fri, 23 May 2014 04:05:12 +0000

Hi Akbar,

Thanks for responding.

For resource discovery, "/.well-known/core" query will be send to default
CoAP port i.e 5683.

If the server hosts multiple resources on the same machine but at different
ports, how will this be conveyed to clients?

In short, does CoAP allows absolute URI in well-known responses?

RES: 2.05 Content

The keyword 'relative URI' in line in Section 2.2 of RFC 6690 is creating
confusion for me:

"The target URI MUST be a relative URI of the context URI for this relation
type."

Thanks

Sachin

---

From: "Rahman, Akbar" <[email-masked]>
Date: Fri, 23 May 2014 14:02:35 -0400

Hi Sachin,

>In short, does CoAP allows absolute URI in well-known responses?

Yes.  

I also find RFC 6690 terminology a bit dense and hard to follow.  But
there is a nice example in the RD draft that is similar (but not
identical) to the question that you are asking.  (The key point to note
is that queries to the RD results in a CoAP Response that contains a
list of links in Core Link Format).

http://tools.ietf.org/html/draft-ietf-core-resource-directory-01#section
-7

  Req: GET /rd-lookup/ep?et=power-node

   Res: 2.05 Content

   <coap://{ip:port}>;ep="node5",

   <coap://{ip:port}>;ep="node7"

And of course Zach/Carsten will quickly correct me if I have
misinterpreted any of the RFC/drafts!

Best Regards,

Akbar

From: Agrawal, Sachin [mailto:[email-masked]] 
Sent: Friday, May 23, 2014 12:05 AM
To: Rahman, Akbar
Cc: [email-masked]
Subject: RE: [core] .well-known/core examples

Hi Akbar,

Thanks for responding.

For resource discovery, "/.well-known/core" query will be send to
default CoAP port i.e 5683.

If the server hosts multiple resources on the same machine but at
different ports, how will this be conveyed to clients?

RES: 2.05 Content

The keyword 'relative URI' in line in Section 2.2 of RFC 6690 is
creating confusion for me:

"The target URI MUST be a relative URI of the context URI for this
relation type."

Thanks

Sachin