[ns] Negative UID of the packets
Amit Soni
amitsoni at iitk.ac.in
Fri Jun 6 02:40:51 PDT 2008
Hello Ns-Users,
I am simulating Large Ethernet LAN over ns2 and wanted to trace packets
that are ready to be send in to the channel. Since ns2 does not support
this type of trace I have to change the code of mac-802_3.cc to know when
and which packets are ready to be dumped in to the channel.
Following is the code in mac-802_3.cc::
hdr_cmn *th = hdr_cmn::access(p);
hdr_mac *mh= HDR_MAC(p);
mytrace<<"+2"<<"\t\t"<<th->uid()<<"\t\t"<<(Scheduler::instance().clock())<<"\t\t"<<t<<"\t\t"<<th->size()<<"\t\t"<<mh->macDA()<<"\t\t"<<mh->macSA()<<'\n';
Following are my specification of network::
Bandwidth of the LAN: 10Mb
Number of nodes: 2002
Delay: 0.025ms
1001 nodes are cbr agents and 1001 nodes are null.
Following line is used to make LAN::
set lan_ [$ns make-lan -trace on $nodelist 10Mb .025ms LL Queue/DropTail
Mac/802_3 Channel Phy/WiredPhy ]
I am Simulating just for 5 seconds and after around 3.4 seconds or so I
started getting th->uid() as negative. And the uid of the packet just
before negative uid is 2147453588. Please point me where I am going wrong.
I would greatly appreciate any suggestions.
Thanks,
Regards,
Amit Soni
email id: amitsoni at iitk.ac.in
More information about the Ns-users
mailing list