Subject: [6tisch] Coap URI-HOST

From: Xavier Vilajosana <[email-masked]>
Date: Thu, 8 May 2014 08:28:52 +0200

Hi,

yesterday we discussed about the use of URI-HOST field in the coap Header
when embedded in a wrapper IE. On Friday I will give details.

One of the questions we addressed is whether we need a URI-HOST option and
whether the coap Parser can operate without it. The context is that we want
to skip using it as we already know the source of the message from the MAC
layer header (6top is handling one hop negotiation).

>From CoAP 18 draft I extract the following:

Section 5.10.1
"The steps for parsing URIs into options is defined in Section
6.4<http://tools.ietf.org/html/draft-ietf-core-coap-18#section-6.4>
.

   These steps result in *zero* or more Uri-Host, Uri-Port, Uri-Path and
   Uri-Query Options being included in a request, where each option
   holds the following values:

   o  the Uri-Host Option specifies the Internet host of the resource

      being requested,"

Section 6.4

 The steps to parse a request's options from a string |url| are as
   follows.  These steps either result in *zero* or more of the Uri-Host,
   Uri-Port, Uri-Path and Uri-Query Options being included in the
   request, or they fail.

Then the parsing algorithm operates and checks the validity off the
URI-HOST option if it is present, the draft does not state anything in case
the URI-HOST is not present which fits well to the *ZERO *statement above.

regards,
Xavi

---

From: Carsten Bormann <[email-masked]>
Date: Thu, 8 May 2014 10:12:36 +0200

On 08 May 2014, at 08:28, Xavier Vilajosana <[email-masked]> wrote:

> One of the questions we addressed is whether we need a URI-HOST option and whether the coap Parser can operate without it. The context is that we want to skip using it as we already know the source of the message from the MAC layer header (6top is handling one hop negotiation).

(The Uri-Host option actually is about the destination of the message, to distinguish several servers that might share an IP address/port number.)

Indeed, CoAP was designed such that transmission of the Uri-Host option is optional.
In particular, you never need it if the information that it would transfer is already available from lower-layer addressing.

Grüße, Carsten