Congratulations Paul! 

I believe that after fixing your first "major" bug, your next NS2 hacking
experiences will be done a lot faster.

One very important helper for beating the NS2 learning curve is to study the
other NS2 success stories, to try to grasp all the details and lessons
learnt. These could be right the thing that one will need either tomorrow...
or in a year's time.

Now that you have the protocol working, you might want to combine and
parametize the test script so that it is able to run both protocols in the
exact same scenarios.



> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Paul Vincent Craven
>
> A while back I asked about getting data to move from my wireless base
> station node to my wired node. I finally figured out the issue. Key to
> getting this to work was:
> 
> 1.) Telling my "node that is wired to the base station" that such a
> route exists:
> $W(0) add-route $BS(0) $W(0)

This is very strange. The fixed routing protocol should have done it for
you, on the fixed part of the network.

Try other fixed routing protocols without your fix, to check what's
happening: 

# http://www.isi.edu/nsnam/ns/doc/node304.html
# types of protocols: Algorithmic / Direct / Dummy / DV / LS / Manual
# Session / Static

In this process you may find that the bug was your's, which is strange
because your hierarchal addresses are OK, eg:

  0.0.0   (W(0))
wired link 
  1.0.0   (BS)
wireless link
  1.0.1   (MH)

your you might find a bug on the NS2 (step 7 of
http://tagus.inesc-id.pt/~pestrela/ns2/ns2_debugging3.html)
 

> 2.) And in my forward_data() member of my custom routing protocol, I
> needed to pick the right target:
> Scheduler::instance().schedule(p->handler_, p, 0.0);
> 
> Key in this was not to use target_ with just went back to my handler I
> was already in, but instead reset back to use the packet's original
> handler.

I've compared your code to DSDV's and NOAH's, and I can't understand why you
couldn't use the same method:

NOAH_Agent::forwardPacket (Packet * p)
...
        target_->recv(p, (Handler *)0); //line 985
...


DSDV_Agent::forwardPacket (Packet * p)
...
        target_->recv(p, (Handler *)0); //line 168
...

 
> Particular thanks to Pedro Vale Estrela, who's help was invaluable.
> 
> Paul Vincent Craven


Reply via email to