[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] Quick question on Queue Mngt
Hi,
Thanks for the note. I am sorry I don't understand what you'd mentioned.
In my command function I have,
if (strcmp(argv[1], "do-control-queue")) {
blocked_ = 1;
blocked_ = 0;
Packet *tp = deque();
if (tp != 0) {
blocked_ = 1;
target_ ->recv(tp, &qh_);
}
return (TCL_OK);
}
So I first block the queue, then by unblocking it I get a packet from the
queue. If the queue is not empty I again block the queue and forward the
packet to the destination. What is wrong in my understanding? It may sound
silly but i have tried this for some time now and nothing seems to work.
Your hellp will be really appreciated.
Thanks,
Arun
>From: Garetto Michele <[email protected]>
>Reply-To: [email protected]
>To: Arun Gandhi <[email protected]>
>Subject: Re: [ns] Quick question on Queue Mngt
>Date: Thu, 22 Mar 2001 11:05:50 +0100
>
>On Thu, 22 Mar 2001, you wrote:
> > Hi,
> >
> > I've been trying to control the queue. That is, I just want the node to
>send
> > only "x" number of packets from the queue of length "z" (where z > x)
>and
> > block the rest (z-x packets).
> >
> > I am not able to control that. I have been trying blocking/unblocking
>the
> > queue but to no success. I'd appreciate quick help.
> >
> > Thanks,
> > Arun
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>You have to modify the deque function in C++ (file queue.cc): return 0
>(NULL)
>with an if condition on the queue lenght.
>(I suggest to create a new kind of queue of your own, derived from class
>Queue, but this requires to know how to bind it with tcl. See the manual)
>Michele
>--
>
>--------------------------------------------------------------
>Michele Garetto
>Dipartimento di Elettronica, Politecnico di Torino
>Corso Duca degli Abruzzi 24, 10129 Torino, Italy
>e-mail: [email protected]
>Phone: + 39 011 5644053
>Fax: + 39 011 5644099
>--------------------------------------------------------------
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com