]> git.entuzijast.net Git - imunes.git/commitdiff
Change default link bandwith to 0. The reasoning behind this decision
authormarko <marko>
Thu, 30 Aug 2007 23:19:21 +0000 (23:19 +0000)
committermarko <marko>
Thu, 30 Aug 2007 23:19:21 +0000 (23:19 +0000)
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:

editor.tcl
initgui.tcl
linkcfg.tcl

index f9fdf2cabfc4f1aa1cd9e34799b22f54c3ed8e89..7a31b28e4a2f6eb881f27292bd7d31f64cd3cba9 100755 (executable)
@@ -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]\r"
+    if { "$bwstr" != "" } {
+       set labelstr "$labelstr$bwstr\r"
+    }
     if { "$delstr" != "" } {
        set labelstr "$labelstr$delstr\r"
     }
index f76c5f278751dddbc8271757a9d404e89dc5af5b..4cd302504b1d6464c65392d20e5d0cb885f6346f 100755 (executable)
@@ -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.
 #
 #    * 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
index bde869d55b4e07df79baf8a05d2af138d6af920c..4caf4db52c136db77da7eac6d834666a57ed6686 100755 (executable)
@@ -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 } {