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

[ns] trace-file help



Hi everybody
In order to understand how to create a Traffic/trace source I'm trying writing my first trace file.
I want to start with a simple CBR source just to verify that this way of creating the file is correct.

#include <stdio.h>
main() 
{
int k;
long int next=100000, dim=53;
FILE *file_out;
file_out=fopen("CBR_trace","w");
for (k=0; k<100; k++)
{
 fprintf(file_out,"%ld%ld",next,dim);
}
fclose(file_out);
}
Even if the length of "next" and "dim" is 32 bits this file doesn't work in ns.
Moreover if I use "fwrite" instead of "fprintf" nothing changes. 
Can someone tell me why?.
thanks in advance.


--
TiscaliFreeNet, libero accesso ad Internet.
http://www.tiscalinet.it