On quarta-feira, 27 de julho de 2016 10:12:05 PDT ???(Uze Choi) wrote:
> [UZ] constructResourceObject(String host, String uri, connectivityTypeSet
> ...)  -->  constructResourceObject(<List> Endpoints {
> addr[MAX_ADDR_STR_SIZE], ifindex...} , ...) will resolve your concern.

I don't like this. This makes the API worse. If the ifindex can be stored in 
the URI in the form of ZoneID, why would we keep it outside? Passing a struct 
instead of a string also makes the API more cumbersome to use.

> So,
> We can exclude interface name from OCDecAddr->addr[].
>         typedef struct{
>             OCTransportAdapter      adapter;    /** adapter type.*/
>             OCTransportFlags        flags;              /** transport
> modifiers.*/ 
>             uint16_t                port;               /** for IP.*/
>             char                    addr[MAX_ADDR_STR_SIZE];    /** address
> for all adapters.*/ 
>             uint32_t                ifindex;    /** usually zero for
> default interface.*/ 
> } OCDevAddr;

I'm also ok with passing a list of OCDevAddr in the API instead of a list of 
URIs.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Reply via email to