#include <packettracer.h>
Inheritance diagram for Tracer:
Public Member Functions | |
Tracer (int level) | |
void | trace (Packet *p, SAP *sap) |
virtual void | format (Packet *p, SAP *sap)=0 |
int | level () |
Tracer * | next () |
void | next (Tracer *tr) |
Protected Member Functions | |
void | writeTrace (SAP *sap, char *s,...) |
Private Attributes | |
int | level_ |
Tracer * | next_ |
Definition at line 57 of file packettracer.h.
Tracer::Tracer | ( | int | level | ) |
Tracer constructor. The Level param indicates the position which this tracer will be stored in the system packet tracer list
level | position int the packet tracer list (0 will be the first tracer that will process the packet) |
Definition at line 37 of file packettracer.cc.
References next_.
void Tracer::trace | ( | Packet * | p, | |
SAP * | sap | |||
) |
This method is called by the PktTracer in order to trace the packet. This method call the format method and then the trace method of the next_ Tracer (if it is not null)
p | pointer to the Packet to be traced | |
sap | pointer to the SAP instance which ask for the trace |
Definition at line 67 of file packettracer.cc.
References format(), next_, and trace().
Referenced by PktTracer::trace(), and trace().
Here is the call graph for this function:
virtual void Tracer::format | ( | Packet * | p, | |
SAP * | sap | |||
) | [pure virtual] |
This method has to write a formatted string with the packet's information using the method writeTrace of the given SAP.
p | pointer to the Packet to be traced | |
sap | pointer to the SAP instance which ask for the trace |
Implemented in CommonHeaderTracer, IpHeaderTracer, RoutingTracer, CbrTracer, TcpTracer, MPhyTracer, SinrTracer, MLLTracer, UmtsTracer, WirelessPhyTracer, Mac_802_11_Tracer, AltTracerMac80211, ARP_Tracer, MrclRoutingTracer, and MrclAodvTracer.
Referenced by trace().
int Tracer::level | ( | ) |
Returns the level_ of the tracer
Definition at line 42 of file packettracer.cc.
References level_.
Referenced by PktTracer::addTracer().
Tracer * Tracer::next | ( | ) |
Returns the pointer to the next Tracer in the Tracer chain
Definition at line 47 of file packettracer.cc.
References next_.
Referenced by PktTracer::addTracer().
void Tracer::next | ( | Tracer * | tr | ) |
void Tracer::writeTrace | ( | SAP * | sap, | |
char * | s, | |||
... | ||||
) | [protected] |
This method write a string in the trace file using the method vWriteTRace of the given SAP instance
sap | the SAP instance where the string will write. | |
s | string to be write in the trace file. The sintax is equal to the printf C function |
Definition at line 57 of file packettracer.cc.
References ConnectorTrace::vWriteTrace().
Referenced by UmtsTracer::format(), IpHeaderTracer::format(), CommonHeaderTracer::format(), TcpTracer::format(), WirelessPhyTracer::format(), SinrTracer::format(), MPhyTracer::format(), MLLTracer::format(), ARP_Tracer::format(), AltTracerMac80211::format(), Mac_802_11_Tracer::format(), MrclRoutingTracer::format(), RoutingTracer::format(), CbrTracer::format(), and MrclAodvTracer::format().
Here is the call graph for this function:
int Tracer::level_ [private] |
Tracer* Tracer::next_ [private] |