How to create a new agent in NS2. You can use any version of the Simulator. The following codes will make you to understand the writing of a sample agent.
Requirements:
- NS2 Simulator
- A tcl file to test the compiled agent
If any two values are supplied from the TCL file, the agent computes the Surface area of the Cylinder which is nothing but (2* PI * r * h). The supplied values from TCL file are r and h.
How to do that.
1. Copy the newagent.cc (given below ) file in ~ns-allinone-2.34/ns-2.34/newfolder
2. Make an entry in the ~ns-2.34/Makefile.in
Make an entry in the OBJ_CC =
newfolder/newagent.o \
3. in the shell prompt, go to ~ns-2.34 and give the command
./configure
make
4. run the file agent_new.tcl (given below)
you can see the output
Here is the C++ code to be written and compiled
//Name of the file is newagent.cc and put it in a folder inside ~ns-2.34/newfolder/
#include <stdio.h>
#include <string.h>
#include "agent.h"
class TSPAgent : public Agent {
public:
TSPAgent();
protected:
int command(int argc, const char*const* argv);
private:
int tsp_var1;
double tsp_var2;
void TSPPrivFunc(void);
};
static class TSPAgentClass : public TclClass {
public:
TSPAgentClass() : TclClass("Agent/TSPAgentOtcl") {}
TclObject* create(int, const char*const*) {
return(new TSPAgent());
}
} class_tsp_agent;
TSPAgent::TSPAgent() : Agent(PT_UDP) {
bind("tsp_var1_otcl", &tsp_var1);
bind("tsp_var2_otcl", &tsp_var2);
}
int TSPAgent::command(int argc, const char*const* argv) {
if(argc == 2) {
if(strcmp(argv[1], "call-tsp-priv-func") == 0) {
TSPPrivFunc();
return(TCL_OK);
}
}
return(Agent::command(argc, argv));
}
void TSPAgent::TSPPrivFunc(void) {
Tcl& tcl = Tcl::instance();
tcl.eval("puts \"Message From TSPPrivFunc\"");
tcl.evalf("puts \" Area of the Cylinder is = %f\"", tsp_var1*tsp_var2*2*3.14);
}
TCL Code to Test the above C++ Program (Agent)
# Create MyAgent (This will give two warning messages that
set myagent [new Agent/TSPAgentOtcl]
# Set configurable parameters of MyAgent
$myagent set tsp_var1_otcl 2
$myagent set tsp_var2_otcl 6.5
# Give a command to MyAgent
$myagent call-tsp-priv-func
Sir
ReplyDeletecan you please tell me how to implement fuzzy logic rules and membership functions in network simulator2
Sir
ReplyDeleteI am working in wireless sensor networks. Can you guide me about scenario generation in ns2.
I did not understand how ı will run the file agent_new.tcl
ReplyDeleteI created new agent Application i made appropriate changes in Makefile.in but still it is giving me error :
ReplyDeleteinvalid command name "Application/Test"
while executing
"Application/Test create _o59 _o10"
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 ""
I am having same problem as posted above :( Please help
ReplyDeleteI am having same problem, i.e., "invalid command name". I am using ns2.35 with ubuntu. can anyone help me please
ReplyDeleteshow me the exact output or send me the files that you have used for recompilation
DeleteThis comment has been removed by the author.
DeleteThis comment has been removed by the author.
Deletein terminal give like this
Delete./configure
make
make install
Hello Pradeepkumar!!
ReplyDeleteBelow is the code and output.
--------------------------------------------
My exlinkage.cc file is:
#include
#include
#include "agent.h"
class MyAgent : public Agent {
public:
MyAgent();
protected:
int command(int argc, const char*const* argv);
private:
int my_var1;
double my_var2;
void MyPrivFunc(void);
};
static class MyAgentClass : public TclClass {
public:
MyAgentClass() : TclClass("Agent/MyAgentOtcl") {}
TclObject* create(int, const char*const*) {
return(new MyAgent());
}
} class_my_agent;
MyAgent::MyAgent() : Agent(PT_UDP) {
bind("my_var1_otcl", &my_var1);
bind("my_var2_otcl", &my_var2);
}
int MyAgent::command(int argc, const char*const* argv) {
if(argc == 2) {
if(strcmp(argv[1], "call-my-priv-func") == 0) {
MyPrivFunc();
return(TCL_OK);
}
}
return(Agent::command(argc, argv));
}
void MyAgent::MyPrivFunc(void) {
Tcl& tcl = Tcl::instance();
tcl.eval("puts \"Message From MyPrivFunc\"");
tcl.evalf("puts \" my_var1 = %d\"", my_var1);
tcl.evalf("puts \" my_var2 = %f\"", my_var2);
}
----------------------------------------------------------
The corresponding tcl file is, ex-linkage.tcl:
set myagent [new ./Agent/MyAgentOtcl]
# Set configurable parameters of MyAgent
$myagent set my_var1_otcl 2
$myagent set my_var2_otcl 3.14
# Give a command to MyAgent
$myagent call-my-priv-func
----------------------------------------------------------
And the output after running is:
~/ns-allinone-2.35/ns-2.35/common$ ns ex-linkage.tcl
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 7)
--------------------------------------------
I saved the file in ns2.35/common and made the required changes in makefile.in.
Thanks in advance
--
Bilal
hi bilal,
Deletechange the folloiwng line to
set myagent [new ./Agent/MyAgentOtcl]
this line
set myagent [new Agent/MyAgentOtcl]
Thanks for your quick reply.
Deletebut it still doesn't work.
almost the same error
~/ns-allinone-2.35/ns-2.35/common$ ns ex-linkage.tcl
invalid command name "Agent/MyAgentOtcl"
while executing..
but it is executing in my machine. have you recompiled the .cc code. check for the .o file which was created from your .cc file.
DeleteYes,I checked the .o in makefile.in, it is correct. I also executed configure and make commands. The problems is still there.
DeleteI also used different directories to test my code. I saved .cc and .tcl files in ns-allinone-2.35/ns-2.35 but failed then i tried saving these files in ns-allinone-2.35/ns-2.35/common yet they didn't work.
Any other reason for failure, like ubuntu version etc..??
Since the error is "failed shadow object" it means the object is not known to the tcl file. in the Makefile.in, in which variable you set the .o. you have to set the .o entry in the OBJ_CC varaible.
DeleteI put it under OBJ_CC. Here it is:
DeleteOBJ_CC = \
common/ex-linkage.o \
I had the same problem. I run only configure and make commands. But when i run make install it worked for me.
DeleteHe is right ....after the configure command try - sudo make install in ns2.35.
Deletethen run your tcl file it will work.
Dear sir,
ReplyDeletei have encountered the following error while trying to run a tcl script for wireless networks...
num_nodes is set 25
can't read "node_(0)": no such variable
while executing
"$node_($j) set X_ $k"
("for" body line 2)
invoked from within
"for {set j 0} {$j < 5 } {incr j} {
$node_($j) set X_ $k
$node_($j) set Y_ 5.0
$node_($j) set Z_ 0.0
incr k 10
} "
(file "test.tcl" line 60)
this is the part of the code that is having the problem
# Configure node position - assume static node
set k 5
for {set j 0} {$j < 5} {incr j} {
$node_($j) set X_ $k
$node_($j) set Y_ 5.0
$node_($j) set Z_ 0.0
incr k 10
}
set l 5
for {set j 5} {$j < 10} {incr j} {
$node_($j) set X_ $l
$node_($j) set Y_ 15.0
$node_($j) set Z_ 0.0
incr l 10
}
set m 5
for {set j 10} {$j < 15} {incr j} {
$node_($j) set X_ $m
$node_($j) set Y_ 25.0
$node_($j) set Z_ 0.0
incr m 10
}
set n 5
for {set j 15} {$j < 20} {incr j} {
$node_($j) set X_ $n
$node_($j) set Y_ 35.0
$node_($j) set Z_ 0.0
incr n 10
}
set o 5
for {set j 20} {$j < $val(nn)} {incr j} {
$node_($j) set X_ $o
$node_($j) set Y_ 45.0
$node_($j) set Z_ 0.0
incr o 10
}
for {set i 0} {$i < $val(nn) } {incr i} {
$ns initial_node_pos $node_($i) 3
}
Sir, kindly help me rectify the problem...
thanks for your time..
thanks for your time
this part of the code is correct, send me the code where you have created the node. the issue is there only. if you want to send, send it to tspembedded @ gmail dot com.
DeleteSir kindly check your mail..i have sent the file..my email is eliza.maxwell17@gmail.com
DeleteHey Liz, check your email for corrected code.
DeleteHello everyone,
ReplyDeleteIs there any means to access the port number of an agent? if I have an agent creation like the following
MyAgentClass() : TclClass("Agent/MyAgentOtcl") {}
TclObject* create(int, const char*const*) {
return(new MyAgent());
}
How can I access the port number of this agent instance in c++?
hi, i try send a broadcast packet on new agent, but i dont made
ReplyDeleteany idea
tks
Gabriel
sir ,do have any example daytimeserver kind of app code in c++ created and attached with the node and called from tcl??
ReplyDeletei.e .creating a sample application using c++ and calling from tcl??
i dont have a code like that, but it is possible to implement
ReplyDeletesir,
Deletebecause multimedia kind of apps r complex in nature & difficult to understand ,so like simple TSPAgent example,we need it for Application also.
i have code for Multimedia app also, which runs on UDP with five different rates of streaming....
Deletesir
DeleteIs it possible to implement cross layer approach like, i want to implement Tcp protocol above RTP protocol so that i can improve the performance of RTP ???
Sir,
ReplyDeleteI am in need of cbrp implementation for ns2 . I have to make changes in the existing protocol implementation ,but i am not able to find cbrp patch for ns2 .Can you help or suggest any method how to implement cluster head election process in ns2 ?
Hi Sir
ReplyDeleteI am doing my master project "Performance analysis for VoIP - User level" on NS2.
I am looking for a VoIP code. kindly suggest me a simple voip topology..
Thanks,
Justin
I Created a new agent in ns2.35. While compiling tcl file im getting the following errors
ReplyDeleteinvalid command name "Mac/RRfid"
while executing
"Mac/RRfid create _o19 "
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 $mactype"
(procedure "_o14" line 10)
(Node/MobileNode add-interface line 10)
invoked from within
"$node add-interface $chan $propInstance_ $llType_ $macType_ $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_ $inerrProc_ $outerrProc_ $FECProc_"
(procedure "_o3" line 83)
(Simulator create-wireless-node line 83)
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"
invoked from within
"set n(0) [$ns node]"
Please tell some solution for this error. Thanks
there is line Mac/RRfid, a new mac protocol wud have been developed and u need to compile ns2 first by including the above protocol and then u run the tcl file.
Deletesir
DeleteActually my concept is to create a new agent that supports RFID concept. For that I have .cc and .h file for reader and tag (ie rfidragent.cc,rfidragent.h, rfidtagent.cc, rfidtagent.h) and also have rmac.cc, rmac.h ,tmac.cc, tmac.h and rfid_hdr.I have added that new mac protocol. Still im getting the same error.
actually __FAILED_SHADOW_OBJECT_" means either the name used in the TclClass("") is not matching with your tcl or during recompilation there was some error, if you can share ur code, you may send it to tspembedded @ gmail .com so that i will recompile and correct ur error.
Deletesir
Deletei also got the same error.
Sir,
DeleteI made the changes u told, still im getting the same error.
Sir
ReplyDeleteI have mailed my coding to ur mail id. Thank you
sir i also have the same newagent creation error.
ReplyDeletefailed_shadow_object
Sir,
ReplyDeleteIn my tcl file i mentioned my simulation time as 300 secs, while verifying trace file its generated only for 250 secs. How to clear this error? Thank you.
I am using ns-2.35. I have written the newagent.cc file as u have said and saved under ~ns-2.35/newfolder . But when i am trying to compile there is an error , agent.h not found. I saw that agent .h is in the folder common. I saved the newagent.cc file under common folder but still some header files included inside agent.h are not found while compilation. Please help to solve this problem.
ReplyDeletehi
ReplyDeleteplease can you help me I want to add new AODV protocol with attack
How can i do that in ns2??
thanks
Dear Pradeep , This is Saravanan from TVMALAI. I have an error trying this agent. I Have created everything and while ./configure I am getting following error.
ReplyDeletechecking 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... no
checking for init.tcl... ../lib/tcl8.5
checking for http.tcl... ../lib/tcl8.5/http1.0
checking Tcl http.tcl library... yes
checking for tclsh8.4.19... no
checking for tclsh8.4... /usr/bin/tclsh8.4
configure: error: Installation of tcl seems incomplete or can't be found automatically.
Please correct the problem by telling configure where tcl is
using the argument --with-tcl=/path/to/package
(perhaps after installing it),
or the package is not required, disable it with --with-tcl=no.
sharan@ubuntu:~/ns-allinone-2.35/ns-2.35$ make
Makefile.in is newer than Makefile.
You need to re-run configure.
false
make: *** [Makefile] Error 1
Let me know the solution. Please its urgent.
Thanks in advance.
did u installed ns2, if not install it.
Deleteand then before giving the make command give this command ./configure
I installed ns2.35 as per ur direction and its working properly.
Deletewhether I need reinstall ns-2.35? But ns command working properly for tcl scripts.only problem with creating agents
Deletewhile giving the ./configure command i am getting the following error
Deleteconfigure: error: Installation of tcl seems incomplete or can't be found automatically.
Please correct the problem by telling configure where tcl is
using the argument --with-tcl=/path/to/package
(perhaps after installing it),
or the package is not required, disable it with --with-tcl=no.
1. Instead of editing the makefile.in i done the correction directly in makefile and I succeeded. can u tell me the reason?
ReplyDelete2. I returned the result to tcl script but I could not get it. I listed the coding
// xx.tcl
set myobj [new Agent/ShVar]
$myobj set x_ 5
$myobj set y_ 10
$myobj add
set val(re) res_
puts "$re"
--------------------------------------------------------------------------------
//xx.cc
#include
#include
#include "agent.h"
class ShAgent : public Agent
{
private:
int x,y,res;
void add();
protected:
int command(int argc, const char*const* argv);
public:
ShAgent();
};
ShAgent::ShAgent() : Agent(PT_UDP)
{
bind("x_", &x);
bind("y_", &y);
bind("res_", &res);
}
static class ShAgentClass: public TclClass
{
public:
ShAgentClass():TclClass("Agent/ShVar") {}
TclObject* create (int, const char*const*)
{
return (new ShAgent());
}
}Sh_obj;
int ShAgent::command(int argc, const char*const* argv)
{ if(argc==2)
{
if(strcmp(argv[1] ,"add") ==0)
{
add();
return (TCL_OK);
}
}
return(Agent::command(argc, argv));
}
/* Your member function */
void ShAgent::add()
{
Tcl& tcl = Tcl::instance();
tcl.eval("puts \" \n From add() \"");
res=x+y;
//printf("\n x=%d y = %d x+y = %d\n", x,y,res);
}
-----------------------------------------------------------------
// running tcl
sharan@ubuntu:~/ns-allinone-2.35$ ns sh_test.tcl
warning: no class variable Agent/ShVar::x_
see tcl-object.tcl in tclcl for info about this warning.
warning: no class variable Agent/ShVar::y_
warning: no class variable Agent/ShVar::res_
From add()
can't read "re": no such variable
while executing
"puts $re"
(file "sh_test.tcl" line 11)
pls help me in this regard.
regard P.Saravanan
hello sir
ReplyDeletewhen i modified in dsragent.cc file in ns 2.34 by using this code then create this type of error which in below
modification code:
void MDSRAgent::getRouteForPacket(SRPacket &p, bool retry)
{
Entry *e = request_table.getEntry(p.dest);
Time time = Scheduler::instance().clock();
if snooze==1&&recv.ACK==1
SRPacket rrp = p;
rrp.pkt = p.pkt->copy();
hdr_sr *srh = hdr_sr::access(rrp.pkt);
hdr_ip *iph = hdr_ip::access(rrp.pkt);
hdr_cmn *cmh = hdr_cmn::access(rrp.pkt);
iph>daddr()=Address::instance().create_ipaddr(p.dest.getNSAddr_t(),RT_PORT);
iph->dport() = RT_PORT;
iph>saddr()=Address::instance().create_ipaddr(net_id.getNSAddr_t(),RT_PORT);
iph->sport() = RT_PORT;
cmnh->ptype() = PT_DSR;
cmnh->size() = size_;
cmnh->num_forwards() = 0;
}#endif
void TcpBuS::RouteError(SRPacket& p)
{
hdr_sr *srh = hdr_sr::access(p.pkt);
if (!srh->route_error())
return;
ID who = ID(srh->down_links()[srh->num_route_errors()-1].tell_addr, ::IP);
if (who != net_id && who != MAC_id)
{
return;
if (ch->num_forwards() > rt->rt_hops) {
local_rt_repair(rt, p);
{
return = RERR_L;
if(rt->rt_flags == RTF_UP) {
assert(rt->rt_hops != INFINITY2);
forward(rt, p, NO_DELAY);
{
return = RERR_S;
}
void MDSR::newack(Packet* pkt)
{
hdr_tcp *tcph = hdr_tcp::access(pkt);
register int ackno = tcph->ackno();
int progress = (ackno > highest_ack_);
if (ackno == maxseq_) {
cancel_rtx_timer(); // all data ACKd
} else if (progress) {
set_rtx_timer();
}
if (progress)
highest_ack_ = ackno;
if (t_seqno_ < highest_ack_)
t_seqno_ = highest_ack_; // seq# to send next
hdr_flags *fh = hdr_flags::access(pkt);
iph>daddr()=Address::instance().create_ipaddr(p.dest.getNSAddr_t(),RT_PORT);
iph->dport() = RT_PORT;
iph>saddr()=Address::instance().create_ipaddr(net_id.getNSAddr_t(),RT_PORT);
iph->sport() = RT_PORT;
}
when i add this code in this then we get error:
dsr/dsragent.cc:357:17: error: expected type-specifier before ‘TcpBus’
dsr/dsragent.cc:357:17: error: expected ‘)’ before ‘TcpBus’
dsr/dsragent.cc:357:23: error: cannot convert ‘int*’ to ‘TclObject*’ in return
dsr/dsragent.cc: In member function ‘void DSRAgent::getRouteForPacket(SRPacket&, bool)’:
dsr/dsragent.cc:1489:5: error: ‘snooze’ was not declared in this scope
dsr/dsragent.cc:1489:18: error: ‘recvack’ was not declared in this scope
dsr/dsragent.cc:1530:3: error: ‘endif’ was not declared in this scope
dsr/dsragent.cc:1532:3: error: expected ‘;’ before ‘srh’
dsr/dsragent.cc:1519:11: warning: unused variable ‘srh’ [-Wunused-variable]
dsr/dsragent.cc:1596:6: error: ‘TcpBuS’ has not been declared
dsr/dsragent.cc:1597:1: error: a function-definition is not allowed here before ‘{’ token
dsr/dsragent.cc:2852:1: error: expected ‘}’ at end of input
dsr/dsragent.cc: In member function ‘virtual TclObject* TcpBusClass::create(int, const char* const*)’:
dsr/dsragent.cc:358:3: warning: control reaches end of non-void function [-Wreturn-type]
dsr/dsragent.cc: At global scope:
dsr/dsragent.cc:95:12: warning: ‘dsr_salvage_max_attempts’ defined but not used [-Wunused-variable]
make: *** [dsr/dsragent.o] Error 1
hello sir
ReplyDeleteiwan to modified dsr.cc by using this code
void MDSRAgent::getRouteForPacket(SRPacket &p, bool retry)
{
Entry *e = request_table.getEntry(p.dest);
Time time = Scheduler::instance().clock();
if snooze==1&&recv.ACK==1
SRPacket rrp = p;
rrp.pkt = p.pkt->copy();
hdr_sr *srh = hdr_sr::access(rrp.pkt);
hdr_ip *iph = hdr_ip::access(rrp.pkt);
hdr_cmn *cmh = hdr_cmn::access(rrp.pkt);
iph>daddr()=Address::instance().create_ipaddr(p.dest.getNSAddr_t(),RT_PORT);
iph->dport() = RT_PORT;
iph>saddr()=Address::instance().create_ipaddr(net_id.getNSAddr_t(),RT_PORT);
iph->sport() = RT_PORT;
cmnh->ptype() = PT_DSR;
cmnh->size() = size_;
cmnh->num_forwards() = 0;
}#endif
void TcpBuS::RouteError(SRPacket& p)
{
hdr_sr *srh = hdr_sr::access(p.pkt);
if (!srh->route_error())
return;
ID who = ID(srh->down_links()[srh->num_route_errors()-1].tell_addr, ::IP);
if (who != net_id && who != MAC_id)
{
return;
if (ch->num_forwards() > rt->rt_hops) {
local_rt_repair(rt, p);
{
return = RERR_L;
if(rt->rt_flags == RTF_UP) {
assert(rt->rt_hops != INFINITY2);
forward(rt, p, NO_DELAY);
{
return = RERR_S;
}
void MDSR::newack(Packet* pkt)
{
hdr_tcp *tcph = hdr_tcp::access(pkt);
register int ackno = tcph->ackno();
int progress = (ackno > highest_ack_);
if (ackno == maxseq_) {
cancel_rtx_timer(); // all data ACKd
} else if (progress) {
set_rtx_timer();
}
if (progress)
highest_ack_ = ackno;
if (t_seqno_ < highest_ack_)
t_seqno_ = highest_ack_; // seq# to send next
hdr_flags *fh = hdr_flags::access(pkt);
iph>daddr()=Address::instance().create_ipaddr(p.dest.getNSAddr_t(),RT_PORT);
iph->dport() = RT_PORT;
iph>saddr()=Address::instance().create_ipaddr(net_id.getNSAddr_t(),RT_PORT);
iph->sport() = RT_PORT;
}
when i add this code in this then we get error
dsr/dsragent.cc:357:17: error: expected type-specifier before ‘TcpBus’
dsr/dsragent.cc:357:17: error: expected ‘)’ before ‘TcpBus’
dsr/dsragent.cc:357:23: error: cannot convert ‘int*’ to ‘TclObject*’ in return
dsr/dsragent.cc: In member function ‘void DSRAgent::getRouteForPacket(SRPacket&, bool)’:
dsr/dsragent.cc:1489:5: error: ‘snooze’ was not declared in this scope
dsr/dsragent.cc:1489:18: error: ‘recvack’ was not declared in this scope
dsr/dsragent.cc:1530:3: error: ‘endif’ was not declared in this scope
dsr/dsragent.cc:1532:3: error: expected ‘;’ before ‘srh’
dsr/dsragent.cc:1519:11: warning: unused variable ‘srh’ [-Wunused-variable]
dsr/dsragent.cc:1596:6: error: ‘TcpBuS’ has not been declared
dsr/dsragent.cc:1597:1: error: a function-definition is not allowed here before ‘{’ token
dsr/dsragent.cc:2852:1: error: expected ‘}’ at end of input
dsr/dsragent.cc: In member function ‘virtual TclObject* TcpBusClass::create(int, const char* const*)’:
dsr/dsragent.cc:358:3: warning: control reaches end of non-void function [-Wreturn-type]
dsr/dsragent.cc: At global scope:
dsr/dsragent.cc:95:12: warning: ‘dsr_salvage_max_attempts’ defined but not used [-Wunused-variable]
make: *** [dsr/dsragent.o] Error 1
Hi Sir,
ReplyDeleteI want to collect packets at cluster head and forward it to mobile sink, how can I implement it. Please help
Hi sir i have mailed you the file sir.
ReplyDelete"Failed_shadow_error"