NS-2.27 and Leach

Friday, April 16, 2004

Traces and what wrk_ attribute?

Problem:
Don't know which wrk_ attribute it's referring to.

trace/cmu-trace.cc: In member function `void CMUTrace::format_rca(Packet*, int)
':
trace/cmu-trace.cc:1200: error: `wrk_' undeclared (first use this function)
trace/cmu-trace.cc:1200: error: (Each undeclared identifier is reported only
once for each function it appears in.)
make: *** [trace/cmu-trace.o] Error 1


Fix:
the offending line is apparently:

sprintf(wrk_ + offset, "------- [%c %d %d %d] ",
op,
rca_hdr->rca_src(),
rca_hdr->rca_link_dst(),
rca_hdr->rca_mac_dst()
);


Since ns2.1b5, wrk_ has been replaced by another pointer.

sprintf(pt_->buffer() + offset, "------- [%c %d %d %d] ",
op,
rca_hdr->rca_src(),
rca_hdr->rca_link_dst(),
rca_hdr->rca_mac_dst()
);


However, I'm not sure if the trace format is correct. It should be...though there are other types of traces, such as pt_->tagged() and newtrace_, from looking at the other format functions.

0 Comments:

Post a Comment

<< Home