[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] gen-map




You could try the attached patch for ns-trace.tcl.

It is a quick hack to get something out of gen-map rather
than a comprehensive attempt to understand what the original
author was trying to achieve...

regards
	aidan
____
:wq!


wei sun wrote:
> 
> Hi Sudhin,
> 
> I just found that '$ns gen-map' command is not working. When going through
> the April mail archive, I saw a message posted by you asking the same
> question. How did you solve this problem?
> 
> Thanks,
> 
> Wei
Index: ns/tcl/lib/ns-trace.tcl
===================================================================
RCS file: /projects/comms/cvs/ns/tcl/lib/ns-trace.tcl,v
retrieving revision 1.1.1.2
retrieving revision 1.3
diff -u -r1.1.1.2 -r1.3
--- ns/tcl/lib/ns-trace.tcl	1999/11/19 04:02:39	1.1.1.2
+++ ns/tcl/lib/ns-trace.tcl	2000/02/11 03:50:18	1.3
@@ -30,7 +30,7 @@
 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 # SUCH DAMAGE.
 #
-# @(#) $Header: /usr/src/mash/repository/vint/ns-2/tcl/lib/ns-trace.tcl,v 1.18 1999/04/22 18:54:01 haldar Exp $
+# @(#) $Header: /projects/comms/cvs/ns/tcl/lib/ns-trace.tcl,v 1.1.1.2 1999/11/19 04:02:39 aidan Exp $
 #
 
 Trace instproc init type {
@@ -145,10 +145,11 @@
 
 	set nn [Node set nn_]
 	for {set i 0} {$i < $nn} {incr i} {
-		if ![info exists Node($i)] {
-			incr i
+		if ![info exists Node_($i)] {
+			#que?# incr i
 			continue
 		}
+		set n $Node_($i)
 		puts "Node [$n tn]"
 		foreach nc [$n info vars] {
 			switch $nc {
@@ -172,7 +173,7 @@
 		if {[llength [$n set agents_]] > 0} {
 			puts "\n\tAgents at node (possibly in order of creation):"
 			foreach a [$n set agents_] {
-				puts "\t\t$a\t[gc $a]\t\tportID: [$a set portID_]([$a set addr_])"
+				puts "\t\t$a\t[gc $a]\t\tdst-addr/port: [format 0x%x [$a set dst_addr_]]/[$a set dst_port_]"
 			}
 		}
 		puts ""
begin:vcard 
n:Williams;Aidan
tel;fax:+61 2 9666 0501
tel;work:+61 2 9666 0649
x-mozilla-html:FALSE
url:http://www.arc.corp.mot.com/
org:Motorola Australian Research Centre;Scalable Commodity Internet Laboratory
version:2.1
email;internet:[email protected]
title:Senior Research Engineer
adr;quoted-printable:;;(Not mailing address)=0D=0ALevel 3, 12 Lord Street;Botany;NSW;2019;Australia
note;quoted-printable:Mailing address is:=0D=0A=0D=0AAidan Williams=0D=0ALocked Bag 5028=0D=0ABotany NSW 1455=0D=0A
fn:Aidan Williams
end:vcard