Re: [ns] Hello, if there are some sip implementations in ns2
tiger wrote: I wonder if there are some sip implementations in ns2. Could you please email the codes to me or direct me to the appropriate website. Thanks a lot. One thing you should do before posting to the list is google for your topic. --Timo
Re: [ns] Where is the interface between Agent and Node?
Wang Ivan wrote: I traced the C++ source code for Agents and found that packets sent by an agent is directly passed to the target agent ( target_-recv(p,h) ) rather than to the lower layer. For real TCP/IP, packets should be passed down to the physical layer, sent to the target, and then passed up to the upper layer. I wonder how ns2 work in this part. IIRC, target_ normally isn't the receiving host immediately but instead some object which is related to links. So before the real receivers gets to see the packet, there are a bunch of things that are happening, like link error modelling or tracing. Basically, this is done by creating a chain of targets, each one calling the next somehow. I must agree though that ns-2 doesn't really have some kind of stack processing (AFAICS) which sometimes makes it harder to mirror real-world scenarios. For many cases, this might not be needed, however, as you want to focus on what you are actually simulating, not what you could possibly simulate at all times. Keep in mind that this is just stuff I (believe to) got to know from playing with ns-2. If you want to know more, you will want to search the archives or, as a last resort, ask people on the dev list. HTH, --Timo
Re: [ns] possible C++ binded variable type
Ramzi Tka wrote: I would like to know which are the possible types of variables that we could bind to tcl variables? I'm considering pointer-typed C++ variable. kind regards, Look it up in the manual. Pointers are not supported IIRC. --Timo
Re: [ns] Connect agents dynamically
[EMAIL PROTECTED] wrote: The agent.h file defines the argument to connect as nsaddr_t and not ns_addr_t. (My ns version is ns-2.30) Same here, I'm using 2.30 as well. You need to change the definition/declaration to ns_addr_t. And i need to dynamically connect src agent to dst agent, and not agent to node (which is what i think i was doing). That solely depends on where you get the address from that you pass to Agent::connect(). Agent::connect() is a unidirectional link so you need to make sure you get the right address. i.e i need to perfomr the tcl command $ns connect $agent1 $agent2 inside my c++ code giving me the freedom to choose $agent2. (Does this command call the Agent::connect function?...i am not sure because in the Agent::command it falls under the category argc == 3, but here we have 4 arguments) I'll tell you how I do it: I have this application which uses ns-2's existing UDP agent. Within that application, I call it like this: if (agent_) { agent_-connect(dst); } else { cerr cannot establish UDP link: no agent attached endl; return; } To get the remote agent's address, I implemented a command() sub-function in my application C++ object to set a default destination (you need something to start with). If I want to reply to an incoming message, I use the source address as parameter for Agent::connect(). so i added the following code, in my C++ file char x[50]; int q = 5; int w = 6; sprintf(x, $ns connect $p(%d) $p(%d), q, w); Tcl tcl = Tcl::instance(); tcl.eval(x); But the agent $p(5) is connected to $someagent (connection of which was done at configuration time) and not to $p(6) as i have done in the code. Where am i going wrong. It's kinda hard to tell what the problem is as you use fixed values and I must assume that this is right (which might not be the case). When I debugged my connect implementation, I let C++ show me the addresses/ports of the agents in question and used additional output in Agent::connect() and MyApplication::process_data(). Latter was only possible because I used AppData for my custom packet types, but you can do something similar even if you're not using that class. Debugger is helpful is well. I'm pretty sure you'll need it to figure out where exactly things go wrong. Cheers, --Timo --- I need to connect agents dynamically for my purpose, so i have changed the agent.cc code as suggested by the comments in it. /* This function is a placeholder in case applications want to dynamically * connect to agents (presently, must be done at configuration time). */ void Agent::connect(nsaddr_t dst) { dst_ = dst; } Then i get the following compilation error: common/agent.cc: In member function #8216;virtual void Agent::connect(nsaddr_t)#8217;: common/agent.cc:393: error: no match for #8216;operator=#8217; in #8216;((Agent*)this)-Agent::dst_ = dst#8217; ./config.h:80: note: candidates are: ns_addr_t ns_addr_t::operator=(const ns_addr_t) make: *** [common/agent.o] Error 1 Well, the compile error says it all: You are trying to use the copy operator (=) for an object (a struct) although no such operator is defined. C++ does not provide the = operator for structs by default. Actually, you are using the wrong ns2 address type. There's been some discussion on the mailing list that nsaddr_t has been obsoleted by ns_addr_t (mind the additional underscore). Check config.h to see for implementation details. Luckily, some while ago I had to implement on-the-fly connectivity myself. This is what my implemention of the connect method looks like: void Agent::connect(ns_addr_t* dst) { this-daddr() = dst-addr_; this-dport() = dst-port_; } I cannot remember if ns_addr_t was a pointer by default and you removed that asterisk or whether it was no pointer variable originally and I made it one. If you don't use pointers, I'd recommend references (actually, that'd have been a better approach anyway). In each case, you should verify that your definition matches the declaration in common/agent.h and if you don't use pointers make sure you're using the . operator instead of - on the `dst' parameter. What i need to do is the following: Use a single agent to send packets to multiple agents sitting on diff nodes. I need the freedom to choose the destination agent in my agent C++ code depending upon the case. So one way of doing this would to dynamically connect the agents in the c++ code using the function (connect((nsaddr_t)atoi(_o480)); where _0480 is the value returned by ns for $my-dst-agent I think that's gonna fail. Not just because you're not employing ns_addr_t structure but because you're trying to get a node address from its name within connect(). Again, take a look at how ns_addr_t is defined: It's a struct containing
Re: [ns] Connect agents dynamically
[EMAIL PROTECTED] wrote: I need to connect agents dynamically for my purpose, so i have changed the agent.cc code as suggested by the comments in it. /* This function is a placeholder in case applications want to dynamically * connect to agents (presently, must be done at configuration time). */ void Agent::connect(nsaddr_t dst) { dst_ = dst; } Then i get the following compilation error: common/agent.cc: In member function #8216;virtual void Agent::connect(nsaddr_t)#8217;: common/agent.cc:393: error: no match for #8216;operator=#8217; in #8216;((Agent*)this)-Agent::dst_ = dst#8217; ./config.h:80: note: candidates are: ns_addr_t ns_addr_t::operator=(const ns_addr_t) make: *** [common/agent.o] Error 1 Well, the compile error says it all: You are trying to use the copy operator (=) for an object (a struct) although no such operator is defined. C++ does not provide the = operator for structs by default. Actually, you are using the wrong ns2 address type. There's been some discussion on the mailing list that nsaddr_t has been obsoleted by ns_addr_t (mind the additional underscore). Check config.h to see for implementation details. Luckily, some while ago I had to implement on-the-fly connectivity myself. This is what my implemention of the connect method looks like: void Agent::connect(ns_addr_t* dst) { this-daddr() = dst-addr_; this-dport() = dst-port_; } I cannot remember if ns_addr_t was a pointer by default and you removed that asterisk or whether it was no pointer variable originally and I made it one. If you don't use pointers, I'd recommend references (actually, that'd have been a better approach anyway). In each case, you should verify that your definition matches the declaration in common/agent.h and if you don't use pointers make sure you're using the . operator instead of - on the `dst' parameter. What i need to do is the following: Use a single agent to send packets to multiple agents sitting on diff nodes. I need the freedom to choose the destination agent in my agent C++ code depending upon the case. So one way of doing this would to dynamically connect the agents in the c++ code using the function (connect((nsaddr_t)atoi(_o480)); where _0480 is the value returned by ns for $my-dst-agent I think that's gonna fail. Not just because you're not employing ns_addr_t structure but because you're trying to get a node address from its name within connect(). Again, take a look at how ns_addr_t is defined: It's a struct containing an address and a port part. Both are just simple discrete values and assigned by ns-2 in a linear fashion as nodes are created (AFAIK). What you need to do is determine a node's address using Agent's member functions after looking up the node with the lookup() method used quite often in command() definitions (this might just be what $my-dst-agent does, but I am not sure as I haven't used it) and then pass that to the connect function. HTH, --Timo
Re: [ns] how to solve segmentation fault in ns2
[EMAIL PROTECTED] wrote: I am working on add multi-interface multi-channel support in ns2 ,but now I meet a segmentation fault in implementing adding Multiple Interface Support in NS-2, I use command : $gdb ns $r channel.tcl $bt .. Now I think segmentation fault is caused by WirelessChannel::sortLists (),but I can not find practice reasons, please help me! Learn how to help yourself by getting started using a debugger like gdb or ddd. Look in the ns-2 wiki under Troubleshooting. another question is Simulator instproc add-channel { indexch ch} { $self instvar chan set chan(indexch) $ch ^^^ } when i run test.tcl ,It always gices me that variable is not array. This has got to mean set chan($indexch) $ch Check out some tcl tutorials on the web. Cheers, --Timo
Re: [ns] attaching ns with real hardware/device
Woo Michael-W16734 wrote: I am looking for ns projects where the network simulator is connected to real hardware (such as WLAN access point). This will require an interface that can capture real packets on the real network and convert them appropriately for the simulator and let the simulator process/simulate the target simulated environment and possibly send the data/signal back to the real device. If you are aware of any, could you please let me know. Thank you in advance! Look for Emulation in the ns2 manual. --Timo
Re: [ns] tcl-debugger cannot use command 'w' to watch call stack
landrew wrote: i'am using ns2.31,and i use tcl-debugger2 for debugging. all things in debugging are ok except that after i use 'w' command to watch call stack, then when i use the next command , most of the time i'll get a core dump. [snip!] i've installed ns2 and tcl-debugger in cygwin and fc6, I found the same error. I don't know any solution to that, but just want to let you know that it's the same here with ns-allinone 2.30 and tcl-debugger-2.0 under Ubuntu 6.10 (Edgy). I think it's some flaw in the debugger implementation. Don't really care a lot about it, however, as most of the coding I do happens in C++ anyway. A workaround is to set debug 1 at different points in your topology script to find out at what location processing fails, then from there do single/next stepping until the breakdown occurs, and afterwards use common sense to figure what went wrong. --Timo
Re: [ns] Where to get Debugger for NS2 (ns-29-3, tcl8.4.11)?
Das Santos Kumar wrote: Could you please mention me where to get NS debugger for ns-29-3 (tcl8.4.11)? For the compiled stuff, you just use any C/C++ debugger, like gdb or ddd. For OTcl, there's a tcl debugger linked via the ns-2 webpage. There's more information on this in the wiki (Troubleshooting). --Timo
Re: [ns] changing node positions
Sita S. Krishnakumar wrote: I am writing to see if anyone has successfully changed node positions dynamically in code? Node locations can be set using setdest in tcl code, but I am looking to do it in the ns-2 code in c/c++. Please share your experiences. I don't know how to do that but I'm sure you can figure it out by following OTcl code in ns2/tcl/lib . A good starting point is the ns-lib.tcl file. If you're having a hard time reading Tcl, you might wanna look for a Tcl tutorial first. It's also helpful to have a basic understand of how Tcl and C++ links together by reading chapter 3 (IIRC) of the ns2 manual. HTH, --Timo
Re: [ns] Nam installation error --in Ubuntu
Tiago Junqueira wrote: After making: ./configure --prefix=/usr/local/stow/nam-1.11 --with-tk= with the tk8.4 folder inside the nam's folder, i made: make and i got the error: .c:87:29: error: X11/Xmu/WinUtil.h: No such file or directory Install the `libxmu-headers' package. If you receive more not found errors, go to http://packages.ubuntu.com/ enter the file-name or path under Search the contents of packages, choose your Ubuntu distribution and hit search. Install the package that corresponds to the file most likely. Cheers, --Timo
Re: [ns] make[1]: nothing to be done for 'all'
Kwnstantina Palla wrote: Timo Reimann [EMAIL PROTECTED] said: Kwnstantina Palla wrote: I am using openSUSE 10.2 and recently i installed the ns2-allinone-2.29 package. after a succesful installation i followed the 'make ' command. there i met some troubles. Being more specific: make[1]: Entering directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/cmu-scen-gen/setdest' make[1]:'Nothing to be done for 'all'. make[1]:Leaving directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/cmu-scen-gen/setdest' make[1]:Entering directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/dec' make[1]:'Nothing to be done for 'all'. make[1]:Leaving directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/dec' make[1]:Entering directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/epa' make[1]:'Nothing to be done for 'all'. make[1]:Leaving directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/epa' make[1]:Entering directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/nlanr' make[1]:'Nothing to be done for 'all'. make[1]:Leaving directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/nlanr' make[1]:Entering directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/ucb' make[1]:'Nothing to be done for 'all'. make[1]:Leaving directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/ucb' linux-lo56:/home/kwnsta/ns-allinone-2.29/ns-2.29# after this the 'make' procedure stops as shown above. any idea about what may be the reason? any help would be appreciated a lot! this problem keeps annoying me since a long time now.i have already tried s- allinone-2.30 and ns-allinone-2.31 packages and the same problem appears. is it any possibility that a package might be upsent from openSUSE? i really dont know what else to do. The make process is telling you that there's just nothing to compile. This is totally fine as long as you haven't added anything yet. If you did, you need to edit the Makefile and add your modifications to the object file list, as described in the ns2 manual. Timo thank you for your respond. The results are from the very first 'make' procedure after the installation. So i didn't add or change any file. But i still worry, because the make procedure stops after this message. I mean, shouldn't it continue? Are these the last files to be compiled? During the installation, messages like '...otcl installation succeeded' etc. were relly relief. Shouldn't i wait similar messages for the compilation after 'make'? Thank you all. I wish that all is fine, since i have really lost lot of time trying to figure it out! I cannot tell for 100% percent that your installation of ns2 works fine, but I assume so. Why don't you try the test scripts like the installation told you and/or start one of the bigger example scripts in ns2/tcl/ex. --Timo
[ns] where/how to intercept packages for a particular node?
Hi all, I have a problem to tackle and I'd like to have some input from other ns2 users on how to accomplish my goal. Basically, I'm trying to implement a protocol monitor, that is, an object which is capable of intercepting (in terms of copying) packages designated for a particular node and do some custom calculations on it. Right now, I'm thinking about how to do this smoothly. It should work independently of the protocol being used, and therefore, I thought about creating a variation of a queue monitor and use that. Unfortunately, I'm not sure what exactly I need to do besides deriving a C++ QueueMonitor object in order to further allow for normal queue monitoring capabilities (which I don't wanna lose) and introduce member functions and data that I need for my task. I took a look at how a standard queue monitor is implemented in OTcl (from ns2/tcl/lib) and have a rough idea that I require to use my own version of OTcl's monitor-queue, call some standard monitoring functions and then do my own stuff. I'd be glad to hear any comments on my ideas on how to incorporate such a protocol monitor into ns2 most elegantly. If you think that the queue monitor concept might be worthwile trying, maybe some further hints on how to approach this would be helpful. If there's a totally different method I could try but haven't considered, I'd be pleased to hear about that too. Thanks a lot, --Timo
Re: [ns] Fwd: make[1]: nothing to be done for 'all'
Kwnstantina Palla wrote: I am using openSUSE 10.2 and recently i installed the ns2-allinone-2.29 package. after a succesful installation i followed the 'make ' command. there i met some troubles. Being more specific: make[1]: Entering directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/cmu-scen-gen/setdest' make[1]:'Nothing to be done for 'all'. make[1]:Leaving directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/cmu-scen-gen/setdest' make[1]:Entering directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/dec' make[1]:'Nothing to be done for 'all'. make[1]:Leaving directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/dec' make[1]:Entering directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/epa' make[1]:'Nothing to be done for 'all'. make[1]:Leaving directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/epa' make[1]:Entering directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/nlanr' make[1]:'Nothing to be done for 'all'. make[1]:Leaving directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/nlanr' make[1]:Entering directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/ucb' make[1]:'Nothing to be done for 'all'. make[1]:Leaving directory 'home/kwnsta/ns-allinone-2.29/ns-2.29/indep- utils/webtrace-conv/ucb' linux-lo56:/home/kwnsta/ns-allinone-2.29/ns-2.29# after this the 'make' procedure stops as shown above. any idea about what may be the reason? any help would be appreciated a lot! this problem keeps annoying me since a long time now.i have already tried s- allinone-2.30 and ns-allinone-2.31 packages and the same problem appears. is it any possibility that a package might be upsent from openSUSE? i really dont know what else to do. The make process is telling you that there's just nothing to compile. This is totally fine as long as you haven't added anything yet. If you did, you need to edit the Makefile and add your modifications to the object file list, as described in the ns2 manual. HTH, --Timo
[ns] improvement request to website/mailing list: add posting rules to user mailing list page
Hiya, this request goes out to the people maintaining the ns-2 webpage. The only maintenance info I've found on the website was the user's mailing-list address. Since I had posted there and people suggested to put my request here instead, I'm doing that right now. If there is someone else to contact on this issue, please forward and/or let me know. Please note that any further referral to the mailing list below is meant to be the ns-2 *user's* mailing list. I've noticed that many people (likely most) make the same mistakes over and over again when posting to the user's list, such as not giving error messages, flagging their postings as urgent or generally asking questions that have been answered numerous times before and may be found in the archives. While I know that this is a common problem among any user-directed mailing-list, I think a lot of redundant traffic may be avoided by pointing people on when and how to write to the user's_mailing-list instructions such as the one I've created in the wiki and reported on this list some weeks ago. The entry is this one: http://nsnam.isi.edu/nsnam/index.php/Troubleshooting#when_and_how_to_write_to_the_user.27s_mailing-list It seems to me that most people just skip the wiki information and go straight to the mailing list info here http://www.isi.edu/nsnam/ns/ns-lists.html which unfortunately lacks any advice on how to behave on the list. Therefore, I'd like to recommend linking to the instruction from that mailing list page until the transition to the wiki is complete. A short line similar to what I've done in the wiki here http://nsnam.isi.edu/nsnam/index.php/User_Information#Documentation (see NS-related Mailing Lists under development help) should suffice. Thanks, --Timo
Re: [ns] improvement request to website/mailing list: add posting rules to user mailing list page
Sorry, wrong list again. My bad! Timo Reimann wrote: this request goes out to the people maintaining the ns-2 webpage. The only maintenance info I've found on the website was the user's mailing-list address. Since I had posted there and people suggested to put my request here instead, I'm doing that right now. If there is someone else to contact on this issue, please forward and/or let me know. Please note that any further referral to the mailing list below is meant to be the ns-2 *user's* mailing list. [snip!]
Re: [ns] SIP Implementation
golrokh mirzaee wrote: I'm looking forward an NS SIP implementation, even a very basic one. If anyone knows where i can find anything, please let me know. Mailing-list.
Re: [ns] No rule to make -error
Girma Kassa wrote: I wrote a new protocol and try to patch to ns-allinone-2.29. What I did is 1. I wrote the header and source files in C++ 2. I make necessary changes as stated on manuals that I got from internet 3. I changed the make file, i.e. add a line mipbu/mipbu.o\ where mipbu is a folder in ns-2.29 and mipbu.o the source file to be created. 4. Finally I try to execute make but I got an error no rule to make mipbu.o needed by mipbu/mipbu.cc Did you edit the right Makefile? There's Makefile.in and Makefile. One of them gets overwritten by the template one when you do a make clean. Make sure you edit the template Makefile and then re-make from scratch. Or, edit the current *and* the template Makefile so that it works without a `make clean' and next time you clean up, you won't get into trouble. HTH, --Timo
Re: [ns] regarding sendmsg()
Anuradha Sehgal wrote: Sir I did as you said about type casting if (flags (0 ==strcmp(flags, NEW_BURST))) rh-flags() |= RTP_M; p-setdata(data); printf(Data: %s :, ((PacketData*)p-userdata())-data()); target_-recv(p); But it gives me segmentation error when i run the tcl file, It gives the msg like Segmentation fault (core dumped) Can you tell me the reason for this. Works perfectly fine for me using the official udpdata.tcl example -- your segmentation fault must be caused by something else. See here http://nsnam.isi.edu/nsnam/index.php/Troubleshooting#unexpected_behavior_or_crash_.28segfault.29_after_code_extension to figure out how to solve segfault errors. --Timo
Re: [ns] [ns2] vector use in ns2
Jack Yang wrote: I have a urgent question here. http://www.catb.org/~esr/faqs/smart-questions.html#urgent http://nsnam.isi.edu/nsnam/index.php/Troubleshooting#when_and_how_to_write_to_the_user.27s_mailing-list When I used the vector in ns2 and declared like this: vectorstring vecstring; and the errors appear below: error: use of `vector' is ambiguous mobile/god.h:79: error: first declared as `class vector' here /usr/include/c++/3.3.3/bits/stl_vector.h:185: error: also declared as ` templateclass _Tp, class _Alloc class std::vector' here Try std::vectorstring vecstring; HTH, --Timo
Re: [ns] regarding sendmsg()
Anuradha wrote: First of all thanks to Mr. Timo, for his help regarding sendmsg(). It's either Timo or Mr. Reimann. I prefer the former. :) As I wanted to see the data that i set in the tcl file, I edited the ../tcl/ex/udpdata.tcl like $ns at 0.1 $udp0 send 724 Hello1 $ns at 0.2 $udp1 send 100 Hello2 $ns at 0.3 $udp0 send 500 Hello3 $ns at 0.4 $udp1 send 828 Hello4 It calls the following function in udp.cc, where i added the printf statement int UdpAgent::command(int argc, const char*const* argv) { if (argc == 4) { if (strcmp(argv[1], send) == 0) { printf(\n \n%d==%s,atoi(argv[2]),argv[3]); PacketData* data = new PacketData(1 + strlen(argv[3])); strcpy((char*)data-data(), argv[3]); sendmsg(atoi(argv[2]), data); return (TCL_OK); } Please notice that data is a pointer to PacketData and see below. Its displaying the contents of data, as expected. But after this, when i add printf statement in void UdpAgent::sendmsg(int nbytes, AppData* data, const char* flags) ,like given below if (flags (0 ==strcmp(flags, NEW_BURST))) rh-flags() |= RTP_M; p-setdata(data); printf(after setdata(): %s :,p-userdata()); ^ You're missing one type cast and another function call here. Keep in mind that p is of type Packet, that is, it includes a bunch of information used to manage packages in general. One of its member functions is userdata() which returns an AppData pointer. AppData is PacketData's base class which was used in UdpAgent's sendmsg() function above. (check ns2/common/packet.h.) This means that p-userdata() just yields an AppData object, not the C-string data you're hoping for. For that, use ((PacketData*)p-userdata())-data() instead. data() is one of PacketData's member functions, of course, and finally returns the actual data. and at receiver end, i did the same, like [similar case] Cheers, --Timo a.k.a. Mr. Reimann
Re: [ns] problem: Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl)
Anuradha wrote: did you find the solution of Classifier no-slot problem. I am also having the same problem. Actually, I once had this very problem as well. Happened to me when I was extending UdpAgent to allow connect-on-demand functionality and I had not given the address in proper format (which should be ns_addr_t (comprising of an address and port part) as opposed to ns_addr). Your mileage may vary but you might wanna check that any destination address you've provided (either through Tcl or C++) is correct. Basically, ns2 keeps record of the nodes' addresses in terms of slots, and as far as I can understand the error message, the (hashed) destination address of _o28 cannot be found. See the manual if you like to know (a bit) more. --T Armando Garcia B. wrote: I have seen a lot of mails with this problem: --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o28: no target for slot -1 _o28 type: Classifier/Hash/Dest content dump: classifier _o28 0 offset 0 shift 2147483647 mask 1 slots slot 5: _o99 (Classifier/Port) -1 default -- Finished standard no-slot{} default handler -- Now, I have the same problem. and I have invested a lot of time, but I can not found the solution. Does some any know the solution? or any idea may be. Regards. -- Armando Garcia B.
Re: [ns] regarding sendmsg() in udp.cc
Hello Anuradha, Anuradha Sehgal wrote: Sorry to mail you personally. I got your mail id from ns-users list. Please don't address me personally, always use the mailing list. Other people might have the same problem as you and will be glad you find any help available through the mailing list archives. Actually i am facing a problem in sendmsg() method in udp.cc. I tried to call this function in tcl file like $udp sendmsg 0 5 HELLO It get executed. But when I tried to run this like $udp sendmsg 1 5 HELLO It gives error messege classifier no-slot problem. Can you please tell me what does it mean, i mean what the secoond argument does mean? Actually, you're not calling the sendmsg() function the way it's supposed to be. Please open ns2/apps/udp.h to check the prototype of the overloaded member function. (on nsallinone 2.30, it's on line #63.) It's definition can be found in ns2/apps/udp.cc (line #74). sendmsg(int, AppData*, const char*) requires at least two parameters (the last one is defaulted to 0): The size of data to be transported, an application-specific data pointer, and some optional flags, in that order. And One thing more, is there any tutorial or document, that can tell me in what sequence the functions are called in backend of tcl file. Tcl commands are always interpreted within the command() function. Therefore, take a look at UdpAgent::command() in udp.cc. If you're interested in just sending plain text messages, you should examine ns2/tcl/ex/udpdata.tcl. --Timo
Re: [ns] error while executing qaodv routing protocol
dorababu wrote: I made some changes in aodv.cc for adding qos extention in aodv protocol. after that i type make command in the konsole to check the protocol.But i am getting following error expected primary-expression before '.' token , i am unable to find the problem. any help regarding this very useful for my thesis. i am very much tankful to you. errors are like this, Sounds pretty much like a syntax error, e.g. missing paranthesis, semi-colon, something like that. By the way: [EMAIL PROTECTED] ns-2.29]# make Building ns2 as root is evil. ;) --Timo
Re: [ns] compute RTT
[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: can some one tell me a procedure to compute the round trip time thanks in advance It's in the mailinglist archives. i can't find it, could you send me it please,(RTT for tcp protocol) are be grate ful. I used rtt to search in the archives, second link: http://mailman.isi.edu/pipermail/ns-users/1999-September/005120.html You might also be interested in this enquery http://www.isi.edu/nsnam/archive/ns-users/webarch/1999/msg02542.html and its follow-up reply: http://www.isi.edu/nsnam/archive/ns-users/webarch/1999/msg02546.html Cheers, --Timo
Re: [ns] problem with debugger
juan manuel gomez garcia wrote: Recently I install the debugger in my system following the Tae-hyung Kim manual. All run ok. But when I changed a file, for example, p802_15_4mac.cc and then do 'make clean', 'make'; I dont see the changes. Why? The gdb say me: warning: Source file is more recent than executable. Just a wild guess: Some clock issue? Sometimes happens on machines when booting between Windows and Linux and the clock isn't set according to a format both OS understand. --Timo
Re: [ns] compute RTT
[EMAIL PROTECTED] wrote: can some one tell me a procedure to compute the round trip time thanks in advance It's in the mailinglist archives. --Timo
Re: [ns] Problem in making changes
adithya b wrote: My name is adithya, i am working on Routing protocols of Ad hoc wireless networks.. Now i wanted to know, if i want to make any changes in the inbuilt protocols how to do that, and how to reflect the effect of the changes made. The ns2 manual will most likely prove to be helpful in this case. --T
Re: [ns] NS2 debugging
manpreet grewal wrote: I am new to gdb debugger please help me in this... I am using ns-allinone-2.28 under cygwin on Windows XP... I have added a small function in tora_dest.cc file.. I want to see while running tora.tcl, is that function refered... [snip] i also executed {gdb) r tora.tcl and the result is- Starting program : tora.tcl No executable specified,use 'target exec'. (gdb) The error message says it: A debugger's purpose is to debug executables. A tcl script is not an executable but just a bunch of lines that an interpreter can turn into something runnable. Instead, you have to debug ns and from within gdb, tell ns to call the script as if you'd do without a debugger. See here: http://nsnam.isi.edu/nsnam/index.php/Troubleshooting#unexpected_behavior_or_crash_.28segfault.29_after_code_extension Please help me... Its very urgent... http://nsnam.isi.edu/nsnam/index.php/Troubleshooting#when_and_how_to_write_to_the_user.27s_mailing-list --Timo
Re: [ns] Query about errors during running make command
Anuradha Sehgal wrote: The three errors are: error:expected primary-expression before int. error:expected ; before int error::non-lvalue in assignment why these errors are occuring?? You've been reposting this identically at least twice. This is not going to help you increase your chances in receiving a reply. One thing that might help though is giving a complete output of the compiler errors including line numbers and showing the relevant C++ code. its urgent, please reply soon It's not: http://www.catb.org/~esr/faqs/smart-questions.html#urgent http://nsnam.isi.edu/nsnam/index.php/Troubleshooting#when_and_how_to_write_to_the_user.27s_mailing-list --T
Re: [ns] HELP: installation problems - no display found for nam
Daniel wrote: I tried to install on my Intel based MacBook Pro the ns2-allinone-2.29.3-Precompiled-UniversalBinary-Intel-Mac package that I found here http://nsnam.isi.edu/nsnam/index.php/Downloading_and_installing_ns-2. I tried to run a simple tcl example script ( /ns-2.29/tcl/ex/simple.tcl ), but I had this error running the NAM part of the simulator: running nam... nam: couldn't connect to display :0.0 Maybe I have to change some settings, but I don't know where they are. Could someone help me?? This doesn't seem to be a problem with ns-2 but Unix which Mac OS uses. Basically, this error shows up when you don't have an X server (which is, IIRC, actually called client in the X terminology) running. So are you sure you're having an X server running? I don't know if that's default on Mac OS, don't know too much about it. Can you open any other GUI application from the shell you're trying to start nam from? (like xterm?) If not, that would support my theory that something with your Unix-MAC-GUI chain is broken...
Re: [ns] question on installation NS-2.29 on Linux Ubuntu
Celina Wang wrote: 2. I have Gcc/G++ 4.1.1 installed. Try the CC and CXX switches I proposed below then. On 4/13/07, Timo Reimann [EMAIL PROTECTED] wrote: Celina Wang wrote: I am installing ns-2.29 in Linux Ubuntu 6.06 version. After modified settings of all of configure files, new problem occurs that linker is not working properly. What did you modify? Could you have possibly just replaced one problem by another doing this? in the directory ns-2.29/ , ./configure successfully passed, but make failed due to following errors: (thousands of lines complaint undefined references) Anyone can give suggestions? Thanks in advanced. g++ -o ns \ common/tclAppInit.o tools/random.o tools/rng.o tools/ranvar.o common/misc.o common/timer-handler.o common/scheduler.o common/object.o common/packet.o comm$common/tclAppInit.o: In function `Tcl_AppInit': tclAppInit.cc http://tclappinit.cc/:(.text+0xef): undefined reference to `Tcl::init(Tcl_Interp*, char const*)' :tclAppInit.cc http://tclappinit.cc/:(.text+0x100): undefined reference to `EmbeddedTcl::load()' :tclAppInit.cc http://tclappinit.cc/:(.text+0x10c): undefined reference to `EmbeddedTcl::load common/tclAppInit.o: In function `abort': tclAppInit.cc http://tclappinit.cc/:(.text+0x13d): undefined reference to `Tcl::evalc(char const*)' common/tclAppInit.o: In function `Tcl::instance()': tclAppInit.cc http://tclappinit.cc/ :(.gnu.linkonce.t._ZN3Tcl8instanceEv[Tcl::instance()]+0x4): undefined reference to `Tcl::instance_' tools/rng.o: In function `RNG::RNG(long)': rng.cc:(.text+0xdcc): undefined reference to `TclObject::TclObject()' :rng.cc :(.text+0xe06): undefined reference to `TclObject::~TclObject()' tools/rng.o: In function `RNG::RNG(long)':rng.cc:(.text+0xe2c): undefined reference to `TclObject::TclObject()' I'm on Ubuntu 6.10 and ns-allinone-2.30. ns-2 refused to work properly until I used GCC/G++ 4.0 (instead of 4.1) for compiling. Dapper shouldn't come with 4.1 by default but I'd make sure you don't have it installed anyway and possibly try recompiling using switches: CC=/usr/bin/gcc-4.0 CXX=/usr/bin/g++-4.0 [./install|make]
Re: [ns] Making changes in .cc files
Sorry for that last mail, hit the wrong button... manpreet grewal wrote: I am using ns-allinone-2.31 under cygwin on Windows XP. I have made changes in tora.cc file.. Then i executed make command successfully with no errors.. But the changes are not picked by tora.tcl, when i execute ns tora.tcl.. Can anyone please tell me where am i wrong? What should be done so that tora.tcl start picking the changes??? Start up a debugger for C++ like gdb, set a brakepoint at a promising function, like command(), and see what ns-2 does when you call the modified/added code. For more information, see the wiki: http://nsnam.isi.edu/nsnam/index.php/Troubleshooting#unexpected_behavior_or_crash_.28segfault.29_after_code_extension Cheers, --Timo
Re: [ns] Fwd: facing problem with ns
smita vishwakarma wrote: I have installed ns-2.31 on linux -fedora -5 with gcc-4.1 .it has been installed in following steps as [snip!] same as for otcl,nsnam,ns-2.31,tclcl,xgraph . I am building a new protocol which uses ns underneath for TCP /IP network protocol I creatd very simple file to begin with which has the following structure. #includeping.h static class PingHeaderClass : public PacketHeaderClass { public: PingHeaderClass():PacketHeaderClass(PacketHeader/Pingsizeof(hdr_ping)){} }class_pinghdr; First of all, you're missing a comma (,) between the two arguments given to the base class of PingHeaderClass(), PacketHeaderClass(). Secondly, please take a look at the ns-2 manual, chapter 12: Packet Headers and Formats: under 12.1, it clearly states that you MUST call bind_offset() in the constructor to bind the offset address of the packet header in question. Clearly, you did not do that. Apart from 12.1 which can be found here http://www.isi.edu/nsnam/ns/doc/node128.html please make sure you also followed 12.1.1 Adding a New Packet Header Type: http://www.isi.edu/nsnam/ns/doc/node129.html If there are other errors remaining, please first take the time to look up *all* relevant parts of the manual prior to re-posting. Should you still need to post, always include compiler error messages. Cheers, --Timo
Re: [ns] compilation of .cc file
smita vishwakarma wrote: I am trying to compile my c++ program with tcl but when I am trying to include some NS files it gives lots of error . I have tried with MAKE also but I am unable to compile my file with the c++ and tcl.Kindly , give me suggestion. Since people constantly fail to report in a useful manner, I've written a little howto post the user's mailing-list entry in the ns-wiki. In this case, please read http://nsnam.isi.edu/nsnam/index.php/Troubleshooting#when_and_how_to_write_to_the_user.27s_mailing-list and make sure you include compiler messages necessary to solve your problem. Of course, please make sure as well that this isn't just at first glance possibly hard to detect but presuming sufficient skills easily resolvable programming language fault. Cheers, --Timo
Re: [ns] Mapping of the entire Source Tree
Murali P wrote: Is there any documentation available for browsing the entire source code. I know NS Notes is a good place to start off with, but an additional material that gives a brief overview of the location of various stuff in a central location is going to be extremely helpful for researchers in my opinion. There's an incomplete class hierarchy at NS by example http://nile.wpi.edu/NS/ in the `Network Components' section (direct link: http://nile.wpi.edu/NS/components.html ) In addition, if you go over the manual and/or do some coding yourself you'll quickly find out that all the C++ stuff is in the ns directory (and in sub-directories thereof) while the tcl-related code resides in ns/tcl/. It should easily be possible to figure out what's within a directory by its name. There seem to be some exceptions, however: for instance, the UDP implementation -- a classical agent -- is located within ns/*apps*. Another thing that might be necessary to determine is whether implementations are part of OTcl or C++ or both. For instance, the web-cache client and server are available in OTcl only while its transport wrapper is part of C++. HTH, --Timo
Re: [ns] why RTP header in UDP's sendmsg() ?
Hi Marco, Marco Fiore wrote: my guess is that those infos can be useful for statistics collection. Is the RTP header considered in the UDP header size? If not, it is an invisible header, put there just for informational purposes and not affecting the simulation outcome. You seem to be right, at least that's what I can say from taking a closer look at UdpAgent::sendmsg(int, AppData*, const char*). The size is noted down in the common header (hdr_cmn) as given to sendmsg() in the first paremter (nbytes), the RTP header's size is not being put into consideration. Thanks for the explanation, --Timo Messaggio originale Da: [EMAIL PROTECTED] Data: 4-apr- 2007 4.37 PM A: ns-users@ISI.EDU Ogg: [ns] why RTP header in UDP#39;s sendmsg() ? Hiya, I'm not sure if this issue rather belongs to the dev-mailinglist instead of the users' one but since it's just a question and not some sort of contribution I'll try here first: I've looked at the UDP code (in apps/udp.cc) and came to realize that everytime the sendmsg() function is called a RTP header is put on top of the packet, including (talk burst) flags, sequence number, and a time stamp. Just wondering: What's the rationale behind this? Cheers, --Timo
Re: [ns] help needed to solve segmentation fault problem
abu shahriar wrote: I am getting segmentation fault when I call send(p,0) to broadcast a packet from my c++ code in ns. Can anyone please help me to find out why this happe? Install gdb or ddd, make sure you compiled ns with debugging symbols, start your debugger and let the program crash. Check the backtrace to see at which point it stopped working, set a breakpoint and start investigating while you're stepping through the code from that point on. If you've never worked with gdb/ddd before, it might look a little bit difficult at first but it's an absolute necessity for any serious programmer to master it. There are some excellent tutorials out there. As a starter, I'd recommend these http://heather.cs.ucdavis.edu/~matloff/UnixAndC/CLanguage/Debug.html http://www.unknownroad.com/rtfm/gdbtut/gdbtoc.html for gdb and this one http://heather.cs.ucdavis.edu/~matloff/Debug/Debug.pdf [PDF slideshow] for ddd. Good luck! --Timo
[ns] how to dynamically attach (UDP) agents to nodes from C++?
Hello, I'm currently in need of extending ns-2 with an application that requires a lot of UDP connections netween nodes. Instead of statically defining these, I thought about setting them up and tearing down dynamically within the C++ code of the application I've started to implement. The alternative would be to use a fully-meshed UDP topology created in OTcl but this would pretty much clutter the configuration and use up a lot of ressources I'd only need at certain times. I've been trying to figure out how [ns-object] attach-agent [some node] [some UDP agent] works internally and have tracked it down to ns/tcl/lib/ns-node.tcl but I don't quite understand how it relates to the compiled hierarchy (although I've been reading the relevant parts of the ns-2 manual several times) and whether it's possible to do the same from within the C++ code at all. I wouldn't mind if I lost accessibility from OTcl by doing this from C++ as the connections will only be important to the compiled hierarchy. Glad for any hint regarding how to do the `attach-agent' line in C++. Cheers, --Timo
Re: [ns] how to dynamically attach (UDP) agents to nodes from C++?
Timo Reimann wrote: I'm currently in need of extending ns-2 with an application that requires a lot of UDP connections netween nodes. Instead of statically defining these, I thought about setting them up and tearing down dynamically within the C++ code of the application I've started to implement. The alternative would be to use a fully-meshed UDP topology created in OTcl but this would pretty much clutter the configuration and use up a lot of ressources I'd only need at certain times. Actually, I've been thinking about this some more and realized that it would suffice if I could just do the connect part as in [simulator object] connect [UDP object #1] [UDP object #2] dynamically within C++. Problem that arises with this issue, however, is: how'd I get the object numbers in the compiled hierarchy? I suppose I need to work with node IDs or similar but I haven't manage to figure out the details. Basically, all I need is an address such that I can send my custom AppData objects to another application. There's nsaddr_t but I don't know how to derive that from the node name. (which is all I've got from OTcl and is the same as this-name_, e.g. _o12.) --Timo
Re: [ns] how to dynamically attach (UDP) agents to nodes from C++?
Hi Matthias, Matthias Kuhnert wrote: You can call and evaluate tcl code within the c++ part via tcl.evalf()... This combined with some function for the node-id and you should have, what you need. There have been quite a few questions posted before around this topic so you should be lucky on searching the mailinglist. I've been thinking about that as well but found it to be a clumsy solution, especially when talking large-scale. In addition, I'd need to manage those _oXYZ strings (if that's what you mean by node-id) instead of easier numbers. By the way, just some minutes ago I've figured that agent.cc is already prepared for dynamic connections but needs some member functions to be implemented first. (like Agent::connect.) This seems to be the canonical way although I couldn't find anything about it in the mailing archives. Doubting though the use behind it - if you have to send udp traffic you could save yourself some time by defining a new application/agent rather than trying to send messages via the node itself... Not sure if I get you right here. What do you mean by send messages via the node? Could you elaborate on this? Maybe I should give some more information on my implementation (which is a DNS model): I'm basically trying something similar to web-cache or the RTP example from NS by example but doing most of the stuff in C++. I only want to use OTcl for defining resolvers, name-servers, and what kind of DNS mappings the nodes should request for or provide, respectively. Actually, I started off by coding my own UDP implementation but quickly stopped doing that when I understood how web-cache's HttpData worked. So I made my own DNS packet by inherenting from AppData and passed that to the generic UDP implementation. Sending this data structure and and check it's been received by doing a simple printf works fine so far. Since I've already spent quite a lot of time getting in touch with ns-2 and refining my design continuously, I'd be glad to hear anything you might have to share. Cheers, --Timo
Re: [ns] make target in makefile for ns
smita vishwakarma wrote: I have created ping.o but when I am trying to make it is showing this problem make: *** No rule to make target ` ', needed by `ns'. Stop. how to make target needed by ns? need your help. The base directory of ns-2 doesn't provide any Makefile. Istead, you need to go to the ns-2.xy directory (e.g., ns-2.31), add your program to the list of to-be-compiled object files in Makefile.in, re-./configure (I recommend copying the switches from the install script) and then do `make'. My configure-line for ns-2.30 looks like this: ./configure --enable-debug --enable-tcldebug=../tcl-debug-2.0 --with-otcl=../otcl-1.12 --with-tclcl=../tclcl-1.18 You should remove the `--enable-tcldebug' switch if you don't use the Tcl debugger. (read: haven't installed and built tcl-debug before.) HTH, --Timo
[ns] why RTP header in UDP's sendmsg() ?
Hiya, I'm not sure if this issue rather belongs to the dev-mailinglist instead of the users' one but since it's just a question and not some sort of contribution I'll try here first: I've looked at the UDP code (in apps/udp.cc) and came to realize that everytime the sendmsg() function is called a RTP header is put on top of the packet, including (talk burst) flags, sequence number, and a time stamp. Just wondering: What's the rationale behind this? Cheers, --Timo
Re: [ns] cannot single-step ns-2 with gdb although debugging symbols are included
Timo Reimann wrote: Hi all, in order to get to know better how things in ns-2 work and where to start placing my own implementation, I'd like to use gdb and the tcl debugger and step through the initialisation process of ns-2 one by one. Despite many attempts of doing this, gdb keeps refusing to decent into function calls using the step command but just rushes to the end of the program. I've searched for answers to this problem in the mailing-list archives which basically claim that one just needs to enable debugging info to do this. So what I did was this: I modified the install script and added --enable-debug to the OTcl, Tclcl, ns, and nam build processes and --enable-symbols to tcl and tk. I re-compiled over and over without success as gdb would continue doing what I do not want it to do. Here's a gdb output excerpt: ~/sa/ns2/ns-allinone/ns-2.30$ gdb ns [legal stuff] This GDB was configured as i486-linux-gnu...Using host libthread_db library /lib/tls/i686/cmov/libthread_db.so.1. (gdb) list main 60 * 61 *-- 62 */ 63 64 int 65 main(int argc, char **argv) 66 { 67 Tcl_Main(argc, argv, Tcl_AppInit); 68 return 0; /* Needed only to prevent compiler warning. */ 69 } (gdb) b main Breakpoint 1 at 0x804d161: file common/tclAppInit.cc, line 67. (gdb) run ~/sa/ns2/ns-allinone-2.30/scenarios/testing/example3.tcl Starting program: /home/my user name/sa/ns2/ns-allinone-2.30/ns-2.30/ns /home/my user name/ns2/ns-allinone-2.30/scenarios/testing/example3.tcl Breakpoint 1, main (argc=2, argv=0xbfdd1254) at common/tclAppInit.cc:67 67 Tcl_Main(argc, argv, Tcl_AppInit); (gdb) s Program exited normally. (gdb) As far as I can see, I've succeeded in adding debugging symbols since I can use the list command to see where I'm at in the code. Prior to inserting all the debugging switches, it would give an error. To make sure, I've also compiled and incorporated tcl-debug-2.0 into ns-2 which verifiably works but did not affect gdb's behaviour. In addition, I've cleared my PATH environment variable to only include the ns-2-specific paths and used full pathnames for everything else (like gdb) because I suspected my globally installed copy of tk to interfer in this matter. This wasn't true, however. When I step through the code using stepi (instruction-level stepping) I can perfectly see all function calls including instruction pointer arithmetics. This seems to derive from machine-level code, however, and therefore isn't very useful to me. At this point, I'm really lost. I believe the list archive postings on this issue are not more recent than 2003 so I suppose it's just me having this problem but I absolutely cannot see what else to do. I'm using ns-2 allinone-2.30, gdb 6.4.90-debian, and gcc 4.1.2 under Ubuntu 6.10 (Edgy Eft). Glad for any help! Cheers, --Timo
Re: [ns] cannot single-step ns-2 with gdb although debugging symbols are included
Sorry for messing things up. Timo Reimann wrote: Despite many attempts of doing this, gdb keeps refusing to decent into function calls using the step command but just rushes to the end of the program. I've searched for answers to this problem in the mailing-list archives which basically claim that one just needs to enable debugging info to do this. I solved the issue. I'm too lazy to write it down all again as this webmail client is killing me, so in a sentence or two: `step' ignores code with no related source code available. The ns binary does nothing but call Tcl_Main() which for some non-understandable reason comes with no debugging symbols although I've enabled them in the building process. Solution: in gdb, set `step-mode' to `on'. --Timo
[ns] cannot single-step ns-2 with gdb although debugging symbols are included
Hi all, in order to get to know better how things in ns-2 work and where to start placing my own implementation, I'd like to use gdb and the tcl debugger and step through the initialisation process of ns-2 one by one. Despite many attempts of doing this, gdb keeps refusing to decent into function calls using the step command but just rushes to the end of the program. I've searched for answers to this problem in the mailing-list archives which basically claim that one just needs to enable debugging info to do this. So what I did was this: I modified the install script and added --enable-debug to the OTcl, Tclcl, ns, and nam build processes and --enable-symbols to tcl and tk. I re-compiled over and over without success as gdb would continue doing what I do not want it to do. Here's a gdb output excerpt: ~/sa/ns2/ns-allinone/ns-2.30$ gdb ns [legal stuff] This GDB was configured as i486-linux-gnu...Using host libthread_db library /lib/tls/i686/cmov/libthread_db.so.1. (gdb) list main 60 * 61 *-- 62 */ 63 64 int 65 main(int argc, char **argv) 66 { 67 Tcl_Main(argc, argv, Tcl_AppInit); 68 return 0; /* Needed only to prevent compiler warning. */ 69 } (gdb) b main Breakpoint 1 at 0x804d161: file common/tclAppInit.cc, line 67. (gdb) run ~/sa/ns2/ns-allinone-2.30/scenarios/testing/example3.tcl Starting program: /home/my user name/sa/ns2/ns-allinone-2.30/ns-2.30/ns /home/my user name/ns2/ns-allinone-2.30/scenarios/testing/example3.tcl Breakpoint 1, main (argc=2, argv=0xbfdd1254) at common/tclAppInit.cc:67 67 Tcl_Main(argc, argv, Tcl_AppInit); (gdb) s Program exited normally. (gdb) As far as I can see, I've succeeded in adding debugging symbols since I can use the list command to see where I'm at in the code. Prior to inserting all the debugging switches, it would give an error. To make sure, I've also compiled and incorporated tcl-debug-2.0 into ns-2 which verifiably works but did not affect gdb's behaviour. In addition, I've cleared my PATH environment variable to only include the ns-2-specific paths and used full pathnames for everything else (like gdb) because I suspected my globally installed copy of tk to interfer in this matter. This wasn't true, however. When I step through the code using stepi (instruction-level stepping) I can perfectly see all function calls including instruction pointer arithmetics. This seems to derive from machine-level code, however, and therefore isn't very useful to me. At this point, I'm really lost. I believe the list archive postings on this issue are not more recent than 2003 so I suppose it's just me having this problem but I absolutely cannot see what else to do. I'm using ns-2 allinone-2.30, gdb 6.4.90-debian, and gcc 4.1.2 under Ubuntu 6.10 (Edgy Eft). Glad for any help! Cheers, --Timo
Re: [ns] How to build a simple agent on transport layer ?
kerwin wrote: Hi all ! I am beginner. I want to add a simple agent on transport layer. It only needs sending a packet periodically. Thank for any suggestions. There's a chapter in the ns-2 manual exclusively dedicated to your question. --Timo
Re: [ns] Problem when install ns 2.26 at Red Hat Linux 9!
smthin wrote: I face the problem when i install the ns-allinone-2.26 at red hat linux 9. it said tk 8.3.2 make failed! Exiting.. If anyone know about this,pls let me know how to slove this problem. Virtually nobody will be able to help you if all that you provide is that single line. Give more relevant compiler output please. --Timo P.S.: someone should put a how to ask on the mailinglist-guide on the ns webpage. Queries like these come in way too often...
Re: [ns] ??? LD_LIBRARY_PATH ???
super.ismiti wrote: In the end of the installation of ns-2, two messages was showed to me: 1. You must put /ns2install/ns-allinone-2.29/otcl-1.11, /ns2install/ns- allinone-2.29/lib, into your LD_LIBRARY_PATH environment variable. If it complains about X libraries, add path to your X libraries into LD_LIBRARY_PATH. If you are using csh, you can set it like: setenv LD_LIBRARY_PATH paths If your are using sh, you can set it like: export LD_LIBRARY_PATH=paths 2. You MUST put /ns2install/ns-allinone-2.29/tcl8.4.11/library into your TCL_LIBRARY environmental variable. Otherwise ns/nam will complain during startup. I don't know about it. I didn't understand what it means. Where is the LD_LIBRARY_PATH? Is it in my script? The same questions about TCL_LIBRARY. The installation of ns-2 wants you to add the paths mentioned to certain environment variables. (you might have heard of $PATH which is such a variable as well.) I assume you use bash, so add the following lines to your ~/.bashrc: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/ns2install/ns-allinone-2.29/otcl-1.11:/ns2install/ns-allinone-2.29/lib export TCL_LIBRARY=$TCL_LIBRARY:/ns2install/ns-allinone-2.29/tcl8.4.11/library Afterwards, log out of your shell and re-login. (if you're using a graphical desktop like KDE or GNOME, just close your terminal window and re-open it.) --Timo
Re: [ns] How to read the current value of a variable ?
Hello Mouli, G.Chandramowli wrote: I am trying to invoke an event at specified time . The event does something based on value of a variable. And the variable keeps on changing during the simulation . When this event is invoked , it reads the initial value of the variable only and not its current value . Any idea on how to fix this I'm not sure if I get you straight and I've only just started using ns-2. Being aware of that, could it be possible that every time you read that variable it might be a new instance of the corresponding object and thus it gets re-initialized in the constructor? If that's the case, it might help declaring the variable as static. HTH, --Timo
Re: [ns] installation script doesn't consider /usr/include/X11 for X11 headers
paolalonetti wrote: maybe it's not a problem of NS, but it's a problem of your version of Linux. Try it: - modify your installation including the packets X. If you mean by that I should install the missing X headers: Of course, I did that. I'm not blaming NS for not finding dependent software non-existing on my machine -- that'd be too much of a demand. :-) The fault IMHO is that although the X11 headers are installed on my machine ns-2 won't find them but claim there're not installed. I've looked at a bunch of configure scripts and Makefiles but none seemed to include the path mentioned in the subject line. Since Debian and Debian-based distros represent a rather big share of the Linux market, I'll file this as a bug unless someone else can hint me at some possible mistake of mine. --Timo