flowmon.tcl

来自「在Linux下做的QuadTree的程序」· TCL 代码 · 共 30 行

TCL
30
字号
# make a flow monitorproc makeflowmon {} {    global ns    set flowmon [new QueueMonitor/ED/Flowmon]    set cl [new Classifier/Hash/SrcDestFid 33]        $cl proc unknown-flow { src dst fid hashbucket } {	set fdesc [new QueueMonitor/ED/Flow]	set slot [$self installNext $fdesc]	$self set-hash $hashbucket $src $dst $fid $slot    }    $cl proc no-slot slotnum {    }    $flowmon classifier $cl    return $flowmon}# attach a flow monitor to a linkproc attach-fmon {lnk fm} {    global ns    set isnoop [new SnoopQueue/In]    set osnoop [new SnoopQueue/Out]    set dsnoop [new SnoopQueue/Drop]    $lnk attach-monitors $isnoop $osnoop $dsnoop $fm    set edsnoop [new SnoopQueue/EDrop]    $edsnoop set-monitor $fm    [$lnk queue] early-drop-target $edsnoop    $edsnoop target [$ns set nullAgent_]}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?