[ns] [bug] zrp impementaion in ns-2

anshul anshul2009 at gmail.com
Tue Mar 24 18:55:50 PDT 2009


[Bug Report]

-----------------------------
Category:  Other
Package:   ns ns-2.31
OS:        fedora core
Environment Variables:
LD_LIBRARY_PATH=
TCL_LIBRARY=
TK_LIBRARY=


-----------------------------
Description:

while compliling zrp on ns-2 i am getting the following error

zrp/zrp_table.h:192: error: extra qualification ‘RoutingTable::’ on member ‘compute_routes’ 
zrp/zrp_table.h: In member function ‘int RoutingTable::next_hop_to(nsaddr_t)’:
with many warnings.i am attaching the snap of the make when run on ns-2. i hav already modified the files like 

packet.h,
cmu-trace.h,
cmu-trace.cc.
ns-packet.tcl,
ns-default.tcl,
ns-lib.tcl,
ns-agent.tcl as given in the code for cornell implementation of zrp.

                 make snap

make -k 


g++ -c -Wall  -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR  -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 -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/home/hero/final2/ns-allinone-2.31/tclcl-1.19 -I/home/hero/final2/ns-allinone-2.31/otcl-1.13 -I/home/hero/final2/ns-allinone-2.31/include -I/home/hero/final2/ns-allinone-2.31/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 zrp/zrp.o zrp/zrp.cc 


In file included from zrp/zrp.cc:7: 


zrp/zrp.h:29:1: warning: "NULL" redefined 


In file included from /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/cstddef:50, 


                 from /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/cstdlib:51, 


                 from ./mobile/energy-model.h:42, 


                 from ./common/node.h:59, 


                 from ./mobile/god.h:53, 


                 from ./trace/cmu-trace.h:43, 


                 from zrp/zrp.cc:5: 


/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h:400:1: warning: this is the location of the previous definition 


zrp/zrp.cc:41:1: warning: "IERP_REQUEST_TIMEOUT" redefined 


In file included from zrp/zrp.cc:7: 


zrp/zrp.h:35:1: warning: this is the location of the previous definition 


zrp/zrp.cc:49:1: warning: "MAX_ROUTE_LENGTH" redefined 


zrp/zrp.cc:33:1: warning: this is the location of the previous definition 


zrp/zrp_table.h: In constructor ‘link_struct::link_struct()’: 


zrp/zrp_table.h:100: warning: ‘link_struct::seq_’ will be initialized after 


zrp/zrp_table.h:99: warning:   ‘int link_struct::isup_’ 


zrp/zrp_table.h:82: warning:   when initialized here 


zrp/zrp_table.h: In constructor ‘rtable_entry::rtable_entry()’: 


zrp/zrp_table.h:160: warning: ‘rtable_entry::next_’ will be initialized after 


zrp/zrp_table.h:158: warning:   ‘Time rtable_entry::expiry_’ 


zrp/zrp_table.h:161: warning:   when initialized here 


zrp/zrp_table.h: In constructor ‘rtable_entry::rtable_entry(nsaddr_t)’: 


zrp/zrp_table.h:160: warning: ‘rtable_entry::next_’ will be initialized after 


zrp/zrp_table.h:158: warning:   ‘Time rtable_entry::expiry_’ 


zrp/zrp_table.h:162: warning:  when initialized here 


zrp/zrp_table.h: At global scope: 


zrp/zrp_table.h:192: error: extra qualification ‘RoutingTable::’ on member ‘compute_routes’ 


zrp/zrp_table.h: In member function ‘int RoutingTable::next_hop_to(nsaddr_t)’: 


zrp/zrp_table.h:204: warning: no return statement in function returning non-void 


zrp/zrp.cc: In member function ‘void ZRPAgent::print_routes()’: 


zrp/zrp.cc:79: warning: too many arguments for format 


zrp/zrp.h: In constructor ‘ZRPAgent::ZRPAgent()’: 


zrp/zrp.h:266: warning: ‘ZRPAgent::suspend_flag_’ will be initialized after 


zrp/zrp.h:195: warning:   ‘ZRPPeriodicUpdateTimer ZRPAgent::PeriodicUpdateTimer_’ 


zrp/zrp.cc:153: warning:   when initialized here 


zrp/zrp.h:272: warning: ‘ZRPAgent::rtable’ will be initialized after 


zrp/zrp.h:247: warning:   ‘int ZRPAgent::myaddr_’ 


zrp/zrp.cc:153: warning:   when initialized here 


zrp/zrp.h:247: warning: ‘ZRPAgent::myaddr_’ will be initialized after 


zrp/zrp.h:185: warning:   ‘char* ZRPAgent::myid_’ 


zrp/zrp.cc:153: warning:   when initialized here 


zrp/zrp.h:264: warning: ‘ZRPAgent::qid_’ will be initialized after 


zrp/zrp.h:248: warning:   ‘int ZRPAgent::radius_’ 


zrp/zrp.cc:153: warning:   when initialized here 


zrp/zrp.h: In constructor ‘ZRPAgent::ZRPAgent(nsaddr_t)’: 


zrp/zrp.h:266: warning: ‘ZRPAgent::suspend_flag_’ will be initialized after 


zrp/zrp.h:195: warning:   ‘ZRPPeriodicUpdateTimer ZRPAgent::PeriodicUpdateTimer_’ 


zrp/zrp.cc:178: warning:   when initialized here 


zrp/zrp.h:272: warning: ‘ZRPAgent::rtable’ will be initialized after 


zrp/zrp.h:247: warning:   ‘int ZRPAgent::myaddr_’ 


zrp/zrp.cc:178: warning:   when initialized here 


zrp/zrp.h:247: warning: ‘ZRPAgent::myaddr_’ will be initialized after 


zrp/zrp.h:185: warning:   ‘char* ZRPAgent::myid_’ 


zrp/zrp.cc:178: warning:   when initialized here 


zrp/zrp.h:264: warning: ‘ZRPAgent::qid_’ will be initialized after 


zrp/zrp.h:248: warning:   ‘int ZRPAgent::radius_’ 


zrp/zrp.cc:178: warning:   when initialized here 


zrp/zrp.h:257: warning: ‘ZRPAgent::neighbortable_scan_period_’ will be initialized after 


zrp/zrp.h:256: warning:   ‘int ZRPAgent::iarp_update_period_’ 


zrp/zrp.cc:178: warning:   when initialized here 


zrp/zrp.cc: In member function ‘virtual int ZRPAgent::command(int, const char* const*)’: 


zrp/zrp.cc:335: warning: unused variable ‘str’ 


zrp/zrp.cc: In member function ‘Packet* ZRPAgent::pkt_create(ZRPTYPE, nsaddr_t, int)’: 


zrp/zrp.cc:428: warning: unused variable ‘s’ 


zrp/zrp.cc: In member function ‘void ZRPAgent::pkt_add_link(Packet*, nsaddr_t, nsaddr_t, int)’: 


zrp/zrp.cc:570: warning: unused variable ‘ns’ 


zrp/zrp.cc:572: warning: unused variable ‘seq_stamp’ 


zrp/zrp.cc: In member function ‘void ZRPAgent::pkt_add_all_links(Packet*)’: 


zrp/zrp.cc:594: warning: unused variable ‘num_entries’ 


zrp/zrp.cc:597: warning: unused variable ‘seq_stamp’ 


zrp/zrp.cc: In member function ‘void ZRPAgent::pkt_send(Packet*, nsaddr_t)’: 


zrp/zrp.cc:625: warning: unused variable ‘hdrz’ 


zrp/zrp.cc: In member function ‘void ZRPAgent::pkt_read_update(Packet*, link_struct*, int)’: 


zrp/zrp.cc:652: warning: unused variable ‘lnew’ 


zrp/zrp.cc: In member function ‘void ZRPAgent::pkt_broadcast(Packet*)’: 


zrp/zrp.cc:670: warning: unused variable ‘hdrz’ 


zrp/zrp.cc: In member function ‘void ZRPAgent::pkt_add_node(Packet*, nsaddr_t, int)’: 


zrp/zrp.cc:691: warning: unused variable ‘num_entries’ 


zrp/zrp.cc:692: warning: unused variable ‘ptr’ 


zrp/zrp.cc: In member function ‘int ZRPAgent::add_outer_route(Packet*, nsaddr_t)’: 


zrp/zrp.cc:808: warning: unused variable ‘tmp’ 


zrp/zrp.cc: In member function ‘virtual void ZRPBeaconTransmitTimer::handle(Event*)’: 


zrp/zrp.cc:872: warning: unused variable ‘address’ 


zrp/zrp.cc: In member function ‘void ZRPAgent::scan_query_detections()’: 


zrp/zrp.cc:933: warning: unused variable ‘entr’ 


zrp/zrp.cc: In member function ‘virtual void ZRPNeighborScanTimer::handle(Event*)’: 


zrp/zrp.cc:1007: warning: unused variable ‘nstemp’ 


zrp/zrp.cc:1008: warning: unused variable ‘tmp’ 


zrp/zrp.cc:1015: warning: unused variable ‘seq_stamp’ 


zrp/zrp.cc:1015: warning: unused variable ‘num_entries’ 


zrp/zrp.cc: In member function ‘virtual void ZRPPeriodicUpdateTimer::handle(Event*)’: 


zrp/zrp.cc:1108: warning: unused variable ‘s’ 


zrp/zrp.cc: In member function ‘void ZRPAgent::do_update()’: 


zrp/zrp.cc:1123: warning: unused variable ‘hdrz’ 


zrp/zrp.cc: In member function ‘virtual void ZRPAckTimer::handle(Event*)’: 


zrp/zrp.cc:1181: warning: unused variable ‘nstemp’ 


zrp/zrp.cc:1182: warning: unused variable ‘tmp’ 


zrp/zrp.cc:1190: warning: unused variable ‘seq_stamp’ 


zrp/zrp.cc:1190: warning: unused variable ‘num_entries’ 


zrp/zrp.cc:1282: warning: label ‘EOFF’ defined but not used 


zrp/zrp.cc: In member function ‘void ZRPAgent::scan_ierp_cache()’: 


zrp/zrp.cc:1293: warning: unused variable ‘entr’ 


zrp/zrp.cc: In member function ‘void ZRPAgent::ierp_notify_iarp(Packet*)’: 


zrp/zrp.cc:1314: warning: unused variable ‘daddr’ 


zrp/zrp.cc: In member function ‘virtual void ZRPAgent::recv(Packet*, Handler*)’: 


zrp/zrp.cc:1506: warning: unused variable ‘hdrz’ 


zrp/zrp.cc:1508: warning: unused variable ‘dst’ 


zrp/zrp.cc: In member function ‘void ZRPAgent::recvZRP(Packet*)’: 


zrp/zrp.cc:1651: warning: zero-length printf format string 


zrp/zrp.cc:1706: warning: zero-length printf format string 


zrp/zrp.cc:1861: warning: too many arguments for format 


zrp/zrp.cc:1582: warning: unused variable ‘src’ 


zrp/zrp.cc:1583: warning: unused variable ‘dst’ 


zrp/zrp.cc:1590: warning: unused variable ‘nptr’ 


zrp/zrp.cc:1591: warning: unused variable ‘mptr’ 


zrp/zrp.cc:1597: warning: unused variable ‘walk’ 


zrp/zrp.cc:1598: warning: unused variable ‘joe’ 


zrp/zrp.cc:1599: warning: unused variable ‘currlink’ 


zrp/zrp.cc:1603: warning: unused variable ‘s’ 


zrp/zrp.cc: In member function ‘void ZRPAgent::originate_request(nsaddr_t, int)’: 


zrp/zrp.cc:2146: warning: unused variable ‘hdrip’ 


zrp/zrp.cc:2136: warning: unused variable ‘s’ 


zrp/zrp.cc: In member function ‘void ZRPAgent::route_pkt(Packet*, nsaddr_t)’: 


zrp/zrp.cc:2210: warning: unused variable ‘rrr’ 


zrp/zrp.cc: In member function ‘int ZRPAgent::add_local_route(Packet*, nsaddr_t)’: 


zrp/zrp.cc:2291: warning: unused variable ‘ptr’ 


zrp/zrp.cc: In member function ‘int ZRPAgent::node_is_covered(nsaddr_t, int, nsaddr_t)’: 


zrp/zrp.cc:2407: warning: unused variable ‘ptr’ 


zrp/zrp.cc: In member function ‘int ZRPAgent::query_detect1(int, nsaddr_t, nsaddr_t, int)’: 


zrp/zrp.cc:2527: warning: zero-length printf format string 


make: *** [zrp/zrp.o] Error 1 


g++ -c -Wall  -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR  -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 -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/home/hero/final2/ns-allinone-2.31/tclcl-1.19 -I/home/hero/final2/ns-allinone-2.31/otcl-1.13 -I/home/hero/final2/ns-allinone-2.31/include -I/home/hero/final2/ns-allinone-2.31/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 zrp/zrp_table.o zrp/zrp_table.cc 


In file included from zrp/zrp_table.cc:18: 


zrp/zrp.h:29:1: warning: "NULL" redefined 


In file included from /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/cstddef:50, 


                 from /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/cstdlib:51, 


                 from ./mobile/energy-model.h:42, 


                 from ./common/node.h:59, 


                 from ./mac/channel.h:47, 


                 from ./mac/phy.h:60, 


                 from ./mac/mac.h:48, 


                 from zrp/zrp_table.cc:12: 


/usr/lib/gcc/i386-redhat-linux/4.1.2/include/stddef.h:400:1: warning: this is the location of the previous definition 


zrp/zrp_table.h: In constructor ‘link_struct::link_struct()’: 


zrp/zrp_table.h:100: warning: ‘link_struct::seq_’ will be initialized after 


zrp/zrp_table.h:99: warning:   ‘int link_struct::isup_’ 


zrp/zrp_table.h:82: warning:   when initialized here 


zrp/zrp_table.h: In constructor ‘rtable_entry::rtable_entry()’: 


zrp/zrp_table.h:160: warning: ‘rtable_entry::next_’ will be initialized after 


zrp/zrp_table.h:158: warning:   ‘Time rtable_entry::expiry_’ 


zrp/zrp_table.h:161: warning:   when initialized here 


zrp/zrp_table.h: In constructor ‘rtable_entry::rtable_entry(nsaddr_t)’: 


zrp/zrp_table.h:160: warning: ‘rtable_entry::next_’ will be initialized after 


zrp/zrp_table.h:158: warning:   ‘Time rtable_entry::expiry_’ 


zrp/zrp_table.h:162: warning:   when initialized here 


zrp/zrp_table.h: At global scope: 


zrp/zrp_table.h:192: error: extra qualification ‘RoutingTable::’ on member ‘compute_routes’ 


zrp/zrp_table.h: In member function ‘int RoutingTable::next_hop_to(nsaddr_t)’: 


zrp/zrp_table.h:204: warning: no return statement in function returning non-void 


zrp/zrp_table.cc: In member function ‘void RoutingTable::compute_routes(nsaddr_t, int)’: 


zrp/zrp_table.cc:247: warning: unused variable ‘now’ 


zrp/zrp_table.cc:248: warning: unused variable ‘tmp’ 


make: *** [zrp/zrp_table.o] Error 1 


/home/hero/final2/ns-allinone-2.31/bin/tclsh8.4 bin/tcl-expand.tcl tcl/lib/ns-lib.tcl tcl/lib/ns-diffusion.tcl tcl/delaybox/delaybox.tcl tcl/packmime/packmime.tcl | ../tclcl-1.19/tcl2c++ et_ns_lib > gen/ns_tcl.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_13 -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/home/hero/final2/ns-allinone-2.31/tclcl-1.19 -I/home/hero/final2/ns-allinone-2.31/otcl-1.13 -I/home/hero/final2/ns-allinone-2.31/include -I/home/hero/final2/ns-allinone-2.31/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 gen/ns_tcl.o gen/ns_tcl.cc 


./common/ptypes2tcl > gen/ptypes.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_13 -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/home/hero/final2/ns-allinone-2.31/tclcl-1.19 -I/home/hero/final2/ns-allinone-2.31/otcl-1.13 -I/home/hero/final2/ns-allinone-2.31/include -I/home/hero/final2/ns-allinone-2.31/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 gen/ptypes.o gen/ptypes.cc 


for i in indep-utils/cmu-scen-gen/setdest indep-utils/webtrace-conv/dec indep-utils/webtrace-conv/epa indep-utils/webtrace-conv/nlanr indep-utils/webtrace-conv/ucb; do ( cd $i; make all; ) done 


make[1]: Entering directory `/home/hero/final2/ns-allinone-2.31/ns-2.31/indep-utils/cmu-scen-gen/setdest' 


make[1]: Nothing to be done for `all'. 


make[1]: Leaving directory `/home/hero/final2/ns-allinone-2.31/ns-2.31/indep-utils/cmu-scen-gen/setdest' 


make[1]: Entering directory `/home/hero/final2/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/dec' 


make[1]: Nothing to be done for `all'. 


make[1]: Leaving directory `/home/hero/final2/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/dec' 


make[1]: Entering directory `/home/hero/final2/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/epa' 


make[1]: Nothing to be done for `all'. 


make[1]: Leaving directory `/home/hero/final2/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/epa' 


make[1]: Entering directory `/home/hero/final2/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/nlanr' 


make[1]: Nothing to be done for `all'. 


make[1]: Leaving directory `/home/hero/final2/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/nlanr' 


make[1]: Entering directory `/home/hero/final2/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/ucb' 


make[1]: Nothing to be done for `all'. 


make[1]: Leaving directory `/home/hero/final2/ns-allinone-2.31/ns-2.31/indep-utils/webtrace-conv/ucb' 


make: Target `all' not remade because of errors.



More information about the Ns-users mailing list