[ns] Linking an external program to ns?

Daniel Mahrenholz mahrenho at ivs.cs.uni-magdeburg.de
Sun Jun 19 02:23:31 PDT 2005


Hi Karen, 

On Sunday 19 June 2005 09:56, Karen Pease wrote:
> I've been working on a peer to peer gaming library in my spare time, and
> will soon be needing to run tests on how well it will scale.  I ran into
> ns, and it looked great, except for one thing: I couldn't find any docs on
> how to link an external program up to it.  Is this even possible?
>
> The library has a networking class, and all networking functionality is run
> through it.  I would like to replace my networking class with one that
> makes calls of some kind or another to send a UDP packet in ns from a given
> node, and a function to be called when one is received to that node (with
> its payload).  In such a situation, I could simulate thousands of clients
> participating at once using just a single machine, each simulated client
> sending and receiving packets, and having the packets experience the
> effects of transit time, congestion, packet loss, etc.

We have developed an extension for ns-2 (works with 2.27, 2.28) called GEA 
that allows something very similar. With this library you can write 
applications that run inside and outside of ns-2 without any modifications. 
The only limitation is that these applications need to work in an event-based 
manner. Otherwise you will need network emulation and I'm sure that this will 
not scale up to some thousands of clients. 

If this sounds interesting you should contact me directly. We are currently 
working on a programming documentation but it is not ready yet. So you have 
to learn it by example (quite easy). The GEA library and the modified ns-2 is 
available from your Debian repository at 

http://bode.cs.uni-magdeburg.de/~aherms/debian/

Regards, 
Daniel.
-- 
Dipl.-Inf. Daniel Mahrenholz, University of Magdeburg, Germany
Homepage: http://ivs.cs.uni-magdeburg.de/~mahrenho



More information about the Ns-users mailing list