From: marko Date: Thu, 30 Aug 2007 23:19:21 +0000 (+0000) Subject: Change default link bandwith to 0. The reasoning behind this decision X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=c803c30b40abbf9d551545706cbc0a06496537c2;p=imunes.git Change default link bandwith to 0. The reasoning behind this decision is that as we will target bigger / more complex topologies, the overhead of emulating link effects might become more pronounced. ng_pipe nodes when configured for zero bandwith, delay, packet duplication and loss will bypass the complex queuing and state keeping / locking code, hence forward the packets with minimal overhead. While here, once again change the default settings for which parameters will be displayed in the editor. Displaying link labels, ifnames and IPv4 addresses is now on by default, while displaying of IPv6 addresses is not. Bug found by: Submitted by: Reviewed by: Approved by: Obtained from: --- diff --git a/editor.tcl b/editor.tcl index f9fdf2c..7a31b28 100755 --- a/editor.tcl +++ b/editor.tcl @@ -1,4 +1,4 @@ -# $Id: editor.tcl,v 1.74 2007/08/14 20:46:47 marko Exp $ +# $Id: editor.tcl,v 1.75 2007/08/30 23:19:21 marko Exp $ # # Copyright 2004, 2005 University of Zagreb, Croatia. All rights reserved. # @@ -608,10 +608,13 @@ proc updateLinkLabel { link } { global showLinkLabels set labelstr "" + set bwstr "[getLinkBandwidthString $link]" set delstr [getLinkDelayString $link] set ber [getLinkBER $link] set dup [getLinkDup $link] - set labelstr "$labelstr[getLinkBandwidthString $link] " + if { "$bwstr" != "" } { + set labelstr "$labelstr$bwstr " + } if { "$delstr" != "" } { set labelstr "$labelstr$delstr " } diff --git a/initgui.tcl b/initgui.tcl index f76c5f2..4cd3025 100755 --- a/initgui.tcl +++ b/initgui.tcl @@ -1,4 +1,4 @@ -# $Id: initgui.tcl,v 1.39 2007/07/25 11:50:49 marko Exp $ +# $Id: initgui.tcl,v 1.40 2007/08/30 23:19:21 marko Exp $ # # Copyright 2004, 2005 University of Zagreb, Croatia. All rights reserved. # @@ -80,24 +80,20 @@ # * autorearrange_enabled -- control variable indicating is # autorearrange enabled. # -# * defLinkColor -- defines the default link color, default link color is set -# to red. -# * defLinkWidth -- defines the width of the link, default is 2. -# * defEthBandwidth -- defines the ethernet bandwidth, default is set to -# 100000000. -# * defSerBandwidth -- defines the serail link bandwidth, default is 2048000. -# * defSerDelay -- defines the serail link delay, default is 2500. -# * showIfNames -- control variable for showing interface names, default is 1 -# * showIfIPaddrs -- control variable for showing interface IPv4 addresses, -# default is 1 (addresses are visible). -# * showIfIPv6addrs -- control variable for showing interface IPv4 -# addresses, default is 1 (addresses are visible). -# * showNodeLabels -- control variable for showing node labels, default is 1. -# * showLinkLabels -- control variable for showing link labels, default is 1. +# * defLinkColor -- defines the default link color +# * defLinkWidth -- defines the width of the link +# * defEthBandwidth -- defines the ethernet bandwidth +# * defSerBandwidth -- defines the serail link bandwidth +# * defSerDelay -- defines the serail link delay +# * showIfNames -- control variable for showing interface names +# * showIfIPaddrs -- control variable for showing interface IPv4 addresses +# * showIfIPv6addrs -- control variable for showing interface IPv6 addrs +# * showNodeLabels -- control variable for showing node labels +# * showLinkLabels -- control variable for showing link labels # # * supp_router_models -- supproted router models, currently xorp quagga # and static. -# * def_router_model -- default router model, set to quagga. +# * def_router_model -- default router model #**** @@ -130,9 +126,9 @@ set resizemode false set defLinkColor Red set defFillColor Gray set defLinkWidth 2 -set defEthBandwidth 100000000 -set defSerBandwidth 2048000 -set defSerDelay 2500 +set defEthBandwidth 0 +set defSerBandwidth 0 +set defSerDelay 0 set newoval "" set defOvalColor #CFCFFF @@ -145,11 +141,11 @@ set defTextFontFamily "Arial" set defTextFontSize 12 set defTextColor #000000 -set showIfNames 0 -set showIfIPaddrs 0 +set showIfNames 1 +set showIfIPaddrs 1 set showIfIPv6addrs 0 set showNodeLabels 1 -set showLinkLabels 0 +set showLinkLabels 1 set showIPsecConfig 1 set showBkgImage 0 diff --git a/linkcfg.tcl b/linkcfg.tcl index bde869d..4caf4db 100755 --- a/linkcfg.tcl +++ b/linkcfg.tcl @@ -1,4 +1,4 @@ -# $Id: linkcfg.tcl,v 1.17 2007/07/19 03:14:13 marko Exp $ +# $Id: linkcfg.tcl,v 1.18 2007/08/30 23:19:21 marko Exp $ # # Copyright 2004, 2005 University of Zagreb, Croatia. All rights reserved. # @@ -198,7 +198,7 @@ proc getLinkBandwidthString { link } { global $link set bandstr "" set bandwidth [getLinkBandwidth $link] - if { "$bandwidth" != "" } { + if { $bandwidth > 0 } { if { $bandwidth >= 660000000 } { set bandstr "[format %.2f [expr {$bandwidth / 1000000000.0}]] Gbps" } elseif { $bandwidth >= 99000000 } {