[Ns-developers] ns-3 node draft proposal
Gustavo Carneiro
gjcarneiro at gmail.com
Mon Nov 13 04:00:52 PST 2006
Hi Mathieu,
For now I only have a couple of comments, then we'll see... :)
On 11/13/06, Mathieu Lacage <Mathieu.Lacage at sophia.inria.fr> wrote:
>
> hi all,
>
> Based on the 'ns-3 design' document, I have put together a draft
> proposal with sample scenarios, a small rationale document and some
> sample headers. If you think that some really important use-cases or
> constraints have not been taken into account, I think that it would be
> nice to comment on this now.
>
> Any kind of feedback, positive or negative, is welcome.
** Comment #1:
I just had a glance at the simple-router.cc example and saw this:
class EthernetTopologyFactory
{
[...]
template <typename T>
uint32_t AddInterface (T *node, EthernetCable *cable);
[...]
Can we please refrain from using templates so much? Why is T a templated
typename, why can't it be simply NodeBase?
** Comment #2:
About the sockets API:
" This class has not been designed yet but I expect that the Tcp socket
API is split in two classes, TcpServerSocket and TcpClientSocket, in
a way similar to the design of the java socket API where sockets
listening for incoming connections are called ServerSocket: they can
then create any number of ClientSockets from the incoming connections
once they have been accepted."
Unless I'm confusing something, doesn't the design document talk about
implementing a POSIX sockets API? I thought the idea was to implement
POSIX sockets in order to facilitate writing protocols that can be easily
ported to/from regular POSIX operating systems, such as Linux and *BSD.
** Comment #3 (well, so I lied, it's 3 comments :D)
"For brevity and clarity, all examples in this document omit to use the
ns3::ptr template smart pointer class but I assume that it is used
everywhere so, memory-management issues are somewhat simplified."
This ns3::ptr smart pointer sounds interesting. I was going to suggest
something along those lines myself. However, I can't find it anywhere. But
I would expect a smart pointer would perform reference counting
transparently in the background, and so I would expect a standard Object
base class for everything that can have a refence count (and so would have a
refcount member)... Could shed some light on your plans for this?
Thanks and regards,
--
Gustavo J. A. M. Carneiro
"The universe is always one step beyond logic."
More information about the Ns-developers
mailing list