[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] attach-agent related




I think you shld do this thing in c++. i.e. In the implementation of your
Myagent, nake it a cubclass of Tcp agent class. Override the
functions which you want to change. Then in send function of your agent,
invoke the send of the Tcp agent (after doing the necesary processing
/generation of pkts and things u like) 

Then just do this in Tcl :

set myagent [new Agent/TCP/MyAgent]
$ns attach-agent $myagent $node1 

I think it shld work.      

Amit
----------------------------------------------------------------------------
Amit Jain
Senior Undergraduate			Work Phone : 91-(0)512-597653
Computer Science Department		Home Phone : 91-(0)512-597311
Indian Institute Of Technology,
Kanpur - 208016
INDIA 


On Thu, 1 Feb 2001, [iso-8859-1] billy dimi wrote:

> Consider the following
> 
> set node1 [$ns node]
> 
> set myagent [new Agent/MyAgent]
> $ns attach-agent $myagent $node1
> 
> I want to attach on node1 a tcp agent which depends on
> MyAgent. I mean that i want first the pkts passing
> from MyAgent and then to the tcp agent. What shall i
> do??
> 
> set tcp1 [new Agent/Tcp]
> $ns attach-agent $tcp1 $myagent
> 
> or 
> 
> set tcp1 [new Agent/Tcp]
> $ns attach-agent $tcp1 $node1
> 
> Thanks
> Billy
> 
> 
> 
> __________________________________________________
> Get personalized email addresses from Yahoo! Mail - only $35 
> a year!  http://personal.mail.yahoo.com/
>