Commit c6d1231f authored by Timothy Stack's avatar Timothy Stack

Upgrade to ns 2.29

parent 262d2d67
......@@ -12,9 +12,10 @@ TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = tbsetup/nsverify
NS_VERSION=2.27
TCLCL_VERSION=1.15
NS_SRC_TARBALL=ns-allinone-$(NS_VERSION).tar.gz
NS_VERSION=2.29
NS_TAR_VERSION=2.29.2
TCLCL_VERSION=1.17
NS_SRC_TARBALL=ns-allinone-$(NS_TAR_VERSION).tar.gz
include $(OBJDIR)/Makeconf
......@@ -46,7 +47,7 @@ ns-allinone-$(NS_VERSION):
else \
echo "Downloading $(NS_SRC_TARBALL)"; \
wget --quiet \
http://www.emulab.net/downloads/ns-allinone-2.27.tar.gz; \
http://www.emulab.net/downloads/ns-allinone-$(NS_TAR_VERSION).tar.gz; \
echo "Unpacking $(NS_SRC_TARBALL)"; \
tar xfz $(NS_SRC_TARBALL); \
fi
......@@ -54,6 +55,10 @@ ns-allinone-$(NS_VERSION):
patch-ns-$(NS_VERSION):
patch -d ns-allinone-$(NS_VERSION)/ns-$(NS_VERSION) \
< $(SRCDIR)/ns-$(NS_VERSION).patch
if test -e $(SRCDIR)/tclcl-$(TCLCL_VERSION).patch; then \
patch -d ns-allinone-$(NS_VERSION)/tclcl-$(TCLCL_VERSION) \
< $(SRCDIR)/tclcl-$(TCLCL_VERSION).patch; \
fi
touch $@
nstb: ns-allinone-$(NS_VERSION) patch-ns-$(NS_VERSION)
......
diff -ur ./tcl/lan/vlan.tcl ../../ns-allinone-2.27-emulab/ns-2.27/tcl/lan/vlan.tcl
--- ./tcl/lan/vlan.tcl Mon Jan 12 17:54:40 2004
+++ ../../ns-allinone-2.27-emulab/ns-2.27/tcl/lan/vlan.tcl Fri Jan 20 17:39:02 2006
@@ -143,8 +143,12 @@
$src add-neighbor $self
set sid [$src id]
- set link_($sid:$id_) [new Vlink $ns_ $self $src $self $bw 0]
- set link_($id_:$sid) [new Vlink $ns_ $self $self $src $bw 0]
+ set link_($sid:$id_) [new Vlink $ns_ $self $src $self $bw $delay]
+ set link_($id_:$sid) [new Vlink $ns_ $self $self $src $bw $delay]
+
+ # linktest: add to the linktest set of links.
+ $ns_ addLTLink $sid:$id_
+ $ns_ addLTLink $id_:$sid
$src add-oif [$link_($sid:$id_) head] $link_($sid:$id_)
$src add-iif [[$nif set iface_] label] $link_($id_:$sid)
@@ -520,6 +524,12 @@
$lan addNode $nodelist $bw $delay $llType $ifqType $macType \
$phyType $mactrace $ifqLen
+ # linktest renaming
+ $self instvar id_counter
+ $lan set tbaltname_ tblan-lan[incr id_counter]
+ global last_lan
+ set last_lan $lan
+
return $lan
}
diff -ur ./tcl/lib/ns-lib.tcl ../../ns-allinone-2.27-emulab/ns-2.27/tcl/lib/ns-lib.tcl
--- ./tcl/lib/ns-lib.tcl Mon Jan 12 17:54:42 2004
+++ ../../ns-allinone-2.27-emulab/ns-2.27/tcl/lib/ns-lib.tcl Fri Jan 20 17:38:51 2006
@@ -258,6 +258,11 @@
$self multicast $args
}
eval $self next $args
+
+ # linktest renaming
+ $self set id_counter 0
+ global last_sim
+ set last_sim $self
}
Simulator instproc nullagent {} {
@@ -561,6 +566,13 @@
$node set ns_ $self
$self check-node-num
+
+ # linktest renaming
+ $self instvar id_counter
+ $node set tbaltname_ tbnode-n[incr id_counter]
+ global last_host
+ set last_host $node
+
return $node
}
@@ -1159,6 +1171,28 @@
$n1 set-neighbor [$n2 id]
$n2 set-neighbor [$n1 id]
}
+
+ ### linktest -- set up DupLink class to return
+ set dup [new Duplink]
+ $dup set from $link_($i1:$i2)
+ $dup set to $link_($i2:$i1)
+
+ # add the duplink ref to the simplex links.
+ $link_($i1:$i2) set linkRef_ $dup
+ $link_($i2:$i1) set linkRef_ $dup
+
+ # and add to the linktest list of links.
+ $self addLTLink $i1:$i2 $type
+ $self addLTLink $i2:$i1 $type
+
+ $self instvar id_counter
+ $dup set tbaltname_ tblink-l[incr id_counter]
+
+ # naming
+ global last_link
+ set last_link $dup
+
+ return $dup
}
Simulator instproc duplex-intserv-link { n1 n2 bw pd sched signal adc args } {
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment