Fw:RE: [ns] ns-2 urgent help!!!
ines.ghorbel
ines.ghorbel at laposte.net
Thu May 6 06:28:40 PDT 2004
De"ines.ghorbel" ines.ghorbel at laposte.net
A "Chee-Yeew.Yong" Chee-Yeew.Yong at thalesgroup.com
Copies
Date Thu, 6 May 2004 15:12:54 +0200
Objet RE: [ns] ns-2 urgent help!!!
Hi
i understand from you email that to generate for example a traffic between 20 nodes that have some flows prioritair (not all the traffic is prio. ) . i need to add "PriorityLevel_" in udp.cc
i dont need to do this in udp.cc:
// if (packet udp is prior)
{hdr_ip* iph = hdr_ip::access(p);
iph->prio_ = 15;/ initialize the the udp packet that are
prioritairy .
then i use the cbrgen.tcl to set priority_level
> To generate a flow that _all_ its packets are of higher priority, you
> probably need to set a flag. It is not different from setting the
> packetSize, i.e. "$udp set packetSize_ 100". So if you look through the c++
> code for UDP, I think you will find that you can add an additional
> parameter, say, Then use the cbrgen.tcl to set the
> PriorityLevel_ when you initialise the flow ("set PriorityLevel_ 1" for
> higher priority traffic).
>
> To generate a flow that _some_ of its packets are of higher priority (say,
> 20%), you need to modify UDP even more than above. In the c++ code, you find
> out how to use the random number generator (rng.cc) to decide _which_
> packets that you are generating should be higher priority. In this case, you
> do not actually need to modify cbrgen.tcl, as above. But you do need to have
> the PriorityLevel_ parameter, so that UDP class (udp.cc) can modify this
> value as decided by your RNG.
>
> You probably need to copy the PriorityLevel_ to your ip_hdr.
>
> I have not thought this through, so this information may be inaccurate. The
> general idea is the same, though.
>
> Hope this helps.
> C
>
> -----Original Message-----
> From: ines.ghorbel [mailto:ines.ghorbel at laposte.net]
> Sent: 06 May 2004 11:12
> To: Chee-Yeew.Yong
> Subject: RE: [ns] ns-2 urgent help!!!
>
>
>
> Hi ,
>
> thanks for accepting my help .
>
> i want to know how to do the link between generation the flow ,making 20% of
> it prior. and to use this to select the prior.(flow) packet to use it in my
> priority queue .
>
> so my problem is how to generate this prio flow and then can i use it to
> select it (as i montioned in my last mail).
>
> best regards
>
>
> > Looks like you are off to a good start.
> >
> > If you are using cbrgen.tcl: cbrgen.tcl automates the task of generating
> > random (as I recall, it is random) CBR flows between end-points (which are
> > also chosen randomly, I think).
> > Depending on whether you want certain flows (20% of flows to generate
> higher
> > priority packets) to have higher priority, or random packets within each
> > flow (20% of packets in each flow is higher priority), you need to decide.
> > You must remember that flows run independently of each other once you have
> > initialised them, so it will be _more_ difficult to have 20% of packets
> > within _all_ CBR flows to be higher priority. The earlier 2 options are
> > rather easier.
> >
> > Someone else may have a different opinion.
> >
> > C
> >
> > > -----Original Message-----
> > > From: ines.ghorbel [mailto:ines.ghorbel at laposte.net]
> > > Sent: 05 May 2004 15:18
> > > To: ns-users
> > > Subject: [ns] ns-2 urgent help!!!
> > >
> > >
> > >
> > > Hi all ,
> > >
> > > can anybody help me , i do not find the way to join the two idea :
> > > i want to generate udp packets and some of this udp packets
> > > have the highest prioity than others(example if we have 10
> > > udps packet to generate 2 of then are prior )
> > > so i want to know how to create this udp packets ,is it by
> > > cbrgen (cbergen.tcl) and we have to add certain instructions
> > > to do it .or to add this instruction into udp.cc .
> > > should i make some change into cbrgen.tcl
> > > please if there is some examples that do the some things
> > > bring me them.it would be helpfull for me .
> > >
> > > ### > > > ....
> > > }
> > >
> > > ###these instructions i add it into priority.cc (a new type of queue )
> > > void priority ::enque(Packet* p)
> > > {
> > > hdr_ip* iph = hdr_ip::access(p);
> > >
> > > // if IPv6 priority = 15 enqueue to queue1
> > > if (iph->prio_ == 15) {
> > > q_->enque(p);
> > >
> > > if ((q_->length() ) > qlim_) {
> > > q_->remove(p);
> > > drop(p);
> > >
> > > }
> > > }
> > > else {
> > > q2_->enque(p);
> > > if (( q2_->length()) > qlim_) {
> > > q2_->remove(p);
> > > drop(p);
> > > }
> > >
> > > Accédez au courrier électronique de La Poste : www.laposte.net ;
> > > 3615 LAPOSTENET (0,34EUR/mn) ; tél : 08 92 68 13 50 (0,34EUR/mn)
> > >
> > >
>
>
> Accédez au courrier électronique de La Poste : www.laposte.net ;
> 3615 LAPOSTENET (0,34EUR/mn) ; tél : 08 92 68 13 50 (0,34EUR/mn)
>
Accédez au courrier électronique de La Poste : www.laposte.net ;
3615 LAPOSTENET (0,34/mn) ; tél : 08 92 68 13 50 (0,34/mn)
Accédez au courrier électronique de La Poste : www.laposte.net ;
3615 LAPOSTENET (0,34/mn) ; tél : 08 92 68 13 50 (0,34/mn)
More information about the Ns-users
mailing list