[ns] Can Ns be compiled with external lib?
Hi all I am trying to add RSA algorithm into Ns aodv.cc source code to encrypt and decrypt information with high importance. But RSA implemetation need to use functions in an external lib that compiled under linux and deal with operation of very long integer. All code that uses this lib has to be compiled this way : . c: lip.o lippar.h lip.h cc $(OPT) $< lip.o -lm -o $@ Can anyone help me on how to compile Ns code that uses this lib? I guess this need a change in Ns Makefile , but do not know how toand whether Ns support this compile with external lib? The attached are makefile used by the external lib. Thank you very much. .IGNORE: OPT=-O # On Digital Unix / Alpha machines, the following works well. Use ev4 # if appropriate for your chipset. # #OPT=-DALPHA -O -om -non_shared -tune ev5 lip.o: lippar.h lip.c lip.h cc $(OPT) lip.c -c lippar.h: liptimer.c lip.c lip.h echo "" > lippar.h cc $(OPT) lip.c -c cc $(OPT) liptimer.c -c cc lip.o liptimer.o -lm -o liptimer echo "running timer program" ./liptimer .c: lip.o lippar.h lip.h cc $(OPT) $< lip.o -lm -o $@ clean: rm -f *.o
[ns] error calling the class cls
Hi all, I am trying to run an ns2(2.28) simulation for ad hoc network. I used 20 nodes in AODV routing protocol,I used other standard parameters. I faced the following errors. ===The error is: [EMAIL PROTECTED] Clustering]# ns cluster14.tcl num_nodes is set 14 INITIALIZE THE LIST xListHead *** NOTE: no connection pattern specified. Loading scenario file... Load complete... Starting Simulation... channel.cc:sendUp - Calc highestAntennaZ_ and distCST_ highestAntennaZ_ = 1.5, distCST_ = 550.0 SORTING LISTS ...DONE! ns: _o401 recv 0 20.4: (_o401 cmd line 1) invoked from within "_o401 cmd recv 0 20.4" invoked from within "catch "$self cmd $args" ret" invoked from within "if [catch "$self cmd $args" ret] { set cls [$self info class] global errorInfo set savedInfo $errorInfo error "error when calling class $cls: $args" $..." (procedure "_o401" line 2) (SplitObject unknown line 2) invoked from within "_o401 recv 0 20.4" = I would appreciate your assistance
[ns] dynamic or static linking
hi ns users, i have made some changes to one of the existing routing protocols for ad hoc networks. To make use of the changes do i have to compile the whole of NS2 or can i just compile the protocol (files) i have changed. Does NS2 use static linking or dynamic linking. Thanks in advance, Melvin
[ns] Getting data from wireless base station to cross to wired station
A while back I asked about getting data to move from my wireless base station node to my wired node. I finally figured out the issue. Key to getting this to work was: 1.) Telling my "node that is wired to the base station" that such a route exists: $W(0) add-route $BS(0) $W(0) 2.) And in my forward_data() member of my custom routing protocol, I needed to pick the right target: Scheduler::instance().schedule(p->handler_, p, 0.0); Key in this was not to use target_ with just went back to my handler I was already in, but instead reset back to use the packet's original handler. Particular thanks to Pedro Vale Estrela, who's help was invaluable. Paul Vincent Craven
[ns] Measuring linkcost in Linkstate
Hi all, Does LinkState or DistaceVector algorithms implemented in NS2 measure link cost dynamically? I mean by sending ECHO packets and calculating time upon ackowledgments arrival,as stated in the protocols? If so, how can I force LS or DV (LS specially) to use link delays as link costs, instead of hop-counts? Thanks for your attention, Regards, --Saeed.
[ns] RSVP_TE_NS question
Hello to all. I have installed ns-2 v2.26 with mns for v2.26 and the RSVP-TE patch from http://netgroup-serv.iet.unipi.it/rsvp-te_ns/ .On that page there are 2 test files. After completing the install, I ran those 2 files and got no errors. Then I tried to change the way I create an LSP from "create-crlsp" to "create-crlsp-ospfte". When I ran the simulation, I got the following error: - 5 ::: create-crlsp-ospfte:::requested band = +40 ns: _o1007 call-intf-changed-band 40.00 0 0 5000 32 0 16: can't read "rtObject_": no such variable while executing "subst $[subst $var" (procedure "_o22" line 5) (SplitObject set line 5) invoked from within "$nodo set rtObject_" (procedure "_o1007" line 5) (Agent/RSVP call-intf-changed-band line 5) invoked from within "_o1007 call-intf-changed-band 40.00 0 0 5000 32 0 16" - I modified "create-crlsp-ospfte" back to "create-crlsp" and then I tried something else: I wanted to reroute an LSP using "reroute-ospfte" instead of "reroute-precalc". At first, it didn't crash, but after second 30, I got a segmentation fault. I ran it with strace and got an error similar to the previous one. Basically, it says "can't read "rtObject_": no such variable". I also tried to run a simulation containing the "reroute-prealloc" command, but I got an error saying "5 (the SID value for the backup tunnel) is an unknown session ID", although my syntax was correct. I'm not good at programming so, although I tried some debugging using strace and gdb, I couldn't come up with anything, so any advice is welcomed. Thanks. Gabriel
[ns] CONTRIBUTING TO NS2 WIKI (was: RE: C++ debug in NS2)
100% agreed on the kdbg and insight topics; Concerning the -g flag, one can also configure ns2 with debugging support, eg: ns2> ./configure --help ns2> ./configure --enabled-debug (for c++ debug) ns2> ./configure --enabled-debug --with-tcldebug=../tcl-debug-2.0 (for c++ and tcl debug) Incidentally, this is exactly the kind of ns-users aids that would be most useful for NS2 newcomers. For this, the NS2 wiki is the perfect place for NS2 beginner users to post their success stories / detailed HOW-TOs / tried-but-failed experiments __based on their own learning experiences and lerning curve. As such, and this is not the first time I make this call for volunteers, ___PLEASE CONTRIBUTE TO THE NS2 WIKI___. For instance, check http://mailman.isi.edu/pipermail/ns-users/2006-January/053560.html; I've had exactly __0__ responses for this call for volunteers! However, I've spent a lot of time doing my own help pages for only the benefit of the NS2 community, and I'm sure that I've already helped a lot of persons already. http://tagus.inesc-id.pt/~pestrela/ns2/ Thus: - Have you seen any good tip in the ns2 mailing list? Did it worked? Then put your detailed guide in the wiki. No need to be very formal, just give all the important details! - What, it didn't worked? Start by putting the things that worked on the wiki, search a bit, ask for help in the mailing list, then when its solved put the whole story in the wiki. - Etc etc etc. To conclude, I sincerely fail to see why the NS2 community is so different from other programming communities, which are probably as hard to get into as ns2. Of course that we have our TCL/C++/bindings problems, but "they" probably have their problems as well that we don't even imagine of. I sincerely think that is users contribute, someday we'll be able to have something similar to this wiki, for example: http://developer.valvesoftware.com/wiki/Category:Programming http://developer.valvesoftware.com/wiki/Compiling_under_Linux Comments? Pedro Vale Estrela > -Original Message- > From: Ilyes Gouta [mailto:[EMAIL PROTECTED] > Sent: terça-feira, 6 de Junho de 2006 16:49 > To: [EMAIL PROTECTED] > Cc: Hai Nam; [EMAIL PROTECTED]; NS-List > Subject: Re: [ns] C++ debug in NS2 > > Hi, > > There also insight which can be found on > http://sources.redhat.com/insight/ and several other GUI frontends for > GDB like KDbg (http://www.kdbg.org/) which is a clean and easy to > learn debugger based on QT. Please notice that debugging on Linux > means pretty much interacting with GDB whatever the tool you're using. > So getting more experience with it is really an added value. > > Please note, in order to debug NS, you have to build it in O0 -g mode > to respectively disable any optimization done by the compiler and to > generate debugging symbols and source code references in the final > executable. You can do this by manipulating CFLAGS within > ns-2.29/Makefile. > > Best regards, > Ilyes Gouta. > > On 6/6/06, Pedro Vale Estrela <[EMAIL PROTECTED]> wrote: > > > > > > How need to take the time to learn a real debugger like DDD. Make a > small > > test program yourself in C, 10 lines are sufficient, then debug in > inside > > DDD to learn the debugerr > > http://heather.cs.ucdavis.edu/~matloff/ddd.html > > http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging.html#_Toc122255042 > > > > Only then move to NS2. DDD is a very important investment to do in NS2 > > programming > > > > > > > > > -Original Message- > > > From: Hai Nam [mailto:[EMAIL PROTECTED] > > > Sent: terça-feira, 6 de Junho de 2006 15:45 > > > To: [EMAIL PROTECTED]; NS-List > > > Subject: C++ debug in NS2 > > > > > > Hello Pedro and the list, > > > > > > I'm modifying NS-2 C++ code. Sometimes I get the "incident de > > > segmentation" error. By commenting out some code, I can know from > > > which function goes this error, but it'll take more time to filter the > > > right code block... > > > > > > Could you propose a debugger for me (I don't have much experience in > > > this programming language) ? Besides commenting out some code, or put > > > some "printf", I don't know where to start (even I debugged in some > > > small files, I know how to put breakpoints...). In Eclipse there's > > > tool for debug, but I reallly really don't know how to use. After a > > > modification in code, I run NS by "make clean;make" then I run "ns > > > example.tcl". > > > > > > Thanks in advance, > > > > > > -- > > > Hai-Nam NGUYEN > > > http://www.jcisio.com > > > >
[ns] 802.15.4
Hi all, I'm working with MAC 802.15.4 model developped by Zheng in NS-2. I'm trying to simulate a multi-sink network, with different Pan Coordinators, but I had some problems with the choice of the channels. Can somebody help me? Thanks in advance, Sara
[ns] required data quantity and total time of transmission
I have to send a required data on tcp. a-) for example 10 mb by 1000 bytes data segments. I can arrange the data segment quantity but, i don't know how i can arrange the total data quantity. b-)and hoe can i find total time of transmission of tcp. Thanks for help. regards erhan. _ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Re: [ns] C++ debug in NS2
Hi, There also insight which can be found on http://sources.redhat.com/insight/ and several other GUI frontends for GDB like KDbg (http://www.kdbg.org/) which is a clean and easy to learn debugger based on QT. Please notice that debugging on Linux means pretty much interacting with GDB whatever the tool you're using. So getting more experience with it is really an added value. Please note, in order to debug NS, you have to build it in O0 -g mode to respectively disable any optimization done by the compiler and to generate debugging symbols and source code references in the final executable. You can do this by manipulating CFLAGS within ns-2.29/Makefile. Best regards, Ilyes Gouta. On 6/6/06, Pedro Vale Estrela <[EMAIL PROTECTED]> wrote: > > > How need to take the time to learn a real debugger like DDD. Make a small > test program yourself in C, 10 lines are sufficient, then debug in inside > DDD to learn the debugerr > http://heather.cs.ucdavis.edu/~matloff/ddd.html > http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging.html#_Toc122255042 > > Only then move to NS2. DDD is a very important investment to do in NS2 > programming > > > > > -Original Message- > > From: Hai Nam [mailto:[EMAIL PROTECTED] > > Sent: terça-feira, 6 de Junho de 2006 15:45 > > To: [EMAIL PROTECTED]; NS-List > > Subject: C++ debug in NS2 > > > > Hello Pedro and the list, > > > > I'm modifying NS-2 C++ code. Sometimes I get the "incident de > > segmentation" error. By commenting out some code, I can know from > > which function goes this error, but it'll take more time to filter the > > right code block... > > > > Could you propose a debugger for me (I don't have much experience in > > this programming language) ? Besides commenting out some code, or put > > some "printf", I don't know where to start (even I debugged in some > > small files, I know how to put breakpoints...). In Eclipse there's > > tool for debug, but I reallly really don't know how to use. After a > > modification in code, I run NS by "make clean;make" then I run "ns > > example.tcl". > > > > Thanks in advance, > > > > -- > > Hai-Nam NGUYEN > > http://www.jcisio.com > >
Re: [ns] C++ debug in NS2
How need to take the time to learn a real debugger like DDD. Make a small test program yourself in C, 10 lines are sufficient, then debug in inside DDD to learn the debugerr http://heather.cs.ucdavis.edu/~matloff/ddd.html http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging.html#_Toc122255042 Only then move to NS2. DDD is a very important investment to do in NS2 programming > -Original Message- > From: Hai Nam [mailto:[EMAIL PROTECTED] > Sent: terça-feira, 6 de Junho de 2006 15:45 > To: [EMAIL PROTECTED]; NS-List > Subject: C++ debug in NS2 > > Hello Pedro and the list, > > I'm modifying NS-2 C++ code. Sometimes I get the "incident de > segmentation" error. By commenting out some code, I can know from > which function goes this error, but it'll take more time to filter the > right code block... > > Could you propose a debugger for me (I don't have much experience in > this programming language) ? Besides commenting out some code, or put > some "printf", I don't know where to start (even I debugged in some > small files, I know how to put breakpoints...). In Eclipse there's > tool for debug, but I reallly really don't know how to use. After a > modification in code, I run NS by "make clean;make" then I run "ns > example.tcl". > > Thanks in advance, > > -- > Hai-Nam NGUYEN > http://www.jcisio.com
[ns] C++ debug in NS2
Hello Pedro and the list, I'm modifying NS-2 C++ code. Sometimes I get the "incident de segmentation" error. By commenting out some code, I can know from which function goes this error, but it'll take more time to filter the right code block... Could you propose a debugger for me (I don't have much experience in this programming language) ? Besides commenting out some code, or put some "printf", I don't know where to start (even I debugged in some small files, I know how to put breakpoints...). In Eclipse there's tool for debug, but I reallly really don't know how to use. After a modification in code, I run NS by "make clean;make" then I run "ns example.tcl". Thanks in advance, -- Hai-Nam NGUYEN http://www.jcisio.com
Re: [ns] Problem when adding new variable in common header
In the packet constructor, make sure you add an appropriate initializer for your field. I've done what you are describing many times with success. Pedro Vale Estrela > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Takuya Kimura > Sent: terça-feira, 6 de Junho de 2006 14:37 > To: ns-users@ISI.EDU > Subject: [ns] Problem when adding new variable in common header > > > [input] [input] [input] [input] Hi, > > I want to add a new variable in common header as information for any > routing protocols. I edited common/packet.h as follows. > > struct hdr_cmn { > ... > static nsaddr_t new_var_; > ... > }; > > A node sets value for new_var_ and broadcasts the packet. Any nodes > receiving this broadcast packet access this new variable to read the value > of new_var_. Unfortunately, different node gets different value of > new_var_. I don't know why??? Every node should get the same value because > it comes from the same packet. I didn't access this varaible elsewhere. > How did the value change? > > Do I have to add something elsewhere when adding a new variabale in common > header? > > --tak > > - > Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get > Yahoo! Messenger with Voice
[ns] Problem when adding new variable in common header
[input] [input] [input] [input] Hi, I want to add a new variable in common header as information for any routing protocols. I edited common/packet.h as follows. struct hdr_cmn { ... static nsaddr_t new_var_; ... }; A node sets value for new_var_ and broadcasts the packet. Any nodes receiving this broadcast packet access this new variable to read the value of new_var_. Unfortunately, different node gets different value of new_var_. I don't know why??? Every node should get the same value because it comes from the same packet. I didn't access this varaible elsewhere. How did the value change? Do I have to add something elsewhere when adding a new variabale in common header? --tak - Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get Yahoo! Messenger with Voice
[ns] Install NS by Cygwin on Core Duo
Do you have a solution to install NS on Core Duo machine with WinXP sp2?
[ns] how to set manual routes in wireless simulations?
Hi ns-users, can anyone give a hint on how to set manual routing in wireless simulations? I am working with the IEEE 802.15.4 model included in ns-2.29. Thanks in advance