亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ns-route.tcl

?? 這個軟件的功能是實現多播協議
?? TCL
字號:
## Copyright (c) 1996 Regents of the University of California.# All rights reserved.# # Redistribution and use in source and binary forms, with or without# modification, are permitted provided that the following conditions# are met:# 1. Redistributions of source code must retain the above copyright#    notice, this list of conditions and the following disclaimer.# 2. Redistributions in binary form must reproduce the above copyright#    notice, this list of conditions and the following disclaimer in the#    documentation and/or other materials provided with the distribution.# 3. All advertising materials mentioning features or use of this software#    must display the following acknowledgement:# 	This product includes software developed by the MASH Research# 	Group at the University of California Berkeley.# 4. Neither the name of the University nor of the Research Group may be#    used to endorse or promote products derived from this software without#    specific prior written permission.# # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF# SUCH DAMAGE.## @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/tcl/lib/ns-route.tcl,v 1.30 2001/03/28 07:17:02 debo Exp $#RouteLogic instproc register {proto args} {	$self instvar rtprotos_ node_rtprotos_ default_node_rtprotos_	if [info exists rtprotos_($proto)] {		eval lappend rtprotos_($proto) $args	} else {		set rtprotos_($proto) $args	}	if { [Agent/rtProto/$proto info procs pre-init-all] != "" } {		Agent/rtProto/$proto pre-init-all $args	}}RouteLogic instproc configure {} {	$self instvar rtprotos_	if [info exists rtprotos_] {		foreach proto [array names rtprotos_] {			eval Agent/rtProto/$proto init-all $rtprotos_($proto)		}	} else {		Agent/rtProto/Static init-all	}}RouteLogic instproc lookup { nodeid destid } {	if { $nodeid == $destid } {		return $nodeid	}	set ns [Simulator instance]	set node [$ns get-node-by-id $nodeid]	if [Simulator hier-addr?] {		set dest [$ns get-node-by-id $destid]		set nh [$self hier-lookup [$node node-addr] [$dest node-addr]]		return [$ns get-node-id-by-addr $nh]	}	set rtobj [$node rtObject?]	if { $rtobj != "" } {		$rtobj lookup [$ns get-node-by-id $destid]	} else {		$self cmd lookup $nodeid $destid	} }RouteLogic instproc notify {} {	$self instvar rtprotos_	foreach i [array names rtprotos_] {		Agent/rtProto/$i compute-all	}	foreach i [CtrMcastComp info instances] {		$i notify	}	if { [rtObject info instances] == ""} {		foreach node [[Simulator instance] all-nodes-list] {			# XXX using dummy 0 for 'changes'			$node notify-mcast 0		}	}}## routine to create address for hier-route-lookup at each level# i.e at level 2, address to lookup should be 0.1 and not just 1#RouteLogic instproc append-addr {level addrstr} {	if {$level != 0} {		set str [lindex $addrstr 0]		for {set i 1} {$i < $level} {incr i} {			append str . [lindex $addrstr [expr $i]]		}		return $str	}}## debugging method to dump table (see route.cc for C++ methods)#RouteLogic instproc dump nn {	set i 0	while { $i < $nn } {		set j 0		while { $j < $nn } {			puts "$i -> $j via [$self lookup $i $j]"			incr j		}		incr i	}}Simulator instproc rtproto {proto args} {    $self instvar routingTable_    if {$proto == "Algorithmic"} {	set routingTable_ [new RouteLogic/Algorithmic]    }    eval [$self get-routelogic] register $proto $args}Simulator instproc get-routelogic {} {	$self instvar routingTable_	if ![info exists routingTable_] {		set routingTable_ [new RouteLogic]	}	return $routingTable_}# DeboSimulator instproc dump-approx-sim-data {} {	$self instvar routingTable_ Node_ link_	if ![info exists routingTable_] {	    puts "error: routing table is not computed yet!"	    return 0	}	puts "# Dumping Approx-Sim Data"  	set n [Node set nn_]	puts "m [Link set nl_] "        foreach qn [array names link_] {                set l $link_($qn)                puts "link [expr [$l set id_] + 1] [expr [$l bw] / 8000] [expr [$l bw] / 8000] [$l delay] [$l qsize]"        }	puts ""	global nconn_ conn_	puts "n $nconn_"		for { set i 0 } { $i < $nconn_ } { incr i } {		set len 0		set str ""		set list [split $conn_($i) ":"] 		set srcid [lindex $list 0]		set dstid [lindex $list 1]		while { $srcid != $dstid } {			incr len			# shortened nexthop to nh, to fit add-route in			# a single line			set nh [$routingTable_ lookup $srcid $dstid]			# print the route 			append str " " [$link_($srcid:$nh) id] 			set srcid  $nh		}				puts "route [expr $i + 1] $len $str"			}}Simulator instproc dump-routelogic-nh {} {	$self instvar routingTable_ Node_ link_	if ![info exists routingTable_] {	    puts "error: routing table is not computed yet!"	    return 0	}	puts "Dumping Routing Table: Next Hop Information"	set n [Node set nn_]	set i 0	puts -nonewline "\t"	while { $i < $n } {	    if ![info exists Node_($i)] {		incr i		continue	    }	    puts -nonewline "$i\t"	    incr i	}	set i 0	while { $i < $n } {		if ![info exists Node_($i)] {		    incr i		    continue		}		puts -nonewline "\n$i\t"		set n1 $Node_($i)		set j 0		while { $j < $n } {			if { $i != $j } {				# shortened nexthop to nh, to fit add-route in				# a single line				set nh [$routingTable_ lookup $i $j]				if { $nh >= 0 } {				    puts -nonewline "$nh\t"				}			} else {				puts -nonewline "--\t"			}			incr j		}		incr i	}	puts ""}Simulator instproc dump-routelogic-distance {} {	$self instvar routingTable_ Node_ link_	if ![info exists routingTable_] {	    puts "error: routing table is not computed yet!"	    return 0	}	# puts "Dumping Routing Table: Distance Information"	set n [Node set nn_]	set i 0	puts -nonewline "\t"	while { $i < $n } {	    if ![info exists Node_($i)] {		incr i		continue	    }	    puts -nonewline "$i\t"	    incr i	}	for {set i 0} {$i < $n} {incr i} {		if ![info exists Node_($i)] {		    continue		}		puts -nonewline "\n$i\t"		set n1 $Node_($i)		for {set j 0} {$j < $n} {incr j} {			if { $i == $j } {				puts -nonewline "0\t"				continue			}			set nh [$routingTable_ lookup $i $j]			if { $nh < 0 } {				puts -nonewline "0\t"				continue			}			set distance 0			set tmpfrom $i			set tmpto $j			while {$tmpfrom != $tmpto} {				set tmpnext [$routingTable_ lookup \					$tmpfrom $tmpto]				set distance [expr $distance + \					[$link_($tmpfrom:$tmpnext) cost?]]				set tmpfrom $tmpnext			}			puts -nonewline "$distance\t"		}	}	puts ""}# Only used by static routing protocols, namely: static and session.Simulator instproc compute-routes {} {	#	# call hierarchical routing, if applicable	#	if [Simulator hier-addr?] {		$self compute-hier-routes 	} else {		$self compute-flat-routes	}}Simulator instproc compute-flat-routes {} {	$self instvar Node_ link_	#	# Compute all the routes using the route-logic helper object.	#        if { [ Simulator set nix-routing] } {            puts "Using NixVector routing, skipping route computations"            return        }	#puts "Starting to read link_ array..\		time: [clock format [clock seconds] -format %X]"		set r [$self get-routelogic]	$self cmd get-routelogic $r  ;# propagate rl in C++		foreach ln [array names link_] {		set L [split $ln :]		set srcID [lindex $L 0]		set dstID [lindex $L 1]		if { [$link_($ln) up?] == "up" } {			$r insert $srcID $dstID [$link_($ln) cost?]		} else {			$r reset $srcID $dstID		}	}	#puts "Completed reading link_ array.."	#puts " and starting route-compute at \		time: [clock format [clock seconds] -format %X]"	$r compute	#puts "completed route-compute"	#puts "and starting to populate classifiers at \		time: [clock format [clock seconds] -format %X]"	set n [Node set nn_]		# classifier-population part moved to C++: this results in > 50%         # improvement of simulation run time.		$self populate-flat-classifiers $n		# Set up each classifer (aka node) to act as a router.	# Point each classifer table to the link object that	# in turns points to the right node.	#	#set i 0	#set n [Node set nn_]	#while { $i < $n } {	#	if ![info exists Node_($i)] {	#	    incr i	#	    continue	#	}	#	set n1 $Node_($i)	#	set j 0	#	while { $j < $n } {	#	    if { $i != $j } {			# shortened nexthop to nh, to fit add-route in			# a single line	#		set nh [$r lookup $i $j]	#		if { $nh >= 0 } {	#		    $n1 sp-add-route $j [$link_($i:$nh) head]	#		}	#	    } 	#	    incr j	#	}	#	incr i	#}	#puts "Completed populating classifiers at \		time: [clock format [clock seconds] -format %X]"}Simulator instproc get-link-head { n1 n2 } {    $self instvar link_    return [$link_($n1:$n2) head]}## Hierarchical routing support#Simulator instproc hier-topo {rl} {	#	# if topo info not found, use default values	#	AddrParams instvar domain_num_ cluster_num_ nodes_num_     	if ![info exists cluster_num_] {		if {[AddrParams hlevel] > 1} {			### set default value of clusters/domain 			set def [AddrParams set def_clusters]			puts "Default value for cluster_num set to $def\n"			for {set i 0} {$i < $domain_num_} {incr i} {				lappend clusters $def			}		} else {			### how did we reach here instead of flat routing?			puts stderr "hierarchy level = 1; should use flat-rtg instead of hier-rtg" 			exit 1		}		AddrParams set cluster_num_ $clusters	}	### set default value of nodes/cluster	if ![info exists nodes_num_ ] {		set total_node 0		set def [AddrParams set def_nodes]		puts "Default value for nodes_num set to $def\n"		for {set i 0} {$i < $domain_num_} {incr i} {			set total_node [expr $total_node + \					[lindex $clusters $i]]		}		for {set i 0} {$i < $total_node} {incr i} {			lappend nodes $def		}		AddrParams set nodes_num_ $nodes	}	# Eval is necessary because these *_num_ are usually lists; eval 	# will break them into individual arguments	eval $rl send-num-of-domains $domain_num_	eval $rl send-num-of-clusters $cluster_num_	eval $rl send-num-of-nodes $nodes_num_}Simulator instproc compute-hier-routes {} {	$self instvar Node_ link_	set r [$self get-routelogic]        $self cmd get-routelogic $r ;# propagate rl in C++    	# send hierarchical data :	# array of cluster size, #clusters, #domains	# assuming 3 levels of hierarchy --> this should be extended to support	# n-levels of hierarchy	#        if ![info exists link_] {		return	}        set level [AddrParams hlevel]        $r hlevel-is $level	$self hier-topo $r	foreach ln [array names link_] {		set L [split $ln :]	        set srcID [[$self get-node-by-id [lindex $L 0]] node-addr]		set dstID [[$self get-node-by-id [lindex $L 1]] node-addr]		if { [$link_($ln) up?] == "up" } {			$r hier-insert $srcID $dstID [$link_($ln) cost?]		} else {			$r hier-reset $srcID $dstID		}	}	$r hier-compute	# Set up each classifier (n for n levels of hierarchy) 	# for every node		# classifier-population part moved to C++: this results in > 50%         # improvement of simulation run time. -Padma, 02/01.	set n [Node set nn_]	$self populate-hier-classifiers $n	#$self gen-map#	for {set i 0} {$i < $n} {incr i} {#		if ![info exists Node_($i)] {#			continue#		}#		set n1 $Node_($i)#		set addr [$n1 node-addr]#		set L [AddrParams split-addrstr $addr]		#		# for each hierarchy level, populate classifier for that level		##		for {set k 0} {$k < $level} {incr k} {#			set csize [AddrParams elements-in-level? $addr $k]			#			# for each element in that level (elements maybe 			# nodes or clusters or domains 			##			if {$k > 0} {#				set prefix [$r append-addr $k $L]#			}#			for {set m 0} {$m < $csize} {incr m} {#				if { $m == [lindex $L $k]} {#					continue#				}#				if {$k > 0} {#					set str $prefix#					append str . $m#				} else {#					set str $m#				}#				set nh [$r hier-lookup $addr $str]				# add entry in clasifier only if hier-lookup 				# returns a value. #				if {$nh == -1} { #					continue#				}#				set node [$self get-node-id-by-addr $nh]#				if { $node >= 0 } {#					$n1 sp-add-route $str \#							[$link_($i:$node) head]#				}#			}#		}#	}#}}## Now source the dynamic routing protocol methods#source ../rtglib/route-proto.tclsource ../rtglib/dynamics.tclsource ../rtglib/algo-route-proto.tclSimulator instproc compute-algo-routes {} {	$self instvar Node_ link_	#	# Compute all the routes using the route-logic helper object.	#	set r [$self get-routelogic]	$r BFS	$r compute	#	# Set up each classifer (aka node) to act as a router.	# Point each classifer table to the link object that	# in turns points to the right node.	#	set i 0	set n [Node set nn_]	while { $i < $n } {		if ![info exists Node_($i)] {		    incr i		    continue		}		set n1 $Node_($i)		$n1 set rtsize_ 1 		set j 0		while { $j < $n } {		    if { $i != $j } {			# shortened nexthop to nh, to fit add-route in			# a single line			set nh [$r lookup $i $j]			# puts "$i $j $nh"			if { $nh >= 0 } {			    $n1 add-route $j [$link_($i:$nh) head]			    ###$n1 incr-rtgtable-size			}		    } 		    incr j		}		incr i	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人免费av在线| 91在线云播放| 不卡视频免费播放| 欧美视频完全免费看| 久久久一区二区| 亚洲一区二区三区美女| 国产一区二区三区综合| 在线免费观看日本一区| 国产精品美女一区二区三区| 强制捆绑调教一区二区| 日本精品裸体写真集在线观看| 精品福利在线导航| 天堂蜜桃91精品| 91成人在线精品| 国产精品国产自产拍在线| 精品中文av资源站在线观看| 欧美视频一区二区在线观看| 成人免费在线视频观看| 国产成人在线视频免费播放| 日韩欧美国产电影| 天堂av在线一区| 欧美日韩一本到| 亚洲最新视频在线播放| 成人av片在线观看| 国产午夜精品一区二区 | 蜜桃一区二区三区四区| 一本大道久久a久久精二百| 久久久久久97三级| 激情久久五月天| 欧美成人一区二区三区片免费| 日日夜夜精品视频免费| 欧美性色综合网| 亚洲国产精品久久人人爱| 色综合网色综合| 综合久久久久综合| 99riav久久精品riav| 国产精品国产自产拍高清av王其| 国产福利一区二区三区视频在线| 久久久五月婷婷| 成人一道本在线| 亚洲日本乱码在线观看| 91成人看片片| 五月激情六月综合| 91精品久久久久久久99蜜桃| 日韩综合小视频| 日韩三级免费观看| 韩国av一区二区| 国产精品热久久久久夜色精品三区| 国产91色综合久久免费分享| 中文av一区特黄| 色偷偷一区二区三区| 亚洲大片精品永久免费| 538在线一区二区精品国产| 麻豆精品在线视频| 国产清纯美女被跳蛋高潮一区二区久久w | 欧美国产国产综合| 99国产精品久| 亚洲福利视频三区| 精品国产一区久久| 成人动漫精品一区二区| 一个色综合网站| 日韩欧美一区在线| 福利视频网站一区二区三区| 亚洲日本韩国一区| 日韩欧美www| 99re视频精品| 青娱乐精品视频在线| 日本一二三四高清不卡| 欧美在线免费观看视频| 久久99精品国产麻豆不卡| 国产精品免费免费| 欧美一卡二卡在线| 成人蜜臀av电影| 日韩中文字幕一区二区三区| 国产欧美一区二区三区在线看蜜臀| 91福利视频久久久久| 国产一区二区三区黄视频| 一级中文字幕一区二区| 国产亚洲综合在线| 欧美日韩国产天堂| 成人av在线网| 蜜臀av一区二区三区| 综合激情网...| 26uuu国产一区二区三区| 色噜噜狠狠色综合欧洲selulu| 久久成人免费日本黄色| 亚洲一二三专区| 国产精品理论在线观看| 精品福利一二区| 69av一区二区三区| 日本高清不卡视频| 亚洲免费观看高清| 黑人精品欧美一区二区蜜桃 | 福利一区福利二区| 精品一区二区在线播放| 亚洲成人免费视| 亚洲色欲色欲www在线观看| 精品久久久久一区| 欧美日韩亚洲综合一区二区三区| 成人av在线播放网址| 国产一本一道久久香蕉| 久久国产日韩欧美精品| 天天综合日日夜夜精品| 亚洲国产视频在线| 亚洲人成网站色在线观看| 国产精品久线在线观看| 国产日韩欧美a| 久久婷婷国产综合国色天香| 日韩女优毛片在线| 日韩欧美激情一区| 日韩欧美国产wwwww| 7878成人国产在线观看| 欧美日韩激情一区二区三区| 色丁香久综合在线久综合在线观看| 成人不卡免费av| 成人理论电影网| 成人精品一区二区三区四区| 国产成人免费视频| 国产91丝袜在线18| 99久久综合99久久综合网站| 成人午夜私人影院| 成人一区二区三区视频在线观看| 国产激情视频一区二区三区欧美 | 精品日韩一区二区| 日韩一级免费观看| 精品少妇一区二区三区在线视频| 欧美不卡视频一区| 久久综合九色综合97婷婷| 久久久久久久电影| 国产精品国产a| 亚洲国产日韩a在线播放| 亚洲成人综合网站| 日韩av在线播放中文字幕| 久久97超碰国产精品超碰| 国内成人自拍视频| 99久久免费视频.com| 91免费看视频| 在线电影院国产精品| 欧美成人精品1314www| 日本一区二区三区高清不卡| 国产精品久久免费看| 一区二区三区成人在线视频| 亚洲va欧美va天堂v国产综合| 麻豆中文一区二区| 粉嫩13p一区二区三区| 欧美在线制服丝袜| 日韩精品一区二区三区中文精品| 亚洲国产精品99久久久久久久久 | 在线观看av不卡| 日韩免费看网站| 最新日韩在线视频| 三级欧美韩日大片在线看| 国产传媒日韩欧美成人| 欧美亚洲国产一区二区三区 | 国产成人精品aa毛片| 91精品1区2区| 日韩欧美一级二级| 国产精品久久久久9999吃药| 天天做天天摸天天爽国产一区| 韩国精品主播一区二区在线观看| 色94色欧美sute亚洲线路一ni| 欧美一区二区私人影院日本| 国产精品美女久久久久久| 偷拍亚洲欧洲综合| 不卡的电影网站| 日韩亚洲国产中文字幕欧美| 中文字幕一区二区视频| 日本va欧美va精品发布| 99精品久久99久久久久| 欧美大片在线观看一区二区| 亚洲精品国产一区二区精华液 | 日韩一二三区不卡| 亚洲蜜桃精久久久久久久| 久久国产精品72免费观看| 在线精品视频一区二区三四| 国产视频一区二区在线观看| 日韩av在线播放中文字幕| 在线观看91精品国产入口| 国产精品免费免费| 国产成人亚洲精品青草天美| 欧美一区二区三区在线视频| 亚洲精品国产无天堂网2021| 99精品久久99久久久久| 国产视频一区在线播放| 黄色日韩三级电影| 欧美一区二区三区四区高清| 亚洲线精品一区二区三区| 色综合久久综合网97色综合| 国产精品免费av| 高清beeg欧美| 国产拍揄自揄精品视频麻豆| 精品一区二区成人精品| 欧美电视剧免费全集观看| 美女网站色91| 欧美一区二区三区人| 日韩精品色哟哟| 91精品国产乱码| 美国欧美日韩国产在线播放| 欧美一级在线视频| 麻豆成人91精品二区三区|