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

Re: [ns] How to dynamically stop a node from forwarding packets?



Hi Gustavo,

Sorry, maybe what I have said isn't very clear. The "recv()", what I mean, is the first place
where a object to deal with the packet. 
We know that the first place where a "node" deal with a packet is the "entry", which is infact
the "classifier_" in the class node.
There is a procdure"insert-entry" in the file ns-node.tcl. Using this procdure, you can insert
your "classifier" or "connector" before the default "classifier_". If you have seen the figure 5.1
in the ns manual, you can understand this very well. I do not practise this method myself, but 
I think it can work.

Danaus  


> Hi Danaus,
> 
> Thanks a lot for your suggestion. I looked at node.cc and monilenode.cc and
> they don't seem to have a recv() method. Or do you mean that I should be
> looking at ns-node.tcl / ns-mobilenode.tcl?
> 
> Thanks a lot,
> 
> Gustavo.
> 
> Danaus wrote:
> 
> > Hi:
> > I think you could add some codes in the recv() method of your node class.
> >
> > Danaus
> >
> > > Hi,
> > >
> > > I would like to stop packets from being forwarded from a specific node
> > > when this node receives a packet of a specific type (say type a) and
> > > restart forwarding packets when the node receives a packet of another
> > > type (say b). Does anybody know which file I should look at modifying?
> > >
> > > I tried blocking the queue associated with a node to do that. If the
> > > node to be blocked is at a bottleneck link then the queue was blocked.
> > > However, if the node is not at a bottleneck link, the node continues to
> > > forward packets as there is no queuing in the node.
> > >
> > > Any suggestions would be really appreciated.
> > >
> > > Thanks a lot,
> > >
> > > Gustavo.
> > >
> > >
>