[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Conversion to OPNET



>
> From:  [email protected] (Ghani Nasir NRC/Boston)
> To:    [email protected] (ns-users)
> Subject: Conversion to OPNET
> Date:  Tue, 10 Feb 1998 19:39:03 PST
>
> 
> Dear Sir/Madam:
> 
> I just had a quick question regarding converting the NS-2 TCP code to OPNET.
> OPNET uses a C-type syntax, and is a good environment for simulation.  Howeve
r,
> their provided TCP module is proving very difficult to use, much less modify,
 and
> hence I would like to cast the NS-2 code into OPNET form.
> 
> Just a few questions, if you can help me, i would be highly appreciative.
> The first, and i guess rather direct one, has anyone done this before?  If th
ey have, it
> would save me a lot of work!...otherwise, i'll just have to slave away for a 
week or so...

I have never heard of anyone converting ns code to run inside OPNET
(or vice-versa).  It would be interesting to hear about how hard this
is (my guess is fairly painful, but not impossible).

> I take it that the tcp_full.cc is the CORE TCP code?

Depends on what you're looking for.  tcp-full.cc is rather similar to the
4.4bsd tcp, but w/out window advertisements and a few other things.
The other tcp's you'll find in ns are flavors of 1-direction tcp's
that don't really model connection establishment and teardown.

> I was looking at importing that
> into an OPNET process and simply changing the syntax (i.e,. using opnet
> scheduling calls, timer event cancellations, maybe also their built in buffer
ing
> routines which are very high-level and easy to use).
> However, the CORE algorithmic component would remain unchanged
> from the original NS-2 code.  I noted that there are "goto" statements
> in some of the main routines
> in tcp_full.cc.  Those should translate ok into C, i guess?

yes, goto is valid in C

> Any other pitfalls which i
> should avoid in the C++ ----> C conversion?  More importantly, apart from TCL
 and
> external procedure calls etc, are there any OTHER source modules for the basi
c
> TCP?  Or is tcp_full.cc pretty much it, along with its include files?  That w
ould be a
> welcome break!

Well, the bind() facilities provided by the TclCl library.  Also, do note
that the FullTcpAgent class is derived from TcpAgent, which is found
in tcp.{h,cc}.

> Thank you kindly for your help.  Any help would be much appreciated here.  I 
would
> really like to use the NS-2 version of TCP since it is very well used and wel
l-tested.
> Other versions, i am no longer sure about their accuracies.

So, I have to ask--- what is it about OPNET that you find lacking in
NS that causes you to be willing to invest the effort required to port the
full tcp stuff?

- K