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

Re: [ns] Source Routing Code



tarun;

to help you with your flavor of source routing you might want to take
a look at dynamic source routing: dsr. dsr is implemented in ns-2;
you should be able to find it in the "dsr" sub-directory in the main
ns-<version> directory. the way that dsr was implemented is a bit
convoluted; you'll need to do a bit of reading to get it all. in
particular you're probably going to want to understand why they subclassed
MobileNode to create SRNode; you'll probably need to get a good
handle on exactly how a packet flows through the network stack of
an SRNode and how it is different from a plain old MobileNode.

things to read, in no particular order:

1. the dsr blurb in the ns manual ( somewhere around pg. 141 )
2. take a look at the diagram of the network stack of an SRNode ( pg. 136 
in manual )
3. read over the code in the dsr sub-directory.
4. take a gander at the dsr.tcl file in ns/mobility
5. also worth looking at is ns-lib.tcl ( in the ns/tcl/lib directory ); in 
particular
         you are looking for the method that creates wireless nodes ( 
here's a decent search
         string: "Simulator instproc create-wireless-node args {" ). you'll 
want to follow it
         down to see how they go about initializing the nodes and the 
routing agents.
6. in case you are curious, you could take the time to read the entire 
chapter titled
         "mobile networking is ns" ( i think it's chapter 16 )

it's really not that much to read; hope that helps.

seye

At 09:50 PM 6/24/2001, tarun banka wrote:
>Hello All,
>I have to implement the source routing algorithm, I am facing problem in 
>getting started. I would like to know if NS has some kind of sample code 
>on source routing which can help me get going.
>If any one can point me to some other resources on source routing then it 
>will be of great help.
>Thanks for your time
>Tarun Banka
>
>
>----------
>Get Your Private, Free E-mail from MSN Hotmail at 
><http://www.hotmail.com>http://www.hotmail.com.