IpHeaderTracer Class Reference

#include <headertracer.h>

Inheritance diagram for IpHeaderTracer:

Inheritance graph
[legend]
Collaboration diagram for IpHeaderTracer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 IpHeaderTracer ()
void format (Packet *p, SAP *sap)

Detailed Description

The IpHeaderTracer is born for tracing the IP header of a Packet, which contains: The class extend Tracer, but it is compiled and linked in another library. Thus, users which want to change the output format of the trace file can write a new class and plug their library in the simulation (instead this). When the library are loaded a IpHeaderTracer are instanced and is plugged to the PktTracer by invoking the Sap addTracer static method.

See also:
Tracer, PktTracer, SAP, format

Definition at line 105 of file headertracer.h.


Constructor & Destructor Documentation

IpHeaderTracer::IpHeaderTracer (  ) 

The class constructor initialize the level to 3.

See also:
Tracer

Definition at line 89 of file headertracer.cc.


Member Function Documentation

void IpHeaderTracer::format ( Packet *  p,
SAP sap 
) [virtual]

This method writes a string in the trace file with the following format:

--IP-- SRC:SPORT DST:DPORT TTL NH

where

Parameters:
p pointer to the packet to be traced
sap pointer to the SAP instance which ask for the trace

Implements Tracer.

Definition at line 91 of file headertracer.cc.

References Tracer::writeTrace().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Nov 26 15:48:54 2008 for NS-MIRACLE library by  doxygen 1.5.2