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

[ns] more about eavesdropping agent



Hello.
I just thought "let's add some details to make our previous question more
appealing".

So here is my problem with more details:

As I said, I would like the agent I created to receive all the packets the
routing agent receives, and to send "hello" packets, i.e. packets that should be
received by every node "within earing distance" of the node sending it. The
routing agent I use is AODV.

The moment when AODV is attached to its node is in ns-mobilenode.tcl, in the
function "add-target", and the code doing it is:
[snip]
$agent target [$self set ll_(0)]
[snip]
$self install-defaulttarget $agent

#$classifier_ defaulttarget $agent

$dmux_ install $port $agent

So could I simply add there something like (nbd is my new agent)

set nbdonly  [string first  "Agent/NBD" [$agent info class]]
if {$nbdonly != -1 } {
	    agent target [$self set ll_(0)]
                $self install-defaulttarget $agent
                $dmux_ install $port $agent
         			}
with $port being 255?

I suppose this will cause problems since, for instance, maybe the defulttarget
points towards a unique agent, so making it point towards the nbd agent will
cut it from the AODV agent, and I don't want that, I  really want a kind of
fork.

What would you advise me to do?

 -- 
Robin Poss