Re: [ns] Negative UID of the packets

2008-06-07 Thread Amit Soni

Hi Ns-Users,

Thank you Teerawat for your reply, but in my simulation, from 0-3.4
seconds th-uid() is positive but from 3.4 it goes negative. I think the
most probably reason is that the packet uid space exhausts, but then why
doesn't it shows some error. Any ways even if it goes exhausts is there
any way to wrap around the uid's , I mean renew all the uid's.

Thanks again,

Regards,
Amit Soni
email id: [EMAIL PROTECTED]



 Hi Amit,

 Negative UID is a common mechanism in NS2. NS2 uses the scheduler to keep
 track of event. The mechanism is as follows:

 1. When you schedule an event at a certain time, a positive uid_
 value is assigned to the event.
 2. When the event is executed, the uid_ is revert to its negative value.
 3. Again, when you create another event, a new event with positive uid_
 is created.

 Having negative uid_ simply means that the packet (or event) is being
 executed (e.g., transmitted to another node).
 Best,

 Teerawat

 P.S. There is one book for NS2. If you are interested, please check the
 following link
 http://www.springer.com/engineering/signals/book/978-0-387-71759-3?detailsPage=otherBooksCIPageCounter=CI_MORE_BOOKS_BY_AUTHOR0



 On 6/6/2008, Amit Soni [EMAIL PROTECTED] wrote:


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\tth-uid()\t\t(Scheduler::instance().clock())\t\tt\t\tth-size()\t\tmh-macDA()\t\tmh-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: [EMAIL PROTECTED]





[ns] ns-allinone-2.30 and 2.33 installation problems in linux

2008-06-07 Thread crystal_maple


Dear all,
   I have some problems when I installed ns2 in linux, I use redhat, and the
kernel version is 2.4.21-20.EL,
the gcc version is gcc-3.2.3
it shows:

/usr/ns/ns-allinone-2.30/tk8.4.13/generic/tk3d.c: In function
`TkDebugBorder':
/usr/ns/ns-allinone-2.30/tk8.4.13/generic/tk3d.c:1388: `borderPtr'
undeclared (first use in this function)
/usr/ns/ns-allinone-2.30/tk8.4.13/generic/tk3d.c:1391: invalid operands to
binary *
/usr/ns/ns-allinone-2.30/tk8.4.13/generic/tk3d.c:1391: syntax error before
')' token
/usr/ns/ns-allinone-2.30/tk8.4.13/generic/tk3d.c:1394: request for member
`borderTable' in something not a structure or union
/usr/ns/ns-allinone-2.30/tk8.4.13/generic/tk3d.c:1394: request for member
`borderTable' in something not a structure or union
/usr/ns/ns-allinone-2.30/tk8.4.13/generic/tk3d.c:1396: syntax error before
')' token
/usr/include/sys/stat.h: At top level:
/usr/ns/ns-allinone-2.30/tk8.4.13/generic/tk3d.c:1134: storage size of
`shiftTable' isn't known
/usr/ns/ns-allinone-2.30/tk8.4.13/generic/tk3d.c:31: warning: `BorderInit'
declared `static' but never defined
/usr/ns/ns-allinone-2.30/tk8.4.13/generic/tk3d.c:36: warning: `Intersect'
declared `static' but never defined
/usr/ns/ns-allinone-2.30/tk8.4.13/generic/tk3d.c:39: warning: `ShiftLine'
declared `static' but never defined
{standard input}: Assembler messages:
{standard input}:702: Error: symbol `dy' is already defined
{standard input}:708: Error: symbol `dx' is already defined
{standard input}:755: Error: symbol `q' is already defined
{standard input}:761: Error: symbol `p' is already defined
{standard input}:767: Error: symbol `q' is already defined
{standard input}:773: Error: symbol `q' is already defined
make: *** [tk3d.o] Error 1
tk8.4.13 make failed! Exiting ...

The similar problem occurred when I installed ns-allinone-2.33.
Can anybody help me? Thanks very much.
-- 
View this message in context: 
http://www.nabble.com/ns-allinone-2.30-and-2.33-installation-problems-in-linux-tp17688498p17688498.html
Sent from the ns-users mailing list archive at Nabble.com.