[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compute-branch
On Fri, 26 Feb 1999, Huang Hai wrote:
> In metord
> CtrMcastComp instproc compute-branch { src group member }
> (~ns/tcl/ctr-mcast/CtrMcastComp.tcl), I found the following lines.
Huang, take a look at the CVS information for this file:
http://www-mash.cs.berkeley.edu/cgi-bin/cvsweb/ns-2/tcl/ctr-mcast/CtrMcastComp.tcl
It appears that you're looking at version 1.1.3 or earlier of that
file (ideally the version # would be somewhere in the comments at the
top).
You will want to look at Polly/Kannans's small changes in
1.1.4 and further changes in 1.1.5/1.1.6, which modify this bit of
code extensively, and see how those changes affect your problem and
your proposed fix.
Cheers,
L.
who is turning into something of a CVS evangelist.
> 1 if {$tmp == $target} {
> 2 if {$treetype($group) == $SPT || $tmp == $src} {
> 3 #when the member is also the source
> 4 set iif -2
> 5 } else {
> 6 #when member is at RP, find iif from RP to source
> 7 set upstreamtmp [$ns upstream-node $tmp $src]
> 8 set iilink [$ns RPF-link $src [$upstreamtmp id] $tmp]
> 9 set iif [[$iilink set dest_] id]
> 10 }
> 11 } else {
> 12 set upstreamtmp [$ns upstream-node $tmp $target]
> 13 set iilink [$ns RPF-link $target [$upstreamtmp id] $tmp]
> 14 set iif [[$iilink set dest_] id]
> 15 }
>
> I think it's not adequate to use upstream-node (line7) to find the node
> upstream. According to "ns Notes and Documentation", the root of the shared
> tree is now $target, and all packets from $src are unicast to $target. In
> my opinion, we should find the upstream node downwards from $src but not
> upwards from $target ($tmp), though the results are the same when all the
> costs of links are the same. When the upward cost and downward cost are
> different, line 7 will give an error answer. All other upstream-node deserve
> no changes. Becasue in real world, multicast tree is built upwards, just in
> the same way with this method. I substituted line 7 and 8 with the following
> lines (ugly codes :-)).
>
> set hh_tmp $src
> while {$hh_tmp!=$tmp} {
> set upstreamtmp [$ns set Node_($hh_tmp)]
> set hh_tmp [[$ns upstream-node $hh_tmp $tmp] id]
> }
> set iilink [$ns set link_([$upstreamtmp id]:$tmp)]
>
> After substituting, ns can run smoothly even there is only a simplex link
> from $src to $target. This property can be used to simulate one-way
> satellite broadcast.
>
> Another problem is that switch-treetype can only change the type to SPT
> whatever the former type is, while in "ns Notes and Documentation", it says
> "or vice-versa".
>
> Any discussion is welcome.
>
> Best regards,
> Huang mailto:[email protected]
<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>