freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

ns2運(yùn)行機(jī)制分析(編輯修改稿)

2024-11-14 16:43 本頁(yè)面
 

【文章內(nèi)容簡(jiǎn)介】 $mod register $self set reg_module_([$mod modulename]) $mod } module_list_是 Node的變量!只有 Base一個(gè)值 RtModule/Base instproc register { node } { $self next $node $self instvar classifier_ set classifier_ [new Classifier/Hash/Dest 32] $classifier_ set mask_ [AddrParams NodeMask 1] $classifier_ set shift_ [AddrParams NodeShift 1] XXX Base should ALWAYS be the first module to be installed. $node installentry $self $classifier_ } 每一個(gè) RtModule/xxx在 register函數(shù)中都會(huì) new一個(gè) classifier Node instproc installentry { module clsfr {hook } } { $self instvar classifier_ mod_assoc_ hook_assoc_ if [info exists classifier_] { if [info exists mod_assoc_($classifier_)] { $self unregistermodule $mod_assoc_($classifier_) unset mod_assoc_($classifier_) } Connect the new classifier to the existing classifier chain, if there is any. if [info exists hook_assoc_($classifier_)] { if { $hook == target } { $clsfr target $hook_assoc($classifier_) } elseif { $hook != } { $clsfr install $hook $hook_assoc_($classifier_) } set hook_assoc_($clsfr) $hook_assoc_($classifier_) unset hook_assoc_($classifier_) } } set mod_assoc_($clsfr) $module set classifier_ $clsfr } 保存最后一次調(diào)用時(shí)的clsfr module列表,以 classifier為索引 classifier列表,以 classifier為索引 Classifier instproc install {slot val} { $self set slots_($slot) $val $self cmd install $slot $val } RtModule_3 clfr_3 hook_assoc_(clfr_2) hook_assoc_(clfr_3) mod_assoc_(clfr_3) mod_assoc_(clfr_2) RtModule_2 clfr_2 RtModule_1 clfr_1 hook_assoc_(clfr_1)? mod_assoc_(clfr_1) Node instproc insertentry { module clsfr {hook } } { $self instvar classifier_ mod_assoc_ hook_assoc_ if { $hook != } { Build a classifier chain when specified set hook_assoc_($clsfr) $classifier_ if { $hook == target } { $clsfr target $classifier_ } elseif { $hook != } { $clsfr install $hook $classifier_ } } Associate this module to the classifier, so if the classifier is removed later, we39。ll remove the module as well. set mod_assoc_($clsfr) $module set classifier_ $clsfr } RtModule_3 clfr_3 hook_assoc_(clfr_2) hook_assoc_(clfr_3) mod_assoc_(clfr_3) mod_assoc_(clfr_2) RtModule_2 clfr_2 RtModule_1 clfr_1 hook_assoc_(clfr_1)? mod_assoc_(clfr_1) RtModule instproc register { node } { Attach to node and register routing notifications $self attachnode $node $node routenotify $self $node portnotify $self } 進(jìn)入到 rtmodule的c++代碼中,把該節(jié)點(diǎn)的指針交給rtmodule的一個(gè)變量 Node instproc routenotify { module } { $self instvar rtnotif_ if {$rtnotif_ == } { set rtnotif_ $module } else { $rtnotif_ routenotify $module } $module cmd routenotify $self } RtModule instproc routenotify { module } { $self instvar next_rtm_ if {$next_rtm_ == } { set next_rtm_ $module } else { $next_rtm_ routenotify $module } } 把 rtmoudule構(gòu)成鏈表 Node instproc portnotify { module } { $self instvar ptnotif_ lappend ptnotif_ $module } Node RtModule/Base Classifier/Hash/Dest mod_assoc_(_o13)=_o12 classifier_ entry_ 紅色是Node的變量 表示對(duì)象之間的聯(lián)系紐帶 數(shù)據(jù)包的傳輸 set n1 [$ns node] _o11 _o11 info class Node _o12 info class RtModule/Base _o13 info class Classifier/Hash/Dest set n2 [$ns node] _o14 _o14 info class Node _o15 info class RtModule/Base _o16 info class Classifier/Hash/Dest _o17 info class invalid mand name _o17 while executing _o17 info class 路由模塊,如果要加入策略路由的話,或者自己開發(fā)路由協(xié)議,需要自己開發(fā)這個(gè)模塊。其實(shí)該模塊的功能是計(jì)算路由,而執(zhí)行路由是由 Classifier進(jìn)行的 路由的執(zhí)行 插敘:最簡(jiǎn)單情形下的網(wǎng)絡(luò)實(shí)體 啟動(dòng)過(guò)程 3☆ ? $ns duplexlink $n0 $n1 1Mb 10ms DropTail tcl/lib/ Simulator instproc duplexlink { n1 n2 bw delay type args } { $self instvar link_ set i1 [$n1 id] set i2 [$n2 id] if [info exists link_($i1:$i2)] { $self removenamlinkconfig $i1 $i2 } eval $self simplexlink $n1 $n2 $bw $delay $type $args eval $self simplexlink $n2 $n1 $bw $delay $type $args Modified by GFR for nixvector routing if { [Simulator set nixrouting] } { Inform nodes of neighbors $n1 setneighbor [$n2 id] $n2 setneighbor [$n1 id] } } 插敘:?jiǎn)尾ス?jié) 點(diǎn)的構(gòu)造 tcl/lib/ Simulator instproc simplexlink { n1 n2 bw delay qtype args } { …… if [info exists queueMap_($qtype)] { set qtype $queueMap_($qtype) } …… set q [new Queue/$qtype] …… set link_($sid:$did) [new SimpleLink $n1 $n2 $bw $delay $q] ...... } 這個(gè)語(yǔ)句創(chuàng)建Queue/TropTail的一個(gè)對(duì)象 tcl/lib/ SimpleLink instproc init { src dst bw delay q {lltype DelayLink} } { $self next $src $dst $self instvar link_ queue_ head_ toNode_ ttl_ $self instvar drophead_ set ns [Simulator instance] set drophead_ [new Connector] $drophead_ target [$ns set nullAgent_] set head_ [new Connector] $head_ set link_ $self set head_ $queue_ replace by the following xxx this is hacky if { [[$q info class] info heritage ErrModule] == ErrorModule } { $head_ target [$q classifier] } else { $head_ target $q } Li k instproc init { src dst } { $self next $self instvar id_ set id_ [Link set nl_] Link set nl_ [expr $id_ + 1] $self instvar trace_ fromNode_ toNode_ color_ oldColor_ set fromN de_ $src set toNode_ $dst set color_ black set oldColor_ black set trace_ } set queue_ $q set link_ [new $lltype] $link_ set bandwidth_ $bw $link_ set delay_ $delay $queue_ target $link_ $link_ target [$dst entry] $queue_ droptarget $drophead_ XXX put the ttl checker after the delay so we don39。t have to worry about accounting for ttldrops within the trace and/or monitor fabri
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖片鄂ICP備17016276號(hào)-1