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

Re: bug - tcp versus DV routing



On Fri, 3 Dec 1999, Guo, Liang wrote:

> > What are the necessary trivial additions to rtPeer? (Would you mind
> > throwing me a diff?)
> 
> Sorry, I modified a lot in route-proto.tcl, so it will look very messy if
> I show the diff to you. 
>
> Here is some changes that I could remember:
> 
> in "init", do the following:
> ### rtPeer instproc init {add cls} {
> rtPeer instproc init {addr port cls} {
>     $self next
>     $self instvar addr_ port_ metric_ rtpref_
>     set addr_ $addr
> ### Added by Liang Guo
>     set port_ $port
> ###
>     foreach dest [[Simulator instance] all-nodes-list] {
>         set metric_($dest) [$cls set INFINITY]
>         set rtpref_($dest) [$cls set preference_]
>     }
> }
> 
> add the following code:
> 
> ##### Modified by Liang Guo on 11/06/99, provide port information
> rtPeer instproc port? {} {
>     $self instvar port_
>     return $port_
> }

I'd gotten that far myself, but was continually being told that port_
didn't exist.

Other obvious changes needed are to wherever rtPeer is called, so

Agent/rtProto/DV instproc add-peer {nbr $agentAddr} {
    $self instvar peers_
    $self set peers_($nbr) [new rtPeer $agentAddr $class]
}

also has to change, and beyond that I'm lost in complexity.

cheers,

L.


> And:
> Agent/rtProto/DV instproc send-to-peer nbr {
>     $self instvar ns_ rtObject_ ifs_ peers_
> 
> ### modifed by Liang Guo, 11/11/99, what if there's no peer on that end?
>     if { $peers_($nbr) == "" } {
>         return
>     }
> 
> 
> You may need to do other modifications ( I don't remember them), but
> I believe that the compiler will tell you where they are.
> 
> cheers.
> 
> Guo, Liang.
> 
> 

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>