[Ns-developers] Ipv4::FindInterfaceForXXX ?

craigdo@ee.washington.edu craigdo at ee.washington.edu
Tue May 27 12:06:41 PDT 2008


> While trying to use Ipv4::FindInterfaceForXXX, it occured to me that
> each of the 3 methods has a different behavior with regard to what
> happens when the requested interface is not found: one asserts, the
> other calls NS_FATAL_ERROR, and the last one returns -1.
> 
> Would it be a problem if I made them all return -1 ?

I was just going to type +1, but the thought of how to interpret that made
me smile (+1 in response to returning -1 :-).

Anyway, In this case I think returning an error code is the right thing to
do.

-- Craig




More information about the Ns-developers mailing list