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

Re: [ns] changing target at the classifier! (fwd)



Seems to me this is the correct way to do it, but perhaps you want to say
something like: 

$myagent connect $dest_agent 

Do NOT use "target" command to connect two agents. That command should
ONLY be used to build plumbing inside a node/link structure, for instance,
attach an agent to the port classifier inside a node.

- Haobo

>      ---------------------------------------------
>                    DEST   NODE 
>       classifier ------> MyAgent -------> DestAgent
>      -----------------------------------------------
> 
> I tried to attach my own agent to the destination node and then made the
> actual destination agent as a target for MyAgent. Something as below :
> 
> 
> $ns attach-agent $dest_node $myagent
> $myagent target $dest_agent
> 
> This dumped the following error:
> 
> --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) ---
> 	_o17: no target for slot -1
> 	_o17 type: Classifier/Hash/Dest
> content dump:
> classifier _o17
> 	0 offset
> 	0 shift
> 	2147483647 mask
> 	3 slots
> 		slot 0: _o24
> 		slot 1: _o71
> 		slot 2: _o24
> 	-1 default
> ---------- Finished standard no-slot{} default handler ----------
> 
> 
> My only requirement is that I want to be able to intercept the packet of
> my choice before it reaches the destination agent and send it back.
> 
> Any kind of a hint to achieve this will help.
> 
> Thanks,
> Sowmya.
> 
> 
> *******************************************************************************
> 
>     Sowmya Manjanatha : University of New Hampshire
>     Major             : Computer Science      
>     *********************************************** 
> 
>     email        : [email protected]
> 
> *******************************************************************************
> 
> On Fri, 16 Feb 2001, Debojyoti Dutta wrote:
> 
> > One suggestion would be to see whether you can change the classify
> > function and once you get the packet of your choice, you can do what you
> > want.
> > 
> > Cheers
> > Debo
> > 
> > On Thu, 15 Feb 2001, Sowmya Manjanatha wrote:
> > 
> > > 
> > > Hi all,
> > > 
> > > In one of my research works,  I would want to be able to provide some
> > > feedback from a destination to the sender of a particular incoming 
> > > packet similar to TCP ACKS except that I want to do it at the classifier
> > > level.  The classifier does not hold the "target_" variable like the
> > > Connector or NSObject.  The classifier is neither derived from one of
> > > the Objects that hold this variable.  So, what would be the best way
> > > to send back a message from the classifier to the sender.
> > > 
> > > Any hints, suggestions will be greatly appreciated.
> > > 
> > > Thanks,
> > > Sowmya.
> > > 
> > > 
> > > 
> > > *******************************************************************************
> > > 
> > >     Sowmya Manjanatha : University of New Hampshire
> > >     Major             : Computer Science      
> > >     *********************************************** 
> > > 
> > >     email        : [email protected]
> > > 
> > > *******************************************************************************
> > > 
> > > 
> > 
> 
>