[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ns] another implementation question for ad hocs
Thanks Anders,
I had already added that into the code. I thought that maybe the
format_aodv() function was to do with the receiving node. Yeah, I know,
stupid...
You see, when I simulate the protocol as two explicitly created agents
on a wired link, each ad hoc agent is able to receive packets
(myprotocol specific, like HELLO packets for example) from the other
with no problems. However, when simulating in a wireless environment
using node-config, transmitted packets (again, I'm only interested in
myprotocol specific ones) are not received by the other side, thereby
rendering the protocol useless.
What do I need to do to enable the other side to receive these packets.
It's probably something really obvious...
Thanks again,
Piyush
Anders Lindgren wrote:
>
> Hi,
>
> 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
>
> case PT_NEWP:
> break;
>
> 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,
>
> /Anders
>
> 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);
> > break;
> >
> > 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,
> > Piyush
> > (ns-2.1b7, red hat 7)
> >