On quinta-feira, 15 de setembro de 2016 15:56:46 PDT Gregg Reynolds wrote:
> > Not sure what you mean. Why do you think it is a bug?
> 
> The problem I hit was that I did not define a ROUTING_X macro in my app
> build (using makefiles).  (fwiw, why should I? bad doc!)  So my client code
> and the stack code had different ideas about the size of OCDevAddr.
> 
> Since one of EP or GW must be defined, "#ifdef EP || GW" is an error, in my
> view.  It should be sth like "#ifdef GW ... non-default  ... #else
> ...default ... ", no?
> 
> And actually if at least one must be defined why not just default to EP and
> *allow* GW?  Is it legal to be both?
>
> > All nodes must be routable, so disabling the functionality doesn't make
> > sense.
>
> #ifdef EP || GW already disables by default.
> 
> > > 3.  It looks to me like client build code should not need to specify a
> > > routing mode.  True?
> > 
> > Yes and no. It shouldn't have to choose: it's an EP.

Ah, I see what you mean.

Well, it's a legacy of how the feature was introduced. We weren't sure whether 
we were going to enable the new functionality, so it was possible to disable 
it completely. But then we decided that a node would always be routable, so I 
guess the case for both disabled bit-rotted. We should update the Scons files 
to remove such an option. You can also clean up the headers to assume that one 
of them is always defined.

I don't know if it's possible for a gateway to also serve as an endpoint. I 
don't see any reason why it shouldn't be, but we may never have tested.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

Reply via email to