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

Re: Output trace for prune & graft



> hi,
> 
> i am using ns-2.1b2.  Is there some mixup in the graft and prune naming
> in the output trace?  The names seem to have swap. ie. the entries in
> the 'out.tr' show 'graft' instead of 'prune', when the packet should be
> a 'prune'.

There's no mix up, ... it is actually an artifact of the naming 
conventions for multicast in ns.

What I think you're alluding to in the trace file, is actually the
'agent's name and not the message codes (e.g. prune or graft). I am
assuming you are using the detailedDM or DM protocol, which in turn uses the
'so-called' prune agent (I think it should be renamed as DM agent or PIMDM
agent or detailedDM agent... or something the like). Again, to add to the
confusion, the 'prune' agent is initialized with a packet type of 'graft' !!!
in prune.cc: 
PruneAgent::PruneAgent() : Agent(PT_GRAFT)

and that is what appears in the trace file (check trace.cc and its 
format() function).

Now that I've explained why you see the 'graft' in the trace file, I 
should tell you how to decipher the trace file to get the code names for 
the message [again, this is the artifact of ns multicast, which may be 
changing soon (maybe someone could elaborate on the changes)].

The protocol is implemented in OTcl using the Agent/Mcast/Prune for 
sending/receiving the packets, and uses the class_ field in the packet 
(which is now called the flow_id),
to distinguish the different message codes [I think this may break if you 
want to use the flow_id for something else..!].

the codes are given as follows:
30 is prune
31 is graft
32 is graft-ack
33 is join
34 is assert

you will find these numbers in your trace file (the .tr) a couple of 
fields after the 'graft': e.g. x1 x2 ... graft xa xb flow_id <--- this is it.

Maybe using McastMonitor could have helped there... (I haven't used it 
before),... maybe someone can elaborate on this.

Regards,
-A

> 
> thanks.
> regards,
> Cheng Lin TAN
> 
>