[Ns-developers] olsr rework

Gustavo Carneiro gjcarneiro at gmail.com
Wed Apr 1 10:03:52 PDT 2009


2009/3/23 Mathieu Lacage <mathieu.lacage at sophia.inria.fr>

> hi,
>
> As a preparation for the ipv4 rework for next release, I did a first set
> of changes to olsr to move the call to Ipv4::AddRoutingProtocol from the
> olsr-agent-impl.cc file to olsr-helper.cc. What has changed:
>
> 1) removed olsr::Agent
> 2) renamed olsr::AgentImpl to olsr::RoutingProtocol
> 3) made olsr::RoutingProtocol derive from Ipv4RoutingProtocol instead of
> olsr::Agent
>
> There was an ipv4 memory management bug to fix to make the above simple
> file shuffling work which I pushed to ns-3-dev earlier today. This tree
> (http://code.nsnam.org/mathieu/ns-3-olsr) passes all regression tests
> and is API compatible. I am not really looking forward merging this now
> because I don't really want to handle any potential fallouts (although I
> am convinced there won't be any) but, I would like feedback to be ready
> to merge this as soon as our next release ships.
>
> Gustavo ?


I am not sure I agree with:

http://code.nsnam.org/mathieu/ns-3-olsr/rev/9e9c734b927e

It's true that Closing a socket is a good idea.  But it's also true that
calling Dispose () on all pointer-to-Object members is conceptually a good
idea.  I do not know whether the socket objects contain references to other
objects which could create a cycle back to me, nor do I know whether calling
Socket::Close would clear those references.  I can find that out by peeking
into the udp socket implementation, but clearly it is safer to just call
Dispose anyway, just in case.

Otherwise, no objections from me.

-- 
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert


More information about the Ns-developers mailing list