[ns] another implementation question for ad hocs
Fri, 30 Mar 2001 14:24:09 +0200 (CEST)
If your packets will be of some new packet type (i.e. ch->ptype() that is
"switched" on is something else than what is already there), you will need
to do that, or at least you will need to add a part saying
where PT_NEWP is the new packet type. The reason for having this
format_xyz() function is if you want any protocol specific data in the
trace file (the format_xyz() function writes stuff to the trace
file). Otherwise I suppose just the above would do (but you need that
case PT_NEWP: stuff, otherwise an error will occur (unknown packet type)).
Hope this helps,
On Fri, 30 Mar 2001, Piyush Khengar wrote:
> I have noticed that in the file cmu-trace.cc, there is a switch
> statement (in CMUTrace::format() ) that detects the packet types and
> then calls another function accordingly.
> E.g. case PT_AODV:
> format_aodv(p, offset);
> What is the format_aodv/tora/dsr() function used for? I've had a look at
> the code for this function and am not sure of it's significance. Do I
> need to include a format_myagent() function for my protocol?
> Many thanks,
> (ns-2.1b7, red hat 7)