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

Re: loss of original packet type info when tracing multiple protocols.




If you set MacTrace, AgentTrace or RouterTrace ON in your tcl script, 
cmu-trace objects are appropriately inserted (look at the add-target 
MobileNode method in tcl/lib/ns-mobilenode.tcl). You might want to look at ns 
Notes and Documentation or any existing ad hoc protocol implementation such as 
DSDV  for ideas.

Satish


> Hi, thanks for your fast reply. You're right. But what do you think would be the
> best solution in case I do wish to use the ns/cmu trace objects to trace Packets
> at mulitple protocol layers?
> 
> regards, Sjoerd Janssen.
> 
> 
> 
> Satish Kumar wrote:
> 
> > Only packets generated by the mac-802.11 protocol such as RTS, CTS and ACK
> > packets have PT_MAC as the packet type in the common header (if you look at
> > mac-802_11.cc, you'll notice the packet type is set to PT_MAC only in sendRTS,
> > sendCTS and sendACK methods). I dont think the packet type is changed to
> > PT_MAC for packets generated by higher layer protocols.
> >
> > Satish
> >
> > > Hi,
> > >
> > > - How does one retain the original information in the common header -
> > > the packet type being the most important- when using nodes consisting of
> > > multiple protocol layers and tracing for some of these layers is
> > > required?
> > >
> > > Consider for example a node containing a MAC layer and a TCP agent.. The
> > > ns/cmu trace objects generate their traces by looking at the packet type
> > > field in the common header. For a MAC packet, the type therefore needs
> > > to be changed from PT_TCP  to PT_MAC in the sending MAC object (I know
> > > this is being done in mac-802_11.cc when a Packet is passed to the
> > > channel). On the receiving MAC side, the packet type should be changed
> > > back to PT_TCP but I don't see how this information can be retained. I
> > > also don't see how / if  this is being done by the MAC object in
> > > mac-802_11.cc
> > >
> > > I guess there are ways to avoid it, e.g. packing the original (TCP/IP)
> > > packet into the data field of the Packet transmitted by MAC (and
> > > unpacking at the MAC receiver) or using an additional header to store
> > > the information contained in the original common header,  but I'd really
> > > like to know how the people from CMU did this in mac-802_11
> > >
> > > Regards, Sjoerd Janssen.
> > >
> > >
> > >
> > >
> > >
>