[ns] Fwd: Traffictrace format problems
Ebonie Wiliams
enwillia at gmail.com
Fri Feb 29 08:01:34 PST 2008
---------- Forwarded message ----------
From: Ebonie Wiliams <enwillia at gmail.com>
Date: Fri, Feb 29, 2008 at 10:57 AM
Subject: Traffictrace format problems
To: ns-users at isi.edu
Here is my problem:
I am trying to create network traffic using a traffictrace application and
file. I know that the file must be in binary format with two 32bit fields
(the first field in microseconds for interpacket transfer time, and the next
in bytes for packet size). I have a java program that generates the packets
and writes them to file in binary string format (tobinaryString() : Integer
class). I used the BufferedWriter and FileWriter to write the output.
Then, I convert the output to binary using ascii2binary (a command-line
linux program). Every time I look at my output changed to binary, there is
barely any output written to it. I have done this many times. First few
times, I simply had my java program write the fields without expressing them
as a binary string (tobinaryString()). At first I would get this error
"read failed" and NS would run my tcl script without generating any packets
for the node that with the traffictrace application. I know that this means
that NS thinks my file has no elements or is null. Now since I use
ascii2binary, I don't get that anymore. Before using ascii2binary, I just
had java's toBinaryString().
I have tried using the example-trace file included in the source code. It
works, and when I look at its fields (I used ascii2binary's binary2ascii
command), there is a lot of output in the file. My output files barely have
anything written in them. My output files look fine in ascii format,
though.
I have tried to use the hack to ns that allows for ascii traffictrace
files. I found this on the ns-users mailing list. It didn't work, so I am
not using it anymore.
My question is that I don't know how to create a traffictrace file that is
successfully read by NS.
Should I use another method to write to my output in java (BufferedWriter,
FileWriter)? Should I use another language? I appreciate your feedback,
thanks.
More information about the Ns-users
mailing list