[ns] Error while running the tcl script - target_ ...???
Hi all. I am getting this error on running my .tcl file for a newly created protocol. (_o17 cmd line 1) invoked from within "_o17 cmd target _o21" 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 "_o17" line 2) (SplitObject unknown line 2) invoked from within "$agent target [$self set ll_(0)]" (procedure "_o14" line 66) (Node/MobileNode add-target-rtagent line 66) invoked from within "$self add-target-rtagent $agent $port" (procedure "_o14" line 28) (Node/MobileNode add-target line 28) invoked from within "$self add-target $agent $port" (procedure "_o14" line 15) (Node attach line 15) invoked from within "$node attach $ragent [Node set rtagent_port_]" (procedure "_o3" line 84) (Simulator create-wireless-node line 84) invoked from within "_o3 create-wireless-node" ("eval" body line 1) invoked from within "eval $self create-wireless-node $args" (procedure "_o3" line 23) (Simulator node line 23) invoked from within "$ns node" ("for" body line 2) invoked from within "for {set i 0} {$i < $val(nn) } {incr i} { set node_($i) [$ns node] $node_($i) random-motion 0 ;# disable random motion }" (file "simulation.tcl" line 66) Does the line "_o17 cmd target _o21" suggest that the function target is not defined? If so, then in which file should I define the instproc target? Also how should I rectify the other errors? Regards, The Learner -- View this message in context: http://old.nabble.com/Error-while-running-the-tcl-script---target_-...tp28232938p28232938.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] How to call one function out of 2, using set nd [ns node] ???
while creating a new node using the statement- Using this statement set nd [ns node], a function defined in ns-lib.tcl is called(particular to a protocol). In my case I have 2 agents, for different types of nodes and thus two functions in ns-lib.tcl, how shall I specify which function to be called while creating nodes using the statement set nd [ns node]...? Regards, The Learner -- View this message in context: http://old.nabble.com/How-to-call-one-function-out-of-2%2C-using-set-nd--ns-node--tp28219421p28219421.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Error while running the tcl script while implementing a new protocol in ns2
When I run my tcl script, I get the following error- (_o14 cmd line 1) invoked from within "_o14 cmd addr" 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 "_o14" line 2) (SplitObject unknown line 2) invoked from within "_o14 addr" ("eval" body line 1) invoked from within "eval $node addr $args" ("default" arm line 2) invoked from within "switch -exact $routingAgent_ { MSClusterHead { set ragent [$self create-msprotoch-agent $node] } MSDataDiscovery { set ragent [$self create-msprotodd..." (procedure "_o3" line 14) (Simulator create-wireless-node line 14) invoked from within "_o3 create-wireless-node" ("eval" body line 1) invoked from within "eval $self create-wireless-node $args" (procedure "_o3" line 23) (Simulator node line 23) invoked from within "$ns node" ("for" body line 2) invoked from within "for {set i 0} {$i < $val(nn) } {incr i} { set node_($i) [$ns node] $node_($i) random-motion 0 ;# disable random motion }" (file "simulation.tcl" line 60) What does this error mean? And how can I rectify this? Thanks and Regards, The Learner -- View this message in context: http://old.nabble.com/Error-while-running-the-tcl-script-while-implementing-a-new-protocol-in-ns2-tp28219216p28219216.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Value of the Routing protocol [val(rp) ??? ]
Hi all, In the tcl script while setting the options of the node, where should the value of the routing protocol, val(rp), be defined? Is it in the ns-packet.tcl, inside the foreach prot { ... }? I have two different agents in my protocol, and the name I have provided in the ns-packet.tcl file does not match with any of the agents' names. The name I've provided inside the foreach prot { ... MSProto ...} is the name of the Directory inside the ns-2.34 directory wherein all the files of my protocol reside. I want to know if this is correct or the name of the protocol should match with any agent? Thanks and Regards, The Learner -- View this message in context: http://old.nabble.com/Value-of-the-Routing-protocol--val%28rp%29---tp28219215p28219215.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Error with bind() function
Hi all. While issuing the make command after inserting my own protocol in the ns2 directory, I get the following error with bind() function. MSProto/msproto.cc:71: error: call of overloaded ‘bind(const char [10], int)’ is ambiguous /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:177: note: candidates are: void TclObject::bind(const char*, TracedInt*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:178: note: void TclObject::bind(const char*, TracedDouble*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:179: note: void TclObject::bind(const char*, double*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:182: note: void TclObject::bind(const char*, unsigned int*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:183: note: void TclObject::bind(const char*, int*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:185: note: void TclObject::bind(const char*, TclObject**) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:188: note: void TclObject::bind(const char*, int64_t*) make: *** [MSProto/msproto.o] Error 1 Does anybody have any idea what can rectify this error- The line using bind function is - bind("sector_id", §or_id_); Thanking You, The Learner -- View this message in context: http://old.nabble.com/Error-with-bind%28%29-function-tp28188357p28188357.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Error with bind() function.
Hi all. I have coded my own protocol and I get three errors while compiling NS2. I have made the necessary changes in the files packet.h, ns-packet.tcl, ns-default.tcl and ns-lib.tcl. Also priqueue.cc and Makefile.in. The changes are as follows - ~~~packet.h~~~ Defined the following --- static const packet_t PT_MSPROTOCH = 63; static const packet_t PT_MSPROTODD = 64; Added the following in p_info()--- name_[PT_MSPROTOCH] = "msprotoch"; // MS Protocol Cluster Head name_[PT_MSPROTODD] = "msprotodd"; // MS Protocol Data Discovery ~~~ ns-default.tcl ~~~ Agent/MSProtoClusterHead set level_id 0 Agent/MSProtoClusterHead set sector_id 0 ~~~ ns-packet.tcl ~~~ foreach prot { # Common: ###... MSProto # MSProto -Mobile Static Protocol ### } MSProto is the folder inside which all the protocol files reside. I am not sure what else is supposed to be entered here. ~~~ ns-lib.tcl ~~~ Added the following - Simulator instproc create-msprotoch-agent { node } { # Create Cluster Head routing agent set ragent [new Agent/MSClusterHead [$node node-addr]] $self at 0.0 "$ragent start" $node set ragent_ $ragent return $ragent } Simulator instproc create-msprotodd-agent { node } { # Create Data Discovery routing agent set ragent [new Agent/MS [$node node-addr]] $self at 0.0 "$ragent start" $node set ragent_ $ragent return $ragent } Simulator instproc create-wireless-node args { .. MSClusterHead { set ragent [$self create-msprotoch-agent $node] } MSDataDiscovery { set ragent [$self create-msprotodd-agent $node] } .. } MSClusterHead and MSDataDiscovery are the two agents. On compiling I get the following three errors- In file included from MSProto/msproto.cc:5: MSProto/msproto.h:35: error: multiple types in one declaration MSProto/msproto.cc: In constructor ‘MSClusterHead::MSClusterHead(nsaddr_t)’: MSProto/msproto.cc:70: error: no matching function for call to ‘MSClusterHead::bind(const char [9], u_int8_t*)’ /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:177: note: candidates are: void TclObject::bind(const char*, TracedInt*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:178: note: void TclObject::bind(const char*, TracedDouble*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:179: note: void TclObject::bind(const char*, double*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:182: note: void TclObject::bind(const char*, unsigned int*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:183: note: void TclObject::bind(const char*, int*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:185: note: void TclObject::bind(const char*, TclObject**) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:188: note: void TclObject::bind(const char*, int64_t*) MSProto/msproto.cc:71: error: no matching function for call to ‘MSClusterHead::bind(const char [10], u_int8_t*)’ /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:177: note: candidates are: void TclObject::bind(const char*, TracedInt*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:178: note: void TclObject::bind(const char*, TracedDouble*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:179: note: void TclObject::bind(const char*, double*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:182: note: void TclObject::bind(const char*, unsigned int*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:183: note: void TclObject::bind(const char*, int*) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:185: note: void TclObject::bind(const char*, TclObject**) /home/deepti/ns-allinone-2.34/tclcl-1.19/tclcl.h:188: note: void TclObject::bind(const char*, int64_t*) make: *** [MSProto/msproto.o] Error 1 r...@deepti-laptop:/home/deepti/ns-allinone-2.34/ns-2.34# PS: Please find the files attached with this mail. http://old.nabble.com/file/p28162719/msproto.cc msproto.cc http://old.nabble.com/file/p28162719/msproto.h msproto.h http://old.nabble.com/file/p28162719/msprotopkt.h msprotopkt.h Thanks and Regards, The Learner -- View this message in context: http://old.nabble.com/Error-with-bind%28%29-function.-tp28162719p28162719.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Problem with using ./configure command in ns2 while recompiling ns2
for dlopen in -ldl... yes checking dlfcn.h usability... yes checking dlfcn.h presence... yes checking for dlfcn.h... yes checking for ns library name... libns.so checking for struct ether_header... found checking for struct ether_addr... found checking for addr2ascii... no checking for Linux compliant tcphdr... found checking for BSD compliant tcphdr... not found checking for socklen_t... yes checking for main in -lpcap... no checking to make nse... no Explicitly disabling static compilation checking for dlopen in -ldl... (cached) yes checking for a BSD-compatible install... /usr/bin/install -c configure: creating ./config.status config.status: creating Makefile config.status: creating tcl/lib/ns-autoconf.tcl config.status: creating indep-utils/webtrace-conv/ucb/Makefile config.status: creating indep-utils/webtrace-conv/dec/Makefile config.status: creating indep-utils/webtrace-conv/nlanr/Makefile config.status: creating indep-utils/webtrace-conv/epa/Makefile config.status: creating indep-utils/cmu-scen-gen/setdest/Makefile config.status: creating autoconf.h config.status: autoconf.h is unchanged After using this I issued the 'make' command. Now, when I run the ex-linkage.tcl file from the same site, I get the following error - invalid command name "Agent/MyAgentOtcl" while executing "Agent/MyAgentOtcl create _o3 " invoked from within "catch "$className create $o $args" msg" invoked from within "if [catch "$className create $o $args" msg] { if [string match "__FAILED_SHADOW_OBJECT_" $msg] { delete $o return "" } global errorInfo error "class $..." (procedure "new" line 3) invoked from within "new Agent/MyAgentOtcl" invoked from within "set myagent [new Agent/MyAgentOtcl]" (file "ex-linkage.tcl" line 5) r...@deepti-laptop:/home/deepti/NS2/Tcl Scripts# make clear make: *** No rule to make target `clear'. Stop. I have uploaded the ex-linkage.cc and ex-linkage.tcl files. I really seek you help in this. Thank You and Regards, The Learner -- View this message in context: http://old.nabble.com/Problem-with-using-.-configure-command-in-ns2-while-recompiling-ns2-tp28060659p28067571.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Problem with using ./configure command in ns2 while recompiling ns2
Hi all. I am facing problem with using ./configure command in ns2. Here is waht I get, dee...@deepti-laptop:~/ns-allinone-2.34/ns-2.34$ ./configure checking for gcc... gcc checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes No .configure file found in current directory Continuing with default options... checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for ANSI C header files... (cached) yes checking for string.h... (cached) yes checking for main in -lXbsd... no checking for socket in -lsocket... no checking for gethostbyname in -lnsl... yes checking for dcgettext in -lintl... no checking for getnodebyname in -ldnet_stub... no checking that g++ can handle -O2... no checking if C++ libraries work without any namespace... no checking if C++ libraries work with namespace std... yes checking if STL works without any namespace... no checking if STL works with namespace std... yes checking should use STL... yes checking for tcl.h... -I../include checking for tclInt.h... -I../include checking for libtcl8.4... -L../lib -ltcl8.4 checking for init.tcl... ../lib/tcl8.4 checking for http.tcl... ../lib/tcl8.4/http1.0 checking Tcl http.tcl library... yes checking for tclsh8.4.18... no checking for tclsh8.4... ../bin/tclsh8.4 checking for tk.h... -I../include checking for libtk8.4... -L../lib -ltk8.4 checking for tk.tcl... ../lib/tk8.4 checking for otcl.h... -I../otcl-1.13 checking for libotcl1.13... -L../otcl-1.13 -lotcl checking for tclcl.h... -I../tclcl-1.19 checking for libtclcl... no checking for tcl2c++... /usr/bin configure: error: Installation of tclcl seems incomplete or can't be found automatically. Please correct the problem by telling configure where tclcl is using the argument --with-tclcl=/path/to/package (perhaps after installing it), or the package is not required, disable it with --with-tclcl=no. How do I check if the installation of tclcl is done or not? And if yes, what is the path//? If not, then how do I install it? Thank You, The Learner -- View this message in context: http://old.nabble.com/Problem-with-using-.-configure-command-in-ns2-while-recompiling-ns2-tp28060659p28060659.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] How to recomplie ns2 using make command?
After using /.configure command, I get the following error - configure: error: Installation of tclcl seems incomplete or can't be found automatically. Please correct the problem by telling configure where tclcl is using the argument --with-tclcl=/path/to/package (perhaps after installing it), or the package is not required, disable it with --with-tclcl=no. How do I check if tclcl is installed in ununbtu 9.10? If not what should I do? Regards, The Learner -- View this message in context: http://old.nabble.com/How-to-recomplie-ns2-using-make-command--tp27950947p28045359.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Is common header a must in a packet and address type defined in config.h
Thank you for your reply sir. I came to know that the value of ch->addr_type is NS_AF_INET(for internet protocol). It's value can be NS_AS_NONE; NS_AF_ILINK depending on what protocol is being implemented. While implementing a new protocol, how to decide what type should this be? If the address is also of the type nsaddr_t(u_int32_t), the value of ch->addr_type changes or remains same (NS_AF_INET)? -- View this message in context: http://old.nabble.com/Is-common-header-a-must-in-a-packet-and-address-type-defined-in-config.h-tp28024535p28033299.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Is common header a must in a packet and address type defined in config.h
I want to know if using common header in packet is a must? If I create my own packet header and do not include common header in my packet, will it create any trouble? Since I am working on a routing protocol for wireless sensor networks, the addresses can't be of the type u_int32_t, so I created my own type(typedef u_int8_t msaddr_t) in the config.h file. Will it siuffice or I need to do some other things to make ns2 work with this type of address? Thank You, The Learner -- View this message in context: http://old.nabble.com/Is-common-header-a-must-in-a-packet-and-address-type-defined-in-config.h-tp28024535p28024535.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Common header definition inside ns2 directory
Hi. Can there be multiple packet headers for a protocol implementation in ns2? i.e, a packet header while sending broadcast in the network and another packet header while sending data, and another packet header for sending another type of broadcast...? If thats the case, then I just need to define various constants for each packet header,(PT_HDR1, PT_HDR2...etc). and use ch->ptype == PT_HDR1 to check the type of header in a packet. Please correct me if I am wrong. Thank You, The Learner. -- View this message in context: http://old.nabble.com/Common-header-definition-inside-ns2-directory-tp27985812p27996580.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Common header definition inside ns2 directory
Hi. Which file in NS2 contains the definition of the common header (hdr_cmn)??? -- View this message in context: http://old.nabble.com/Common-header-definition-inside-ns2-directory-tp27985812p27985812.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Directional Antenna support in ns2.34?
Hi all. I would like to know if ns-allinone-2.34 (2.34 version) provides support for Directional Antenna? Which file I should check for the in ns2 directory? Regards, The Learner. -- View this message in context: http://old.nabble.com/Directional-Antenna-support-in-ns2.34--tp27975754p27975754.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] How to recomplie ns2 using make command?
what is the procedure to recompile ns2 using make command? -- View this message in context: http://old.nabble.com/How-to-recomplie-ns2-using-make-command--tp27950947p27950947.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] How to recomplie ns2 using make command?
-- View this message in context: http://old.nabble.com/How-to-recomplie-ns2-using-make-command--tp27950946p27950946.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Make file
Hi all While trying a new protocol, we need to make changes in the makefile. There are multiple makefiles( with extensions, .in, .vc), in which makefile am i suppose to add the object file list? and where? Also why should this be added? Thank You, The Learner -- View this message in context: http://old.nabble.com/Make-file-tp27950929p27950929.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Addressing of nodes while implementation of a routing protocol in Wireless sensor networks in NS2
Hi all. I am facing below mentioned issues with addressing of the nodes while implementing a routing protocol in Wireless Sensor networks. If I want all the nodes in Wireless Sensor networks to forward/Route the data to the same node (Base Station) always, then I should add the address of the base station as the destination address in the ip header, Rite? Now how do I know the address of the base station while implementing the protocol??? Also how to implement fixed routing in NS2 for wireless sensor networks? The protocol uses two functionalities wherein the data generator node needs to broadcast a query to know the next hop and after knowing the next hop, it needs to forward the data to the final destination using a fixed route. How do I implement fixed routing in coding? The problem I am facing is with the addressing, If in the above case, I will add the address of node2 as the destination address, how do I know the address of node2 while implementing the code? Thank You, The Learner -- View this message in context: http://old.nabble.com/Addressing-of-nodes-while-implementation-of-a-routing-protocol-in-Wireless-sensor-networks-in-NS2-tp27929848p27929848.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Addressing of nodes.
-- View this message in context: http://old.nabble.com/Addressing-of-nodes.-tp27886731p27886731.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Number of agent classes and the constants.
Thank You for your reply, But what I mean to ask is, as given in the pdf, nstr-how_to.pdf, the one which implements protoname protocol, the class Protoname derives from class Agent, and the constructor of Agent class is passed with the argument, PT_PROTONAME which is a constant. In my case, I create three different classes (to represent three different agents to be used for three different types of nodes) and each class derives from the Agent class. Now when the constructor of these classes are called, the parameter passed in the Agent class must be same or different in the three cases...? Regards, The Learner -- View this message in context: http://old.nabble.com/Number-of-agent-classes-and-the-constants.-tp27874121p27874739.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Number of agent classes and the constants.
Hi all! In my protocol, there are three types of nodes performing different functions, and thus I'll have to create three different agent classes. Rite? Now my doubt is while implementing these three different (programmer defined) agent classes, the constant passed in the constructor of the Agent class will be different or a same value for all the three classes? Hope to get a reply soon. Regards, The Learner. -- View this message in context: http://old.nabble.com/Number-of-agent-classes-and-the-constants.-tp27874121p27874121.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Implementing a new protocol in NS2
Hi all. I am a newbie in NS2. I need your help in guiding me as to how should I implement my own protocol in Wireless sensor networks in NS2. How should I proceed ? What is it that I need to know priori implementation of new protocol. I know the scripting in tcl by reading the document - http://www.isi.edu/nsnam/ns/tutorial/ but I am not clear with the C code it uses to implement the new protocol in NS2. Kindly guide me with the same asap. Thank You. Regards, The Learner... -- View this message in context: http://old.nabble.com/Implementing-a-new-protocol-in-NS2-tp27803359p27803359.html Sent from the ns-users mailing list archive at Nabble.com.