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

[ns] Re: [patch] cmu-trace.cc in NS-2.1b8



I am sorry to forget to attach the patchfile.

furu

From: Daichi Furusaka <[email protected]>
Subject: [patch] cmu-trace.cc in NS-2.1b8
Date: Thu, 14 Jun 2001 17:19:08 +0900

> Hi all,
> 
> I have attached a small patch for NS-2.1b8 which addresses
> invalid nam trace format of NAM-1.0a10.
> 
> ns-ver:	2.1b8
> nam-ve:	1.0a10
> OS:	FreeBSD 4.3R
> problem:when using nam for visualization of wireless
> 	simulation, nam said the following warning.
> 
> 	> Unexpected end of line in: <%s:NAM_TRACE_FORMAT>
> 	> Perhaps you have extra spaces at the end of the line.
> 
> file:	$NS/cmu-trace.cc
> solution:
> 	- corrects extra spaces at EOL of nam trace.
> 	- this patch (diff -p) is attached to this mail.
> 
> Also I can find another invalid format in "$NS/tcl/lib/ns-lib.tcl".
> In "Simulator instproc initial_node_pos {nodep size}", ns puts
> nam-configuration with `-z' option which is an unknown flag.
> But I guess this is an incoming option or something.
> So nothing has been done with it.
> 
> # Maybe it seems to be better for waiting that wireless nam options
> # are fixed.
> 
> --- furu
*** cmu-trace.cc.orig	Thu Jun 14 14:38:34 2001
--- cmu-trace.cc	Thu Jun 14 15:06:47 2001
*************** CMUTrace::nam_format(Packet *p, int offs
*** 625,631 ****
  	if (op == 'D') op = 'd' ;
  	if (op == 'h') {
  	   sprintf(pt_->nbuffer(),
! 		"+ -t %.9f -s %d -d %d -p %s -e %d -c 2 -a %d -i %d -k %3s ",
  		Scheduler::instance().clock(),
  		src_,                           // this node
  		next_hop,
--- 625,631 ----
  	if (op == 'D') op = 'd' ;
  	if (op == 'h') {
  	   sprintf(pt_->nbuffer(),
! 		"+ -t %.9f -s %d -d %d -p %s -e %d -c 2 -a %d -i %d -k %3s",
  		Scheduler::instance().clock(),
  		src_,                           // this node
  		next_hop,