Oct 16, 2006

Developing new queue management

Ilyes Gouta ilyes.gouta at gmail.com
Sat Apr 29 14:06:11 PDT 2006


You have to create the necessary TCL binding within your new C++ code
too. That binding will be used later by your simulation scripts.

In the C++ part, you'll have to add a class like this:

static class NewQueueClass : public TclClass
NewQueueClass () : TclClass("Queue/NewQueue") {}
TclObject* create(int, const char*const*)
return (new NewQueue);
} class_new_queue;

And then in the simulation script:

$ns node-config option1 option2 option3 -ifqType Queue/NewQueue
This will tell NS to use your new queue for the newly created nodes.

Hope it helps,
Ilyes Gouta.

On 4/29/06, Eduardo J. Ortega wrote:
I tried this, recompiled ok, but my sims won't run no matter what my code is.
i thought maybe my code was wrong, so i decided to copy droptail.{cc,h} to
fifo.{c,h} and change class names to FIFO, then add fifo.o to makefile and
recompiile. It compiled, but again, sims won't run when i try to use fifo
instead of droptail.

Any clues?

On Saturday 29 April 2006 11:11, you wrote:

Have a look into the ~/ns-2.x/queue directory. You'll find all sorts
of implementations for different active queues. This include RED, RIO,
PRIO, JOBS, etc.

Implementing a new queue is rather easy actually, you'll have to
inherit from Queue and implement the enque() and deque() methods. This
is really it! Don't forget to add you source code to NS's makefile to
get it compiled.

Ilyes Gouta.

On 4/29/06, Eduardo J. Ortega wrote:
hey there:

Anyone knows how to code new queue algorithms into NS? (for example, choke)? Thanks.

Eduardo J. Ortega - Linux user #222873
"No fake - I'm a big fan of konqueror, and I use it for everything." --
Linus Torvalds

tags :

No comments: