Thiago,

The code does indeed pull out the zone ID and zero it before converting so the 
length is predictable.

Of course, the zone ID is restored after converting back to binary.

John

-----Original Message-----
From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:[email protected]] On Behalf Of Thiago Macieira
Sent: Thursday, November 05, 2015 1:32 PM
To: iotivity-dev at lists.iotivity.org
Subject: Re: [dev] Pre-defined length for the Host Info. is not long enough

On Thursday 05 November 2015 16:00:46 Light, John J wrote:
> Jay,
> 
> Please provide more information about your issue.  I originally wrote 
> the data structures you are talking about, and I am concerned there 
> might be a larger problem now.

> The host address field should only contain the address string itself.  
> The longest of these is a full IPv6 address:
> ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff, which is 39 bytes long, plus one
> for a terminating null.   What other information are you seeing in the
> string?

The ZoneID might be added to that, which is one percent sign followed by a zone 
ID of platform-specific length limit. On Linux, that's IFNAMESIZ (16 bytes), 
but on Windows I've seen a full UUID, including the curly braces, added there.

Unless the ZoneID is removed from the address and placed in a separate scope ID 
/ interface index variable in the structure. There is such a field in 
CAEndpoint_t, so the only question is whether the called properly split the 
address+zoneid and filled in the fields correctly.

--
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

Reply via email to