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

[ns] What's the format of TrafficTrace file



Thanks to Yu Haobo, but I cant get the simulation run yet.
The error is:
bad file size in Tracefile

My tracefile is created with 
fprintf(ofp,"%x %x \n",tre.trec_time,tre.trec_size);

It seems that problem is in TrafficTrace.cc: 
		nrec_ = buf.st_size/sizeof(tracerec);

		if (nrec_ * sizeof(tracerec) != buf.st_size) {
			printf("bad file size in %s\n", name_);
			return -1;
		}
However, I use a small program to test my tracefile, nrec_ and
buf.st_size is ok.

What's the trick?