hello,
  I reckon up the loss packet by awk file, the result is quite different of the 
result of printing form mac-802_11.cc. Could you please give me some advices?
  In 802_11.cc, when receive a ACK(recvACK()), recv_packet will be added by 
one; when RetransmitDATA() was called, the loss packet will be added by one. 
The result is send packet:8067, loss packet: 224.
  when I use the awk file, which is attached, to do the same work in tracefile. 
The sending packets is 48016 and recv_pkt is 3848, which means loss packets is 
48016-3848=44168. However, I can't find any Drop line in the trace file.
  They are quite different but which one is right?  Thanks for your help!
  (There are only 2 nodes in my simulation)
EGIN {
        sendLine = 0;
        recvLine = 0;
}
 
$0 ~/^s.* AGT/ {
        sendLine ++ ;
}
$0 ~/^r.* AGT/ {
        recvLine ++ ;
}
 
$0 ~/^D.* AGT/ {
       lossLine ++ ;
}
 
END {
        printf "send pkt:%d recv pkt :%d, r/s Ratio:%f, losspkt: %d, NRL: %f 
\n", sendLine, recvLine, (recvLine/sendLine),lossline;
}
 
    

Reply via email to