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

Re: bug - tcp versus DV routing



> 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_
}

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.