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

[!] LossMonitor Problem..



Dear Seniors

I have to tell all of you that I don't have much exp. of NS-2.
BTW, I guss LossMonitor should be fixed in the sense of debugging wrong
loss check, for the first packet of transmission.

Would you plz check this ? Thank you..

============ in lossmonitor.cc ======================
....
void LossMonitor::recv(Packet* pkt, Handler*)
{
        hdr_rtp* p = (hdr_rtp*)pkt->access(off_rtp_);
        seqno_ = p->seqno();
        bytes_ += ((hdr_cmn*)pkt->access(off_cmn_))->size();
        ++npkts_;
        /*
         * Check for lost packets
         */
       
       /******** Now Check the first packet **************************/
       /******** so as to find the seq no for first packet *************/
       /******** and not to reflect the seqno gap to loss number ****/

        if (npkts_!=1){
                if (expected_ >= 0) {
                        int loss = seqno_ - expected_;
                        if (loss > 0) {
                                nlost_ += loss;
                                Tcl::instance().evalf("%s log-loss", name());
                        }
                }
        }
        last_packet_time_ = Scheduler::instance().clock();
        expected_ = seqno_ + 1;
        Packet::free(pkt);
}
....
====================================================



PS. BTW, Does LAN obey Collision if I patch 1.28 CVS for vlan.tcl ?


---
 Jiwoong Lee @ KAIST EE