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

[ns] About the replicator on a leafnode in multicast tree.



Hello, I am sorry about the length of this letter.
 
I wonder if a leafnode in a multicast tree must have a replicator
becasue I am confused by two scripts below. Please point me out.
 
  script 1 in tcl/ctr-mcast/CtrMcastComp.tcl
 
1      ...
2  CtrMcastComp instproc compute-branch { src group nodeh } {
      ...
3 ### set oif : RPF link
4 set oiflist ""
 ...
5 if { [set r [$tmp getReps [$src id] $group]] != "" } {
6  if [$r is-active] {  
7   if { $oiflist != "" } {
8    $r insert [lindex $oiflist 0]
9   }
10   break
11  } else {
12   if { $oiflist != "" } {
13    $r insert [lindex $oiflist 0]
14   }
15  }
16 } else {
17  $tmp add-mfc [$src id] $group $iif $oiflist
18 }
 
Does a leafnode in a multicast tree have the replicator of this tree's
<source group>? If it has, the replicator of this leaf has no oif and it's not
active so line 13 will be executed.But after insert a oif to the leaf's replicator(line 13),
the for loop should break as line 10 does, I think.
 
  script 2 in tcl/mcast/DM.tcl
 
1  DM instproc recv-prune { from src group iface} {
2       $self instvar node_ PruneTimer_ ns_
3 set r [$node_ getReps $src $group]
4 if { $r == "" } {
5  return 0
6 }
7 set id [$node_ id]
8 set tmpoif [$node_ iif2oif $iface]
 
9 if { [$r is-active-target $tmpoif] } {
10  $r disable $tmpoif
11  if ![$r is-active] {
12   if { $src != $id } {
13    $self send-ctrl prune $src $group
14   }
15  }
16 }
17}
 
After tmpoif is disabled(line 10), if $r has no any oif and became not active,
the node will send prune to group(line 13) and leave group. But if this node self is
a group menber and now it should be a leafnode, it leave group unnecessarily.
 
Thank you!