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

[ns] monitor packets drops



 
Hello!
I've a link between two router,n3 and n4,and I'd like to monitor packets which are drops for each flow 1, 2 and 3 that arrives at the roter n3.
 
I would like to use:  
.............................
    set counter [$ns makeflowmon Fid]           
    set bottleneck [$ns link $n3 $n4]       
    $ns attach-fmon $bottleneck $counter        
    set flowClassifier [$counter classifier]
 
    set flow [$flowClassifier lookup auto 0 0 1]
    set tcp0share [$flow set pdrops_]
    set tcp0bw [expr $tcp0share - $tcp0bw]
 
    set flow [$flowClassifier lookup auto 0 0 2]
    set tcp1share [$flow set pdrops_]
    set tcp1bw [expr $tcp1share - $tcp1bw]
 
    set flow [$flowClassifier lookup auto 0 0 3]
    set tcp2share [$flow set pdrops_]
    set tcp2bw [expr $tcp2share - $tcp2bw]
..................................

but it doesn't work because of "the presence of pdrops_"?
 why?
Can you help me?
if I put "set p_departures" it works! (but so I only count the packets departure for each flow..)
thank you.