Hi Jihun Ha,

I think most people believe that RFC 6874 should be used in this case.  Can you 
please confirm that, upon applying a change, the properly escaped string 
bubbles up into a getHost return value?

Here is a gerrit changeset in development that fixes encoding of the IPv6 
address in the URI using RFC 6874.

https://gerrit.iotivity.org/gerrit/#/c/9419/

Regards,
David Antler


From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:iotivity-dev-boun...@lists.iotivity.org] On Behalf Of MyeongGi Jeong
Sent: Thursday, July 14, 2016 7:58 PM
To: Uze Choi <uzchoi at samsung.com>; 'Dave Thaler' <dthaler at microsoft.com>; 
Macieira, Thiago <thiago.macieira at intel.com>; Jihun Ha <jihun.ha at 
samsung.com>
Cc: iotivity-dev at lists.iotivity.org
Subject: Re: [dev] OcResource->getHost() api gives a tricky host address in 
Android

Hi, Uze.
The 'caipserver.c'  code chaged when Windows port branch merged.
You'd better ask to David Antler, Not Ashok.

Thank.
Best Regards,
---
MyeongGi Jeong
Principle Engineer, Software Architect
Software R&D Center, Samsung Electronics Co., Ltd.
+82-10-3328-1130 | +82-2-6147-7699


--------- Original Message ---------
Sender : ??? <uzchoi at samsung.com> S6(??)/??/IoT Lab(S/W??)/????
Date : 2016-07-15 11:27 (GMT+9)
Title : Re: [dev] OcResource->getHost() api gives a tricky host address in 
Android

This happens in the C++/C API also.

 C++:        OCResource.host()
  C :        OCDevAddr->addr

Ashok, Could you check it from CA layer?

BR, Uze Choi
-----Original Message-----
From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:iotivity-dev-boun...@lists.iotivity.org] On Behalf Of Dave Thaler via 
iotivity-dev
Sent: Friday, July 15, 2016 3:09 AM
To: Thiago Macieira; iotivity-dev at lists.iotivity.org; jihun.ha at samsung.com
Subject: Re: [dev] OcResource->getHost() api gives a tricky host address in 
Android

Correct.  Per RFC 6874, the % must be escaped as in:
coap://[fe80::dafe:e3ff:fe00:ebfa%25wlan0]:49593
(where %25 is the hex encoded version of '%')

> -----Original Message-----
> From: iotivity-dev-bounces at lists.iotivity.org [mailto:iotivity-dev-
> bounces at lists.iotivity.org] On Behalf Of Thiago Macieira
> Sent: Thursday, July 14, 2016 9:06 AM
> To: iotivity-dev at lists.iotivity.org; jihun.ha at samsung.com
> Subject: Re: [dev] OcResource->getHost() api gives a tricky host
> address in Android
>
> On quinta-feira, 14 de julho de 2016 15:03:22 PDT ??? wrote:
> > I'm trying to implement android sample application and found an
> > unexpected information from OcResource java object. (Upon a resource
> > is found in a given network, I can get a corresponding OcResource
> > object in my Android sample application) OcResource has an "getHost()"
> > API to get the found resource's address.
> > However, it returns a tricky information like
> > coap://[fe80::dafe:e3ff:fe00:ebfa%wlan0]:49593
> > Why is "wlan0" appended to IPv6 address? I tried this for IPv4
> > setting but I did not see such a string.
> > Is there any person who knows this happening?
>
> Yes. That's an IPv6 scope ID, though the URL is invalid. The % is not
> permitted there, even under RFC 6874.
>
> There's a bug in the getHost() function.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> _______________________________________________
> iotivity-dev mailing list
> iotivity-dev at lists.iotivity.org
> https://lists.iotivity.org/mailman/listinfo/iotivity-dev
_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev


[cid:image001.png at 01D1E01D.6B17F2A0]

[Image removed by sender.]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160717/e227e555/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ~WRD000.jpg
Type: image/jpeg
Size: 823 bytes
Desc: ~WRD000.jpg
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160717/e227e555/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 33527 bytes
Desc: image001.png
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160717/e227e555/attachment.png>

Reply via email to