[ns] Can't run TFRC simulation scripts
Wed, 10 Jan 2001 12:35:56 +0000 (GMT)
On Tue, 9 Jan 2001, Sally Floyd wrote:
> Sorry, it turns out that the old scripts don't run because a
> line in tfrc-sink.cc got changed
by you. 'fess up!
> printf ("time: %7.5f loss_rate: %7.5f \n", now, drops);
> printf ("time: %7.5f sample 0: %5d loss_rate: %7.5f \n",
> now, sample, drops);
> and the awkfiles at "http://www.aciri.org/tfrc/sims1.html"
> couldn't deal with it. I will check in a fix to tfrc-sink.cc tomorrow,
> adding back the old line.
printf ("time: %7.5f loss_rate: %7.5f sample 0: %5d \n",
now, drops, sample);
strikes me as the more backwards-compatible line, keeping all info
there. And sample_0: is better still for awk parsing, as it's
obviously one field. If you're going to fix your original debug
mistake (tfrc-sink.cc 1.23), that's probably the best long-term
choice, rather than kludging in a second line as you've just done
since your page says:
These scripts are quick amalgams of shell scripts, awk, tcl, and
whatever else was handy at the time, so they are not intended as an
example of good programming style.
I'd give serious thought to updating the awk scripts in such cases,
rather than altering output functionality from ns. But more thought
when altering output originally is required; this could have been
had similar considerations when modifying the satellite dump routine
and related perl scripts.