-# $Id: exec.tcl,v 1.54 2007/08/18 18:41:43 marko Exp $
+# $Id: exec.tcl,v 1.55 2007/08/21 07:54:15 marko Exp $
# Copyright 2004, 2005 University of Zagreb, Croatia. All rights reserved.
#
[lindex [[typemodel $lnode1].nghook $eid $lnode1 $ifname1] 1]
set nghook2 \
[lindex [[typemodel $lnode2].nghook $eid $lnode2 $ifname2] 1]
- nexec ngctl connect $ngpeer1: $ngpeer2: $nghook1 $nghook2
+ nexec ngctl mkpeer $ngpeer1: pipe $nghook1 upper
+ nexec ngctl name $ngpeer1:$nghook1 $lname
+ nexec ngctl connect $lname: $ngpeer2: lower $nghook2
+
+ # Ethernet frame has a 14-byte header - this is a temp. hack!!!
+ nexec ngctl msg $lname: setcfg "{ header_offset=14 }"
+
+ # Link parameters
+ nexec ngctl msg $lname: setcfg \
+ "{ bandwidth=$bandwidth delay=$delay \
+ upstream={ BER=$ber duplicate=$dup } \
+ downstream={ BER=$ber duplicate=$dup } }"
+
+ # Queues
+ foreach node [list $lnode1 $lnode2] {
+ if { $node == $lnode1 } {
+ set ifc $ifname1
+ } else {
+ set ifc $ifname2
+ }
+
+ if { [nodeType $lnode1] != "rj45" && \
+ [nodeType $lnode2] != "rj45" } {
+ execSetIfcQDisc $eid $node $ifc [getIfcQDisc $node $ifc]
+ execSetIfcQDrop $eid $node $ifc [getIfcQDrop $node $ifc]
+ execSetIfcQLen $eid $node $ifc [getIfcQLen $node $ifc]
+ }
+ }
}
nexec rm -fr /var/run/quagga