ns的网络功能实体结构及类结构内容摘要:
Module/xxx在 register函数中都会 new一个 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 } 保存最后一次调用时的clsfr module列表,以 classifier为索引 classifier列表,以 classifier为索引 RtModule instproc register { node } { Attach to node and register routing notifications $self attachnode $node $node routenotify $self $node portnotify $self } 进入到 rtmodule的c++代码中,把该节点的指针交给rtmodule的一个变量 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构成链表 Node instproc portnotify { module } { $self instvar ptnotif_ lappend ptnotif_ $module } Node RtModule/Base Classifier/Hash/Dest mod_assoc_(_o13)=_o12 classifier_ entry_ 红色是Node的变量 表示对象之间的联系纽带 数据包的传输 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 路由模块,如果要加入策略路由的话,或者自己开发路由协议,需要自己开发这个模块。 其实该模块的功能是计算路由,而执行路由是由 Classifier进行的 路由的执行 启动过程 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] } } $ns duplexlink $n1 $n2 1Mb 10ms DropTail _o17 info class Queue/DropTail _o18 info class SimpleLink _o19 info class Connector _o20 info class Connector _o21 info class DelayLink _o22 i。ns的网络功能实体结构及类结构
本资源仅提供20页预览,下载后可查看全文
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。
用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。
相关推荐
nuskin88-plan
5% 3, 领导奖金 6代 5% 29 1 个业务代表 黄 金石级主任 5% 23………… 青 ……… 5% 5% 45………… 红 ………… 5% 5% 5% 67………… 绿 ………… 5% 5% 5% 5% 811……… .钻 ………… 5% 5% 5% 5% 5% 12………… 蓝钻 ……… 5% 5% 5% 5% 5% 5% 13以上 … 蓝钻第二事业 …
nuisthpc使用讲座
!/bin/bash PBS S /bin/bash PBS N helloworld PBS P P123456789 PBS q queue Regular PBS l nodes=1:ppn=4 PBS l walltime=00:05:00 cd $PBS_O_WORKDIR ./ amp。 ./ amp。 ./ amp。 ./ 此处需要设计一段等待脚本保持 在所有任务结束之前不退出
nodejs(mean)全栈开发入门
• 导入模块 • 常规 JS代码 • 模块 • HTTP基础知识 HelloWorld : : node : 使用 require导入模块 • require,加载模块,返回模块导出的对象 • var =require(‘’)。 • var =require(‘./routes
noisedistortioninmicrowavesystems
发表于 2025-04-21
1S)(Ta d d e dNGk T BGN 21212 )||1(|1|)||1(||2211222121o u tSSr o m S o u r c eA v a i l a b l e Fr o m N e t w o r kA v a i l a b l e FSSPPGSSo u t SSSS 11211222 1kTBN 2For