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

Re: Multicast Questions



I believe get-mcast-tree is defined in ns/ns-xxx/tcl/mcast/ns-mcast.tcl.
It is defined as following.

Simulator instproc get-mcast-tree { src grp } {
	$self instvar link_ treeLinks_
	# iif == -2: from local
	set tmp [$src getRepByIIF $src $grp -2]
	if {$tmp == ""} {
		$self flush-trace
		error "No replicator for $grp at [$src id]"
	}

	set sid [$src id]
	lappend repList $tmp
	lappend nodeList $src

	while {[llength $repList] > 0} {
		set h [lindex $repList 0]
		set parent [lindex $nodeList 0]
		set pid [$parent id]
		set closeNodes($pid) 1
		set repList [lreplace $repList 0 0]
		set nodeList [lreplace $nodeList 0 0]

		set slots [$h slots]
#		puts "$slots"
		foreach sl $slots {
			set child [$self find-next-child $parent $sl]
			if {$child == ""} {
				puts "No children found for ($parent, $sl)"
				continue
			}
			set cid [$child id]
			if [info exists closeNodes($cid)] {
				error "Loop: node $cid already in the tree"
			}

			# shouldn't go upstream
			if ![info exists link_($pid:$cid)] {
				error "Found non-existent link ($pid:$cid)";
			}

			lappend nodeList $child
			puts "Link ($pid:$cid) found."
			lappend treeLinks $pid:$cid $link_($pid:$cid)
			set treeLinks_($pid:$cid) $link_($pid:$cid)

			set iif [[$link_($pid:$cid) set ifaceout_] id]
			if {$iif == -1} {
				puts "iif == -1"
			}
			lappend repList [$child getRepByIIF $src $grp $iif]
		}
	}
	return $treeLinks
}

It seems as if all the paticipants of multicast should join group before this
proc is called.   I just can not get this proc to work correctly.
By the way, I am using 2.1b4 for some special reasons.

Thanks

-James Kwon


Mon, 10 Jan 2000��, Lloyd Wood �ۼ��� ��:
> On Sat, 27 Sep 2008, jamester wrote:
> 
> > My first question :
> > 
> > 	It seems like "$ns set-address-format expanded" and multicast
> > 	do not go together. 
> 
> >       When I use expanded address I get errors similar to "_o57:
> >       no target for slot 128".  This error occurs when I generate
> >       only 100 nodes with expanded address format, but not without
> >       expanded address format.  Anyone knows anything about this?
> 
> What version of ns are you using? I spent some time
> discovering and pointing this particular gotcha out on the mailing
> list circa 2.1b3[*]
> 
> Instead of set-address-format, stick to Node expandaddr.
> 
> Take a look through the ns mailing list archive[+]
> 
> http://www-mash.CS.berkeley.EDU/dist/archive/ns-users/9809/0066.html
> http://www-mash.CS.Berkeley.EDU/dist/archive/ns-users/9901/0072.html
> 
> There's a forwarded note giving some indication why (no idea where
> that came from) at:
> http://www-mash.CS.Berkeley.EDU/dist/archive/ns-users/9901/0084.html
> 
> and addressing has been improved more recently (although afaik the
> various addressing modes are not all some aspect of hierarchical
> addressing - one level of hierarchy would give a flat space, and one 
> overall type of addressing might simplify interactions), so this
> should be less of a problem in recent ns.
> 
> When in doubt, try Node expandaddr.
> 
> For your second problem below, make sure you're using Node allocaddr
> if you're using expanded addressing - 0x8002 is only valid as a
> multicast address for the slowly-being-deprecated small address space
> when you have 128 nodes or less. Assuming you aren't using expanded
> addressing...
> 
> ...well, I've never seen get-mcast-tree before - where is that
> ddefined? I can't find it in my recent snapshot or 2.1b5 or the docs.
> 
> thanks,
> 
> L.
> 
> [*] these days I tend to stick to pointing out that DV routing is
>     broken, that the only person who has got it working again can't
>     remember how he did it, and can we have it functional again for
>     2.1b6, please?
> 
> [+] hang on, ht://dig currently isn't generating header/footer
>     parts of search result pages when it's not returning no data, so
>     you're limited to the first ten results; you'd never be able to
>     turn this stuff up.
> 
> <[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>
> 
> > My second question :
> > 	Is there any way I can see routes from source to destination nodes in
> > 	multicast?  I tried following :
> > 
> > 	set mproto DM
> >            	set mrthandle [$ns mrtproto $mproto {}]
> >            	........
> >            	$ns join-group receiver_agent group            
> > 	$ns get-mcast-tree $node($src) $group #src is srouce node id
> > 
> > 	I do not get multicast tree but following error messages.
> > 	
> > 	ns: _o3 get-mcast-tree _o53 0x8002]: can't read "GROUP_": no such variable
> >     	while executing
> > 	"error "No replicator for $GROUP_ at [$src id]""
> >     	(procedure "_o3" line 7)
> >     	(Simulator get-mcast-tree line 7)
> >     	invoked from within
> > 	"_o3 get-mcast-tree _o53 0x8002]"
> > 
> > Any help is greatly appreciated.
> > Thanks in advance.
> > 
> > -James Kwon