[ns] help on segmentation fault after adding a new agent

2008-08-18 Thread Srirupa Dasgupta

  Dear Ns-friends, I have added a new Agent with a new packet type
..however I have made all the changes in ns-packet.tcl, ne-default.tcl
packet.h and in the Makefile...my make command is running without errors 
..however when I define the agent in the tcl file and run the tcl script 
it is giving segmentation fault
please please
help
Regards Srirupa


Re: [ns] help on segmentation fault after adding a new agent

2008-08-18 Thread Mubashir Rehmani

Hello

I think that you should do the following steps:
make clean
make
sudo make install

Hope it will help

Regards

2008/8/18 Srirupa Dasgupta [EMAIL PROTECTED]


  Dear Ns-friends, I have added a new Agent with a new packet type
 ..however I have made all the changes in ns-packet.tcl, ne-default.tcl
 packet.h and in the Makefile...my make command is running without errors
 ..however when I define the agent in the tcl file and run the tcl script
 it is giving segmentation fault
 please please
 help
 Regards Srirupa




-- 
Mubashir Husain Rehmani

Mobile : 00 33 (0)6 32 00 89 35


[ns] how to access this node id in a c++ file?

2008-08-18 Thread Weihuan Shu

Hi all,

I was wondering how to access this node id in a c++ file.
For example in my simulation, CMUPriQueues  are associated with the DSR 
(routing protocol).
How can I know get this node id in dsr-priqueue.cc, which is the c++ file 
for CMUPriQueue class.
Thanks.

Weihuan


 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not 
to copy, disclose, or distribute this e-mail or its contents to any other 
person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage 
you may sustain as a result of any virus in this e-mail. You should carry out 
your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this 
e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***


Re: [ns] how to access this node id in a c++ file?

2008-08-18 Thread Mubashir Rehmani

Hello

Here is the answer to your question: You can access this node id which is
mention in Node.cc File in a C++ file by using

Node* thisnode = Node::get_node_by_address(n_id); //you can also give index
variable as an argument to this function

coutNode ID:\tthisnode-nodeid()endl;

Feel free to ask further.

Regards



2008/8/18 Weihuan Shu [EMAIL PROTECTED]


 Hi all,

 I was wondering how to access this node id in a c++ file.
 For example in my simulation, CMUPriQueues  are associated with the DSR
 (routing protocol).
 How can I know get this node id in dsr-priqueue.cc, which is the c++
 file for CMUPriQueue class.
 Thanks.

 Weihuan


  CAUTION - Disclaimer *
 This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
 solely
 for the use of the addressee(s). If you are not the intended recipient,
 please
 notify the sender by e-mail and delete the original message. Further, you
 are not
 to copy, disclose, or distribute this e-mail or its contents to any other
 person and
 any such actions are unlawful. This e-mail may contain viruses. Infosys has
 taken
 every reasonable precaution to minimize this risk, but is not liable for
 any damage
 you may sustain as a result of any virus in this e-mail. You should carry
 out your
 own virus checks before opening the e-mail or attachment. Infosys reserves
 the
 right to monitor and review the content of all messages sent to or from
 this e-mail
 address. Messages sent to or from this e-mail address may be stored on the
 Infosys e-mail system.
 ***INFOSYS End of Disclaimer INFOSYS***




-- 
Mubashir Husain Rehmani

Mobile : 00 33 (0)6 32 00 89 35


[ns] Reply: How to get this node id?

2008-08-18 Thread Mubashir Husain Rehmani

Hello

Here is the answer to your question: You can access this node id which is 
mention in Node.cc File in a C++ file by using

Node* thisnode = Node::get_node_by_address(n_id); //you can also give index 
variable as an argument to this function


coutNode ID:\tthisnode-nodeid()endl;

Feel free to ask further.

Regards


  Mubashir Husain Rehmani 
  Mobile   : 00 33 (0)6 32 00 89 35

[EMAIL PROTECTED]



  


Re: [ns] Problem with MANET simulation

2008-08-18 Thread Maurizio Bellemo

Hi all,


 I found on the Web some files to run a simulation on ns-2. The simulation
 represents a MANET with nodes broadcasting information. I attach the files.
 I followed the steps in the README (unfortunately it's in italian) and tryed
 to run the .tcl file with this result.

 [EMAIL PROTECTED]:~/Desktop/eserc$ ns script.tcl

 num_nodes is set 100
 warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
 INITIALIZE THE LIST xListHead
 Loading connection pattern...
 Starting Simulation...
 channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
 highestAntennaZ_ = 1.5,  distCST_ = 550.0
 SORTING LISTS ...DONE!
 Nodo 0: spedisco broadcast perch� ho 10 tokens
 *** stack smashing detected ***: ns terminated
 === Backtrace: =
 /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7c52138]
 /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x0)[0xb7c520f0]
 ns(_ZN8CMUTrace10nam_formatEP6Packeti+0xcc4)[0x82a3df0]
 ns(_ZN8CMUTrace6formatEP6PacketPKc+0x6b)[0x82a4a67]
 ns(_ZN8CMUTrace4recvEP6PacketP7Handler+0x73)[0x82a4d3f]
 ns(_ZN5Agent4sendEP6PacketP7Handler+0x2c)[0x81b913a]

 ns(_ZN18BroadcastbaseAgent16sendbroadcastmsgEiP10BBCastData+0xe7)[0x837ba91]
 ns(_ZN16BroadcastbaseApp18send_broadcast_pktEv+0xb0)[0x837c1c2]
 ns(_ZN16BroadcastbaseApp5startEv+0x11)[0x837c23b]
 ns(_ZN11Application7commandEiPKPKc+0x110)[0x81ba97a]
 ns(_ZN16BroadcastbaseApp7commandEiPKPKc+0xbf)[0x837c2fd]
 ns(_ZN8TclClass12dispatch_cmdEPvP10Tcl_InterpiPPKc+0x32)[0x83cd3be]
 ns[0x83d212c]
 ns(TclInvokeStringCommand+0x6e)[0x83d8efe]
 ns(TclEvalObjvInternal+0x326)[0x83daa56]
 ns[0x8405191]
 ns(TclCompEvalObj+0x9c)[0x84099cc]
 ns[0x8405032]
 ns(TclCompEvalObj+0x9c)[0x84099cc]
 ns(TclObjInterpProc+0x2e8)[0x8432608]
 ns(TclProcInterpProc+0x82)[0x8432a62]
 ns[0x83d22b6]
 ns(TclInvokeStringCommand+0x6e)[0x83d8efe]
 ns(TclEvalObjvInternal+0x326)[0x83daa56]
 ns(Tcl_EvalEx+0x435)[0x83daff5]
 ns(Tcl_Eval+0x3c)[0x83db30c]
 ns(Tcl_GlobalEval+0x36)[0x83db3a6]
 ns(_ZN3Tcl4evalEPc+0x1b)[0x83cfec1]
 ns(_ZN9AtHandler6handleEP5Event+0x24)[0x81a8782]
 ns(_ZN9Scheduler8dispatchEP5Eventd+0x92)[0x81a8444]
 ns(_ZN9Scheduler3runEv+0x2c)[0x81a8696]
 ns(_ZN9Scheduler7commandEiPKPKc+0x6b)[0x81a8955]
 ns(_ZN8TclClass12dispatch_cmdEPvP10Tcl_InterpiPPKc+0x32)[0x83cd3be]
 ns[0x83d212c]
 ns(TclInvokeStringCommand+0x6e)[0x83d8efe]
 ns(TclEvalObjvInternal+0x326)[0x83daa56]
 ns[0x8405191]
 ns(TclCompEvalObj+0x9c)[0x84099cc]
 ns[0x8405032]
 ns(TclCompEvalObj+0x9c)[0x84099cc]
 ns(TclObjInterpProc+0x2e8)[0x8432608]
 ns(TclProcInterpProc+0x82)[0x8432a62]
 ns[0x83d22b6]
 ns(TclInvokeStringCommand+0x6e)[0x83d8efe]
 ns(TclEvalObjvInternal+0x326)[0x83daa56]
 ns[0x8405191]
 ns(TclCompEvalObj+0x9c)[0x84099cc]
 ns(TclObjInterpProc+0x2e8)[0x8432608]
 ns(TclProcInterpProc+0x82)[0x8432a62]
 ns[0x83d212c]
 ns(TclInvokeStringCommand+0x6e)[0x83d8efe]
 ns(TclEvalObjvInternal+0x326)[0x83daa56]
 ns(Tcl_EvalEx+0x435)[0x83daff5]
 ns(Tcl_FSEvalFile+0x21b)[0x8421eab]
 ns(Tcl_Main+0x337)[0x8425567]
 ns(nslibmain+0x20)[0x83cd0b6]
 ns(main+0x22)[0x83cd112]
 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe0)[0xb7b7b450]
 ns(__gxx_personality_v0+0x335)[0x81a00b1]
 === Memory map: 
 08048000-08535000 r-xp  08:01 4759687
 /home/maurizio/.ns/ns-allinone-2.33/ns-2.33/ns
 08535000-085d1000 rw-p 004ec000 08:01 4759687
 /home/maurizio/.ns/ns-allinone-2.33/ns-2.33/ns
 085d1000-09a3d000 rw-p 085d1000 00:00 0  [heap]
 b7b01000-b7b4 r--p  08:01 1524604
 /usr/lib/locale/en_US.utf8/LC_CTYPE
 b7b4-b7b42000 rw-p b7b4 00:00 0
 b7b42000-b7b46000 r-xp  08:01 1500491/usr/lib/libXdmcp.so.6.0.0
 b7b46000-b7b47000 rw-p 3000 08:01 1500491/usr/lib/libXdmcp.so.6.0.0
 b7b47000-b7b5e000 r-xp  08:01 1501321/usr/lib/libxcb.so.1.0.0
 b7b5e000-b7b5f000 rw-p 00016000 08:01 1501321/usr/lib/libxcb.so.1.0.0
 b7b5f000-b7b6 r-xp  08:01 1501319
 /usr/lib/libxcb-xlib.so.0.0.0
 b7b6-b7b61000 rw-p  08:01 1501319
 /usr/lib/libxcb-xlib.so.0.0.0
 b7b61000-b7b63000 r-xp  08:01 1500480/usr/lib/libXau.so.6.0.0
 b7b63000-b7b64000 rw-p 1000 08:01 1500480/usr/lib/libXau.so.6.0.0
 b7b64000-b7b65000 rw-p b7b64000 00:00 0
 b7b65000-b7cae000 r-xp  08:01 1492322/lib/tls/i686/cmov/
 libc-2.7.so
 b7cae000-b7caf000 r--p 00149000 08:01 1492322/lib/tls/i686/cmov/
 libc-2.7.so
 b7caf000-b7cb1000 rw-p 0014a000 08:01 1492322/lib/tls/i686/cmov/
 libc-2.7.so
 b7cb1000-b7cb4000 rw-p b7cb1000 00:00 0
 b7cb4000-b7cbe000 r-xp  08:01 1474624/lib/libgcc_s.so.1
 b7cbe000-b7cbf000 rw-p a000 08:01 1474624/lib/libgcc_s.so.1
 b7cbf000-b7da7000 r-xp  08:01 1501258
 /usr/lib/libstdc++.so.6.0.9
 b7da7000-b7daa000 r--p 000e8000 08:01 1501258
 /usr/lib/libstdc++.so.6.0.9
 b7daa000-b7dac000 rw-p 000eb000 08:01 1501258
 /usr/lib/libstdc++.so.6.0.9
 b7dac000-b7db2000 rw-p b7dac000 00:00 0
 b7db2000-b7dd5000 r-xp  08:01 1492330/lib/tls/i686/cmov/
 libm-2.7.so
 b7dd5000-b7dd7000 rw-p