From 2b5cc8e68f683fb27e626e1a1e9c18ecc1946075 Mon Sep 17 00:00:00 2001 From: marko Date: Thu, 17 Nov 2005 12:22:21 +0000 Subject: [PATCH] Move proc linkByIfc from exec.tcl to linkcfg.tcl Bug found by: Submitted by: Requested by: Reviewed by: Approved by: Obtained from: --- exec.tcl | 20 -------------------- linkcfg.tcl | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/exec.tcl b/exec.tcl index 970c39b..5c2728c 100755 --- a/exec.tcl +++ b/exec.tcl @@ -399,26 +399,6 @@ proc monitor_loop {} { } -proc linkByIfc { node ifc } { - global link_list - - set peer [peerByIfc $node $ifc] - foreach link $link_list { - set endpoints [linkPeers $link] - if { $endpoints == "$node $peer" } { - set dir downstream - break - } - if { $endpoints == "$peer $node" } { - set dir upstream - break - } - } - - return [list $link $dir] -} - - proc execSetIfcQDisc { eid node ifc qdisc } { set target [linkByIfc $node $ifc] set peers [linkPeers [lindex $target 0]] diff --git a/linkcfg.tcl b/linkcfg.tcl index 86c613f..312c6c7 100755 --- a/linkcfg.tcl +++ b/linkcfg.tcl @@ -446,3 +446,24 @@ proc newLink { lnode1 lnode2 } { return $link } + + +proc linkByIfc { node ifc } { + global link_list + + set peer [peerByIfc $node $ifc] + foreach link $link_list { + set endpoints [linkPeers $link] + if { $endpoints == "$node $peer" } { + set dir downstream + break + } + if { $endpoints == "$peer $node" } { + set dir upstream + break + } + } + + return [list $link $dir] +} + -- 2.39.5