Subject: [manet] Unable to extract shortest path in DSR

From: TAING Nguon <[email-masked]>
Date: Wed, 23 Feb 2005 07:23:15 -0800 (PST)

Dear all,

I used sample program wireless1.tcl of the tutoral. I
havent changed any thing including  connection pattern
and scenario file, excepts adding some portion of code
to that tcl file. The added code is as below:

--------
Agent/DSRAgent instproc handlePktWithoutSR {length} {
	puts "length $length"
}
-----------
MobiCache instproc findRoute {Rlength} {
	puts "Route Length $Rlength"
}
------------

1. The first block, I tried to get a path from
dsragent.cc. In DSRAgent::handlePktWithoutSR, before
RETURN statement of the block IF
(ROUTE_CACHE->findRoute(p.dest, p.route, 1)), I added
some code as below: 
------------
char out[100] ; // Prepare the output to the Tcl
interpreter. 
sprintf(out, "%s handlePktWithoutSR %d",name(),
p.route.length() );
Tcl& tcl = Tcl::instance();
tcl.eval(out);
-------------
2. The second block, I tried to get shortest path from
mobicache.cc file. In MobiCache::findRoute, before
RETURN TRUE in the IF ( MIN_CACHE) block, I added some
code as below:

---------------
char Rlength[100];
sprintf(Rlength, "%s findRoute %d",name(), min_length
);
Tcl& tcl = Tcl::instance();
tcl.eval(Rlength);
--------------

3. after that i used command
  - make clean
  - make
  - ns wireless1.tcl
when I run simulation(ns wireless1.tcl), I got nothing
even from dsragent.cc or mobicache.cc. I would like to
know the adding code is incorrect or I placed my
adding code to an inccorect place. Please help me.
Thanks very much for your times.

Looking forward to hearing from you.

Regards,

Nguon

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

_______________________________________________
manet mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/manet