Dear Shafiq, I found recv() function there. When I disable collision() method by capturing in both cases, a few packets still be dropped. So I try "uptarget_->recv(p, (Handler*) 0); " only and delete others. The recv() function is like follows:
void Mac802_11::recv(Packet *p, Handler *h) { struct hdr_cmn *hdr = HDR_CMN(p); assert(initialized()); if(hdr->direction() == hdr_cmn::DOWN) { send(p, h); return; } uptarget_->recv(p, (Handler*) 0); } It seems no packet is dropped now. Please tell me if it causes serious errors. Thanks very much for your kind help! Best Regards, dandan liu 07/27 >From: "Shafiq Hashmi" <[EMAIL PROTECTED]> >To: "dandan liu" <[EMAIL PROTECTED]>, <ns-users@ISI.EDU> >Subject: Re: [ns] how to turn off collision effect in ns-2.28 >Date: Wed, 26 Jul 2006 01:10:37 -0400 > >In ns-2.28/mac folder, look for the mac layer protocol file that you might >be using. For example, mac-802_11.c. Go to the 'recv' function. In this >case will be "Mac802_11::recv(Packet *p, Handler *h)". >You can find the if-else condition to go to collision() method. You can >disable over there, by capturing in both the cases. > >Shafiq > >----- Original Message ----- From: "dandan liu" <[EMAIL PROTECTED]> >To: <ns-users@ISI.EDU> >Sent: Tuesday, July 25, 2006 10:57 PM >Subject: [ns] how to turn off collision effect in ns-2.28 > > >> >>Hi, everbody, >> >> I'm a new user. I am trying to do simulation that has idealized network >>environment, which means no packet drop due to collision in MAC layer. But >>I >>have no idea on how to turn off the collision effect in ns-2.28. Could you >>please give me some information? >> >> Thanks very much for your kind help! >> >>Best Regards, >> >>dandan liu >>07/24 >> >>_________________________________________________________________ >>Learn English via Shopping Game, FREE! >>http://www.linguaphonenet.com/BannerTrack.asp?EMSCode=MSN06-03ETFJ-0211E >> >> > > _________________________________________________________________ Get 10Mb extra storage for MSN Hotmail. Subscribe Now! http://join.msn.com/?pgmarket=en-hk