[ns] Please Help ........Error while creating new packet types
sir i have to create a new header type so i searched in the net and got the code in the website http://www.isi.edu/nsnam/ns/tutorial/index.html. But in packet.h PT_PING and name_[PT_PING]="ping" is already defined and in ns-default.tcl Agent/Ping set packetSize_ 64 is also defined. which version you have used and while executing make command i got some errors the errors are as follows In file included from ping.h:12, from ping.cc:9: agent.h:41:23: animation.h: No such file or directory agent.h:42:27: trafficsource.h: No such file or directory In file included from ping.h:12, from ping.cc:9: agent.h:56: error: expected class-name before ',' token agent.h:101: error: ISO C++ forbids declaration of `TrafficSource' with no type agent.h:101: error: expected `;' before '*' token agent.h:102: error: ISO C++ forbids declaration of `TrafficSource' with no type agent.h:102: error: expected `;' before '*' token agent.h:126: error: ISO C++ forbids declaration of `TrafficSource' with no type agent.h:126: error: expected `;' before '*' token agent.h:135: error: `View' has not been declared agent.h:135: error: ISO C++ forbids declaration of `parameter' with no type agent.h: In member function `virtual int Agent::classid() const': agent.h:58: error: `ClassAgentID' undeclared (first use this function) agent.h:58: error: (Each undeclared identifier is reported only once for each function it appears in.) agent.h: At global scope: agent.h:171: error: `View' has not been declared agent.h:171: error: ISO C++ forbids declaration of `nv' with no type ping.cc: In member function `virtual TclObject* PingClass::create(int, const char* const*)': ping.cc:23: error: cannot allocate an object of type `PingAgent' ping.cc:23: error: because the following virtual functions are abstract: agent.h:73: error: virtual void Agent::findClosestCornertoPoint(double, double, double&, double&) const ping.cc: In constructor `PingAgent::PingAgent()': ping.cc:29: error: no matching function for call to `Agent::Agent (packet_t)' agent.h:56: note: candidates are: Agent::Agent(const Agent&) agent.h:133: note: Agent::Agent(const char*, double) agent.h:132: note: Agent::Agent(const char*, int, double) ping.cc: In member function `virtual int PingAgent::command(int, const char* const*)': ping.cc:40: error: `allocpkt' undeclared (first use this function) ping.cc:49: error: invalid conversion from `Packet*' to `int' /usr/include/sys/socket.h:136: error: too few arguments to function `ssize_t send(int, const void*, size_t, int)' ping.cc:49: error: at this point in file ping.cc: In member function `void PingAgent::recv(Packet*, Handler*)': ping.cc:64: error: `off_ip_' undeclared (first use this function) ping.cc:74: error: `allocpkt' undeclared (first use this function) ping.cc:82: error: invalid conversion from `Packet*' to `int' /usr/include/sys/socket.h:136: error: too few arguments to function `ssize_t send(int, const void*, size_t, int)' ping.cc:82: error: at this point in file ping.cc:93: error: no match for 'operator>>' in 'hdrip->hdr_ip::src_ >> *(Address::instance()->Address::NodeShift_ + 4u)' make: *** [ping.o] Error 1 so sir please help me.looking for your respose kindly. Thank You With Regards, N.ArunKumar (Final Year B.Tech Information Technology) Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/
[ns] Battery Model and Processing Model for sensor networks in ns2
Hi all, I want to simulate sensor networks in ns2. Specifically, I want to model sensor nodes with following capabilities: 1. Sensing channel and sensing model 2. Battery model 3. Processing Power model with processor voltage and frequency. Previously, a part of it was available in ns2 by UCLA in SensorSim at: http://nesl.ee.ucla.edu/projects/sensorsim/ But now they have removed the code from there. If any body has the downloaded code from there or have the battery model and processing model etc., please let me know from where I can get it. I really need that to get my sensor network simulations working. Thanks! Regards, Arslan
[ns] Different page sizes with Web Traffic
Hi, I've made a Web traffic simulation similar to this from "ns-2.33/tcl/ex/web-traffic.tcl". I take the same parameters (e.g. for page inter-arrival time, object number, etc.) and I want to test it with different protocols (TCP NewReno and CUBIC). First test runs show that the page sizes are not the same for *different* protocols. For instance, a test run with one session and 10 pages with NewReno gives me pages of following size (in packets!!!) NewReno CUBIC 170 170 1 1 9 9 1 1 2 2 4 4 1 5 <-- different 5 1 <-- 2 9 <-- 10 1 <-- Anybody who has experience with Web traffic simulations and can tell me the reason? Unfortunatley there is not a lot of literature... Regards, Armin
[ns] join-group method
Where can I find definition of join-group method?
[ns] Phy/WirelessPhy - When can I change the parameters?
I would like to know if the Phy/WirelessPhy parameters can be changed only in the initialization on my tcl script. The reason for that question is because I am trying to change the values of Pt_ and Pt_consume_ from inside my C++ code, but the changes do not take effect in the simulation. To change its values from inside C++ I am using: 41 Tcl &tcl = Tcl::instance(); 54 tcl.evalf("Phy/WirelessPhy set Pt_ %f",Pt_array[tt]); Is that ok? I do not know if I can vary Pt_ and Pt_consume_ after setting them once. Furthermore, can I set different Pt_ and Pt_consume_ for different nodes? Thanks in advance, -- Fernando Henrique Gielow - UFPR - NR2 Computer Science graduation student.
[ns] Routing traces contains seq num=0
Hi, I am simulating 50 nodes wireless communication using DSR. When a route request is sent, the destination generates route reply with the same sequence number as that of route request and sends it to originator. But the thing is in some f the route replies, I am getting sequence number 0. Any body knows what is the reason behind? I am pasting some part of RTR traces where node 1 tries to find route to node 2(with comments). Sequence numbers are in Bold. Please guide.. Thanking You, Manish. #Ring 0 search Identified by -Pe 0->0 s -t 152.560052013 -Hs 1 -Hd -1 -Ni 1 -Nx 288.49 -Ny 51.88 -Nz 0.00 -Ne 1000.00 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 1.255 -Id 2.255 -It DSR -Il 32 -If 0 -Ii 1 -Iv 32 -P dsr -Ph 1 -Pq 1 -Ps 1 -Pp 0 -Pn 1 -Pl 0 -Pe 0->0 -Pw 0 -Pm 0 -Pc 0 -Pb 0->0 #Propagating Route request identified by -Pe 0->16 s -t 152.612531581 -Hs 1 -Hd -1 -Ni 1 -Nx 289.00 -Ny 52.11 -Nz 0.00 -Ne 871.390423 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 1.255 -Id 2.255 -It DSR -Il 32 -If 0 -Ii 4 -Iv 32 -P dsr -Ph 1 -Pq 1 *-Ps 2* -Pp 0 *-Pn 2* -Pl 0 -Pe 0->16 -Pw 0 -Pm 0 -Pc 0 -Pb 0->0 #Entries where route reply, has -Pn= seq num= same as that in route request s -t 152.626917355 -Hs 2 -Hd 40 -Ni 2 -Nx 562.16 -Ny 191.47 -Nz 0.00 -Ne 871.330571 -Nl RTR -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0 -Is 2.255 -Id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Pc 0 -Pb 0->0
[ns] Delaying before sending a message
I need to send lots of messages in a row, but I want to have a delay between them. I was told to use a timer-handler, but I do not know exactly how to do so. How can I, for example, use a timer-handler to wait 0.3s? Thanks, -- Fernando Henrique Gielow - UFPR - NR2 Computer Science graduation student.
[ns] Re : NS2 2.33 allinone on Ubuntu
Hi This is a very useful link to install NS-2.33 on ubuntu: "http://www.jasonernst.com/2008/06/11/ns-233-and-nam-on-ubuntu-804-hardy-heron/"; Hope this helps. --- En date de : Lun 26.1.09, Liz Mwaniki a écrit : De: Liz Mwaniki Objet: [ns] NS2 2.33 allinone on Ubuntu À: ns-users@ISI.EDU Date: Lundi 26 Janvier 2009, 9h09 NS users, I have not used NS2 before, tried installing on red hat but gave me problems. How do I install NS2 2.33 allinone on Ubuntu ? thanks. -- View this message in context: http://www.nabble.com/NS2-2.33-allinone-on-Ubuntu-tp21662320p21662320.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] mSCTP for ns-2
hello, I am a new user of ns-2 simulateur. I am working on a new architecture that implements some scenarios using SCTP + mSCTP protocols. So, I am looking for a mSCTP patch. I wonder if somebody in the mailing list has any information about an implementation of mSCTP for NS-2 ? Many thanks for your help Mazen
[ns] compiling same file names like ll.cc and packet.h
if i have a separate model that already have been done with all necessary files like .cc, .h .tcl , in a new folder . and i need to compile and check. but i am little bit confused , like this model have also varp.cc (modified) and in ns2 main directory their is also another varp.cc , so if this happens then how to compile with little confusion.? should i replace file or ...? thanks Safiya King Faisal Univ. Saudi Arabia
[ns] NS2 2.33 allinone on Ubuntu
NS users, I have not used NS2 before, tried installing on red hat but gave me problems. How do I install NS2 2.33 allinone on Ubuntu ? thanks. -- View this message in context: http://www.nabble.com/NS2-2.33-allinone-on-Ubuntu-tp21662320p21662320.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Error while including wireless-phy.h
Hi, I'm using ns-2.29. When I include a file wireless-phy.h in AODV for certain modifications, it results in following error: [r...@localhost ns-2.29]# make g++ -c -Wall -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_11 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I/usr/local/ns-allinone-2.29/tclcl-1.17 -I/usr/local/ns-allinone-2.29/otcl-1.11 -I/usr/local/ns-allinone-2.29/include -I/usr/local/ns-allinone-2.29/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -o mobile/tworayground.o mobile/tworayground.cc g++ -c -Wall -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_11 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I/usr/local/ns-allinone-2.29/tclcl-1.17 -I/usr/local/ns-allinone-2.29/otcl-1.11 -I/usr/local/ns-allinone-2.29/include -I/usr/local/ns-allinone-2.29/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -o aodv/aodv.o aodv/aodv.cc ./mac/wireless-phy.h:129: error: expected identifier before 'r' ./mac/wireless-phy.h:129: error: expected `}' before 'r' ./mac/wireless-phy.h:129: error: expected unqualified-id before 'r' ./mac/wireless-phy.h: In member function bool& WirelessPhy::Is_node_on(): ./mac/wireless-phy.h:97: error: node_on_ was not declared in this scope ./mac/wireless-phy.h: In member function bool WirelessPhy::Is_sleeping(): ./mac/wireless-phy.h:98: error: status_ was not declared in this scope ./mac/wireless-phy.h: At global scope: ./mac/wireless-phy.h:131: error: no matching function for call to Sleep_Timer::Sleep_Timer() ./mac/wireless-phy.h:58: note: candidates are: Sleep_Timer::Sleep_Timer(WirelessPhy*) ./mac/wireless-phy.h:56: note: Sleep_Timer::Sleep_Timer(const Sleep_Timer&) ./mac/wireless-phy.h:134: error: expected unqualified-id before private ./mac/wireless-phy.h: In function EnergyModel* em(): ./mac/wireless-phy.h:142: error: node was not declared in this scope ./mac/wireless-phy.h: At global scope: ./mac/wireless-phy.h:144: error: friend can only be specified inside a class ./mac/wireless-phy.h:146: error: expected declaration before } token make: *** [aodv/aodv.o] Error 1 I have checked the code many times but still unable to figure out from where the error creeped in. Kindly help. Regards Amita
Re: [ns] How to get the Nodes' coordinate from TCL to C++
Hello Walid, Thanks for replying. Here's the deal : im trying to simulate a WSN with nodes that are not mobile. In a topology.tcl file i have the nodes coordinates stored in the following form: $node_(0) set X_ 60 $node_(0) set Y_ 0 $node_(0) set Z_ 0 $node_(1) set X_ 92 $node_(1) set Y_ 43 $node_(1) set Z_ 0 ... Although i have these coordinates in the tcl files i still need to access them in C++, the reason is because i wanted to find distances between nodes as well as whether some nodes lied in the range of other (so its a couple of loops in C++) so id need something that look like this: for(i=0 ; i: > Hello Mathiew, > > Sorry for the late reply. I guess it would be best if you can explain a > little what you are trying to do. Is every node trying to find its > coordinates only ? > > On Thu, Jan 22, 2009 at 11:48 AM, Mathiew Moussa wrote: > >> Hello Walid, >> >> Thanks for the reply. >> >> You said getting the coordinates from the TCL file easier... i have them >> stored in a topography.tcl file (or so i recall) that has the X Y Z >> coordinates of each sensor. >> >> So what's the way to get them from the TCL file directly to be used in C++ >> ?? >> >> Thanks alot, >> Mathiew >> >> >> >> >> Quoting Waleed Tuffaha : >> >> Hello Mathiew, >>> >>> ( Note that I didn't test this ! ) >>> >>> The "Node class" uses a "Location class" in which the X,Y,Z variables are >>> defined. The "mobilenode class" inherits from the node class. >>> >>> So, if node_ is a pointer to a mobilenode, then you should be able to get >>> the coordinates using: >>> int x,y,z; >>> node_->location_->getLocation(&x, &y, &z) >>> >>> So if you have an array containing pointers to all the nodes then you can >>> loop on the array and get the coordinates for each node. >>> >>> I think that getting the coordinates from Tcl is easier, but I don't know >>> what exactly you are doing. >>> >>> Hope this helps >>> -- Waleed >>> >>> On Thu, Jan 22, 2009 at 9:59 AM, Mathiew Moussa wrote: >>> >>> Dear NS Users, Can someone please tell me how you can retrieve the coordinates of the network nodes from a TCL file into C++. So is their some loop or something that can be written in C++ and traverses all the nodes and gets X, Y, & Z, and how is it written. Hope you can help me. Thanks, Mathiew >>> >> >> >> > > > -- > Waleed Tuffaha. >