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

Re: questions about errormodel



hi,
thanks for the answer that's very helpfull.
> 
> The Periodic error model is parameterized like a periodic
> function.  So, the offset is sort of like the phase offset,
> indicating the first item to drop.   It will then drop every
> period_ items.  I say "item" because what is dropped is
> sensitive to the "unit" parameter.  The (current) choices
> are "time", "byte", or "pkt".  If you choose time, the period
> and offset are in units of seconds [new: not yet tested for Periodic],
> if you choose "byte", the packet containing the specified bytes
> are dropped, and if you choose "pkt", its in packet units.
> 
> Another item that may interest you.  There is a new error model
> called "List".. For this one, you say:
> 
>         $errmodel droplist "1 3 2 15 89"
> 
> which will arrange to drop the specified [pkt containing byte #s
> or pkts, time is not implemented].
> 
> - K


I have another question.
I want to issue a nam trace with annotations about the sequence number
of the lost tcp packets.
I have the following code :

	...
	set puit [new Agent/LossMonitor]
	$puit proc log-loss {} {
	global ns
	$ns trace-annotate  "loss"
	} 
	set lossylink [$ns link $n(2) $n(3)]
	set em [new  ErrorModule Fid]
	set errmodel [new ErrorModel/Periodic]
	$errmodel unit pkt
	$errmodel set offset_ 2
	$errmodel set period_ 10.0
	$em insert $errmodel
	$lossylink errormodule $em
	$errmodel drop-target $puit
	$em bind $errmodel 1
	...

The creation of the LossMonitor agent is only a trick to show me when 
there is  losses by the annotation "loss" (is there an easier why to do
that).
I want to obtain an annotation with the sequence number of the lost
packet but
I don't know how to do that.

thanks for any help


Arnaud.


-- 
----------------------------------------------------------------------
Arnaud Legout

Institut Eurecom               	Phone : 00.33.4.93.00.26.61
2229, route des Cretes         	Fax   : 00.33.4.93.00.26.27
BP 193                         	E-mail: [email protected]
06904 Sophia Antipolis cedex    Web   : http://www.eurecom.fr/~legout    
FRANCE                    
----------------------------------------------------------------------